PageRenderTime 34ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 0ms

/myproj/admin_homePage.php

http://jcuecafe.googlecode.com/
PHP | 182 lines | 145 code | 30 blank | 7 comment | 5 complexity | d2338d39897381c71d2f7c6933afe3e0 MD5 | raw file
  1. <?php
  2. session_start();
  3. require_once 'function.inc.php';
  4. if (!isset($_SESSION['is_adminlogged_in'])) {
  5. header("Location:adminlogin.php");
  6. die(); // just to make sure no scripts execute
  7. }
  8. // *****************
  9. //
  10. //Programmer : Ms. Mihika Jain
  11. //Student ID : 12526075
  12. //Contact email : mihika.jain@my.jcu.edu.au
  13. //
  14. // *****************
  15. ?>
  16. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  17. <html xmlns="http://www.w3.org/1999/xhtml">
  18. <META HTTP-EQUIV=Refresh CONTENT="5">
  19. <head>
  20. <title>JCU E- Cafe - Book your appetite online !</title>
  21. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  22. <link href="style_content.css" rel="stylesheet" type="text/css" />
  23. <script type="text/javascript" src="js/cufon-yui.js"></script>
  24. <script type="text/javascript" src="js/arial.js"></script>
  25. <script type="text/javascript" src="js/cuf_run.js"></script>
  26. </head>
  27. <body>
  28. <script type ="text/javascript">
  29. function isNumberKey(evt)
  30. {
  31. var charCode = (evt.which) ? evt.which : event.keyCode
  32. if(charCode > 47 && (charCode <48 || charCode >57))
  33. return false;
  34. return true;
  35. }
  36. </script>
  37. <div class="main">
  38. <div class="header">
  39. <div class="header_resize">
  40. <div class="logo">
  41. <h1><a href="home.php">jcu<span>e</span>cafe</a><small> Book your appetite online </small></h1>
  42. </div>
  43. <div class="menu_nav">
  44. <ul>
  45. <li class ="active"><a href="admin_homePage.php">Home</a></li>
  46. <li><a href="admin_topUp.php">Top-Up </a></li>
  47. <li><a href="signout.php">Sign Out </a></li>
  48. </ul>
  49. <div class="clr"></div>
  50. </div>
  51. <div class="clr"></div>
  52. <div class="header_img"><img src="images/main_img.png" alt="" width="298" height="233" />
  53. <h2>Book <span>your</span> Food </h2>
  54. <p>Attending Lectures ? Hungry too aah ? Just place an order to the cafe and collect it as soon as you are done. No more waiting at the long queues. </p>
  55. <div class="clr"></div>
  56. </div>
  57. </div>
  58. </div>
  59. <div class="clr"></div>
  60. <div class="content">
  61. <div class="content_resize">
  62. <div class="mainbar">
  63. <div class="article">
  64. <h2><span>Welcome</span> Administrator!</h2>
  65. <?php
  66. mysql_connect("localhost", "root","") or die ('Error: ' . mysql_error());
  67. mysql_select_db("jcu_e-cafe");
  68. $query = "SELECT Bill_ID,Time_Of_Delivery,Bill_Status FROM Bill WHERE Bill_Status ='Pending' ";
  69. $result1= mysql_query($query);
  70. ?>
  71. <form id="form" name="form" method="post" action="Confirm.php">
  72. <table border='1' cellspacing='0' width='612' id='yourTbl'>
  73. <tr>
  74. <th bgcolor='green'><font color='white'>Bill ID</font></th>
  75. <th bgcolor='green'><font color='white'>Time Of Delivery</font></th>
  76. <th bgcolor='green'><font color='white'>Order Status</font></th>
  77. </tr>
  78. <?php
  79. $i=0;
  80. $number=0;
  81. while($row=mysql_fetch_array($result1))
  82. {
  83. $number++;
  84. $i++;
  85. if($i%2)
  86. {
  87. $bg_color = "#EEEEEE";
  88. }
  89. else
  90. {
  91. $bg_color = "#E0E0E0";
  92. }
  93. ?>
  94. <tr bgcolor=<?php echo $bg_color; ?> >
  95. <td><center><Strong><font color='red'><?php echo $row['Bill_ID']; ?></font></Strong></center></td>
  96. <td><center><Strong><?php echo $row['Time_Of_Delivery']; ?></Strong></center></td>
  97. <td><center><Strong><?php echo $row['Bill_Status']; ?></Strong> &nbsp;&nbsp;&nbsp;
  98. <?php
  99. $bill_i=$row['Bill_ID'];
  100. echo "<input type ='hidden' name ='bill_ID' value =$bill_i> ";
  101. ?>
  102. </input>
  103. <input name="btn" type="submit" id="<?php echo $row['Bill_ID']; ?>" value="Confirm" onSubmit='Confirm.php'</input></center></td>
  104. </tr>
  105. <?php
  106. }
  107. ?>
  108. </table>
  109. </form>
  110. </div>
  111. <div class="article">
  112. </div>
  113. <div class="article" style="padding:5px 20px 2px 20px;">
  114. </div>
  115. </div>
  116. <div class="sidebar">
  117. <!-- <div class="search">
  118. <form id="form" name="form" method="post" action="#">
  119. <span>
  120. <input name="q" type="text" class="keywords" id="textfield" maxlength="50" value="Search..." />
  121. <input name="b" type="image" src="images/search.gif" class="button" />
  122. </span>
  123. </form>
  124. </div>-->
  125. <div class="gadget">
  126. </div>
  127. <div class="gadget">
  128. </div>
  129. </div>
  130. <div class="clr"></div>
  131. </div>
  132. </div>
  133. <div class="fbg">
  134. <div class="fbg_resize">
  135. <div class="col c1">
  136. <h2><span>Image Gallery</span></h2>
  137. <a href="#"><img src="images_stalls/Orangejuice.jpg" width="58" height="58" alt="" /></a> <a href="#"><img src="images_stalls/chicken_biryani.jpg" width="58" height="58" alt="" /></a> <a href="#"><img src="images_stalls/coffee.jpg" width="58" height="58" alt="" /></a> <a href="#"><img src="images_stalls/frenchfries.jpg" width="58" height="58" alt="" /></a> <a href="#"><img src="images_stalls/hotdog.jpg" width="58" height="58" alt="" /></a> <a href="#"><img src="images_stalls/mee_goreng.jpg" width="58" height="58" alt="" /></a> </div>
  138. <div class="col c2">
  139. </div>
  140. <div class="col c3">
  141. <p><br /></p>
  142. </div>
  143. <div class="clr"></div>
  144. </div>
  145. <div class="footer">
  146. <p class="lf">&copy; Copyright <a href="#">jcuecafe.com</a>.</p>
  147. <div class="clr"></div>
  148. </div>
  149. </div>
  150. </div>
  151. </body>
  152. </html>