├── ForgotPassword ├── ForgotPassword.phtml └── index.php ├── PHPMailer ├── Exception.php ├── OAuth.php ├── PHPMailer.php ├── POP3.php └── SMTP.php ├── ResetPassword ├── ResetPassword.phtml └── index.php ├── add_todo ├── add_todo.phtml └── index.php ├── assets ├── bootstrap-5.1.3-dist │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-grid.rtl.css │ │ ├── bootstrap-grid.rtl.css.map │ │ ├── bootstrap-grid.rtl.min.css │ │ ├── bootstrap-grid.rtl.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap-reboot.rtl.css │ │ ├── bootstrap-reboot.rtl.css.map │ │ ├── bootstrap-reboot.rtl.min.css │ │ ├── bootstrap-reboot.rtl.min.css.map │ │ ├── bootstrap-utilities.css │ │ ├── bootstrap-utilities.css.map │ │ ├── bootstrap-utilities.min.css │ │ ├── bootstrap-utilities.min.css.map │ │ ├── bootstrap-utilities.rtl.css │ │ ├── bootstrap-utilities.rtl.css.map │ │ ├── bootstrap-utilities.rtl.min.css │ │ ├── bootstrap-utilities.rtl.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ ├── bootstrap.min.css.map │ │ ├── bootstrap.rtl.css │ │ ├── bootstrap.rtl.css.map │ │ ├── bootstrap.rtl.min.css │ │ └── bootstrap.rtl.min.css.map │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.esm.js │ │ ├── bootstrap.esm.js.map │ │ ├── bootstrap.esm.min.js │ │ ├── bootstrap.esm.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ └── bootstrap.min.js.map ├── css │ ├── bootstrap.min.css │ └── style.css ├── image │ ├── account.png │ ├── edit.png │ ├── hero-bg.png │ ├── hero-img.png │ ├── testi-1.jpg │ └── todo.png ├── script │ ├── bootstrap.bundle.js │ ├── bootstrap.bundle.min.js │ ├── index.min.js │ └── main.js └── vendor │ ├── aos │ ├── aos.css │ └── aos.js │ ├── bootstrap-icons │ ├── bootstrap-icons.css │ ├── bootstrap-icons.json │ ├── fonts │ │ ├── bootstrap-icons.woff │ │ └── bootstrap-icons.woff2 │ └── index.html │ ├── bootstrap │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-grid.rtl.css │ │ ├── bootstrap-grid.rtl.css.map │ │ ├── bootstrap-grid.rtl.min.css │ │ ├── bootstrap-grid.rtl.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap-reboot.rtl.css │ │ ├── bootstrap-reboot.rtl.css.map │ │ ├── bootstrap-reboot.rtl.min.css │ │ ├── bootstrap-reboot.rtl.min.css.map │ │ ├── bootstrap-utilities.css │ │ ├── bootstrap-utilities.css.map │ │ ├── bootstrap-utilities.min.css │ │ ├── bootstrap-utilities.min.css.map │ │ ├── bootstrap-utilities.rtl.css │ │ ├── bootstrap-utilities.rtl.css.map │ │ ├── bootstrap-utilities.rtl.min.css │ │ ├── bootstrap-utilities.rtl.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ ├── bootstrap.min.css.map │ │ ├── bootstrap.rtl.css │ │ ├── bootstrap.rtl.css.map │ │ ├── bootstrap.rtl.min.css │ │ └── bootstrap.rtl.min.css.map │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.esm.js │ │ ├── bootstrap.esm.js.map │ │ ├── bootstrap.esm.min.js │ │ ├── bootstrap.esm.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ └── bootstrap.min.js.map │ ├── glightbox │ ├── css │ │ ├── glightbox.css │ │ ├── glightbox.min.css │ │ ├── plyr.css │ │ └── plyr.min.css │ └── js │ │ ├── glightbox.js │ │ └── glightbox.min.js │ ├── isotope-layout │ ├── isotope.pkgd.js │ └── isotope.pkgd.min.js │ ├── php-email-form │ └── validate.js │ ├── purecounter │ └── purecounter_vanilla.js │ ├── remixicon │ ├── remixicon.css │ ├── remixicon.eot │ ├── remixicon.less │ ├── remixicon.svg │ ├── remixicon.symbol.svg │ ├── remixicon.ttf │ ├── remixicon.woff │ └── remixicon.woff2 │ └── swiper │ ├── swiper-bundle.min.css │ ├── swiper-bundle.min.js │ └── swiper-bundle.min.js.map ├── checkdata.php ├── checkedtodo.php ├── congrat.php ├── db_connected └── index.php ├── delete_todo.php ├── edit ├── edit.phtml └── index.php ├── edituser ├── edituser.phtml └── index.php ├── index.php ├── layout.phtml ├── log_out.php ├── login ├── index.php └── login.phtml ├── profiluser ├── index.php └── profiluser.phtml ├── send.php ├── signup ├── index.php └── signup.phtml ├── storage └── e38ea6ee058cd8fac11a95a09fd03f69Array ├── test.php └── todo_app_dsi22.sql /ForgotPassword/ForgotPassword.phtml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 |
40 | -------------------------------------------------------------------------------- /ForgotPassword/index.php: -------------------------------------------------------------------------------- 1 | prepare("SELECT * from users where email=:email"); 15 | $CheckUser->execute(['email'=>$email]); 16 | $user=$CheckUser->fetch(); 17 | if($CheckUser->rowCount()>0){ 18 | $token=rand(10,9999); 19 | $sql=$pdo->prepare("UPDATE users SET PasswordToken=:token where id=:id"); 20 | $sql->execute(['token'=>$token,'id'=>$user['id']]); 21 | sendmail("Bizo Officel",$email,"Reset Password","Votre code :".$token); 22 | header("location:../ResetPassword"); 23 | }else{ 24 | header("location:index.php?msg=user doesn't exist"); 25 | } 26 | } 27 | $show=true; 28 | $template="ForgotPassword"; 29 | $page_titel="ForgotPassword"; 30 | include "../layout.phtml"; 31 | ?> -------------------------------------------------------------------------------- /PHPMailer/Exception.php: -------------------------------------------------------------------------------- 1 | 10 | * @author Jim Jagielski (jimjag)'; 416 | foreach ($this->errors as $e) { 417 | print_r($e); 418 | } 419 | echo ''; 420 | } 421 | } 422 | 423 | /** 424 | * Get an array of error messages, if any. 425 | * 426 | * @return array 427 | */ 428 | public function getErrors() 429 | { 430 | return $this->errors; 431 | } 432 | 433 | /** 434 | * POP3 connection error handler. 435 | * 436 | * @param int $errno 437 | * @param string $errstr 438 | * @param string $errfile 439 | * @param int $errline 440 | */ 441 | protected function catchWarning($errno, $errstr, $errfile, $errline) 442 | { 443 | $this->setError( 444 | 'Connecting to the POP3 server raised a PHP warning:' . 445 | "errno: $errno errstr: $errstr; errfile: $errfile; errline: $errline" 446 | ); 447 | } 448 | } 449 | -------------------------------------------------------------------------------- /ResetPassword/ResetPassword.phtml: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /ResetPassword/index.php: -------------------------------------------------------------------------------- 1 | prepare("SELECT * from users where email=:email AND PasswordToken=:code"); 20 | $check_code->execute(['email'=>$email,'code'=>$code]); 21 | $testCHeck=$check_code->fetch(); 22 | $id=$testCHeck['id']; 23 | 24 | if(!$testCHeck){ 25 | $step=1; 26 | header("location:index.php?msg=Please check the code or the email"); 27 | exit; 28 | }else{ 29 | //header("location:index.php?id=".$id); 30 | $step=0; 31 | } 32 | } 33 | 34 | if(isset($_POST['submit'])){ 35 | $step=0; 36 | extract($_POST); 37 | $step=0; 38 | if(empty($password)){ 39 | $step=0; 40 | $error[0]="password required "; 41 | goto show; 42 | } 43 | else if(empty($confirm)){ 44 | $step=0; 45 | $error[0]="confirm required "; 46 | goto show; 47 | } 48 | else if($confirm!=$password){ 49 | $step=0; 50 | $error[0]="confirm should be like password "; 51 | goto show; 52 | }else{ 53 | $step=0; 54 | $sql=$pdo->prepare("UPDATE users SET password=:pass where id=:id"); 55 | $sql->execute( 56 | [ 57 | 'id'=>$id, 58 | 'pass'=>password_hash($password,PASSWORD_DEFAULT) 59 | ] 60 | ); 61 | header("location:../login?msg=password has been changed&type=success"); 62 | exit; 63 | } 64 | } 65 | 66 | show: 67 | $show=true; 68 | $template="ResetPassword"; 69 | $page_titel="ResetPassword"; 70 | include "../layout.phtml"; 71 | 72 | ?> -------------------------------------------------------------------------------- /add_todo/add_todo.phtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 |