/*
---------------------------------------------
- This Web page was last modified by -
- Gianluigi Cosari on January 2002 -
- E-mail: glcosari@isys.it -
- Subject : Active Document 3.0 -
---------------------------------------------
*/
// Il file di configurazione ad3conf.php deve trovarsi nella root del sito
// Windows
//$confPath = str_replace(str_replace ("/", "\\", $HTTP_SERVER_VARS['SCRIPT_NAME']), "\\", stripslashes($HTTP_SERVER_VARS['PATH_TRANSLATED']));
//Linux
$confPath = $HTTP_SERVER_VARS['DOCUMENT_ROOT']."/";
require($confPath."ad3conf.php");
session_start();
if (empty($Language)) {
$Language = $DefaultLanguage;
}
require("ad3res$Language.php"); // File di risorse per la gestione delle lingue
require("ad3inc.php"); // Libreria di funzioni
if (empty($pb)) {
$pb = "location='".dirname($HTTP_SERVER_VARS['PHP_SELF'])."/index.php'";
} else {
$pb = "location='$pb'";
}
if (!empty($Email)) {
// Verifica che l'utente non sia disabilitato
$conn = mysql_connect($MySqlHost, $MySqlUser, $MySqlPass) or die(dbError(mysql_error()));
$ret = mysql_select_db ($SiteDb, $conn) or die(dbError(mysql_error()));
$sql = "SELECT Enabled FROM Users WHERE Email = '$Email'";
$result = mysql_query($sql, $conn) or die(dbError(mysql_error(), ""));
$row = mysql_fetch_array($result);
if (!$row) {
PhpMsgBox($res_txt28, $res_txt76, "exclamation", "b");
}
if ($row[0] != "Y") {
PhpMsgBox($SiteName, $res_txt15, "exclamation", "/");
}
// Genera la password random
$rndPass = strtoupper(substr(md5(time()), 0, 5));
// Scrive la password random sul database
$md5Pass = md5($rndPass);
$sql = "UPDATE Users SET Password = '$md5Pass' WHERE Email = '$Email'";
$ret = mysql_query($sql, $conn) or die(dbError(mysql_error(), ""));
// Invia l'email all'utente che ha fatto la richiesta
SendMail($Email, $res_txt74, "$res_txt67\n$res_txt77: $rndPass \n\n");
// Message box di conferma
PhpMsgBox($SiteName, $res_txt78, "information", dirname($HTTP_SERVER_VARS['PHP_SELF'])."/index.php");
}
BodyTop();
?>
=$SiteName." - ".$res_txt74; ?>
OrizLine (2, 0); ?>
|
|
OrizLine (0, 10);
Footer();
?>
|
|