Updated the website.

This commit is contained in:
Batuhan Berk Başoğlu 2024-07-09 17:02:44 -04:00
parent 8658a51b81
commit 4e14554c33
11 changed files with 40 additions and 40 deletions

2
README.md vendored
View file

@ -2,7 +2,7 @@
A cool shopping site made using PHP, CSS, JavaScript and SQL. 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 # Installation

View file

@ -126,10 +126,10 @@ if(isset($_POST["getProduct"])){
<a href='product.php?p=$pro_id'><div class='product'> <a href='product.php?p=$pro_id'><div class='product'>
<div class='product-img'> <div class='product-img'>
<img src='product_images/$pro_image' style='max-height: 170px;' alt=''> <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='sale'>-30%</span>
<span class='new'>NEW</span> <span class='new'>NEW</span>
</div> </div>-->
</div></a> </div></a>
<div class='product-body'> <div class='product-body'>
<p class='product-category'>$cat_name</p> <p class='product-category'>$cat_name</p>
@ -158,8 +158,8 @@ if(isset($_POST["getProduct"])){
echo "</div> echo "</div>
<div class='product-btns'> <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 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='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='quick-view'><i class='fa fa-eye'></i><span class='tooltipp'>quick view</span></button>-->
</div> </div>
</div> </div>
<div class='add-to-cart'> <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'> <a href='product.php?p=$pro_id'><div class='product'>
<div class='product-img'> <div class='product-img'>
<img src='product_images/$pro_image' style='max-height: 170px;' alt=''> <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='sale'>-30%</span>
<span class='new'>NEW</span> <span class='new'>NEW</span>
</div> </div>-->
</div></a> </div></a>
<div class='product-body'> <div class='product-body'>
<p class='product-category'>$cat_name</p> <p class='product-category'>$cat_name</p>
@ -239,8 +239,8 @@ if(isset($_POST["get_seleted_Category"]) || isset($_POST["selectBrand"]) || isse
echo "</div> echo "</div>
<div class='product-btns'> <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 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='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='quick-view' ><i class='fa fa-eye'></i><span class='tooltipp'>quick view</span></button>-->
</div> </div>
</div> </div>
<div class='add-to-cart'> <div class='add-to-cart'>

View file

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View file

@ -72,7 +72,7 @@ include "topheader.php";
$substr = substr($product_name,0,36); $substr = substr($product_name,0,36);
// $price = round($price*0.014,2); // $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> 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> "; <td> ";
if ($_SESSION['role'] != 'e') { if ($_SESSION['role'] != 'e') {

View file

@ -35,7 +35,7 @@ include "topheader.php";
<div class="col-md-14"> <div class="col-md-14">
<div class="card "> <div class="card ">
<div class="card-header card-header-primary"> <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>
<div class="card-body"> <div class="card-body">
<div class="table-responsive ps"> <div class="table-responsive ps">

View file

@ -134,7 +134,7 @@
include 'db.php'; 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); $run_query = mysqli_query($con,$product_query);
if(mysqli_num_rows($run_query) > 0){ if(mysqli_num_rows($run_query) > 0){
@ -156,8 +156,6 @@
<a href='product.php?p=$pro_id'><div class='product-img'> <a href='product.php?p=$pro_id'><div class='product-img'>
<img src='product_images/$pro_image' style='max-height: 170px;' alt=''> <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></a>
<div class='product-body'> <div class='product-body'>
@ -188,8 +186,8 @@
echo "</div> echo "</div>
<div class='product-btns'> <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 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='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='quick-view'><i class='fa fa-eye'></i><span class='tooltipp'>quick view</span></button>-->
</div> </div>
</div> </div>
<div class='add-to-cart'> <div class='add-to-cart'>
@ -228,10 +226,9 @@
<!-- /SECTION --> <!-- /SECTION -->
<!-- HOT DEAL SECTION --> <!-- HOT DEAL SECTION -->
<!--
<div id="hot-deal" class="section mainn mainn-raised"> <div id="hot-deal" class="section mainn mainn-raised">
<!-- container -->
<div class="container"> <div class="container">
<!-- row -->
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="hot-deal"> <div class="hot-deal">
@ -267,10 +264,9 @@
</div> </div>
</div> </div>
</div> </div>
<!-- /row -->
</div> </div>
<!-- /container -->
</div> </div>
-->
<!-- /HOT DEAL SECTION --> <!-- /HOT DEAL SECTION -->
@ -301,7 +297,7 @@
include 'db.php'; 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); $run_query = mysqli_query($con,$product_query);
if(mysqli_num_rows($run_query) > 0){ if(mysqli_num_rows($run_query) > 0){
@ -322,10 +318,10 @@
<div class='product'> <div class='product'>
<a href='product.php?p=$pro_id'><div class='product-img'> <a href='product.php?p=$pro_id'><div class='product-img'>
<img src='product_images/$pro_image' style='max-height: 170px;' alt=''> <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='sale'>-30%</span>
<span class='new'>NEW</span> <span class='new'>NEW</span>
</div> </div>-->
</div></a> </div></a>
<div class='product-body'> <div class='product-body'>
<p class='product-category'>$cat_name</p> <p class='product-category'>$cat_name</p>
@ -355,8 +351,8 @@
echo "</div> echo "</div>
<div class='product-btns'> <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 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='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='quick-view'><i class='fa fa-eye'></i><span class='tooltipp'>quick view</span></button>-->
</div> </div>
</div> </div>
<div class='add-to-cart'> <div class='add-to-cart'>

View file

@ -3,7 +3,7 @@
-- https://www.phpmyadmin.net/ -- https://www.phpmyadmin.net/
-- --
-- Host: localhost -- 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 -- Server version: 10.4.32-MariaDB
-- PHP Version: 8.1.25 -- PHP Version: 8.1.25
@ -68,7 +68,7 @@ INSERT INTO `brands` (`brand_id`, `brand_title`) VALUES
(1, 'HP'), (1, 'HP'),
(2, 'Samsung'), (2, 'Samsung'),
(3, 'Apple'), (3, 'Apple'),
(4, 'motorolla'), (4, 'Motorolla'),
(5, 'LG'), (5, 'LG'),
(6, 'Cloth Brand'); (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 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_cat` int(100) NOT NULL,
`product_brand` int(100) NOT NULL, `product_brand` int(100) NOT NULL,
`product_title` varchar(255) 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_desc` text NOT NULL,
`product_image` text NOT NULL, `product_image` text NOT NULL,
`product_keywords` text NOT NULL `product_keywords` text NOT NULL

View file

@ -125,10 +125,10 @@ if(isset($_POST["gethomeProduct"])){
<a href='product.php?p=$pro_id'><div class='product'> <a href='product.php?p=$pro_id'><div class='product'>
<div class='product-img'> <div class='product-img'>
<img src='product_images/$pro_image' style='max-height: 170px;' alt=''> <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='sale'>-30%</span>
<span class='new'>NEW</span> <span class='new'>NEW</span>
</div> </div>-->
</div></a> </div></a>
<div class='product-body'> <div class='product-body'>
<p class='product-category'>$cat_name</p> <p class='product-category'>$cat_name</p>
@ -158,8 +158,8 @@ if(isset($_POST["gethomeProduct"])){
echo "</div> echo "</div>
<div class='product-btns'> <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 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='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='quick-view'><i class='fa fa-eye'></i><span class='tooltipp'>quick view</span></button>-->
</div> </div>
</div> </div>
<div class='add-to-cart'> <div class='add-to-cart'>

View file

@ -168,7 +168,7 @@ include "header.php";
<ul class="product-btns"> <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="#" 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>
<ul class="product-links"> <ul class="product-links">
@ -322,10 +322,10 @@ include "header.php";
<a href='product.php?p=$pro_id'><div class='product'> <a href='product.php?p=$pro_id'><div class='product'>
<div class='product-img'> <div class='product-img'>
<img src='product_images/$pro_image' style='max-height: 170px;' alt=''> <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='sale'>-30%</span>
<span class='new'>NEW</span> <span class='new'>NEW</span>
</div> </div>-->
</div></a> </div></a>
<div class='product-body'> <div class='product-body'>
<p class='product-category'>$cat_name</p> <p class='product-category'>$cat_name</p>
@ -355,8 +355,8 @@ include "header.php";
echo "</div> echo "</div>
<div class='product-btns'> <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 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='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='quick-view'><i class='fa fa-eye'></i><span class='tooltipp'>quick view</span></button>-->
</div> </div>
</div> </div>
<div class='add-to-cart'> <div class='add-to-cart'>

View file

@ -18,6 +18,7 @@ $cat_id = $_GET['cat_id'];
<!-- /aside Widget --> <!-- /aside Widget -->
<!-- aside Widget --> <!-- aside Widget -->
<!--
<div class="aside"> <div class="aside">
<h3 class="aside-title">Price</h3> <h3 class="aside-title">Price</h3>
<div class="price-filter"> <div class="price-filter">
@ -35,6 +36,7 @@ $cat_id = $_GET['cat_id'];
</div> </div>
</div> </div>
</div> </div>
-->
<!-- /aside Widget --> <!-- /aside Widget -->
<!-- aside Widget --> <!-- aside Widget -->
@ -59,6 +61,7 @@ $cat_id = $_GET['cat_id'];
<div id="store" class="col-md-9"> <div id="store" class="col-md-9">
<!-- store top filter --> <!-- store top filter -->
<div class="store-filter clearfix"> <div class="store-filter clearfix">
<!--
<div class="store-sort"> <div class="store-sort">
<label> <label>
Sort By: Sort By:
@ -75,7 +78,7 @@ $cat_id = $_GET['cat_id'];
<option value="1">50</option> <option value="1">50</option>
</select> </select>
</label> </label>
</div> </div> -->
<!-- <!--
<ul class="store-grid"> <ul class="store-grid">
<li class="active"><i class="fa fa-th"></i></li> <li class="active"><i class="fa fa-th"></i></li>

View file

@ -58,6 +58,7 @@ include 'header.php';
<div id="store" class="col-md-9"> <div id="store" class="col-md-9">
<!-- store top filter --> <!-- store top filter -->
<div class="store-filter clearfix"> <div class="store-filter clearfix">
<!--
<div class="store-sort"> <div class="store-sort">
<label> <label>
Sort By: Sort By:
@ -74,7 +75,7 @@ include 'header.php';
<option value="1">50</option> <option value="1">50</option>
</select> </select>
</label> </label>
</div> </div> -->
<!-- <!--
<ul class="store-grid"> <ul class="store-grid">
<li class="active"><i class="fa fa-th"></i></li> <li class="active"><i class="fa fa-th"></i></li>