Added housecleaning code for admin web
git-svn-id: svn://192.168.202.10@2879 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -240,6 +240,8 @@ OTHER CHANGES:
|
||||
|
||||
62. Added List Override setting for Default Transfer Group
|
||||
|
||||
63. Added lead_status_search Non-Agent API function
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -609,11 +609,6 @@ if ($file_download == 0 || !$file_download) {
|
||||
|
||||
echo "$CSV_text";
|
||||
|
||||
# $CSV_report=fopen("AST_pause_code_breakdown.csv", "w");
|
||||
# fwrite($CSV_report, $CSV_header);
|
||||
# fwrite($CSV_report, $CSV_lines);
|
||||
# fwrite($CSV_report, $CSV_total);
|
||||
|
||||
}
|
||||
|
||||
if ($db_source == 'S')
|
||||
|
||||
@@ -1684,10 +1684,6 @@ else
|
||||
}
|
||||
|
||||
if ($file_download>0) {
|
||||
# $CSV_report=fopen("AST_OUTBOUNDsummary_interval.csv", "w");
|
||||
# $CSV_text=preg_replace('/\s+,/', ',', $CSV_main.$CSV_subreports);
|
||||
# fwrite($CSV_report, $CSV_text);
|
||||
# fclose($CSV_report);
|
||||
$CSVfilename = "AST_OUTBOUNDsummary_interval$US$FILE_TIME.csv";
|
||||
$CSV_text=$CSV_main.$CSV_subreports;
|
||||
$CSV_text=preg_replace('/ +\"/', '"', $CSV_text);
|
||||
|
||||
@@ -1615,11 +1615,11 @@ if ($show_percentages) {
|
||||
$CSV_total=preg_replace('/\s/', '', "\"\",\"\",\""._QXZ("TOTALS")."\",\""._QXZ("AGENTS").":$TOT_AGENTS\",\"$TOTcalls\",\"$TOTtime_MS\",\"$TOTtotPAUSE_MS\",\"$TOTavgPAUSE_MS\",\"$TOTtotWAIT_MS\",\"$TOTavgWAIT_MS\",\"$TOTtotTALK_MS\",\"$TOTavgTALK_MS\",\"$TOTtotDISPO_MS\",\"$TOTavgDISPO_MS\",\"$TOTtotDEAD_MS\",\"$TOTavgDEAD_MS\",\"$TOTtotCUSTOMER_MS\",\"$TOTavgCUSTOMER_MS\"$CSVSUMstatuses\n\n");
|
||||
}
|
||||
|
||||
$FILE_TIME = date("Ymd-His");
|
||||
$CSVfilename = "AGENT_PERFORMACE_DETAIL$US$FILE_TIME.csv";
|
||||
|
||||
if ($file_download == 1)
|
||||
{
|
||||
$FILE_TIME = date("Ymd-His");
|
||||
$CSVfilename = "AGENT_PERFORMACE_DETAIL$US$FILE_TIME.csv";
|
||||
|
||||
// We'll be outputting a TXT file
|
||||
header('Content-type: application/octet-stream');
|
||||
|
||||
@@ -1655,11 +1655,11 @@ if ($file_download == 1)
|
||||
exit;
|
||||
}
|
||||
|
||||
$CSV_report=fopen("AST_agent_performance_detail.csv", "w");
|
||||
fwrite($CSV_report, $CSV_header);
|
||||
fwrite($CSV_report, $CSV_lines);
|
||||
fwrite($CSV_report, $CSV_total);
|
||||
|
||||
#$CSV_report=fopen($CSVfilename, "w");
|
||||
#fwrite($CSV_report, $CSV_header);
|
||||
#fwrite($CSV_report, $CSV_lines);
|
||||
#fwrite($CSV_report, $CSV_total);
|
||||
#fclose($CSV_report);
|
||||
|
||||
$ASCII_text.="\n\n";
|
||||
|
||||
@@ -2095,11 +2095,11 @@ $JS_text.="</script>\n";
|
||||
|
||||
$CSV_total=preg_replace('/\s/', '', "\"\",\"\",\""._QXZ("TOTALS")."\",\""._QXZ("AGENTS").":$TOT_AGENTS\",\"$TOTtotTOTAL_MS\",\"$TOTtotNONPAUSE_MS\",\"$TOTtotPAUSE_MS\",$CSVSUMstatuses");
|
||||
|
||||
$FILE_TIME = date("Ymd-His");
|
||||
$CSVfilename = "AST_PAUSE_CODE_BREAKDOWN$US$FILE_TIME.csv";
|
||||
|
||||
if ($file_download == 2)
|
||||
{
|
||||
$FILE_TIME = date("Ymd-His");
|
||||
$CSVfilename = "AST_PAUSE_CODE_BREAKDOWN$US$FILE_TIME.csv";
|
||||
|
||||
// We'll be outputting a TXT file
|
||||
header('Content-type: application/octet-stream');
|
||||
|
||||
@@ -2134,10 +2134,12 @@ if ($file_download == 2)
|
||||
|
||||
exit;
|
||||
}
|
||||
$CSV_report=fopen("AST_pause_code_breakdown.csv", "w");
|
||||
fwrite($CSV_report, $CSV_header);
|
||||
fwrite($CSV_report, $CSV_lines);
|
||||
fwrite($CSV_report, $CSV_total);
|
||||
|
||||
#$CSV_report=fopen($CSVfilename, "w");
|
||||
#fwrite($CSV_report, $CSV_header);
|
||||
#fwrite($CSV_report, $CSV_lines);
|
||||
#fwrite($CSV_report, $CSV_total);
|
||||
#fclose($CSV_report);
|
||||
|
||||
if ($report_display_type=="HTML")
|
||||
{
|
||||
|
||||
@@ -1186,11 +1186,11 @@ $GRAPH_text.=$JS_text.$GRAPH.$GRAPH2.$GRAPH3;
|
||||
|
||||
$CSV_total=preg_replace('/\s/', '', "\"\",\"\",\"TOTALS\",\"AGENTS:$TOT_AGENTS\",\"$STOTsales_per_call\",\"$STOTsales_per_hour\",\"$Sgrand_total_sales\",\"$TOTcalls\",\"$TOTtime_MS\",\"$TOTtotPAUSE_MS\",\"$TOTavgPAUSE_MS\",\"$TOTtotWAIT_MS\",\"$TOTavgWAIT_MS\",\"$TOTtotTALK_MS\",\"$TOTavgTALK_MS\",\"$TOTtotDISPO_MS\",\"$TOTavgDISPO_MS\",\"$TOTtotDEAD_MS\",\"$TOTavgDEAD_MS\",\"$TOTtotCUSTOMER_MS\",\"$TOTavgCUSTOMER_MS\"$CSVSUMstatuses");
|
||||
|
||||
$FILE_TIME = date("Ymd-His");
|
||||
$CSVfilename = "AGENT_PERFORMACE_DETAIL$US$FILE_TIME.csv";
|
||||
|
||||
if ($file_download == 1)
|
||||
{
|
||||
$FILE_TIME = date("Ymd-His");
|
||||
$CSVfilename = "AGENT_PERFORMACE_DETAIL$US$FILE_TIME.csv";
|
||||
|
||||
// We'll be outputting a TXT file
|
||||
header('Content-type: application/octet-stream');
|
||||
|
||||
@@ -1226,11 +1226,11 @@ if ($file_download == 1)
|
||||
exit;
|
||||
}
|
||||
|
||||
$CSV_report=fopen("AST_agent_performance_detail.csv", "w");
|
||||
fwrite($CSV_report, $CSV_header);
|
||||
fwrite($CSV_report, $CSV_lines);
|
||||
fwrite($CSV_report, $CSV_total);
|
||||
|
||||
#$CSV_report=fopen($CSVfilename, "w");
|
||||
#fwrite($CSV_report, $CSV_header);
|
||||
#fwrite($CSV_report, $CSV_lines);
|
||||
#fwrite($CSV_report, $CSV_total);
|
||||
#fclose($CSV_report);
|
||||
|
||||
$ASCII_text.="\n\n";
|
||||
|
||||
@@ -1581,11 +1581,11 @@ $GRAPH_text.=$JS_text.$GRAPH.$GRAPH2.$GRAPH3.$max;
|
||||
|
||||
$CSV_total=preg_replace('/\s/', '', "\"\",\"\",\"TOTALS\",\"AGENTS:$TOT_AGENTS\",\"$TOTtotTOTAL_MS\",\"$TOTtotNONPAUSE_MS\",\"$TOTtotPAUSE_MS\",$CSVSUMstatuses");
|
||||
|
||||
$FILE_TIME = date("Ymd-His");
|
||||
$CSVfilename = "AST_PAUSE_CODE_BREAKDOWN$US$FILE_TIME.csv";
|
||||
|
||||
if ($file_download == 2)
|
||||
{
|
||||
$FILE_TIME = date("Ymd-His");
|
||||
$CSVfilename = "AST_PAUSE_CODE_BREAKDOWN$US$FILE_TIME.csv";
|
||||
|
||||
// We'll be outputting a TXT file
|
||||
header('Content-type: application/octet-stream');
|
||||
|
||||
@@ -1620,10 +1620,12 @@ if ($file_download == 2)
|
||||
|
||||
exit;
|
||||
}
|
||||
$CSV_report=fopen("AST_pause_code_breakdown.csv", "w");
|
||||
fwrite($CSV_report, $CSV_header);
|
||||
fwrite($CSV_report, $CSV_lines);
|
||||
fwrite($CSV_report, $CSV_total);
|
||||
|
||||
#$CSV_report=fopen($CSVfilename, "w");
|
||||
#fwrite($CSV_report, $CSV_header);
|
||||
#fwrite($CSV_report, $CSV_lines);
|
||||
#fwrite($CSV_report, $CSV_total);
|
||||
#fclose($CSV_report);
|
||||
|
||||
if ($report_display_type=="HTML")
|
||||
{
|
||||
|
||||
@@ -920,11 +920,11 @@ $CSV_text.="\n";
|
||||
|
||||
$ASCII_text.=$ASCII_header2;
|
||||
|
||||
$FILE_TIME = date("Ymd-His");
|
||||
$CSVfilename = "AGENT_PERFORMACE_DETAIL$US$FILE_TIME.csv";
|
||||
|
||||
if ($file_download == 1)
|
||||
{
|
||||
$FILE_TIME = date("Ymd-His");
|
||||
$CSVfilename = "AGENT_PERFORMACE_DETAIL$US$FILE_TIME.csv";
|
||||
|
||||
// We'll be outputting a TXT file
|
||||
header('Content-type: application/octet-stream');
|
||||
|
||||
@@ -960,11 +960,11 @@ if ($file_download == 1)
|
||||
exit;
|
||||
}
|
||||
|
||||
$CSV_report=fopen("AST_agent_performance_detail.csv", "w");
|
||||
fwrite($CSV_report, $CSV_header);
|
||||
fwrite($CSV_report, $CSV_lines);
|
||||
fwrite($CSV_report, $CSV_total);
|
||||
|
||||
#$CSV_report=fopen($CSVfilename, "w");
|
||||
#fwrite($CSV_report, $CSV_header);
|
||||
#fwrite($CSV_report, $CSV_lines);
|
||||
#fwrite($CSV_report, $CSV_total);
|
||||
#fclose($CSV_report);
|
||||
|
||||
$ASCII_text.="\n\n";
|
||||
|
||||
|
||||
@@ -128,6 +128,22 @@ $Vtables = 'NONE,log_noanswer,did_agent_log,contact_information';
|
||||
|
||||
$APIfunctions = 'ALL_FUNCTIONS add_group_alias add_lead add_list add_phone add_phone_alias add_user agent_ingroup_info agent_stats_export agent_status audio_playback blind_monitor call_agent callid_info change_ingroups check_phone_number did_log_export external_add_lead external_dial external_hangup external_pause external_status in_group_status logout moh_list park_call pause_code preview_dial_action ra_call_control recording recording_lookup send_dtmf server_refresh set_timer_action sounds_list st_get_agent_active_lead st_login_log transfer_conference update_fields update_lead update_list update_log_entry update_phone update_phone_alias update_user user_group_status vm_list webphone_url webserver logged_in_agents update_campaigns lead_field_info phone_number_log switch_lead ccc_lead_info';
|
||||
|
||||
|
||||
### BEGIN housecleaning of old static report files, if not done before ###
|
||||
if (!file_exists('old_clear'))
|
||||
{
|
||||
array_map('unlink', glob("./*.csv"));
|
||||
array_map('unlink', glob("./*.xls"));
|
||||
array_map('unlink', glob("./ploticus/*"));
|
||||
unlink('project_auth_entries.txt');
|
||||
|
||||
$clear_file=fopen('old_clear', "w");
|
||||
fwrite($clear_file, '1');
|
||||
fclose($clear_file);
|
||||
}
|
||||
### END housecleaning of old static report files ###
|
||||
|
||||
|
||||
######################################################################################################
|
||||
######################################################################################################
|
||||
####### Form variable declaration
|
||||
@@ -4215,12 +4231,13 @@ else
|
||||
# 171130-0036 - Added agent_screen_time_display campaign setting
|
||||
# 171214-2045 - Added PREVIEW_ options for get_call_launch
|
||||
# 171224-1220 - Added List default_xfer_group override
|
||||
# 171229-2309 - Added housecleaning code
|
||||
#
|
||||
|
||||
# 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-646a';
|
||||
$build = '171224-1220';
|
||||
$admin_version = '2.14-647a';
|
||||
$build = '171229-2309';
|
||||
|
||||
$STARTtime = date("U");
|
||||
$SQLdate = date("Y-m-d H:i:s");
|
||||
|
||||
@@ -1290,7 +1290,7 @@ if ($OK_to_process)
|
||||
$affected_rows = mysqli_affected_rows($link);
|
||||
$lead_id = mysqli_insert_id($link);
|
||||
if ($DB > 0) {echo "<!-- $affected_rows|$lead_id|$stmtZ -->";}
|
||||
if ($webroot_writable > 0)
|
||||
if ( ($webroot_writable > 0) and ($DB>0) )
|
||||
{fwrite($stmt_file, $stmtZ."\r\n");}
|
||||
$multistmt='';
|
||||
|
||||
@@ -1306,7 +1306,7 @@ if ($OK_to_process)
|
||||
### insert good record into vicidial_list table ###
|
||||
$stmtZ = "INSERT INTO vicidial_list (lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,date_of_birth,alt_phone,email,security_phrase,comments,called_count,last_local_call_time,rank,owner,entry_list_id) values$multistmt('',\"$entry_date\",\"$modify_date\",\"$status\",\"$user\",\"$vendor_lead_code\",\"$source_id\",\"$list_id\",\"$gmt_offset\",\"$called_since_last_reset\",\"$phone_code\",\"$phone_number\",\"$title\",\"$first_name\",\"$middle_initial\",\"$last_name\",\"$address1\",\"$address2\",\"$address3\",\"$city\",\"$state\",\"$province\",\"$postal_code\",\"$country_code\",\"$gender\",\"$date_of_birth\",\"$alt_phone\",\"$email\",\"$security_phrase\",\"$comments\",0,\"2008-01-01 00:00:00\",\"$rank\",\"$owner\",'0');";
|
||||
$rslt=mysql_to_mysqli($stmtZ, $link);
|
||||
if ($webroot_writable > 0)
|
||||
if ( ($webroot_writable > 0) and ($DB>0) )
|
||||
{fwrite($stmt_file, $stmtZ."\r\n");}
|
||||
$multistmt='';
|
||||
$multi_insert_counter=0;
|
||||
@@ -1354,7 +1354,7 @@ if ($OK_to_process)
|
||||
{
|
||||
$stmtZ = "INSERT INTO vicidial_list (lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,date_of_birth,alt_phone,email,security_phrase,comments,called_count,last_local_call_time,rank,owner,entry_list_id) values".substr($multistmt, 0, -1).";";
|
||||
mysql_to_mysqli($stmtZ, $link);
|
||||
if ($webroot_writable > 0)
|
||||
if ( ($webroot_writable > 0) and ($DB>0) )
|
||||
{fwrite($stmt_file, $stmtZ."\r\n");}
|
||||
}
|
||||
|
||||
@@ -1822,7 +1822,7 @@ if (($leadfile) && ($LF_path))
|
||||
### insert good deal into pending_transactions table ###
|
||||
$stmtZ = "INSERT INTO vicidial_list (lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,date_of_birth,alt_phone,email,security_phrase,comments,called_count,last_local_call_time,rank,owner,entry_list_id) values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country_code','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0,'2008-01-01 00:00:00','$rank','$owner','0');";
|
||||
$rslt=mysql_to_mysqli($stmtZ, $link);
|
||||
if ($webroot_writable > 0)
|
||||
if ( ($webroot_writable > 0) and ($DB>0) )
|
||||
{fwrite($stmt_file, $stmtZ."\r\n");}
|
||||
$multistmt=''; */
|
||||
$multi_insert_counter=0;
|
||||
@@ -1831,7 +1831,7 @@ if (($leadfile) && ($LF_path))
|
||||
$affected_rows = mysqli_affected_rows($link);
|
||||
$lead_id = mysqli_insert_id($link);
|
||||
if ($DB > 0) {echo "<!-- $affected_rows|$lead_id|$stmtZ -->";}
|
||||
if ($webroot_writable > 0)
|
||||
if ( ($webroot_writable > 0) and ($DB>0) )
|
||||
{fwrite($stmt_file, $stmtZ."\r\n");}
|
||||
$multistmt='';
|
||||
|
||||
@@ -1887,7 +1887,7 @@ if (($leadfile) && ($LF_path))
|
||||
$custom_rslt=mysql_to_mysqli($custom_ins_stmt, $link);
|
||||
$affected_rows = mysqli_affected_rows($link);
|
||||
echo "<!-- $custom_ins_stmt //-->\n";
|
||||
if ($webroot_writable > 0)
|
||||
if ( ($webroot_writable > 0) and ($DB>0) )
|
||||
{fwrite($stmt_file, $custom_ins_stmt."\r\n");}
|
||||
/*
|
||||
}
|
||||
@@ -1946,7 +1946,7 @@ if (($leadfile) && ($LF_path))
|
||||
{
|
||||
$stmtZ = "INSERT INTO vicidial_list (lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,date_of_birth,alt_phone,email,security_phrase,comments,called_count,last_local_call_time,rank,owner,entry_list_id) values".substr($multistmt, 0, -1).";";
|
||||
mysql_to_mysqli($stmtZ, $link);
|
||||
if ($webroot_writable > 0)
|
||||
if ( ($webroot_writable > 0) and ($DB>0) )
|
||||
{fwrite($stmt_file, $stmtZ."\r\n");}
|
||||
|
||||
$custom_ins_stmt="INSERT INTO $custom_table(";
|
||||
@@ -1962,7 +1962,7 @@ if (($leadfile) && ($LF_path))
|
||||
}
|
||||
$custom_ins_stmt=substr($custom_ins_stmt, 0, -1).") VALUES".substr($custom_multistmt, 0, -1);
|
||||
mysql_to_mysqli($custom_ins_stmt, $link);
|
||||
if ($webroot_writable > 0)
|
||||
if ( ($webroot_writable > 0) and ($DB>0) )
|
||||
{fwrite($stmt_file, $custom_ins_stmt."\r\n");}
|
||||
}
|
||||
### LOG INSERTION Admin Log Table ###
|
||||
@@ -2375,7 +2375,7 @@ if (($leadfile) && ($LF_path))
|
||||
### insert good deal into pending_transactions table ###
|
||||
$stmtZ = "INSERT INTO vicidial_list (lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,date_of_birth,alt_phone,email,security_phrase,comments,called_count,last_local_call_time,rank,owner,entry_list_id) values$multistmt('',\"$entry_date\",\"$modify_date\",\"$status\",\"$user\",\"$vendor_lead_code\",\"$source_id\",\"$list_id\",\"$gmt_offset\",\"$called_since_last_reset\",\"$phone_code\",\"$phone_number\",\"$title\",\"$first_name\",\"$middle_initial\",\"$last_name\",\"$address1\",\"$address2\",\"$address3\",\"$city\",\"$state\",\"$province\",\"$postal_code\",\"$country_code\",\"$gender\",\"$date_of_birth\",\"$alt_phone\",\"$email\",\"$security_phrase\",\"$comments\",0,\"2008-01-01 00:00:00\",\"$rank\",\"$owner\",'0');";
|
||||
$rslt=mysql_to_mysqli($stmtZ, $link);
|
||||
if ($webroot_writable > 0)
|
||||
if ( ($webroot_writable > 0) and ($DB>0) )
|
||||
{fwrite($stmt_file, $stmtZ."\r\n");}
|
||||
$multistmt='';
|
||||
$multi_insert_counter=0;
|
||||
@@ -2422,7 +2422,7 @@ if (($leadfile) && ($LF_path))
|
||||
{
|
||||
$stmtZ = "INSERT INTO vicidial_list (lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,date_of_birth,alt_phone,email,security_phrase,comments,called_count,last_local_call_time,rank,owner,entry_list_id) values".substr($multistmt, 0, -1).";";
|
||||
mysql_to_mysqli($stmtZ, $link);
|
||||
if ($webroot_writable > 0)
|
||||
if ( ($webroot_writable > 0) and ($DB>0) )
|
||||
{fwrite($stmt_file, $stmtZ."\r\n");}
|
||||
}
|
||||
### LOG INSERTION Admin Log Table ###
|
||||
@@ -2628,6 +2628,7 @@ if (($leadfile) && ($LF_path))
|
||||
print " <input type=hidden name=lead_file value=\"$lead_file\">\r\n";
|
||||
print " <input type=hidden name=list_id_override value=\"$list_id_override\">\r\n";
|
||||
print " <input type=hidden name=phone_code_override value=\"$phone_code_override\">\r\n";
|
||||
print " <input type=hidden name=DB value=\"$DB\">\r\n";
|
||||
print " <th colspan=2><input type=submit name='OK_to_process' value='"._QXZ("OK TO PROCESS")."'> <input type=button onClick=\"javascript:document.location='admin_listloader_fourth_gen.php'\" value=\""._QXZ("START OVER")."\" name='reload_page'></th>\r\n";
|
||||
print " </tr>\r\n";
|
||||
print "</table>\r\n";
|
||||
|
||||
@@ -1023,14 +1023,6 @@ else
|
||||
if ($report_display_type=="HTML") {echo $JS_text;}
|
||||
}
|
||||
|
||||
#$CSV_report=fopen("fcstats.csv", "w");
|
||||
#$CSV_head=preg_replace('/\s+,/', ',', $CSV_fronter_header.$CSV_fronter_lines.$CSV_fronter_footer.$CSV_closer_header.$CSV_closer_lines.$CSV_closer_footer);
|
||||
#fwrite($CSV_report, $CSV_head);
|
||||
#fclose($CSV_report);
|
||||
|
||||
|
||||
|
||||
|
||||
if ($db_source == 'S')
|
||||
{
|
||||
mysqli_close($link);
|
||||
|
||||
@@ -1432,14 +1432,6 @@ else
|
||||
if ($report_display_type=='HTML') {echo $JS_text;}
|
||||
}
|
||||
|
||||
#$CSV_report=fopen("fcstats.csv", "w");
|
||||
#$CSV_head=preg_replace('/\s+,/', ',', $CSV_fronter_header.$CSV_fronter_lines.$CSV_fronter_footer.$CSV_closer_header.$CSV_closer_lines.$CSV_closer_footer);
|
||||
#fwrite($CSV_report, $CSV_head);
|
||||
#fclose($CSV_report);
|
||||
|
||||
|
||||
|
||||
|
||||
if ($db_source == 'S')
|
||||
{
|
||||
mysqli_close($link);
|
||||
|
||||
@@ -128,7 +128,7 @@ function user_authorization($user,$pass,$user_option,$user_update,$api_call)
|
||||
if ($SSwebroot_writable > 0)
|
||||
{
|
||||
$fp = fopen ("./project_auth_entries.txt", "a");
|
||||
fwrite ($fp, "ADMIN|FAIL|$NOW_TIME|$user|$auth_key|$ip|$browser|\n");
|
||||
fwrite ($fp, "ADMIN|FAIL|$NOW_TIME|X|$auth_key|$ip|$browser|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,8 @@ if (isset($_GET["sales_time_frame"])) {$sales_time_frame=$_GET["sales_time_fra
|
||||
elseif (isset($_POST["sales_time_frame"])) {$sales_time_frame=$_POST["sales_time_frame"];}
|
||||
if (isset($_GET["forc"])) {$forc=$_GET["forc"];}
|
||||
elseif (isset($_POST["forc"])) {$forc=$_POST["forc"];}
|
||||
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
|
||||
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
|
||||
|
||||
include("dbconnect_mysqli.php");
|
||||
include("functions.php");
|
||||
@@ -159,6 +161,7 @@ echo "<TABLE CELLPADDING=4 CELLSPACING=0><TR><TD>";
|
||||
|
||||
<form action="<?php echo $PHP_SELF ?>" method=post onSubmit="return GatherListIDs()">
|
||||
<input type="hidden" name="list_ids">
|
||||
<input type="hidden" name="DB" value="<?php echo $DB ?>">
|
||||
<table border=0 cellpadding=5 cellspacing=0 align=center width=600>
|
||||
<tr>
|
||||
<th colspan=3><font class="standard_bold"><?php echo _QXZ("OUTBOUND recent sales report"); ?> </font><font class="standard"><a href="admin.php?ADD=999999"><?php echo _QXZ("Back to Admin"); ?></a></font>
|
||||
@@ -271,7 +274,8 @@ if ($submit_report && $list_ids) {
|
||||
} else {
|
||||
$stmt="select v.first_name, v.last_name, v.phone_number, vl.call_date, v.lead_id, vl.user, vl.closer from vicidial_list v, vicidial_xfer_log vl where vl.call_date>='$timestamp' and vl.lead_id=v.lead_id and v.status='SALE' $list_id_clause order by call_date desc $limit_clause";
|
||||
}
|
||||
fwrite($dfile, "$stmt\n");
|
||||
if ( ($webroot_writable > 0) and ($DB>0) )
|
||||
{fwrite($dfile, "$stmt\n");}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$q=0;
|
||||
print "<tr bgcolor='#000000'><th colspan=8><font class='standard_bold' color='white'>Last ".mysqli_num_rows($rslt)." "._QXZ("sales made")."</font></th></tr>\n";
|
||||
|
||||
Reference in New Issue
Block a user