Advertisement
Guest User

modal

a guest
Jun 5th, 2016
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.07 KB | None | 0 0
  1. <?php
  2. session_start();
  3. include_once 'config.php';
  4. $link = mysqli_connect("localhost", "root", "", "adm");
  5. date_default_timezone_set('Asia/Jakarta');
  6.  
  7. if(isset($_SESSION['userSession'])!="")
  8. {
  9. header("Location: index.php");
  10. exit;
  11. }
  12.  
  13. if(isset($_POST['btn-login']))
  14. {
  15. $username = $MySQLi_CON->real_escape_string(trim($_POST['username']));
  16. $upass = $MySQLi_CON->real_escape_string(trim($_POST['password']));
  17. $tanggal = date("Y-m-d H:i:s");
  18.  
  19. $query = $MySQLi_CON->query("SELECT * FROM users WHERE username='$username'");
  20. $row=$query->fetch_array();
  21. $sql = "UPDATE users SET last_login='$tanggal' WHERE username='$username'";
  22.  
  23. if(password_verify($upass, $row['password']))
  24. {
  25. mysqli_query( $link, $sql);
  26. $_SESSION['userSession'] = $row['user_id'];
  27. header("Location: index.php");
  28. }
  29. else
  30. {
  31. $msg = '<div class="alert alert-danger">Maaf, Username atau Password Anda Salah</div>';
  32. }
  33.  
  34. $MySQLi_CON->close();
  35.  
  36. }
  37. ?>
  38. <!doctype html>
  39. <html lang="en">
  40. <head>
  41. <meta charset="utf-8" />
  42. <link rel="icon" type="image/png" href="assets/img/favicon.ico">
  43. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  44.  
  45. <title>Artis Dunia Maya Panel</title>
  46.  
  47. <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
  48. <meta name="viewport" content="width=device-width" />
  49.  
  50.  
  51. <!-- Social tags -->
  52. <meta name="keywords" content="creative tim, html dashboard, html css dashboard, web dashboard, bootstrap dashboard, bootstrap, css3 dashboard, bootstrap admin, light bootstrap dashboard, frontend, responsive bootstrap dashboard">
  53.  
  54. <meta name="description" content="Forget about boring dashboards, get an admin template designed to be simple and beautiful.">
  55.  
  56. <!-- Schema.org markup for Google+ -->
  57. <meta itemprop="name" content="Light Bootstrap Dashboard PRO by Creative Tim">
  58. <meta itemprop="description" content="Forget about boring dashboards, get an admin template designed to be simple and beautiful.">
  59.  
  60. <meta itemprop="image" content="http://s3.amazonaws.com/creativetim_bucket/products/34/original/opt_lbd_pro_thumbnail.jpg">
  61. <!-- Twitter Card data -->
  62.  
  63. <meta name="twitter:card" content="product">
  64. <meta name="twitter:site" content="@creativetim">
  65. <meta name="twitter:title" content="Light Bootstrap Dashboard PRO by Creative Tim">
  66.  
  67. <meta name="twitter:description" content="Forget about boring dashboards, get an admin template designed to be simple and beautiful.">
  68. <meta name="twitter:creator" content="@creativetim">
  69. <meta name="twitter:image" content="http://s3.amazonaws.com/creativetim_bucket/products/34/original/opt_lbd_pro_thumbnail.jpg">
  70. <meta name="twitter:data1" content="Light Bootstrap Dashboard PRO by Creative Tim">
  71. <meta name="twitter:label1" content="Product Type">
  72. <meta name="twitter:data2" content="$29">
  73. <meta name="twitter:label2" content="Price">
  74.  
  75. <!-- Open Graph data -->
  76. <meta property="og:title" content="Light Bootstrap Dashboard PRO by Creative Tim" />
  77. <meta property="og:type" content="article" />
  78. <meta property="og:url" content="http://demos.creative-tim.com/light-bootstrap-dashboard-pro/examples/dashboard.html" />
  79. <meta property="og:image" content="http://s3.amazonaws.com/creativetim_bucket/products/34/original/opt_lbd_pro_thumbnail.jpg"/>
  80. <meta property="og:description" content="Forget about boring dashboards, get an admin template designed to be simple and beautiful." />
  81. <meta property="og:site_name" content="Creative Tim" />
  82.  
  83.  
  84. <!-- Bootstrap core CSS -->
  85. <link href="assets/needed/css/bootstrap.min.css" rel="stylesheet" />
  86. <link href="assets/css/bootstrap.css" rel="stylesheet" />
  87. <link href="assets/css/fresh-bootstrap-table.css" rel="stylesheet" />
  88.  
  89.  
  90. <!-- Light Bootstrap Dashboard core CSS -->
  91. <link href="assets/needed/css/light-bootstrap-dashboard.css" rel="stylesheet"/>
  92.  
  93. <!-- CSS for Demo Purpose, don't include it in your project -->
  94. <link href="assets/needed/css/demo.css" rel="stylesheet" />
  95.  
  96.  
  97. <!-- Fonts and icons -->
  98. <link href="http://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet">
  99. <link href='http://fonts.googleapis.com/css?family=Roboto:400,700,300' rel='stylesheet' type='text/css'>
  100. <link href="assets/needed/css/pe-icon-7-stroke.css" rel="stylesheet" />
  101.  
  102. </head>
  103. <body>
  104.  
  105.  
  106. <nav class="navbar navbar-transparent navbar-absolute">
  107. <div class="container">
  108. <div class="navbar-header">
  109. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navigation-example-2">
  110. <span class="sr-only">Toggle navigation</span>
  111. <span class="icon-bar"></span>
  112. <span class="icon-bar"></span>
  113. <span class="icon-bar"></span>
  114. </button>
  115. <a class="navbar-brand" href="../dashboard.html">Artis Dunia Maya Panel</a>
  116. </div>
  117. <div class="collapse navbar-collapse">
  118. <ul class="nav navbar-nav navbar-right">
  119. <li><a data-toggle="modal" data-target="#myModal">List Harga</a></li>
  120. <li>
  121.  
  122. <a href="register.php">
  123. Register
  124. </a>
  125. </li>
  126.  
  127. </ul>
  128. </div>
  129. </div>
  130. </nav>
  131. <div class="wrapper wrapper-full-page">
  132. <div class="full-page login-page" data-color="black" data-image="assets/needed/img/full-screen-image-1.jpg">
  133.  
  134.  
  135. <!-- you can change the color of the filter page using: data-color="blue | azure | green | orange | red | purple" -->
  136. <div class="content">
  137. <div class="container">
  138. <div class="row">
  139. <div class="col-md-4 col-sm-6 col-md-offset-4 col-sm-offset-3">
  140. <form method="post" id="login-form">
  141.  
  142. <!-- if you want to have the card without animation please remove the ".card-hidden" class -->
  143. <div class="card card-hidden">
  144. <div class="header text-center">Login</div>
  145. <div class="content">
  146. <?php
  147. if(isset($msg)){
  148. echo $msg;
  149. }
  150. ?>
  151. <div class="form-group">
  152. <label>Username</label>
  153. <input type="username" placeholder="Username" name="username" class="form-control" required>
  154. </div>
  155. <div class="form-group">
  156. <label>Password</label>
  157. <input type="password" placeholder="Password" name="password" class="form-control" required>
  158. </div>
  159. </div>
  160. <div class="footer text-center">
  161. <button type="submit" class="btn btn-fill btn-warning btn-wd" name="btn-login" id="btn-login">Login</button>
  162. </div>
  163. </div>
  164.  
  165. </form>
  166.  
  167. </div>
  168. </div>
  169. </div>
  170. </div>
  171. <footer class="footer footer-transparent">
  172. <div class="container">
  173. <nav class="pull-left">
  174.  
  175. </nav>
  176. <center>
  177. <p class="copyright">
  178. &copy; 2016 <a href="http://admpanel.com">ADM Panel</a> - SMM Panel With Cheap Price
  179. </p></center>
  180. </div>
  181. </footer>
  182.  
  183. </div>
  184.  
  185. </div>
  186. </body>
  187. <!-- Core JS Files and PerfectScrollbar library inside jquery.ui -->
  188. <script src="assets/needed/js/jquery.min.js" type="text/javascript"></script>
  189. <script src="assets/needed/js/jquery-ui.min.js" type="text/javascript"></script>
  190. <script src="assets/needed/js/bootstrap.min.js" type="text/javascript"></script>
  191.  
  192.  
  193. <!-- Forms Validations Plugin -->
  194. <script src="assets/needed/js/jquery.validate.min.js"></script>
  195.  
  196. <!-- Plugin for Date Time Picker and Full Calendar Plugin-->
  197. <script src="assets/needed/js/moment.min.js"></script>
  198.  
  199. <!-- Date Time Picker Plugin is included in this js file -->
  200. <script src="assets/needed/js/bootstrap-datetimepicker.js"></script>
  201.  
  202. <!-- Select Picker Plugin -->
  203. <script src="assets/needed/js/bootstrap-selectpicker.js"></script>
  204.  
  205. <!-- Checkbox, Radio, Switch and Tags Input Plugins -->
  206. <script src="assets/needed/js/bootstrap-checkbox-radio-switch-tags.js"></script>
  207.  
  208. <!-- Charts Plugin -->
  209. <script src="assets/needed/js/chartist.min.js"></script>
  210.  
  211. <!-- Notifications Plugin -->
  212. <script src="assets/needed/js/bootstrap-notify.js"></script>
  213.  
  214. <!-- Sweet Alert 2 plugin -->
  215. <script src="assets/needed/js/sweetalert2.js"></script>
  216.  
  217. <!-- Vector Map plugin -->
  218. <script src="assets/needed/js/jquery-jvectormap.js"></script>
  219.  
  220. <!-- Google Maps Plugin -->
  221. <script src="https://maps.googleapis.com/maps/api/js"></script>
  222.  
  223. <!-- Wizard Plugin -->
  224. <script src="assets/needed/js/jquery.bootstrap.wizard.min.js"></script>
  225.  
  226. <!-- Datatable Plugin -->
  227. <script src="assets/needed/js/bootstrap-table.js"></script>
  228.  
  229. <!-- Full Calendar Plugin -->
  230. <script src="assets/needed/js/fullcalendar.min.js"></script>
  231.  
  232. <!-- Light Bootstrap Dashboard Core javascript and methods -->
  233. <script src="assets/needed/js/light-bootstrap-dashboard.js"></script>
  234.  
  235. <!-- Sharrre Library -->
  236. <script src="assets/needed/js/jquery.sharrre.js"></script>
  237.  
  238. <!-- Light Bootstrap Dashboard DEMO methods, don't include it in your project! -->
  239. <script src="assets/needed/js/demo.js"></script>
  240.  
  241.  
  242. <script type="text/javascript">
  243. $().ready(function(){
  244. lbd.checkFullPageBackgroundImage();
  245.  
  246. setTimeout(function(){
  247. // after 1000 ms we add the class animated to the login/register card
  248. $('.card').removeClass('card-hidden');
  249. }, 700)
  250. });
  251. </script>
  252.  
  253. <script>
  254. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  255. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  256. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  257. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  258.  
  259. ga('create', 'UA-46172202-1', 'auto');
  260. ga('send', 'pageview');
  261.  
  262. </script>
  263.  
  264. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement