Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- include_once 'config.php';
- $link = mysqli_connect("localhost", "root", "", "adm");
- date_default_timezone_set('Asia/Jakarta');
- if(isset($_SESSION['userSession'])!="")
- {
- header("Location: index.php");
- exit;
- }
- if(isset($_POST['btn-login']))
- {
- $username = $MySQLi_CON->real_escape_string(trim($_POST['username']));
- $upass = $MySQLi_CON->real_escape_string(trim($_POST['password']));
- $tanggal = date("Y-m-d H:i:s");
- $query = $MySQLi_CON->query("SELECT * FROM users WHERE username='$username'");
- $row=$query->fetch_array();
- $sql = "UPDATE users SET last_login='$tanggal' WHERE username='$username'";
- if(password_verify($upass, $row['password']))
- {
- mysqli_query( $link, $sql);
- $_SESSION['userSession'] = $row['user_id'];
- header("Location: index.php");
- }
- else
- {
- $msg = '<div class="alert alert-danger">Maaf, Username atau Password Anda Salah</div>';
- }
- $MySQLi_CON->close();
- }
- ?>
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <link rel="icon" type="image/png" href="assets/img/favicon.ico">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
- <title>Artis Dunia Maya Panel</title>
- <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
- <meta name="viewport" content="width=device-width" />
- <!-- Social tags -->
- <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">
- <meta name="description" content="Forget about boring dashboards, get an admin template designed to be simple and beautiful.">
- <!-- Schema.org markup for Google+ -->
- <meta itemprop="name" content="Light Bootstrap Dashboard PRO by Creative Tim">
- <meta itemprop="description" content="Forget about boring dashboards, get an admin template designed to be simple and beautiful.">
- <meta itemprop="image" content="http://s3.amazonaws.com/creativetim_bucket/products/34/original/opt_lbd_pro_thumbnail.jpg">
- <!-- Twitter Card data -->
- <meta name="twitter:card" content="product">
- <meta name="twitter:site" content="@creativetim">
- <meta name="twitter:title" content="Light Bootstrap Dashboard PRO by Creative Tim">
- <meta name="twitter:description" content="Forget about boring dashboards, get an admin template designed to be simple and beautiful.">
- <meta name="twitter:creator" content="@creativetim">
- <meta name="twitter:image" content="http://s3.amazonaws.com/creativetim_bucket/products/34/original/opt_lbd_pro_thumbnail.jpg">
- <meta name="twitter:data1" content="Light Bootstrap Dashboard PRO by Creative Tim">
- <meta name="twitter:label1" content="Product Type">
- <meta name="twitter:data2" content="$29">
- <meta name="twitter:label2" content="Price">
- <!-- Open Graph data -->
- <meta property="og:title" content="Light Bootstrap Dashboard PRO by Creative Tim" />
- <meta property="og:type" content="article" />
- <meta property="og:url" content="http://demos.creative-tim.com/light-bootstrap-dashboard-pro/examples/dashboard.html" />
- <meta property="og:image" content="http://s3.amazonaws.com/creativetim_bucket/products/34/original/opt_lbd_pro_thumbnail.jpg"/>
- <meta property="og:description" content="Forget about boring dashboards, get an admin template designed to be simple and beautiful." />
- <meta property="og:site_name" content="Creative Tim" />
- <!-- Bootstrap core CSS -->
- <link href="assets/needed/css/bootstrap.min.css" rel="stylesheet" />
- <link href="assets/css/bootstrap.css" rel="stylesheet" />
- <link href="assets/css/fresh-bootstrap-table.css" rel="stylesheet" />
- <!-- Light Bootstrap Dashboard core CSS -->
- <link href="assets/needed/css/light-bootstrap-dashboard.css" rel="stylesheet"/>
- <!-- CSS for Demo Purpose, don't include it in your project -->
- <link href="assets/needed/css/demo.css" rel="stylesheet" />
- <!-- Fonts and icons -->
- <link href="http://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet">
- <link href='http://fonts.googleapis.com/css?family=Roboto:400,700,300' rel='stylesheet' type='text/css'>
- <link href="assets/needed/css/pe-icon-7-stroke.css" rel="stylesheet" />
- </head>
- <body>
- <nav class="navbar navbar-transparent navbar-absolute">
- <div class="container">
- <div class="navbar-header">
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navigation-example-2">
- <span class="sr-only">Toggle navigation</span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <a class="navbar-brand" href="../dashboard.html">Artis Dunia Maya Panel</a>
- </div>
- <div class="collapse navbar-collapse">
- <ul class="nav navbar-nav navbar-right">
- <li><a data-toggle="modal" data-target="#myModal">List Harga</a></li>
- <li>
- <a href="register.php">
- Register
- </a>
- </li>
- </ul>
- </div>
- </div>
- </nav>
- <div class="wrapper wrapper-full-page">
- <!-- Modal -->
- <div id="myModal" class="modal fade" role="dialog">
- <div class="modal-dialog">
- <!-- Modal content-->
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">×</button>
- <h4 class="modal-title">Modal Header</h4>
- </div>
- <div class="modal-body">
- <p>Some text in the modal.</p>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
- </div>
- </div>
- </div>
- </div>
- <div class="full-page login-page" data-color="black" data-image="assets/needed/img/full-screen-image-1.jpg">
- <!-- you can change the color of the filter page using: data-color="blue | azure | green | orange | red | purple" -->
- <div class="content">
- <div class="container">
- <div class="row">
- <div class="col-md-4 col-sm-6 col-md-offset-4 col-sm-offset-3">
- <form method="post" id="login-form">
- <!-- if you want to have the card without animation please remove the ".card-hidden" class -->
- <div class="card card-hidden">
- <div class="header text-center">Login</div>
- <div class="content">
- <?php
- if(isset($msg)){
- echo $msg;
- }
- ?>
- <div class="form-group">
- <label>Username</label>
- <input type="username" placeholder="Username" name="username" class="form-control" required>
- </div>
- <div class="form-group">
- <label>Password</label>
- <input type="password" placeholder="Password" name="password" class="form-control" required>
- </div>
- </div>
- <div class="footer text-center">
- <button type="submit" class="btn btn-fill btn-warning btn-wd" name="btn-login" id="btn-login">Login</button>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- <footer class="footer footer-transparent">
- <div class="container">
- <nav class="pull-left">
- </nav>
- <center>
- <p class="copyright">
- © 2016 <a href="http://admpanel.com">ADM Panel</a> - SMM Panel With Cheap Price
- </p></center>
- </div>
- </footer>
- </div>
- </div>
- </body>
- <!-- Core JS Files and PerfectScrollbar library inside jquery.ui -->
- <script src="assets/needed/js/jquery.min.js" type="text/javascript"></script>
- <script src="assets/needed/js/jquery-ui.min.js" type="text/javascript"></script>
- <script src="assets/needed/js/bootstrap.min.js" type="text/javascript"></script>
- <!-- Forms Validations Plugin -->
- <script src="assets/needed/js/jquery.validate.min.js"></script>
- <!-- Plugin for Date Time Picker and Full Calendar Plugin-->
- <script src="assets/needed/js/moment.min.js"></script>
- <!-- Date Time Picker Plugin is included in this js file -->
- <script src="assets/needed/js/bootstrap-datetimepicker.js"></script>
- <!-- Select Picker Plugin -->
- <script src="assets/needed/js/bootstrap-selectpicker.js"></script>
- <!-- Checkbox, Radio, Switch and Tags Input Plugins -->
- <script src="assets/needed/js/bootstrap-checkbox-radio-switch-tags.js"></script>
- <!-- Charts Plugin -->
- <script src="assets/needed/js/chartist.min.js"></script>
- <!-- Notifications Plugin -->
- <script src="assets/needed/js/bootstrap-notify.js"></script>
- <!-- Sweet Alert 2 plugin -->
- <script src="assets/needed/js/sweetalert2.js"></script>
- <!-- Vector Map plugin -->
- <script src="assets/needed/js/jquery-jvectormap.js"></script>
- <!-- Google Maps Plugin -->
- <script src="https://maps.googleapis.com/maps/api/js"></script>
- <!-- Wizard Plugin -->
- <script src="assets/needed/js/jquery.bootstrap.wizard.min.js"></script>
- <!-- Datatable Plugin -->
- <script src="assets/needed/js/bootstrap-table.js"></script>
- <!-- Full Calendar Plugin -->
- <script src="assets/needed/js/fullcalendar.min.js"></script>
- <!-- Light Bootstrap Dashboard Core javascript and methods -->
- <script src="assets/needed/js/light-bootstrap-dashboard.js"></script>
- <!-- Sharrre Library -->
- <script src="assets/needed/js/jquery.sharrre.js"></script>
- <!-- Light Bootstrap Dashboard DEMO methods, don't include it in your project! -->
- <script src="assets/needed/js/demo.js"></script>
- <script type="text/javascript">
- $().ready(function(){
- lbd.checkFullPageBackgroundImage();
- setTimeout(function(){
- // after 1000 ms we add the class animated to the login/register card
- $('.card').removeClass('card-hidden');
- }, 700)
- });
- </script>
- <script>
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
- })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
- ga('create', 'UA-46172202-1', 'auto');
- ga('send', 'pageview');
- </script>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement