Added filename_override option for Automated Reports, added more space for report_times
More cleanup of reports and formatting git-svn-id: svn://192.168.202.10@2809 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
# 170304-1400 - Added options for running a defined Automated Report, and admin logging
|
||||
# 170306-0915 - Fixed proper file extensions for different download report types
|
||||
# 170719-1242 - Added more debug and '8days' date option
|
||||
# 170825-1114 - Added report filename_override option
|
||||
#
|
||||
|
||||
$txt = '.txt';
|
||||
@@ -42,7 +43,7 @@ if ($min < 10) {$min = "0$min";}
|
||||
if ($sec < 10) {$sec = "0$sec";}
|
||||
$timestamp = "$year-$mon-$mday $hour:$min:$sec";
|
||||
$filedate = "$year$mon$mday";
|
||||
$ABIfiledate = "$mon-$mday-$year$us$hour$min$sec";
|
||||
$filedatetime = "$year$mon$mday$hour$min$sec";
|
||||
$shipdate = "$year-$mon-$mday";
|
||||
$start_date = "$year$mon$mday";
|
||||
$datestamp = "$year/$mon/$mday $hour:$min";
|
||||
@@ -464,7 +465,7 @@ if ( (length($report_id) > 1) || ($log_to_adminlog > 0) )
|
||||
if (length($report_id) > 1)
|
||||
{
|
||||
### Grab Server values from the database
|
||||
$stmtA = "SELECT report_destination,email_from,email_to,email_subject,ftp_server,ftp_user,ftp_pass,ftp_directory,report_url from vicidial_automated_reports where report_id='$report_id';";
|
||||
$stmtA = "SELECT report_destination,email_from,email_to,email_subject,ftp_server,ftp_user,ftp_pass,ftp_directory,report_url,filename_override from vicidial_automated_reports where report_id='$report_id';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
@@ -488,6 +489,7 @@ if (length($report_id) > 1)
|
||||
$VARREPORT_dir = $aryA[7];
|
||||
}
|
||||
$location = $aryA[8];
|
||||
$filename_override = $aryA[9];
|
||||
if ($DB) {print "RAW LOCATION: |$location|\n";}
|
||||
$location =~ s/\&/\\&/gi;
|
||||
$location =~ s/--A--today--B--/$year-$mon-$mday/gi;
|
||||
@@ -499,7 +501,19 @@ if (length($report_id) > 1)
|
||||
$location =~ s/--A--14days--B--/$Kyear-$Kmon-$Kmday/gi;
|
||||
$location =~ s/--A--15days--B--/$Lyear-$Lmon-$Lmday/gi;
|
||||
$location =~ s/--A--30days--B--/$Hyear-$Hmon-$Hmday/gi;
|
||||
if ($DB) {print "FINAL LOCATION: |$location|\n";}
|
||||
$filename_override =~ s/[^-_0-9a-zA-Z]//gi;
|
||||
$filename_override =~ s/--A--today--B--/$year-$mon-$mday/gi;
|
||||
$filename_override =~ s/--A--yesterday--B--/$Tyear-$Tmon-$Tmday/gi;
|
||||
$filename_override =~ s/--A--6days--B--/$Fyear-$Fmon-$Fmday/gi;
|
||||
$filename_override =~ s/--A--7days--B--/$Gyear-$Gmon-$Gmday/gi;
|
||||
$filename_override =~ s/--A--8days--B--/$Myear-$Mmon-$Mmday/gi;
|
||||
$filename_override =~ s/--A--13days--B--/$Jyear-$Jmon-$Jmday/gi;
|
||||
$filename_override =~ s/--A--14days--B--/$Kyear-$Kmon-$Kmday/gi;
|
||||
$filename_override =~ s/--A--15days--B--/$Lyear-$Lmon-$Lmday/gi;
|
||||
$filename_override =~ s/--A--30days--B--/$Hyear-$Hmon-$Hmday/gi;
|
||||
$filename_override =~ s/--A--filedatetime--B--/$filedatetime/gi;
|
||||
if ($DB) {print "FINAL LOCATION: |$location|\n";}
|
||||
if ($DB) {print "FILENAME OVERRIDE: |$filename_override|\n";}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -552,6 +566,8 @@ if (length($report_id) > 1)
|
||||
{$file_extension = '.csv'}
|
||||
}
|
||||
$HTMLfile = $report_id . "_" . $start_date . "_" . $hms . '' . $file_extension;
|
||||
if (length($filename_override) > 0)
|
||||
{$HTMLfile = "$filename_override$file_extension";}
|
||||
$HTMLfileLOG = $report_id . "_" . $start_date . "_" . $hms . '' . $txt;
|
||||
$shipdate='';
|
||||
}
|
||||
@@ -672,7 +688,7 @@ if (length($VARREPORT_host) > 7)
|
||||
use Net::FTP;
|
||||
|
||||
if (!$Q) {print "Sending File Over FTP: $HTMLfile\n";}
|
||||
$ftp = Net::FTP->new("$VARREPORT_host", Port => $VARREPORT_port);
|
||||
$ftp = Net::FTP->new("$VARREPORT_host", Port => $VARREPORT_port, Debug => $DBX);
|
||||
$ftp->login("$VARREPORT_user","$VARREPORT_pass");
|
||||
$ftp->cwd("$VARREPORT_dir");
|
||||
$ftp->put("/tmp/$HTMLfile", "$HTMLfile");
|
||||
|
||||
@@ -3650,7 +3650,7 @@ report_name VARCHAR(100),
|
||||
report_last_run DATETIME,
|
||||
report_last_length SMALLINT(5) default '0',
|
||||
report_server VARCHAR(30) default 'active_voicemail_server',
|
||||
report_times VARCHAR(100) default '',
|
||||
report_times VARCHAR(255) default '',
|
||||
report_weekdays VARCHAR(7) default '',
|
||||
report_monthdays VARCHAR(100) default '',
|
||||
report_destination ENUM('EMAIL','FTP') default 'EMAIL',
|
||||
@@ -3665,6 +3665,7 @@ report_url TEXT,
|
||||
run_now_trigger ENUM('N','Y') default 'N',
|
||||
active ENUM('N','Y') default 'N',
|
||||
user_group VARCHAR(20) default '---ALL---',
|
||||
filename_override VARCHAR(255) default '',
|
||||
index (report_times),
|
||||
index (run_now_trigger)
|
||||
) ENGINE=MyISAM;
|
||||
@@ -4064,4 +4065,4 @@ UPDATE vicidial_configuration set value='1766' where name='qc_database_version';
|
||||
|
||||
UPDATE system_settings set vdc_agent_api_active='1';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1513',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
UPDATE system_settings SET db_schema_version='1514',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
|
||||
@@ -355,3 +355,8 @@ UPDATE system_settings SET db_schema_version='1512',db_schema_update_date=NOW()
|
||||
ALTER TABLE system_settings ADD allow_manage_active_lists ENUM('0','1') default '0';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1513',db_schema_update_date=NOW() where db_schema_version < 1513;
|
||||
|
||||
ALTER TABLE vicidial_automated_reports ADD filename_override VARCHAR(255) default '';
|
||||
ALTER TABLE vicidial_automated_reports MODIFY report_times VARCHAR(255) default '';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1514',db_schema_update_date=NOW() where db_schema_version < 1514;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
# 170209-1237 - Added URL and IP display
|
||||
# 170210-0700 - Reworked Show URLs code to be faster
|
||||
# 170409-1553 - Added IP List validation code
|
||||
# 170823-2241 - Added HTML formatting and screen colors, fixed CSV output bug
|
||||
#
|
||||
|
||||
$startMS = microtime();
|
||||
@@ -493,6 +494,44 @@ while ($row=mysqli_fetch_array($rslt)) {
|
||||
array_push($results_array, $row["result"]);
|
||||
}
|
||||
|
||||
##### BEGIN Define colors and logo #####
|
||||
$SSmenu_background='015B91';
|
||||
$SSframe_background='D9E6FE';
|
||||
$SSstd_row1_background='9BB9FB';
|
||||
$SSstd_row2_background='B9CBFD';
|
||||
$SSstd_row3_background='8EBCFD';
|
||||
$SSstd_row4_background='B6D3FC';
|
||||
$SSstd_row5_background='FFFFFF';
|
||||
$SSalt_row1_background='BDFFBD';
|
||||
$SSalt_row2_background='99FF99';
|
||||
$SSalt_row3_background='CCFFCC';
|
||||
|
||||
$screen_color_stmt="select admin_screen_colors from system_settings";
|
||||
$screen_color_rslt=mysql_to_mysqli($screen_color_stmt, $link);
|
||||
$screen_color_row=mysqli_fetch_row($screen_color_rslt);
|
||||
$agent_screen_colors="$screen_color_row[0]";
|
||||
|
||||
if ($agent_screen_colors != 'default')
|
||||
{
|
||||
$asc_stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo FROM vicidial_screen_colors where colors_id='$agent_screen_colors';";
|
||||
$asc_rslt=mysql_to_mysqli($asc_stmt, $link);
|
||||
$qm_conf_ct = mysqli_num_rows($asc_rslt);
|
||||
if ($qm_conf_ct > 0)
|
||||
{
|
||||
$asc_row=mysqli_fetch_row($asc_rslt);
|
||||
$SSmenu_background = $asc_row[0];
|
||||
$SSframe_background = $asc_row[1];
|
||||
$SSstd_row1_background = $asc_row[2];
|
||||
$SSstd_row2_background = $asc_row[3];
|
||||
$SSstd_row3_background = $asc_row[4];
|
||||
$SSstd_row4_background = $asc_row[5];
|
||||
$SSstd_row5_background = $asc_row[6];
|
||||
$SSalt_row1_background = $asc_row[7];
|
||||
$SSalt_row2_background = $asc_row[8];
|
||||
$SSalt_row3_background = $asc_row[9];
|
||||
$SSweb_logo = $asc_row[10];
|
||||
}
|
||||
}
|
||||
|
||||
if ($DB) {echo "$user_group_string|$user_group_ct|$user_groupQS|$i<BR>\n";}
|
||||
|
||||
@@ -626,7 +665,11 @@ for ($o=0; $o<count($results_array); $o++)
|
||||
$HTML_text.="</SELECT>\n";
|
||||
$HTML_text.="</TD>\n";
|
||||
|
||||
$HTML_text.="<TD VALIGN='TOP'><BR><BR>";
|
||||
$HTML_text.="<TD VALIGN='TOP'>";
|
||||
$HTML_text.=_QXZ("Display as:")."<BR>";
|
||||
$HTML_text.="<select name='report_display_type'>";
|
||||
if ($report_display_type) {$HTML_text.="<option value='$report_display_type' selected>$report_display_type</option>";}
|
||||
$HTML_text.="<option value='TEXT'>TEXT</option><option value='HTML'>HTML</option></select>\n<BR><BR>";
|
||||
$HTML_text.="<INPUT TYPE=SUBMIT NAME=SUBMIT VALUE='"._QXZ("SUBMIT")."'>\n";
|
||||
$HTML_text.="<BR><BR><input type='checkbox' name='show_urls' value='checked' $show_urls>"._QXZ("Show URLs, slower")."\n";
|
||||
if ($archives_available=="Y")
|
||||
@@ -638,7 +681,7 @@ $HTML_text.="</TD>";
|
||||
$HTML_text.="</TR></TABLE>";
|
||||
$HTML_text.="</FORM>\n\n";
|
||||
|
||||
$HTML_text.="<PRE><FONT SIZE=2>\n";
|
||||
$TEXT.="<PRE><FONT SIZE=2>\n";
|
||||
|
||||
if ($SUBMIT && $api_date_D && $api_date_T && $api_date_end_D && $api_date_end_T)
|
||||
{
|
||||
@@ -653,23 +696,45 @@ if ($SUBMIT && $api_date_D && $api_date_T && $api_date_end_D && $api_date_end_T)
|
||||
$ASCII_border="+---------------------+--------------------------------+------------+----------------------+--------------------------------+------------+----------------------+----------+-----------+-----------+----------------------+----------\n";
|
||||
$URL_header=" REMOTE IP | URL";
|
||||
}
|
||||
$HTML_text.=$ASCII_rpt_header;
|
||||
$HTML_text.=sprintf("%110s", " ");
|
||||
$HTML_text.="<a href=\"$PHP_SELF?api_date_D=$api_date_D&api_date_T=$api_date_T&api_date_end_D=$api_date_end_D&api_date_end_T=$api_date_end_T$resultQS$functionQS$agent_userQS$userQS&file_download=1&show_urls=$show_urls&search_archived_data=$search_archived_data&SUBMIT=$SUBMIT\">"._QXZ("DOWNLOAD")."</a>\n";
|
||||
|
||||
$HTML_text.=$ASCII_border;
|
||||
$HTML_text.="| <a href='$LINKbase&order_by=api_date'>API DATE</a> | <a href='$LINKbase&order_by=user'>USER</a> | <a href='$LINKbase&order_by=api_script'>API SCRIPT</a> | <a href='$LINKbase&order_by=function'>FUNCTION</a> | <a href='$LINKbase&order_by=agent_user'>AGENT USER</a> | <a href='$LINKbase&order_by=result'>RESULT</a> | <a href='$LINKbase&order_by=source'>SOURCE</a> | <a href='$LINKbase&order_by=run_time'>RUN TIME</a> | <a href='$LINKbase&order_by=webserver'>WEBSERVER</a> | <a href='$LINKbase&order_by=api_url'>API URL</a> |$URL_header\n";
|
||||
$HTML_text.=$ASCII_border;
|
||||
$TEXT.=$ASCII_rpt_header;
|
||||
$TEXT.=sprintf("%110s", " ");
|
||||
$TEXT.="<a href=\"$PHP_SELF?api_date_D=$api_date_D&api_date_T=$api_date_T&api_date_end_D=$api_date_end_D&api_date_end_T=$api_date_end_T$resultQS$functionQS$agent_userQS$userQS&file_download=1&show_urls=$show_urls&search_archived_data=$search_archived_data&SUBMIT=$SUBMIT\">"._QXZ("DOWNLOAD")."</a>\n";
|
||||
$TEXT.=$ASCII_border;
|
||||
$TEXT.="| <a href='$LINKbase&order_by=api_date'>API DATE</a> | <a href='$LINKbase&order_by=user'>USER</a> | <a href='$LINKbase&order_by=api_script'>API SCRIPT</a> | <a href='$LINKbase&order_by=function'>FUNCTION</a> | <a href='$LINKbase&order_by=agent_user'>AGENT USER</a> | <a href='$LINKbase&order_by=result'>RESULT</a> | <a href='$LINKbase&order_by=source'>SOURCE</a> | <a href='$LINKbase&order_by=run_time'>RUN TIME</a> | <a href='$LINKbase&order_by=webserver'>WEBSERVER</a> | <a href='$LINKbase&order_by=api_url'>API URL</a> |$URL_header\n";
|
||||
$TEXT.=$ASCII_border;
|
||||
|
||||
$HTML.="<BR><table border='0' cellpadding='3' cellspacing='1'>";
|
||||
$HTML.="<tr bgcolor='#".$SSstd_row1_background."'>";
|
||||
$HTML.="<th colspan='".($show_urls ? "11" : "9")."'><font size='2'>$ASCII_rpt_header</font></th>";
|
||||
$HTML.="<th><font size='2'><a href=\"$PHP_SELF?api_date_D=$api_date_D&api_date_T=$api_date_T&api_date_end_D=$api_date_end_D&api_date_end_T=$api_date_end_T$resultQS$functionQS$agent_userQS$userQS&file_download=1&show_urls=$show_urls&search_archived_data=$search_archived_data&SUBMIT=$SUBMIT\">"._QXZ("DOWNLOAD")."</a></font></th>";
|
||||
$HTML.="</tr>\n";
|
||||
$HTML.="<tr bgcolor='#".$SSstd_row1_background."'>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("API DATE")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("USER")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("API SCRIPT")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("FUNCTION")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("AGENT USER")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("RESULT")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("SOURCE")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("RUN TIME")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("WEBSERVER")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("API URL")."</font></th>";
|
||||
|
||||
|
||||
if ($show_urls)
|
||||
{
|
||||
$CSV_text.="\n\"API DATE\",\"USER\",\"API SCRIPT\",\"FUNCTION\",\"AGENT USER\",\"VALUE\",\"RESULT\",\"RESULT REASON\",\"SOURCE\",\"DATA\",\"RUN TIME\",\"WEBSERVER\",\"API URL\",\"REMOTE IP\",\"FULL URL STRING\"\n";
|
||||
$HTML.="<th><font size='2'>"._QXZ("REMOTE IP")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("FULL URL STRING")."</font></th>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$CSV_text.="\n\"API DATE\",\"USER\",\"API SCRIPT\",\"FUNCTION\",\"AGENT USER\",\"VALUE\",\"RESULT\",\"RESULT REASON\",\"SOURCE\",\"DATA\",\"RUN TIME\",\"WEBSERVER\",\"API URL\"\n";
|
||||
}
|
||||
|
||||
$HTML.="</tr>\n";
|
||||
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$g=0;
|
||||
while ($row=mysqli_fetch_array($rslt))
|
||||
@@ -694,17 +759,30 @@ if ($SUBMIT && $api_date_D && $api_date_T && $api_date_end_D && $api_date_end_T)
|
||||
$h=0;
|
||||
while ($h < $g)
|
||||
{
|
||||
$HTML_text.="| ";
|
||||
$HTML_text.=sprintf("%-19s", $api_date[$h])." | ";
|
||||
$HTML_text.=sprintf("%-30s", $full_user[$h])." | ";
|
||||
$HTML_text.=sprintf("%-10s", $api_script[$h])." | ";
|
||||
$HTML_text.=sprintf("%-20s", $function[$h])." | ";
|
||||
$HTML_text.=sprintf("%-30s", $full_agent_user[$h])." | ";
|
||||
$HTML_text.=sprintf("%-10s", $result[$h])." | ";
|
||||
$HTML_text.=sprintf("%-20s", $source[$h])." | ";
|
||||
$HTML_text.=sprintf("%-8s", $run_time[$h])." | ";
|
||||
$HTML_text.=sprintf("%-9s", $webserver[$h])." | ";
|
||||
$HTML_text.=sprintf("%-9s", $api_url[$h])." | ";
|
||||
$TEXT.="| ";
|
||||
$TEXT.=sprintf("%-19s", $api_date[$h])." | ";
|
||||
$TEXT.=sprintf("%-30s", $full_user[$h])." | ";
|
||||
$TEXT.=sprintf("%-10s", $api_script[$h])." | ";
|
||||
$TEXT.=sprintf("%-20s", $function[$h])." | ";
|
||||
$TEXT.=sprintf("%-30s", $full_agent_user[$h])." | ";
|
||||
$TEXT.=sprintf("%-10s", $result[$h])." | ";
|
||||
$TEXT.=sprintf("%-20s", $source[$h])." | ";
|
||||
$TEXT.=sprintf("%-8s", $run_time[$h])." | ";
|
||||
$TEXT.=sprintf("%-9s", $webserver[$h])." | ";
|
||||
$TEXT.=sprintf("%-9s", $api_url[$h])." | ";
|
||||
|
||||
$HTML.="<tr bgcolor='#".$SSstd_row2_background."'>";
|
||||
$HTML.="<th><font size='2'>".$api_date[$h]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$full_user[$h]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$api_script[$h]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$function[$h]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$full_agent_user[$h]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$result[$h]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$source[$h]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$run_time[$h]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$webserver[$h]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$api_url[$h]."</font></th>";
|
||||
|
||||
if ($show_urls)
|
||||
{
|
||||
$stmt="select remote_ip,url from $vicidial_api_urls_table where api_id='$api_id[$h]';";
|
||||
@@ -716,22 +794,35 @@ if ($SUBMIT && $api_date_D && $api_date_T && $api_date_end_D && $api_date_end_T)
|
||||
$remote_ip = $row["remote_ip"];
|
||||
if ( ($VUmodify_same_user_level < 1) or ($VUuser_level < 9) or ($VUmodify_users < 1) )
|
||||
{$full_url = preg_replace("/&pass=[\s\S]+?&/",'&pass=XXXX&',$full_url);}
|
||||
$HTML_text.=sprintf("%-20s", $row["remote_ip"])." | ";
|
||||
$HTML_text.=sprintf("%-2000s", $full_url)." | ";
|
||||
$CSV_text.="\"$api_date[$h]\",\"$full_user[$h]\",\"$api_script[$h]\",\"$function[$h]\",\"$full_agent_user[$h]\",\"$value[$h]\",\"$result[$h]\",\"$result_reason[$h]\",\"$source[$h]\",\"$data[$h]\",\"$run_time[$h]\",\"$webserver[$h]\",\"$api_url[$h]\",\"$remote_ip\",\"$full_url\"\n";
|
||||
$TEXT.=sprintf("%-20s", $row["remote_ip"])." | ";
|
||||
$TEXT.=sprintf("%-2000s", $full_url)." | ";
|
||||
}
|
||||
$CSV_text.="\"$api_date[$h]\",\"$full_user[$h]\",\"$api_script[$h]\",\"$function[$h]\",\"$full_agent_user[$h]\",\"$value[$h]\",\"$result[$h]\",\"$result_reason[$h]\",\"$source[$h]\",\"$data[$h]\",\"$run_time[$h]\",\"$webserver[$h]\",\"$api_url[$h]\",\"$remote_ip\",\"$full_url\"\n";
|
||||
$HTML.="<th><font size='2'>".($remote_ip=="" ? " " : $remote_ip)."</font></th>";
|
||||
$HTML.="<th><font size='2'>".($full_url=="" ? " " : $full_url)."</font></th>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$CSV_text.="\"$api_date[$h]\",\"$full_user[$h]\",\"$api_script[$h]\",\"$function[$h]\",\"$full_agent_user[$h]\",\"$value[$h]\",\"$result[$h]\",\"$result_reason[$h]\",\"$source[$h]\",\"$data[$h]\",\"$run_time[$h]\",\"$webserver[$h]\",\"$api_url[$h]\"\n";
|
||||
}
|
||||
$HTML_text.="\n";
|
||||
$TEXT.="\n";
|
||||
$HTML.="</tr>";
|
||||
$h++;
|
||||
}
|
||||
|
||||
$HTML_text.=$ASCII_border;
|
||||
$TEXT.=$ASCII_border;
|
||||
$HTML.="</table>";
|
||||
}
|
||||
$HTML_text.="</FONT></PRE></BODY></HTML>";
|
||||
$TEXT.="</FONT></PRE>";
|
||||
|
||||
if ($report_display_type=="HTML") {
|
||||
$HTML_text.=$HTML;
|
||||
} else {
|
||||
$HTML_text.=$TEXT;
|
||||
}
|
||||
|
||||
|
||||
$HTML_text.="</BODY></HTML>";
|
||||
|
||||
|
||||
if ($file_download == 0 || !$file_download)
|
||||
|
||||
@@ -421,6 +421,45 @@ while ($i < $statcats_to_print)
|
||||
$i++;
|
||||
}
|
||||
|
||||
##### BEGIN Define colors and logo #####
|
||||
$SSmenu_background='015B91';
|
||||
$SSframe_background='D9E6FE';
|
||||
$SSstd_row1_background='9BB9FB';
|
||||
$SSstd_row2_background='B9CBFD';
|
||||
$SSstd_row3_background='8EBCFD';
|
||||
$SSstd_row4_background='B6D3FC';
|
||||
$SSstd_row5_background='FFFFFF';
|
||||
$SSalt_row1_background='BDFFBD';
|
||||
$SSalt_row2_background='99FF99';
|
||||
$SSalt_row3_background='CCFFCC';
|
||||
|
||||
$screen_color_stmt="select admin_screen_colors from system_settings";
|
||||
$screen_color_rslt=mysql_to_mysqli($screen_color_stmt, $link);
|
||||
$screen_color_row=mysqli_fetch_row($screen_color_rslt);
|
||||
$agent_screen_colors="$screen_color_row[0]";
|
||||
|
||||
if ($agent_screen_colors != 'default')
|
||||
{
|
||||
$asc_stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo FROM vicidial_screen_colors where colors_id='$agent_screen_colors';";
|
||||
$asc_rslt=mysql_to_mysqli($asc_stmt, $link);
|
||||
$qm_conf_ct = mysqli_num_rows($asc_rslt);
|
||||
if ($qm_conf_ct > 0)
|
||||
{
|
||||
$asc_row=mysqli_fetch_row($asc_rslt);
|
||||
$SSmenu_background = $asc_row[0];
|
||||
$SSframe_background = $asc_row[1];
|
||||
$SSstd_row1_background = $asc_row[2];
|
||||
$SSstd_row2_background = $asc_row[3];
|
||||
$SSstd_row3_background = $asc_row[4];
|
||||
$SSstd_row4_background = $asc_row[5];
|
||||
$SSstd_row5_background = $asc_row[6];
|
||||
$SSalt_row1_background = $asc_row[7];
|
||||
$SSalt_row2_background = $asc_row[8];
|
||||
$SSalt_row3_background = $asc_row[9];
|
||||
$SSweb_logo = $asc_row[10];
|
||||
}
|
||||
}
|
||||
|
||||
$NWB = " <a href=\"javascript:openNewWindow('help.php?ADD=99999";
|
||||
$NWE = "')\"><IMG SRC=\"help.gif\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP></A>";
|
||||
|
||||
@@ -466,7 +505,7 @@ if ($DB > 0)
|
||||
}
|
||||
|
||||
$MAIN.="<FORM ACTION=\"$PHP_SELF\" METHOD=POST name=vicidial_report id=vicidial_report>\n";
|
||||
$MAIN.="<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 BGCOLOR=\"#e3e3ff\"><TR><TD VALIGN=TOP>\n";
|
||||
$MAIN.="<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 BGCOLOR=\"#".$SSframe_background."\"><TR><TD VALIGN=TOP>\n";
|
||||
$MAIN.="<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">\n";
|
||||
$MAIN.="<INPUT TYPE=HIDDEN NAME=DID VALUE=\"$DID\">\n";
|
||||
$MAIN.="<INPUT TYPE=HIDDEN NAME=EMAIL VALUE=\"$EMAIL\">\n";
|
||||
|
||||
@@ -909,7 +909,7 @@ if ($report_display_type=='HTML') {$JS_text.=$JS_onload;}
|
||||
$JS_text.="</script>\n";
|
||||
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET name=vicidial_report id=vicidial_report>";
|
||||
echo "<TABLE CELLSPACING=3 BGCOLOR=\"#e3e3ff\"><TR><TD VALIGN=TOP> "._QXZ("Dates").":<BR>";
|
||||
echo "<TABLE CELLSPACING=3 BGCOLOR=\"#".$SSframe_background."\"><TR><TD VALIGN=TOP> "._QXZ("Dates").":<BR>";
|
||||
echo "<INPUT TYPE=hidden NAME=DB VALUE=\"$DB\">\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">";
|
||||
|
||||
|
||||
@@ -474,6 +474,44 @@ else
|
||||
$user_SQL = "and vicidial_users.user IN($user_SQL)";
|
||||
}
|
||||
|
||||
##### BEGIN Define colors and logo #####
|
||||
$SSmenu_background='015B91';
|
||||
$SSframe_background='D9E6FE';
|
||||
$SSstd_row1_background='9BB9FB';
|
||||
$SSstd_row2_background='B9CBFD';
|
||||
$SSstd_row3_background='8EBCFD';
|
||||
$SSstd_row4_background='B6D3FC';
|
||||
$SSstd_row5_background='FFFFFF';
|
||||
$SSalt_row1_background='BDFFBD';
|
||||
$SSalt_row2_background='99FF99';
|
||||
$SSalt_row3_background='CCFFCC';
|
||||
|
||||
$screen_color_stmt="select admin_screen_colors from system_settings";
|
||||
$screen_color_rslt=mysql_to_mysqli($screen_color_stmt, $link);
|
||||
$screen_color_row=mysqli_fetch_row($screen_color_rslt);
|
||||
$agent_screen_colors="$screen_color_row[0]";
|
||||
|
||||
if ($agent_screen_colors != 'default')
|
||||
{
|
||||
$asc_stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo FROM vicidial_screen_colors where colors_id='$agent_screen_colors';";
|
||||
$asc_rslt=mysql_to_mysqli($asc_stmt, $link);
|
||||
$qm_conf_ct = mysqli_num_rows($asc_rslt);
|
||||
if ($qm_conf_ct > 0)
|
||||
{
|
||||
$asc_row=mysqli_fetch_row($asc_rslt);
|
||||
$SSmenu_background = $asc_row[0];
|
||||
$SSframe_background = $asc_row[1];
|
||||
$SSstd_row1_background = $asc_row[2];
|
||||
$SSstd_row2_background = $asc_row[3];
|
||||
$SSstd_row3_background = $asc_row[4];
|
||||
$SSstd_row4_background = $asc_row[5];
|
||||
$SSstd_row5_background = $asc_row[6];
|
||||
$SSalt_row1_background = $asc_row[7];
|
||||
$SSalt_row2_background = $asc_row[8];
|
||||
$SSalt_row3_background = $asc_row[9];
|
||||
$SSweb_logo = $asc_row[10];
|
||||
}
|
||||
}
|
||||
|
||||
if ($DB) {$HTML_text.="$user_group_string|$user_group_ct|$user_groupQS|$i<BR>";}
|
||||
|
||||
@@ -512,7 +550,7 @@ $HTML_text.="<TABLE CELLPADDING=3 CELLSPACING=0><TR><TD>";
|
||||
$HTML_text.="<b>"._QXZ("$report_name")."</b> $NWB#agent_performance_detail$NWE\n";
|
||||
|
||||
$HTML_text.="<FORM ACTION=\"$PHP_SELF\" METHOD=GET name=vicidial_report id=vicidial_report>\n";
|
||||
$HTML_text.="<TABLE CELLSPACING=3 BGCOLOR=\"#e3e3ff\"><TR><TD VALIGN=TOP> "._QXZ("Dates").":<BR>";
|
||||
$HTML_text.="<TABLE CELLSPACING=3 BGCOLOR=\"#".$SSframe_background."\"><TR><TD VALIGN=TOP> "._QXZ("Dates").":<BR>";
|
||||
$HTML_text.="<INPUT TYPE=hidden NAME=DB VALUE=\"$DB\">\n";
|
||||
$HTML_text.="<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">";
|
||||
|
||||
|
||||
@@ -410,6 +410,45 @@ if (strlen($customer_interactive_statuses)>0)
|
||||
#$customer_interactive_statuses = '|NI|DNC|CALLBK|AP|SALE|COMP|HAP1|HAP2|HBED|DIED|';
|
||||
#$customer_interactive_statuses = '|NI|DNC|CALLBK|XFER|C2|B7|B8|C1|';
|
||||
|
||||
##### BEGIN Define colors and logo #####
|
||||
$SSmenu_background='015B91';
|
||||
$SSframe_background='D9E6FE';
|
||||
$SSstd_row1_background='9BB9FB';
|
||||
$SSstd_row2_background='B9CBFD';
|
||||
$SSstd_row3_background='8EBCFD';
|
||||
$SSstd_row4_background='B6D3FC';
|
||||
$SSstd_row5_background='FFFFFF';
|
||||
$SSalt_row1_background='BDFFBD';
|
||||
$SSalt_row2_background='99FF99';
|
||||
$SSalt_row3_background='CCFFCC';
|
||||
|
||||
$screen_color_stmt="select admin_screen_colors from system_settings";
|
||||
$screen_color_rslt=mysql_to_mysqli($screen_color_stmt, $link);
|
||||
$screen_color_row=mysqli_fetch_row($screen_color_rslt);
|
||||
$agent_screen_colors="$screen_color_row[0]";
|
||||
|
||||
if ($agent_screen_colors != 'default')
|
||||
{
|
||||
$asc_stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo FROM vicidial_screen_colors where colors_id='$agent_screen_colors';";
|
||||
$asc_rslt=mysql_to_mysqli($asc_stmt, $link);
|
||||
$qm_conf_ct = mysqli_num_rows($asc_rslt);
|
||||
if ($qm_conf_ct > 0)
|
||||
{
|
||||
$asc_row=mysqli_fetch_row($asc_rslt);
|
||||
$SSmenu_background = $asc_row[0];
|
||||
$SSframe_background = $asc_row[1];
|
||||
$SSstd_row1_background = $asc_row[2];
|
||||
$SSstd_row2_background = $asc_row[3];
|
||||
$SSstd_row3_background = $asc_row[4];
|
||||
$SSstd_row4_background = $asc_row[5];
|
||||
$SSstd_row5_background = $asc_row[6];
|
||||
$SSalt_row1_background = $asc_row[7];
|
||||
$SSalt_row2_background = $asc_row[8];
|
||||
$SSalt_row3_background = $asc_row[9];
|
||||
$SSweb_logo = $asc_row[10];
|
||||
}
|
||||
}
|
||||
|
||||
$LINKbase = "$PHP_SELF?query_date=$query_date&end_date=$end_date$groupQS$user_groupQS&shift=$shift&search_archived_data=$search_archived_data&show_defunct_users=$show_defunct_users&report_display_type=$report_display_type&DB=$DB";
|
||||
|
||||
$NWB = " <a href=\"javascript:openNewWindow('help.php?ADD=99999";
|
||||
@@ -1044,7 +1083,7 @@ if ($report_display_type=='HTML') {$JS_text.=$JS_onload;}
|
||||
$JS_text.="</script>\n";
|
||||
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET name=vicidial_report id=vicidial_report>";
|
||||
echo "<TABLE CELLSPACING=3 BGCOLOR=\"#e3e3ff\"><TR><TD VALIGN=TOP> Dates:<BR>";
|
||||
echo "<TABLE CELLSPACING=3 BGCOLOR=\"#".$SSframe_background."\"><TR><TD VALIGN=TOP> Dates:<BR>";
|
||||
echo "<INPUT TYPE=hidden NAME=DB VALUE=\"$DB\">\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">";
|
||||
|
||||
|
||||
@@ -469,6 +469,45 @@ $LINKbase = "$PHP_SELF?query_date=$query_date&end_date=$end_date$groupQS$user_gr
|
||||
$NWB = " <a href=\"javascript:openNewWindow('help.php?ADD=99999";
|
||||
$NWE = "')\"><IMG SRC=\"help.gif\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP></A>";
|
||||
|
||||
##### BEGIN Define colors and logo #####
|
||||
$SSmenu_background='015B91';
|
||||
$SSframe_background='D9E6FE';
|
||||
$SSstd_row1_background='9BB9FB';
|
||||
$SSstd_row2_background='B9CBFD';
|
||||
$SSstd_row3_background='8EBCFD';
|
||||
$SSstd_row4_background='B6D3FC';
|
||||
$SSstd_row5_background='FFFFFF';
|
||||
$SSalt_row1_background='BDFFBD';
|
||||
$SSalt_row2_background='99FF99';
|
||||
$SSalt_row3_background='CCFFCC';
|
||||
|
||||
$screen_color_stmt="select admin_screen_colors from system_settings";
|
||||
$screen_color_rslt=mysql_to_mysqli($screen_color_stmt, $link);
|
||||
$screen_color_row=mysqli_fetch_row($screen_color_rslt);
|
||||
$agent_screen_colors="$screen_color_row[0]";
|
||||
|
||||
if ($agent_screen_colors != 'default')
|
||||
{
|
||||
$asc_stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo FROM vicidial_screen_colors where colors_id='$agent_screen_colors';";
|
||||
$asc_rslt=mysql_to_mysqli($asc_stmt, $link);
|
||||
$qm_conf_ct = mysqli_num_rows($asc_rslt);
|
||||
if ($qm_conf_ct > 0)
|
||||
{
|
||||
$asc_row=mysqli_fetch_row($asc_rslt);
|
||||
$SSmenu_background = $asc_row[0];
|
||||
$SSframe_background = $asc_row[1];
|
||||
$SSstd_row1_background = $asc_row[2];
|
||||
$SSstd_row2_background = $asc_row[3];
|
||||
$SSstd_row3_background = $asc_row[4];
|
||||
$SSstd_row4_background = $asc_row[5];
|
||||
$SSstd_row5_background = $asc_row[6];
|
||||
$SSalt_row1_background = $asc_row[7];
|
||||
$SSalt_row2_background = $asc_row[8];
|
||||
$SSalt_row3_background = $asc_row[9];
|
||||
$SSweb_logo = $asc_row[10];
|
||||
}
|
||||
}
|
||||
|
||||
if ($file_download < 1)
|
||||
{
|
||||
?>
|
||||
@@ -1451,7 +1490,7 @@ if ($report_display_type=='HTML') {$JS_text.=$JS_onload;}
|
||||
$JS_text.="</script>\n";
|
||||
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET name=vicidial_report id=vicidial_report>";
|
||||
echo "<TABLE CELLSPACING=3 BGCOLOR=\"#e3e3ff\"><TR><TD VALIGN=TOP> "._QXZ("Dates").":<BR>";
|
||||
echo "<TABLE CELLSPACING=3 BGCOLOR=\"#".$SSframe_background."\"><TR><TD VALIGN=TOP> "._QXZ("Dates").":<BR>";
|
||||
echo "<INPUT TYPE=hidden NAME=DB VALUE=\"$DB\">\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">";
|
||||
|
||||
|
||||
@@ -367,6 +367,45 @@ while ($i < $statha_to_print)
|
||||
$i++;
|
||||
}
|
||||
|
||||
##### BEGIN Define colors and logo #####
|
||||
$SSmenu_background='015B91';
|
||||
$SSframe_background='D9E6FE';
|
||||
$SSstd_row1_background='9BB9FB';
|
||||
$SSstd_row2_background='B9CBFD';
|
||||
$SSstd_row3_background='8EBCFD';
|
||||
$SSstd_row4_background='B6D3FC';
|
||||
$SSstd_row5_background='FFFFFF';
|
||||
$SSalt_row1_background='BDFFBD';
|
||||
$SSalt_row2_background='99FF99';
|
||||
$SSalt_row3_background='CCFFCC';
|
||||
|
||||
$screen_color_stmt="select admin_screen_colors from system_settings";
|
||||
$screen_color_rslt=mysql_to_mysqli($screen_color_stmt, $link);
|
||||
$screen_color_row=mysqli_fetch_row($screen_color_rslt);
|
||||
$agent_screen_colors="$screen_color_row[0]";
|
||||
|
||||
if ($agent_screen_colors != 'default')
|
||||
{
|
||||
$asc_stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo FROM vicidial_screen_colors where colors_id='$agent_screen_colors';";
|
||||
$asc_rslt=mysql_to_mysqli($asc_stmt, $link);
|
||||
$qm_conf_ct = mysqli_num_rows($asc_rslt);
|
||||
if ($qm_conf_ct > 0)
|
||||
{
|
||||
$asc_row=mysqli_fetch_row($asc_rslt);
|
||||
$SSmenu_background = $asc_row[0];
|
||||
$SSframe_background = $asc_row[1];
|
||||
$SSstd_row1_background = $asc_row[2];
|
||||
$SSstd_row2_background = $asc_row[3];
|
||||
$SSstd_row3_background = $asc_row[4];
|
||||
$SSstd_row4_background = $asc_row[5];
|
||||
$SSstd_row5_background = $asc_row[6];
|
||||
$SSalt_row1_background = $asc_row[7];
|
||||
$SSalt_row2_background = $asc_row[8];
|
||||
$SSalt_row3_background = $asc_row[9];
|
||||
$SSweb_logo = $asc_row[10];
|
||||
}
|
||||
}
|
||||
|
||||
$LINKbase = "$PHP_SELF?query_date=$query_dateURL&end_date=$end_dateURL$groupQS$user_groupQS&shift=$shift&DB=$DB";
|
||||
|
||||
$NWB = " <a href=\"javascript:openNewWindow('help.php?ADD=99999";
|
||||
@@ -417,7 +456,7 @@ window.open(url,"",'width=620,height=300,scrollbars=yes,menubar=yes,address=yes'
|
||||
echo "<BR><BR>";
|
||||
echo "<b>"._QXZ("$report_name")."</b> $NWB#agent_timeclock_detail$NWE\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET name=vicidial_report id=vicidial_report>\n";
|
||||
echo "<TABLE CELLPADDING=3 CELLSPACING=0 BGCOLOR=\"#e3e3ff\"><TR><TD VALIGN=TOP> "._QXZ("Dates").":<BR>";
|
||||
echo "<TABLE CELLPADDING=3 CELLSPACING=0 BGCOLOR=\"#".$SSframe_background."\"><TR><TD VALIGN=TOP> "._QXZ("Dates").":<BR>";
|
||||
echo "<INPUT TYPE=hidden NAME=DB VALUE=\"$DB\">\n";
|
||||
echo "<INPUT TYPE=hidden NAME=query_date ID=query_date VALUE=\"$query_date\">\n";
|
||||
echo "<INPUT TYPE=hidden NAME=end_date ID=end_date VALUE=\"$end_date\">\n";
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# 141114-0846 - Finalized adding QXZ translation to all admin files
|
||||
# 141230-1513 - Added code for on-the-fly language translations display
|
||||
# 170409-1534 - Added IP List validation code
|
||||
# 170821-2219 - Added HTML formatting
|
||||
# 170821-2219 - Added HTML formatting and screen colors
|
||||
#
|
||||
|
||||
$startMS = microtime();
|
||||
@@ -542,7 +542,7 @@ if ($SUBMIT && $server_ip_ct>0) {
|
||||
$HTML.="<th colspan='6'><font size='2'><a href=\"$PHP_SELF?SUBMIT=$SUBMIT&DB=$DB&type=$type&query_date=$query_date&query_date_D=$query_date_D&query_date_T=$query_date_T&report_display_type=$report_display_type$server_ipQS&lower_limit=$ll\">[<<< "._QXZ("PREV")." 1000 "._QXZ("records")."]</a></font></th>";
|
||||
} else {
|
||||
$carrier_rpt_hf.=sprintf("%-23s", " ");
|
||||
$HTML.="<td colspan='6'> </th>";
|
||||
$HTML.="<td colspan='6'> </td>";
|
||||
}
|
||||
$carrier_rpt_hf.=sprintf("%-145s", " ");
|
||||
if (($lower_limit+1000)<mysqli_num_rows($rpt_rslt)) {
|
||||
@@ -551,7 +551,7 @@ if ($SUBMIT && $server_ip_ct>0) {
|
||||
$HTML.="<td align='right' colspan='6'><font size='2'><a href=\"$PHP_SELF?SUBMIT=$SUBMIT&DB=$DB&type=$type&query_date=$query_date&query_date_D=$query_date_D&query_date_T=$query_date_T&report_display_type=$report_display_type$server_ipQS&lower_limit=".($lower_limit+1000)."\">["._QXZ("NEXT")." $max_limit "._QXZ("records")." >>>]</a></font></th>";
|
||||
} else {
|
||||
$carrier_rpt_hf.=sprintf("%23s", " ");
|
||||
$HTML.="<td colspan='6'> </th>";
|
||||
$HTML.="<td colspan='6'> </td>";
|
||||
}
|
||||
$carrier_rpt_hf.="\n";
|
||||
$TEXT.=$carrier_rpt_hf.$carrier_rpt.$carrier_rpt_hf;
|
||||
|
||||
@@ -345,6 +345,45 @@ else
|
||||
}
|
||||
if (strlen($group_SQL)<3) {$group_SQL="''";}
|
||||
|
||||
##### BEGIN Define colors and logo #####
|
||||
$SSmenu_background='015B91';
|
||||
$SSframe_background='D9E6FE';
|
||||
$SSstd_row1_background='9BB9FB';
|
||||
$SSstd_row2_background='B9CBFD';
|
||||
$SSstd_row3_background='8EBCFD';
|
||||
$SSstd_row4_background='B6D3FC';
|
||||
$SSstd_row5_background='FFFFFF';
|
||||
$SSalt_row1_background='BDFFBD';
|
||||
$SSalt_row2_background='99FF99';
|
||||
$SSalt_row3_background='CCFFCC';
|
||||
|
||||
$screen_color_stmt="select admin_screen_colors from system_settings";
|
||||
$screen_color_rslt=mysql_to_mysqli($screen_color_stmt, $link);
|
||||
$screen_color_row=mysqli_fetch_row($screen_color_rslt);
|
||||
$agent_screen_colors="$screen_color_row[0]";
|
||||
|
||||
if ($agent_screen_colors != 'default')
|
||||
{
|
||||
$asc_stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo FROM vicidial_screen_colors where colors_id='$agent_screen_colors';";
|
||||
$asc_rslt=mysql_to_mysqli($asc_stmt, $link);
|
||||
$qm_conf_ct = mysqli_num_rows($asc_rslt);
|
||||
if ($qm_conf_ct > 0)
|
||||
{
|
||||
$asc_row=mysqli_fetch_row($asc_rslt);
|
||||
$SSmenu_background = $asc_row[0];
|
||||
$SSframe_background = $asc_row[1];
|
||||
$SSstd_row1_background = $asc_row[2];
|
||||
$SSstd_row2_background = $asc_row[3];
|
||||
$SSstd_row3_background = $asc_row[4];
|
||||
$SSstd_row4_background = $asc_row[5];
|
||||
$SSstd_row5_background = $asc_row[6];
|
||||
$SSalt_row1_background = $asc_row[7];
|
||||
$SSalt_row2_background = $asc_row[8];
|
||||
$SSalt_row3_background = $asc_row[9];
|
||||
$SSweb_logo = $asc_row[10];
|
||||
}
|
||||
}
|
||||
|
||||
$NWB = " <a href=\"javascript:openNewWindow('help.php?ADD=99999";
|
||||
$NWE = "')\"><IMG SRC=\"help.gif\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP></A>";
|
||||
|
||||
@@ -410,7 +449,7 @@ if ($DB > 0)
|
||||
}
|
||||
|
||||
$MAIN.="<FORM ACTION=\"$PHP_SELF\" METHOD=GET name=vicidial_report id=vicidial_report>\n";
|
||||
$MAIN.="<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 BGCOLOR=\"#e3e3ff\"><TR><TD VALIGN=TOP><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>\n";
|
||||
$MAIN.="<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 BGCOLOR=\"#".$SSframe_background."\"><TR><TD VALIGN=TOP><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>\n";
|
||||
$MAIN.="<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">\n";
|
||||
$MAIN.=_QXZ("Date Range").":<BR>\n";
|
||||
$MAIN.="<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">";
|
||||
|
||||
+265
-90
@@ -17,6 +17,7 @@
|
||||
# 170409-1534 - Added IP List validation code
|
||||
# 170412-2129 - Updated for new park logging
|
||||
# 170808-0220 - Added detailed log option
|
||||
# 170823-2154 - Added HTML formatting and screen colors
|
||||
#
|
||||
|
||||
$startMS = microtime();
|
||||
@@ -42,6 +43,8 @@ if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
|
||||
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
|
||||
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
|
||||
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
if (isset($_GET["report_display_type"])) {$report_display_type=$_GET["report_display_type"];}
|
||||
elseif (isset($_POST["report_display_type"])) {$report_display_type=$_POST["report_display_type"];}
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
@@ -254,59 +257,133 @@ while ($i < $groups_to_print)
|
||||
$groups[$i] =$row[0];
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<STYLE type="text/css">
|
||||
<!--
|
||||
.green {color: white; background-color: green}
|
||||
.red {color: white; background-color: red}
|
||||
.blue {color: white; background-color: blue}
|
||||
.purple {color: white; background-color: purple}
|
||||
-->
|
||||
</STYLE>
|
||||
|
||||
<?php
|
||||
echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
|
||||
echo "<TITLE>"._QXZ("Park Stats")."</TITLE></HEAD><BODY BGCOLOR=WHITE>\n";
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">\n";
|
||||
echo "<SELECT SIZE=1 NAME=group>\n";
|
||||
|
||||
##### BEGIN Define colors and logo #####
|
||||
$SSmenu_background='015B91';
|
||||
$SSframe_background='D9E6FE';
|
||||
$SSstd_row1_background='9BB9FB';
|
||||
$SSstd_row2_background='B9CBFD';
|
||||
$SSstd_row3_background='8EBCFD';
|
||||
$SSstd_row4_background='B6D3FC';
|
||||
$SSstd_row5_background='FFFFFF';
|
||||
$SSalt_row1_background='BDFFBD';
|
||||
$SSalt_row2_background='99FF99';
|
||||
$SSalt_row3_background='CCFFCC';
|
||||
|
||||
$screen_color_stmt="select admin_screen_colors from system_settings";
|
||||
$screen_color_rslt=mysql_to_mysqli($screen_color_stmt, $link);
|
||||
$screen_color_row=mysqli_fetch_row($screen_color_rslt);
|
||||
$agent_screen_colors="$screen_color_row[0]";
|
||||
|
||||
if ($agent_screen_colors != 'default')
|
||||
{
|
||||
$asc_stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo FROM vicidial_screen_colors where colors_id='$agent_screen_colors';";
|
||||
$asc_rslt=mysql_to_mysqli($asc_stmt, $link);
|
||||
$qm_conf_ct = mysqli_num_rows($asc_rslt);
|
||||
if ($qm_conf_ct > 0)
|
||||
{
|
||||
$asc_row=mysqli_fetch_row($asc_rslt);
|
||||
$SSmenu_background = $asc_row[0];
|
||||
$SSframe_background = $asc_row[1];
|
||||
$SSstd_row1_background = $asc_row[2];
|
||||
$SSstd_row2_background = $asc_row[3];
|
||||
$SSstd_row3_background = $asc_row[4];
|
||||
$SSstd_row4_background = $asc_row[5];
|
||||
$SSstd_row5_background = $asc_row[6];
|
||||
$SSalt_row1_background = $asc_row[7];
|
||||
$SSalt_row2_background = $asc_row[8];
|
||||
$SSalt_row3_background = $asc_row[9];
|
||||
$SSweb_logo = $asc_row[10];
|
||||
}
|
||||
}
|
||||
|
||||
$HEADER.="<HTML>\n";
|
||||
$HEADER.="<HEAD>\n";
|
||||
$HEADER.="<STYLE type=\"text/css\">\n";
|
||||
$HEADER.="<!--\n";
|
||||
$HEADER.=" .green {color: white; background-color: green}\n";
|
||||
$HEADER.=" .red {color: white; background-color: red}\n";
|
||||
$HEADER.=" .blue {color: white; background-color: blue}\n";
|
||||
$HEADER.=" .purple {color: white; background-color: purple}\n";
|
||||
$HEADER.="-->\n";
|
||||
$HEADER.=" </STYLE>\n";
|
||||
$HEADER.="<script language=\"JavaScript\" src=\"calendar_db.js\"></script>\n";
|
||||
$HEADER.="<link rel=\"stylesheet\" href=\"calendar.css\">\n";
|
||||
$HEADER.="<link rel=\"stylesheet\" href=\"horizontalbargraph.css\">\n";
|
||||
$HEADER.="<link rel=\"stylesheet\" href=\"verticalbargraph.css\">\n";
|
||||
$HEADER.="<script language=\"JavaScript\" src=\"wz_jsgraphics.js\"></script>\n";
|
||||
$HEADER.="<script language=\"JavaScript\" src=\"line.js\"></script>\n";
|
||||
$HEADER.="<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
|
||||
$HEADER.="<TITLE>"._QXZ("$report_name")."</TITLE></HEAD><BODY BGCOLOR=WHITE marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
|
||||
|
||||
$short_header=1;
|
||||
|
||||
$MAIN.="<TABLE CELLPADDING=4 CELLSPACING=0><TR><TD>";
|
||||
$MAIN.="<FORM ACTION=\"$PHP_SELF\" METHOD=GET name=vicidial_report id=vicidial_report>\n";
|
||||
$MAIN.="<TABLE BORDER=0 cellspacing=5 cellpadding=5><TR><TD VALIGN=TOP align=center>\n";
|
||||
$MAIN.="<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">\n";
|
||||
$MAIN.=_QXZ("Date").":\n";
|
||||
$MAIN.="<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">";
|
||||
$MAIN.="<script language=\"JavaScript\">\n";
|
||||
$MAIN.="var o_cal = new tcal ({\n";
|
||||
$MAIN.=" // form name\n";
|
||||
$MAIN.=" 'formname': 'vicidial_report',\n";
|
||||
$MAIN.=" // input name\n";
|
||||
$MAIN.=" 'controlname': 'query_date'\n";
|
||||
$MAIN.="});\n";
|
||||
$MAIN.="o_cal.a_tpl.yearscroll = false;\n";
|
||||
$MAIN.="// o_cal.a_tpl.weekstart = 1; // Monday week start\n";
|
||||
$MAIN.="</script>\n";
|
||||
|
||||
$MAIN.="</TD><TD VALIGN=TOP>\n";
|
||||
$MAIN.="<SELECT SIZE=1 NAME=group>\n";
|
||||
$o=0;
|
||||
while ($groups_to_print > $o)
|
||||
{
|
||||
if ($groups[$o] == $group) {echo "<option selected value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
else {echo "<option value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
if ($groups[$o] == $group) {$MAIN.="<option selected value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
else {$MAIN.="<option value=\"$groups[$o]\">$groups[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
echo "</SELECT>\n";
|
||||
echo "<INPUT TYPE=checkbox NAME=show_details VALUE='checked' $show_details>Show details\n";
|
||||
echo "<INPUT TYPE=SUBMIT NAME=SUBMIT VALUE='"._QXZ("SUBMIT")."'>\n";
|
||||
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2> <a href=\"./admin.php?ADD=34&campaign_id=$group\">"._QXZ("MODIFY")."</a> | <a href=\"./admin.php?ADD=999999\">"._QXZ("REPORTS")."</a> </FONT>\n";
|
||||
echo "</FORM>\n\n";
|
||||
$MAIN.="</SELECT></TD><TD VALIGN=middle align=center>\n";
|
||||
$MAIN.=_QXZ("Display as:")." ";
|
||||
$MAIN.="<select name='report_display_type'>";
|
||||
if ($report_display_type) {$MAIN.="<option value='$report_display_type' selected>$report_display_type</option>";}
|
||||
$MAIN.="<option value='TEXT'>TEXT</option><option value='HTML'>HTML</option></select>";
|
||||
$MAIN.="</TD><TD VALIGN=middle align=center>\n";
|
||||
$MAIN.="<INPUT TYPE=checkbox NAME=show_details VALUE='checked' $show_details>Show details\n";
|
||||
$MAIN.="</TD><TD VALIGN=middle align=center>\n";
|
||||
$MAIN.="<INPUT TYPE=SUBMIT NAME=SUBMIT VALUE='"._QXZ("SUBMIT")."'>\n";
|
||||
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2> <a href=\"./admin.php?ADD=34&campaign_id=$group\">"._QXZ("MODIFY")."</a> | <a href=\"./admin.php?ADD=999999\">"._QXZ("REPORTS")."</a> </FONT>\n";
|
||||
$MAIN.="</TD></TR></TABLE>\n";
|
||||
$MAIN.="</FORM>\n\n";
|
||||
|
||||
echo "<PRE><FONT SIZE=2>\n\n";
|
||||
$TEXT.="<PRE><FONT SIZE=2>\n\n";
|
||||
|
||||
|
||||
if (!$group)
|
||||
{
|
||||
echo "\n\n";
|
||||
echo _QXZ("PLEASE SELECT A GROUP AND DATE ABOVE AND CLICK SUBMIT")."\n";
|
||||
$MAIN.="\n\n";
|
||||
$MAIN.=_QXZ("PLEASE SELECT A GROUP AND DATE ABOVE AND CLICK SUBMIT")."\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
echo _QXZ("Park Stats",48)." $NOW_TIME\n";
|
||||
$TEXT.=_QXZ("Park Stats",48)." $NOW_TIME\n";
|
||||
$TEXT.="\n";
|
||||
$TEXT.="---------- "._QXZ("TOTALS")."\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- "._QXZ("TOTALS")."\n";
|
||||
$HTML.="<BR><table border='0' cellpadding='3' cellspacing='1'>";
|
||||
$HTML.="<tr bgcolor='#".$SSstd_row1_background."'>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("Park Stats",48)." $NOW_TIME</th>";
|
||||
$HTML.="</tr>\n";
|
||||
|
||||
$stmt="select count(*),sum(parked_sec) from park_log where parked_time >= '$query_date 00:00:01' and parked_time <= '$query_date 23:59:59' and status IN('HUNGUP','GRABBED','GRABBEDIVR','IVRPARKED','PARKED') and channel_group='" . mysqli_real_escape_string($link, $group) . "';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
if ($DB) {$MAIN.="$stmt\n";}
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
|
||||
$TOTALcalls = sprintf("%10s", $row[0]);
|
||||
@@ -314,15 +391,21 @@ $average_hold_seconds = MathZDC($row[1], $row[0]);
|
||||
$average_hold_seconds = round($average_hold_seconds, 0);
|
||||
$average_hold_seconds = sprintf("%10s", $average_hold_seconds);
|
||||
|
||||
echo _QXZ("Total Calls parked in this Group:",45)." $TOTALcalls\n";
|
||||
echo _QXZ("Average Hold Time(seconds) for Parked Calls:",45)." $average_hold_seconds\n";
|
||||
$TEXT.=_QXZ("Total Calls parked in this Group:",45)." $TOTALcalls\n";
|
||||
$TEXT.=_QXZ("Average Hold Time(seconds) for Parked Calls:",45)." $average_hold_seconds\n";
|
||||
$TEXT.="\n";
|
||||
$TEXT.="---------- "._QXZ("DROPS")."\n";
|
||||
|
||||
echo "\n";
|
||||
echo "---------- "._QXZ("DROPS")."\n";
|
||||
$HTML.="<tr bgcolor='#".$SSstd_row2_background."'>";
|
||||
$HTML.="<td><font size=2><B>"._QXZ("TOTALS")."</B></BR>";
|
||||
$HTML.=_QXZ("Total Calls parked in this Group:")." $TOTALcalls</BR>";
|
||||
$HTML.=_QXZ("Average Hold Time(seconds) for Parked Calls:")." $average_hold_seconds";
|
||||
$HTML.="</BR></BR>";
|
||||
$HTML.="<B>"._QXZ("DROPS")."</B></BR>";
|
||||
|
||||
$stmt="select count(*),sum(parked_sec) from park_log where parked_time >= '$query_date 00:00:01' and parked_time <= '$query_date 23:59:59' and status ='HUNGUP' and channel_group='" . mysqli_real_escape_string($link, $group) . "' and (talked_sec < 5 or talked_sec is null);";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
if ($DB) {$MAIN.="$stmt\n";}
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
|
||||
$DROPcalls = sprintf("%10s", $row[0]);
|
||||
@@ -333,22 +416,40 @@ $average_hold_seconds = MathZDC($row[1], $row[0]);
|
||||
$average_hold_seconds = round($average_hold_seconds, 0);
|
||||
$average_hold_seconds = sprintf("%10s", $average_hold_seconds);
|
||||
|
||||
echo _QXZ("Total Dropped Calls:",45)." $DROPcalls $DROPpercent%\n";
|
||||
echo _QXZ("Average Hold Time(seconds) for Dropped Calls:",45)." $average_hold_seconds\n";
|
||||
$TEXT.=_QXZ("Total Dropped Calls:",45)." $DROPcalls $DROPpercent%\n";
|
||||
$TEXT.=_QXZ("Average Hold Time(seconds) for Dropped Calls:",45)." $average_hold_seconds\n";
|
||||
|
||||
$HTML.=_QXZ("Total Dropped Calls:")." $DROPcalls $DROPpercent%</BR>";
|
||||
$HTML.=_QXZ("Average Hold Time(seconds) for Dropped Calls:")." $average_hold_seconds";
|
||||
$HTML.="</font></td></tr></table>";
|
||||
|
||||
|
||||
##############################
|
||||
######### USER STATS
|
||||
|
||||
echo "\n";
|
||||
echo "---------- "._QXZ("USER PARK STATS").":\n";
|
||||
echo "+---------------------------------------------+------------+--------+--------+------------+--------+--------+\n";
|
||||
echo "| "._QXZ("USER",43)." | "._QXZ("CALLS",10)." | "._QXZ("TIME M",6)." | "._QXZ("AVRG M",6)." | "._QXZ("DROPS",10)." | "._QXZ("TIME M",6)." | "._QXZ("AVRG M",6)." |\n";
|
||||
echo "+---------------------------------------------+------------+--------+--------+------------+--------+--------+\n";
|
||||
$TEXT.="\n";
|
||||
$TEXT.="---------- "._QXZ("USER PARK STATS").":\n";
|
||||
$TEXT.="+---------------------------------------------+------------+--------+--------+------------+--------+--------+\n";
|
||||
$TEXT.="| "._QXZ("USER",43)." | "._QXZ("CALLS",10)." | "._QXZ("TIME M",6)." | "._QXZ("AVRG M",6)." | "._QXZ("DROPS",10)." | "._QXZ("TIME M",6)." | "._QXZ("AVRG M",6)." |\n";
|
||||
$TEXT.="+---------------------------------------------+------------+--------+--------+------------+--------+--------+\n";
|
||||
|
||||
$HTML.="<BR><table border='0' cellpadding='3' cellspacing='1'>";
|
||||
$HTML.="<tr bgcolor='#".$SSstd_row1_background."'>";
|
||||
$HTML.="<th colspan='7'><font size='2'>"._QXZ("USER PARK STATS")."</font></th>";
|
||||
$HTML.="</tr>\n";
|
||||
$HTML.="<tr bgcolor='#".$SSstd_row1_background."'>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("USER")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("CALLS")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("TIME M")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("AVRG M")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("DROPS")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("TIME M")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("AVRG M")."</font></th>";
|
||||
$HTML.="</tr>\n";
|
||||
|
||||
$stmt="select park_log.user,full_name,count(*),sum(parked_sec),avg(parked_sec) from park_log,vicidial_users where parked_time >= '$query_date 00:00:01' and parked_time <= '$query_date 23:59:59' and status IN('HUNGUP','GRABBED','GRABBEDIVR','IVRPARKED','PARKED') and channel_group='" . mysqli_real_escape_string($link, $group) . "' and parked_sec is not null and park_log.user is not null and park_log.user=vicidial_users.user group by park_log.user;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
if ($DB) {$MAIN.="$stmt\n";}
|
||||
$users_to_print = mysqli_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $users_to_print)
|
||||
@@ -388,7 +489,7 @@ while ($i < $users_to_print)
|
||||
{
|
||||
$stmt="select count(*),sum(parked_sec),avg(parked_sec) from park_log where parked_time >= '$query_date 00:00:01' and parked_time <= '$query_date 23:59:59' and status IN('HUNGUP') and channel_group='" . mysqli_real_escape_string($link, $group) . "' and parked_sec is not null and park_log.user='$user[$i]' group by park_log.user;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
if ($DB) {$MAIN.="$stmt\n";}
|
||||
$drop_to_print = mysqli_num_rows($rslt);
|
||||
if ($users_to_print > 0)
|
||||
{
|
||||
@@ -418,20 +519,38 @@ while ($i < $users_to_print)
|
||||
$USERavgDROP_MS[$i] = sprintf("%6s", $USERavgDROP_MS[$i]);
|
||||
}
|
||||
|
||||
echo "| <a href=\"user_stats.php?park_rpt=1&begin_date=$query_date&end_date=$query_date&user=$user[$i]\">$full_name[$i]</a> | $USERcalls[$i] | $USERtotTALK_MS[$i] | $USERavgTALK_MS[$i] | $USERdrops[$i] | $USERtotDROP_MS[$i] | $USERavgDROP_MS[$i] |\n";
|
||||
$TEXT.="| <a href=\"user_stats.php?park_rpt=1&begin_date=$query_date&end_date=$query_date&user=$user[$i]\">$full_name[$i]</a> | $USERcalls[$i] | $USERtotTALK_MS[$i] | $USERavgTALK_MS[$i] | $USERdrops[$i] | $USERtotDROP_MS[$i] | $USERavgDROP_MS[$i] |\n";
|
||||
|
||||
$HTML.="<tr bgcolor='#".$SSstd_row2_background."'>";
|
||||
$HTML.="<th><font size='2'><a href=\"user_stats.php?park_rpt=1&begin_date=$query_date&end_date=$query_date&user=$user[$i]\">$full_name[$i]</a></font></th>";
|
||||
$HTML.="<th><font size='2'>$USERcalls[$i]</font></th>";
|
||||
$HTML.="<th><font size='2'>$USERtotTALK_MS[$i]</font></th>";
|
||||
$HTML.="<th><font size='2'>$USERavgTALK_MS[$i]</font></th>";
|
||||
$HTML.="<th><font size='2'>$USERdrops[$i]</font></th>";
|
||||
$HTML.="<th><font size='2'>$USERtotDROP_MS[$i]</font></th>";
|
||||
$HTML.="<th><font size='2'>$USERavgDROP_MS[$i]</font></th>";
|
||||
$HTML.="</tr>\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "+---------------------------------------------+------------+--------+--------+------------+--------+--------+\n";
|
||||
$TEXT.="+---------------------------------------------+------------+--------+--------+------------+--------+--------+\n";
|
||||
$HTML.="</table>\n";
|
||||
|
||||
##############################
|
||||
######### TIME STATS
|
||||
|
||||
echo "\n";
|
||||
echo "---------- "._QXZ("TIME STATS")."\n";
|
||||
$TEXT.="\n\n";
|
||||
$TEXT.="---------- "._QXZ("TIME STATS");
|
||||
|
||||
echo "<FONT SIZE=0>\n";
|
||||
$TEXT.="<FONT SIZE=0>";
|
||||
|
||||
$HTML.="<BR><table border='0' cellpadding='3' cellspacing='1'>";
|
||||
$HTML.="<tr bgcolor='#".$SSstd_row1_background."'>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("TIME STATS")."</font></th>";
|
||||
$HTML.="</tr>";
|
||||
$HTML.="<tr bgcolor='#FFFFFF'>";
|
||||
$HTML.="<td align='left'><pre><font size='0'>";
|
||||
|
||||
$hi_hour_count=0;
|
||||
$last_full_record=0;
|
||||
@@ -441,14 +560,14 @@ while ($i <= 96)
|
||||
{
|
||||
$stmt="select count(*) from park_log where parked_time >= '$query_date $h:00:00' and parked_time <= '$query_date $h:14:59' and status IN('HUNGUP','GRABBED','GRABBEDIVR','IVRPARKED','PARKED') and channel_group='" . mysqli_real_escape_string($link, $group) . "';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
if ($DB) {$MAIN2.="$stmt\n";}
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$hour_count[$i] = $row[0];
|
||||
if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
|
||||
if ($hour_count[$i] > 0) {$last_full_record = $i;}
|
||||
$stmt="select count(*) from park_log where parked_time >= '$query_date $h:00:00' and parked_time <= '$query_date $h:14:59' and status ='HUNGUP' and channel_group='" . mysqli_real_escape_string($link, $group) . "' and (talked_sec < 5 or talked_sec is null);";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
if ($DB) {$MAIN2.="$stmt\n";}
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$drop_count[$i] = $row[0];
|
||||
$i++;
|
||||
@@ -456,42 +575,42 @@ while ($i <= 96)
|
||||
|
||||
$stmt="select count(*) from park_log where parked_time >= '$query_date $h:15:00' and parked_time <= '$query_date $h:29:59' and status IN('HUNGUP','GRABBED','GRABBEDIVR','IVRPARKED','PARKED') and channel_group='" . mysqli_real_escape_string($link, $group) . "';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
if ($DB) {$MAIN2.="$stmt\n";}
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$hour_count[$i] = $row[0];
|
||||
if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
|
||||
if ($hour_count[$i] > 0) {$last_full_record = $i;}
|
||||
$stmt="select count(*) from park_log where parked_time >= '$query_date $h:15:00' and parked_time <= '$query_date $h:29:59' and status ='HUNGUP' and channel_group='" . mysqli_real_escape_string($link, $group) . "' and (talked_sec < 5 or talked_sec is null);";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
if ($DB) {$MAIN2.="$stmt\n";}
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$drop_count[$i] = $row[0];
|
||||
$i++;
|
||||
|
||||
$stmt="select count(*) from park_log where parked_time >= '$query_date $h:30:00' and parked_time <= '$query_date $h:44:59' and status IN('HUNGUP','GRABBED','GRABBEDIVR','IVRPARKED','PARKED') and channel_group='" . mysqli_real_escape_string($link, $group) . "';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
if ($DB) {$MAIN2.="$stmt\n";}
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$hour_count[$i] = $row[0];
|
||||
if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
|
||||
if ($hour_count[$i] > 0) {$last_full_record = $i;}
|
||||
$stmt="select count(*) from park_log where parked_time >= '$query_date $h:30:00' and parked_time <= '$query_date $h:44:59' and status ='HUNGUP' and channel_group='" . mysqli_real_escape_string($link, $group) . "' and (talked_sec < 5 or talked_sec is null);";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
if ($DB) {$MAIN2.="$stmt\n";}
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$drop_count[$i] = $row[0];
|
||||
$i++;
|
||||
|
||||
$stmt="select count(*) from park_log where parked_time >= '$query_date $h:45:00' and parked_time <= '$query_date $h:59:59' and status IN('HUNGUP','GRABBED','GRABBEDIVR','IVRPARKED','PARKED') and channel_group='" . mysqli_real_escape_string($link, $group) . "';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
if ($DB) {$MAIN2.="$stmt\n";}
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$hour_count[$i] = $row[0];
|
||||
if ($hour_count[$i] > $hi_hour_count) {$hi_hour_count = $hour_count[$i];}
|
||||
if ($hour_count[$i] > 0) {$last_full_record = $i;}
|
||||
$stmt="select count(*) from park_log where parked_time >= '$query_date $h:45:00' and parked_time <= '$query_date $h:59:59' and status ='HUNGUP' and channel_group='" . mysqli_real_escape_string($link, $group) . "' and (talked_sec < 5 or talked_sec is null);";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
if ($DB) {$MAIN2.="$stmt\n";}
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$drop_count[$i] = $row[0];
|
||||
$i++;
|
||||
@@ -501,8 +620,8 @@ while ($i <= 96)
|
||||
$hour_multiplier = MathZDC(100, $hi_hour_count);
|
||||
#$hour_multiplier = round($hour_multiplier, 0);
|
||||
|
||||
echo "<!-- HICOUNT: $hi_hour_count|$hour_multiplier -->\n";
|
||||
echo _QXZ("GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP")."\n";
|
||||
$MAIN2.="<!-- HICOUNT: $hi_hour_count|$hour_multiplier -->\n";
|
||||
$MAIN2.=_QXZ("GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP")."\n";
|
||||
|
||||
$k=1;
|
||||
$Mk=0;
|
||||
@@ -526,10 +645,9 @@ while ($k <= 102)
|
||||
}
|
||||
|
||||
|
||||
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
#echo "| HOUR | GRAPH IN 15 MINUTE INCREMENTS OF TOTAL INCOMING CALLS FOR THIS GROUP | DROPS | TOTAL |\n";
|
||||
echo "| "._QXZ("HOUR",4)." |$call_scale| "._QXZ("DROPS",5)." | "._QXZ("TOTAL",5)." |\n";
|
||||
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
$MAIN2.="+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
$MAIN2.="| "._QXZ("HOUR",4)." |$call_scale| "._QXZ("DROPS",5)." | "._QXZ("TOTAL",5)." |\n";
|
||||
$MAIN2.="+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
|
||||
$ZZ = '00';
|
||||
$i=0;
|
||||
@@ -561,9 +679,9 @@ while ($i <= 96)
|
||||
else
|
||||
{
|
||||
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
|
||||
echo "|$time|";
|
||||
$k=0; while ($k <= 102) {echo " "; $k++;}
|
||||
echo "| $hour_count[$i] |\n";
|
||||
$MAIN2.="|$time|";
|
||||
$k=0; while ($k <= 102) {$MAIN2.=" "; $k++;}
|
||||
$MAIN2.="| $hour_count[$i] |\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -577,12 +695,12 @@ while ($i <= 96)
|
||||
{
|
||||
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
|
||||
|
||||
echo "|$time|<SPAN class=\"green\">";
|
||||
$k=0; while ($k <= $Xhour_count) {echo "*"; $k++; $char_counter++;}
|
||||
echo "*X</SPAN>"; $char_counter++;
|
||||
$k=0; while ($k <= $Yhour_count) {echo " "; $k++; $char_counter++;}
|
||||
while ($char_counter <= 101) {echo " "; $char_counter++;}
|
||||
echo "| 0 | $hour_count[$i] |\n";
|
||||
$MAIN2.="|$time|<SPAN class=\"green\">";
|
||||
$k=0; while ($k <= $Xhour_count) {$MAIN2.="*"; $k++; $char_counter++;}
|
||||
$MAIN2.="*X</SPAN>"; $char_counter++;
|
||||
$k=0; while ($k <= $Yhour_count) {$MAIN2.=" "; $k++; $char_counter++;}
|
||||
while ($char_counter <= 101) {$MAIN2.=" "; $char_counter++;}
|
||||
$MAIN2.="| 0 | $hour_count[$i] |\n";
|
||||
|
||||
}
|
||||
else
|
||||
@@ -596,23 +714,26 @@ while ($i <= 96)
|
||||
$hour_count[$i] = sprintf("%-5s", $hour_count[$i]);
|
||||
$drop_count[$i] = sprintf("%-5s", $drop_count[$i]);
|
||||
|
||||
echo "|$time|<SPAN class=\"red\">";
|
||||
$k=0; while ($k <= $Xdrop_count) {echo ">"; $k++; $char_counter++;}
|
||||
echo "D</SPAN><SPAN class=\"green\">"; $char_counter++;
|
||||
$k=0; while ($k <= $XXhour_count) {echo "*"; $k++; $char_counter++;}
|
||||
echo "X</SPAN>"; $char_counter++;
|
||||
$k=0; while ($k <= $Yhour_count) {echo " "; $k++; $char_counter++;}
|
||||
while ($char_counter <= 102) {echo " "; $char_counter++;}
|
||||
echo "| $drop_count[$i] | $hour_count[$i] |\n";
|
||||
$MAIN2.="|$time|<SPAN class=\"red\">";
|
||||
$k=0; while ($k <= $Xdrop_count) {$MAIN2.=">"; $k++; $char_counter++;}
|
||||
$MAIN2.="D</SPAN><SPAN class=\"green\">"; $char_counter++;
|
||||
$k=0; while ($k <= $XXhour_count) {$MAIN2.="*"; $k++; $char_counter++;}
|
||||
$MAIN2.="X</SPAN>"; $char_counter++;
|
||||
$k=0; while ($k <= $Yhour_count) {$MAIN2.=" "; $k++; $char_counter++;}
|
||||
while ($char_counter <= 102) {$MAIN2.=" "; $char_counter++;}
|
||||
$MAIN2.="| $drop_count[$i] | $hour_count[$i] |\n";
|
||||
}
|
||||
}
|
||||
$i++;
|
||||
$h++;
|
||||
}
|
||||
|
||||
echo "+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
$MAIN2.="+------+-------------------------------------------------------------------------------------------------------+-------+-------+\n";
|
||||
}
|
||||
|
||||
$TEXT.=$MAIN2."\n";
|
||||
$HTML.=$MAIN2."</font></pre></td></tr></table>";
|
||||
|
||||
if ($show_details) {
|
||||
$stmt="select * from park_log where parked_time >= '$query_date 00:00:01' and parked_time <= '$query_date 23:59:59' and channel_group='" . mysqli_real_escape_string($link, $group) . "' order by parked_time, grab_time, hangup_time desc";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
@@ -620,9 +741,14 @@ if ($show_details) {
|
||||
if (!$lower_limit) {$lower_limit=1;}
|
||||
if ($lower_limit+999>=mysqli_num_rows($rslt)) {$upper_limit=($lower_limit+mysqli_num_rows($rslt)%1000)-1;} else {$upper_limit=$lower_limit+999;}
|
||||
|
||||
echo "\n\n--- "._QXZ("PARK LOG RECORDS FOR")." $query_date, "._QXZ("CHANNEL GROUP")." $group\n --- "._QXZ("RECORDS")." #$lower_limit-$upper_limit ";
|
||||
# echo "<a href=\"$PHP_SELF?SUBMIT=$SUBMIT&DB=$DB&group=$group&show_detail=$show_detail&sort_by_detail=$sort_by_detail&query_date=$query_date&lower_limit=$lower_limit&upper_limit=$upper_limit&file_download=1\">["._QXZ("DOWNLOAD")."]</a>";
|
||||
echo "\n";
|
||||
$TEXT.="\n\n--- "._QXZ("PARK LOG RECORDS FOR")." $query_date, "._QXZ("CHANNEL GROUP")." $group\n --- "._QXZ("RECORDS")." #$lower_limit-$upper_limit ";
|
||||
# $MAIN.="<a href=\"$PHP_SELF?SUBMIT=$SUBMIT&DB=$DB&group=$group&show_detail=$show_detail&sort_by_detail=$sort_by_detail&query_date=$query_date&lower_limit=$lower_limit&upper_limit=$upper_limit&file_download=1\">["._QXZ("DOWNLOAD")."]</a>";
|
||||
$TEXT.="\n";
|
||||
|
||||
$HTML.="<BR><table border='0' cellpadding='3' cellspacing='1'>";
|
||||
$HTML.="<tr bgcolor='#".$SSstd_row1_background."'>";
|
||||
$HTML.="<th colspan='11'><font size='2'>"._QXZ("PARK LOG RECORDS FOR")." $query_date, "._QXZ("CHANNEL GROUP")." $group\n --- "._QXZ("RECORDS")." #$lower_limit-$upper_limit</font></th>";
|
||||
$HTML.="</tr>\n";
|
||||
|
||||
if (mysqli_num_rows($rslt)>0) {
|
||||
|
||||
@@ -631,6 +757,21 @@ if ($show_details) {
|
||||
$output.="| "._QXZ("PARKED TIME",19)." | "._QXZ("GRAB TIME",19)." | "._QXZ("HANGUP TIME",19)." | "._QXZ("STATUS",10)." | "._QXZ("CHANNEL",30)." | "._QXZ("SERVER IP",15)." | "._QXZ("PARKED SEC",10)." | "._QXZ("TALKED SEC",10)." | "._QXZ("EXTENSION",20)." | "._QXZ("USER",10)." | "._QXZ("LEAD ID",10)." |\n";
|
||||
$output.=$header;
|
||||
$i=0;
|
||||
|
||||
$HTML.="<tr bgcolor='#".$SSstd_row1_background."'>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("PARKED TIME")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("GRAB TIME")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("HANGUP TIME")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("STATUS")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("CHANNEL")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("SERVER IP")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("PARKED SEC")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("TALKED SEC")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("EXTENSION")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("USER")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("LEAD ID")."</font></th>";
|
||||
$HTML.="</tr>\n";
|
||||
|
||||
while($row=mysqli_fetch_array($rslt)) {
|
||||
$i++;
|
||||
$output.="| ";
|
||||
@@ -645,29 +786,65 @@ if ($show_details) {
|
||||
$output.=sprintf("%-20s", substr($row["extension"], 0, 20))." | ";
|
||||
$output.=sprintf("%-10s", $row["user"])." | ";
|
||||
$output.=sprintf("%-10s", $row["lead_id"])." |\n";
|
||||
|
||||
$HTML.="<tr bgcolor='#".$SSstd_row2_background."'>";
|
||||
$HTML.="<th><font size='2'>".$row["parked_time"]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$row["grab_time"]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$row["hangup_time"]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$row["status"]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$row["channel"]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$row["server_ip"]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$row["parked_sec"]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$row["talked_sec"]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$row["extension"]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$row["user"]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$row["lead_id"]."</font></th>";
|
||||
$HTML.="</tr>\n";
|
||||
|
||||
}
|
||||
$output.=$header;
|
||||
|
||||
$ll=$lower_limit-1000;
|
||||
$HTML.="<tr bgcolor='#".$SSstd_row1_background."'>";
|
||||
if ($ll>=1) {
|
||||
$output.="<a href=\"$PHP_SELF?SUBMIT=$SUBMIT&DB=$DB&group=$group&show_detail=$show_detail&sort_by_detail=$sort_by_detail&query_date=$query_date&lower_limit=$ll\">[<<< "._QXZ("PREV")." 1000 "._QXZ("records")."]</a>";
|
||||
$output.="<a href=\"$PHP_SELF?SUBMIT=$SUBMIT&DB=$DB&group=$group&show_detail=$show_detail&report_display_type=$report_display_type&sort_by_detail=$sort_by_detail&query_date=$query_date&lower_limit=$ll\">[<<< "._QXZ("PREV")." 1000 "._QXZ("records")."]</a>";
|
||||
$HTML.="<th colspan='6'><font size='2'><a href=\"$PHP_SELF?SUBMIT=$SUBMIT&DB=$DB&group=$group&show_detail=$show_detail&report_display_type=$report_display_type&sort_by_detail=$sort_by_detail&query_date=$query_date&lower_limit=$ll\">[<<< "._QXZ("PREV")." 1000 "._QXZ("records")."]</a></font></th>";
|
||||
} else {
|
||||
$output.=sprintf("%-23s", " ");
|
||||
$HTML.="<td colspan='6'> </td>";
|
||||
}
|
||||
$output.=sprintf("%-171s", " ");
|
||||
|
||||
if (($lower_limit+1000)<mysqli_num_rows($rslt)) {
|
||||
if ($upper_limit+1000>=mysqli_num_rows($rslt)) {$max_limit=mysqli_num_rows($rslt)-$upper_limit;} else {$max_limit=1000;}
|
||||
$dial_log_rpt_hf.="<a href=\"$PHP_SELF?SUBMIT=$SUBMIT&DB=$DB&group=$group&show_detail=$show_detail&sort_by_detail=$sort_by_detail&query_date=$query_date&lower_limit=".($lower_limit+1000)."\">["._QXZ("NEXT")." $max_limit "._QXZ("records")." >>>]</a>";
|
||||
$output.="<a href=\"$PHP_SELF?SUBMIT=$SUBMIT&DB=$DB&group=$group&show_detail=$show_detail&report_display_type=$report_display_type&sort_by_detail=$sort_by_detail&query_date=$query_date&lower_limit=".($lower_limit+1000)."\">["._QXZ("NEXT")." $max_limit "._QXZ("records")." >>>]</a>";
|
||||
$HTML.="<td align='right' colspan='5'><font size='2'><a href=\"$PHP_SELF?SUBMIT=$SUBMIT&DB=$DB&group=$group&show_detail=$show_detail&report_display_type=$report_display_type&sort_by_detail=$sort_by_detail&query_date=$query_date&lower_limit=".($lower_limit+1000)."\">["._QXZ("NEXT")." $max_limit "._QXZ("records")." >>>]</a></font></th>";
|
||||
} else {
|
||||
$output.=sprintf("%23s", " ");
|
||||
$HTML.="<td colspan='5'> </th>";
|
||||
}
|
||||
$output.="\n";
|
||||
|
||||
echo $output;
|
||||
$TEXT.=$output;
|
||||
$HTML.="</tr></table>";
|
||||
}
|
||||
}
|
||||
|
||||
$TEXT.="</font></PRE>\n";
|
||||
|
||||
if ($report_display_type=="HTML") {
|
||||
$MAIN.=$HTML;
|
||||
} else {
|
||||
$MAIN.=$TEXT;
|
||||
}
|
||||
|
||||
$MAIN.="</form></BODY></HTML>\n";
|
||||
|
||||
echo $HEADER;
|
||||
require("admin_header.php");
|
||||
echo $MAIN;
|
||||
|
||||
|
||||
$endMS = microtime();
|
||||
$startMSary = explode(" ",$startMS);
|
||||
$endMSary = explode(" ",$endMS);
|
||||
@@ -680,5 +857,3 @@ if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
?>
|
||||
</PRE>
|
||||
</BODY></HTML>
|
||||
|
||||
@@ -439,6 +439,44 @@ else
|
||||
$user_SQL = "and vicidial_users.user IN($user_SQL)";
|
||||
}
|
||||
|
||||
##### BEGIN Define colors and logo #####
|
||||
$SSmenu_background='015B91';
|
||||
$SSframe_background='D9E6FE';
|
||||
$SSstd_row1_background='9BB9FB';
|
||||
$SSstd_row2_background='B9CBFD';
|
||||
$SSstd_row3_background='8EBCFD';
|
||||
$SSstd_row4_background='B6D3FC';
|
||||
$SSstd_row5_background='FFFFFF';
|
||||
$SSalt_row1_background='BDFFBD';
|
||||
$SSalt_row2_background='99FF99';
|
||||
$SSalt_row3_background='CCFFCC';
|
||||
|
||||
$screen_color_stmt="select admin_screen_colors from system_settings";
|
||||
$screen_color_rslt=mysql_to_mysqli($screen_color_stmt, $link);
|
||||
$screen_color_row=mysqli_fetch_row($screen_color_rslt);
|
||||
$agent_screen_colors="$screen_color_row[0]";
|
||||
|
||||
if ($agent_screen_colors != 'default')
|
||||
{
|
||||
$asc_stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo FROM vicidial_screen_colors where colors_id='$agent_screen_colors';";
|
||||
$asc_rslt=mysql_to_mysqli($asc_stmt, $link);
|
||||
$qm_conf_ct = mysqli_num_rows($asc_rslt);
|
||||
if ($qm_conf_ct > 0)
|
||||
{
|
||||
$asc_row=mysqli_fetch_row($asc_rslt);
|
||||
$SSmenu_background = $asc_row[0];
|
||||
$SSframe_background = $asc_row[1];
|
||||
$SSstd_row1_background = $asc_row[2];
|
||||
$SSstd_row2_background = $asc_row[3];
|
||||
$SSstd_row3_background = $asc_row[4];
|
||||
$SSstd_row4_background = $asc_row[5];
|
||||
$SSstd_row5_background = $asc_row[6];
|
||||
$SSalt_row1_background = $asc_row[7];
|
||||
$SSalt_row2_background = $asc_row[8];
|
||||
$SSalt_row3_background = $asc_row[9];
|
||||
$SSweb_logo = $asc_row[10];
|
||||
}
|
||||
}
|
||||
|
||||
if ($DB) {$HTML_text.="$user_group_string|$user_group_ct|$user_groupQS|$i<BR>";}
|
||||
|
||||
@@ -477,7 +515,7 @@ $HTML_text.="<TABLE CELLPADDING=3 CELLSPACING=0><TR><TD>";
|
||||
$HTML_text.="<b>"._QXZ("$report_name")."</b> $NWB#performance_comparison_report$NWE\n";
|
||||
|
||||
$HTML_text.="<FORM ACTION=\"$PHP_SELF\" METHOD=GET name=vicidial_report id=vicidial_report>\n";
|
||||
$HTML_text.="<TABLE CELLSPACING=3 BGCOLOR=\"#e3e3ff\"><TR><TD VALIGN=TOP> "._QXZ("Date").":<BR>";
|
||||
$HTML_text.="<TABLE CELLSPACING=3 BGCOLOR=\"#".$SSframe_background."\"><TR><TD VALIGN=TOP> "._QXZ("Date").":<BR>";
|
||||
$HTML_text.="<INPUT TYPE=hidden NAME=DB VALUE=\"$DB\">\n";
|
||||
$HTML_text.="<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">";
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#
|
||||
# 160115-2303 - First build
|
||||
# 170409-1538 - Added IP List validation code
|
||||
# 170824-2130 - Added HTML formatting and screen colors
|
||||
#
|
||||
|
||||
$startMS = microtime();
|
||||
@@ -60,9 +61,9 @@ if (!isset($access_date_T)) {$access_date_T="00:00:00";}
|
||||
if (!isset($access_date_end_T)) {$access_date_end_T="23:59:59";}
|
||||
$access_date_from="$access_date_D $access_date_T";
|
||||
$access_date_to="$access_date_end_D $access_date_end_T";
|
||||
$CSV_text="\"RECORDING ACCESS LOG REPORT\"\n";
|
||||
$CSV_text.="\"ACCESS DATE RANGE:\",\"$access_date_from to $access_date_to\"\n";
|
||||
$ASCII_rpt_header="ACCESS DATE RANGE: $access_date_from to $access_date_to\n";
|
||||
$CSV_text="\""._QXZ("RECORDING ACCESS LOG REPORT")."\"\n";
|
||||
$CSV_text.="\""._QXZ("ACCESS DATE RANGE").":\",\"$access_date_from "._QXZ("to")." $access_date_to\"\n";
|
||||
$ASCII_rpt_header=""._QXZ("ACCESS DATE RANGE").": $access_date_from "._QXZ("to")." $access_date_to\n";
|
||||
|
||||
$recording_date_SQL="";
|
||||
if ($recording_date_D)
|
||||
@@ -70,9 +71,10 @@ if ($recording_date_D)
|
||||
if (!isset($recording_date_end_D)) {$recording_date_end_D=$recording_date_D;}
|
||||
$recording_date_from="$recording_date_D 00:00:00";
|
||||
$recording_date_to="$recording_date_end_D 23:59:59";
|
||||
$recording_date_title="<LI>"._QXZ("RECORDINGS CREATED")." $recording_date_D "._QXZ("to")." $recording_date_end_D";
|
||||
$recording_date_SQL=" start_time>='$recording_date_from' and start_time<='$recording_date_to' and ";
|
||||
$CSV_text.="\"RECORDING DATE RANGE:\",\"$recording_date_from to $recording_date_to\"\n";
|
||||
$ASCII_rpt_header.="RECORDING DATE RANGE: $recording_date_from to $recording_date_to\n";
|
||||
$CSV_text.="\""._QXZ("RECORDING DATE RANGE").":\",\"$recording_date_from "._QXZ("to")." $recording_date_to\"\n";
|
||||
$ASCII_rpt_header.=_QXZ("RECORDING DATE RANGE").": $recording_date_from "._QXZ("to")." $recording_date_to\n";
|
||||
}
|
||||
|
||||
|
||||
@@ -355,9 +357,10 @@ if ( (preg_match('/\-\-ALL\-\-/',$user_string) ) or ($user_ct < 1) )
|
||||
{$vu_user_SQL = ""; $vra_user_SQL = ""; $user_SQL="";}
|
||||
else
|
||||
{
|
||||
$ASCII_rpt_header.="AGENTS: ".implode(", ", $users)."\n";
|
||||
$CSV_text.="\"AGENTS:\",\"".implode(", ", $users)."\"\n";
|
||||
$GRAPH_header.="<th class='column_header grey_graph_cell'>SELECTED AGENTS</th>";
|
||||
$agents_title="<LI>"._QXZ("AGENTS").": ".implode(", ", $users);
|
||||
$ASCII_rpt_header.=_QXZ("AGENTS").": ".implode(", ", $users)."\n";
|
||||
$CSV_text.="\""._QXZ("AGENTS").":\",\"".implode(", ", $users)."\"\n";
|
||||
$GRAPH_header.="<th class='column_header grey_graph_cell'>"._QXZ("SELECTED AGENTS")."</th>";
|
||||
}
|
||||
|
||||
$i=0;
|
||||
@@ -375,12 +378,51 @@ if ( (preg_match('/\-\-ALL\-\-/',$user_group_string) ) or ($user_group_ct < 1) )
|
||||
{$user_group_SQL = "";}
|
||||
else
|
||||
{
|
||||
$ASCII_rpt_header.=" User groups: ".implode(", ", $user_group)."\n";
|
||||
$CSV_text.="\"User groups:\",\"".implode(", ", $user_group)."\"\n";
|
||||
$GRAPH_header.="<th class='column_header grey_graph_cell'>SELECTED USER GROUPS</th>";
|
||||
$ASCII_rpt_header.=" "._QXZ("User groups").": ".implode(", ", $user_group)."\n";
|
||||
$CSV_text.="\""._QXZ("User groups").":\",\"".implode(", ", $user_group)."\"\n";
|
||||
$GRAPH_header.="<th class='column_header grey_graph_cell'>"._QXZ("SELECTED USER GROUPS")."</th>";
|
||||
}
|
||||
|
||||
|
||||
##### BEGIN Define colors and logo #####
|
||||
$SSmenu_background='015B91';
|
||||
$SSframe_background='D9E6FE';
|
||||
$SSstd_row1_background='9BB9FB';
|
||||
$SSstd_row2_background='B9CBFD';
|
||||
$SSstd_row3_background='8EBCFD';
|
||||
$SSstd_row4_background='B6D3FC';
|
||||
$SSstd_row5_background='FFFFFF';
|
||||
$SSalt_row1_background='BDFFBD';
|
||||
$SSalt_row2_background='99FF99';
|
||||
$SSalt_row3_background='CCFFCC';
|
||||
|
||||
$screen_color_stmt="select admin_screen_colors from system_settings";
|
||||
$screen_color_rslt=mysql_to_mysqli($screen_color_stmt, $link);
|
||||
$screen_color_row=mysqli_fetch_row($screen_color_rslt);
|
||||
$agent_screen_colors="$screen_color_row[0]";
|
||||
|
||||
if ($agent_screen_colors != 'default')
|
||||
{
|
||||
$asc_stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo FROM vicidial_screen_colors where colors_id='$agent_screen_colors';";
|
||||
$asc_rslt=mysql_to_mysqli($asc_stmt, $link);
|
||||
$qm_conf_ct = mysqli_num_rows($asc_rslt);
|
||||
if ($qm_conf_ct > 0)
|
||||
{
|
||||
$asc_row=mysqli_fetch_row($asc_rslt);
|
||||
$SSmenu_background = $asc_row[0];
|
||||
$SSframe_background = $asc_row[1];
|
||||
$SSstd_row1_background = $asc_row[2];
|
||||
$SSstd_row2_background = $asc_row[3];
|
||||
$SSstd_row3_background = $asc_row[4];
|
||||
$SSstd_row4_background = $asc_row[5];
|
||||
$SSstd_row5_background = $asc_row[6];
|
||||
$SSalt_row1_background = $asc_row[7];
|
||||
$SSalt_row2_background = $asc_row[8];
|
||||
$SSalt_row3_background = $asc_row[9];
|
||||
$SSweb_logo = $asc_row[10];
|
||||
}
|
||||
}
|
||||
|
||||
if ($DB) {echo "$user_group_string|$user_group_ct|$user_groupQS|$i<BR>\n";}
|
||||
|
||||
$LINKbase = "$PHP_SELF?query_date=$query_date&end_date=$end_date$groupQS$user_groupQS&shift=$shift&DB=$DB&show_percentages=$show_percentages";
|
||||
@@ -514,7 +556,11 @@ $HTML_text.="o_cal.a_tpl.yearscroll = false;\n";
|
||||
$HTML_text.="// o_cal.a_tpl.weekstart = 1; // Monday week start\n";
|
||||
$HTML_text.="</script>\n";
|
||||
#$HTML_text.=" <INPUT TYPE=TEXT NAME=access_date_end_T SIZE=9 MAXLENGTH=8 VALUE=\"$recording_date_end_T\">";
|
||||
$HTML_text.="</TD><TD VALIGN='TOP'><BR><BR>";
|
||||
$HTML_text.="</TD><TD VALIGN='TOP'>";
|
||||
$HTML_text.=_QXZ("Display as:")."<BR>";
|
||||
$HTML_text.="<select name='report_display_type'>";
|
||||
if ($report_display_type) {$HTML_text.="<option value='$report_display_type' selected>$report_display_type</option>";}
|
||||
$HTML_text.="<option value='TEXT'>TEXT</option><option value='HTML'>HTML</option></select>\n<BR><BR>";
|
||||
$HTML_text.="<INPUT TYPE=SUBMIT NAME=SUBMIT VALUE='"._QXZ("SUBMIT")."'>\n";
|
||||
if ($archives_available=="Y")
|
||||
{
|
||||
@@ -524,7 +570,7 @@ $HTML_text.="</TD>";
|
||||
$HTML_text.="</TR></TABLE>";
|
||||
$HTML_text.="</FORM>\n\n";
|
||||
|
||||
$HTML_text.="<PRE><FONT SIZE=2>\n";
|
||||
$TEXT.="<PRE><FONT SIZE=2>\n";
|
||||
|
||||
if ($SUBMIT)
|
||||
{
|
||||
@@ -532,13 +578,28 @@ if ($SUBMIT)
|
||||
if ($DB) {print $stmt."\n";}
|
||||
|
||||
$ASCII_border="+--------------+---------------------+------------+--------------------------------+---------------------+---------------------+-----------------+\n";
|
||||
$HTML_text.=$ASCII_rpt_header;
|
||||
$HTML_text.=sprintf("%110s", " ");
|
||||
$HTML_text.="<a href=\"$PHP_SELF?DB=$DB&access_date_D=$access_date_D&access_date_T=$access_date_T&access_date_end_D=$access_date_end_D&access_date_end_T=$access_date_end_T&recording_date_D=$recording_date_D&recording_date_end_D=$recording_date_end_D$userQS$user_groupQS&file_download=1&SUBMIT=$SUBMIT\">"._QXZ("DOWNLOAD")."</a>\n";
|
||||
$TEXT.=$ASCII_rpt_header;
|
||||
$TEXT.=sprintf("%110s", " ");
|
||||
$TEXT.="<a href=\"$PHP_SELF?DB=$DB&access_date_D=$access_date_D&access_date_T=$access_date_T&access_date_end_D=$access_date_end_D&access_date_end_T=$access_date_end_T&recording_date_D=$recording_date_D&recording_date_end_D=$recording_date_end_D$userQS$user_groupQS&file_download=1&SUBMIT=$SUBMIT\">"._QXZ("DOWNLOAD")."</a>\n";
|
||||
|
||||
$HTML_text.=$ASCII_border;
|
||||
$HTML_text.="| RECORDING ID | RECORDING DATE/TIME | LEAD ID | USER | DATE/TIME ACCESSED | ACCESS RESULT | IP |\n";
|
||||
$HTML_text.=$ASCII_border;
|
||||
$HTML.="<BR><table border='0' cellpadding='3' cellspacing='1'>";
|
||||
$HTML.="<tr bgcolor='#".$SSstd_row1_background."'>";
|
||||
$HTML.="<td colspan='6' align='left'><B><font size='2'>"._QXZ("RECORDING ACCESS LOG FOR:")."<UL><LI>"._QXZ("RECORDS VIEWED ")."$access_date_from "._QXZ("TO")." $access_date_to$recording_date_title $agents_title</UL></font></B></td>";
|
||||
$HTML.="<th><font size='2'><a href=\"$PHP_SELF?DB=$DB&access_date_D=$access_date_D&access_date_T=$access_date_T&access_date_end_D=$access_date_end_D&access_date_end_T=$access_date_end_T&recording_date_D=$recording_date_D&recording_date_end_D=$recording_date_end_D$userQS$user_groupQS&file_download=1&SUBMIT=$SUBMIT\">"._QXZ("DOWNLOAD")."</a></font></th>";
|
||||
$HTML.="</tr>\n";
|
||||
$HTML.="<tr bgcolor='#".$SSstd_row1_background."'>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("RECORDING ID")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("RECORDING DATE/TIME")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("LEAD ID")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("USER")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("DATE/TIME ACCESSED")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("ACCESS RESULT")."</font></th>";
|
||||
$HTML.="<th><font size='2'>"._QXZ("IP")."</font></th>";
|
||||
$HTML.="</tr>\n";
|
||||
|
||||
$TEXT.=$ASCII_border;
|
||||
$TEXT.="| RECORDING ID | RECORDING DATE/TIME | LEAD ID | USER | DATE/TIME ACCESSED | ACCESS RESULT | IP |\n";
|
||||
$TEXT.=$ASCII_border;
|
||||
|
||||
$CSV_text.="\n\"RECORDING ID\",\"RECORDING DATE/TIME\",\"LEAD ID\",\"USER\",\"DATE/TIME ACCESSED\",\"ACCESS RESULT\",\"IP\"\n";
|
||||
|
||||
@@ -546,31 +607,41 @@ if ($SUBMIT)
|
||||
while ($row=mysqli_fetch_array($rslt))
|
||||
{
|
||||
$full_user=substr($row["user"]." - ".$row["full_name"], 0, 30);
|
||||
$HTML_text.="| ";
|
||||
$HTML_text.=sprintf("%-12s", $row["recording_id"])." | ";
|
||||
$HTML_text.=sprintf("%-19s", $row["start_time"])." | ";
|
||||
$HTML_text.=sprintf("%-10s", $row["lead_id"])." | ";
|
||||
$HTML_text.=sprintf("%-30s", $full_user)." | ";
|
||||
$HTML_text.=sprintf("%-19s", $row["access_datetime"])." | ";
|
||||
$HTML_text.=sprintf("%-19s", $row["access_result"])." | ";
|
||||
$HTML_text.=sprintf("%-15s", $row["ip"])." |\n";
|
||||
$TEXT.="| ";
|
||||
$TEXT.=sprintf("%-12s", $row["recording_id"])." | ";
|
||||
$TEXT.=sprintf("%-19s", $row["start_time"])." | ";
|
||||
$TEXT.=sprintf("%-10s", $row["lead_id"])." | ";
|
||||
$TEXT.=sprintf("%-30s", $full_user)." | ";
|
||||
$TEXT.=sprintf("%-19s", $row["access_datetime"])." | ";
|
||||
$TEXT.=sprintf("%-19s", $row["access_result"])." | ";
|
||||
$TEXT.=sprintf("%-15s", $row["ip"])." |\n";
|
||||
|
||||
$HTML.="<tr bgcolor='#".$SSstd_row2_background."'>";
|
||||
$HTML.="<th><font size='2'>".$row["recording_id"]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$row["start_time"]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$row["lead_id"]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$row["user"]." - ".$row["full_name"]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$row["access_datetime"]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$row["access_result"]."</font></th>";
|
||||
$HTML.="<th><font size='2'>".$row["ip"]."</font></th>";
|
||||
$HTML.="</tr>\n";
|
||||
|
||||
$CSV_text.="\"$row[recording_id]\",\"$row[start_time]\",\"$row[lead_id]\",\"$full_user\",\"$row[access_datetime]\",\"$row[access_result]\",\"$row[ip]\"\n";
|
||||
}
|
||||
$HTML_text.=$ASCII_border;
|
||||
/*
|
||||
+-------------------------+--------------+---------+------+---------------------+---------------------+-----------+------------+---------------------+
|
||||
| recording_access_log_id | recording_id | lead_id | user | access_datetime | access_result | full_name | user_group | start_time | ip
|
||||
+-------------------------+--------------+---------+------+---------------------+---------------------+-----------+------------+---------------------+
|
||||
| 1599 | 164677 | 1079414 | 6666 | 2016-01-12 23:50:04 | INVALID PERMISSIONS | Admin | ADMIN | 2016-01-09 08:22:17 |
|
||||
| 1600 | 164668 | 1177978 | 6666 | 2016-01-12 23:52:49 | ACCESSED | Admin | ADMIN | 2016-01-06 22:25:08 |
|
||||
| 1601 | 164678 | 1177980 | 6666 | 2016-01-12 23:57:43 | ACCESSED | Admin | ADMIN | 2016-01-09 08:27:56 |
|
||||
| 1602 | 164678 | 1177980 | 6666 | 2016-01-13 00:42:54 | INVALID PERMISSIONS | Admin | ADMIN | 2016-01-09 08:27:56 |
|
||||
+-------------------------+--------------+---------+------+---------------------+---------------------+-----------+------------+---------------------+
|
||||
*/
|
||||
$TEXT.=$ASCII_border;
|
||||
|
||||
}
|
||||
|
||||
$HTML_text.="</FONT></PRE></BODY></HTML>";
|
||||
$TEXT.="</FONT></PRE>";
|
||||
$HTML.="</table>";
|
||||
|
||||
if ($report_display_type=="HTML") {
|
||||
$HTML_text.=$HTML;
|
||||
} else {
|
||||
$HTML_text.=$TEXT;
|
||||
}
|
||||
|
||||
$HTML_text.="</BODY></HTML>";
|
||||
|
||||
|
||||
if ($file_download == 0 || !$file_download)
|
||||
|
||||
@@ -453,6 +453,46 @@ else
|
||||
$user_group_SQL = preg_replace('/,$/i', '',$user_group_SQL);
|
||||
$user_group_SQL = "and ".$vicidial_agent_log_table.".user_group IN($user_group_SQL)";
|
||||
}
|
||||
|
||||
##### BEGIN Define colors and logo #####
|
||||
$SSmenu_background='015B91';
|
||||
$SSframe_background='D9E6FE';
|
||||
$SSstd_row1_background='9BB9FB';
|
||||
$SSstd_row2_background='B9CBFD';
|
||||
$SSstd_row3_background='8EBCFD';
|
||||
$SSstd_row4_background='B6D3FC';
|
||||
$SSstd_row5_background='FFFFFF';
|
||||
$SSalt_row1_background='BDFFBD';
|
||||
$SSalt_row2_background='99FF99';
|
||||
$SSalt_row3_background='CCFFCC';
|
||||
|
||||
$screen_color_stmt="select admin_screen_colors from system_settings";
|
||||
$screen_color_rslt=mysql_to_mysqli($screen_color_stmt, $link);
|
||||
$screen_color_row=mysqli_fetch_row($screen_color_rslt);
|
||||
$agent_screen_colors="$screen_color_row[0]";
|
||||
|
||||
if ($agent_screen_colors != 'default')
|
||||
{
|
||||
$asc_stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo FROM vicidial_screen_colors where colors_id='$agent_screen_colors';";
|
||||
$asc_rslt=mysql_to_mysqli($asc_stmt, $link);
|
||||
$qm_conf_ct = mysqli_num_rows($asc_rslt);
|
||||
if ($qm_conf_ct > 0)
|
||||
{
|
||||
$asc_row=mysqli_fetch_row($asc_rslt);
|
||||
$SSmenu_background = $asc_row[0];
|
||||
$SSframe_background = $asc_row[1];
|
||||
$SSstd_row1_background = $asc_row[2];
|
||||
$SSstd_row2_background = $asc_row[3];
|
||||
$SSstd_row3_background = $asc_row[4];
|
||||
$SSstd_row4_background = $asc_row[5];
|
||||
$SSstd_row5_background = $asc_row[6];
|
||||
$SSalt_row1_background = $asc_row[7];
|
||||
$SSalt_row2_background = $asc_row[8];
|
||||
$SSalt_row3_background = $asc_row[9];
|
||||
$SSweb_logo = $asc_row[10];
|
||||
}
|
||||
}
|
||||
|
||||
######################################
|
||||
if ($DB) {$HTML_text.="$user_group_string|$user_group_ct|$user_groupQS|$i<BR>";}
|
||||
|
||||
@@ -489,7 +529,7 @@ $HTML_text.="<TABLE CELLPADDING=3 CELLSPACING=0><TR><TD>";
|
||||
$HTML_text.="<b>"._QXZ("$report_name")."</b> $NWB#team_performance_detail$NWE\n";
|
||||
|
||||
$HTML_text.="<FORM ACTION=\"$PHP_SELF\" METHOD=GET name=vicidial_report id=vicidial_report>\n";
|
||||
$HTML_text.="<TABLE CELLSPACING=3 BGCOLOR=\"#e3e3ff\"><TR><TD VALIGN=TOP>";
|
||||
$HTML_text.="<TABLE CELLSPACING=3 BGCOLOR=\"#".$SSframe_background."\"><TR><TD VALIGN=TOP>";
|
||||
$HTML_text.="<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">\n";
|
||||
$HTML_text.="<INPUT TYPE=HIDDEN NAME=type VALUE=\"$type\">\n";
|
||||
$HTML_text.="Date Range:<BR>\n";
|
||||
|
||||
@@ -610,7 +610,7 @@ if ($file_download > 0)
|
||||
|
||||
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET name=vicidial_report id=vicidial_report>";
|
||||
echo "<TABLE CELLSPACING=3 CELLPADDING=3 BGCOLOR=\"#e3e3ff\"><TR><TD VALIGN=TOP> "._QXZ("Date").":<BR>";
|
||||
echo "<TABLE CELLSPACING=3 CELLPADDING=3 BGCOLOR=\"#".$SSframe_background."\"><TR><TD VALIGN=TOP> "._QXZ("Date").":<BR>";
|
||||
echo "<INPUT TYPE=hidden NAME=DB VALUE=\"$DB\">\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">";
|
||||
?>
|
||||
|
||||
@@ -654,7 +654,7 @@ if ($file_download > 0)
|
||||
|
||||
|
||||
echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET name=vicidial_report id=vicidial_report>";
|
||||
echo "<TABLE CELLSPACING=3 CELLPADDING=3 BGCOLOR=\"#e3e3ff\"><TR><TD VALIGN=TOP> "._QXZ("Date").":<BR>";
|
||||
echo "<TABLE CELLSPACING=3 CELLPADDING=3 BGCOLOR=\"#".$SSframe_background."\"><TR><TD VALIGN=TOP> "._QXZ("Date").":<BR>";
|
||||
echo "<INPUT TYPE=hidden NAME=DB VALUE=\"$DB\">\n";
|
||||
echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">";
|
||||
?>
|
||||
|
||||
@@ -377,7 +377,7 @@ $HTML_text.="<TABLE CELLPADDING=3 CELLSPACING=0><TR><TD>";
|
||||
$HTML_text.="<b>"._QXZ("$report_name")."</b> $NWB#usergroup_login$NWE\n";
|
||||
|
||||
$HTML_text.="<FORM ACTION=\"$PHP_SELF\" METHOD=GET name=vicidial_report id=vicidial_report>\n";
|
||||
$HTML_text.="<TABLE CELLSPACING=3 BGCOLOR=\"#e3e3ff\"><TR><TD VALIGN=TOP> <BR>";
|
||||
$HTML_text.="<TABLE CELLSPACING=3 BGCOLOR=\"#".$SSframe_background."\"><TR><TD VALIGN=TOP> <BR>";
|
||||
$HTML_text.="<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">\n";
|
||||
$HTML_text.="<INPUT TYPE=HIDDEN NAME=type VALUE=\"$type\">\n";
|
||||
$HTML_text.="</TD><TD VALIGN=TOP>"._QXZ("Teams/User Groups").":<BR>";
|
||||
|
||||
+11
-5
@@ -2263,6 +2263,8 @@ if (isset($_GET["inbound_survey_callmenu"])) {$inbound_survey_callmenu=$_GET["
|
||||
elseif (isset($_POST["inbound_survey_callmenu"])) {$inbound_survey_callmenu=$_POST["inbound_survey_callmenu"];}
|
||||
if (isset($_GET["allow_manage_active_lists"])) {$allow_manage_active_lists=$_GET["allow_manage_active_lists"];}
|
||||
elseif (isset($_POST["allow_manage_active_lists"])) {$allow_manage_active_lists=$_POST["allow_manage_active_lists"];}
|
||||
if (isset($_GET["filename_override"])) {$filename_override=$_GET["filename_override"];}
|
||||
elseif (isset($_POST["filename_override"])) {$filename_override=$_POST["filename_override"];}
|
||||
|
||||
|
||||
if (isset($script_id)) {$script_id= strtoupper($script_id);}
|
||||
@@ -3182,6 +3184,7 @@ if ($non_latin < 1)
|
||||
$api_ip_list = preg_replace('/[^-_0-9a-zA-Z]/','',$api_ip_list);
|
||||
$ip_list_id = preg_replace('/[^-_0-9a-zA-Z]/','',$ip_list_id);
|
||||
$inbound_survey_callmenu = preg_replace('/[^-_0-9a-zA-Z]/','',$inbound_survey_callmenu);
|
||||
$filename_override = preg_replace('/[^-_0-9a-zA-Z]/','',$filename_override);
|
||||
|
||||
### ALPHA-NUMERIC and underscore and dash and slash and dot
|
||||
$menu_timeout_prompt = preg_replace('/[^-\/\|\._0-9a-zA-Z]/','',$menu_timeout_prompt);
|
||||
@@ -4165,12 +4168,13 @@ else
|
||||
# 170818-0741 - Added User Group Hourly Report v2(detail)
|
||||
# 170819-0949 - Added allow_manage_active_lists system setting
|
||||
# 170821-2009 - Fix for issue #1036
|
||||
# 170825-1708 - Added filename_override option for Automated Reports, added more space for report_times
|
||||
#
|
||||
|
||||
# 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-625a';
|
||||
$build = '170821-2009';
|
||||
$admin_version = '2.14-626a';
|
||||
$build = '170825-1708';
|
||||
|
||||
$STARTtime = date("U");
|
||||
$SQLdate = date("Y-m-d H:i:s");
|
||||
@@ -16673,7 +16677,7 @@ if ($ADD==494111111111)
|
||||
$p++;
|
||||
}
|
||||
|
||||
$stmt="UPDATE vicidial_automated_reports set report_name='$report_name',report_server='$report_server',report_times='$report_times',report_weekdays='$REPORT_weekdays',report_monthdays='$report_monthdays',report_destination='$report_destination',email_from='$email_from',email_to='$email_to',email_subject='$email_subject',ftp_server='$ftp_server',ftp_user='" . mysqli_real_escape_string($link, $ftp_user) ."',ftp_pass='" . mysqli_real_escape_string($link, $ftp_pass) ."',ftp_directory='$ftp_directory',report_url='" . mysqli_real_escape_string($link, $report_url) ."',run_now_trigger='$run_now_trigger',active='$active',user_group='$user_group' where report_id='$report_id';";
|
||||
$stmt="UPDATE vicidial_automated_reports set report_name='$report_name',report_server='$report_server',report_times='$report_times',report_weekdays='$REPORT_weekdays',report_monthdays='$report_monthdays',report_destination='$report_destination',email_from='$email_from',email_to='$email_to',email_subject='$email_subject',ftp_server='$ftp_server',ftp_user='" . mysqli_real_escape_string($link, $ftp_user) ."',ftp_pass='" . mysqli_real_escape_string($link, $ftp_pass) ."',ftp_directory='$ftp_directory',report_url='" . mysqli_real_escape_string($link, $report_url) ."',run_now_trigger='$run_now_trigger',active='$active',user_group='$user_group',filename_override='$filename_override' where report_id='$report_id';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
echo "<br>"._QXZ("AUTOMATED REPORT MODIFIED").": $report_id\n";
|
||||
@@ -34265,7 +34269,7 @@ if ($ADD==394111111111)
|
||||
$o++;
|
||||
}
|
||||
|
||||
$stmt="SELECT report_id,report_name,report_last_run,report_last_length,report_server,report_times,report_weekdays,report_monthdays,report_destination,email_from,email_to,email_subject,ftp_server,ftp_user,ftp_pass,ftp_directory,report_url,run_now_trigger,active,user_group from vicidial_automated_reports where report_id='$report_id' $LOGadmin_viewable_groupsSQL;";
|
||||
$stmt="SELECT report_id,report_name,report_last_run,report_last_length,report_server,report_times,report_weekdays,report_monthdays,report_destination,email_from,email_to,email_subject,ftp_server,ftp_user,ftp_pass,ftp_directory,report_url,run_now_trigger,active,user_group,filename_override from vicidial_automated_reports where report_id='$report_id' $LOGadmin_viewable_groupsSQL;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$report_id = $row[0];
|
||||
@@ -34288,6 +34292,7 @@ if ($ADD==394111111111)
|
||||
$run_now_trigger = $row[17];
|
||||
$active = $row[18];
|
||||
$user_group = $row[19];
|
||||
$filename_override = $row[20];
|
||||
|
||||
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||
|
||||
@@ -34308,7 +34313,7 @@ if ($ADD==394111111111)
|
||||
echo "$servers_list";
|
||||
echo "<option SELECTED>$report_server</option>\n";
|
||||
echo "</select>$NWB#auto_reports-report_server$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Report Times").": </td><td align=left><input type=text name=report_times size=60 maxlength=100 id=report_times value=\"$report_times\">$NWB#auto_reports-report_times$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Report Times").": </td><td align=left><input type=text name=report_times size=80 maxlength=255 id=report_times value=\"$report_times\">$NWB#auto_reports-report_times$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right NOWRAP>"._QXZ("Report Weekdays").":</td><td align=left NOWRAP>\n";
|
||||
echo "<input type=\"checkbox\" name=\"report_weekdays[]\" value=\"0\"";
|
||||
if (preg_match('/0/',$report_weekdays)) {echo " CHECKED";}
|
||||
@@ -34345,6 +34350,7 @@ if ($ADD==394111111111)
|
||||
echo "<tr bgcolor=#$SSstd_row3_background><td align=right>"._QXZ("FTP User").": </td><td align=left><input type=text name=ftp_user size=40 maxlength=100 value=\"$ftp_user\">$NWB#auto_reports-ftp_user$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#$SSstd_row3_background><td align=right>"._QXZ("FTP Pass").": </td><td align=left><input type=text name=ftp_pass size=40 maxlength=100 value=\"$ftp_pass\">$NWB#auto_reports-ftp_pass$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#$SSstd_row3_background><td align=right>"._QXZ("FTP Directory").": </td><td align=left><input type=text name=ftp_directory size=60 maxlength=100 value=\"$ftp_directory\">$NWB#auto_reports-ftp_directory$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Filename Override").": </td><td align=left><input type=text name=filename_override size=80 maxlength=255 value=\"$filename_override\">$NWB#auto_reports-filename_override$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Active").": </td><td align=left><select size=1 name=active>\n";
|
||||
echo "<option value=\"Y\">"._QXZ("YES")."</option>\n";
|
||||
echo "<option value=\"N\">"._QXZ("NO")."</option>\n";
|
||||
|
||||
@@ -268,6 +268,44 @@ if ($SEARCHONLY > 0)
|
||||
if (strlen($action) < 1)
|
||||
{$action = 'CALLCARD_SUMMARY';}
|
||||
|
||||
##### BEGIN Define colors and logo #####
|
||||
$SSmenu_background='015B91';
|
||||
$SSframe_background='D9E6FE';
|
||||
$SSstd_row1_background='9BB9FB';
|
||||
$SSstd_row2_background='B9CBFD';
|
||||
$SSstd_row3_background='8EBCFD';
|
||||
$SSstd_row4_background='B6D3FC';
|
||||
$SSstd_row5_background='FFFFFF';
|
||||
$SSalt_row1_background='BDFFBD';
|
||||
$SSalt_row2_background='99FF99';
|
||||
$SSalt_row3_background='CCFFCC';
|
||||
|
||||
$screen_color_stmt="select admin_screen_colors from system_settings";
|
||||
$screen_color_rslt=mysql_to_mysqli($screen_color_stmt, $link);
|
||||
$screen_color_row=mysqli_fetch_row($screen_color_rslt);
|
||||
$agent_screen_colors="$screen_color_row[0]";
|
||||
|
||||
if ($agent_screen_colors != 'default')
|
||||
{
|
||||
$asc_stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo FROM vicidial_screen_colors where colors_id='$agent_screen_colors';";
|
||||
$asc_rslt=mysql_to_mysqli($asc_stmt, $link);
|
||||
$qm_conf_ct = mysqli_num_rows($asc_rslt);
|
||||
if ($qm_conf_ct > 0)
|
||||
{
|
||||
$asc_row=mysqli_fetch_row($asc_rslt);
|
||||
$SSmenu_background = $asc_row[0];
|
||||
$SSframe_background = $asc_row[1];
|
||||
$SSstd_row1_background = $asc_row[2];
|
||||
$SSstd_row2_background = $asc_row[3];
|
||||
$SSstd_row3_background = $asc_row[4];
|
||||
$SSstd_row4_background = $asc_row[5];
|
||||
$SSstd_row5_background = $asc_row[6];
|
||||
$SSalt_row1_background = $asc_row[7];
|
||||
$SSalt_row2_background = $asc_row[8];
|
||||
$SSalt_row3_background = $asc_row[9];
|
||||
$SSweb_logo = $asc_row[10];
|
||||
}
|
||||
}
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||
@@ -311,11 +349,11 @@ require("admin_header.php");
|
||||
$colspan='3';
|
||||
|
||||
?>
|
||||
<TABLE WIDTH=<?php echo $page_width ?> BGCOLOR=#E6E6E6 cellpadding=2 cellspacing=0>
|
||||
<TABLE WIDTH=<?php echo $page_width ?> BGCOLOR=#<?php echo $SSframe_background; ?> cellpadding=2 cellspacing=0>
|
||||
|
||||
<?php
|
||||
|
||||
echo "<TR BGCOLOR=\"#F0F5FE\"><TD ALIGN=LEFT COLSPAN=$colspan><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=3><B> \n";
|
||||
echo "<TR BGCOLOR=\"#".$SSframe_background."\"><TD ALIGN=LEFT COLSPAN=$colspan><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=3><B> \n";
|
||||
|
||||
$STARTtime = date("U");
|
||||
$TODAY = date("Y-m-d");
|
||||
@@ -457,27 +495,27 @@ if ($action == "CALLCARD_DETAIL")
|
||||
echo "<input type=hidden name=card_id value=\"$card_id\">\n";
|
||||
echo "<input type=hidden name=DB value=\"$DB\">\n";
|
||||
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Card ID").": </td><td align=left><B>$card_id</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("PIN").": </td><td align=left><B>$pin</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Status").": </td><td align=left><B>$status</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Run").": </td><td align=left><B>$run</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Batch").": </td><td align=left><B>$batch</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Pack").": </td><td align=left><B>$pack</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Sequence").": </td><td align=left><B>$sequence</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Balance Minutes").": </td><td align=left><B>$balance_minutes</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Initial Minutes").": </td><td align=left><B>$initial_minutes</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Initial Value").": </td><td align=left><B>$initial_value</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Purchase Order").": </td><td align=left><B>$note_purchase_order</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Printer").": </td><td align=left><B>$note_printer</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("DID").": </td><td align=left><B>$note_did</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("In-Group").": </td><td align=left><B>$inbound_group_id</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Language").": </td><td align=left><B>$note_language</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Name").": </td><td align=left><B>$note_name</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Comments").": </td><td align=left><B>$note_comments</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Create User/Date").": </td><td align=left><B>$create_user / $create_time</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Activate User/Date").": </td><td align=left><B>$activate_user / $activate_time</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Used User/Date").": </td><td align=left><B>$used_user / $used_time</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Void User/Date").": </td><td align=left><B>$void_user / $void_time</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Card ID").": </td><td align=left><B>$card_id</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("PIN").": </td><td align=left><B>$pin</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Status").": </td><td align=left><B>$status</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Run").": </td><td align=left><B>$run</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Batch").": </td><td align=left><B>$batch</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Pack").": </td><td align=left><B>$pack</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Sequence").": </td><td align=left><B>$sequence</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Balance Minutes").": </td><td align=left><B>$balance_minutes</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Initial Minutes").": </td><td align=left><B>$initial_minutes</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Initial Value").": </td><td align=left><B>$initial_value</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Purchase Order").": </td><td align=left><B>$note_purchase_order</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Printer").": </td><td align=left><B>$note_printer</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("DID").": </td><td align=left><B>$note_did</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("In-Group").": </td><td align=left><B>$inbound_group_id</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Language").": </td><td align=left><B>$note_language</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Name").": </td><td align=left><B>$note_name</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Comments").": </td><td align=left><B>$note_comments</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Create User/Date").": </td><td align=left><B>$create_user / $create_time</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Activate User/Date").": </td><td align=left><B>$activate_user / $activate_time</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Used User/Date").": </td><td align=left><B>$used_user / $used_time</B></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Void User/Date").": </td><td align=left><B>$void_user / $void_time</B></td></tr>\n";
|
||||
echo "</TABLE>\n";
|
||||
echo "<BR><BR><BR>\n";
|
||||
|
||||
@@ -855,23 +893,23 @@ if ($action == "GENERATE")
|
||||
echo "<input type=hidden name=action value=GENERATE_RESULTS>\n";
|
||||
echo "<input type=hidden name=DB value=$DB>\n";
|
||||
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Run").": </td><td align=left><input type=text name=run size=5 maxlength=4></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Starting Batch").": </td><td align=left><input type=text name=starting_batch size=6 maxlength=5></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("IDs in Batch").": </td><td align=left><input type=text name=batch size=6 maxlength=5></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Starting Sequence").": </td><td align=left><input type=text name=sequence size=6 maxlength=5></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Total").": </td><td align=left><input type=text name=total size=8 maxlength=7></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Balance Minutes").": </td><td align=left><input type=text name=balance_minutes size=3 maxlength=5></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Initial Value").": </td><td align=left><input type=text name=initial_value size=7 maxlength=6></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Initial Minutes").": </td><td align=left><input type=text name=initial_minutes size=3 maxlength=5></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Purchase Order").": </td><td align=left><input type=text name=note_purchase_order size=20 maxlength=20></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Printer").": </td><td align=left><input type=text name=note_printer size=20 maxlength=20></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("DID").": </td><td align=left><input type=text name=note_did size=18 maxlength=18></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("In-Group").": </td><td align=left><input type=text name=inbound_group_id size=20 maxlength=20></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Language").": </td><td align=left><input type=text name=note_language size=10 maxlength=10></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Name").": </td><td align=left><input type=text name=note_name size=20 maxlength=20></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Comment").": </td><td align=left><input type=text name=note_comments size=50 maxlength=255></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Run").": </td><td align=left><input type=text name=run size=5 maxlength=4></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Starting Batch").": </td><td align=left><input type=text name=starting_batch size=6 maxlength=5></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("IDs in Batch").": </td><td align=left><input type=text name=batch size=6 maxlength=5></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Starting Sequence").": </td><td align=left><input type=text name=sequence size=6 maxlength=5></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Total").": </td><td align=left><input type=text name=total size=8 maxlength=7></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Balance Minutes").": </td><td align=left><input type=text name=balance_minutes size=3 maxlength=5></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Initial Value").": </td><td align=left><input type=text name=initial_value size=7 maxlength=6></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Initial Minutes").": </td><td align=left><input type=text name=initial_minutes size=3 maxlength=5></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Purchase Order").": </td><td align=left><input type=text name=note_purchase_order size=20 maxlength=20></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Printer").": </td><td align=left><input type=text name=note_printer size=20 maxlength=20></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("DID").": </td><td align=left><input type=text name=note_did size=18 maxlength=18></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("In-Group").": </td><td align=left><input type=text name=inbound_group_id size=20 maxlength=20></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Language").": </td><td align=left><input type=text name=note_language size=10 maxlength=10></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Name").": </td><td align=left><input type=text name=note_name size=20 maxlength=20></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Comment").": </td><td align=left><input type=text name=note_comments size=50 maxlength=255></td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=SUBMIT value='"._QXZ("SUBMIT")."'></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=center colspan=2><input type=submit name=SUBMIT value='"._QXZ("SUBMIT")."'></td></tr>\n";
|
||||
echo "</TABLE></center>\n";
|
||||
echo "\n";
|
||||
echo "</center>\n";
|
||||
@@ -999,12 +1037,12 @@ if ($action == "SEARCH")
|
||||
echo "<input type=hidden name=action value=SEARCH_RESULTS>\n";
|
||||
echo "<input type=hidden name=DB value=$DB>\n";
|
||||
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("PIN").": </td><td align=left><input type=text name=pin size=20 maxlength=20></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Card ID").": </td><td align=left><input type=text name=card_id size=20 maxlength=20></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Run").": </td><td align=left><input type=text name=run size=5 maxlength=4></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Batch").": </td><td align=left><input type=text name=batch size=6 maxlength=5></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>"._QXZ("Sequence").": </td><td align=left><input type=text name=sequence size=6 maxlength=5></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=SUBMIT value='"._QXZ("SUBMIT")."'></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("PIN").": </td><td align=left><input type=text name=pin size=20 maxlength=20></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Card ID").": </td><td align=left><input type=text name=card_id size=20 maxlength=20></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Run").": </td><td align=left><input type=text name=run size=5 maxlength=4></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Batch").": </td><td align=left><input type=text name=batch size=6 maxlength=5></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=right>"._QXZ("Sequence").": </td><td align=left><input type=text name=sequence size=6 maxlength=5></td></tr>\n";
|
||||
echo "<tr bgcolor=#".$SSstd_row4_background."><td align=center colspan=2><input type=submit name=SUBMIT value='"._QXZ("SUBMIT")."'></td></tr>\n";
|
||||
echo "</TABLE></center>\n";
|
||||
echo "\n";
|
||||
echo "</center>\n";
|
||||
|
||||
@@ -132,6 +132,7 @@
|
||||
# 170623-2134 - Changed parameters for password recommendations
|
||||
# 170816-1057 - Added inbound after call entries
|
||||
# 170819-0951 - Added allow_manage_active_lists entry
|
||||
# 170825-1129 - Added auto_reports-filename_override entry
|
||||
#
|
||||
|
||||
|
||||
@@ -5981,6 +5982,11 @@ FR_SPAC 00 00 00 00 00 - <?php echo _QXZ("France space separated phone number");
|
||||
<BR>
|
||||
<B><?php echo _QXZ("FTP Directory"); ?> -</B><?php echo _QXZ("If the FTP destination is chosen above, then this field can be filled in with the FTP folder directory that you want the automated reports to be uploaded into. Note: the folder must already exist, this process will not try to create the folder."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="auto_reports-filename_override">
|
||||
<BR>
|
||||
<B><?php echo _QXZ("Filename Override"); ?> -</B><?php echo _QXZ("By default, the reports will be saved as files and either emailed or sent by FTP to the selected destination, and the filenames used for those files are automatically generated with unique generic names based upon the report ID. If you would like to override those unique generic names, you can do so by using this field. You can also use the variables shown below in the Report URL field so that you can put dates into the filename. You can also use --A--filedatetime--B-- as a variable to note the date and time the report was generated, which is useful if you will be running a report more than once a day. Only letters, numbers dashes and underscore characters are allowed in this field. Also, you should not include a file extension as part of the filename override, since the type of report will dictate the file extension that is used. Default is empty for disabled."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="auto_reports-active">
|
||||
<BR>
|
||||
@@ -5994,7 +6000,7 @@ FR_SPAC 00 00 00 00 00 - <?php echo _QXZ("France space separated phone number");
|
||||
<BR>
|
||||
<A NAME="auto_reports-report_url">
|
||||
<BR>
|
||||
<B><?php echo _QXZ("Report URL"); ?> -</B><?php echo _QXZ("This is the field where you will put the full web address, or URL, for the report that you want to run. The easiest way to figure out what address to use is to run the report normally, then go to the Reports, Admin Utilities, Admin Report Log Viewer to see the full URL that was used to run that report. Once you have copied that URL, you can replace the dates that you see with one of these variables in the standard format that is used within this system, for example, --A--today--B--. You can use: today, yesterday, 6days, 7days, 13days, 14days, 15days, 30days. Note: some networks may require that you use a local server address in this URL if that is the only way that a server on your network can access the webserver used for reporting. Related to this, you may also have to use a local IP address if a full domain name is not accessible from within your system network. Also, it is recommended that you run reports in TEXT format for best display results."); ?>
|
||||
<B><?php echo _QXZ("Report URL"); ?> -</B><?php echo _QXZ("This is the field where you will put the full web address, or URL, for the report that you want to run. The easiest way to figure out what address to use is to run the report normally, then go to the Reports, Admin Utilities, Admin Report Log Viewer to see the full URL that was used to run that report. Once you have copied that URL, you can replace the dates that you see with one of these variables in the standard format that is used within this system, for example, --A--today--B--. You can use: today, yesterday, 6days, 7days, 8days, 13days, 14days, 15days, 30days. Note: some networks may require that you use a local server address in this URL if that is the only way that a server on your network can access the webserver used for reporting. Related to this, you may also have to use a local IP address if a full domain name is not accessible from within your system network. Also, it is recommended that you run reports in TEXT format for best display results."); ?>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user