File Manager
Pro
/data/web/virtuals/8819/virtual/www/subdom/auru
PHP 7.4.33
Linux
/data/web/virtuals/8819/virtual/www/subdom/auru/login.php
3.4 KB
0640
Back
<?php require('config/auth.php'); session_start(); /* Starts the session */ if(isset($_SESSION['UserData']['Username'])){ header("location:index.php"); exit; } /* Check Login form submitted */ if(isset($_POST['Submit'])){ /* Define username and associated password array */ $logins = array($username => $password,'username1' => 'password1','username2' => 'password2'); /* Check and assign submitted Username and Password to new variable */ $Username = isset($_POST['Username']) ? $_POST['Username'] : ''; $Password = isset($_POST['Password']) ? $_POST['Password'] : ''; /* Check Username and Password existence in defined array */ if (isset($logins[$Username]) && $logins[$Username] == $Password){ /* Success: Set session variables and redirect to Protected page */ $_SESSION['UserData']['Username']=$logins[$Username]; header("location:index.php"); exit; } else { /*Unsuccessful attempt: Set error message */ $msg="<div class='new badge red lighten-2 center' style='color:white;margin-left:3rem;width:15%;border-radius:2px;padding:5px;'>Invalid Login Details</div>"; } } ?> <!DOCTYPE html> <html lang="en"> <head> <title >AURU-Ajax Upload & Remote Upload</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"> <meta name="description" content="AURU"> <meta name="author" content="MR.AM"> <!-- CSS FILES --> <link href='assets/css/bootstrap.css' rel='stylesheet'> <link href='assets/css/materialize.css' rel='stylesheet'> <link href='assets/css/font-awesome.css' rel='stylesheet'> <link href='assets/css/sweetalert2.css' rel='stylesheet'> <!-- JavaScript Resources --> <script src="assets/js/jquery-3.2.1.min.js"></script> <script src="assets/js/materialize.js" ></script> <script src="assets/js/sweetalert2.js" ></script> <style> body{ background:#607d8b; overflow:hidden; } .clr-white { color:white; } .b-rad-2{ border-radius:2px; } .b-clr-gray{ border-color:#546e7a; } </style> </head> <body class="login"> <div class="col-sm-12 col-md-12" style="margin-top:5%;"> <div class="card z-depth-3" style="padding:2px 15px 15px 15px;"> <a class="hiddenanchor" id="signup"></a> <a class="hiddenanchor" id="signin"></a> <form action="" method="post" name="Login_Form"> <h2 class="center">Please Login!</h2> <?php if(isset($msg)){ echo $msg; } ?> <div class="input-field"> <i class="fa fa-user-circle prefix"></i> <input type="text" name="Username" id="Username" class="validate" required /> <label for="Username">Username</label> </div> <div class="input-field"> <i class="fa fa-lock prefix"></i> <input type="password" name="Password" id="Password" class="validate" required /> <label for="Password">Password</label> </div> <div style="margin-left:3rem;"> <input type="hidden" name="Submit"> <button type="submit" class="btn waves-effect submit"><i class="fa fa-sign-in "></i> Login</button> </div> </form> </div> </div> </div> </body> </html>
Cancel
Download
Save changes
File Manager Pro · single-file PHP 7.4.33 on Linux · paths encrypted in URL (AES-256-CTR)