Updated the website.
This commit is contained in:
parent
8658a51b81
commit
4e14554c33
11 changed files with 40 additions and 40 deletions
2
README.md
vendored
2
README.md
vendored
|
@ -2,7 +2,7 @@
|
|||
|
||||
A cool shopping site made using PHP, CSS, JavaScript and SQL.
|
||||
|
||||
Note: pricing slider and payment provider doesn't work. Also the code has security vulnerability against SQL injection.
|
||||
Note: Payment provider doesn't work. Also the code has security vulnerability against SQL injection.
|
||||
|
||||
# Installation
|
||||
|
||||
|
|
16
action.php
16
action.php
|
@ -126,10 +126,10 @@ if(isset($_POST["getProduct"])){
|
|||
<a href='product.php?p=$pro_id'><div class='product'>
|
||||
<div class='product-img'>
|
||||
<img src='product_images/$pro_image' style='max-height: 170px;' alt=''>
|
||||
<div class='product-label'>
|
||||
<!--<div class='product-label'>
|
||||
<span class='sale'>-30%</span>
|
||||
<span class='new'>NEW</span>
|
||||
</div>
|
||||
</div>-->
|
||||
</div></a>
|
||||
<div class='product-body'>
|
||||
<p class='product-category'>$cat_name</p>
|
||||
|
@ -158,8 +158,8 @@ if(isset($_POST["getProduct"])){
|
|||
echo "</div>
|
||||
<div class='product-btns'>
|
||||
<button pid='$pro_id' id='wishlist' class='add-to-wishlist'><i class='fa fa-heart-o'></i><span class='tooltipp'>add to wishlist</span></button>
|
||||
<button class='add-to-compare'><i class='fa fa-exchange'></i><span class='tooltipp'>add to compare</span></button>
|
||||
<button class='quick-view'><i class='fa fa-eye'></i><span class='tooltipp'>quick view</span></button>
|
||||
<!--<button class='add-to-compare'><i class='fa fa-exchange'></i><span class='tooltipp'>add to compare</span></button>-->
|
||||
<!--<button class='quick-view'><i class='fa fa-eye'></i><span class='tooltipp'>quick view</span></button>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class='add-to-cart'>
|
||||
|
@ -207,10 +207,10 @@ if(isset($_POST["get_seleted_Category"]) || isset($_POST["selectBrand"]) || isse
|
|||
<a href='product.php?p=$pro_id'><div class='product'>
|
||||
<div class='product-img'>
|
||||
<img src='product_images/$pro_image' style='max-height: 170px;' alt=''>
|
||||
<div class='product-label'>
|
||||
<!--<div class='product-label'>
|
||||
<span class='sale'>-30%</span>
|
||||
<span class='new'>NEW</span>
|
||||
</div>
|
||||
</div>-->
|
||||
</div></a>
|
||||
<div class='product-body'>
|
||||
<p class='product-category'>$cat_name</p>
|
||||
|
@ -239,8 +239,8 @@ if(isset($_POST["get_seleted_Category"]) || isset($_POST["selectBrand"]) || isse
|
|||
echo "</div>
|
||||
<div class='product-btns'>
|
||||
<button pid='$pro_id' id='wishlist' class='add-to-wishlist' tabindex='0'><i class='fa fa-heart-o'></i><span class='tooltipp'>add to wishlist</span></button>
|
||||
<button class='add-to-compare'><i class='fa fa-exchange'></i><span class='tooltipp'>add to compare</span></button>
|
||||
<button class='quick-view' ><i class='fa fa-eye'></i><span class='tooltipp'>quick view</span></button>
|
||||
<!--<button class='add-to-compare'><i class='fa fa-exchange'></i><span class='tooltipp'>add to compare</span></button>-->
|
||||
<!--<button class='quick-view' ><i class='fa fa-eye'></i><span class='tooltipp'>quick view</span></button>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class='add-to-cart'>
|
||||
|
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
@ -72,7 +72,7 @@ include "topheader.php";
|
|||
$substr = substr($product_name,0,36);
|
||||
// $price = round($price*0.014,2);
|
||||
echo "<tr><td><img src='../../product_images/$image' style='width:50px; height:50px; border:groove #000'></td><td>$substr</td>
|
||||
<td>RS $price</td>
|
||||
<td>$price CAD</td>
|
||||
<td> ";
|
||||
|
||||
if ($_SESSION['role'] != 'e') {
|
||||
|
|
|
@ -35,7 +35,7 @@ include "topheader.php";
|
|||
<div class="col-md-14">
|
||||
<div class="card ">
|
||||
<div class="card-header card-header-primary">
|
||||
<h4 class="card-title">sales / Page <?php echo $page;?> </h4>
|
||||
<h4 class="card-title">Sales Information <?php echo $page;?> </h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive ps">
|
||||
|
|
24
body.php
24
body.php
|
@ -134,7 +134,7 @@
|
|||
include 'db.php';
|
||||
|
||||
|
||||
$product_query = "SELECT * FROM products,categories WHERE product_cat=cat_id AND product_id BETWEEN 70 AND 75";
|
||||
$product_query = "SELECT * FROM products,categories WHERE product_cat=cat_id AND product_id BETWEEN 62 AND 67";
|
||||
$run_query = mysqli_query($con,$product_query);
|
||||
if(mysqli_num_rows($run_query) > 0){
|
||||
|
||||
|
@ -156,8 +156,6 @@
|
|||
<a href='product.php?p=$pro_id'><div class='product-img'>
|
||||
<img src='product_images/$pro_image' style='max-height: 170px;' alt=''>
|
||||
<div class='product-label'>
|
||||
<span class='sale'>-30%</span>
|
||||
<span class='new'>NEW</span>
|
||||
</div>
|
||||
</div></a>
|
||||
<div class='product-body'>
|
||||
|
@ -188,8 +186,8 @@
|
|||
echo "</div>
|
||||
<div class='product-btns'>
|
||||
<button pid='$pro_id' id='wishlist' class='add-to-wishlist'><i class='fa fa-heart-o'></i><span class='tooltipp'>add to wishlist</span></button>
|
||||
<button class='add-to-compare'><i class='fa fa-exchange'></i><span class='tooltipp'>add to compare</span></button>
|
||||
<button class='quick-view'><i class='fa fa-eye'></i><span class='tooltipp'>quick view</span></button>
|
||||
<!--<button class='add-to-compare'><i class='fa fa-exchange'></i><span class='tooltipp'>add to compare</span></button>-->
|
||||
<!--<button class='quick-view'><i class='fa fa-eye'></i><span class='tooltipp'>quick view</span></button>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class='add-to-cart'>
|
||||
|
@ -228,10 +226,9 @@
|
|||
<!-- /SECTION -->
|
||||
|
||||
<!-- HOT DEAL SECTION -->
|
||||
<!--
|
||||
<div id="hot-deal" class="section mainn mainn-raised">
|
||||
<!-- container -->
|
||||
<div class="container">
|
||||
<!-- row -->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="hot-deal">
|
||||
|
@ -267,10 +264,9 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /row -->
|
||||
</div>
|
||||
<!-- /container -->
|
||||
</div>
|
||||
-->
|
||||
<!-- /HOT DEAL SECTION -->
|
||||
|
||||
|
||||
|
@ -301,7 +297,7 @@
|
|||
include 'db.php';
|
||||
|
||||
|
||||
$product_query = "SELECT * FROM products,categories WHERE product_cat=cat_id AND product_id BETWEEN 59 AND 65";
|
||||
$product_query = "SELECT * FROM products,categories WHERE product_cat=cat_id AND product_id BETWEEN 1 AND 7";
|
||||
$run_query = mysqli_query($con,$product_query);
|
||||
if(mysqli_num_rows($run_query) > 0){
|
||||
|
||||
|
@ -322,10 +318,10 @@
|
|||
<div class='product'>
|
||||
<a href='product.php?p=$pro_id'><div class='product-img'>
|
||||
<img src='product_images/$pro_image' style='max-height: 170px;' alt=''>
|
||||
<div class='product-label'>
|
||||
<!--<div class='product-label'>
|
||||
<span class='sale'>-30%</span>
|
||||
<span class='new'>NEW</span>
|
||||
</div>
|
||||
</div>-->
|
||||
</div></a>
|
||||
<div class='product-body'>
|
||||
<p class='product-category'>$cat_name</p>
|
||||
|
@ -355,8 +351,8 @@
|
|||
echo "</div>
|
||||
<div class='product-btns'>
|
||||
<button pid='$pro_id' id='wishlist' class='add-to-wishlist'><i class='fa fa-heart-o'></i><span class='tooltipp'>add to wishlist</span></button>
|
||||
<button class='add-to-compare'><i class='fa fa-exchange'></i><span class='tooltipp'>add to compare</span></button>
|
||||
<button class='quick-view'><i class='fa fa-eye'></i><span class='tooltipp'>quick view</span></button>
|
||||
<!--<button class='add-to-compare'><i class='fa fa-exchange'></i><span class='tooltipp'>add to compare</span></button>-->
|
||||
<!--<button class='quick-view'><i class='fa fa-eye'></i><span class='tooltipp'>quick view</span></button>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class='add-to-cart'>
|
||||
|
|
8
database/storedatabase.sql
vendored
8
database/storedatabase.sql
vendored
|
@ -3,7 +3,7 @@
|
|||
-- https://www.phpmyadmin.net/
|
||||
--
|
||||
-- Host: localhost
|
||||
-- Generation Time: Jul 09, 2024 at 12:24 AM
|
||||
-- Generation Time: Jul 09, 2024 at 09:58 PM
|
||||
-- Server version: 10.4.32-MariaDB
|
||||
-- PHP Version: 8.1.25
|
||||
|
||||
|
@ -68,7 +68,7 @@ INSERT INTO `brands` (`brand_id`, `brand_title`) VALUES
|
|||
(1, 'HP'),
|
||||
(2, 'Samsung'),
|
||||
(3, 'Apple'),
|
||||
(4, 'motorolla'),
|
||||
(4, 'Motorolla'),
|
||||
(5, 'LG'),
|
||||
(6, 'Cloth Brand');
|
||||
|
||||
|
@ -202,7 +202,7 @@ CREATE TABLE `orders_info` (
|
|||
--
|
||||
|
||||
INSERT INTO `orders_info` (`order_id`, `user_id`, `f_name`, `email`, `address`, `city`, `state`, `zip`, `cardname`, `cardnumber`, `expdate`, `prod_count`, `total_amt`, `cvv`) VALUES
|
||||
(1, 1, 'support', 'batuhanbasoglu@mailbox.org', 'Montreal, Quebec, Canada', 'Montreal', 'Quebec', 560074, 'pokjhgfcxc', '4321 2345 6788 7654', '12/90', 3, 77000, 1234);
|
||||
(1, 1, 'Batuhan Basoglu', 'batuhanbasoglu@mailbox.org', 'Montreal, Quebec, Canada', 'Montreal', 'Quebec', 560074, 'pokjhgfcxc', '4321 2345 6788 7654', '12/90', 3, 667, 1234);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
|
@ -238,7 +238,7 @@ CREATE TABLE `products` (
|
|||
`product_cat` int(100) NOT NULL,
|
||||
`product_brand` int(100) NOT NULL,
|
||||
`product_title` varchar(255) NOT NULL,
|
||||
`product_price` int(100) NOT NULL,
|
||||
`product_price` float NOT NULL,
|
||||
`product_desc` text NOT NULL,
|
||||
`product_image` text NOT NULL,
|
||||
`product_keywords` text NOT NULL
|
||||
|
|
|
@ -125,10 +125,10 @@ if(isset($_POST["gethomeProduct"])){
|
|||
<a href='product.php?p=$pro_id'><div class='product'>
|
||||
<div class='product-img'>
|
||||
<img src='product_images/$pro_image' style='max-height: 170px;' alt=''>
|
||||
<div class='product-label'>
|
||||
<!--<div class='product-label'>
|
||||
<span class='sale'>-30%</span>
|
||||
<span class='new'>NEW</span>
|
||||
</div>
|
||||
</div>-->
|
||||
</div></a>
|
||||
<div class='product-body'>
|
||||
<p class='product-category'>$cat_name</p>
|
||||
|
@ -158,8 +158,8 @@ if(isset($_POST["gethomeProduct"])){
|
|||
echo "</div>
|
||||
<div class='product-btns'>
|
||||
<button pid='$pro_id' id='wishlist' class='add-to-wishlist'><i class='fa fa-heart-o'></i><span class='tooltipp'>add to wishlist</span></button>
|
||||
<button class='add-to-compare'><i class='fa fa-exchange'></i><span class='tooltipp'>add to compare</span></button>
|
||||
<button class='quick-view'><i class='fa fa-eye'></i><span class='tooltipp'>quick view</span></button>
|
||||
<!--<button class='add-to-compare'><i class='fa fa-exchange'></i><span class='tooltipp'>add to compare</span></button>-->
|
||||
<!--<button class='quick-view'><i class='fa fa-eye'></i><span class='tooltipp'>quick view</span></button>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class='add-to-cart'>
|
||||
|
|
10
product.php
10
product.php
|
@ -168,7 +168,7 @@ include "header.php";
|
|||
|
||||
<ul class="product-btns">
|
||||
<li><a href="#" pid="'.$row['product_id'].'" id="wishlist" ><i class="fa fa-heart-o"></i> add to wishlist</a></li>
|
||||
<li><a href="#"><i class="fa fa-exchange"></i> add to compare</a></li>
|
||||
<!--<li><a href="#"><i class="fa fa-exchange"></i> add to compare</a></li>-->
|
||||
</ul>
|
||||
|
||||
<ul class="product-links">
|
||||
|
@ -322,10 +322,10 @@ include "header.php";
|
|||
<a href='product.php?p=$pro_id'><div class='product'>
|
||||
<div class='product-img'>
|
||||
<img src='product_images/$pro_image' style='max-height: 170px;' alt=''>
|
||||
<div class='product-label'>
|
||||
<!--<div class='product-label'>
|
||||
<span class='sale'>-30%</span>
|
||||
<span class='new'>NEW</span>
|
||||
</div>
|
||||
</div>-->
|
||||
</div></a>
|
||||
<div class='product-body'>
|
||||
<p class='product-category'>$cat_name</p>
|
||||
|
@ -355,8 +355,8 @@ include "header.php";
|
|||
echo "</div>
|
||||
<div class='product-btns'>
|
||||
<button pid='$pro_id' id='wishlist' class='add-to-wishlist'><i class='fa fa-heart-o'></i><span class='tooltipp'>add to wishlist</span></button>
|
||||
<button class='add-to-compare'><i class='fa fa-exchange'></i><span class='tooltipp'>add to compare</span></button>
|
||||
<button class='quick-view'><i class='fa fa-eye'></i><span class='tooltipp'>quick view</span></button>
|
||||
<!--<button class='add-to-compare'><i class='fa fa-exchange'></i><span class='tooltipp'>add to compare</span></button>-->
|
||||
<!--<button class='quick-view'><i class='fa fa-eye'></i><span class='tooltipp'>quick view</span></button>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class='add-to-cart'>
|
||||
|
|
|
@ -18,6 +18,7 @@ $cat_id = $_GET['cat_id'];
|
|||
<!-- /aside Widget -->
|
||||
|
||||
<!-- aside Widget -->
|
||||
<!--
|
||||
<div class="aside">
|
||||
<h3 class="aside-title">Price</h3>
|
||||
<div class="price-filter">
|
||||
|
@ -35,6 +36,7 @@ $cat_id = $_GET['cat_id'];
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<!-- /aside Widget -->
|
||||
|
||||
<!-- aside Widget -->
|
||||
|
@ -59,6 +61,7 @@ $cat_id = $_GET['cat_id'];
|
|||
<div id="store" class="col-md-9">
|
||||
<!-- store top filter -->
|
||||
<div class="store-filter clearfix">
|
||||
<!--
|
||||
<div class="store-sort">
|
||||
<label>
|
||||
Sort By:
|
||||
|
@ -75,7 +78,7 @@ $cat_id = $_GET['cat_id'];
|
|||
<option value="1">50</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
</div> -->
|
||||
<!--
|
||||
<ul class="store-grid">
|
||||
<li class="active"><i class="fa fa-th"></i></li>
|
||||
|
|
|
@ -58,6 +58,7 @@ include 'header.php';
|
|||
<div id="store" class="col-md-9">
|
||||
<!-- store top filter -->
|
||||
<div class="store-filter clearfix">
|
||||
<!--
|
||||
<div class="store-sort">
|
||||
<label>
|
||||
Sort By:
|
||||
|
@ -74,7 +75,7 @@ include 'header.php';
|
|||
<option value="1">50</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
</div> -->
|
||||
<!--
|
||||
<ul class="store-grid">
|
||||
<li class="active"><i class="fa fa-th"></i></li>
|
||||
|
|
Loading…
Reference in a new issue