forked from halo-battle/game
Version 1.7b
This commit is contained in:
parent
58928889ed
commit
8a8280758b
716 changed files with 4361 additions and 33524 deletions
37
onyx/hb_game/jeu/options_change.php
Normal file
37
onyx/hb_game/jeu/options_change.php
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
$titre = 'Changement des options';
|
||||
|
||||
if (isset($_GET['auth'])) {
|
||||
if (!empty($queryUser['mdpNOUV']) && !empty($queryUser['mdpNOUV']) && sha1($queryUser['mdpNOUV']) == $_GET['auth']) {
|
||||
$bdd->connexion();
|
||||
$bdd->query("UPDATE user SET mdp = mdpNOUV, mdpNOUV = '', mailNOUV = '' WHERE id = '$id_user';");
|
||||
$bdd->deconnexion();
|
||||
$template->assign('message','Votre nouveau mot de passe est en place.');
|
||||
$template->assign('couleur','green');
|
||||
$template->display('game/erreur.tpl');
|
||||
exit;
|
||||
}
|
||||
elseif (!empty($queryUser['mailNOUV']) && !empty($queryUser['mailNOUV']) && sha1($queryUser['mailNOUV']) == $_GET['auth']) {
|
||||
$bdd->connexion();
|
||||
$bdd->query("UPDATE user SET mail = mailNOUV, mailNOUV = '', mdpNOUV = '' WHERE id = '$id_user';");
|
||||
$bdd->deconnexion();
|
||||
$template->assign('message','Votre nouvelle adresse électronique est en place.');
|
||||
$template->assign('couleur','green');
|
||||
$template->display('game/erreur.tpl');
|
||||
exit;
|
||||
}
|
||||
else {
|
||||
$template->assign('message','Impossible d\'authentifier le lien !');
|
||||
$template->assign('couleur','red');
|
||||
$template->display('game/erreur.tpl');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$template->assign('message','Le lien est incomplet !');
|
||||
$template->assign('couleur','red');
|
||||
$template->display('game/erreur.tpl');
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue