Added ANI to INBOUND/CLOSER records for NVAuser, added secondary check to find lead ID for DIDs in user_stats.php script
Added option to exclude after-hours from abandons, list ID filtering in Inbound Daily report git-svn-id: svn://192.168.202.10@3262 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -33,6 +33,7 @@
|
|||||||
# 170829-0040 - Added screen color settings
|
# 170829-0040 - Added screen color settings
|
||||||
# 171012-2015 - Fixed javascript/apache errors with graphs
|
# 171012-2015 - Fixed javascript/apache errors with graphs
|
||||||
# 191013-0902 - Fixes for PHP7
|
# 191013-0902 - Fixes for PHP7
|
||||||
|
# 200701-1500 - Added option to exclude after-hours from abandons, list ID filtering
|
||||||
#
|
#
|
||||||
|
|
||||||
$startMS = microtime();
|
$startMS = microtime();
|
||||||
@@ -50,6 +51,8 @@ $PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
|||||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||||
if (isset($_GET["group"])) {$group=$_GET["group"];}
|
if (isset($_GET["group"])) {$group=$_GET["group"];}
|
||||||
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
|
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
|
||||||
|
if (isset($_GET["list_ids"])) {$list_ids=$_GET["list_ids"];}
|
||||||
|
elseif (isset($_POST["list_ids"])) {$list_ids=$_POST["list_ids"];}
|
||||||
if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];}
|
if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];}
|
||||||
elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];}
|
elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];}
|
||||||
if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];}
|
if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];}
|
||||||
@@ -64,6 +67,8 @@ if (isset($_GET["show_disposition_statuses"])) {$show_disposition_statuses=$_G
|
|||||||
elseif (isset($_POST["show_disposition_statuses"])) {$show_disposition_statuses=$_POST["show_disposition_statuses"];}
|
elseif (isset($_POST["show_disposition_statuses"])) {$show_disposition_statuses=$_POST["show_disposition_statuses"];}
|
||||||
if (isset($_GET["ignore_afterhours"])) {$ignore_afterhours=$_GET["ignore_afterhours"];}
|
if (isset($_GET["ignore_afterhours"])) {$ignore_afterhours=$_GET["ignore_afterhours"];}
|
||||||
elseif (isset($_POST["ignore_afterhours"])) {$ignore_afterhours=$_POST["ignore_afterhours"];}
|
elseif (isset($_POST["ignore_afterhours"])) {$ignore_afterhours=$_POST["ignore_afterhours"];}
|
||||||
|
if (isset($_GET["exclude_afterhours"])) {$exclude_afterhours=$_GET["exclude_afterhours"];}
|
||||||
|
elseif (isset($_POST["exclude_afterhours"])) {$exclude_afterhours=$_POST["exclude_afterhours"];}
|
||||||
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
|
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
|
||||||
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
|
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
|
||||||
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
|
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
|
||||||
@@ -275,6 +280,17 @@ if ( (!preg_match("/$report_name/",$LOGallowed_reports)) and (!preg_match("/ALL
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$LOGallowed_campaignsSQL='';
|
||||||
|
$whereLOGallowed_campaignsSQL='';
|
||||||
|
if ( (!preg_match('/\-ALL/i', $LOGallowed_campaigns)) )
|
||||||
|
{
|
||||||
|
$rawLOGallowed_campaignsSQL = preg_replace("/ -/",'',$LOGallowed_campaigns);
|
||||||
|
$rawLOGallowed_campaignsSQL = preg_replace("/ /","','",$rawLOGallowed_campaignsSQL);
|
||||||
|
$LOGallowed_campaignsSQL = "and campaign_id IN('$rawLOGallowed_campaignsSQL')";
|
||||||
|
$whereLOGallowed_campaignsSQL = "where campaign_id IN('$rawLOGallowed_campaignsSQL')";
|
||||||
|
}
|
||||||
|
$regexLOGallowed_campaigns = " $LOGallowed_campaigns ";
|
||||||
|
|
||||||
$ag[0]='';
|
$ag[0]='';
|
||||||
$LOGadmin_viewable_groupsSQL='';
|
$LOGadmin_viewable_groupsSQL='';
|
||||||
$whereLOGadmin_viewable_groupsSQL='';
|
$whereLOGadmin_viewable_groupsSQL='';
|
||||||
@@ -322,8 +338,11 @@ $NOW_DATE = date("Y-m-d");
|
|||||||
$NOW_TIME = date("Y-m-d H:i:s");
|
$NOW_TIME = date("Y-m-d H:i:s");
|
||||||
$STARTtime = date("U");
|
$STARTtime = date("U");
|
||||||
if (!isset($group)) {$group = array();}
|
if (!isset($group)) {$group = array();}
|
||||||
|
if (!isset($list_ids)) {$list_ids = array(); $all_lists_selected="selected";}
|
||||||
if (!isset($query_date)) {$query_date = $NOW_DATE;}
|
if (!isset($query_date)) {$query_date = $NOW_DATE;}
|
||||||
if (!isset($end_date)) {$end_date = $NOW_DATE;}
|
if (!isset($end_date)) {$end_date = $NOW_DATE;}
|
||||||
|
|
||||||
|
###### INGROUPS ######
|
||||||
$groups_selected = count($group);
|
$groups_selected = count($group);
|
||||||
$group_name_str="";
|
$group_name_str="";
|
||||||
$groups_selected_str="";
|
$groups_selected_str="";
|
||||||
@@ -367,6 +386,55 @@ while ($i < $groups_to_print)
|
|||||||
|
|
||||||
$groups_selected_str=preg_replace('/, $/', '', $groups_selected_str);
|
$groups_selected_str=preg_replace('/, $/', '', $groups_selected_str);
|
||||||
$group_name_str=preg_replace('/, $/', '', $group_name_str);
|
$group_name_str=preg_replace('/, $/', '', $group_name_str);
|
||||||
|
######################
|
||||||
|
|
||||||
|
###### LISTS #########
|
||||||
|
$lists_selected = count($list_ids);
|
||||||
|
$list_name_str="";
|
||||||
|
$lists_selected_str="";
|
||||||
|
$lists_selected_URLstr="";
|
||||||
|
|
||||||
|
for ($i=0; $i<$lists_selected; $i++)
|
||||||
|
{
|
||||||
|
$selected_group_URLstr.="&list_ids[]=$list_ids[$i]";
|
||||||
|
if ($list_ids[$i]=="--ALL--")
|
||||||
|
{
|
||||||
|
$list_ids=array("--ALL--");
|
||||||
|
$lists_selected=1;
|
||||||
|
$list_name_str.="-- ALL LISTS --";
|
||||||
|
$all_lists_selected="selected";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$lists_selected_str.="'$list_ids[$i]', ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt="select list_id,list_name from vicidial_lists $whereLOGallowed_campaignsSQL order by list_id;";
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
if ($DB) {$MAIN.="$stmt\n";}
|
||||||
|
$lists_to_print = mysqli_num_rows($rslt);
|
||||||
|
$i=0;
|
||||||
|
$lists=array();
|
||||||
|
$list_names=array();
|
||||||
|
$lists_string='|';
|
||||||
|
while ($i < $lists_to_print)
|
||||||
|
{
|
||||||
|
$row=mysqli_fetch_row($rslt);
|
||||||
|
$lists[$i] = $row[0];
|
||||||
|
$list_names[$i] = $row[1];
|
||||||
|
$lists_string .= "$lists[$i]|";
|
||||||
|
for ($j=0; $j<$lists_selected; $j++)
|
||||||
|
{
|
||||||
|
if ($list_ids[$j] && $lists[$i]==$list_ids[$j]) {$list_name_str.="$lists[$i] - $list_names[$i], ";}
|
||||||
|
if ($list_ids[$j]=="--ALL--") {$lists_selected_str.="'$lists[$i]', ";}
|
||||||
|
}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$lists_selected_str=preg_replace('/, $/', '', $lists_selected_str);
|
||||||
|
$list_name_str=preg_replace('/, $/', '', $list_name_str);
|
||||||
|
######################
|
||||||
|
|
||||||
$stmt="select call_time_id,call_time_name from vicidial_call_times $whereLOGadmin_viewable_call_timesSQL order by call_time_id;";
|
$stmt="select call_time_id,call_time_name from vicidial_call_times $whereLOGadmin_viewable_call_timesSQL order by call_time_id;";
|
||||||
$rslt=mysql_to_mysqli($stmt, $link);
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
@@ -448,6 +516,24 @@ $MAIN.="});\n";
|
|||||||
$MAIN.="o_cal.a_tpl.yearscroll = false;\n";
|
$MAIN.="o_cal.a_tpl.yearscroll = false;\n";
|
||||||
$MAIN.="// o_cal.a_tpl.weekstart = 1; // Monday week start\n";
|
$MAIN.="// o_cal.a_tpl.weekstart = 1; // Monday week start\n";
|
||||||
$MAIN.="</script>\n";
|
$MAIN.="</script>\n";
|
||||||
|
$MAIN.="</TD><TD rowspan=3>\n";
|
||||||
|
|
||||||
|
$MAIN.="<SELECT SIZE=5 NAME=list_ids[] multiple>\n";
|
||||||
|
$MAIN.="<option $all_lists_selected value=\"--ALL--\">--"._QXZ("ALL LISTS")."--</option>\n";
|
||||||
|
$o=0;
|
||||||
|
while ($lists_to_print > $o)
|
||||||
|
{
|
||||||
|
$selected="";
|
||||||
|
for ($i=0; $i<$lists_selected; $i++)
|
||||||
|
{
|
||||||
|
if ( ($file_download < 1) and ($DB) ) {echo "<!-- $lists[$o] == $list_ids[$i] //-->\n";}
|
||||||
|
if ($lists[$o] == $list_ids[$i]) {$selected="selected";}
|
||||||
|
}
|
||||||
|
$MAIN.="<option $selected value=\"$lists[$o]\">$lists[$o] - $list_names[$o]</option>\n";
|
||||||
|
$o++;
|
||||||
|
}
|
||||||
|
$MAIN.="</SELECT>\n";
|
||||||
|
|
||||||
$MAIN.="</TD><TD rowspan=2>\n";
|
$MAIN.="</TD><TD rowspan=2>\n";
|
||||||
$MAIN.="<SELECT SIZE=5 NAME=group[] multiple>\n";
|
$MAIN.="<SELECT SIZE=5 NAME=group[] multiple>\n";
|
||||||
$MAIN.="<option $all_selected value=\"--ALL--\">--"._QXZ("ALL INGROUPS")."--</option>\n";
|
$MAIN.="<option $all_selected value=\"--ALL--\">--"._QXZ("ALL INGROUPS")."--</option>\n";
|
||||||
@@ -486,7 +572,7 @@ if ($IDR_calltime_available==1)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$MAIN.="<INPUT TYPE=submit NAME=SUBMIT VALUE='"._QXZ("SUBMIT")."'></TD></TR>\n";
|
$MAIN.="<INPUT TYPE=submit NAME=SUBMIT VALUE='"._QXZ("SUBMIT")."'></TD></TR>\n";
|
||||||
$MAIN.="<TR><TD align='left' rowspan=2><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2><INPUT TYPE=checkbox NAME=hourly_breakdown VALUE='checked' $hourly_breakdown>"._QXZ("Show hourly results")."<BR><INPUT TYPE=checkbox NAME=show_disposition_statuses VALUE='checked' $show_disposition_statuses>"._QXZ("Show disposition statuses")."<BR><INPUT TYPE=checkbox NAME=ignore_afterhours VALUE='checked' $ignore_afterhours>"._QXZ("Ignore after-hours calls");
|
$MAIN.="<TR><TD align='left' rowspan=2><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2><INPUT TYPE=checkbox NAME=hourly_breakdown VALUE='checked' $hourly_breakdown>"._QXZ("Show hourly results")."<BR><INPUT TYPE=checkbox NAME=show_disposition_statuses VALUE='checked' $show_disposition_statuses>"._QXZ("Show disposition statuses")."<BR><INPUT TYPE=checkbox NAME=ignore_afterhours VALUE='checked' $ignore_afterhours>"._QXZ("Ignore after-hours calls")."<BR><INPUT TYPE=checkbox NAME=exclude_afterhours VALUE='checked' $exclude_afterhours>"._QXZ("Exclude after-hours from abandons");
|
||||||
if ($archives_available=="Y")
|
if ($archives_available=="Y")
|
||||||
{
|
{
|
||||||
$MAIN.="<BR><input type='checkbox' name='search_archived_data' value='checked' $search_archived_data>"._QXZ("Search archived data")."\n";
|
$MAIN.="<BR><input type='checkbox' name='search_archived_data' value='checked' $search_archived_data>"._QXZ("Search archived data")."\n";
|
||||||
@@ -709,7 +795,7 @@ else
|
|||||||
|
|
||||||
$status_array=array();
|
$status_array=array();
|
||||||
if ($show_disposition_statuses) {
|
if ($show_disposition_statuses) {
|
||||||
$dispo_stmt="select distinct status from ".$vicidial_closer_log_table." where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id in (" . $groups_selected_str . ") $big_shift_time_SQL_clause order by status;";
|
$dispo_stmt="select distinct status from ".$vicidial_closer_log_table." where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id in (" . $groups_selected_str . ") and list_id in (" . $lists_selected_str . ") $status_clause $big_shift_time_SQL_clause order by status;";
|
||||||
#echo $dispo_stmt."<BR>";
|
#echo $dispo_stmt."<BR>";
|
||||||
$dispo_rslt=mysql_to_mysqli($dispo_stmt, $link);
|
$dispo_rslt=mysql_to_mysqli($dispo_stmt, $link);
|
||||||
$dispo_str="";
|
$dispo_str="";
|
||||||
@@ -879,7 +965,7 @@ else
|
|||||||
|
|
||||||
|
|
||||||
### GRAB ALL RECORDS WITHIN RANGE FROM THE DATABASE ###
|
### GRAB ALL RECORDS WITHIN RANGE FROM THE DATABASE ###
|
||||||
$stmt="select queue_seconds,UNIX_TIMESTAMP(call_date),length_in_sec,status,term_reason,call_date,user from ".$vicidial_closer_log_table." where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id in (" . $groups_selected_str . ");";
|
$stmt="select queue_seconds,UNIX_TIMESTAMP(call_date),length_in_sec,status,term_reason,call_date,user from ".$vicidial_closer_log_table." where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id in (" . $groups_selected_str . ") and list_id in (" . $lists_selected_str . ") $status_clause;";
|
||||||
$rslt=mysql_to_mysqli($stmt, $link);
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
if ($DB) {$ASCII_text.="$stmt\n";}
|
if ($DB) {$ASCII_text.="$stmt\n";}
|
||||||
$records_to_grab = mysqli_num_rows($rslt);
|
$records_to_grab = mysqli_num_rows($rslt);
|
||||||
@@ -1008,12 +1094,16 @@ else
|
|||||||
|
|
||||||
if ($totCALLSmax < $ls[$i]) {$totCALLSmax = $ls[$i];}
|
if ($totCALLSmax < $ls[$i]) {$totCALLSmax = $ls[$i];}
|
||||||
if ($qrtCALLSmax[$j] < $ls[$i]) {$qrtCALLSmax[$j] = $ls[$i];}
|
if ($qrtCALLSmax[$j] < $ls[$i]) {$qrtCALLSmax[$j] = $ls[$i];}
|
||||||
if (preg_match('/ABANDON|NOAGENT|QUEUETIMEOUT|AFTERHOURS|MAXCALLS/', $tr[$i]))
|
$abandons_match_str='ABANDON|NOAGENT|QUEUETIMEOUT|AFTERHOURS|MAXCALLS';
|
||||||
|
if (preg_match("/$abandons_match_str/", $tr[$i]))
|
||||||
{
|
{
|
||||||
$totABANDONSdate[$j]++;
|
if (!$exclude_afterhours || !preg_match('/AFTERHOURS/', $tr[$i]))
|
||||||
$totABANDONSsecdate[$j]+=$ls[$i];
|
{
|
||||||
$FtotABANDONS++;
|
$totABANDONSdate[$j]++;
|
||||||
$FtotABANDONSsec+=$ls[$i];
|
$totABANDONSsecdate[$j]+=$ls[$i];
|
||||||
|
$FtotABANDONS++;
|
||||||
|
$FtotABANDONSsec+=$ls[$i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -61,6 +61,7 @@
|
|||||||
# 190310-2206 - Added indication of muted recordings by agent
|
# 190310-2206 - Added indication of muted recordings by agent
|
||||||
# 191013-0843 - Fixes for PHP7
|
# 191013-0843 - Fixes for PHP7
|
||||||
# 200501-0811 - Added NVAuser option for NVA recordings user column
|
# 200501-0811 - Added NVAuser option for NVA recordings user column
|
||||||
|
# 200702-1710 - Added ANI to INBOUND/CLOSER records for NVAuser, added secondary check to find lead ID for DIDs
|
||||||
#
|
#
|
||||||
|
|
||||||
$startMS = microtime();
|
$startMS = microtime();
|
||||||
@@ -1161,7 +1162,7 @@ else
|
|||||||
$stmt="SELECT call_date,length_in_sec,status,phone_number,campaign_id,queue_seconds,list_id,lead_id,term_reason,closecallid from ".$vicidial_closer_log_table." where user='" . mysqli_real_escape_string($link, $user) . "' and call_date >= '" . mysqli_real_escape_string($link, $begin_date) . " 0:00:01' and call_date <= '" . mysqli_real_escape_string($link, $end_date) . " 23:59:59' $query_call_status order by call_date desc limit 10000;";
|
$stmt="SELECT call_date,length_in_sec,status,phone_number,campaign_id,queue_seconds,list_id,lead_id,term_reason,closecallid from ".$vicidial_closer_log_table." where user='" . mysqli_real_escape_string($link, $user) . "' and call_date >= '" . mysqli_real_escape_string($link, $begin_date) . " 0:00:01' and call_date <= '" . mysqli_real_escape_string($link, $end_date) . " 23:59:59' $query_call_status order by call_date desc limit 10000;";
|
||||||
if ($did > 0)
|
if ($did > 0)
|
||||||
{
|
{
|
||||||
$stmt="SELECT start_time,length_in_sec,0,caller_code,0,0,0,extension,0,0 from ".$call_log_table." where channel_group='DID_INBOUND' and number_dialed='" . mysqli_real_escape_string($link, $user) . "' and start_time >= '" . mysqli_real_escape_string($link, $begin_date) . " 0:00:01' and start_time <= '" . mysqli_real_escape_string($link, $end_date) . " 23:59:59' order by start_time desc limit 10000;";
|
$stmt="SELECT start_time,length_in_sec,0,caller_code,0,0,0,extension,0,0,uniqueid from ".$call_log_table." where channel_group='DID_INBOUND' and number_dialed='" . mysqli_real_escape_string($link, $user) . "' and start_time >= '" . mysqli_real_escape_string($link, $begin_date) . " 0:00:01' and start_time <= '" . mysqli_real_escape_string($link, $end_date) . " 23:59:59' order by start_time desc limit 10000;";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1193,7 +1194,16 @@ else
|
|||||||
$row[7] = ($row[7] + 0);
|
$row[7] = ($row[7] + 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{$row[7]='0';}
|
{
|
||||||
|
$row[7]='0';
|
||||||
|
$lead_id_stmt="select lead_id from vicidial_closer_log where uniqueid='$row[10]'";
|
||||||
|
$lead_id_rslt=mysql_to_mysqli($lead_id_stmt, $link);
|
||||||
|
if (mysqli_num_rows($lead_id_rslt)>0)
|
||||||
|
{
|
||||||
|
$lead_id_row=mysqli_fetch_row($lead_id_rslt);
|
||||||
|
$row[7]=$lead_id_row[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$TOTALinSECONDS = ($TOTALinSECONDS + $row[1]);
|
$TOTALinSECONDS = ($TOTALinSECONDS + $row[1]);
|
||||||
$AGENTseconds = ($row[1] - $row[5]);
|
$AGENTseconds = ($row[1] - $row[5]);
|
||||||
@@ -1402,6 +1412,7 @@ else
|
|||||||
|
|
||||||
$mute_column=''; $mute_column_csv='';
|
$mute_column=''; $mute_column_csv='';
|
||||||
$agent_column=''; $agent_column_csv='';
|
$agent_column=''; $agent_column_csv='';
|
||||||
|
$ANI_column=''; $ANI_column_csv='';
|
||||||
if ($SSmute_recordings > 0)
|
if ($SSmute_recordings > 0)
|
||||||
{
|
{
|
||||||
$mute_column = "<td align=center><font size=2>"._QXZ("MUTE")." </td>";
|
$mute_column = "<td align=center><font size=2>"._QXZ("MUTE")." </td>";
|
||||||
@@ -1411,12 +1422,14 @@ else
|
|||||||
{
|
{
|
||||||
$agent_column = "<td align=center><font size=2>"._QXZ("AGENT")." </td>";
|
$agent_column = "<td align=center><font size=2>"._QXZ("AGENT")." </td>";
|
||||||
$agent_column_csv = ",\""._QXZ("AGENT")."\"";
|
$agent_column_csv = ",\""._QXZ("AGENT")."\"";
|
||||||
|
$ANI_column = "<td align=center><font size=2>"._QXZ("ANI")." </td>";
|
||||||
|
$ANI_column_csv = ",\""._QXZ("ANI")."\"";
|
||||||
}
|
}
|
||||||
$MAIN.="<B>"._QXZ("RECORDINGS FOR THIS TIME PERIOD: (10000 record limit)")." <a href='$download_link&file_download=8'>["._QXZ("DOWNLOAD")."]</a></B>\n";
|
$MAIN.="<B>"._QXZ("RECORDINGS FOR THIS TIME PERIOD: (10000 record limit)")." <a href='$download_link&file_download=8'>["._QXZ("DOWNLOAD")."]</a></B>\n";
|
||||||
$MAIN.="<TABLE width=900 cellspacing=0 cellpadding=1>\n";
|
$MAIN.="<TABLE width=900 cellspacing=0 cellpadding=1>\n";
|
||||||
$MAIN.="<tr><td><font size=1># </td>$agent_column<td align=left><font size=2> "._QXZ("LEAD")."</td><td><font size=2>"._QXZ("DATE/TIME")." </td><td align=left><font size=2>"._QXZ("SECONDS")." </td><td align=left><font size=2> "._QXZ("RECID")."</td><td align=center><font size=2>"._QXZ("FILENAME")."</td><td align=center><font size=2>"._QXZ("LOCATION")." </td>$mute_column</tr>\n";
|
$MAIN.="<tr><td><font size=1># </td>$agent_column<td align=left><font size=2> "._QXZ("LEAD")."</td>$ANI_column<td><font size=2>"._QXZ("DATE/TIME")." </td><td align=left><font size=2>"._QXZ("SECONDS")." </td><td align=left><font size=2> "._QXZ("RECID")."</td><td align=center><font size=2>"._QXZ("FILENAME")."</td><td align=center><font size=2>"._QXZ("LOCATION")." </td>$mute_column</tr>\n";
|
||||||
$CSV_text8.="\""._QXZ("RECORDINGS FOR THIS TIME PERIOD: (10000 record limit)")."\"\n";
|
$CSV_text8.="\""._QXZ("RECORDINGS FOR THIS TIME PERIOD: (10000 record limit)")."\"\n";
|
||||||
$CSV_text8.="\"\",\"#\"$agent_column_csv,\""._QXZ("LEAD")."\",\""._QXZ("DATE/TIME")."\",\""._QXZ("SECONDS")."\",\""._QXZ("RECID")."\",\""._QXZ("FILENAME")."\",\""._QXZ("LOCATION")."\"$mute_column_csv\n";
|
$CSV_text8.="\"\",\"#\"$agent_column_csv,\""._QXZ("LEAD")."\",\"$ANI_column_csv\",\""._QXZ("DATE/TIME")."\",\""._QXZ("SECONDS")."\",\""._QXZ("RECID")."\",\""._QXZ("FILENAME")."\",\""._QXZ("LOCATION")."\"$mute_column_csv\n";
|
||||||
|
|
||||||
if (strlen($query_call_status) > 5)
|
if (strlen($query_call_status) > 5)
|
||||||
{
|
{
|
||||||
@@ -1427,6 +1440,7 @@ else
|
|||||||
$stmt="SELECT recording_id,channel,server_ip,extension,start_time,start_epoch,end_time,end_epoch,length_in_sec,length_in_min,filename,location,lead_id,user,vicidial_id from ".$recording_log_table." where user='" . mysqli_real_escape_string($link, $user) . "' and start_time >= '" . mysqli_real_escape_string($link, $begin_date) . " 0:00:01' and start_time <= '" . mysqli_real_escape_string($link, $end_date) . " 23:59:59' $CS_vicidial_id_list_SQL order by recording_id desc limit 10000;";
|
$stmt="SELECT recording_id,channel,server_ip,extension,start_time,start_epoch,end_time,end_epoch,length_in_sec,length_in_min,filename,location,lead_id,user,vicidial_id from ".$recording_log_table." where user='" . mysqli_real_escape_string($link, $user) . "' and start_time >= '" . mysqli_real_escape_string($link, $begin_date) . " 0:00:01' and start_time <= '" . mysqli_real_escape_string($link, $end_date) . " 23:59:59' $CS_vicidial_id_list_SQL order by recording_id desc limit 10000;";
|
||||||
$rslt=mysql_to_mysqli($stmt, $link);
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
$logs_to_print = mysqli_num_rows($rslt);
|
$logs_to_print = mysqli_num_rows($rslt);
|
||||||
|
if ($DB) {$MAIN.="agent activity|$stmt|";}
|
||||||
|
|
||||||
$u=0;
|
$u=0;
|
||||||
while ($logs_to_print > $u)
|
while ($logs_to_print > $u)
|
||||||
@@ -1439,6 +1453,7 @@ else
|
|||||||
|
|
||||||
$location = $row[11];
|
$location = $row[11];
|
||||||
$CSV_location=$row[11];
|
$CSV_location=$row[11];
|
||||||
|
$vicidial_id=$row[14];
|
||||||
|
|
||||||
if (strlen($location)>2)
|
if (strlen($location)>2)
|
||||||
{
|
{
|
||||||
@@ -1489,6 +1504,17 @@ else
|
|||||||
$rowx=mysqli_fetch_row($rsltx);
|
$rowx=mysqli_fetch_row($rsltx);
|
||||||
$agent_user = $rowx[0];
|
$agent_user = $rowx[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ANI='';
|
||||||
|
$ANI_stmt="SELECT caller_code from call_log where uniqueid='$vicidial_id' order by event_time;";
|
||||||
|
$ANI_rslt=mysql_to_mysqli($ANI_stmt, $link);
|
||||||
|
$ANI_logs_to_print = mysqli_num_rows($ANI_rslt);
|
||||||
|
if ($ANI_logs_to_print > 0)
|
||||||
|
{
|
||||||
|
$ANI_row=mysqli_fetch_row($ANI_rslt);
|
||||||
|
$ANI = $ANI_row[0];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen($location)>30)
|
if (strlen($location)>30)
|
||||||
@@ -1515,6 +1541,11 @@ else
|
|||||||
$NVAuser_csv_record=",\"$agent_user\"";
|
$NVAuser_csv_record=",\"$agent_user\"";
|
||||||
}
|
}
|
||||||
$MAIN.="<td align=left><font size=2> <A HREF=\"admin_modify_lead.php?lead_id=$row[12]\" target=\"_blank\">$row[12]</A> </td>";
|
$MAIN.="<td align=left><font size=2> <A HREF=\"admin_modify_lead.php?lead_id=$row[12]\" target=\"_blank\">$row[12]</A> </td>";
|
||||||
|
if ($NVAuser > 0)
|
||||||
|
{
|
||||||
|
$MAIN.="<td align=right><font size=2> $ANI </td>\n";
|
||||||
|
$NVAuser_csv_record=",\"$ANI\"";
|
||||||
|
}
|
||||||
$MAIN.="<td align=left><font size=2> $row[4] </td>\n";
|
$MAIN.="<td align=left><font size=2> $row[4] </td>\n";
|
||||||
$MAIN.="<td align=left><font size=2> $row[8] </td>\n";
|
$MAIN.="<td align=left><font size=2> $row[8] </td>\n";
|
||||||
$MAIN.="<td align=left><font size=2> $row[0] </td>\n";
|
$MAIN.="<td align=left><font size=2> $row[0] </td>\n";
|
||||||
@@ -1826,3 +1857,4 @@ $rslt=mysql_to_mysqli($stmt, $link);
|
|||||||
exit;
|
exit;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user