-
Notifications
You must be signed in to change notification settings - Fork 0
/
android.php
38 lines (36 loc) · 949 Bytes
/
android.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
<?php
require_once 'functions.php';
require_once 'android_client_functions.php';
$function = new Functions();
$client = new AndroidClient();
$function->Connect();
$method = mysql_real_escape_string($_POST['method']);
$userID = mysql_real_escape_string($_POST['userID']);
$activityID = mysql_real_escape_string($_POST['activityID']);
$share = mysql_real_escape_string($_POST['share']);
$json = $_POST['json'];
switch ($method)
{
case "register":
$client->Register($json);
break;
case "add_actividad":
$client->AddActividad($userID, $json);
break;
case "load_actividad":
$client->LoadActividad($userID);
break;
case "update_actividad":
$client->UpdateActividad($userID, $activityID, $json);
break;
case "delete_actividad":
$client->DeleteActividad($userID, $activityID);
break;
case "share_actividad":
$client->ShareActividad($userID, $activityID, $share);
break;
default:
echo 'error';
}
$function->Disconnect();
?>