From 583501c483975f61286157f863565076edf42134 Mon Sep 17 00:00:00 2001 From: mattf Date: Wed, 6 Sep 2006 15:08:40 +0000 Subject: [PATCH] In all lead loaders filter the alt_phone field for non-digits git-svn-id: svn://192.168.202.10@248 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/bin/VICIDIAL_IN_new_leads_file.pl | 3 ++- agc_2-X/trunk/www/vicidial/listloader.php | 3 ++- agc_2-X/trunk/www/vicidial/listloader.pl | 2 ++ agc_2-X/trunk/www/vicidial/listloader_super.pl | 2 ++ agc_2-X/trunk/www/vicidial/new_listloader_superL.php | 11 ++++++----- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/agc_2-X/trunk/bin/VICIDIAL_IN_new_leads_file.pl b/agc_2-X/trunk/bin/VICIDIAL_IN_new_leads_file.pl index 1b163ce8..71a40fb6 100644 --- a/agc_2-X/trunk/bin/VICIDIAL_IN_new_leads_file.pl +++ b/agc_2-X/trunk/bin/VICIDIAL_IN_new_leads_file.pl @@ -17,6 +17,7 @@ # 60616-0958 - Added listID override feature to force all leads into same list # 60807-1003 - Changed to DBI # - changed to use /etc/astguiclient.conf for configs +# 60906-1055 - added filter of non-digits in alt_phone field # $secX = time(); @@ -263,7 +264,7 @@ if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOC $country = $m[16]; chomp($country); $gender = $m[17]; $date_of_birth = $m[18]; - $alt_phone = $m[19]; + $alt_phone = $m[19]; chomp($alt_phone); $alt_phone =~ s/\D//gi; $email = $m[20]; $security_phrase = $m[21]; $comments = $m[22]; diff --git a/agc_2-X/trunk/www/vicidial/listloader.php b/agc_2-X/trunk/www/vicidial/listloader.php index 6f5ec297..9cf8a548 100644 --- a/agc_2-X/trunk/www/vicidial/listloader.php +++ b/agc_2-X/trunk/www/vicidial/listloader.php @@ -12,6 +12,7 @@ # 60616-1006 - added listID override and gmt_offset lookup while loading # 60619-1652 - Added variable filtering to eliminate SQL injection attack threat # 60822-1105 - fixed for nonwritable directories +# 60906-1059 - added filter of non-digits in alt_phone field # # 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. # @@ -203,7 +204,7 @@ if ($leadfile and filesize($LF_path)<=8388608) { $country = $row[16]; $gender = $row[17]; $date_of_birth = $row[18]; - $alt_phone = $row[19]; + $alt_phone = eregi_replace("[^0-9]", "", $row[19]); $email = $row[20]; $security_phrase = $row[21]; $comments = trim($row[22]); diff --git a/agc_2-X/trunk/www/vicidial/listloader.pl b/agc_2-X/trunk/www/vicidial/listloader.pl index 6c5a6dd0..cec67de0 100644 --- a/agc_2-X/trunk/www/vicidial/listloader.pl +++ b/agc_2-X/trunk/www/vicidial/listloader.pl @@ -12,6 +12,7 @@ # 60811-1232 - Changed to DBI # 60811-1329 - changed to use /etc/astguiclient.conf for configs # 60822-1121 - fixed for nonwritable directories +# 60906-1058 - added filter of non-digits in alt_phone field # ### begin parsing run-time options ### @@ -205,6 +206,7 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($oWkC) {$date_of_birth=$oWkC->Value; } $oWkC = $oWkS->{Cells}[$iR][19]; if ($oWkC) {$alt_phone=$oWkC->Value; } + $alt_phone=~s/[^0-9]//g; $oWkC = $oWkS->{Cells}[$iR][20]; if ($oWkC) {$email=$oWkC->Value; } $oWkC = $oWkS->{Cells}[$iR][21]; diff --git a/agc_2-X/trunk/www/vicidial/listloader_super.pl b/agc_2-X/trunk/www/vicidial/listloader_super.pl index 8e41bb39..d2868bf4 100644 --- a/agc_2-X/trunk/www/vicidial/listloader_super.pl +++ b/agc_2-X/trunk/www/vicidial/listloader_super.pl @@ -11,6 +11,7 @@ # - Added gmt_offset_now lookup for each lead # 60811-1232 - Changed to DBI # 60811-1329 - changed to use /etc/astguiclient.conf for configs +# 60906-1056 - added filter of non-digits in alt_phone field # ### begin parsing run-time options ### @@ -205,6 +206,7 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { if ($oWkC) {$date_of_birth=$oWkC->Value; } $oWkC = $oWkS->{Cells}[$iR][$xls_fields[19]]; if ($oWkC) {$alt_phone=$oWkC->Value; } + $alt_phone=~s/[^0-9]//g; $oWkC = $oWkS->{Cells}[$iR][$xls_fields[20]]; if ($oWkC) {$email=$oWkC->Value; } $oWkC = $oWkS->{Cells}[$iR][$xls_fields[21]]; 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 b5d149a2..6e4922b0 100644 --- a/agc_2-X/trunk/www/vicidial/new_listloader_superL.php +++ b/agc_2-X/trunk/www/vicidial/new_listloader_superL.php @@ -14,11 +14,12 @@ # 60616-1604 - added gmt lookup for each lead # 60619-1651 - Added variable filtering to eliminate SQL injection attack threat # 60822-1121 - fixed for nonwritable directories +# 60906-1100 - added filter of non-digits in alt_phone field # # 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.1'; -$build = '60822-1121'; +$build = '60906-1100'; require("dbconnect.php"); @@ -370,7 +371,7 @@ function ParseFileName() { $country_code = $row[$country_code_field]; $gender = $row[$gender_field]; $date_of_birth = $row[$date_of_birth_field]; - $alt_phone = $row[$alt_phone_field]; + $alt_phone = eregi_replace("[^0-9]", "", $row[$alt_phone_field]); $email = $row[$email_field]; $security_phrase = $row[$security_phrase_field]; $comments = trim($row[$comments_field]); @@ -479,7 +480,7 @@ function ParseFileName() { $country_code = $row[$country_code_field]; $gender = $row[$gender_field]; $date_of_birth = $row[$date_of_birth_field]; - $alt_phone = $row[$alt_phone_field]; + $alt_phone = eregi_replace("[^0-9]", "", $row[$alt_phone_field]); $email = $row[$email_field]; $security_phrase = $row[$security_phrase_field]; $comments = trim($row[$comments_field]); @@ -607,7 +608,7 @@ if ($leadfile && filesize($LF_path)<=8388608) { $country_code = $row[16]; $gender = $row[17]; $date_of_birth = $row[18]; - $alt_phone = $row[19]; + $alt_phone = eregi_replace("[^0-9]", "", $row[19]); $email = $row[20]; $security_phrase = $row[21]; $comments = trim($row[22]); @@ -732,7 +733,7 @@ if ($leadfile && filesize($LF_path)<=8388608) { $country_code = $row[16]; $gender = $row[17]; $date_of_birth = $row[18]; - $alt_phone = $row[19]; + $alt_phone = eregi_replace("[^0-9]", "", $row[19]); $email = $row[20]; $security_phrase = $row[21]; $comments = trim($row[22]);