-
Notifications
You must be signed in to change notification settings - Fork 6
/
api.php
42 lines (41 loc) · 1.22 KB
/
api.php
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
39
40
41
42
<?php
include './indexApi.php';
include './adminApi.php';
$cmd = $_POST['cmd'];
if ($cmd == 'getVotes') { // from indexApi.php
echo getVotes();
} else if ($cmd == 'sendVote') {
echo sendVote();
} else if ($cmd == 'getActiveRestaurants') {
echo getActiveRestaurants();
} else if ($cmd == 'getClosedRestaurants') {
echo getClosedRestaurants();
} else if ($cmd == 'refreshOrders') {
echo refreshOrders();
} else if ($cmd == 'getRejectedOrders') {
echo getRejectedOrders();
} else if ($cmd =='checkRejectedChanges') {
echo checkRejectedChanges();
} else if ($cmd == 'sendOrder') {
sendOrder();
} else if ($cmd == 'deleteOrder') {
deleteOrder();
} else if ($cmd == 'changeOrder') {
changeOrder();
} else if ($cmd == 'rejectOrder') {
rejectOrder();
} else if ($cmd == 'acceptOrder') {
acceptOrder();
} else if ($cmd == 'getTable') { // from adminApi.php
echo getTable();
} else if ($cmd == 'deleteRestaurant') {
deleteRestaurant();
} else if ($cmd == 'addPhone') {
addPhone();
} else if ($cmd == 'getTakenOrders') {
echo getTakenOrders();
} else if ($cmd == 'takeOrders') {
takeOrders();
} else if ($cmd == 'closeOrders') {
closeOrders();
};