-
Notifications
You must be signed in to change notification settings - Fork 3
/
update.php
40 lines (33 loc) · 1.27 KB
/
update.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
<?php
include 'database.php';
// error_reporting(E_ALL);
// ini_set('display_errors', '1');
//echo $allowed_campaigns;
//$_GET["selectCampaigns"];
//$_GET["selectUserGroups"];
// updates
// add in group temporarily
// $stmt = "update vicidial_live_agents set closer_campaigns = concat(SUBSTRING_INDEX(closer_campaigns, ' -', 1),' Inbound',' -') where user = 'mporte'"
// // add in group permanently
// $stmt = "update vicidial_users set closer_campaigns = concat(SUBSTRING_INDEX(closer_campaigns, ' -', 1),' Inbound',' -') where user = 'mporte'"
// mysqli_query($db, $stmt);
// // remove temporarily
// $stmt = "update vicidial_live_agents set closer_campaigns = replace (closer_campaigns,'Inbound ','') where user = 'mporte';"
// mysqli_query($db, $stmt);
// // remove permanently
// $stmt = "update vicidial_users set closer_campaigns = replace (closer_campaigns,'Inbound ','') where user = 'mporte';"
// mysqli_query($db, $stmt);
//new
echo '{';
echo '"A": ';
echo json_encode($arrayA);
echo ', "C":';
echo json_encode($arrayC);
echo ', "D":';
echo json_encode($arrayD);
echo ', "E":';
echo json_encode($arrayE);
//echo ', "trouble":';
//echo '"'.$LOGallowed_campaignsSQL.' '.$PHP_AUTH_USER.' '.$PHP_AUTH_PW.' '.$allowed_campaigns.' '.$allowed_reports.'"';
echo '}';
?>