Advertisement
Guest User

Untitled

a guest
Sep 8th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.74 KB | None | 0 0
  1. <?php
  2. session_start();
  3. extract($_POST);
  4. $con=mysqli_connect('localhost','root','','db_carousel');
  5.  
  6.  
  7. if(isset($_GET['qwi'])=="r")
  8. {
  9. $ps="
  10. <div class='alert alert-warning alert-dismissable' style='margin-top:20px'>
  11. <button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>
  12. <h4><i class='icon glyphicon glyphicon-ok'></i> Please Check Email !</h4> Username and Password have been sent
  13. </div>
  14. ";
  15. echo $ps;
  16. }
  17.  
  18. if(isset($login)){
  19. if(mysqli_num_rows(mysqli_query($con,"SELECT tb_admin where user='$user' and pass='$pass'"))>0){//ditemukan}else{//tidak ditemukan}
  20. $tipe=mysqli_fetch_row(mysqli_query($con,"SELECT tb_admin where user='$user' and pass='$pass'"));
  21. $_SESSION['kosong']=$tipe[0];
  22. header("location:./");
  23. }
  24. else{//ini isi else}
  25. $ps="
  26. <div class='alert alert-warning alert-dismissable' style='margin-top:20px'>
  27. <button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>
  28. <h4><i class='icon glyphicon glyphicon-remove'></i> Wrong !</h4> Wrong username or password :(
  29. </div>
  30. ";
  31. echo $ps;
  32. }
  33. ?>
  34. <!DOCTYPE html>
  35. <html>
  36. <head>
  37. <meta charset="UTF-8">
  38. <title>Admin Pusat Ilmu </title>
  39. <!-- Tell the browser to be responsive to screen width -->
  40. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  41. <!-- Bootstrap 3.3.4 -->
  42. <link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
  43. <!-- Font Awesome Icons -->
  44. <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
  45. <!-- Theme style -->
  46. <link href="dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
  47. <!-- iCheck -->
  48. <link href="plugins/iCheck/square/blue.css" rel="stylesheet" type="text/css" />
  49.  
  50. <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  51. <!-- WARNING: Respond.js doesnt work if you view the page via file:// -->
  52. <!--[if lt IE 9]
  53. <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  54. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  55. <![endif]-->
  56. </head>
  57. <body class="login-page">
  58. <div class="login-box">
  59. <div class="login-logo">
  60. <a href="#"><b>Login Administrator</b></a>
  61. </div><!-- /.login-logo -->
  62. <div class="login-box-body">
  63. <p class="login-box-msg">Sign in to start your session</p>
  64. <form method="post">
  65. <div class="form-group has-feedback">
  66. <input type="text" class="form-control" placeholder="Username" name="user" />
  67. <span class="glyphicon glyphicon-user form-control-feedback"></span>
  68. </div>
  69. <div class="form-group has-feedback">
  70. <input type="password" class="form-control" placeholder="Password" name="pass" />
  71. <span class="glyphicon glyphicon-lock form-control-feedback"></span>
  72. </div>
  73. <div class="row">
  74. <div class="col-xs-12">
  75. <input type="submit" class="btn btn-primary btn-block btn-flat pull-right" value="Login" name="login"/>
  76. </div><!-- /.col -->
  77. </div>
  78. </form>
  79.  
  80. <a href="lupa.php">Forget Password</a><br>
  81.  
  82. </div><!-- /.login-box-body -->
  83.  
  84. </div><!-- /.login-box -->
  85.  
  86. <!-- jQuery 2.1.4 -->
  87. <script src="plugins/jQuery/jQuery-2.1.4.min.js" type="text/javascript"></script>
  88. <!-- Bootstrap 3.3.2 JS -->
  89. <script src="../bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
  90. </body>
  91. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement