-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblockRestuarantProcess.php
More file actions
38 lines (23 loc) · 911 Bytes
/
blockRestuarantProcess.php
File metadata and controls
38 lines (23 loc) · 911 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
include "connection.php";
if(isset($_GET["shop_email"])){
$shop_email = $_GET["shop_email"];
$shop_rs = Database::search("SELECT * FROM `shop` WHERE `shop_email` = '".$shop_email."'");
$shop_num = $shop_rs->num_rows;
if($shop_num == 1){
$shop_data = $shop_rs->fetch_assoc();
$status = $shop_data["status_status_id"];
if($status == 1){
Database::iud("UPDATE `shop` SET `status_status_id` = '2' WHERE `shop_email` = '".$shop_email."' ");
echo("Restuarant has been blocked");
}else if($status == 2){
Database::iud("UPDATE `shop` SET `status_status_id` = '1' WHERE `shop_email` = '".$shop_email."' ");
echo("Restuarant has been Unblocked");
}
}else{
echo("Cannot find the Restuarant. Please try again later");
}
}else{
echo("Something went wrong. Try again later");
}
?>