Added manual dial agent skip lead logging to the user stats page
Small changes to bulk phone insert script, added Help section git-svn-id: svn://192.168.202.10@1695 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -644,6 +644,8 @@ OTHER CHANGES:
|
||||
|
||||
145. Added CSV download option to almost all reports.
|
||||
|
||||
146. Added manual dial agent skip lead logging to the user stats page
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -422,68 +422,304 @@ foreach(@FILES)
|
||||
open(Pout, ">$dir2/$FILEname$pipe")
|
||||
|| die "Can't open $dir2/$FILEname$pipe: $!\n";
|
||||
|
||||
$a=0; ### each line of input file counter ###
|
||||
$b=0; ### new records counter ###
|
||||
$c=0; ### no-phone counter ###
|
||||
$d=0; ###
|
||||
$e=0; ###
|
||||
$f=0; ###
|
||||
$g=0; ###
|
||||
$a=0; ### each line of input file counter ###
|
||||
$b=0; ### new records counter ###
|
||||
$c=0; ### no-phone counter ###
|
||||
$d=0; ###
|
||||
$e=0; ###
|
||||
$f=0; ###
|
||||
$g=0; ###
|
||||
|
||||
$rank='';
|
||||
$owner='';
|
||||
$rank='';
|
||||
$owner='';
|
||||
|
||||
#if ($DB)
|
||||
while (<infile>)
|
||||
{
|
||||
@m=@MT;
|
||||
# print "$a| $number\n";
|
||||
$number = $_;
|
||||
$raw_number = $number;
|
||||
chomp($number);
|
||||
# $number =~ s/,/\|/gi;
|
||||
$number =~ s/\t/\|/gi;
|
||||
$number =~ s/\'|\t|\r|\n|\l//gi;
|
||||
$number =~ s/\'|\t|\r|\n|\l//gi;
|
||||
$number =~ s/\",,,,,,,\"/\|\|\|\|\|\|\|/gi;
|
||||
$number =~ s/\",,,,,,\"/\|\|\|\|\|\|/gi;
|
||||
$number =~ s/\",,,,,\"/\|\|\|\|\|/gi;
|
||||
$number =~ s/\",,,,\"/\|\|\|\|/gi;
|
||||
$number =~ s/\",,,\"/\|\|\|/gi;
|
||||
$number =~ s/\",,\"/\|\|/gi;
|
||||
$number =~ s/\",\"/\|/gi;
|
||||
$number =~ s/\"//gi;
|
||||
@m = split(/\|/, $number);
|
||||
#if ($DB)
|
||||
while (<infile>)
|
||||
{
|
||||
@m=@MT;
|
||||
# print "$a| $number\n";
|
||||
$number = $_;
|
||||
$raw_number = $number;
|
||||
chomp($number);
|
||||
# $number =~ s/,/\|/gi;
|
||||
$number =~ s/\t/\|/gi;
|
||||
$number =~ s/\'|\t|\r|\n|\l//gi;
|
||||
$number =~ s/\'|\t|\r|\n|\l//gi;
|
||||
$number =~ s/\",,,,,,,\"/\|\|\|\|\|\|\|/gi;
|
||||
$number =~ s/\",,,,,,\"/\|\|\|\|\|\|/gi;
|
||||
$number =~ s/\",,,,,\"/\|\|\|\|\|/gi;
|
||||
$number =~ s/\",,,,\"/\|\|\|\|/gi;
|
||||
$number =~ s/\",,,\"/\|\|\|/gi;
|
||||
$number =~ s/\",,\"/\|\|/gi;
|
||||
$number =~ s/\",\"/\|/gi;
|
||||
$number =~ s/\"//gi;
|
||||
@m = split(/\|/, $number);
|
||||
|
||||
$format_set=0;
|
||||
$format_set=0;
|
||||
|
||||
|
||||
# This is the format for the ncacsv39 lead files <multi-lead insert format>
|
||||
#5200556,"00052555570016383767","SERVERS JR,JIM M","2915551802",1121.31,"627555120","77380","HSBC","SCRIPT4","6205554433","No Message","2915551802","16383767","","","","","","","","","","","","","","","6001","DLR3","549","","","","","","","","",""
|
||||
##### BEGIN ncacsv31 format #####
|
||||
# This is the format for the ncacsv39x lead files <multi-lead insert format>
|
||||
#5200556,"00052555570016383767","SERVERS JR,JIM M","2915551802",1121.31,"627555120","77380","HSBC","SCRIPT4","6205554433","No Message","2915551802","16383767","","","","","","","","","","","","","","","6001","DLR3","549","","","","","","","","",""
|
||||
|
||||
# field mappings:
|
||||
# $vendor_lead_code = 1 - acctid
|
||||
# $source_id = 2 - uniqueid
|
||||
# $first_name = 3 - first_name
|
||||
# $middle_initial = <blank>
|
||||
# $last_name = 3 - last_name
|
||||
# $province = 4 - acct main phone
|
||||
# $address2 = 5 - balance
|
||||
# $alt_phone = 6 - ssn
|
||||
# $postal_code = 7 - zip
|
||||
# $address1 = 8 - descrip
|
||||
# $address3 = 9 - script
|
||||
# $security_phrase = 10 - cid
|
||||
# $email = 37 - collectorid
|
||||
# $title = 29 - folderid
|
||||
# $state = <blank>
|
||||
# $country = <blank>
|
||||
# $gender = <blank>
|
||||
# $date_of_birth = <blank>
|
||||
# $comments = <blank>
|
||||
# $rank = <assigned by phone number type>
|
||||
# $owner = <assigned by phone number type>
|
||||
# $city = <assigned by phone number id>
|
||||
# field mappings:
|
||||
# $vendor_lead_code = 1 - acctid
|
||||
# $source_id = 2 - uniqueid
|
||||
# $first_name = 3 - first_name
|
||||
# $middle_initial = <blank>
|
||||
# $last_name = 3 - last_name
|
||||
# $province = <blank>
|
||||
# $address2 = 29 - collectorid
|
||||
# $address3 = 8 - account description
|
||||
# $alt_phone = 5 - balance
|
||||
# $postal_code = 7 - zip
|
||||
# $address1 = <blank>
|
||||
# $city = 9 - script
|
||||
# $security_phrase = <assigned by state lookup>
|
||||
# $email = 6 - ssn
|
||||
# $title = 27 - folderid
|
||||
# $state = <assigned by phone number areacode lookup>
|
||||
# $country = <blank>
|
||||
# $gender = <blank>
|
||||
# $date_of_birth = <blank>
|
||||
# $comments = <blank>
|
||||
# $rank = <assigned by phone number type>
|
||||
# $owner = <assigned by phone number type>
|
||||
|
||||
if ( ($format =~ /ncacsv31/) && ($format_set < 1) )
|
||||
{
|
||||
$number = $raw_number;
|
||||
chomp($number);
|
||||
$number =~ s/\t/\|/gi;
|
||||
$number =~ s/\'|\t|\r|\n|\l//gi;
|
||||
$number =~ s/\'|\t|\r|\n|\l//gi;
|
||||
$number =~ s/\",,,,,,,\"/\|\|\|\|\|\|\|/gi;
|
||||
$number =~ s/\",,,,,,\"/\|\|\|\|\|\|/gi;
|
||||
$number =~ s/\",,,,,\"/\|\|\|\|\|/gi;
|
||||
$number =~ s/\",,,,\"/\|\|\|\|/gi;
|
||||
$number =~ s/\",,,\"/\|\|\|/gi;
|
||||
$number =~ s/\",,\"/\|\|/gi;
|
||||
$number =~ s/\",\"/\|/gi;
|
||||
$number =~ s/,\"/\|/gi;
|
||||
$number =~ s/\",/\|/gi;
|
||||
$number =~ s/,/\|/gi;
|
||||
$number =~ s/\"//gi;
|
||||
@m = split(/\|/, $number);
|
||||
|
||||
if ($DBX) {print "ncacsv31($a) - $number\n";}
|
||||
|
||||
$vendor_lead_code = $m[0]; chomp($vendor_lead_code); # acctid
|
||||
$source_id = $m[1]; chomp($source_id); # uniqueid
|
||||
$list_id = '939';
|
||||
$phone_code = '1';
|
||||
$full_name = $m[2]; @name = split(/,/, $full_name);
|
||||
$first_name = $name[1]; chomp($first_name);
|
||||
$middle_initial = '';
|
||||
$last_name = $name[0]; chomp($last_name);
|
||||
$province = $m[3]; # acct main phone
|
||||
$address2 = $m[4]; # balance
|
||||
$alt_phone = $m[5]; chomp($alt_phone); $alt_phone =~ s/\D//gi; # ssn
|
||||
$postal_code = $m[6]; chomp($postal_code); $postal_code =~ s/\D//gi; # zip
|
||||
$address1 = $m[7]; # descrip
|
||||
$address3 = $m[8]; # script
|
||||
$security_phrase = $m[9]; chomp($security_phrase); $security_phrase =~ s/\D//gi; # cid
|
||||
$email = $m[36]; # collectorid
|
||||
$title = $m[28]; # folderid
|
||||
$phone_number = $m[3];
|
||||
$USarea = substr($phone_number, 0, 3);
|
||||
$state = '';
|
||||
$country = '';
|
||||
$gender = '';
|
||||
$date_of_birth = '';
|
||||
$comments = '';
|
||||
$called_count = '0';
|
||||
$status = 'NEW';
|
||||
$insert_date = $pulldate0;
|
||||
$rank = '';
|
||||
$owner = '';
|
||||
$entry_date = '';
|
||||
$multi_alt_phones = '';
|
||||
$phone_found=0;
|
||||
|
||||
|
||||
if (length($m[11]) > 9)
|
||||
{
|
||||
$phone_number = $m[11];
|
||||
$rank = '1';
|
||||
$owner = 'home';
|
||||
&cid_state_areacode; # lookup areacode-state-based CID
|
||||
print Pout "$vendor_lead_code|$source_id|$list_id|$phone_code|$phone_number|$title|$first_name|$middle|$last_name|$address1|$address2|$address3|$city|$state|$province|$postal_code|$country|$gender|$date_of_birth|$alt_phone|$email|$security_phrase|$owner|$called_count|$status|$entry_date|$rank|$owner|\n";
|
||||
$b++; $phone_found++;
|
||||
if ($DBX) {print " $b|$phone_found - $a|$phone_number|$city|$rank|$owner|$vendor_lead_code|$source_id\n";}
|
||||
}
|
||||
if (length($m[12]) > 9)
|
||||
{
|
||||
$phone_number = $m[12];
|
||||
$rank = '2';
|
||||
$owner = 'home2';
|
||||
&cid_state_areacode; # lookup areacode-state-based CID
|
||||
print Pout "$vendor_lead_code|$source_id|$list_id|$phone_code|$phone_number|$title|$first_name|$middle|$last_name|$address1|$address2|$address3|$city|$state|$province|$postal_code|$country|$gender|$date_of_birth|$alt_phone|$email|$security_phrase|$owner|$called_count|$status|$entry_date|$rank|$owner|\n";
|
||||
$b++; $phone_found++;
|
||||
if ($DBX) {print " $b|$phone_found - $a|$phone_number|$city|$rank|$owner|$vendor_lead_code|$source_id\n";}
|
||||
}
|
||||
if (length($m[13]) > 9)
|
||||
{
|
||||
$phone_number = $m[13];
|
||||
$rank = '3';
|
||||
$owner = 'work';
|
||||
&cid_state_areacode; # lookup areacode-state-based CID
|
||||
print Pout "$vendor_lead_code|$source_id|$list_id|$phone_code|$phone_number|$title|$first_name|$middle|$last_name|$address1|$address2|$address3|$city|$state|$province|$postal_code|$country|$gender|$date_of_birth|$alt_phone|$email|$security_phrase|$owner|$called_count|$status|$entry_date|$rank|$owner|\n";
|
||||
$b++; $phone_found++;
|
||||
if ($DBX) {print " $b|$phone_found - $a|$phone_number|$city|$rank|$owner|$vendor_lead_code|$source_id\n";}
|
||||
}
|
||||
if (length($m[14]) > 9)
|
||||
{
|
||||
$phone_number = $m[14];
|
||||
$rank = '4';
|
||||
$owner = 'work2';
|
||||
&cid_state_areacode; # lookup areacode-state-based CID
|
||||
print Pout "$vendor_lead_code|$source_id|$list_id|$phone_code|$phone_number|$title|$first_name|$middle|$last_name|$address1|$address2|$address3|$city|$state|$province|$postal_code|$country|$gender|$date_of_birth|$alt_phone|$email|$security_phrase|$owner|$called_count|$status|$entry_date|$rank|$owner|\n";
|
||||
$b++; $phone_found++;
|
||||
if ($DBX) {print " $b|$phone_found - $a|$phone_number|$city|$rank|$owner|$vendor_lead_code|$source_id\n";}
|
||||
}
|
||||
if (length($m[15]) > 9)
|
||||
{
|
||||
$phone_number = $m[15];
|
||||
$rank = '5';
|
||||
$owner = 'cell';
|
||||
&cid_state_areacode; # lookup areacode-state-based CID
|
||||
print Pout "$vendor_lead_code|$source_id|$list_id|$phone_code|$phone_number|$title|$first_name|$middle|$last_name|$address1|$address2|$address3|$city|$state|$province|$postal_code|$country|$gender|$date_of_birth|$alt_phone|$email|$security_phrase|$owner|$called_count|$status|$entry_date|$rank|$owner|\n";
|
||||
$b++; $phone_found++;
|
||||
if ($DBX) {print " $b|$phone_found - $a|$phone_number|$city|$rank|$owner|$vendor_lead_code|$source_id\n";}
|
||||
}
|
||||
if (length($m[16]) > 9)
|
||||
{
|
||||
$phone_number = $m[16];
|
||||
$rank = '6';
|
||||
$owner = 'cell2';
|
||||
&cid_state_areacode; # lookup areacode-state-based CID
|
||||
print Pout "$vendor_lead_code|$source_id|$list_id|$phone_code|$phone_number|$title|$first_name|$middle|$last_name|$address1|$address2|$address3|$city|$state|$province|$postal_code|$country|$gender|$date_of_birth|$alt_phone|$email|$security_phrase|$owner|$called_count|$status|$entry_date|$rank|$owner|\n";
|
||||
$b++; $phone_found++;
|
||||
if ($DBX) {print " $b|$phone_found - $a|$phone_number|$city|$rank|$owner|$vendor_lead_code|$source_id\n";}
|
||||
}
|
||||
if (length($m[17]) > 9)
|
||||
{
|
||||
$phone_number = $m[17];
|
||||
$rank = '7';
|
||||
$owner = 'alt1';
|
||||
&cid_state_areacode; # lookup areacode-state-based CID
|
||||
print Pout "$vendor_lead_code|$source_id|$list_id|$phone_code|$phone_number|$title|$first_name|$middle|$last_name|$address1|$address2|$address3|$city|$state|$province|$postal_code|$country|$gender|$date_of_birth|$alt_phone|$email|$security_phrase|$owner|$called_count|$status|$entry_date|$rank|$owner|\n";
|
||||
$b++; $phone_found++;
|
||||
if ($DBX) {print " $b|$phone_found - $a|$phone_number|$city|$rank|$owner|$vendor_lead_code|$source_id\n";}
|
||||
}
|
||||
if (length($m[18]) > 9)
|
||||
{
|
||||
$phone_number = $m[18];
|
||||
$rank = '8';
|
||||
$owner = 'alt2';
|
||||
&cid_state_areacode; # lookup areacode-state-based CID
|
||||
print Pout "$vendor_lead_code|$source_id|$list_id|$phone_code|$phone_number|$title|$first_name|$middle|$last_name|$address1|$address2|$address3|$city|$state|$province|$postal_code|$country|$gender|$date_of_birth|$alt_phone|$email|$security_phrase|$owner|$called_count|$status|$entry_date|$rank|$owner|\n";
|
||||
$b++; $phone_found++;
|
||||
if ($DBX) {print " $b|$phone_found - $a|$phone_number|$city|$rank|$owner|$vendor_lead_code|$source_id\n";}
|
||||
}
|
||||
if (length($m[19]) > 9)
|
||||
{
|
||||
$phone_number = $m[19];
|
||||
$rank = '9';
|
||||
$owner = 'alt3';
|
||||
&cid_state_areacode; # lookup areacode-state-based CID
|
||||
print Pout "$vendor_lead_code|$source_id|$list_id|$phone_code|$phone_number|$title|$first_name|$middle|$last_name|$address1|$address2|$address3|$city|$state|$province|$postal_code|$country|$gender|$date_of_birth|$alt_phone|$email|$security_phrase|$owner|$called_count|$status|$entry_date|$rank|$owner|\n";
|
||||
$b++; $phone_found++;
|
||||
if ($DBX) {print " $b|$phone_found - $a|$phone_number|$city|$rank|$owner|$vendor_lead_code|$source_id\n";}
|
||||
}
|
||||
if (length($m[20]) > 9)
|
||||
{
|
||||
$phone_number = $m[20];
|
||||
$rank = '10';
|
||||
$owner = 'trigger1';
|
||||
&cid_state_areacode; # lookup areacode-state-based CID
|
||||
print Pout "$vendor_lead_code|$source_id|$list_id|$phone_code|$phone_number|$title|$first_name|$middle|$last_name|$address1|$address2|$address3|$city|$state|$province|$postal_code|$country|$gender|$date_of_birth|$alt_phone|$email|$security_phrase|$owner|$called_count|$status|$entry_date|$rank|$owner|\n";
|
||||
$b++; $phone_found++;
|
||||
if ($DBX) {print " $b|$phone_found - $a|$phone_number|$city|$rank|$owner|$vendor_lead_code|$source_id\n";}
|
||||
}
|
||||
if (length($m[21]) > 9)
|
||||
{
|
||||
$phone_number = $m[21];
|
||||
$rank = '11';
|
||||
$owner = 'trigger2';
|
||||
&cid_state_areacode; # lookup areacode-state-based CID
|
||||
print Pout "$vendor_lead_code|$source_id|$list_id|$phone_code|$phone_number|$title|$first_name|$middle|$last_name|$address1|$address2|$address3|$city|$state|$province|$postal_code|$country|$gender|$date_of_birth|$alt_phone|$email|$security_phrase|$owner|$called_count|$status|$entry_date|$rank|$owner|\n";
|
||||
$b++; $phone_found++;
|
||||
if ($DBX) {print " $b|$phone_found - $a|$phone_number|$city|$rank|$owner|$vendor_lead_code|$source_id\n";}
|
||||
}
|
||||
if (length($m[22]) > 9)
|
||||
{
|
||||
$phone_number = $m[22];
|
||||
$rank = '12';
|
||||
$owner = 'skiphome';
|
||||
&cid_state_areacode; # lookup areacode-state-based CID
|
||||
print Pout "$vendor_lead_code|$source_id|$list_id|$phone_code|$phone_number|$title|$first_name|$middle|$last_name|$address1|$address2|$address3|$city|$state|$province|$postal_code|$country|$gender|$date_of_birth|$alt_phone|$email|$security_phrase|$owner|$called_count|$status|$entry_date|$rank|$owner|\n";
|
||||
$b++; $phone_found++;
|
||||
if ($DBX) {print " $b|$phone_found - $a|$phone_number|$city|$rank|$owner|$vendor_lead_code|$source_id\n";}
|
||||
}
|
||||
if (length($m[23]) > 9)
|
||||
{
|
||||
$phone_number = $m[23];
|
||||
$rank = '13';
|
||||
$owner = 'skipwork';
|
||||
&cid_state_areacode; # lookup areacode-state-based CID
|
||||
print Pout "$vendor_lead_code|$source_id|$list_id|$phone_code|$phone_number|$title|$first_name|$middle|$last_name|$address1|$address2|$address3|$city|$state|$province|$postal_code|$country|$gender|$date_of_birth|$alt_phone|$email|$security_phrase|$owner|$called_count|$status|$entry_date|$rank|$owner|\n";
|
||||
$b++; $phone_found++;
|
||||
if ($DBX) {print " $b|$phone_found - $a|$phone_number|$city|$rank|$owner|$vendor_lead_code|$source_id\n";}
|
||||
}
|
||||
if (length($m[24]) > 9)
|
||||
{
|
||||
$phone_number = $m[24];
|
||||
$rank = '14';
|
||||
$owner = 'skipcell';
|
||||
&cid_state_areacode; # lookup areacode-state-based CID
|
||||
print Pout "$vendor_lead_code|$source_id|$list_id|$phone_code|$phone_number|$title|$first_name|$middle|$last_name|$address1|$address2|$address3|$city|$state|$province|$postal_code|$country|$gender|$date_of_birth|$alt_phone|$email|$security_phrase|$owner|$called_count|$status|$entry_date|$rank|$owner|\n";
|
||||
$b++; $phone_found++;
|
||||
if ($DBX) {print " $b|$phone_found - $a|$phone_number|$city|$rank|$owner|$vendor_lead_code|$source_id\n";}
|
||||
}
|
||||
|
||||
if ($phone_found < 1)
|
||||
{
|
||||
if ($DB) {print "No-Phone entry: $a|$vendor_lead_code|$source_id\n";}
|
||||
$c++;
|
||||
}
|
||||
$format_set++;
|
||||
}
|
||||
##### END ncacsv31 format #####
|
||||
|
||||
|
||||
##### BEGIN ncacsv39 format #####
|
||||
# This is the format for the ncacsv39 lead files <multi-lead insert format>
|
||||
#5200556,"00052555570016383767","SERVERS JR,JIM M","2915551802",1121.31,"627555120","77380","HSBC","SCRIPT4","6205554433","No Message","2915551802","16383767","","","","","","","","","","","","","","","6001","DLR3","549","","","","","","","","",""
|
||||
|
||||
# field mappings:
|
||||
# $vendor_lead_code = 1 - acctid
|
||||
# $source_id = 2 - uniqueid
|
||||
# $first_name = 3 - first_name
|
||||
# $middle_initial = <blank>
|
||||
# $last_name = 3 - last_name
|
||||
# $province = 4 - acct main phone
|
||||
# $address2 = 5 - balance
|
||||
# $alt_phone = 6 - ssn
|
||||
# $postal_code = 7 - zip
|
||||
# $address1 = 8 - descrip
|
||||
# $address3 = 9 - script
|
||||
# $security_phrase = 10 - cid
|
||||
# $email = 37 - collectorid
|
||||
# $title = 29 - folderid
|
||||
# $state = <blank>
|
||||
# $country = <blank>
|
||||
# $gender = <blank>
|
||||
# $date_of_birth = <blank>
|
||||
# $comments = <blank>
|
||||
# $rank = <assigned by phone number type>
|
||||
# $owner = <assigned by phone number type>
|
||||
# $city = <assigned by phone number id>
|
||||
|
||||
if ( ($format =~ /ncacsv39/) && ($format_set < 1) )
|
||||
{
|
||||
@@ -669,35 +905,37 @@ foreach(@FILES)
|
||||
}
|
||||
$format_set++;
|
||||
}
|
||||
##### END ncacsv39 format #####
|
||||
|
||||
|
||||
# This is the format for the dccsv52 lead files <multi-lead insert format>
|
||||
#"BFRAME","RECORD_TYPE","LAST_NAME","FIRST_NAME","ADDR1","ADDR2","CITY","STATE","ZIP","ZIP4","ADDR_STATUS","DATE_PLACED","DATE_ADDED","DOB","LAST_LETTER","LAST_LETTER_DATE","LAST_WORKED","NEXT_ACTION_DATE","CAPTURE_CODE","CUR_CATEGORY","TIMES_DIALED","LAST_DIALED","TOTAL_PAID","DATE_LAST_PAID","NMBR_CALLS","NMBR_CONTACTS","NMBR_TIMES_WRKD","NMBR_LETTERS","STATUS_CODE","STATUS_DATE","SCORE","TIMES_TO_SERVICER","1ST-PMT-DEFAULT","TIME_ZONE","ORIG_CREDITOR","BALANCE","HOME_PHONE","WORK_PHONE","OTHER_PHONE","ACCT_OTHTEL2","ACCT_OTHTEL3","ACCT_OTHTEL4","ACCT_OTHTEL5","REF-NAME","REF-AD1","REF-AD2","REF-CITY","REF-ST","REF-POSTAL","REF-TEL1","REF-TEL2","SSN"
|
||||
#"II ACCT/1103566666 ","P","SMITH "," SAMMY","7838 W 109TH ST APT 12 "," ","OVERLAND PARK ","KS","66212","0000","G","20091110","20091110","19661216","NOLTTR","00000000","20091214","20091219","1000","03","000","00000000","000000000.00 ","00000000","0004","0003","0004","000","ACTIVE","20091110","0648","00"," ","C","HSBC ","000000692.09 ","9135551212","0000000000","0000000000","0000000000","0000000000","0000000000","0000000000","","","",""," "," "," "," ","578888888"
|
||||
##### BEGIN dccsv52 format #####
|
||||
# This is the format for the dccsv52 lead files <multi-lead insert format>
|
||||
#"BFRAME","RECORD_TYPE","LAST_NAME","FIRST_NAME","ADDR1","ADDR2","CITY","STATE","ZIP","ZIP4","ADDR_STATUS","DATE_PLACED","DATE_ADDED","DOB","LAST_LETTER","LAST_LETTER_DATE","LAST_WORKED","NEXT_ACTION_DATE","CAPTURE_CODE","CUR_CATEGORY","TIMES_DIALED","LAST_DIALED","TOTAL_PAID","DATE_LAST_PAID","NMBR_CALLS","NMBR_CONTACTS","NMBR_TIMES_WRKD","NMBR_LETTERS","STATUS_CODE","STATUS_DATE","SCORE","TIMES_TO_SERVICER","1ST-PMT-DEFAULT","TIME_ZONE","ORIG_CREDITOR","BALANCE","HOME_PHONE","WORK_PHONE","OTHER_PHONE","ACCT_OTHTEL2","ACCT_OTHTEL3","ACCT_OTHTEL4","ACCT_OTHTEL5","REF-NAME","REF-AD1","REF-AD2","REF-CITY","REF-ST","REF-POSTAL","REF-TEL1","REF-TEL2","SSN"
|
||||
#"II ACCT/1103566666 ","P","SMITH "," SAMMY","7838 W 109TH ST APT 12 "," ","OVERLAND PARK ","KS","66212","0000","G","20091110","20091110","19661216","NOLTTR","00000000","20091214","20091219","1000","03","000","00000000","000000000.00 ","00000000","0004","0003","0004","000","ACTIVE","20091110","0648","00"," ","C","HSBC ","000000692.09 ","9135551212","0000000000","0000000000","0000000000","0000000000","0000000000","0000000000","","","",""," "," "," "," ","578888888"
|
||||
|
||||
# field mappings:
|
||||
# $vendor_lead_code = 1 - BFRAME (number only)
|
||||
# $source_id = 1 - BFRAME
|
||||
# $first_name = 4 - FIRST_NAME
|
||||
# $middle_initial = <blank>
|
||||
# $last_name = 3 - LAST_NAME
|
||||
# $province = 36 - BALANCE
|
||||
# $address1 = 5 - ADDR1
|
||||
# $address2 = 6 - ADDR2
|
||||
# $city = 7 - CITY
|
||||
# $state = 8 - STATE
|
||||
# $postal_code = 9 - ZIP
|
||||
# $address3 = 35 - ORIG_CREDITOR
|
||||
# $date_of_birth = 14 - DOB
|
||||
# $alt_phone = 27&29 - NMBR_TIMES_WRKD & STATUS_CODE
|
||||
# $email = 52 - SSN
|
||||
# $title = 26 - NMBR_CONTACTS
|
||||
# $security_phrase = <assigned by state lookup>
|
||||
# $comments = 44 - REF-NAME
|
||||
# $country = <blank>
|
||||
# $gender = <blank>
|
||||
# $rank = <assigned by phone number type>
|
||||
# $owner = <assigned by phone number type>
|
||||
# field mappings:
|
||||
# $vendor_lead_code = 1 - BFRAME (number only)
|
||||
# $source_id = 1 - BFRAME
|
||||
# $first_name = 4 - FIRST_NAME
|
||||
# $middle_initial = <blank>
|
||||
# $last_name = 3 - LAST_NAME
|
||||
# $province = 36 - BALANCE
|
||||
# $address1 = 5 - ADDR1
|
||||
# $address2 = 6 - ADDR2
|
||||
# $city = 7 - CITY
|
||||
# $state = 8 - STATE
|
||||
# $postal_code = 9 - ZIP
|
||||
# $address3 = 35 - ORIG_CREDITOR
|
||||
# $date_of_birth = 14 - DOB
|
||||
# $alt_phone = 27&29 - NMBR_TIMES_WRKD & STATUS_CODE
|
||||
# $email = 52 - SSN
|
||||
# $title = 26 - NMBR_CONTACTS
|
||||
# $security_phrase = <assigned by state lookup>
|
||||
# $comments = 44 - REF-NAME
|
||||
# $country = <blank>
|
||||
# $gender = <blank>
|
||||
# $rank = <assigned by phone number type>
|
||||
# $owner = <assigned by phone number type>
|
||||
|
||||
if ( ($format =~ /dccsv52/) && ($format_set < 1) )
|
||||
{
|
||||
@@ -876,6 +1114,7 @@ foreach(@FILES)
|
||||
}
|
||||
$format_set++;
|
||||
}
|
||||
##### END dccsv52 format #####
|
||||
|
||||
|
||||
# This is the format for the standard lead files
|
||||
@@ -1041,18 +1280,51 @@ exit;
|
||||
|
||||
##### SUBROUTINES #####
|
||||
|
||||
sub cid_state {
|
||||
### look up the custom CID to use for this state
|
||||
$stmtA = "select cid from vicidial_custom_cid where state='$state';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if($DBX){print STDERR "\n$sthArows|$stmtA|\n";}
|
||||
if ($sthArows > 0)
|
||||
sub cid_state
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$security_phrase = $aryA[0];
|
||||
### look up the custom CID to use for this state
|
||||
$stmtA = "select cid from vicidial_custom_cid where state='$state';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if($DBX){print STDERR "\n$sthArows|$stmtA|\n";}
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$security_phrase = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
|
||||
sub cid_state_areacode
|
||||
{
|
||||
### look up the custom CID to use for this areacode's state
|
||||
$USarea = substr($phone_number, 0, 3);
|
||||
$state='';
|
||||
|
||||
$stmtA = "select state from vicidial_phone_codes where areacode='$USarea' and country_code='1';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if($DBX){print STDERR "\n$sthArows|$stmtA|\n";}
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$state = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$stmtA = "select cid from vicidial_custom_cid where state='$state';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if($DBX){print STDERR "\n$sthArows|$stmtA|\n";}
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$security_phrase = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
|
||||
@@ -2382,6 +2382,20 @@ label_email VARCHAR(40) default '',
|
||||
label_comments VARCHAR(40) default ''
|
||||
);
|
||||
|
||||
CREATE TABLE vicidial_agent_skip_log (
|
||||
user_skip_log_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
user VARCHAR(20),
|
||||
event_date DATETIME,
|
||||
lead_id INT(9) UNSIGNED,
|
||||
campaign_id VARCHAR(20) default '',
|
||||
previous_status VARCHAR(6) default '',
|
||||
previous_called_count SMALLINT(5) UNSIGNED default '0',
|
||||
index (user),
|
||||
index (event_date),
|
||||
index (campaign_id)
|
||||
);
|
||||
|
||||
|
||||
ALTER TABLE vicidial_campaign_server_stats ENGINE=MEMORY;
|
||||
|
||||
ALTER TABLE live_channels ENGINE=MEMORY;
|
||||
@@ -2535,7 +2549,7 @@ ALTER TABLE vicidial_closer_log_archive MODIFY closecallid INT(9) UNSIGNED NOT N
|
||||
|
||||
CREATE TABLE vicidial_outbound_ivr_log_archive LIKE vicidial_outbound_ivr_log;
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1286',db_schema_update_date=NOW();
|
||||
UPDATE system_settings SET db_schema_version='1287',db_schema_update_date=NOW();
|
||||
|
||||
GRANT RELOAD ON *.* TO cron@'%';
|
||||
GRANT RELOAD ON *.* TO cron@localhost;
|
||||
|
||||
@@ -876,3 +876,17 @@ ALTER TABLE vicidial_inbound_groups MODIFY next_agent_call VARCHAR(30) default '
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1286',db_schema_update_date=NOW() where db_schema_version < 1286;
|
||||
|
||||
CREATE TABLE vicidial_agent_skip_log (
|
||||
user_skip_log_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
user VARCHAR(20),
|
||||
event_date DATETIME,
|
||||
lead_id INT(9) UNSIGNED,
|
||||
campaign_id VARCHAR(20) default '',
|
||||
previous_status VARCHAR(6) default '',
|
||||
previous_called_count SMALLINT(5) UNSIGNED default '0',
|
||||
index (user),
|
||||
index (event_date),
|
||||
index (campaign_id)
|
||||
);
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1287',db_schema_update_date=NOW() where db_schema_version < 1287;
|
||||
|
||||
@@ -652,6 +652,22 @@ For AGENTDIRECT in-groups, you can put AGENTEXT in this field and the system wil
|
||||
You can also put AGENTEXT in this field if it is set to EXTENSION and the system will look up the user custom five field and send the call to that dialplan number||
|
||||
orders by the last time an agent was sent an inbound call. Results in agents receiving about the same number of calls overall||
|
||||
orders by the last time an agent finished an inbound call. AKA agent waiting longest receives first call||
|
||||
Servers||
|
||||
This is a list of the server IP addresses of existing servers in the system that you want the phone entries to be populated across. These must be valid IP addresses, they must be active in the system and you must put one per line in this text area input box||
|
||||
Phones||
|
||||
This is a list of the phone extensions that you want to be created on all of the servers listed above. The phone extensions should be letters and numbers only, with no special characters and you must put one per line in this text area box||
|
||||
Registration Password||
|
||||
This is the registration password that will be used for all of the phones that are created. For SIP and IAX2 protocol you should use a complex password for secutiry reasons||
|
||||
Login Password||
|
||||
This is the agent screen login password that will be used for all of the phones that are created||
|
||||
Create Alias Entries||
|
||||
Setting this option to YES will create a phones alias entry for each of the extensions listed above that will tie all of the same extension entries on each server together allowing phone login load balancing to work in the agent interface||
|
||||
Alias Suffix||
|
||||
This is the suffix that will be added to the extension to form the phone alias id. For example, if the extension is cc100 and the alias suffix is x, then the phone alias id used for that would be cc100x||
|
||||
Client Protocol||
|
||||
This is the phone protocol that will be used for all phones created when submitted. SIP and IAX2 are VOIP protocols that will create conf file entries to allow those phoens to register on the servers||
|
||||
Local GMT||
|
||||
This is the time zone that all of the phones will be created with||
|
||||
|
||||
|
||||
lead_report_export.php
|
||||
|
||||
@@ -285,12 +285,13 @@
|
||||
# 110430-1925 - Added post_phone_time_diff_alert campaign feature
|
||||
# 110625-0814 - Added screen_labels and label hide functions
|
||||
# 110626-0127 - Added queuemetrics_pe_phone_append
|
||||
# 110718-1158 - Added logging of skipped leads
|
||||
#
|
||||
|
||||
$version = '2.4-190';
|
||||
$build = '110626-0127';
|
||||
$version = '2.4-191';
|
||||
$build = '110718-1158';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=418;
|
||||
$mysql_log_count=419;
|
||||
$one_mysql_log=0;
|
||||
|
||||
require("dbconnect.php");
|
||||
@@ -2782,12 +2783,17 @@ if ($ACTION == 'manDiaLskip')
|
||||
else
|
||||
{
|
||||
$called_count = ($called_count - 1);
|
||||
### flag the lead as called and change it's status to INCALL
|
||||
### set the lead back to previous status and called_count
|
||||
$stmt = "UPDATE vicidial_list set status='$stage', called_count='$called_count',user='$user' where lead_id='$lead_id';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00042',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
### log the skip event
|
||||
$stmt = "INSERT INTO vicidial_agent_skip_log set campaign_id='$campaign', previous_status='$stage', previous_called_count='$called_count',user='$user', lead_id='$lead_id', event_date=NOW();";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00419',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
echo "LEAD REVERTED\n";
|
||||
}
|
||||
|
||||
@@ -358,10 +358,11 @@
|
||||
# 110626-2234 - Added queuemetrics_pe_phone_append
|
||||
# 110707-1412 - Added last_inbound_call_time and finish compatibility
|
||||
# 110713-0048 - Allow for full hiding of the phone number field label
|
||||
# 110718-1159 - Added logging of skipped leads
|
||||
#
|
||||
|
||||
$version = '2.4-335c';
|
||||
$build = '110713-0048';
|
||||
$version = '2.4-336c';
|
||||
$build = '110718-1159';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=73;
|
||||
$one_mysql_log=0;
|
||||
@@ -6654,7 +6655,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
}
|
||||
if (xmlhttp)
|
||||
{
|
||||
manDiaLskip_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLskip&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&stage=" + previous_dispo + "&called_count=" + previous_called_count;
|
||||
manDiaLskip_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLskip&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&stage=" + previous_dispo + "&called_count=" + previous_called_count + "&campaign=" + campaign;
|
||||
xmlhttp.open('POST', 'vdc_db_query.php');
|
||||
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
|
||||
xmlhttp.send(manDiaLskip_query);
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<?php
|
||||
# admin_phones_bulk_insert.php
|
||||
#
|
||||
# Copyright (C) 2010 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2011 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# this screen will insert phones into your multi-server system with aliases
|
||||
#
|
||||
# changes:
|
||||
# 101230-0501 - First Build
|
||||
# 110712-0932 - Added extension suffix exception for non-SIP/IAX phones, added HELP
|
||||
#
|
||||
|
||||
$admin_version = '2.4-1';
|
||||
$build = '101230-0501';
|
||||
$admin_version = '2.4-2';
|
||||
$build = '110712-0932';
|
||||
|
||||
|
||||
require("dbconnect.php");
|
||||
@@ -147,6 +148,69 @@ else
|
||||
<title>ADMINISTRATION: Phones Bulk Insert
|
||||
<?php
|
||||
|
||||
################################################################################
|
||||
##### BEGIN help section
|
||||
if ($action == "HELP")
|
||||
{
|
||||
?>
|
||||
</title>
|
||||
</head>
|
||||
<body bgcolor=white>
|
||||
<center>
|
||||
<TABLE WIDTH=98% BGCOLOR=#E6E6E6 cellpadding=2 cellspacing=4><TR><TD ALIGN=LEFT><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>
|
||||
<BR>
|
||||
<B>Bulk Phones Insert Help</B>
|
||||
<BR><BR>
|
||||
|
||||
<A NAME="servers">
|
||||
<BR>
|
||||
<B>Servers -</B> This is a list of the server IP addresses of existing servers in the system that you want the phone entries to be populated across. These must be valid IP addresses, they must be active in the system and you must put one per line in this text area input box.
|
||||
<BR><BR>
|
||||
|
||||
<A NAME="phones">
|
||||
<BR>
|
||||
<B>Phones -</B> This is a list of the phone extensions that you want to be created on all of the servers listed above. The phone extensions should be letters and numbers only, with no special characters and you must put one per line in this text area box.
|
||||
<BR><BR>
|
||||
|
||||
<A NAME="registration_password">
|
||||
<BR>
|
||||
<B>Registration Password -</B> This is the registration password that will be used for all of the phones that are created. For SIP and IAX2 protocol you should use a complex password for secutiry reasons.
|
||||
<BR><BR>
|
||||
|
||||
<A NAME="login_password">
|
||||
<BR>
|
||||
<B>Login Password -</B> This is the agent screen login password that will be used for all of the phones that are created.
|
||||
<BR><BR>
|
||||
|
||||
<A NAME="create_alias">
|
||||
<BR>
|
||||
<B>Create Alias Entries -</B> Setting this option to YES will create a phones alias entry for each of the extensions listed above that will tie all of the same extension entries on each server together allowing phone login load balancing to work in the agent interface.
|
||||
<BR><BR>
|
||||
|
||||
<A NAME="alias_suffix">
|
||||
<BR>
|
||||
<B>Alias Suffix -</B> This is the suffix that will be added to the extension to form the phone alias id. For example, if the extension is cc100 and the alias suffix is x, then the phone alias id used for that would be cc100x.
|
||||
<BR><BR>
|
||||
|
||||
<A NAME="protocol">
|
||||
<BR>
|
||||
<B>Client Protocol -</B> This is the phone protocol that will be used for all phones created when submitted. SIP and IAX2 are VOIP protocols that will create conf file entries to allow those phoens to register on the servers.
|
||||
<BR><BR>
|
||||
|
||||
<A NAME="gmt">
|
||||
<BR>
|
||||
<B>Local GMT -</B> This is the time zone that all of the phones will be created with.
|
||||
<BR><BR>
|
||||
|
||||
</TD></TR></TABLE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
<?php
|
||||
exit;
|
||||
}
|
||||
### END help section
|
||||
|
||||
|
||||
|
||||
##### BEGIN Set variables to make header show properly #####
|
||||
$ADD = '999998';
|
||||
@@ -181,6 +245,8 @@ if ($DB > 0)
|
||||
echo "$DB,$action,$servers,$phones,$conf_secret,$pass,$alias_option,$protocol,$logal_gmt,$alias_suffix\n<BR>";
|
||||
}
|
||||
|
||||
$NWB = " <a href=\"javascript:openNewWindow('$PHP_SELF?action=HELP";
|
||||
$NWE = "')\"><IMG SRC=\"help.gif\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP></A>";
|
||||
|
||||
|
||||
|
||||
@@ -195,17 +261,17 @@ if ($action == "BLANK")
|
||||
echo "<input type=hidden name=DB value=\"$DB\">\n";
|
||||
echo "<input type=hidden name=action value=ADD_PHONES_SUBMIT>\n";
|
||||
echo "<center><TABLE width=$section_width cellspacing=3>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Servers: <BR><BR> (one server_ip per line only)<BR></td><td align=left><TEXTAREA name=servers ROWS=10 COLS=20></TEXTAREA></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Phones: <BR><BR> (one extension per line only)<BR></td><td align=left><TEXTAREA name=phones ROWS=20 COLS=20></TEXTAREA></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Registration Password: </td><td align=left><input type=text name=conf_secret size=20 maxlength=20></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Login Password: </td><td align=left><input type=text name=pass size=20 maxlength=20></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Servers: <BR><BR> (one server_ip per line only)<BR></td><td align=left><TEXTAREA name=servers ROWS=10 COLS=20></TEXTAREA> $NWB#servers$NWE </td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Phones: <BR><BR> (one extension per line only)<BR></td><td align=left><TEXTAREA name=phones ROWS=20 COLS=20></TEXTAREA> $NWB#phones$NWE </td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Registration Password: </td><td align=left><input type=text name=conf_secret size=20 maxlength=20> $NWB#registration_password$NWE </td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Login Password: </td><td align=left><input type=text name=pass size=20 maxlength=20> $NWB#login_password$NWE </td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Create Alias Entries: </td><td align=left><select size=1 name=alias_option>\n";
|
||||
echo "<option selected>YES</option>";
|
||||
echo "<option>NO</option>";
|
||||
echo "</select></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Alias Suffix: </td><td align=left><input type=text name=alias_suffix size=2 maxlength=4></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Client Protocol: </td><td align=left><select size=1 name=protocol><option>SIP</option><option>Zap</option><option>IAX2</option><option>EXTERNAL</option></select></td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Local GMT: </td><td align=left><select size=1 name=local_gmt><option>12.75</option><option>12.00</option><option>11.00</option><option>10.00</option><option>9.50</option><option>9.00</option><option>8.00</option><option>7.00</option><option>6.50</option><option>6.00</option><option>5.75</option><option>5.50</option><option>5.00</option><option>4.50</option><option>4.00</option><option>3.50</option><option>3.00</option><option>2.00</option><option>1.00</option><option>0.00</option><option>-1.00</option><option>-2.00</option><option>-3.00</option><option>-3.50</option><option>-4.00</option><option selected>-5.00</option><option>-6.00</option><option>-7.00</option><option>-8.00</option><option>-9.00</option><option>-10.00</option><option>-11.00</option><option>-12.00</option></select> (Do NOT Adjust for DST)</td></tr>\n";
|
||||
echo "</select> $NWB#create_alias$NWE </td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Alias Suffix: </td><td align=left><input type=text name=alias_suffix size=2 maxlength=4> $NWB#alias_suffix$NWE </td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Client Protocol: </td><td align=left><select size=1 name=protocol><option>SIP</option><option>Zap</option><option>IAX2</option><option>EXTERNAL</option></select> $NWB#protocol$NWE </td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Local GMT: </td><td align=left><select size=1 name=local_gmt><option>12.75</option><option>12.00</option><option>11.00</option><option>10.00</option><option>9.50</option><option>9.00</option><option>8.00</option><option>7.00</option><option>6.50</option><option>6.00</option><option>5.75</option><option>5.50</option><option>5.00</option><option>4.50</option><option>4.00</option><option>3.50</option><option>3.00</option><option>2.00</option><option>1.00</option><option>0.00</option><option>-1.00</option><option>-2.00</option><option>-3.00</option><option>-3.50</option><option>-4.00</option><option selected>-5.00</option><option>-6.00</option><option>-7.00</option><option>-8.00</option><option>-9.00</option><option>-10.00</option><option>-11.00</option><option>-12.00</option></select> (Do NOT Adjust for DST) $NWB#gmt$NWE </td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=SUBMIT value=SUBMIT></td></tr>\n";
|
||||
echo "</TABLE></center>\n";
|
||||
echo "</TD></TR></TABLE>\n";
|
||||
@@ -316,7 +382,11 @@ if ($action == "ADD_PHONES_SUBMIT")
|
||||
if ($s >= 49) {$login_suffix = 'ax';}
|
||||
|
||||
$extension = $PN[$p];
|
||||
$dialplan_number = "$dialplan_prefix$PN[$p]"; $dialplan_number = preg_replace('/\D/', '', $dialplan_number);
|
||||
if ( ($protocol == 'SIP') or ($protocol == 'IAX2') )
|
||||
{$dialplan_number = "$dialplan_prefix$PN[$p]";}
|
||||
else
|
||||
{$dialplan_number = "$PN[$p]";}
|
||||
$dialplan_number = preg_replace('/\D/', '', $dialplan_number);
|
||||
$voicemail_id = $PN[$p]; $voicemail_id = preg_replace('/\D/', '', $voicemail_id);
|
||||
$phone_server_ip = $SN[$s];
|
||||
$login = "$PN[$p]$login_suffix";
|
||||
|
||||
+65
-25
@@ -30,6 +30,7 @@
|
||||
# 100914-1326 - Added lookup for user_level 7 users to set to reports only which will remove other admin links
|
||||
# 110218-1523 - Added searches display
|
||||
# 110703-1836 - Added download option
|
||||
# 110718-1204 - Added skipped manual dial leads display
|
||||
#
|
||||
|
||||
|
||||
@@ -989,6 +990,42 @@ if ($did < 1)
|
||||
$MAIN.="</TABLE><BR><BR>\n";
|
||||
}
|
||||
|
||||
if ($did < 1)
|
||||
{
|
||||
##### vicidial agent manual dial lead preview skips for this time period #####
|
||||
|
||||
$MAIN.="<B>PREVIEW LEAD SKIPS FOR THIS TIME PERIOD: (10000 record limit) <a href='$download_link&file_download=11'>[DOWNLOAD]</a></B>\n";
|
||||
$MAIN.="<TABLE width=750 cellspacing=0 cellpadding=1>\n";
|
||||
$MAIN.="<tr><td><font size=1># </td><td NOWRAP><font size=2>DATE/TIME </td><td align=right NOWRAP><font size=2> LEAD ID </td><td align=right NOWRAP><font size=2> STATUS </td><td align=right NOWRAP><font size=2> COUNT </td><td align=right NOWRAP><font size=2> CAMPAIGN</td></tr>\n";
|
||||
$CSV_text11.="\"PREVIEW LEAD SKIPS FOR THIS TIME PERIOD: (10000 record limit)\"\n";
|
||||
$CSV_text11.="\"\",\"#\",\"DATE/TIME\",\"LEAD ID\",\"STATUS\",\"COUNT\",\"CAMPAIGN\"\n";
|
||||
|
||||
$stmt="select user,event_date,lead_id,campaign_id,previous_status,previous_called_count from vicidial_agent_skip_log where user='" . mysql_real_escape_string($user) . "' and event_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and event_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' order by event_date desc limit 10000;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$logs_to_print = mysql_num_rows($rslt);
|
||||
|
||||
$u=0;
|
||||
while ($logs_to_print > $u)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if (eregi("1$|3$|5$|7$|9$", $u))
|
||||
{$bgcolor='bgcolor="#B9CBFD"';}
|
||||
else
|
||||
{$bgcolor='bgcolor="#9BB9FB"';}
|
||||
|
||||
$u++;
|
||||
$MAIN.="<tr $bgcolor>";
|
||||
$MAIN.="<td><font size=1>$u</td>";
|
||||
$MAIN.="<td><font size=2>$row[1]</td>";
|
||||
$MAIN.="<td align=right><font size=2> <A HREF=\"admin_modify_lead.php?lead_id=$row[2]\" target=\"_blank\">$row[2]</A> </td>\n";
|
||||
$MAIN.="<td align=right><font size=2> $row[4] </td>\n";
|
||||
$MAIN.="<td align=right><font size=2> $row[5] </td>\n";
|
||||
$MAIN.="<td align=right><font size=2> $row[3] </td></tr>\n";
|
||||
$CSV_text11.="\"\",\"$u\",\"$row[1]\",\"$row[2]\",\"$row[4]\",\"$row[5]\",\"$row[3]\"\n";
|
||||
}
|
||||
$MAIN.="</TABLE><BR><BR>\n";
|
||||
}
|
||||
|
||||
|
||||
$ENDtime = date("U");
|
||||
|
||||
@@ -1004,34 +1041,37 @@ $MAIN.="</body>";
|
||||
$MAIN.="</html>";
|
||||
|
||||
|
||||
if ($file_download>0) {
|
||||
$FILE_TIME = date("Ymd-His");
|
||||
$CSVfilename = "user_stats_$US$FILE_TIME.csv";
|
||||
$CSV_var="CSV_text".$file_download;
|
||||
$CSV_text=preg_replace('/^\s+/', '', $$CSV_var);
|
||||
$CSV_text=preg_replace('/\n\s+,/', ',', $CSV_text);
|
||||
$CSV_text=preg_replace('/ +\"/', '"', $CSV_text);
|
||||
$CSV_text=preg_replace('/\" +/', '"', $CSV_text);
|
||||
// We'll be outputting a TXT file
|
||||
header('Content-type: application/octet-stream');
|
||||
if ($file_download>0)
|
||||
{
|
||||
$FILE_TIME = date("Ymd-His");
|
||||
$CSVfilename = "user_stats_$US$FILE_TIME.csv";
|
||||
$CSV_var="CSV_text".$file_download;
|
||||
$CSV_text=preg_replace('/^\s+/', '', $$CSV_var);
|
||||
$CSV_text=preg_replace('/\n\s+,/', ',', $CSV_text);
|
||||
$CSV_text=preg_replace('/ +\"/', '"', $CSV_text);
|
||||
$CSV_text=preg_replace('/\" +/', '"', $CSV_text);
|
||||
// We'll be outputting a TXT file
|
||||
header('Content-type: application/octet-stream');
|
||||
|
||||
// It will be called LIST_101_20090209-121212.txt
|
||||
header("Content-Disposition: attachment; filename=\"$CSVfilename\"");
|
||||
header('Expires: 0');
|
||||
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
||||
header('Pragma: public');
|
||||
ob_clean();
|
||||
flush();
|
||||
// It will be called LIST_101_20090209-121212.txt
|
||||
header("Content-Disposition: attachment; filename=\"$CSVfilename\"");
|
||||
header('Expires: 0');
|
||||
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
||||
header('Pragma: public');
|
||||
ob_clean();
|
||||
flush();
|
||||
|
||||
echo "$CSV_text";
|
||||
echo "$CSV_text";
|
||||
|
||||
exit;
|
||||
} else {
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
echo $HEADER;
|
||||
require("admin_header.php");
|
||||
echo $MAIN;
|
||||
exit;
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
echo $HEADER;
|
||||
require("admin_header.php");
|
||||
echo $MAIN;
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user