- Home
- Categorie
- Coding e Sistemistica
- Coding
- Modificare metodo di registrazione nel 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]
-
@giulio3x said:
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]non è difficile, un pò di buona volontà si impara tutto
mi posti il file includes/funzioni.php
che già manda l'email alla registrazione, vediamo come aggiungere il link
-
@Thedarkita said:
non è difficile, un pò di buona volontà si impara tutto
mi posti il file includes/funzioni.php
che già manda l'email alla registrazione, vediamo come aggiungere il linkah dimenticavo quando uno si registra egli diviene subito loggato cosa non bella come fare per evitare subito l'essere loggati? magari riprova di nuovo a registrarti così vedi
questo è funzioni.php
w.w.w.globalmeteo.altervista.org/funzioni.txt
-
Metti cosi il file register cosi non dovrebbe loggarsi automaticamente...
[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()."'");
$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]
-
si adesso non si è più subito loggati
-
Metti questo come file register e vedi se arriva il link di attivazione nell'email
[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()."'");
$link = 'http://'.$_SERVER['SERVER_NAME'].'/forum/attiva.php?act='.$codice;
$corpo=mail_benvenuto." ".$_POST['newuser'].",\n\n".'Per attivare il tuo account devi visitare il seguente link: <a href="'.$link.'">'.$link.'</a>'.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]
-
si arriva con anche il link;), è un po confusionata dove bisogna agire per scriverla meglio?
-
Il problema è quello... non sò dove si trovano le costanti...
forse sono qua:
lang/it/registrazione.php
vedi se li c'è il testo dei messaggi e te li personalizzi come vuoi...
-
@Thedarkita said:
Il problema è quello... non sò dove si trovano le costanti...
forse sono qua:
lang/it/registrazione.php
vedi se li c'è il testo dei messaggi e te li personalizzi come vuoi...esatto questa volta però c'ero arrivato prima di te e l'avevo già fatto!
adesso cosa bisogna fare creare una cartella in ftp con il nome attiva?
-
crea un file attiva.php
[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";$act = (isset($_GET['act'])) ? $_GET['act'] : '';
if (!get_magic_quotes_gpc())
$act = addslashes($act);if(strlen($act) != 32)
die('Link non valido<br><a href="/forum/">Vai al forum</a>');
$q = quera("SELECT * FROM ".$tblprefix."users WHERE attivazione = '$act' LIMIT 1)
;
if(mysql_num_rows($q) == 0)
{
echo 'Link non valido<br><a href="/forum/">Vai al forum</a>';
}
else
{
quera("UPDATE ".$tblprefix."users SET attivazione = '1' WHERE attivazione = '$act' LIMIT 1)
;
echo 'Account Attivato<br><a href="/forum/">Vai al forum</a>';
}
[/php]vedi se funziona... ho meso dei semplci imessaggi se vuoi possiam ofare che sempre nella home del froum mostri un errore, oppure i fai la grafica tu separata... come preferisci...
intanto testa se funziona
-
mi dà errore:
Parse error: syntax error, unexpected T_STRING in /membri/globalmeteo/forum/attiva.php on line 22
-
[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";$act = (isset($_GET['act'])) ? $_GET['act'] : '';
if (!get_magic_quotes_gpc())
$act = addslashes($act);if(strlen($act) != 32)
die('Link non valido<br><a href="/forum/">Vai al forum</a>');
$q = quera("SELECT * FROM ".$tblprefix."users WHERE attivazione = '$act' LIMIT 1")
;
if(mysql_num_rows($q) == 0)
{
echo 'Link non valido<br><a href="/forum/">Vai al forum</a>';
}
else
{
quera("UPDATE ".$tblprefix."users SET attivazione = '1' WHERE attivazione = '$act' LIMIT 1")
;
echo 'Account Attivato<br><a href="/forum/">Vai al forum</a>';
}
?>
[/php]
-
funziona! si vede che sei un grande nel php!:D;)
-
adesso viene una parte difficile per me, riuscire a cancellare tutti gli utenti di prova senza cancellare tutto nel database
x