From d189fd08fbdc3fe3504dc77daa57956df5ec0f4e Mon Sep 17 00:00:00 2001 From: mattf Date: Fri, 7 Apr 2023 22:42:50 +0000 Subject: [PATCH] Added VERM report links to main admin Reports page Fix for input variable filter issue Added include_sales_in_TPD_report option in Team Performance Detail report git-svn-id: svn://192.168.202.10@3703 3d104415-ff17-0410-8863-d5cf3c621b8a --- www/agc/vicidial.php | 6 ++++-- www/vicidial/AST_team_performance_detail.php | 10 ++++++++-- www/vicidial/admin.php | 17 +++++++++-------- www/vicidial/options-example.php | 5 ++++- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/www/agc/vicidial.php b/www/agc/vicidial.php index 35c7b957..4bf8a82a 100644 --- a/www/agc/vicidial.php +++ b/www/agc/vicidial.php @@ -714,10 +714,11 @@ # 230304-0806 - Fix for AgentHangupCallRoute on ringing calls # 230306-1335 - Added 20Hz_tone browser sound, Issue #1448 # 230306-2034 - Added setTimeoutAudioLoop agent_screen_timer option, Issue #1448 +# 230407-1839 - Fix for input variable filter issue # -$version = '2.14-682c'; -$build = '230306-2034'; +$version = '2.14-683c'; +$build = '230407-1839'; $php_script = 'vicidial.php'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=98; @@ -792,6 +793,7 @@ if (!isset($flag_channels)) } $DB=preg_replace("/[^0-9a-z]/","",$DB); +$VD_login = preg_replace('/[^-_0-9\p{L}]/u','',$VD_login); $forever_stop=0; diff --git a/www/vicidial/AST_team_performance_detail.php b/www/vicidial/AST_team_performance_detail.php index 9908bfd3..fd2f1894 100644 --- a/www/vicidial/AST_team_performance_detail.php +++ b/www/vicidial/AST_team_performance_detail.php @@ -6,7 +6,7 @@ # QC statuses of QCFAIL, QCCANC and sales are defined by the Sale=Y status # flags being set on those statuses. # -# Copyright (C) 2022 Joe Johnson, Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2023 Joe Johnson, Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -36,6 +36,7 @@ # 200917-1720 - Modified for sale counts to be campaign-specific # 210222-1508 - Added option to show all users # 220301-2155 - Added allow_web_debug system setting +# 230407-1039 - Added include_sales_in_TPD_report option # $startMS = microtime(); @@ -116,6 +117,11 @@ if (strlen($report_display_type)<2) {$report_display_type = $SSreport_default_fo ##### END SETTINGS LOOKUP ##### ########################################### +if (file_exists('options.php')) + { + require('options.php'); + } + $query_date_D = preg_replace('/[^- \:\_0-9a-zA-Z]/', '', $query_date_D); $query_date_T = preg_replace('/[^- \:\_0-9a-zA-Z]/', '', $query_date_T); $end_date_D = preg_replace('/[^- \:\_0-9a-zA-Z]/', '', $end_date_D); @@ -385,7 +391,7 @@ if (preg_match("/--NONE--/", $call_status_string)) $call_status_ct=0; } -$stmt="select distinct status, status_name from vicidial_statuses where sale!='Y' UNION select distinct status, status_name from vicidial_campaign_statuses where sale!='Y' $LOGallowed_campaignsSQL order by status, status_name;"; +$stmt="select distinct status, status_name from vicidial_statuses ".(!$include_sales_in_TPD_report ? "where sale!='Y'" : "")." UNION select distinct status, status_name from vicidial_campaign_statuses ".(!$include_sales_in_TPD_report ? "where sale!='Y'" : "")." $LOGallowed_campaignsSQL order by status, status_name;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {$HTML_text.="$stmt\n";} $call_statuses_to_print = mysqli_num_rows($rslt); diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index a718b582..30ce2933 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -5989,12 +5989,13 @@ if ($SSscript_remove_js > 0) # 230306-2050 - Added setTimeoutAudioLoop agent_screen_timer option, Issue #1448 # 230311-0859 - Added abandon_check_queue system setting, ara_url server option and show_confetti campaign feature # 230312-2212 - Fix for webphone_settings issue #1451 +# 230407-1038 - Added VERM report links to main admin Reports page # # 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-878a'; -$build = '230312-2212'; +$admin_version = '2.14-879a'; +$build = '230407-1038'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -48310,8 +48311,8 @@ if ($ADD==999999) echo ""._QXZ("Real-Time Reports")."
\n"; echo "
\n"; echo ""._QXZ("Inbound and Outbound Calling Reports")."
\n"; echo "
    \n"; - # if ( (preg_match("/VERM Reports/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) - # {echo "
  • "._QXZ("VERM - Enhanced Reporting Module")."\n";} + if ( (preg_match("/VERM Reports/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) + {echo "
  • "._QXZ("VERM - Enhanced Reporting Module")."\n";} if ( (preg_match("/Inbound Report/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
  • "._QXZ("Inbound Report")." - "._QXZ("v2")."\n";} if ( (preg_match("/Inbound Report by DID/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) @@ -48409,8 +48410,8 @@ if ($ADD==999999) echo "\n"; echo ""._QXZ("Agent Reports")."
    \n"; echo "
      \n"; - # if ( (preg_match("/VERM Reports/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) - # {echo "
    • "._QXZ("VERM - Enhanced Reporting Module")."\n";} + if ( (preg_match("/VERM Reports/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) + {echo "
    • "._QXZ("VERM - Enhanced Reporting Module")."\n";} if ( (preg_match("/Agent Time Detail/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) {echo "
    • "._QXZ("Agent Time Detail")."\n";} if ( (preg_match("/Agent Status Detail/",$LOGallowed_reports)) or (preg_match("/ALL REPORTS/",$LOGallowed_reports)) ) diff --git a/www/vicidial/options-example.php b/www/vicidial/options-example.php index 7ad0692f..41edd21d 100644 --- a/www/vicidial/options-example.php +++ b/www/vicidial/options-example.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2023 Matt Florell LICENSE: AGPLv2 # # rename this file to options.php for the settings here to go into effect # @@ -34,6 +34,7 @@ # 210625-1425 - Added RS_BargeSwap option for blind monitoring # 211022-0733 - Added IR_SLA_all_statuses option for Inbound Reports # 220120-0926 - Added audio_store_GSM_allowed option for the Audio Store +# 230407-1040 - Added include_sales_in_TPD_report option # # used by the realtime_report.php script @@ -139,6 +140,8 @@ $IR_SLA_all_statuses=0; # Allow GSM audio files to be manually uploaded to the Audio Store $audio_store_GSM_allowed=0; +# Include sale statuses in Team Performance Detail report +$include_sales_in_TPD_report=0; # CORS settings: (to enable, customize the variables below, and uncomment the "require_once('adminCORS.php');" line at the bottom) # (NOTE: The first 3 variables must be set for these features to be active)