Advertisement
Guest User

Untitled

a guest
Jun 8th, 2017
517
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.12 KB | None | 0 0
  1. <?php
  2. //Social Green version 0.1
  3. include('Gsocial_connect.php');
  4. @$User_Call = $_REQUEST['Call'];
  5. @$User_ID_Call = $_REQUEST['UXi'];
  6. @$User_Key_Call = $_REQUEST['UXk'];
  7. @$User_Check_Call = $_REQUEST['UXc'];
  8. @$User_Locker_Call = md5($_REQUEST['UXc']);
  9. @$User_Contact_Call = $_REQUEST['UXe'];
  10. @$User_DOB_Call = $_REQUEST['UXa'];
  11. if($User_Call == "" & @$User_ID_Call == ""){
  12. ?>
  13.     <html>
  14.         <body>
  15.             <form action="Gsocial_register.php" method="post">
  16.                 <input type="hidden" name="Call" value="0">
  17.                 <label>UserName :</label>
  18.                 <input type="text" name="UXi"/><br />
  19.                 <label>Password :</label>
  20.                 <input type="password" name="UXk"/><br/>
  21.                 <label>Password(Again):</label>
  22.                 <input type="password" name="UXc"/><br/>
  23.                 <label>Email:</label>
  24.                 <input type="text" name="UXe"/><br/>
  25.                 <label>DOB:</label>
  26.                 <input type="text" name="UXa"/><br/>
  27.                 <input type="submit" value=" Registration "/><br />
  28.             </form>
  29.         </body>
  30.     </html>
  31. <?php
  32. }
  33. else{
  34.     if($User_ID_Call == ""){
  35.         die('Username can not be blank');
  36.     }
  37.     else{
  38.         if(strlen($User_ID_Call) > 30 ){
  39.             die('Username may not be more then 30 Letters/Numbers long.');
  40.         }elseif(strlen($User_ID_Call) < 3 ){
  41.             die('Username must be 3 more letters/Numbers long');
  42.         }else{
  43.             if($User_Key_Call != $User_Check_Call){
  44.                 die('The passwords did not match');
  45.             }
  46.             if(strlen($User_Key_Call) < 3 ){
  47.                 die('Username must be 3 more letters/Numbers long');
  48.             }
  49.             if($User_Contact_Call == "" ){
  50.                 die('To register you must have a email address with a top level domain email provider and it must be vailed before you register.');
  51.             }
  52.             if(validEmail($User_Contact_Call)){
  53.                 $commCheck = mysql_connect($Social_Data_Server, $Social_Data_User_ID, $Social_Data_User_Key);
  54.                 mysql_select_db($Social_Data_Server_Center, $commCheck);
  55.                 $queryStr = sprintf("SELECT * FROM gsocial_members WHERE username = '%s';",
  56.                     mysql_real_escape_string($User_ID_Call));
  57.                 $Ret = mysql_query($queryStr);
  58.                 if(mysql_num_rows($Ret) == 1 ){
  59.                     mysql_close($commCheck);
  60.                     die('This username as been taken please try another name.');
  61.                 }
  62.                 mysql_close($commCheck);
  63.                 $hash = sha1($User_Locker_Call);
  64.                 $salt = seeSalt();
  65.                 $hash = sha1($salt . $hash);
  66.                 $comm = mysql_connect($Social_Data_Server, $Social_Data_User_ID, $Social_Data_User_Key);
  67.                 mysql_select_db($Social_Data_Server_Center, $comm);
  68.                 $username = mysql_real_escape_string($User_ID_Call);   
  69.                 $query = sprintf("INSERT INTO gsocial_members (sue, email, dob, username, password, salt) VALUES ('%s', '%s', '%s', '%s', '%s', '%s');",
  70.                 mysql_real_escape_string('socialgreen@nodomain.ltd'),
  71.                 mysql_real_escape_string($User_Contact_Call),
  72.                 mysql_real_escape_string('0000.00.01'),
  73.                 mysql_real_escape_string($User_ID_Call),
  74.                 mysql_real_escape_string($hash),
  75.                 mysql_real_escape_string($salt));
  76.                 if(!mysql_query($query, $comm)){
  77.                     mysql_close($comm);
  78.                     die('Error: ' . mysql_error());
  79.                 }else{
  80.                     die('1 record added');
  81.                 }
  82.                 mysql_close($comm);
  83.             }else{
  84.                 die('The email address was invailed we are sorry hit back to try and check.');
  85.             }
  86.         }
  87.     }
  88. }
  89. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement