$password"; $password = md5($password); $query = "SELECT id, email FROM $table_users WHERE code = '" . $code . "' LIMIT 1"; $result = mysql_query($query) or die_script($query, mysql_error()); if (mysql_num_rows($result) > 0) { $id = mysql_result($result, 0, 0); $email = mysql_result($result, 0, 1); mysql_query("UPDATE $table_users SET code = '', initial = 1, invalid_logins = 0, password = '$password' WHERE id='$id'"); $mail = new PHPMailer(); $mail->From = $site_email; //email address of site $mail->FromName = $sitename; $mail->Subject = $sas_lang[password]; $mail->Body = $message_to_sent; $mail->IsHTML(true); $mail->AddAddress($email); //add email address $mail->Send(); print "

" . $sas_lang['logged_password_sent'] . " $email."; } exit; } if ($send == "yes") { require ("core/class.phpmailer.php"); //use the phpmailer class if (trim($email) != "") { $query = "SELECT email FROM $table_users WHERE email='" . $email . "'"; //check if email exists $result = mysql_query($query) or die_script(mysql_error()); if (mysql_num_rows($result) > 0) { $mail = new PHPMailer(); $mail->From = $site_email; //email address of site $mail->FromName = $sitename; $mail->Subject = $sas_lang[password]; $mail->IsHTML(true); $mail->AddAddress($email); //add email address if ($use_encryption == 1) { $code = random_code(20); mysql_query("UPDATE $table_users SET code = '$code' , initial = 1 WHERE email='$email'"); $link = ""; $message_to_sent .= str_replace("%link%", $link, $sas_lang['password_will_be_reset']); $mail->Body = $message_to_sent; } else { $query = "SELECT password FROM $table_users WHERE email='" . $email . "'"; $result = mysql_query($query) or die_script(mysql_error()); $password = mysql_result($result, 0); unset ($query); unset ($result); $message_to_sent = $sas_lang['password'] . " : $password

"; $mail->Body = $message_to_sent; } if (!$mail->Send()) { print $sas_lang['mail_sent_failed']; print $link; } else { print "

" . $sas_lang['logged_password_sent'] . " $email."; } } else { print $sas_lang['email_not_exists']; } } else { print $sas_lang['no_email']; } if ($option == "public") { print "

"; } else { print ""; } print "
"; exit; } print "Site@School

"; print "


" . $sas_lang['logged_email_text'] . "

....... " . $sas_lang['email'] . ": 
   
"; ?>