Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'include/connect.php';
- session_start();
- error_reporting('0');
- if(isset($_SESSION['admin'])) // Checking whether the session is already there or not if
- // true then header redirect it to the home page directly
- {
- header("Location:index.php");
- }
- if(isset($_POST['submit'])){
- $uname1=$_POST['n1'];
- $upass1=$_POST['p1'];
- $sql= mysqli_query($connection,"SELECT * from admin where username='$uname1' and password='$upass1'");
- $row=mysqli_num_rows($sql);
- if($row=='1')
- {
- $_SESSION['admin']=$_POST['n1'];
- header("Location: index.php");
- }
- else
- {
- $msg = "Wrong Username or Password Please Try Again!!";
- }
- }
- ?>
- <html>
- <head>
- <title>Login | Admin</title>
- </head>
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
- <style>
- body {
- background-color: #444;
- background: url("images/slika-2.jpg");
- background-size:cover;
- }
- .form-signin input[type="text"] {
- margin-bottom: 5px;
- border-bottom-left-radius: 0;
- border-bottom-right-radius: 0;
- }
- .form-signin input[type="password"] {
- margin-bottom: 10px;
- border-top-left-radius: 0;
- border-top-right-radius: 0;
- }
- .form-signin .form-control {
- position: relative;
- font-size: 16px;
- font-family: 'Open Sans', Arial, Helvetica, sans-serif;
- height: auto;
- padding: 10px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- }
- .vertical-offset-100 {
- padding-top: 100px;
- }
- .img-responsive {
- display: block;
- max-width: 100%;
- height: auto;
- margin: auto;
- }
- .panel {
- margin-bottom: 20px;
- background-color: rgba(255, 255, 255, 0.75);
- border: 1px solid transparent;
- border-radius: 4px;
- -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
- box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
- }
- </style>
- <script>
- $(document).ready(function() {
- $(document).mousemove(function(event) {
- TweenLite.to($("body"),
- .5, {
- css: {
- backgroundPosition: "" + parseInt(event.pageX / 8) + "px " + parseInt(event.pageY / '12') + "px, " + parseInt(event.pageX / '15') + "px " + parseInt(event.pageY / '15') + "px, " + parseInt(event.pageX / '30') + "px " + parseInt(event.pageY / '30') + "px",
- "background-position": parseInt(event.pageX / 8) + "px " + parseInt(event.pageY / 12) + "px, " + parseInt(event.pageX / 15) + "px " + parseInt(event.pageY / 15) + "px, " + parseInt(event.pageX / 30) + "px " + parseInt(event.pageY / 30) + "px"
- }
- })
- })
- })
- </script>
- <script src="http://mymaplist.com/js/vendor/TweenLite.min.js"></script>
- <body>
- <div class="container">
- <div class="row vertical-offset-100">
- <div class="col-md-4 col-md-offset-4">
- <div class="panel panel-default">
- <div class="panel-heading">
- <div class="row-fluid user-row">
- <a href="../index.php"><img src="images/Finnacle club.png" class="img-responsive" alt="Admin"/ style="width:180px"></a>
- </div>
- </div>
- <div class="panel-body">
- <form method="POST" role="form" class="form-signin">
- <fieldset>
- <label class="panel-login">
- <div class="login_result"></div>
- </label>
- <?php
- echo $msg;
- ?>
- <input class="form-control" placeholder="Username" name="n1" maxlength="10" type="text">
- <input class="form-control" placeholder="Password" name="p1" type="password">
- <a href="forget_password.php" style="color:black">Forgot Password ?</a>
- <br></br>
- <input class="btn btn-lg btn-success btn-block" name="submit" type="submit" id="login" value="LOGIN">
- </fieldset>
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- </html>
Add Comment
Please, Sign In to add comment