Advertisement
Iddon

shop.php

Jan 21st, 2012
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. session_start();
  3. include_once("toplinks.php");
  4. ?>
  5.  
  6. <html xmlns="http://www.w3.org/1999/xhtml">
  7. <link href='http://fonts.googleapis.com/css?family=Macondo+Swash+Caps' rel='stylesheet' type='text/css'>
  8. <head>
  9. <script type="text/javascript">
  10.  
  11.   var _gaq = _gaq || [];
  12.   _gaq.push(['_setAccount', 'UA-25954850-1']);
  13.   _gaq.push(['_trackPageview']);
  14.  
  15.   (function() {
  16.     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  17.     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  18.     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  19.   })();
  20.  
  21. </script>
  22. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Chimpinabox.com</title>
  23.  
  24. <link rel="stylesheet" href="./resources/style.css" />
  25.  
  26. <script type="text/javascript" >
  27. var selectedhead = 0;  
  28. var headids = [];
  29. var headdescriptions = [];
  30. var headcosts = [];
  31.  
  32. var selectedbody = 0;
  33. var bodyids = [];
  34. var bodydescriptions = [];
  35. var bodycosts = [];
  36. <?php
  37. $headids = mysql_query("SELECT * FROM headids where hidden = '0'");
  38. $bodyids = mysql_query("SELECT * FROM bodyids where hidden = '0'");
  39. while($headrow = mysql_fetch_array($headids)){
  40.     echo 'headids.push("'. $headrow["id"] .'");
  41.    
  42.     headdescriptions.push("'. $headrow["description"] .'");
  43.    
  44.     headcosts.push("'. $headrow["cost"] . '");
  45.  
  46.     ';
  47.     }
  48.    
  49. while ($bodyrow = mysql_fetch_array($bodyids)){
  50.     echo 'bodyids.push("'. $bodyrow["id"] .'");
  51.    
  52.     bodydescriptions.push("'. $bodyrow["description"] .'");
  53.    
  54.     bodycosts.push("'. $bodyrow["cost"] .'");
  55.    
  56.    
  57.     ';
  58.     }  
  59.     ?>
  60.     function right(){
  61.         selectedhead += 1;
  62.         if(selectedhead == headids.length){
  63.             selectedhead = 0;
  64.         }
  65.         document.images('HeadImage').src = "./resources/chimp/head/" + headids[selectedhead] + ".png";
  66.  
  67.     }
  68. </script>
  69.  
  70. </head><body>
  71. <table border="0" cellpadding="12" width="100%">
  72.   <tbody><tr>
  73.     <td width="78%"><h1>Chimpinabox.com</h1></td>
  74.     <td width="22%"><?php echo $toplinks; ?><br />
  75. </td>
  76.   </tr>
  77. </tbody></table>
  78. <center><img src="./resources/images/shoplogo.png" alt="Shop Logo" ></center>
  79. <!--<h2>Consumables</h2>
  80. <form method="POST" action="itembuy.php?itemid=1"><input type="submit" value="Buy"><img src="resources/item/bunchofban.jpg" alt="Banana" /></form><br>
  81. <form method="POST" action="itembuy.php?itemid=2"><input type="submit" value="Buy"><img src="resources/item/nuts.jpg" alt="" /></form> -->
  82. <center>
  83.  
  84. <table>
  85. <tr>
  86. <td><div id="headcontainer" align='center' style='width:333px; height:500px; background-image:url(resources/chimp/body/1.png)'>
  87. <img name="HeadImage" src="resources/chimp/head/1.png"/>
  88. </div></td>
  89. <td>
  90. <a onClick="right();"><img src="resources/images/right.png" alt="Right" ></a>
  91. </td>
  92. </tr>
  93. <tr>
  94.  
  95. <td><div id="description" align="center" style='width:333px; height:30px;'>Default</div></td>
  96. <td></td>
  97. </tr>
  98. <tr>
  99. <td>
  100. <div align="center"><a href="#" id="purchase">Buy Headgear</a></div>
  101. <div align="center"><a href="#" id="purchase2">Buy Bodygear</a></div>
  102. </td>
  103. <td></td>
  104. </tr>
  105. </table>
  106. </center>
  107.  
  108.  
  109.  
  110. </body></html>
  111. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement