Added RANK and OWNER as fields in vicidial_list, and as sort by options in campaign screen

Added no-hopper dialing option for MANUAL and INBOUND_MAN campaigns
Added owner dialing for agents to have their own leads, or shared group/territory leads, within a single list and campaign
Added list reset times option to automatically reset lists at pre-set times during the day
Fixed leave-3way-call issue if customer is parked

git-svn-id: svn://192.168.202.10@1189 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2009-07-23 19:06:58 +00:00
parent 5d130e7a4a
commit 72d1a47a3f
26 changed files with 2696 additions and 1656 deletions
+28
View File
@@ -134,6 +134,34 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
35. Added a Re-Queue Call button to send the current call back to an AGENTDIRECT
in-group for the agent to take later
36. Added rank and owner to the vicidial_list table. the CLI lead loader has
a new stdrankowner format to add these fields in lead files. Also, added
these fields to the web-based lead loader formats and field chooser.
Related to this, RANK and OWNER are now lead order options in the
campaign screen.
37. Added automatic list reset option to List Modification screen. You can enter
multiple times, and the leads in the list will be reset at those times.
38. Added no-hopper dialing option for MANUAL and INBOUND_MAN campaigns. If This
is enabled, the hopper will not run for this campaign. This option is
only available when the dial method is set to MANUAL or INBOUND_MAN. It
is recommended that you do not enable this option if you have a very
large lead database, over 100,000 leads. With No Hopper Dialing, the
following features do not work: lead recycling, auto-alt-dialing, list
mix, list ordering with Xth NEW. If you want to use Owner Only Dialing
you must have No Hopper Dialing enabled. Default is N for disabled.
39. Added lead owner option to restrict dialing within a list to the owner of a
lead only. If This is enabled, the agent will only receive leads that
they are within the ownership parameters for. If this is set to USER
then the agent must be the user defined in the database as the owner of
this lead. If this is set to TERRITORY then the owner of the lead must
match the territory listed in the User Modification screen for this
agent. If this is set to USER_GROUP then the owner of the lead must
match the user group that the agent is a member of. For this feature to
work the dial method must be set to MANUAL or INBOUND_MAN and No Hopper
Dialing must be enabled. Default is NONE for disabled.
+14 -2
View File
@@ -1334,7 +1334,13 @@ if ( ($agent_search_method =~ /^SO|^LO/) && ($skipLOSO < 1) )
$qp_groupWAIT .= "closer_campaigns NOT LIKE \"% $aryA[0] %\" ";
$dbc++;
}
chop($qp_groupWAIT_aco);
if (length($qp_groupWAIT_aco)>2)
{chop($qp_groupWAIT_aco);}
else
{
$qp_groupWAIT_aco="''";
$qp_groupWAIT = "closer_campaigns != ''";
}
$qp_groupWAIT_SQL = "and ($qp_groupWAIT)";
$qp_groupWAIT_aco_SQL = "and vicidial_live_inbound_agents.group_id NOT IN($qp_groupWAIT_aco)";
@@ -1674,7 +1680,13 @@ if ($agent_search_method =~ /^LO|^LB/)
$qp_groupWAIT .= "closer_campaigns NOT LIKE \"% $aryA[0] %\" ";
$dbc++;
}
chop($qp_groupWAIT_aco);
if (length($qp_groupWAIT_aco)>2)
{chop($qp_groupWAIT_aco);}
else
{
$qp_groupWAIT_aco="''";
$qp_groupWAIT = "closer_campaigns != ''";
}
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
+6 -1
View File
@@ -65,6 +65,7 @@
# 90628-1138 - Added more variable options for Cepstral TTS generation
# 90630-2250 - Added more Sangoma CDP statuses
# 90702-2240 - Added option to send to remote agent as phone*vendor_id
# 90721-1137 - Added rank and owner as vicidial_list fields
#
$script = 'agi-VDAD_ALL_outbound.agi';
@@ -462,7 +463,7 @@ if ($affected_rows > 0)
### if there are TTS audio files run this
if ($t > 0)
{
$stmtA = "SELECT lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,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,called_count,last_local_call_time FROM vicidial_list where lead_id='$CIDlead_id';";
$stmtA = "SELECT lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,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,called_count,last_local_call_time,rank,owner FROM vicidial_list where lead_id='$CIDlead_id';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -499,6 +500,8 @@ if ($affected_rows > 0)
$TTS_comments = $aryA[26];
$TTS_called_count = $aryA[27];
$TTS_last_local_call_time = $aryA[28];
$TTS_rank = $aryA[29];
$TTS_owner = $aryA[30];
}
$sthA->finish();
@@ -545,6 +548,8 @@ if ($affected_rows > 0)
$TTS_text[$s] =~ s/--A--comments--B--/$TTS_comments/gi;
$TTS_text[$s] =~ s/--A--called_count--B--/$TTS_called_count/gi;
$TTS_text[$s] =~ s/--A--last_local_call_time--B--/$TTS_last_local_call_time/gi;
$TTS_text[$s] =~ s/--A--rank--B--/$TTS_rank/gi;
$TTS_text[$s] =~ s/--A--owner--B--/$TTS_owner/gi;
$TTS_text[$s] =~ s/[^,\.\<\>\'\/\=\_ 0-9a-zA-Z]//gi;
$TTS_textRAW[$s] = $TTS_text[$s];
$TTS_text[$s] =~ s/ /\\ /gi;
+67 -2
View File
@@ -5,7 +5,13 @@
# Designed to keep the astGUIclient processes alive and check every minute
# Replaces all other ADMIN_keepalive scripts
# Uses /etc/astguiclient.conf file to know which processes to keepalive
# Also, this script generates Asterisk conf files and reloads Asterisk
#
# Other functions of this program:
# - Launches the timeclock auto-logout process
# - Generates Asterisk conf files and reloads Asterisk
# - Synchronizes the audio store files
# - Runs trigger processes at defined times
# - Auto reset lists at defined times
#
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
@@ -30,12 +36,26 @@
# 90622-2146 - Added 83047777777777 for dynamic agent alert extension
# 90630-2259 - Added vicidial_process_triggers functionality
# 90713-0140 - Changed direct dial phone extensions to failover to voicemail forwarder
# 90722-1102 - Added list reset by time option
#
$DB=0; # Debug flag
$MT[0]=''; $MT[1]='';
@psline=@MT;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year = ($year + 1900);
$mon++;
$wtoday = $wday;
if ($mon < 10) {$mon = "0$mon";}
if ($mday < 10) {$mday = "0$mday";}
if ($hour < 10) {$Fhour = "0$hour";}
if ($min < 10) {$min = "0$min";}
if ($sec < 10) {$sec = "0$sec";}
$now_date = "$year-$mon-$mday $hour:$min:$sec";
$reset_test = "$hour$min";
### begin parsing run-time options ###
if (length($ARGV[0])>1)
{
@@ -460,7 +480,6 @@ if ($timeclock_auto_logout > 0)
################################################################################
##### START Creation of auto-generated conf files
################################################################################
@@ -1503,6 +1522,52 @@ if ($sthBrows > 0)
################################################################################
##### BEGIN reset lists
################################################################################
$stmtA = "SELECT list_id FROM vicidial_lists where active='Y' and reset_time LIKE \"%$reset_test%\";";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthBrows=$sthA->rows;
$i=0;
while ($sthBrows > $i)
{
@aryA = $sthA->fetchrow_array;
$list_id[$i] = "$aryA[0]";
$i++;
}
$sthA->finish();
if ($DBX) {print "RESET LIST: $i|$reset_test";}
$i=0;
while ($sthBrows > $i)
{
$stmtA="UPDATE vicidial_list set called_since_last_reset='N' where list_id='$list_id[$i]';";
$affected_rows = $dbhA->do($stmtA);
$SQL_log = "$stmtA|";
$SQL_log =~ s/;|\\|\'|\"//gi;
if ($DB) {print "DONE\n";}
if ($DB) {print "$trigger_results\n";}
$stmtA="INSERT INTO vicidial_admin_log set event_date='$now_date', user='VDAD', ip_address='1.1.1.1', event_section='LISTS', event_type='RESET', record_id='$list_id[$i]', event_code='ADMIN RESET LIST', event_sql=\"$SQL_log\", event_notes='$affected_rows leads reset';";
$Iaffected_rows = $dbhA->do($stmtA);
if ($DB) {print "FINISHED: $affected_rows|$Iaffected_rows|$stmtA";}
$i++;
}
################################################################################
##### END reset lists
################################################################################
if ($DB) {print "DONE\n";}
exit;
File diff suppressed because it is too large Load Diff
+10 -5
View File
@@ -20,6 +20,7 @@
# 90620-0900 - Formatting fixes
# 90627-0757 - Added time addition when transfer recordings is enabled
# 90710-0514 - Fixes for data output formatting changes
# 90721-1314 - Added rank and owner as vicidial_list fields
#
$txt = '.txt';
@@ -428,7 +429,7 @@ $TOTAL_SALES=0;
###########################################################################
########### CURRENT DAY SALES GATHERING outbound-only: vicidial_log ######
###########################################################################
$stmtA = "select vicidial_log.user,first_name,last_name,address1,address2,city,state,postal_code,vicidial_list.phone_number,vicidial_list.email,security_phrase,vicidial_list.comments,call_date,vicidial_list.lead_id,vicidial_users.full_name,vicidial_log.status,vicidial_list.vendor_lead_code,vicidial_list.source_id,vicidial_log.list_id,title,address3,last_local_call_time,uniqueid,length_in_sec from vicidial_list,vicidial_log,vicidial_users where campaign_id IN($campaignSQL) $sale_statusesSQL and call_date > '$shipdate 00:00:01' and call_date < '$shipdate 23:59:59' and vicidial_log.lead_id=vicidial_list.lead_id and vicidial_users.user=vicidial_log.user order by call_date;";
$stmtA = "select vicidial_log.user,first_name,last_name,address1,address2,city,state,postal_code,vicidial_list.phone_number,vicidial_list.email,security_phrase,vicidial_list.comments,call_date,vicidial_list.lead_id,vicidial_users.full_name,vicidial_log.status,vicidial_list.vendor_lead_code,vicidial_list.source_id,vicidial_log.list_id,title,address3,last_local_call_time,uniqueid,length_in_sec,vicidial_list.rank,vicidial_list.owner from vicidial_list,vicidial_log,vicidial_users where campaign_id IN($campaignSQL) $sale_statusesSQL and call_date > '$shipdate 00:00:01' and call_date < '$shipdate 23:59:59' and vicidial_log.lead_id=vicidial_list.lead_id and vicidial_users.user=vicidial_log.user order by call_date;";
#$stmtA = "select vicidial_users.user,first_name,last_name,address1,address2,city,state,postal_code,phone_number,email,security_phrase,comments,last_local_call_time,lead_id,vicidial_users.full_name,status,vendor_lead_code,source_id,list_id,title,address3,last_local_call_time from vicidial_list,vicidial_users where list_id NOT IN('999','998') $sale_statusesSQL and called_count > 0 and vicidial_users.user=vicidial_list.user;";
if ($DB) {print "|$stmtA|\n";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
@@ -463,6 +464,8 @@ while ($sthArows > $rec_count)
$vicidial_id = $aryA[22];
$uniqueid = $aryA[22];
$length_in_sec = $aryA[23];
$rank = $aryA[24];
$owner = $aryA[25];
$queue_seconds = '0';
$closer='';
@@ -478,7 +481,7 @@ if (length($with_inboundSQL)>3)
###########################################################################
########### CURRENT DAY SALES GATHERING inbound-only: vicidial_closer_log ######
###########################################################################
$stmtA = "select vicidial_closer_log.user,first_name,last_name,address1,address2,city,state,postal_code,vicidial_list.phone_number,vicidial_list.email,security_phrase,vicidial_list.comments,call_date,vicidial_list.lead_id,vicidial_users.full_name,vicidial_closer_log.status,vicidial_list.vendor_lead_code,vicidial_list.source_id,vicidial_closer_log.list_id,campaign_id,title,address3,last_local_call_time,xfercallid,closecallid,uniqueid,length_in_sec,queue_seconds from vicidial_list,vicidial_closer_log,vicidial_users where campaign_id IN($with_inboundSQL) $close_statusesSQL and call_date > '$shipdate 00:00:01' and call_date < '$shipdate 23:59:59' and vicidial_closer_log.lead_id=vicidial_list.lead_id and vicidial_users.user=vicidial_closer_log.user order by call_date;";
$stmtA = "select vicidial_closer_log.user,first_name,last_name,address1,address2,city,state,postal_code,vicidial_list.phone_number,vicidial_list.email,security_phrase,vicidial_list.comments,call_date,vicidial_list.lead_id,vicidial_users.full_name,vicidial_closer_log.status,vicidial_list.vendor_lead_code,vicidial_list.source_id,vicidial_closer_log.list_id,campaign_id,title,address3,last_local_call_time,xfercallid,closecallid,uniqueid,length_in_sec,queue_seconds,vicidial_list.rank,vicidial_list.owner from vicidial_list,vicidial_closer_log,vicidial_users where campaign_id IN($with_inboundSQL) $close_statusesSQL and call_date > '$shipdate 00:00:01' and call_date < '$shipdate 23:59:59' and vicidial_closer_log.lead_id=vicidial_list.lead_id and vicidial_users.user=vicidial_closer_log.user order by call_date;";
if ($DB) {print "|$stmtA|\n";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -515,6 +518,8 @@ if (length($with_inboundSQL)>3)
$uniqueid = $aryA[25];
$length_in_sec = $aryA[26];
$queue_seconds = $aryA[27];
$rank = $aryA[28];
$owner = $aryA[29];
$user = '';
$agent_name='';
@@ -858,17 +863,17 @@ sub select_format_loop
if ($output_format =~ /^pipe-standard$/)
{
$str = "$first_name|$last_name|$address1|$address2|$city|$state|$postal_code|$phone_number|$email|$security|$comments|$call_date|$lead_id|$list_id|$user|$agent_name|$status|$vendor_id|$source_id|$campaign|$campaign_id|$ivr_id|$closer|$closer_name|\n";
$str = "$first_name|$last_name|$address1|$address2|$city|$state|$postal_code|$phone_number|$email|$security|$comments|$call_date|$lead_id|$list_id|$user|$agent_name|$status|$vendor_id|$source_id|$campaign|$campaign_id|$ivr_id|$closer|$closer_name|$rank|$owner|\n";
}
if ($output_format =~ /^csv-standard$/)
{
$str = "\"$first_name\",\"$last_name\",\"$address1\",\"$address2\",\"$city\",\"$state\",\"$postal_code\",\"$phone_number\",\"$email\",\"$security\",\"$comments\",\"$call_date\",\"$lead_id\",\"$list_id\",\"$user\",\"$agent_name\",\"$status\",\"$vendor_id\",\"$source_id\",\"$campaign\",\"$campaign_id\",\"$ivr_id\",\"$closer\",\"$closer_name\"\r\n";
$str = "\"$first_name\",\"$last_name\",\"$address1\",\"$address2\",\"$city\",\"$state\",\"$postal_code\",\"$phone_number\",\"$email\",\"$security\",\"$comments\",\"$call_date\",\"$lead_id\",\"$list_id\",\"$user\",\"$agent_name\",\"$status\",\"$vendor_id\",\"$source_id\",\"$campaign\",\"$campaign_id\",\"$ivr_id\",\"$closer\",\"$closer_name\",\"$rank\",\"$owner\"\r\n";
}
if ($output_format =~ /^tab-standard$/)
{
$str = "$first_name\t$last_name\t$address1\t$address2\t$city\t$state\t$postal_code\t$phone_number\t$email\t$security\t$comments\t$call_date\t$lead_id\t$list_id\t$user\t$agent_name\t$status\t$vendor_id\t$source_id\t$campaign\t$campaign_id\t$ivr_id\t$closer\t$closer_name\t\n";
$str = "$first_name\t$last_name\t$address1\t$address2\t$city\t$state\t$postal_code\t$phone_number\t$email\t$security\t$comments\t$call_date\t$lead_id\t$list_id\t$user\t$agent_name\t$status\t$vendor_id\t$source_id\t$campaign\t$campaign_id\t$ivr_id\t$closer\t$closer_name\t$rank\t$owner\t\n";
}
if ($output_format =~ /^pipe-triplep$/)
+114 -32
View File
@@ -33,6 +33,7 @@
# 80829-2301 - Added multi-alt-phone entry insertion capability
# 90324-1038 - Added minicsv02 format
# 90401-1340 - Fixed quiet flag functionality
# 90721-1315 - Added rank and owner as vicidial_list fields, stdrankowner format
#
$secX = time();
@@ -140,6 +141,9 @@ if (length($ARGV[0])>1)
print "standard:\n";
print "vendor_lead_code|source_code|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|COMMENTS|called_count|status|entry_date|multi-alt-entries\n";
print "3857822|31022|105|01144|1625551212|MRS|B||BURTON|249 MUNDON ROAD|MALDON|ESSEX||||CM9 6PW|UK||||||COMMENTS|2|B|2007-08-09 00:00:00|7275551212_1_work!7275551213_61_sister house!7275551214_44_neighbor\n\n";
print "stdrankowner:\n";
print "vendor_lead_code|source_code|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|COMMENTS|called_count|status|entry_date|rank|owner|multi-alt-entries\n";
print "3857822|31022|105|01144|1625551212|MRS|B||BURTON|249 MUNDON ROAD|MALDON|ESSEX||||CM9 6PW|UK||||||COMMENTS|2|B|2007-08-09 00:00:00|99|6666|7275551212_1_work!7275551213_61_sister house!7275551214_44_neighbor\n\n";
print "minicsv:\n";
print "address1,city,name,phone_number,state,postal_code\n";
print "\"105 Fifth St\",\"Steinhatchee\",\"Frank Smith\",\"3525556601\",\"FL\",\"32359\"\n\n";
@@ -417,37 +421,39 @@ foreach(@FILES)
if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";}
$a=0; ### each line of input file counter ###
$b=0; ### status of 'APPROVED' counter ###
$c=0; ### status of 'DECLINED' counter ###
$d=0; ### status of 'REFERRED' counter ###
$e=0; ### status of 'ERROR' counter ###
$f=0; ### number of 'DUPLICATE' counter ###
$g=0; ### number of leads with multi-alt-entries
$a=0; ### each line of input file counter ###
$b=0; ### status of 'APPROVED' counter ###
$c=0; ### status of 'DECLINED' counter ###
$d=0; ### status of 'REFERRED' counter ###
$e=0; ### status of 'ERROR' counter ###
$f=0; ### number of 'DUPLICATE' counter ###
$g=0; ### number of leads with multi-alt-entries
$multi_insert_counter=0;
$multistmt='';
$multi_insert_counter=0;
$multistmt='';
$rank='';
$owner='';
#if ($DB)
while (<infile>)
{
@m=@MT;
# print "$a| $number\n";
$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);
while (<infile>)
{
@m=@MT;
# print "$a| $number\n";
$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;
@@ -487,6 +493,7 @@ foreach(@FILES)
$format_set++;
}
# This is the format for the minicsv lead files
#"105 Fifth St","Steinhatchee","Frank Smith","3525556601","FL","32359"
if ( ($format =~ /minicsv/) && ($format_set < 1) )
@@ -522,6 +529,79 @@ foreach(@FILES)
$format_set++;
}
# This is the format for the stdrankowner lead files (standard plus rank and owner )
#3857822|31022|105|01144|1625551212|MRS|B||BURTON|249 MUNDON ROAD|MALDON|ESSEX||||CM9 6PW|UK||||||COMMENTS|COUNT|STATUS|INS-DATE|RANK|OWNER
if ( ($format =~ /stdrankowner/) && ($format_set < 1) )
{
$vendor_lead_code = $m[0]; chomp($vendor_lead_code);
$source_code = $m[1]; chomp($source_code); $source_id = $source_code;
$list_id = $m[2]; chomp($list_id);
$phone_code = $m[3]; chomp($phone_code); $phone_code =~ s/\D//gi;
$phone_number = $m[4]; chomp($phone_number); $phone_number =~ s/\D//gi;
$USarea = substr($phone_number, 0, 3);
$title = $m[5]; chomp($title);
$first_name = $m[6]; chomp($first_name);
$middle_initial = $m[7]; chomp($middle_initial);
$last_name = $m[8]; chomp($last_name);
$address1 = $m[9]; chomp($address1);
$address2 = $m[10]; chomp($address2);
$address3 = $m[11]; chomp($address3);
$city = $m[12]; chomp($city);
$state = $m[13]; chomp($state);
$province = $m[14]; chomp($province);
$postal_code = $m[15]; chomp($postal_code);
$country = $m[16]; chomp($country);
$gender = $m[17];
$date_of_birth = $m[18];
$alt_phone = $m[19]; chomp($alt_phone); $alt_phone =~ s/\D//gi;
$email = $m[20];
$security_phrase = $m[21];
$comments = $m[22];
$called_count = $m[23]; $called_count =~ s/\D|\r|\n|\t//gi; if (length($called_count)<1) {$called_count=0;}
$status = $m[24]; $status =~ s/ |\r|\n|\t//gi; if (length($status)<1) {$status='NEW';}
$insert_date = $m[25]; $insert_date =~ s/\r|\n|\t|[a-zA-Z]//gi; if (length($insert_date)<6) {$insert_date=$pulldate0;}
if ($insert_date =~ /\//)
{
@iD = split(/\//, $insert_date);
$iD[0] = sprintf("%02d", $iD[0]);
$iD[1] = sprintf("%02d", $iD[1]);
$insert_date = "$iD[2]-$iD[0]-$iD[1]";
}
$rank = $m[26];
$owner = $m[27];
$multi_alt_phones = $m[28];
$map_count=0;
if (length($multi_alt_phones)>4)
{
@map=@MT; @ALTm_phone_code=@MT; @ALTm_phone_number=@MT; @ALTm_phone_note=@MT;
@map = split(/\!/, $multi_alt_phones);
$map_count = ($#map +1);
if ($DBX) {print "multi-al-entry: $a|$map_count|$multi_alt_phones\n";}
$g++;
$r=0;
while ($r < $map_count)
{
@ncn=@MT;
@ncn = split(/\_/, $map[$r]);
print "$ncn[0]|$ncn[1]|$ncn[2]";
if (length($forcephonecode) > 0)
{$ALTm_phone_code[$r] = $forcephonecode;}
else
{$ALTm_phone_code[$r] = $ncn[1];}
if (length($ALTm_phone_code[$r]) < 1)
{$ALTm_phone_code[$r]='1';}
$ALTm_phone_number[$r] = $ncn[0];
$ALTm_phone_note[$r] = $ncn[2];
$r++;
}
}
$format_set++;
}
# This is the format for the standard lead files
#3857822|31022|105|01144|1625551212|MRS|B||BURTON|249 MUNDON ROAD|MALDON|ESSEX||||CM9 6PW|UK||||||COMMENTS
if ($format_set < 1)
@@ -590,6 +670,8 @@ foreach(@FILES)
}
}
if (length($rank)<1) {$rank='0';}
if (length($forcelistid) > 0)
{
$list_id = $forcelistid; # set list_id to override value
@@ -911,7 +993,7 @@ foreach(@FILES)
if ($map_count > 0)
{
$stmtZ = "INSERT INTO vicidial_list values('','$insert_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','$called_count','2008-01-01 00:00:00');";
$stmtZ = "INSERT INTO vicidial_list (lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,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,called_count,last_local_call_time,rank,owner) values('','$insert_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','$called_count','2008-01-01 00:00:00','$rank','$owner');";
if (!$T) {$affected_rows = $dbhA->do($stmtZ); } # or die "Couldn't execute query: |$stmtZ|\n";
$lead_id = $dbhA->{'mysql_insertid'};
if($DB){print STDERR "\n|$affected_rows|$stmtZ|\n";}
@@ -933,7 +1015,7 @@ foreach(@FILES)
if ($multi_insert_counter > 8)
{
### insert good lead into pending_transactions table ###
$stmtZ = "INSERT INTO vicidial_list values$multistmt('','$insert_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','$called_count','2008-01-01 00:00:00');";
$stmtZ = "INSERT INTO vicidial_list (lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,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,called_count,last_local_call_time,rank,owner) values$multistmt('','$insert_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','$called_count','2008-01-01 00:00:00','$rank','$owner');";
if (!$T) {$affected_rows = $dbhA->do($stmtZ); } # or die "Couldn't execute query: |$stmtZ|\n";
if($DB){print STDERR "\n|$affected_rows|$stmtZ|\n";}
@@ -943,7 +1025,7 @@ foreach(@FILES)
}
else
{
$multistmt .= "('','$insert_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','$called_count','2008-01-01 00:00:00'),";
$multistmt .= "('','$insert_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','$called_count','2008-01-01 00:00:00','$rank','$owner'),";
$multi_insert_counter++;
}
}
@@ -979,7 +1061,7 @@ foreach(@FILES)
{
chop($multistmt);
### insert good deal into pending_transactions table ###
$stmtZ = "INSERT INTO vicidial_list values$multistmt;";
$stmtZ = "INSERT INTO vicidial_list (lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,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,called_count,last_local_call_time,rank,owner) values$multistmt;";
if (!$T) {$affected_rows = $dbhA->do($stmtZ); } # or die "Couldn't execute query: |$stmtZ|\n";
if($DB){print STDERR "\n|$affected_rows|$stmtZ|\n";}
+3
View File
@@ -19,6 +19,7 @@ Changes:
80724-1723 - First build
90428-0208 - Added blind_monitor function
90513-1720 - Added sounds_list function
90721-1432 - Added rank and owner
@@ -142,6 +143,8 @@ email - 1-70 characters
security_phrase - 1-100 characters
comments - 1-255 characters
multi_alt_phones - 5-1024 characters (see examples for more info)
rank - 1-5 digits
owner - 1-20 characters (user ID, Territory or user group)
Multi-ALT-Phones format:
@@ -16,11 +16,6 @@ TRUNKblind = IAX2/ASTblind:test@127.0.0.1:41569 ; used for testing
#include extensions-vicidial.conf
[trunkinbound]
; agent dial-in:
exten => 2345,1,Answer ; Answer the line
exten => 2345,2,AGI(agi-AGENT_dial_in.agi)
exten => 2345,3,Hangup
; DID call routing process
exten => _X.,1,AGI(agi-DID_route.agi)
@@ -16,11 +16,6 @@ TRUNKblind = IAX2/ASTblind:test@127.0.0.1:41569 ; used for testing
#include extensions-vicidial.conf
[trunkinbound]
; agent dial-in:
exten => 2345,1,Answer ; Answer the line
exten => 2345,2,AGI(agi-AGENT_dial_in.agi)
exten => 2345,3,Hangup
; DID call routing process
exten => _X.,1,AGI(agi-DID_route.agi)
@@ -269,7 +269,7 @@ status VARCHAR(6),
user VARCHAR(20),
vendor_lead_code VARCHAR(20),
source_id VARCHAR(50),
list_id BIGINT(14) UNSIGNED,
list_id BIGINT(14) UNSIGNED NOT NULL DEFAULT '0',
gmt_offset_now DECIMAL(4,2) DEFAULT '0.00',
called_since_last_reset ENUM('Y','N','Y1','Y2','Y3','Y4','Y5','Y6','Y7','Y8','Y9','Y10') default 'N',
phone_code VARCHAR(10),
@@ -294,13 +294,16 @@ security_phrase VARCHAR(100),
comments VARCHAR(255),
called_count SMALLINT(5) UNSIGNED default '0',
last_local_call_time DATETIME,
rank SMALLINT(5) NOT NULL default '0',
owner VARCHAR(20) default '',
index (phone_number),
index (list_id),
index (called_since_last_reset),
index (status),
index (gmt_offset_now),
index (postal_code),
index (last_local_call_time)
index (last_local_call_time),
index (rank)
);
CREATE TABLE vicidial_hopper (
@@ -662,7 +665,9 @@ view_calls_in_queue ENUM('NONE','ALL','1','2','3','4','5') default 'NONE',
view_calls_in_queue_launch ENUM('AUTO','MANUAL') default 'MANUAL',
grab_calls_in_queue ENUM('Y','N') default 'N',
call_requeue_button ENUM('Y','N') default 'N',
pause_after_each_call ENUM('Y','N') default 'N'
pause_after_each_call ENUM('Y','N') default 'N',
no_hopper_dialing ENUM('Y','N') default 'N',
agent_dial_owner_only ENUM('NONE','USER','TERRITORY','USER_GROUP') default 'NONE'
);
CREATE TABLE vicidial_lists (
@@ -672,7 +677,8 @@ campaign_id VARCHAR(8),
active ENUM('Y','N'),
list_description VARCHAR(255),
list_changedate DATETIME,
list_lastcalldate DATETIME
list_lastcalldate DATETIME,
reset_time VARCHAR(100) default ''
);
CREATE TABLE vicidial_statuses (
@@ -1727,7 +1733,7 @@ CREATE INDEX phone_number on vicidial_closer_log (phone_number);
CREATE INDEX date_user on vicidial_closer_log (call_date,user);
CREATE INDEX comment_a on live_inbound_log (comment_a);
UPDATE system_settings SET db_schema_version='1162';
UPDATE system_settings SET db_schema_version='1163';
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

@@ -0,0 +1,14 @@
100001|10001|129|1|7275551213|MR|John|Q|Public01|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS|1|6666
100002|10002|129|1|3125551213|MR|John|Q|Public02|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|3125551212|test@test.com|nothing|COMMENTS|2|6666
100003|10003|129|1|3035551213|MR|John|Q|Public03|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|3035551212|test@test.com|nothing|COMMENTS|3|6666
100004|10004|129|1|8585551213|MR|John|Q|Public04|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS|4|6666
100005|10005|129|44|7275551213|MR|John|Q|Public05|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS|5|6666
100006|10006|129|61|727555121|MR|John|Q|Public06|249 MUNDON ROAD|||MALDON|NT||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS|6|6666
100007|10007|129|61|727555121|MR|John|Q|Public07|249 MUNDON ROAD|||MALDON|NS||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS|7|6666
100008|10008|129|52|2485551213|MR|John|Q|Public08|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS|8|6666
100009|10009|129|1|7275551213|MR|John|Q|Public09|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS|9|6666
100010|10010|129|1|8585551213|MR|John|Q|Public10|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS|9|ADMIN
100011|10011|129|1|3035551213|MR|John|Q|Public11|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|3035551212|test@test.com|nothing|COMMENTS|9|1000
100012|10012|129|1|3125551213|MR|John|Q|Public12|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|3125551212|test@test.com|nothing|COMMENTS|11|1000
100013|10013|129|1|7275551213|MR|John|Q|Public13|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS|15|ADMIN
100014|10014|129|1|7275551213|MR|John|Q|Public14|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS|99|ADMIN
+12
View File
@@ -301,3 +301,15 @@ ALTER TABLE vicidial_campaigns ADD pause_after_each_call ENUM('Y','N') default '
ALTER TABLE vicidial_auto_calls ADD agent_grab VARCHAR(20) default '';
UPDATE system_settings SET db_schema_version='1162';
ALTER TABLE vicidial_list MODIFY list_id BIGINT(14) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE vicidial_list ADD rank SMALLINT(5) NOT NULL default '0';
ALTER TABLE vicidial_list ADD owner VARCHAR(20) default '';
CREATE INDEX rank ON vicidial_list (rank);
ALTER TABLE vicidial_campaigns ADD no_hopper_dialing ENUM('Y','N') default 'N';
ALTER TABLE vicidial_campaigns ADD agent_dial_owner_only ENUM('NONE','USER','TERRITORY','USER_GROUP') default 'NONE';
ALTER TABLE vicidial_lists ADD reset_time VARCHAR(100) default '';
UPDATE system_settings SET db_schema_version='1163';
@@ -238,6 +238,19 @@ Agent Call Re-Queue Button||
This option if set to Y will add a Re-Queue Customer button to the agent screen, allowing the agent to send the call into an AGENTDIRECT queue that is reserved for the agent only. Default is N||
Agent Pause After Each Call||
This option if set to Y will pause the agent after every call automatically. Default is N||
Starts with the highest rank and works its way down||
Starts with the lowest rank and works its way up||
Starts with owners beginning with Z and works its way down||
Starts with owners beginning with A and works its way up||
No Hopper Dialing||
If This is enabled, the hopper will not run for this campaign. This option is only available when the dial method is set to MANUAL or INBOUND_MAN. It is recommended that you do not enable this option if you have a very large lead database, over 100,000 leads. With No Hopper Dialing, the following features do not work: lead recycling, auto-alt-dialing, list mix, list ordering with Xth NEW. If you want to use Owner Only Dialing you must have No Hopper Dialing enabled. Default is N for disabled||
Owner Only Dialing||
If This is enabled, the agent will only receive leads that they are within the ownership parameters for. If this is set to USER then the agent must be the user defined in the database as the owner of this lead. If this is set to TERRITORY then the owner of the lead must match the territory listed in the User Modification screen for this agent. If this is set to USER_GROUP then the owner of the lead must match the user group that the agent is a member of. For this feature to work the dial method must be set to MANUAL or INBOUND_MAN and No Hopper Dialing must be enabled. Default is NONE for disabled||
Reset Times||
This field allows you to put times in, separated by a dash-, that this list will be automatically reset by the system. The times must be in 24 hour format with no punctuation, for example 0800-1700 would reset the list at 8AM and 5PM every day. Default is empty||
Owner: ||
OWNERS WITHIN THIS LIST||
RANKS WITHIN THIS LIST||
add-file: user_territories.php
+459 -10
View File
@@ -205,12 +205,13 @@
# 90706-1431 - Added Agent view transfer selection
# 90712-2303 - Added view calls in queue, grab call from queue
# 90717-0638 - Fixed alt dial on overflow in-group calls
# 90722-1542 - Added no hopper dialing
#
$version = '2.2.0-116';
$build = '90717-0638';
$version = '2.2.0-117';
$build = '90722-1542';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=235;
$mysql_log_count=244;
$one_mysql_log=0;
require("dbconnect.php");
@@ -948,12 +949,452 @@ if ($ACTION == 'manDiaLnextCaLL')
}
else
{
### grab the next lead in the hopper for this campaign and reserve it for the user
$stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by priority desc,hopper_id LIMIT 1";
if ($DB) {echo "$stmt\n";}
##### gather no hopper dialing settings from campaign
$stmt="SELECT no_hopper_dialing,agent_dial_owner_only,local_call_time,dial_statuses,drop_lockout_time,lead_filter_id,lead_order FROM vicidial_campaigns where campaign_id='$campaign';";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00024',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00236',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$camp_nohopper_ct = mysql_num_rows($rslt);
if ($camp_nohopper_ct > 0)
{
$row=mysql_fetch_row($rslt);
$no_hopper_dialing = $row[0];
$agent_dial_owner_only = $row[1];
$local_call_time = $row[2];
$dial_statuses = $row[3];
$drop_lockout_time = $row[4];
$lead_filter_id = $row[5];
$lead_order = $row[6];
}
if (eregi("N",$no_hopper_dialing))
{
### grab the next lead in the hopper for this campaign and reserve it for the user
$stmt = "UPDATE vicidial_hopper set status='QUEUE', user='$user' where campaign_id='$campaign' and status='READY' order by priority desc,hopper_id LIMIT 1";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00024',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($link);
}
else
{
### figure out what the next lead that should be dialed is
##########################################################
### BEGIN find the next lead to dial without looking in the hopper
##########################################################
# $DB=1;
if (strlen($dial_statuses)>2)
{
$g=0;
$p='13';
$GMT_gmt[0] = '';
$GMT_hour[0] = '';
$GMT_day[0] = '';
while ($p > -13)
{
$pzone=3600 * $p;
$pmin=(gmdate("i", time() + $pzone));
$phour=( (gmdate("G", time() + $pzone)) * 100);
$pday=gmdate("w", time() + $pzone);
$tz = sprintf("%.2f", $p);
$GMT_gmt[$g] = "$tz";
$GMT_day[$g] = "$pday";
$GMT_hour[$g] = ($phour + $pmin);
$p = ($p - 0.25);
$g++;
}
$stmt="SELECT * FROM vicidial_call_times where call_time_id='$local_call_time';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00237',$user,$server_ip,$session_name,$one_mysql_log);}
$rowx=mysql_fetch_row($rslt);
$Gct_default_start = "$rowx[3]";
$Gct_default_stop = "$rowx[4]";
$Gct_sunday_start = "$rowx[5]";
$Gct_sunday_stop = "$rowx[6]";
$Gct_monday_start = "$rowx[7]";
$Gct_monday_stop = "$rowx[8]";
$Gct_tuesday_start = "$rowx[9]";
$Gct_tuesday_stop = "$rowx[10]";
$Gct_wednesday_start = "$rowx[11]";
$Gct_wednesday_stop = "$rowx[12]";
$Gct_thursday_start = "$rowx[13]";
$Gct_thursday_stop = "$rowx[14]";
$Gct_friday_start = "$rowx[15]";
$Gct_friday_stop = "$rowx[16]";
$Gct_saturday_start = "$rowx[17]";
$Gct_saturday_stop = "$rowx[18]";
$Gct_state_call_times = "$rowx[19]";
$ct_states = '';
$ct_state_gmt_SQL = '';
$ct_srs=0;
$b=0;
if (strlen($Gct_state_call_times)>2)
{
$state_rules = explode('|',$Gct_state_call_times);
$ct_srs = ((count($state_rules)) - 2);
}
while($ct_srs >= $b)
{
if (strlen($state_rules[$b])>1)
{
$stmt="SELECT * from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00238',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysql_fetch_row($rslt);
$Gstate_call_time_id = "$row[0]";
$Gstate_call_time_state = "$row[1]";
$Gsct_default_start = "$row[4]";
$Gsct_default_stop = "$row[5]";
$Gsct_sunday_start = "$row[6]";
$Gsct_sunday_stop = "$row[7]";
$Gsct_monday_start = "$row[8]";
$Gsct_monday_stop = "$row[9]";
$Gsct_tuesday_start = "$row[10]";
$Gsct_tuesday_stop = "$row[11]";
$Gsct_wednesday_start = "$row[12]";
$Gsct_wednesday_stop = "$row[13]";
$Gsct_thursday_start = "$row[14]";
$Gsct_thursday_stop = "$row[15]";
$Gsct_friday_start = "$row[16]";
$Gsct_friday_stop = "$row[17]";
$Gsct_saturday_start = "$row[18]";
$Gsct_saturday_stop = "$row[19]";
$ct_states .="'$Gstate_call_time_state',";
$r=0;
$state_gmt='';
while($r < $g)
{
if ($GMT_day[$r]==0) #### Sunday local time
{
if (($Gsct_sunday_start==0) and ($Gsct_sunday_stop==0))
{
if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) )
{$state_gmt.="'$GMT_gmt[$r]',";}
}
else
{
if ( ($GMT_hour[$r]>=$Gsct_sunday_start) and ($GMT_hour[$r]<$Gsct_sunday_stop) )
{$state_gmt.="'$GMT_gmt[$r]',";}
}
}
if ($GMT_day[$r]==1) #### Monday local time
{
if (($Gsct_monday_start==0) and ($Gsct_monday_stop==0))
{
if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) )
{$state_gmt.="'$GMT_gmt[$r]',";}
}
else
{
if ( ($GMT_hour[$r]>=$Gsct_monday_start) and ($GMT_hour[$r]<$Gsct_monday_stop) )
{$state_gmt.="'$GMT_gmt[$r]',";}
}
}
if ($GMT_day[$r]==2) #### Tuesday local time
{
if (($Gsct_tuesday_start==0) and ($Gsct_tuesday_stop==0))
{
if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) )
{$state_gmt.="'$GMT_gmt[$r]',";}
}
else
{
if ( ($GMT_hour[$r]>=$Gsct_tuesday_start) and ($GMT_hour[$r]<$Gsct_tuesday_stop) )
{$state_gmt.="'$GMT_gmt[$r]',";}
}
}
if ($GMT_day[$r]==3) #### Wednesday local time
{
if (($Gsct_wednesday_start==0) and ($Gsct_wednesday_stop==0))
{
if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) )
{$state_gmt.="'$GMT_gmt[$r]',";}
}
else
{
if ( ($GMT_hour[$r]>=$Gsct_wednesday_start) and ($GMT_hour[$r]<$Gsct_wednesday_stop) )
{$state_gmt.="'$GMT_gmt[$r]',";}
}
}
if ($GMT_day[$r]==4) #### Thursday local time
{
if (($Gsct_thursday_start==0) and ($Gsct_thursday_stop==0))
{
if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) )
{$state_gmt.="'$GMT_gmt[$r]',";}
}
else
{
if ( ($GMT_hour[$r]>=$Gsct_thursday_start) and ($GMT_hour[$r]<$Gsct_thursday_stop) )
{$state_gmt.="'$GMT_gmt[$r]',";}
}
}
if ($GMT_day[$r]==5) #### Friday local time
{
if (($Gsct_friday_start==0) and ($Gsct_friday_stop==0))
{
if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) )
{$state_gmt.="'$GMT_gmt[$r]',";}
}
else
{
if ( ($GMT_hour[$r]>=$Gsct_friday_start) and ($GMT_hour[$r]<$Gsct_friday_stop) )
{$state_gmt.="'$GMT_gmt[$r]',";}
}
}
if ($GMT_day[$r]==6) #### Saturday local time
{
if (($Gsct_saturday_start==0) and ($Gsct_saturday_stop==0))
{
if ( ($GMT_hour[$r]>=$Gsct_default_start) and ($GMT_hour[$r]<$Gsct_default_stop) )
{$state_gmt.="'$GMT_gmt[$r]',";}
}
else
{
if ( ($GMT_hour[$r]>=$Gsct_saturday_start) and ($GMT_hour[$r]<$Gsct_saturday_stop) )
{$state_gmt.="'$GMT_gmt[$r]',";}
}
}
$r++;
}
$state_gmt = "$state_gmt'99'";
$ct_state_gmt_SQL .= "or (state='$Gstate_call_time_state' and gmt_offset_now IN($state_gmt)) ";
}
$b++;
}
if (strlen($ct_states)>2)
{
$ct_states = eregi_replace(",$",'',$ct_states);
$ct_statesSQL = "and state NOT IN($ct_states)";
}
else
{
$ct_statesSQL = "";
}
$r=0;
$default_gmt='';
while($r < $g)
{
if ($GMT_day[$r]==0) #### Sunday local time
{
if (($Gct_sunday_start==0) and ($Gct_sunday_stop==0))
{
if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) )
{$default_gmt.="'$GMT_gmt[$r]',";}
}
else
{
if ( ($GMT_hour[$r]>=$Gct_sunday_start) and ($GMT_hour[$r]<$Gct_sunday_stop) )
{$default_gmt.="'$GMT_gmt[$r]',";}
}
}
if ($GMT_day[$r]==1) #### Monday local time
{
if (($Gct_monday_start==0) and ($Gct_monday_stop==0))
{
if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) )
{$default_gmt.="'$GMT_gmt[$r]',";}
}
else
{
if ( ($GMT_hour[$r]>=$Gct_monday_start) and ($GMT_hour[$r]<$Gct_monday_stop) )
{$default_gmt.="'$GMT_gmt[$r]',";}
}
}
if ($GMT_day[$r]==2) #### Tuesday local time
{
if (($Gct_tuesday_start==0) and ($Gct_tuesday_stop==0))
{
if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) )
{$default_gmt.="'$GMT_gmt[$r]',";}
}
else
{
if ( ($GMT_hour[$r]>=$Gct_tuesday_start) and ($GMT_hour[$r]<$Gct_tuesday_stop) )
{$default_gmt.="'$GMT_gmt[$r]',";}
}
}
if ($GMT_day[$r]==3) #### Wednesday local time
{
if (($Gct_wednesday_start==0) and ($Gct_wednesday_stop==0))
{
if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) )
{$default_gmt.="'$GMT_gmt[$r]',";}
}
else
{
if ( ($GMT_hour[$r]>=$Gct_wednesday_start) and ($GMT_hour[$r]<$Gct_wednesday_stop) )
{$default_gmt.="'$GMT_gmt[$r]',";}
}
}
if ($GMT_day[$r]==4) #### Thursday local time
{
if (($Gct_thursday_start==0) and ($Gct_thursday_stop==0))
{
if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) )
{$default_gmt.="'$GMT_gmt[$r]',";}
}
else
{
if ( ($GMT_hour[$r]>=$Gct_thursday_start) and ($GMT_hour[$r]<$Gct_thursday_stop) )
{$default_gmt.="'$GMT_gmt[$r]',";}
}
}
if ($GMT_day[$r]==5) #### Friday local time
{
if (($Gct_friday_start==0) and ($Gct_friday_stop==0))
{
if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) )
{$default_gmt.="'$GMT_gmt[$r]',";}
}
else
{
if ( ($GMT_hour[$r]>=$Gct_friday_start) and ($GMT_hour[$r]<$Gct_friday_stop) )
{$default_gmt.="'$GMT_gmt[$r]',";}
}
}
if ($GMT_day[$r]==6) #### Saturday local time
{
if (($Gct_saturday_start==0) and ($Gct_saturday_stop==0))
{
if ( ($GMT_hour[$r]>=$Gct_default_start) and ($GMT_hour[$r]<$Gct_default_stop) )
{$default_gmt.="'$GMT_gmt[$r]',";}
}
else
{
if ( ($GMT_hour[$r]>=$Gct_saturday_start) and ($GMT_hour[$r]<$Gct_saturday_stop) )
{$default_gmt.="'$GMT_gmt[$r]',";}
}
}
$r++;
}
$default_gmt = "$default_gmt'99'";
$all_gmtSQL = "(gmt_offset_now IN($default_gmt) $ct_statesSQL) $ct_state_gmt_SQL";
$dial_statuses = preg_replace("/ -$/","",$dial_statuses);
$Dstatuses = explode(" ", $dial_statuses);
$Ds_to_print = (count($Dstatuses) - 0);
$Dsql = '';
$o=0;
while ($Ds_to_print > $o)
{
$o++;
$Dsql .= "'$Dstatuses[$o]',";
}
$Dsql = preg_replace("/,$/","",$Dsql);
if (strlen($Dsql) < 2) {$Dsql = "''";}
$DLTsql='';
if ($drop_lockout_time > 0)
{
$DLseconds = ($drop_lockout_time * 3600);
$DLseconds = floor($DLseconds);
$DLseconds = intval("$DLseconds");
$DLTsql = "and ( ( (status IN('DROP','XDROP')) and (last_local_call_time < CONCAT(DATE_ADD(NOW(), INTERVAL -$DLseconds SECOND),' ',CURTIME()) ) ) or (status NOT IN('DROP','XDROP')) )";
}
$stmt="SELECT lead_filter_sql FROM vicidial_lead_filters where lead_filter_id='$lead_filter_id';";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00239',$user,$server_ip,$session_name,$one_mysql_log);}
$filtersql_ct = mysql_num_rows($rslt);
if ($DB) {echo "$filtersql_ct|$stmt\n";}
if ($filtersql_ct > 0)
{
$row=mysql_fetch_row($rslt);
$fSQL = $row[0];
}
$stmt="SELECT list_id FROM vicidial_lists where campaign_id='$campaign' and active='Y';";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00240',$user,$server_ip,$session_name,$one_mysql_log);}
$camplists_ct = mysql_num_rows($rslt);
if ($DB) {echo "$camplists_ct|$stmt\n";}
$k=0;
$camp_lists='';
while ($camplists_ct > $k)
{
$row=mysql_fetch_row($rslt);
$camp_lists .= "'$row[0]',";
$k++;
}
$camp_lists = eregi_replace(".$","",$camp_lists);
if (strlen($camp_lists) < 4) {$camp_lists="''";}
$stmt="SELECT user_group,territory FROM vicidial_users where user='$user';";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00241',$user,$server_ip,$session_name,$one_mysql_log);}
$userterr_ct = mysql_num_rows($rslt);
if ($DB) {echo "$userterr_ct|$stmt\n";}
if ($userterr_ct > 0)
{
$row=mysql_fetch_row($rslt);
$user_group = $row[0];
$territory = $row[1];
}
$adooSQL = '';
if (eregi("USER",$agent_dial_owner_only)) {$adooSQL = "and owner='$user'";}
if (eregi("TERRITORY",$agent_dial_owner_only)) {$adooSQL = "and owner='$territory'";}
if (eregi("USER_GROUP",$agent_dial_owner_only)) {$adooSQL = "and owner='$user_group'";}
$order_stmt = '';
if (eregi("DOWN",$lead_order)){$order_stmt = 'order by lead_id asc';}
if (eregi("UP",$lead_order)){$order_stmt = 'order by lead_id desc';}
if (eregi("UP LAST NAME",$lead_order)){$order_stmt = 'order by last_name desc, lead_id asc';}
if (eregi("DOWN LAST NAME",$lead_order)){$order_stmt = 'order by last_name, lead_id asc';}
if (eregi("UP PHONE",$lead_order)){$order_stmt = 'order by phone_number desc, lead_id asc';}
if (eregi("DOWN PHONE",$lead_order)){$order_stmt = 'order by phone_number, lead_id asc';}
if (eregi("UP COUNT",$lead_order)){$order_stmt = 'order by called_count desc, lead_id asc';}
if (eregi("DOWN COUNT",$lead_order)){$order_stmt = 'order by called_count, lead_id asc';}
if (eregi("UP LAST CALL TIME",$lead_order)){$order_stmt = 'order by last_local_call_time desc, lead_id asc';}
if (eregi("DOWN LAST CALL TIME",$lead_order)){$order_stmt = 'order by last_local_call_time, lead_id asc';}
if (eregi("RANDOM",$lead_order)){$order_stmt = 'order by RAND()';}
if (eregi("UP RANK",$lead_order)){$order_stmt = 'order by rank desc, lead_id asc';}
if (eregi("DOWN RANK",$lead_order)){$order_stmt = 'order by rank, lead_id asc';}
if (eregi("UP OWNER",$lead_order)){$order_stmt = 'order by owner desc, lead_id asc';}
if (eregi("DOWN OWNER",$lead_order)){$order_stmt = 'order by owner, lead_id asc';}
$stmt="UPDATE vicidial_list SET status='QUEUE',user='$user' where called_since_last_reset='N' and status IN($Dsql) and list_id IN($camp_lists) and ($all_gmtSQL) $DLTsql $fSQL $adooSQL $order_stmt LIMIT 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00242',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($link);
if ($affected_rows > 0)
{
$stmt="SELECT lead_id,list_id,gmt_offset_now,state FROM vicidial_list where status='QUEUE' and user='$user' order by modify_date desc LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00243',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$leadpick_ct = mysql_num_rows($rslt);
if ($leadpick_ct > 0)
{
$row=mysql_fetch_row($rslt);
$lead_id = $row[0];
$list_id = $row[1];
$gmt_offset_now = $row[2];
$state = $row[3];
$stmt = "INSERT INTO vicidial_hopper SET lead_id='$lead_id',campaign_id='$campaign',status='QUEUE',list_id='$list_id',gmt_offset_now='$gmt_offset_now',state='$state',alt_dial='MAIN',user='$user',priority='0';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00244',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
}
##########################################################
### END find the next lead to dial without looking in the hopper
##########################################################
# $DB=0;
}
}
}
@@ -975,7 +1416,7 @@ if ($ACTION == 'manDiaLnextCaLL')
}
##### grab the data from vicidial_list for the lead_id
$stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;";
$stmt="SELECT lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,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,called_count,last_local_call_time,rank,owner FROM vicidial_list where lead_id='$lead_id' LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00026',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
@@ -1013,6 +1454,8 @@ if ($ACTION == 'manDiaLnextCaLL')
$security = trim("$row[28]");
$comments = stripslashes(trim("$row[29]"));
$called_count = trim("$row[30]");
$rank = trim("$row[32]");
$owner = trim("$row[33]");
}
$called_count++;
@@ -1267,6 +1710,8 @@ if ($ACTION == 'manDiaLnextCaLL')
$LeaD_InfO .= $phone_number . "\n";
$LeaD_InfO .= "MAIN\n";
$LeaD_InfO .= $source_id . "\n";
$LeaD_InfO .= $rank . "\n";
$LeaD_InfO .= $owner . "\n";
echo $LeaD_InfO;
@@ -2736,7 +3181,7 @@ if ($ACTION == 'VDADcheckINCOMING')
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00107',$user,$server_ip,$session_name,$one_mysql_log);}
##### grab the data from vicidial_list for the lead_id
$stmt="SELECT * FROM vicidial_list where lead_id='$lead_id' LIMIT 1;";
$stmt="SELECT lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,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,called_count,last_local_call_time,rank,owner FROM vicidial_list where lead_id='$lead_id' LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00108',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
@@ -2772,6 +3217,8 @@ if ($ACTION == 'VDADcheckINCOMING')
$security = trim("$row[28]");
$comments = stripslashes(trim("$row[29]"));
$called_count = trim("$row[30]");
$rank = trim("$row[32]");
$owner = trim("$row[33]");
}
##### if lead is a callback, grab the callback comments
@@ -3134,6 +3581,8 @@ if ($ACTION == 'VDADcheckINCOMING')
$LeaD_InfO .= $alt_phone_note . "\n";
$LeaD_InfO .= $alt_phone_active . "\n";
$LeaD_InfO .= $alt_phone_count . "\n";
$LeaD_InfO .= $rank . "\n";
$LeaD_InfO .= $owner . "\n";
echo $LeaD_InfO;
+44 -7
View File
@@ -239,10 +239,11 @@
# 90709-1649 - Fixed alt-number transfers and dispo variable reset for webform
# 90712-2304 - Added ADD-ALL group selection, view calls in queue, grab call from queue, requeue button
# 90717-0640 - Added dialed_label and dialed_number to script variables
# 90721-1114 - Added rank and owner as vicidial_list fields
#
$version = '2.2.0-217';
$build = '90717-0640';
$version = '2.2.0-218';
$build = '90721-1114';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=61;
$one_mysql_log=0;
@@ -1066,7 +1067,7 @@ $VDloginDISPLAY=0;
$HKstatusnames = substr("$HKstatusnames", 0, -1);
##### grab the campaign settings
$stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
$stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01013',$VD_login,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
@@ -1122,7 +1123,13 @@ $VDloginDISPLAY=0;
$view_calls_in_queue_launch = $row[48];
$call_requeue_button = $row[49];
$pause_after_each_call = $row[50];
$no_hopper_dialing = $row[51];
$agent_dial_owner_only = $row[52];
if (preg_match("/Y/",$no_hopper_dialing))
{$no_hopper_dialing=1;}
else
{$no_hopper_dialing=0;}
if (preg_match("/Y/",$call_requeue_button))
{$call_requeue_button=1;}
@@ -1516,7 +1523,7 @@ else
echo "<!-- Phones balance selection: $phone_login|$pb_server_ip|$past_minutes_date| |$pb_log -->\n";
}
echo "<title>Agent web client</title>\n";
$stmt="SELECT * from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
$stmt="SELECT extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,messages,old_messages,protocol,local_gmt,ASTmgrUSERNAME,ASTmgrSECRET,login_user,login_pass,login_campaign,park_on_extension,conf_on_extension,VICIDIAL_park_on_extension,VICIDIAL_park_on_filename,monitor_prefix,recording_exten,voicemail_exten,voicemail_dump_exten,ext_context,dtmf_send_extension,call_out_number_group,client_browser,install_directory,local_web_callerID_URL,VICIDIAL_web_URL,AGI_call_logging_enabled,user_switching_enabled,conferencing_enabled,admin_hangup_enabled,admin_hijack_enabled,admin_monitor_enabled,call_parking_enabled,updater_check_enabled,AFLogging_enabled,QUEUE_ACTION_enabled,CallerID_popup_enabled,voicemail_button_enabled,enable_fast_refresh,fast_refresh_rate,enable_persistant_mysql,auto_dial_next_number,VDstop_rec_after_each_call,DBX_server,DBX_database,DBX_user,DBX_pass,DBX_port,DBY_server,DBY_database,DBY_user,DBY_pass,DBY_port,outbound_cid,enable_sipsak_messages,email,template_id,conf_override,phone_context,phone_ring_timeout,conf_secret from phones where login='$phone_login' and pass='$phone_pass' and active = 'Y';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01025',$VD_login,$server_ip,$session_name,$one_mysql_log);}
@@ -2485,6 +2492,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var view_calls_in_queue_launch = '<?php echo $view_calls_in_queue_launch ?>';
var view_calls_in_queue_active = '<?php echo $view_calls_in_queue_launch ?>';
var call_requeue_button = '<?php echo $call_requeue_button ?>';
var no_hopper_dialing = '<?php echo $no_hopper_dialing ?>';
var agent_dial_owner_only = '<?php echo $agent_dial_owner_only ?>';
var no_empty_session_warnings = '<?php echo $no_empty_session_warnings ?>';
var DiaLControl_auto_HTML = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\" Pause \"><a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready');\"><IMG SRC=\"./images/vdc_LB_resume.gif\" border=0 alt=\"Resume\"></a>";
var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause');\"><IMG SRC=\"./images/vdc_LB_pause.gif\" border=0 alt=\" Pause \"></a><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
@@ -2720,6 +2729,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
threeway_end=0;
leaving_threeway=1;
if (customerparked > 0)
{
mainxfer_send_redirect('FROMParK',lastcustchannel,lastcustserverip);
}
mainxfer_send_redirect('3WAY','','',tempvarattempt);
// if (threeway_end == '0')
@@ -4398,6 +4412,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
var MDnextResponse = null;
// alert(manDiaLnext_query);
// alert(xmlhttp.responseText);
MDnextResponse = xmlhttp.responseText;
@@ -4493,7 +4508,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
dialed_number = MDnextResponse_array[32];
dialed_label = MDnextResponse_array[33];
source_id = MDnextResponse_array[34];
document.vicidial_form.rank.value = MDnextResponse_array[35];
document.vicidial_form.owner.value = MDnextResponse_array[36];
lead_dial_number = document.vicidial_form.phone_number.value;
var dispnum = document.vicidial_form.phone_number.value;
var status_display_number = phone_number_format(dispnum);
@@ -4568,6 +4585,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&dialed_number=" + dialed_number + '' +
"&dialed_label=" + dialed_label + '' +
"&source_id=" + source_id + '' +
"&rank=" + document.vicidial_form.rank.value + '' +
"&owner=" + document.vicidial_form.owner.value + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -4728,7 +4747,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var tmp_pn = document.getElementById("phone_numberDISP");
tmp_pn.innerHTML = ' &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ';
}
document.vicidial_form.phone_number.value = '';
document.vicidial_form.phone_number.value ='';
document.vicidial_form.title.value ='';
document.vicidial_form.first_name.value ='';
document.vicidial_form.middle_initial.value ='';
@@ -4748,6 +4767,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
document.vicidial_form.security_phrase.value='';
document.vicidial_form.comments.value ='';
document.vicidial_form.called_count.value ='';
document.vicidial_form.rank.value ='';
document.vicidial_form.owner.value ='';
VDCL_group_id = '';
fronter = '';
previous_called_count = '';
@@ -5318,7 +5339,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
EAalt_phone_notes = check_VDIC_array[41];
EAalt_phone_active = check_VDIC_array[42];
EAalt_phone_count = check_VDIC_array[43];
document.vicidial_form.rank.value = check_VDIC_array[44];
document.vicidial_form.owner.value = check_VDIC_array[45];
var gIndex = 0;
if (document.vicidial_form.gender.value == 'M') {var gIndex = 1;}
if (document.vicidial_form.gender.value == 'F') {var gIndex = 2;}
@@ -5514,6 +5537,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&dialed_number=" + dialed_number + '' +
"&dialed_label=" + dialed_label + '' +
"&source_id=" + source_id + '' +
"&rank=" + document.vicidial_form.rank.value + '' +
"&owner=" + document.vicidial_form.owner.value + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -5658,6 +5683,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&dialed_number=" + dialed_number + '' +
"&dialed_label=" + dialed_label + '' +
"&source_id=" + source_id + '' +
"&rank=" + document.vicidial_form.rank.value + '' +
"&owner=" + document.vicidial_form.owner.value + '' +
webform_session;
var regWFspace = new RegExp(" ","ig");
@@ -7084,6 +7111,8 @@ encoded=utf8_decode(xtest);
var SCsession_id = session_id;
var SCdialed_number = dialed_number;
var SCdialed_label = dialed_label;
var SCrank = document.vicidial_form.rank.value;
var SCowner = document.vicidial_form.owner.value;
var SCweb_vars = LIVE_web_vars;
if (encoded.match(RGiframe))
@@ -7129,6 +7158,8 @@ encoded=utf8_decode(xtest);
SCSIPexten = SCSIPexten.replace(RGplus,'+');
SCdialed_number = SCdialed_number.replace(RGplus,'+');
SCdialed_label = SCdialed_label.replace(RGplus,'+');
SCrank = SCrank.replace(RGplus,'+');
SCowner = SCowner.replace(RGplus,'+');
SCweb_vars = SCweb_vars.replace(RGplus,'+');
}
@@ -7175,6 +7206,8 @@ encoded=utf8_decode(xtest);
var RGsession_id = new RegExp("--A--session_id--B--","g");
var RGdialed_number = new RegExp("--A--dialed_number--B--","g");
var RGdialed_label = new RegExp("--A--dialed_label--B--","g");
var RGrank = new RegExp("--A--rank--B--","g");
var RGowner = new RegExp("--A--owner--B--","g");
var RGweb_vars = new RegExp("--A--web_vars--B--","g");
encoded = encoded.replace(RGvendor_lead_code, SCvendor_lead_code);
@@ -7220,6 +7253,8 @@ encoded=utf8_decode(xtest);
encoded = encoded.replace(RGsession_id, SCsession_id);
encoded = encoded.replace(RGdialed_number, SCdialed_number);
encoded = encoded.replace(RGdialed_label, SCdialed_label);
encoded = encoded.replace(RGrank, SCrank);
encoded = encoded.replace(RGowner, SCowner);
encoded = encoded.replace(RGweb_vars, SCweb_vars);
}
decoded=encoded; // simple no ?
@@ -9038,6 +9073,8 @@ if ($call_requeue_button > 0)
<input type=hidden name=lead_id value="">
<input type=hidden name=list_id value="">
<input type=hidden name=called_count value="">
<input type=hidden name=rank value="">
<input type=hidden name=owner value="">
<input type=hidden name=gmt_offset_now value="">
<input type=hidden name=gender value="">
<input type=hidden name=date_of_birth value="">
+302 -43
View File
@@ -1081,6 +1081,12 @@ if (isset($_GET["call_requeue_button"])) {$call_requeue_button=$_GET["call_req
elseif (isset($_POST["call_requeue_button"])) {$call_requeue_button=$_POST["call_requeue_button"];}
if (isset($_GET["pause_after_each_call"])) {$pause_after_each_call=$_GET["pause_after_each_call"];}
elseif (isset($_POST["pause_after_each_call"])) {$pause_after_each_call=$_POST["pause_after_each_call"];}
if (isset($_GET["no_hopper_dialing"])) {$no_hopper_dialing=$_GET["no_hopper_dialing"];}
elseif (isset($_POST["no_hopper_dialing"])) {$no_hopper_dialing=$_POST["no_hopper_dialing"];}
if (isset($_GET["agent_dial_owner_only"])) {$agent_dial_owner_only=$_GET["agent_dial_owner_only"];}
elseif (isset($_POST["agent_dial_owner_only"])) {$agent_dial_owner_only=$_POST["agent_dial_owner_only"];}
if (isset($_GET["reset_time"])) {$reset_time=$_GET["reset_time"];}
elseif (isset($_POST["reset_time"])) {$reset_time=$_POST["reset_time"];}
if (isset($script_id)) {$script_id= strtoupper($script_id);}
if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);}
@@ -1335,6 +1341,7 @@ if ($non_latin < 1)
$sounds_update = ereg_replace("[^NY]","",$sounds_update);
$carrier_logging_active = ereg_replace("[^NY]","",$carrier_logging_active);
$agent_status_view_time = ereg_replace("[^NY]","",$agent_status_view_time);
$no_hopper_dialing = ereg_replace("[^NY]","",$no_hopper_dialing);
$qc_enabled = ereg_replace("[^0-9NY]","",$qc_enabled);
$active = ereg_replace("[^0-9NY]","",$active);
@@ -1522,6 +1529,8 @@ if ($non_latin < 1)
$prepopulate_transfer_preset = ereg_replace("[^-_0-9a-zA-Z]","",$prepopulate_transfer_preset);
$tts_id = ereg_replace("[^-_0-9a-zA-Z]","",$tts_id);
$drop_rate_group = ereg_replace("[^-_0-9a-zA-Z]","",$drop_rate_group);
$agent_dial_owner_only = ereg_replace("[^-_0-9a-zA-Z]","",$agent_dial_owner_only);
$reset_time = ereg_replace("[^-_0-9a-zA-Z]","",$reset_time);
### ALPHA-NUMERIC and underscore and dash and slash and dot
$menu_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_prompt);
@@ -1884,11 +1893,13 @@ else
# 90705-0926 - Added User Group agent view options
# 90710-1528 - Added Agent view and grab queue calls and every call pause options
# 90717-0646 - Added dialed_label and dialed_number to script variables
# 90721-1350 - Added RANK and OWNER as list order options and list screen display tables
# 90722-1235 - Added list reset time and campaign no hopper dialing, agent dial owner only options
#
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time
$admin_version = '2.2.0-206';
$build = '90717-0646';
$admin_version = '2.2.0-208';
$build = '90722-1235';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -1924,15 +1935,15 @@ $dtmf[17]='TIMEOUT'; $dtmf_key[17]='TIMEOUT';
$dtmf[18]='INVALID'; $dtmf_key[18]='INVALID';
if ($force_logout)
{
if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) )
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
if( (strlen($PHP_AUTH_USER)>0) or (strlen($PHP_AUTH_PW)>0) )
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
}
echo "You have now logged out. Thank you\n";
exit;
}
echo "You have now logged out. Thank you\n";
exit;
}
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
@@ -3135,7 +3146,7 @@ if ($SSqc_features_active > 0)
<BR>
<A NAME="vicidial_users-export_reports">
<BR>
<B>Export Reports -</B> This setting if set to 1 will allow a manager to access the export call reports on the REPORTS screen. Default is 0. For the Export Calls Report, the following field order is used for exports: <BR>call_date, phone_number, status, user, full_name, campaign_id/in-group, vendor_lead_code, source_id, list_id, gmt_offset_now, 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, length_in_sec, user_group, alt_dial/queue_seconds
<B>Export Reports -</B> This setting if set to 1 will allow a manager to access the export call reports on the REPORTS screen. Default is 0. For the Export Calls Report, the following field order is used for exports: <BR>call_date, phone_number, status, user, full_name, campaign_id/in-group, vendor_lead_code, source_id, list_id, gmt_offset_now, 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, length_in_sec, user_group, alt_dial/queue_seconds, rank, owner
<BR>
<A NAME="vicidial_users-delete_from_dnc">
@@ -3251,6 +3262,10 @@ if ($SSoutbound_autodial_active > 0)
<BR> &nbsp; - RANDOM: Randomly grabs lead within the statuses and lists defined
<BR> &nbsp; - UP LAST CALL TIME: Sorts by the newest local call time for the leads
<BR> &nbsp; - DOWN LAST CALL TIME: Sorts by the oldest local call time for the leads
<BR> &nbsp; - UP RANK: Starts with the highest rank and works its way down
<BR> &nbsp; - DOWN RANK: Starts with the lowest rank and works its way up
<BR> &nbsp; - UP OWNER: Starts with owners beginning with Z and works its way down
<BR> &nbsp; - DOWN OWNER: Starts with owners beginning with A and works its way up
<BR>
<A NAME="vicidial_campaigns-hopper_level">
@@ -3399,6 +3414,16 @@ if ($SSoutbound_autodial_active > 0)
<BR>
<B>Allow No-Hopper-Leads Logins -</B> If set to Y, allows agents to login to the campaign even if there are no leads loaded into the hopper for that campaign. This function is not needed in CLOSER-type campaigns. Default is N.
<BR>
<A NAME="vicidial_campaigns-no_hopper_dialing">
<BR>
<B>No Hopper Dialing -</B> If This is enabled, the hopper will not run for this campaign. This option is only available when the dial method is set to MANUAL or INBOUND_MAN. It is recommended that you do not enable this option if you have a very large lead database, over 100,000 leads. With No Hopper Dialing, the following features do not work: lead recycling, auto-alt-dialing, list mix, list ordering with Xth NEW. If you want to use Owner Only Dialing you must have No Hopper Dialing enabled. Default is N for disabled.
<BR>
<A NAME="vicidial_campaigns-agent_dial_owner_only">
<BR>
<B>Owner Only Dialing -</B> If This is enabled, the agent will only receive leads that they are within the ownership parameters for. If this is set to USER then the agent must be the user defined in the database as the owner of this lead. If this is set to TERRITORY then the owner of the lead must match the territory listed in the User Modification screen for this agent. If this is set to USER_GROUP then the owner of the lead must match the user group that the agent is a member of. For this feature to work the dial method must be set to MANUAL or INBOUND_MAN and No Hopper Dialing must be enabled. Default is NONE for disabled.
<BR>
<A NAME="vicidial_campaigns-list_order_mix">
<BR>
@@ -3818,6 +3843,11 @@ if ($SSqc_features_active > 0)
<BR>
<B>Reset Lead-Called-Status for this list -</B> This resets all leads in this list to N for "not called since last reset" and means that any lead can now be called if it is the right status as defined in the campaign screen.
<BR>
<A NAME="vicidial_lists-reset_time">
<BR>
<B>Reset Times -</B> This field allows you to put times in, separated by a dash-, that this list will be automatically reset by the system. The times must be in 24 hour format with no punctuation, for example 0800-1700 would reset the list at 8AM and 5PM every day. Default is empty.
<BR>
<A NAME="vicidial_list-dnc">
<BR>
@@ -4497,10 +4527,10 @@ if ($SSqc_features_active > 0)
<BR>
<A NAME="vicidial_scripts-script_text">
<B>Script Text -</B> This is where you place the content of a Vicidial Script. Minimum of 2 characters. You can have customer information be auto-populated in this script using "--A--field--B--" where field is one of the following fieldnames: vendor_lead_code, source_id, list_id, gmt_offset_now, 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, lead_id, campaign, phone_login, group, channel_group, SQLdate, epoch, uniqueid, customer_zap_channel, server_ip, SIPexten, session_id, dialed_number, dialed_label. For example, this sentence would print the persons name in it----<BR><BR> Hello, can I speak with --A--first_name--B-- --A--last_name--B-- please? Well hello --A--title--B-- --A--last_name--B-- how are you today?<BR><BR> This would read----<BR><BR>Hello, can I speak with John Doe please? Well hello Mr. Doe how are you today?<BR><BR> You can also use an iframe to load a separate window within the SCRIPT tab, here is an example with prepopulated variables:
<B>Script Text -</B> This is where you place the content of a Vicidial Script. Minimum of 2 characters. You can have customer information be auto-populated in this script using "--A--field--B--" where field is one of the following fieldnames: vendor_lead_code, source_id, list_id, gmt_offset_now, 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, lead_id, campaign, phone_login, group, channel_group, SQLdate, epoch, uniqueid, customer_zap_channel, server_ip, SIPexten, session_id, dialed_number, dialed_label, rank, owner. For example, this sentence would print the persons name in it----<BR><BR> Hello, can I speak with --A--first_name--B-- --A--last_name--B-- please? Well hello --A--title--B-- --A--last_name--B-- how are you today?<BR><BR> This would read----<BR><BR>Hello, can I speak with John Doe please? Well hello Mr. Doe how are you today?<BR><BR> You can also use an iframe to load a separate window within the SCRIPT tab, here is an example with prepopulated variables:
<DIV style="height:200px;width:400px;background:white;overflow:scroll;font-size:12px;font-family:sans-serif;" id=iframe_example>
&#60;iframe src="http://astguiclient.sf.net/test_VICIDIAL_output.php?lead_id=--A--lead_id--B--&#38;vendor_id=--A--vendor_lead_code--B--&#38;list_id=--A--list_id--B--&#38;gmt_offset_now=--A--gmt_offset_now--B--&#38;phone_code=--A--phone_code--B--&#38;phone_number=--A--phone_number--B--&#38;title=--A--title--B--&#38;first_name=--A--first_name--B--&#38;middle_initial=--A--middle_initial--B--&#38;last_name=--A--last_name--B--&#38;address1=--A--address1--B--&#38;address2=--A--address2--B--&#38;address3=--A--address3--B--&#38;city=--A--city--B--&#38;state=--A--state--B--&#38;province=--A--province--B--&#38;postal_code=--A--postal_code--B--&#38;country_code=--A--country_code--B--&#38;gender=--A--gender--B--&#38;date_of_birth=--A--date_of_birth--B--&#38;alt_phone=--A--alt_phone--B--&#38;email=--A--email--B--&#38;security_phrase=--A--security_phrase--B--&#38;comments=--A--comments--B--&#38;user=--A--user--B--&#38;campaign=--A--campaign--B--&#38;phone_login=--A--phone_login--B--&#38;fronter=--A--fronter--B--&#38;closer=--A--user--B--&#38;group=--A--group--B--&#38;channel_group=--A--group--B--&#38;SQLdate=--A--SQLdate--B--&#38;epoch=--A--epoch--B--&#38;uniqueid=--A--uniqueid--B--&#38;customer_zap_channel=--A--customer_zap_channel--B--&#38;server_ip=--A--server_ip--B--&#38;SIPexten=--A--SIPexten--B--&#38;session_id=--A--session_id--B--&#38;dialed_number=--A--dialed_number--B--&#38;dialed_label=--A--dialed_label--B--&#38;phone=--A--phone--B--" style="width:580;height:290;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="460" height="290" STYLE="z-index:17"&#62;
&#60;iframe src="http://astguiclient.sf.net/test_VICIDIAL_output.php?lead_id=--A--lead_id--B--&#38;vendor_id=--A--vendor_lead_code--B--&#38;list_id=--A--list_id--B--&#38;gmt_offset_now=--A--gmt_offset_now--B--&#38;phone_code=--A--phone_code--B--&#38;phone_number=--A--phone_number--B--&#38;title=--A--title--B--&#38;first_name=--A--first_name--B--&#38;middle_initial=--A--middle_initial--B--&#38;last_name=--A--last_name--B--&#38;address1=--A--address1--B--&#38;address2=--A--address2--B--&#38;address3=--A--address3--B--&#38;city=--A--city--B--&#38;state=--A--state--B--&#38;province=--A--province--B--&#38;postal_code=--A--postal_code--B--&#38;country_code=--A--country_code--B--&#38;gender=--A--gender--B--&#38;date_of_birth=--A--date_of_birth--B--&#38;alt_phone=--A--alt_phone--B--&#38;email=--A--email--B--&#38;security_phrase=--A--security_phrase--B--&#38;comments=--A--comments--B--&#38;user=--A--user--B--&#38;campaign=--A--campaign--B--&#38;phone_login=--A--phone_login--B--&#38;fronter=--A--fronter--B--&#38;closer=--A--user--B--&#38;group=--A--group--B--&#38;channel_group=--A--group--B--&#38;SQLdate=--A--SQLdate--B--&#38;epoch=--A--epoch--B--&#38;uniqueid=--A--uniqueid--B--&#38;customer_zap_channel=--A--customer_zap_channel--B--&#38;server_ip=--A--server_ip--B--&#38;SIPexten=--A--SIPexten--B--&#38;session_id=--A--session_id--B--&#38;dialed_number=--A--dialed_number--B--&#38;dialed_label=--A--dialed_label--B--&#38;rank=--A--rank--B--&#38;owner=--A--owner--B--&#38;phone=--A--phone--B--" style="width:580;height:290;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="460" height="290" STYLE="z-index:17"&#62;
&#60;/iframe&#62;
</DIV>
@@ -4626,7 +4656,7 @@ if ($SSoutbound_autodial_active > 0)
<BR>
<A NAME="vicidial_tts_prompts-tts_text">
<B>TTS Text -</B> This is the actual Text To Speech data field that is sent to Cepstral for creation of the audio file to be played to the customer. you can use Speech Synthesis Markup Language -SSML- in this field, for example, &lt;break time='1000ms'/&gt; for a 1 second break. You can also use several variables such as first name, last name and title as ViciDial variables just like you do in a Script: --A--first_name--B--. Here is a list of the available variables: lead_id, entry_date, modify_date, status, user, vendor_lead_code, source_id, list_id, 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, called_count, last_local_call_time
<B>TTS Text -</B> This is the actual Text To Speech data field that is sent to Cepstral for creation of the audio file to be played to the customer. you can use Speech Synthesis Markup Language -SSML- in this field, for example, &lt;break time='1000ms'/&gt; for a 1 second break. You can also use several variables such as first name, last name and title as ViciDial variables just like you do in a Script: --A--first_name--B--. Here is a list of the available variables: lead_id, entry_date, modify_date, status, user, vendor_lead_code, source_id, list_id, 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, called_count, last_local_call_time, rank, owner
@@ -5764,6 +5794,8 @@ if ($ADD==7111111)
$RGsession_id = '8600051';
$RGdialed_number = '3125551111';
$RGdialed_label = 'ALT';
$RGrank = '99';
$RGowner = '6666';
echo "</title>\n";
echo "</head>\n";
@@ -5817,6 +5849,8 @@ if ($ADD==7111111)
$RGsession_id = eregi_replace(' ','+',$RGsession_id);
$RGdialed_number = eregi_replace(' ','+',$RGdialed_number);
$RGdialed_label = eregi_replace(' ','+',$RGdialed_label);
$RGrank = eregi_replace(' ','+',$RGrank);
$RGowner = eregi_replace(' ','+',$RGowner);
}
$script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text);
@@ -5859,6 +5893,8 @@ if ($ADD==7111111)
$script_text = eregi_replace('--A--session_id--B--',"$RGsession_id",$script_text);
$script_text = eregi_replace('--A--dialed_number--B--',"$RGdialed_number",$script_text);
$script_text = eregi_replace('--A--dialed_label--B--',"$RGdialed_label",$script_text);
$script_text = eregi_replace('--A--rank--B--',"$RGrank",$script_text);
$script_text = eregi_replace('--A--owner--B--',"$RGowner",$script_text);
$script_text = eregi_replace("\n","<BR>",$script_text);
@@ -6898,6 +6934,8 @@ if ($ADD==1111111)
echo "<option>session_id</option>";
echo "<option>dialed_number</option>";
echo "<option>dialed_label</option>";
echo "<option>rank</option>";
echo "<option>owner</option>";
echo "</select>";
echo "<input type=\"button\" name=\"insertField\" value=\"Insert\" onClick=\"scriptInsertField();\"><BR>";
# END Insert Field
@@ -8089,7 +8127,7 @@ if ($ADD==20)
{
echo "<br><B>CAMPAIGN COPIED: $campaign_id copied from $source_campaign_id</B>\n";
$stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call from vicidial_campaigns where campaign_id='$source_campaign_id';";
$stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only from vicidial_campaigns where campaign_id='$source_campaign_id';";
$rslt=mysql_query($stmt, $link);
$stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');";
@@ -10540,10 +10578,21 @@ if ($ADD==41)
{
echo "<br><B>CAMPAIGN MODIFIED: $campaign_id</B>\n";
if ( ($dial_method != 'MANUAL') and ($dial_method != 'INBOUND_MAN') )
{
$no_hopper_dialing='N';
$agent_dial_owner_only='NONE';
}
if ($no_hopper_dialing == 'Y')
{
$auto_alt_dial='NONE';
$list_order_mix='DISABLED';
}
if ($dial_method == 'MANUAL')
{
$auto_dial_level='0';
$adlSQL = "auto_dial_level='0',";
$campaign_allow_inbound='N';
}
else
{
@@ -10572,7 +10621,7 @@ if ($ADD==41)
if ( (!ereg("DISABLED",$list_order_mix)) and ($hopper_level < 100) )
{$hopper_level='100';}
$stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix',web_form_target='$web_form_target',vtiger_search_category='$vtiger_search_category',vtiger_create_call_record='$vtiger_create_call_record',vtiger_create_lead_record='$vtiger_create_lead_record',vtiger_screen_login='$vtiger_screen_login',cpd_amd_action='$cpd_amd_action',agent_allow_group_alias='$agent_allow_group_alias',default_group_alias='$default_group_alias',vtiger_search_dead='$vtiger_search_dead',vtiger_status_call='$vtiger_status_call',drop_lockout_time='$drop_lockout_time',quick_transfer_button='$quick_transfer_button',prepopulate_transfer_preset='$prepopulate_transfer_preset',drop_rate_group='$drop_rate_group',view_calls_in_queue='$view_calls_in_queue',view_calls_in_queue_launch='$view_calls_in_queue_launch',grab_calls_in_queue='$grab_calls_in_queue',call_requeue_button='$call_requeue_button',pause_after_each_call='$pause_after_each_call' where campaign_id='$campaign_id';";
$stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix',web_form_target='$web_form_target',vtiger_search_category='$vtiger_search_category',vtiger_create_call_record='$vtiger_create_call_record',vtiger_create_lead_record='$vtiger_create_lead_record',vtiger_screen_login='$vtiger_screen_login',cpd_amd_action='$cpd_amd_action',agent_allow_group_alias='$agent_allow_group_alias',default_group_alias='$default_group_alias',vtiger_search_dead='$vtiger_search_dead',vtiger_status_call='$vtiger_status_call',drop_lockout_time='$drop_lockout_time',quick_transfer_button='$quick_transfer_button',prepopulate_transfer_preset='$prepopulate_transfer_preset',drop_rate_group='$drop_rate_group',view_calls_in_queue='$view_calls_in_queue',view_calls_in_queue_launch='$view_calls_in_queue_launch',grab_calls_in_queue='$grab_calls_in_queue',call_requeue_button='$call_requeue_button',pause_after_each_call='$pause_after_each_call',no_hopper_dialing='$no_hopper_dialing',agent_dial_owner_only='$agent_dial_owner_only' where campaign_id='$campaign_id';";
$rslt=mysql_query($stmtA, $link);
if ($reset_hopper == 'Y')
@@ -11318,9 +11367,11 @@ if ($ADD==411)
}
else
{
if (strlen($reset_time) < 4) {$reset_time='';}
echo "<br><B>LIST MODIFIED: $list_id</B>\n";
$stmt="UPDATE vicidial_lists set list_name='$list_name',campaign_id='$campaign_id',active='$active',list_description='$list_description',list_changedate='$SQLdate' where list_id='$list_id';";
$stmt="UPDATE vicidial_lists set list_name='$list_name',campaign_id='$campaign_id',active='$active',list_description='$list_description',list_changedate='$SQLdate',reset_time='$reset_time' where list_id='$list_id';";
$rslt=mysql_query($stmt, $link);
### LOG INSERTION Admin Log Table ###
@@ -14748,7 +14799,7 @@ if ($ADD==31)
$enable_vtiger_integration_LU = $row[0];
$vtiger_url_LU = $row[1];
$stmt="SELECT * from vicidial_campaigns where campaign_id='$campaign_id';";
$stmt="SELECT campaign_id,campaign_name,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_third_audio_file,survey_third_status,survey_third_exten,survey_fourth_digit,survey_fourth_audio_file,survey_fourth_status,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only from vicidial_campaigns where campaign_id='$campaign_id';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$campaign_name = $row[1];
@@ -14872,7 +14923,8 @@ if ($ADD==31)
$grab_calls_in_queue = $row[122];
$call_requeue_button = $row[123];
$pause_after_each_call = $row[124];
$no_hopper_dialing = $row[125];
$agent_dial_owner_only = $row[126];
if (ereg("DISABLED",$list_order_mix))
{$DEFlistDISABLE = ''; $DEFstatusDISABLED=0;}
@@ -15142,6 +15194,7 @@ if ($ADD==31)
echo "<input type=submit name=submit value=ADD> &nbsp; &nbsp; $NWB#vicidial_campaigns-dial_status$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>List Order: </td><td align=left><select size=1 name=lead_order>
<option SELECTED>$lead_order</option>
<option>DOWN</option>
<option>UP</option>
<option>DOWN PHONE</option>
@@ -15153,6 +15206,10 @@ if ($ADD==31)
<option>RANDOM</option>
<option>DOWN LAST CALL TIME</option>
<option>UP LAST CALL TIME</option>
<option>DOWN RANK</option>
<option>UP RANK</option>
<option>DOWN OWNER</option>
<option>UP OWNER</option>
<option>DOWN 2nd NEW</option>
<option>DOWN 3rd NEW</option>
<option>DOWN 4th NEW</option>
@@ -15208,7 +15265,27 @@ if ($ADD==31)
<option>UP LAST CALL TIME 4th NEW</option>
<option>UP LAST CALL TIME 5th NEW</option>
<option>UP LAST CALL TIME 6th NEW</option>
<option SELECTED>$lead_order</option></select>$NWB#vicidial_campaigns-lead_order$NWE</td></tr>\n";
<option>DOWN RANK 2nd NEW</option>
<option>DOWN RANK 3rd NEW</option>
<option>DOWN RANK 4th NEW</option>
<option>DOWN RANK 5th NEW</option>
<option>DOWN RANK 6th NEW</option>
<option>UP RANK 2nd NEW</option>
<option>UP RANK 3rd NEW</option>
<option>UP RANK 4th NEW</option>
<option>UP RANK 5th NEW</option>
<option>UP RANK 6th NEW</option>
<option>DOWN OWNER 2nd NEW</option>
<option>DOWN OWNER 3rd NEW</option>
<option>DOWN OWNER 4th NEW</option>
<option>DOWN OWNER 5th NEW</option>
<option>DOWN OWNER 6th NEW</option>
<option>UP OWNER 2nd NEW</option>
<option>UP OWNER 3rd NEW</option>
<option>UP OWNER 4th NEW</option>
<option>UP OWNER 5th NEW</option>
<option>UP OWNER 6th NEW</option>
</select>$NWB#vicidial_campaigns-lead_order$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=31&SUB=29&campaign_id=$campaign_id&vcl_id=$list_order_mix\">List Mix</a>: </td><td align=left><select size=1 name=list_order_mix>\n";
echo "$mixes_list";
@@ -15496,7 +15573,12 @@ if ($ADD==31)
if ($SSoutbound_autodial_active > 0)
{
echo "<tr bgcolor=#B6D3FC><td align=right>Allow No-Hopper-Leads Logins: </td><td align=left><select size=1 name=no_hopper_leads_logins><option>Y</option><option>N</option><option SELECTED>$no_hopper_leads_logins</option></select>$NWB#vicidial_campaigns-no_hopper_leads_logins$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>No Hopper Dialing: </td><td align=left><select size=1 name=no_hopper_dialing><option>Y</option><option>N</option><option SELECTED>$no_hopper_dialing</option></select>$NWB#vicidial_campaigns-no_hopper_dialing$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Owner Only Dialing: </td><td align=left><select size=1 name=agent_dial_owner_only><option>NONE</option><option>USER</option><option>TERRITORY</option><option>USER_GROUP</option><option SELECTED>$agent_dial_owner_only</option></select>$NWB#vicidial_campaigns-agent_dial_owner_only$NWE</td></tr>\n";
}
echo "<tr bgcolor=#B6D3FC><td align=right>Agent Display Queue Count: </td><td align=left><select size=1 name=display_queue_count><option>Y</option><option>N</option><option SELECTED>$display_queue_count</option></select>$NWB#vicidial_campaigns-display_queue_count$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Agent View Calls in Queue: </td><td align=left><select size=1 name=view_calls_in_queue><option>NONE</option><option>ALL</option><option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option SELECTED>$view_calls_in_queue</option></select>$NWB#vicidial_campaigns-view_calls_in_queue$NWE</td></tr>\n";
@@ -16397,6 +16479,7 @@ if ($ADD==34)
echo "<input type=submit name=submit value=ADD> &nbsp; &nbsp; $NWB#vicidial_campaigns-dial_status$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>List Order: </td><td align=left><select size=1 name=lead_order>
<option SELECTED>$lead_order</option>
<option>DOWN</option>
<option>UP</option>
<option>DOWN PHONE</option>
@@ -16408,6 +16491,10 @@ if ($ADD==34)
<option>RANDOM</option>
<option>DOWN LAST CALL TIME</option>
<option>UP LAST CALL TIME</option>
<option>DOWN RANK</option>
<option>UP RANK</option>
<option>DOWN OWNER</option>
<option>UP OWNER</option>
<option>DOWN 2nd NEW</option>
<option>DOWN 3rd NEW</option>
<option>DOWN 4th NEW</option>
@@ -16463,7 +16550,27 @@ if ($ADD==34)
<option>UP LAST CALL TIME 4th NEW</option>
<option>UP LAST CALL TIME 5th NEW</option>
<option>UP LAST CALL TIME 6th NEW</option>
<option SELECTED>$lead_order</option></select>$NWB#vicidial_campaigns-lead_order$NWE</td></tr>\n";
<option>DOWN RANK 2nd NEW</option>
<option>DOWN RANK 3rd NEW</option>
<option>DOWN RANK 4th NEW</option>
<option>DOWN RANK 5th NEW</option>
<option>DOWN RANK 6th NEW</option>
<option>UP RANK 2nd NEW</option>
<option>UP RANK 3rd NEW</option>
<option>UP RANK 4th NEW</option>
<option>UP RANK 5th NEW</option>
<option>UP RANK 6th NEW</option>
<option>DOWN OWNER 2nd NEW</option>
<option>DOWN OWNER 3rd NEW</option>
<option>DOWN OWNER 4th NEW</option>
<option>DOWN OWNER 5th NEW</option>
<option>DOWN OWNER 6th NEW</option>
<option>UP OWNER 2nd NEW</option>
<option>UP OWNER 3rd NEW</option>
<option>UP OWNER 4th NEW</option>
<option>UP OWNER 5th NEW</option>
<option>UP OWNER 6th NEW</option>
</select>$NWB#vicidial_campaigns-lead_order$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=31&SUB=29&campaign_id=$campaign_id&vcl_id=$list_order_mix\">List Mix</a>: </td><td align=left><select size=1 name=list_order_mix>\n";
echo "$mixes_list";
@@ -17369,7 +17476,7 @@ if ($ADD==311)
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
$stmt="SELECT * from vicidial_lists where list_id='$list_id';";
$stmt="SELECT list_id,list_name,campaign_id,active,list_description,list_changedate,list_lastcalldate,reset_time from vicidial_lists where list_id='$list_id';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$campaign_id = $row[2];
@@ -17384,22 +17491,24 @@ if ($ADD==311)
$statuses_to_print = mysql_num_rows($rslt);
$o=0;
while ($statuses_to_print > $o) {
while ($statuses_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
$statuses_list["$rowx[0]"] = "$rowx[1]";
$o++;
}
}
$stmt="SELECT * from vicidial_campaign_statuses where campaign_id='$campaign_id' order by status";
$rslt=mysql_query($stmt, $link);
$Cstatuses_to_print = mysql_num_rows($rslt);
$o=0;
while ($Cstatuses_to_print > $o) {
while ($Cstatuses_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
$statuses_list["$rowx[0]"] = "$rowx[1]";
$o++;
}
}
# end grab status names
@@ -17418,16 +17527,18 @@ if ($ADD==311)
$campaigns_to_print = mysql_num_rows($rslt);
$campaigns_list='';
$o=0;
while ($campaigns_to_print > $o) {
while ($campaigns_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
$campaigns_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
$o++;
}
}
echo "$campaigns_list";
echo "<option SELECTED>$campaign_id</option>\n";
echo "</select>$NWB#vicidial_lists-campaign_id$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Active: </td><td align=left><select size=1 name=active><option>Y</option><option>N</option><option SELECTED>$active</option></select>$NWB#vicidial_lists-active$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Reset Lead-Called-Status for this list: </td><td align=left><select size=1 name=reset_list><option>Y</option><option SELECTED>N</option></select>$NWB#vicidial_lists-reset_list$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Reset Times: </td><td align=left><input type=text name=reset_time size=30 maxlength=100 value=\"$row[7]\">$NWB#vicidial_lists-reset_time$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>List Change Date: </td><td align=left>$list_changedate &nbsp; $NWB#vicidial_lists-list_changedate$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>List Last Call Date: </td><td align=left>$list_lastcalldate &nbsp; $NWB#vicidial_lists-list_lastcalldate$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=center colspan=2><input type=submit name=SUBMIT value=SUBMIT></td></tr>\n";
@@ -17451,33 +17562,33 @@ if ($ADD==311)
$lead_list['Y_count'] = 0;
$lead_list['N_count'] = 0;
while ($statuses_to_print > $o)
{
{
$rowx=mysql_fetch_row($rslt);
$lead_list['count'] = ($lead_list['count'] + $rowx[2]);
if ($rowx[1] == 'N')
{
$since_reset = 'N';
$since_resetX = 'Y';
}
{
$since_reset = 'N';
$since_resetX = 'Y';
}
else
{
$since_reset = 'Y';
$since_resetX = 'N';
}
{
$since_reset = 'Y';
$since_resetX = 'N';
}
$lead_list[$since_reset][$rowx[0]] = ($lead_list[$since_reset][$rowx[0]] + $rowx[2]);
$lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]);
#If opposite side is not set, it may not in the future so give it a value of zero
if (!isset($lead_list[$since_resetX][$rowx[0]]))
{
$lead_list[$since_resetX][$rowx[0]]=0;
}
$o++;
}
{
$lead_list[$since_resetX][$rowx[0]]=0;
}
$o++;
}
$o=0;
if ($lead_list['count'] > 0)
{
{
while (list($dispo,) = each($lead_list[$since_reset]))
{
@@ -17574,6 +17685,150 @@ if ($ADD==311)
echo "<center>\n";
echo "<br><b>OWNERS WITHIN THIS LIST:</b><br>\n";
echo "<TABLE width=500 cellspacing=3>\n";
echo "<tr><td>OWNER</td><td>CALLED</td><td>NOT CALLED</td></tr>\n";
$leads_in_list = 0;
$leads_in_list_N = 0;
$leads_in_list_Y = 0;
$stmt="SELECT owner,called_since_last_reset,count(*) from vicidial_list where list_id='$list_id' group by owner,called_since_last_reset order by owner,called_since_last_reset";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$owners_to_print = mysql_num_rows($rslt);
$o=0;
$lead_list['count'] = 0;
$lead_list['Y_count'] = 0;
$lead_list['N_count'] = 0;
while ($owners_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
$lead_list['count'] = ($lead_list['count'] + $rowx[2]);
if ($rowx[1] == 'N')
{
$since_reset = 'N';
$since_resetX = 'Y';
}
else
{
$since_reset = 'Y';
$since_resetX = 'N';
}
$lead_list[$since_reset][$rowx[0]] = ($lead_list[$since_reset][$rowx[0]] + $rowx[2]);
$lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]);
#If opposite side is not set, it may not in the future so give it a value of zero
if (!isset($lead_list[$since_resetX][$rowx[0]]))
{
$lead_list[$since_resetX][$rowx[0]]=0;
}
$o++;
}
$o=0;
if ($lead_list['count'] > 0)
{
while (list($owner,) = each($lead_list[$since_reset]))
{
if (eregi("1$|3$|5$|7$|9$", $o))
{$bgcolor='bgcolor="#B9CBFD"';}
else
{$bgcolor='bgcolor="#9BB9FB"';}
$CLB='';
$CLE='';
echo "<tr $bgcolor><td><font size=1>$CLB$owner$CLE</td><td><font size=1>".$lead_list['Y'][$owner]."</td><td><font size=1>".$lead_list['N'][$owner]." </td></tr>\n";
$o++;
}
}
echo "<tr><td><font size=1>SUBTOTALS</td><td><font size=1>$lead_list[Y_count]</td><td><font size=1>$lead_list[N_count]</td></tr>\n";
echo "<tr bgcolor=\"#9BB9FB\"><td><font size=1>TOTAL</td><td colspan=3 align=center><font size=1>$lead_list[count]</td></tr>\n";
echo "</table></center><br>\n";
unset($lead_list);
echo "<center>\n";
echo "<br><b>RANKS WITHIN THIS LIST:</b><br>\n";
echo "<TABLE width=500 cellspacing=3>\n";
echo "<tr><td>RANK</td><td>CALLED</td><td>NOT CALLED</td></tr>\n";
$leads_in_list = 0;
$leads_in_list_N = 0;
$leads_in_list_Y = 0;
$stmt="SELECT rank,called_since_last_reset,count(*) from vicidial_list where list_id='$list_id' group by rank,called_since_last_reset order by rank,called_since_last_reset";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$ranks_to_print = mysql_num_rows($rslt);
$o=0;
$lead_list['count'] = 0;
$lead_list['Y_count'] = 0;
$lead_list['N_count'] = 0;
while ($ranks_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
$lead_list['count'] = ($lead_list['count'] + $rowx[2]);
if ($rowx[1] == 'N')
{
$since_reset = 'N';
$since_resetX = 'Y';
}
else
{
$since_reset = 'Y';
$since_resetX = 'N';
}
$lead_list[$since_reset][$rowx[0]] = ($lead_list[$since_reset][$rowx[0]] + $rowx[2]);
$lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]);
#If opposite side is not set, it may not in the future so give it a value of zero
if (!isset($lead_list[$since_resetX][$rowx[0]]))
{
$lead_list[$since_resetX][$rowx[0]]=0;
}
$o++;
}
$o=0;
if ($lead_list['count'] > 0)
{
while (list($rank,) = each($lead_list[$since_reset]))
{
if (eregi("1$|3$|5$|7$|9$", $o))
{$bgcolor='bgcolor="#B9CBFD"';}
else
{$bgcolor='bgcolor="#9BB9FB"';}
$CLB='';
$CLE='';
echo "<tr $bgcolor><td><font size=1>$CLB$rank$CLE</td><td><font size=1>".$lead_list['Y'][$rank]."</td><td><font size=1>".$lead_list['N'][$rank]." </td></tr>\n";
$o++;
}
}
echo "<tr><td><font size=1>SUBTOTALS</td><td><font size=1>$lead_list[Y_count]</td><td><font size=1>$lead_list[N_count]</td></tr>\n";
echo "<tr bgcolor=\"#9BB9FB\"><td><font size=1>TOTAL</td><td colspan=3 align=center><font size=1>$lead_list[count]</td></tr>\n";
echo "</table></center><br>\n";
unset($lead_list);
$leads_in_list = 0;
$leads_in_list_N = 0;
$leads_in_list_Y = 0;
@@ -19003,6 +19258,8 @@ if ($ADD==3111111)
echo "<option>session_id</option>";
echo "<option>dialed_number</option>";
echo "<option>dialed_label</option>";
echo "<option>rank</option>";
echo "<option>owner</option>";
echo "</select>";
echo "<input type=\"button\" name=\"insertField\" value=\"Insert\" onClick=\"scriptInsertField();\"><BR>";
# END Insert Field
@@ -21359,7 +21616,7 @@ if ($ADD==100)
if (eregi("CAMPAIGNDOWN",$stage)) {$SQLorder='order by campaign_id desc'; $CAMPAIGNlink='stage=CAMPAIGNUP';}
if (eregi("CALLDATEUP",$stage)) {$SQLorder='order by list_lastcalldate asc'; $CALLDATElink='stage=CALLDATEDOWN';}
if (eregi("CALLDATEDOWN",$stage)) {$SQLorder='order by list_lastcalldate desc'; $CALLDATElink='stage=CALLDATEUP';}
$stmt="SELECT vls.list_id,list_name,list_description,count(*) as tally,active,list_lastcalldate,campaign_id from vicidial_lists vls,vicidial_list vl where vls.list_id=vl.list_id group by list_id $SQLorder";
$stmt="SELECT vls.list_id,list_name,list_description,count(*) as tally,active,list_lastcalldate,campaign_id,reset_time from vicidial_lists vls,vicidial_list vl where vls.list_id=vl.list_id group by list_id $SQLorder";
$rslt=mysql_query($stmt, $link);
$lists_to_print = mysql_num_rows($rslt);
@@ -21369,6 +21626,7 @@ if ($ADD==100)
echo "<TD><a href=\"$PHP_SELF?ADD=100&$LISTlink\"><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>LIST ID</B></a></TD>";
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>LIST NAME</B></TD>";
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>DESCRIPTION</B></TD>\n";
echo "<TD><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>RTIME</B></TD>\n";
echo "<TD><a href=\"$PHP_SELF?ADD=100&$TALLYlink\"><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>LEADS COUNT</B></a></TD>\n";
echo "<TD><a href=\"$PHP_SELF?ADD=100&$ACTIVElink\"><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>ACTIVE</B></a></TD>";
echo "<TD><a href=\"$PHP_SELF?ADD=100&$CALLDATElink\"><B><FONT FACE=\"Arial,Helvetica\" size=1 color=white>LAST CALL DATE</B></a></TD>";
@@ -21389,6 +21647,7 @@ if ($ADD==100)
echo "<td><font size=1> $row[1]</td>";
echo "<td><font size=1> $row[2]</td>";
echo "<td><font size=1> $row[3]</td>";
echo "<td><font size=1> $row[7]</td>";
echo "<td><font size=1> $row[4]</td>";
echo "<td><font size=1> $row[5]</td>";
echo "<td><font size=1> $row[6]</td>";
+182 -189
View File
@@ -31,6 +31,7 @@
# 90309-1829 - Added admin_log logging
# 90508-0644 - Changed to PHP long tags
# 90708-1549 - Added phone number dialed to outbound log
# 90721-1246 - Added rank and owner as vicidial_list fields
#
require("dbconnect.php");
@@ -102,6 +103,10 @@ if (isset($_GET["comments"])) {$comments=$_GET["comments"];}
elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];}
if (isset($_GET["status"])) {$status=$_GET["status"];}
elseif (isset($_POST["status"])) {$status=$_POST["status"];}
if (isset($_GET["rank"])) {$rank=$_GET["rank"];}
elseif (isset($_POST["rank"])) {$rank=$_POST["rank"];}
if (isset($_GET["owner"])) {$owner=$_GET["owner"];}
elseif (isset($_POST["owner"])) {$owner=$_POST["owner"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
@@ -170,23 +175,23 @@ $date = date("r");
$ip = getenv("REMOTE_ADDR");
$browser = getenv("HTTP_USER_AGENT");
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
if( (strlen($PHP_AUTH_USER)<2) or (strlen($PHP_AUTH_PW)<2) or (!$auth))
{
Header("WWW-Authenticate: Basic realm=\"VICI-PROJECTS\"");
Header("HTTP/1.0 401 Unauthorized");
echo "Invalid Username/Password: |$PHP_AUTH_USER|$PHP_AUTH_PW|\n";
exit;
}
else
else
{
if($auth>0)
{
$stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$LOGfullname =$row[0];
$LOGmodify_leads =$row[1];
$stmt="SELECT full_name,modify_leads from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW'";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$LOGfullname =$row[0];
$LOGmodify_leads =$row[1];
if ($WeBRooTWritablE > 0)
{
@@ -216,15 +221,14 @@ $browser = getenv("HTTP_USER_AGENT");
echo "<a href=\"./admin.php?ADD=100\">ADMINISTRATION</a>: Lead record modification<BR>\n";
if ($end_call > 0)
{
{
### update the lead record in the vicidial_list table
$stmt="UPDATE vicidial_list set status='" . mysql_real_escape_string($status) . "',first_name='" . mysql_real_escape_string($first_name) . "',last_name='" . mysql_real_escape_string($last_name) . "',address1='" . mysql_real_escape_string($address1) . "',address2='" . mysql_real_escape_string($address2) . "',address3='" . mysql_real_escape_string($address3) . "',city='" . mysql_real_escape_string($city) . "',state='" . mysql_real_escape_string($state) . "',province='" . mysql_real_escape_string($province) . "',postal_code='" . mysql_real_escape_string($postal_code) . "',country_code='" . mysql_real_escape_string($country_code) . "',alt_phone='" . mysql_real_escape_string($alt_phone) . "',phone_number='$phone_number',email='" . mysql_real_escape_string($email) . "',security_phrase='" . mysql_real_escape_string($security) . "',comments='" . mysql_real_escape_string($comments) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "'";
$stmt="UPDATE vicidial_list set status='" . mysql_real_escape_string($status) . "',first_name='" . mysql_real_escape_string($first_name) . "',last_name='" . mysql_real_escape_string($last_name) . "',address1='" . mysql_real_escape_string($address1) . "',address2='" . mysql_real_escape_string($address2) . "',address3='" . mysql_real_escape_string($address3) . "',city='" . mysql_real_escape_string($city) . "',state='" . mysql_real_escape_string($state) . "',province='" . mysql_real_escape_string($province) . "',postal_code='" . mysql_real_escape_string($postal_code) . "',country_code='" . mysql_real_escape_string($country_code) . "',alt_phone='" . mysql_real_escape_string($alt_phone) . "',phone_number='$phone_number',email='" . mysql_real_escape_string($email) . "',security_phrase='" . mysql_real_escape_string($security) . "',comments='" . mysql_real_escape_string($comments) . "',rank='" . mysql_real_escape_string($rank) . "',owner='" . mysql_real_escape_string($owner) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "'";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
echo "information modified<BR><BR>\n";
echo "<form><input type=button value=\"Close This Window\" onClick=\"javascript:window.close();\"></form>\n";
echo "information modified<BR><BR>\n";
echo "<form><input type=button value=\"Close This Window\" onClick=\"javascript:window.close();\"></form>\n";
### LOG INSERTION Admin Log Table ###
$SQL_log = "$stmt|";
@@ -235,69 +239,69 @@ if ($end_call > 0)
$rslt=mysql_query($stmt, $link);
if ( ($dispo != $status) and ($dispo == 'CBHOLD') )
{
{
### inactivate vicidial_callbacks record for this lead
$stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='" . mysql_real_escape_string($lead_id) . "' and status='ACTIVE';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
echo "<BR>vicidial_callback record inactivated: $lead_id<BR>\n";
}
}
if ( ($dispo != $status) and ($dispo == 'CALLBK') )
{
{
### inactivate vicidial_callbacks record for this lead
$stmt="UPDATE vicidial_callbacks set status='INACTIVE' where lead_id='" . mysql_real_escape_string($lead_id) . "' and status IN('ACTIVE','LIVE');";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
echo "<BR>vicidial_callback record inactivated: $lead_id<BR>\n";
}
}
if ( ($dispo != $status) and ($status == 'DNC') )
{
{
### add lead to the internal DNC list
$stmt="INSERT INTO vicidial_dnc (phone_number) values('" . mysql_real_escape_string($phone_number) . "');";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
echo "<BR>Lead added to DNC List: $lead_id - $phone_number<BR>\n";
}
}
### update last record in vicidial_log table
if (($dispo != $status) and ($modify_logs > 0))
{
{
$stmt="UPDATE vicidial_log set status='" . mysql_real_escape_string($status) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "' order by call_date desc limit 1";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
}
}
### update last record in vicidial_closer_log table
if (($dispo != $status) and ($modify_closer_logs > 0))
{
{
$stmt="UPDATE vicidial_closer_log set status='" . mysql_real_escape_string($status) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "' order by call_date desc limit 1";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
}
}
### update last record in vicidial_agent_log table
if (($dispo != $status) and ($modify_agent_logs > 0))
{
{
$stmt="UPDATE vicidial_agent_log set status='" . mysql_real_escape_string($status) . "' where lead_id='" . mysql_real_escape_string($lead_id) . "' order by agent_log_id desc limit 1";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
}
}
if ($add_closer_record > 0)
{
{
### insert a NEW record to the vicidial_closer_log table
$stmt="INSERT INTO vicidial_closer_log (lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed) values('" . mysql_real_escape_string($lead_id) . "','" . mysql_real_escape_string($list_id) . "','" . mysql_real_escape_string($campaign_id) . "','" . mysql_real_escape_string($parked_time) . "','$NOW_TIME','$STARTtime','1','" . mysql_real_escape_string($status) . "','" . mysql_real_escape_string($phone_code) . "','" . mysql_real_escape_string($phone_number) . "','$PHP_AUTH_USER','" . mysql_real_escape_string($comments) . "','Y')";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
}
}
}
else
{
{
if ($CBchangeUSERtoANY == 'YES')
{
@@ -336,24 +340,23 @@ else
$lead_count = $row[0];
if ($lead_count > 0)
{
##### grab vicidial_log records #####
$stmt="select * from vicidial_log where lead_id='" . mysql_real_escape_string($lead_id) . "' order by uniqueid desc limit 500;";
$rslt=mysql_query($stmt, $link);
$logs_to_print = mysql_num_rows($rslt);
$u=0;
$call_log = '';
$log_campaign = '';
while ($logs_to_print > $u)
{
$row=mysql_fetch_row($rslt);
if (strlen($log_campaign)<1) {$log_campaign = $row[3];}
if (eregi("1$|3$|5$|7$|9$", $u))
{$bgcolor='bgcolor="#B9CBFD"';}
else
{$bgcolor='bgcolor="#9BB9FB"';}
##### grab vicidial_log records #####
$stmt="select uniqueid,lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed,user_group,term_reason,alt_dial from vicidial_log where lead_id='" . mysql_real_escape_string($lead_id) . "' order by uniqueid desc limit 500;";
$rslt=mysql_query($stmt, $link);
$logs_to_print = mysql_num_rows($rslt);
$u=0;
$call_log = '';
$log_campaign = '';
while ($logs_to_print > $u)
{
$row=mysql_fetch_row($rslt);
if (strlen($log_campaign)<1) {$log_campaign = $row[3];}
if (eregi("1$|3$|5$|7$|9$", $u))
{$bgcolor='bgcolor="#B9CBFD"';}
else
{$bgcolor='bgcolor="#9BB9FB"';}
$u++;
$call_log .= "<tr $bgcolor>";
@@ -369,24 +372,24 @@ else
$call_log .= "<td align=right><font size=2>&nbsp; $row[10] </td></tr>\n";
$campaign_id = $row[3];
}
}
##### grab vicidial_agent_log records #####
$stmt="select * from vicidial_agent_log where lead_id='" . mysql_real_escape_string($lead_id) . "' order by agent_log_id desc limit 500;";
$rslt=mysql_query($stmt, $link);
$Alogs_to_print = mysql_num_rows($rslt);
##### grab vicidial_agent_log records #####
$stmt="select agent_log_id,user,server_ip,event_time,lead_id,campaign_id,pause_epoch,pause_sec,wait_epoch,wait_sec,talk_epoch,talk_sec,dispo_epoch,dispo_sec,status,user_group,comments,sub_status from vicidial_agent_log where lead_id='" . mysql_real_escape_string($lead_id) . "' order by agent_log_id desc limit 500;";
$rslt=mysql_query($stmt, $link);
$Alogs_to_print = mysql_num_rows($rslt);
$y=0;
$agent_log = '';
$Alog_campaign = '';
while ($Alogs_to_print > $y)
{
$row=mysql_fetch_row($rslt);
if (strlen($Alog_campaign)<1) {$Alog_campaign = $row[5];}
if (eregi("1$|3$|5$|7$|9$", $y))
{$bgcolor='bgcolor="#B9CBFD"';}
else
{$bgcolor='bgcolor="#9BB9FB"';}
$y=0;
$agent_log = '';
$Alog_campaign = '';
while ($Alogs_to_print > $y)
{
$row=mysql_fetch_row($rslt);
if (strlen($Alog_campaign)<1) {$Alog_campaign = $row[5];}
if (eregi("1$|3$|5$|7$|9$", $y))
{$bgcolor='bgcolor="#B9CBFD"';}
else
{$bgcolor='bgcolor="#9BB9FB"';}
$y++;
$agent_log .= "<tr $bgcolor>";
@@ -403,24 +406,24 @@ else
$agent_log .= "<td align=right><font size=2> &nbsp; $row[17] </td></tr>\n";
$campaign_id = $row[5];
}
}
##### grab vicidial_closer_log records #####
$stmt="select * from vicidial_closer_log where lead_id='" . mysql_real_escape_string($lead_id) . "' order by closecallid desc limit 500;";
$rslt=mysql_query($stmt, $link);
$Clogs_to_print = mysql_num_rows($rslt);
##### grab vicidial_closer_log records #####
$stmt="select closecallid,lead_id,list_id,campaign_id,call_date,start_epoch,end_epoch,length_in_sec,status,phone_code,phone_number,user,comments,processed,queue_seconds,user_group,xfercallid,term_reason,uniqueid,agent_only from vicidial_closer_log where lead_id='" . mysql_real_escape_string($lead_id) . "' order by closecallid desc limit 500;";
$rslt=mysql_query($stmt, $link);
$Clogs_to_print = mysql_num_rows($rslt);
$y=0;
$closer_log = '';
$Clog_campaign = '';
while ($Clogs_to_print > $y)
{
$row=mysql_fetch_row($rslt);
if (strlen($Clog_campaign)<1) {$Clog_campaign = $row[3];}
if (eregi("1$|3$|5$|7$|9$", $y))
{$bgcolor='bgcolor="#B9CBFD"';}
else
{$bgcolor='bgcolor="#9BB9FB"';}
$y=0;
$closer_log = '';
$Clog_campaign = '';
while ($Clogs_to_print > $y)
{
$row=mysql_fetch_row($rslt);
if (strlen($Clog_campaign)<1) {$Clog_campaign = $row[3];}
if (eregi("1$|3$|5$|7$|9$", $y))
{$bgcolor='bgcolor="#B9CBFD"';}
else
{$bgcolor='bgcolor="#9BB9FB"';}
$y++;
$closer_log .= "<tr $bgcolor>";
@@ -436,39 +439,43 @@ else
$closer_log .= "<td align=right><font size=2> &nbsp; $row[17] </td></tr>\n";
$campaign_id = $row[3];
}
}
##### grab vicidial_list data for lead #####
$stmt="SELECT * from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'";
##### grab vicidial_list data for lead #####
$stmt="SELECT lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,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,called_count,last_local_call_time,rank,owner from vicidial_list where lead_id='" . mysql_real_escape_string($lead_id) . "'";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
$lead_id = "$row[0]";
$dispo = "$row[3]";
$tsr = "$row[4]";
$vendor_id = "$row[5]";
$list_id = "$row[7]";
$gmt_offset_now = "$row[8]";
$phone_code = "$row[10]";
$phone_number = "$row[11]";
$title = "$row[12]";
$first_name = "$row[13]"; #
$middle_initial = "$row[14]";
$last_name = "$row[15]"; #
$address1 = "$row[16]"; #
$address2 = "$row[17]"; #
$address3 = "$row[18]"; #
$city = "$row[19]"; #
$state = "$row[20]"; #
$province = "$row[21]"; #
$postal_code = "$row[22]"; #
$country_code = "$row[23]"; #
$gender = "$row[24]";
$date_of_birth = "$row[25]";
$alt_phone = "$row[26]"; #
$email = "$row[27]"; #
$security = "$row[28]"; #
$comments = "$row[29]"; #
$lead_id = "$row[0]";
$dispo = "$row[3]";
$tsr = "$row[4]";
$vendor_id = "$row[5]";
$list_id = "$row[7]";
$gmt_offset_now = "$row[8]";
$phone_code = "$row[10]";
$phone_number = "$row[11]";
$title = "$row[12]";
$first_name = "$row[13]";
$middle_initial = "$row[14]";
$last_name = "$row[15]";
$address1 = "$row[16]";
$address2 = "$row[17]";
$address3 = "$row[18]";
$city = "$row[19]";
$state = "$row[20]";
$province = "$row[21]";
$postal_code = "$row[22]";
$country_code = "$row[23]";
$gender = "$row[24]";
$date_of_birth = "$row[25]";
$alt_phone = "$row[26]";
$email = "$row[27]";
$security = "$row[28]";
$comments = "$row[29]";
$called_count = "$row[30]";
$last_local_call_time = "$row[31]";
$rank = "$row[32]";
$owner = "$row[33]";
echo "<br>Call information: $first_name $last_name - $phone_number<br><br><form action=$PHP_SELF method=POST>\n";
echo "<input type=hidden name=end_call value=1>\n";
@@ -502,45 +509,47 @@ else
echo "<tr><td align=right>Alt Phone : </td><td align=left><input type=text name=alt_phone size=20 maxlength=20 value=\"$alt_phone\"></td></tr>\n";
echo "<tr><td align=right>Email : </td><td align=left><input type=text name=email size=30 maxlength=50 value=\"$email\"></td></tr>\n";
echo "<tr><td align=right>Security : </td><td align=left><input type=text name=security size=30 maxlength=100 value=\"$security\"></td></tr>\n";
echo "<tr><td align=right>Rank : </td><td align=left><input type=text name=rank size=7 maxlength=5 value=\"$rank\"></td></tr>\n";
echo "<tr><td align=right>Owner : </td><td align=left><input type=text name=owner size=22 maxlength=20 value=\"$owner\"></td></tr>\n";
echo "<tr><td align=right>Comments : </td><td align=left><TEXTAREA name=comments ROWS=3 COLS=65>$comments</TEXTAREA></td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Disposition: </td><td align=left><select size=1 name=status>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Disposition: </td><td align=left><select size=1 name=status>\n";
$stmt="SELECT * from vicidial_statuses where selectable='Y' order by status";
$rslt=mysql_query($stmt, $link);
$statuses_to_print = mysql_num_rows($rslt);
$statuses_list='';
$stmt="SELECT status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_statuses where selectable='Y' order by status";
$rslt=mysql_query($stmt, $link);
$statuses_to_print = mysql_num_rows($rslt);
$statuses_list='';
$o=0;
$DS=0;
while ($statuses_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
if ( (strlen($dispo) == strlen($rowx[0])) and (eregi($dispo,$rowx[0])) )
{$statuses_list .= "<option SELECTED value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; $DS++;}
else
{$statuses_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";}
$o++;
}
$o=0;
$DS=0;
while ($statuses_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
if ( (strlen($dispo) == strlen($rowx[0])) and (eregi($dispo,$rowx[0])) )
{$statuses_list .= "<option SELECTED value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; $DS++;}
else
{$statuses_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";}
$o++;
}
$stmt="SELECT * from vicidial_campaign_statuses where selectable='Y' and campaign_id='$log_campaign' order by status";
$rslt=mysql_query($stmt, $link);
$CAMPstatuses_to_print = mysql_num_rows($rslt);
$stmt="SELECT status,status_name,selectable,campaign_id,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_campaign_statuses where selectable='Y' and campaign_id='$log_campaign' order by status";
$rslt=mysql_query($stmt, $link);
$CAMPstatuses_to_print = mysql_num_rows($rslt);
$o=0;
while ($CAMPstatuses_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
if ( (strlen($dispo) == strlen($rowx[0])) and (eregi($dispo,$rowx[0])) )
{$statuses_list .= "<option SELECTED value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; $DS++;}
else
{$statuses_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";}
$o++;
}
$o=0;
while ($CAMPstatuses_to_print > $o)
{
$rowx=mysql_fetch_row($rslt);
if ( (strlen($dispo) == strlen($rowx[0])) and (eregi($dispo,$rowx[0])) )
{$statuses_list .= "<option SELECTED value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n"; $DS++;}
else
{$statuses_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";}
$o++;
}
if ($DS < 1) {$statuses_list .= "<option SELECTED value=\"$dispo\">$dispo</option>\n";}
echo "$statuses_list";
echo "</select> <i>(with $log_campaign statuses)</i></td></tr>\n";
if ($DS < 1) {$statuses_list .= "<option SELECTED value=\"$dispo\">$dispo</option>\n";}
echo "$statuses_list";
echo "</select> <i>(with $log_campaign statuses)</i></td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=left>Modify vicidial log </td><td align=left><input type=checkbox name=modify_logs value=\"1\" CHECKED></td></tr>\n";
@@ -554,9 +563,9 @@ else
echo "<BR><BR><BR>\n";
if ( ($dispo == 'CALLBK') or ($dispo == 'CBHOLD') )
{
{
### find any vicidial_callback records for this lead
$stmt="select * from vicidial_callbacks where lead_id='" . mysql_real_escape_string($lead_id) . "' and status IN('ACTIVE','LIVE') order by callback_id desc LIMIT 1;";
$stmt="select callback_id,lead_id,list_id,campaign_id,status,entry_time,callback_time,modify_date,user,recipient,comments,user_group from vicidial_callbacks where lead_id='" . mysql_real_escape_string($lead_id) . "' and status IN('ACTIVE','LIVE') order by callback_id desc LIMIT 1;";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_query($stmt, $link);
$CB_to_print = mysql_num_rows($rslt);
@@ -596,62 +605,56 @@ else
{
echo "<BR>No Callback records found<BR>\n";
}
}
}
else
{
echo "lead lookup FAILED for lead_id $lead_id &nbsp; &nbsp; &nbsp; $NOW_TIME\n<BR><BR>\n";
# echo "<a href=\"$PHP_SELF\">Close this window</a>\n<BR><BR>\n";
}
echo "<br><br>\n";
echo "<center>\n";
}
else
{
echo "lead lookup FAILED for lead_id $lead_id &nbsp; &nbsp; &nbsp; $NOW_TIME\n<BR><BR>\n";
# echo "<a href=\"$PHP_SELF\">Close this window</a>\n<BR><BR>\n";
}
echo "<br><br>\n";
echo "<center>\n";
echo "<B>CALLS TO THIS LEAD:</B>\n";
echo "<TABLE width=750 cellspacing=0 cellpadding=1>\n";
echo "<tr><td><font size=1># </td><td><font size=2>DATE/TIME </td><td align=left><font size=2>LENGTH</td><td align=left><font size=2> STATUS</td><td align=left><font size=2> TSR</td><td align=right><font size=2> CAMPAIGN</td><td align=right><font size=2> LIST</td><td align=right><font size=2> LEAD</td><td align=right><font size=2> HANGUP REASON</td><td align=right><font size=2> PHONE</td></tr>\n";
echo "<B>CALLS TO THIS LEAD:</B>\n";
echo "<TABLE width=750 cellspacing=0 cellpadding=1>\n";
echo "<tr><td><font size=1># </td><td><font size=2>DATE/TIME </td><td align=left><font size=2>LENGTH</td><td align=left><font size=2> STATUS</td><td align=left><font size=2> TSR</td><td align=right><font size=2> CAMPAIGN</td><td align=right><font size=2> LIST</td><td align=right><font size=2> LEAD</td><td align=right><font size=2> HANGUP REASON</td><td align=right><font size=2> PHONE</td></tr>\n";
echo "$call_log\n";
echo "</TABLE>\n";
echo "<BR><BR>\n";
echo "</TABLE>\n";
echo "<BR><BR>\n";
echo "<B>CLOSER RECORDS FOR THIS LEAD:</B>\n";
echo "<TABLE width=750 cellspacing=0 cellpadding=1>\n";
echo "<tr><td><font size=1># </td><td><font size=2>DATE/TIME </td><td align=left><font size=2>LENGTH</td><td align=left><font size=2> STATUS</td><td align=left><font size=2> TSR</td><td align=right><font size=2> CAMPAIGN</td><td align=right><font size=2> LIST</td><td align=right><font size=2> LEAD</td><td align=right><font size=2> WAIT</td><td align=right><font size=2> HANGUP REASON</td></tr>\n";
echo "<B>CLOSER RECORDS FOR THIS LEAD:</B>\n";
echo "<TABLE width=750 cellspacing=0 cellpadding=1>\n";
echo "<tr><td><font size=1># </td><td><font size=2>DATE/TIME </td><td align=left><font size=2>LENGTH</td><td align=left><font size=2> STATUS</td><td align=left><font size=2> TSR</td><td align=right><font size=2> CAMPAIGN</td><td align=right><font size=2> LIST</td><td align=right><font size=2> LEAD</td><td align=right><font size=2> WAIT</td><td align=right><font size=2> HANGUP REASON</td></tr>\n";
echo "$closer_log\n";
echo "</TABLE></center>\n";
echo "<BR><BR>\n";
echo "</TABLE></center>\n";
echo "<BR><BR>\n";
echo "<B>AGENT LOG RECORDS FOR THIS LEAD:</B>\n";
echo "<TABLE width=750 cellspacing=0 cellpadding=1>\n";
echo "<tr><td><font size=1># </td><td><font size=2>DATE/TIME </td><td align=left><font size=2>CAMPAIGN</td><td align=left><font size=2> TSR</td><td align=left><font size=2> PAUSE</td><td align=right><font size=2> WAIT</td><td align=right><font size=2> TALK</td><td align=right><font size=2> DISPO</td><td align=right><font size=2> STATUS</td><td align=right><font size=2> GROUP</td><td align=right><font size=2> SUB</td></tr>\n";
echo "<B>AGENT LOG RECORDS FOR THIS LEAD:</B>\n";
echo "<TABLE width=750 cellspacing=0 cellpadding=1>\n";
echo "<tr><td><font size=1># </td><td><font size=2>DATE/TIME </td><td align=left><font size=2>CAMPAIGN</td><td align=left><font size=2> TSR</td><td align=left><font size=2> PAUSE</td><td align=right><font size=2> WAIT</td><td align=right><font size=2> TALK</td><td align=right><font size=2> DISPO</td><td align=right><font size=2> STATUS</td><td align=right><font size=2> GROUP</td><td align=right><font size=2> SUB</td></tr>\n";
echo "$agent_log\n";
echo "$agent_log\n";
echo "</TABLE>\n";
echo "<BR><BR>\n";
echo "</TABLE>\n";
echo "<BR><BR>\n";
echo "<B>RECORDINGS FOR THIS LEAD:</B>\n";
echo "<TABLE width=750 cellspacing=1 cellpadding=1>\n";
echo "<tr><td><font size=1># </td><td align=left><font size=2> LEAD</td><td><font size=2>DATE/TIME </td><td align=left><font size=2>SECONDS </td><td align=left><font size=2> &nbsp; RECID</td><td align=center><font size=2>FILENAME</td><td align=left><font size=2>LOCATION</td><td align=left><font size=2>TSR</td></tr>\n";
echo "<B>RECORDINGS FOR THIS LEAD:</B>\n";
echo "<TABLE width=750 cellspacing=1 cellpadding=1>\n";
echo "<tr><td><font size=1># </td><td align=left><font size=2> LEAD</td><td><font size=2>DATE/TIME </td><td align=left><font size=2>SECONDS </td><td align=left><font size=2> &nbsp; RECID</td><td align=center><font size=2>FILENAME</td><td align=left><font size=2>LOCATION</td><td align=left><font size=2>TSR</td></tr>\n";
$stmt="select * from recording_log where lead_id='" . mysql_real_escape_string($lead_id) . "' order by recording_id desc limit 500;";
$rslt=mysql_query($stmt, $link);
$logs_to_print = mysql_num_rows($rslt);
$stmt="select recording_id,channel,server_ip,extension,start_time,start_epoch,end_time,end_epoch,length_in_sec,length_in_min,filename,location,lead_id,user,vicidial_id from recording_log where lead_id='" . mysql_real_escape_string($lead_id) . "' order by recording_id desc limit 500;";
$rslt=mysql_query($stmt, $link);
$logs_to_print = mysql_num_rows($rslt);
$u=0;
while ($logs_to_print > $u)
@@ -710,12 +713,8 @@ $logs_to_print = mysql_num_rows($rslt);
}
echo "</TABLE></center>\n";
}
echo "</TABLE></center>\n";
}
$ENDtime = date("U");
@@ -739,10 +738,4 @@ echo "<font size=0>\n\n\n<br><br><br>\nscript runtime: $RUNtime seconds</font>";
exit;
?>
@@ -12,6 +12,7 @@
# 90310-2247 - First build
# 90330-1343 - Added more debug info, bug fixes
# 90508-0644 - Changed to PHP long tags
# 90721-1137 - Added rank and owner as vicidial_list fields
#
require("dbconnect.php");
@@ -214,7 +215,7 @@ if ($run_export > 0)
if ($RUNcampaign > 0)
{
$export_campaign_rows='';
$stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;";
$stmt = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.alt_dial,vi.rank,vi.owner from vicidial_users vu,vicidial_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $campaign_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$outbound_to_print = mysql_num_rows($rslt);
@@ -230,7 +231,7 @@ if ($run_export > 0)
{
$row=mysql_fetch_row($rslt);
$export_campaign_rows .= "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\r\n";
$export_campaign_rows .= "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\r\n";
$i++;
$outbound_calls++;
}
@@ -240,7 +241,7 @@ if ($run_export > 0)
if ($RUNgroup > 0)
{
$export_group_rows='';
$stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;";
$stmtA = "SELECT vl.call_date,vl.phone_number,vl.status,vl.user,vu.full_name,vl.campaign_id,vi.vendor_lead_code,vi.source_id,vi.list_id,vi.gmt_offset_now,vi.phone_code,vi.phone_number,vi.title,vi.first_name,vi.middle_initial,vi.last_name,vi.address1,vi.address2,vi.address3,vi.city,vi.state,vi.province,vi.postal_code,vi.country_code,vi.gender,vi.date_of_birth,vi.alt_phone,vi.email,vi.security_phrase,vi.comments,vl.length_in_sec,vl.user_group,vl.queue_seconds,vi.rank,vi.owner from vicidial_users vu,vicidial_closer_log vl,vicidial_list vi where vl.call_date >= '$query_date 00:00:00' and vl.call_date <= '$end_date 23:59:59' and vu.user=vl.user and vi.lead_id=vl.lead_id $list_SQL $group_SQL $user_group_SQL $status_SQL order by vl.call_date limit 100000;";
$rslt=mysql_query($stmtA, $link);
if ($DB) {echo "$stmt\n";}
$inbound_to_print = mysql_num_rows($rslt);
@@ -256,7 +257,7 @@ if ($run_export > 0)
{
$row=mysql_fetch_row($rslt);
$export_group_rows .= "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\r\n";
$export_group_rows .= "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\t$row[34]\r\n";
$i++;
}
}
+3 -2
View File
@@ -10,6 +10,7 @@
#
# 90209-1310 - First build
# 90508-0644 - Changed to PHP long tags
# 90721-1238 - Added rank and owner as vicidial_list fields
#
require("dbconnect.php");
@@ -112,7 +113,7 @@ header('Pragma: public');
ob_clean();
flush();
$stmt="select * from vicidial_list where list_id='$list_id';";
$stmt="select lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,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,called_count,last_local_call_time,rank,owner from vicidial_list where list_id='$list_id';";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$leads_to_print = mysql_num_rows($rslt);
@@ -121,7 +122,7 @@ while ($i < $leads_to_print)
{
$row=mysql_fetch_row($rslt);
echo "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\r\n";
echo "$row[0]\t$row[1]\t$row[2]\t$row[3]\t$row[4]\t$row[5]\t$row[6]\t$row[7]\t$row[8]\t$row[9]\t$row[10]\t$row[11]\t$row[12]\t$row[13]\t$row[14]\t$row[15]\t$row[16]\t$row[17]\t$row[18]\t$row[19]\t$row[20]\t$row[21]\t$row[22]\t$row[23]\t$row[24]\t$row[25]\t$row[26]\t$row[27]\t$row[28]\t$row[29]\t$row[30]\t$row[31]\t$row[32]\t$row[33]\r\n";
$i++;
}
+11 -5
View File
@@ -1,8 +1,8 @@
#!/usr/bin/perl
#
# listloader.pl version 2.0.5
# listloader.pl version 2.2.0
#
# Copyright (C) 2008 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: AGPLv2
#
#
# CHANGES
@@ -19,6 +19,7 @@
# 70510-1518 - Added campaign and system duplicate check and phonecode override
# 80428-0144 - UTF8 cleanup
# 80713-0023 - added last_local_call_time field default of 2008-01-01
# 90721-1425 - Added rank and owner as vicidial_list fields
#
### begin parsing run-time options ###
@@ -258,6 +259,11 @@ foreach $oWkS (@{$oBook->{Worksheet}}) {
$oWkC = $oWkS->{Cells}[$iR][22];
if ($oWkC) {$comments=$oWkC->Value; }
$comments=~s/^\s*(.*?)\s*$/$1/;
$oWkC = $oWkS->{Cells}[$iR][23];
if ($oWkC) {$rank=$oWkC->Value; }
if (length($rank)<1) {$rank='0';}
$oWkC = $oWkS->{Cells}[$iR][24];
if ($oWkC) {$owner=$oWkC->Value; }
if (length($forcelistid) > 0)
{
@@ -565,14 +571,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) {
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,'2008-01-01 00:00:00');";
$stmtZ = "INSERT INTO vicidial_list (lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,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,called_count,last_local_call_time,rank,owner) 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,'2008-01-01 00:00:00','$rank','$owner');";
$affected_rows = $dbhA->do($stmtZ);
print STMT_FILE $stmtZ."\r\n";
$multistmt='';
$multi_insert_counter=0;
} else {
$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,'2008-01-01 00:00:00'),";
$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,'2008-01-01 00:00:00','$rank','$owner'),";
$multi_insert_counter++;
}
@@ -591,7 +597,7 @@ foreach $oWkS (@{$oBook->{Worksheet}}) {
}
if ($multi_insert_counter > 0) {
$stmtZ = "INSERT INTO vicidial_list values ".substr($multistmt, 0, -1).";";
$stmtZ = "INSERT INTO vicidial_list (lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,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,called_count,last_local_call_time,rank,owner) values ".substr($multistmt, 0, -1).";";
$affected_rows = $dbhA->do($stmtZ);
print STMT_FILE $stmtZ."\r\n";
}
@@ -1,14 +1,15 @@
#!/usr/bin/perl
#
# listloader_rowdisplay.pl version 2.0.5
# listloader_rowdisplay.pl version 2.2.0
#
# Copyright (C) 2008 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: AGPLv2
#
#
# CHANGES
#
# 60811-1232 - Changed to DBI
# 60811-1329 - changed to use /etc/astguiclient.conf for configs
# 90721-1340 - Added rank and owner as vicidial_list fields
#
### begin parsing run-time options ###
@@ -116,7 +117,7 @@ foreach $oWkS (@{$oBook->{Worksheet}}) {
@xls_row=split(/\|/, $var_str);
$stmtA = "select vendor_lead_code, source_id, list_id, 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 from vicidial_list limit 1;";
$stmtA = "select vendor_lead_code, source_id, list_id, 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, rank, owner from vicidial_list limit 1;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
+11 -5
View File
@@ -1,8 +1,8 @@
#!/usr/bin/perl
#
# listloader_super.pl version 2.0.5
# listloader_super.pl version 2.2.0
#
# Copyright (C) 2008 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2009 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: AGPLv2
#
#
# CHANGES
@@ -18,6 +18,7 @@
# 70510-1518 - Added campaign and system duplicate check and phonecode override
# 80428-0144 - UTF8 cleanup
# 80713-0023 - added last_local_call_time field default of 2008-01-01
# 90721-1341 - Added rank and owner as vicidial_list fields
#
### begin parsing run-time options ###
@@ -258,6 +259,11 @@ foreach $oWkS (@{$oBook->{Worksheet}}) {
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[22]];
if ($oWkC) {$comments=$oWkC->Value; }
$comments=~s/^\s*(.*?)\s*$/$1/;
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[23]];
if ($oWkC) {$rank=$oWkC->Value; }
if (length($rank)<1) {$rank='0';}
$oWkC = $oWkS->{Cells}[$iR][$xls_fields[24]];
if ($oWkC) {$owner=$oWkC->Value; }
@@ -567,14 +573,14 @@ foreach $oWkS (@{$oBook->{Worksheet}}) {
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,'2008-01-01 00:00:00');";
$stmtZ = "INSERT INTO vicidial_list (lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,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,called_count,last_local_call_time,rank,owner) 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,'2008-01-01 00:00:00','$rank','$owner');";
$affected_rows = $dbhA->do($stmtZ);
print STMT_FILE $stmtZ."\r\n";
$multistmt='';
$multi_insert_counter=0;
} else {
$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,'2008-01-01 00:00:00'),";
$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,'2008-01-01 00:00:00','$rank','$owner'),";
$multi_insert_counter++;
}
@@ -593,7 +599,7 @@ foreach $oWkS (@{$oBook->{Worksheet}}) {
}
if ($multi_insert_counter > 0) {
$stmtZ = "INSERT INTO vicidial_list values ".substr($multistmt, 0, -1).";";
$stmtZ = "INSERT INTO vicidial_list (lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,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,called_count,last_local_call_time,rank,owner) values ".substr($multistmt, 0, -1).";";
$affected_rows = $dbhA->do($stmtZ);
print STMT_FILE $stmtZ."\r\n";
}
@@ -27,11 +27,12 @@
# 90310-2128 - Added admin header
# 90508-0644 - Changed to PHP long tags
# 90522-0506 - Security fix
# 90721-1339 - Added rank and owner as vicidial_list fields
#
# 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.2.0-31';
$build = '90522-0506';
$version = '2.2.0-32';
$build = '90721-1339';
require("dbconnect.php");
@@ -47,44 +48,44 @@ $PHP_SELF=$_SERVER['PHP_SELF'];
$leadfile=$_FILES["leadfile"];
$LF_orig = $_FILES['leadfile']['name'];
$LF_path = $_FILES['leadfile']['tmp_name'];
if (isset($_GET["submit_file"])) {$submit_file=$_GET["submit_file"];}
elseif (isset($_POST["submit_file"])) {$submit_file=$_POST["submit_file"];}
if (isset($_GET["submit_file"])) {$submit_file=$_GET["submit_file"];}
elseif (isset($_POST["submit_file"])) {$submit_file=$_POST["submit_file"];}
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
if (isset($_GET["leadfile_name"])) {$leadfile_name=$_GET["leadfile_name"];}
elseif (isset($_POST["leadfile_name"])) {$leadfile_name=$_POST["leadfile_name"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
if (isset($_GET["leadfile_name"])) {$leadfile_name=$_GET["leadfile_name"];}
elseif (isset($_POST["leadfile_name"])) {$leadfile_name=$_POST["leadfile_name"];}
if (isset($_FILES["leadfile"])) {$leadfile_name=$_FILES["leadfile"]['name'];}
if (isset($_GET["file_layout"])) {$file_layout=$_GET["file_layout"];}
elseif (isset($_POST["file_layout"])) {$file_layout=$_POST["file_layout"];}
if (isset($_GET["OK_to_process"])) {$OK_to_process=$_GET["OK_to_process"];}
elseif (isset($_POST["OK_to_process"])) {$OK_to_process=$_POST["OK_to_process"];}
if (isset($_GET["vendor_lead_code_field"])) {$vendor_lead_code_field=$_GET["vendor_lead_code_field"];}
elseif (isset($_POST["vendor_lead_code_field"])) {$vendor_lead_code_field=$_POST["vendor_lead_code_field"];}
if (isset($_GET["source_id_field"])) {$source_id_field=$_GET["source_id_field"];}
elseif (isset($_POST["source_id_field"])) {$source_id_field=$_POST["source_id_field"];}
elseif (isset($_POST["vendor_lead_code_field"])) {$vendor_lead_code_field=$_POST["vendor_lead_code_field"];}
if (isset($_GET["source_id_field"])) {$source_id_field=$_GET["source_id_field"];}
elseif (isset($_POST["source_id_field"])) {$source_id_field=$_POST["source_id_field"];}
if (isset($_GET["list_id_field"])) {$list_id_field=$_GET["list_id_field"];}
elseif (isset($_POST["list_id_field"])) {$list_id_field=$_POST["list_id_field"];}
if (isset($_GET["phone_code_field"])) {$phone_code_field=$_GET["phone_code_field"];}
elseif (isset($_POST["phone_code_field"])) {$phone_code_field=$_POST["phone_code_field"];}
if (isset($_GET["phone_code_field"])) {$phone_code_field=$_GET["phone_code_field"];}
elseif (isset($_POST["phone_code_field"])) {$phone_code_field=$_POST["phone_code_field"];}
if (isset($_GET["phone_number_field"])) {$phone_number_field=$_GET["phone_number_field"];}
elseif (isset($_POST["phone_number_field"])) {$phone_number_field=$_POST["phone_number_field"];}
elseif (isset($_POST["phone_number_field"])) {$phone_number_field=$_POST["phone_number_field"];}
if (isset($_GET["title_field"])) {$title_field=$_GET["title_field"];}
elseif (isset($_POST["title_field"])) {$title_field=$_POST["title_field"];}
if (isset($_GET["first_name_field"])) {$first_name_field=$_GET["first_name_field"];}
elseif (isset($_POST["first_name_field"])) {$first_name_field=$_POST["first_name_field"];}
if (isset($_GET["middle_initial_field"])) {$middle_initial_field=$_GET["middle_initial_field"];}
elseif (isset($_POST["middle_initial_field"])) {$middle_initial_field=$_POST["middle_initial_field"];}
if (isset($_GET["last_name_field"])) {$last_name_field=$_GET["last_name_field"];}
elseif (isset($_POST["last_name_field"])) {$last_name_field=$_POST["last_name_field"];}
if (isset($_GET["first_name_field"])) {$first_name_field=$_GET["first_name_field"];}
elseif (isset($_POST["first_name_field"])) {$first_name_field=$_POST["first_name_field"];}
if (isset($_GET["middle_initial_field"])) {$middle_initial_field=$_GET["middle_initial_field"];}
elseif (isset($_POST["middle_initial_field"])) {$middle_initial_field=$_POST["middle_initial_field"];}
if (isset($_GET["last_name_field"])) {$last_name_field=$_GET["last_name_field"];}
elseif (isset($_POST["last_name_field"])) {$last_name_field=$_POST["last_name_field"];}
if (isset($_GET["address1_field"])) {$address1_field=$_GET["address1_field"];}
elseif (isset($_POST["address1_field"])) {$address1_field=$_POST["address1_field"];}
elseif (isset($_POST["address1_field"])) {$address1_field=$_POST["address1_field"];}
if (isset($_GET["address2_field"])) {$address2_field=$_GET["address2_field"];}
elseif (isset($_POST["address2_field"])) {$address2_field=$_POST["address2_field"];}
elseif (isset($_POST["address2_field"])) {$address2_field=$_POST["address2_field"];}
if (isset($_GET["address3_field"])) {$address3_field=$_GET["address3_field"];}
elseif (isset($_POST["address3_field"])) {$address3_field=$_POST["address3_field"];}
if (isset($_GET["city_field"])) {$city_field=$_GET["city_field"];}
elseif (isset($_POST["address3_field"])) {$address3_field=$_POST["address3_field"];}
if (isset($_GET["city_field"])) {$city_field=$_GET["city_field"];}
elseif (isset($_POST["city_field"])) {$city_field=$_POST["city_field"];}
if (isset($_GET["state_field"])) {$state_field=$_GET["state_field"];}
elseif (isset($_POST["state_field"])) {$state_field=$_POST["state_field"];}
@@ -93,21 +94,25 @@ if (isset($_GET["province_field"])) {$province_field=$_GET["province_field"];
if (isset($_GET["postal_code_field"])) {$postal_code_field=$_GET["postal_code_field"];}
elseif (isset($_POST["postal_code_field"])) {$postal_code_field=$_POST["postal_code_field"];}
if (isset($_GET["country_code_field"])) {$country_code_field=$_GET["country_code_field"];}
elseif (isset($_POST["country_code_field"])) {$country_code_field=$_POST["country_code_field"];}
elseif (isset($_POST["country_code_field"])) {$country_code_field=$_POST["country_code_field"];}
if (isset($_GET["gender_field"])) {$gender_field=$_GET["gender_field"];}
elseif (isset($_POST["gender_field"])) {$gender_field=$_POST["gender_field"];}
if (isset($_GET["date_of_birth_field"])) {$date_of_birth_field=$_GET["date_of_birth_field"];}
elseif (isset($_POST["date_of_birth_field"])) {$date_of_birth_field=$_POST["date_of_birth_field"];}
if (isset($_GET["alt_phone_field"])) {$alt_phone_field=$_GET["alt_phone_field"];}
elseif (isset($_POST["alt_phone_field"])) {$alt_phone_field=$_POST["alt_phone_field"];}
if (isset($_GET["date_of_birth_field"])) {$date_of_birth_field=$_GET["date_of_birth_field"];}
elseif (isset($_POST["date_of_birth_field"])) {$date_of_birth_field=$_POST["date_of_birth_field"];}
if (isset($_GET["alt_phone_field"])) {$alt_phone_field=$_GET["alt_phone_field"];}
elseif (isset($_POST["alt_phone_field"])) {$alt_phone_field=$_POST["alt_phone_field"];}
if (isset($_GET["email_field"])) {$email_field=$_GET["email_field"];}
elseif (isset($_POST["email_field"])) {$email_field=$_POST["email_field"];}
if (isset($_GET["security_phrase_field"])) {$security_phrase_field=$_GET["security_phrase_field"];}
elseif (isset($_POST["security_phrase_field"])) {$security_phrase_field=$_POST["security_phrase_field"];}
if (isset($_GET["security_phrase_field"])) {$security_phrase_field=$_GET["security_phrase_field"];}
elseif (isset($_POST["security_phrase_field"])) {$security_phrase_field=$_POST["security_phrase_field"];}
if (isset($_GET["comments_field"])) {$comments_field=$_GET["comments_field"];}
elseif (isset($_POST["comments_field"])) {$comments_field=$_POST["comments_field"];}
if (isset($_GET["list_id_override"])) {$list_id_override=$_GET["list_id_override"];}
elseif (isset($_POST["list_id_override"])) {$list_id_override=$_POST["list_id_override"];}
elseif (isset($_POST["comments_field"])) {$comments_field=$_POST["comments_field"];}
if (isset($_GET["rank_field"])) {$rank_field=$_GET["rank_field"];}
elseif (isset($_POST["rank_field"])) {$rank_field=$_POST["rank_field"];}
if (isset($_GET["owner_field"])) {$owner_field=$_GET["owner_field"];}
elseif (isset($_POST["owner_field"])) {$owner_field=$_POST["owner_field"];}
if (isset($_GET["list_id_override"])) {$list_id_override=$_GET["list_id_override"];}
elseif (isset($_POST["list_id_override"])) {$list_id_override=$_POST["list_id_override"];}
$list_id_override = (preg_replace("/\D/","",$list_id_override));
if (isset($_GET["lead_file"])) {$lead_file=$_GET["lead_file"];}
elseif (isset($_POST["lead_file"])) {$lead_file=$_POST["lead_file"];}
@@ -453,6 +458,8 @@ echo "<TABLE CELLPADDING=4 CELLSPACING=0><TR><TD>";
$email = $row[$email_field];
$security_phrase = $row[$security_phrase_field];
$comments = trim($row[$comments_field]);
$rank = $row[$rank_field];
$owner = $row[$owner_field];
if (strlen($list_id_override)>0)
{
@@ -560,7 +567,7 @@ echo "<TABLE CELLPADDING=4 CELLSPACING=0><TR><TD>";
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,'2008-01-01 00:00:00');";
$stmtZ = "INSERT INTO vicidial_list (lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,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,called_count,last_local_call_time,rank,owner) 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,'2008-01-01 00:00:00','$rank','$owner');";
$rslt=mysql_query($stmtZ, $link);
if ($WeBRooTWritablE > 0)
{fwrite($stmt_file, $stmtZ."\r\n");}
@@ -568,7 +575,7 @@ echo "<TABLE CELLPADDING=4 CELLSPACING=0><TR><TD>";
$multi_insert_counter=0;
} else {
$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,'2008-01-01 00:00:00'),";
$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,'2008-01-01 00:00:00','$rank','$owner'),";
$multi_insert_counter++;
}
@@ -586,7 +593,7 @@ echo "<TABLE CELLPADDING=4 CELLSPACING=0><TR><TD>";
}
}
if ($multi_insert_counter!=0) {
$stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";";
$stmtZ = "INSERT INTO vicidial_list (lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,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,called_count,last_local_call_time,rank,owner) values".substr($multistmt, 0, -1).";";
mysql_query($stmtZ, $link);
if ($WeBRooTWritablE > 0)
{fwrite($stmt_file, $stmtZ."\r\n");}
@@ -610,13 +617,13 @@ echo "<TABLE CELLPADDING=4 CELLSPACING=0><TR><TD>";
{
print "<BR><BR>PHONE CODE OVERRIDE FOR THIS FILE: $phone_code_override<BR><BR>\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|";
# 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,$rank_field,$owner_field, --forcelistid=$list_id_override --lead_file=$lead_file|";
$dupcheckCLI=''; $postalgmtCLI='';
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 --forcephonecode=$phone_code_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,$rank_field,$owner_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");
@@ -669,6 +676,10 @@ echo "<TABLE CELLPADDING=4 CELLSPACING=0><TR><TD>";
$email = $row[$email_field];
$security_phrase = $row[$security_phrase_field];
$comments = trim($row[$comments_field]);
$rank = $row[$rank_field];
$owner = $row[$owner_field];
if (strlen($rank)<1) {$rank='0';}
if (strlen($list_id_override)>0)
{
@@ -775,7 +786,7 @@ echo "<TABLE CELLPADDING=4 CELLSPACING=0><TR><TD>";
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,'2008-01-01 00:00:00');";
$stmtZ = "INSERT INTO vicidial_list (lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,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,called_count,last_local_call_time,rank,owner) 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,'2008-01-01 00:00:00','$rank','$owner');";
$rslt=mysql_query($stmtZ, $link);
if ($WeBRooTWritablE > 0)
{fwrite($stmt_file, $stmtZ."\r\n");}
@@ -783,7 +794,7 @@ echo "<TABLE CELLPADDING=4 CELLSPACING=0><TR><TD>";
$multi_insert_counter=0;
} else {
$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,'2008-01-01 00:00:00'),";
$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,'2008-01-01 00:00:00','$rank','$owner'),";
$multi_insert_counter++;
}
@@ -800,7 +811,7 @@ echo "<TABLE CELLPADDING=4 CELLSPACING=0><TR><TD>";
}
}
if ($multi_insert_counter!=0) {
$stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";";
$stmtZ = "INSERT INTO vicidial_list (lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,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,called_count,last_local_call_time,rank,owner) values".substr($multistmt, 0, -1).";";
mysql_query($stmtZ, $link);
if ($WeBRooTWritablE > 0)
{fwrite($stmt_file, $stmtZ."\r\n");}
@@ -899,6 +910,8 @@ if ($leadfile) {
$email = $row[20];
$security_phrase = $row[21];
$comments = trim($row[22]);
$rank = $row[23];
$owner = $row[24];
if (strlen($list_id_override)>0)
{
@@ -1005,7 +1018,7 @@ if ($leadfile) {
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,'2008-01-01 00:00:00');";
$stmtZ = "INSERT INTO vicidial_list (lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,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,called_count,last_local_call_time,rank,owner) 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,'2008-01-01 00:00:00','$rank','$owner');";
$rslt=mysql_query($stmtZ, $link);
if ($WeBRooTWritablE > 0)
{fwrite($stmt_file, $stmtZ."\r\n");}
@@ -1013,7 +1026,7 @@ if ($leadfile) {
$multi_insert_counter=0;
} else {
$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,'2008-01-01 00:00:00'),";
$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,'2008-01-01 00:00:00','$rank','$owner'),";
$multi_insert_counter++;
}
@@ -1031,7 +1044,7 @@ if ($leadfile) {
}
}
if ($multi_insert_counter!=0) {
$stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";";
$stmtZ = "INSERT INTO vicidial_list (lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,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,called_count,last_local_call_time,rank,owner) values".substr($multistmt, 0, -1).";";
mysql_query($stmtZ, $link);
if ($WeBRooTWritablE > 0)
{fwrite($stmt_file, $stmtZ."\r\n");}
@@ -1125,6 +1138,8 @@ if ($leadfile) {
$email = $row[20];
$security_phrase = $row[21];
$comments = trim($row[22]);
$rank = $row[23];
$owner = $row[24];
if (strlen($list_id_override)>0)
{
@@ -1231,7 +1246,7 @@ if ($leadfile) {
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,'2008-01-01 00:00:00');";
$stmtZ = "INSERT INTO vicidial_list (lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,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,called_count,last_local_call_time,rank,owner) 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,'2008-01-01 00:00:00','$rank','$owner');";
$rslt=mysql_query($stmtZ, $link);
if ($WeBRooTWritablE > 0)
{fwrite($stmt_file, $stmtZ."\r\n");}
@@ -1239,7 +1254,7 @@ if ($leadfile) {
$multi_insert_counter=0;
} else {
$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,'2008-01-01 00:00:00'),";
$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,'2008-01-01 00:00:00','$rank','$owner'),";
$multi_insert_counter++;
}
@@ -1256,7 +1271,7 @@ if ($leadfile) {
}
}
if ($multi_insert_counter!=0) {
$stmtZ = "INSERT INTO vicidial_list values".substr($multistmt, 0, -1).";";
$stmtZ = "INSERT INTO vicidial_list (lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,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,called_count,last_local_call_time,rank,owner) values".substr($multistmt, 0, -1).";";
mysql_query($stmtZ, $link);
if ($WeBRooTWritablE > 0)
{fwrite($stmt_file, $stmtZ."\r\n");}
@@ -1276,7 +1291,7 @@ if ($leadfile) {
print " <th><font class='standard' color='white'>File data</font></th>\r\n";
print " </tr>\r\n";
$rslt=mysql_query("select vendor_lead_code, source_id, list_id, 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 from vicidial_list limit 1", $link);
$rslt=mysql_query("select vendor_lead_code, source_id, list_id, 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, rank, owner from vicidial_list limit 1", $link);
if (!eregi(".csv", $leadfile_name) && !eregi(".xls", $leadfile_name))
+11 -3
View File
@@ -24,10 +24,11 @@
# 90514-0602 - Added sounds_list function
# 90522-0506 - Security fix
# 90530-0946 - Added QueueMetrics blind monitoring option
# 90721-1428 - Added rank and owner as vicidial_list fields
#
$version = '2.2.0-10';
$build = '90530-0946';
$version = '2.2.0-11';
$build = '90721-1428';
require("dbconnect.php");
@@ -114,6 +115,10 @@ if (isset($_GET["stage"])) {$stage=$_GET["stage"];}
elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];}
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
if (isset($_GET["rank"])) {$rank=$_GET["rank"];}
elseif (isset($_POST["rank"])) {$rank=$_POST["rank"];}
if (isset($_GET["owner"])) {$owner=$_GET["owner"];}
elseif (isset($_POST["owner"])) {$owner=$_POST["owner"];}
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
@@ -193,6 +198,8 @@ if ($non_latin < 1)
$session_id = ereg_replace("[^0-9]","",$session_id);
$server_ip = ereg_replace("[^\.0-9]","",$server_ip);
$stage = ereg_replace("[^a-zA-Z]","",$stage);
$rank = ereg_replace("[^0-9]","",$rank);
$owner = ereg_replace("[^-_0-9a-zA-Z]","",$owner);
}
else
{
@@ -206,6 +213,7 @@ if (strlen($phone_code)<1) {$phone_code='1';}
$USarea = substr($phone_number, 0, 3);
if (strlen($hopper_priority)<1) {$hopper_priority=0;}
if (strlen($gender)<1) {$gender='U';}
if (strlen($rank)<1) {$rank='0';}
$StarTtime = date("U");
$NOW_DATE = date("Y-m-d");
@@ -663,7 +671,7 @@ if ($function == 'add_lead')
### insert a new lead in the system with this phone number
$stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='NEW',user='$user',vendor_lead_code='$vendor_lead_code',source_id='$source_id',gmt_offset_now='$gmt_offset',title='$title',first_name='$first_name',middle_initial='$middle_initial',last_name='$last_name',address1='$address1',address2='$address2',address3='$address3',city='$city',state='$state',province='$province',postal_code='$postal_code',country_code='$country_code',gender='$gender',date_of_birth='$date_of_birth',alt_phone='$alt_phone',email='$email',security_phrase='$security_phrase',comments='$comments',called_since_last_reset='N',entry_date='$ENTRYdate',last_local_call_time='$NOW_TIME';";
$stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='NEW',user='$user',vendor_lead_code='$vendor_lead_code',source_id='$source_id',gmt_offset_now='$gmt_offset',title='$title',first_name='$first_name',middle_initial='$middle_initial',last_name='$last_name',address1='$address1',address2='$address2',address3='$address3',city='$city',state='$state',province='$province',postal_code='$postal_code',country_code='$country_code',gender='$gender',date_of_birth='$date_of_birth',alt_phone='$alt_phone',email='$email',security_phrase='$security_phrase',comments='$comments',called_since_last_reset='N',entry_date='$ENTRYdate',last_local_call_time='$NOW_TIME',rank='$rank',owner='$owner';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);