daily pastebin goal
37%
SHARE
TWEET

Untitled

a guest Apr 26th, 2018 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.     include("../modules/include/Config.php");
  3.     require_once("../modules/include/sqlConn.php");
  4.     require_once("../modules/include/Security.php");
  5.    
  6.     mssql_select_db($dbName1, $dbConn) or die ("Couln't select database $dbName1");
  7.    
  8.    
  9.     if ($_POST['password1'] != $_POST['password2']) {
  10.         header("location:./../?pwMissmatch");
  11.     } else if (empty($_POST['nickname']) || empty($_POST['password1']) || empty($_POST['password2']) || empty($_POST['username'])) {
  12.                 header("location:./../?noData");
  13.     } else {
  14.    
  15.         $check = new security();
  16.         $message = null;
  17.         if($check->is_secure($_POST['username']) == false) $message[] = "";
  18.         if ($check->is_secure($_POST['password1']) == false) $message[] = "";
  19.         if ($check->is_secure($_POST['password2']) == false) $message[] = "";
  20.         if ($check->is_secure($_POST['nickname']) == false) $message[] = "";
  21.         if(count($message) > 0) {
  22.             for($i = 0; $i < count($message); $i++) {
  23.                 print $message[$i];
  24.                 header("location:./../?invalidData");
  25.             }
  26.             return;
  27.         } else {
  28.             $username = $_POST['username'];
  29.             $password = md5($_POST['password2']);
  30.             $nickname = $_POST['nickname'];
  31.             $verifyAccount = mssql_num_rows(mssql_query("select * from TB_User where StrUserID = '$username'"));
  32.             if($verifyAccount > 0) {
  33.                 header("location:./../?NameExists");
  34.             } else {
  35.                 mssql_query("exec _AddUser '$username','$password','$nickname',0,0,0,0,3,3,0");
  36.                 header("location:./../?regComplete");
  37.             }
  38. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top