Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I would like to do some enhancement for the login Facebook page and password string #174

Open
wants to merge 40 commits into
base: test
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
464b2a1
Update README.md
san-coding Oct 7, 2021
3622876
Update webhost_pr.yml
sudhay23 Oct 7, 2021
594d352
Change navbar font style to bold
Omkar845 Oct 8, 2021
0d69f4d
Merge pull request #151 from Omkar845/Nav-bar
san-coding Oct 8, 2021
2111db8
Added Subscribe-us
I-ArchanaDash Oct 8, 2021
4275d4d
Added Subscribe-us
I-ArchanaDash Oct 8, 2021
2272653
Added server side form validation - sign up
raj-laddha Oct 9, 2021
6b957e9
Merge branch 'main' of https://github.com/raj-laddha/ShopOnline-Web-A…
raj-laddha Oct 9, 2021
286f967
Updated subscribe-us
I-ArchanaDash Oct 10, 2021
423af39
Merge pull request #154 from I-ArchanaDash/I-ArchanaDash/Subscribe
san-coding Oct 10, 2021
580d5a7
box-shadow added on signup card
Omkar845 Oct 10, 2021
b5691f5
Merge pull request #158 from Omkar845/Box-Shadow
san-coding Oct 11, 2021
17edb33
Video Demonstration of Functionalities
vikkastiwari Oct 11, 2021
be8bc86
Merge branch 'sudhay23:main' into main
raj-laddha Oct 11, 2021
7b33765
Merge pull request #159 from vikkastiwari/main
san-coding Oct 11, 2021
fc9ff71
Merge branch 'sudhay23:main' into main
raj-laddha Oct 11, 2021
170df77
sample env file
raj-laddha Oct 11, 2021
1a10420
Merge branch 'main' of https://github.com/raj-laddha/ShopOnline-Web-A…
raj-laddha Oct 11, 2021
9c587fe
Merge pull request #160 from raj-laddha/main
san-coding Oct 11, 2021
088f374
Update webhost.yml
san-coding Oct 12, 2021
4d3f215
fix some spelling
trolzen Oct 16, 2021
437fae8
add some formatting to the README.md
trolzen Oct 17, 2021
042af6c
add a border to screenshots and move them to the repository
trolzen Oct 17, 2021
da1d57c
Merge pull request #162 from trolzen/patch1
san-coding Oct 17, 2021
df5f93d
commit 1
Sumithra-Sudhakar Oct 21, 2021
7653c0e
Merge pull request #163 from Sumithra-Sudhakar/main
san-coding Oct 21, 2021
4f431f2
Added code for frontend of login with linkedin
ainy-123 Oct 22, 2021
6634e4a
requested changes done
ainy-123 Oct 22, 2021
d974d3f
Create stale.yml
Sumithra-Sudhakar Oct 23, 2021
9ce3a9d
Merge pull request #166 from Sumithra-Sudhakar/main
san-coding Oct 23, 2021
8c3c86d
Merge pull request #164 from ainy-123/ainy
san-coding Oct 23, 2021
a0b3522
Delete CHANGELOG.md
Sumithra-Sudhakar Oct 25, 2021
6d78d9d
Delete db directory
Sumithra-Sudhakar Oct 25, 2021
5896813
Merge pull request #168 from Sumithra-Sudhakar/main
san-coding Oct 25, 2021
ba6e132
Create label.yml
Sumithra-Sudhakar Oct 25, 2021
c8a0fa8
Merge pull request #170 from Sumithra-Sudhakar/main
san-coding Oct 25, 2021
025a1b2
test
san-coding Oct 28, 2021
468c315
Readme change
sudhay23 Oct 29, 2021
045f1b1
Updated ReadMe file
lavakush07 Jan 11, 2022
e69b779
Merge pull request #171 from lavakush07/patch-1
sudhay23 Jan 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .github/images/00-Landing-page.png
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 .github/images/01-Customer-registration.png
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 .github/images/02-Customer-login.png
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 .github/images/03-Order-details.png
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 .github/images/04-Shopping-cart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 .github/images/06-Order-successful.png
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 .github/images/07-Admin-registration.png
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 .github/images/08-Admin-login.png
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 .github/images/09-Product-list.png
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 .github/images/10-Adding-product-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
#
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler

name: Labeler
on: [pull_request]

jobs:
label:

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- uses: actions/labeler@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
27 changes: 27 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
name: Mark stale issues and pull requests

on:
schedule:
- cron: '36 8 * * *'

jobs:
stale:

runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
2 changes: 1 addition & 1 deletion .github/workflows/webhost.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to the Web
name: Continuous Deployment
on:
push:
branches:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/webhost_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ jobs:
- name: Comment on Pull request
uses: thollander/actions-comment-pull-request@v1
with:
message: "Hooray 🚀🎉 The preview version can now be seen on https://shoponline-web.000webhostapp.com/pull_request/"
message: "### Hooray 🚀🎉 Your changes are now live and can now be seen in the preview version on https://shoponline-web.000webhostapp.com/pull_request/"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 5 additions & 1 deletion 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>404! Page not found</title>
<title>404! Page not found

</title>

<link rel="icon" type="image/png" href="https://user-images.githubusercontent.com/86606251/135616573-fa6b14ce-1ffc-46e1-b322-44c4d2a307df.jpeg">
<link href="css/404page.css" rel="stylesheet" />
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">

Expand Down
Empty file removed CHANGELOG.md
Empty file.
112 changes: 73 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,53 +9,87 @@



- We're hosted at [here](https://shoponline-web.000webhostapp.com/) (We are currently facing some issues with registration/login , will be fixed soon)
- We're **hosted** at [ShopOnline](https://shoponline-web.000webhostapp.com/) (We are currently facing some issues with registration/login, this will be fixed soon).

### An E-commerce platform in form of a Web Application incorporating concepts of DBMS along with PHP, HTML, CSS.
### An E-commerce platform in the form of a Web Application incorporating concepts of DBMS along with PHP, HTML, CSS.

The ShopOnline Web Application was developed using HTML, CSS, Javascript, PHP, phpMyAdmin, MySQL and XAMPP as a result of implementation of key concepts of DBMS such as normalization for an efficient database design.
The ShopOnline Web Application was developed using HTML, CSS, JavaScript, PHP, phpMyAdmin, MySQL and XAMPP as a result of implementation of key concepts of DBMS such as normalization for an efficient database design.

Project maintainers:

- Sudhay Senthilkumar ([@sudhay23](https://github.com/sudhay23))
- Sandeep Rajakrishnan ([@san-coding](https://github.com/san-coding))
- Raswanth R
- Tarun K B

> (Screenshots are not in order of workflow, please visit the hosted live website to check out the project)
>
> LANDING PAGE
> <img width="1440" alt="Screenshot 2021-09-17 at 8 57 38 PM" src="https://user-images.githubusercontent.com/51874681/135990551-1b869f94-d20c-46e8-b059-e0bbe5285761.PNG">
>
> CUSTOMER REGISTERATION
> <img width="1440" alt="Screenshot 2021-09-17 at 8 57 38 PM" src="https://user-images.githubusercontent.com/51874681/135991603-2bc86dad-277f-4d30-9ee0-1688aaf883b3.PNG">
>
> CUSTOMER LOGIN
> <img width="1440" alt="Screenshot 2021-09-17 at 8 57 38 PM" src="https://user-images.githubusercontent.com/51874681/135991594-f0c40977-9bb7-42f1-86f5-2000d2efe8a0.PNG">
>
> DETAILS OF ORDER
> <img width="1440" alt="Screenshot 2021-09-17 at 8 57 38 PM" src="https://user-images.githubusercontent.com/65719940/133892074-86556054-7643-43c5-b3c6-f1d0d3ccb22b.png">
>
> CART
> <img width="1440" alt="Screenshot 2021-09-17 at 8 56 30 PM" src="https://user-images.githubusercontent.com/65719940/133892080-fdfc2118-8e4c-4f1f-bc77-6b812ac9dc38.png">
>
> ORDER DETAILS AND CANCELLATIONS
> <img width="1440" alt="Screenshot 2021-09-17 at 8 57 05 PM" src="https://user-images.githubusercontent.com/65719940/133892076-943284a4-e821-4dcb-b8b9-c8e050246276.png">
>
> ORDER SUCCESSFUL
> <img width="1440" alt="Screenshot 2021-09-17 at 8 56 47 PM" src="https://user-images.githubusercontent.com/65719940/133892078-dad5c846-6202-42ac-8b85-d6e087c6065c.png">
>
> ADMIN REGISTERATION
> <img width="1440" alt="Screenshot 2021-09-17 at 8 57 38 PM" src="https://user-images.githubusercontent.com/72618584/135611556-6b12a662-4527-4991-bf37-795ed9f64213.png">
>
> ADMIN LOGIN
> <img width="1440" alt="Screenshot 2021-09-17 at 8 57 38 PM" src="https://user-images.githubusercontent.com/72618584/135611767-f0095f3a-db24-4c96-bcc8-39303d73a543.png">
>
> PRODUCTS LIST
> <img width="1440" alt="Screenshot 2021-09-17 at 8 51 29 PM" src="https://user-images.githubusercontent.com/65719940/133892083-0895e83f-749a-4ad9-a6e1-6b7fa18b3fc8.png">
>
> ADDING PRODUCT DETAILS
> <img width="1440" alt="Screenshot 2021-09-17 at 8 51 56 PM" src="https://user-images.githubusercontent.com/65719940/133892084-8283e3ee-a9a8-4988-a06a-6bbf5b37dd20.png">
- Tarun.K.B


## Screenshots

Screenshots are not in the order of the workflow, please visit the hosted live website to check out the project.

### Landing page
![](.github/images/00-Landing-page.png)

### Customer registration
![](.github/images/01-Customer-registration.png)

### Customer login
![](.github/images/02-Customer-login.png)

### Order details
![](.github/images/03-Order-details.png)

### Shopping cart
![](.github/images/04-Shopping-cart.png)

### Order list and cancellation
![](.github/images/05-Order-list-and-cancellation.png)

### Order successful
![](.github/images/06-Order-successful.png)

### Admin registration
![](.github/images/07-Admin-registration.png)

### Admin login
![](.github/images/08-Admin-login.png)

### Product list
![](.github/images/09-Product-list.png)

### Adding product details
![](.github/images/10-Adding-product-details.png)


## Videos

https://user-images.githubusercontent.com/51874681/136643130-71e34b48-5424-479f-b4ca-3d3e9e53ec84.mp4

https://user-images.githubusercontent.com/51874681/136643163-2b43e203-d855-442e-9328-1845e450f8cf.mp4

https://user-images.githubusercontent.com/51874681/136643169-b416bdff-e701-4fe9-aae1-910fc62389d7.mp4

https://user-images.githubusercontent.com/51874681/136643171-5b18b160-e46d-4bf8-8328-f56b4015f630.mp4

https://user-images.githubusercontent.com/51874681/136643176-3a8e1962-a08f-4f6a-895e-5d50a4c08993.mp4

https://user-images.githubusercontent.com/51874681/136643183-44488e43-40e4-4c73-8703-64454bb30dba.mp4

https://user-images.githubusercontent.com/51874681/136703386-48a1931b-e582-48c0-916a-1080f7c16e95.mp4

https://user-images.githubusercontent.com/51874681/136703395-dabba0f4-3f61-4d40-8a94-5f51d9f2b32f.mp4

https://user-images.githubusercontent.com/51874681/136703400-cac2e3d7-edd4-4ea3-a0b7-7662990bdcfe.mp4

https://user-images.githubusercontent.com/51874681/136703403-197f3f78-7445-45fb-999d-f41734b4a58a.mp4

https://user-images.githubusercontent.com/51874681/136703411-5ef185d4-b12f-455d-b707-539f573694ec.mp4

https://user-images.githubusercontent.com/51874681/136703422-b82d0dcb-d00c-4091-89fa-ca3d0d1644f7.mp4





## Contact Us

Expand Down
2 changes: 1 addition & 1 deletion With PHP/backend/databaseConnect.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require __DIR__.'\vendor\autoload.php';
require __DIR__.'/vendor/autoload.php';

$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv->load();
Expand Down
25 changes: 25 additions & 0 deletions With PHP/backend/failedValidation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<html>
<head>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/sweetalert2.min.css"
/>
</head>

<body onload="sucfn()">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/sweetalert2.all.min.js"></script>
<script type="text/javascript">
const sucfn = () => {
swal({
title: "Oops!",
text:
"Empty or invlaid input field(s)",
type: "error",
}).then(function () {
// Redirect the user
window.location.href = "../../index.html";
});
};
</script>
</body>
</html>
140 changes: 88 additions & 52 deletions With PHP/backend/registerCustomer.php
Original file line number Diff line number Diff line change
@@ -1,58 +1,94 @@
<?php
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$fname = trim($_POST['fname']);
$lname = trim($_POST['lname']);
$accountpassword = $_POST['password'];
$dob = $_POST['dob'];
$phoneno = $_POST['phoneno'];
$email = $_POST['email'];
$accesslevel = $_POST['accesslevel'];
$paymentpreference = $_POST['paymentpreference'];
$address = $_POST['address'];
$dob = trim($_POST['dob']);
$phoneno = trim($_POST['phoneno']);
$email = trim($_POST['email']);
$accesslevel = 'customer';
$paymentpreference = trim($_POST['paymentpreference']);
$address = trim($_POST['address']);

function valid_password($password) {
$exp = "/((?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[@#$%]).{8,15})/";
return preg_match($exp, $password);
}

function valid_phoneno($pno) {
$exp = "/^[1-9][0-9]{9}$/";
return preg_match($exp, $pno);
}

function valid_dob($date) {
$d = DateTime::createFromFormat('Y-m-d', $date);
return $d && $d->format('Y-m-d') === $date;
}

function valid_email($mail) {
$exp = "/[a-z0-9_-]+@[a-z0-9_-]+\.[a-z]{2,4}$/i";
return preg_match($exp, $mail);
}

if (
$fname === '' ||
$lname === '' ||
$dob === '' ||
$phoneno === '' ||
$email === '' ||
$address === '' ||
$paymentpreference === '' ||
$accountpassword === '' ||
!valid_password($accountpassword) ||
!valid_phoneno($phoneno) ||
!valid_dob($dob) ||
!valid_email($email)
) {
exit(require "failedValidation.html");
}

include 'databaseConnect.php';


//create connection
$conn = new mysqli($host, $dbUsername, $dbPassword, $dbname);
if (mysqli_connect_error()) {
die('Connection Error('. mysqli_connect_errno().')'. mysqli_connect_error());
} else {
$SELECT_ONE = "SELECT email from persons where email = ? limit 1";
$INSERT_ONE = "INSERT into persons (fname, lname, accesslevel, accountpassword, dob, phoneno, email, address) values(?, ?, ?, ?, ?, ?, ?, ?)";
$SELECT_TWO = "SELECT personid from persons where email = ? limit 1";
$INSERT_TWO = "INSERT into customer (personid, paymentPreference) values(?, ?)";

//Prepare statement
$stmt = $conn->prepare($SELECT_ONE);
$stmt->bind_param("s",$email);
$stmt->execute();
$stmt->bind_result($email);
$stmt->store_result();
$stmt->fetch();
$rnum = $stmt->num_rows;
if ($rnum==0) {
$stmt->close();
$stmt = $conn->prepare($INSERT_ONE);
$stmt->bind_param("sssssiss", $fname, $lname, $accesslevel, $accountpassword, $dob, $phoneno, $email, $address );
$stmt->execute();
$stmt->close();

$stmt = $conn->prepare($SELECT_TWO);
$stmt->bind_param("s",$email);
$stmt->execute();
$stmt->bind_result($PERSON_ID);
$stmt->store_result();
$stmt->fetch();
$stmt->close();

$stmt = $conn->prepare($INSERT_TWO);
$stmt->bind_param("is", $PERSON_ID, $paymentpreference);
$stmt->execute();
require "successRegisterCustomer.html";
} else {
require 'failedRegisterCustomer.html';
}
$stmt->close();
$conn->close();
}
?>
//create connection
$conn = new mysqli($host, $dbUsername, $dbPassword, $dbname);
if (mysqli_connect_error()) {
die('Connection Error(' . mysqli_connect_errno() . ')' . mysqli_connect_error());
} else {
$SELECT_ONE = "SELECT email from persons where email = ? limit 1";
$INSERT_ONE = "INSERT into persons (fname, lname, accesslevel, accountpassword, dob, phoneno, email, address) values(?, ?, ?, ?, ?, ?, ?, ?)";
$SELECT_TWO = "SELECT personid from persons where email = ? limit 1";
$INSERT_TWO = "INSERT into customer (personid, paymentPreference) values(?, ?)";

//Prepare statement
$stmt = $conn->prepare($SELECT_ONE);
$stmt->bind_param("s", $email);
$stmt->execute();
$stmt->bind_result($email);
$stmt->store_result();
$stmt->fetch();
$rnum = $stmt->num_rows;
if ($rnum == 0) {
$stmt->close();
$stmt = $conn->prepare($INSERT_ONE);
$stmt->bind_param("sssssiss", $fname, $lname, $accesslevel, $accountpassword, $dob, $phoneno, $email, $address);
$stmt->execute();
$stmt->close();

$stmt = $conn->prepare($SELECT_TWO);
$stmt->bind_param("s", $email);
$stmt->execute();
$stmt->bind_result($PERSON_ID);
$stmt->store_result();
$stmt->fetch();
$stmt->close();

$stmt = $conn->prepare($INSERT_TWO);
$stmt->bind_param("is", $PERSON_ID, $paymentpreference);
$stmt->execute();
require "successRegisterCustomer.html";
} else {
require 'failedRegisterCustomer.html';
}
$stmt->close();
$conn->close();
}
Loading