From 261e4c5e559166dc19bea231095084ca1e2d2c56 Mon Sep 17 00:00:00 2001 From: saadahmedhafeez Date: Tue, 4 Sep 2018 12:34:54 +0500 Subject: [PATCH 1/6] new line --- admin/login.php | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/login.php b/admin/login.php index 361575f..b307c3f 100644 --- a/admin/login.php +++ b/admin/login.php @@ -20,4 +20,5 @@ + \ No newline at end of file From 83cb4ecf0bda493265031142483bca7dc63c59d6 Mon Sep 17 00:00:00 2001 From: saadahmedhafeez Date: Thu, 27 Sep 2018 15:12:41 +0500 Subject: [PATCH 2/6] new admin can be added by current loggedin admin --- .idea/workspace.xml | 185 ++++++++++++++++++++++++++++-------------- admin/add_admin.php | 54 ++++++++++++ admin/index.php | 8 ++ admin/login.php | 3 +- check_email.php | 15 ++-- customer_register.php | 2 +- 6 files changed, 196 insertions(+), 71 deletions(-) create mode 100644 admin/add_admin.php diff --git a/.idea/workspace.xml b/.idea/workspace.xml index cddd6c9..ae91f55 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,26 +2,12 @@ - - - - - - - - - - - - - - - - + + - - + + - - - - - - + - - + + - + + + + + + + + + + - - + + @@ -124,6 +121,8 @@ @@ -202,7 +201,13 @@ - + + + + + + + 1536046494566 @@ -215,13 +220,13 @@ - - + @@ -234,7 +239,7 @@ - + @@ -285,16 +290,61 @@ - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -302,34 +352,47 @@ - + - + + + + + + + - - - - - - + + - - + + + + + + - - + + - + + + + + + + + - - + + diff --git a/admin/add_admin.php b/admin/add_admin.php new file mode 100644 index 0000000..e72d978 --- /dev/null +++ b/admin/add_admin.php @@ -0,0 +1,54 @@ + +
+
+
+
+

Add Admin

+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+
+ +
+
+
+
+
+ \ No newline at end of file diff --git a/admin/index.php b/admin/index.php index b8ffd2e..dfff17d 100644 --- a/admin/index.php +++ b/admin/index.php @@ -71,6 +71,11 @@ Admin logout +
  • + + Add Admin + +
  • @@ -126,6 +131,9 @@ else if(isset($_GET['del_customer'])){ include ('del_customer.php'); } + else if(isset($_GET['add_admin'])){ + include ('add_admin.php'); + } ?> diff --git a/admin/login.php b/admin/login.php index d459c27..b4d6a7a 100644 --- a/admin/login.php +++ b/admin/login.php @@ -7,8 +7,7 @@ $pass = $_POST['user_pass']; $sel_user = "select * from admins where user_email='$email' AND user_pass='$pass'"; $run_user = mysqli_query($con, $sel_user); - $check_user = mysqli_num_rows($run_user); - if($check_user==0){ + if(mysqli_num_rows($run_user)==0){ $error_msg = 'Password or Email is wrong, try again'; } else{ diff --git a/check_email.php b/check_email.php index 5421ed6..26e61c8 100644 --- a/check_email.php +++ b/check_email.php @@ -1,9 +1,10 @@ 0){ - echo "Email already registered"; +require "./includes/db_connetion.php"; + + $e = $_REQUEST["e"]; + $sel_email = "select * from customers where cust_email= '$e'"; + $run_email = mysqli_query($con,$sel_email); + $count = mysqli_num_rows($run_email); + if($count>0){ + echo "Email already registered"; } \ No newline at end of file diff --git a/customer_register.php b/customer_register.php index 275d0f4..f35e74d 100644 --- a/customer_register.php +++ b/customer_register.php @@ -100,7 +100,7 @@ Email: - + From 1feff2b598eb5ca862b17ba56e41114cf80069d4 Mon Sep 17 00:00:00 2001 From: saadahmedhafeez Date: Thu, 27 Sep 2018 15:20:06 +0500 Subject: [PATCH 3/6] new admin can be added by current loggedin admin --- .idea/workspace.xml | 53 +++++++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 31 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index ae91f55..697b961 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,14 +1,7 @@ - - - - - - - - + - - @@ -281,7 +271,8 @@ - @@ -384,15 +375,15 @@ - - + + - - + + From 7a107451930532cb04e736e49e5f195ba5510054 Mon Sep 17 00:00:00 2001 From: saadahmedhafeez Date: Thu, 27 Sep 2018 15:32:32 +0500 Subject: [PATCH 4/6] new admin can be added by current loggedin admin --- admin/add_admin.php | 62 ++++++++++++++++++--------------------------- 1 file changed, 25 insertions(+), 37 deletions(-) diff --git a/admin/add_admin.php b/admin/add_admin.php index e72d978..2059bba 100644 --- a/admin/add_admin.php +++ b/admin/add_admin.php @@ -1,45 +1,33 @@ - -
    -
    -
    -
    -

    Add Admin

    -
    -
    - -
    - -
    +
    +
    + +
    +

    Add Admin

    +
    +
    + +
    +
    -
    - -
    - -
    +
    +
    + +
    +
    +
    -
    -
    - -
    +
    +
    +
    - -
    +
    +
    +
    Date: Thu, 27 Sep 2018 15:46:26 +0500 Subject: [PATCH 5/6] new admin can be added by current loggedin admin --- .idea/workspace.xml | 67 +++++++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 27 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 697b961..855250c 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,7 +1,9 @@ - + + + - + - + @@ -89,17 +92,16 @@ - - - - - +