Jump to content
topekone

Ayuda este script

Recommended Posts

Hola, tengo este script de registro, pero si pongo el mismo correo para registrar 2 cuentas, no me las registra, ¿alguien sabe donde quito esa restricción? Gracias.

 

<div id="con-top">Registro</div>
<div id="con-mid">
<?PHP

 $regCoins = 0; // Startcoins

 $laufZeit = 365; //Tage autoloot,safebox
 $calcLZ = (60*60*24)*365;
 $expireStamp = time()+$calcLZ;
 $expireDate = date("Y-m-d H:i:s",$expireStamp);

 if($serverSettings['register_on'] && (!isset($_SESSION['user_admin']))) {

   if(isset($_POST['submit']) && $_POST['submit']=="Registrar") {
     if((checkAnum($_POST['account']) && strlen($_POST['account'])>=8 && strlen($_POST['account'])<=16) && checkAnum($_POST['pass'])  && strlen($_POST['pass'])>=8 && strlen($_POST['pass2'])<=16 && !empty($_POST['pass2']) && (checkName($_POST['uname']) && strlen($_POST['uname'])>=3 && strlen($_POST['uname'])<=20) && $_POST['pass']==$_POST['pass2'] && checkMail($_POST['email']) && strlen($_POST['email'])<=40 && $_POST['captcha']==$_SESSION['captcha_id'] && $_POST['email']==$_POST['email2'] && (checkAnum($_POST['sicherheitsa']) && strlen($_POST['sicherheitsa'])>=3 && strlen($_POST['sicherheitsa'])<=16) && checkInt($_POST['sicherheitsf']) && (checkAnum($_POST['loeschcode']) && strlen($_POST['loeschcode'])==7)) {

       $hashSF = md5($_POST['sicherheitsa']);
       $sfNum = mysql_real_escape_string($_POST['sicherheitsf']);
       $lcode = mysql_real_escape_string($_POST['loeschcode']);

       $zuFall = rand(99999,999999999);
       $userpass=mysql_real_escape_string($_POST['pass']);

       $aktivHash = ($serverSettings['mail_activation']) ? md5($zuFall):'';
       $accountStatus = ($serverSettings['mail_activation']) ? 'BLOCK':'OK';

       $sqlCmd = "INSERT INTO account.account 
       (login,password,real_name,email,social_id,question1,answer1,create_time,status,coins,autoloot_expire,safebox_expire,web_aktiviert)
       VALUES 
       ('".$_POST['account']."',PASSWORD('".$userpass."'),'".mysql_real_escape_string($_POST['uname'])."','".mysql_real_escape_string($_POST['email'])."','".$lcode."','".$sfNum."','".$hashSF."','".$sqlZeit."','".$accountStatus."','".$regCoins."','".$expireDate."','".$expireDate."','".$aktivHash."')";
       $sqlQry = mysql_query($sqlCmd,$sqlServ);
       if($sqlQry) {


         $absender = $serverSettings['titel']." Registration";
         $email = $serverSettings['reg_mail'];
         $empfaenger = $_POST['email'];
         $mail_body = "Hallo ".$_POST['uname'].",

         deine Registration auf ".$serverSettings['titel']." war erfolgreich! Um auch auf dem Server spielen zu können, musst du deinen Account aktivieren.
         Das kannst du über den folgenden Link tun:

         ".$serverSettings['url']."/index.php?s=login&do=aktivieren&hash=".$aktivHash."

         Deine Daten sind:
         Account: ".$_POST['account']."
         Passwort: ".$userpass."

         Löschcode: ".$lcode."
         Sicherheitsfrage: ".$sFrage[$sfNum]."
         Antwort: ".$_POST['sicherheitsa']."

         Viel Spaß beim Spielen,

         Dein ".$serverSettings['titel']."-Team


         Diese E-Mail wurde automatisch generiert. Bitte keine Antworten an diese Adresse schicken.";
         $titel = "Registrierung auf ".$serverSettings['titel'];

         $header = "X-Priority: 3\n";
         $header .= "X-Mailer: ".$serverSettings['titel']." Homepage Mailer\n";
         $header .= "MIME-Version: 1.0\n";
         $header .= "From: ".$absender." <".$serverSettings['reg_mail'].">\n";
         $header .= "Reply-To: ".$serverSettings['reg_mail']."\n";
         $header .= "Content-Type: text/plain; charset=iso-8859-1\n";


         if($serverSettings['mail_activation']) {
           mail($empfaenger, $titel, $mail_body, $header);
           echo'<p class="meldung">Cuenta creada con éxito. Revisa tu bandeja de entrada para confirmar el registro por favor.</p>';
         }
         else {
           echo'<p class="meldung">Cuenta creada con éxito. Ahora puedes iniciar sesión.</p>';
         }

       }
       else {
         echo'<p class="meldung">Error: La cuenta ya existe.</p>';
       }

     }
     else {
       echo'<p class="meldung">Error en el registro, por favor especifique todos los campos correctamente</p>';
     }
   }
 ?>
   <p>Todos los campos son obligatorios y deben ser llenados.<?PHP if($serverSettings['mail_activation']) { echo'<br/><b>Der Account wird per E-Mail aktiviert, also eine richtige E-Mail eingeben!</b>'; } ?></p>
   <form action="index.php?s=register" method="POST">
     <table>
       <tr>
         <th class="topLine">Cuenta:</th>
         <td class="tdunkel"><input type="text" name="account" maxlength="16" size="16"/> 8-16 caracteres (solo a-Z,0-9)</td>
       </tr>
       <tr>
         <th class="topLine">Nombre:</th>
         <td class="thell"><input type="text" name="uname" maxlength="16" size="16"/> 3-20 caracteres (solo a-Z,0-9)</td>
       </tr>
       <tr>
         <th class="topLine">Contraseña:</th>
         <td class="tdunkel"><input type="password" name="pass" maxlength="16" size="16"/> 8-16 caracteres (solo a-Z,0-9)</td>
       </tr>
       <tr>
         <th class="topLine">Repetir contraseña:</th>
         <td class="thell"><input type="password" name="pass2" maxlength="16" size="16"/></td>
       </tr>
       <tr>
         <th class="topLine">E-mail:</th>
         <td class="tdunkel"><input type="text" name="email" maxlength="50" size="25"/> max. 40 caracteres</td>
       </tr>
       <tr>
         <th class="topLine">Repetir e-mail:</th>
         <td class="thell"><input type="text" name="email2" maxlength="50" size="25"/></td>
       </tr>
       <tr>
         <th class="topLine">Código borrado:</th>
         <td class="tdunkel"><input type="text" name="loeschcode" maxlength="7" size="7"/> 7 caracteres (solo a-Z,0-9)</td>
       </tr>
       <tr>
         <th class="topLine">Pregunta de seguridad:</th>
         <td class="thell">
           <select name="sicherheitsf">
             <?PHP
               foreach($sFrage AS $fragew => $frage) {
                 echo'<option value="'.$fragew.'">'.$frage.'</option>';
               }
             ?>
           </select>
           <input type="text" name="sicherheitsa" maxlength="16" size="16"/> 3-16 caracteres (solo a-Z,0-9)
         </td>
       </tr>
       <tr>
         <th class="topLine">Captcha:</th>
         <td class="tdunkel"><img src="./captcha/captcha.php" title="Captcha"/> <input type="text" name="captcha" maxlength="5" size="5"/></td>
       </tr>
       <tr>
         <th class="topLine" style="text-align:center;" colspan="2"><input type="submit" name="submit" value="Registrar"/> • <input type="reset" value="Volver"/></th>
       </tr>
     </table>
   </form>
 <?PHP
 }
 else {
   echo'<p class="meldung">Die Registration ist deaktiviert oder Sie sind bereits angemeldet. Es kann kein weiterer Account erstellt werden.</p>';
 }
?>
</div>
<div id="con-bot"></div>

Share this post


Link to post
Share on other sites

include('config.php');
if(isset($_POST['submit']) && $_POST['submit'] == 'Registrar') {
  $username = mysql_real_escape_string($_POST['username']);
  $password = mysql_real_escape_string($_POST['password']);
  $rl_name = mysql_real_escape_string($_POST['rl_name']);
  $email = mysql_real_escape_string($_POST['email']);
  $social_id = mysql_real_escape_string($_POST['social_id']);
  $question1 = mysql_real_escape_string($_POST['pregunta']);
  $answer1 = mysql_real_escape_string($_POST['respuesta']);
 
  $sql = "INSERT INTO account SET login = '".$username."', password = PASSWORD('".$password."'), real_name = '".$rl_name."', email = '".$email."',answer1 = '".$answer1."',social_id = '".$social_id."',question1 = '".$question1."' ";
  $result = mysql_query($sql);
  if($result) { echo 'Cuenta Creada con exito'; } else { echo 'No se ha creado la cuenta'; }
}
?>
<head>
<title>Registro-Register</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="Registration" />
<meta name="keywords" content="some, keywords, comes, later" />
<meta name="language" content="en" />
<meta name="robots" content="index,follow" />
<meta name="author" content="S3cr3t" />
<meta name="revisit-After" content="5 days" />
<meta name="distribution" content="local" />
<style type="text/css">
<!--
body   { background:##353535; color:#FF0; font:bold 9pt Tahoma,Tahoma,Tahoma,Tahoma; }
#container { margin:40px auto; width:10px; overflow:hidden; }
#text   { padding:8px; }
#text ul  { padding:0px; margin-left:10px; }
#text li  { display:block; }
#left   { float:left; }
#right   { float:right; margin-right:9px; }
!.Estilo1 {font-family: "Old English Text MT"}
.Estilo1 {
font-family: "Old English Text MT";
color: ##353535;
font-size: xx-large;
}
.Estilo2 {font-size: 10pt}
.Estilo3 {color: ##353535}
.Estilo4 { font-family: "Tahoma";
font-size: xx-large;
color: silver;
}
.Estilo5 {font-family: "Old English Text MT"}
-->
</style>
<script type="/mt2/javascript">
if (top.frames.length != 0)
top.location=self.location;
</script>
</head>
<body>
<p class="Estilo2"></p>
<div class="Estilo3" id="container">
  <div id="text">
    <form action="index.php?s=register" method="POST">
	  <ul>
   <table>
   <tr>
	    <li class="topLine">Cuenta:</li>
	   <li><td class="tdunkel"><input type="text" name="username" size="60" /></li>
	   <li> </li>
	   <li class="topLine">Contraseña:</li>
	   <li><input type="password" name="password" size="60" /></li>
	   <li> </li>
	   <li class="topLine">Nombre:</li>
	   <li><input type="text" name="rl_name" size="60" /></li>
	   <li> </li>
	   <li class="topLine">Correo Electrónico:</li>
	   <li><input type="text" name="email" size="60" /></li>
	   <li> </li>
	   <li class="topLine">Codigo de Borrado:</li>
	   <li><input type="text" name="social_id" size="60" /></li>
	   <li> </li>
	   <li class="topLine">Pregunta Secreta:</li>
	 <select name="sicherheitsf">
			  <?PHP
			    foreach($sFrage AS $fragew => $frage) {
				  echo'<option value="'.$fragew.'">'.$frage.'</option>';
			    }
			  ?>
		    </select>
	   <li> </li>
	   <li class="topLine">Respuesta:</li>
	   <li><input type="text" name="respuesta" size="60" /></li>
	   <li> </li>
	   <li><input type="submit" name="submit" value="Registrar" /></li>
		 </ul>
   <ul>
    </div>
  </div>
    <div class="postui2 text-end">
			
			   
				 
    </div></div>

 

hay tienes amigo...! solo reemplaza las lineas y ya estara realmente php no es muy dificil todo esta en la practica..! con eso podras registrar todas las cuentas que quieras con el mismo correo...! no lo he probado porque obviamente no tengo un servidor ni nada pero corregi las lineas si no te anda me mandas un mensaje y te ayudi con gusto ;)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...