Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head lang="en">
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
- <meta http-equiv="x-ua-compatible" content="ie=edge">
- <title>TokoSosmed</title>
- <link href="img/favicon.144x144.html" rel="apple-touch-icon" type="image/png" sizes="144x144">
- <link href="img/favicon.114x114.html" rel="apple-touch-icon" type="image/png" sizes="114x114">
- <link href="img/favicon.72x72.html" rel="apple-touch-icon" type="image/png" sizes="72x72">
- <link href="img/favicon.57x57.html" rel="apple-touch-icon" type="image/png">
- <link href="img/favicon.html" rel="icon" type="image/png">
- <link href="img/favicon-2.html" rel="shortcut icon">
- <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
- <!--[if lt IE 9]>
- <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
- <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
- <![endif]-->
- <link rel="stylesheet" href="http://fontawesome.io/assets/font-awesome/css/font-awesome.css">
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
- <link rel="stylesheet" href="css/main.css">
- <link rel="stylesheet" href="css/lib/bootstrap-sweetalert/sweetalert.css"/>
- </head>
- <body>
- <div class="page-center">
- <div class="page-center-in">
- <div class="container-fluid" id="blockui-element-container-dark">
- <div class="sign-box">
- <div class="sign-avatar">
- <img src="img/avatar-sign.png" alt="">
- </div>
- <header class="sign-title">Login</header>
- <div class="form-group">
- <input type="text" class="form-control" id="emailorusername" placeholder="E-Mail atau Username"/>
- </div>
- <div class="form-group">
- <input type="password" class="form-control" id="password" placeholder="Password"/>
- </div>
- <div class="form-group">
- <div class="float-right reset">
- <a href="#">Reset Password</a>
- </div>
- </div>
- <div class="login">
- <button type="submit" class="btn btn-rounded">Login</button>
- </div>
- <!--<button type="button" class="close">
- <span aria-hidden="true">×</span>
- </button>-->
- </div>
- </div>
- </div>
- </div><!--.page-center-->
- <script src="js/app.js"></script>
- <script src="js/lib/jquery/jquery.min.js"></script>
- <script src="js/lib/tether/tether.min.js"></script>
- <script src="js/lib/bootstrap/bootstrap.min.js"></script>
- <script src="js/plugins.js"></script>
- <script type="text/javascript" src="js/lib/blockUI/jquery.blockUI.js"></script>
- <script src="js/lib/bootstrap-sweetalert/sweetalert.min.js"></script>
- <script type="text/javascript">
- $(function() {
- $(".login > button").click(function(x) {
- $.ajax({
- url: 'check.php',
- data: {
- emailorusername: $(this).parent().parent().find("#emailorusername").val(),
- password: $(this).parent().parent().find("#password").val(),
- },
- type: 'POST',
- dataType: 'json',
- beforeSend: function() {
- $('#blockui-element-container-dark').block({
- message: '<div class="blockui-default-message"><i class="fa fa-circle-o-notch fa-spin"></i><h6>Please Wait</h6></div>',
- overlayCSS: {
- background: 'rgba(24, 44, 68, 0.8)',
- opacity: 1,
- cursor: 'wait'
- },
- css: {
- width: '50%'
- },
- blockMsgClass: 'block-msg-default'
- });
- },
- complete: function() {
- $('#blockui-element-container-dark').unblock()
- },
- success: function(e) {
- var hasil = e;
- x.preventDefault();
- if (hasil.result == 200) {
- swal({
- title: "Login Berhasil!",
- text: hasil.reason,
- type: "success",
- successButtonClass: "btn-danger",
- successButtonText: "Cancel"
- });
- window.location = "index.php";
- } else {
- swal({
- title: "Error!",
- text: hasil.reason,
- type: "error",
- successButtonClass: "btn-danger",
- successButtonText: "Cancel"
- });
- }
- },
- error: function() {
- swal({
- title: "Error!",
- text: "Terjadi kesalahan! Silahkan refresh halaman!",
- type: "error",
- successButtonClass: "btn-danger",
- successButtonText: "Cancel"
- });
- }
- });
- });
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement