forked from halo-battle/game
Version 0.10a
This commit is contained in:
parent
b9c240c781
commit
e391f66774
201 changed files with 5182 additions and 8158 deletions
|
|
@ -4,6 +4,7 @@ session_start();
|
|||
$id = $_SESSION['id'];
|
||||
require('common.php');
|
||||
require('../connectBDD.php');
|
||||
require "../Class/class.phpmailer.php";
|
||||
$x = mysql_query("SELECT * FROM user WHERE id='$id'");
|
||||
$donnees = mysql_fetch_array($x);
|
||||
|
||||
|
|
@ -20,7 +21,29 @@ if (isset($_GET['chg']) && $_GET['chg'] == 'mdp') {
|
|||
$auth = sha1($password);
|
||||
mysql_query("UPDATE `user` SET `mdpNOUV`='$password' WHERE ID='$id'");
|
||||
|
||||
$from = "From: \"Staff Halo-Battle\" <staffhb@hotmail.fr>\r\n";
|
||||
//On envoie le mail de confirmation
|
||||
$mail = new PHPmailer();
|
||||
$mail->SetLanguage('en', '../Class/');
|
||||
$mail->IsSMTP();
|
||||
$mail->IsHTML(true);
|
||||
$mail->Host='localhost';
|
||||
$mail->From = 'newuser@localhost';
|
||||
$mail->AddAddress('admin@localhost');
|
||||
$mail->Subject='Halo-Battle :: Activation de votre nouveau mot de passe';
|
||||
$mail->Body='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><title>Halo-Battle :: Activation de votre nouveau mot de passe</title></head><body><p>Bonjour,<br />Vous recevez ce mail suite à votre demande de changement de mot de passe. Ce dernier entrera en vigueur une fois que vous aurez valider ce changement en cliquant via ce lien :<br /><a href="http://127.0.0.1/hbc/pages/options_validation.php?chg=activation&util='.$id.'&auth='.$auth.'">http://battle.halo.fr/pages/options_validation.php?chg=activation&util='.$id.'&auth='.$auth.'</a><br />Notez que pour que le mot de passe soit changé, il faut que vous soyer connecté sur votre compte.<br /><br />A bientôt dans Halo-Battle,<br />Le staff</p></body></html>';
|
||||
|
||||
/*if(!$mail->Send()){ //Teste si le return code est ok.
|
||||
echo $mail->ErrorInfo; //Affiche le message d'erreur (ATTENTION:voir section 7)
|
||||
exit;
|
||||
}
|
||||
else{
|
||||
header('Location: options.php?erreur=1');
|
||||
exit;
|
||||
}*/
|
||||
$mail->SmtpClose();
|
||||
unset($mail);
|
||||
|
||||
/* $from = "From: \"Staff Halo-Battle\" <staffhb@hotmail.fr>\r\n";
|
||||
$from .= "Content-type: text/html; charset=ISO-8859-1\r\n";
|
||||
$from .= "X-Mailer: HBMessagerie v1.0a\r\n";
|
||||
$from .= "MIME-Version: 1.0\r\n";
|
||||
|
|
@ -28,8 +51,7 @@ if (isset($_GET['chg']) && $_GET['chg'] == 'mdp') {
|
|||
|
||||
mail($mail,'Halo-Battle :: Activation de votre nouveau mot de passe',$message,$from);
|
||||
|
||||
header('Location: options.php?erreur=1');
|
||||
exit;
|
||||
*/
|
||||
}
|
||||
else {
|
||||
header('Location: options.php?erreur=2');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue