Posted By

frederick on 07/10/10


Tagged


Versions (?)

rand-copy


 / Published in: PHP
 

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3.  
  4. <head>
  5. <title></title>
  6.  
  7. <style type="text/css">
  8.  
  9. .fullbackground_img {
  10. width:100%;
  11. position:absolute;top:0px;left:0px;
  12. z-index:2;
  13. }
  14.  
  15.  
  16. #fullbackground_link_achor{
  17. width:250px;height:150px;
  18. display:block;overflow:hidden;
  19. background-color:red;
  20. margin:0px auto;
  21. }
  22. #fullbackground_link_achor a{
  23. width:250px;height:150px;
  24. display:block;overflow:hidden;
  25. color:#fff;
  26. background-color:red;
  27. }
  28.  
  29.  
  30. #content_wrapper {
  31. width:100%;
  32. position:absolute;top:0px;left:0px;
  33. z-index:3;
  34. top:0px;left:0px;
  35. }
  36. #wrapper {
  37. margin:0px auto;padding:0px;
  38. width:970px;
  39. display:block;overflow:hidden;
  40. background-color: green;
  41. }
  42. #content {
  43. width:970px;height:1000px;
  44. display:block;overflow:hidden;
  45. background-color:#ccc;
  46. }
  47.  
  48. #header {
  49. width:970px;height:50px;
  50. display:block;overflow:hidden;
  51. background-color:#666;
  52. }
  53. #header a {
  54. width:970px;height:50px;
  55. display:block;overflow:hidden;
  56. }
  57.  
  58.  
  59. </style>
  60.  
  61.  
  62. </head>
  63. <body>
  64. <?
  65. $changelinks = rand(1, 3);
  66.  
  67.  
  68. if ($changelinks == "1") {
  69. $changelinks_copy = "one";
  70. $changelinks_url = "linkone";
  71. }
  72. elseif ($changelinks == "2") {
  73. $changelinks_copy = "two";
  74. $changelinks_url = "linktwo";
  75. }
  76. elseif ($changelinks == "3") {
  77. $changelinks_copy = "three";
  78. $changelinks_url = "linkthree";
  79. }
  80.  
  81.  
  82. ?>
  83.  
  84. <div id="fullbackground_container">
  85. <img id="background-img" class="fullbackground_img" src="<?=$changelinks;?>.jpg" alt="<?=$changelinks_copy;?>" />
  86. </div>
  87.  
  88.  
  89. <div id="content_wrapper">
  90. <div id="wrapper">
  91. <div id="header"><a href="http://www.google.com" onclick="window.open(this.href); return false">Header</a></div>
  92. <div id="content">
  93. <div id="fullbackground_link_achor">
  94. <a href="<?=$changelinks_url;?>">
  95. <?=$changelinks_copy;?>
  96. </a>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101.  
  102. </body>
  103. </html>
  104.  

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: Vordreller on July 10, 2010

This is Javascript, not PHP

You need to login to post a comment.