andimubaroq

admin.php

Aug 17th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. <?php
  2. session_start();
  3. if( empty( $_SESSION['id_user'] ) ){
  4. //session_destroy();
  5. $_SESSION['err'] = '<strong>ERROR!</strong> Anda harus login terlebih dahulu.';
  6. header('Location: ./');
  7. die();
  8. } else {
  9. include "koneksi.php";
  10. ?>
  11. <!DOCTYPE html>
  12. <html lang="en">
  13. <head>
  14. <meta charset="utf-8">
  15. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  16. <meta name="viewport" content="width=device-width, initial-scale=1">
  17. <meta name="description" content="">
  18. <meta name="author" content="">
  19.  
  20. <title>Aplikasi Jasa Cuci</title>
  21.  
  22. <!-- Bootstrap core CSS -->
  23. <link href="css/bootstrap.css" rel="stylesheet">
  24. <link href="css/jquery-ui.min.css" rel="stylesheet">
  25.  
  26. <style type="text/css">
  27. body {
  28. min-height: 200px;
  29. padding-top: 70px;
  30. }
  31. @media print {
  32. .container {
  33. margin-top: -30px;
  34. }
  35. #tombol,
  36. .noprint {
  37. display: none;
  38. }
  39. }
  40. </style>
  41.  
  42. </head>
  43.  
  44. <body>
  45.  
  46. <?php include "menu.php"; ?>
  47.  
  48. <div class="container">
  49.  
  50. <?php
  51. if( isset($_REQUEST['hlm'] )){
  52.  
  53. $hlm = $_REQUEST['hlm'];
  54.  
  55. switch( $hlm ){
  56. case 'transaksi':
  57. include "transaksi.php";
  58. break;
  59. case 'laporan':
  60. include "laporan.php";
  61. break;
  62. case 'user':
  63. include "user.php";
  64. break;
  65. case 'biaya':
  66. include "biaya.php";
  67. break;
  68. case 'cetak':
  69. include "cetak_nota.php";
  70. break;
  71. }
  72. } else {
  73. ?>
  74. <!-- Main component for a primary marketing message or call to action -->
  75. <div class="jumbotron">
  76. <h2>Selamat Datang di Aplikasi Kasir Jasa Cuci</h2>
  77.  
  78. <p>Halo <strong><?php echo $_SESSION['nama']; ?></strong>, Anda login sebagai
  79. <strong>
  80. <?php
  81. if($_SESSION['level'] == 1){
  82. echo 'Admin.';
  83. } else {
  84. echo 'Petugas Kasir.';
  85. }
  86. ?>
  87. </strong>
  88. </p>
  89. </div>
  90. <?php
  91. }
  92. ?>
  93. </div> <!-- /container -->
  94.  
  95.  
  96. <!-- Bootstrap core JavaScript, Placed at the end of the document so the pages load faster -->
  97. <script src="js/jquery.min.js"></script>
  98. <script src="js/bootstrap.min.js"></script>
  99. <script src="js/jquery-ui.min.js"></script>
  100.  
  101. </body>
  102.  
  103. </html>
  104. <?php
  105. }
  106. ?>
Advertisement
Add Comment
Please, Sign In to add comment