Added system settings allowing you to remove digits from the beginning of a phone number when it is manual dialed or through the web lead loader.
Fixed issue with Team Performance Detail report git-svn-id: svn://192.168.202.10@3299 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -77,10 +77,11 @@
|
||||
# 180927-0702 - Fixed translation-related issue #1114
|
||||
# 190503-1547 - Added enable_status_mismatch_leadloader_option
|
||||
# 200812-1745 - Added international DNC scrub option
|
||||
# 200922-1013 - Added web_loader_phone_strip system setting feature
|
||||
#
|
||||
|
||||
$version = '2.14-75';
|
||||
$build = '200812-1745';
|
||||
$version = '2.14-76';
|
||||
$build = '200922-1013';
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
require("functions.php");
|
||||
@@ -214,7 +215,7 @@ $vicidial_list_fields = '|lead_id|vendor_lead_code|source_id|list_id|gmt_offset_
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$stmt = "SELECT use_non_latin,admin_web_directory,custom_fields_enabled,webroot_writable,enable_languages,language_method,active_modules,admin_screen_colors,web_loader_phone_length,enable_international_dncs FROM system_settings;";
|
||||
$stmt = "SELECT use_non_latin,admin_web_directory,custom_fields_enabled,webroot_writable,enable_languages,language_method,active_modules,admin_screen_colors,web_loader_phone_length,enable_international_dncs,web_loader_phone_strip FROM system_settings;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$qm_conf_ct = mysqli_num_rows($rslt);
|
||||
@@ -231,6 +232,7 @@ if ($qm_conf_ct > 0)
|
||||
$SSadmin_screen_colors = $row[7];
|
||||
$SSweb_loader_phone_length = $row[8];
|
||||
$SSenable_international_dncs = $row[9];
|
||||
$SSweb_loader_phone_strip = $row[10];
|
||||
}
|
||||
##### END SETTINGS LOOKUP #####
|
||||
###########################################
|
||||
@@ -991,6 +993,10 @@ if ($OK_to_process)
|
||||
{
|
||||
print "<BR>"._QXZ("REQUIRED PHONE NUMBER LENGTH").": $web_loader_phone_length<BR>\n";
|
||||
}
|
||||
if ( (strlen($SSweb_loader_phone_strip)>0) and ($SSweb_loader_phone_strip != 'DISABLED') )
|
||||
{
|
||||
print "<BR>"._QXZ("PHONE NUMBER PREFIX STRIP SYSTEM SETTING ENABLED").": $SSweb_loader_phone_strip<BR>\n";
|
||||
}
|
||||
$ninetydaySQL='';
|
||||
if (preg_match("/90DAY/i",$dupcheck))
|
||||
{
|
||||
@@ -1485,6 +1491,10 @@ if ($OK_to_process)
|
||||
|
||||
$valid_number=1;
|
||||
$invalid_reason='';
|
||||
if ( (strlen($SSweb_loader_phone_strip)>0) and ($SSweb_loader_phone_strip != 'DISABLED') )
|
||||
{
|
||||
$phone_number = preg_replace("/^$SSweb_loader_phone_strip/",'',$phone_number);
|
||||
}
|
||||
if ( (strlen($phone_number)<5) || (strlen($phone_number)>18) )
|
||||
{
|
||||
$valid_number=0;
|
||||
@@ -1636,7 +1646,7 @@ if ($OK_to_process)
|
||||
}
|
||||
|
||||
### LOG INSERTION Admin Log Table ###
|
||||
$stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='LOAD', record_id='$list_id_override', event_code='ADMIN LOAD LIST CUSTOM', event_sql='', event_notes='File Name: $leadfile_name, GOOD: $good, BAD: $bad, MOVED: $moved, TOTAL: $total, DEBUG: dedupe_statuses:$dedupe_statuses[0]| dedupe_statuses_override:$dedupe_statuses_override| dupcheck:$dupcheck| status mismatch action: $status_mismatch_action| lead_file:$lead_file| list_id_override:$list_id_override| phone_code_override:$phone_code_override| postalgmt:$postalgmt| template_id:$template_id| usacan_check:$usacan_check| dnc_country_scrub:$international_dnc_scrub| state_conversion:$state_conversion| web_loader_phone_length:$web_loader_phone_length|';";
|
||||
$stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='LOAD', record_id='$list_id_override', event_code='ADMIN LOAD LIST CUSTOM', event_sql='', event_notes='File Name: $leadfile_name, GOOD: $good, BAD: $bad, MOVED: $moved, TOTAL: $total, DEBUG: dedupe_statuses:$dedupe_statuses[0]| dedupe_statuses_override:$dedupe_statuses_override| dupcheck:$dupcheck| status mismatch action: $status_mismatch_action| lead_file:$lead_file| list_id_override:$list_id_override| phone_code_override:$phone_code_override| postalgmt:$postalgmt| template_id:$template_id| usacan_check:$usacan_check| dnc_country_scrub:$international_dnc_scrub| state_conversion:$state_conversion| web_loader_phone_length:$web_loader_phone_length| web_loader_phone_strip:$SSweb_loader_phone_strip|';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
@@ -1656,7 +1666,7 @@ if (($leadfile) && ($LF_path))
|
||||
$total=0; $good=0; $bad=0; $dup=0; $post=0; $moved=0; $phone_list='';
|
||||
|
||||
### LOG INSERTION Admin Log Table ###
|
||||
$stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='LOAD', record_id='$list_id_override', event_code='ADMIN LOAD LIST', event_sql='', event_notes='File Name: $leadfile_name, DEBUG: dedupe_statuses:$dedupe_statuses[0]| dedupe_statuses_override:$dedupe_statuses_override| dupcheck:$dupcheck | status mismatch action: $status_mismatch_action| lead_file:$lead_file| list_id_override:$list_id_override| phone_code_override:$phone_code_override| postalgmt:$postalgmt| template_id:$template_id| usacan_check:$usacan_check| dnc_country_scrub:$international_dnc_scrub| state_conversion:$state_conversion| web_loader_phone_length:$web_loader_phone_length|';";
|
||||
$stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='LOAD', record_id='$list_id_override', event_code='ADMIN LOAD LIST', event_sql='', event_notes='File Name: $leadfile_name, DEBUG: dedupe_statuses:$dedupe_statuses[0]| dedupe_statuses_override:$dedupe_statuses_override| dupcheck:$dupcheck | status mismatch action: $status_mismatch_action| lead_file:$lead_file| list_id_override:$list_id_override| phone_code_override:$phone_code_override| postalgmt:$postalgmt| template_id:$template_id| usacan_check:$usacan_check| dnc_country_scrub:$international_dnc_scrub| state_conversion:$state_conversion| web_loader_phone_length:$web_loader_phone_length| web_loader_phone_strip:$SSweb_loader_phone_strip|';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
@@ -1817,6 +1827,10 @@ if (($leadfile) && ($LF_path))
|
||||
{
|
||||
print "<BR>"._QXZ("REQUIRED PHONE NUMBER LENGTH").": $web_loader_phone_length<BR>\n";
|
||||
}
|
||||
if ( (strlen($SSweb_loader_phone_strip)>0) and ($SSweb_loader_phone_strip != 'DISABLED') )
|
||||
{
|
||||
print "<BR>"._QXZ("PHONE NUMBER PREFIX STRIP SYSTEM SETTING ENABLED").": $SSweb_loader_phone_strip<BR>\n";
|
||||
}
|
||||
$ninetydaySQL='';
|
||||
if (preg_match("/90DAY/i",$dupcheck))
|
||||
{
|
||||
@@ -2214,6 +2228,10 @@ if (($leadfile) && ($LF_path))
|
||||
|
||||
$valid_number=1;
|
||||
$invalid_reason='';
|
||||
if ( (strlen($SSweb_loader_phone_strip)>0) and ($SSweb_loader_phone_strip != 'DISABLED') )
|
||||
{
|
||||
$phone_number = preg_replace("/^$SSweb_loader_phone_strip/",'',$phone_number);
|
||||
}
|
||||
if ( (strlen($phone_number)<5) || (strlen($phone_number)>18) )
|
||||
{
|
||||
$valid_number=0;
|
||||
@@ -2438,7 +2456,7 @@ if (($leadfile) && ($LF_path))
|
||||
{fwrite($stmt_file, $custom_ins_stmt."\r\n");}
|
||||
}
|
||||
### LOG INSERTION Admin Log Table ###
|
||||
$stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='LOAD', record_id='$list_id_override', event_code='ADMIN LOAD LIST STANDARD', event_sql='', event_notes='File Name: $leadfile_name, GOOD: $good, BAD: $bad, MOVED: $moved, TOTAL: $total, DEBUG: dedupe_statuses:$dedupe_statuses[0]| dedupe_statuses_override:$dedupe_statuses_override| dupcheck:$dupcheck| status mismatch action: $status_mismatch_action| lead_file:$lead_file| list_id_override:$list_id_override| phone_code_override:$phone_code_override| postalgmt:$postalgmt| template_id:$template_id| usacan_check:$usacan_check| dnc_country_scrub:$international_dnc_scrub| state_conversion:$state_conversion| web_loader_phone_length:$web_loader_phone_length|';";
|
||||
$stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='LOAD', record_id='$list_id_override', event_code='ADMIN LOAD LIST STANDARD', event_sql='', event_notes='File Name: $leadfile_name, GOOD: $good, BAD: $bad, MOVED: $moved, TOTAL: $total, DEBUG: dedupe_statuses:$dedupe_statuses[0]| dedupe_statuses_override:$dedupe_statuses_override| dupcheck:$dupcheck| status mismatch action: $status_mismatch_action| lead_file:$lead_file| list_id_override:$list_id_override| phone_code_override:$phone_code_override| postalgmt:$postalgmt| template_id:$template_id| usacan_check:$usacan_check| dnc_country_scrub:$international_dnc_scrub| state_conversion:$state_conversion| web_loader_phone_length:$web_loader_phone_length| web_loader_phone_strip:$SSweb_loader_phone_strip|';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
@@ -2570,6 +2588,10 @@ if (($leadfile) && ($LF_path))
|
||||
{
|
||||
print "<BR>"._QXZ("REQUIRED PHONE NUMBER LENGTH").": $web_loader_phone_length<BR>\n";
|
||||
}
|
||||
if ( (strlen($SSweb_loader_phone_strip)>0) and ($SSweb_loader_phone_strip != 'DISABLED') )
|
||||
{
|
||||
print "<BR>"._QXZ("PHONE NUMBER PREFIX STRIP SYSTEM SETTING ENABLED").": $SSweb_loader_phone_strip<BR>\n";
|
||||
}
|
||||
$ninetydaySQL='';
|
||||
if (preg_match("/90DAY/i",$dupcheck))
|
||||
{
|
||||
@@ -2962,6 +2984,10 @@ if (($leadfile) && ($LF_path))
|
||||
$valid_number=1;
|
||||
$dnc_matches=0;
|
||||
$invalid_reason='';
|
||||
if ( (strlen($SSweb_loader_phone_strip)>0) and ($SSweb_loader_phone_strip != 'DISABLED') )
|
||||
{
|
||||
$phone_number = preg_replace("/^$SSweb_loader_phone_strip/",'',$phone_number);
|
||||
}
|
||||
if ( (strlen($phone_number)<5) || (strlen($phone_number)>18) )
|
||||
{
|
||||
$valid_number=0;
|
||||
@@ -3093,7 +3119,7 @@ if (($leadfile) && ($LF_path))
|
||||
{fwrite($stmt_file, $stmtZ."\r\n");}
|
||||
}
|
||||
### LOG INSERTION Admin Log Table ###
|
||||
$stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='LOAD', record_id='$list_id_override', event_code='ADMIN LOAD LIST STANDARD', event_sql='', event_notes='File Name: $leadfile_name, GOOD: $good, BAD: $bad, MOVED: $moved, TOTAL: $total, DEBUG: dedupe_statuses:$dedupe_statuses[0]| dedupe_statuses_override:$dedupe_statuses_override| dupcheck:$dupcheck| status mismatch action: $status_mismatch_action| lead_file:$lead_file| list_id_override:$list_id_override| phone_code_override:$phone_code_override| postalgmt:$postalgmt| template_id:$template_id| usacan_check:$usacan_check| dnc_country_scrub:$international_dnc_scrub| state_conversion:$state_conversion| web_loader_phone_length:$web_loader_phone_length|';";
|
||||
$stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='LOAD', record_id='$list_id_override', event_code='ADMIN LOAD LIST STANDARD', event_sql='', event_notes='File Name: $leadfile_name, GOOD: $good, BAD: $bad, MOVED: $moved, TOTAL: $total, DEBUG: dedupe_statuses:$dedupe_statuses[0]| dedupe_statuses_override:$dedupe_statuses_override| dupcheck:$dupcheck| status mismatch action: $status_mismatch_action| lead_file:$lead_file| list_id_override:$list_id_override| phone_code_override:$phone_code_override| postalgmt:$postalgmt| template_id:$template_id| usacan_check:$usacan_check| dnc_country_scrub:$international_dnc_scrub| state_conversion:$state_conversion| web_loader_phone_length:$web_loader_phone_length| web_loader_phone_strip:$SSweb_loader_phone_strip|';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
@@ -3277,6 +3303,10 @@ if (($leadfile) && ($LF_path))
|
||||
{
|
||||
print "<BR>"._QXZ("REQUIRED PHONE NUMBER LENGTH").": $web_loader_phone_length<BR>\n";
|
||||
}
|
||||
if ( (strlen($SSweb_loader_phone_strip)>0) and ($SSweb_loader_phone_strip != 'DISABLED') )
|
||||
{
|
||||
print "<BR>"._QXZ("PHONE NUMBER PREFIX STRIP SYSTEM SETTING ENABLED").": $SSweb_loader_phone_strip<BR>\n";
|
||||
}
|
||||
|
||||
$buffer=rtrim(fgets($file, 4096));
|
||||
$buffer=stripslashes($buffer);
|
||||
|
||||
Reference in New Issue
Block a user