Added User Group viewable report entry for Front Page System Summary
Added archive log search and display in modify lead page git-svn-id: svn://192.168.202.10@2165 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -80,6 +80,10 @@ OTHER CHANGES:
|
||||
9. Added System Setting option to use 24-hour time for callback setting in agent
|
||||
screen.
|
||||
|
||||
10. Added User Group viewable report entry for Front Page System Summary
|
||||
|
||||
11. Added archive log search and display in modify lead page
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+210
-184
@@ -111,7 +111,7 @@ $QUERY_STRING = getenv("QUERY_STRING");
|
||||
|
||||
$Vreports = 'NONE, Real-Time Main Report, Real-Time Campaign Summary , Inbound Report, Inbound Service Level Report, Inbound Summary Hourly Report, Inbound Daily Report, Inbound DID Report, Inbound IVR Report, Outbound Calling Report, Outbound Summary Interval Report, Outbound IVR Report, Fronter - Closer Report, Lists Campaign Statuses Report, Campaign Status List Report, Export Calls Report, Export Leads Report , Agent Time Detail, Agent Status Detail, Agent Performance Detail, Team Performance Detail, Performance Comparison Report, Single Agent Daily, User Group Login Report, User Timeclock Report, User Group Timeclock Status Report, User Timeclock Detail Report , Server Performance Report, Administration Change Log, List Update Stats, User Stats, User Time Sheet, Download List, Dialer Inventory Report, Maximum System Stats, Maximum Stats Detail, Search Leads Logs, Email Log Report, Carrier Log Report, Campaign Debug, Hangup Cause Report, Lists Pass Report, Called Counts List IDs Report';
|
||||
|
||||
$UGreports = 'ALL REPORTS, NONE, Real-Time Main Report, Real-Time Campaign Summary , Inbound Report, Inbound Service Level Report, Inbound Summary Hourly Report, Inbound Daily Report, Inbound DID Report, Inbound Email Report, Inbound IVR Report, Outbound Calling Report, Outbound Summary Interval Report, Outbound IVR Report, Fronter - Closer Report, Lists Campaign Statuses Report, Campaign Status List Report, Export Calls Report , Export Leads Report , Agent Time Detail, Agent Status Detail, Agent Performance Detail, Team Performance Detail, Performance Comparison Report, Single Agent Daily, User Group Login Report, User Timeclock Report, User Group Timeclock Status Report, User Timeclock Detail Report , Server Performance Report, Administration Change Log, List Update Stats, User Stats, User Time Sheet, Download List, Dialer Inventory Report, Custom Reports Links, CallCard Search, Maximum System Stats, Maximum Stats Detail, Search Leads Logs, Email Log Report, Lists Pass Report, Called Counts List IDs Report';
|
||||
$UGreports = 'ALL REPORTS, NONE, Real-Time Main Report, Real-Time Campaign Summary , Inbound Report, Inbound Service Level Report, Inbound Summary Hourly Report, Inbound Daily Report, Inbound DID Report, Inbound Email Report, Inbound IVR Report, Outbound Calling Report, Outbound Summary Interval Report, Outbound IVR Report, Fronter - Closer Report, Lists Campaign Statuses Report, Campaign Status List Report, Export Calls Report , Export Leads Report , Agent Time Detail, Agent Status Detail, Agent Performance Detail, Team Performance Detail, Performance Comparison Report, Single Agent Daily, User Group Login Report, User Timeclock Report, User Group Timeclock Status Report, User Timeclock Detail Report , Server Performance Report, Administration Change Log, List Update Stats, User Stats, User Time Sheet, Download List, Dialer Inventory Report, Custom Reports Links, CallCard Search, Maximum System Stats, Maximum Stats Detail, Search Leads Logs, Email Log Report, Lists Pass Report, Called Counts List IDs Report, Front Page System Summary';
|
||||
|
||||
$Vtables = 'NONE,log_noanswer,did_agent_log,contact_information';
|
||||
|
||||
@@ -3352,12 +3352,13 @@ else
|
||||
# 140625-1931 - Added wrapup_after_hotkey campaign option
|
||||
# 140706-0829 - Incorporated QC includes into code
|
||||
# 140706-0927 - Added callback_time_24hour system setting
|
||||
# 140817-0928 - Added User Group report permission for the Front Page System Summary report
|
||||
#
|
||||
|
||||
# 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.10-448a';
|
||||
$build = '140706-0927';
|
||||
$admin_version = '2.10-449a';
|
||||
$build = '140817-0928';
|
||||
|
||||
$STARTtime = date("U");
|
||||
$SQLdate = date("Y-m-d H:i:s");
|
||||
@@ -32789,203 +32790,228 @@ if ($ADD==999992)
|
||||
######################
|
||||
if ($ADD==999990)
|
||||
{
|
||||
$section_width=640;
|
||||
echo "<BR><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||
echo "<center><TABLE width=$section_width cellspacing=2>\n";
|
||||
echo "<tr>";
|
||||
echo "<td align='left' colspan='4'>System Summary:</td>";
|
||||
echo "</tr>";
|
||||
|
||||
$stmt="select closer_campaigns from vicidial_campaigns;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$closer_campaigns = preg_replace("/^ | -$/","",$row[0]);
|
||||
$closer_campaigns = preg_replace("/ /","','",$closer_campaigns);
|
||||
$closer_campaigns = "'$closer_campaigns'";
|
||||
|
||||
$stmt="select status from vicidial_auto_calls where status NOT IN('XFER') and ( (call_type='IN' and campaign_id IN($closer_campaigns)) or (call_type='OUT') );";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$active_calls=mysqli_num_rows($rslt);
|
||||
$ringing_calls=0;
|
||||
if ($active_calls>0) {
|
||||
while ($row=mysqli_fetch_row($rslt)) {
|
||||
if (!preg_match("/LIVE|CLOSER/i",$row[0]))
|
||||
{$ringing_calls++;}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$active_stmt="select active from vicidial_users";
|
||||
$active_rslt=mysql_to_mysqli($active_stmt, $link);
|
||||
while ($active_row=mysqli_fetch_array($active_rslt)) {
|
||||
$users[$active_row["active"]]++;
|
||||
}
|
||||
|
||||
$active_stmt="select active from vicidial_campaigns";
|
||||
$active_rslt=mysql_to_mysqli($active_stmt, $link);
|
||||
while ($active_row=mysqli_fetch_array($active_rslt)) {
|
||||
$campaigns[$active_row["active"]]++;
|
||||
}
|
||||
|
||||
$active_stmt="select active from vicidial_lists";
|
||||
$active_rslt=mysql_to_mysqli($active_stmt, $link);
|
||||
while ($active_row=mysqli_fetch_array($active_rslt)) {
|
||||
$lists[$active_row["active"]]++;
|
||||
}
|
||||
|
||||
$active_stmt="select did_active from vicidial_inbound_dids";
|
||||
$active_rslt=mysql_to_mysqli($active_stmt, $link);
|
||||
while ($active_row=mysqli_fetch_array($active_rslt)) {
|
||||
$dids[$active_row["did_active"]]++;
|
||||
}
|
||||
|
||||
$active_stmt="select active from vicidial_inbound_groups";
|
||||
$active_rslt=mysql_to_mysqli($active_stmt, $link);
|
||||
while ($active_row=mysqli_fetch_array($active_rslt)) {
|
||||
$ingroups[$active_row["active"]]++;
|
||||
}
|
||||
|
||||
$stmt="select extension,user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id from vicidial_live_agents";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$agent_incall=0; $agent_total=0;
|
||||
while($row=mysqli_fetch_array($rslt))
|
||||
if ( (preg_match("/Front Page System Summary/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) )
|
||||
{
|
||||
$status=$row[3];
|
||||
$agent_total++;
|
||||
if ( (preg_match("/INCALL/i",$status)) or (preg_match("/QUEUE/i",$status)) ) {$agent_incall++; }
|
||||
}
|
||||
if (preg_match("/MXAG/",$SShosted_settings))
|
||||
$section_width=640;
|
||||
echo "<BR><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||
echo "<center><TABLE width=$section_width cellspacing=2>\n";
|
||||
echo "<tr>";
|
||||
echo "<td align='left' colspan='4'>System Summary:</td>";
|
||||
echo "</tr>";
|
||||
|
||||
$stmt="SELECT closer_campaigns from vicidial_campaigns;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$closer_campaigns = preg_replace("/^ | -$/","",$row[0]);
|
||||
$closer_campaigns = preg_replace("/ /","','",$closer_campaigns);
|
||||
$closer_campaigns = "'$closer_campaigns'";
|
||||
|
||||
$stmt="SELECT status from vicidial_auto_calls where status NOT IN('XFER') and ( (call_type='IN' and campaign_id IN($closer_campaigns)) or (call_type='OUT') );";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$active_calls=mysqli_num_rows($rslt);
|
||||
$ringing_calls=0;
|
||||
if ($active_calls>0)
|
||||
{
|
||||
$vla_set = $SShosted_settings;
|
||||
$vla_set = preg_replace("/.*MXAG|_BUILD_|DRA| /",'',$vla_set);
|
||||
$vla_set = preg_replace('/[^0-9]/','',$vla_set);
|
||||
if (strlen($vla_set)>0)
|
||||
while ($row=mysqli_fetch_row($rslt))
|
||||
{
|
||||
$AAf=''; $AAb='';
|
||||
if ($agent_total >= $vla_set)
|
||||
{$AAf='<font color=red>'; $AAb='<font>';}
|
||||
$agent_total = "$AAf$agent_total / $vla_set$AAb";
|
||||
if (!preg_match("/LIVE|CLOSER/i",$row[0]))
|
||||
{$ringing_calls++;}
|
||||
}
|
||||
}
|
||||
|
||||
echo "<tr bgcolor=black>";
|
||||
echo "<td nowrap><font size='+1' color=white><B> Agents Logged In </B></font></td>";
|
||||
echo "<td nowrap><font size='+1' color=white><B> Agents In Calls </B></font></td>";
|
||||
echo "<td nowrap><font size='+1' color=white><B> Active Calls </B></font></td>";
|
||||
echo "<td nowrap><font size='+1' color=white><B> Calls Ringing </B></font></td>";
|
||||
echo "</tr>";
|
||||
echo "<tr bgcolor='#B9CBFD'>";
|
||||
echo "<td align='center'><font size='+1'> $agent_total </font></td>";
|
||||
echo "<td align='center'><font size='+1'> $agent_incall </font></td>";
|
||||
echo "<td align='center'><font size='+1'> $active_calls </font></td>";
|
||||
echo "<td align='center'><font size='+1'> $ringing_calls </font></td>";
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td align='left' colspan='4'> </td>"; # Padding
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr bgcolor=black>";
|
||||
echo "<td align='center'><font color=white><B> Records </B></font></td>";
|
||||
echo "<td align='center'><font color=white><B> Active </B></font></td>";
|
||||
echo "<td align='center'><font color=white><B> Inactive </B></font></td>";
|
||||
echo "<td align='center'><font color=white><B> Total </B></font></td>";
|
||||
echo "</tr>";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right><a href='$PHP_SELF?ADD=0A'>Users: </a></td><td align=center><b>".($users["Y"]+0)."</b></td><td align=center><b>".($users["N"]+0)."</b></td><td align=center><b>".($users["Y"]+$users["N"]+0)."</b></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right><a href='$PHP_SELF?ADD=10'>Campaigns: </a></td><td align=center><b>".($campaigns["Y"]+0)."</b></td><td align=center><b>".($campaigns["N"]+0)."</b></td><td align=center><b>".($campaigns["Y"]+$campaigns["N"]+0)."</b></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right><a href='$PHP_SELF?ADD=100'>Lists: </a></td><td align=center><b>".($lists["Y"]+0)."</b></td><td align=center><b>".($lists["N"]+0)."</b></td><td align=center><b>".($lists["Y"]+$lists["N"]+0)."</b></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right><a href='$PHP_SELF?ADD=1000'>In-Groups: </a></td><td align=center><b>".($ingroups["Y"]+0)."</b></td><td align=center><b>".($ingroups["N"]+0)."</b></td><td align=center><b>".($ingroups["Y"]+$ingroups["N"]+0)."</b></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right><a href='$PHP_SELF?ADD=1300'>DIDs: </a></td><td align=center><b>".($dids["Y"]+0)."</b></td><td align=center><b>".($dids["N"]+0)."</b></td><td align=center><b>".($dids["Y"]+$dids["N"]+0)."</b></td></tr>\n";
|
||||
|
||||
echo "</TABLE></center>\n";
|
||||
|
||||
echo "<BR>\n";
|
||||
|
||||
|
||||
$today=date("Y-m-d");
|
||||
$yesterday=date("Y-m-d", mktime(0,0,0,date("m"),date("d")-1,date("Y")));
|
||||
$thirtydays=date("Y-m-d", mktime(0,0,0,date("m"),date("d")-29,date("Y")));
|
||||
|
||||
$total_calls=0;
|
||||
$total_inbound=0;
|
||||
$total_outbound=0;
|
||||
$stmt="SELECT stats_type,sum(total_calls) from vicidial_daily_max_stats where campaign_id!='' and stats_flag='OPEN' and stats_date='$today' group by stats_type;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$rows_to_print = mysqli_num_rows($rslt);
|
||||
if ($rows_to_print > 0)
|
||||
{
|
||||
while ($rowx=mysqli_fetch_row($rslt))
|
||||
$active_stmt="select active from vicidial_users";
|
||||
$active_rslt=mysql_to_mysqli($active_stmt, $link);
|
||||
while ($active_row=mysqli_fetch_array($active_rslt))
|
||||
{
|
||||
$total_calls += $rowx[1];
|
||||
if (preg_match('/INGROUP/', $rowx[0])) {$total_inbound+=$rowx[1];}
|
||||
if (preg_match('/CAMPAIGN/', $rowx[0])) {$total_outbound+=$rowx[1];}
|
||||
$users[$active_row["active"]]++;
|
||||
}
|
||||
}
|
||||
|
||||
$active_stmt="select active from vicidial_campaigns";
|
||||
$active_rslt=mysql_to_mysqli($active_stmt, $link);
|
||||
while ($active_row=mysqli_fetch_array($active_rslt))
|
||||
{
|
||||
$campaigns[$active_row["active"]]++;
|
||||
}
|
||||
|
||||
$stmt="select * from vicidial_daily_max_stats where stats_date='$today' and stats_flag='OPEN' and stats_type='TOTAL' order by stats_date, campaign_id asc";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr>";
|
||||
echo "<td align='left' colspan='3'>Total Stats for Today:</td>";
|
||||
echo "<td align='right'><font size=1><a href='$PHP_SELF?query_date=$thirtydays&end_date=$today&max_system_stats_submit=ADJUST+DATE+RANGE&ADD=999992&stage=TOTAL'>[view max stats]</a></font></td>";
|
||||
echo "</tr>";
|
||||
echo "<tr bgcolor=black>";
|
||||
# echo "<td><font size=1 color=white align=left><B>CAMPAIGN ID</B></font></td>";
|
||||
echo "<td><font size=1 color=white><B> Total Calls </B></font></td>";
|
||||
echo "<td><font size=1 color=white><B> Total Inbound Calls </B></font></td>";
|
||||
echo "<td><font size=1 color=white><B> Total Outbound Calls </B></font></td>";
|
||||
echo "<td><font size=1 color=white><B> Maximum Agents </B></font></td>";
|
||||
$active_stmt="select active from vicidial_lists";
|
||||
$active_rslt=mysql_to_mysqli($active_stmt, $link);
|
||||
while ($active_row=mysqli_fetch_array($active_rslt))
|
||||
{
|
||||
$lists[$active_row["active"]]++;
|
||||
}
|
||||
|
||||
if (mysqli_num_rows($rslt)>0) {
|
||||
while ($row=mysqli_fetch_array($rslt)) {
|
||||
echo "<tr bgcolor='#B9CBFD'>";
|
||||
# echo "<td align='left'><font size=1>".$row["campaign_id"]."</font></td>";
|
||||
echo "<td align='center'><font size=1>".($total_calls+0)."</font></td>";
|
||||
echo "<td align='center'><font size=1>".($total_inbound+0)."</font></td>";
|
||||
echo "<td align='center'><font size=1>".($total_outbound+0)."</font></td>";
|
||||
echo "<td align='center'><font size=1>".($row["max_agents"]+0)."</font></td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
} else {
|
||||
echo "<tr bgcolor='#B9CBFD'>";
|
||||
echo "<td align='center' colspan='4'><font size=1>*** NO ACTIVITY FOR $today ***</font></td>";
|
||||
$active_stmt="select did_active from vicidial_inbound_dids";
|
||||
$active_rslt=mysql_to_mysqli($active_stmt, $link);
|
||||
while ($active_row=mysqli_fetch_array($active_rslt))
|
||||
{
|
||||
$dids[$active_row["did_active"]]++;
|
||||
}
|
||||
|
||||
$active_stmt="select active from vicidial_inbound_groups";
|
||||
$active_rslt=mysql_to_mysqli($active_stmt, $link);
|
||||
while ($active_row=mysqli_fetch_array($active_rslt))
|
||||
{
|
||||
$ingroups[$active_row["active"]]++;
|
||||
}
|
||||
|
||||
$stmt="SELECT extension,user,conf_exten,status,server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,campaign_id from vicidial_live_agents";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$agent_incall=0; $agent_total=0;
|
||||
while($row=mysqli_fetch_array($rslt))
|
||||
{
|
||||
$status=$row[3];
|
||||
$agent_total++;
|
||||
if ( (preg_match("/INCALL/i",$status)) or (preg_match("/QUEUE/i",$status)) ) {$agent_incall++; }
|
||||
}
|
||||
if (preg_match("/MXAG/",$SShosted_settings))
|
||||
{
|
||||
$vla_set = $SShosted_settings;
|
||||
$vla_set = preg_replace("/.*MXAG|_BUILD_|DRA| /",'',$vla_set);
|
||||
$vla_set = preg_replace('/[^0-9]/','',$vla_set);
|
||||
if (strlen($vla_set)>0)
|
||||
{
|
||||
$AAf=''; $AAb='';
|
||||
if ($agent_total >= $vla_set)
|
||||
{$AAf='<font color=red>'; $AAb='<font>';}
|
||||
$agent_total = "$AAf$agent_total / $vla_set$AAb";
|
||||
}
|
||||
}
|
||||
|
||||
echo "<tr bgcolor=black>";
|
||||
echo "<td nowrap><font size='+1' color=white><B> Agents Logged In </B></font></td>";
|
||||
echo "<td nowrap><font size='+1' color=white><B> Agents In Calls </B></font></td>";
|
||||
echo "<td nowrap><font size='+1' color=white><B> Active Calls </B></font></td>";
|
||||
echo "<td nowrap><font size='+1' color=white><B> Calls Ringing </B></font></td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "</TABLE></center>\n";
|
||||
|
||||
$stmt="select * from vicidial_daily_max_stats where stats_date='$yesterday' and stats_type='TOTAL' order by stats_date, campaign_id asc";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr>";
|
||||
echo "<td align='left' colspan='3'>Total Stats for Yesterday:</td>";
|
||||
echo "<td align='right'><font size=1><a href='$PHP_SELF?query_date=$thirtydays&end_date=$today&max_system_stats_submit=ADJUST+DATE+RANGE&ADD=999992&stage=TOTAL'>[view max stats]</a></font></td>";
|
||||
echo "</tr>";
|
||||
echo "<tr bgcolor=black>";
|
||||
# echo "<td><font size=1 color=white align=left><B>CAMPAIGN ID</B></font></td>";
|
||||
echo "<td><font size=1 color=white><B> Total Calls </B></font></td>";
|
||||
echo "<td><font size=1 color=white><B> Total Inbound Calls </B></font></td>";
|
||||
echo "<td><font size=1 color=white><B> Total Outbound Calls </B></font></td>";
|
||||
echo "<td><font size=1 color=white><B> Maximum Agents </B></font></td>";
|
||||
|
||||
if (mysqli_num_rows($rslt)>0) {
|
||||
while ($row=mysqli_fetch_array($rslt)) {
|
||||
echo "<tr bgcolor='#B9CBFD'>";
|
||||
#echo "<td align='left'><font size=1>".$row["campaign_id"]."</font></td>";
|
||||
echo "<td align='center'><font size=1>".($row["total_calls"]+0)."</font></td>";
|
||||
echo "<td align='center'><font size=1>".($row["max_inbound"]+0)."</font></td>";
|
||||
echo "<td align='center'><font size=1>".($row["max_outbound"]+0)."</font></td>";
|
||||
echo "<td align='center'><font size=1>".($row["max_agents"]+0)."</font></td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
} else {
|
||||
echo "<tr bgcolor='#B9CBFD'>";
|
||||
echo "<td align='center' colspan='4'><font size=1>*** NO ACTIVITY FOR $today ***</font></td>";
|
||||
echo "<td align='center'><font size='+1'> $agent_total </font></td>";
|
||||
echo "<td align='center'><font size='+1'> $agent_incall </font></td>";
|
||||
echo "<td align='center'><font size='+1'> $active_calls </font></td>";
|
||||
echo "<td align='center'><font size='+1'> $ringing_calls </font></td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
echo "</FONT><BR><BR>";
|
||||
echo "<tr>";
|
||||
echo "<td align='left' colspan='4'> </td>"; # Padding
|
||||
echo "</tr>";
|
||||
|
||||
echo "<tr bgcolor=black>";
|
||||
echo "<td align='center'><font color=white><B> Records </B></font></td>";
|
||||
echo "<td align='center'><font color=white><B> Active </B></font></td>";
|
||||
echo "<td align='center'><font color=white><B> Inactive </B></font></td>";
|
||||
echo "<td align='center'><font color=white><B> Total </B></font></td>";
|
||||
echo "</tr>";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right><a href='$PHP_SELF?ADD=0A'>Users: </a></td><td align=center><b>".($users["Y"]+0)."</b></td><td align=center><b>".($users["N"]+0)."</b></td><td align=center><b>".($users["Y"]+$users["N"]+0)."</b></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right><a href='$PHP_SELF?ADD=10'>Campaigns: </a></td><td align=center><b>".($campaigns["Y"]+0)."</b></td><td align=center><b>".($campaigns["N"]+0)."</b></td><td align=center><b>".($campaigns["Y"]+$campaigns["N"]+0)."</b></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right><a href='$PHP_SELF?ADD=100'>Lists: </a></td><td align=center><b>".($lists["Y"]+0)."</b></td><td align=center><b>".($lists["N"]+0)."</b></td><td align=center><b>".($lists["Y"]+$lists["N"]+0)."</b></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right><a href='$PHP_SELF?ADD=1000'>In-Groups: </a></td><td align=center><b>".($ingroups["Y"]+0)."</b></td><td align=center><b>".($ingroups["N"]+0)."</b></td><td align=center><b>".($ingroups["Y"]+$ingroups["N"]+0)."</b></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right><a href='$PHP_SELF?ADD=1300'>DIDs: </a></td><td align=center><b>".($dids["Y"]+0)."</b></td><td align=center><b>".($dids["N"]+0)."</b></td><td align=center><b>".($dids["Y"]+$dids["N"]+0)."</b></td></tr>\n";
|
||||
|
||||
echo "</TABLE></center>\n";
|
||||
|
||||
echo "<BR>\n";
|
||||
|
||||
$today=date("Y-m-d");
|
||||
$yesterday=date("Y-m-d", mktime(0,0,0,date("m"),date("d")-1,date("Y")));
|
||||
$thirtydays=date("Y-m-d", mktime(0,0,0,date("m"),date("d")-29,date("Y")));
|
||||
|
||||
$total_calls=0;
|
||||
$total_inbound=0;
|
||||
$total_outbound=0;
|
||||
$stmt="SELECT stats_type,sum(total_calls) from vicidial_daily_max_stats where campaign_id!='' and stats_flag='OPEN' and stats_date='$today' group by stats_type;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$rows_to_print = mysqli_num_rows($rslt);
|
||||
if ($rows_to_print > 0)
|
||||
{
|
||||
while ($rowx=mysqli_fetch_row($rslt))
|
||||
{
|
||||
$total_calls += $rowx[1];
|
||||
if (preg_match('/INGROUP/', $rowx[0])) {$total_inbound+=$rowx[1];}
|
||||
if (preg_match('/CAMPAIGN/', $rowx[0])) {$total_outbound+=$rowx[1];}
|
||||
}
|
||||
}
|
||||
|
||||
$stmt="SELECT * from vicidial_daily_max_stats where stats_date='$today' and stats_flag='OPEN' and stats_type='TOTAL' order by stats_date, campaign_id asc";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr>";
|
||||
echo "<td align='left' colspan='3'>Total Stats for Today:</td>";
|
||||
echo "<td align='right'><font size=1><a href='$PHP_SELF?query_date=$thirtydays&end_date=$today&max_system_stats_submit=ADJUST+DATE+RANGE&ADD=999992&stage=TOTAL'>[view max stats]</a></font></td>";
|
||||
echo "</tr>";
|
||||
echo "<tr bgcolor=black>";
|
||||
# echo "<td><font size=1 color=white align=left><B>CAMPAIGN ID</B></font></td>";
|
||||
echo "<td><font size=1 color=white><B> Total Calls </B></font></td>";
|
||||
echo "<td><font size=1 color=white><B> Total Inbound Calls </B></font></td>";
|
||||
echo "<td><font size=1 color=white><B> Total Outbound Calls </B></font></td>";
|
||||
echo "<td><font size=1 color=white><B> Maximum Agents </B></font></td>";
|
||||
|
||||
if (mysqli_num_rows($rslt)>0)
|
||||
{
|
||||
while ($row=mysqli_fetch_array($rslt))
|
||||
{
|
||||
echo "<tr bgcolor='#B9CBFD'>";
|
||||
# echo "<td align='left'><font size=1>".$row["campaign_id"]."</font></td>";
|
||||
echo "<td align='center'><font size=1>".($total_calls+0)."</font></td>";
|
||||
echo "<td align='center'><font size=1>".($total_inbound+0)."</font></td>";
|
||||
echo "<td align='center'><font size=1>".($total_outbound+0)."</font></td>";
|
||||
echo "<td align='center'><font size=1>".($row["max_agents"]+0)."</font></td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<tr bgcolor='#B9CBFD'>";
|
||||
echo "<td align='center' colspan='4'><font size=1>*** NO ACTIVITY FOR $today ***</font></td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "</TABLE></center>\n";
|
||||
|
||||
$stmt="SELECT * from vicidial_daily_max_stats where stats_date='$yesterday' and stats_type='TOTAL' order by stats_date, campaign_id asc";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
echo "<center><TABLE width=$section_width cellspacing=0 cellpadding=1>\n";
|
||||
echo "<tr>";
|
||||
echo "<td align='left' colspan='3'>Total Stats for Yesterday:</td>";
|
||||
echo "<td align='right'><font size=1><a href='$PHP_SELF?query_date=$thirtydays&end_date=$today&max_system_stats_submit=ADJUST+DATE+RANGE&ADD=999992&stage=TOTAL'>[view max stats]</a></font></td>";
|
||||
echo "</tr>";
|
||||
echo "<tr bgcolor=black>";
|
||||
# echo "<td><font size=1 color=white align=left><B>CAMPAIGN ID</B></font></td>";
|
||||
echo "<td><font size=1 color=white><B> Total Calls </B></font></td>";
|
||||
echo "<td><font size=1 color=white><B> Total Inbound Calls </B></font></td>";
|
||||
echo "<td><font size=1 color=white><B> Total Outbound Calls </B></font></td>";
|
||||
echo "<td><font size=1 color=white><B> Maximum Agents </B></font></td>";
|
||||
|
||||
if (mysqli_num_rows($rslt)>0)
|
||||
{
|
||||
while ($row=mysqli_fetch_array($rslt))
|
||||
{
|
||||
echo "<tr bgcolor='#B9CBFD'>";
|
||||
#echo "<td align='left'><font size=1>".$row["campaign_id"]."</font></td>";
|
||||
echo "<td align='center'><font size=1>".($row["total_calls"]+0)."</font></td>";
|
||||
echo "<td align='center'><font size=1>".($row["max_inbound"]+0)."</font></td>";
|
||||
echo "<td align='center'><font size=1>".($row["max_outbound"]+0)."</font></td>";
|
||||
echo "<td align='center'><font size=1>".($row["max_agents"]+0)."</font></td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<tr bgcolor='#B9CBFD'>";
|
||||
echo "<td align='center' colspan='4'><font size=1>*** NO ACTIVITY FOR $today ***</font></td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
echo "</FONT><BR><BR>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$section_width=640;
|
||||
echo "<BR><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||
echo "<center><TABLE width=$section_width cellspacing=2>\n";
|
||||
echo "<tr>";
|
||||
echo "<td align='left' colspan='4'>Welcome</td>";
|
||||
echo "</tr>";
|
||||
|
||||
echo "</FONT><BR><BR>";
|
||||
}
|
||||
}
|
||||
|
||||
##### If report run, update the time in the vicidial_report_log table #####
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
# 140125-1100 - Fixed issue with Callback records having no campaign_id
|
||||
# 140304-2034 - Fixed issue with special characters in standard data fields
|
||||
# 140706-0827 - Incorporated QC includes into code
|
||||
# 140817-0937 - Added Archive Log search option
|
||||
#
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
@@ -172,6 +173,8 @@ if (isset($_GET["CBstatus"])) {$CBstatus=$_GET["CBstatus"];}
|
||||
elseif (isset($_POST["CBstatus"])) {$CBstatus=$_POST["CBstatus"];}
|
||||
if (isset($_GET["archive_search"])) {$archive_search=$_GET["archive_search"];}
|
||||
elseif (isset($_POST["archive_search"])) {$archive_search=$_POST["archive_search"];}
|
||||
if (isset($_GET["archive_log"])) {$archive_log=$_GET["archive_log"];}
|
||||
elseif (isset($_POST["archive_log"])) {$archive_log=$_POST["archive_log"];}
|
||||
|
||||
if ($archive_search=="Yes") {$vl_table="vicidial_list_archive";}
|
||||
else {$vl_table="vicidial_list"; $archive_search="No";}
|
||||
@@ -429,7 +432,7 @@ if ($end_call > 0)
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
echo "information modified<BR><BR>\n";
|
||||
echo "<a href=\"$PHP_SELF?lead_id=$lead_id&DB=$DB&archive_search=$archive_search\">Go back to the lead modification page</a><BR><BR>\n";
|
||||
echo "<a href=\"$PHP_SELF?lead_id=$lead_id&DB=$DB&archive_search=$archive_search&archive_log=$archive_log\">Go back to the lead modification page</a><BR><BR>\n";
|
||||
echo "<form><input type=button value=\"Close This Window\" onClick=\"javascript:window.close();\"></form>\n";
|
||||
|
||||
### LOG INSERTION Admin Log Table ###
|
||||
@@ -599,6 +602,7 @@ else
|
||||
##### grab vicidial_list_alt_phones records #####
|
||||
$stmt="SELECT phone_code,phone_number,alt_phone_note,alt_phone_count,active from vicidial_list_alt_phones where lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' order by alt_phone_count limit 500;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$alts_to_print = mysqli_num_rows($rslt);
|
||||
|
||||
$c=0;
|
||||
@@ -631,6 +635,7 @@ else
|
||||
$stmt="SELECT uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed,user_group,term_reason,alt_dial from vicidial_log where lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' order by uniqueid desc limit 500;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$logs_to_print = mysqli_num_rows($rslt);
|
||||
if ($DB) {echo "$logs_to_print|$stmt\n";}
|
||||
|
||||
$u=0;
|
||||
$call_log = '';
|
||||
@@ -679,6 +684,7 @@ else
|
||||
$stmt="SELECT agent_log_id,user,server_ip,event_time,lead_id,campaign_id,pause_epoch,pause_sec,wait_epoch,wait_sec,talk_epoch,talk_sec,dispo_epoch,dispo_sec,status,user_group,comments,sub_status from vicidial_agent_log where lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' order by agent_log_id desc limit 500;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$Alogs_to_print = mysqli_num_rows($rslt);
|
||||
if ($DB) {echo "$Alogs_to_print|$stmt\n";}
|
||||
|
||||
$y=0;
|
||||
$agent_log = '';
|
||||
@@ -713,6 +719,7 @@ else
|
||||
$stmt="SELECT closecallid,lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed,queue_seconds,user_group,xfercallid,term_reason,uniqueid,agent_only from vicidial_closer_log where lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' order by closecallid desc limit 500;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$Clogs_to_print = mysqli_num_rows($rslt);
|
||||
if ($DB) {echo "$Clogs_to_print|$stmt\n";}
|
||||
|
||||
$y=0;
|
||||
$closer_log = '';
|
||||
@@ -757,6 +764,146 @@ else
|
||||
$campaign_id = $row[3];
|
||||
}
|
||||
|
||||
|
||||
########## BEGIN ARCHIVE LOG SEARCH ##########
|
||||
if ($archive_log == 'Yes')
|
||||
{
|
||||
##### grab vicidial_log_archive records #####
|
||||
$stmt="SELECT uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed,user_group,term_reason,alt_dial from vicidial_log_archive where lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' order by uniqueid desc limit 500;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$logs_to_print = mysqli_num_rows($rslt);
|
||||
if ($DB) {echo "$logs_to_print|$stmt\n";}
|
||||
|
||||
$u=0;
|
||||
# $call_log = '';
|
||||
# $log_campaign = '';
|
||||
while ($logs_to_print > $u)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
if (strlen($log_campaign)<1) {$log_campaign = $row[3];}
|
||||
if (preg_match("/1$|3$|5$|7$|9$/i", $u))
|
||||
{$bgcolor='bgcolor="#B9CBFD"';}
|
||||
else
|
||||
{$bgcolor='bgcolor="#9BB9FB"';}
|
||||
|
||||
$u++;
|
||||
$call_log .= "<tr $bgcolor>";
|
||||
$call_log .= "<td><font size=1>$u</td>";
|
||||
$call_log .= "<td><font size=2><font color='#FF0000'>$row[4]</font></td>";
|
||||
$call_log .= "<td align=left><font size=2> $row[7]</td>\n";
|
||||
$call_log .= "<td align=left><font size=2> $row[8]</td>\n";
|
||||
$call_log .= "<td align=left><font size=2> <A HREF=\"user_stats.php?user=$row[11]\" target=\"_blank\">$row[11]</A> </td>\n";
|
||||
$call_log .= "<td align=right><font size=2> $row[3] </td>\n";
|
||||
$call_log .= "<td align=right><font size=2> $row[2] </td>\n";
|
||||
$call_log .= "<td align=right><font size=2> $row[1] </td>\n";
|
||||
$call_log .= "<td align=right><font size=2> $row[15] </td>\n";
|
||||
$call_log .= "<td align=right><font size=2> $row[10] </td></tr>\n";
|
||||
|
||||
$stmtA="SELECT call_notes FROM vicidial_call_notes WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and vicidial_id='$row[0]';";
|
||||
$rsltA=mysql_to_mysqli($stmtA, $link);
|
||||
$out_notes_to_print = mysqli_num_rows($rslt);
|
||||
if ($out_notes_to_print > 0)
|
||||
{
|
||||
$rowA=mysqli_fetch_row($rsltA);
|
||||
if (strlen($rowA[0]) > 0)
|
||||
{
|
||||
$call_log .= "<TR>";
|
||||
$call_log .= "<td></td>";
|
||||
$call_log .= "<TD $bgcolor COLSPAN=9><font style=\"font-size:11px;font-family:sans-serif;\"> NOTES: $rowA[0] </font></TD>";
|
||||
$call_log .= "</TR>";
|
||||
}
|
||||
}
|
||||
|
||||
$campaign_id = $row[3];
|
||||
}
|
||||
|
||||
##### grab vicidial_agent_log_archive records #####
|
||||
$stmt="SELECT agent_log_id,user,server_ip,event_time,lead_id,campaign_id,pause_epoch,pause_sec,wait_epoch,wait_sec,talk_epoch,talk_sec,dispo_epoch,dispo_sec,status,user_group,comments,sub_status from vicidial_agent_log_archive where lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' order by agent_log_id desc limit 500;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$Alogs_to_print = mysqli_num_rows($rslt);
|
||||
if ($DB) {echo "$Alogs_to_print|$stmt\n";}
|
||||
|
||||
$y=0;
|
||||
# $agent_log = '';
|
||||
# $Alog_campaign = '';
|
||||
while ($Alogs_to_print > $y)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
if (strlen($Alog_campaign)<1) {$Alog_campaign = $row[5];}
|
||||
if (preg_match("/1$|3$|5$|7$|9$/i", $y))
|
||||
{$bgcolor='bgcolor="#B9CBFD"';}
|
||||
else
|
||||
{$bgcolor='bgcolor="#9BB9FB"';}
|
||||
|
||||
$y++;
|
||||
$agent_log .= "<tr $bgcolor>";
|
||||
$agent_log .= "<td><font size=1>$y</td>";
|
||||
$agent_log .= "<td><font size=2><font color='#FF0000'>$row[3]</font></td>";
|
||||
$agent_log .= "<td align=left><font size=2> $row[5]</td>\n";
|
||||
$agent_log .= "<td align=left><font size=2> <A HREF=\"user_stats.php?user=$row[1]\" target=\"_blank\">$row[1]</A> </td>\n";
|
||||
$agent_log .= "<td align=right><font size=2> $row[7]</td>\n";
|
||||
$agent_log .= "<td align=right><font size=2> $row[9] </td>\n";
|
||||
$agent_log .= "<td align=right><font size=2> $row[11] </td>\n";
|
||||
$agent_log .= "<td align=right><font size=2> $row[13] </td>\n";
|
||||
$agent_log .= "<td align=right><font size=2> $row[14] </td>\n";
|
||||
$agent_log .= "<td align=right><font size=2> $row[15] </td>\n";
|
||||
$agent_log .= "<td align=right><font size=2> $row[17] </td></tr>\n";
|
||||
|
||||
$campaign_id = $row[5];
|
||||
}
|
||||
|
||||
##### grab vicidial_closer_log_archive records #####
|
||||
$stmt="SELECT closecallid,lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed,queue_seconds,user_group,xfercallid,term_reason,uniqueid,agent_only from vicidial_closer_log_archive where lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' order by closecallid desc limit 500;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$Clogs_to_print = mysqli_num_rows($rslt);
|
||||
if ($DB) {echo "$Clogs_to_print|$stmt\n";}
|
||||
|
||||
$y=0;
|
||||
# $closer_log = '';
|
||||
# $Clog_campaign = '';
|
||||
while ($Clogs_to_print > $y)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
if (strlen($Clog_campaign)<1) {$Clog_campaign = $row[3];}
|
||||
if (preg_match("/1$|3$|5$|7$|9$/i", $y))
|
||||
{$bgcolor='bgcolor="#B9CBFD"';}
|
||||
else
|
||||
{$bgcolor='bgcolor="#9BB9FB"';}
|
||||
|
||||
$y++;
|
||||
$closer_log .= "<tr $bgcolor>";
|
||||
$closer_log .= "<td><font size=1>$y</td>";
|
||||
$closer_log .= "<td><font size=2><font color='#FF0000'>$row[4]</font></td>";
|
||||
$closer_log .= "<td align=left><font size=2> $row[7]</td>\n";
|
||||
$closer_log .= "<td align=left><font size=2> $row[8]</td>\n";
|
||||
$closer_log .= "<td align=left><font size=2> <A HREF=\"user_stats.php?user=$row[11]\" target=\"_blank\">$row[11]</A> </td>\n";
|
||||
$closer_log .= "<td align=right><font size=2> $row[3] </td>\n";
|
||||
$closer_log .= "<td align=right><font size=2> $row[2] </td>\n";
|
||||
$closer_log .= "<td align=right><font size=2> $row[1] </td>\n";
|
||||
$closer_log .= "<td align=right><font size=2> $row[14] </td>\n";
|
||||
$closer_log .= "<td align=right><font size=2> $row[17] </td></tr>\n";
|
||||
|
||||
$stmtA="SELECT call_notes FROM vicidial_call_notes WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and vicidial_id='$row[0]';";
|
||||
$rsltA=mysql_to_mysqli($stmtA, $link);
|
||||
$in_notes_to_print = mysqli_num_rows($rslt);
|
||||
if ($in_notes_to_print > 0)
|
||||
{
|
||||
$rowA=mysqli_fetch_row($rsltA);
|
||||
if (strlen($rowA[0]) > 0)
|
||||
{
|
||||
$closer_log .= "<TR>";
|
||||
$closer_log .= "<td></td>";
|
||||
$closer_log .= "<TD $bgcolor COLSPAN=9><font style=\"font-size:11px;font-family:sans-serif;\"> NOTES: $rowA[0] </font></TD>";
|
||||
$closer_log .= "</TR>";
|
||||
}
|
||||
}
|
||||
|
||||
$campaign_id = $row[3];
|
||||
}
|
||||
}
|
||||
########## END ARCHIVE LOG SEARCH ##########
|
||||
|
||||
|
||||
##### grab vicidial_list data for lead #####
|
||||
$stmt="SELECT lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,date_of_birth,alt_phone,email,security_phrase,comments,called_count,last_local_call_time,rank,owner,entry_list_id from $vl_table where lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' $LOGallowed_listsSQL";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
@@ -894,12 +1041,22 @@ else
|
||||
echo "<table cellpadding=1 cellspacing=0>\n";
|
||||
echo "<tr><td colspan=2>Lead ID: $lead_id List ID: $list_id</td></tr>\n";
|
||||
echo "<tr><td colspan=2>Fronter: <A HREF=\"user_stats.php?user=$tsr\">$tsr</A> Called Count: $called_count</td></tr>\n";
|
||||
if ($archive_search=="Yes") {
|
||||
if ($archive_search=="Yes")
|
||||
{
|
||||
echo "<tr><td colspan=2 align='center'>";
|
||||
echo "<B><font color='#FF0000'>*** ARCHIVED LEAD ***</font></B>";
|
||||
echo "<input type='hidden' name='archive_search' value='Yes'>";
|
||||
echo "</td></tr>\n";
|
||||
}
|
||||
}
|
||||
if ($archive_log=="Yes")
|
||||
{
|
||||
echo "<tr><td colspan=2 align='center'>";
|
||||
echo "<B><font color='#FF0000'>*** ARCHIVED LOG SEARCH ENABLED ***</font></B><BR>";
|
||||
echo "<B><font color='#FF0000'>*** ARCHIVED LOGS SHOWN IN RED, THERE MAY BE DUPLICATES WITH NON-ARCHIVED LOG ENTRIES ***</font></B>";
|
||||
echo "<input type='hidden' name='archive_log' value='Yes'>";
|
||||
echo "</td></tr>\n";
|
||||
}
|
||||
|
||||
if ($lead_id == 'NEW') {$list_id='';}
|
||||
|
||||
if ($LOGadmin_hide_lead_data != '0')
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
# 130926-2048 - Added option to search vicidial_list_archive table
|
||||
# 140724-1240 - Added the abilty to search the log archive tables
|
||||
# 140808-1117 - Added more admin logging
|
||||
# 140817-0941 - Added archive_log variable to modify page link
|
||||
#
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
@@ -113,6 +114,7 @@ $NOW_TIME = date("Y-m-d H:i:s");
|
||||
$date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
$log_archive_link=0;
|
||||
|
||||
if (strlen($alt_phone_search) < 2) {$alt_phone_search='No';}
|
||||
|
||||
@@ -637,12 +639,14 @@ else
|
||||
{
|
||||
$stmtA="SELECT lead_id,phone_number,campaign_id,call_date,status,user,list_id,length_in_sec,alt_dial from vicidial_log_archive where lead_id='" . mysqli_real_escape_string($link, $log_lead_id_archive) . "' $LOGallowed_listsSQL";
|
||||
$stmtB="SELECT lead_id,phone_number,campaign_id,call_date,status,user,list_id,length_in_sec from vicidial_closer_log_archive where lead_id='" . mysqli_real_escape_string($link, $log_lead_id_archive) . "' $LOGallowed_listsSQL";
|
||||
$log_archive_link='Yes';
|
||||
}
|
||||
if (strlen($log_phone_archive)>0)
|
||||
{
|
||||
$stmtA="SELECT lead_id,phone_number,campaign_id,call_date,status,user,list_id,length_in_sec,alt_dial from vicidial_log_archive where phone_number='" . mysqli_real_escape_string($link, $log_phone_archive) . "' $LOGallowed_listsSQL";
|
||||
$stmtB="SELECT lead_id,phone_number,campaign_id,call_date,status,user,list_id,length_in_sec from vicidial_closer_log_archive where phone_number='" . mysqli_real_escape_string($link, $log_phone_archive) . "' $LOGallowed_listsSQL";
|
||||
$stmtC="SELECT extension,caller_id_number,did_id,call_date from vicidial_did_log where caller_id_number='" . mysqli_real_escape_string($link, $log_phone_archive) . "'";
|
||||
$log_archive_link='Yes';
|
||||
}
|
||||
|
||||
if ( (strlen($slave_db_server)>5) and (preg_match("/$report_name/",$reports_use_slave_db)) )
|
||||
@@ -706,7 +710,7 @@ else
|
||||
{$bgcolor='bgcolor="#9BB9FB"';}
|
||||
echo "<TR $bgcolor>\n";
|
||||
echo "<TD ALIGN=LEFT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1>$o</FONT></TD>\n";
|
||||
echo "<TD ALIGN=CENTER><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1><a href=\"admin_modify_lead.php?lead_id=$row[0]&archive_search=$archive_search\" target=\"_blank\">$row[0]</a></FONT></TD>\n";
|
||||
echo "<TD ALIGN=CENTER><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1><a href=\"admin_modify_lead.php?lead_id=$row[0]&archive_search=$archive_search&archive_log=$log_archive_link\" target=\"_blank\">$row[0]</a></FONT></TD>\n";
|
||||
echo "<TD ALIGN=CENTER><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1>$row[1]</FONT></TD>\n";
|
||||
echo "<TD ALIGN=CENTER><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1>$row[2]</FONT></TD>\n";
|
||||
echo "<TD ALIGN=CENTER><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1>$row[3]</FONT></TD>\n";
|
||||
@@ -771,7 +775,7 @@ else
|
||||
{$bgcolor='bgcolor="#9BB9FB"';}
|
||||
echo "<TR $bgcolor>\n";
|
||||
echo "<TD ALIGN=LEFT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1>$o</FONT></TD>\n";
|
||||
echo "<TD ALIGN=CENTER><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1><a href=\"admin_modify_lead.php?lead_id=$row[0]&archive_search=$archive_search\" target=\"_blank\">$row[0]</a></FONT></TD>\n";
|
||||
echo "<TD ALIGN=CENTER><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1><a href=\"admin_modify_lead.php?lead_id=$row[0]&archive_search=$archive_search&archive_log=$log_archive_link\" target=\"_blank\">$row[0]</a></FONT></TD>\n";
|
||||
echo "<TD ALIGN=CENTER><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1>$row[1]</FONT></TD>\n";
|
||||
echo "<TD ALIGN=CENTER><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1>$row[2]</FONT></TD>\n";
|
||||
echo "<TD ALIGN=CENTER><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1>$row[3]</FONT></TD>\n";
|
||||
@@ -1078,7 +1082,7 @@ else
|
||||
{$bgcolor='bgcolor="#9BB9FB"';}
|
||||
echo "<TR $bgcolor>\n";
|
||||
echo "<TD ALIGN=LEFT><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1>$o</FONT></TD>\n";
|
||||
echo "<TD ALIGN=CENTER><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1><a href=\"admin_modify_lead.php?lead_id=$row[0]&archive_search=$archive_search\" target=\"_blank\">$row[0]</a></FONT></TD>\n";
|
||||
echo "<TD ALIGN=CENTER><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1><a href=\"admin_modify_lead.php?lead_id=$row[0]&archive_search=$archive_search&archive_log=$log_archive_link\" target=\"_blank\">$row[0]</a></FONT></TD>\n";
|
||||
echo "<TD ALIGN=CENTER><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1>$row[3]</FONT></TD>\n";
|
||||
echo "<TD ALIGN=CENTER><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1>$row[5]</FONT></TD>\n";
|
||||
echo "<TD ALIGN=CENTER><FONT FACE=\"ARIAL,HELVETICA\" SIZE=1>$row[4]</FONT></TD>\n";
|
||||
|
||||
Reference in New Issue
Block a user