Beispiel #1
0
 if (empty($_POST['captcha'])) {
     $error_msg[] = 'Inserire Captcha!';
 }
 if ($_POST['captcha'] != $_SESSION['captcha']) {
     $error_msg[] = 'Captcha inserito non corretto! Riprovare.';
 }
 if (empty($username)) {
     $error_msg[] = 'Nessun Username Inserito!';
 }
 if (empty($pass) && empty($pass_check)) {
     $error_msg[] = 'Inserire La password e il controllo password!';
 }
 if (empty($email) && empty($email_check)) {
     $error_msg[] = 'Inserire la E-Mail e il controllo Mail!';
 }
 if (check_email_register($email) == FALSE) {
     $error_msg[] = 'Email utilizzata da un\'altro account.';
 }
 if (check_exist_user($username)) {
     $error_msg[] = 'L\'Username è già esistente!';
 }
 if (!($pass == $pass_check)) {
     $error_msg[] = 'Le password inserite non combaciano';
 }
 if (!check_email($email)) {
     $error_msg[] = 'L\' E-Mail inserita non è valida';
 }
 if (!($email == $email_check)) {
     $error_msg[] = 'Le E-Mail inserite non combaciano';
 }
 if (!empty($msn)) {
Beispiel #2
0
                }
            }
        }
        break;
    case 3:
        @($old_email = $_POST['old_email']);
        @($new_email1 = $_POST['new_email1']);
        @($new_email2 = $_POST['new_email2']);
        if ($old_email && $new_email1 && $new_email1 == $new_email2) {
            if (!($old_email != $new_email1)) {
                _err("<b>Errore!</b>L' E-Mail inserita deve essere diversa da quella nuova!");
            }
            if (!check_email($new_email1)) {
                _err("<b>Errore!</b>L' E-Mail inserita non &egrave; valida!");
            }
            if (check_email_register($new_email1) == FALSE) {
                _err("<b>Errore!</b>L' E-Mail inserita &egrave; gi&agrave; utilizzata da un'altro utente!");
            }
            $query = "SELECT email FROM " . __PREFIX__ . "users WHERE username = '******'";
            $row = mysql_fetch_row(mysql_query($query));
            if ($row[0] == $old_email) {
                $query = "UPDATE " . __PREFIX__ . "users SET email = '" . $new_email1 . "' WHERE username = '******'";
                mysql_query($query) or _err(mysql_error());
                print "<script>alert(\"E-Mail aggiornata con successo.\"); window.location=\"settings.php\";</script>";
            } else {
                _err("ERRORE! La vecchia E-Mail &egrave; errata!");
            }
        } else {
            ?>
			<p><b>Cambia E-Mail:</b><p>
			<form method = 'POST' action = 'settings.php?mode=3'>