Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- #Prefix
- $db = new mssqlcon();
- $acc = secureInputText($_POST['nick']);
- $pas = secureInputText($_POST['passwd']);
- $try = $db->query("SELECT COUNT(*) AS Result FROM TB_USER WHERE strAccountID = ? AND strPasswd = ?", $acc, $pas);
- if(odbc_result($try, 1) == 0){
- func::alerter("Either Account and Password combination does not exist or you are banned.");
- 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>';
- }else{
- $try = $db->query("SELECT strAuthority FROM TB_USER WHERE strAccountID = ? AND strPasswd = ?", $acc, $pas);
- $get = $db->fetch_array($try);
- session_start();
- $_SESSION['nick'] = $acc;
- switch($get){
- case "255":
- $_SESSION['banned'] = 'active'; break;
- case "5015":
- $_SESSION['admin'] = 'active'; break;
- default:
- $_SESSION['user'] = 'active'; break;
- }
- }
- ?>
Add Comment
Please, Sign In to add comment