- Home
- Categorie
- Coding e Sistemistica
- Coding
- Modificare metodo di registrazione nel forum
-
@Thedarkita said:
dal phpmyadmin
ok fin qua ci arrivo nè
quel che volevo dire cosa è che devo cambiare in 1
-
Il valore del campo attivazione, della riga del'utente con cui provi a loggarti....
-
boh non mi capisco:?
[PHP]my_globalmeteo.def_users.id1611003.33332.0548ENUM('1','3','6') NOT NULLmy_globalmeteo.def_users.nomeadministratorrocco513008.0000NULLENUM('administrator','gianni','rocco') NOT NULLmy_globalmeteo.def_users.psw3956cebd87145aa9598e28aa8c639aa3fdb2c3bab9d0701c4a050a4d8d782c7f32320032.0000NULLENUM('3956cebd87145aa9598e28aa8c639aa3','40d11d61b...my_globalmeteo.def_users.ip151.25.45.150151.25.47.16013130013.0000NULLENUM('151.25.45.150','151.25.47.160') NOT NULLmy_globalmeteo.def_users.mailmailmail12260020.6667NULLENUM('[email protected]','[email protected]','...my_globalmeteo.def_users.attivazione 8e6d0f877e6f5526851b9b5a6797ecdd0321012.0000NULLENUM('','1111','8e6d0f877e6f5526851b9b5a6797ecdd')...[/PHP]
-
Apparte il fatto che non si capisce nulla, mi sembra che ci hai pure incollato le password
-
@Thedarkita said:
Apparte il fatto che non si capisce nulla, mi sembra che ci hai pure incollato le password
embhe è una prova questa nè...
-
comunque ufficialmente credevo e speravo fosse più facile sistemare questa cosa, mi ritiro è troppo difficile, peccato c'è stato un momento in cui credevo fossimo sulla strada giusta e invece no, troverò un altro forum anche se sarà 100 volte più brutto di quello che volevo modificare.:bho:
ps: ringrazio keiske e thdarkita per la pazienza!
-
Hai creato il campo attivazione, no? di base si setta quando uno si iscrive con i millemila caratteri, no? Con la mail per attivare quel valore da millemila diventerà "1"... ora collegati in phpmyadmin e cambia manualmente quel valore da millemila in 1... sai fare no? editi uno user e ci metti "1" nel campo attivazione e vedi se quando ti logghi con quello user ti logga...
keiske
-
@Privacy-Impresa said:
Hai creato il campo attivazione, no? di base si setta quando uno si iscrive con i millemila caratteri, no? Con la mail per attivare quel valore da millemila diventerà "1"... ora collegati in phpmyadmin e cambia manualmente quel valore da millemila in 1... sai fare no? editi uno user e ci metti "1" nel campo attivazione e vedi se quando ti logghi con quello user ti logga...
keiske
ho cambiato e adesso è vero mi logga
-
Allora funziona bene... se cambi e metti che so "2" ti manda alla index.php però non ti dà il messaggio? Cmq è il meno... abbiamo fatto il grosso...
Adesso manca solo impostare la mail che manda il codice di conferma e poi la query che (se il codice di conferma è corretto) setta il codice a "1"... non manca molto...
keiske
-
@Privacy-Impresa said:
Allora funziona bene... se cambi e metti che so "2" ti manda alla index.php però non ti dà il messaggio? Cmq è il meno... abbiamo fatto il grosso...
Adesso manca solo impostare la mail che manda il codice di conferma e poi la query che (se il codice di conferma è corretto) setta il codice a "1"... non manca molto...
keiske
ok keiske allora proseguiamo con l'impresa sprando di arrivare al risultato sperato.
-
Prova a sostituire
[php]
<?php
if(isset($_GET['ko']))
$ko = $_GET['ko'];
else
$ko = '';
$messaggio = '';
if($ko == '1') {
$messaggio = 'Per accedere al forum devi confermare la tua iscrizione cliccando nel link che hai ricevuto via email';
}if(!file_exists("install/install.lock")){
header("Location: ./install/index.php");
exit();
}
require_once "includes/config.php";
require_once "header.php";
require_once "cathome.php";
require_once "footer.php";
?>
<?=$messaggio?>
[/php]
con
[php]
<?php
if(isset($_GET['ko']))
$ko = $_GET['ko'];
else
$ko = '';
$messaggio = '';
if($ko == 1) {
$messaggio = 'Per accedere al forum devi confermare la tua iscrizione cliccando nel link che hai ricevuto via email';
}if(!file_exists("install/install.lock")){
header("Location: ./install/index.php");
exit();
}
require_once "includes/config.php";
require_once "header.php";
require_once "cathome.php";
require_once "footer.php";
?>
<?=$messaggio?>
[/php]
-
@Thedarkita said:
Prova a sostituire
[php]
<?php
if(isset($_GET['ko']))
$ko = $_GET['ko'];
else
$ko = '';
$messaggio = '';
if($ko == '1') {
$messaggio = 'Per accedere al forum devi confermare la tua iscrizione cliccando nel link che hai ricevuto via email';
}if(!file_exists("install/install.lock")){
header("Location: ./install/index.php");
exit();
}
require_once "includes/config.php";
require_once "header.php";
require_once "cathome.php";
require_once "footer.php";
?>
<?=$messaggio?>
[/php]
con
[php]
<?php
if(isset($_GET['ko']))
$ko = $_GET['ko'];
else
$ko = '';
$messaggio = '';
if($ko == 1) {
$messaggio = 'Per accedere al forum devi confermare la tua iscrizione cliccando nel link che hai ricevuto via email';
}if(!file_exists("install/install.lock")){
header("Location: ./install/index.php");
exit();
}
require_once "includes/config.php";
require_once "header.php";
require_once "cathome.php";
require_once "footer.php";
?>
<?=$messaggio?>
[/php]sicuramente l'errore ci sarà ma anche con questa modifica non funziona a dovere, cioè faccio il login ma non appare il messaggio
-
@giulio3x said:
sicuramente l'errore ci sarà ma anche con questa modifica non funziona a dovere, cioè faccio il login ma non appare il messaggio
potresti mandarmi il link se è online il forum...
-
-
Ho provato a registrarmi ma non fa nemmeno il redirect al file index.php, per questo motivo non viene visualizzato il messaggio...
EDIT: puoi postare l'attuale file login.php
-
@Thedarkita said:
Ho provato a registrarmi ma non fa nemmeno il redirect al file index.php, per questo motivo non viene visualizzato il messaggio...
EDIT: puoi postare l'attuale file login.php
il file attuale di login.php lo trovi qui poichè quando cerco di postarlo qui nel forum mi dice che c'è un link attivo quindi lo trovi qui:
-
Prova a mettere cosi:
[php]
<?php
require_once "includes/config.php";
require_once "includes/mysql_connect.php";
require_once "includes/getsett.php";
require_once "includes/funzioni.php";
if(trim($arr_impostazioni['lingua'])=="" || !is_dir("lang/".$arr_impostazioni['lingua'])){ $arr_impostazioni['lingua']="ita"; }
require_once "lang/".$arr_impostazioni['lingua']."/login.php";
$actlog=(isset($_GET['actlog'])) ? $_GET['actlog'] : $_POST['actlog'];if($actlog=="entra"){
if(user_esistente=="si"){
if(my_bannato=="si"){
require_once "header.php";
echo "<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<tr class="tabcat">
<td colspan="4" class="testo12">".sei_bannato.".<br /><br />
<a href="mailto:".$arr_impostazioni['mailsito']."">".contatta_admin.".</a></td>
</tr>
</table>";
}else{
require_once "header.php";
echo "<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<tr class="tabcat">
<td colspan="4" class="testo12">".gia_loggato.".</td>
</tr>
</table>";
}
}else{
$username=mysql_escape_string($_POST['username']);
$passw=mysql_escape_string($_POST['passw']);
$username=str_replace("%","",$username);
$passw=str_replace("%","",$passw);
$q_l_entra=quera("SELECT id,nome,livello,attivazione
FROM ".$tblprefix."users WHERE nome='$username' AND psw='".md5($passw)."' LIMIT 1");
if(mysql_num_rows($q_l_entra)==1){
$arr_entrato=mysql_fetch_assoc($q_l_entra);
$l_id=$arr_entrato['id'];
$l_nome=$arr_entrato['nome'];
$l_livello=$arr_entrato['livello'];
$l_attivazione=$arr_entrato['attivazione'];
if($l_attivazione == '1') {
//$rootcookie=$_SERVER['HTTP_HOST'];
//$rootcookie=str_replace("www.","",$rootcookie);
setcookie("denome","$l_nome",time()+(86400365),"/");
setcookie("depsw",md5($passw),time()+(86400365),"/");
quera("DELETE FROM ".$tblprefix."online WHERE ip='".$_SERVER['REMOTE_ADDR']."' LIMIT 1");
if(!isset($_POST['prov']) || trim($_POST['prov'])=="" || strpos($_POST['prov'],"resetpsw.php")!==false || strpos($_POST['prov'],"login.php")!==false || strpos($_POST['prov'],"registrazione.php")!==false){
$locain="index.php";
}else{
$locain=$_POST['prov'];
}
} else {
header("Location: index.php?ko=1");
exit;
}
header("Location: $locain");
}else{
require_once "header.php";
echo "<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<tr>
<td colspan="2" class="tabstat"><div align="center" class="testo13">
".errore.": ".err_user_psw."!<br />
".cookie_abilitati.".</div></td>
</tr>
</table><br />
<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<form action="login.php" method="post" name="login" id="login">
<tr>
<td width="35%" class="tabstat"><div align="right" class="testo11">".username.":</div></td>
<td width="65%" class="tabstat"><input name="username" type="text" id="username" size="45" /></td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo11">".psw.":</div></td>
<td class="tabstat"><input name="passw" type="password" id="passw" size="45" /></td>
</tr>
<tr>
<td colspan="2" class="tabstat"><div align="center" class="testo12">
<input type="hidden" name="actlog" value="entra" />
<input type="hidden" name="prov" value="".$_SERVER['HTTP_REFERER']."" />
<input type="submit" name="Submit2" value=" ".entra." " class="pulsinvia" />
</div></td>
</tr>
</form>
</table><br />
<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<td colspan="2" class="tabstat"><div align="center">
<p class="testo11"><a href="resetpsw.php">".psw_persa."</a></p>
</div></td>
</tr>
</table><br />";
}
}}else if($actlog=="out"){
//$rootcookie=$_SERVER['HTTP_HOST'];
//$rootcookie=str_replace("www.","",$rootcookie);
setcookie("denome","",time()-(86400365),"/");
setcookie("depsw","",time()-(86400365),"/");
quera("DELETE FROM ".$tblprefix."online WHERE userid='".my_id."' LIMIT 1");
header("Location: index.php");
exit;}else{
require_once "header.php";
echo "<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<form action="login.php" method="post" name="login" id="login">
<tr>
<td width="35%" class="tabstat"><div align="right" class="testo11">".username.":</div></td>
<td width="65%" class="tabstat"><input name="username" type="text" id="username" size="45" /></td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo11">".password.":</div></td>
<td class="tabstat"><input name="passw" type="password" id="passw" size="45" /></td>
</tr>
<tr>
<td colspan="2" class="tabstat"><div align="center" class="testo12">
<input name="actlog" type="hidden" id="actlog" value="entra" />
<input type="hidden" name="prov" value="".$_SERVER['HTTP_REFERER']."" />
<input type="submit" name="Submit2" value=" ".entra." " class="pulsinvia" />
</div></td>
</tr>
<tr>
<td colspan="2" class="tabstat"><div align="center">
<p class="testo11"><a href="resetpsw.php">".psw_persa."</a></p>
</div></td>
</tr>
</form>
</table>
<br />
<form action="registrazione.php">
<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<tr>
<td class="tabstat"><div align="center" class="testo11">".non_registrato."?</div>
</td>
</tr>
<tr>
<td class="tabstat"><div align="center" class="testo12">
<input type="submit" name="Submit" value="".registrati."" class="pulsinvia" />
</div>
</td>
</tr>
</table>
</form>";
}
if($_GET['debug']=="y"){ debugging(); }
require_once "copy.php";
[/php]
?>anche se non credo sia questo il problema... prova vediamo che succede...
-
tu dici? e invece funziona prova pure tu
-
Bene... se mi posti dai la pagina di registrazione attuale vedo di mandare il link di attivazione tramite l'email... dopo facciamo la pagina di attivazione e abbiamo finito
abbiamo ripreso lo sviluppo del forum
-
@Thedarkita said:
Bene... se mi posti dai la pagina di registrazione attuale vedo di mandare il link di attivazione tramite l'email... dopo facciamo la pagina di attivazione e abbiamo finito
abbiamo ripreso lo sviluppo del forum
mi piacerebbe diventare bravo come te;)
questa è la pagina della registrazione:
[PHP]<?php
require_once "includes/config.php";
require_once "includes/mysql_connect.php";
require_once "includes/getsett.php";
require_once "includes/funzioni.php";
require_once "includes/funzioni_testi.php";
if(trim($arr_impostazioni['lingua'])=="" || !is_dir("lang/".$arr_impostazioni['lingua'])){ $arr_impostazioni['lingua']="ita"; }
require_once "lang/".$arr_impostazioni['lingua']."/registrazione.php";
if(user_esistente=="si"){
if(my_bannato=="si"){
require_once "header.php";
echo "<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<tr>
<td class="testo12">".sei_bannato.".<br /><br />
<a href="mailto:".$arr_impostazioni['mailsito']."">".contatta_admin.".</td>
</tr>
</table>";
}else{
require_once "header.php";
echo "<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<tr>
<td class="testo12">".err_loggato.".</td>
</tr>
</table>";
}
}else{
$step=(ereg("[1-4]",$_GET['step'])) ? (int)$_GET['step'] : (int)$_POST['step'];
if($step==2){ //STEP 2 ---------------------------------------------------------------------
define('titolo_pagina',' - '.registrazione_titolo1);
require_once "header.php";
echo "<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<form action="registrazione.php" method="post" name="registra">
<tr>
<td colspan="2" class="tabstat"><div class="testo12"><strong>".inserisci_dati.":</strong></div></td>
</tr>
<tr>
<td width="35%" class="tabstat"><div align="right" class="testo12"><span class="testo12">".username.":</span></div></td>
<td width="65%" class="tabstat"><input name="newuser" type="text" id="newuser" size="45" maxlength="20" /></td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo12">".password.":</div>
</td>
<td class="tabstat"><input name="newpsw" type="password" id="newpsw" size="45" maxlength="20" />
</td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo12">".cpassword.":</div></td>
<td class="tabstat"><input name="newcpsw" type="password" id="newcpsw" size="45" maxlength="20" /></td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo12">".email.":</div>
</td>
<td class="tabstat"><input name="newmail" type="text" id="newmail" size="45" maxlength="40" />
</td>
</tr>
<tr>
<td colspan="2" class="tabstat"><div align="center" class="testo12">
<input name="step" type="hidden" id="step" value="3" />
<input name="prosegui" type="button" class="pulsinvia" value="".avanti_form."" onClick="convalida();" />
</div></td>
</tr>
</form>
</table>";
}else if($step==3){ //STEP 3 ---------------------------------------------------------------------
define('titolo_pagina',' - '.registrazione_titolo2);
$_POST['newmail']=togli_char_spec($_POST['newmail']);
$_POST['newuser']=togli_char_spec($_POST['newuser']);
require_once "header.php";
if(!checkmail($_POST['newmail'])){
echo "<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<tr>
<td colspan="2" class="tabstat"><div class="testo12"><strong>".errore."</strong></div></td>
</tr>
<tr>
<td class="tabstat"><span class="testo12">".err_mail."!</span></td>
</tr>
</table><br />
<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<form action="registrazione.php" method="post" name="registra">
<tr>
<td colspan="2" class="tabstat"><div class="testo12"><strong>".inserisci_dati.":</strong></div></td>
</tr>
<tr>
<td width="35%" class="tabstat"><div align="right" class="testo12"><span class="testo12">".username.":</span></div></td>
<td width="65%" class="tabstat"><input name="newuser" type="text" id="newuser" size="45" maxlength="20" value="".$_POST['newuser']."" /></td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo12">".password.":</div>
</td>
<td class="tabstat"><input name="newpsw" type="password" id="newpsw" size="45" maxlength="20" />
</td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo12">".cpassword.":</div></td>
<td class="tabstat"><input name="newcpsw" type="password" id="newcpsw" size="45" maxlength="20" /></td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo12">".email.":</div>
</td>
<td class="tabstat"><input name="newmail" type="text" id="newmail" size="45" maxlength="40" value="".$_POST['newmail']."" />
</td>
</tr>
<tr>
<td colspan="2" class="tabstat"><div align="center" class="testo12">
<input name="step" type="hidden" id="step" value="3" />
<input name="prosegui" type="button" class="pulsinvia" value="".avanti_form."" onClick="convalida();" />
</div></td>
</tr>
</form>
</table>";
}else{
$q_useresiste=quera("SELECT nome,mail FROM ".$tblprefix."users WHERE nome='".mysql_escape_string($_POST['newuser'])."' OR mail='".mysql_escape_string($_POST['newmail'])."' LIMIT 1");
if(mysql_num_rows($q_useresiste)>0){
$arr_useresistente=mysql_fetch_assoc($q_useresiste);
if($_POST['newuser']==$arr_useresistente['nome']){ $stringa_esiste.="• username<br />"; }
if($_POST['newmail']==$arr_useresistente['mail']){ $stringa_esiste.="• e-mail<br />"; }
echo "<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<tr>
<td colspan="2" class="tabstat"><div class="testo12"><strong>".errore."</strong></div></td>
</tr>
<tr>
<td class="tabstat"><span class="testo12">".err_dati_usati.":<br />
$stringa_esiste</span></td>
</tr>
</table><br />
<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<form action="registrazione.php" method="post" name="registra">
<tr>
<td colspan="2" class="tabstat"><div class="testo12"><strong>".inserisci_dati.":</strong></div></td>
</tr>
<tr>
<td width="35%" class="tabstat"><div align="right" class="testo12"><span class="testo12">".username.":</span></div></td>
<td width="65%" class="tabstat"><input name="newuser" type="text" id="newuser" size="45" maxlength="20" value="".$_POST['newuser']."" /></td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo12">".password.":</div>
</td>
<td class="tabstat"><input name="newpsw" type="password" id="newpsw" size="45" maxlength="20" />
</td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo12">".cpassword.":</div></td>
<td class="tabstat"><input name="newcpsw" type="password" id="newcpsw" size="45" maxlength="20" /></td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo12">".email.":</div>
</td>
<td class="tabstat"><input name="newmail" type="text" id="newmail" size="45" maxlength="40" value="".$_POST['newmail']."" />
</td>
</tr>
<tr>
<td colspan="2" class="tabstat"><div align="center" class="testo12">
<input name="step" type="hidden" id="step" value="3" />
<input name="prosegui" type="button" class="pulsinvia" value="".avanti_form."" onClick="convalida();" />
</div></td>
</tr>
</form>
</table>";
}else if(!isset($_POST['newuser']) || trim($_POST['newuser'])=="" || !isset($_POST['newpsw']) || trim($_POST['newpsw'])==""){
echo "<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<tr>
<td colspan="2" class="tabstat"><div class="testo12"><strong>".errore."</strong></div></td>
</tr>
<tr>
<td class="tabstat"><span class="testo12">".err_campi."!</span></td>
</tr>
</table><br />
<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<form action="registrazione.php" method="post" name="registra">
<tr>
<td colspan="2" class="tabstat"><div class="testo12"><strong>".inserisci_dati.":</strong></div></td>
</tr>
<tr>
<td width="35%" class="tabstat"><div align="right" class="testo12"><span class="testo12">".username.":</span></div></td>
<td width="65%" class="tabstat"><input name="newuser" type="text" id="newuser" size="45" maxlength="20" value="".$_POST['newuser']."" /></td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo12">".password.":</div>
</td>
<td class="tabstat"><input name="newpsw" type="password" id="newpsw" size="45" maxlength="20" />
</td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo12">".cpassword.":</div></td>
<td class="tabstat"><input name="newcpsw" type="password" id="newcpsw" size="45" maxlength="20" /></td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo12">".email.":</div>
</td>
<td class="tabstat"><input name="newmail" type="text" id="newmail" size="45" maxlength="40" value="".$_POST['newmail']."" />
</td>
</tr>
<tr>
<td colspan="2" class="tabstat"><div align="center" class="testo12">
<input name="step" type="hidden" id="step" value="3" />
<input name="prosegui" type="button" class="pulsinvia" value="".avanti_form."" onClick="convalida();" />
</div></td>
</tr>
</form>
</table>";
}else if(trim($_POST['newpsw'])!=trim($_POST['newcpsw'])){
echo "<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<tr>
<td colspan="2" class="tabstat"><div class="testo12"><strong>".errore."</strong></div></td>
</tr>
<tr>
<td class="tabstat"><span class="testo12">".err_psw."!</span></td>
</tr>
</table><br />
<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<form action="registrazione.php" method="post" name="registra">
<tr>
<td colspan="2" class="tabstat"><div class="testo12"><strong>".inserisci_dati.":</strong></div></td>
</tr>
<tr>
<td width="35%" class="tabstat"><div align="right" class="testo12"><span class="testo12">".username.":</span></div></td>
<td width="65%" class="tabstat"><input name="newuser" type="text" id="newuser" size="45" maxlength="20" value="".$_POST['newuser']."" /></td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo12">".password.":</div>
</td>
<td class="tabstat"><input name="newpsw" type="password" id="newpsw" size="45" maxlength="20" />
</td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo12">".cpassword.":</div></td>
<td class="tabstat"><input name="newcpsw" type="password" id="newcpsw" size="45" maxlength="20" /></td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo12">".email.":</div>
</td>
<td class="tabstat"><input name="newmail" type="text" id="newmail" size="45" maxlength="40" value="".$_POST['newmail']."" />
</td>
</tr>
<tr>
<td colspan="2" class="tabstat"><div align="center" class="testo12">
<input name="step" type="hidden" id="step" value="3" />
<input name="prosegui" type="button" class="pulsinvia" value="".avanti_form."" onClick="convalida();" />
</div></td>
</tr>
</form>
</table>";
}else if(strlen(trim($_POST['newuser']))>20 || strlen(trim($_POST['newmail']))>40 || strlen(trim($_POST['newpsw']))>20){
echo "<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<tr>
<td colspan="2" class="tabstat"><div class="testo12"><strong>".errore."</strong></div></td>
</tr>
<tr>
<td class="tabstat"><span class="testo12">".err_lunghezza.".</span></td>
</tr>
</table><br />
<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<form action="registrazione.php" method="post" name="registra">
<tr>
<td colspan="2" class="tabstat"><div class="testo12"><strong>".inserisci_dati.":</strong></div></td>
</tr>
<tr>
<td width="35%" class="tabstat"><div align="right" class="testo12"><span class="testo12">".username.":</span></div></td>
<td width="65%" class="tabstat"><input name="newuser" type="text" id="newuser" size="45" maxlength="20" value="".$_POST['newuser']."" /></td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo12">".password.":</div>
</td>
<td class="tabstat"><input name="newpsw" type="password" id="newpsw" size="45" maxlength="20" />
</td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo12">".cpassword.":</div></td>
<td class="tabstat"><input name="newcpsw" type="password" id="newcpsw" size="45" maxlength="20" /></td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo12">".email.":</div>
</td>
<td class="tabstat"><input name="newmail" type="text" id="newmail" size="45" maxlength="40" value="".$_POST['newmail']."" />
</td>
</tr>
<tr>
<td colspan="2" class="tabstat"><div align="center" class="testo12">
<input name="step" type="hidden" id="step" value="3" />
<input name="prosegui" type="button" class="pulsinvia" value="".avanti_form."" onClick="convalida();" />
</div></td>
</tr>
</form>
</table>";
}else{
echo "<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<form action="registrazione.php" method="post" enctype="multipart/form-data" name="registra">
<tr>
<td colspan="2" class="tabstat"><div class="testo12"><strong>".profilo.":</strong></div></td>
</tr>
<tr>
<td width="35%" class="tabstat"><div align="right" class="testo12"><span class="testo12">".luogo.":</span></div></td>
<td width="65%" class="tabstat"><input name="luogo" type="text" id="luogo" size="45" /></td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo12">".homepage.":</div>
</td>
<td class="tabstat"><input name="sito" type="text" id="sito" size="45" />
</td>
</tr>
<tr>
<td class="tabstat"><div align="right">MSN:</div></td>
<td class="tabstat"><input name="msn" type="text" size="45" /></td>
</tr>
<tr>
<td class="tabstat"><div align="right">ICQ:</div></td>
<td class="tabstat"><input name="icq" type="text" size="45" /></td>
</tr>
<tr>
<td class="tabstat"><div align="right">AIM:</div></td>
<td class="tabstat"><input name="aim" type="text" size="45" /></td>
</tr>
<tr>
<td class="tabstat"><div align="right">Yahoo:</div></td>
<td class="tabstat"><input name="yahoo" type="text" size="45" /></td>
</tr>
<tr>
<td class="tabstat"><div align="right">Skype:</div></td>
<td class="tabstat"><input name="skype" type="text" size="45" /></td>
</tr>
<tr>
<td class="tabstat"><div align="right" class="testo12">".nascita.":</div></td>
<td class="tabstat"><span class="testo11">".giorno.":
<select name="nascitagiorno"> ".select_giorni('')."</select>
".mese.": <select name="nascitamese">".select_mesi('')."</select>
".anno.":
<select name="nascitaanno"> ".select_anni('')."</select></span></td>
</tr>
<tr>
<td valign="top" class="tabstat"><div align="right" class="testo12">".firma.":<br /><span class="testo10">(".firma_max.": ".$arr_impostazioni['maxfirma'].")</span></div></td>
<td class="tabstat"><textarea name="firma" cols="40" rows="5" id="firma" onKeyDown="if(this.value.length>".$arr_impostazioni['maxfirma'].")this.value=this.value.substr(0,".$arr_impostazioni['maxfirma'].")"></textarea></td>
</tr>
<tr>
<td colspan="2" class="tabstat"><div align="center" class="testo12">
<input name="step" type="hidden" id="step" value="4" />
<input name="newuser" type="hidden" value="".$_POST['newuser']."" />
<input name="newpsw" type="hidden" value="".$_POST['newpsw']."" />
<input name="newmail" type="hidden" value="".$_POST['newmail']."" />
<input type="submit" class="pulsinvia" value="".prosegui_form."" />
</div></td>
</tr>
</form>
</table>";
}
}
}else if($step==4){ //STEP 4 ---------------------------------------------------------------------
define('titolo_pagina',' - '.registrazione_titolo3);
$_POST['newmail']=togli_char_spec($_POST['newmail']);
$_POST['newuser']=togli_char_spec($_POST['newuser']);
$_POST['firma']=togli_char_spec($_POST['firma']);
$_POST['luogo']=togli_char_spec($_POST['luogo']);
$_POST['sito']=togli_char_spec($_POST['sito']);
$_POST['msn']=togli_char_spec($_POST['msn']);
$_POST['icq']=togli_char_spec($_POST['icq']);
$_POST['aim']=togli_char_spec($_POST['aim']);
$_POST['yahoo']=togli_char_spec($_POST['yahoo']);
$_POST['skype']=togli_char_spec($_POST['skype']);if(trim($_POST['firma'])!=""){
$firma=mysql_escape_string($_POST['firma']);
}
$codice = md5(microtime());
quera("INSERT INTO ".$tblprefix."users (nome,psw,ip,mail,attivazione,firma,datareg,nascita_g,nascita_m,nascita_a,luogo,sito,msn,icq,aim,yahoo,skype)
VALUES ('".mysql_escape_string($_POST['newuser'])."','".md5($_POST['newpsw'])."','".$_SERVER['REMOTE_ADDR']."','".mysql_escape_string($_POST['newmail'])."','$codice','$firma','".time()."','".$_POST['nascitagiorno']."','".$_POST['nascitamese']."','".$_POST['nascitaanno']."','".mysql_escape_string($_POST['luogo'])."','".mysql_escape_string($_POST['sito'])."','".mysql_escape_string($_POST['msn'])."','".mysql_escape_string($_POST['icq'])."','".mysql_escape_string($_POST['aim'])."','".mysql_escape_string($_POST['yahoo'])."','".mysql_escape_string($_POST['skype'])."')");
quera("UPDATE ".$tblprefix."stats SET tot_users=tot_users+1, ultimo_userid='".mysql_insert_id()."'");
setcookie("denome",$_POST['newuser'],time()+(86400365),"/");
setcookie("depsw",md5($_POST['newpsw']),time()+(86400365),"/");
$corpo=mail_benvenuto." ".$_POST['newuser'].",\n\n".mail_reg_completata."!\n\n
".mail_staff."! :)\n\n\n".$arr_impostazioni['urlforum'];
mandamail($_POST['newmail'],$arr_impostazioni['titoloforum']." - ".mail_oggetto."!",$corpo);
define('in_reg_step4','si');
require_once "header.php";
echo "<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<tr>
<td width="100%" class="tabstat"><span class="testo12">".mail_benvenuto." <strong>".$_POST['newuser']."</strong>, ".mail_reg_completata."!<br />
<br />
".ora_puoi.".<br />
".puoi_modificare.".</span> <img src="img/empty.gif" border="0" onload="concalma('index.php','4000');" /></td>
</tr>
</table>";
}else{ //STEP 1 ---------------------------------------------------------------------
define('titolo_pagina',' - '.registrazione_titolo4);
require_once "header.php";
echo "<table width="880" border="0" align="center" cellpadding="5" cellspacing="1" class="tabcat">
<tr>
<td class="tabstat"><div class="testo12"><strong>".regolamento.":</strong></div></td>
</tr>
<tr>
<td class="tabstat"><span class="testo12">1) ".regola1.".<br /><br />
2) ".regola2.".<br /><br />
3) ".regola3.".<br /><br />
4) ".regola4.".<br /><br />
5) ".regola5.".<br /><br />
6) ".regola6.".<br /><br />
7) ".regola7.".</span></td>
</tr>
<tr>
<td class="tabstat"><div align="center" class="testo12">
<input name="prosegui" type="button" class="pulsinvia" onClick="window.location='registrazione.php?step=2'" value=" ".accetto_form." " />
</div></td>
</tr>
</table>";
}
}
if($_GET['debug']=="y"){ debugging(); }
require_once "copy.php";
?>[/PHP]