diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE index c9007fa1..dad726b2 100644 --- a/agc_2-X/trunk/UPGRADE +++ b/agc_2-X/trunk/UPGRADE @@ -275,6 +275,12 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom click on the "Click here to see Admin chages to this record" link to find out the most recent changes to that record. +65. Added uniform admin headers to all administrative pages and reports + +66. Added Calls Export Utility allowing exporting of call and lead data by + defining the following parameters: date range, campaigns, in-groups, statuses, + lists and user groups. A flat tab-delimited text file is exported. + diff --git a/agc_2-X/trunk/bin/ADMIN_adjust_GMTnow_on_leads.pl b/agc_2-X/trunk/bin/ADMIN_adjust_GMTnow_on_leads.pl index e749bfc7..aaebccdf 100644 --- a/agc_2-X/trunk/bin/ADMIN_adjust_GMTnow_on_leads.pl +++ b/agc_2-X/trunk/bin/ADMIN_adjust_GMTnow_on_leads.pl @@ -286,7 +286,7 @@ while ($sthArows > $rec_countY) @nanpafile=@MT; while ($sthArows > $rec_countN) { - if ($DST =~ /Y/) {$DST_method = 'SSM-FSN';} + if ($aryA[3] =~ /Y/) {$DST_method = 'SSM-FSN';} else {$DST_method = '';} @aryA = $sthA->fetchrow_array; $nanpafile[$rec_countN] = "$aryA[0]\t$aryA[1]\t$aryA[2]\t$DST_method"; diff --git a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql index a04e75b9..fc699c9f 100644 --- a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql +++ b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql @@ -493,7 +493,8 @@ alert_enabled ENUM('1','0') default '0', download_lists ENUM('1','0') default '0', agent_shift_enforcement_override ENUM('DISABLED','OFF','START','ALL') default 'DISABLED', manager_shift_enforcement_override ENUM('0','1') default '0', -shift_override_flag ENUM('0','1') default '0' +shift_override_flag ENUM('0','1') default '0', +export_reports ENUM('1','0') default '0' ); @@ -1278,7 +1279,7 @@ event_date DATETIME NOT NULL, user VARCHAR(20) NOT NULL, ip_address VARCHAR(15) NOT NULL, event_section VARCHAR(30) NOT NULL, -event_type ENUM('ADD','COPY','LOAD','RESET','MODIFY','DELETE','SEARCH','LOGIN','LOGOUT','CLEAR','OVERRIDE','OTHER') default 'OTHER', +event_type ENUM('ADD','COPY','LOAD','RESET','MODIFY','DELETE','SEARCH','LOGIN','LOGOUT','CLEAR','OVERRIDE','EXPORT','OTHER') default 'OTHER', record_id VARCHAR(50) NOT NULL, event_code VARCHAR(255) NOT NULL, event_sql TEXT, @@ -1530,7 +1531,7 @@ CREATE INDEX phone_number on vicidial_closer_log (phone_number); CREATE INDEX date_user on vicidial_closer_log (call_date,user); CREATE INDEX comment_a on live_inbound_log (comment_a); -UPDATE system_settings SET db_schema_version='1133'; +UPDATE system_settings SET db_schema_version='1134'; GRANT RELOAD ON *.* TO cron@'%'; GRANT RELOAD ON *.* TO cron@localhost; diff --git a/agc_2-X/trunk/extras/upgrade_2.0.5.sql b/agc_2-X/trunk/extras/upgrade_2.0.5.sql index 7551d900..dc582515 100644 --- a/agc_2-X/trunk/extras/upgrade_2.0.5.sql +++ b/agc_2-X/trunk/extras/upgrade_2.0.5.sql @@ -781,3 +781,9 @@ ALTER TABLE vicidial_users ADD shift_override_flag ENUM('0','1') default '0'; ALTER TABLE vicidial_admin_log MODIFY event_type ENUM('ADD','COPY','LOAD','RESET','MODIFY','DELETE','SEARCH','LOGIN','LOGOUT','CLEAR','OVERRIDE','OTHER') default 'OTHER'; UPDATE system_settings SET db_schema_version='1133'; + +ALTER TABLE vicidial_users ADD export_reports ENUM('1','0') default '0'; + +ALTER TABLE vicidial_admin_log MODIFY event_type ENUM('ADD','COPY','LOAD','RESET','MODIFY','DELETE','SEARCH','LOGIN','LOGOUT','CLEAR','OVERRIDE','EXPORT','OTHER') default 'OTHER'; + +UPDATE system_settings SET db_schema_version='1134'; diff --git a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt index 9ec67d28..2463da45 100644 --- a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt +++ b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt @@ -548,7 +548,12 @@ Click here to see Admin chages to this server|| Click here to see Admin chages to this conf template|| Click here to see Admin chages to this carrier|| Click here to see Admin chages to the system settings|| - +Export Reports|| +This setting if set to 1 will allow a manager to access the export call reports on the REPORTS screen. Default is 0.|| +This setting if set to 1 will allow a manager to click on the download list link at the bottom of a list modification screen to export the entire contents of a list to a flat data file. Default is 0.|| +Export Calls Report|| +EXPORT CALLS REPORT|| +For the Export Calls Report, the following field order is used for exports|| ############################################################ CLIENT diff --git a/agc_2-X/trunk/www/vicidial/AST_CLOSER_service_level.php b/agc_2-X/trunk/www/vicidial/AST_CLOSER_service_level.php index f880c834..d8b49a94 100644 --- a/agc_2-X/trunk/www/vicidial/AST_CLOSER_service_level.php +++ b/agc_2-X/trunk/www/vicidial/AST_CLOSER_service_level.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -9,6 +9,7 @@ # 80510-1500 - Added fixed scale hold time graph # 80519-0413 - rewrote time intervals code and stats gathering code # 80528-2320 - fixed small calculation bugs and display bugs, added more shifts +# 90310-2117 - Added admin header # require("dbconnect.php"); @@ -98,7 +99,14 @@ while ($i < $groups_to_print) \n"; -echo "VICIDIAL: VDAD Closer Service Level Stats\n"; +echo "VICIDIAL: VDAD Closer Service Level Stats\n"; + + $short_header=1; + + require("admin_header.php"); + +echo "
"; + echo "
\n"; echo "\n"; echo " to \n"; @@ -943,5 +951,6 @@ echo "\nRun Time: $RUNtime seconds\n"; ?> +
diff --git a/agc_2-X/trunk/www/vicidial/AST_CLOSERstats.php b/agc_2-X/trunk/www/vicidial/AST_CLOSERstats.php index e12e4477..4801c4ed 100644 --- a/agc_2-X/trunk/www/vicidial/AST_CLOSERstats.php +++ b/agc_2-X/trunk/www/vicidial/AST_CLOSERstats.php @@ -19,6 +19,7 @@ # 81105-2118 - Added Answered calls 15-minute breakdown # 81109-2340 - Added custom indicators section # 90116-1040 - Rewrite of the 15-minute sections to speed it up and allow multi-day calculations +# 90310-2037 - Admin header # require("dbconnect.php"); @@ -162,7 +163,14 @@ while ($i < $statcats_to_print) \n"; -echo "VICIDIAL: VDAD Closer Stats\n"; +echo "VICIDIAL: VDAD Closer Stats\n"; + +$short_header=1; + +require("admin_header.php"); + +echo "
"; + if ($DB > 0) { echo "
\n"; @@ -1495,5 +1503,6 @@ echo "\nRun Time: $RUNtime seconds\n"; ?> +
diff --git a/agc_2-X/trunk/www/vicidial/AST_IVRfilter.php b/agc_2-X/trunk/www/vicidial/AST_IVRfilter.php index 2cab8e01..177a072d 100644 --- a/agc_2-X/trunk/www/vicidial/AST_IVRfilter.php +++ b/agc_2-X/trunk/www/vicidial/AST_IVRfilter.php @@ -1,11 +1,12 @@ LICENSE: AGPLv2 +# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 # # CHANGES # # 81030-0432 - First build +# 90310-2054 - Admin header # require("dbconnect.php"); @@ -82,7 +83,14 @@ $i=0; \n"; -echo "VICIDIAL: VDL IVR Filter Stats\n"; +echo "VICIDIAL: VDL IVR Filter Stats\n"; + + $short_header=1; + + require("admin_header.php"); + +echo "
"; + echo "\n"; echo "
\n"; echo "\n"; @@ -235,5 +243,6 @@ echo "\nRun Time: $RUNtime seconds\n"; ?> +
diff --git a/agc_2-X/trunk/www/vicidial/AST_IVRstats.php b/agc_2-X/trunk/www/vicidial/AST_IVRstats.php index 3a5fe5a2..67037e61 100644 --- a/agc_2-X/trunk/www/vicidial/AST_IVRstats.php +++ b/agc_2-X/trunk/www/vicidial/AST_IVRstats.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -9,6 +9,7 @@ # 81107-0341 - Added time range and option and 15-minute increment graph # 81107-1148 - Added average times and totals # 81108-0922 - Added no-callerID and unique caller counts +# 90310-2056 - Admin header # require("dbconnect.php"); @@ -175,7 +176,14 @@ else } echo "\n"; -echo "VICIDIAL: IVR Stats\n"; +echo "VICIDIAL: IVR Stats\n"; + + $short_header=1; + + require("admin_header.php"); + +echo "
"; + if ($DB > 0) { echo "
\n"; @@ -671,5 +679,6 @@ echo "\nRun Time: $RUNtime seconds\n"; ?> +
diff --git a/agc_2-X/trunk/www/vicidial/AST_VDADstats.php b/agc_2-X/trunk/www/vicidial/AST_VDADstats.php index 4d09d807..5def1941 100644 --- a/agc_2-X/trunk/www/vicidial/AST_VDADstats.php +++ b/agc_2-X/trunk/www/vicidial/AST_VDADstats.php @@ -16,6 +16,7 @@ # 80722-2049 - Added Status Category stats # 81109-2341 - Added Productivity Rating # 90225-1140 - Changed to multi-campaign capability +# 90310-2034 - Admin header # header ("Content-type: text/html; charset=utf-8"); @@ -145,7 +146,14 @@ while ($i < $statcats_to_print) \n"; -echo "VICIDIAL: VDAD Stats\n"; +echo "VICIDIAL: VDAD Stats\n"; + +$short_header=1; + +require("admin_header.php"); + +echo "
"; + echo "\n"; echo "
Dates:
"; echo "\n"; @@ -998,5 +1006,6 @@ echo "\nRun Time: $RUNtime seconds\n"; ?> +
\ No newline at end of file diff --git a/agc_2-X/trunk/www/vicidial/AST_agent_days_detail.php b/agc_2-X/trunk/www/vicidial/AST_agent_days_detail.php index 9da88dbb..a679c978 100644 --- a/agc_2-X/trunk/www/vicidial/AST_agent_days_detail.php +++ b/agc_2-X/trunk/www/vicidial/AST_agent_days_detail.php @@ -7,6 +7,7 @@ # # 90206-2202 - First build # 90225-1051 - Added CSV download option +# 90310-0752 - Added admin header # @@ -157,6 +158,16 @@ if ($file_download < 1) \n"; + echo "VICIDIAL: Agent Days Status\n"; + echo ""; + + $short_header=1; + + require("admin_header.php"); + + echo "\n"; echo "\n"; echo "
\n";
 	}
@@ -508,8 +519,8 @@ if ($file_download > 0)
 	}
 
 
-echo "\n";
-echo "VICIDIAL: Agent Status\n";
+
+
 echo "\n";
 echo "
Dates:
"; echo "\n"; diff --git a/agc_2-X/trunk/www/vicidial/AST_agent_performance_detail.php b/agc_2-X/trunk/www/vicidial/AST_agent_performance_detail.php index bfe778be..34c01be5 100644 --- a/agc_2-X/trunk/www/vicidial/AST_agent_performance_detail.php +++ b/agc_2-X/trunk/www/vicidial/AST_agent_performance_detail.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -15,6 +15,7 @@ # 81030-1924 - Added total non-pause and total logged-in time to pause code section # 81108-0716 - fixed user same-name bug # 81110-0056 - fixed pause code display bug +# 90310-2039 - Admin header # require("dbconnect.php"); @@ -125,7 +126,14 @@ while ($i < $user_groups_to_print) \n"; -echo "VICIDIAL: Agent Performance\n"; +echo "VICIDIAL: Agent Performance\n"; + + $short_header=1; + + require("admin_header.php"); + +echo "
"; + echo "\n"; echo "\n"; echo "\n"; @@ -930,4 +938,6 @@ echo "\n\n"; ?> +
+ \ No newline at end of file diff --git a/agc_2-X/trunk/www/vicidial/AST_agent_status_detail.php b/agc_2-X/trunk/www/vicidial/AST_agent_status_detail.php index 658fd8d9..a576d08e 100644 --- a/agc_2-X/trunk/www/vicidial/AST_agent_status_detail.php +++ b/agc_2-X/trunk/www/vicidial/AST_agent_status_detail.php @@ -7,6 +7,7 @@ # # 90206-1554 - First build # 90225-2252 - Added CSV download option +# 90310-2030 - Admin header # @@ -202,7 +203,16 @@ if ($file_download < 1) \n"; + echo "\n"; + echo "VICIDIAL: Agent Days Status\n"; + echo ""; + + $short_header=1; + + require("admin_header.php"); + + echo "\n"; + echo "\n"; echo "
\n";
 	}
 
@@ -567,8 +577,6 @@ if ($file_download > 0)
 	}
 
 
-echo "\n";
-echo "VICIDIAL: Agent Status\n";
 echo "\n";
 echo "
Dates:
"; echo "\n"; diff --git a/agc_2-X/trunk/www/vicidial/AST_agent_time_sheet.php b/agc_2-X/trunk/www/vicidial/AST_agent_time_sheet.php index 2c2fcc67..06450ffb 100644 --- a/agc_2-X/trunk/www/vicidial/AST_agent_time_sheet.php +++ b/agc_2-X/trunk/www/vicidial/AST_agent_time_sheet.php @@ -1,13 +1,14 @@ LICENSE: AGPLv2 +# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 # # CHANGES # # 60619-1729 - Added variable filtering to eliminate SQL injection attack threat # - Added required user/pass to gain access to this page # 80624-0132 - Added vicidial_timeclock entries +# 90310-0745 - Added admin header # require("dbconnect.php"); @@ -26,6 +27,8 @@ if (isset($_GET["submit"])) {$submit=$_GET["submit"];} if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} +$user=$agent; + $PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); $PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); @@ -63,11 +66,32 @@ if (!isset($query_date)) {$query_date = $NOW_DATE;} \n"; -echo "VICIDIAL: Agent Time Sheet\n"; -echo "VICIDIAL ADMIN: Agent Time Sheet\n"; -echo " - User Stats\n"; -echo " - User Status\n"; -echo " - Modify User\n"; +echo "VICIDIAL: Agent Time Sheet"; + + +##### BEGIN Set variables to make header show properly ##### +$ADD = '3'; +$hh = 'users'; +$LOGast_admin_access = '1'; +$ADMIN = 'admin.php'; +$page_width='770'; +$section_width='750'; +$header_font_size='3'; +$subheader_font_size='2'; +$subcamp_font_size='2'; +$header_selected_bold='<b>'; +$header_nonselected_bold=''; +$users_color = '#FFFF99'; +$users_font = 'BLACK'; +$users_color = '#E6E6E6'; +$subcamp_color = '#C6C6C6'; +##### END Set variables to make header show properly ##### + +require("admin_header.php"); + +echo "<TABLE WIDTH=$page_width BGCOLOR=\"#F0F5FE\" cellpadding=2 cellspacing=0><TR BGCOLOR=\"#F0F5FE\"><TD>\n"; + +echo "Agent Time Sheet for: $user\n"; echo "<BR>\n"; echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>   \n"; echo "Date: <INPUT TYPE=TEXT NAME=query_date SIZE=19 MAXLENGTH=19 VALUE=\"$query_date\">\n"; diff --git a/agc_2-X/trunk/www/vicidial/AST_server_performance.php b/agc_2-X/trunk/www/vicidial/AST_server_performance.php index 8c477996..87916f90 100644 --- a/agc_2-X/trunk/www/vicidial/AST_server_performance.php +++ b/agc_2-X/trunk/www/vicidial/AST_server_performance.php @@ -1,7 +1,7 @@ <? # AST_server_performance.php # -# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2 +# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2 # # CHANGES # @@ -10,6 +10,7 @@ # 70417-1106 - Changed time frame to be definable per time range on a single day # - Fixed vertical scaling issues # 80118-1508 - Fixed horizontal scale marking issues +# 90310-2151 - Added admin header # require("dbconnect.php"); @@ -83,7 +84,15 @@ while ($i < $servers_to_print) <? echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n"; -echo "<TITLE>VICIDIAL: Server Performance\n"; +echo "VICIDIAL: Server Performance\n"; + + $short_header=1; + + require("admin_header.php"); + +echo "
"; + + echo "\n"; echo "Date/Time Range: \n"; echo "to \n"; @@ -329,4 +338,6 @@ echo ""; ?> +
+ \ No newline at end of file diff --git a/agc_2-X/trunk/www/vicidial/AST_timeonVDAD.php b/agc_2-X/trunk/www/vicidial/AST_timeonVDAD.php index 2558d4d3..2f2433b8 100644 --- a/agc_2-X/trunk/www/vicidial/AST_timeonVDAD.php +++ b/agc_2-X/trunk/www/vicidial/AST_timeonVDAD.php @@ -12,6 +12,7 @@ # 61114-2004 - Changed to display CLOSER and DEFAULT, added trunk shortage # 80422-0305 - Added phone login to display, lower font size to 2 # 81013-2227 - Fixed Remote Agent display bug +# 90310-1945 - Admin header # header ("Content-type: text/html; charset=utf-8"); @@ -112,7 +113,14 @@ if ($closer_display>0) \n"; echo"\n"; -echo "VICIDIAL: Time On VDAD\n"; +echo "VICIDIAL: Time On VDAD\n"; + +$short_header=1; + +require("admin_header.php"); + +echo "
"; + echo "
";
 
 ###################################################################################
@@ -431,5 +439,6 @@ $parked_to_print = mysql_num_rows($rslt);
 
 ?>
 
+
\ No newline at end of file diff --git a/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php b/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php index 0fd3bbe7..f63dd914 100644 --- a/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php +++ b/agc_2-X/trunk/www/vicidial/AST_timeonVDADall.php @@ -44,10 +44,11 @@ # 81108-2337 - Added inbound-only section # 90105-1153 - Changed monitor links to use 0 prefix instead of 6 # 90202-0108 - Changed options to pop-out frame, added outbound_autodial_active option +# 90310-0906 - Added admin header # -$version = '2.0.5-35'; -$build = '90202-0108'; +$version = '2.0.5-36'; +$build = '90310-0906'; header ("Content-type: text/html; charset=utf-8"); @@ -262,7 +263,7 @@ $NFB = ''; $NFE = ''; $F=''; $FG=''; $B=''; $BG=''; -$select_list = "
Select Campaigns:
"; +$select_list = "
Select Campaigns:
"; $select_list .= "
"; $select_list .= "VERSION: $version   BUILD: $build"; $select_list .= "
"; -$open_list = "
Choose Report Display Options
"; +$open_list = "
Choose Report Display Options
"; ?> @@ -388,7 +389,14 @@ $rslt=mysql_query($stmt, $link); echo "\n"; echo"\n"; -echo "VICIDIAL: Time On VDAD Campaign: $group\n"; +echo "VICIDIAL: Time On VDAD Campaign: $group\n"; + + $short_header=1; + + require("admin_header.php"); + +echo "
"; + echo "\n"; echo "\n"; echo "\n"; @@ -404,8 +412,8 @@ echo "\n"; echo "\n"; echo "\n"; echo "VICIDIAL Real-Time                                                                          \n"; -echo "\n"; -echo "
\n"; +echo "\n"; +echo "
\n"; echo "Choose Report Display Options"; echo "
\n"; echo "
\n"; @@ -420,8 +428,7 @@ else { echo "       MODIFY | \n"; } -echo "SUMMARY | \n"; -echo "REPORTS \n"; +echo "SUMMARY \n"; echo "\n\n"; @@ -1650,5 +1657,6 @@ $calls_to_list = mysql_num_rows($rslt); ?> +
diff --git a/agc_2-X/trunk/www/vicidial/AST_timeonVDADallSUMMARY.php b/agc_2-X/trunk/www/vicidial/AST_timeonVDADallSUMMARY.php index 11b1dec9..2682ab0f 100644 --- a/agc_2-X/trunk/www/vicidial/AST_timeonVDADallSUMMARY.php +++ b/agc_2-X/trunk/www/vicidial/AST_timeonVDADallSUMMARY.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 # # Summary for all campaigns live real-time stats for the VICIDIAL Auto-Dialer all servers # @@ -14,6 +14,7 @@ # 70619-1339 - Added Status Category tally display # 71029-1900 - Changed CLOSER-type to not require campaign_id restriction # 80525-1040 - Added IVR status summary display for inbound calls +# 90310-2119 - Added admin header # header ("Content-type: text/html; charset=utf-8"); @@ -105,7 +106,14 @@ if (!isset($RR)) {$RR=4;} \n"; -echo "VICIDIAL: Realtime All Campaigns Summary\n"; +echo "VICIDIAL: Realtime All Campaigns Summary\n"; + + $short_header=1; + + require("admin_header.php"); + +echo "
"; + echo "VICIDIAL: Realtime All Campaigns Summary           \n"; echo "STOP | "; echo "SLOW | "; @@ -443,5 +451,6 @@ $k++; ?> +
diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index fd8cae44..bd2e5dcd 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -952,6 +952,9 @@ if (isset($_GET["agent_shift_enforcement_override"])) {$agent_shift_enforcemen elseif (isset($_POST["agent_shift_enforcement_override"])) {$agent_shift_enforcement_override=$_POST["agent_shift_enforcement_override"];} if (isset($_GET["manager_shift_enforcement_override"])) {$manager_shift_enforcement_override=$_GET["manager_shift_enforcement_override"];} elseif (isset($_POST["manager_shift_enforcement_override"])) {$manager_shift_enforcement_override=$_POST["manager_shift_enforcement_override"];} +if (isset($_GET["export_reports"])) {$export_reports=$_GET["export_reports"];} + elseif (isset($_POST["export_reports"])) {$export_reports=$_POST["export_reports"];} + if (isset($script_id)) {$script_id= strtoupper($script_id);} if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} @@ -1134,6 +1137,7 @@ $download_lists = ereg_replace("[^0-9]","",$download_lists); $caller_id_number = ereg_replace("[^0-9]","",$caller_id_number); $outbound_calls_per_second = ereg_replace("[^0-9]","",$outbound_calls_per_second); $manager_shift_enforcement_override = ereg_replace("[^0-9]","",$manager_shift_enforcement_override); +$export_reports = ereg_replace("[^0-9]","",$export_reports); ### DIGITS and COLONS $shift_length = ereg_replace("[^\:0-9]","",$shift_length); @@ -1639,11 +1643,12 @@ $dialplan_entry = ereg_replace(";","",$dialplan_entry); # 90306-1214 - Added shift enforcement and server/system calls per second options # 90308-0956 - Added server statistics # 90309-0059 - Changed logging to admin_server_log +# 90310-2203 - Added export_reports option for call activity report data exports # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.0.5-171'; -$build = '90309-0059'; +$admin_version = '2.0.5-172'; +$build = '90310-2203'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -1747,6 +1752,7 @@ $browser = getenv("HTTP_USER_AGENT"); $LOGmodify_dids =$row[56]; $LOGdelete_dids =$row[57]; $LOGmanager_shift_enforcement_override=$row[61]; + $LOGexport_reports =$row[64]; $stmt="SELECT allowed_campaigns from vicidial_user_groups where user_group='$LOGuser_group';"; $rslt=mysql_query($stmt, $link); @@ -2836,6 +2842,15 @@ if ($SSqc_features_active > 0)
Manager Shift Enforcement Override - This setting if set to 1 will allow a manager to enter their user and password on an agent screen to override the shift restrictions on an agent session if the agent is trying to log in outside of their shift. Default is 0. +
+ +
+Download Lists - This setting if set to 1 will allow a manager to click on the download list link at the bottom of a list modification screen to export the entire contents of a list to a flat data file. Default is 0. + +
+
+
+Export Reports - This setting if set to 1 will allow a manager to access the export call reports on the REPORTS screen. Default is 0. For the Export Calls Report, the following field order is used for exports:
call_date,phone_number,status,user,full_name,campaign_id/in-group,vendor_lead_code,source_id,list_id,gmt_offset_now,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,length_in_sec,user_group,alt_dial/queue_seconds @@ -5251,818 +5266,8 @@ if ($ADD==7111111) } - -######################### HTML HEADER BEGIN ####################################### -if ($hh=='users') - {$users_hh="bgcolor =\"$users_color\""; $users_fc="$users_font"; $users_bold="$header_selected_bold";} - else {$users_hh=''; $users_fc='WHITE'; $users_bold="$header_nonselected_bold";} -if ($hh=='campaigns') - {$campaigns_hh="bgcolor=\"$campaigns_color\""; $campaigns_fc="$campaigns_font"; $campaigns_bold="$header_selected_bold";} - else {$campaigns_hh=''; $campaigns_fc='WHITE'; $campaigns_bold="$header_nonselected_bold";} -if ($SSoutbound_autodial_active > 0) - { - if ($hh=='lists') - {$lists_hh="bgcolor=\"$lists_color\""; $lists_fc="$lists_font"; $lists_bold="$header_selected_bold";} - else {$lists_hh=''; $lists_fc='WHITE'; $lists_bold="$header_nonselected_bold";} - } -if ($hh=='ingroups') - {$ingroups_hh="bgcolor=\"$ingroups_color\""; $ingroups_fc="$ingroups_font"; $ingroups_bold="$header_selected_bold";} - else {$ingroups_hh=''; $ingroups_fc='WHITE'; $ingroups_bold="$header_nonselected_bold";} -if ($hh=='remoteagent') - {$remoteagent_hh="bgcolor=\"$remoteagent_color\""; $remoteagent_fc="$remoteagent_font"; $remoteagent_bold="$header_selected_bold";} - else {$remoteagent_hh=''; $remoteagent_fc='WHITE'; $remoteagent_bold="$header_nonselected_bold";} -if ($hh=='usergroups') - {$usergroups_hh="bgcolor=\"$usergroups_color\""; $usergroups_fc="$usergroups_font"; $usergroups_bold="$header_selected_bold";} - else {$usergroups_hh=''; $usergroups_fc='WHITE'; $usergroups_bold="$header_nonselected_bold";} -if ($hh=='scripts') - {$scripts_hh="bgcolor=\"$scripts_color\""; $scripts_fc="$scripts_font"; $scripts_bold="$header_selected_bold";} - else {$scripts_hh=''; $scripts_fc='WHITE'; $scripts_bold="$header_nonselected_bold";} -if ($SSoutbound_autodial_active > 0) - { - if ($hh=='filters') - {$filters_hh="bgcolor=\"$filters_color\""; $filters_fc="$filters_font"; $filters_bold="$header_selected_bold";} - else {$filters_hh=''; $filters_fc='WHITE'; $filters_bold="$header_nonselected_bold";} - } -if ($hh=='admin') - {$admin_hh="bgcolor=\"$admin_color\""; $admin_fc="$admin_font"; $admin_bold="$header_selected_bold";} - else {$admin_hh=''; $admin_fc='WHITE'; $admin_bold="$header_nonselected_bold";} -if ($hh=='reports') - {$reports_hh="bgcolor=\"$reports_color\""; $reports_fc="$reports_font"; $reports_bold="$header_selected_bold";} - else {$reports_hh=''; $reports_fc='WHITE'; $reports_bold="$header_nonselected_bold";} - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -$stmt="SELECT admin_home_url from system_settings;"; -$rslt=mysql_query($stmt, $link); -$row=mysql_fetch_row($rslt); -$admin_home_url_LU = $row[0]; - -?> -
- - - - -
-VICIDIAL logo -ADMINISTRATION
- - - - 1) { - ?> - >>>>>>> - - - - 1) - { - if ($sh=='basic') {$sh='list';} - if ($sh=='detail') {$sh='list';} - if ($sh=='dialstat') {$sh='list';} - - if ($sh=='list') {$list_sh="bgcolor=\"$subcamp_color\""; $list_fc="$subcamp_font";} - else {$list_sh=''; $list_fc='BLACK';} - if ($sh=='status') {$status_sh="bgcolor=\"$subcamp_color\""; $status_fc="$subcamp_font";} - else {$status_sh=''; $status_fc='BLACK';} - if ($sh=='hotkey') {$hotkey_sh="bgcolor=\"$subcamp_color\""; $hotkey_fc="$subcamp_font";} - else {$hotkey_sh=''; $hotkey_fc='BLACK';} - if ($sh=='recycle') {$recycle_sh="bgcolor=\"$subcamp_color\""; $recycle_fc="$subcamp_font";} - else {$recycle_sh=''; $recycle_fc='BLACK';} - if ($sh=='autoalt') {$autoalt_sh="bgcolor=\"$subcamp_color\""; $autoalt_fc="$subcamp_font";} - else {$autoalt_sh=''; $autoalt_fc='BLACK';} - if ($sh=='pause') {$pause_sh="bgcolor=\"$subcamp_color\""; $pause_fc="$subcamp_font";} - else {$pause_sh=''; $pause_fc='BLACK';} - if ($sh=='listmix') {$listmix_sh="bgcolor=\"$subcamp_color\""; $listmix_fc="$subcamp_font";} - else {$listmix_sh=''; $listmix_fc='BLACK';} - - ?> - > - - > - - > - - 0) - { - ?> - > - - > - - > - - - > - - - - 0) - { - ?> - - 1) { - ?> - >>>>> - - - - 1) - { - ?> - >> - - - 0) - { - ?> - - 1) - { - ?> - >> - - - - 1) - { - ?> - >>>>>> - - - - 1) - { - ?> - >>>> - - - - 1) - { - ?> - >> - - - - 1) - { - if ($sh=='times') {$times_sh="bgcolor=\"$times_color\""; $times_fc="$times_font";} # pink - else {$times_sh=''; $times_fc='BLACK';} - if ($sh=='shifts') {$shifts_sh="bgcolor=\"$shifts_color\""; $shifts_fc="$shifts_font";} # pink - else {$shifts_sh=''; $shifts_fc='BLACK';} - if ($sh=='templates') {$templates_sh="bgcolor=\"$templates_color\""; $templates_fc="$templates_font";} # pink - else {$templates_sh=''; $templates_fc='BLACK';} - if ($sh=='carriers') {$carriers_sh="bgcolor=\"$carriers_color\""; $carriers_fc="$carriers_font";} # pink - else {$carriers_sh=''; $carriers_fc='BLACK';} - if ($sh=='phones') {$phones_sh="bgcolor=\"$server_color\""; $phones_fc="$phones_font";} # pink - else {$phones_sh=''; $phones_fc='BLACK';} - if ($sh=='server') {$server_sh="bgcolor=\"$server_color\""; $server_fc="$server_font";} # pink - else {$server_sh=''; $server_fc='BLACK';} - if ($sh=='conference') {$conference_sh="bgcolor=\"$server_color\""; $conference_fc="$server_font";} # pink - else {$conference_sh=''; $conference_fc='BLACK';} - if ($sh=='settings') {$settings_sh="bgcolor=\"$settings_color\""; $settings_fc="$settings_font";} # pink - else {$settings_sh=''; $settings_fc='BLACK';} - if ($sh=='status') {$status_sh="bgcolor=\"$status_color\""; $status_fc="$status_font";} # pink - else {$status_sh=''; $status_fc='BLACK';} - - ?> - > - - > - > - > - > - > - > - > - > - - - - -
WIDTH=160> - SIZE=>Users -
-   >Show Users -
-   >Add A New User -
-   >Copy User -
-   >Search For A User -
-   >User Stats -
-   >User Status -
-   >Time Sheet
> - SIZE=>Campaigns -
>   SIZE=>Campaigns Main
>   SIZE=>Statuses
>   SIZE=>HotKeys
>   SIZE=>Lead Recycle
>   SIZE=>Auto-Alt Dial
>   SIZE=>List Mix
>   SIZE=>Pause Codes
> SIZE=>Lists
  - > Show Lists -
  - > Add A New List -
  - > Search For A Lead -
  - > Add Number To DNC -
  - > Load New Leads -
> - SIZE=> Scripts -
  - > Show Scripts -
  - > Add A New Script -
> SIZE=> Filters
  - > Show Filters -
  - > Add A New Filter -
> - SIZE=> In-Groups -
  - > Show In-Groups -
  - > Add A New In-Group -
  - > Copy In-Group -
  - > Show DIDs -
  - > Add A New DID -
  - > Copy DID -
> - SIZE=> User Groups -
  - > Show User Groups -
  - > Add A New User Group -
  - > Group Hourly Report -
  - > Bulk Group Change -
> - SIZE=> Remote Agents -
  - > Show Remote Agents -
  - > Add New Remote Agents -
> - SIZE=> Admin -
COLSPAN=2>   - SIZE=> Call Times
>   - SIZE=> Shifts
>   - SIZE=> Phones
>   - SIZE=> Templates
>   - SIZE=> Carriers
>   - SIZE=> Servers
>   - SIZE=> Conferences
>   - SIZE=> System Settings
>   - SIZE=> System Statuses
> - SIZE=> Reports -
-
BGCOLOR=#D9E6FE> - - - HEIGHT=15> - - - - - - - - - - - - 1) { - ?> - > - 1) { - ?> - > - 1) { - ?> - > - 1) { - ?> - > - 1) { - ?> - > - 1) and (strlen($admin_hh) > 1) ) { - ?> - > - 1) and (strlen($admin_hh) > 1) ) { - ?> - > - 1) and (strlen($admin_hh) > 1) ) { - ?> - > - 1) { - ?> - > - 1) and (!eregi('campaign',$hh) ) ) { - ?> - > - \n"; - echo "You are not authorized to view this page. Please go back.\n"; - } - -if (strlen($reports_hh) > 1) { - ?> -> - - - - -\n"; echo "\n"; echo "\n"; + echo "\n"; echo "\n"; echo "\n"; @@ -20592,6 +19799,10 @@ if ($ADD==999999)
  • SERVER PERFORMANCE = 1) + { + echo "
  • EXPORT CALLS REPORT\n"; + } if ($LOGuser_level >= 9) { echo "
  • ADMIN CHANGE LOG\n"; diff --git a/agc_2-X/trunk/www/vicidial/admin_header.php b/agc_2-X/trunk/www/vicidial/admin_header.php new file mode 100644 index 00000000..0d28ac51 --- /dev/null +++ b/agc_2-X/trunk/www/vicidial/admin_header.php @@ -0,0 +1,932 @@ + LICENSE: AGPLv2 +# + +# CHANGES +# 90310-0709 - First Build + + +######################### SMALL HTML HEADER BEGIN ####################################### +if($short_header) + { + ?> +
  • HOME | Timeclock | Logout  
    >   > Show Campaigns     |     > Add A New Campaign     |     > Copy Campaign     |     > Real-Time Campaigns Summary
      > Show Call Times  | > Add A New Call Time  | > Show State Call Times  | > Add A New State Call Time
      > Show Shifts  | > Add A New Shift
      > Show Phones  | > Add A New Phone  | > Phone Alias List  | > Add A New Phone Alias  | > Group Alias List  | > Add A New Group Alias
      > Show Conferences   |   > Add A New Conference   |   > Show VICIDIAL Conferences   |   > Add A New VICIDIAL Conference
      > Show Servers   |   > Add A New Server
      > Show Templates   |   > Add A New Template
      > Show Carriers   |   > Add A New Carrier
      > System Settings
      > System Statuses   |   > Status Categories   |   > QC Status Codes
    >  
    -USER MODIFIED - ADMIN: $user\n"; - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',delete_filters='$delete_filters',alter_agent_interface_options='$alter_agent_interface_options',closer_default_blended='$closer_default_blended',delete_call_times='$delete_call_times',modify_call_times='$modify_call_times',modify_users='$modify_users',modify_campaigns='$modify_campaigns',modify_lists='$modify_lists',modify_scripts='$modify_scripts',modify_filters='$modify_filters',modify_ingroups='$modify_ingroups',modify_usergroups='$modify_usergroups',modify_remoteagents='$modify_remoteagents',modify_servers='$modify_servers',view_reports='$view_reports',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override',qc_enabled='$qc_enabled',qc_user_level='$qc_user_level',qc_pass='$qc_pass',qc_finish='$qc_finish',qc_commit='$qc_commit',add_timeclock_log='$add_timeclock_log',modify_timeclock_log='$modify_timeclock_log',delete_timeclock_log='$delete_timeclock_log',alter_custphone_override='$alter_custphone_override',vdc_agent_api_access='$vdc_agent_api_access',modify_inbound_dids='$modify_inbound_dids',delete_inbound_dids='$delete_inbound_dids',active='$active',download_lists='$download_lists',agent_shift_enforcement_override='$agent_shift_enforcement_override',manager_shift_enforcement_override='$manager_shift_enforcement_override' where user='$user';"; + $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',delete_filters='$delete_filters',alter_agent_interface_options='$alter_agent_interface_options',closer_default_blended='$closer_default_blended',delete_call_times='$delete_call_times',modify_call_times='$modify_call_times',modify_users='$modify_users',modify_campaigns='$modify_campaigns',modify_lists='$modify_lists',modify_scripts='$modify_scripts',modify_filters='$modify_filters',modify_ingroups='$modify_ingroups',modify_usergroups='$modify_usergroups',modify_remoteagents='$modify_remoteagents',modify_servers='$modify_servers',view_reports='$view_reports',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override',qc_enabled='$qc_enabled',qc_user_level='$qc_user_level',qc_pass='$qc_pass',qc_finish='$qc_finish',qc_commit='$qc_commit',add_timeclock_log='$add_timeclock_log',modify_timeclock_log='$modify_timeclock_log',delete_timeclock_log='$delete_timeclock_log',alter_custphone_override='$alter_custphone_override',vdc_agent_api_access='$vdc_agent_api_access',modify_inbound_dids='$modify_inbound_dids',delete_inbound_dids='$delete_inbound_dids',active='$active',download_lists='$download_lists',agent_shift_enforcement_override='$agent_shift_enforcement_override',manager_shift_enforcement_override='$manager_shift_enforcement_override',export_reports='$export_reports' where user='$user';"; $rslt=mysql_query($stmt, $link); ### LOG INSERTION Admin Log Table ### @@ -13596,6 +12801,7 @@ if ($ADD==3) $download_lists = $row[60]; $agent_shift_enforcement_override = $row[61]; $manager_shift_enforcement_override = $row[62]; + $export_reports = $row[64]; if ( ($user_level >= $LOGuser_level) and ($LOGuser_level < 9) ) { @@ -13708,6 +12914,7 @@ if ($ADD==3) echo "
    Load Leads: $NWB#vicidial_users-load_leads$NWE
    Modify Leads: $NWB#vicidial_users-modify_leads$NWE
    Download Lists: $NWB#vicidial_users-modify_leads$NWE
    Export Reports: $NWB#vicidial_users-export_reports$NWE
    Modify Campaigns: $NWB#vicidial_users-modify_sections$NWE
    Campaign Detail: $NWB#vicidial_users-campaign_detail$NWE
    + + + + + + + + + + + + +
        Users     Campaigns     Lists     Scripts     Filters     In-Groups     User Groups     Remote Agents     Admin     Reports  
    + 0) + { + if ($hh=='lists') + {$lists_hh="bgcolor=\"$lists_color\""; $lists_fc="$lists_font"; $lists_bold="$header_selected_bold";} + else {$lists_hh=''; $lists_fc='WHITE'; $lists_bold="$header_nonselected_bold";} + } +if ($hh=='ingroups') + {$ingroups_hh="bgcolor=\"$ingroups_color\""; $ingroups_fc="$ingroups_font"; $ingroups_bold="$header_selected_bold";} + else {$ingroups_hh=''; $ingroups_fc='WHITE'; $ingroups_bold="$header_nonselected_bold";} +if ($hh=='remoteagent') + {$remoteagent_hh="bgcolor=\"$remoteagent_color\""; $remoteagent_fc="$remoteagent_font"; $remoteagent_bold="$header_selected_bold";} + else {$remoteagent_hh=''; $remoteagent_fc='WHITE'; $remoteagent_bold="$header_nonselected_bold";} +if ($hh=='usergroups') + {$usergroups_hh="bgcolor=\"$usergroups_color\""; $usergroups_fc="$usergroups_font"; $usergroups_bold="$header_selected_bold";} + else {$usergroups_hh=''; $usergroups_fc='WHITE'; $usergroups_bold="$header_nonselected_bold";} +if ($hh=='scripts') + {$scripts_hh="bgcolor=\"$scripts_color\""; $scripts_fc="$scripts_font"; $scripts_bold="$header_selected_bold";} + else {$scripts_hh=''; $scripts_fc='WHITE'; $scripts_bold="$header_nonselected_bold";} +if ($SSoutbound_autodial_active > 0) + { + if ($hh=='filters') + {$filters_hh="bgcolor=\"$filters_color\""; $filters_fc="$filters_font"; $filters_bold="$header_selected_bold";} + else {$filters_hh=''; $filters_fc='WHITE'; $filters_bold="$header_nonselected_bold";} + } +if ($hh=='admin') + {$admin_hh="bgcolor=\"$admin_color\""; $admin_fc="$admin_font"; $admin_bold="$header_selected_bold";} + else {$admin_hh=''; $admin_fc='WHITE'; $admin_bold="$header_nonselected_bold";} +if ($hh=='reports') + {$reports_hh="bgcolor=\"$reports_color\""; $reports_fc="$reports_font"; $reports_bold="$header_selected_bold";} + else {$reports_hh=''; $reports_fc='WHITE'; $reports_bold="$header_nonselected_bold";} + +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; +echo "\n"; + +$stmt="SELECT admin_home_url from system_settings;"; +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$admin_home_url_LU = $row[0]; + +?> +
    + + + + +
    +VICIDIAL logo +ADMINISTRATION
    + + + + 1) { + ?> + >>>>>>> + + + + 1) + { + if ($sh=='basic') {$sh='list';} + if ($sh=='detail') {$sh='list';} + if ($sh=='dialstat') {$sh='list';} + + if ($sh=='list') {$list_sh="bgcolor=\"$subcamp_color\""; $list_fc="$subcamp_font";} + else {$list_sh=''; $list_fc='BLACK';} + if ($sh=='status') {$status_sh="bgcolor=\"$subcamp_color\""; $status_fc="$subcamp_font";} + else {$status_sh=''; $status_fc='BLACK';} + if ($sh=='hotkey') {$hotkey_sh="bgcolor=\"$subcamp_color\""; $hotkey_fc="$subcamp_font";} + else {$hotkey_sh=''; $hotkey_fc='BLACK';} + if ($sh=='recycle') {$recycle_sh="bgcolor=\"$subcamp_color\""; $recycle_fc="$subcamp_font";} + else {$recycle_sh=''; $recycle_fc='BLACK';} + if ($sh=='autoalt') {$autoalt_sh="bgcolor=\"$subcamp_color\""; $autoalt_fc="$subcamp_font";} + else {$autoalt_sh=''; $autoalt_fc='BLACK';} + if ($sh=='pause') {$pause_sh="bgcolor=\"$subcamp_color\""; $pause_fc="$subcamp_font";} + else {$pause_sh=''; $pause_fc='BLACK';} + if ($sh=='listmix') {$listmix_sh="bgcolor=\"$subcamp_color\""; $listmix_fc="$subcamp_font";} + else {$listmix_sh=''; $listmix_fc='BLACK';} + + ?> + > + + > + + > + + 0) + { + ?> + > + + > + + > + + + > + + + + 0) + { + ?> + + 1) { + ?> + >>>>> + + + + 1) + { + ?> + >> + + + 0) + { + ?> + + 1) + { + ?> + >> + + + + 1) + { + ?> + >>>>>> + + + + 1) + { + ?> + >>>> + + + + 1) + { + ?> + >> + + + + 1) + { + if ($sh=='times') {$times_sh="bgcolor=\"$times_color\""; $times_fc="$times_font";} # pink + else {$times_sh=''; $times_fc='BLACK';} + if ($sh=='shifts') {$shifts_sh="bgcolor=\"$shifts_color\""; $shifts_fc="$shifts_font";} # pink + else {$shifts_sh=''; $shifts_fc='BLACK';} + if ($sh=='templates') {$templates_sh="bgcolor=\"$templates_color\""; $templates_fc="$templates_font";} # pink + else {$templates_sh=''; $templates_fc='BLACK';} + if ($sh=='carriers') {$carriers_sh="bgcolor=\"$carriers_color\""; $carriers_fc="$carriers_font";} # pink + else {$carriers_sh=''; $carriers_fc='BLACK';} + if ($sh=='phones') {$phones_sh="bgcolor=\"$server_color\""; $phones_fc="$phones_font";} # pink + else {$phones_sh=''; $phones_fc='BLACK';} + if ($sh=='server') {$server_sh="bgcolor=\"$server_color\""; $server_fc="$server_font";} # pink + else {$server_sh=''; $server_fc='BLACK';} + if ($sh=='conference') {$conference_sh="bgcolor=\"$server_color\""; $conference_fc="$server_font";} # pink + else {$conference_sh=''; $conference_fc='BLACK';} + if ($sh=='settings') {$settings_sh="bgcolor=\"$settings_color\""; $settings_fc="$settings_font";} # pink + else {$settings_sh=''; $settings_fc='BLACK';} + if ($sh=='status') {$status_sh="bgcolor=\"$status_color\""; $status_fc="$status_font";} # pink + else {$status_sh=''; $status_fc='BLACK';} + + ?> + > + + > + > + > + > + > + > + > + > + + + + +
    WIDTH=160> + SIZE=>Users +
    +   >Show Users +
    +   >Add A New User +
    +   >Copy User +
    +   >Search For A User +
    +   >User Stats +
    +   >User Status +
    +   >Time Sheet
    > + SIZE=>Campaigns +
    >   SIZE=>Campaigns Main
    >   SIZE=>Statuses
    >   SIZE=>HotKeys
    >   SIZE=>Lead Recycle
    >   SIZE=>Auto-Alt Dial
    >   SIZE=>List Mix
    >   SIZE=>Pause Codes
    > SIZE=>Lists
      + > Show Lists +
      + > Add A New List +
      + > Search For A Lead +
      + > Add Number To DNC +
      + > Load New Leads +
    > + SIZE=> Scripts +
      + > Show Scripts +
      + > Add A New Script +
    > SIZE=> Filters
      + > Show Filters +
      + > Add A New Filter +
    > + SIZE=> In-Groups +
      + > Show In-Groups +
      + > Add A New In-Group +
      + > Copy In-Group +
      + > Show DIDs +
      + > Add A New DID +
      + > Copy DID +
    > + SIZE=> User Groups +
      + > Show User Groups +
      + > Add A New User Group +
      + > Group Hourly Report +
      + > Bulk Group Change +
    > + SIZE=> Remote Agents +
      + > Show Remote Agents +
      + > Add New Remote Agents +
    > + SIZE=> Admin +
    COLSPAN=2>   + SIZE=> Call Times
    >   + SIZE=> Shifts
    >   + SIZE=> Phones
    >   + SIZE=> Templates
    >   + SIZE=> Carriers
    >   + SIZE=> Servers
    >   + SIZE=> Conferences
    >   + SIZE=> System Settings
    >   + SIZE=> System Statuses
    > + SIZE=> Reports +
    +
    BGCOLOR=#D9E6FE> + + + HEIGHT=15> + + + + + + + + + + + + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + 1) { + ?> + > + 1) and (strlen($admin_hh) > 1) ) { + ?> + > + 1) and (strlen($admin_hh) > 1) ) { + ?> + > + 1) and (strlen($admin_hh) > 1) ) { + ?> + > + 1) { + ?> + > + 1) and (!eregi('campaign',$hh) ) ) { + ?> + > + + > + \n"; + echo "You are not authorized to view this page. Please go back.\n"; + } + +if (strlen($reports_hh) > 1) { + ?> +> + + + + +
    HOME | Timeclock | Logout  
    >   > Show Campaigns     |     > Add A New Campaign     |     > Copy Campaign     |     > Real-Time Campaigns Summary
      > Show Call Times  | > Add A New Call Time  | > Show State Call Times  | > Add A New State Call Time
      > Show Shifts  | > Add A New Shift
      > Show Phones  | > Add A New Phone  | > Phone Alias List  | > Add A New Phone Alias  | > Group Alias List  | > Add A New Group Alias
      > Show Conferences   |   > Add A New Conference   |   > Show VICIDIAL Conferences   |   > Add A New VICIDIAL Conference
      > Show Servers   |   > Add A New Server
      > Show Templates   |   > Add A New Template
      > Show Carriers   |   > Add A New Carrier
      > System Settings
      > System Statuses   |   > Status Categories   |   > QC Status Codes
      >User Stats   |   >User Status   |   >Time Sheet   |   >Days Status
    >  
    + -VICIDIAL ADMIN: Lead Search - -Lead Lookup - - +VICIDIAL ADMIN: Lead Search <? -echo "<a href=\"./admin.php?ADD=100\">VICIDIAL ADMIN</a>: Lead search: $vendor_id $phone $lead_id $status $list_id $user<BR>\n"; + +##### BEGIN Set variables to make header show properly ##### +$ADD = '100'; +$hh = 'lists'; +$LOGast_admin_access = '1'; +$SSoutbound_autodial_active = '1'; +$ADMIN = 'admin.php'; +$page_width='770'; +$section_width='750'; +$header_font_size='3'; +$subheader_font_size='2'; +$subcamp_font_size='2'; +$header_selected_bold='<b>'; +$header_nonselected_bold=''; +$lists_color = '#FFFF99'; +$lists_font = 'BLACK'; +$lists_color = '#E6E6E6'; +$subcamp_color = '#C6C6C6'; +##### END Set variables to make header show properly ##### + +require("admin_header.php"); + + + + + +echo " Lead search: $vendor_id $phone $lead_id $status $list_id $user<BR>\n"; if ( (!$vendor_id) and (!$phone) and (!$lead_id) and ( (strlen($status)<1) and (strlen($list_id)<1) and (strlen($user)<1) )) diff --git a/agc_2-X/trunk/www/vicidial/call_report_export.php b/agc_2-X/trunk/www/vicidial/call_report_export.php new file mode 100644 index 00000000..d8da88bb --- /dev/null +++ b/agc_2-X/trunk/www/vicidial/call_report_export.php @@ -0,0 +1,513 @@ +<? +# call_report_export.php +# +# displays options to select for downloading of leads and their vicidial_log +# and/or vicidial_closer_log information by status, list_id and date range. +# downloads to a flat text file that is tab delimited +# +# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2 +# +# CHANGES +# +# 90310-2247 - First build +# + +require("dbconnect.php"); + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; +if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} + elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} +if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];} + elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];} +if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} + elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} +if (isset($_GET["group"])) {$group=$_GET["group"];} + elseif (isset($_POST["group"])) {$group=$_POST["group"];} +if (isset($_GET["user_group"])) {$user_group=$_GET["user_group"];} + elseif (isset($_POST["user_group"])) {$user_group=$_POST["user_group"];} +if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} + elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} +if (isset($_GET["status"])) {$status=$_GET["status"];} + elseif (isset($_POST["status"])) {$status=$_POST["status"];} +if (isset($_GET["DB"])) {$DB=$_GET["DB"];} + elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} +if (isset($_GET["run_export"])) {$run_export=$_GET["run_export"];} + elseif (isset($_POST["run_export"])) {$run_export=$_POST["run_export"];} +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 (strlen($shift)<2) {$shift='ALL';} + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +$i=0; +while ($i < $qm_conf_ct) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $i++; + } +##### END SETTINGS LOOKUP ##### +########################################### + +$PHP_AUTH_USER = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_USER); +$PHP_AUTH_PW = ereg_replace("[^0-9a-zA-Z]","",$PHP_AUTH_PW); + +$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW' and user_level > 7 and export_reports='1';"; +if ($DB) {echo "|$stmt|\n";} +if ($non_latin > 0) { $rslt=mysql_query("SET NAMES 'UTF8'");} +$rslt=mysql_query($stmt, $link); +$row=mysql_fetch_row($rslt); +$auth=$row[0]; + + if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth)) + { +# Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\""); +# Header("HTTP/1.0 401 Unauthorized"); + echo "Invalid Username/Password or no export report permission: |$PHP_AUTH_USER|\n"; + exit; + } + + +##### START RUN THE EXPORT AND OUTPUT FLAT DATA FILE ##### +if ($run_export > 0) + { + $US='_'; + $MT[0]=''; + $ip = getenv("REMOTE_ADDR"); + $NOW_DATE = date("Y-m-d"); + $NOW_TIME = date("Y-m-d H:i:s"); + $FILE_TIME = date("Ymd-His"); + $STARTtime = date("U"); + if (!isset($group)) {$group = '';} + if (!isset($query_date)) {$query_date = $NOW_DATE;} + if (!isset($end_date)) {$end_date = $NOW_DATE;} + + $campaign_ct = count($campaign); + $group_ct = count($group); + $user_group_ct = count($user_group); + $list_ct = count($list_id); + $status_ct = count($status); + $campaign_string='|'; + $group_string='|'; + $user_group_string='|'; + $list_string='|'; + $status_string='|'; + + $i=0; + while($i < $campaign_ct) + { + $campaign_string .= "$campaign[$i]|"; + $campaign_SQL .= "'$campaign[$i]',"; + $i++; + } + if ( (ereg("--NONE--",$campaign_string) ) or ($campaign_ct < 1) ) + { + $campaign_SQL = "campaign_id IN('')"; + $RUNcampaign=0; + } + else + { + $campaign_SQL = eregi_replace(",$",'',$campaign_SQL); + $campaign_SQL = "and vl.campaign_id IN($campaign_SQL)"; + $RUNcampaign++; + } + + $i=0; + while($i < $group_ct) + { + $group_string .= "$group[$i]|"; + $group_SQL .= "'$group[$i]',"; + $i++; + } + if ( (ereg("--NONE--",$group_string) ) or ($group_ct < 1) ) + { + $group_SQL = "''"; + $group_SQL = "campaign_id IN('')"; + $RUNgroup=0; + } + else + { + $group_SQL = eregi_replace(",$",'',$group_SQL); + $group_SQL = "and vl.campaign_id IN($group_SQL)"; + $RUNgroup++; + } + + $i=0; + while($i < $user_group_ct) + { + $user_group_string .= "$user_group[$i]|"; + $user_group_SQL .= "'$user_group[$i]',"; + $i++; + } + if ( (ereg("--ALL--",$user_group_string) ) or ($user_group_ct < 1) ) + { + $user_group_SQL = ""; + } + else + { + $user_group_SQL = eregi_replace(",$",'',$user_group_SQL); + $user_group_SQL = "and vl.user_group IN($user_group_SQL)"; + } + + $i=0; + while($i < $list_ct) + { + $list_string .= "$list_id[$i]|"; + $list_SQL .= "'$list_id[$i]',"; + $i++; + } + if ( (ereg("--ALL--",$list_string) ) or ($list_ct < 1) ) + { + $list_SQL = ""; + } + else + { + $list_SQL = eregi_replace(",$",'',$list_SQL); + $list_SQL = "and vi.list_id IN($list_SQL)"; + } + + $i=0; + while($i < $status_ct) + { + $status_string .= "$status[$i]|"; + $status_SQL .= "'$status[$i]',"; + $i++; + } + if ( (ereg("--ALL--",$status_string) ) or ($status_ct < 1) ) + { + $status_SQL = ""; + } + else + { + $status_SQL = eregi_replace(",$",'',$status_SQL); + $status_SQL = "and vl.status IN($status_SQL)"; + } + + + if ($DB > 0) + { + echo "<BR>\n"; + echo "$campaign_ct|$campaign_string|$campaign_SQL\n"; + echo "<BR>\n"; + echo "$group_ct|$group_string|$group_SQL\n"; + echo "<BR>\n"; + echo "$user_group_ct|$user_group_string|$user_group_SQL\n"; + echo "<BR>\n"; + echo "$list_ct|$list_string|$list_SQL\n"; + echo "<BR>\n"; + echo "$status_ct|$status_string|$status_SQL\n"; + echo "<BR>\n"; + exit; + } + + + if ($RUNcampaign > 0) + { + $export_campaign_rows=''; + $stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date' and vl.call_date <= '$end_date' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $outbound_to_print = mysql_num_rows($rslt); + if ($outbound_to_print < 1) + { + echo "There are no outbound calls during this time period for these parameters\n"; + exit; + } + else + { + $i=0; + while ($i < $outbound_to_print) + { + $row=mysql_fetch_row($rslt); + + $export_campaign_rows .= "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\r\n"; + $i++; + } + } + } + + if ($RUNgroup > 0) + { + $export_group_rows=''; + $stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date' and vl.call_date <= '$end_date' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;"; + $rslt=mysql_query($stmtA, $link); + if ($DB) {echo "$stmt\n";} + $inbound_to_print = mysql_num_rows($rslt); + if ($inbound_to_print < 1) + { + echo "There are no inbound calls during this time period for these parameters\n"; + exit; + } + else + { + $i=0; + while ($i < $inbound_to_print) + { + $row=mysql_fetch_row($rslt); + + $export_group_rows .= "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\r\n"; + $i++; + } + } + } + + + if ( ($outbound_to_print > 0) or ($inbound_to_print > 0) ) + { + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|$stmtA|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LEADS', event_type='EXPORT', record_id='', event_code='ADMIN EXPORT CALLS REPORT', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + $TXTfilename = "EXPORT_CALL_REPORT_$FILE_TIME.txt"; + + // We'll be outputting a TXT file + header('Content-type: application/octet-stream'); + + // It will be called LIST_101_20090209-121212.txt + header("Content-Disposition: attachment; filename=\"$TXTfilename\""); + header('Expires: 0'); + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Pragma: public'); + ob_clean(); + flush(); + + echo "$export_campaign_rows$export_group_rows"; + } + else + { + echo "There are no calls during this time period for these parameters\n"; + exit; + } + } +##### END RUN THE EXPORT AND OUTPUT FLAT DATA FILE ##### + + +else + { + $NOW_DATE = date("Y-m-d"); + $NOW_TIME = date("Y-m-d H:i:s"); + $STARTtime = date("U"); + if (!isset($group)) {$group = '';} + if (!isset($query_date)) {$query_date = $NOW_DATE;} + if (!isset($end_date)) {$end_date = $NOW_DATE;} + + $stmt="select campaign_id from vicidial_campaigns;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $campaigns_to_print = mysql_num_rows($rslt); + $i=0; + $LISTcampaigns[$i]='---NONE---'; + $i++; + $campaigns_to_print++; + while ($i < $campaigns_to_print) + { + $row=mysql_fetch_row($rslt); + $LISTcampaigns[$i] =$row[0]; + $i++; + } + + $stmt="select group_id from vicidial_inbound_groups;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $groups_to_print = mysql_num_rows($rslt); + $i=0; + $LISTgroups[$i]='---NONE---'; + $i++; + $groups_to_print++; + while ($i < $groups_to_print) + { + $row=mysql_fetch_row($rslt); + $LISTgroups[$i] =$row[0]; + $i++; + } + + $stmt="select user_group from vicidial_user_groups;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $user_groups_to_print = mysql_num_rows($rslt); + $i=0; + $LISTuser_groups[$i]='---ALL---'; + $i++; + $user_groups_to_print++; + while ($i < $user_groups_to_print) + { + $row=mysql_fetch_row($rslt); + $LISTuser_groups[$i] =$row[0]; + $i++; + } + + $stmt="select list_id from vicidial_lists;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $lists_to_print = mysql_num_rows($rslt); + $i=0; + $LISTlists[$i]='---ALL---'; + $i++; + $lists_to_print++; + while ($i < $lists_to_print) + { + $row=mysql_fetch_row($rslt); + $LISTlists[$i] =$row[0]; + $i++; + } + + $stmt="select status from vicidial_statuses;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $statuses_to_print = mysql_num_rows($rslt); + $i=0; + $LISTstatus[$i]='---ALL---'; + $i++; + $statuses_to_print++; + while ($i < $statuses_to_print) + { + $row=mysql_fetch_row($rslt); + $LISTstatus[$i] =$row[0]; + $i++; + } + + $stmt="select distinct status from vicidial_campaign_statuses;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $Cstatuses_to_print = mysql_num_rows($rslt); + $j=0; + while ($j < $Cstatuses_to_print) + { + $row=mysql_fetch_row($rslt); + $LISTstatus[$i] =$row[0]; + $i++; + $j++; + } + $statuses_to_print = ($statuses_to_print + $Cstatuses_to_print); + + echo "<HTML><HEAD>\n"; + + + echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n"; + echo "<TITLE>VICIDIAL: Export Calls Report"; + + ##### BEGIN Set variables to make header show properly ##### + $ADD = '100'; + $hh = 'lists'; + $LOGast_admin_access = '1'; + $SSoutbound_autodial_active = '1'; + $ADMIN = 'admin.php'; + $page_width='770'; + $section_width='750'; + $header_font_size='3'; + $subheader_font_size='2'; + $subcamp_font_size='2'; + $header_selected_bold='<b>'; + $header_nonselected_bold=''; + $lists_color = '#FFFF99'; + $lists_font = 'BLACK'; + $lists_color = '#E6E6E6'; + $subcamp_color = '#C6C6C6'; + ##### END Set variables to make header show properly ##### + + require("admin_header.php"); + + + echo "<CENTER><BR>\n"; + echo "<FONT SIZE=3 FACE=\"Arial,Helvetica\"><B>Export Calls Report</B></FONT><BR><BR>\n"; + echo "<FORM ACTION=\"$PHP_SELF\" METHOD=GET>\n"; + echo "<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">"; + echo "<INPUT TYPE=HIDDEN NAME=run_export VALUE=\"1\">"; + echo "<TABLE BORDER=0 CELLSPACING=8><TR><TD ALIGN=LEFT VALIGN=TOP ROWSPAN=3>\n"; + + echo "<font class=\"select_bold\"><B>Date Range:</B></font><BR><CENTER>\n"; + echo "<INPUT TYPE=TEXT NAME=query_date SIZE=10 MAXLENGTH=10 VALUE=\"$query_date\">"; + echo "<BR>to<BR>\n"; + echo "<INPUT TYPE=TEXT NAME=end_date SIZE=10 MAXLENGTH=10 VALUE=\"$end_date\">\n"; + + echo "</TD><TD ALIGN=LEFT VALIGN=TOP ROWSPAN=2>\n"; + echo "<font class=\"select_bold\"><B>Campaigns:</B></font><BR><CENTER>\n"; + echo "<SELECT SIZE=15 NAME=campaign[] multiple>\n"; + $o=0; + while ($campaigns_to_print > $o) + { + if (ereg("\|$LISTcampaigns[$o]\|",$campaign_string)) + {echo "<option selected value=\"$LISTcampaigns[$o]\">$LISTcampaigns[$o]</option>\n";} + else + {echo "<option value=\"$LISTcampaigns[$o]\">$LISTcampaigns[$o]</option>\n";} + $o++; + } + echo "</SELECT>\n"; + + echo "</TD><TD ALIGN=LEFT VALIGN=TOP ROWSPAN=3>\n"; + echo "<font class=\"select_bold\"><B>Inbound Groups:</B></font><BR><CENTER>\n"; + echo "<SELECT SIZE=15 NAME=group[] multiple>\n"; + $o=0; + while ($groups_to_print > $o) + { + if (ereg("\|$LISTgroups[$o]\|",$group_string)) + {echo "<option selected value=\"$LISTgroups[$o]\">$LISTgroups[$o]</option>\n";} + else + {echo "<option value=\"$LISTgroups[$o]\">$LISTgroups[$o]</option>\n";} + $o++; + } + echo "</SELECT>\n"; + echo "</TD><TD ALIGN=LEFT VALIGN=TOP ROWSPAN=3>\n"; + echo "<font class=\"select_bold\"><B>Lists:</B></font><BR><CENTER>\n"; + echo "<SELECT SIZE=15 NAME=list_id[] multiple>\n"; + $o=0; + while ($lists_to_print > $o) + { + if (ereg("\|$LISTlists[$o]\|",$list_string)) + {echo "<option selected value=\"$LISTlists[$o]\">$LISTlists[$o]</option>\n";} + else + {echo "<option value=\"$LISTlists[$o]\">$LISTlists[$o]</option>\n";} + $o++; + } + echo "</SELECT>\n"; + echo "</TD><TD ALIGN=LEFT VALIGN=TOP ROWSPAN=3>\n"; + echo "<font class=\"select_bold\"><B>Statuses:</B></font><BR><CENTER>\n"; + echo "<SELECT SIZE=15 NAME=status[] multiple>\n"; + $o=0; + while ($statuses_to_print > $o) + { + if (ereg("\|$LISTstatus[$o]\|",$list_string)) + {echo "<option selected value=\"$LISTstatus[$o]\">$LISTstatus[$o]</option>\n";} + else + {echo "<option value=\"$LISTstatus[$o]\">$LISTstatus[$o]</option>\n";} + $o++; + } + echo "</SELECT>\n"; + echo "</TD><TD ALIGN=LEFT VALIGN=TOP ROWSPAN=3>\n"; + echo "<font class=\"select_bold\"><B>User Groups:</B></font><BR><CENTER>\n"; + echo "<SELECT SIZE=15 NAME=user_group[] multiple>\n"; + $o=0; + while ($user_groups_to_print > $o) + { + if (ereg("\|$LISTuser_groups[$o]\|",$user_group_string)) + {echo "<option selected value=\"$LISTuser_groups[$o]\">$LISTuser_groups[$o]</option>\n";} + else + {echo "<option value=\"$LISTuser_groups[$o]\">$LISTuser_groups[$o]</option>\n";} + $o++; + } + echo "</SELECT>\n"; + + echo "</TD></TR><TR></TD><TD ALIGN=LEFT VALIGN=TOP COLSPAN=2>\n"; + + echo "</TD></TR><TR></TD><TD ALIGN=LEFT VALIGN=TOP COLSPAN=3>\n"; + echo "<INPUT TYPE=SUBMIT NAME=SUBMIT VALUE=SUBMIT>\n"; + echo "</TD></TR></TABLE>\n"; + echo "</FORM>\n\n"; + + } +exit; + +?> \ No newline at end of file diff --git a/agc_2-X/trunk/www/vicidial/fcstats.php b/agc_2-X/trunk/www/vicidial/fcstats.php index 6fde8967..99880305 100644 --- a/agc_2-X/trunk/www/vicidial/fcstats.php +++ b/agc_2-X/trunk/www/vicidial/fcstats.php @@ -1,8 +1,8 @@ <? -### fcstats.php -### -### Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2 -### +# fcstats.php +# +# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2 +# # CHANGES # # 70813-1526 - First Build @@ -10,6 +10,7 @@ # 71217-1128 - Changed method for calculating stats # 71228-1140 - added percentages, cross-day start/stop # 80328-1139 - adapted for basic fronter/closer stats +# 90310-2132 - Added admin header # require("dbconnect.php"); @@ -81,7 +82,14 @@ while ($i < $groups_to_print) <? echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n"; -echo "<TITLE>VICIDIAL: In-Group Fronter-Closer Stats\n"; +echo "VICIDIAL: In-Group Fronter-Closer Stats\n"; + + $short_header=1; + + require("admin_header.php"); + +echo "
    "; + echo "\n"; echo "\n"; echo "
    diff --git a/agc_2-X/trunk/www/vicidial/group_hourly_stats.php b/agc_2-X/trunk/www/vicidial/group_hourly_stats.php index 9d7340b2..4c2086c1 100644 --- a/agc_2-X/trunk/www/vicidial/group_hourly_stats.php +++ b/agc_2-X/trunk/www/vicidial/group_hourly_stats.php @@ -1,12 +1,13 @@ LICENSE: AGPLv2 +# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 # # CHANGES # # 60620-1014 - Added variable filtering to eliminate SQL injection attack threat # - Added required user/pass to gain access to this page +# 90310-2138 - Added admin header # require("dbconnect.php"); @@ -104,14 +105,35 @@ $browser = getenv("HTTP_USER_AGENT"); ?> -VICIDIAL ADMIN: Group Hourly Stats + +VICIDIAL ADMIN: Group Hourly Stats <? -echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n"; + +##### BEGIN Set variables to make header show properly ##### +$ADD = '311111'; +$hh = 'usergroups'; +$LOGast_admin_access = '1'; +$ADMIN = 'admin.php'; +$page_width='770'; +$section_width='750'; +$header_font_size='3'; +$subheader_font_size='2'; +$subcamp_font_size='2'; +$header_selected_bold='<b>'; +$header_nonselected_bold=''; +$usergroups_color = '#FFFF99'; +$usergroups_font = 'BLACK'; +$usergroups_color = '#E6E6E6'; +$subcamp_color = '#C6C6C6'; +##### END Set variables to make header show properly ##### + +require("admin_header.php"); + ?> -</head> -<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0> + + <CENTER> -<TABLE WIDTH=620 BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0><TR BGCOLOR=#015B91><TD ALIGN=LEFT><? echo "<a href=\"./admin.php?ADD=100000\">" ?><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>   VICIDIAL ADMIN</a>: Group Hourly Stats <? echo $group ?></TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><? echo date("l F j, Y G:i:s A") ?>   </TD></TR> +<TABLE WIDTH=620 BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0><TR BGCOLOR=#015B91><TD ALIGN=LEFT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>   Group Hourly Stats <? echo $group ?></TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>   </TD></TR> @@ -234,7 +256,7 @@ echo "<font size=0>\n\n\n<br><br><br>\nscript runtime: $RUNtime seconds</font>"; ?> -</TD></TR><TABLE> +</TD></TR></TABLE> </body> </html> diff --git a/agc_2-X/trunk/www/vicidial/list_download.php b/agc_2-X/trunk/www/vicidial/list_download.php index 78ecd940..acd472d6 100644 --- a/agc_2-X/trunk/www/vicidial/list_download.php +++ b/agc_2-X/trunk/www/vicidial/list_download.php @@ -80,6 +80,7 @@ if ($leads_count < 1) $US='_'; $MT[0]=''; +$ip = getenv("REMOTE_ADDR"); $NOW_DATE = date("Y-m-d"); $NOW_TIME = date("Y-m-d H:i:s"); $FILE_TIME = date("Ymd-His"); @@ -88,6 +89,14 @@ if (!isset($group)) {$group = '';} if (!isset($query_date)) {$query_date = $NOW_DATE;} if (!isset($end_date)) {$end_date = $NOW_DATE;} +### LOG INSERTION Admin Log Table ### +$SQL_log = "$stmt|$stmtA|"; +$SQL_log = ereg_replace(';','',$SQL_log); +$SQL_log = addslashes($SQL_log); +$stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LEADS', event_type='EXPORT', record_id='$list_id', event_code='ADMIN EXPORT LIST', event_sql=\"$SQL_log\", event_notes='';"; +if ($DB) {echo "|$stmt|\n";} +$rslt=mysql_query($stmt, $link); + $TXTfilename = "LIST_$list_id$US$FILE_TIME.txt"; diff --git a/agc_2-X/trunk/www/vicidial/new_listloader_superL.php b/agc_2-X/trunk/www/vicidial/new_listloader_superL.php index 3bb8d33a..32cf6850 100644 --- a/agc_2-X/trunk/www/vicidial/new_listloader_superL.php +++ b/agc_2-X/trunk/www/vicidial/new_listloader_superL.php @@ -24,11 +24,12 @@ # 80713-0023 - added last_local_call_time field default of 2008-01-01 # 81011-2009 - a few bug fixes # 90309-1831 - Added admin_log logging +# 90310-2128 - Added admin header # # make sure vicidial_list exists and that your file follows the formatting correctly. This page does not dedupe or do any other lead filtering actions yet at this time. -$version = '2.0.5-28'; -$build = '90309-1831'; +$version = '2.0.5-29'; +$build = '90310-2128'; require("dbconnect.php"); @@ -318,7 +319,17 @@ function ParseFileName() { </script> <title>VICIDIAL ADMIN: Lead Loader - + + +
    "; +?> + + method=post onSubmit="ParseFileName()" enctype="multipart/form-data"> @@ -2040,3 +2051,4 @@ return $gmt_offset; } ?> +
    diff --git a/agc_2-X/trunk/www/vicidial/timeclock_edit.php b/agc_2-X/trunk/www/vicidial/timeclock_edit.php index 2fd85539..ae4508bf 100644 --- a/agc_2-X/trunk/www/vicidial/timeclock_edit.php +++ b/agc_2-X/trunk/www/vicidial/timeclock_edit.php @@ -1,12 +1,13 @@ LICENSE: AGPLv2 +# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 # # CHANGES # # 80624-1342 - First build # 80701-1323 - functional beta version done +# 90310-2109 - Added admin header # header ("Content-type: text/html; charset=utf-8"); @@ -213,89 +214,36 @@ $browser = getenv("HTTP_USER_AGENT"); ?> + VICIDIAL ADMIN: Timeclock Record Edit <? -echo "\n"; -echo "\n"; -echo " - -
    - +
    " ?>   VICIDIAL ADMIN: Timeclock Record Edit for  
    LICENSE: AGPLv2 +# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 # # CHANGES # # 80529-0055 - First build # 80617-1416 - Fixed totals tally bug # 80707-0754 - Fixed groups bug, changed formatting +# 90310-2059 - Added admin header # require("dbconnect.php"); @@ -133,11 +134,32 @@ while ($i < $user_groups_to_print) -VICIDIAL: User Timeclock Report - - +VICIDIAL: User Timeclock Report <? + +##### BEGIN Set variables to make header show properly ##### +$ADD = '311111'; +$hh = 'usergroups'; +$LOGast_admin_access = '1'; +$ADMIN = 'admin.php'; +$page_width='770'; +$section_width='750'; +$header_font_size='3'; +$subheader_font_size='2'; +$subcamp_font_size='2'; +$header_selected_bold='<b>'; +$header_nonselected_bold=''; +$usergroups_color = '#FFFF99'; +$usergroups_font = 'BLACK'; +$usergroups_color = '#E6E6E6'; +$subcamp_color = '#C6C6C6'; +##### END Set variables to make header show properly ##### + +require("admin_header.php"); + + + $user_group_ct = count($user_group); $user_group_string='|'; diff --git a/agc_2-X/trunk/www/vicidial/timeclock_status.php b/agc_2-X/trunk/www/vicidial/timeclock_status.php index 9e6725b3..7876b189 100644 --- a/agc_2-X/trunk/www/vicidial/timeclock_status.php +++ b/agc_2-X/trunk/www/vicidial/timeclock_status.php @@ -1,12 +1,13 @@ <? # timeclock_status.php # -# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2 +# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2 # # CHANGES # # 80602-0201 - First Build # 80603-1500 - formatting changes +# 90310-2103 - Added admin header # header ("Content-type: text/html; charset=utf-8"); @@ -139,20 +140,41 @@ if (strlen($user_group) > 0) ?> <html> <head> -<title>VICIDIAL ADMIN: Timeclock Status + +VICIDIAL ADMIN: Timeclock Status <? -echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n"; + +##### BEGIN Set variables to make header show properly ##### +$ADD = '311111'; +$hh = 'usergroups'; +$LOGast_admin_access = '1'; +$ADMIN = 'admin.php'; +$page_width='770'; +$section_width='750'; +$header_font_size='3'; +$subheader_font_size='2'; +$subcamp_font_size='2'; +$header_selected_bold='<b>'; +$header_nonselected_bold=''; +$usergroups_color = '#FFFF99'; +$usergroups_font = 'BLACK'; +$usergroups_color = '#E6E6E6'; +$subcamp_color = '#C6C6C6'; +##### END Set variables to make header show properly ##### + +require("admin_header.php"); + + + ?> -</head> -<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0> <CENTER> <TABLE WIDTH=750 BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0><TR BGCOLOR=#015B91><TD ALIGN=LEFT> +<FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>Timeclock Status for <? echo $user_group ?></TD><TD ALIGN=RIGHT>             <? -echo "<a href=\"./admin.php\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=WHITE SIZE=2><B>VICIDIAL ADMIN</a> | "; echo "<a href=\"./timeclock_report.php\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=WHITE SIZE=2><B>TIMECLOCK REPORT</a> | "; echo "<a href=\"./admin.php?ADD=311111&user_group=$user_group\"><FONT FACE=\"ARIAL,HELVETICA\" COLOR=WHITE SIZE=2><B>USER GROUP</a>\n"; ?> -<BR>Timeclock Status for <? echo $user_group ?></TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><? echo date("l F j, Y G:i:s A") ?>   </TD></TR> +</TD></TR> diff --git a/agc_2-X/trunk/www/vicidial/user_group_bulk_change.php b/agc_2-X/trunk/www/vicidial/user_group_bulk_change.php index 58090e1f..69ba1be8 100644 --- a/agc_2-X/trunk/www/vicidial/user_group_bulk_change.php +++ b/agc_2-X/trunk/www/vicidial/user_group_bulk_change.php @@ -6,6 +6,7 @@ # CHANGES # 81119-0918 - First build # 90309-1830 - Added admin_log logging +# 90310-2144 - Added admin header # header ("Content-type: text/html; charset=utf-8"); @@ -119,14 +120,37 @@ while ($i < $groups_to_print) ?> <html> <head> -<title>VICIDIAL ADMIN: User Group Bulk Change + +VICIDIAL ADMIN: User Group Bulk Change <? -echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n"; + +##### BEGIN Set variables to make header show properly ##### +$ADD = '311111'; +$hh = 'usergroups'; +$LOGast_admin_access = '1'; +$ADMIN = 'admin.php'; +$page_width='770'; +$section_width='750'; +$header_font_size='3'; +$subheader_font_size='2'; +$subcamp_font_size='2'; +$header_selected_bold='<b>'; +$header_nonselected_bold=''; +$usergroups_color = '#FFFF99'; +$usergroups_font = 'BLACK'; +$usergroups_color = '#E6E6E6'; +$subcamp_color = '#C6C6C6'; +##### END Set variables to make header show properly ##### + +require("admin_header.php"); + + + + ?> -</head> -<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0> + <CENTER> -<TABLE WIDTH=620 BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0><TR BGCOLOR=#015B91><TD ALIGN=LEFT><? echo "<a href=\"./admin.php?ADD=100000\">" ?><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>   VICIDIAL ADMIN</a>: User Group Bulk Change</TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><? echo date("l F j, Y G:i:s A") ?>   </TD></TR> +<TABLE WIDTH=620 BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0><TR BGCOLOR=#015B91><TD ALIGN=LEFT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>   User Group Bulk Change</TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>   </TD></TR> diff --git a/agc_2-X/trunk/www/vicidial/user_stats.php b/agc_2-X/trunk/www/vicidial/user_stats.php index 9911d4e9..9d997613 100644 --- a/agc_2-X/trunk/www/vicidial/user_stats.php +++ b/agc_2-X/trunk/www/vicidial/user_stats.php @@ -16,6 +16,7 @@ # 81210-1634 - Added server recording display options # 90208-0504 - Added link to multi-day report and fixed call status summary section # 90305-1226 - Added user_call_log manual dial logs +# 90310-0734 - Added admin header # header ("Content-type: text/html; charset=utf-8"); @@ -75,6 +76,7 @@ $browser = getenv("HTTP_USER_AGENT"); $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGfullname=$row[0]; + fwrite ($fp, "VICIDIAL|GOOD|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|$LOGfullname|\n"); fclose($fp); } @@ -82,6 +84,8 @@ $browser = getenv("HTTP_USER_AGENT"); { fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); fclose($fp); + echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; + exit; } $stmt="SELECT full_name from vicidial_users where user='$user';"; @@ -97,14 +101,35 @@ $browser = getenv("HTTP_USER_AGENT"); ?> <html> <head> -<title>VICIDIAL ADMIN: User Stats + +VICIDIAL ADMIN: User Stats <? -echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n"; + + +##### BEGIN Set variables to make header show properly ##### +$ADD = '3'; +$hh = 'users'; +$LOGast_admin_access = '1'; +$ADMIN = 'admin.php'; +$page_width='770'; +$section_width='750'; +$header_font_size='3'; +$subheader_font_size='2'; +$subcamp_font_size='2'; +$header_selected_bold='<b>'; +$header_nonselected_bold=''; +$users_color = '#FFFF99'; +$users_font = 'BLACK'; +$users_color = '#E6E6E6'; +$subcamp_color = '#C6C6C6'; +##### END Set variables to make header show properly ##### + +require("admin_header.php"); + + + ?> -</head> -<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0> -<CENTER> -<TABLE WIDTH=770 BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0><TR BGCOLOR=#015B91><TD ALIGN=LEFT><? echo "<a href=\"./admin.php\">" ?><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>   VICIDIAL ADMIN</a>: User Stats for <? echo $user ?></TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><? echo date("l F j, Y G:i:s A") ?>   </TD></TR> +<TABLE WIDTH=770 BGCOLOR=#E6E6E6 cellpadding=2 cellspacing=0><TR BGCOLOR=#E6E6E6><TD ALIGN=LEFT><FONT FACE="ARIAL,HELVETICA" SIZE=2><B>   User Stats for <? echo $user ?></TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" SIZE=2>   </TD></TR> @@ -114,10 +139,13 @@ echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n" echo "<TR BGCOLOR=\"#F0F5FE\"><TD ALIGN=LEFT COLSPAN=2><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2><B>   \n"; echo "<form action=$PHP_SELF method=POST>\n"; -echo "<input type=hidden name=user value=\"$user\">\n"; echo "<input type=hidden name=DB value=\"$DB\">\n"; echo "<input type=text name=begin_date value=\"$begin_date\" size=10 maxsize=10> to \n"; echo "<input type=text name=end_date value=\"$end_date\" size=10 maxsize=10>  \n"; +if (strlen($user)>1) + {echo "<input type=hidden name=user value=\"$user\">\n";} +else + {echo "<input type=text name=user size=12 maxlength=10>\n";} echo "<input type=submit name=submit value=submit>\n"; diff --git a/agc_2-X/trunk/www/vicidial/user_status.php b/agc_2-X/trunk/www/vicidial/user_status.php index 728bcb11..ea20ef2f 100644 --- a/agc_2-X/trunk/www/vicidial/user_status.php +++ b/agc_2-X/trunk/www/vicidial/user_status.php @@ -9,6 +9,7 @@ # 80603-1452 - Added manager timeclock force login/logout of user # 81118-1034 - Disabled change campaign because it does not work # 90208-0511 - Added link to user multi-day status report +# 90310-0741 - Added admin header # header ("Content-type: text/html; charset=utf-8"); @@ -104,6 +105,8 @@ $browser = getenv("HTTP_USER_AGENT"); { fwrite ($fp, "VICIDIAL|FAIL|$date|$PHP_AUTH_USER|$PHP_AUTH_PW|$ip|$browser|\n"); fclose($fp); + echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n"; + exit; } } @@ -163,14 +166,35 @@ while ($i < $groups_to_print) ?> <html> <head> -<title>VICIDIAL ADMIN: User Status + +VICIDIAL ADMIN: User Status <? -echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n"; + + +##### BEGIN Set variables to make header show properly ##### +$ADD = '3'; +$hh = 'users'; +$LOGast_admin_access = '1'; +$ADMIN = 'admin.php'; +$page_width='770'; +$section_width='750'; +$header_font_size='3'; +$subheader_font_size='2'; +$subcamp_font_size='2'; +$header_selected_bold='<b>'; +$header_nonselected_bold=''; +$users_color = '#FFFF99'; +$users_font = 'BLACK'; +$users_color = '#E6E6E6'; +$subcamp_color = '#C6C6C6'; +##### END Set variables to make header show properly ##### + +require("admin_header.php"); + + + ?> -</head> -<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0> -<CENTER> -<TABLE WIDTH=720 BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0><TR BGCOLOR=#015B91><TD ALIGN=LEFT><? echo "<a href=\"./admin.php\">" ?><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B>   VICIDIAL ADMIN</a>: User Status for <? echo $user ?></TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" COLOR=WHITE SIZE=2><B><? echo date("l F j, Y G:i:s A") ?>   </TD></TR> +<TABLE WIDTH=<? echo $page_width ?> BGCOLOR=#E6E6E6 cellpadding=2 cellspacing=0><TR BGCOLOR=#E6E6E6><TD ALIGN=LEFT><FONT FACE="ARIAL,HELVETICA" SIZE=2><B>   User Status for <? echo $user ?></TD><TD ALIGN=RIGHT><FONT FACE="ARIAL,HELVETICA" SIZE=2><B>   </TD></TR> diff --git a/agc_2-X/trunk/www/vicidial/vicidial_admin_web_logo_small.gif b/agc_2-X/trunk/www/vicidial/vicidial_admin_web_logo_small.gif new file mode 100644 index 00000000..95738d49 Binary files /dev/null and b/agc_2-X/trunk/www/vicidial/vicidial_admin_web_logo_small.gif differ diff --git a/agc_2-X/trunk/www/vicidial/vicidial_sales_viewer.php b/agc_2-X/trunk/www/vicidial/vicidial_sales_viewer.php index 3f87d60d..21e65a96 100644 --- a/agc_2-X/trunk/www/vicidial/vicidial_sales_viewer.php +++ b/agc_2-X/trunk/www/vicidial/vicidial_sales_viewer.php @@ -3,9 +3,12 @@ # vicidial_sales_viewer.php - VICIDIAL administration page # # -# Copyright (C) 2008 Joe Johnson,Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2 +# Copyright (C) 2009 Joe Johnson,Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2 +# +# CHANGES +# 80310-1500 - first build +# 90310-2135 - Added admin header # - if (isset($_GET["dcampaign"])) {$dcampaign=$_GET["dcampaign"];} elseif (isset($_POST["dcampaign"])) {$dcampaign=$_POST["dcampaign"];} @@ -49,7 +52,16 @@ function GatherListIDs() { return true; } </script> -<body> +<body bgcolor=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0> + +<? + $short_header=1; + + require("admin_header.php"); + +echo "<TABLE CELLPADDING=4 CELLSPACING=0><TR><TD>"; +?> + <form action="<?=$PHP_SELF ?>" method=post onSubmit="return GatherListIDs()"> <input type="hidden" name="list_ids"> <table border=0 cellpadding=5 cellspacing=0 align=center width=600> @@ -216,6 +228,9 @@ if ($submit_report && $list_ids) { print "</tr></table>"; } ?> + +</TD></TR></TABLE> + </body> </html>
    Timeclock Record Edit for