| Current Path : /home/happyrenas/old/happy-and-pay.fr/v3/ |
Linux webd005.cluster105.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 |
| Current File : /home/happyrenas/old/happy-and-pay.fr/v3/login_update_password.php |
<?
session_start();
$page="login";
include("../config.php");
$clef = $db->escape($_GET['clef']);
$id = $db->escape($_GET['id']);
$table="client";
if ($clef!="")
{
$num = $db->get_var("select count(id) from client where clef = '$clef'");
if ($num==0)
{
echo "erreur";
exit;
}
else
{
// UPDATE
$characters = 'abcdefghijklmnopqrstuvwxyz0123456789';
$string = '';
$random_string_length ="10";
for ($i = 0; $i < $random_string_length; $i++)
{
$string .= $characters[rand(0, strlen($characters) - 1)];
}
$password=$string;
$password=md5($password);
$requete = "UPDATE ".$table." set
password = '$password',
clef = ''
where clef = '$clef'
AND id = '$id'
";
$db->query($requete);
$resultat = "Mise à jour effectuée";
//echo $requete."<br>";
echo "Votre nouveau mot de passe est : ".$string;
}
}
?>