Advertisement
Black404

Ganti Jadi Ini

Jun 27th, 2018
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <?php
  3. session_start();
  4. if (empty($_SESSION['username'])) {
  5. header("location: login.php");
  6. } else {
  7. ?>
  8. <html>
  9. <head>
  10. <title>DASHBOARD</title>
  11. <link rel='stylesheet' type='text/css' href='css/navbar-style.css'>
  12. <link rel='stylesheet' type='text/css' href='css/tes.css'>
  13. <link rel='stylesheet' type='text/css' href='css/sidebar.css'>
  14. <link rel='stylesheet' type='text/css' href='css/form.css'>
  15. <link rel='stylesheet' type='text/css' href='css/navbar-logo.css'>
  16. <script type='text/javascript' src='ajax/ajax.js'></script>
  17. </head>
  18. <body>
  19.  
  20. <nav>
  21. <ul>
  22. <a class = "logo" href = "index.php">
  23. <img src = "img/logoapp.png" width = "150" height = "150">
  24. </a>
  25. <li class="dropdown">
  26. <a href="javascript:void(0)" class="dropnya"><?php
  27. include ("connection.php");
  28. $sql =("SELECT * FROM register");
  29. if ($_SESSION['username']){
  30. $user_login = $_SESSION['username'];
  31. }
  32. $sql_user = mysqli_query($conn,"SELECT nama FROM register WHERE username = '$user_login'");
  33. $data_user = mysqli_fetch_array($sql_user);
  34. echo ucwords($data_user['nama']);
  35. ?></a>
  36. <div class="dropdown-content">
  37. <a href="#">Profile</a>
  38. <a href="logout.php">Logout</a>
  39. </div>
  40. </li>
  41. </ul>
  42. </nav>
  43.  
  44. <hr>
  45. <div class="sidebar">
  46. <h3 align ="center" color= "white">Dashboard</h3>
  47. <ul>
  48. <li><a href="index.php">Reservation</a></li>
  49. <li><a href="viewdata.php">View Data</a></li>
  50. </ul>
  51. </div>
  52. <div class="reservasi">
  53. <form method = "get" action = "insert_data.php">
  54. <label for = "cname"> Name Customer </label><br>
  55. <input type = "text" name = "namacust" placeholder= "Input Customer Name"><br>
  56. <label for = "cname"> No Meja </label><br>
  57. <input type = "text" name = "nmeja" placeholder= "Nomer Meja"><br>
  58. <label for = "restoran"> Restaurant </label><br>
  59. <select name = "nrestaurant" id="restaurant" onChange="showMeja(this.value)">
  60. <option>-- Choose Restaurant--</option><br>
  61. <?php
  62. include 'connection.php';
  63. $sql = mysqli_query($conn, "SELECT * FROM restoran");
  64. while($data = mysqli_fetch_array($sql)){
  65. echo "<option value='".$data['id_restoran']."'>(".$data['id_restoran'].")".$data['nama_restoran']."</option>";
  66. }
  67. ?>
  68. </select><br>
  69. <div id = "meja">
  70. </div>
  71. <input type = "submit" name = "reservasi" value = "Reserve" class="btn btn=small btn-primary">
  72. </form>
  73. </div>
  74. </body>
  75. </html>
  76. <?php
  77. }
  78. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement