fix of bug for default phone_code in the lead loaders

git-svn-id: svn://192.168.202.10@592 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2007-04-17 15:04:32 +00:00
parent 05a72f02d5
commit df5a33e496
4 changed files with 17 additions and 9 deletions
+5 -4
View File
@@ -1,7 +1,7 @@
<?
# listloader.php
#
# Copyright (C) 2006 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: GPLv2
# Copyright (C) 2007 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: GPLv2
#
# AST Web GUI lead loader from formatted file
#
@@ -16,12 +16,13 @@
# 61110-1222 - added new USA-Canada DST scheme and Brazil DST scheme
# 61128-1046 - added postal code GMT lookup and duplicate check options
# 70205-1703 - Defaulted phone_code to 1 if not populated
# 70417-1059 - Fixed default phone_code bug
#
# 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.3';
$build = '70205-1703';
$build = '770417-1059';
header ("Content-type: text/html; charset=utf-8");
@@ -260,6 +261,8 @@ if ($leadfile and filesize($LF_path)<=8388608) {
$called_since_last_reset='N';
$phone_list .= "$phone_number$US$list_id|";
if (strlen($phone_code)<1) {$phone_code = '1';}
$postalgmt_found=0;
if ( (eregi("POSTAL",$postalgmt)) && (strlen($postal_code)>4) )
{
@@ -872,8 +875,6 @@ if ($leadfile and filesize($LF_path)<=8388608) {
$AC_processed++;
}
if (strlen($phone_code)<1) {$phone_code = '1';}
if ($multi_insert_counter > 8) {
### insert good deal into pending_transactions table ###
$stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);";
+3 -1
View File
@@ -16,6 +16,7 @@
# 61110-1229 - added new USA-Canada DST scheme and Brazil DST scheme
# 61128-1215 - added postal code GMT lookup and duplicate check options
# 70205-1703 - Defaulted phone_code to 1 if not populated
# 70417-1059 - Fixed default phone_code bug
#
### begin parsing run-time options ###
@@ -248,6 +249,8 @@ foreach $oWkS (@{$oBook->{Worksheet}}) {
{
$phone_list .= "$phone_number$US$list_id|";
$postalgmt_found=0;
if (length($phone_code)<1) {$phone_code = '1';}
if ( ($postalgmt > 0) && (length($postal_code)>4) )
{
if ($phone_code =~ /^1$/)
@@ -435,7 +438,6 @@ foreach $oWkS (@{$oBook->{Worksheet}}) {
$AC_processed++;
}
if (length($phone_code)<1) {$phone_code = '1';}
if ($multi_insert_counter > 8) {
### insert good deal into pending_transactions table ###
$stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$phone_code','$phone_number','$title','$first_name','$middle_initial','$last_name','$address1','$address2','$address3','$city','$state','$province','$postal_code','$country','$gender','$date_of_birth','$alt_phone','$email','$security_phrase','$comments',0);";
@@ -15,6 +15,7 @@
# 61110-1229 - added new USA-Canada DST scheme and Brazil DST scheme
# 61128-1207 - added postal code GMT lookup and duplicate check options
# 70205-1703 - Defaulted phone_code to 1 if not populated
# 70417-1059 - Fixed default phone_code bug
#
### begin parsing run-time options ###
@@ -250,6 +251,8 @@ foreach $oWkS (@{$oBook->{Worksheet}}) {
{
$phone_list .= "$phone_number$US$list_id|";
$postalgmt_found=0;
if (length($phone_code)<1) {$phone_code = '1';}
if ( ($postalgmt > 0) && (length($postal_code)>4) )
{
if ($phone_code =~ /^1$/)
@@ -437,7 +440,6 @@ foreach $oWkS (@{$oBook->{Worksheet}}) {
$AC_processed++;
}
if (length($phone_code)<1) {$phone_code = '1';}
if ($multi_insert_counter > 8) {
### insert good deal into pending_transactions table ###
$stmtZ = "INSERT INTO vicidial_list values$multistmt('','$entry_date','$modify_date','$status','$user','$vendor_lead_code','$source_id','$list_id','$gmt_offset','$called_since_last_reset','$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',0);";
@@ -1,7 +1,7 @@
<?
# new_listloader_superL.php
#
# Copyright (C) 2006 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: GPLv2
# Copyright (C) 2007 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: GPLv2
#
# AST GUI lead loader from formatted file
#
@@ -17,11 +17,12 @@
# 60906-1100 - added filter of non-digits in alt_phone field
# 61110-1222 - added new USA-Canada DST scheme and Brazil DST scheme
# 61128-1149 - added postal code GMT lookup and duplicate check options
# 70417-1059 - Fixed default phone_code bug
#
# 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.2';
$build = '61128-1149';
$version = '2.0.3';
$build = '70417-1059';
require("dbconnect.php");
@@ -418,6 +419,8 @@ function ParseFileName() {
if ( (strlen($phone_number)>6) and ($dup_lead<1) )
{
if (strlen($phone_code)<1) {$phone_code = '1';}
$US='_';
$phone_list .= "$phone_number$US$list_id|";