";
+ $CSV_output["inclusive_sla_per_day"].=",\"".sprintf("%.1f", (MathZDC((100*$svc_lvl_row[$f]), $answered_calls)))." %\"";
}
$HTML_output.="\n";
diff --git a/www/VERM/VERM_DOW_rpt.inc b/www/VERM/VERM_DOW_rpt.inc
index 451fb35b..56d1cf20 100644
--- a/www/VERM/VERM_DOW_rpt.inc
+++ b/www/VERM/VERM_DOW_rpt.inc
@@ -1,10 +1,11 @@
, Joe Johnson LICENSE: AGPLv2
+# Copyright (C) 2024 Matt Florell , Joe Johnson LICENSE: AGPLv2
#
# CHANGELOG:
# 220825-1623 - First build
+# 240801-1130 - Code updates for PHP8 compatibility
#
# NANQUE, not an unanswered call?
@@ -114,7 +115,7 @@ for ($q=0; $q<=6; $q++)
$user_array["$key"]=array();
}
-$stmt="select dayname(call_date) as cdate, dayofweek(call_date) as day_no, campaign_id, status, user, length_in_sec as call_length, uniqueid, '0' as wait_sec, 'O' as direction, '1' as queue_position, lead_id from vicidial_log $vicidial_log_SQL $and_NANQUE_clause $exc_addtl_statuses UNION ALL select dayname(call_date) as cdate, dayofweek(call_date) as day_no, campaign_id, status, user, if(comments='EMAIL', length_in_sec, length_in_sec-queue_seconds) as call_length, uniqueid, queue_seconds as wait_sec, 'I' as direction, queue_position, lead_id from vicidial_closer_log $vicidial_closer_log_SQL $and_NANQUE_clause $exc_addtl_statuses order by day_no";
+$stmt="select dayname(call_date) as cdate, dayofweek(call_date) as day_no, campaign_id, status, user, length_in_sec as call_length, uniqueid, '0' as wait_sec, 'O' as direction, '1' as queue_position, lead_id from vicidial_log $vicidial_log_SQL $and_NANQUE_clause $exc_addtl_statuses UNION ALL select dayname(call_date) as cdate, dayofweek(call_date) as day_no, campaign_id, status, user, if(comments='EMAIL', length_in_sec, length_in_sec-queue_seconds) as call_length, uniqueid, if(comments='EMAIL', '0', queue_seconds) as wait_sec, 'I' as direction, queue_position, lead_id from vicidial_closer_log $vicidial_closer_log_SQL $and_NANQUE_clause $exc_addtl_statuses order by day_no";
if ($DB) {$HTML_output.="$stmt";}
# print $stmt."\n";
$rslt=mysql_to_mysqli($stmt, $link);
@@ -233,17 +234,17 @@ while ($row=mysqli_fetch_array($rslt))
### These counts are in here because by definition these SHOULD be answers, but you never know with some morons.
### "Real" campaign_id should have been gotten under the direction clause above
- if (in_array($status, $sale_array["$campaign_id"]) || in_array($status, $sale_array["SYSTEM"]))
+ if ((array_key_exists("$campaign_id", $sale_array) && in_array($status, $sale_array["$campaign_id"])) || in_array($status, $sale_array["SYSTEM"]))
{
$calls_array["$call_date"]["sales"]++;
$total_sales++;
}
- if (in_array($status, $human_ans_array["$campaign_id"]) || in_array($status, $human_ans_array["SYSTEM"]))
+ if ((array_key_exists("$campaign_id", $human_ans_array) && in_array($status, $human_ans_array["$campaign_id"])) || in_array($status, $human_ans_array["SYSTEM"]))
{
$calls_array["$call_date"]["human_answered"]++;
$total_human_answered++;
}
- if (in_array($status, $contact_array["$campaign_id"]) || in_array($status, $contact_array["SYSTEM"]))
+ if ((array_key_exists("$campaign_id", $contact_array) && in_array($status, $contact_array["$campaign_id"])) || in_array($status, $contact_array["SYSTEM"]))
{
$calls_array["$call_date"]["customer_contacts"]++;
$total_customer_contacts++;
@@ -274,7 +275,7 @@ while ($row=mysqli_fetch_array($rslt))
# Queue array
$queue_array["$call_date"]["total_calls"]++;
$queue_array["$call_date"]["total_queue"]+=$queue_position;
- $queue_array["$call_date"]["avg_position"]=($queue_array["$call_date"]["total_queue"]/$queue_array["$call_date"]["total_calls"]);
+ $queue_array["$call_date"]["avg_position"]=(MathZDC($queue_array["$call_date"]["total_queue"], $queue_array["$call_date"]["total_calls"]));
# Min/max queue
if (!$queue_array["$call_date"]["min_queue_position"] || $queue_position<$queue_array["$call_date"]["min_queue_position"])
{
@@ -332,21 +333,23 @@ foreach ($answered_calls_array as $call_date_key => $call_date_data)
$avg_call_length=round(MathZDC($answered_calls_array["$call_date_key"]["total_length"], $total_date_calls_answered));
$avg_call_length_fmt=($avg_call_length>=3600 ? floor($avg_call_length/3600).":" : "").gmdate("i:s", $avg_call_length);
+ $answered_calls_array["$call_date_key"]["min_call_length"]+=0;
+ $answered_calls_array["$call_date_key"]["max_call_length"]+=0;
$min_call_length_fmt=($answered_calls_array["$call_date_key"]["min_call_length"]>=3600 ? floor($answered_calls_array["$call_date_key"]["min_call_length"]/3600).":" : "").gmdate("i:s", $answered_calls_array["$call_date_key"]["min_call_length"]);
$max_call_length_fmt=($answered_calls_array["$call_date_key"]["max_call_length"]>=3600 ? floor($answered_calls_array["$call_date_key"]["max_call_length"]/3600).":" : "").gmdate("i:s", $answered_calls_array["$call_date_key"]["max_call_length"]);
$HTML_output.="
";
- $CSV_output["answered_service_level_agreement"].="\"$int_name "._QXZ("seconds").":\",\"$sum\",\"$delta\",\"".sprintf("%.1f", ((100*$sum)/$answered_inbound_calls))." %\",\"".sprintf("%.1f", ((100*$sum)/$total_inbound_calls))." %\"\n";
+ $CSV_output["answered_service_level_agreement"].="\"$int_name "._QXZ("seconds").":\",\"$sum\",\"$delta\",\"".sprintf("%.1f", (MathZDC((100*$sum), $answered_inbound_calls)))." %\",\"".sprintf("%.1f", (MathZDC((100*$sum), $total_inbound_calls)))." %\"\n";
$answered_service_level_agreement_graph_labels.="\"$int_name\",";
$answered_service_level_agreement_graph_delta_data.="\"".($prev_int ? ($sum-$prev_int) : "0")."\",";
$answered_service_level_agreement_graph_delta_bgcolor.="\"#33CCCC\",";
$answered_service_level_agreement_graph_delta_hovborder.="\"#66FFFF\",";
- $answered_service_level_agreement_graph_percent_data.="\"".sprintf("%.1f", ((100*$sum)/$answered_inbound_calls))."\",";
+ $answered_service_level_agreement_graph_percent_data.="\"".sprintf("%.1f", (MathZDC((100*$sum), $answered_inbound_calls)))."\",";
$answered_service_level_agreement_graph_percent_bgcolor.="\"#FFCC66\",";
$answered_service_level_agreement_graph_percent_hovborder.="\"#FFFF99\",";
diff --git a/www/VERM/VERM_admin.php b/www/VERM/VERM_admin.php
index 6fc739aa..b9f0f291 100644
--- a/www/VERM/VERM_admin.php
+++ b/www/VERM/VERM_admin.php
@@ -1,10 +1,11 @@
, Joe Johnson LICENSE: AGPLv2
+# Copyright (C) 2024 Matt Florell , Joe Johnson LICENSE: AGPLv2
#
# CHANGELOG:
# 220825-1609 - First build
+# 240801-1130 - Code updates for PHP8 compatibility
#
@@ -75,8 +76,9 @@ if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];}
if ( (strlen($group)>1) and (strlen($groups[0])<1) ) {$groups[0] = $group;}
else {$group = $groups[0];}
-if (!isset($user_group_filter)) {$user_group_filter=array();}
-if (!isset($ingroup_filter)) {$ingroup_filter=array();}
+if (!is_array($groups)) {$groups=array();}
+if (!is_array($user_group_filter)) {$user_group_filter=array();}
+if (!is_array($ingroup_filter)) {$ingroup_filter=array();}
$NOW_TIME = date("Y-m-d H:i:s");
$NOW_DAY = date("Y-m-d");
@@ -394,7 +396,6 @@ $allactivecampaigns .= "''";
$i=0;
$group_string='|';
-if (!$groups) {$groups=array();}
$group_ct = count($groups);
while($i < $group_ct)
{
diff --git a/www/VERM/VERM_custom_report.php b/www/VERM/VERM_custom_report.php
index dbd95d5e..4faa326d 100644
--- a/www/VERM/VERM_custom_report.php
+++ b/www/VERM/VERM_custom_report.php
@@ -1,10 +1,11 @@
, Joe Johnson LICENSE: AGPLv2
+# Copyright (C) 2024 Matt Florell , Joe Johnson LICENSE: AGPLv2
#
# CHANGELOG:
# 220825-1606 - First build
+# 240801-1130 - Code updates for PHP8 compatibility
#
$startMS = microtime();
@@ -150,8 +151,8 @@ if (file_exists('options.php'))
if ( (strlen($group)>1) and (strlen($groups[0])<1) ) {$groups[0] = $group;}
else {$group = $groups[0];}
-if (!isset($user_group_filter) || $user_group_filter=='') {$user_group_filter=array();}
-if (!isset($ingroup_filter) || $ingroup_filter=='') {$ingroup_filter=array();}
+if (!is_array($user_group_filter) || $user_group_filter=='') {$user_group_filter=array();}
+if (!is_array($ingroup_filter) || $ingroup_filter=='') {$ingroup_filter=array();}
$NOW_TIME = date("Y-m-d H:i:s");
$NOW_DAY = date("Y-m-d");
@@ -476,7 +477,7 @@ $allactivecampaigns .= "''";
$i=0;
$group_string='|';
-if (!$groups) {$groups=array();}
+if (!is_array($groups)) {$groups=array();}
$group_ct = count($groups);
while($i < $group_ct)
{
diff --git a/www/VERM/VERM_global_vars.inc b/www/VERM/VERM_global_vars.inc
index 11e7ea26..205538a8 100644
--- a/www/VERM/VERM_global_vars.inc
+++ b/www/VERM/VERM_global_vars.inc
@@ -1,11 +1,12 @@
, Joe Johnson LICENSE: AGPLv2
+# Copyright (C) 2024 Matt Florell , Joe Johnson LICENSE: AGPLv2
#
# CHANGELOG:
# 220825-1622 - First build
# 230106-1317 - Added missing QXZ, added pull of selectable statuses, human answered statues now include DISPO and SYSTEM
+# 240801-1130 - Code updates for PHP8 compatibility
#
if (isset($_GET["start_date"])) {$start_date=$_GET["start_date"];}
@@ -278,11 +279,25 @@ while ($callmenu_row=mysqli_fetch_row($callmenu_rslt))
# Compile closer campaigns for waiting calls
$campaign_closer_names=array();
+# 7/31/24 - below arrays moved here to be declared as they need to exist for every campaign in the queue, not just ones where there are pause codes.
+# Null campaign entries for the pause code arrays will cause an error;
+$billable_pause_codes=array();
+$payable_pause_codes=array();
+$sale_array=array("SYSTEM" => array());
+$selectable_array=array("SYSTEM" => array());
+$human_ans_array=array("SYSTEM" => array());
+$contact_array=array("SYSTEM" => array());
$campaign_closer_stmt="select campaign_id, closer_campaigns from vicidial_campaigns $queueSQL_where";
$campaign_closer_rslt=mysql_to_mysqli($campaign_closer_stmt, $link);
while ($campaign_closer_row=mysqli_fetch_row($campaign_closer_rslt))
{
$campaign_closer_names["$campaign_closer_row[0]"]="$campaign_closer_row[1]";
+ $billable_pause_codes["$campaign_closer_row[0]"]=array();
+ $payable_pause_codes["$campaign_closer_row[0]"]=array();
+ $sale_array["$campaign_closer_row[0]"]=array();
+ $selectable_array["$campaign_closer_row[0]"]=array();
+ $human_ans_array["$campaign_closer_row[0]"]=array();
+ $contact_array["$campaign_closer_row[0]"]=array();
}
# Compile closer campaigns for waiting calls
@@ -303,7 +318,7 @@ while ($terminal_row=mysqli_fetch_row($terminal_rslt))
$terminal_names["$terminal_row[0]"]="$terminal_row[1]";
}
-$sale_array=array("SYSTEM" => array());
+# $sale_array=array("SYSTEM" => array());
$sale_stmt="select distinct status, 'SYSTEM' as campaign_id from vicidial_statuses where sale='Y' UNION select distinct status, campaign_id from vicidial_campaign_statuses where sale='Y'";
$sale_rslt=mysql_to_mysqli($sale_stmt, $link);
while ($sale_row=mysqli_fetch_array($sale_rslt))
@@ -312,7 +327,7 @@ while ($sale_row=mysqli_fetch_array($sale_rslt))
array_push($sale_array["$sale_row[campaign_id]"], $sale_row["status"]);
}
-$selectable_array=array("SYSTEM" => array());
+# $selectable_array=array("SYSTEM" => array());
$selectable_stmt="select distinct status, 'SYSTEM' as campaign_id from vicidial_statuses where selectable='Y' UNION select distinct status, campaign_id from vicidial_campaign_statuses where selectable='Y'";
$selectable_rslt=mysql_to_mysqli($selectable_stmt, $link);
while ($selectable_row=mysqli_fetch_array($selectable_rslt))
@@ -321,7 +336,7 @@ while ($selectable_row=mysqli_fetch_array($selectable_rslt))
array_push($selectable_array["$selectable_row[campaign_id]"], $selectable_row["status"]);
}
-$human_ans_array=array("SYSTEM" => array());
+# $human_ans_array=array("SYSTEM" => array());
$human_ans_stmt="select distinct status, 'SYSTEM' as campaign_id from vicidial_statuses where human_answered='Y' UNION select distinct status, campaign_id from vicidial_campaign_statuses where human_answered='Y' UNION select 'DISPO', 'SYSTEM'";
$human_ans_rslt=mysql_to_mysqli($human_ans_stmt, $link);
while ($human_ans_row=mysqli_fetch_array($human_ans_rslt))
@@ -330,7 +345,7 @@ while ($human_ans_row=mysqli_fetch_array($human_ans_rslt))
array_push($human_ans_array["$human_ans_row[campaign_id]"], $human_ans_row["status"]);
}
-$contact_array=array("SYSTEM" => array());
+# $contact_array=array("SYSTEM" => array());
$contact_stmt="select distinct status, 'SYSTEM' as campaign_id from vicidial_statuses where customer_contact='Y' UNION select distinct status, campaign_id from vicidial_campaign_statuses where customer_contact='Y'";
$contact_rslt=mysql_to_mysqli($contact_stmt, $link);
while ($contact_row=mysqli_fetch_array($contact_rslt))
@@ -365,8 +380,8 @@ if (mysqli_num_rows($container_rslt)>0)
$pause_code_stmt="select * from vicidial_pause_codes";
$pause_code_rslt=mysql_to_mysqli($pause_code_stmt, $link);
-$billable_pause_codes=array();
-$payable_pause_codes=array();
+# $billable_pause_codes=array();
+# $payable_pause_codes=array();
$pause_code_names=array();
while ($pause_code_row=mysqli_fetch_array($pause_code_rslt))
{
diff --git a/www/VERM/VERM_inbound_comparison_report.php b/www/VERM/VERM_inbound_comparison_report.php
index c497014c..c389dc20 100644
--- a/www/VERM/VERM_inbound_comparison_report.php
+++ b/www/VERM/VERM_inbound_comparison_report.php
@@ -2,14 +2,17 @@
# VERM_inbound_comparison_report.php
+# Copyright (C) 2024 Matt Florell , Joe Johnson LICENSE: AGPLv2
+
# changes
# 230225-1531 - First build of script
+# 240801-1139 - Code updates for PHP8 compatibility
#
$startMS = microtime();
-$version = '2.14-41';
-$build = '230225-1531';
+$version = '2.14-42';
+$build = '240801-1139';
header ("Content-type: text/html; charset=utf-8");
@@ -86,6 +89,9 @@ if ($SSallow_web_debug < 1) {$DB=0;}
# $PHP_SELF=$_SERVER['PHP_SELF'];
# $PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF);
+if(!is_array($comparison_years)) {$comparison_years=array();}
+if(!is_array($comparison_months)) {$comparison_months=array();}
+
$start_date=preg_replace('/[^-0-9]/', '', $start_date);
$end_date=preg_replace('/[^-0-9]/', '', $end_date);
$comparison_years=preg_replace('/[^0-9]/', '', $comparison_years);
@@ -393,6 +399,11 @@ if ($vicidial_queue_groups && $submit_report)
$included_inbound_groups_clause="and group_id in ('".preg_replace('/\s/', "', '", $included_inbound_groups)."')";
$where_included_inbound_groups_clause="where group_id in ('".preg_replace('/\s/', "', '", $included_inbound_groups)."')";
}
+ else
+ {
+ $included_campaigns_array=array();
+ $included_inbound_groups_array=array();
+ }
$atomic_queue_str="";
@@ -1186,8 +1197,10 @@ $HTML_output.="//-->\n";
if ($DB) {$HTML_output.="$calls_stmt";}
-$calls_rslt=mysqli_query($link, $calls_stmt);
-
+if($calls_stmt)
+ {
+ $calls_rslt=mysqli_query($link, $calls_stmt);
+ }
if (file_exists('options.php'))
diff --git a/www/VERM/VERM_main_report_page.php b/www/VERM/VERM_main_report_page.php
index 2b49c2a5..a7a38bf8 100644
--- a/www/VERM/VERM_main_report_page.php
+++ b/www/VERM/VERM_main_report_page.php
@@ -1,12 +1,13 @@
, Joe Johnson LICENSE: AGPLv2
+# Copyright (C) 2024 Matt Florell , Joe Johnson LICENSE: AGPLv2
#
# CHANGELOG:
# 220828-1402 - First build
# 230106-1332 - Added auto download variables, permissions, report logging
# 230116-1640 - Ingroup-related clauses no longer allow blank campaign_id values (double-dipping issue)
+# 240801-1130 - Code updates for PHP8 compatibility
#
# NANQUE, not an unanswered call?
@@ -566,6 +567,9 @@ if ($vicidial_queue_groups)
$included_campaigns_clause="and campaign_id in ('')";
$included_inbound_groups_clause="and group_id in ('')";
$where_included_inbound_groups_clause="where group_id in ('')";
+
+ $included_campaigns_array=array();
+ $included_inbound_groups_array=array();
}
}
else
@@ -573,6 +577,9 @@ else
$included_campaigns_clause="and campaign_id in ('')";
$included_inbound_groups_clause="and group_id in ('')";
$where_included_inbound_groups_clause="where group_id in ('')";
+
+ $included_campaigns_array=array();
+ $included_inbound_groups_array=array();
}
diff --git a/www/VERM/VERM_wallboard_widgets.php b/www/VERM/VERM_wallboard_widgets.php
index 19209e2a..2435436b 100644
--- a/www/VERM/VERM_wallboard_widgets.php
+++ b/www/VERM/VERM_wallboard_widgets.php
@@ -1,10 +1,11 @@
, Joe Johnson LICENSE: AGPLv2
+# Copyright (C) 2024 Matt Florell , Joe Johnson LICENSE: AGPLv2
#
# CHANGELOG:
# 220825-1601 - First build
+# 240801-1130 - Code updates for PHP8 compatibility
#
$report_name="VERM reports";
@@ -727,9 +728,9 @@ if ($widget_type=="N_WAITING_CALLS")
}
else
{
- $waiting_clause="sum(if(status='LIVE' IN('XFER') $included_campaigns_clause), 1, 0)";
+ $waiting_clause="sum(if(status in ('LIVE', 'XFER') $included_campaigns_clause, 1, 0))";
# sum(if(status='LIVE' IN('XFER') $included_campaigns_clause), 1, 0)
- $stmtB="from vicidial_auto_calls where status='LIVE' IN('XFER') $included_campaigns_clause order by queue_priority desc,campaign_id,call_time;";
+ $stmtB="from vicidial_auto_calls where status in ('LIVE', 'XFER') $included_campaigns_clause order by queue_priority desc,campaign_id,call_time;";
}
diff --git a/www/VERM/dbconnect_mysqli.php b/www/VERM/dbconnect_mysqli.php
index 421d0b5e..3a48ed30 100644
--- a/www/VERM/dbconnect_mysqli.php
+++ b/www/VERM/dbconnect_mysqli.php
@@ -4,7 +4,7 @@
#
# database connection settings and some global web settings
#
-# Copyright (C) 2022 Matt Florell LICENSE: AGPLv2
+# Copyright (C) 2024 Matt Florell LICENSE: AGPLv2
#
# CHANGES:
# 130328-0022 - Converted ereg to preg functions
@@ -16,8 +16,26 @@
# 150626-2120 - Modified mysqli_error() to mysqli_connect_error() where appropriate
# 160325-1434 - Changes for sidebar update
# 220827-1948 - VERM version
+# 240801-1130 - Code updates for PHP8 compatibility
+# 240805-2103 - Added PHP_error_reporting_OVERRIDE options
#
+$PHP_error_reporting_OVERRIDE=0;
+if (file_exists('options.php'))
+ {
+ require('options.php');
+ }
+if ($PHP_error_reporting_OVERRIDE > 0)
+ {
+ $php_err_suppression_value=32767; # E_ALL
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_ERRORS ? 1 : 0);
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_WARNINGS ? 2 : 0);
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_PARSES ? 4 : 0);
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_NOTICES ? 8 : 0);
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_DEPRECATIONS ? 8192 : 0);
+ error_reporting($php_err_suppression_value);
+ }
+
if ( file_exists("/etc/astguiclient.conf") )
{
$DBCagc = file("/etc/astguiclient.conf");
diff --git a/www/VERM/display_agent_details.php b/www/VERM/display_agent_details.php
index f20b60f2..84bdd4af 100644
--- a/www/VERM/display_agent_details.php
+++ b/www/VERM/display_agent_details.php
@@ -1,13 +1,15 @@
, Joe Johnson LICENSE: AGPLv2
+# Copyright (C) 2024 Matt Florell , Joe Johnson LICENSE: AGPLv2
#
# CHANGELOG:
# 220825-1612 - First build
+# 240801-1130 - Code updates for PHP8 compatibility
#
$subreport_name="VERM Reports";
$report_display_type="display_agent_details.php";
+$startMS = microtime();
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
diff --git a/www/VERM/display_call_details.php b/www/VERM/display_call_details.php
index 71bdaaa1..c9d90c7e 100644
--- a/www/VERM/display_call_details.php
+++ b/www/VERM/display_call_details.php
@@ -1,11 +1,12 @@
, Joe Johnson LICENSE: AGPLv2
+# Copyright (C) 2024 Matt Florell , Joe Johnson LICENSE: AGPLv2
#
# CHANGELOG:
# 220825-1611 - First build
# 230126-1158 - Added recording log access, QXZ translation
+# 240801-1130 - Code updates for PHP8 compatibility
#
$subreport_name="VERM Reports";
$report_display_type="display_call_details.php";
@@ -318,8 +319,8 @@ $ENDtime=date("U");
$endMS = microtime();
$startMSary = explode(" ",$startMS);
$endMSary = explode(" ",$endMS);
-$runS = ($endMSary[0] - $startMSary[0]);
-$runM = ($endMSary[1] - $startMSary[1]);
+$runS = ((int)$endMSary[0] - (int)$startMSary[0]);
+$runM = ((int)$endMSary[1] - (int)$startMSary[1]);
$TOTALrun = ($runS + $runM);
$stmt="UPDATE vicidial_report_log set run_time='$TOTALrun' where report_log_id='$report_log_id';";
diff --git a/www/VERM/display_outcomes_details.php b/www/VERM/display_outcomes_details.php
index eb654b9e..525f0909 100644
--- a/www/VERM/display_outcomes_details.php
+++ b/www/VERM/display_outcomes_details.php
@@ -1,13 +1,15 @@
, Joe Johnson LICENSE: AGPLv2
+# Copyright (C) 2024 Matt Florell , Joe Johnson LICENSE: AGPLv2
#
# CHANGELOG:
# 220825-1610 - First build
+# 240801-1130 - Code updates for PHP8 compatibility
#
$subreport_name="VERM Reports";
$report_display_type="display_outcomes_details.php";
+$startMS=microtime();
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
diff --git a/www/VERM/options-example.php b/www/VERM/options-example.php
new file mode 100644
index 00000000..1a0b0d9a
--- /dev/null
+++ b/www/VERM/options-example.php
@@ -0,0 +1,19 @@
+, Joe Johnson LICENSE: AGPLv2
+#
+# rename this file to options.php for the settings here to go into effect
+#
+# CHANGELOG
+# 240802-1250 - First Build
+
+# If this option is set to 1, then the error_reporting in php.ini will be ignored and settings below will be used for this directory
+$PHP_error_reporting_OVERRIDE = 0;
+ # PHP error reporting options, set to 1 to keep the type of error from being displayed, either on-screen or to the error logs.
+$PHP_error_reporting_HIDE_ERRORS = 0; # STRONGLY advise leaving this value alone, but you do you.
+$PHP_error_reporting_HIDE_WARNINGS = 0;
+$PHP_error_reporting_HIDE_PARSES = 0;
+$PHP_error_reporting_HIDE_NOTICES = 0;
+$PHP_error_reporting_HIDE_DEPRECATIONS= 0;
+?>
diff --git a/www/agc/agentCORS.php b/www/agc/agentCORS.php
index 510f84f0..26556fe0 100644
--- a/www/agc/agentCORS.php
+++ b/www/agc/agentCORS.php
@@ -1,7 +1,7 @@
LICENSE: AGPLv2
+# Copyright (C) 2024 Matt Florell LICENSE: AGPLv2
#
# CORS settings coming from the options.php script (the first 3 variables must be set for these features to be active)
# $CORS_allowed_origin = ''; # if multiple origins allowed, separate them by a pipe (also allows PHP preg syntax)
@@ -20,15 +20,33 @@
#
# CHANGELOG
# 210616-1012 - First Build
+# 240801-1130 - Code updates for PHP8 compatibility
+# 240805-2103 - Added PHP_error_reporting_OVERRIDE options
#
+$PHP_error_reporting_OVERRIDE=0;
+if (file_exists('options.php'))
+ {
+ require('options.php');
+ }
+if ($PHP_error_reporting_OVERRIDE > 0)
+ {
+ $php_err_suppression_value=32767; # E_ALL
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_ERRORS ? 1 : 0);
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_WARNINGS ? 2 : 0);
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_PARSES ? 4 : 0);
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_NOTICES ? 8 : 0);
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_DEPRECATIONS ? 8192 : 0);
+ error_reporting($php_err_suppression_value);
+ }
+
$NOW_TIME = date("Y-m-d H:i:s");
if (strlen($php_script) < 1)
{$donothing=1;}
else
{
- $CORS_origin = $_SERVER['HTTP_ORIGIN']; # The client browser origin server
+ $CORS_origin = "$_SERVER[HTTP_ORIGIN]"; # The client browser origin server - treated as string for stripos command
$CORS_method = isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD']) ? $_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD'] : $_SERVER['REQUEST_METHOD']; # Either the requested HTTP method or the current one
$CORS_affected_scripts = " $CORS_affected_scripts "; # surround with spaces for preg match below
@@ -114,4 +132,4 @@ else
}
}
}
-?>
\ No newline at end of file
+?>
diff --git a/www/agc/dbconnect_mysqli.php b/www/agc/dbconnect_mysqli.php
index fd5d84ff..2de3bceb 100644
--- a/www/agc/dbconnect_mysqli.php
+++ b/www/agc/dbconnect_mysqli.php
@@ -4,14 +4,32 @@
#
# database connection settings and some global web settings
#
-# Copyright (C) 2013 Matt Florell LICENSE: AGPLv2
+# Copyright (C) 2024 Matt Florell LICENSE: AGPLv2
#
# CHANGES:
# 130328-0022 - Converted ereg to preg functions
# 130802-0957 - Changed to PHP mysqli functions
# 150626-2120 - Modified mysqli_error() to mysqli_connect_error() where appropriate
+# 240801-1130 - Code updates for PHP8 compatibility
+# 240805-2103 - Added PHP_error_reporting_OVERRIDE options
#
+$PHP_error_reporting_OVERRIDE=0;
+if (file_exists('options.php'))
+ {
+ require('options.php');
+ }
+if ($PHP_error_reporting_OVERRIDE > 0)
+ {
+ $php_err_suppression_value=32767; # E_ALL
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_ERRORS ? 1 : 0);
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_WARNINGS ? 2 : 0);
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_PARSES ? 4 : 0);
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_NOTICES ? 8 : 0);
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_DEPRECATIONS ? 8192 : 0);
+ error_reporting($php_err_suppression_value);
+ }
+
if ( file_exists("/etc/astguiclient.conf") )
{
$DBCagc = file("/etc/astguiclient.conf");
diff --git a/www/agc/options-example.php b/www/agc/options-example.php
index 3dfeb0bd..ab2dc5a3 100644
--- a/www/agc/options-example.php
+++ b/www/agc/options-example.php
@@ -1,7 +1,7 @@
LICENSE: AGPLv2
+# Copyright (C) 2024 Matt Florell LICENSE: AGPLv2
#
# rename this file to options.php for the settings here to go into effect
#
@@ -30,6 +30,7 @@
# 230617-0815 - Added dead_logging_version option
# 231109-0830 - Changed link_to_grey_version to disabled by default
# 231115-1610 - Added allow_vlc_lookup, default_consultative
+# 240802-1250 - Added options to customize PHP error reporting
#
$conf_silent_prefix = '5'; # vicidial_conferences prefix to enter silently and muted for recording
@@ -114,6 +115,15 @@ $INSERT_window_onload = ''; # inserted at the end of the onload function
$INSERT_agent_events = ''; # inserted within the agent_events function
$INSERT_before_body_close = ''; # inserted before each BODY close tag
+# If this option is set to 1, then the error_reporting in php.ini will be ignored and settings below will be used for this directory
+$PHP_error_reporting_OVERRIDE = 0;
+ # PHP error reporting options, set to 1 to keep the type of error from being displayed, either on-screen or to the error logs.
+$PHP_error_reporting_HIDE_ERRORS = 0; # STRONGLY advise leaving this value alone, but you do you.
+$PHP_error_reporting_HIDE_WARNINGS = 0;
+$PHP_error_reporting_HIDE_PARSES = 0;
+$PHP_error_reporting_HIDE_NOTICES = 0;
+$PHP_error_reporting_HIDE_DEPRECATIONS= 0;
+
# CORS settings: (to enable, customize the variables below, and uncomment the "require_once('agentCORS.php');" line at the bottom)
# (NOTE: The first 3 variables must be set for these features to be active)
$CORS_allowed_origin = ''; # if multiple origins allowed, separate them by a pipe (also allows PHP preg syntax)
@@ -133,4 +143,4 @@ $CORS_debug = 0; # 0 = no, 1 = yes (default is no) This will generate a lot
$customer_chat_refresh_seconds = 1; # How often (in seconds) to refresh customer ang agent chat window
$manager_chat_refresh_seconds = 1; # How often (in seconds) to refresh manager chat window
-?>
\ No newline at end of file
+?>
diff --git a/www/agc/vdc_db_query.php b/www/agc/vdc_db_query.php
index d1be0376..a4f8a8c9 100644
--- a/www/agc/vdc_db_query.php
+++ b/www/agc/vdc_db_query.php
@@ -551,10 +551,11 @@
# 240420-2227 - ConfBridge code added
# 240517-0901 - Added ALT option for start_call_url fields
# 240612-0206 - Fix for extension_appended_cidname newer options
+# 240801-1140 - Code updates for PHP8 compatibility
#
-$version = '2.14-444';
-$build = '240612-0206';
+$version = '2.14-445';
+$build = '240801-1140';
$php_script = 'vdc_db_query.php';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=913;
@@ -11659,8 +11660,8 @@ if ($ACTION == 'VDADcheckINCOMINGother')
$chat_group_str="";
$VLA_inOUT='NONE';
$queue_seconds=0;
- if (!isset($inbound_email_groups)) {$inbound_email_groups=array();}
- if (!isset($inbound_chat_groups)) {$inbound_chat_groups=array();}
+ if (!is_array($inbound_email_groups)) {$inbound_email_groups=array();}
+ if (!is_array($inbound_chat_groups)) {$inbound_chat_groups=array();}
$email_group_ct=count($inbound_email_groups); # This should always be greater than zero for the script to reach this point, but just in case...
for ($i=0; $i<$email_group_ct; $i++)
diff --git a/www/chat_customer/customer_chat_code.php b/www/chat_customer/customer_chat_code.php
index d10d15f0..593c5c83 100644
--- a/www/chat_customer/customer_chat_code.php
+++ b/www/chat_customer/customer_chat_code.php
@@ -1,7 +1,7 @@
LICENSE: AGPLv2
+# Copyright (C) 2024 Joe Johnson, Matt Florell LICENSE: AGPLv2
#
# Example for incorporating the customer side of the Vicidial chat into a web page.
# Can be called as an include file, if desired.
@@ -13,8 +13,26 @@
# 160108-1659 - Added available_agents variable
# 160120-1944 - Added show_email variable
# 220220-1921 - Added allow_web_debug system setting
+# 240801-1130 - Code updates for PHP8 compatibility
+# 240805-2103 - Added PHP_error_reporting_OVERRIDE options
#
+$PHP_error_reporting_OVERRIDE=0;
+if (file_exists('options.php'))
+ {
+ require('options.php');
+ }
+if ($PHP_error_reporting_OVERRIDE > 0)
+ {
+ $php_err_suppression_value=32767; # E_ALL
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_ERRORS ? 1 : 0);
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_WARNINGS ? 2 : 0);
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_PARSES ? 4 : 0);
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_NOTICES ? 8 : 0);
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_DEPRECATIONS ? 8192 : 0);
+ error_reporting($php_err_suppression_value);
+ }
+
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
if (isset($_GET["chat_id"])) {$chat_id=$_GET["chat_id"];}
@@ -34,17 +52,17 @@ if (isset($_GET["available_agents"])) {$available_agents=$_GET["available_agen
if (isset($_GET["show_email"])) {$show_email=$_GET["show_email"];}
elseif (isset($_POST["show_email"])) {$show_email=$_POST["show_email"];}
-$lead_id = preg_replace("/[^0-9]/","",$lead_id);
-$chat_id = preg_replace('/[^-\_\.0-9a-zA-Z]/','',$chat_id);
-$group_id = preg_replace('/[^-\_0-9\p{L}]/u','',$group_id);
-$chat_group_id = preg_replace('/[^-\_0-9\p{L}]/u','',$chat_group_id);
-$email = preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$email);
-$unique_userID = preg_replace('/[^-\.\_0-9a-zA-Z]/','',$unique_userID);
-$language = preg_replace('/[^-\_0-9a-zA-Z]/','',$language);
-$available_agents = preg_replace('/[^-\_0-9a-zA-Z]/','',$available_agents);
-$show_email = preg_replace('/[^-\_0-9a-zA-Z]/','',$show_email);
+if (isset($lead_id)) {$lead_id = preg_replace("/[^0-9]/","",$lead_id);}
+if (isset($chat_id)) {$chat_id = preg_replace('/[^-\_\.0-9a-zA-Z]/','',$chat_id);}
+if (isset($group_id)) {$group_id = preg_replace('/[^-\_0-9\p{L}]/u','',$group_id);}
+if (isset($chat_group_id)) {$chat_group_id = urlencode(preg_replace('/[^-\_0-9\p{L}]/u','',$chat_group_id));}
+if (isset($email)) {$email = urlencode(preg_replace('/[^-\.\:\/\@\_0-9\p{L}]/u','',$email));}
+if (isset($unique_userID)) {$unique_userID = urlencode(preg_replace('/[^-\.\_0-9a-zA-Z]/','',$unique_userID));}
+if (isset($language)) {$language = urlencode(preg_replace('/[^-\_0-9a-zA-Z]/','',$language));}
+if (isset($available_agents)) {urlencode($available_agents = preg_replace('/[^-\_0-9a-zA-Z]/','',$available_agents));}
+if (isset($show_email)) {$show_email = urlencode(preg_replace('/[^-\_0-9a-zA-Z]/','',$show_email));}
-$URL_vars="?user=".urlencode($unique_userID)."&lead_id=".$lead_id."&group_id=".urlencode($chat_group_id)."&chat_id=".$chat_id."&email=".urlencode($email)."&language=".urlencode($language)."&available_agents=".urlencode($available_agents)."&show_email=".urlencode($show_email);
+$URL_vars="?user=".$unique_userID."&lead_id=".$lead_id."&group_id=".$chat_group_id."&chat_id=".$chat_id."&email=".$email."&language=".$language."&available_agents=".$available_agents."&show_email=".$show_email;
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache"); // HTTP/1.0
diff --git a/www/chat_customer/customer_chat_functions.php b/www/chat_customer/customer_chat_functions.php
index 8dbe5a25..8c64a566 100644
--- a/www/chat_customer/customer_chat_functions.php
+++ b/www/chat_customer/customer_chat_functions.php
@@ -1,7 +1,7 @@
LICENSE: AGPLv2
+# Copyright (C) 2024 Joe Johnson, Matt Florell LICENSE: AGPLv2
#
# CHANGES
# 151212-0828 - First Build for customer chat
@@ -16,6 +16,7 @@
# 160805-2315 - Added coding to show logos in customer display
# 161026-2230 - Added translation QXZ to untranslated text
# 220220-1940 - Added allow_web_debug system setting
+# 240801-1130 - Code updates for PHP8 compatibility
#
require("dbconnect_mysqli.php");
@@ -54,24 +55,24 @@ if (isset($_GET["available_agents"])) {$available_agents=$_GET["available_age
if (isset($_GET["show_email"])) {$show_email=$_GET["show_email"];}
elseif (isset($_POST["show_email"])) {$show_email=$_POST["show_email"];}
-$chat_member_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/',"",$chat_member_name);
+if(isset($chat_member_name)) {$chat_member_name = preg_replace('/[^- \.\,\_0-9a-zA-Z]/',"",$chat_member_name);}
if (!$user) {echo "No user, no using."; exit;}
-$DB=preg_replace("/[^0-9a-zA-Z]/","",$DB);
-$lead_id = preg_replace("/[^0-9]/","",$lead_id);
-$chat_id = preg_replace('/[^- \_\.0-9a-zA-Z]/','',$chat_id);
-$chat_level = preg_replace('/[^- \_\.0-9a-zA-Z]/','',$chat_level);
-$group_id = preg_replace('/[^- \_0-9a-zA-Z]/','',$group_id);
-$language = preg_replace('/[^-\_0-9a-zA-Z]/','',$language);
-$user = preg_replace("/\'|\"|\\\\|;/","",$user);
-$chat_member_name = preg_replace("/\'|\"|\\\\|;/","",$chat_member_name);
-$available_agents = preg_replace('/[^-\_0-9a-zA-Z]/','',$available_agents);
-$show_email = preg_replace('/[^-\_0-9a-zA-Z]/','',$show_email);
-$chat_message = preg_replace('/\|/', '|', $chat_message);
-$action = preg_replace('/[^-\_0-9a-zA-Z]/','',$action);
-$user_level = preg_replace('/[^-\_0-9a-zA-Z]/','',$user_level);
-$keepalive = preg_replace('/[^-\_0-9a-zA-Z]/','',$keepalive);
-$current_message_count = preg_replace('/[^-\_0-9a-zA-Z]/','',$current_message_count);
+if(isset($DB)) {$DB = preg_replace("/[^0-9a-zA-Z]/","",$DB);}
+if(isset($lead_id)) {$lead_id = preg_replace("/[^0-9]/","",$lead_id);}
+if(isset($chat_id)) {$chat_id = preg_replace('/[^- \_\.0-9a-zA-Z]/','',$chat_id);}
+if(isset($chat_level)) {$chat_level = preg_replace('/[^- \_\.0-9a-zA-Z]/','',$chat_level);}
+if(isset($group_id)) {$group_id = preg_replace('/[^- \_0-9a-zA-Z]/','',$group_id);}
+if(isset($language)) {$language = preg_replace('/[^-\_0-9a-zA-Z]/','',$language);}
+if(isset($user)) {$user = preg_replace("/\'|\"|\\\\|;/","",$user);}
+if(isset($chat_member_name)) {$chat_member_name = preg_replace("/\'|\"|\\\\|;/","",$chat_member_name);}
+if(isset($available_agents)) {$available_agents = preg_replace('/[^-\_0-9a-zA-Z]/','',$available_agents);}
+if(isset($show_email)) {$show_email = preg_replace('/[^-\_0-9a-zA-Z]/','',$show_email);}
+if(isset($chat_message)) {$chat_message = preg_replace('/\|/', '|', $chat_message);}
+if(isset($action)) {$action = preg_replace('/[^-\_0-9a-zA-Z]/','',$action);}
+if(isset($user_level)) {$user_level = preg_replace('/[^-\_0-9a-zA-Z]/','',$user_level);}
+if(isset($keepalive)) {$keepalive = preg_replace('/[^-\_0-9a-zA-Z]/','',$keepalive);}
+if(isset($current_message_count)) {$current_message_count = preg_replace('/[^-\_0-9a-zA-Z]/','',$current_message_count);}
$use_agent_colors=1;
if (file_exists('options.php'))
@@ -510,4 +511,4 @@ if ($action=="update_chat_window" && $chat_id) {
}
}
-?>
\ No newline at end of file
+?>
diff --git a/www/chat_customer/dbconnect_mysqli.php b/www/chat_customer/dbconnect_mysqli.php
index f60ff110..19a36d32 100644
--- a/www/chat_customer/dbconnect_mysqli.php
+++ b/www/chat_customer/dbconnect_mysqli.php
@@ -4,12 +4,30 @@
#
# database connection settings and some global web settings
#
-# Copyright (C) 2015 Matt Florell LICENSE: AGPLv2
+# Copyright (C) 2024 Matt Florell LICENSE: AGPLv2
#
# CHANGES:
# 151212-0827 - First Build for customer chat
+# 240801-1130 - Code updates for PHP8 compatibility
+# 240805-2103 - Added PHP_error_reporting_OVERRIDE options
#
+$PHP_error_reporting_OVERRIDE=0;
+if (file_exists('options.php'))
+ {
+ require('options.php');
+ }
+if ($PHP_error_reporting_OVERRIDE > 0)
+ {
+ $php_err_suppression_value=32767; # E_ALL
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_ERRORS ? 1 : 0);
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_WARNINGS ? 2 : 0);
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_PARSES ? 4 : 0);
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_NOTICES ? 8 : 0);
+ $php_err_suppression_value-=($PHP_error_reporting_HIDE_DEPRECATIONS ? 8192 : 0);
+ error_reporting($php_err_suppression_value);
+ }
+
if ( file_exists("/etc/astguiclient.conf") )
{
$DBCagc = file("/etc/astguiclient.conf");
diff --git a/www/chat_customer/options-example.php b/www/chat_customer/options-example.php
index fbf32eac..68f45fe8 100644
--- a/www/chat_customer/options-example.php
+++ b/www/chat_customer/options-example.php
@@ -1,3 +1,23 @@
, Joe Johnson LICENSE: AGPLv2
+#
+# rename this file to options.php for the settings here to go into effect
+#
+# CHANGELOG
+# 160818-0200 - First build
+# 240802-1250 - Added options to customize PHP error output
+#
+
+# If this option is set to 1, then the error_reporting in php.ini will be ignored and settings below will be used for this directory
+$PHP_error_reporting_OVERRIDE = 0;
+ # PHP error reporting options, set to 1 to keep the type of error from being displayed, either on-screen or to the error logs.
+$PHP_error_reporting_HIDE_ERRORS = 0; # STRONGLY advise leaving this value alone, but you do you.
+$PHP_error_reporting_HIDE_WARNINGS = 0;
+$PHP_error_reporting_HIDE_PARSES = 0;
+$PHP_error_reporting_HIDE_NOTICES = 0;
+$PHP_error_reporting_HIDE_DEPRECATIONS= 0;
+
$use_agent_colors = '1'; # set to 1 to use the agent_screen_colors setting in the system settings
?>
diff --git a/www/chat_customer/vicidial_chat_customer_side.php b/www/chat_customer/vicidial_chat_customer_side.php
index cb2deeb9..836f40bf 100644
--- a/www/chat_customer/vicidial_chat_customer_side.php
+++ b/www/chat_customer/vicidial_chat_customer_side.php
@@ -1,7 +1,7 @@
LICENSE: AGPLv2
+# Copyright (C) 2024 Joe Johnson, Matt Florell LICENSE: AGPLv2
#
# The main page of the customer chat interface. This will display a form for the customer
# to fill out to attempt to initiate a chat with an available agent in the in-group
@@ -19,6 +19,7 @@
# 160203-1052 - Added display of chat message after ending it
# 160805-2315 - Added coding to show logos in customer display
# 220220-1915 - Added allow_web_debug system setting
+# 240801-1130 - Code updates for PHP8 compatibility
#
require("dbconnect_mysqli.php");
@@ -57,17 +58,17 @@ if (isset($_GET["show_email"])) {$show_email=$_GET["show_email"];}
$PHP_SELF=$_SERVER['PHP_SELF'];
$PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF);
-$lead_id = preg_replace("/[^0-9]/","",$lead_id);
-$user = preg_replace("/\'|\"|\\\\|;/","",$user);
-$chat_id = preg_replace('/[^- \_\.0-9a-zA-Z]/','',$chat_id);
-$group_id = preg_replace('/[^- \_0-9a-zA-Z]/','',$group_id);
-$language = preg_replace('/[^-\_0-9a-zA-Z]/','',$language);
-$available_agents = preg_replace('/[^-\_0-9a-zA-Z]/','',$available_agents);
-$status_link = preg_replace('/[^-\_0-9a-zA-Z]/','',$status_link);
-$show_email = preg_replace('/[^-\_0-9a-zA-Z]/','',$show_email);
-$send_request = preg_replace('/[^-\_0-9a-zA-Z]/','',$send_request);
-$join_chat = preg_replace('/[^-\_0-9a-zA-Z]/','',$join_chat);
-$stage = preg_replace('/[^-\_0-9a-zA-Z]/','',$stage);
+if (isset($lead_id)) {$lead_id = preg_replace("/[^0-9]/","",$lead_id);}
+if (isset($user)) {$user = preg_replace("/\'|\"|\\\\|;/","",$user);}
+if (isset($chat_id)) {$chat_id = preg_replace('/[^- \_\.0-9a-zA-Z]/','',$chat_id);}
+if (isset($group_id)) {$group_id = preg_replace('/[^- \_0-9a-zA-Z]/','',$group_id);}
+if (isset($language)) {$language = preg_replace('/[^-\_0-9a-zA-Z]/','',$language);}
+if (isset($available_agents)) {$available_agents = preg_replace('/[^-\_0-9a-zA-Z]/','',$available_agents);}
+if (isset($status_link)) {$status_link = preg_replace('/[^-\_0-9a-zA-Z]/','',$status_link);}
+if (isset($show_email)) {$show_email = preg_replace('/[^-\_0-9a-zA-Z]/','',$show_email);}
+if (isset($send_request)) {$send_request = preg_replace('/[^-\_0-9a-zA-Z]/','',$send_request);}
+if (isset($join_chat)) {$join_chat = preg_replace('/[^-\_0-9a-zA-Z]/','',$join_chat);}
+if (isset($stage)) {$stage = preg_replace('/[^-\_0-9a-zA-Z]/','',$stage);}
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
@@ -668,7 +669,7 @@ $chat_title= _QXZ("Request chat with agent"); # This can be modified for customi
@@ -710,7 +711,7 @@ $chat_title= _QXZ("Request chat with agent"); # This can be modified for customi
@@ -797,7 +798,7 @@ $chat_title= _QXZ("Request chat with agent"); # This can be modified for customi