fork download
  1. {source}
  2.  
  3.  
  4.  
  5. <?php
  6.  
  7. // Each sponsor is an element of the $sponsors array:
  8.  
  9. $sponsors = array(
  10. array('bison','Przykladowy opis po polsku','Example description in English','http://w...content-available-to-author-only...k.com/'),
  11. array('bazarynka','Przykladowy opis po polsku','Example description in English','http://w...content-available-to-author-only...k.com/'),
  12. array('budkasuflera','Przykladowy opis po polsku','Example description in English','http://w...content-available-to-author-only...k.com/'),
  13. array('doda','Przykladowy opis po polsku','Example description in English','http://w...content-available-to-author-only...k.com/'),
  14. array('limo','Przykladowy opis po polsku','Example description in English','http://w...content-available-to-author-only...k.com/'),
  15. array('diil','Przykladowy opis po polsku','Example description in English','http://w...content-available-to-author-only...k.com/'),
  16. array('dge','Przykladowy opis po polsku','Example description in English','http://w...content-available-to-author-only...k.com/')
  17.  
  18. );
  19.  
  20. shuffle($sponsors);
  21. ?>
  22.  
  23.  
  24.  
  25. <style type="text/css">
  26.  
  27.  
  28. .center {text-align:center;}
  29.  
  30.  
  31. /* ---- styling the list ---- */
  32.  
  33. #work {
  34. float:left;
  35. list-style:none;
  36. margin:0;
  37. padding:0;
  38. }
  39. #work li {
  40. float:left;
  41. display:block;
  42. width:130px;
  43. margin:10px;
  44. display:inline;
  45. padding:0px;
  46. background:#fff;
  47. border:0px solid #333333;
  48. height:130px;
  49. }
  50. #work li a {
  51. /*border:none;*/
  52.  
  53. font-weight: bold;
  54.  
  55. text-decoration: underline;
  56.  
  57. color: #8F1D1D;
  58. }
  59. #work p {
  60.  
  61. font-size: 0.80em;
  62.  
  63. margin: 10px;
  64.  
  65.  
  66. }
  67.  
  68.  
  69. /* ---- show-hide elements ---- */
  70.  
  71. #work li .show{
  72. display:block;
  73. width:130px;
  74. height:130px;
  75. }
  76. #work li .hide {
  77. color:#d4df9d;
  78. text-align: left;
  79. height: 0;
  80. overflow: hidden;
  81. background:#111111;
  82.  
  83. cursor: pointer;
  84.  
  85. }
  86. #work li:hover .hide, #work li.over .hide {
  87. cursor: pointer;
  88. height: 130px;
  89. padding:5px;
  90. width:130px;
  91. border:1px solid #333333;
  92. }
  93. #work li:hover .show, #work li.over .show {
  94. height: 0;
  95. overflow: hidden;
  96. }
  97.  
  98.  
  99.  
  100. </style>
  101.  
  102. <ul id="work">
  103.  
  104. <?php
  105. if (stripos($_SERVER['REQUEST_URI'],'/en') !== false) {
  106. $lang=2;} else { $lang=1;} ?>
  107.  
  108. foreach($sponsors as $company)
  109.  
  110. {
  111.  
  112.  
  113. echo '
  114.  
  115. <li> <a class="show" href="#"><img src="demo/img/sponsors/'.$company[0].'.jpg" /></a>
  116. <div class="hide"><!--<a href="#"><h4>Limo Company</h4></a>-->
  117. <p>'.$company[$lang].'</p><p><a href="'.$company[$lang].'">www</a>
  118.  
  119. </div>
  120. </li>
  121.  
  122. ';
  123.  
  124. }
  125.  
  126. ?>
  127.  
  128. </ul>
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135. {/source}
Success #stdin #stdout 0.02s 13112KB
stdin
Standard input is empty
stdout
{source}






<style type="text/css">


.center {text-align:center;}


/* ---- styling the list ---- */

#work {
float:left;
list-style:none;
margin:0;
padding:0;
}
#work li {
float:left;
display:block;
width:130px;
margin:10px;
display:inline;
padding:0px; 
background:#fff;
border:0px solid #333333;
height:130px;
}
#work li a {
/*border:none;*/

font-weight: bold;

text-decoration: underline;

color: #8F1D1D;
}
#work p {

font-size: 0.80em;

margin: 10px;


}


/* ---- show-hide elements ---- */

#work li .show{
display:block;
width:130px;
height:130px;
}
#work li .hide {
color:#d4df9d;
text-align: left;
height: 0;
overflow: hidden;
background:#111111;

cursor: pointer;

}
#work li:hover .hide, #work li.over .hide {
cursor: pointer;
height: 130px;
padding:5px;
width:130px;
border:1px solid #333333;
}
#work li:hover .show, #work li.over .show {
height: 0;
overflow: hidden;
}



</style>

 <ul id="work">


foreach($sponsors as $company)

{


echo '

<li> <a class="show" href="#"><img src="demo/img/sponsors/'.$company[0].'.jpg" /></a>
<div class="hide"><!--<a href="#"><h4>Limo Company</h4></a>-->
<p>'.$company[$lang].'</p><p><a href="'.$company[$lang].'">www</a>

</div>
</li>

';

}

?>

</ul>

 




{/source}