Advertisement
Guest User

mmm

a guest
Jun 5th, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.65 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. <!-- Modal -->
  133. <div id="myModal" class="modal fade" role="dialog">
  134. <div class="modal-dialog">
  135.  
  136. <!-- Modal content-->
  137. <div class="modal-content">
  138. <div class="modal-header">
  139. <button type="button" class="close" data-dismiss="modal">&times;</button>
  140. <h4 class="modal-title">Modal Header</h4>
  141. </div>
  142. <div class="modal-body">
  143. <p>Some text in the modal.</p>
  144. </div>
  145. <div class="modal-footer">
  146. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  147. </div>
  148. </div>
  149.  
  150. </div>
  151. </div>
  152. <div class="full-page login-page" data-color="black" data-image="assets/needed/img/full-screen-image-1.jpg">
  153.  
  154.  
  155. <!-- you can change the color of the filter page using: data-color="blue | azure | green | orange | red | purple" -->
  156. <div class="content">
  157. <div class="container">
  158. <div class="row">
  159. <div class="col-md-4 col-sm-6 col-md-offset-4 col-sm-offset-3">
  160. <form method="post" id="login-form">
  161.  
  162. <!-- if you want to have the card without animation please remove the ".card-hidden" class -->
  163. <div class="card card-hidden">
  164. <div class="header text-center">Login</div>
  165. <div class="content">
  166. <?php
  167. if(isset($msg)){
  168. echo $msg;
  169. }
  170. ?>
  171. <div class="form-group">
  172. <label>Username</label>
  173. <input type="username" placeholder="Username" name="username" class="form-control" required>
  174. </div>
  175. <div class="form-group">
  176. <label>Password</label>
  177. <input type="password" placeholder="Password" name="password" class="form-control" required>
  178. </div>
  179. </div>
  180. <div class="footer text-center">
  181. <button type="submit" class="btn btn-fill btn-warning btn-wd" name="btn-login" id="btn-login">Login</button>
  182. </div>
  183. </div>
  184.  
  185. </form>
  186.  
  187. </div>
  188. </div>
  189. </div>
  190. </div>
  191. <footer class="footer footer-transparent">
  192. <div class="container">
  193. <nav class="pull-left">
  194.  
  195. </nav>
  196. <center>
  197. <p class="copyright">
  198. &copy; 2016 <a href="http://admpanel.com">ADM Panel</a> - SMM Panel With Cheap Price
  199. </p></center>
  200. </div>
  201. </footer>
  202.  
  203. </div>
  204.  
  205. </div>
  206. </body>
  207. <!-- Core JS Files and PerfectScrollbar library inside jquery.ui -->
  208. <script src="assets/needed/js/jquery.min.js" type="text/javascript"></script>
  209. <script src="assets/needed/js/jquery-ui.min.js" type="text/javascript"></script>
  210. <script src="assets/needed/js/bootstrap.min.js" type="text/javascript"></script>
  211.  
  212.  
  213. <!-- Forms Validations Plugin -->
  214. <script src="assets/needed/js/jquery.validate.min.js"></script>
  215.  
  216. <!-- Plugin for Date Time Picker and Full Calendar Plugin-->
  217. <script src="assets/needed/js/moment.min.js"></script>
  218.  
  219. <!-- Date Time Picker Plugin is included in this js file -->
  220. <script src="assets/needed/js/bootstrap-datetimepicker.js"></script>
  221.  
  222. <!-- Select Picker Plugin -->
  223. <script src="assets/needed/js/bootstrap-selectpicker.js"></script>
  224.  
  225. <!-- Checkbox, Radio, Switch and Tags Input Plugins -->
  226. <script src="assets/needed/js/bootstrap-checkbox-radio-switch-tags.js"></script>
  227.  
  228. <!-- Charts Plugin -->
  229. <script src="assets/needed/js/chartist.min.js"></script>
  230.  
  231. <!-- Notifications Plugin -->
  232. <script src="assets/needed/js/bootstrap-notify.js"></script>
  233.  
  234. <!-- Sweet Alert 2 plugin -->
  235. <script src="assets/needed/js/sweetalert2.js"></script>
  236.  
  237. <!-- Vector Map plugin -->
  238. <script src="assets/needed/js/jquery-jvectormap.js"></script>
  239.  
  240. <!-- Google Maps Plugin -->
  241. <script src="https://maps.googleapis.com/maps/api/js"></script>
  242.  
  243. <!-- Wizard Plugin -->
  244. <script src="assets/needed/js/jquery.bootstrap.wizard.min.js"></script>
  245.  
  246. <!-- Datatable Plugin -->
  247. <script src="assets/needed/js/bootstrap-table.js"></script>
  248.  
  249. <!-- Full Calendar Plugin -->
  250. <script src="assets/needed/js/fullcalendar.min.js"></script>
  251.  
  252. <!-- Light Bootstrap Dashboard Core javascript and methods -->
  253. <script src="assets/needed/js/light-bootstrap-dashboard.js"></script>
  254.  
  255. <!-- Sharrre Library -->
  256. <script src="assets/needed/js/jquery.sharrre.js"></script>
  257.  
  258. <!-- Light Bootstrap Dashboard DEMO methods, don't include it in your project! -->
  259. <script src="assets/needed/js/demo.js"></script>
  260.  
  261.  
  262. <script type="text/javascript">
  263. $().ready(function(){
  264. lbd.checkFullPageBackgroundImage();
  265.  
  266. setTimeout(function(){
  267. // after 1000 ms we add the class animated to the login/register card
  268. $('.card').removeClass('card-hidden');
  269. }, 700)
  270. });
  271. </script>
  272.  
  273. <script>
  274. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  275. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  276. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  277. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  278.  
  279. ga('create', 'UA-46172202-1', 'auto');
  280. ga('send', 'pageview');
  281.  
  282. </script>
  283.  
  284. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement