Skip to content

Commit

Permalink
ERP Project - First Part
Browse files Browse the repository at this point in the history
phpmailer library, "config", "controllers","css","images","src" folders.
  • Loading branch information
emikodes authored Apr 20, 2023
1 parent 54b084a commit 8c60c8e
Show file tree
Hide file tree
Showing 74 changed files with 10,527 additions and 0 deletions.
18 changes: 18 additions & 0 deletions config/db.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

// Enable us to use Headers
ob_start();

// Set sessions
if(!isset($_SESSION)) {
session_start();
}

$hostname = "localhost";
$username = "";
$password = "";
$dbname = "";

$connection = mysqli_connect($hostname, $username, $password, $dbname) or die("Database connection not established.")

?>
45 changes: 45 additions & 0 deletions controllers/update_token.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php
// Database connection
include('./config/db.php');

global $email_verified, $email_already_verified, $activation_error;

// GET the token = ?token
if(!empty($_GET['token'])){
$token = $_GET['token'];
} else {
$token = "";
}

if($token != "") {
$sqlQuery = mysqli_query($connection, "SELECT * FROM customers WHERE token = '$token' ");
$countRow = mysqli_num_rows($sqlQuery);

if($countRow == 1){
while($rowData = mysqli_fetch_array($sqlQuery)){
$is_active = $rowData['is_active'];
if($is_active == 0) {
$update = mysqli_query($connection, "UPDATE customers SET is_active = '1' WHERE token = '$token' ");
if($update){
$email_verified = '<div class="alert alert-success">
Hai verificato la tua email!
</div>
';
}

} else {
$email_already_verified = '<div class="alert alert-danger">
Mail utente già verificata!
</div>
';
}
}
} else {
$activation_error = '<div class="alert alert-danger">
Errore durante la procedura di attivazione!
</div>
';
}
}

?>
64 changes: 64 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
* {
box-sizing: border-box;
}

body {
font-weight: 400;
background-color: #EEEFF4;
}

body,
html,
.App,
.vertical-center {
width: 100%;
height: 100%;
}

.navbar {
background: blueviolet !important;
width: 100%;
}

.btn-outline-primary {
border-color: blueviolet;
color: blueviolet;
}

.btn-outline-primary:hover {
background-color: blueviolet;
color: #ffffff;
}

.vertical-center {
display: flex;
text-align: left;
justify-content: center;
flex-direction: column;
}

.inner-block {
width: 450px;
margin: auto;
background: #ffffff;
box-shadow: 0px 14px 80px rgba(34, 35, 58, 0.2);
padding: 40px 55px 45px 55px;
transition: all .3s;
border-radius: 20px;
}

.vertical-center .form-control:focus {
border-color: blueviolet;
box-shadow: none;
}

.vertical-center h3 {
text-align: center;
margin: 0;
line-height: 1;
padding-bottom: 20px;
}

label {
font-weight: 500;
}
13 changes: 13 additions & 0 deletions images/captcha_arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions images/captcha_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/captcha_spinner.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions phpmailer/COMMITMENT
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
GPL Cooperation Commitment
Version 1.0

Before filing or continuing to prosecute any legal proceeding or claim
(other than a Defensive Action) arising from termination of a Covered
License, we commit to extend to the person or entity ('you') accused
of violating the Covered License the following provisions regarding
cure and reinstatement, taken from GPL version 3. As used here, the
term 'this License' refers to the specific Covered License being
enforced.

However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly
and finally terminates your license, and (b) permanently, if the
copyright holder fails to notify you of the violation by some
reasonable means prior to 60 days after the cessation.

Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you
have received notice of violation of this License (for any work)
from that copyright holder, and you cure the violation prior to 30
days after your receipt of the notice.

We intend this Commitment to be irrevocable, and binding and
enforceable against us and assignees of or successors to our
copyrights.

Definitions

'Covered License' means the GNU General Public License, version 2
(GPLv2), the GNU Lesser General Public License, version 2.1
(LGPLv2.1), or the GNU Library General Public License, version 2
(LGPLv2), all as published by the Free Software Foundation.

'Defensive Action' means a legal proceeding or claim that We bring
against you in response to a prior proceeding or claim initiated by
you or your affiliate.

'We' means each contributor to this repository as of the date of
inclusion of this file, including subsidiaries of a corporate
contributor.

This work is available under a Creative Commons Attribution-ShareAlike
4.0 International license (https://creativecommons.org/licenses/by-sa/4.0/).
Loading

0 comments on commit 8c60c8e

Please sign in to comment.