Skip to content

Commit

Permalink
2/6/2020 18:00
Browse files Browse the repository at this point in the history
done.
  • Loading branch information
domanico6594 committed Feb 7, 2020
1 parent 401d1b3 commit 4cbf5c3
Show file tree
Hide file tree
Showing 12 changed files with 343 additions and 20 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ log/*
cache/*
app/src/models

send_mail_info.php
send_mail_info.php
API CODE
5 changes: 4 additions & 1 deletion app/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@

$app->get('/index', 'App\Controller\IndexController:index')
->setName('index');
//homePage===================================================================================
//VerifiedPage===================================================================================

$app->get('/verifiedPage', 'App\Controller\VerifiedPage:VerifiedPage')
->setName('VerifiedPage');
4 changes: 0 additions & 4 deletions app/src/controllers/ForgotPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,4 @@ public function forgotPassword(Request $request, Response $response, $args)

return $response;
}


// $this->view->render($response, 'index.twig');
// exit;
}
20 changes: 20 additions & 0 deletions app/src/controllers/VerifiedPage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace App\Controller;

use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;

use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMtP;
use PHPMailer\PHPMailer\Exception;

final class VerifiedPage extends BaseController
{
public function VerifiedPage(Request $request, Response $response, $args)
{

$this->view->render($response, 'verifiedPage.twig');
return $response;
}
}
74 changes: 74 additions & 0 deletions app/templates/forgot_password copy.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<!doctype html>
<html lang="en">

<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>RUMER - ForgotPassword</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="bootstrap/assets/vendor/bootstrap/css/bootstrap.min.css">
<link href="bootstrap/assets/vendor/fonts/circular-std/style.css" rel="stylesheet">
<link rel="stylesheet" href="bootstrap/assets/libs/css/style.css">
<link rel="stylesheet" href="bootstrap/assets/vendor/fonts/fontawesome/css/fontawesome-all.css">
<style>
html,
body {
height: 100%;
}
body {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
padding-top: 40px;
padding-bottom: 40px;
background-image: url('https://www.francechimie.fr/media/e34580ffb57afb63ff48eeee4f85e8cb.jpg');
background-size: cover;
}
.splash-description {
color: whitesmoke;
}
</style>
</head>

<body>
<!-- ============================================================== -->
<!-- forgot password -->
<!-- ============================================================== -->
<div class="splash-container">
<div class="card">
<div class="card-header text-center"><img class="logo-img" src="/bootstrap/assets/images/lo-go2.png"
alt="logo">
<span class="splash-description">Please enter your user information.</span></div>
<div class="card-body">
<form>
<p style="color: whitesmoke;">Don't worry, we'll send you an email to reset your password.</p>
<div class="form-group">
<input class="form-control form-control-lg" type="text" name="user_name" required=""
placeholder="Username" autocomplete="off">
{# <input class="form-control form-control-lg" type="email" name="email" required=""
placeholder="Your Email" autocomplete="off"> #}
</div>
<div class="form-group pt-1"><a class="btn btn-block btn-primary btn-xl" href="../index.html">Reset
Password</a></div>
</form>
</div>
<div class="card-footer text-center">
<span>Don't have an account? <a href="signup">Sign Up</a></span>
</div>
</div>
</div>
<!-- ============================================================== -->
<!-- end forgot password -->
<!-- ============================================================== -->
<!-- Optional JavaScript -->
<script src="../assets/vendor/jquery/jquery-3.3.1.min.js"></script>
<script src="../assets/vendor/bootstrap/js/bootstrap.bundle.js"></script>
</body>


</html>
31 changes: 28 additions & 3 deletions app/templates/forgot_password.twig
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,11 @@
<form>
<p style="color: whitesmoke;">Don't worry, we'll send you an email to reset your password.</p>
<div class="form-group">
<input class="form-control form-control-lg" type="text" name="user_name" required=""
placeholder="Username" autocomplete="off">
<input class="form-control form-control-lg" type="text" id="user_name" name="user_name" required="" placeholder="Username" autocomplete="off">
{# <input class="form-control form-control-lg" type="email" name="email" required=""
placeholder="Your Email" autocomplete="off"> #}
</div>
<div class="form-group pt-1"><a class="btn btn-block btn-primary btn-xl" href="../index.html">Reset
<div class="form-group pt-1"><a class="btn btn-block btn-primary btn-xl" href="javascript:void(0);" onclick="callForgotPwd();">Reset
Password</a></div>
</form>
</div>
Expand All @@ -70,5 +69,31 @@
<script src="../assets/vendor/bootstrap/js/bootstrap.bundle.js"></script>
</body>

<script>
function callForgotPwd() {
var username = $("#user_name").val();
$.ajax({
type: 'GET',
url: './forgotpasswordhandle',
data: {user_name: username},
datatype: 'JSON'
})
.done(function(json) {
var execResult = JSON.parse(json);
if (execResult == 0){
}
else if (execResult == -1)
alert("ERROR: Query error");
else if (execResult == -2)
alert("Not exist username");
else
alert("ERROR: Invalid access: " . execResult);
})
.fail(function(request, status, error) {
alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
})
}
</script>

</html>
6 changes: 3 additions & 3 deletions app/templates/homePage.twig
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@
</div>
</div>

<section id="intro">
<div class="intro-content">
<section id="intro" style=" background-image: url('https://www.francechimie.fr/media/e34580ffb57afb63ff48eeee4f85e8cb.jpg');">
<div class="intro-content" >
<h2>Welcome to RUMER!</h2>
<h3>hello! world!</h3>

<div>
<button type="button" class="btn-get-started scrollto" onClick="location.href='signin'">get start!</button>
<button type="button" class="btn-get-started scrollto" value="Get Start!" onClick="location.href='signin'">get start!</button>
</div>
</div>
</section>
Expand Down
2 changes: 1 addition & 1 deletion app/templates/sign_in.twig
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<!-- ============================================================== -->
<div class="splash-container">
<div class="card ">
<div class="card-header text-center"><a href="index.html"><img class="logo-img" src="bootstrap/assets/images/lo-go.png" alt="logo"></a>
<div class="card-header text-center"><a href="/"><img class="logo-img" src="bootstrap/assets/images/lo-go.png" alt="logo"></a>
<span class="splash-description" style="color : whitesmoke">Please enter your user information.</span></div>
<div class="card-body">
<form>
Expand Down
26 changes: 21 additions & 5 deletions app/templates/sign_up.twig
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@
</div>
<div class="form-group">
<input class="form-control form-control-lg" type="email" id='email' name="email" required=""
placeholder="E-mail" autocomplete="off" style="display : inleine; width :60%">
<button class="btn" id='email_btn' style="background-color : #2e2f39;margin-left:17px;width: 31%">
Verify</button>
placeholder="E-mail" autocomplete="off" style="display : inleine; width :100%">

</div>
<div class="form-group">
<input class="form-control form-control-lg" id="pwd1" type="password" name="pwd" required=""
Expand Down Expand Up @@ -93,14 +92,31 @@
</body>

<script>
function checkSpace(str) {
if(str.search(/\s/) != -1) {
return true;
}
else {
return false;
}
}
$("#pwd2").keyup(function () {
var pwd1 = $("#pwd1").val();
var pwd2 = $("#pwd2").val();
if(checkSpace(pwd1)){
alert("you can't use \"blank\" as Password ");
$("#register").attr("disabled", "disabled");
}else if (pwd1.length <8 ||pwd1.length > 20 ){
alert("Please enter a password between 8 and 20 digits.");
}else{
if (pwd1 == pwd2)
$("#register").removeAttr("disabled");
else
$("#register").attr("disabled", "disabled");
$("#register").attr("disabled", "disabled");}
});
$("#username_btn").click(function () {
Expand Down
94 changes: 94 additions & 0 deletions app/templates/verifiedPage.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<!doctype html>
<html lang="en">

<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Rumer - Verification Success</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="bootstrap/assets/vendor/bootstrap/css/bootstrap.min.css">
<link href="bootstrap/assets/vendor/fonts/circular-std/style.css" rel="stylesheet">
<link rel="stylesheet" href="bootstrap/assets/libs/css/style.css">
<link rel="stylesheet" href="bootstrap/assets/vendor/fonts/fontawesome/css/fontawesome-all.css">
</head>

<body style="background-color: rgb(0, 0, 0,25);">
<!-- ============================================================== -->
<!-- main wrapper -->
<!-- ============================================================== -->
<div class="dashboard-main-wrapper p-0">
<!-- ============================================================== -->
<!-- navbar -->
<!-- ============================================================== -->
<nav class="navbar navbar-expand dashboard-top-header bg-white">
<div class="container-fluid">
<!-- ============================================================== -->
<!-- brand logo -->
<!-- ============================================================== -->
<div class="dashboard-nav-brand">
<a class="dashboard-logo" href="/" style="color: black;">Rumer</a>
</div>
<!-- ============================================================== -->
<!-- end brand logo -->
<!-- ============================================================== -->
</div>
</nav>
<!-- ============================================================== -->
<!-- end navbar -->
<!-- ============================================================== -->
<!-- ============================================================== -->
<!-- wrapper -->
<!-- ============================================================== -->
<div class="bg-light text-center" style="color: dimgray;">
<div class="container">
<div class="row">
<div class="offset-xl-2 col-xl-8 offset-lg-2 col-lg-8 col-md-12 col-sm-12 col-12">
<div class="error-section" style="background-color: dimgray;">
<img src="../assets/images/lo-go.png" alt="" class="img-fluid">
<div class="error-section-content">
<h1 class="display-3" style="color:whitesmoke;">Thank you!</h1>
<p style="color:whitesmoke;">Verification completed. Please sign in</p>
<a href="/" class="btn btn-secondary btn-lg">Back to Sign in</a>
</div>
</div>
</div>
</div>
</div>
<!-- ============================================================== -->
<!-- footer -->
<!-- ============================================================== -->
<div class="bg-white p-3">
<div class="container-fluid">
<div class="row">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 text-dark text-center">
Copyright © 2018 Concept. All rights reserved.
</div>
</div>
</div>
</div>
<!-- ============================================================== -->
<!-- end footer -->
<!-- ============================================================== -->
<!-- ============================================================== -->
<!-- end wrapper -->
<!-- ============================================================== -->
<!-- ============================================================== -->
<!-- end footer -->
<!-- ============================================================== -->
</div>
</div>
<!-- ============================================================== -->
<!-- end main wrapper -->
<!-- ============================================================== -->
<!-- ============================================================== -->
<!-- end main wrapper -->
<!-- ============================================================== -->
<!-- Optional JavaScript -->
<script src="../assets/vendor/jquery/jquery-3.3.1.min.js"></script>
<script src="../assets/vendor/bootstrap/js/bootstrap.bundle.js"></script>
<script src="../assets/vendor/slimscroll/jquery.slimscroll.js"></script>
<script src="../assets/libs/js/main-js.js"></script>
</body>

</html>
4 changes: 2 additions & 2 deletions public/bootstrap/assets/libs/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2795,8 +2795,8 @@ input[type=radio] {

.btn-primary {
color: #fff;
background-color: #6e7e8f;
border-color: #5969ff;
background-color: #e43863;
border-color: #e43863;
}

.btn-primary:hover {
Expand Down
Loading

0 comments on commit 4cbf5c3

Please sign in to comment.