Changes for PHP8 compatibility
git-svn-id: svn://192.168.202.10@3337 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -122,13 +122,13 @@ Another much more complex development option would be to add a new campaign dial
|
||||
|
||||
|
||||
How a "SHARED_RATIO" dial method would work:
|
||||
1. New code added to the AST_VDadapt.pl and AST_VDauto_dial.pl(and FILL) scripts that would for agents logged into shared-dialing campaigns, for dialing purposes only, rotate them among the campaigns that they are able to take calls from, while still allowing them to have calls from any of those campaigns sent to them any time they are available.
|
||||
2. Change the dialing algorithm, for campaigns with this dial method only, to use a count of calls placed by all shared campaigns on the system as a total, instead of only each campaign. This would prevent over-dialing as agents are rotated from dialing-campaign to dialing-campaign.
|
||||
1. New code added to the AST_VDadapt.pl and AST_VDauto_dial.pl(and FILL) scripts that would(for agents logged into shared-dialing campaigns, for dialing purposes only) rotate them among the campaigns that they are able to take calls from, while still allowing them to have calls from any of those campaigns sent to them any time they are available.
|
||||
2. Change the dialing algorithm(for campaigns with a "SHARED_" dial method only) to use a count of calls placed by all shared campaigns on the system as a total, instead of only each campaign. This would prevent over-dialing as agents are rotated from dialing-campaign to dialing-campaign.
|
||||
3. The agent-dialing-campaign-rotation process would attempt to balance agents by time(round-robin-like) across the campaigns that they are assigned to take calls from.
|
||||
4. New database fields/tables to store the temporary dialing campaign designations for each agent and what other campaigns they had just been assigned to
|
||||
5. New debug Admin Utilities report that would show everything that is going on for shared campaigns in the process of agent rotation and shared ratio dialing
|
||||
|
||||
Agent rotation steps: (see new database changes below for details on the DB storage of this data)
|
||||
Agent rotation steps, added to the AST_VDadapt.pl script: (see new database changes below for details on the DB storage of this data)
|
||||
- runs once every interval[2.5 sec, 15 sec, 1 minute] <- haven't decided this yet
|
||||
- for each agent, gather all campaigns they can dial for, and their current dial_campaign
|
||||
- delete from vicidial_agent_dial_campaigns any campaigns agent is no longer dialing for, update validate_time for others
|
||||
@@ -143,7 +143,9 @@ Shared campaigns outbound dialing steps:
|
||||
|
||||
|
||||
|
||||
DATABASE CHANGES:
|
||||
DATABASE CHANGES: !!!!!! FOR DOCUMENTATION PURPOSES ONLY !!!!!
|
||||
|
||||
ALTER TABLE system_settings ADD allow_shared_dial ENUM('0','1') default '0';
|
||||
|
||||
CREATE TABLE vicidial_agent_dial_campaigns (
|
||||
campaign_id VARCHAR(8),
|
||||
@@ -161,4 +163,3 @@ ALTER TABLE vicidial_live_agents ADD dial_campaign_id VARCHAR(8) default '';
|
||||
ALTER TABLE vicidial_campaigns ADD shared_dial_rank TINYINT(3) default '0';
|
||||
ALTER TABLE vicidial_campaigns MODIFY dial_method ENUM('MANUAL','RATIO','ADAPT_HARD_LIMIT','ADAPT_TAPERED','ADAPT_AVERAGE','INBOUND_MAN','SHARED_RATIO','SHARED_ADAPT_HARD_LIMIT','SHARED_ADAPT_TAPERED','SHARED_ADAPT_AVERAGE') default 'MANUAL';
|
||||
|
||||
ALTER TABLE system_settings ADD allow_shared_dial ENUM('0','1') default '0';
|
||||
|
||||
@@ -171,7 +171,8 @@ asort($chat_managers_array);
|
||||
|
||||
asort($chat_reload_id_number_array);
|
||||
$ChatReloadIDNumber="";
|
||||
while (list($key, $id_number) = each($chat_reload_id_number_array)) {
|
||||
#while (list($key, $id_number) = each($chat_reload_id_number_array)) {
|
||||
foreach($chat_reload_id_number_array as $key => $id_number) {
|
||||
$ChatReloadIDNumber.="$id_number.";
|
||||
}
|
||||
$ChatReloadIDNumber=substr($ChatReloadIDNumber,0,-1);
|
||||
@@ -738,7 +739,8 @@ echo "<div class='scrolling_chat_display' id='AllActiveChats'>\n";
|
||||
if (empty($chat_managers_array)) {
|
||||
echo "\t<li class='arial_bold'>"._QXZ("NO OPEN CHATS")."</li>\n";
|
||||
} else {
|
||||
while (list($manager_chat_id, $text) = each($chat_managers_array)) {
|
||||
# while (list($manager_chat_id, $text) = each($chat_managers_array)) {
|
||||
foreach($chat_managers_array as $manager_chat_id => $text) {
|
||||
$manager_chat_subid=$chat_subid_array[$manager_chat_id];
|
||||
if (!empty($unread_chats_array) && in_array($manager_chat_id, $unread_chats_array)) {$cclass="unreadchat";} else {$cclass="viewedchat";}
|
||||
echo "\t<li class='".$cclass."'><a onClick=\"document.getElementById('CurrentActiveChat').value='$manager_chat_id'; document.getElementById('CurrentActiveChatSubID').value='$manager_chat_subid'; document.getElementById('AgentManagerOverride').value='".$agents_managers_array[$manager_chat_id]."'; LoadAvailableAgentsForChat('AllLiveNonChatAgents', 'agent_to_add');\">Chat #".$manager_chat_id."</a></li>\n"; # $chat_managers_array[$manager_chat_id]
|
||||
|
||||
@@ -231,7 +231,8 @@ if ($action=="CreateAgentToAgentChat" && $agent_manager && $agent_user && $manag
|
||||
|
||||
# post message to each user, use $error_msg variable to ensure every insert command worked
|
||||
$error_msg="";
|
||||
while (list($key, $val) = each($participants_array)) {
|
||||
# while (list($key, $val) = each($participants_array)) {
|
||||
foreach($participants_array as $key => $val) {
|
||||
$participant=$val;
|
||||
$ins_chat_stmt="insert into vicidial_manager_chat_log(manager_chat_id, manager_chat_subid, manager, user, message, message_id, message_date, message_posted_by) VALUES('$manager_chat_id', '$subid', '$agent_manager', '$participant', '".mysqli_real_escape_string($link, $manager_message)."', '$message_id', '$message_date', '$agent_manager')";
|
||||
$ins_chat_rslt=mysql_to_mysqli($ins_chat_stmt, $link);
|
||||
@@ -451,7 +452,8 @@ if ($action=="RefreshActiveChatView" && $user) {
|
||||
#########
|
||||
asort($chat_reload_id_number_array);
|
||||
$new_ChatReloadIDNumber="";
|
||||
while (list($key, $id_number) = each($chat_reload_id_number_array)) {
|
||||
# while (list($key, $id_number) = each($chat_reload_id_number_array)) {
|
||||
foreach ($chat_reload_id_number_array as $key => $id_number) {
|
||||
$new_ChatReloadIDNumber.="$id_number.";
|
||||
}
|
||||
$new_ChatReloadIDNumber=substr($new_ChatReloadIDNumber,0,-1);
|
||||
@@ -491,7 +493,8 @@ if ($action=="RefreshActiveChatView" && $user) {
|
||||
if (empty($chat_managers_array)) {
|
||||
echo "\t<li class='arial_bold'>"._QXZ("NO OPEN CHATS")."</li>\n";
|
||||
} else {
|
||||
while (list($manager_chat_id, $text) = each($chat_managers_array)) {
|
||||
# while (list($manager_chat_id, $text) = each($chat_managers_array)) {
|
||||
foreach($chat_managers_array as $manager_chat_id => $text) {
|
||||
$manager_chat_subid=$chat_subid_array[$manager_chat_id];
|
||||
if (!empty($unread_chats_array) && in_array($manager_chat_id, $unread_chats_array)) {$cclass="unreadchat";} else {$cclass="viewedchat";}
|
||||
echo "\t<li class='".$cclass."'><a onClick=\"document.getElementById('CurrentActiveChat').value='$manager_chat_id'; document.getElementById('CurrentActiveChatSubID').value='$manager_chat_subid'; document.getElementById('AgentManagerOverride').value='".$agents_managers_array[$manager_chat_id]."'; LoadAvailableAgentsForChat('AllLiveNonChatAgents', 'agent_to_add');\">Chat #".$manager_chat_id."</a></li>\n"; # $chat_managers_array[$manager_chat_id]
|
||||
@@ -701,7 +704,8 @@ if ($action=="add_agent_to_existing_chat" && $agent_to_add && $manager_chat_id &
|
||||
|
||||
# post message to each user, use $error_msg variable to ensure every insert command worked
|
||||
$error_msg="";
|
||||
while (list($key, $val) = each($participants_array)) {
|
||||
# while (list($key, $val) = each($participants_array)) {
|
||||
foreach($participants_array as $key => $val) {
|
||||
$participant=$val;
|
||||
$ins_chat_stmt="insert into vicidial_manager_chat_log(manager_chat_id, manager_chat_subid, manager, user, message, message_id, message_date, message_posted_by) VALUES('$manager_chat_id', '$manager_chat_subid', '$manager', '$participant', 'Agent $invited has been added to the chat by $invitee', '$message_id', '$message_date', '$message_posted_by')";
|
||||
$ins_chat_rslt=mysql_to_mysqli($ins_chat_stmt, $link);
|
||||
@@ -747,7 +751,8 @@ if ($action=="SendMgrChatMessage" && $manager_chat_id && $manager_chat_subid) {
|
||||
if ($internal_chat_type=="AGENT") {
|
||||
# post message to each user, use $error_msg variable to ensure every insert command worked.
|
||||
$error_msg="";
|
||||
while (list($key, $val) = each($participants_array)) {
|
||||
# while (list($key, $val) = each($participants_array)) {
|
||||
foreach($participants_array as $key => $val) {
|
||||
$participant=$val;
|
||||
|
||||
$ins_chat_stmt="insert into vicidial_manager_chat_log(manager_chat_id, manager_chat_subid, manager, user, message, message_id, message_date, message_posted_by) VALUES('$manager_chat_id', '$manager_chat_subid', '$manager', '$participant', '".mysqli_real_escape_string($link, $chat_message)."', '$message_id', '$message_date', '$user')";
|
||||
@@ -1324,7 +1329,8 @@ if ($action=="show_live_chats" && $user) {
|
||||
|
||||
if ($active_chats) {
|
||||
echo "<font class='chat_title bold'>"._QXZ("Live Chats").":</font><BR><BR>";
|
||||
while (list($key, $val)=each($active_chats)) {
|
||||
# while (list($key, $val)=each($active_chats)) {
|
||||
foreach($active_chats as $key => $val) {
|
||||
# PREVENT CLICKING ON UNAVAILABLE CHAT ROOMS
|
||||
if ($val[0][3]!="NONE") {
|
||||
echo "<li class='submenu' onClick=\"JoinChat('$key', '$chat_creator');\"><font class='chat_message bold'>"._QXZ("Chat ID")." #$key</font>\n";
|
||||
@@ -1332,7 +1338,8 @@ if ($action=="show_live_chats" && $user) {
|
||||
echo "<li class='submenu' onClick=\"chat_alert_box('Chat room is not available - no agent has been assigned it.')\"><font class='chat_message bold'>"._QXZ("Chat ID")." #$key</font>\n";
|
||||
}
|
||||
echo "\t<ul id=\"chat_members_$key\">\n";
|
||||
while (list($subkey, $subval)=each($val)) {
|
||||
# while (list($subkey, $subval)=each($val)) {
|
||||
foreach($val as $subkey => $subval) {
|
||||
if ($subval[2]=="absent") {
|
||||
$font_color=" absent_agent";
|
||||
} else if (in_array($subval[0], $agents_in_chat)) {
|
||||
|
||||
@@ -688,7 +688,8 @@ else
|
||||
|
||||
ksort($prompts_array);
|
||||
$grand_total=0;
|
||||
while (list($key, $val)=each($prompts_array))
|
||||
# while (list($key, $val)=each($prompts_array))
|
||||
foreach($prompts_array as $key => $val)
|
||||
{
|
||||
$val+=0;
|
||||
$grand_total+=$val;
|
||||
@@ -703,13 +704,15 @@ else
|
||||
$CSV_text.="\""._QXZ("TOTAL POINTS")."\"\n";
|
||||
|
||||
ksort($calls_array);
|
||||
while (list($key, $val)=each($calls_array))
|
||||
# while (list($key, $val)=each($calls_array))
|
||||
foreach($calls_array as $key => $val)
|
||||
{
|
||||
$CSV_text.="\"".$calls_array[$key]["phone"]."\",\"".$calls_array[$key]["start_time"]."\",";
|
||||
$HTML_text.="<tr bgcolor='".$SSstd_row1_background."'><th>".$calls_array[$key]["phone"]."</th><th>".$calls_array[$key]["start_time"]."</th>";
|
||||
reset($prompts_array);
|
||||
$call_points=0;
|
||||
while (list($key2, $val2)=each($prompts_array))
|
||||
# while (list($key2, $val2)=each($prompts_array))
|
||||
foreach($prompts_array as $key2 => $val2)
|
||||
{
|
||||
$CSV_text.="\"".($calls_array[$key][$key2]+0)."\",";
|
||||
$HTML_text.="<th>".($calls_array[$key][$key2]+0)."</th>";
|
||||
@@ -790,7 +793,8 @@ else
|
||||
|
||||
ksort($prompts_array);
|
||||
$grand_total=0;
|
||||
while (list($key, $val)=each($prompts_array))
|
||||
# while (list($key, $val)=each($prompts_array))
|
||||
foreach($prompts_array as $key => $val)
|
||||
{
|
||||
$val+=0;
|
||||
$grand_total+=$val;
|
||||
@@ -814,12 +818,14 @@ else
|
||||
});
|
||||
|
||||
$total_calls=0;
|
||||
while (list($key, $val)=each($agent_array))
|
||||
# while (list($key, $val)=each($agent_array))
|
||||
foreach($agent_array as $key => $val)
|
||||
{
|
||||
$CSV_text.="\"".$agent_array[$key]["AGENT"]."\",";
|
||||
$HTML_text.="<tr bgcolor='".$SSstd_row1_background."'><th>".$agent_array[$key]["AGENT"]."</th>";
|
||||
reset($prompts_array);
|
||||
while (list($key2, $val2)=each($prompts_array))
|
||||
# while (list($key2, $val2)=each($prompts_array))
|
||||
foreach($prompts_array as $key2 => $val2)
|
||||
{
|
||||
$CSV_text.="\"".($agent_array[$key][$key2]+0)."\",";
|
||||
$HTML_text.="<th>".($agent_array[$key][$key2]+0)."</th>";
|
||||
|
||||
@@ -630,13 +630,15 @@ else
|
||||
|
||||
$CSV_text.="\"$current_date\"\n";
|
||||
$CSV_text.=$CSV_header;
|
||||
while (list($key, $val)=each($user_array)) {
|
||||
#while (list($key, $val)=each($user_array)) {
|
||||
foreach($user_array as $key => $val) {
|
||||
$agent_total=0;
|
||||
$agent_info=explode("|", $key);
|
||||
$ASCII_text.="| ".sprintf("%-20s", $agent_info[0]);
|
||||
$ASCII_text.=" | ".sprintf("%-30s", $agent_info[1]);
|
||||
$CSV_text.="\"$agent_info[0]\",\"$agent_info[1]\",";
|
||||
while (list($key2, $val2)=each($did_description_array)) {
|
||||
# while (list($key2, $val2)=each($did_description_array)) {
|
||||
foreach($did_description_array as $key2 => $val2) {
|
||||
$ASCII_text.=" | ".sprintf("%30s", ($user_array["$key"][$key2]+0));
|
||||
$CSV_text.="\"".($user_array["$key"][$key2]+0)."\",";
|
||||
$agent_total+=($user_array["$key"][$key2]+0);
|
||||
@@ -676,13 +678,15 @@ else
|
||||
$ASCII_text.=$ASCII_headerA.$ASCII_headerB.$ASCII_headerA;
|
||||
$CSV_text.="\"Week of $sunday_array[$q] thru $saturday_array[$q]\"\n";
|
||||
$CSV_text.=$CSV_header;
|
||||
while (list($key, $val)=each($user_array)) {
|
||||
#while (list($key, $val)=each($user_array)) {
|
||||
foreach($user_array as $key => $val) {
|
||||
$agent_total=0;
|
||||
$agent_info=explode("|", $key);
|
||||
$ASCII_text.="| ".sprintf("%-20s", $agent_info[0]);
|
||||
$ASCII_text.=" | ".sprintf("%-30s", $agent_info[1]);
|
||||
$CSV_text.="\"$agent_info[0]\",\"$agent_info[1]\",";
|
||||
while (list($key2, $val2)=each($did_description_array)) {
|
||||
#while (list($key2, $val2)=each($did_description_array)) {
|
||||
foreach($did_description_array as $key2 => $val2) {
|
||||
$ASCII_text.=" | ".sprintf("%30s", ($user_array["$key"][$key2]+0));
|
||||
$CSV_text.="\"".($user_array["$key"][$key2]+0)."\",";
|
||||
$agent_total+=($user_array["$key"][$key2]+0);
|
||||
|
||||
@@ -552,7 +552,8 @@ while($i < $group_ct)
|
||||
}
|
||||
|
||||
$d=0;
|
||||
while (list($key, $val)=each($dispo_ary))
|
||||
# while (list($key, $val)=each($dispo_ary))
|
||||
foreach($dispo_ary as $key => $val)
|
||||
{
|
||||
$ASCII_text.="| ".sprintf("%-40s", $key.$status_ary[$key]);
|
||||
$ASCII_text.=" | ".sprintf("%6s", $val[0]);
|
||||
|
||||
@@ -136,7 +136,8 @@ $sip_response_directory = array(
|
||||
$master_sip_response_directory=array();
|
||||
$master_sip_response_verbiage_directory=array();
|
||||
$i=0;
|
||||
while (list($key, $val)=each($sip_response_directory))
|
||||
# while (list($key, $val)=each($sip_response_directory))
|
||||
foreach ($sip_response_directory as $key => $val)
|
||||
{
|
||||
$master_sip_response_directory[$i]=$key;
|
||||
$master_sip_response_verbiage_directory[$i]=$val;
|
||||
|
||||
@@ -655,7 +655,8 @@ if ($SUBMIT)
|
||||
# SELECT lead_id, count(*) as count from vicidial_log where extract(HOUR_MINUTE FROM call_date)>='900' and extract(HOUR_MINUTE FROM call_date)<='1700' and dayofweek(call_date) in (2,3,4,5,6) and lead_id in (SELECT lead_id from vicidial_list where list_id=41073) group by lead_id order by lead_id;
|
||||
|
||||
$shift_ary2=$shift_ary;
|
||||
while (list($key, $val)=each($shift_ary2))
|
||||
# while (list($key, $val)=each($shift_ary2))
|
||||
foreach ($shift_ary2 as $key => $val)
|
||||
{
|
||||
$total_shift_count=0;
|
||||
$gmt_stmt="SELECT distinct gmt_offset_now from vicidial_list where list_id='$list_id';";
|
||||
@@ -818,7 +819,8 @@ if ($SUBMIT)
|
||||
$total_dialable_count_inactive+=$Xdialable_inactive_count;
|
||||
|
||||
$shift_ary2=$shift_ary;
|
||||
while (list($key, $val)=each($shift_ary2))
|
||||
# while (list($key, $val)=each($shift_ary2))
|
||||
foreach ($shift_ary2 as $key => $val)
|
||||
{
|
||||
$total_shift_count=0;
|
||||
$total_nofilter_shift_count=0;
|
||||
|
||||
@@ -212,7 +212,8 @@ $sip_response_directory = array(
|
||||
|
||||
$master_hangup_cause_array=array();
|
||||
$i=0;
|
||||
while (list($key, $val)=each($hangup_cause_dictionary)) {
|
||||
#while (list($key, $val)=each($hangup_cause_dictionary)) {
|
||||
foreach($hangup_cause_dictionary as $key => $val) {
|
||||
$master_hangup_cause_array[$i]=$key;
|
||||
$i++;
|
||||
}
|
||||
@@ -220,7 +221,8 @@ while (list($key, $val)=each($hangup_cause_dictionary)) {
|
||||
$master_sip_response_directory=array();
|
||||
$master_sip_response_verbiage_directory=array();
|
||||
$i=0;
|
||||
while (list($key, $val)=each($sip_response_directory)) {
|
||||
#while (list($key, $val)=each($sip_response_directory)) {
|
||||
foreach($sip_response_directory as $key => $val) {
|
||||
$master_sip_response_directory[$i]=$key;
|
||||
$master_sip_response_verbiage_directory[$i]=$val;
|
||||
$i++;
|
||||
|
||||
@@ -1001,7 +1001,8 @@ else
|
||||
$bht=0;
|
||||
$graph_stats=array();
|
||||
$q=0;
|
||||
while(list($key, $val)=each($erlang_array)) {
|
||||
# while(list($key, $val)=each($erlang_array)) {
|
||||
foreach($erlang_array as $key => $val) {
|
||||
if ($val[0]>$bht) {$bht=$val[0];}
|
||||
if ($q%2==0) {$tdclass="records_list_x";} else {$tdclass="records_list_y";}
|
||||
$average_time=round(MathZDC($val[0], $val[2]));
|
||||
@@ -1223,7 +1224,8 @@ else
|
||||
$datasets="\t\tdatasets: [\n";
|
||||
|
||||
$labels="\t\tlabels:[";
|
||||
while(list($key, $val)=each($graph_stats)) {
|
||||
# while(list($key, $val)=each($graph_stats)) {
|
||||
foreach($graph_stats as $key => $val) {
|
||||
$labels.="\"".preg_replace('/ +/', ' ', $key)."\",";
|
||||
}
|
||||
reset($graph_stats);
|
||||
@@ -1240,7 +1242,8 @@ else
|
||||
$graphConstantsB="\t\t\t\tborderColor: \"rgba(".$graph_colors[($d%count($graph_colors))].",1)\",\n";
|
||||
$graphConstantsC="\t\t\t\tfillColor: \"rgba(".$graph_colors[($d%count($graph_colors))].",0.1)\"\n";
|
||||
|
||||
while(list($key, $val)=each($graph_stats)) {
|
||||
# while(list($key, $val)=each($graph_stats)) {
|
||||
foreach($graph_stats as $key => $val) {
|
||||
$val[$dataset_index]=preg_replace("/N\/A/", "0", $val[$dataset_index]);
|
||||
$data.="\"".$val[$dataset_index]."\",";
|
||||
$current_graph_total+=intval($val[$dataset_index]);
|
||||
|
||||
@@ -713,7 +713,7 @@ else
|
||||
|
||||
#########
|
||||
|
||||
$stmt="select count(*) as calls,sum(talk_sec) as talk,full_name,vicidial_users.user,sum(pause_sec),sum(wait_sec),sum(dispo_sec),status,sum(dead_sec), vicidial_users.user_group from vicidial_users,".$vicidial_agent_log_table." where event_time <= '$query_date $time_END' and event_time >= '$rpt_date $time_BEGIN' and vicidial_users.user=".$vicidial_agent_log_table.".user and pause_sec<65000 and wait_sec<65000 and talk_sec<65000 and dispo_sec<65000 $group_SQL $user_group_SQL $user_SQL group by user,full_name,user_group,status order by full_name,user,status desc limit 500000;";
|
||||
$stmt="select count(*) as calls,sum(talk_sec) as talk,full_name,vicidial_users.user,sum(pause_sec),sum(wait_sec),sum(dispo_sec),status,sum(dead_sec), vicidial_users.user_group, sub_status from vicidial_users,".$vicidial_agent_log_table." where event_time <= '$query_date $time_END' and event_time >= '$rpt_date $time_BEGIN' and vicidial_users.user=".$vicidial_agent_log_table.".user and pause_sec<65000 and wait_sec<65000 and talk_sec<65000 and dispo_sec<65000 $group_SQL $user_group_SQL $user_SQL group by user,full_name,user_group,status, sub_status order by full_name,user,status, sub_status desc limit 500000;";
|
||||
if ($DB) {print "<!-- $stmt //-->\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$rows_to_print = mysqli_num_rows($rslt);
|
||||
@@ -727,12 +727,14 @@ else
|
||||
{
|
||||
$agent_performance_array[$row[3]][($array_offset+1)]+=$row[0]; # SALES FOR TIME RANGE
|
||||
}
|
||||
# if ($row[10]=="BREAK") {$row[4]=0;}
|
||||
$agent_performance_array[$row[3]][($array_offset+4)]+=($row[4]+$row[1]+$row[6]+$row[5]); # TIME - pause, talk, disp, wait
|
||||
$i++;
|
||||
}
|
||||
|
||||
$j=0;
|
||||
while (list($key, $val)=each($agent_performance_array)) { # CYCLE THROUGH EACH USER
|
||||
# while (list($key, $val)=each($agent_performance_array)) { # CYCLE THROUGH EACH USER
|
||||
foreach ($agent_performance_array as $key => $val) {
|
||||
for ($k=0; $k<2; $k++)
|
||||
{
|
||||
$agent_performance_array[$key][($array_offset+$k)]+=0; # Add zero so there are no null values;
|
||||
@@ -851,7 +853,8 @@ else
|
||||
$CSV_lines='';
|
||||
|
||||
# PRINT OUT RESULTS
|
||||
while (list($key, $val)=each($agent_performance_array)) {
|
||||
#while (list($key, $val)=each($agent_performance_array)) {
|
||||
foreach ($agent_performance_array as $key => $val) {
|
||||
$user=$key;
|
||||
$full_name=$val[0];
|
||||
$ASCII_text.="|";
|
||||
|
||||
@@ -487,7 +487,8 @@ while($i < $group_ct)
|
||||
|
||||
|
||||
|
||||
while(list($key, $val)=each($count_ary))
|
||||
# while(list($key, $val)=each($count_ary))
|
||||
foreach($count_ary as $key => $val)
|
||||
{
|
||||
arsort($count_ary[$key]);
|
||||
switch ($sort_by)
|
||||
@@ -516,7 +517,8 @@ while($i < $group_ct)
|
||||
$CSV_text.="\""._QXZ("VENDOR LEAD CODE")."\",\""._QXZ("DISPOSITION")."\",\""._QXZ("CALLS")."\",\""._QXZ("PERCENT")."\"\n";
|
||||
|
||||
$j=0;
|
||||
while(list($key2, $val2)=each($count_ary[$key]))
|
||||
# while(list($key2, $val2)=each($count_ary[$key]))
|
||||
foreach($count_ary[$key] as $key2 => $val2)
|
||||
{
|
||||
if ($j%2==0)
|
||||
{
|
||||
@@ -568,7 +570,8 @@ while($i < $group_ct)
|
||||
asort($status_totals);
|
||||
break;
|
||||
}
|
||||
while(list($key, $val)=each($status_totals))
|
||||
# while(list($key, $val)=each($status_totals))
|
||||
foreach($status_totals as $key => $val)
|
||||
{
|
||||
if ($j%2==0)
|
||||
{
|
||||
|
||||
@@ -943,7 +943,7 @@ $talking_to_print = mysqli_num_rows($rslt);
|
||||
while ($ii < $rec_channels)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslta);
|
||||
$pos=strpos($row[1], $Lsessionid);
|
||||
$pos=strpos($row[1], "$Lsessionid");
|
||||
|
||||
if ($pos===false)
|
||||
{
|
||||
|
||||
@@ -483,7 +483,8 @@ if ($SUBMIT && $query_date && $start_hour && $end_hour) {
|
||||
$CSV_text.="\""._QXZ("USER GROUP")."\",\""._QXZ("AGENTS")."\"";
|
||||
$CSV_total.="\""._QXZ("TOTALS")."\",\"$grand_total\"";
|
||||
|
||||
while (list($key, $val)=each($hour_array)) {
|
||||
# while (list($key, $val)=each($hour_array)) {
|
||||
foreach($hour_array as $key => $val) {
|
||||
$ASCII_title.=" ".date("ha", strtotime("$key:00"))." to ";
|
||||
$key1=$key+1;
|
||||
$ASCII_title.=date("ha", strtotime("$key1:00"))." |";
|
||||
@@ -512,14 +513,16 @@ if ($SUBMIT && $query_date && $start_hour && $end_hour) {
|
||||
|
||||
$CSV_text.="\n";
|
||||
|
||||
while (list($key, $val)=each($user_group_array)) {
|
||||
#while (list($key, $val)=each($user_group_array)) {
|
||||
foreach ($user_group_array as $key => $val) {
|
||||
$ASCII_text.="| ".sprintf("%20s", $key)." | ".sprintf("%6s", $total_array[$key])." |";
|
||||
$HTML_text.="<tr bgcolor='#".$SSstd_row2_background."'>";
|
||||
$HTML_text.="<td><font size='2'>".$key." </font></td>";
|
||||
$HTML_text.="<td><font size='2'>".$total_array[$key]." </font></td>";
|
||||
|
||||
$CSV_text.="\"$key\",\"".$total_array[$key]."\"";
|
||||
while (list($key2, $val2)=each($hour_array)) {
|
||||
# while (list($key2, $val2)=each($hour_array)) {
|
||||
foreach($hour_array as $key2 => $val2) {
|
||||
$ASCII_text.=" ".sprintf("%12s", ($hour_total_array[$key][$key2]+0))." |";
|
||||
$HTML_text.="<td><font size='2'>".($hour_total_array[$key][$key2]+0)."</font></td>";
|
||||
$CSV_text.=",\"".($hour_total_array[$key][$key2]+0)."\"";
|
||||
|
||||
@@ -998,7 +998,8 @@ else
|
||||
$bht=0;
|
||||
$graph_stats=array();
|
||||
$q=0;
|
||||
while(list($key, $val)=each($erlang_array)) {
|
||||
# while(list($key, $val)=each($erlang_array)) {
|
||||
foreach ($erlang_array as $key => $val) {
|
||||
if ($val[0]>$bht) {$bht=$val[0];}
|
||||
if ($q%2==0) {$tdclass="records_list_x";} else {$tdclass="records_list_y";}
|
||||
$average_time=round(MathZDC($val[0], $val[2]));
|
||||
@@ -1256,7 +1257,8 @@ else
|
||||
]};
|
||||
*/
|
||||
$labels="\t\tlabels:[";
|
||||
while(list($key, $val)=each($graph_stats)) {
|
||||
# while(list($key, $val)=each($graph_stats)) {
|
||||
foreach($graph_stats as $key => $val) {
|
||||
$labels.="\"".preg_replace('/ +/', ' ', $key)."\",";
|
||||
}
|
||||
reset($graph_stats);
|
||||
@@ -1275,7 +1277,8 @@ else
|
||||
#$graphConstantsC="\t\t\t\thoverBorderColor: [";
|
||||
|
||||
# $labels.="\"".preg_replace('/ +/', ' ', $graph_stats[$d][0])."\",";
|
||||
while(list($key, $val)=each($graph_stats)) {
|
||||
# while(list($key, $val)=each($graph_stats)) {
|
||||
foreach($graph_stats as $key => $val) {
|
||||
$val[$dataset_index]=preg_replace("/N\/A/", "0", $val[$dataset_index]);
|
||||
$data.="\"".$val[$dataset_index]."\",";
|
||||
$current_graph_total+=intval($val[$dataset_index]);
|
||||
@@ -1386,4 +1389,4 @@ else
|
||||
}
|
||||
# echo $ASCII_text;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -5421,12 +5421,13 @@ if ($SSscript_remove_js > 0)
|
||||
# 201118-1057 - Better compatibility with non-latin data input
|
||||
# 201123-2300 - Added daily_call_count_limit features
|
||||
# 201201-1944 - Added transfer_button_launch campaign feature
|
||||
# 201214-1545 - Fixes for PHP8 compatibility
|
||||
#
|
||||
|
||||
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time
|
||||
|
||||
$admin_version = '2.14-780a';
|
||||
$build = '201201-1944';
|
||||
$admin_version = '2.14-781a';
|
||||
$build = '201214-1545';
|
||||
|
||||
$STARTtime = date("U");
|
||||
$SQLdate = date("Y-m-d H:i:s");
|
||||
@@ -26226,7 +26227,8 @@ if ($ADD==31)
|
||||
$o=0;
|
||||
if ($lead_list['count'] > 0)
|
||||
{
|
||||
while (list($dispo,) = each($lead_list[$since_reset]))
|
||||
# while (list($dispo,) = each($lead_list[$since_reset]))
|
||||
foreach($lead_list[$since_reset] as $dispo => $blank)
|
||||
{
|
||||
if (preg_match('/1$|3$|5$|7$|9$/i', $o))
|
||||
{$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';}
|
||||
@@ -27823,7 +27825,8 @@ if ($ADD==34)
|
||||
$o=0;
|
||||
if ($lead_list['count'] > 0)
|
||||
{
|
||||
while (list($dispo,) = each($lead_list[$since_reset]))
|
||||
# while (list($dispo,) = each($lead_list[$since_reset]))
|
||||
foreach($lead_list[$since_reset] as $dispo => $blank)
|
||||
{
|
||||
if (preg_match('/1$|3$|5$|7$|9$/i', $o))
|
||||
{$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';}
|
||||
@@ -29192,7 +29195,8 @@ if ($ADD==311)
|
||||
$o=0;
|
||||
if ($lead_list['count'] > 0)
|
||||
{
|
||||
while (list($dispo,) = each($lead_list[$since_reset]))
|
||||
#while (list($dispo,) = each($lead_list[$since_reset]))
|
||||
foreach($lead_list[$since_reset] as $dispo => $blank)
|
||||
{
|
||||
if (preg_match('/1$|3$|5$|7$|9$/i', $o))
|
||||
{$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';}
|
||||
@@ -29301,7 +29305,8 @@ if ($ADD==311)
|
||||
|
||||
if ($lead_list['count'] > 0)
|
||||
{
|
||||
while (list($tzone,) = each($lead_list[$since_reset]))
|
||||
# while (list($tzone,) = each($lead_list[$since_reset]))
|
||||
foreach($lead_list[$since_reset] as $tzone => $blank)
|
||||
{
|
||||
$LOCALzone=3600 * $tzone;
|
||||
$LOCALdate=gmdate("D j M Y H:i", time() + $LOCALzone);
|
||||
@@ -29378,7 +29383,8 @@ if ($ADD==311)
|
||||
$o=0;
|
||||
if ($lead_list['count'] > 0)
|
||||
{
|
||||
while (list($owner,) = each($lead_list[$since_reset]))
|
||||
# while (list($owner,) = each($lead_list[$since_reset]))
|
||||
foreach($lead_list[$since_reset] as $owner => $blank)
|
||||
{
|
||||
if (preg_match('/1$|3$|5$|7$|9$/i', $o))
|
||||
{$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';}
|
||||
@@ -29444,7 +29450,8 @@ if ($ADD==311)
|
||||
$o=0;
|
||||
if ($lead_list['count'] > 0)
|
||||
{
|
||||
while (list($owner,) = each($lead_list[$since_reset]))
|
||||
# while (list($owner,) = each($lead_list[$since_reset]))
|
||||
foreach($lead_list[$since_reset] as $owner => $blank)
|
||||
{
|
||||
if (preg_match('/1$|3$|5$|7$|9$/i', $o))
|
||||
{$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';}
|
||||
@@ -29511,7 +29518,8 @@ if ($ADD==311)
|
||||
$o=0;
|
||||
if ($lead_list['count'] > 0)
|
||||
{
|
||||
while (list($rank,) = each($lead_list[$since_reset]))
|
||||
# while (list($rank,) = each($lead_list[$since_reset]))
|
||||
foreach($lead_list[$since_reset] as $rank => $blank)
|
||||
{
|
||||
if (preg_match('/1$|3$|5$|7$|9$/i', $o))
|
||||
{$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';}
|
||||
@@ -29579,7 +29587,8 @@ if ($ADD==311)
|
||||
$o=0;
|
||||
if ($lead_list['count'] > 0)
|
||||
{
|
||||
while (list($rank,) = each($lead_list[$since_reset]))
|
||||
# while (list($rank,) = each($lead_list[$since_reset]))
|
||||
foreach($lead_list[$since_reset] as $rank => $blank)
|
||||
{
|
||||
if (preg_match('/1$|3$|5$|7$|9$/i', $o))
|
||||
{$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';}
|
||||
|
||||
@@ -381,7 +381,8 @@ if ($action == "BLANK")
|
||||
$o=0;
|
||||
if ($lead_list['count'] > 0)
|
||||
{
|
||||
while (list($owner,) = each($lead_list[$since_reset]))
|
||||
# while (list($owner,) = each($lead_list[$since_reset]))
|
||||
foreach($lead_list[$since_reset] as $owner => $blank)
|
||||
{
|
||||
$owner_var = preg_replace('/ |\n|\r|\t/','',$owner);
|
||||
if (preg_match('/1$|3$|5$|7$|9$/i', $o))
|
||||
@@ -418,7 +419,7 @@ if ($action == "BLANK")
|
||||
echo "<tr bgcolor=#$SSstd_row1_background><td align=right>"._QXZ("List Order Randomize").": </td><td align=left><select size=1 name=lead_order_randomize><option value='Y'>"._QXZ("Y")."</option><option value='N'>"._QXZ("N")."</option><option value='$lead_order_randomize' SELECTED>"._QXZ("$lead_order_randomize")."</option></select></td></tr>\n";
|
||||
echo "<tr bgcolor=#$SSstd_row1_background><td align=right>"._QXZ("List Order Secondary").": </td><td align=left><select size=1 name=lead_order_secondary><option value='LEAD_ASCEND'>"._QXZ("LEAD_ASCEND")."</option><option value='LEAD_DESCEND'>"._QXZ("LEAD_DESCEND")."</option><option value='CALLTIME_ASCEND'>"._QXZ("CALLTIME_ASCEND")."</option><option value='CALLTIME_DESCEND'>"._QXZ("CALLTIME_DESCEND")."</option><option value='VENDOR_ASCEND'>"._QXZ("VENDOR_ASCEND")."</option><option value='VENDOR_DESCEND'>"._QXZ("VENDOR_DESCEND")."</option><option value='$lead_order_secondary' SELECTED>"._QXZ("$lead_order_secondary")."</option></select></td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row1_background><td align=center colspan=2><input type=submit name=SUBMIT value='"._QXZ("SUBMIT")."'></td></tr>\n";
|
||||
echo "<tr bgcolor=#$SSstd_row1_background><td align=center colspan=2><input style='background-color:#$SSbutton_color' type=submit name=SUBMIT value='"._QXZ("SUBMIT")."'></td></tr>\n";
|
||||
echo "</TABLE></center>\n";
|
||||
echo "</TD></TR></TABLE>\n";
|
||||
}
|
||||
|
||||
@@ -748,7 +748,8 @@ if ($enable_gdpr_download_deletion>0)
|
||||
$HTML_header.="<tr>\n";
|
||||
}
|
||||
$HTML_body.="<tr>\n";
|
||||
while (list($key, $val)=each($row))
|
||||
# while (list($key, $val)=each($row))
|
||||
foreach ($row as $key => $val)
|
||||
{
|
||||
if ($key=="entry_list_id") {$list_id=$val;}
|
||||
if (in_array($key, $purge_field_array["$table_name"]) || (preg_match("/^custom_/", $table_name) && $key!="lead_id"))
|
||||
|
||||
@@ -259,7 +259,8 @@ if ($reload_chat_span) {
|
||||
echo "<TD rowspan=3 valign='top'>";
|
||||
echo "<select name='available_chat_agents[]' multiple size='12' style=\"width:350px\">\n";
|
||||
if (count($user_array)==0) {echo "<option value=''>---- "._QXZ("NO LIVE AGENTS")." ----</option>";}
|
||||
while (list($user, $full_name) = each($user_array)) {
|
||||
#while (list($user, $full_name) = each($user_array)) {
|
||||
foreach($user_array as $user => $full_name) {
|
||||
echo "<option value='$user'>$user - $full_name</option>\n";
|
||||
}
|
||||
echo "</select>\n";
|
||||
@@ -267,7 +268,8 @@ if ($reload_chat_span) {
|
||||
echo "<TD valign='top'>";
|
||||
echo "<select name='available_chat_campaigns[]' multiple size='5' style=\"width:350px\">\n";
|
||||
if (count($campaign_id_array)==0) {echo "<option value=''>---- "._QXZ("NO LIVE CAMPAIGNS")." ----</option>";}
|
||||
while (list($campaign_id, $campaign_name) = each($campaign_id_array)) {
|
||||
#while (list($campaign_id, $campaign_name) = each($campaign_id_array)) {
|
||||
foreach($campaign_id_array as $campaign_id => $campaign_name) {
|
||||
echo "<option value='$campaign_id'>$campaign_id - $campaign_name</option>\n";
|
||||
}
|
||||
echo "</select>\n";
|
||||
@@ -279,7 +281,8 @@ if ($reload_chat_span) {
|
||||
echo "<TD valign='top'>";
|
||||
echo "<select name='available_chat_groups[]' multiple size='5' style=\"width:350px\">\n";
|
||||
if (count($user_group_array)==0) {echo "<option value=''>---- "._QXZ("NO LIVE USER GROUPS")." ----</option>";}
|
||||
while (list($user_group, $group_name) = each($user_group_array)) {
|
||||
# while (list($user_group, $group_name) = each($user_group_array)) {
|
||||
foreach($user_group_array as $user_group => $group_name) {
|
||||
echo "<option value='$user_group'>$user_group - $group_name</option>\n";
|
||||
}
|
||||
echo "</select>\n";
|
||||
@@ -335,7 +338,8 @@ if ($reload_chat_span) {
|
||||
}
|
||||
$chat_subids_array=preg_replace("/,$/", "", $chat_subids_array);
|
||||
$chat_subids_array.="]";
|
||||
while (list($chat_subid, $text) = each($chat_output_header)) {
|
||||
# while (list($chat_subid, $text) = each($chat_output_header)) {
|
||||
foreach($chat_output_header as $chat_subid => $text) {
|
||||
echo $chat_output_header[$chat_subid];
|
||||
echo $chat_output_text[$chat_subid];
|
||||
echo $chat_output_footer[$chat_subid];
|
||||
|
||||
@@ -758,7 +758,8 @@ $NWE = "')\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP>";
|
||||
echo "<TD rowspan=3 valign='top'>";
|
||||
echo "<select name='available_chat_agents[]' multiple size='12' style=\"width:350px\">\n";
|
||||
if (count($user_array)==0) {echo "<option value=''>---- "._QXZ("NO LIVE AGENTS")." ----</option>";}
|
||||
while (list($user, $full_name) = each($user_array)) {
|
||||
# while (list($user, $full_name) = each($user_array)) {
|
||||
foreach($user_array as $user => $full_name) {
|
||||
echo "<option value='$user'>$user - $full_name</option>\n";
|
||||
}
|
||||
echo "</select>\n";
|
||||
@@ -766,7 +767,8 @@ $NWE = "')\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP>";
|
||||
echo "<TD valign='top'>";
|
||||
echo "<select name='available_chat_campaigns[]' multiple size='5' style=\"width:350px\">\n";
|
||||
if (count($campaign_id_array)==0) {echo "<option value=''>---- "._QXZ("NO LIVE CAMPAIGNS")." ----</option>";}
|
||||
while (list($campaign_id, $campaign_name) = each($campaign_id_array)) {
|
||||
# while (list($campaign_id, $campaign_name) = each($campaign_id_array)) {
|
||||
foreach($campaign_id_array as $campaign_id => $campaign_name) {
|
||||
echo "<option value='$campaign_id'>$campaign_id - $campaign_name</option>\n";
|
||||
}
|
||||
echo "</select>\n";
|
||||
@@ -778,7 +780,8 @@ $NWE = "')\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP>";
|
||||
echo "<TD valign='top'>";
|
||||
echo "<select name='available_chat_groups[]' multiple size='5' style=\"width:350px\">\n";
|
||||
if (count($user_group_array)==0) {echo "<option value=''>---- "._QXZ("NO LIVE USER GROUPS")." ----</option>";}
|
||||
while (list($user_group, $group_name) = each($user_group_array)) {
|
||||
# while (list($user_group, $group_name) = each($user_group_array)) {
|
||||
foreach($user_group_array as $user_group => $group_name) {
|
||||
echo "<option value='$user_group'>$user_group - $group_name</option>\n";
|
||||
}
|
||||
echo "</select>\n";
|
||||
@@ -862,7 +865,8 @@ $NWE = "')\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP>";
|
||||
}
|
||||
$chat_subids_array=preg_replace("/,$/", "", $chat_subids_array);
|
||||
$chat_subids_array.="]";
|
||||
while (list($chat_subid, $text) = each($chat_output_header))
|
||||
# while (list($chat_subid, $text) = each($chat_output_header))
|
||||
foreach($chat_output_header as $chat_subid => $text)
|
||||
{
|
||||
echo $chat_output_header[$chat_subid];
|
||||
echo $chat_output_text[$chat_subid];
|
||||
|
||||
@@ -157,10 +157,11 @@
|
||||
# 201106-1654 - Added campaign_id option to agent_stats_export function
|
||||
# 201113-0713 - Added delete_did option to update_did function, Issue #1242
|
||||
# 201201-1625 - Added group_by_campaign option to agent_stats_export function
|
||||
# 201214-1547 - Fixes for PHP8 compatibility
|
||||
#
|
||||
|
||||
$version = '2.14-134';
|
||||
$build = '201201-1625';
|
||||
$version = '2.14-135';
|
||||
$build = '201214-1547';
|
||||
$api_url_log = 0;
|
||||
|
||||
$startMS = microtime();
|
||||
@@ -12888,7 +12889,8 @@ if ($function == 'call_status_stats')
|
||||
}
|
||||
}
|
||||
|
||||
while(list($key, $val)=each($outbound_array)) {
|
||||
# while(list($key, $val)=each($outbound_array)) {
|
||||
foreach($outbound_array as $key => $val) {
|
||||
$hour_str="";
|
||||
$status_str="";
|
||||
for ($i=0; $i<24; $i++)
|
||||
@@ -12903,7 +12905,8 @@ if ($function == 'call_status_stats')
|
||||
if ($temp_ary_ct > 0)
|
||||
{
|
||||
ksort($temp_stat_array{"$key"});
|
||||
while(list($statkey, $statval)=each($temp_stat_array{"$key"}))
|
||||
# while(list($statkey, $statval)=each($temp_stat_array{"$key"}))
|
||||
foreach($temp_stat_array{"$key"} as $statkey => $statval)
|
||||
{
|
||||
$status_str.=$statkey."-".$temp_stat_array{"$key"}{"$statkey"}.",";
|
||||
}
|
||||
@@ -12913,7 +12916,8 @@ if ($function == 'call_status_stats')
|
||||
echo $key."|".$outbound_array{$key}[0]."|".$outbound_array{$key}[1]."|".$hour_str."|".$status_str."|\n";
|
||||
}
|
||||
|
||||
while(list($key, $val)=each($inbound_array)) {
|
||||
# while(list($key, $val)=each($inbound_array)) {
|
||||
foreach($inbound_array as $key => $val) {
|
||||
$hour_str="";
|
||||
$status_str="";
|
||||
for ($i=0; $i<24; $i++)
|
||||
@@ -12928,7 +12932,8 @@ if ($function == 'call_status_stats')
|
||||
if ($temp_ary_ct > 0)
|
||||
{
|
||||
ksort($temp_stat_array{"$key"});
|
||||
while(list($statkey, $statval)=each($temp_stat_array{"$key"}))
|
||||
# while(list($statkey, $statval)=each($temp_stat_array{"$key"}))
|
||||
foreach($temp_stat_array{"$key"} as $statkey => $statval)
|
||||
{
|
||||
$status_str.=$statkey."-".$temp_stat_array{"$key"}{"$statkey"}.",";
|
||||
}
|
||||
@@ -13194,7 +13199,8 @@ if ($function == 'call_dispo_report')
|
||||
}
|
||||
}
|
||||
$rpt_str.="\n";
|
||||
while (list($key, $val)=each($outbound_ct_array))
|
||||
# while (list($key, $val)=each($outbound_ct_array))
|
||||
foreach($outbound_ct_array as $key => $val)
|
||||
{
|
||||
$total_calls=$outbound_ct_array{$key}{"TOTAL CALLS"};
|
||||
$rpt_str.="$key,".$outbound_ct_array{$key}{"TOTAL CALLS"};
|
||||
@@ -13206,7 +13212,8 @@ if ($function == 'call_dispo_report')
|
||||
$outbound_ct_array{$key}{"$status_ct_array[$i]"}+=0;
|
||||
}
|
||||
ksort($outbound_ct_array{$key});
|
||||
while (list($key2, $val2)=each($outbound_ct_array{$key}))
|
||||
# while (list($key2, $val2)=each($outbound_ct_array{$key}))
|
||||
foreach($outbound_ct_array{$key} as $key2 => $val2)
|
||||
{
|
||||
$rpt_str.=",$val2";
|
||||
if ($show_percentages)
|
||||
@@ -13219,7 +13226,8 @@ if ($function == 'call_dispo_report')
|
||||
}
|
||||
$rpt_str.="\n";
|
||||
}
|
||||
while (list($key, $val)=each($inbound_ct_array))
|
||||
# while (list($key, $val)=each($inbound_ct_array))
|
||||
foreach($inbound_ct_array as $key => $val)
|
||||
{
|
||||
$total_calls=$inbound_ct_array{$key}{"TOTAL CALLS"};
|
||||
$rpt_str.="$key,".$inbound_ct_array{$key}{"TOTAL CALLS"};
|
||||
@@ -13231,7 +13239,8 @@ if ($function == 'call_dispo_report')
|
||||
$inbound_ct_array{$key}{"$status_ct_array[$i]"}+=0;
|
||||
}
|
||||
ksort($inbound_ct_array{$key});
|
||||
while (list($key2, $val2)=each($inbound_ct_array{$key}))
|
||||
# while (list($key2, $val2)=each($inbound_ct_array{$key}))
|
||||
foreach($inbound_ct_array{$key} as $key2 => $val2)
|
||||
{
|
||||
$rpt_str.=",$val2";
|
||||
if ($show_percentages)
|
||||
@@ -13244,7 +13253,8 @@ if ($function == 'call_dispo_report')
|
||||
}
|
||||
$rpt_str.="\n";
|
||||
}
|
||||
while (list($key, $val)=each($did_ct_array))
|
||||
# while (list($key, $val)=each($did_ct_array))
|
||||
foreach($did_ct_array as $key => $val)
|
||||
{
|
||||
$total_calls=$did_ct_array{$key}{"TOTAL CALLS"};
|
||||
$rpt_str.="$key,".$did_ct_array{$key}{"TOTAL CALLS"};
|
||||
@@ -13256,7 +13266,8 @@ if ($function == 'call_dispo_report')
|
||||
$did_ct_array{$key}{"$status_ct_array[$i]"}+=0;
|
||||
}
|
||||
ksort($did_ct_array{$key});
|
||||
while (list($key2, $val2)=each($did_ct_array{$key}))
|
||||
# while (list($key2, $val2)=each($did_ct_array{$key}))
|
||||
foreach($did_ct_array{$key} as $key2 => $val2)
|
||||
{
|
||||
$rpt_str.=",$val2";
|
||||
if ($show_percentages)
|
||||
@@ -13271,7 +13282,8 @@ if ($function == 'call_dispo_report')
|
||||
}
|
||||
$rpt_str.="TOTAL,$grand_total_calls";
|
||||
ksort($grand_total_array);
|
||||
while (list($key, $val)=each($grand_total_array))
|
||||
# while (list($key, $val)=each($grand_total_array))
|
||||
foreach($grand_total_array as $key => $val)
|
||||
{
|
||||
$rpt_str.=",$val";
|
||||
if ($show_percentages)
|
||||
|
||||
@@ -305,12 +305,12 @@ function is_user_logged_in($user)
|
||||
$qc_user_logged_in=is_user_logged_in($PHP_AUTH_USER);
|
||||
if ($qc_user_logged_in===true)
|
||||
{
|
||||
echo "<A HREF='../agc/api.php?source=test&user=$PHP_AUTH_USER&pass=$PHP_AUTH_PW&agent_user=$PHP_AUTH_USER&function=external_dial&value=$phone_number&phone_code=$phone_code&search=YES&preview=NO&focus=YES&lead_id=$lead_id' target='_SELF'>"._QXZ("Call Lead")."</A>";
|
||||
echo "<A HREF=qc_api.php?source=test&user=$PHP_AUTH_USER&pass=$PHP_AUTH_PW&agent_user=$PHP_AUTH_USER&function=external_dial_lead&value=$phone_number&phone_code=$phone_code&search=YES&preview=NO&focus=YES target='_SELF'>"._QXZ("Call Lead")."</A><BR><BR>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "$qc_user_logged_in";
|
||||
echo "$qc_user_logged_in<BR><BR>";
|
||||
}
|
||||
echo " <A HREF=$PHP_SELF?phone_number=$phone_number&phone_code=$phone_code&lead_id=$lead_id&list_id=$CLlist_id&stage=DISPLAY&submit_button=YES&user=$PHP_AUTH_USER&pass=$PHP_AUTH_PW&bgcolor=E6E6E6>"._QXZ("Refresh")."</A>";
|
||||
echo " <A HREF=$PHP_SELF?lead_id=$lead_id&list_id=$CLlist_id&stage=DISPLAY&submit_button=YES&user=$PHP_AUTH_USER&pass=$PHP_AUTH_PW&bgcolor=E6E6E6>"._QXZ("Refresh")."</A>";
|
||||
|
||||
?>
|
||||
|
||||
@@ -214,7 +214,8 @@ if (preg_match("/status_performance/", $rpt_type)) {
|
||||
$status_counts["$row[0]"][2]+=$row[2];
|
||||
}
|
||||
|
||||
while (list($key, $val)=each($status_counts)) {
|
||||
# while (list($key, $val)=each($status_counts)) {
|
||||
foreach($status_counts as $key => $val) {
|
||||
$kstatus_counts[]=array('status' => $key, 'counts' => $val[0], 'sales' => $val[1], 'dead' => $val[2]);
|
||||
}
|
||||
|
||||
@@ -329,7 +330,8 @@ if (preg_match("/(agent|team)_performance/", $rpt_type)) {
|
||||
if (count($agent_counts)==0) {
|
||||
$rpt_string=_QXZ("REPORT RETURNED NO RESULTS");
|
||||
} else {
|
||||
while(list($key, $val)=each($agent_counts)) {
|
||||
# while(list($key, $val)=each($agent_counts)) {
|
||||
foreach($agent_counts as $key => $val) {
|
||||
$full_name="";
|
||||
if (preg_match('/team_performance/', $rpt_type)) {
|
||||
$user_stmt="select group_name from vicidial_user_groups where user_group='$key'";
|
||||
@@ -438,7 +440,8 @@ if (preg_match("/floor_performance/", $rpt_type)) {
|
||||
ksort($call_counts);
|
||||
$prev_calls=0;
|
||||
$prev_sales=0;
|
||||
while(list($key, $val)=each($call_counts)) {
|
||||
# while(list($key, $val)=each($call_counts)) {
|
||||
foreach($call_counts as $key => $val) {
|
||||
# if($val[2]>0) { // With time ranges, trim off the starting time in case person running report sets it before they start dialing.
|
||||
$mins++;
|
||||
$shift_duration=$mins*60;
|
||||
@@ -568,7 +571,8 @@ if (preg_match("/(did|ingroup)_performance/", $rpt_type)) {
|
||||
if (count($inbound_counts)==0) {
|
||||
$rpt_string=_QXZ("REPORT RETURNED NO RESULTS");
|
||||
} else {
|
||||
while(list($key, $val)=each($inbound_counts)) {
|
||||
# while(list($key, $val)=each($inbound_counts)) {
|
||||
foreach($inbound_counts as $key => $val) {
|
||||
|
||||
if (preg_match("/did_performance/", $rpt_type)) {
|
||||
$user_stmt="SELECT did_description from vicidial_inbound_dids where did_pattern='$key'";
|
||||
@@ -657,7 +661,8 @@ if ($rpt_type=="floor_performance_hourly") {
|
||||
if (count($cumulative_hours_array)==0) {
|
||||
$rpt_string=_QXZ("REPORT RETURNED NO RESULTS");
|
||||
} else {
|
||||
while(list($key, $val)=each($cumulative_hours_array)) {
|
||||
# while(list($key, $val)=each($cumulative_hours_array)) {
|
||||
foreach($cumulative_hours_array as $key => $val) {
|
||||
$rpt_string.="$key|$val\n";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user