View-appointment


SUBMITTED BY: Guest

DATE: Sept. 23, 2014, 7:45 p.m.

FORMAT: PHP

SIZE: 6.8 kB

HITS: 1163

  1. <?
  2. include '../include/connect.php';
  3. if (!isset($_SESSION['admin'])) {
  4. header('location: ../index.php');
  5. exit();
  6. }
  7. else
  8. {
  9. $sess_username =$_SESSION['admin'];
  10. }
  11. ?>
  12. <!DOCTYPE HTML>
  13. <head>
  14. <title>JOEN Nails and Spa</title>
  15. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  16. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  17. <link href="../css/style.css" rel="stylesheet" type="text/css" media="all"/>
  18. <script src="../js/jquery.min.js"></script>
  19. </head>
  20. <body>
  21. <div class="header">
  22. <div class="header_top">
  23. <div class="wrap">
  24. <div class="logo">
  25. <a href="index.php"><img src="../images/logo.png" alt="" /></a>
  26. </div>
  27. <div class="call">
  28. <link rel="shortcut icon" href="../../favicon.ico">
  29. <link rel="stylesheet" type="text/css" href="../css/normalize.css" />
  30. <link rel="stylesheet" type="text/css" href="../css/demo.css" />
  31. <link rel="stylesheet" type="text/css" href="../css/component.css" />
  32. <link rel="stylesheet" type="text/css" href="../css/content.css" />
  33. <script src="js/modernizr.custom.js"></script>
  34. <style type="text/css">
  35. .appointments-table {
  36. border-collapse: collapse;
  37. }
  38. .appointments-table td {
  39. border: 1px solid #444;
  40. padding: 5px;
  41. }
  42. .container {
  43. width: 900px;
  44. }
  45. legend {
  46. color: #888;
  47. margin-left: 10px;
  48. padding: 5px 10px 10px 10px;
  49. border: 1px solid #888;
  50. border-radius: 5px;
  51. }
  52. fieldset {
  53. list-style: none;
  54. margin: 0;
  55. padding: 30px 30px 30px 30px;
  56. border: 1px solid #888;
  57. border-radius: 5px;
  58. }
  59. fieldset label {
  60. display: block;
  61. margin-top: 5px;
  62. }
  63. </style>
  64. <div class="welcome">
  65. Welcome <?=$sess_username?>
  66. <input name="btnlogout" type="button" value="Log Out" onClick="location='logout.php'" class="button"/>
  67. </div>
  68. </div>
  69. <div class="clear"></div>
  70. </div>
  71. </div>
  72. <div class="header_bottom">
  73. <div class="wrap">
  74. <div class="menu">
  75. <ul>
  76. <li><a href="index.php">Home</a></li>
  77. <li class="active"><a href="appointments.php">Reservations</a></li>
  78. <li><a href="announcement.php">Announcements</a></li>
  79. <li><a href="pending-registrations.php">Pending Registrations</a></li>
  80. <div class="clear"></div>
  81. </ul>
  82. </div>
  83. <div class="social-icons">
  84. <ul>
  85. <li><a href="#"><img src="../images/facebook.png" alt="" /></a></li>
  86. <li><a href="#"><img src="../images/twitter.png" alt="" /></a></li>
  87. <li><a href="#"><img src="../images/google-plus.png" alt="" /></a></li>
  88. <li><a href="#"><img src="../images/vimeo.png" alt="" /></a></li>
  89. </ul>
  90. </div>
  91. <div class="clear"></div>
  92. </div>
  93. </div> <br>
  94. <div class="main">
  95. <div class="content">
  96. <div class="wrap">
  97. <div class="container">
  98. <fieldset>
  99. <legend>Reservation Requests</legend>
  100. <div class="banner">
  101. <?php
  102. $month = $_GET['month'];
  103. $day = $_GET['day'];
  104. $sql = "SELECT * FROM reservation WHERE month='$month' AND day='$day'";
  105. $result = mysql_query($sql);
  106. if (mysql_num_rows($result) > 0) {
  107. echo "<table class='appointments-table' width='100%'>";
  108. echo "<tr><th>Firstname</th><th>Lastname</th><th>Date</th><th>Time</th><th>Contact</th><th>Delete</th><th>Confirm</th></tr>";
  109. while ($row = mysql_fetch_array($result)) {
  110. list($id, $firstname, $lastname, $month, $day, $year, $hour, $minute, $ampm, $contact) = $row;
  111. if (($minute == 10) OR ($minute == 20) OR ($minute == 30) OR ($minute == 40) OR ($minute == 50)) {
  112. $minute = ": " . $minute;
  113. } elseif ($minute == 0) {
  114. $minute = "o'clock";
  115. }
  116. echo "<tr><td align='center'>$firstname</td><td align='center'>$lastname</td><td align='center'>$month/$day/$year</td><td align='center'>$hour $minute $ampm</td><td align='center'>$contact</td><td align='center'><a href='delete-appointment.php?id=$id'>Delete</a></td><td align='center'><a href='sendsms.php?Contact=$contact'>Confirm</a></td></tr>";
  117. }
  118. echo "</table>";
  119. } else {
  120. echo "No Reservations";
  121. }
  122. ?>
  123. </div>
  124. </fieldset>
  125. </div>
  126. </div>
  127. </div>
  128. </div><br>
  129. <div class="footer-strip"> </div>
  130. <div class="footer">
  131. <div class="wrap">
  132. <div class="footer_grides">
  133. <div class="footer_grid1">
  134. <h3>Information</h3>
  135. <ul>
  136. <li><a href="#">Privacy Policy</a></li>
  137. <li><a href="#">Announcements</a></li>
  138. <li><a href="#">Site Map</a></li>
  139. </ul>
  140. </div>
  141. <div class="footer_grid2">
  142. <h3>Get In Touch</h3>
  143. <div class="address">
  144. <ul>
  145. <li>ADDRESS</li>
  146. <li>3RD Flr, Central Mall Binan, Laguna</li>
  147. <li>joennailsph@gmail.com</li>
  148. <li><span>Telephone :</span> (049) 5760356</li>
  149. <li><span>Mobile Number:</span>09993639765 / 09064560010 / 09157789696</li>
  150. </ul>
  151. </div>
  152. </div>
  153. <div class="footer_grid3">
  154. <h3>Our Company</h3>
  155. <div class="f_menu">
  156. <ul>
  157. <li><a href="#">About your Company</a></li>
  158. <li><a href="#">Terms & conditions</a></li>
  159. <li><a href="#">Our Team</a></li>
  160. </ul>
  161. </div>
  162. </div>
  163. <div class="footer_grid4">
  164. <h3>Follow US</h3>
  165. <div class="img_list">
  166. <ul>
  167. <li><img src="../images/facebook.png" alt=""><a href="#">Join Us on Facebook</a></li>
  168. <li><img src="../images/twitter.png" alt=""><a href="#">Follow Us on Twitter</a></li>
  169. <li><img src="../images/google-plus.png" alt=""><a href="#">Share Us on Twitter</a></li>
  170. </ul>
  171. </div>
  172. </div>
  173. <div class="clear"></div>
  174. </div>
  175. </div>
  176. </div>
  177. <div class="copy_right">
  178. <p> © All rights Reseverd | JOEN NAILS</p>
  179. </div>
  180. </body>
  181. </html>

comments powered by Disqus