Greetings!
I am in the process of updating our Clients page and sought to randomize and alternate the selection of logos/links displayed. Upon upload, the template shows up when I log in to my Couch admin, and I was able to view the document/code via the hosting cPanel, but the page in question returns as "page not found" in every browser on every device. Caches have been cleared, devices and browsers have been restarted and I have confirmed that the host does not have any aggressive caching settings in play. Even when I delete the block of new code and re-upload the established template, it comes back as "page not found."
My code comes back with no syntax errors, but PHP is also not my forte; so I am wondering:
1.) Is there anything I need to be aware of with how the PHP switch I put in place might be interacting with the PHP output from Couch?
2.) Is there a way to achieve the desired effect with Couch? (I found this viewtopic.php?f=3&t=8232&p=26557&hilit=random#p26557 but it's a bit different).
The temporary URL for my work in progress is: https://excelgraphics.ink/clients2/
The block of code in question is:
Thank you in advance for any light you can shed on this!
I am in the process of updating our Clients page and sought to randomize and alternate the selection of logos/links displayed. Upon upload, the template shows up when I log in to my Couch admin, and I was able to view the document/code via the hosting cPanel, but the page in question returns as "page not found" in every browser on every device. Caches have been cleared, devices and browsers have been restarted and I have confirmed that the host does not have any aggressive caching settings in play. Even when I delete the block of new code and re-upload the established template, it comes back as "page not found."
My code comes back with no syntax errors, but PHP is also not my forte; so I am wondering:
1.) Is there anything I need to be aware of with how the PHP switch I put in place might be interacting with the PHP output from Couch?
2.) Is there a way to achieve the desired effect with Couch? (I found this viewtopic.php?f=3&t=8232&p=26557&hilit=random#p26557 but it's a bit different).
The temporary URL for my work in progress is: https://excelgraphics.ink/clients2/
The block of code in question is:
- Code: Select all
<div class="row">
<div class="col-xs-4 col-sm-2 excelbox">
<?php
$num = Rand (0,3) ;
switch ($num) {
case 0:
print "<img src='<cms:show k_site_link />excel_img/clients/accela.png' class='img-responsive' alt='Accela Inc.'>
<div class='overlay'>
<a href='http://accela.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/accela2.png' class='client' alt='Accela Inc.'>
</a>
</div>";
break;
case 1:
print "<img src='<cms:show k_site_link />excel_img/clients/admedes.png' class='img-responsive' alt='ADMEDES'>
<div class='overlay'>
<a href='http://admedes.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/admedes2.png' class='client' alt='ADMEDES'>
</a>
</div>";
break;
case 2:
print "<img src='<cms:show k_site_link />excel_img/clients/agape.png' class='img-responsive' alt='Agape Villages Foster Family Agency'>
<div class='overlay'>
<a href='http://agapevillages.org' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/agape2.png' class='client' alt='Agape Villages Foster Family Agency'>
</a>
</div>";
break;
case 3:
print "<img src='<cms:show k_site_link />excel_img/clients/alcostacapital.png' class='img-responsive' alt='Alcosta Capital Management Inc.'>
<div class='overlay'>
<a href='http://alcostacapital.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/alcostacapital2.png' class='client' alt='Alcosta Capital Management Inc.'>
</a>
</div>";
break;
}
?>
</div>
<div class="col-xs-4 col-sm-2 excelbox">
<?php
$num = Rand (4,7) ;
switch ($num) {
case 4:
print "<img src='<cms:show k_site_link />excel_img/clients/altavista.png' class='img-responsive' alt='Alta Vista Solutions'>
<div class='overlay'>
<a href='http://altavistasolutions.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/altavista2.png' class='client' alt='Alta Vista Solutions'>
</a>
</div>";
break;
case 5:
print "<img src='<cms:show k_site_link />excel_img/clients/amador.png' class='img-responsive' alt='Amador Dental and Orthodontic'>
<div class='overlay'>
<a href='http://pleasantondentistsite.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/amador2.png' class='client' alt='Amador Dental and Orthodontic'>
</a>
</div>";
break;
case 6:
print "<img src='<cms:show k_site_link />excel_img/clients/astute.png' class='img-responsive' alt='Astute Business Solutions'>
<div class='overlay'>
<a href='http://beastute.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/astute2.png' class='client' alt='Astute Business Solutions'>
</a>
</div>";
break;
case 7:
print "<img src='<cms:show k_site_link />excel_img/clients/ati.png' class='img-responsive' alt='ATI Architects and Engineers'>
<div class='overlay'>
<a href='http://atiae.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/ati2.png' class='client' alt='ATI Architects and Engineers'>
</a>
</div>";
break;
}
?>
</div>
<div class="col-xs-4 col-sm-2 excelbox">
<?php
$num = Rand (8,11) ;
switch ($num) {
case 8:
print "<img src='<cms:show k_site_link />excel_img/clients/aztec.png' class='img-responsive' alt='Aztec'>
<div class='overlay'>
<a href='http://azteccm.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/aztec2.png' class='client' alt='Aztec'>
</a>
</div>";
break;
case 9:
print "<img src='<cms:show k_site_link />excel_img/clients/bob.png' class='img-responsive' alt='Brands of Britain'>
<div class='overlay'>
<a href='http://brandsofbritain.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/bob2.png' class='client' alt='Brands of Britain'>
</a>
</div>";
break;
case 10:
print "<img src='<cms:show k_site_link />excel_img/clients/bridgeport.png' class='img-responsive' alt='Bridgeport Company'>
<div class='overlay'>
<a href='http://bridgeportco.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/bridgeport2.png' class='client' alt='Bridgeport Company'>
</a>
</div>";
break;
case 11:
print "<img src='<cms:show k_site_link />excel_img/clients/bridgesgolf.png' class='img-responsive' alt='The Bridges Golf Club'>
<div class='overlay'>
<a href='http://thebridgesgolf.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/bridgesgolf2.png' class='client' alt='The Bridges Golf Club'>
</a>
</div>";
break;
}
?>
</div>
<div class="col-xs-4 col-sm-2 excelbox">
<?php
$num = Rand (12,15) ;
switch ($num) {
case 12:
print "<img src='<cms:show k_site_link />excel_img/clients/chevron.png' class='img-responsive' alt='Chevron Corporation'>
<div class='overlay'>
<a href='http://chevron.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/chevron2.png' class='client' alt='Chevron Corporation'>
</a>
</div>";
break;
case 13:
print "<img src='<cms:show k_site_link />excel_img/clients/clubsportplsntn.png' class='img-responsive' alt='Club Sport Pleasanton'>
<div class='overlay'>
<a href='http://clubsports.com/pleasanton' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/clubsportplsntn2.png' class='client' alt='Club Sport Pleasanton'>
</a>
</div>";
break;
case 14:
print " <img src='<cms:show k_site_link />excel_img/clients/danville.png' class='img-responsive' alt='Town of Danville'>
<div class='overlay'>
<a href='http://danville.ca.gov' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/danville2.png' class='client' alt='Town of Danville'>
</a>
</div>";
break;
case 15:
print "<img src='<cms:show k_site_link />excel_img/clients/ddsdiscounts.png' class='img-responsive' alt='dds discounts'>
<div class='overlay'>
<a href='http://ddsdiscounts.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/ddsdiscounts2.png' class='client' alt='dds discounts'>
</a>
</div>";
break;
}
?>
</div>
<div class="col-xs-4 col-sm-2 excelbox">
<?php
$num = Rand (16,19) ;
switch ($num) {
case 16:
print "<img src='<cms:show k_site_link />excel_img/clients/denova.png' class='img-responsive' alt='DeNova Homes'>
<div class='overlay'>
<a href='http://denovahomes.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/denova2.png' class='client' alt='DeNova Homes'>
</a>
</div>";
break;
case 17:
print "<img src='<cms:show k_site_link />excel_img/clients/ebspca.png' class='img-responsive' alt='East Bay SPCA'>
<div class='overlay'>
<a href='http://eastbayspca.org' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/ebspca2.png' class='client' alt='East Bay SPCA'>
</a>
</div>";
break;
case 18:
print "<img src='<cms:show k_site_link />excel_img/clients/etcap.png' class='img-responsive' alt='ET Capital'>
<div class='overlay'>
<a href='http://etsolar.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/etcap2.png' class='client' alt='ET Capital'>
</a>
</div>";
break;
case 19:
print "<img src='<cms:show k_site_link />excel_img/clients/goals4autism.png' class='img-responsive' alt='Goals for Autism'>
<div class='overlay'>
<a href='http://goalsforautism.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/goals4autism2.png' class='client' alt='Goals for Autism'>
</a>
</div>";
break;
}
?>
</div>
<div class="col-xs-4 col-sm-2 excelbox">
<?php
$num = Rand (20,23) ;
switch ($num) {
case 20:
print "<img src='<cms:show k_site_link />excel_img/clients/kiperhomes.png' class='img-responsive' alt='Kiper Homes Inc.'>
<div class='overlay'>
<a href='http://kiperhomes.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/kiperhomes2.png' class='client' alt='Kiper Homes Inc.'>
</a>
</div>";
break;
case 21:
print "<img src='<cms:show k_site_link />excel_img/clients/lvpac.png' class='img-responsive' alt='Livermore Valley Performing Arts Center'>
<div class='overlay'>
<a href='https://lvpac.org' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/lvpac2.png' class='client' alt='Livermore Valley Performing Arts Center'>
</a>
</div>";
break;
case 22:
print "<img src='<cms:show k_site_link />excel_img/clients/martinperri.png' class='img-responsive' alt='Martin Perri Interiors'>
<div class='overlay'>
<a href='http://martinperri.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/martinperri2.png' class='client' alt='Martin Perri Interiors'>
</a>
</div>";
break;
case 23:
print "<img src='<cms:show k_site_link />excel_img/clients/masonmcduffie.png' class='img-responsive' alt='Mason-McDuffie Mortgage Corporation'>
<div class='overlay'>
<a href='http://mmcdcorp.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/masonmcduffie2.png' class='client' alt='Mason-McDuffie Mortgage Corporation'>
</a>
</div>";
break;
}
?>
</div>
<div class="col-xs-4 col-sm-2 excelbox">
<?php
$num = Rand (24,27) ;
switch ($num) {
case 24:
print "<img src='<cms:show k_site_link />excel_img/clients/neotract.png' class='img-responsive' alt='NeoTract'>
<div class='overlay'>
<a href='http://neotract.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/neotract2.png' class='client' alt='NeoTract'>
</a>
</div>";
break;
case 25:
print "<img src='<cms:show k_site_link />excel_img/clients/oilchngrs.png' class='img-responsive' alt='Oil Changers Inc.'>
<div class='overlay'>
<a href='http://oilchangerinc.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/oilchngrs2.png' class='client' alt='Oil Changers Inc.'>
</a>
</div>";
break;
case 26:
print "<img src='<cms:show k_site_link />excel_img/clients/oneillvintners.png' class='img-responsive' alt='ONeill Vintners and Distillers'>
<div class='overlay'>
<a href='http://oneillwine.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/oneillvintners2.png' class='client' alt='ONeill Vintners and Distillers'>
</a>
</div>";
break;
case 27:
print "<img src='<cms:show k_site_link />excel_img/clients/pacunion.png' class='img-responsive' alt='Pacific Union International'>
<div class='overlay'>
<a href='http://pacificunion.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/pacunion2.png' class='client' alt='Pacific Union International'>
</a>
</div>";
break;
}
?>
</div>
<div class="col-xs-4 col-sm-2 excelbox">
<?php
$num = Rand (28,31) ;
switch ($num) {
case 28:
print "<img src='<cms:show k_site_link />excel_img/clients/paragon.png' class='img-responsive' alt='Paragon Real Estate Group'>
<div class='overlay'>
<a href='http://paragon-re.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/paragon2.png' class='client' alt='Paragon Real Estate Group'>
</a>
</div>";
break;
case 29:
print "<img src='<cms:show k_site_link />excel_img/clients/pivotalsys.png' class='img-responsive' alt='Pivotal Systems'>
<div class='overlay'>
<a href='http://pivotalsys.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/pivotalsys2.png' class='client' alt='Pivotal Systems'>
</a>
</div>";
break;
case 30:
print "<img src='<cms:show k_site_link />excel_img/clients/primemeridian.png' class='img-responsive' alt='Prime Meridian Capital Management'>
<div class='overlay'>
<a href='http://pmifunds.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/primemeridian2.png' class='client' alt='Prime Meridian Capital Management'>
</a>
</div>";
break;
case 31:
print "<img src='<cms:show k_site_link />excel_img/clients/prosperity.png' class='img-responsive' alt='Prosperity Financial Group'>
<div class='overlay'>
<a href='http://prosperityfg.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/prosperity2.png' class='client' alt='Prosperity Financial Group'>
</a>
</div>";
break;
}
?>
</div>
<div class="col-xs-4 col-sm-2 excelbox">
<?php
$num = Rand (32,35) ;
switch ($num) {
case 32:
print "<img src='<cms:show k_site_link />excel_img/clients/rossfamlaw.png' class='img-responsive' alt='Ross Family Law'>
<div class='overlay'>
<a href='http://rossfamilylaw.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/rossfamlaw2.png' class='client' alt='Ross Family Law'>
</a>
</div>";
break;
case 33:
print "<img src='<cms:show k_site_link />excel_img/clients/sanarus.png' class='img-responsive' alt='Sanarus'>
<div class='overlay'>
<a href='http://sanarus.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/sanarus2.png' class='client' alt='Sanarus'>
</a>
</div>";
break;
case 34:
print "<img src='<cms:show k_site_link />excel_img/clients/sanramon.png' class='img-responsive' alt='City of San Ramon'>
<div class='overlay'>
<a href='http://www.ci.san-ramon.ca.us' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/sanramon2.png' class='client' alt='City of San Ramon'>
</a>
</div>";
break;
case 35:
print "<img src='<cms:show k_site_link />excel_img/clients/sanramonchamber.png' class='img-responsive' alt='San Ramon Chamber of Commerce'>
<div class='overlay'>
<a href='http://sanramon.org' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/sanramonchamber2.png' class='client' alt='San Ramon Chamber of Commerce'>
</a>
</div>";
break;
}
?>
</div>
<div class="col-xs-4 col-sm-2 excelbox">
<?php
$num = Rand (36,39) ;
switch ($num) {
case 36:
print "<img src='<cms:show k_site_link />excel_img/clients/sanramonchamber.png' class='img-responsive' alt='San Ramon Chamber of Commerce'>
<div class='overlay'>
<a href='http://sanramon.org' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/sanramonchamber2.png' class='client' alt='San Ramon Chamber of Commerce'>
</a>
</div>";
break;
case 37:
print "<img src='<cms:show k_site_link />excel_img/clients/sanramonedfound.png' class='img-responsive' alt='San Ramon Valley Education Foundation'>
<div class='overlay'>
<a href='http://srvef.org' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/sanramonedfound2.png' class='client' alt='San Ramon Valley Education Foundation'>
</a>
</div>";
break;
case 38:
print "<img src='<cms:show k_site_link />excel_img/clients/sanramoninsurance.png' class='img-responsive' alt='San Ramon Insurance Agency'>
<div class='overlay'>
<a href='http://sanramoninsurance.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/sanramoninsurance2.png' class='client' alt='San Ramon Insurance Agency'>
</a>
</div>";
break;
case 39:
print "<img src='<cms:show k_site_link />excel_img/clients/secureretire.png' class='img-responsive' alt='Secure Retirement'>
<div class='overlay'>
<a href='http://secureretire.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/secureretire2.png' class='client' alt='Secure Retirement'>
</a>
</div>";
break;
}
?>
</div>
<div class="col-xs-4 col-sm-2 excelbox">
<?php
$num = Rand (40,43) ;
switch ($num) {
case 40:
print "<img src='<cms:show k_site_link />excel_img/clients/sentinelsoffreedom.png' class='img-responsive' alt='Sentinels of Freedom Scholarship Foundation'>
<div class='overlay'>
<a href='http://sentinelsoffreedom.org' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/sentinelsoffreedom2.png' class='client' alt='Sentinels of Freedom Scholarship Foundation'>
</a>
</div>";
break;
case 41:
print "<img src='<cms:show k_site_link />excel_img/clients/shakesass.png' class='img-responsive' alt='Shakespeare's Associates'>
<div class='overlay'>
<a href='http://livermoreshakes.org' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/shakesass2.png' class='client' alt='Shakespeare's Associates'>
</a>
</div>";
break;
case 42:
print "<img src='<cms:show k_site_link />excel_img/clients/streetsmarts.png' class='img-responsive' alt='Street Smarts'>
<div class='overlay'>
<a href='http://street-smarts.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/streetsmarts2.png' class='client' alt='Street Smarts'>
</a>
</div>";
break;
case 43:
print "<img src='<cms:show k_site_link />excel_img/clients/versailles.png' class='img-responsive' alt='Versailles Jewelers'>
<div class='overlay'>
<a href='http://versaillesjewelers.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/versailles2.png' class='client' alt='Versailles Jewelers'>
</a>
</div>";
break;
}
?>
</div>
<div class="col-xs-4 col-sm-2 excelbox">
<?php
$num = Rand (44,45) ;
switch ($num) {
case 44:
print "<img src='<cms:show k_site_link />excel_img/clients/viewpointfn.png' class='img-responsive' alt='Viewpoint Financial Network'>
<div class='overlay'>
<a href='http://viewpointfn.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/viewpointfn2.png' class='client' alt='Viewpoint Financial Network'>
</a>
</div>";
break;
case 45:
print "<img src='<cms:show k_site_link />excel_img/clients/winehooligans.png' class='img-responsive' alt='Wine Hooligans'>
<div class='overlay'>
<a href='http://winehooligans.com' target='_blank'>
<img src='<cms:show k_site_link />excel_img/clients/winehooligans2.png' class='client' alt='Wine Hooligans'>
</a>
</div>";
break;
}
?>
</div>
</div>
Thank you in advance for any light you can shed on this!
