<commit_before><?php
require_once(__DIR__. '/class/DatabaseManager.php');
include"header.php";

            $hostname = "localhost";
            $database = "aen";
            $username = "root";
            $password = "";

try{
    $connect = new PDO('mysql:host='.$hostname.';dbname='.$database, $username, $password);
 }catch (PDOException $e){
        exit('problème de connexion à la base');
      }


if(isset($_POST['resetPassword']) && $_POST['pass_reset'] && $_POST['pass_validation_reset'])
{
  $mail = $_POST['mail'];
  $pass_reset = $_POST['pass_reset'];
  $pass_validate_reset = $_POST['pass_validation_reset'];

  if($pass_reset == $pass_validate_reset) {

  $pass_reset = md5($pass_reset);
  $query = $connect->prepare("UPDATE user set pass='$pass_reset' where mail =  '$mail'");
  $query->execute(["mail" => $_POST['mail']]);
}
?>

<div class="container">
        <!-- Page Heading/Breadcrumbs -->
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">Rénitialisation de mot de passe
                </h1>
                <ol class="breadcrumb">
                    <li><a href="index.html">Accueil</a>
                    </li>
                    <li class="active">Rénitialisation réussie</li>
                </ol>
                <div>
                    <h4>Changement de mot de passe réussi, redirection vers la page d'accueil.</h4>
                </div>
            </div>
        </div>
                   
<script>
setTimeout("location.href='index.php';", 4000);
</script>

<?php

include "footer.php";
	
}

?><commit_msg>some shity things<commit_after><?php
require_once(__DIR__. '/class/DatabaseManager.php');
include"header.php";

            $hostname = "localhost";
            $database = "aen";
            $username = "root";
            $password = "";

try{
    $connect = new PDO('mysql:host='.$hostname.';dbname='.$database, $username, $password);
 }catch (PDOException $e){
        exit('problème de connexion à la base');
      }


if(isset($_POST['resetPassword']) && $_POST['pass_reset'] && $_POST['pass_validation_reset'])
{
  $mail = $_POST['mail'];
  $pass_reset = $_POST['pass_reset'];
  $pass_validate_reset = $_POST['pass_validation_reset'];

  if($pass_reset == $pass_validate_reset) {

  $pass_reset = md5($pass_reset);
  $query = $connect->prepare("UPDATE user set pass='$pass_reset' where mail =  '$mail'");
  $query->execute(["mail" => $_POST['mail']]);
}
?>

<div class="container">
        <!-- Page Heading/Breadcrumbs -->
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">Rénitialisation de mot de passe
                </h1>
                <ol class="breadcrumb">
                    <li><a href="index.html">Accueil</a>
                    </li>
                    <li class="active">Rénitialisation réussie</li>
                </ol>
                <div>
                    <h4>Changement de mot de passe réussi, redirection vers la page de connexion.</h4>
                </div>
            </div>
        </div>
                   
<script>
setTimeout("location.href='login.php';", 4000);
</script>

<?php

include "footer.php";
	
}

?>
{'fraction_non_alphanumeric': 0.17441497659906396, 'fraction_numerical': 0.006864274570982839, 'mean_word_length': 2.258130081300813, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 57, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '861383', 'n_tokens_mistral': 1033, 'n_tokens_neox': 996, 'n_words': 193}