Guest User

Untitled

a guest
Apr 10th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.75 KB | None | 0 0
  1. <?php
  2. session_start();
  3. require_once "SecondBiteTeam.class.php";
  4.  
  5. if (isset($_SESSION['super'][session_id()])){
  6.         header('Location: admin.php');
  7.     }else{
  8.         if (isset($_POST['user']) && isset($_POST['password']) && ( preg_match("/^(A|U|a|u)\d{6,7}\w{1}$/" ,$_POST['user']) == 1 )){
  9.             $user = $_POST['user'];
  10.             $password = md5($_POST['password'].HASH_STR);
  11.             if (SecondBiteTeam::adminLogin($user, $password)){
  12.                 $_SESSION['super'][session_id()] = $user;
  13.                 header('Location: admin.php');
  14.             }else{
  15.                 header('Location: login.html#error');
  16.             }
  17.         }else{
  18.             header('Location: login.html#error');
  19.         }
  20.     }
  21.  
  22.    
  23.  
  24. ?>
  25.  
  26.     <ul id="nav">
  27.         <li><a href="">Home</a></li>
  28.         <li><a href="">Contact</a></li>
  29.         <li><a href="">Star</a></li>
  30.     </ul>
Add Comment
Please, Sign In to add comment