forked from goautodial/v4.0
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jsloader.php
173 lines (157 loc) · 4.4 KB
/
jsloader.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<?php
########################################################################################################
#### Name: gadv4_jsloader.php ####
#### Version: 0.9 ####
#### Copyright: GOAutoDial Inc. (c) 2011-2016 - GoAutoDial Open Source Community ####
#### Written by: Demian Lizandro A. Biscocho ####
#### License: AGPLv3 ####
########################################################################################################
require_once('./php/CRMDefaults.php');
require_once('./php/UIHandler.php');
require_once('./php/DbHandler.php');
require_once('./php/LanguageHandler.php');
require('./php/Session.php');
## initialize structures
$ui = \creamy\UIHandler::getInstance();
$lh = \creamy\LanguageHandler::getInstance();
$user = \creamy\CreamyUser::currentUser();
?>
<script type="text/javascript">
<?php
$calls_ringing = $ui->API_goGetRingingCalls();
$answered_calls = $ui->API_goGetTotalAnsweredCalls();
$total_calls_today = $ui->API_goGetTotalCalls();
$dropped_calls_today = $ui->API_goGetTotalDroppedCalls();
$calls_per_hour = $ui->API_goGetCallsPerHour();
$total_agents_call = $ui->API_goGetTotalAgentsCall();
$realtimeAgents = $ui->API_getRealtimeAgent();
//var_dump($total_agents_call);
//die(dd);
?>
function load_realtimemonitoring(){
$.ajax({
url: "<?php echo $realtimeAgents; ?>",
cache: false,
success: function(data){
$("#agent_monitoring_table").html(data);
}
});
}
function load_totalagentscall(){
$.ajax({
url: "<?php echo $total_agents_call; ?>",
cache: false,
success: function(data){
$("#refresh_totalagentscall").html(data);
}
});
}
function load_totalagentspaused(){
$.ajax({
url: "./php/APIs/API_GetTotalAgentsPaused.php",
cache: false,
success: function(data){
$("#refresh_totalagentspaused").html(data);
}
});
}
function load_totalagentswaitingcall(){
$.ajax({
url: "./php/APIs/API_getTotalAgentsWaitCalls.php",
cache: false,
success: function(data){
$("#refresh_totalagentswaitcalls").html(data);
}
});
}
/*
* Sales status box
*/
function load_totalSales(){
$.ajax({
url: "./php/APIs/API_GetTotalSales.php",
cache: false,
success: function(data){
$("#refresh_GetTotalSales").html(data);
}
});
}
function load_INSalesHour(){
$.ajax({
url: "./php/APIs/API_GetINSalesHour.php",
cache: false,
success: function(data){
$("#refresh_GetINSalesHour").html(data);
}
});
}
function load_OUTSalesPerHour(){
$.ajax({
url: "./php/APIs/API_GetOUTSalesPerHour.php",
cache: false,
success: function(data){
$("#refresh_GetOUTSalesPerHour").html(data);
}
});
}
/*
* Leads status box
*/
function load_TotalActiveLeads(){
$.ajax({
url: "./php/APIs/API_GetTotalActiveLeads.php",
cache: false,
success: function(data){
$("#refresh_GetTotalActiveLeads").html(data);
}
});
}
function load_LeadsinHopper(){
$.ajax({
url: "./php/APIs/API_GetLeadsinHopper.php",
cache: false,
success: function(data){
$("#refresh_GetLeadsinHopper").html(data);
}
});
}
function load_TotalDialableLeads(){
$.ajax({
url: "./php/APIs/API_GetTotalDialableLeads.php",
cache: false,
success: function(data){
$("#refresh_GetTotalDialableLeads").html(data);
}
});
}
/*
* Calls status box
*/
function load_Totalcalls(){
$.ajax({
url: "./php/APIs/API_getTotalcalls.php",
cache: false,
success: function(data){
$("#refresh_Totalcalls").html(data);
}
});
}
function load_RingingCall(){
$.ajax({
url: "./php/APIs/API_GetRingingCall.php",
cache: false,
success: function(data){
$("#refresh_RingingCall").html(data);
}
});
}
function load_LiveOutbound(){
$.ajax({
url: "./php/APIs/API_GetLiveOutbound.php",
cache: false,
success: function(data){
$("#refresh_LiveOutbound").html(data);
}
});
}
</script>