Migration
This commit is contained in:
36
0.9.0/panel/module/compte/changepasswd.php
Executable file
36
0.9.0/panel/module/compte/changepasswd.php
Executable file
@@ -0,0 +1,36 @@
|
||||
<h3>Modification mot de passe</h3>
|
||||
<p>Vous pouvez modifier à partir de cette page le mot de passe d'accès au panel.</p>
|
||||
<?php
|
||||
if ( (VerifPOST("pass-new", "#^[a-z0-9]+$#", 5, 9) == "ChaineValide" AND VerifPOST("pass-new-confirm", "#^[a-z0-9]+$#", 5, 9) == "ChaineValide") AND ($_POST['pass-new'] == $_POST['pass-new-confirm']))
|
||||
{
|
||||
$pass = md5(md5($_POST['pass-new']));
|
||||
$MajPanel = $MySql->Update ("utilisateur", "Password", "$pass", "Utilisateur='".$_SESSION['Utilisateur']."'");
|
||||
if ( $MajPanel != FALSE )
|
||||
{
|
||||
echo '<p>Mot de passe modifié avec succès</p>';
|
||||
$_SESSION['Hash'] = $pass;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<p>Une erreur est survenue</p>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<div>
|
||||
<form action="Page-Compte-MotdePasse.html" method="post">
|
||||
<table cellpadding="5">
|
||||
<tr>
|
||||
<th>Nouveau mot de passe<br/><small>(5 à 9 caractères)</small></th>
|
||||
<td><input name="pass-new" type="password" maxlength="9" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Confirmation</th>
|
||||
<td><input name="pass-new-confirm" type="password" maxlength="9" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="submit" name="Submit" value="Valider" />
|
||||
</form>
|
||||
</div>';
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user