initial commit

This commit is contained in:
2026-06-25 13:03:45 +06:00
commit 4589f4a8d0
3229 changed files with 941958 additions and 0 deletions

View File

@@ -0,0 +1,107 @@
<style>
* {box-sizing: border-box}
/* Full-width input fields */
input[type=text],
input[type=email],
input[type=password] {
width: 100%;
padding: 10px 15px;
margin: 0px 0 8px 0;
display: inline-block;
border: 1px solid #ADB4C2;
background: none;
border-radius:4px;
}
input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus {
background-color: #ddd;
outline: none;
}
hr {
border: 1px solid #f1f1f1;
margin-bottom: 25px;
}
/* Set a style for all buttons */
button {
border-radius:4px;
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
opacity: 0.9;
}
button:hover {
opacity:1;
}
/* Extra styles for the cancel button */
.googlebtn {
padding: 14px 10px;
background-color: #ffffff;
color:#ADB4C2;
box-shadow:0px 0px 10px;
}
/* Float cancel and signup buttons and add an equal width */
.googlebtn {
float: left;
width: 100%;
}
.signinbtn {
float: left;
width: 100%;
}
.orspan {
float: left;
text-align: center;
width: 100%;
font-weight: bold;
line-height:40px;
}
/* Add padding to container elements */
.container {
padding: 16px;
}
/* Clear floats */
.clearfix::after {
content: "";
clear: both;
display: table;
}
/* Change styles for cancel button and signup button on extra small screens */
@media screen and (max-width: 300px) {
.googlebtn, .signinbtn, .orspan {
width: 100%;
}
}
</style>
<div class="col-md-6" style="margin:0px auto;">
<form action="<?php echo HTTP_SITE_URL;?>/users/forgotpass" style="border:1px solid #ccc;background:#FFFFFF;" method="POST" autocomplete="off">
<div style="padding:15px;">
<h5>Forgot Password ?</h5>
<?php echo $this->Session->read('system.message'); ?>
<br>
<label for="email" class="label"><b>Enter your Email Address* </b></label>
<input type="email" placeholder="Enter your Email Address" name="email" autocomplete="off" required>
<div class="clearfix">
<button type="submit" class="signinbtn btn-primary" name="forgotpassbtn">Send</button>
</div>
</div>
</form>
</div>

242
app/View/Users/login.ctp Normal file
View File

@@ -0,0 +1,242 @@
<style>
* {
box-sizing: border-box
}
/* Full-width input fields */
input[type=text],
input[type=email],
input[type=password] {
width: 100%;
padding: 10px 15px;
margin: 0px 0 8px 0;
display: inline-block;
border: 1px solid #ADB4C2;
background: none;
border-radius: 4px;
}
input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus {
background-color: #ddd;
outline: none;
}
hr {
border: 1px solid #f1f1f1;
margin-bottom: 25px;
}
/* Set a style for all buttons */
button {
border-radius: 4px;
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
opacity: 0.9;
}
button:hover {
opacity: 1;
}
/* Extra styles for the cancel button */
.googlebtn {
padding: 14px 10px;
background-color: #ffffff;
color: #ADB4C2;
box-shadow: 0px 0px 10px;
}
/* Float cancel and signup buttons and add an equal width */
.googlebtn {
float: left;
width: 100%;
}
.signinbtn {
float: left;
width: 100%;
}
.orspan {
float: left;
text-align: center;
width: 100%;
font-weight: bold;
line-height: 40px;
}
/* Add padding to container elements */
.container {
padding: 16px;
}
/* Clear floats */
.clearfix::after {
content: "";
clear: both;
display: table;
}
.g-signin2 {
display: inline-block;
width: 100%;
border-radius: 5px;
border: 1px solid #eeefff;
}
.g-signin2>div {
width: 100% !important;
height: 40px !important;
}
.g-signin2>div .abcRioButtonIcon {
padding: 12px !important;
}
.g-signin2>div .abcRioButtonContents {
font-size: 16px !important;
margin-right: 48px;
}
/* Change styles for cancel button and signup button on extra small screens */
@media screen and (max-width: 300px) {
.googlebtn,
.signinbtn,
.orspan {
width: 100%;
}
}
</style>
<div class="col-md-6" style="margin:0px auto;">
<?php
if($verification){
?>
<div class="alert alert-info" role="alert">
<strong> Your account is verified successfully! Please login to access!</strong>
</div>
<?php
}
?>
<form action="<?php echo HTTP_SITE_URL; ?>/users/login" style="border:1px solid #ccc;background:#FFFFFF;" method="POST">
<div style="padding:15px;">
<h5>Sign in to your Account</h5>
<span class="inner"></span>
<?php echo $this->Session->read('system.message'); ?>
<br>
<label for="email" class="label"><b>Email Address* </b></label>
<input type="email" placeholder="Enter your Email Address" name="email" required>
<label for="psw" class="label"><b>Password*</b></label>
<input type="password" placeholder="Enter Password" name="password" required>
<label for="remme" class="label"><input type="checkbox" id="remme" name="remme" value="on"> <strong>Remember Me</strong></label>
<div class="clearfix">
<button type="submit" class="signinbtn btn-primary" name="singinbtn">Sign In</button>
<div>
<span class="orspan"> OR </span>
<meta name="google-signin-scope" content="profile email">
<meta name="google-signin-client_id" content="<?php echo GOOGLE_CLIENT_ID; ?>.apps.googleusercontent.com">
<script src="https://apis.google.com/js/platform.js" async defer></script>
<div class="g-signin2" data-onsuccess="onSignIn"></div>
<!-- data-onfailure="onSignInFailure"-->
<!-- <a href="#" onclick="signOut();">Sign out</a>-->
<!--button type="button" class="googlebtn"><img style="display:inline-block;height:25px;" src="<?= HTTP_SITE_URL . '/images/g.png' ?>" /><span style="mt-1"> Sign in with Google</span></button-->
</div>
</div>
<br>
<p>
<a style="font-weight:bold;color:dodgerblue" href="<?php echo HTTP_SITE_URL; ?>/users/forgotpass">Forgot Password?</a>
<a style="font-weight:bold;color:dodgerblue;float: right;" href="<?php echo HTTP_SITE_URL; ?>/users/register">Are not Registered?</a>
</p>
</div>
</form>
</div>
<script>
function onSignIn(googleUser) {
if (document.referrer && document.referrer != "") {
var auth2 = gapi.auth2.getAuthInstance();
auth2.signOut().then(function() {});
auth2.disconnect();
}
// Useful data for your client-side scripts:
var profile = googleUser.getBasicProfile();
var email = profile.getEmail();
var name = profile.getName();
var profileId = profile.getId();
// console.log("ID: " + profile.getId()); // Don't send this directly to your server!
// console.log('Full Name: ' + profile.getName());
// console.log('Given Name: ' + profile.getGivenName());
// console.log('Family Name: ' + profile.getFamilyName());
// console.log("Image URL: " + profile.getImageUrl());
// console.log("Email: " + profile.getEmail());
// The ID token you need to pass to your backend:
var id_token = googleUser.getAuthResponse().id_token;
// console.log("ID Token: " + id_token);
$.ajax({
type: 'POST',
crossDomain: true,
dataType: "json",
url: "https://"+window.location.host+"/users/login",
//url: "<?= HTTP_SITE_URL ?>/users/googlesignin",
// Always include an `X-Requested-With` header in every AJAX request,
// to protect against CSRF attacks.
// headers: {
// 'X-Requested-With': 'XMLHttpRequest'
// },
// contentType: 'application/octet-stream; charset=utf-8',
//
success: function(result) {
// Handle or verify the server response.
if (result == true)
window.location.href = "<?= HTTP_SITE_URL ?>/pages/myExpenses";
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
// $( ".inner" ).append("");
$(".inner").html(XMLHttpRequest.responseText);
//alert(XMLHttpRequest.responseText);
},
// processData: false,
data: {
profileId: profileId,
name: name,
email: email,
id_token: id_token
}
});
}
function onSignInFailure() {
//window.location.href = "<? //=HTTP_SITE_URL ?>///users/login";
//window.location.href = "<? //=HTTP_SITE_URL ?>///pages/products";
}
/*function signOut() {
var auth2 = gapi.auth2.getAuthInstance();
auth2.signOut().then(function() {
console.log('User signed out.');
});
}*/
</script>

View File

@@ -0,0 +1,19 @@
<style>
* {box-sizing: border-box}
.contentDiv{
margin:0px auto;border:1px solid #ccc;background:#FFFFFF;
}
.innerDiv{
padding: 50px;font-size: 18px;font-weight: bold;
}
.lginLink{
text-decoration: underline;
}
</style>
<div class="col-md-8 contentDiv">
<div class="innerDiv">
<p>A varification link has been sent to your email account. Please check your inbox and follow the instruction to <a class="lginLink" href="<?php echo HTTP_SITE_URL.'/users/login';?>">LogIn</a></p>
<br><br><br>
</div>
</div>

View File

@@ -0,0 +1,19 @@
<style>
* {box-sizing: border-box}
.contentDiv{
margin:0px auto;border:1px solid #ccc;background:#FFFFFF;
}
.innerDiv{
padding: 50px;font-size: 18px;font-weight: bold;
}
.lginLink{
text-decoration: underline;
}
</style>
<div class="col-md-8 contentDiv">
<div class="innerDiv">
<p>A password reset link has been sent to your email account. Please check your inbox and follow the instruction.</p>
<br><br><br>
</div>
</div>

155
app/View/Users/register.ctp Normal file
View File

@@ -0,0 +1,155 @@
<style>
* {box-sizing: border-box}
/* Full-width input fields */
input[type=text],
input[type=email],
input[type=password] {
width: 100%;
padding: 10px 15px;
margin: 0px 0 8px 0;
display: inline-block;
border: 1px solid #ADB4C2;
background: none;
border-radius:4px;
}
input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus {
background-color: #ddd;
outline: none;
}
hr {
border: 1px solid #f1f1f1;
margin-bottom: 25px;
}
/* Set a style for all buttons */
button {
border-radius:4px;
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
opacity: 0.9;
}
button:hover {
opacity:1;
}
/* Extra styles for the cancel button */
.googlebtn {
padding: 14px 10px;
background-color: #ffffff;
color:#ADB4C2;
box-shadow:0px 0px 10px;
}
/* Float cancel and signup buttons and add an equal width */
.googlebtn {
float: left;
width: 45%;
}
.signupbtn {
float: left;
width: 40%;
}
.orspan {
float: left;
text-align: center;
width: 15%;
font-weight: bold;
}
/* Add padding to container elements */
.container {
padding: 16px;
}
/* Clear floats */
.clearfix::after {
content: "";
clear: both;
display: table;
}
/* Change styles for cancel button and signup button on extra small screens */
@media screen and (max-width: 991px) {
.googlebtn, .signupbtn, .orspan {
width: 100%;
}
.orspan {
margin-top: 0px !important;
}
}
@media screen and (min-width: 991px) and (max-width: 1200px) {
.googlebtn{
width: 60%;
}
.signupbtn{
width: 30%;
}
.orspan {
width: 10%;
}
}
</style>
<!--<link href='https://fonts.googleapis.com/css?family=Lato:300,400,500' rel='stylesheet' type='text/css'>-->
<div class="col-md-6" style="margin:0px auto;">
<form action="<?php echo HTTP_SITE_URL;?>/users/register" style="border:1px solid #ccc;background:#FFFFFF;" method="POST">
<div style="padding:15px;">
<h5>Sign Up with Email</h5>
<?php echo $this->Session->read('system.message'); ?>
<br>
<label for="name" class="label"><b>Name* </b></label>
<input type="text" placeholder="Enter a Name" id="Name" name="name" autocomplete="off" required />
<label for="email" class="label"><b>Email Address* </b></label>
<input type="email" placeholder="Enter your Email Address" id="Email" name="email" autocomplete="off" required />
<label for="password" class="label"><b>Password*</b></label>
<input type="password" placeholder="Enter Password" id="Password" name="password" autocomplete="off" required />
<label><strong>Enter Captcha*:</strong></label><br />
<input type="text" name="captcha" autocomplete="off" required />
<p><img src="<?php echo HTTP_SITE_URL.'/captcha.php?rand='.rand(); ?>" id='captcha_image'>
<!-- <p><img src="--><?php //echo HTTP_SITE_URL.'/users/captcha/'.rand(); ?><!--" id='captcha_image'>-->
Can't read the image? <a href='javascript: refreshCaptcha();'>click here</a> to refresh</p>
<div class="clearfix">
<button type="submit" class="signupbtn btn-primary" name="singupbtn">Sign Up</button>
<!--span class="orspan mt-4"> OR </span>
<button type="button" class="googlebtn"><img style="display:inline-block;height:25px;" src="<?=HTTP_SITE_URL.'/images/g.png'?>" /><span style="mt-1"> Sign in with Google</span></button-->
</div>
<br><p>By signing up you agree to the <a href="<?php echo HTTP_SITE_URL;?>/pages/termscondition" style="color:dodgerblue">Terms of Service</a> and <a href="<?php echo HTTP_SITE_URL;?>/pages/privacypolicy" style="color:dodgerblue">Privacy Policy</a>.</p>
</div>
</form>
</div>
<script>
//Refresh Captcha
function refreshCaptcha(){
var img = document.images['captcha_image'];
img.src = img.src.substring(
0,img.src.lastIndexOf("?")
)+"?rand="+Math.random()*1000;
// img.src = img.src.substring(
// 0,img.src.lastIndexOf("/")
// )+"/"+Math.random()*1000;
}
// refreshCaptcha();
</script>

View File

@@ -0,0 +1,125 @@
<style>
* {
box-sizing: border-box
}
/* Full-width input fields */
input[type=text],
input[type=email],
input[type=password] {
width: 100%;
padding: 10px 15px;
margin: 0px 0 8px 0;
display: inline-block;
border: 1px solid #ADB4C2;
background: none;
border-radius: 4px;
}
input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus {
background-color: #ddd;
outline: none;
}
hr {
border: 1px solid #f1f1f1;
margin-bottom: 25px;
}
/* Set a style for all buttons */
button {
border-radius: 4px;
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
opacity: 0.9;
}
button:hover {
opacity: 1;
}
/* Extra styles for the cancel button */
.googlebtn {
padding: 14px 10px;
background-color: #ffffff;
color: #ADB4C2;
box-shadow: 0px 0px 10px;
}
/* Float cancel and signup buttons and add an equal width */
.googlebtn {
float: left;
width: 100%;
}
.signinbtn {
float: left;
width: 100%;
}
.orspan {
float: left;
text-align: center;
width: 100%;
font-weight: bold;
line-height: 40px;
}
/* Add padding to container elements */
.container {
padding: 16px;
}
/* Clear floats */
.clearfix::after {
content: "";
clear: both;
display: table;
}
.g-signin2 {
display: inline-block;
width: 100%;
border-radius: 5px;
border: 1px solid #eeefff;
}
.g-signin2>div {
width: 100% !important;
height: 40px !important;
}
.g-signin2>div .abcRioButtonIcon {
padding: 12px !important;
}
.g-signin2>div .abcRioButtonContents {
font-size: 16px !important;
margin-right: 48px;
}
/* Change styles for cancel button and signup button on extra small screens */
@media screen and (max-width: 300px) {
.googlebtn,
.signinbtn,
.orspan {
width: 100%;
}
}
</style>
<div class="col-md-6" style="margin:0px auto;">
<div style="border:1px solid #ccc;background:#FFFFFF;padding: 15px;">
<?php
echo $status_desc;
?>
</div>
</div>

View File

@@ -0,0 +1,125 @@
<style>
* {box-sizing: border-box}
/* Full-width input fields */
input[type=text],
input[type=email],
input[type=password] {
width: 100%;
padding: 10px 15px;
margin: 0px 0 8px 0;
display: inline-block;
border: 1px solid #ADB4C2;
background: none;
border-radius:4px;
}
input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus {
background-color: #ddd;
outline: none;
}
hr {
border: 1px solid #f1f1f1;
margin-bottom: 25px;
}
/* Set a style for all buttons */
button {
border-radius:4px;
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
opacity: 0.9;
}
button:hover {
opacity:1;
}
/* Extra styles for the cancel button */
.googlebtn {
padding: 14px 10px;
background-color: #ffffff;
color:#ADB4C2;
box-shadow:0px 0px 10px;
}
/* Float cancel and signup buttons and add an equal width */
.googlebtn {
float: left;
width: 100%;
}
.signinbtn {
float: left;
width: 100%;
}
.orspan {
float: left;
text-align: center;
width: 100%;
font-weight: bold;
line-height:40px;
}
/* Add padding to container elements */
.container {
padding: 16px;
}
/* Clear floats */
.clearfix::after {
content: "";
clear: both;
display: table;
}
/* Change styles for cancel button and signup button on extra small screens */
@media screen and (max-width: 300px) {
.googlebtn, .signinbtn, .orspan {
width: 100%;
}
}
</style>
<div class="col-md-6" style="margin:0px auto;">
<form action="<?php echo HTTP_SITE_URL.'/users/resetpass/'.$resetPassToken;?>" style="border:1px solid #ccc;background:#FFFFFF;" method="POST" autocomplete="off">
<div style="padding:15px;">
<h5>Set New Password</h5>
<?php echo $this->Session->read('system.message'); ?>
<br>
<label for="psw" class="label"><b>New Password*</b></label>
<input type="password" placeholder="Enter New Password" name="password" autocomplete="off" required>
<label for="psw" class="label"><b>Confirm Password*</b></label>
<input type="password" placeholder="Enter Confirm Password" name="confirm_password" autocomplete="off" required>
<label class="confirmPassMsg" style="color:red;font-weight: bold;"></label>
<div class="clearfix">
<button type="submit" class="signinbtn" name="resetpassbtn">Submit</button>
</div>
</div>
</form>
</div>
<script type="text/javascript">
$(document).ready(function () {
$(document).on('keyup','input[name=confirm_password]',function () {
$pass = $('input[name=password]').val();
$confirm_pass = $('input[name=confirm_password]').val();
if($pass != $confirm_pass){
$('.confirmPassMsg').text("Password doesn't match");
} else {
$('.confirmPassMsg').text('');
}
});
});
</script>

123
app/View/Users/verify.ctp Normal file
View File

@@ -0,0 +1,123 @@
<style>
* {
box-sizing: border-box
}
/* Full-width input fields */
input[type=text],
input[type=email],
input[type=password] {
width: 100%;
padding: 10px 15px;
margin: 0px 0 8px 0;
display: inline-block;
border: 1px solid #ADB4C2;
background: none;
border-radius: 4px;
}
input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus {
background-color: #ddd;
outline: none;
}
hr {
border: 1px solid #f1f1f1;
margin-bottom: 25px;
}
/* Set a style for all buttons */
button {
border-radius: 4px;
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
opacity: 0.9;
}
button:hover {
opacity: 1;
}
/* Extra styles for the cancel button */
.googlebtn {
padding: 14px 10px;
background-color: #ffffff;
color: #ADB4C2;
box-shadow: 0px 0px 10px;
}
/* Float cancel and signup buttons and add an equal width */
.googlebtn {
float: left;
width: 100%;
}
.signinbtn {
float: left;
width: 100%;
}
.orspan {
float: left;
text-align: center;
width: 100%;
font-weight: bold;
line-height: 40px;
}
/* Add padding to container elements */
.container {
padding: 16px;
}
/* Clear floats */
.clearfix::after {
content: "";
clear: both;
display: table;
}
.g-signin2 {
display: inline-block;
width: 100%;
border-radius: 5px;
border: 1px solid #eeefff;
}
.g-signin2>div {
width: 100% !important;
height: 40px !important;
}
.g-signin2>div .abcRioButtonIcon {
padding: 12px !important;
}
.g-signin2>div .abcRioButtonContents {
font-size: 16px !important;
margin-right: 48px;
}
/* Change styles for cancel button and signup button on extra small screens */
@media screen and (max-width: 300px) {
.googlebtn,
.signinbtn,
.orspan {
width: 100%;
}
}
</style>
<div class="col-md-6" style="margin:0px auto;">
<div style="border:1px solid #ccc;background:#FFFFFF;padding: 15px;">
This link is not valid anymore!
</div>
</div>