Advertisement
Guest User

Untitled

a guest
Jul 6th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.29 KB | None | 0 0
  1. <?php
  2. /*#########################################################################*/
  3. /*###               Flatfile CMS                ###*/
  4. /*###           Created by PEjump2 from RaGEZONE        ###*/
  5. /*#########################################################################*/
  6. /*###               Terms of Use                ###*/
  7. /*###       You are not allowed to redistribute for profit      ###*/
  8. /*###   or take credit for our workwithout consent of the creator.  ###*/
  9. /*#########################################################################*/
  10.  
  11. define("PATH_TO_DATABASE", $path_to_database);
  12.  
  13. class Site
  14. {
  15.     function ShowError($error)
  16.     {
  17.         die("<html>\n<head>\n<title>ERROR:</title>\n</head>\n<body>\n<center>\n<b>".$error."</b>\n</center>\n</body>\n</html>");
  18.         // todo: Updating this error thingie, it freaking sucks! :@
  19.     }
  20.  
  21.     function Login($post_user, $post_pass)
  22.     {
  23.         $username = strip_tags($post_user);
  24.         $password = UserManager::Credentials($post_user, 'pass');
  25.  
  26.         if (UserManager::CheckBan($post_user) == true)
  27.         {
  28.             $_SESSION['login_error'] = "You'r banned faggot!";
  29.         }
  30.         else
  31.         {
  32.             if($post_pass == $password)
  33.             {
  34.                 $_SESSION['loginuser'] = $username;
  35.                 $_SESSION['loginPass'] = $password;
  36.                 header('Location: me.php');
  37.             }
  38.             else
  39.             {
  40.                 $_SESSION['login_error'] = "Wrong details!";
  41.             }
  42.         }
  43.     }
  44. }
  45.  
  46. $site = new Site;
  47. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement