Guest User

Untitled

a guest
Jul 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. <?php
  2. #Prefix
  3. $db = new mssqlcon();
  4. $acc = secureInputText($_POST['nick']);
  5. $pas = secureInputText($_POST['passwd']);
  6.  
  7. $try = $db->query("SELECT COUNT(*) AS Result FROM TB_USER WHERE strAccountID = ? AND strPasswd = ?", $acc, $pas);
  8. if(odbc_result($try, 1) == 0){
  9. func::alerter("Either Account and Password combination does not exist or you are banned.");
  10. return print '<div align="center"><div style="font-family: Tahoma; font-size: 15px; font-weight: bold; color: black;">Login Failed</div><br />Either Account ('. $acc .') and Password ('. $pas .') combination <br />does not exist or you are banned. <br /> <a href="/?act=lostpw&acc='. $acc .'">Did you eventually lose your Password?</a><br /><br />Else, you might want to contact <br /> the Administrator!<br /><br /><br /></div>';
  11. }else{
  12. $try = $db->query("SELECT strAuthority FROM TB_USER WHERE strAccountID = ? AND strPasswd = ?", $acc, $pas);
  13. $get = $db->fetch_array($try);
  14. session_start();
  15. $_SESSION['nick'] = $acc;
  16. switch($get){
  17. case "255":
  18. $_SESSION['banned'] = 'active'; break;
  19. case "5015":
  20. $_SESSION['admin'] = 'active'; break;
  21. default:
  22. $_SESSION['user'] = 'active'; break;
  23. }
  24. }
  25. ?>
Add Comment
Please, Sign In to add comment