Advertisement
Guest User

Untitled

a guest
May 31st, 2017
544
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.51 KB | None | 0 0
  1. <?
  2. $reg = $_SESSION['k1'] . $_SESSION['k2'] . $_SESSION['k3'] . $_SESSION['k4'] . $_SESSION['k5'];
  3.  
  4. $_SESSION['reg'] = $reg;
  5.  
  6. if(!empty($_POST['hitelesites']))
  7. {
  8.     if($_SESSION['reg'] == $_POST['hitelesites'])
  9.     {
  10.         if($pw1 != $pw2)
  11.         {
  12.             echo "$regerror7";
  13.         }
  14.         else
  15.         {
  16.         $username = mysql_real_escape_string($_POST['username']);
  17.         $pw1      = mysql_real_escape_string($_POST['password']);
  18.         $pw2      = mysql_real_escape_string($_POST['password2']);
  19.         $email    = mysql_real_escape_string($_POST['email']);
  20.         $hitelesites = mysql_real_escape_string($_POST['hitelesites']);
  21.         $berlet   = $_POST['berlet'];
  22.  
  23.         $username = addslashes($username);
  24.         $pw1      = addslashes($pw1);
  25.         $pw2      = addslashes($pw2);
  26.         $email    = addslashes($email);
  27.  
  28.         $username = quotemeta($username);
  29.         $pw1      = quotemeta($pw1);
  30.         $pw2      = quotemeta($pw2);
  31.         $email    = quotemeta($email);
  32.  
  33.         $password = sha1(md5("maffia".$pw1."$username"));
  34.        
  35.         leker_user_adatlap1($username);
  36.         if($user1_username == $username)
  37.         {
  38.             echo "$regerror3";
  39.         }
  40.         else
  41.         {
  42.             $sql_user = mysql_query("SELECT * FROM users WHERE email='$email'");
  43.             $num_email = mysql_num_rows($sql_user);
  44.             if($num_email>0)
  45.             {
  46.                 echo "$regerror4";
  47.             }
  48.             else
  49.             {
  50.                 $ip        = getenv("REMOTE_ADDR");
  51.                 $ip_online = time();
  52.                 $reg_date  = date("Y-m-d G:i:s");
  53.                 $sql = "SELECT * FROM users WHERE ip='$ip'";
  54.                 $ered_sql = mysql_query($sql);
  55.                 while($tip = mysql_fetch_array($ered_sql))
  56.                 {
  57.                     $online_ip = $tip['online'];
  58.                     $tipi = $tip['ip'];
  59.                 }
  60.                 $ip_online2 = $online_ip+300;
  61.                 if(($ip == $tipi) and ($ip_online2 >= $ip_online))
  62.                 {
  63.                     echo "$regerror5";
  64.                 }
  65.                 else
  66.                 {
  67.                     $smstime = time()+604800;
  68.                     $mysql = "INSERT INTO users(username, regkod, password, email, ip, sms_time, reg_date, active, item, alvas) VALUES('$username', '$ip_online', '$password', '$email', '$ip', '$smstime', '$reg_date', '0', '31', 'alvas')";
  69.                     if(mysql_query($mysql))
  70.                     {
  71.                         mkdir( "user_images/$username", 0777);
  72.  
  73.                         if($berlet == "1honap")
  74.                         {
  75.                             $ar = "200 HUF";
  76.                         }
  77.                         elseif($berlet == "3honap")
  78.                         {
  79.                             $ar = "500 HUF";
  80.                         }
  81.                         elseif($berlet = "6honap")
  82.                         {
  83.                             $ar = "1000 HUF";
  84.                         }
  85.                         else
  86.                         {
  87.                             $ar = "2000 HUF";
  88.                         }
  89.                         leker_user_adatlap1($username);
  90.                         $regkod = $user1_regkod;
  91.                          
  92.                         $to  = $email;
  93.  
  94.                         // subject
  95.                         $subject = 'Regisztráció';
  96.  
  97.                         // message
  98.                         $message = '
  99.                         <html>
  100.                         <head>
  101.                         <style>
  102.                         body{
  103.                         background:url(images/bg3.png) #000000;
  104.                         }
  105.                         </style>
  106.                         <title>Regisztráció</title>
  107.                         </head>
  108.                         <body>
  109.                         <h1>Üdvözlünk!</h1>
  110.  
  111. <strong>A játék stílusa:</strong>
  112. <br />
  113. Online szövegen alapuló,böngészőben.....
  114.  
  115. <strong>A játék lényege: </strong>
  116. <br />
  117. ..........
  118.  
  119. <strong>......
  120. </strong>
  121. <strong>Az aktiváláshoz kattints az alábbi linkre:</strong>
  122. <a href="index.php?cmd=activate&param1='.$username.'&param2='.$reg_date.'">AKTIVÁLÁS</a>
  123.                         </body>
  124.                         </html>
  125.                         ';
  126.  
  127.                         // To send HTML mail, the Content-type header must be set
  128.                         $headers  = 'MIME-Version: 1.0' . "\r\n";
  129.                         $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  130.  
  131.                         // Additional headers
  132.                         $headers .= 'To: '.$username.' <'.$email.'> From: Staff<info@staff.com>' . "\r\n";
  133.  
  134.                         // Mail it
  135.                         mail($to, $subject, $message, $headers);
  136.                        
  137.                          ////////////////////////////// user_weapons sor ///////////////////////////////////////
  138.                          
  139.                          $sql_uw1 = "SELECT * FROM users WHERE username='$username' ";
  140.                          $query_uw1 = mysql_query($sql_uw1);
  141.                          $array_uw1 = mysql_fetch_array($query_uw1);
  142.                          
  143.                          $sql_uw2 = "INSERT INTO
  144.                          user_weapons(u_id, item, pistol, pistol_ammo, handgun, handgun_ammo, shotgun, shotgun_ammo, rifle, rifle_ammo, powergun, powergun_ammo, grenade, molotov, teargas)
  145.                          VALUES ('".$array_uw1['id']."', '31', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0') ";
  146.                          $query_uw2 = mysql_query($sql_uw2);
  147.                          header("Location:index.php?cmd=login&regaccept=1");
  148.                     }
  149.                     else
  150.                     {
  151.                         echo "$regerror6";
  152.                     }
  153.                 }
  154.             }
  155.         }
  156.         }
  157.     }
  158.     else
  159.     {
  160.         echo "$regerror1";
  161.     }
  162.  
  163. }
  164. else
  165. {
  166.     if($cmd != "register")
  167.     {
  168.         echo "$regerror2";
  169.     }
  170. }
  171.  
  172. include "reg_kever.php";
  173.  
  174. $_SESSION['k1'] = $karakter[$kever1];
  175. $_SESSION['k2'] = $karakter[$kever2];
  176. $_SESSION['k3'] = $karakter[$kever3];
  177. $_SESSION['k4'] = $karakter[$kever4];
  178. $_SESSION['k5'] = $karakter[$kever5];
  179.  
  180. include "reg_kep.php";
  181.  
  182. ?>
  183.  
  184. <form name="login" method="POST" action="index.php?cmd=new_user">
  185. <table width="400px" height="250px" cellpadding="0" cellspacing="0">
  186. <tr>
  187.     <td width="400px" height="20px" bgcolor="5376b7" align="center" valign="center" colspan="2">
  188.     <?php echo "<img src=\"$reg_header\" width=\"200px\" border=\"0\">"; ?>
  189.     </td>
  190. </tr>
  191. <tr>
  192.     <td width="400px" height="230px" colspan="2">
  193.     <table width="400px" height="230px" cellpadding="0" cellspacing="0">
  194.     <tr>
  195.         <td width="400px" height="20px" colspan="2"></td>
  196.     </tr>
  197.     <tr>
  198.         <td width="100px" height="20px" bgcolor="" align="center" valign="center">
  199.         <?php echo "<img src=\"$reg_user\" width=\"150px\" border=\"0\">"; ?>
  200.         </td>
  201.         <td width="300px" height="20px" align="center" valign="center" bgcolor="e70c0c">
  202.         <input name="username" type="text" class="login_text">                 
  203.         </td>
  204.     </tr>
  205.     <tr>
  206.         <td width="400px" height="5px" colspan="2"></td>
  207.     </tr>
  208.     <tr>
  209.         <td width="100px" height="20px"  bgcolor="5376b7" align="center" valign="center">
  210.         <?php echo "<img src=\"$reg_pass\" width=\"150px\" border=\"0\">"; ?>
  211.         </td>
  212.         <td width="300px" height="20px" align="center" valign="center" bgcolor="e70c0c">
  213.         <input name="password" type="password" class="login_text">
  214.         </td>
  215.     </tr>
  216.     <tr>
  217.         <td width="400px" height="5px" colspan="2"></td>
  218.     </tr>
  219.     <tr>
  220.         <td width="100px" height="20px"  bgcolor="5376b7" align="center" valign="center">
  221.         <?php echo "<img src=\"$reg_pass2\" width=\"150px\" border=\"0\">"; ?>
  222.         </td>
  223.         <td width="300px" height="20px" align="center" valign="center" bgcolor="e70c0c">
  224.         <input name="password2" type="password" class="login_text">
  225.         </td>
  226.     </tr>
  227.     <tr>
  228.         <td width="400px" height="5px" colspan="2"></td>
  229.     </tr>
  230.     <tr>
  231.         <td width="400px" height="5px" colspan="2"></td>
  232.     </tr>
  233.     <tr>
  234.         <td width="100px" height="20px"  bgcolor="5376b7" align="center" valign="center">
  235.         <?php echo "<img src=\"$reg_email\" width=\"150px\" border=\"0\">"; ?>
  236.         </td>
  237.         <td width="300px" height="20px" align="center" valign="center" bgcolor="e70c0c">
  238.         <input name="email" type="text" class="login_text">
  239.         </td>
  240.     </tr>
  241.     <tr>
  242.         <td width="100px" height="40px" align="center" valign="center">
  243.             <img src="tmp/reg_kep.png" width="100">
  244.         </td>
  245.         <td width="300px" height="65px" align="center" valign="center">
  246.         <input name="hitelesites" type="text" class="login_text">
  247.         </td>
  248.     </tr>
  249.     <tr>
  250.         <td width="400px" height="5px" colspan="2"></td>
  251.     </tr>
  252.     <tr>
  253.         <td width="400px" height="20px" colspan="2" align="right" valign="center">
  254.         <?php echo "<input type=\"submit\" name=\"register\" class=\"login_submit\" value=\"$reg_submit\">"; ?>
  255.         </td>
  256.     </tr>
  257.     <tr>
  258.         <td width="400px" height="5px" colspan="2"></td>
  259.     </tr>
  260.     </table>
  261.     </td>
  262. </tr>
  263. <tr>
  264.     <td width="400px" height="3px" bgcolor="5376b7" colspan="2"></td>
  265. </tr>
  266. </table>
  267.  Regisztrációd 24 órán belül aktiválódik!!!
  268. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement