ausghostdog

Untitled

May 16th, 2012
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1. <?php
  2. if(!isset($_SESSION))
  3. {
  4. session_start();
  5. }
  6.  
  7.  
  8. ?>
  9. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  10. <!--
  11. Supremacy4T by 4Templates | http://www.4templates.com/free/ | @4templates
  12. Licensed under the Creative Commons Attribution 3.0 License
  13. -->
  14. <html xmlns="http://www.w3.org/1999/xhtml">
  15. <head>
  16. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  17. <title>Home</title>
  18.  
  19. <link href="http://fonts.googleapis.com/css?family=Abel" rel="stylesheet" type="text/css" />
  20. <link href="../styles/default.css" rel="stylesheet" type="text/css" media="all" />
  21. </head>
  22. <body>
  23. <div id="wrapper">
  24. <div id="wrapper-bgtop">
  25. <div id="wrapper-bgbtm">
  26. <div id="header">
  27. <div id="logo">
  28. <h1><a href="#">Barzzar Ceramics</a></h1>
  29. <p>Contempary desings, old school service</p>
  30. </div>
  31. <div id="search">
  32.  
  33. </div>
  34. </div>
  35. <div id="menu">
  36.  
  37. <?php
  38. if (!isset($_SESSION['logged']) && !isset($_SESSION['logged_admin']))
  39. echo "
  40. <ul>
  41.  
  42. <li class='active'><a href='../index.php' accesskey='1' title='Index'><span>Home</span></a></li>
  43. <li><a href='login.php' accesskey='2' title=''><span>Login</span></a></li>
  44. <li><a href='register.php' accesskey='3' title=''><span>register</span></a></li>
  45. <li><a href='catalogue.php' accesskey='4' title=''><span>catalogue</span></a></li>
  46. </ul>";
  47. elseif (isset($_SESSION['logged']) ||isset($_SESSION['logged_admin']))
  48. echo "
  49. <ul>
  50. <li><a href='../index.php' accesskey='1' title='Index'><span>Home</span></a></li>
  51. <li><a href='catalogue.php' accesskey='4' title=''><span>catalogue</span></a></li>
  52. <li><a href='#' accesskey='3' title=''><span>cart</span></a></li>
  53. <li><a href='changepassword.php' accesskey='4' title=''><span>change password</span></a></li>
  54. <li><a href='#' accesskey='4' title=''><span>View orders</span></a></li>
  55. <li><a href='logout.php' accesskey='4' title=''><span>logout</span></a></li>
  56. </ul>"
  57. ?>
  58.  
  59. <!-- close of changed nav-->
  60. <!-- not logged session nav working to this point -->
  61. </ul>
  62. </div>
  63.  
  64.  
  65. <div id="page">
  66. <div id="content">
  67. <div class="post">
  68.  
  69. <div class="entry">
  70. <p class="img-margin">&nbsp;</p>
  71.  
  72. <?php
  73.  
  74. require_once "../database/dbconn.php";
  75.  
  76. {
  77. $query = "SELECT * FROM tblproducts";
  78. $result = mysql_query($query) or die(mysql_error());
  79.  
  80. while ($rows = mysql_fetch_assoc($result)){
  81. echo"<form method='post' action='displayinfo.php'>
  82. <table width='500'>
  83. <tr>
  84. <td>Product code</td>
  85. <td>{$rows['Product_code']}</td>
  86.  
  87. </tr>
  88.  
  89. <input type='hidden' name='prodid' value='{$rows['Product_code']}'/>
  90.  
  91. <tr>
  92. <td>product name</td>
  93. <td>{$rows['Product_name']}</td>
  94. </tr>
  95.  
  96. <input type='hidden' name='prodname' value='{$rows['Product_name']}'/>
  97.  
  98. <tr>
  99. <td>Product descroption</td>
  100. <td>{$rows['Product_descroption']}</td>
  101. </tr>
  102.  
  103. <tr>
  104. <td>Product size</td>
  105. <td>{$rows['Product_size']}</td>
  106. </tr>
  107.  
  108. <tr>
  109. <td>Product price</td>
  110. <td>{$rows['Product_price']}</td>
  111. </tr>
  112.  
  113. <input type='hidden' name='prodprice' value='{$rows['Product_price']}'/>
  114.  
  115. <tr>
  116. <td>qty </td>
  117. <td><input type='text' name='quantity' /></td>
  118. </tr>
  119.  
  120. <tr>
  121. <td></td>
  122. <td><input type='submit' value='submit' /></td>
  123. </tr>
  124.  
  125. </table>
  126. </form>";
  127. }
  128. ?>
  129.  
  130.  
  131.  
  132.  
  133. <?php
  134.  
  135. }
  136.  
  137.  
  138.  
  139. ?>
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146. </div>
  147. </div>
  148. </div>
  149. </div>
  150. </div>
  151. </div>
  152. </div>
  153. <div id="footer" class="container">
  154. <p>&copy; Your Website Name&nbsp;&nbsp;|&nbsp;&nbsp;Supremacy4T by <a href="http://www.4templates.com/free/">4Templates</a>&nbsp;&nbsp;|&nbsp;&nbsp;Photos by <a href="http://fotogrph.com/">Fotogrph</a></p>
  155. </div>
  156. </body>
  157. </html>
Advertisement
Add Comment
Please, Sign In to add comment