-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGetContactFieldList.php
58 lines (43 loc) · 1.2 KB
/
GetContactFieldList.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
<?php
header('Access-Control-Allow-Origin: *');
header("Cache-Control: no-cache, must-revalidate");
require_once('share.php');
$callback = $_GET['callback'];
$email = $_GET["email"];
$pwd = $_GET["pwd"];
$account = $_GET["account"];
$mode = $_GET["mode"];
$to_select_list = $_GET["to_select_list"];
$PartnerGuid = $_GET["PartnerGuid"];
$PartnerPassword = $_GET["PartnerPassword"];
//echo "aaa<br>";
//echo "mode = $mode<br>";
//var_dump($to_select_list);
if ($account) {
$SelectedAccountID = $account;
} else {
$SelectedAccountID = 228;
}
if ($mode) {
} else {
$mode = '';
}
if ($mode == 'save') {
//echo "$email, $account, $to_select_list"
saveXmediaContact($email, $account, $to_select_list);
echo $callback, '(',
json_encode( array(
'success' => true
)), ')';
} else {
$USERTICKET = getTicket($SelectedAccountID, $email, $pwd, $PartnerGuid, $PartnerPassword);
//echo "USERTICKET = $USERTICKET<br>";
$ContactFieldList = GetContactFieldList($USERTICKET);
$ContactFieldNames = getContactFieldNames($email,$account);
//echo json_encode($rows);
echo $callback, '(',
json_encode( array(
'ContactFieldList' => $ContactFieldList,
'ContactFieldNames' => $ContactFieldNames
)), ')';
}