/myproj/admin_homePage.php
PHP | 182 lines | 145 code | 30 blank | 7 comment | 5 complexity | d2338d39897381c71d2f7c6933afe3e0 MD5 | raw file
- <?php
- session_start();
- require_once 'function.inc.php';
- if (!isset($_SESSION['is_adminlogged_in'])) {
- header("Location:adminlogin.php");
- die(); // just to make sure no scripts execute
-
-
- }
-
- // *****************
- //
- //Programmer : Ms. Mihika Jain
- //Student ID : 12526075
- //Contact email : mihika.jain@my.jcu.edu.au
- //
- // *****************
-
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <META HTTP-EQUIV=Refresh CONTENT="5">
- <head>
- <title>JCU E- Cafe - Book your appetite online !</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <link href="style_content.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="js/cufon-yui.js"></script>
- <script type="text/javascript" src="js/arial.js"></script>
- <script type="text/javascript" src="js/cuf_run.js"></script>
- </head>
- <body>
- <script type ="text/javascript">
- function isNumberKey(evt)
- {
- var charCode = (evt.which) ? evt.which : event.keyCode
- if(charCode > 47 && (charCode <48 || charCode >57))
- return false;
- return true;
- }
- </script>
- <div class="main">
- <div class="header">
- <div class="header_resize">
- <div class="logo">
- <h1><a href="home.php">jcu<span>e</span>cafe</a><small> Book your appetite online </small></h1>
- </div>
- <div class="menu_nav">
- <ul>
- <li class ="active"><a href="admin_homePage.php">Home</a></li>
- <li><a href="admin_topUp.php">Top-Up </a></li>
-
- <li><a href="signout.php">Sign Out </a></li>
- </ul>
- <div class="clr"></div>
- </div>
- <div class="clr"></div>
- <div class="header_img"><img src="images/main_img.png" alt="" width="298" height="233" />
- <h2>Book <span>your</span> Food </h2>
- <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>
- <div class="clr"></div>
- </div>
- </div>
- </div>
- <div class="clr"></div>
- <div class="content">
- <div class="content_resize">
- <div class="mainbar">
- <div class="article">
- <h2><span>Welcome</span> Administrator!</h2>
- <?php
- mysql_connect("localhost", "root","") or die ('Error: ' . mysql_error());
- mysql_select_db("jcu_e-cafe");
- $query = "SELECT Bill_ID,Time_Of_Delivery,Bill_Status FROM Bill WHERE Bill_Status ='Pending' ";
- $result1= mysql_query($query);
- ?>
- <form id="form" name="form" method="post" action="Confirm.php">
- <table border='1' cellspacing='0' width='612' id='yourTbl'>
- <tr>
- <th bgcolor='green'><font color='white'>Bill ID</font></th>
- <th bgcolor='green'><font color='white'>Time Of Delivery</font></th>
- <th bgcolor='green'><font color='white'>Order Status</font></th>
-
-
- </tr>
- <?php
- $i=0;
- $number=0;
-
- while($row=mysql_fetch_array($result1))
- {
- $number++;
- $i++;
- if($i%2)
- {
- $bg_color = "#EEEEEE";
- }
- else
- {
- $bg_color = "#E0E0E0";
- }
- ?>
- <tr bgcolor=<?php echo $bg_color; ?> >
- <td><center><Strong><font color='red'><?php echo $row['Bill_ID']; ?></font></Strong></center></td>
- <td><center><Strong><?php echo $row['Time_Of_Delivery']; ?></Strong></center></td>
- <td><center><Strong><?php echo $row['Bill_Status']; ?></Strong>
- <?php
- $bill_i=$row['Bill_ID'];
- echo "<input type ='hidden' name ='bill_ID' value =$bill_i> ";
- ?>
- </input>
- <input name="btn" type="submit" id="<?php echo $row['Bill_ID']; ?>" value="Confirm" onSubmit='Confirm.php'</input></center></td>
- </tr>
- <?php
- }
- ?>
- </table>
- </form>
- </div>
- <div class="article">
- </div>
- <div class="article" style="padding:5px 20px 2px 20px;">
- </div>
- </div>
- <div class="sidebar">
- <!-- <div class="search">
- <form id="form" name="form" method="post" action="#">
- <span>
- <input name="q" type="text" class="keywords" id="textfield" maxlength="50" value="Search..." />
- <input name="b" type="image" src="images/search.gif" class="button" />
- </span>
- </form>
- </div>-->
- <div class="gadget">
- </div>
- <div class="gadget">
- </div>
- </div>
- <div class="clr"></div>
- </div>
- </div>
- <div class="fbg">
- <div class="fbg_resize">
- <div class="col c1">
- <h2><span>Image Gallery</span></h2>
- <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>
- <div class="col c2">
-
- </div>
- <div class="col c3">
-
- <p><br /></p>
- </div>
- <div class="clr"></div>
- </div>
- <div class="footer">
- <p class="lf">© Copyright <a href="#">jcuecafe.com</a>.</p>
- <div class="clr"></div>
- </div>
- </div>
- </div>
- </body>
- </html>