$page_cod = "HSPC";
$page_cod_brat = "home/contnou";
$vht_nume = "Confirmare email pentru schimbare parolă uitată";
include "includes/layout/h_top.php";
$key = $_REQUEST["key"];
$qst_ik = "SELECT nume, email FROM u_uitare WHERE cod = '$key' AND is_end = 'WT' ";
$qex_ik = mysql_query ( $qst_ik, $dbLink1 );
$lin_ik = mysql_fetch_row ( $qex_ik );
//echo "$key";
$IsNotEnd = true;
if ( ( $lin_ik ) && ( $key != '' ) && ( $stare=='new' ) )
{
$msg = "";
if ( $passwd == "" ) $msg = $msg . "Campul Parola nu este completat
";
if ( $passwd2 == "" ) $msg = $msg . "Campul Parola (verificare) nu este completat
";
if ( $passwd != $passwd2 ) $msg = $msg . "Parolele nu sunt identice ... :-)
";
if ( $msg == "" )
{
$IsNotEnd = false;
$qst_uu = " UPDATE u_users SET parola='$passwd' WHERE nume='" . $lin_ik[0] . "' ";
$qex_uu = mysql_query ( $qst_uu, $dbLink1 );
$qst_ue = " UPDATE u_uitare SET is_end='OK', data_end = now() WHERE cod ='$key' ";
$qex_ue = mysql_query ( $qst_ue, $dbLink1 ); ?>
|
Rezultat OK - Parola a fost schimbata!
|
}
}
if ( ( $lin_ik ) && ( $key != '' ) && ( $IsNotEnd ) )
{ ?>
Va rugam introduceti noua parola.
}
else if ( $IsNotEnd )
{
if (getenv("HTTP_CLIENT_IP"))
{
$user_ip = getenv("HTTP_CLIENT_IP");
} elseif (getenv("HTTP_X_FORWARDED_FOR"))
{
$user_ip = getenv("HTTP_X_FORWARDED_FOR");
} elseif (getenv("REMOTE_ADDR"))
{
$user_ip = getenv("REMOTE_ADDR");
}
$qst_iw = " INSERT INTO u_uitare_er ( ip, data, cod )
VALUES ( '$user_ip', now(), '$key' )";
$qex_iw = mysql_query ( $qst_iw, $dbLink1 ); ?>
|
Codul de confirmare este invalid!
|
} ?>
include "includes/layout/h_down.php"; ?>