Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once "../_config/config.php";
- ?>
- <!doctype html>
- <html lang="en" class="fullscreen-bg">
- <head>
- <title>Micross-RS || Microsscopein</title>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
- <!-- VENDOR CSS -->
- <link rel="stylesheet" href="<?=base_url()?>../_assets/assets/css/bootstrap.css">
- <link rel="stylesheet" href="<?=base_url()?>../_assets/assets/vendor/font-awesome/css/font-awesome.min.css">
- <link rel="stylesheet" href="<?=base_url()?>../_assets/assets/vendor/linearicons/style.css">
- <!-- MAIN CSS -->
- <link rel="stylesheet" href="<?=base_url()?>../_assets/assets/css/main.css">
- <!-- GOOGLE FONTS -->
- <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700" rel="stylesheet">
- <!-- ICONS -->
- <link rel="apple-touch-icon" sizes="76x76" href="<?=base_url()?>../_assets/assets/img/apple-icon.png">
- <link rel="icon" type="image/png" sizes="96x96" href="<?=base_url()?>../_assets/assets/img/favicon.png">
- </head>
- <body>
- <!-- WRAPPER -->
- <div id="wrapper">
- <div class="vertical-align-wrap">
- <div class="vertical-align-middle">
- <div class="auth-box ">
- <div class="left">
- <div class="content">
- <div class="header">
- <div class="logo text-center"><img src="../_assets/assets/img/micross-logo.png" alt="Microsscopein"></div>
- <p class="lead">Login to your account</p>
- </div>
- <?php
- if (isset($_POST['login']))
- {
- $user = trim(mysqli_real_escape_string($con, $_POST['user']));
- $pass = sha1(trim(mysqli_real_escape_string($con, $_POST['pass'])));
- $sql_login = mysqli_query($con, "SELECT * FROM tb_user WHERE user_name = '$user' AND password = '$pass'") or die (mysqli_error($con));
- if(mysqli_num_rows($sql_login)>0)
- {
- $_SESSION['user'] = $user;
- echo "<script>window.location='".base_url."';</script>";
- } else { ?>
- <div class="row">
- <div class="col-lg-6 col-lg-offset-3">
- <div class="alert alert-danger alert-dismissable" role="alert">
- <a href="" class="close" data-dismiss="alert" aria-label="close">×</a>
- <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
- <strong>Login Gagal...!</strong> Username / Password Salah
- </div>
- </div>
- </div>
- <?php
- }
- }
- ?>
- <form action="" class="form-auth-small" method="post">
- <div class="form-group">
- <label for="username" class="control-label sr-only">Username</label>
- <input type="text" name="user" class="form-control" placeholder="username" required autofocus>
- </div>
- <div class="form-group">
- <label for="password" class="control-label sr-only">Password</label>
- <input type="password" name="pass" class="form-control" placeholder="Password" required autofocus>
- </div>
- <div class="form-group">
- <button type="submit" class="btn btn-primary btn-lg btn-block" value="login">LOGIN</button>
- </div>
- </form>
- </div>
- </div>
- <div class="right">
- <div class="overlay"></div>
- <div class="content text">
- <h1 class="heading">Micross-RS || Microsscopein</h1>
- <p>Developer by: <a href="http://ofaprogramming.ga/" target="_blank">ofaprogramming</a></p>
- </div>
- </div>
- <div class="clearfix"></div>
- </div>
- </div>
- </div>
- </div>
- <!-- END WRAPPER -->
- <script src="<?=base_url('_assets/assets/vendor/jquery/jquery.js')?>"></script>
- <script src="<?=base_url('_assets/assets/vendor/bootstrap/bootstrap.js')?>"></script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement