diff --git a/.idea/ecommerce-1.iml b/.idea/ecommerce-1.iml new file mode 100644 index 0000000..c956989 --- /dev/null +++ b/.idea/ecommerce-1.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..28a804d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..1e991ce --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/admin/admin_logout.php b/admin/admin_logout.php new file mode 100644 index 0000000..8ece399 --- /dev/null +++ b/admin/admin_logout.php @@ -0,0 +1,19 @@ + + + + + + +
+

for logout the admin panal

+ +
+ + + diff --git a/admin/view_products.php b/admin/view_products.php index 2e57b8c..7323dcc 100644 --- a/admin/view_products.php +++ b/admin/view_products.php @@ -3,6 +3,10 @@ header('location: login.php?not_admin=You are not Admin!'); } ?> + + + +

Products

@@ -37,7 +41,7 @@ - + /- Edit diff --git a/all_products.php b/all_products.php index 17e016e..8e00b8f 100644 --- a/all_products.php +++ b/all_products.php @@ -8,6 +8,7 @@ My Online Shop +
@@ -42,7 +43,7 @@
-
+
+
Email: - + Password: - + Forgot Password? diff --git a/customer_register.php b/customer_register.php index 499950b..022a90f 100644 --- a/customer_register.php +++ b/customer_register.php @@ -41,6 +41,7 @@ My Online Shop +
@@ -88,31 +89,31 @@
-
+ - + - + - + - + - + - + - + - + - + - +

create an Account

create an Account

Name:
Email:
Password:
Image:
Country: Country: - @@ -123,18 +124,18 @@
City:
Contact:
Address:
diff --git a/functions/functions.php b/functions/functions.php index ca58bd1..94c20ab 100644 --- a/functions/functions.php +++ b/functions/functions.php @@ -25,7 +25,7 @@ function getBrands(){ } } -function getPro($flag = ''){ +function getPro($flag = '',$search_pro=''){ global $con; $get_pro = ""; if(!isset($_GET['cat']) && !isset($_GET['brand']) && !isset($_GET['search'])) { @@ -39,9 +39,14 @@ function getPro($flag = ''){ } else if(isset($_GET['brand'])){ $pro_brand_id = $_GET['brand']; $get_pro = "select * from products where pro_brand = '$pro_brand_id'"; - } else if(isset($_GET['search'])){ - $search_query = $_GET['user_query']; - $get_pro = "select * from products where pro_keywords like '%$search_query%'"; + } else if(isset($_GET['search']) || $search_pro != ''){ + $search_query = ''; + if($search_pro == '') + $search_query = $_GET['user_query']; + else { + $search_query = $search_pro; + $get_pro = "select * from products where pro_keywords like '%$search_query%'"; + } } $run_pro = mysqli_query($con,$get_pro); $count_pro = mysqli_num_rows($run_pro); @@ -57,8 +62,8 @@ function getPro($flag = ''){ $pro_image = $row_pro['pro_image']; echo "
-

$pro_title

- +

$pro_title

+

Rs $pro_price/-

Details diff --git a/index.php b/index.php index 40a0cbb..e3d06e7 100644 --- a/index.php +++ b/index.php @@ -6,32 +6,59 @@ + My Online Shop + + -
+
- - + + +
-