-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.php
91 lines (64 loc) · 1.17 KB
/
server.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
header('Access-Control-Allow-Origin: *');
include ('db_connect.php');
include ('functions.php');
$req = $_REQUEST['REQUEST'];
switch($req)
{
case 'SIGNUP':
echo SIGNUP($conn);
break;
case 'LOGIN':
echo LOGIN($conn);
break;
case 'RESET_PASSWORD':
echo RESET_PASSWORD($conn);
break;
case 'REGISTER_DEVICE':
echo REGISTER_DEVICE($conn);
break;
case 'ADD_CONTACTS':
echo ADD_CONTACTS($conn);
break;
case 'ADD_SOS_CONTACTS':
echo ADD_SOS_CONTACTS($conn);
break;
case 'GET_BLOGS':
echo GET_BLOGS($conn);
break;
case 'GET_BLOGS_BY_ID':
echo GET_BLOGS_BY_ID($conn);
break;
case 'GET_USER':
echo GET_USER($conn);
break;
case 'UPDATE_USER':
echo UPDATE_USER($conn);
break;
case 'DELETE_USER':
echo DELETE_USER($conn);
break;
case 'REPORT_INCIDENT':
echo GET_USER($conn);
break;
case 'ALERT_SOS_ACCOUNTS':
echo ALERT_SOS_ACCOUNTS($conn);
break;
case 'CONTACT_US':
echo CONTACT_US($conn);
break;
case 'ALERT_SOS_TRACKING':
echo ALERT_SOS_TRACKING($conn);
break;
case 'UPDATE_SOS_TRACKING':
echo UPDATE_SOS_TRACKING($conn);
break;
case 'GET_MARKERS':
echo GET_MARKERS($conn);
break;
case 'STOP_SOS_TRACKING':
echo STOP_SOS_TRACKING($conn);
break;
}
include ('db_close.php');
?>