From a4e3fe6859cfcc96a3c7f51ba7bbc7c66fdf71d5 Mon Sep 17 00:00:00 2001 From: mattf Date: Thu, 10 May 2007 20:16:29 +0000 Subject: [PATCH] added duplication checking by campaign and total system for lead loaders. added phone_code override for lead loaders git-svn-id: svn://192.168.202.10@612 3d104415-ff17-0410-8863-d5cf3c621b8a --- UPGRADE | 14 + bin/VICIDIAL_IN_new_leads_file.pl | 126 +++++- .../TO_BE_TRANSLATED_2.0.4.txt | 5 + www/vicidial/admin.php | 6 +- www/vicidial/listloader.pl | 117 +++++- www/vicidial/listloader_super.pl | 117 +++++- www/vicidial/new_listloader_superL.php | 383 ++++++++++++++++-- 7 files changed, 720 insertions(+), 48 deletions(-) diff --git a/UPGRADE b/UPGRADE index b8003869..a1e5b213 100644 --- a/UPGRADE +++ b/UPGRADE @@ -1,8 +1,22 @@ ################ UPGRADE +NOTE: Upgrading from 2.0.2 to 2.0.3 is below the first section NOTE: Upgrading from 2.0.1 to 2.0.2 is in the middle section NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom +########## UPGRADING FROM 2.0.3 TO 2.0.4 ########## + +1. install new files: + perl ./install.pl + NOTES: If you have customized any scripts in the bin or agi folders, + then make sure you back them up before running the install.pl script. + This script will replace existing files in the astguiclient installation. + + + + + + ########## UPGRADING FROM 2.0.2 TO 2.0.3 ########## 1. install new files: diff --git a/bin/VICIDIAL_IN_new_leads_file.pl b/bin/VICIDIAL_IN_new_leads_file.pl index 27cdeeeb..acc85c75 100644 --- a/bin/VICIDIAL_IN_new_leads_file.pl +++ b/bin/VICIDIAL_IN_new_leads_file.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# VICIDIAL_IN_new_leads_file.pl version 0.5 *DBI-version* +# VICIDIAL_IN_new_leads_file.pl version 0.6 *DBI-version* # # DESCRIPTION: # script lets you insert leads into the vicidial_list table from a TAB-delimited @@ -8,7 +8,7 @@ # # It is recommended that you run this program on the local Asterisk machine # -# Copyright (C) 2006 Matt Florell LICENSE: GPLv2 +# Copyright (C) 2007 Matt Florell LICENSE: GPLv2 # # # CHANGES @@ -22,6 +22,7 @@ # - added duplicate check flag option within same list # 61127-1132 - Added new DST methods # 61128-1037 - Added postal codes GMT lookup option +# 70510-1518 - Added campaign and system duplicate check and phonecode override # $secX = time(); @@ -105,7 +106,10 @@ if (length($ARGV[0])>1) print " [--forcegmt] = forces gmt value of column after comments column\n"; print " [--debug] = debug output\n"; print " [--forcelistid=1234] = overrides the listID given in the file with the 1234\n"; + print " [--forcephonecode=44] = overrides the phone_code given in the lead with the 44\n"; print " [--duplicate-check] = checks for the same phone number in the same list id before inserting lead\n"; + print " [--duplicate-campaign-check] = checks for the same phone number in the same campaign before inserting lead\n"; + print " [--duplicate-system-check] = checks for the same phone number in the entire system before inserting lead\n"; print " [--postal-code-gmt] = checks for the time zone based on the postal code given where available\n"; print " [-h] = this help screen\n\n"; print "\n"; @@ -150,11 +154,32 @@ if (length($ARGV[0])>1) } else {$forcelistid = '';} + + if ($args =~ /--forcephonecode=/i) + { + @data_in = split(/--forcephonecode=/,$args); + $forcephonecode = $data_in[1]; + $forcephonecode =~ s/ .*//gi; + print "\n----- FORCE PHONECODE OVERRIDE: $forcephonecode -----\n\n"; + } + else + {$forcephonecode = '';} + if ($args =~ /-duplicate-check/i) { $dupcheck=1; print "\n----- DUPLICATE CHECK -----\n\n"; } + if ($args =~ /-duplicate-campaign-check/i) + { + $dupcheckcamp=1; + print "\n----- DUPLICATE CAMPAIGN CHECK -----\n\n"; + } + if ($args =~ /-duplicate-system-check/i) + { + $dupchecksys=1; + print "\n----- DUPLICATE SYSTEM CHECK -----\n\n"; + } if ($args =~ /-postal-code-gmt/i) { $postalgmt=1; @@ -303,15 +328,26 @@ if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOC { $list_id = $forcelistid; # set list_id to override value } - if ($dupcheck > 0) + if (length($forcephonecode) > 0) + { + $phone_code = $forcephonecode; # set phone_code to override value + } + + ##### Check for duplicate phone numbers in vicidial_list table entire database ##### + if ($dupchecksys > 0) { $dup_lead=0; - $stmtA = "select count(*) from vicidial_list where phone_number='$phone_number' and list_id='$list_id';"; + $stmtA = "select count(*) from vicidial_list where phone_number='$phone_number';"; if($DBX){print STDERR "\n|$stmtA|\n";} $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + if ($sthArows > 0) + { @aryA = $sthA->fetchrow_array; $dup_lead = $aryA[0]; + $dup_lead_list=$list_id; + } $sthA->finish(); if ($dup_lead < 1) { @@ -319,6 +355,86 @@ if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOC {$dup_lead++;} } } + ##### Check for duplicate phone numbers in vicidial_list table for one list_id ##### + if ($dupcheck > 0) + { + $dup_lead=0; + $stmtA = "select llst_id from vicidial_list where phone_number='$phone_number' and list_id='$list_id' limit 1;"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $dup_lead_list = $aryA[0]; + $dup_lead++; + } + $sthA->finish(); + if ($dup_lead < 1) + { + if ($phone_list =~ /\|$phone_number$US$list_id\|/) + {$dup_lead++;} + } + } + ##### Check for duplicate phone numbers in vicidial_list table for all lists in a campaign ##### + if ($dupcheckcamp > 0) + { + $dup_lead=0; + $dup_lists=''; + + $stmtA = "select count(*) from vicidial_lists where list_id='$list_id';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + @aryA = $sthA->fetchrow_array; + $ci_recs = $aryA[0]; + $sthA->finish(); + if ($ci_recs > 0) + { + $stmtA = "select campaign_id from vicidial_lists where list_id='$list_id';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + @aryA = $sthA->fetchrow_array; + $dup_camp = $aryA[0]; + $sthA->finish(); + + $stmtA = "select list_id from vicidial_lists where campaign_id='$dup_camp';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $dup_lists .= "'$aryA[0]',"; + $rec_count++; + } + $sthA->finish(); + + chop($dup_lists); + $stmtA = "select list_id from vicidial_list where phone_number='$phone_number' and list_id IN($dup_lists) limit 1;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $dup_lead_list = "'$aryA[0]',"; + $rec_count++; + $dup_lead=1; + } + $sthA->finish(); + } + if ($dup_lead < 1) + { + if ($phone_list =~ /\|$phone_number$US$list_id\|/) + {$dup_lead++;} + } + } + if ( (length($phone_number)>6) && ($dup_lead < 1) ) { $phone_list .= "$phone_number$US$list_id|"; @@ -547,7 +663,7 @@ if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOC else { if ($dup_lead > 0) - {print "DUPLICATE: $phone|$list_id"; $f++;} + {print "DUPLICATE: $phone|$list_id|$dup_lead_list|"; $f++;} else {print "BAD Home_Phone: $phone|$vendor_id"; $e++;} } diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.4.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.4.txt index 5e220a02..ca272ffc 100644 --- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.4.txt +++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.4.txt @@ -1,5 +1,10 @@ ############################################################ ADMIN +CHECK FOR DUPLICATES BY PHONE IN ALL CAMPAIGN LISTS|| +CHECK FOR DUPLICATES BY PHONE IN ENTIRE SYSTEM|| +PHONE CODE OVERRIDE FOR THIS FILE|| +The VICIDIAL basic web-based lead loader is designed simply to take a lead file - up to 8MB in size - that is either tab or pipe delimited and load it into the vicidial_list table. The lead loader allows for field choosing and TXT- Plain Text, CSV- Comma Separated Values and XLS- Excel file formats. The lead loader does not do data validation, but it does allow you to check for duplicates in itself, within the campaign or within the entire system. Also, make sure that you have created the list that these leads are to be under so that you can use them. Here is a list of the fields in their proper order for the lead files:|| +NOTES: The Excel Lead loader functionality is enabled by a series of perl scripts and needs to have a properly configured /etc/astguiclient.conf file in place on the web server. Also, a couple perl modules must be loaded for it to work as well - OLE-Storage_Lite and Spreadsheet-ParseExcel. You can check for runtime errors in these by looking at your apache error_log file. Also, for duplication checks against gampaign lists, the list that has new leads going into it does need to be created in the system before you start to load the leads.|| ############################################################ CLIENT diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 0fd48814..9d6d7b6a 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -2301,7 +2301,7 @@ echo "> +> 1) { ?> diff --git a/www/vicidial/listloader.pl b/www/vicidial/listloader.pl index f8164666..1e369f61 100644 --- a/www/vicidial/listloader.pl +++ b/www/vicidial/listloader.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -### listloader.pl version 0.3 *DBI-version* +### listloader.pl version 0.4 *DBI-version* ### -### Copyright (C) 2006 Matt Florell,Joe Johnson LICENSE: GPLv2 +### Copyright (C) 2007 Matt Florell,Joe Johnson LICENSE: GPLv2 ### # # @@ -17,6 +17,7 @@ # 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 +# 70510-1518 - Added campaign and system duplicate check and phonecode override # ### begin parsing run-time options ### @@ -39,6 +40,10 @@ if (length($ARGV[0])>1) { if ($args =~ /-duplicate-check/i) {$dupcheck=1;} + if ($args =~ /-duplicate-campaign-check/i) + {$dupcheckcamp=1;} + if ($args =~ /-duplicate-system-check/i) + {$dupchecksys=1;} if ($args =~ /-postal-code-gmt/i) {$postalgmt=1;} if ($args =~ /--forcelistid=/i) @@ -50,6 +55,17 @@ if (length($ARGV[0])>1) } else {$forcelistid = '';} + + if ($args =~ /--forcephonecode=/i) + { + @data_in = split(/--forcephonecode=/,$args); + $forcephonecode = $data_in[1]; + $forcephonecode =~ s/ .*//gi; + print "\n----- FORCE PHONECODE OVERRIDE: $forcephonecode -----\n\n"; + } + else + {$forcephonecode = '';} + if ($args =~ /--lead-file=/i) { @data_in = split(/--lead-file=/,$args); @@ -229,15 +245,26 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { { $list_id = $forcelistid; # set list_id to override value } - if ($dupcheck > 0) + if (length($forcephonecode) > 0) + { + $phone_code = $forcephonecode; # set phone_code to override value + } + + ##### Check for duplicate phone numbers in vicidial_list table entire database ##### + if ($dupchecksys > 0) { $dup_lead=0; - $stmtA = "select count(*) from vicidial_list where phone_number='$phone_number' and list_id='$list_id';"; + $stmtA = "select count(*) from vicidial_list where phone_number='$phone_number';"; if($DBX){print STDERR "\n|$stmtA|\n";} $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + if ($sthArows > 0) + { @aryA = $sthA->fetchrow_array; $dup_lead = $aryA[0]; + $dup_lead_list=$list_id; + } $sthA->finish(); if ($dup_lead < 1) { @@ -245,6 +272,86 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { {$dup_lead++;} } } + ##### Check for duplicate phone numbers in vicidial_list table for one list_id ##### + if ($dupcheck > 0) + { + $dup_lead=0; + $stmtA = "select llst_id from vicidial_list where phone_number='$phone_number' and list_id='$list_id' limit 1;"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $dup_lead_list = $aryA[0]; + $dup_lead++; + } + $sthA->finish(); + if ($dup_lead < 1) + { + if ($phone_list =~ /\|$phone_number$US$list_id\|/) + {$dup_lead++;} + } + } + ##### Check for duplicate phone numbers in vicidial_list table for all lists in a campaign ##### + if ($dupcheckcamp > 0) + { + $dup_lead=0; + $dup_lists=''; + + $stmtA = "select count(*) from vicidial_lists where list_id='$list_id';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + @aryA = $sthA->fetchrow_array; + $ci_recs = $aryA[0]; + $sthA->finish(); + if ($ci_recs > 0) + { + $stmtA = "select campaign_id from vicidial_lists where list_id='$list_id';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + @aryA = $sthA->fetchrow_array; + $dup_camp = $aryA[0]; + $sthA->finish(); + + $stmtA = "select list_id from vicidial_lists where campaign_id='$dup_camp';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $dup_lists .= "'$aryA[0]',"; + $rec_count++; + } + $sthA->finish(); + + chop($dup_lists); + $stmtA = "select list_id from vicidial_list where phone_number='$phone_number' and list_id IN($dup_lists) limit 1;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $dup_lead_list = "'$aryA[0]',"; + $rec_count++; + $dup_lead=1; + } + $sthA->finish(); + } + if ($dup_lead < 1) + { + if ($phone_list =~ /\|$phone_number$US$list_id\|/) + {$dup_lead++;} + } + } + if ( (length($phone_number)>6) && ($dup_lead < 1) ) { $phone_list .= "$phone_number$US$list_id|"; @@ -453,7 +560,7 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { $good++; } else { - if ($bad < 10) {print "
record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} + if ($bad < 10000) {print "
record $total BAD- PHONE: $phone_number ROW: |$row[0]| $dup_lead_list\n";} $bad++; } $total++; diff --git a/www/vicidial/listloader_super.pl b/www/vicidial/listloader_super.pl index a25d2f64..006aed5c 100644 --- a/www/vicidial/listloader_super.pl +++ b/www/vicidial/listloader_super.pl @@ -1,8 +1,8 @@ #!/usr/bin/perl -### listloader_super.pl version 0.3 *DBI-version* +### listloader_super.pl version 0.4 *DBI-version* ### -### Copyright (C) 2006 Matt Florell,Joe Johnson LICENSE: GPLv2 +### Copyright (C) 2007 Matt Florell,Joe Johnson LICENSE: GPLv2 ### # # @@ -16,6 +16,7 @@ # 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 +# 70510-1518 - Added campaign and system duplicate check and phonecode override # ### begin parsing run-time options ### @@ -38,6 +39,10 @@ if (length($ARGV[0])>1) { if ($args =~ /-duplicate-check/i) {$dupcheck=1;} + if ($args =~ /-duplicate-campaign-check/i) + {$dupcheckcamp=1;} + if ($args =~ /-duplicate-system-check/i) + {$dupchecksys=1;} if ($args =~ /-postal-code-gmt/i) {$postalgmt=1;} if ($args =~ /--forcelistid=/i) @@ -49,6 +54,17 @@ if (length($ARGV[0])>1) } else {$forcelistid = '';} + + if ($args =~ /--forcephonecode=/i) + { + @data_in = split(/--forcephonecode=/,$args); + $forcephonecode = $data_in[1]; + $forcephonecode =~ s/ .*//gi; + print "\n----- FORCE PHONECODE OVERRIDE: $forcephonecode -----\n\n"; + } + else + {$forcephonecode = '';} + if ($args =~ /--lead-file=/i) { @data_in = split(/--lead-file=/,$args); @@ -231,15 +247,26 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { { $list_id = $forcelistid; # set list_id to override value } - if ($dupcheck > 0) + if (length($forcephonecode) > 0) + { + $phone_code = $forcephonecode; # set phone_code to override value + } + + ##### Check for duplicate phone numbers in vicidial_list table entire database ##### + if ($dupchecksys > 0) { $dup_lead=0; - $stmtA = "select count(*) from vicidial_list where phone_number='$phone_number' and list_id='$list_id';"; + $stmtA = "select count(*) from vicidial_list where phone_number='$phone_number';"; if($DBX){print STDERR "\n|$stmtA|\n";} $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + if ($sthArows > 0) + { @aryA = $sthA->fetchrow_array; $dup_lead = $aryA[0]; + $dup_lead_list=$list_id; + } $sthA->finish(); if ($dup_lead < 1) { @@ -247,6 +274,86 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { {$dup_lead++;} } } + ##### Check for duplicate phone numbers in vicidial_list table for one list_id ##### + if ($dupcheck > 0) + { + $dup_lead=0; + $stmtA = "select llst_id from vicidial_list where phone_number='$phone_number' and list_id='$list_id' limit 1;"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $dup_lead_list = $aryA[0]; + $dup_lead++; + } + $sthA->finish(); + if ($dup_lead < 1) + { + if ($phone_list =~ /\|$phone_number$US$list_id\|/) + {$dup_lead++;} + } + } + ##### Check for duplicate phone numbers in vicidial_list table for all lists in a campaign ##### + if ($dupcheckcamp > 0) + { + $dup_lead=0; + $dup_lists=''; + + $stmtA = "select count(*) from vicidial_lists where list_id='$list_id';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + @aryA = $sthA->fetchrow_array; + $ci_recs = $aryA[0]; + $sthA->finish(); + if ($ci_recs > 0) + { + $stmtA = "select campaign_id from vicidial_lists where list_id='$list_id';"; + if($DBX){print STDERR "\n|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + @aryA = $sthA->fetchrow_array; + $dup_camp = $aryA[0]; + $sthA->finish(); + + $stmtA = "select list_id from vicidial_lists where campaign_id='$dup_camp';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $dup_lists .= "'$aryA[0]',"; + $rec_count++; + } + $sthA->finish(); + + chop($dup_lists); + $stmtA = "select list_id from vicidial_list where phone_number='$phone_number' and list_id IN($dup_lists) limit 1;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $dup_lead_list = "'$aryA[0]',"; + $rec_count++; + $dup_lead=1; + } + $sthA->finish(); + } + if ($dup_lead < 1) + { + if ($phone_list =~ /\|$phone_number$US$list_id\|/) + {$dup_lead++;} + } + } + if ( (length($phone_number)>6) && ($dup_lead < 1) ) { $phone_list .= "$phone_number$US$list_id|"; @@ -455,7 +562,7 @@ foreach $oWkS (@{$oBook->{Worksheet}}) { $good++; } else { - if ($bad < 10) {print "
record $total BAD- PHONE: $phone_number ROW: |$row[0]|\n";} + if ($bad < 10000) {print "
record $total BAD- PHONE: $phone_number ROW: |$row[0]| $dup_lead_list\n";} $bad++; } $total++; diff --git a/www/vicidial/new_listloader_superL.php b/www/vicidial/new_listloader_superL.php index 5473ce6b..629321ed 100644 --- a/www/vicidial/new_listloader_superL.php +++ b/www/vicidial/new_listloader_superL.php @@ -18,11 +18,12 @@ # 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 +# 70510-1518 - Added campaign and system duplicate check and phonecode override # # 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 = '70417-1059'; +$version = '2.0.4'; +$build = '70510-1518'; require("dbconnect.php"); @@ -105,6 +106,9 @@ if (isset($_GET["dupcheck"])) {$dupcheck=$_GET["dupcheck"];} elseif (isset($_POST["dupcheck"])) {$dupcheck=$_POST["dupcheck"];} if (isset($_GET["postalgmt"])) {$postalgmt=$_GET["postalgmt"];} elseif (isset($_POST["postalgmt"])) {$postalgmt=$_POST["postalgmt"];} +if (isset($_GET["phone_code_override"])) {$phone_code_override=$_GET["phone_code_override"];} + elseif (isset($_POST["phone_code_override"])) {$phone_code_override=$_POST["phone_code_override"];} + $phone_code_override = (preg_replace("/\D/","",$phone_code_override)); # $country_field=$_GET["country_field"]; if (!$country_field) {$country_field=$_POST["country_field"];} @@ -266,7 +270,7 @@ A.employee_standard { font-family: garamond, sans-serif; font-size: ".macfontfi -VICIDIAL ADMIN: Super Lead Loader +VICIDIAL ADMIN: Lead Loader
method=post onSubmit="ParseFileName()" enctype="multipart/form-data"> -
VICIDIAL LIST LOADER FUNCTIONALITY


-The VICIDIAL basic web-based lead loader is designed simply to take a lead file - up to 8MB in size - that is either tab or pipe delimited and load it into the vicidial_list table. There is also a new beta version super lead loader that allows for field choosing and TXT- Plain Text, CSV- Comma Separated Values and XLS- Excel file formats. The lead loader does not do data validation or check for duplicates in itself or other lists, so that is something you need to do before you load the leads. Also, make sure that you have created the list that these leads are to be under so that you can use them. There is also the matter of time-zone-coding these leads. You may want to increase the frequency that the ADMIN_adjust_GMTnow_on_leads.pl is being run in the cron on your Asterisk server so that any loaded leads can be coded faster. Here is a list of the fields in their proper order for the lead files: +The VICIDIAL basic web-based lead loader is designed simply to take a lead file - up to 8MB in size - that is either tab or pipe delimited and load it into the vicidial_list table. The lead loader allows for field choosing and TXT- Plain Text, CSV- Comma Separated Values and XLS- Excel file formats. The lead loader does not do data validation, but it does allow you to check for duplicates in itself, within the campaign or within the entire system. Also, make sure that you have created the list that these leads are to be under so that you can use them. Here is a list of the fields in their proper order for the lead files:
  1. Vendor Lead Code - shows up in the Vendor ID field of the GUI
  2. Source Code - internal use only for admins and DBAs @@ -2328,7 +2328,7 @@ The VICIDIAL basic web-based lead loader is designed simply to take a lead file
  3. Comments
-
NOTES: The Excel Lead loader functionality is enabled by a series of perl scripts and needs to have a properly configured /etc/astguiclient.conf file in place on the web server. Also, a couple perl modules must be loaded for it to work as well - OLE-Storage_Lite and Spreadsheet-ParseExcel. You can check for runtime errors in these by looking at your apache error_log file. +
NOTES: The Excel Lead loader functionality is enabled by a series of perl scripts and needs to have a properly configured /etc/astguiclient.conf file in place on the web server. Also, a couple perl modules must be loaded for it to work as well - OLE-Storage_Lite and Spreadsheet-ParseExcel. You can check for runtime errors in these by looking at your apache error_log file. Also, for duplication checks against gampaign lists, the list that has new leads going into it does need to be created in the system before you start to load the leads. @@ -3225,7 +3225,7 @@ if (strlen($campaigns_hh) > 1) { 1) { ?> -
>   > Show Lists     |     > Add A New List     |     > Search For A Lead     |     > Add Number To DNC     |     > Load New Leads
>   > Show Lists     |     > Add A New List     |     > Search For A Lead     |     > Add Number To DNC     |     > Load New Leads
+
@@ -299,13 +303,22 @@ function ParseFileName() { + + + + - + @@ -314,15 +327,14 @@ function ParseFileName() { - - +
Load leads from this file: List ID Override: (numbers only or leave blank for values in the file)
Phone Code Override: (numbers only or leave blank for values in the file)
File layout to use: Standard VICIDIAL    Custom layout
Lead Duplicate Check:
Lead Time Zone Lookup:
        
CLICK HERE TO GO TO THE BASIC LEAD LOADER         BACK TO ADMIN
SUPER LIST LOADER-     VERSION:     BUILD:
        BACK TO ADMINLIST LOADER-     VERSION:     BUILD:    
document.forms[0].leadfile.disabled=true;document.forms[0].list_id_override.disabled=true; document.forms[0].submit_file.disabled=true; document.forms[0].reload_page.disabled=true;"; + print ""; flush(); $total=0; $good=0; $bad=0; $dup=0; $post=0; $phone_list=''; @@ -350,6 +362,11 @@ function ParseFileName() { print "

LIST ID OVERRIDE FOR THIS FILE: $list_id_override

"; } + if (strlen($phone_code_override)>0) + { + print "

PHONE CODE OVERRIDE FOR THIS FILE: $phone_code_override

"; + } + while (!feof($file)) { $record++; $buffer=rtrim(fgets($file, 4096)); @@ -396,9 +413,78 @@ function ParseFileName() { # print "

LIST ID OVERRIDE FOR THIS FILE: $list_id_override

"; $list_id = $list_id_override; } + if (strlen($phone_code_override)>0) + { + $phone_code = $phone_code_override; + } - ##### Check for duplicate phone numbers in vicidial_list table ##### - if (eregi("DUP",$dupcheck)) + ##### Check for duplicate phone numbers in vicidial_list table for all lists in a campaign ##### + if (eregi("DUPCAMP",$dupcheck)) + { + $dup_lead=0; + $dup_lists=''; + $stmt="select campaign_id from vicidial_lists where list_id='$list_id';"; + $rslt=mysql_query($stmt, $link); + $ci_recs = mysql_num_rows($rslt); + if ($ci_recs > 0) + { + $row=mysql_fetch_row($rslt); + $dup_camp = $row[0]; + + $stmt="select list_id from vicidial_lists where campaign_id='$dup_camp';"; + $rslt=mysql_query($stmt, $link); + $li_recs = mysql_num_rows($rslt); + if ($li_recs > 0) + { + $L=0; + while ($li_recs > $L) + { + $row=mysql_fetch_row($rslt); + $dup_lists .= "'$row[0]',"; + $L++; + } + $dup_lists = eregi_replace(",$",'',$dup_lists); + + $stmt="select list_id from vicidial_list where phone_number='$phone_number' and list_id IN($dup_lists) limit 1;"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $dup_lead=1; + $row=mysql_fetch_row($rslt); + $dup_lead_list = $row[0]; + } + if ($dup_lead < 1) + { + if (eregi("$phone_number$US$list_id",$phone_list)) + {$dup_lead++; $dup++;} + } + } + } + } + + ##### Check for duplicate phone numbers in vicidial_list table entire database ##### + if (eregi("DUPSYS",$dupcheck)) + { + $dup_lead=0; + $stmt="select list_id from vicidial_list where phone_number='$phone_number';"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $dup_lead=1; + $row=mysql_fetch_row($rslt); + $dup_lead_list = $row[0]; + } + if ($dup_lead < 1) + { + if (eregi("$phone_number$US$list_id",$phone_list)) + {$dup_lead++; $dup++;} + } + } + + ##### Check for duplicate phone numbers in vicidial_list table for one list_id ##### + if (eregi("DUPLIST",$dupcheck)) { $dup_lead=0; $stmt="select count(*) from vicidial_list where phone_number='$phone_number' and list_id='$list_id';"; @@ -408,6 +494,7 @@ function ParseFileName() { { $row=mysql_fetch_row($rslt); $dup_lead = $row[0]; + $dup_lead_list = $list_id; } if ($dup_lead < 1) { @@ -441,7 +528,7 @@ function ParseFileName() { $good++; } else { - if ($bad < 10) {print "
record $total BAD- PHONE: $phone_number ROW: |$row[0]| DUP: $dup_lead\n";} + if ($bad < 10000) {print "
record $total BAD- PHONE: $phone_number ROW: |$row[0]| DUP: $dup_lead $dup_lead_list\n";} $bad++; } $total++; @@ -473,11 +560,17 @@ function ParseFileName() { { print "

LIST ID OVERRIDE FOR THIS FILE: $list_id_override

\n"; } + if (strlen($phone_code_override)>0) + { + print "

PHONE CODE OVERRIDE FOR THIS FILE: $phone_code_override

\n"; + } # print "|$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field, --forcelistid=$list_id_override --lead_file=$lead_file|"; $dupcheckCLI=''; $postalgmtCLI=''; - if (eregi("DUP",$dupcheck)) {$dupcheckCLI='--duplicate-check';} + if (eregi("DUPLIST",$dupcheck)) {$dupcheckCLI='--duplicate-check';} + if (eregi("DUPCAMP",$dupcheck)) {$dupcheckCLI='--duplicate-campaign-check';} + if (eregi("DUPSYS",$dupcheck)) {$dupcheckCLI='--duplicate-system-check';} if (eregi("POSTAL",$postalgmt)) {$postalgmtCLI='--postal-code-gmt';} - passthru("$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field, --forcelistid=$list_id_override --lead-file=$lead_file $postalgmtCLI $dupcheckCLI"); + passthru("$WeBServeRRooT/vicidial/listloader_super.pl $vendor_lead_code_field,$source_id_field,$list_id_field,$phone_code_field,$phone_number_field,$title_field,$first_name_field,$middle_initial_field,$last_name_field,$address1_field,$address2_field,$address3_field,$city_field,$state_field,$province_field,$postal_code_field,$country_code_field,$gender_field,$date_of_birth_field,$alt_phone_field,$email_field,$security_phrase_field,$comments_field, --forcelistid=$list_id_override --forcephonecode=$phone_code_override --lead-file=$lead_file $postalgmtCLI $dupcheckCLI"); } else { # copy($leadfile, "./vicidial_temp_file.csv"); $file=fopen("$lead_file", "r"); @@ -491,6 +584,11 @@ function ParseFileName() { print "

LIST ID OVERRIDE FOR THIS FILE: $list_id_override

"; } + if (strlen($phone_code_override)>0) + { + print "

PHONE CODE OVERRIDE FOR THIS FILE: $phone_code_override

"; + } + while($row=fgetcsv($file, 1000, ",")) { $pulldate=date("Y-m-d H:i:s"); @@ -528,12 +626,80 @@ function ParseFileName() { if (strlen($list_id_override)>0) { - # print "

LIST ID OVERRIDE FOR THIS FILE: $list_id_override

"; $list_id = $list_id_override; } + if (strlen($phone_code_override)>0) + { + $phone_code = $phone_code_override; + } - ##### Check for duplicate phone numbers in vicidial_list table ##### - if (eregi("DUP",$dupcheck)) + ##### Check for duplicate phone numbers in vicidial_list table for all lists in a campaign ##### + if (eregi("DUPCAMP",$dupcheck)) + { + $dup_lead=0; + $dup_lists=''; + $stmt="select campaign_id from vicidial_lists where list_id='$list_id';"; + $rslt=mysql_query($stmt, $link); + $ci_recs = mysql_num_rows($rslt); + if ($ci_recs > 0) + { + $row=mysql_fetch_row($rslt); + $dup_camp = $row[0]; + + $stmt="select list_id from vicidial_lists where campaign_id='$dup_camp';"; + $rslt=mysql_query($stmt, $link); + $li_recs = mysql_num_rows($rslt); + if ($li_recs > 0) + { + $L=0; + while ($li_recs > $L) + { + $row=mysql_fetch_row($rslt); + $dup_lists .= "'$row[0]',"; + $L++; + } + $dup_lists = eregi_replace(",$",'',$dup_lists); + + $stmt="select list_id from vicidial_list where phone_number='$phone_number' and list_id IN($dup_lists) limit 1;"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $dup_lead=1; + $row=mysql_fetch_row($rslt); + $dup_lead_list = $row[0]; + } + if ($dup_lead < 1) + { + if (eregi("$phone_number$US$list_id",$phone_list)) + {$dup_lead++; $dup++;} + } + } + } + } + + ##### Check for duplicate phone numbers in vicidial_list table entire database ##### + if (eregi("DUPSYS",$dupcheck)) + { + $dup_lead=0; + $stmt="select list_id from vicidial_list where phone_number='$phone_number';"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $dup_lead=1; + $row=mysql_fetch_row($rslt); + $dup_lead_list = $row[0]; + } + if ($dup_lead < 1) + { + if (eregi("$phone_number$US$list_id",$phone_list)) + {$dup_lead++; $dup++;} + } + } + + ##### Check for duplicate phone numbers in vicidial_list table for one list_id ##### + if (eregi("DUPLIST",$dupcheck)) { $dup_lead=0; $stmt="select count(*) from vicidial_list where phone_number='$phone_number' and list_id='$list_id';"; @@ -577,7 +743,7 @@ function ParseFileName() { $good++; } else { - if ($bad < 10) {print "
record $total BAD- PHONE: $phone_number ROW: |$row[0]| DUP: $dup_lead\n";} + if ($bad < 10000) {print "
record $total BAD- PHONE: $phone_number ROW: |$row[0]| DUP: $dup_lead\n";} $bad++; } $total++; @@ -637,6 +803,10 @@ if ($leadfile && filesize($LF_path)<=8388608) { { print "

LIST ID OVERRIDE FOR THIS FILE: $list_id_override

"; } + if (strlen($phone_code_override)>0) + { + print "

PHONE CODE OVERRIDE FOR THIS FILE: $phone_code_override

\n"; + } while (!feof($file)) { $record++; $buffer=rtrim(fgets($file, 4096)); @@ -680,12 +850,80 @@ if ($leadfile && filesize($LF_path)<=8388608) { if (strlen($list_id_override)>0) { - # print "

LIST ID OVERRIDE FOR THIS FILE: $list_id_override

"; $list_id = $list_id_override; } + if (strlen($phone_code_override)>0) + { + $phone_code = $phone_code_override; + } - ##### Check for duplicate phone numbers in vicidial_list table ##### - if (eregi("DUP",$dupcheck)) + ##### Check for duplicate phone numbers in vicidial_list table for all lists in a campaign ##### + if (eregi("DUPCAMP",$dupcheck)) + { + $dup_lead=0; + $dup_lists=''; + $stmt="select campaign_id from vicidial_lists where list_id='$list_id';"; + $rslt=mysql_query($stmt, $link); + $ci_recs = mysql_num_rows($rslt); + if ($ci_recs > 0) + { + $row=mysql_fetch_row($rslt); + $dup_camp = $row[0]; + + $stmt="select list_id from vicidial_lists where campaign_id='$dup_camp';"; + $rslt=mysql_query($stmt, $link); + $li_recs = mysql_num_rows($rslt); + if ($li_recs > 0) + { + $L=0; + while ($li_recs > $L) + { + $row=mysql_fetch_row($rslt); + $dup_lists .= "'$row[0]',"; + $L++; + } + $dup_lists = eregi_replace(",$",'',$dup_lists); + + $stmt="select list_id from vicidial_list where phone_number='$phone_number' and list_id IN($dup_lists) limit 1;"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $dup_lead=1; + $row=mysql_fetch_row($rslt); + $dup_lead_list = $row[0]; + } + if ($dup_lead < 1) + { + if (eregi("$phone_number$US$list_id",$phone_list)) + {$dup_lead++; $dup++;} + } + } + } + } + + ##### Check for duplicate phone numbers in vicidial_list table entire database ##### + if (eregi("DUPSYS",$dupcheck)) + { + $dup_lead=0; + $stmt="select list_id from vicidial_list where phone_number='$phone_number';"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $dup_lead=1; + $row=mysql_fetch_row($rslt); + $dup_lead_list = $row[0]; + } + if ($dup_lead < 1) + { + if (eregi("$phone_number$US$list_id",$phone_list)) + {$dup_lead++; $dup++;} + } + } + + ##### Check for duplicate phone numbers in vicidial_list table for one list_id ##### + if (eregi("DUPLIST",$dupcheck)) { $dup_lead=0; $stmt="select count(*) from vicidial_list where phone_number='$phone_number' and list_id='$list_id';"; @@ -729,7 +967,7 @@ if ($leadfile && filesize($LF_path)<=8388608) { $good++; } else { - if ($bad < 10) {print "
record $total BAD- PHONE: $phone_number ROW: |$row[0]| DUP: $dup_lead\n";} + if ($bad < 10000) {print "
record $total BAD- PHONE: $phone_number ROW: |$row[0]| DUP: $dup_lead\n";} $bad++; } $total++; @@ -768,9 +1006,11 @@ if ($leadfile && filesize($LF_path)<=8388608) { # echo "|$WeBServeRRooT/vicidial/listloader.pl --forcelistid=$list_id_override --lead-file=$lead_file|"; $dupcheckCLI=''; $postalgmtCLI=''; - if (eregi("DUP",$dupcheck)) {$dupcheckCLI='--duplicate-check';} + if (eregi("DUPLIST",$dupcheck)) {$dupcheckCLI='--duplicate-check';} + if (eregi("DUPCAMP",$dupcheck)) {$dupcheckCLI='--duplicate-campaign-check';} + if (eregi("DUPSYS",$dupcheck)) {$dupcheckCLI='--duplicate-system-check';} if (eregi("POSTAL",$postalgmt)) {$postalgmtCLI='--postal-code-gmt';} - passthru("$WeBServeRRooT/vicidial/listloader.pl --forcelistid=$list_id_override --lead-file=$lead_file $postalgmtCLI $dupcheckCLI"); + passthru("$WeBServeRRooT/vicidial/listloader.pl --forcelistid=$list_id_override --forcephonecode=$phone_code_override --lead-file=$lead_file $postalgmtCLI $dupcheckCLI"); } else @@ -795,6 +1035,10 @@ if ($leadfile && filesize($LF_path)<=8388608) { { print "

LIST ID OVERRIDE FOR THIS FILE: $list_id_override

"; } + if (strlen($phone_code_override)>0) + { + print "

PHONE CODE OVERRIDE FOR THIS FILE: $phone_code_override

"; + } while($row=fgetcsv($file, 1000, ",")) { $pulldate=date("Y-m-d H:i:s"); @@ -832,12 +1076,80 @@ if ($leadfile && filesize($LF_path)<=8388608) { if (strlen($list_id_override)>0) { - # print "

LIST ID OVERRIDE FOR THIS FILE: $list_id_override

"; $list_id = $list_id_override; } + if (strlen($phone_code_override)>0) + { + $phone_code = $phone_code_override; + } - ##### Check for duplicate phone numbers in vicidial_list table ##### - if (eregi("DUP",$dupcheck)) + ##### Check for duplicate phone numbers in vicidial_list table for all lists in a campaign ##### + if (eregi("DUPCAMP",$dupcheck)) + { + $dup_lead=0; + $dup_lists=''; + $stmt="select campaign_id from vicidial_lists where list_id='$list_id';"; + $rslt=mysql_query($stmt, $link); + $ci_recs = mysql_num_rows($rslt); + if ($ci_recs > 0) + { + $row=mysql_fetch_row($rslt); + $dup_camp = $row[0]; + + $stmt="select list_id from vicidial_lists where campaign_id='$dup_camp';"; + $rslt=mysql_query($stmt, $link); + $li_recs = mysql_num_rows($rslt); + if ($li_recs > 0) + { + $L=0; + while ($li_recs > $L) + { + $row=mysql_fetch_row($rslt); + $dup_lists .= "'$row[0]',"; + $L++; + } + $dup_lists = eregi_replace(",$",'',$dup_lists); + + $stmt="select list_id from vicidial_list where phone_number='$phone_number' and list_id IN($dup_lists) limit 1;"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $dup_lead=1; + $row=mysql_fetch_row($rslt); + $dup_lead_list = $row[0]; + } + if ($dup_lead < 1) + { + if (eregi("$phone_number$US$list_id",$phone_list)) + {$dup_lead++; $dup++;} + } + } + } + } + + ##### Check for duplicate phone numbers in vicidial_list table entire database ##### + if (eregi("DUPSYS",$dupcheck)) + { + $dup_lead=0; + $stmt="select list_id from vicidial_list where phone_number='$phone_number';"; + $rslt=mysql_query($stmt, $link); + $pc_recs = mysql_num_rows($rslt); + if ($pc_recs > 0) + { + $dup_lead=1; + $row=mysql_fetch_row($rslt); + $dup_lead_list = $row[0]; + } + if ($dup_lead < 1) + { + if (eregi("$phone_number$US$list_id",$phone_list)) + {$dup_lead++; $dup++;} + } + } + + ##### Check for duplicate phone numbers in vicidial_list table for one list_id ##### + if (eregi("DUPLIST",$dupcheck)) { $dup_lead=0; $stmt="select count(*) from vicidial_list where phone_number='$phone_number' and list_id='$list_id';"; @@ -881,7 +1193,7 @@ if ($leadfile && filesize($LF_path)<=8388608) { $good++; } else { - if ($bad < 10) {print "
record $total BAD- PHONE: $phone_number ROW: |$row[0]| DUP: $dup_lead\n";} + if ($bad < 10000) {print "
record $total BAD- PHONE: $phone_number ROW: |$row[0]| DUP: $dup_lead\n";} $bad++; } $total++; @@ -906,7 +1218,7 @@ if ($leadfile && filesize($LF_path)<=8388608) { } else { print "
"; flush(); - print "\r\n"; + print "
\r\n"; print " \r\n"; print " \r\n"; print " \r\n"; @@ -945,6 +1257,10 @@ if ($leadfile && filesize($LF_path)<=8388608) { { print "

LIST ID OVERRIDE FOR THIS FILE: $list_id_override

"; } + if (strlen($phone_code_override)>0) + { + print "

PHONE CODE OVERRIDE FOR THIS FILE: $phone_code_override

"; + } $buffer=rtrim(fgets($file, 4096)); $buffer=stripslashes($buffer); $row=explode($delimiter, eregi_replace("[\'\"]", "", $buffer)); @@ -1016,7 +1332,9 @@ if ($leadfile && filesize($LF_path)<=8388608) { # echo "|$WeBServeRRooT/vicidial/listloader_rowdisplay.pl --lead-file=$lead_file|"; $dupcheckCLI=''; $postalgmtCLI=''; - if (eregi("DUP",$dupcheck)) {$dupcheckCLI='--duplicate-check';} + if (eregi("DUPLIST",$dupcheck)) {$dupcheckCLI='--duplicate-check';} + if (eregi("DUPCAMP",$dupcheck)) {$dupcheckCLI='--duplicate-campaign-check';} + if (eregi("DUPSYS",$dupcheck)) {$dupcheckCLI='--duplicate-system-check';} if (eregi("POSTAL",$postalgmt)) {$postalgmtCLI='--postal-code-gmt';} passthru("$WeBServeRRooT/vicidial/listloader_rowdisplay.pl --lead-file=$lead_file $postalgmtCLI $dupcheckCLI"); } @@ -1043,6 +1361,10 @@ if ($leadfile && filesize($LF_path)<=8388608) { { print "

LIST ID OVERRIDE FOR THIS FILE: $list_id_override

"; } + if (strlen($phone_code_override)>0) + { + print "

PHONE CODE OVERRIDE FOR THIS FILE: $phone_code_override

"; + } $total=0; $good=0; $bad=0; $dup=0; $post=0; $phone_list=''; $row=fgetcsv($file, 1000, ","); @@ -1102,6 +1424,7 @@ if ($leadfile && filesize($LF_path)<=8388608) { print " \r\n"; print " \r\n"; print " \r\n"; + print " \r\n"; print " \r\n"; print " \r\n"; print "
VICIDIAL ColumnFile data        
\r\n";