Added International DNC scrub features
git-svn-id: svn://192.168.202.10@3273 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -516,6 +516,9 @@ OTHER CHANGES:
|
|||||||
144. Added options for HTML formatting and UTF-8 charset in emails through the
|
144. Added options for HTML formatting and UTF-8 charset in emails through the
|
||||||
dispo_send_email.php script.
|
dispo_send_email.php script.
|
||||||
|
|
||||||
|
145. Added tools for International DNC phone number scrubbing. See the
|
||||||
|
INTERNATIONAL_DNC_SCRUB.txt doc for more information.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+37
-6
@@ -21,7 +21,7 @@
|
|||||||
# - R = Recycled leads
|
# - R = Recycled leads
|
||||||
# - S = Standard hopper load
|
# - S = Standard hopper load
|
||||||
#
|
#
|
||||||
# Copyright (C) 2019 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
# Copyright (C) 2020 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||||
#
|
#
|
||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
# 50810-1613 - Added database server variable definitions lookup
|
# 50810-1613 - Added database server variable definitions lookup
|
||||||
@@ -95,6 +95,7 @@
|
|||||||
# 190213-1207 - Added additional $VLforce_index flags, for high-volume dialing systems
|
# 190213-1207 - Added additional $VLforce_index flags, for high-volume dialing systems
|
||||||
# 190524-1228 - Fix for lead filters with 'NONE' in the filter ID
|
# 190524-1228 - Fix for lead filters with 'NONE' in the filter ID
|
||||||
# 190703-1650 - Allow for single-quotes in state field
|
# 190703-1650 - Allow for single-quotes in state field
|
||||||
|
# 200814-2132 - Added support for Internation DNC scrubbing
|
||||||
#
|
#
|
||||||
|
|
||||||
# constants
|
# constants
|
||||||
@@ -326,7 +327,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
|
|||||||
|
|
||||||
### Grab system_settings values from the database
|
### Grab system_settings values from the database
|
||||||
$anyone_callback_inactive_lists='default';
|
$anyone_callback_inactive_lists='default';
|
||||||
$stmtA = "SELECT anyone_callback_inactive_lists FROM system_settings;";
|
$stmtA = "SELECT anyone_callback_inactive_lists,enable_international_dncs FROM system_settings;";
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
$sthArows=$sthA->rows;
|
$sthArows=$sthA->rows;
|
||||||
@@ -334,6 +335,7 @@ if ($sthArows > 0)
|
|||||||
{
|
{
|
||||||
@aryA = $sthA->fetchrow_array;
|
@aryA = $sthA->fetchrow_array;
|
||||||
$anyone_callback_inactive_lists = $aryA[0];
|
$anyone_callback_inactive_lists = $aryA[0];
|
||||||
|
$enable_international_dncs = $aryA[1];
|
||||||
}
|
}
|
||||||
$sthA->finish();
|
$sthA->finish();
|
||||||
|
|
||||||
@@ -354,6 +356,35 @@ if ($sthArows > 0)
|
|||||||
}
|
}
|
||||||
$sthA->finish();
|
$sthA->finish();
|
||||||
|
|
||||||
|
### Grab "blocked" lists from settings container if international DNCs activated
|
||||||
|
if ($enable_international_dncs)
|
||||||
|
{
|
||||||
|
$dnc_list_stmt="select container_entry from vicidial_settings_containers where container_id='DNC_CURRENT_BLOCKED_LISTS' and container_entry!=''";
|
||||||
|
if ($DBX) {print "$dnc_list_stmt\n";}
|
||||||
|
$dnc_list_rslt=$dbhA->prepare($dnc_list_stmt);
|
||||||
|
$dnc_list_rslt->execute();
|
||||||
|
if ($dnc_list_rslt->rows>0)
|
||||||
|
{
|
||||||
|
$dnc_blocked_lists="";
|
||||||
|
@dnc_list_row=$dnc_list_rslt->fetchrow_array;
|
||||||
|
|
||||||
|
@blocked_dnc_lists=split(/\n/, $dnc_list_row[0]);
|
||||||
|
for ($i=0; $i<scalar(@blocked_dnc_lists); $i++)
|
||||||
|
{
|
||||||
|
@current_scrub=split(/\=\>/, $blocked_dnc_lists[$i]);
|
||||||
|
$dnc_list_id=$current_scrub[0];
|
||||||
|
$dnc_list_id=~s/[^0-9]//g;
|
||||||
|
$dnc_blocked_lists.="'$dnc_list_id', ";
|
||||||
|
}
|
||||||
|
$dnc_blocked_lists=~s/, $//;
|
||||||
|
}
|
||||||
|
if ($DBX) {print "BLOCKED LISTS: $dnc_blocked_lists\n";}
|
||||||
|
if (length($dnc_blocked_lists)>0)
|
||||||
|
{
|
||||||
|
$dnc_blocked_lists_SQL="and list_id not in ($dnc_blocked_lists)";
|
||||||
|
}
|
||||||
|
$dnc_list_rslt->finish;
|
||||||
|
}
|
||||||
|
|
||||||
$secX = time();
|
$secX = time();
|
||||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($secX);
|
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($secX);
|
||||||
@@ -2752,7 +2783,7 @@ foreach(@campaign_id)
|
|||||||
if ($hopper_vlc_dup_check[$i] =~ /Y/)
|
if ($hopper_vlc_dup_check[$i] =~ /Y/)
|
||||||
{$vlc_dup_check_SQL = "and vendor_lead_code NOT IN($live_vlc$vlc_lists)";}
|
{$vlc_dup_check_SQL = "and vendor_lead_code NOT IN($live_vlc$vlc_lists)";}
|
||||||
|
|
||||||
$stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state,status,modify_date,user,vendor_lead_code FROM vicidial_list $VLforce_index where $recycle_SQL[$i] and ($list_id_sql[$i]) and lead_id NOT IN($lead_id_lists) $vlc_dup_check_SQL and ($all_gmtSQL[$i]) $lead_filter_sql[$i] $CCLsql[$i] $DLTsql[$i] $order_stmt limit $hopper_level[$i];";
|
$stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state,status,modify_date,user,vendor_lead_code FROM vicidial_list $VLforce_index where $recycle_SQL[$i] and ($list_id_sql[$i]) and lead_id NOT IN($lead_id_lists) $vlc_dup_check_SQL and ($all_gmtSQL[$i]) $lead_filter_sql[$i] $CCLsql[$i] $DLTsql[$i] $dnc_blocked_lists_SQL $order_stmt limit $hopper_level[$i];";
|
||||||
if ($DBX) {print " |$stmtA|\n";}
|
if ($DBX) {print " |$stmtA|\n";}
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
@@ -2808,7 +2839,7 @@ foreach(@campaign_id)
|
|||||||
if ($hopper_vlc_dup_check[$i] =~ /Y/)
|
if ($hopper_vlc_dup_check[$i] =~ /Y/)
|
||||||
{$vlc_dup_check_SQL = "and vendor_lead_code NOT IN($live_vlc$vlc_lists)";}
|
{$vlc_dup_check_SQL = "and vendor_lead_code NOT IN($live_vlc$vlc_lists)";}
|
||||||
|
|
||||||
$stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state,status,modify_date,user,vendor_lead_code FROM vicidial_list $VLforce_index where called_since_last_reset='N' and status IN('NEW') and ($list_id_sql[$i]) and lead_id NOT IN($lead_id_lists) $vlc_dup_check_SQL and ($all_gmtSQL[$i]) $lead_filter_sql[$i] $CCLsql[$i] $DLTsql[$i] $order_stmt limit $NEW_level;";
|
$stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state,status,modify_date,user,vendor_lead_code FROM vicidial_list $VLforce_index where called_since_last_reset='N' and status IN('NEW') and ($list_id_sql[$i]) and lead_id NOT IN($lead_id_lists) $vlc_dup_check_SQL and ($all_gmtSQL[$i]) $lead_filter_sql[$i] $CCLsql[$i] $DLTsql[$i] $dnc_blocked_lists_SQL $order_stmt limit $NEW_level;";
|
||||||
if ($DBX) {print " |$stmtA|\n";}
|
if ($DBX) {print " |$stmtA|\n";}
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
@@ -2862,7 +2893,7 @@ foreach(@campaign_id)
|
|||||||
|
|
||||||
if ($list_order_mix[$i] =~ /DISABLED/)
|
if ($list_order_mix[$i] =~ /DISABLED/)
|
||||||
{
|
{
|
||||||
$stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state,status,modify_date,user,vendor_lead_code FROM vicidial_list $VLforce_index where called_since_last_reset='N' and status IN($STATUSsql[$i]) and ($list_id_sql[$i]) and lead_id NOT IN($lead_id_lists) $vlc_dup_check_SQL and ($all_gmtSQL[$i]) $lead_filter_sql[$i] $CCLsql[$i] $DLTsql[$i] $order_stmt limit $OTHER_level;";
|
$stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state,status,modify_date,user,vendor_lead_code FROM vicidial_list $VLforce_index where called_since_last_reset='N' and status IN($STATUSsql[$i]) and ($list_id_sql[$i]) and lead_id NOT IN($lead_id_lists) $vlc_dup_check_SQL and ($all_gmtSQL[$i]) $lead_filter_sql[$i] $CCLsql[$i] $DLTsql[$i] $dnc_blocked_lists_SQL $order_stmt limit $OTHER_level;";
|
||||||
if ($DBX) {print " |$stmtA|\n";}
|
if ($DBX) {print " |$stmtA|\n";}
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
@@ -2965,7 +2996,7 @@ foreach(@campaign_id)
|
|||||||
if ($hopper_vlc_dup_check[$i] =~ /Y/)
|
if ($hopper_vlc_dup_check[$i] =~ /Y/)
|
||||||
{$vlc_dup_check_SQL = "and vendor_lead_code NOT IN($live_vlc$vlc_lists)";}
|
{$vlc_dup_check_SQL = "and vendor_lead_code NOT IN($live_vlc$vlc_lists)";}
|
||||||
|
|
||||||
$stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state,status,modify_date,user,vendor_lead_code FROM vicidial_list $VLforce_index where called_since_last_reset='N' and ($list_mix_dialableSQL) and lead_id NOT IN($lead_id_lists) $vlc_dup_check_SQL and ($all_gmtSQL[$i]) $lead_filter_sql[$i] $CCLsql[$i] $DLTsql[$i] $order_stmt limit $LM_step_goal[$x];";
|
$stmtA = "SELECT lead_id,list_id,gmt_offset_now,phone_number,state,status,modify_date,user,vendor_lead_code FROM vicidial_list $VLforce_index where called_since_last_reset='N' and ($list_mix_dialableSQL) and lead_id NOT IN($lead_id_lists) $vlc_dup_check_SQL and ($all_gmtSQL[$i]) $lead_filter_sql[$i] $CCLsql[$i] $DLTsql[$i] $dnc_blocked_lists_SQL $order_stmt limit $LM_step_goal[$x];";
|
||||||
if ($DBX) {print " |$stmtA|\n";}
|
if ($DBX) {print " |$stmtA|\n";}
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
|||||||
@@ -0,0 +1,510 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
#
|
||||||
|
# VICIDIAL_international_DNC_parser_1.pl
|
||||||
|
#
|
||||||
|
# This is the first part of a two-step program in the DNC importing process
|
||||||
|
#
|
||||||
|
# It requires that a system settings container exists in your system
|
||||||
|
# settings named "INTERNATIONAL_DNC_IMPORT". Two run-time variables
|
||||||
|
# must be defined in said container - "--file-dir" and "--file-destination"
|
||||||
|
#
|
||||||
|
# This should run every minute to check the directory defined in the
|
||||||
|
# "--file-dir" variable for any files to post and to insert into the DNC
|
||||||
|
# queue table in the database. It will also purge any CANCELLED files from
|
||||||
|
# both the queue table and the file folder.
|
||||||
|
#
|
||||||
|
# Put an entry into the cron of of your asterisk machine to run this script
|
||||||
|
# every minute or however often you desire
|
||||||
|
#
|
||||||
|
# ### International DNC importing scripts
|
||||||
|
##* * * * * /usr/share/astguiclient/VICIDIAL_international_DNC_parser_1.pl
|
||||||
|
#
|
||||||
|
# Copyright (C) 2020 Matt Florell <vicidial@gmail.com>, Joe Johnson <joej@vicidial.com> LICENSE: AGPLv2
|
||||||
|
#
|
||||||
|
# CHANGE LOG:
|
||||||
|
# 200813-1230 - First Build
|
||||||
|
#
|
||||||
|
|
||||||
|
use DBI;
|
||||||
|
use Time::Local;
|
||||||
|
|
||||||
|
# default path to astguiclient configuration file:
|
||||||
|
$PATHconf = '/etc/astguiclient.conf';
|
||||||
|
|
||||||
|
open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n";
|
||||||
|
@conf = <conf>;
|
||||||
|
close(conf);
|
||||||
|
$i=0;
|
||||||
|
foreach(@conf)
|
||||||
|
{
|
||||||
|
$line = $conf[$i];
|
||||||
|
$line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi;
|
||||||
|
if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) )
|
||||||
|
{$PATHhome = $line; $PATHhome =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^PATHlogs/) && ($CLIlogs < 1) )
|
||||||
|
{$PATHlogs = $line; $PATHlogs =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^PATHagi/) && ($CLIagi < 1) )
|
||||||
|
{$PATHagi = $line; $PATHagi =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^PATHweb/) && ($CLIweb < 1) )
|
||||||
|
{$PATHweb = $line; $PATHweb =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^PATHsounds/) && ($CLIsounds < 1) )
|
||||||
|
{$PATHsounds = $line; $PATHsounds =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^PATHmonitor/) && ($CLImonitor < 1) )
|
||||||
|
{$PATHmonitor = $line; $PATHmonitor =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARserver_ip/) && ($CLIserver_ip < 1) )
|
||||||
|
{$VARserver_ip = $line; $VARserver_ip =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARDB_server/) && ($CLIDB_server < 1) )
|
||||||
|
{$VARDB_server = $line; $VARDB_server =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARDB_database/) && ($CLIDB_database < 1) )
|
||||||
|
{$VARDB_database = $line; $VARDB_database =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARDB_user/) && ($CLIDB_user < 1) )
|
||||||
|
{$VARDB_user = $line; $VARDB_user =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARDB_pass/) && ($CLIDB_pass < 1) )
|
||||||
|
{$VARDB_pass = $line; $VARDB_pass =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARDB_port/) && ($CLIDB_port < 1) )
|
||||||
|
{$VARDB_port = $line; $VARDB_port =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARREPORT_host/) && ($CLIREPORT_host < 1) )
|
||||||
|
{$VARREPORT_host = $line; $VARREPORT_host =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARREPORT_user/) && ($CLIREPORT_user < 1) )
|
||||||
|
{$VARREPORT_user = $line; $VARREPORT_user =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARREPORT_pass/) && ($CLIREPORT_pass < 1) )
|
||||||
|
{$VARREPORT_pass = $line; $VARREPORT_pass =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARREPORT_port/) && ($CLIREPORT_port < 1) )
|
||||||
|
{$VARREPORT_port = $line; $VARREPORT_port =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARREPORT_dir/) && ($CLIREPORT_dir < 1) )
|
||||||
|
{$VARREPORT_dir = $line; $VARREPORT_dir =~ s/.*=//gi;}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
|
||||||
|
or die "Couldn't connect to database: " . DBI->errstr;
|
||||||
|
$dbhB = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
|
||||||
|
or die "Couldn't connect to database: " . DBI->errstr;
|
||||||
|
$dbhC = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
|
||||||
|
or die "Couldn't connect to database: " . DBI->errstr;
|
||||||
|
$dbhD = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
|
||||||
|
or die "Couldn't connect to database: " . DBI->errstr;
|
||||||
|
$dbhE = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
|
||||||
|
or die "Couldn't connect to database: " . DBI->errstr;
|
||||||
|
|
||||||
|
### begin parsing run-time options ###
|
||||||
|
if (length($ARGV[0])>1)
|
||||||
|
{
|
||||||
|
$i=0;
|
||||||
|
while ($#ARGV >= $i)
|
||||||
|
{
|
||||||
|
$args = "$args $ARGV[$i]";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($args =~ /--help/i)
|
||||||
|
{
|
||||||
|
print "allowed run time options:\n";
|
||||||
|
print " [--help] = this screen\n";
|
||||||
|
print " [--debug] = debug\n";
|
||||||
|
print " [--debugX] = super debug\n";
|
||||||
|
print " [--FTPdb] = show FTP debug output\n";
|
||||||
|
print " [--test] = will execute script and transfer files, but not delete lists from dialer\n";
|
||||||
|
print "\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($args =~ /--debug/i)
|
||||||
|
{
|
||||||
|
$DB=1;
|
||||||
|
print "\n----- DEBUG -----\n\n";
|
||||||
|
}
|
||||||
|
if ($args =~ /--debugX/i)
|
||||||
|
{
|
||||||
|
$DB=1;
|
||||||
|
$DBX=1;
|
||||||
|
print "\n----- SUPER DEBUG -----\n\n";
|
||||||
|
}
|
||||||
|
if ($args =~ /--FTPdb/i)
|
||||||
|
{
|
||||||
|
$FTPdb=1;
|
||||||
|
print "\n----- FTP DEBUG -----\n\n";
|
||||||
|
}
|
||||||
|
if ($args =~ /--test/i)
|
||||||
|
{
|
||||||
|
$T=1;
|
||||||
|
print "\n----- TEST EXECUTION -----\n\n";
|
||||||
|
}
|
||||||
|
if ($args =~ /--force-dnc-scrub/i)
|
||||||
|
{
|
||||||
|
$force_dnc_scrub = "Y";
|
||||||
|
if ($DBX) {print "\n----- FORCING DNC SCRUB -----\n\n";}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($run_check > 0)
|
||||||
|
{
|
||||||
|
my $grepout = `/bin/ps ax | grep $0 | grep -v grep | grep -v '/bin/sh'`;
|
||||||
|
my $grepnum=0;
|
||||||
|
$grepnum++ while ($grepout =~ m/\n/g);
|
||||||
|
if ($grepnum > 1)
|
||||||
|
{
|
||||||
|
if ($DB) {print "I am not alone! Another $0 is running! Exiting...\n";}
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt="SELECT enable_international_dncs FROM system_settings;";
|
||||||
|
$rslt=$dbhA->prepare($stmt);
|
||||||
|
if ($DB) {print "$stmt\n";}
|
||||||
|
$rslt->execute();
|
||||||
|
if ($rslt->rows>0)
|
||||||
|
{
|
||||||
|
@row=$rslt->fetchrow_array;
|
||||||
|
if ($row[0]==0 || !$row[0])
|
||||||
|
{
|
||||||
|
if ($DB) {print "Feature not enabled.\n"; exit;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($DB) {print "Database error!\n"; exit;}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$secX = time();
|
||||||
|
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
||||||
|
$year = ($year + 1900);
|
||||||
|
$mon++;
|
||||||
|
$rowdate = "$mon/$mday/$year";
|
||||||
|
if ($mon < 10) {$mon = "0$mon";}
|
||||||
|
if ($mday < 10) {$mday = "0$mday";}
|
||||||
|
if ($min < 10) {$min = "0$min";}
|
||||||
|
if ($hour < 10) {$hour = "0$hour";}
|
||||||
|
if ($sec < 10) {$sec = "0$sec";}
|
||||||
|
$run_time="$year-$mon-$mday $hour:$min:$sec";
|
||||||
|
$dnc_scrub_status="DNCI";
|
||||||
|
|
||||||
|
$stmt="select * from vicidial_settings_containers where container_id='INTERNATIONAL_DNC_IMPORT' and container_type='PERL_CLI'";
|
||||||
|
if ($DBX) {print "\n$stmt\n\n";}
|
||||||
|
$rslt=$dbhA->prepare($stmt);
|
||||||
|
$rslt->execute();
|
||||||
|
if ($rslt->rows>0)
|
||||||
|
{
|
||||||
|
@row=$rslt->fetchrow_array;
|
||||||
|
$row[4]=~s/\r//g;
|
||||||
|
@container_settings=split(/\n/, $row[4]);
|
||||||
|
for ($i=0; $i<scalar(@container_settings); $i++)
|
||||||
|
{
|
||||||
|
$args=$container_settings[$i];
|
||||||
|
$args=~s/^\s+|\s+$//;
|
||||||
|
if ($args!~/^#/)
|
||||||
|
{
|
||||||
|
if ($args =~ /--ftp-host/i)
|
||||||
|
{
|
||||||
|
my @data_in = split(/--ftp-host=/,$args);
|
||||||
|
$ftp_host = $data_in[1];
|
||||||
|
$ftp_host =~ s/ .*//gi;
|
||||||
|
if ($DBX) {print "\n----- FTP HOST: $ftp_host -----\n\n";}
|
||||||
|
}
|
||||||
|
if ($args =~ /--ftp-user/i)
|
||||||
|
{
|
||||||
|
my @data_in = split(/--ftp-user=/,$args);
|
||||||
|
$ftp_user = $data_in[1];
|
||||||
|
$ftp_user =~ s/ .*//gi;
|
||||||
|
if ($DBX) {print "\n----- FTP USER: $ftp_user -----\n\n";}
|
||||||
|
}
|
||||||
|
if ($args =~ /--ftp-pwd/i)
|
||||||
|
{
|
||||||
|
my @data_in = split(/--ftp-pwd=/,$args);
|
||||||
|
$ftp_pwd = $data_in[1];
|
||||||
|
$ftp_pwd =~ s/ .*//gi;
|
||||||
|
if ($DBX) {print "\n----- FTP PASSWORD: $ftp_pwd -----\n\n";}
|
||||||
|
}
|
||||||
|
if ($args =~ /--ftp-port/i)
|
||||||
|
{
|
||||||
|
my @data_in = split(/--ftp-port=/,$args);
|
||||||
|
$ftp_port = $data_in[1];
|
||||||
|
$ftp_port =~ s/ .*//gi;
|
||||||
|
if ($DBX) {print "\n----- FTP PORT: $ftp_port -----\n\n";}
|
||||||
|
}
|
||||||
|
if ($args =~ /--ftp-passive/i)
|
||||||
|
{
|
||||||
|
my @data_in = split(/--ftp-passive=/,$args);
|
||||||
|
$ftp_passive = $data_in[1];
|
||||||
|
$ftp_passive =~ s/ .*//gi;
|
||||||
|
if ($DBX) {print "\n----- FTP PASSIVE: $ftp_passive -----\n\n";}
|
||||||
|
}
|
||||||
|
if ($args =~ /--file-dir/i)
|
||||||
|
{
|
||||||
|
my @data_in = split(/--file-dir=/,$args);
|
||||||
|
$file_dir = $data_in[1];
|
||||||
|
$file_dir =~ s/ .*//gi;
|
||||||
|
if ($DBX) {print "\n----- FTP DIRECTORY: $file_dir -----\n\n";}
|
||||||
|
}
|
||||||
|
if ($args =~ /--file-destination/i)
|
||||||
|
{
|
||||||
|
my @data_in = split(/--file-destination=/,$args);
|
||||||
|
$file_destination = $data_in[1];
|
||||||
|
$file_destination =~ s/ .*//gi;
|
||||||
|
if ($DBX) {print "\n----- FTP DESTINATION: $file_destination -----\n\n";}
|
||||||
|
}
|
||||||
|
if ($args =~ /--dnc-status-override/i)
|
||||||
|
{
|
||||||
|
my @data_in = split(/--dnc-status-override=/,$args);
|
||||||
|
$dnc_scrub_status = $data_in[1];
|
||||||
|
$dnc_scrub_status =~ s/ .*//gi;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$rslt->finish();
|
||||||
|
|
||||||
|
if ($DBX) {print "\n----- DNC STATUS: $dnc_scrub_status -----\n\n";}
|
||||||
|
|
||||||
|
if ($hour<1 || $force_dnc_scrub) {
|
||||||
|
$scrub_stmt="select container_entry from vicidial_settings_containers where container_id='DNC_CURRENT_BLOCKED_LISTS' and container_entry!=''";
|
||||||
|
if ($DBX) {print "$scrub_stmt\n";}
|
||||||
|
$scrub_rslt=$dbhB->prepare($scrub_stmt);
|
||||||
|
$scrub_rslt->execute();
|
||||||
|
if ($scrub_rslt->rows>0)
|
||||||
|
{
|
||||||
|
@scrub_row=$scrub_rslt->fetchrow_array;
|
||||||
|
$scrub_rslt->finish;
|
||||||
|
|
||||||
|
|
||||||
|
$dnc_entries=$scrub_row[0];
|
||||||
|
|
||||||
|
@dnc_entries=split(/\n/, $scrub_row[0]);
|
||||||
|
for ($i=0; $i<scalar(@dnc_entries); $i++)
|
||||||
|
{
|
||||||
|
@current_scrub=split(/\=\>/, $dnc_entries[$i]);
|
||||||
|
$scrub_list_id=$current_scrub[0];
|
||||||
|
$scrub_country=$current_scrub[1];
|
||||||
|
$scrub_list_id=~s/^\s+|\s+$//;
|
||||||
|
$scrub_country=~s/^\s+|\s+$//;
|
||||||
|
if (length($scrub_list_id)>0 && length($scrub_country)>0)
|
||||||
|
{
|
||||||
|
$check_table_stmt="show tables like 'vicidial_dnc_".$scrub_country."'";
|
||||||
|
$check_table_rslt=$dbhB->prepare($check_table_stmt);
|
||||||
|
$check_table_rslt->execute();
|
||||||
|
if ($check_table_rslt->rows>0)
|
||||||
|
{
|
||||||
|
$list_stmt="select phone_number from vicidial_list where list_id='$scrub_list_id'";
|
||||||
|
$list_rslt=$dbhC->prepare($list_stmt);
|
||||||
|
$list_rslt->execute();
|
||||||
|
while (@list_row=$list_rslt->fetchrow_array)
|
||||||
|
{
|
||||||
|
$dnc_check_stmt="select count(*) from vicidial_dnc_".$scrub_country." where phone_number='$list_row[0]'";
|
||||||
|
$dnc_check_rslt=$dbhD->prepare($dnc_check_stmt);
|
||||||
|
$dnc_check_rslt->execute();
|
||||||
|
@count_row=$dnc_check_rslt->fetchrow_array;
|
||||||
|
if ($count_row[0]>0)
|
||||||
|
{
|
||||||
|
$upd_dnc_stmt="update vicidial_list set status='$dnc_scrub_status' where list_id='$scrub_list_id' and phone_number='$list_row[0]'";
|
||||||
|
$upd_dnc_rslt=$dbhE->prepare($upd_dnc_stmt);
|
||||||
|
$upd_dnc_rslt->execute();
|
||||||
|
$upd_dnc_rslt->finish;
|
||||||
|
}
|
||||||
|
$dnc_check_rslt->finish;
|
||||||
|
}
|
||||||
|
$list_rslt->finish;
|
||||||
|
}
|
||||||
|
$check_table_rslt->finish;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$scrub_rslt->finish;
|
||||||
|
}
|
||||||
|
$upd_stmt="update vicidial_settings_containers set container_entry='' where container_id='DNC_CURRENT_BLOCKED_LISTS'";
|
||||||
|
$upd_rslt=$dbhB->prepare($upd_stmt);
|
||||||
|
$upd_rslt->execute();
|
||||||
|
$upd_rslt->finish;
|
||||||
|
}
|
||||||
|
|
||||||
|
$skip_ftp=0;
|
||||||
|
if (!$ftp_host)
|
||||||
|
{
|
||||||
|
if ($DB) {print "No FTP host given.\n";}
|
||||||
|
$skip_ftp++;
|
||||||
|
# exit;
|
||||||
|
}
|
||||||
|
if (!$ftp_user)
|
||||||
|
{
|
||||||
|
if ($DB) {print "No FTP user given.\n";}
|
||||||
|
$skip_ftp++;
|
||||||
|
# exit;
|
||||||
|
}
|
||||||
|
if (!$ftp_pwd)
|
||||||
|
{
|
||||||
|
if ($DB) {print "No FTP password given.\n";}
|
||||||
|
$skip_ftp++;
|
||||||
|
# exit;
|
||||||
|
}
|
||||||
|
if (!$ftp_port)
|
||||||
|
{
|
||||||
|
$ftp_port=21;
|
||||||
|
}
|
||||||
|
if (!$ftp_passive)
|
||||||
|
{
|
||||||
|
$ftp_passive=0;
|
||||||
|
}
|
||||||
|
if (!$file_dir)
|
||||||
|
{
|
||||||
|
print "Script failed - no directory to look up files.\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if (!-e $file_dir || (-e $file_dir && !-d $file_dir))
|
||||||
|
{
|
||||||
|
print "Script failed - file directory does not exist or is not a directory.\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if (!$file_destination)
|
||||||
|
{
|
||||||
|
print "Script failed - no destination to move completed files to.\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if (!-e $file_destination || (-e $file_destination && !-d $file_destination))
|
||||||
|
{
|
||||||
|
print "Script failed - file destination directory does not exist or is not a directory.\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($file_dir eq $file_destination)
|
||||||
|
{
|
||||||
|
print "Script failed - please choose a destination for the completed files that is different from where they're already located.\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$delete_stmt="select filename from vicidial_country_dnc_queue where file_status='CANCELLED'";
|
||||||
|
if ($DBX) {print "$delete_stmt\n";}
|
||||||
|
$delete_rslt=$dbhA->prepare($delete_stmt);
|
||||||
|
$delete_rslt->execute();
|
||||||
|
while (@delete_row=$delete_rslt->fetchrow_array)
|
||||||
|
{
|
||||||
|
if (-e "$file_dir/$delete_row[0]")
|
||||||
|
{
|
||||||
|
`rm $file_dir/$delete_row[0]`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$delete_rslt->finish();
|
||||||
|
|
||||||
|
# Purge queue - current default 24 hours
|
||||||
|
$delete_stmt="delete from vicidial_country_dnc_queue where file_status='CANCELLED' or (file_status='FINISHED' and date_processed<=now()-INTERVAL 1 WEEK)";
|
||||||
|
if ($DBX) {print "$delete_stmt\n";}
|
||||||
|
$delete_rslt=$dbhA->prepare($delete_stmt);
|
||||||
|
$delete_rslt->execute();
|
||||||
|
$delete_rslt->finish();
|
||||||
|
|
||||||
|
# Get list of files already ready to be queued
|
||||||
|
$stmt="select filename from vicidial_country_dnc_queue where file_status in ('READY', 'PENDING', 'PROCESSING', 'INVALID LAYOUT')";
|
||||||
|
$rslt=$dbhA->prepare($stmt);
|
||||||
|
$rslt->execute();
|
||||||
|
@files_array=();
|
||||||
|
while (@filename_row=$rslt->fetchrow_array)
|
||||||
|
{
|
||||||
|
push(@files_array, "$filename_row[0]");
|
||||||
|
}
|
||||||
|
%active_files = map { $_ => 1 } @files_array;
|
||||||
|
$rslt->finish();
|
||||||
|
|
||||||
|
|
||||||
|
if (!$skip_ftp)
|
||||||
|
{
|
||||||
|
# Get directory, insert and ignore
|
||||||
|
use Net::Ping;
|
||||||
|
use Net::FTP;
|
||||||
|
|
||||||
|
$p = Net::Ping->new();
|
||||||
|
$ping_good = $p->ping("$ftp_host");
|
||||||
|
if (!$ping_good)
|
||||||
|
{
|
||||||
|
$p = Net::Ping->new("icmp");
|
||||||
|
$ping_good = $p->ping("$ftp_host");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($ping_good)
|
||||||
|
{
|
||||||
|
$ftp = Net::FTP->new("$ftp_host", Port => $ftp_port, Passive => $ftp_passive, Debug => $FTPdb);
|
||||||
|
$ftp->login("$ftp_user","$ftp_pwd");
|
||||||
|
if ($file_dir) {$ftp->cwd("$file_dir");}
|
||||||
|
|
||||||
|
@FILES = $ftp->dir(".") or die "Can't get a list of files in $file_dir: $!";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if($DB){print "ERROR: Could not ping server $ftp_host\n";}
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
$ftp->quit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
opendir(FILE, "$file_dir/");
|
||||||
|
@FILES = readdir(FILE);
|
||||||
|
}
|
||||||
|
|
||||||
|
$i=0;
|
||||||
|
$filename_str="";
|
||||||
|
|
||||||
|
foreach(@FILES)
|
||||||
|
{
|
||||||
|
$FILEsize1[$i] = 0;
|
||||||
|
if($FILES[$i]=~/(csv|xlsx?|txt)$/i && (length($FILES[$i]) > 4) )
|
||||||
|
{
|
||||||
|
$FILEsize1[$i] = (-s "$file_dir/$FILES[$i]");
|
||||||
|
if ($DBX) {print "$file_dir/$FILES[$i] $FILEsize1[$i]\n";}
|
||||||
|
}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
sleep(5);
|
||||||
|
|
||||||
|
$i=0;
|
||||||
|
foreach(@FILES)
|
||||||
|
{
|
||||||
|
$FILEsize2[$i] = 0;
|
||||||
|
if($FILES[$i]=~/(csv|xlsx?|txt)$/i && (length($FILES[$i]) > 4) )
|
||||||
|
{
|
||||||
|
$FILEsize2[$i] = (-s "$file_dir/$FILES[$i]");
|
||||||
|
if ($DBX) {print "$file_dir/$FILES[$i] $FILEsize2[$i]\n";}
|
||||||
|
if ($FILEsize1[$i] ne $FILEsize2[$i])
|
||||||
|
{
|
||||||
|
# do nothing
|
||||||
|
}
|
||||||
|
elsif(!exists($active_files{$FILES[$i]}))
|
||||||
|
{
|
||||||
|
$ins_stmt="insert into vicidial_country_dnc_queue(filename, date_uploaded, file_status) VALUES('$FILES[$i]', now(), 'READY')";
|
||||||
|
if ($DBX) {print "$ins_stmt\n";}
|
||||||
|
$ins_rslt=$dbhA->prepare($ins_stmt);
|
||||||
|
$ins_rslt->execute();
|
||||||
|
$ins_rslt->finish;
|
||||||
|
$filename_str.="'$FILES[$i]',";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (length($filename_str)>0)
|
||||||
|
{
|
||||||
|
# Clear records from queue table where the file is no longer found in the expected place
|
||||||
|
$filename_str=~s/,$//;
|
||||||
|
$delete_stmt="delete from vicidial_country_dnc_queue where file_status!='FINISHED' and filename not in ($filename_str)";
|
||||||
|
if ($DBX) {print "$delete_stmt\n";}
|
||||||
|
$delete_rslt=$dbhA->prepare($delete_stmt);
|
||||||
|
$delete_rslt->execute();
|
||||||
|
$delete_rslt->finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
$dbhA->disconnect();
|
||||||
|
$dbhB->disconnect();
|
||||||
|
$dbhC->disconnect();
|
||||||
|
$dbhD->disconnect();
|
||||||
|
$dbhE->disconnect();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$dbhA->disconnect();
|
||||||
|
$dbhB->disconnect();
|
||||||
|
$dbhC->disconnect();
|
||||||
|
$dbhD->disconnect();
|
||||||
|
$dbhE->disconnect();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
#### end 1st script
|
||||||
@@ -0,0 +1,571 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
#
|
||||||
|
# VICIDIAL_international_DNC_parser_2.pl
|
||||||
|
#
|
||||||
|
# This is the second part of a two-step program in the DNC importing process
|
||||||
|
#
|
||||||
|
# It requires that a system settings container exists in your system settings
|
||||||
|
# named "INTERNATIONAL_DNC_IMPORT". Two run-time variables must be defined
|
||||||
|
# in said container - "--file-dir" and "--file-destination"
|
||||||
|
#
|
||||||
|
# It also requires a second settings container named "DNC_IMPORT_FORMATS",
|
||||||
|
# which it will use to determine how to parse the data in the file.
|
||||||
|
#
|
||||||
|
# This should run every minute to check the DNC queue table for files
|
||||||
|
# marked as PENDING, which it will then try to process based on the import
|
||||||
|
# format defined through the web interface.
|
||||||
|
#
|
||||||
|
# As the file is being processed, the web interface will reflect the progress
|
||||||
|
# of this script. Only one file will be processed at any time.
|
||||||
|
#
|
||||||
|
# Put an entry into the cron of of your asterisk machine to run this script
|
||||||
|
# every minute or however often you desire
|
||||||
|
#
|
||||||
|
# ### International DNC importing scripts
|
||||||
|
##* * * * * /usr/share/astguiclient/VICIDIAL_international_DNC_parser_2.pl
|
||||||
|
#
|
||||||
|
# Copyright (C) 2020 Matt Florell <vicidial@gmail.com>, Joe Johnson <joej@vicidial.com> LICENSE: AGPLv2
|
||||||
|
#
|
||||||
|
# CHANGE LOG:
|
||||||
|
# 200813-1230 - First Build
|
||||||
|
#
|
||||||
|
|
||||||
|
use DBI;
|
||||||
|
use Time::Local;
|
||||||
|
|
||||||
|
# default path to astguiclient configuration file:
|
||||||
|
$PATHconf = '/etc/astguiclient.conf';
|
||||||
|
|
||||||
|
open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n";
|
||||||
|
@conf = <conf>;
|
||||||
|
close(conf);
|
||||||
|
$i=0;
|
||||||
|
foreach(@conf)
|
||||||
|
{
|
||||||
|
$line = $conf[$i];
|
||||||
|
$line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi;
|
||||||
|
if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) )
|
||||||
|
{$PATHhome = $line; $PATHhome =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^PATHlogs/) && ($CLIlogs < 1) )
|
||||||
|
{$PATHlogs = $line; $PATHlogs =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^PATHagi/) && ($CLIagi < 1) )
|
||||||
|
{$PATHagi = $line; $PATHagi =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^PATHweb/) && ($CLIweb < 1) )
|
||||||
|
{$PATHweb = $line; $PATHweb =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^PATHsounds/) && ($CLIsounds < 1) )
|
||||||
|
{$PATHsounds = $line; $PATHsounds =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^PATHmonitor/) && ($CLImonitor < 1) )
|
||||||
|
{$PATHmonitor = $line; $PATHmonitor =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARserver_ip/) && ($CLIserver_ip < 1) )
|
||||||
|
{$VARserver_ip = $line; $VARserver_ip =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARDB_server/) && ($CLIDB_server < 1) )
|
||||||
|
{$VARDB_server = $line; $VARDB_server =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARDB_database/) && ($CLIDB_database < 1) )
|
||||||
|
{$VARDB_database = $line; $VARDB_database =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARDB_user/) && ($CLIDB_user < 1) )
|
||||||
|
{$VARDB_user = $line; $VARDB_user =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARDB_pass/) && ($CLIDB_pass < 1) )
|
||||||
|
{$VARDB_pass = $line; $VARDB_pass =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARDB_custom_user/) && ($CLIDB_custom_user < 1) )
|
||||||
|
{$VARDB_custom_user = $line; $VARDB_custom_user =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARDB_custom_pass/) && ($CLIDB_custom_pass < 1) )
|
||||||
|
{$VARDB_custom_pass = $line; $VARDB_custom_pass =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARDB_port/) && ($CLIDB_port < 1) )
|
||||||
|
{$VARDB_port = $line; $VARDB_port =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARREPORT_host/) && ($CLIREPORT_host < 1) )
|
||||||
|
{$VARREPORT_host = $line; $VARREPORT_host =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARREPORT_user/) && ($CLIREPORT_user < 1) )
|
||||||
|
{$VARREPORT_user = $line; $VARREPORT_user =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARREPORT_pass/) && ($CLIREPORT_pass < 1) )
|
||||||
|
{$VARREPORT_pass = $line; $VARREPORT_pass =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARREPORT_port/) && ($CLIREPORT_port < 1) )
|
||||||
|
{$VARREPORT_port = $line; $VARREPORT_port =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARREPORT_dir/) && ($CLIREPORT_dir < 1) )
|
||||||
|
{$VARREPORT_dir = $line; $VARREPORT_dir =~ s/.*=//gi;}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
|
||||||
|
or die "Couldn't connect to database: " . DBI->errstr;
|
||||||
|
$dbhB = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
|
||||||
|
or die "Couldn't connect to database: " . DBI->errstr;
|
||||||
|
$dbhC = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_custom_user", "$VARDB_custom_pass")
|
||||||
|
or die "Couldn't connect to database: " . DBI->errstr;
|
||||||
|
|
||||||
|
if ($run_check > 0)
|
||||||
|
{
|
||||||
|
my $grepout = `/bin/ps ax | grep $0 | grep -v grep | grep -v '/bin/sh'`;
|
||||||
|
my $grepnum=0;
|
||||||
|
$grepnum++ while ($grepout =~ m/\n/g);
|
||||||
|
if ($grepnum > 1)
|
||||||
|
{
|
||||||
|
if ($DB) {print "I am not alone! Another $0 is running! Exiting...\n";}
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
### begin parsing run-time options ###
|
||||||
|
if (length($ARGV[0])>1)
|
||||||
|
{
|
||||||
|
$i=0;
|
||||||
|
while ($#ARGV >= $i)
|
||||||
|
{
|
||||||
|
$args = "$args $ARGV[$i]";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($args =~ /--help/i)
|
||||||
|
{
|
||||||
|
print "allowed run time options:\n";
|
||||||
|
print " [--help] = this screen\n";
|
||||||
|
print " [--debug] = debug\n";
|
||||||
|
print " [--debugX] = super debug\n";
|
||||||
|
print " [--FTPdb] = show FTP debug output\n";
|
||||||
|
print " [--test] = will execute script and transfer files, but not delete lists from dialer\n";
|
||||||
|
print "\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($args =~ /--debug/i)
|
||||||
|
{
|
||||||
|
$DB=1;
|
||||||
|
print "\n----- DEBUG -----\n\n";
|
||||||
|
}
|
||||||
|
if ($args =~ /--debugX/i)
|
||||||
|
{
|
||||||
|
$DB=1;
|
||||||
|
$DBX=1;
|
||||||
|
print "\n----- SUPER DEBUG -----\n\n";
|
||||||
|
}
|
||||||
|
if ($args =~ /--FTPdb/i)
|
||||||
|
{
|
||||||
|
$FTPdb=1;
|
||||||
|
print "\n----- FTP DEBUG -----\n\n";
|
||||||
|
}
|
||||||
|
if ($args =~ /--test/i)
|
||||||
|
{
|
||||||
|
$T=1;
|
||||||
|
print "\n----- TEST EXECUTION -----\n\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt="SELECT enable_international_dncs FROM system_settings;";
|
||||||
|
$rslt=$dbhA->prepare($stmt);
|
||||||
|
if ($DB) {print "$stmt\n";}
|
||||||
|
$rslt->execute();
|
||||||
|
if ($rslt->rows>0)
|
||||||
|
{
|
||||||
|
@row=$rslt->fetchrow_array;
|
||||||
|
if ($row[0]==0 || !$row[0])
|
||||||
|
{
|
||||||
|
if ($DB) {print "Feature not enabled.\n"; exit;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ($DB) {print "Database error!\n"; exit;}
|
||||||
|
}
|
||||||
|
|
||||||
|
$secX = time();
|
||||||
|
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
||||||
|
$year = ($year + 1900);
|
||||||
|
$mon++;
|
||||||
|
$rowdate = "$mon/$mday/$year";
|
||||||
|
if ($mon < 10) {$mon = "0$mon";}
|
||||||
|
if ($mday < 10) {$mday = "0$mday";}
|
||||||
|
if ($min < 10) {$min = "0$min";}
|
||||||
|
if ($hour < 10) {$hour = "0$hour";}
|
||||||
|
if ($sec < 10) {$sec = "0$sec";}
|
||||||
|
$run_time="$year-$mon-$mday $hour:$min:$sec";
|
||||||
|
|
||||||
|
$stmt="select * from vicidial_settings_containers where container_id='INTERNATIONAL_DNC_IMPORT' and container_type='PERL_CLI'";
|
||||||
|
if ($DBX) {print "\n$stmt\n\n";}
|
||||||
|
$rslt=$dbhA->prepare($stmt);
|
||||||
|
$rslt->execute();
|
||||||
|
if ($rslt->rows>0)
|
||||||
|
{
|
||||||
|
@row=$rslt->fetchrow_array;
|
||||||
|
$row[4]=~s/\r//g;
|
||||||
|
@container_settings=split(/\n/, $row[4]);
|
||||||
|
|
||||||
|
for ($i=0; $i<scalar(@container_settings); $i++)
|
||||||
|
{
|
||||||
|
$args=$container_settings[$i];
|
||||||
|
$args=~s/^\s+|\s+$//;
|
||||||
|
if ($args!~/^#/)
|
||||||
|
{
|
||||||
|
if ($args =~ /--ftp-host/i)
|
||||||
|
{
|
||||||
|
my @data_in = split(/--ftp-host=/,$args);
|
||||||
|
$ftp_host = $data_in[1];
|
||||||
|
$ftp_host =~ s/ .*//gi;
|
||||||
|
if ($DBX) {print "\n----- FTP HOST: $ftp_host -----\n\n";}
|
||||||
|
}
|
||||||
|
if ($args =~ /--ftp-user/i)
|
||||||
|
{
|
||||||
|
my @data_in = split(/--ftp-user=/,$args);
|
||||||
|
$ftp_user = $data_in[1];
|
||||||
|
$ftp_user =~ s/ .*//gi;
|
||||||
|
if ($DBX) {print "\n----- FTP USER: $ftp_user -----\n\n";}
|
||||||
|
}
|
||||||
|
if ($args =~ /--ftp-pwd/i)
|
||||||
|
{
|
||||||
|
my @data_in = split(/--ftp-pwd=/,$args);
|
||||||
|
$ftp_pwd = $data_in[1];
|
||||||
|
$ftp_pwd =~ s/ .*//gi;
|
||||||
|
if ($DBX) {print "\n----- FTP PASSWORD: $ftp_pwd -----\n\n";}
|
||||||
|
}
|
||||||
|
if ($args =~ /--ftp-port/i)
|
||||||
|
{
|
||||||
|
my @data_in = split(/--ftp-port=/,$args);
|
||||||
|
$ftp_port = $data_in[1];
|
||||||
|
$ftp_port =~ s/ .*//gi;
|
||||||
|
if ($DBX) {print "\n----- FTP PORT: $ftp_port -----\n\n";}
|
||||||
|
}
|
||||||
|
if ($args =~ /--ftp-passive/i)
|
||||||
|
{
|
||||||
|
my @data_in = split(/--ftp-passive=/,$args);
|
||||||
|
$ftp_passive = $data_in[1];
|
||||||
|
$ftp_passive =~ s/ .*//gi;
|
||||||
|
if ($DBX) {print "\n----- FTP PASSIVE: $ftp_passive -----\n\n";}
|
||||||
|
}
|
||||||
|
if ($args =~ /--file-dir/i)
|
||||||
|
{
|
||||||
|
my @data_in = split(/--file-dir=/,$args);
|
||||||
|
$file_dir = $data_in[1];
|
||||||
|
$file_dir =~ s/ .*//gi;
|
||||||
|
if ($DBX) {print "\n----- FTP DIRECTORY: $file_dir -----\n\n";}
|
||||||
|
}
|
||||||
|
if ($args =~ /--file-destination/i)
|
||||||
|
{
|
||||||
|
my @data_in = split(/--file-destination=/,$args);
|
||||||
|
$file_destination = $data_in[1];
|
||||||
|
$file_destination =~ s/ .*//gi;
|
||||||
|
if ($DBX) {print "\n----- FTP DESTINATION: $file_destination -----\n\n";}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$rslt->finish();
|
||||||
|
|
||||||
|
$skip_ftp=0;
|
||||||
|
if (!$ftp_host)
|
||||||
|
{
|
||||||
|
if ($DB) {print "No FTP host given.\n";}
|
||||||
|
$skip_ftp++;
|
||||||
|
# exit;
|
||||||
|
}
|
||||||
|
if (!$ftp_user)
|
||||||
|
{
|
||||||
|
if ($DB) {print "No FTP user given.\n";}
|
||||||
|
$skip_ftp++;
|
||||||
|
# exit;
|
||||||
|
}
|
||||||
|
if (!$ftp_pwd)
|
||||||
|
{
|
||||||
|
if ($DB) {print "No FTP password given.\n";}
|
||||||
|
$skip_ftp++;
|
||||||
|
# exit;
|
||||||
|
}
|
||||||
|
if (!$ftp_port)
|
||||||
|
{
|
||||||
|
$ftp_port=21;
|
||||||
|
}
|
||||||
|
if (!$ftp_passive)
|
||||||
|
{
|
||||||
|
$ftp_passive=0;
|
||||||
|
}
|
||||||
|
if (!$file_dir)
|
||||||
|
{
|
||||||
|
print "Script failed - no directory to look up files.\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if (!-e $file_dir || (-e $file_dir && !-d $file_dir))
|
||||||
|
{
|
||||||
|
print "Script failed - file directory does not exist or is not a directory.\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if (!$file_destination)
|
||||||
|
{
|
||||||
|
print "Script failed - no destination to move completed files to.\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if (!-e $file_destination || (-e $file_destination && !-d $file_destination))
|
||||||
|
{
|
||||||
|
print "Script failed - file destination directory does not exist or is not a directory.\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($file_dir eq $file_destination)
|
||||||
|
{
|
||||||
|
print "Script failed - please choose a destination for the completed files that is different from where they're already located.\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
# Get file layouts
|
||||||
|
$layout_stmt="select container_entry from vicidial_settings_containers where container_id='DNC_IMPORT_FORMATS'";
|
||||||
|
if ($DBX) {print "$layout_stmt\n\n";}
|
||||||
|
$layout_rslt=$dbhB->prepare($layout_stmt);
|
||||||
|
$layout_rslt->execute();
|
||||||
|
if ($layout_rslt->rows==0) {die "No import formats container found in settings containers";}
|
||||||
|
@layout_row=$layout_rslt->fetchrow_array;
|
||||||
|
@layout_array=split(/\n/, $layout_row[0]);
|
||||||
|
%layouts=();
|
||||||
|
for ($i=0; $i<scalar(@layout_array); $i++)
|
||||||
|
{
|
||||||
|
$entry=$layout_array[$i];
|
||||||
|
$entry=~s/^\s+//;
|
||||||
|
if ($entry!~/^#/ && $entry=~/\=\>/)
|
||||||
|
{
|
||||||
|
@current_layout=split(/\=\>/, $entry);
|
||||||
|
$current_layout[0]=~s/^\s+|\s+$//;
|
||||||
|
$current_layout[1]=~s/^\s+|\s+$//;
|
||||||
|
if (length($current_layout[0]))
|
||||||
|
{
|
||||||
|
$layouts{"$current_layout[0]"}=$current_layout[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$layout_rslt->finish;
|
||||||
|
|
||||||
|
# select from database where file is marked as ready to queue and country code is set
|
||||||
|
$process_stmt="select filename, file_layout, country_code, file_action, dnc_file_id from vicidial_country_dnc_queue where file_status='PENDING' and country_code is not null and file_layout is not null order by date_uploaded asc limit 1";
|
||||||
|
if ($DBX) {print "$process_stmt\n\n";}
|
||||||
|
$process_rslt=$dbhA->prepare($process_stmt);
|
||||||
|
$process_rslt->execute();
|
||||||
|
if ($process_rslt->rows==0) {exit;}
|
||||||
|
|
||||||
|
while(@process_row=$process_rslt->fetchrow_array)
|
||||||
|
{
|
||||||
|
$filename=$process_row[0];
|
||||||
|
$file_layout=$process_row[1];
|
||||||
|
$country_code=$process_row[2];
|
||||||
|
$file_action=$process_row[3];
|
||||||
|
$dnc_file_id=$process_row[4];
|
||||||
|
$process_count=0;
|
||||||
|
$records_processed=0;
|
||||||
|
$records_inserted=0;
|
||||||
|
|
||||||
|
if (!exists $layouts{"$file_layout"})
|
||||||
|
{
|
||||||
|
$upd_stmt="update vicidial_country_dnc_queue set file_status='INVALID LAYOUT' where dnc_file_id='$dnc_file_id'";
|
||||||
|
if ($DB) {print "Can't find file layout ($file_layout) - $upd_stmt\n\n";}
|
||||||
|
$upd_rslt=$dbhB->prepare($upd_stmt);
|
||||||
|
$upd_rslt->execute();
|
||||||
|
$upd_rslt->finish;
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$create_stmt="CREATE TABLE IF NOT EXISTS vicidial_dnc_".$country_code."(phone_number varchar(20) primary key)";
|
||||||
|
if ($DB) {print "$create_stmt\n\n";}
|
||||||
|
$create_rslt=$dbhC->prepare($create_stmt);
|
||||||
|
$create_rslt->execute();
|
||||||
|
$create_rslt->finish;
|
||||||
|
|
||||||
|
if ($file_action eq "PURGE")
|
||||||
|
{
|
||||||
|
$delete_stmt="delete from vicidial_dnc_".$country_code;
|
||||||
|
if ($DBX) {print "$delete_stmt\n\n";}
|
||||||
|
$delete_rslt=$dbhB->prepare($delete_stmt);
|
||||||
|
$delete_rslt->execute();
|
||||||
|
$delete_rslt->finish;
|
||||||
|
|
||||||
|
$opt_stmt="optimize table vicidial_dnc_".$country_code;
|
||||||
|
if ($DBX) {print "$opt_stmt\n\n";}
|
||||||
|
$opt_rslt=$dbhB->prepare($opt_stmt);
|
||||||
|
$opt_rslt->execute();
|
||||||
|
$opt_rslt->finish;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@layout_stats=split(/,/, $layouts{"$file_layout"});
|
||||||
|
if ($DBX) {print $layouts{"$file_layout"}."\n";}
|
||||||
|
$txt_format=$layout_stats[0];
|
||||||
|
$delimiter=$layout_stats[1];
|
||||||
|
if ($filename=~/csv$/i)
|
||||||
|
{
|
||||||
|
$delimiter="comma";
|
||||||
|
}
|
||||||
|
|
||||||
|
$delimiter=~s/.*comma.*/,/gi;
|
||||||
|
$delimiter=~s/.*pipe.*/\\\|/gi;
|
||||||
|
$delimiter=~s/.*tab.*/\t/gi;
|
||||||
|
|
||||||
|
if ($txt_format ne "" && $DB) {print "Format: $txt_format\n\n";}
|
||||||
|
if ($delimiter ne "" && $DB) {print "Delimiter: $delimiter\n\n";}
|
||||||
|
|
||||||
|
@phone_fields=();
|
||||||
|
for($i=2; $i<scalar(@layout_stats); $i++)
|
||||||
|
{
|
||||||
|
push(@phone_fields, $layout_stats[$i]);
|
||||||
|
}
|
||||||
|
if (scalar(@phone_fields)==0 || ($txt_format=~/delimit/i && $delimiter eq "") || ($txt_format=~/fixed/i && $delimiter ne ""))
|
||||||
|
{
|
||||||
|
$upd_stmt="update vicidial_country_dnc_queue set file_status='INVALID LAYOUT' where dnc_file_id='$dnc_file_id'";
|
||||||
|
if ($DB) {print "No phone fields defined ($file_layout) - $upd_stmt\n\n";}
|
||||||
|
$upd_rslt=$dbhB->prepare($upd_stmt);
|
||||||
|
$upd_rslt->execute();
|
||||||
|
$upd_rslt->finish;
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$skip_ftp) # File is NOT local, so attempt to download.
|
||||||
|
{
|
||||||
|
use Net::Ping;
|
||||||
|
use Net::FTP;
|
||||||
|
|
||||||
|
$ftp = Net::FTP->new("$ftp_host", Port => $ftp_port, Passive => $ftp_passive, Debug => $FTPdb);
|
||||||
|
$ftp->login("$ftp_user","$ftp_pwd");
|
||||||
|
if ($file_dir) {$ftp->cwd("$file_dir");}
|
||||||
|
$ftp->get("$filename", "/tmp/$filename");
|
||||||
|
$ftp->quit;
|
||||||
|
$full_filename="/tmp/$filename";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$full_filename="$file_dir/$filename";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($filename=~/xlsx?$/)
|
||||||
|
{
|
||||||
|
use Spreadsheet::Read;
|
||||||
|
use Spreadsheet::XLSX;
|
||||||
|
use File::Basename;
|
||||||
|
use open ':std', ':encoding(UTF-8)';
|
||||||
|
|
||||||
|
# Gotta account for the fact that spreadsheets don't start with 0 for indices
|
||||||
|
for($k=0; $k<scalar(@phone_fields); $k++) {$phone_fields[$k]++;}
|
||||||
|
|
||||||
|
$datafile=Spreadsheet::Read->new("$full_filename");
|
||||||
|
$sheets=$datafile->[0]{sheets};
|
||||||
|
for ($i=1; $i<=$sheets; $i++)
|
||||||
|
{
|
||||||
|
$current_sheet=$datafile->[$i];
|
||||||
|
$sheet_rows=$datafile->[$i]{maxrow};
|
||||||
|
$sheet_cols=$datafile->[$i]{maxcol};
|
||||||
|
|
||||||
|
$upd_stmt="update vicidial_country_dnc_queue set file_status='PROCESSING', total_records='$sheet_rows' where dnc_file_id='$dnc_file_id'";
|
||||||
|
if ($DB) {print "$upd_stmt\n\n";}
|
||||||
|
$upd_rslt=$dbhB->prepare($upd_stmt);
|
||||||
|
$upd_rslt->execute();
|
||||||
|
$upd_rslt->finish;
|
||||||
|
|
||||||
|
for ($j=1; $j<=$sheet_rows; $j++)
|
||||||
|
{
|
||||||
|
$records_processed++;
|
||||||
|
$phone_number="";
|
||||||
|
for($k=0; $k<scalar(@phone_fields); $k++)
|
||||||
|
{
|
||||||
|
$phone_number.=$datafile->[$i]{cell}[$phone_fields[$k]][$j];
|
||||||
|
}
|
||||||
|
InsertPhoneNumber($records_processed, $records_inserted, $phone_number, $dnc_file_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$total_records_str=`wc -l $full_filename`;
|
||||||
|
@tr_str=split(/\s/, $total_records_str);
|
||||||
|
$total_records=$tr_str[0];
|
||||||
|
|
||||||
|
$upd_stmt="update vicidial_country_dnc_queue set file_status='PROCESSING', total_records='$total_records' where dnc_file_id='$dnc_file_id'";
|
||||||
|
if ($DB) {print "$upd_stmt\n\n";}
|
||||||
|
$upd_rslt=$dbhB->prepare($upd_stmt);
|
||||||
|
$upd_rslt->execute();
|
||||||
|
$upd_rslt->finish;
|
||||||
|
|
||||||
|
open(PHONE_FILE, "$full_filename");
|
||||||
|
while($buffer=<PHONE_FILE>)
|
||||||
|
{
|
||||||
|
$records_processed++;
|
||||||
|
$phone_number="";
|
||||||
|
if ($delimiter ne "")
|
||||||
|
{
|
||||||
|
@data=split(/$delimiter/, $buffer);
|
||||||
|
for($i=0; $i<scalar(@phone_fields); $i++)
|
||||||
|
{
|
||||||
|
$phone_number.=$data[$phone_fields[$i]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for($i=0; $i<scalar(@phone_fields); $i++)
|
||||||
|
{
|
||||||
|
@data=split(/\|/, $phone_fields[$i]);
|
||||||
|
$phone_number.=substr($buffer, $data[0], $data[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($records_processed%1000==0) {print "*$phone_number*\n";}
|
||||||
|
InsertPhoneNumber($records_processed, $records_inserted, $phone_number, $dnc_file_id);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close(PHONE_FILE);
|
||||||
|
$upd_stmt="update vicidial_country_dnc_queue set records_processed='$records_processed', records_inserted='$records_inserted', date_processed=now(), file_status='FINISHED' where dnc_file_id='$dnc_file_id'";
|
||||||
|
if ($DBX) {print "$upd_stmt\n\n";}
|
||||||
|
$upd_rslt=$dbhB->prepare($upd_stmt);
|
||||||
|
$upd_rslt->execute();
|
||||||
|
$upd_rslt->finish;
|
||||||
|
|
||||||
|
if (!$skip_ftp) # File is NOT local, so attempt to download.
|
||||||
|
{
|
||||||
|
use Net::Ping;
|
||||||
|
use Net::FTP;
|
||||||
|
|
||||||
|
$ftp = Net::FTP->new("$ftp_host", Port => $ftp_port, Passive => $ftp_passive, Debug => $FTPdb);
|
||||||
|
$ftp->login("$ftp_user","$ftp_pwd");
|
||||||
|
if ($file_dir) {$ftp->cwd("$file_dir");}
|
||||||
|
# $ftp->get("$filename", "/tmp/$filename");
|
||||||
|
# $ftp->quit;
|
||||||
|
# $full_filename="/tmp/$filename";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
`mv $file_dir/$filename $file_destination/$filename`;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
$dbhA->disconnect();
|
||||||
|
$dbhB->disconnect();
|
||||||
|
$dbhC->disconnect();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$dbhA->disconnect();
|
||||||
|
$dbhB->disconnect();
|
||||||
|
$dbhC->disconnect();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub InsertPhoneNumber
|
||||||
|
{
|
||||||
|
my $rp=$_[0];
|
||||||
|
my $ri=$_[1];
|
||||||
|
my $phone=$_[2];
|
||||||
|
my $dfid=$_[3];
|
||||||
|
|
||||||
|
$phone=~s/[^0-9]//gi;
|
||||||
|
|
||||||
|
if (length($phone)>=5 && length($phone)<=18)
|
||||||
|
{
|
||||||
|
$ins_stmt="insert ignore into vicidial_dnc_".$country_code." values('$phone')";
|
||||||
|
$ins_rslt=$dbhB->prepare($ins_stmt);
|
||||||
|
$ins_rslt->execute();
|
||||||
|
if ($ins_rslt->rows>0) {$records_inserted++; $ri++;}
|
||||||
|
$ins_rslt->finish;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($rp%1000==0)
|
||||||
|
{
|
||||||
|
$upd_stmt="update vicidial_country_dnc_queue set records_processed='$rp', records_inserted='$ri' where dnc_file_id='$dfid'";
|
||||||
|
if ($DBX) {print "$ins_stmt\n$upd_stmt\n";}
|
||||||
|
$upd_rslt=$dbhB->prepare($upd_stmt);
|
||||||
|
$upd_rslt->execute();
|
||||||
|
$upd_rslt->finish;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
INTERNATIONAL DNC SCRUB DOC Started: 2020-07-20 Updated: 2020-08-14
|
||||||
|
|
||||||
|
NOTE: Requires svn/trunk code revision 3273 or higher to work properly!!!
|
||||||
|
|
||||||
|
NOTE: THIS FEATURE IS OPTIONAL, AND SHOULD ONLY BE CONFIGURED AFTER YOUR SYSTEM
|
||||||
|
HAS BEEN INSTALLED AND TESTED!
|
||||||
|
|
||||||
|
|
||||||
|
Instructions for using the international DNC scrub.
|
||||||
|
|
||||||
|
### SETTING UP DNC LISTS TO BE PROCESSED ###
|
||||||
|
- The international DNC scrub can be enabled via a system setting "Enable International DNCs". Set the value to "1" in order to get access to the DNC web interface as well as cause the option to scrub against international DNCs to appear in the lead loader.
|
||||||
|
|
||||||
|
- To start loading a file, you must have a settings container in your system by the name of "INTERNATIONAL_DNC_IMPORT". The container outlines the necessary values it must have, which consists of a "--file-dir" variable and a "--file-destination" variable.
|
||||||
|
|
||||||
|
- There is a Perl script that must be put into your cron, "Vicidial_international_DNC_parser_1.pl". This script will check that the system setting is enabled and that the "INTERNATIONAL_DNC_IMPORT" exists and contains the two necessary variables. It will confirm that the file directories given by the variables both exist, are directories, and are not the same. It will also do some other checks depending on what variables you have active in that container. If these conditions are met, the script will proceed to check for any .txt, .csv, .xls, or .xlsx files in the "--file-dir" directory. For any files found in this directory, the script will check the queue table to see if the file is currently in the database with a status other than "FINISHED" or "CANCELLED". Finding no records will add the file to the queue table with a status of "READY".
|
||||||
|
|
||||||
|
- Additionally, this script will also take the list of files it finds in the folder and check it against any unfinished file currently in the queue. Unfinished files in the queue table not on the list will be automatically purged. Also, any filenames marked as "CANCELLED" will be purged from the "--file-dir" folder if they are still there.
|
||||||
|
|
||||||
|
- Once files are loaded into the queue table, they will be viewable through the DNC web interface.
|
||||||
|
|
||||||
|
|
||||||
|
### USING THE WEB INTERFACE TO PROCESS DNC LISTS ###
|
||||||
|
- The link to the DNC web interface can be found in the "Admin Utilities" page under the "International DNC Loader" link as long as the "Enable International DNCs" setting is active.
|
||||||
|
|
||||||
|
- Users must have the privilege to load leads in order to view the DNC web interface.
|
||||||
|
|
||||||
|
- The DNC Web Interface page will show all files currently in the queue table, including ones that have been processed ("FINISHED") for up to 1 week.
|
||||||
|
|
||||||
|
- If a file's current status is "READY" or "INVALID_LAYOUT" (more on "INVALID_LAYOUT" below), the user can assign to the file a country code, a file action of either "PURGE" or "APPEND", and a file layout that the file follows. Selecting a file layout will cause a brief description of the layout to appear below the corresponding drop-down menu. Once all three parameters have been defined and if the file's current status makes it eligible for processing, the user will have the option to "START FILE" or "CANCEL" it. "START FILE" will set the file status to "PENDING" so it can be picked up by an automated script that will handle it. "CANCEL" will set the file status to "CANCELLED" and the file will shortly be purged from the queue table.
|
||||||
|
|
||||||
|
- If a file is "FINISHED" or "PROCESSING", it can no longer be modified or set to "PENDING" or "CANCELLED". If a file is currently "PENDING" or "CANCELLED", you have a narrow window of time until the processing script automatically runs to change it to the other value.
|
||||||
|
|
||||||
|
- Once a file is marked as "PENDING", there is a second automated script that should be placed in your cron, "Vicidial_international_DNC_parser_2.pl". This script will constantly check for records in the queue table where a file is marked as "PENDING", and will handle it per the parameters defined by the user in the web interface when the file was submitted. It will check that the file still exists in the folder given by the "--file-dir" variable and do a count on the number of records in that file. Using the "country_code" value, the script will create a table named "vicidial_dnc_<country_code>" if no such table currently exists. If the "file_action" value is set to "PURGE", the script will empty out and optimize the table prior to attempting to insert the records from the pending file.
|
||||||
|
|
||||||
|
- The script will then open the file and begin reading from it. Using the "file_layout" value, as well as the type of file gleaned from the filename, the script will parse out the phone number from . If the file_layout is not found in the "DNC_IMPORT_FORMATS" setting or if the layout doesn't give adequate information to parse the file (i.e. no phone field is given), then the file status is changed to "INVALID LAYOUT" and the script terminates. Otherwise the status of the file is changed to "PROCESSING". As the script reads through the file, every 1,000 records it will update the queue table to reflect how many records were processed and how many were inserted. This is so the user can track the progress of the file through the web interface.
|
||||||
|
|
||||||
|
- When the file is finished, it is moved to the location given by the "--file-destination" variable from the "INTERNATIONAL_DNC_IMPORT" settings container and is marked as "FINISHED" in the queue table. The DNC list can now be used to dedupe against from the lead loader.
|
||||||
|
|
||||||
|
|
||||||
|
### USING THE DNC LISTS IN THE LEAD LOADER ###
|
||||||
|
- To dedupe against a country's DNC list when new leads are loaded, simply select a country from the "DNC Scrub by Country" drop-down menu from the main lead loader page. Only countries that have had DNC lists loaded will appear here. When the new lead file is being processed, phone numbers matching a phone number in the selected country's DNC list will not be loaded and will be individually listed, similar to other invalid leads, with a "DNC" code instead of "INV".
|
||||||
|
|
||||||
|
- If a lead file is loaded into a specific list using a country's DNC list as a suppression file, that list will become "locked" ***AND WILL BE COMPLETELY UNDIALABLE UNTIL THE REST OF THE LIST IS CHECKED AGAINST THE SELECTED COUNTRY'S DNC LIST***. This will also cause any leads from that list to be deleted from the hopper immediately.
|
||||||
|
|
||||||
|
- Lists that are currently locked can be viewed in the settings container named "DNC_CURRENT_BLOCKED_LISTS". This is a read-only settings container and cannot be modified once a list is placed into it. Entries are stored here in the format "<list id> => <DNC country>". The hopper script will use this settings container to block any list ID currently in it (provided that the "Enable International DNC" system setting is still active).
|
||||||
|
|
||||||
|
- The list(s) will remain locked for the remainder of the day. DNC scrubs for existing lists are handled by the "Vicidial_international_DNC_parser_1.pl" cron job. This script has a two-hour window between midnight and 2am wherein it will take any list ID/country pairings it finds in the "DNC_CURRENT_BLOCKED_LISTS" settings container and scrub the dialer list against the country DNC list. Any phone number found in the country's DNC list will be marked as "DNCI", regardless of it's current status in the dialer. If an alternate DNC code is desired instead of "DNCI", that can be set via the "--dnc-status-override" variable in the "INTERNATIONAL_DNC_IMPORT". The settings container has instructions on how to use this variable.
|
||||||
|
|
||||||
|
- If an admin wishes to force the "Vicidial_international_DNC_parser_1.pl" script to perform the DNC scrub regardless of the time of day, it can be run with the command line option "--force-dnc-scrub".
|
||||||
|
|
||||||
|
- Once the DNC scrub is completed for all lists, the "DNC_CURRENT_BLOCKED_LISTS" container will be cleared and the hopper script will no longer block the lists from having leads loaded into the hopper.
|
||||||
|
|
||||||
@@ -1864,7 +1864,8 @@ outbound_cid_any ENUM('DISABLED','API_ONLY') DEFAULT 'DISABLED',
|
|||||||
entries_per_page SMALLINT(5) UNSIGNED DEFAULT '0',
|
entries_per_page SMALLINT(5) UNSIGNED DEFAULT '0',
|
||||||
browser_call_alerts ENUM('0','1','2') DEFAULT '0',
|
browser_call_alerts ENUM('0','1','2') DEFAULT '0',
|
||||||
queuemetrics_pausereason ENUM('STANDARD','EVERY_NEW','EVERY_NEW_ADMINCALL','EVERY_NEW_ALLCALL') default 'STANDARD',
|
queuemetrics_pausereason ENUM('STANDARD','EVERY_NEW','EVERY_NEW_ADMINCALL','EVERY_NEW_ALLCALL') default 'STANDARD',
|
||||||
inbound_answer_config ENUM('0','1','2','3','4','5') DEFAULT '0'
|
inbound_answer_config ENUM('0','1','2','3','4','5') DEFAULT '0',
|
||||||
|
enable_international_dncs ENUM('0','1') default '0'
|
||||||
) ENGINE=MyISAM;
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
CREATE TABLE vicidial_campaigns_list_mix (
|
CREATE TABLE vicidial_campaigns_list_mix (
|
||||||
@@ -3365,7 +3366,7 @@ unique index vdweb (webserver, hostname)
|
|||||||
|
|
||||||
CREATE TABLE vicidial_urls (
|
CREATE TABLE vicidial_urls (
|
||||||
url_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
url_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||||
url VARCHAR(255) default '',
|
url VARCHAR(250) default '',
|
||||||
unique index (url)
|
unique index (url)
|
||||||
) ENGINE=MyISAM;
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
@@ -3398,7 +3399,7 @@ index (avatar_id)
|
|||||||
) ENGINE=MyISAM;
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
CREATE TABLE audio_store_details (
|
CREATE TABLE audio_store_details (
|
||||||
audio_filename VARCHAR(255) NOT NULL,
|
audio_filename VARCHAR(250) NOT NULL,
|
||||||
audio_format VARCHAR(10) default 'unknown',
|
audio_format VARCHAR(10) default 'unknown',
|
||||||
audio_filesize BIGINT(20) UNSIGNED default '0',
|
audio_filesize BIGINT(20) UNSIGNED default '0',
|
||||||
audio_epoch BIGINT(20) UNSIGNED default '0',
|
audio_epoch BIGINT(20) UNSIGNED default '0',
|
||||||
@@ -3752,7 +3753,8 @@ alt_row1_background VARCHAR(6) default 'BDFFBD',
|
|||||||
alt_row2_background VARCHAR(6) default '99FF99',
|
alt_row2_background VARCHAR(6) default '99FF99',
|
||||||
alt_row3_background VARCHAR(6) default 'CCFFCC',
|
alt_row3_background VARCHAR(6) default 'CCFFCC',
|
||||||
user_group VARCHAR(20) default '---ALL---',
|
user_group VARCHAR(20) default '---ALL---',
|
||||||
web_logo VARCHAR(100) default 'default_new'
|
web_logo VARCHAR(100) default 'default_new',
|
||||||
|
button_color VARCHAR(6) default 'EFEFEF'
|
||||||
) ENGINE=MyISAM;
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
CREATE TABLE vicidial_user_list_new_lead (
|
CREATE TABLE vicidial_user_list_new_lead (
|
||||||
@@ -4318,6 +4320,22 @@ index (lead_id),
|
|||||||
index (call_date)
|
index (call_date)
|
||||||
) ENGINE=MyISAM;
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
CREATE TABLE vicidial_country_dnc_queue (
|
||||||
|
dnc_file_id int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
|
filename varchar(250) DEFAULT NULL,
|
||||||
|
country_code varchar(3) DEFAULT NULL,
|
||||||
|
file_layout varchar(30) DEFAULT NULL,
|
||||||
|
file_status enum('UPLOADING','READY','PENDING','INVALID LAYOUT','PROCESSING','FINISHED','CANCELLED') DEFAULT NULL,
|
||||||
|
file_action enum('PURGE','APPEND') DEFAULT NULL,
|
||||||
|
date_uploaded DATETIME DEFAULT NULL,
|
||||||
|
total_records int(10) UNSIGNED DEFAULT NULL,
|
||||||
|
records_processed int(10) UNSIGNED DEFAULT NULL,
|
||||||
|
records_inserted int(10) UNSIGNED DEFAULT NULL,
|
||||||
|
date_processed DATETIME DEFAULT NULL,
|
||||||
|
PRIMARY KEY (dnc_file_id),
|
||||||
|
KEY vicidial_country_dnc_queue_filename_key (filename)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE vicidial_email_list MODIFY message text character set utf8;
|
ALTER TABLE vicidial_email_list MODIFY message text character set utf8;
|
||||||
|
|
||||||
@@ -4348,7 +4366,7 @@ INSERT INTO vicidial_music_on_hold SET moh_id='default',moh_name='Default Music
|
|||||||
INSERT INTO vicidial_music_on_hold_files SET moh_id='default',filename='conf',rank='1';
|
INSERT INTO vicidial_music_on_hold_files SET moh_id='default',filename='conf',rank='1';
|
||||||
|
|
||||||
INSERT INTO vicidial_inbound_groups(group_id,group_name,group_color,active,queue_priority) values('AGENTDIRECT','Single Agent Direct Queue','white','Y','99');
|
INSERT INTO vicidial_inbound_groups(group_id,group_name,group_color,active,queue_priority) values('AGENTDIRECT','Single Agent Direct Queue','white','Y','99');
|
||||||
INSERT INTO vicidial_inbound_groups(group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,hold_time_option_no_block,hold_time_option_prompt_seconds,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,na_call_url,on_hook_cid,group_calldate,action_xfer_cid,drop_callmenu,after_hours_callmenu,user_group,max_calls_method,max_calls_count,max_calls_action,dial_ingroup_cid,group_handling,web_form_address_three,populate_lead_ingroup,drop_lead_reset,after_hours_lead_reset,nanq_lead_reset,wait_time_lead_reset,hold_time_lead_reset,status_group_id,routing_initiated_recordings,on_hook_cid_number) VALUES ('AGENTDIRECT_CHAT','Agent Direct Queue for Chats','#FFFFFF','Y','','','longest_wait_time','Y','','',NULL,NULL,NULL,NULL,360,'MESSAGE','8307','24hours','MESSAGE','vm-goodbye','8300',NULL,'---NONE---','default','generic_hold',60,'ding',1000,'---NONE---',99,'---NONE---','DISABLED','NONE','---NONE---','N',NULL,'24HRMIDNIGHT','NONE','Y',NULL,NULL,'N','N','NONE',360,'8300','','---NONE---','vm-hangup',0,'---NONE---','N','ALWAYS',20,30,'','N','MESSAGE','nbdy-avail-to-take-call|vm-goodbye','','NONE','',-1,'','','','','','N','N','DISABLED','',0,'to-be-called-back|digits/1','','N',10,'N',10,'NONE','NONE','WAIT','NONE','NONE','NONE',120,'8300','','---NONE---','','vm-hangup',999,'to-be-called-back|digits/1','N',10,'',0,'','','N',10,15,'','GENERIC',NULL,'CUSTOMER','','','---ALL---','DISABLED',0,'DROP','','CHAT','','ENABLED','N','N','N','N','N','','N','');
|
INSERT INTO vicidial_inbound_groups(group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,hold_time_option_no_block,hold_time_option_prompt_seconds,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,na_call_url,on_hook_cid,group_calldate,action_xfer_cid,drop_callmenu,after_hours_callmenu,user_group,max_calls_method,max_calls_count,max_calls_action,dial_ingroup_cid,group_handling,web_form_address_three,populate_lead_ingroup,drop_lead_reset,after_hours_lead_reset,nanq_lead_reset,wait_time_lead_reset,hold_time_lead_reset,status_group_id,routing_initiated_recordings,on_hook_cid_number) VALUES ('AGENTDIRECT_CHAT','Agent Direct Queue for Chats','#FFFFFF','Y','','','longest_wait_time','Y','','NONE',NULL,NULL,NULL,NULL,360,'MESSAGE','8307','24hours','MESSAGE','vm-goodbye','8300',NULL,'---NONE---','default','generic_hold',60,'ding',1000,'---NONE---',99,'---NONE---','DISABLED','NONE','---NONE---','N',NULL,'24HRMIDNIGHT','NONE','Y',NULL,NULL,'N','N','NONE',360,'8300','','---NONE---','vm-hangup',0,'---NONE---','N','ALWAYS',20,30,'','N','MESSAGE','nbdy-avail-to-take-call|vm-goodbye','','NONE','',-1,'','','','','','N','N','DISABLED','',0,'to-be-called-back|digits/1','','N',10,'N',10,'NONE','NONE','WAIT','NONE','NONE','NONE',120,'8300','','---NONE---','','vm-hangup',999,'to-be-called-back|digits/1','N',10,'',0,'','','N',10,15,'','GENERIC',NULL,'CUSTOMER','','','---ALL---','DISABLED',0,'DROP','','CHAT','','ENABLED','N','N','N','N','N','','N','');
|
||||||
|
|
||||||
INSERT INTO vicidial_lists SET list_id='999',list_name='Default inbound list',campaign_id='TESTCAMP',active='N';
|
INSERT INTO vicidial_lists SET list_id='999',list_name='Default inbound list',campaign_id='TESTCAMP',active='N';
|
||||||
INSERT INTO vicidial_lists SET list_id='998',list_name='Default Manual list',campaign_id='TESTCAMP',active='N';
|
INSERT INTO vicidial_lists SET list_id='998',list_name='Default Manual list',campaign_id='TESTCAMP',active='N';
|
||||||
@@ -4430,8 +4448,8 @@ INSERT INTO vicidial_scripts (script_id,script_name,script_comments,active,scrip
|
|||||||
|
|
||||||
INSERT INTO vicidial_custom_leadloader_templates (template_id, template_name, template_description, list_id, standard_variables, custom_table, custom_variables, template_statuses) values ('SAMPLE_TEMPLATE','Sample template','',999,'phone_number,9|first_name,0|last_name,1|address1,3|address2,4|address3,5|city,6|state,7|postal_code,8|','custom_999','appointment_date,2|appointment_notes,9|nearest_city,2|','');
|
INSERT INTO vicidial_custom_leadloader_templates (template_id, template_name, template_description, list_id, standard_variables, custom_table, custom_variables, template_statuses) values ('SAMPLE_TEMPLATE','Sample template','',999,'phone_number,9|first_name,0|last_name,1|address1,3|address2,4|address3,5|city,6|state,7|postal_code,8|','custom_999','appointment_date,2|appointment_notes,9|nearest_city,2|','');
|
||||||
|
|
||||||
INSERT INTO vicidial_screen_colors VALUES ('red_rust','dark red rust','Y','804435','E7D0C2','C68C71','D9B39F','D9B49F','C68C72','C68C73','BDFFBD','99FF99','CCFFCC','---ALL---','default_new'),('pale_green','pale green','Y','738035','E0E7C2','B6C572','C4CF8B','B6C572','C4CF8B','C4CF8B','BDFFBD','99FF99','CCFFCC','---ALL---','default_new'),('alt_green','alternate green','Y','333333','D6E3B2','AEC866','BCD180','BCD180','AEC866','AEC866','BDFFBD','99FF99','CCFFCC','---ALL---','default_new'),('default_blue_test','default blue test','Y','015B91','D9E6FE','9BB9FB','B9CBFD','8EBCFD','B6D3FC','A3C3D6','BDFFBD','99FF99','CCFFCC','---ALL---','default_new'),('basic_orange','basic orange','Y','804d00','ffebcc','ffcc80','ffd699','ffcc80','ffd699','ffcc80','BDFFBD','99FF99','CCFFCC','---ALL---','default_new'),('basic_purple','basic purple','Y','660066','ffccff','ff99ff','ffb3ff','ff99ff','ffb3ff','ff99ff','BDFFBD','99FF99','CCFFCC','---ALL---','SAMPLE.png'),('basic_yellow','basic yellow','Y','666600','ffffcc','ffff66','ffff99','ffff66','ffff99','ffff66','BDFFBD','99FF99','CCFFCC','---ALL---','default_new'),('basic_red','basic red','Y','800000','ffe6e6','ff9999','ffb3b3','ff9999','ffb3b3','ff9999','BDFFBD','99FF99','CCFFCC','---ALL---','default_new');
|
INSERT INTO vicidial_screen_colors VALUES ('red_rust','dark red rust','Y','804435','E7D0C2','C68C71','D9B39F','D9B49F','C68C72','C68C73','BDFFBD','99FF99','CCFFCC','---ALL---','default_new','EFEFEF'),('pale_green','pale green','Y','738035','E0E7C2','B6C572','C4CF8B','B6C572','C4CF8B','C4CF8B','BDFFBD','99FF99','CCFFCC','---ALL---','default_new','EFEFEF'),('alt_green','alternate green','Y','333333','D6E3B2','AEC866','BCD180','BCD180','AEC866','AEC866','BDFFBD','99FF99','CCFFCC','---ALL---','default_new','EFEFEF'),('default_blue_test','default blue test','Y','015B91','D9E6FE','9BB9FB','B9CBFD','8EBCFD','B6D3FC','A3C3D6','BDFFBD','99FF99','CCFFCC','---ALL---','default_new','EFEFEF'),('basic_orange','basic orange','Y','804d00','ffebcc','ffcc80','ffd699','ffcc80','ffd699','ffcc80','BDFFBD','99FF99','CCFFCC','---ALL---','default_new','EFEFEF'),('basic_purple','basic purple','Y','660066','ffccff','ff99ff','ffb3ff','ff99ff','ffb3ff','ff99ff','BDFFBD','99FF99','CCFFCC','---ALL---','SAMPLE.png','EFEFEF'),('basic_yellow','basic yellow','Y','666600','ffffcc','ffff66','ffff99','ffff66','ffff99','ffff66','BDFFBD','99FF99','CCFFCC','---ALL---','default_new','EFEFEF'),('basic_red','basic red','Y','800000','ffe6e6','ff9999','ffb3b3','ff9999','ffb3b3','ff9999','BDFFBD','99FF99','CCFFCC','---ALL---','default_new','EFEFEF');
|
||||||
INSERT INTO vicidial_screen_colors VALUES ('default_grey_agent','default grey agent','Y','FFFFFF','cccccc','E6E6E6','E6E6E6','E6E6E6','E6E6E6','E6E6E6','E6E6E6','E6E6E6','E6E6E6','---ALL---','DEFAULTAGENT.png');
|
INSERT INTO vicidial_screen_colors VALUES ('default_grey_agent','default grey agent','Y','FFFFFF','cccccc','E6E6E6','E6E6E6','E6E6E6','E6E6E6','E6E6E6','E6E6E6','E6E6E6','E6E6E6','---ALL---','DEFAULTAGENT.png','EFEFEF');
|
||||||
|
|
||||||
UPDATE system_settings SET qc_last_pull_time=NOW();
|
UPDATE system_settings SET qc_last_pull_time=NOW();
|
||||||
|
|
||||||
@@ -4644,6 +4662,8 @@ INSERT INTO vicidial_settings_containers(container_id,container_notes,container_
|
|||||||
INSERT INTO vicidial_settings_containers(container_id,container_notes,container_type,user_group,container_entry) VALUES ('TIMEZONES_CANADA','Canadian Timezone List','TIMEZONE_LIST','---ALL---','CAN,NST,Y,Newfoundland Time Zone\nCAN,AST,Y,Atlantic Time Zone\nCAN,EST,Y,Eastern Time Zone\nCAN,CST,Y,Central Time Zone\nCAN,CST,N,Saskatchewan Time Zone\nCAN,MST,Y,Mountain Time Zone\nCAN,PST,Y,Pacific Time Zone\n');
|
INSERT INTO vicidial_settings_containers(container_id,container_notes,container_type,user_group,container_entry) VALUES ('TIMEZONES_CANADA','Canadian Timezone List','TIMEZONE_LIST','---ALL---','CAN,NST,Y,Newfoundland Time Zone\nCAN,AST,Y,Atlantic Time Zone\nCAN,EST,Y,Eastern Time Zone\nCAN,CST,Y,Central Time Zone\nCAN,CST,N,Saskatchewan Time Zone\nCAN,MST,Y,Mountain Time Zone\nCAN,PST,Y,Pacific Time Zone\n');
|
||||||
INSERT INTO vicidial_settings_containers(container_id,container_notes,container_type,user_group,container_entry) VALUES ('TIMEZONES_AUSTRALIA','Australian Timezone List','TIMEZONE_LIST','---ALL---','AUS,AEST,Y,Eastern Australia Time Zone\nAUS,AEST,N,Queensland Time Zone\nAUS,ACST,Y,Central Australia Time Zone\nAUS,ACST,N,Northern Territory Time Zone\nAUS,AWST,N,Western Australia Time Zone\n');
|
INSERT INTO vicidial_settings_containers(container_id,container_notes,container_type,user_group,container_entry) VALUES ('TIMEZONES_AUSTRALIA','Australian Timezone List','TIMEZONE_LIST','---ALL---','AUS,AEST,Y,Eastern Australia Time Zone\nAUS,AEST,N,Queensland Time Zone\nAUS,ACST,Y,Central Australia Time Zone\nAUS,ACST,N,Northern Territory Time Zone\nAUS,AWST,N,Western Australia Time Zone\n');
|
||||||
|
|
||||||
|
INSERT INTO vicidial_settings_containers VALUES ('INTERNATIONAL_DNC_IMPORT','Process DNC lists of various countries from FTP site','PERL_CLI','---ALL---','# This setting container is used for the international DNC system. \r\n# The below two settings are mandatory for importing suppression lists\r\n# and tell the import process where to look for new files and where to\r\n# move them when handled. These settings cannot have the same value. \r\n--file-dir=/root/ftp\r\n--file-destination=/root/ftp/DONE\r\n\r\n# Uncomment below and set the status to whatever custom disposition you \r\n# would like already-loaded leads to be set to when they dedupe against\r\n# a country\'s DNC list (default is \"DNCI\")\r\n# --dnc-status-override=BMNR\r\n\r\n# The below settings are optional for when files are stored on a remote\r\n# server. It is strongly recommended these settings are not used and\r\n# that the processing scripts and files are stored locally on the same\r\n# server. \r\n# --ftp-host=localhost\r\n# --ftp-user=user\r\n# --ftp-pwd=pwd\r\n# --ftp-port=21\r\n# --ftp-passive=1\r\n'),('DNC_IMPORT_FORMATS','Import formats for DNC files','OTHER','---ALL---','# This setting container is used for storing file formats used when \r\n# loading DNC suppression lists into the dialer. \r\n#\r\n# import template => (delimited|fixed),delimiter,phone1(,phone2,phone3)\r\n#\r\n# For delimited files, the phone1 value should be the index value of\r\n# the field where the phone appears. The first array index is 0 and\r\n# indexes continue through the natural numbers.\r\n\r\n# In delimited files, acceptable values for the \"delimiter\" field are:\r\n# - \"tab\", \"pipe\", \"comma\", \"quote-comma\"\r\nBASIC_DELIMITED_FORMAT => delimited,pipe,0\r\n\r\n# If the phone number is split into multiple fields (ex: area code in\r\n# one field, rest of the number in another), simply list additional \r\n# indices of the phone number fields separated by commas in the order \r\n# in which the data should be combined to make the complete phone \r\n# number \r\nDELIMITED_WITH_AC_AND_EXCHANGE_SPLIT => delimited,tab,0,1\r\n\r\n# For fixed-length files, the phone field values should be of the type:\r\n# - \"starting_position|length\"\r\nBASIC_FIXED_FORMAT => fixed,,0|10\r\n\r\n# (delimited|fixed) is not used for CSV/Excel files, so all that needs \r\n# providing for those is the index field value(s) of the phone number\r\nBASIC_CSV_OR_EXCEL_FORMAT => ,,0'),('DNC_CURRENT_BLOCKED_LISTS','Lists currently blocked due to pending DNC scrub','READ_ONLY','---ALL---','');
|
||||||
|
|
||||||
UPDATE system_settings set vdc_agent_api_active='1';
|
UPDATE system_settings set vdc_agent_api_active='1';
|
||||||
|
|
||||||
UPDATE system_settings SET db_schema_version='1602',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
UPDATE system_settings SET db_schema_version='1603',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||||
|
|||||||
@@ -1279,3 +1279,27 @@ UPDATE system_settings SET db_schema_version='1601',db_schema_update_date=NOW()
|
|||||||
ALTER TABLE system_settings MODIFY queuemetrics_pausereason ENUM('STANDARD','EVERY_NEW','EVERY_NEW_ADMINCALL','EVERY_NEW_ALLCALL') default 'STANDARD';
|
ALTER TABLE system_settings MODIFY queuemetrics_pausereason ENUM('STANDARD','EVERY_NEW','EVERY_NEW_ADMINCALL','EVERY_NEW_ALLCALL') default 'STANDARD';
|
||||||
|
|
||||||
UPDATE system_settings SET db_schema_version='1602',db_schema_update_date=NOW() where db_schema_version < 1602;
|
UPDATE system_settings SET db_schema_version='1602',db_schema_update_date=NOW() where db_schema_version < 1602;
|
||||||
|
|
||||||
|
ALTER TABLE vicidial_screen_colors ADD button_color VARCHAR(6) default 'EFEFEF';
|
||||||
|
|
||||||
|
ALTER TABLE system_settings ADD enable_international_dncs ENUM('0','1') default '0';
|
||||||
|
|
||||||
|
CREATE TABLE vicidial_country_dnc_queue (
|
||||||
|
dnc_file_id int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
|
filename varchar(250) DEFAULT NULL,
|
||||||
|
country_code varchar(3) DEFAULT NULL,
|
||||||
|
file_layout varchar(30) DEFAULT NULL,
|
||||||
|
file_status enum('UPLOADING','READY','PENDING','INVALID LAYOUT','PROCESSING','FINISHED','CANCELLED') DEFAULT NULL,
|
||||||
|
file_action enum('PURGE','APPEND') DEFAULT NULL,
|
||||||
|
date_uploaded DATETIME DEFAULT NULL,
|
||||||
|
total_records int(10) UNSIGNED DEFAULT NULL,
|
||||||
|
records_processed int(10) UNSIGNED DEFAULT NULL,
|
||||||
|
records_inserted int(10) UNSIGNED DEFAULT NULL,
|
||||||
|
date_processed DATETIME DEFAULT NULL,
|
||||||
|
PRIMARY KEY (dnc_file_id),
|
||||||
|
KEY vicidial_country_dnc_queue_filename_key (filename)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
|
INSERT INTO vicidial_settings_containers VALUES ('INTERNATIONAL_DNC_IMPORT','Process DNC lists of various countries from FTP site','PERL_CLI','---ALL---','# This setting container is used for the international DNC system. \r\n# The below two settings are mandatory for importing suppression lists\r\n# and tell the import process where to look for new files and where to\r\n# move them when handled. These settings cannot have the same value. \r\n--file-dir=/root/ftp\r\n--file-destination=/root/ftp/DONE\r\n\r\n# Uncomment below and set the status to whatever custom disposition you \r\n# would like already-loaded leads to be set to when they dedupe against\r\n# a country\'s DNC list (default is \"DNCI\")\r\n# --dnc-status-override=BMNR\r\n\r\n# The below settings are optional for when files are stored on a remote\r\n# server. It is strongly recommended these settings are not used and\r\n# that the processing scripts and files are stored locally on the same\r\n# server. \r\n# --ftp-host=localhost\r\n# --ftp-user=user\r\n# --ftp-pwd=pwd\r\n# --ftp-port=21\r\n# --ftp-passive=1\r\n'),('DNC_IMPORT_FORMATS','Import formats for DNC files','OTHER','---ALL---','# This setting container is used for storing file formats used when \r\n# loading DNC suppression lists into the dialer. \r\n#\r\n# import template => (delimited|fixed),delimiter,phone1(,phone2,phone3)\r\n#\r\n# For delimited files, the phone1 value should be the index value of\r\n# the field where the phone appears. The first array index is 0 and\r\n# indexes continue through the natural numbers.\r\n\r\n# In delimited files, acceptable values for the \"delimiter\" field are:\r\n# - \"tab\", \"pipe\", \"comma\", \"quote-comma\"\r\nBASIC_DELIMITED_FORMAT => delimited,pipe,0\r\n\r\n# If the phone number is split into multiple fields (ex: area code in\r\n# one field, rest of the number in another), simply list additional \r\n# indices of the phone number fields separated by commas in the order \r\n# in which the data should be combined to make the complete phone \r\n# number \r\nDELIMITED_WITH_AC_AND_EXCHANGE_SPLIT => delimited,tab,0,1\r\n\r\n# For fixed-length files, the phone field values should be of the type:\r\n# - \"starting_position|length\"\r\nBASIC_FIXED_FORMAT => fixed,,0|10\r\n\r\n# (delimited|fixed) is not used for CSV/Excel files, so all that needs \r\n# providing for those is the index field value(s) of the phone number\r\nBASIC_CSV_OR_EXCEL_FORMAT => ,,0'),('DNC_CURRENT_BLOCKED_LISTS','Lists currently blocked due to pending DNC scrub','READ_ONLY','---ALL---','');
|
||||||
|
|
||||||
|
UPDATE system_settings SET db_schema_version='1603',db_schema_update_date=NOW() where db_schema_version < 1603;
|
||||||
|
|||||||
@@ -584,7 +584,7 @@ if ($archives_available=="Y")
|
|||||||
{
|
{
|
||||||
$MAIN.="<input type='checkbox' name='search_archived_data' value='checked' $search_archived_data>"._QXZ("Search archived data")."<BR><BR>\n";
|
$MAIN.="<input type='checkbox' name='search_archived_data' value='checked' $search_archived_data>"._QXZ("Search archived data")."<BR><BR>\n";
|
||||||
}
|
}
|
||||||
$MAIN.=" <input type=submit value=\""._QXZ("SUBMIT")."\" name=submit id=submit>\n";
|
$MAIN.=" <input style='background-color:#$SSbutton_color' type=submit value=\""._QXZ("SUBMIT")."\" name=submit id=submit>\n";
|
||||||
$MAIN.="</FONT>\n";
|
$MAIN.="</FONT>\n";
|
||||||
$MAIN.="</TD></TR></TABLE>\n";
|
$MAIN.="</TD></TR></TABLE>\n";
|
||||||
$MAIN.="</FORM>\n\n";
|
$MAIN.="</FORM>\n\n";
|
||||||
|
|||||||
@@ -661,7 +661,7 @@ if ($archives_available=="Y")
|
|||||||
{
|
{
|
||||||
$MAIN.="<BR><input type='checkbox' name='search_archived_data' value='checked' $search_archived_data>"._QXZ("Search archived data")."<BR>\n";
|
$MAIN.="<BR><input type='checkbox' name='search_archived_data' value='checked' $search_archived_data>"._QXZ("Search archived data")."<BR>\n";
|
||||||
}
|
}
|
||||||
$MAIN.=" <input type=button value=\""._QXZ("SUBMIT")."\" name=smt id=smt onClick=\"submit_form()\">\n";
|
$MAIN.=" <input style='background-color:#$SSbutton_color' type=button value=\""._QXZ("SUBMIT")."\" name=smt id=smt onClick=\"submit_form()\">\n";
|
||||||
|
|
||||||
$MAIN.="</TD></TR></TABLE>\n";
|
$MAIN.="</TD></TR></TABLE>\n";
|
||||||
$MAIN.="</FORM>\n\n";
|
$MAIN.="</FORM>\n\n";
|
||||||
|
|||||||
@@ -506,7 +506,7 @@ if ($archives_available=="Y")
|
|||||||
$MAIN.="<BR><BR><input type='checkbox' name='search_archived_data' value='checked' $search_archived_data>"._QXZ("Search archived data")."\n";
|
$MAIN.="<BR><BR><input type='checkbox' name='search_archived_data' value='checked' $search_archived_data>"._QXZ("Search archived data")."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$MAIN.="<BR><BR><INPUT type=submit NAME=SUBMIT VALUE='"._QXZ("SUBMIT")."'>\n";
|
$MAIN.="<BR><BR><INPUT style='background-color:#$SSbutton_color' type=submit NAME=SUBMIT VALUE='"._QXZ("SUBMIT")."'>\n";
|
||||||
$MAIN.="</TD><TD VALIGN=TOP> ";
|
$MAIN.="</TD><TD VALIGN=TOP> ";
|
||||||
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||||
if (strlen($group[0]) > 1)
|
if (strlen($group[0]) > 1)
|
||||||
|
|||||||
@@ -524,7 +524,7 @@ if ($archives_available=="Y")
|
|||||||
$MAIN.="<BR><input type='checkbox' name='search_archived_data' value='checked' $search_archived_data>"._QXZ("Search archived data")."\n";
|
$MAIN.="<BR><input type='checkbox' name='search_archived_data' value='checked' $search_archived_data>"._QXZ("Search archived data")."\n";
|
||||||
}
|
}
|
||||||
$MAIN.="<BR><BR>\n";
|
$MAIN.="<BR><BR>\n";
|
||||||
$MAIN.="<INPUT type=submit NAME=SUBMIT VALUE='"._QXZ("SUBMIT")."'>\n";
|
$MAIN.="<INPUT style='background-color:#$SSbutton_color' type=submit NAME=SUBMIT VALUE='"._QXZ("SUBMIT")."'>\n";
|
||||||
$MAIN.="</TD><TD VALIGN=TOP> ";
|
$MAIN.="</TD><TD VALIGN=TOP> ";
|
||||||
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||||
if ($use_lists > 0)
|
if ($use_lists > 0)
|
||||||
|
|||||||
@@ -452,7 +452,7 @@ $MAIN.="<TD VALIGN=TOP>";
|
|||||||
#if ($report_display_type) {$MAIN.="<option value='$report_display_type' selected>$report_display_type</option>";}
|
#if ($report_display_type) {$MAIN.="<option value='$report_display_type' selected>$report_display_type</option>";}
|
||||||
#$MAIN.="<option value='TEXT'>TEXT</option><option value='HTML'>HTML</option></select> ";
|
#$MAIN.="<option value='TEXT'>TEXT</option><option value='HTML'>HTML</option></select> ";
|
||||||
$MAIN.="<BR><BR><BR>\n";
|
$MAIN.="<BR><BR><BR>\n";
|
||||||
$MAIN.="<INPUT type=submit NAME=SUBMIT VALUE='"._QXZ("SUBMIT")."'>\n";
|
$MAIN.="<INPUT style='background-color:#$SSbutton_color' type=submit NAME=SUBMIT VALUE='"._QXZ("SUBMIT")."'>\n";
|
||||||
$MAIN.="</TD><TD VALIGN=TOP> ";
|
$MAIN.="</TD><TD VALIGN=TOP> ";
|
||||||
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||||
if (strlen($group[0]) > 1)
|
if (strlen($group[0]) > 1)
|
||||||
|
|||||||
@@ -742,7 +742,7 @@ $MAIN.="<option value=\"AM\">"._QXZ("AM")."</option>\n";
|
|||||||
$MAIN.="<option value=\"PM\">"._QXZ("PM")."</option>\n";
|
$MAIN.="<option value=\"PM\">"._QXZ("PM")."</option>\n";
|
||||||
$MAIN.="<option value=\"ALL\">"._QXZ("ALL")."</option>\n";
|
$MAIN.="<option value=\"ALL\">"._QXZ("ALL")."</option>\n";
|
||||||
$MAIN.="</SELECT><BR><BR>\n";
|
$MAIN.="</SELECT><BR><BR>\n";
|
||||||
$MAIN.="<INPUT type=submit NAME=SUBMIT VALUE='"._QXZ("SUBMIT")."'>\n";
|
$MAIN.="<INPUT style='background-color:#$SSbutton_color' type=submit NAME=SUBMIT VALUE='"._QXZ("SUBMIT")."'>\n";
|
||||||
$MAIN.="</TD><TD VALIGN=TOP> ";
|
$MAIN.="</TD><TD VALIGN=TOP> ";
|
||||||
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||||
$MAIN.="<a href=\"$PHP_SELF?agent_hours=$agent_hours&outbound_rate=$outbound_rate&costformat=$costformat&print_calls=$print_calls&query_date=$query_date&end_date=$end_date$groupQS$list_idQS&include_rollover=$include_rollover&bottom_graph=$bottom_graph&carrier_stats=$carrier_stats&report_display_type=$report_display_type&shift=$shift&SUBMIT=$SUBMIT&file_download=1&search_archived_data=$search_archived_data\">"._QXZ("DOWNLOAD")."</a> |";
|
$MAIN.="<a href=\"$PHP_SELF?agent_hours=$agent_hours&outbound_rate=$outbound_rate&costformat=$costformat&print_calls=$print_calls&query_date=$query_date&end_date=$end_date$groupQS$list_idQS&include_rollover=$include_rollover&bottom_graph=$bottom_graph&carrier_stats=$carrier_stats&report_display_type=$report_display_type&shift=$shift&SUBMIT=$SUBMIT&file_download=1&search_archived_data=$search_archived_data\">"._QXZ("DOWNLOAD")."</a> |";
|
||||||
|
|||||||
@@ -514,7 +514,7 @@ if (mysqli_num_rows($template_rslt)>0) {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr bgcolor="#<?php echo $SSframe_background; ?>">
|
<tr bgcolor="#<?php echo $SSframe_background; ?>">
|
||||||
<th colspan='2'><input type='submit' name='submit_template' onClick="return checkForm(this.form)" value='<?php echo _QXZ("SUBMIT TEMPLATE"); ?>'></th>
|
<th colspan='2'><input <?php echo "style='background-color:#$SSbutton_color'"; ?> type='submit' name='submit_template' onClick="return checkForm(this.form)" value='<?php echo _QXZ("SUBMIT TEMPLATE"); ?>'></th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr bgcolor="#<?php echo $SSframe_background; ?>"><td align="center" colspan=2>
|
<tr bgcolor="#<?php echo $SSframe_background; ?>"><td align="center" colspan=2>
|
||||||
<table border=0 cellpadding=3 cellspacing=1 width="100%" align="center">
|
<table border=0 cellpadding=3 cellspacing=1 width="100%" align="center">
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ if (isset($_GET["report_display_type"])) {$report_display_type=$_GET["report_d
|
|||||||
if (strlen($shift)<2) {$shift='ALL';}
|
if (strlen($shift)<2) {$shift='ALL';}
|
||||||
if (strlen($stage)<2) {$stage='ID';}
|
if (strlen($stage)<2) {$stage='ID';}
|
||||||
|
|
||||||
|
require("screen_colors.php");
|
||||||
|
|
||||||
$report_name = 'User Timeclock Detail Report';
|
$report_name = 'User Timeclock Detail Report';
|
||||||
$db_source = 'M';
|
$db_source = 'M';
|
||||||
|
|
||||||
@@ -519,7 +521,7 @@ window.open(url,"",'width=620,height=300,scrollbars=yes,menubar=yes,address=yes'
|
|||||||
|
|
||||||
</SCRIPT>
|
</SCRIPT>
|
||||||
|
|
||||||
<input type=button value="<?php echo _QXZ("SUBMIT"); ?>" name=smt id=smt onClick="submit_form()">
|
<input <?php echo "style='background-color:#$SSbutton_color'"; ?> type=button value="<?php echo _QXZ("SUBMIT"); ?>" name=smt id=smt onClick="submit_form()">
|
||||||
<?php
|
<?php
|
||||||
echo "</TD><TD VALIGN=TOP> ";
|
echo "</TD><TD VALIGN=TOP> ";
|
||||||
|
|
||||||
|
|||||||
@@ -981,7 +981,7 @@ $HTML_text.=" </table>\n";
|
|||||||
$HTML_text.="</TD>\n";
|
$HTML_text.="</TD>\n";
|
||||||
$HTML_text.="<TD VALIGN='top' align='center'>\n";
|
$HTML_text.="<TD VALIGN='top' align='center'>\n";
|
||||||
$HTML_text.="<font color='BLACK' face='ARIAL,HELVETICA' size='2'> <a href='$PHP_SELF?DB=$DB$groupQS&selected_list=$selected_list&report_type=$report_type&time_setting=$time_setting&report_source=$report_source&snapshot_time=$snapshot_time&file_download=1&SUBMIT=$SUBMIT'>"._QXZ("DOWNLOAD")."</a> | <a href='./admin.php?ADD=999999'>"._QXZ("REPORTS")."</a> </font><BR><BR>\n";
|
$HTML_text.="<font color='BLACK' face='ARIAL,HELVETICA' size='2'> <a href='$PHP_SELF?DB=$DB$groupQS&selected_list=$selected_list&report_type=$report_type&time_setting=$time_setting&report_source=$report_source&snapshot_time=$snapshot_time&file_download=1&SUBMIT=$SUBMIT'>"._QXZ("DOWNLOAD")."</a> | <a href='./admin.php?ADD=999999'>"._QXZ("REPORTS")."</a> </font><BR><BR>\n";
|
||||||
$HTML_text.="<input name='SUBMIT' value='"._QXZ("SUBMIT")."' type='submit'>\n";
|
$HTML_text.="<input name='SUBMIT' value='"._QXZ("SUBMIT")."' style='background-color:#$SSbutton_color' type='submit'>\n";
|
||||||
$HTML_text.="</TD>\n";
|
$HTML_text.="</TD>\n";
|
||||||
$HTML_text.="</TR>\n";
|
$HTML_text.="</TR>\n";
|
||||||
$HTML_text.="</TABLE>\n";
|
$HTML_text.="</TABLE>\n";
|
||||||
|
|||||||
@@ -782,6 +782,8 @@ if (isset($RS_CUSTINFOminUL))
|
|||||||
else {$CUSTINFOminUL = 9;}
|
else {$CUSTINFOminUL = 9;}
|
||||||
if ($LOGuser_level < $CUSTINFOminUL) {$CUSTINFOdisplay=0;}
|
if ($LOGuser_level < $CUSTINFOminUL) {$CUSTINFOdisplay=0;}
|
||||||
|
|
||||||
|
require("screen_colors.php");
|
||||||
|
|
||||||
$NFB = '<b><font size=6 face="courier">';
|
$NFB = '<b><font size=6 face="courier">';
|
||||||
$NFE = '</font></b>';
|
$NFE = '</font></b>';
|
||||||
$F=''; $FG=''; $B=''; $BG='';
|
$F=''; $FG=''; $B=''; $BG='';
|
||||||
@@ -986,7 +988,7 @@ $select_list .= "</SELECT></TD></TR>";
|
|||||||
|
|
||||||
$select_list .= "</TABLE><BR>";
|
$select_list .= "</TABLE><BR>";
|
||||||
$select_list .= "<INPUT type=hidden name=droppedOFtotal value=\"$droppedOFtotal\">";
|
$select_list .= "<INPUT type=hidden name=droppedOFtotal value=\"$droppedOFtotal\">";
|
||||||
$select_list .= "<INPUT type=submit NAME=SUBMIT VALUE=SUBMIT><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2> ";
|
$select_list .= "<INPUT style='background-color:#$SSbutton_color' type=submit NAME=SUBMIT VALUE=SUBMIT><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2> ";
|
||||||
$select_list .= "</TD></TR>";
|
$select_list .= "</TD></TR>";
|
||||||
$select_list .= "<TR><TD ALIGN=CENTER>";
|
$select_list .= "<TR><TD ALIGN=CENTER>";
|
||||||
$select_list .= "<font class=\"top_settings_val\"> </font>";
|
$select_list .= "<font class=\"top_settings_val\"> </font>";
|
||||||
|
|||||||
@@ -277,6 +277,7 @@ $NFB = '<b><font size=6 face="courier">';
|
|||||||
$NFE = '</font></b>';
|
$NFE = '</font></b>';
|
||||||
$F=''; $FG=''; $B=''; $BG='';
|
$F=''; $FG=''; $B=''; $BG='';
|
||||||
|
|
||||||
|
require("screen_colors.php");
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<HTML>
|
<HTML>
|
||||||
@@ -412,7 +413,7 @@ if ($UGdisplay > 0)
|
|||||||
}
|
}
|
||||||
echo "</SELECT>\n";
|
echo "</SELECT>\n";
|
||||||
}
|
}
|
||||||
echo "<INPUT type=submit NAME=SUBMIT VALUE='"._QXZ("SUBMIT")."'><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2> \n";
|
echo "<INPUT style='background-color:#$SSbutton_color' type=submit NAME=SUBMIT VALUE='"._QXZ("SUBMIT")."'><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2> \n";
|
||||||
echo "<a href=\"$PHP_SELF?group=$group&RR=4000&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&RECmonitorLINK=$RECmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay\">"._QXZ("STOP")."</a> | ";
|
echo "<a href=\"$PHP_SELF?group=$group&RR=4000&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&RECmonitorLINK=$RECmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay\">"._QXZ("STOP")."</a> | ";
|
||||||
echo "<a href=\"$PHP_SELF?group=$group&RR=40&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&RECmonitorLINK=$RECmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay\">"._QXZ("SLOW")."</a> | ";
|
echo "<a href=\"$PHP_SELF?group=$group&RR=40&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&RECmonitorLINK=$RECmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay\">"._QXZ("SLOW")."</a> | ";
|
||||||
echo "<a href=\"$PHP_SELF?group=$group&RR=4&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&RECmonitorLINK=$RECmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay\">"._QXZ("GO")."</a>";
|
echo "<a href=\"$PHP_SELF?group=$group&RR=4&DB=$DB&adastats=$adastats&SIPmonitorLINK=$SIPmonitorLINK&IAXmonitorLINK=$IAXmonitorLINK&RECmonitorLINK=$RECmonitorLINK&usergroup=$usergroup&UGdisplay=$UGdisplay&UidORname=$UidORname&orderby=$orderby&SERVdisplay=$SERVdisplay\">"._QXZ("GO")."</a>";
|
||||||
|
|||||||
@@ -222,6 +222,8 @@ while ($i < $groups_to_print)
|
|||||||
|
|
||||||
if (!isset($RR)) {$RR=4;}
|
if (!isset($RR)) {$RR=4;}
|
||||||
|
|
||||||
|
require("screen_colors.php");
|
||||||
|
|
||||||
$HEADER.="<HTML>\n";
|
$HEADER.="<HTML>\n";
|
||||||
$HEADER.="<HEAD>\n";
|
$HEADER.="<HEAD>\n";
|
||||||
$HEADER.="<STYLE type=\"text/css\">\n";
|
$HEADER.="<STYLE type=\"text/css\">\n";
|
||||||
@@ -292,7 +294,7 @@ $MAIN.="<option value=\"INBOUND ONLY\"";
|
|||||||
if ($types == 'INBOUND ONLY') {$MAIN.=" selected";}
|
if ($types == 'INBOUND ONLY') {$MAIN.=" selected";}
|
||||||
$MAIN.=">"._QXZ("INBOUND ONLY")."</option>";
|
$MAIN.=">"._QXZ("INBOUND ONLY")."</option>";
|
||||||
$MAIN.="</select> \n";
|
$MAIN.="</select> \n";
|
||||||
$MAIN.="<input type=submit name=submit value='"._QXZ("SUBMIT")."'>\n";
|
$MAIN.="<input style='background-color:#$SSbutton_color' type=submit name=submit value='"._QXZ("SUBMIT")."'>\n";
|
||||||
$MAIN.="<BR><BR>\n\n";
|
$MAIN.="<BR><BR>\n\n";
|
||||||
|
|
||||||
$k=0;
|
$k=0;
|
||||||
|
|||||||
@@ -629,6 +629,8 @@ while ($i < $ingroups_to_print)
|
|||||||
|
|
||||||
if (!isset($RR)) {$RR=4;}
|
if (!isset($RR)) {$RR=4;}
|
||||||
|
|
||||||
|
require("screen_colors.php");
|
||||||
|
|
||||||
$NFB = '<b><font size=6 face="courier">';
|
$NFB = '<b><font size=6 face="courier">';
|
||||||
$NFE = '</font></b>';
|
$NFE = '</font></b>';
|
||||||
$F=''; $FG=''; $B=''; $BG='';
|
$F=''; $FG=''; $B=''; $BG='';
|
||||||
@@ -833,7 +835,7 @@ $select_list .= "</SELECT></TD></TR>";
|
|||||||
|
|
||||||
$select_list .= "</TABLE><BR>";
|
$select_list .= "</TABLE><BR>";
|
||||||
$select_list .= "<INPUT type=hidden name=droppedOFtotal value=\"$droppedOFtotal\">";
|
$select_list .= "<INPUT type=hidden name=droppedOFtotal value=\"$droppedOFtotal\">";
|
||||||
$select_list .= "<INPUT type=submit NAME=SUBMIT VALUE=SUBMIT><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2> ";
|
$select_list .= "<INPUT style='background-color:#$SSbutton_color' type=submit NAME=SUBMIT VALUE=SUBMIT><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2> ";
|
||||||
$select_list .= "</TD></TR>";
|
$select_list .= "</TD></TR>";
|
||||||
$select_list .= "<TR><TD ALIGN=CENTER>";
|
$select_list .= "<TR><TD ALIGN=CENTER>";
|
||||||
$select_list .= "<font class=\"top_settings_val\"> </font>";
|
$select_list .= "<font class=\"top_settings_val\"> </font>";
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ $Mselected_color ='#C6C6C6';
|
|||||||
$Mhead_color ='#A3C3D6';
|
$Mhead_color ='#A3C3D6';
|
||||||
$Mmain_bgcolor ='#015B91';
|
$Mmain_bgcolor ='#015B91';
|
||||||
|
|
||||||
|
require("screen_colors.php");
|
||||||
|
/*
|
||||||
$SSmenu_background='015B91';
|
$SSmenu_background='015B91';
|
||||||
$SSframe_background='D9E6FE';
|
$SSframe_background='D9E6FE';
|
||||||
$SSstd_row1_background='9BB9FB';
|
$SSstd_row1_background='9BB9FB';
|
||||||
@@ -55,6 +57,7 @@ if ($SSadmin_screen_colors != 'default')
|
|||||||
$SSweb_logo = $row[10];
|
$SSweb_logo = $row[10];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
$Mhead_color = $SSstd_row5_background;
|
$Mhead_color = $SSstd_row5_background;
|
||||||
$Mmain_bgcolor = $SSmenu_background;
|
$Mmain_bgcolor = $SSmenu_background;
|
||||||
@@ -360,7 +363,7 @@ echo "<tr>";
|
|||||||
echo "<td NOWRAP>"._QXZ("Dial Status").":</td><td align='left'><select name='update_dialstatus' id='update_dialstatus' class='form_field' size='1'><option value=''></option><option value='AMD'>AMD</option><option value='ANSWER'>ANSWER</option><option value='BUSY'>BUSY</option><option value='CANCEL'>CANCEL</option><option value='CHANUNAVAIL'>CHANUNAVAIL</option><option value='CONGESTION'>CONGESTION</option><option value='DISCONNECT'>DISCONNECT</option><option value='DONTCALL'>DONTCALL</option><option value='FAX'>FAX</option><option value='INVALIDARGS'>INVALIDARGS</option><option value='NOANSWER'>NOANSWER</option><option value='TORTURE'>TORTURE</option></td>";
|
echo "<td NOWRAP>"._QXZ("Dial Status").":</td><td align='left'><select name='update_dialstatus' id='update_dialstatus' class='form_field' size='1'><option value=''></option><option value='AMD'>AMD</option><option value='ANSWER'>ANSWER</option><option value='BUSY'>BUSY</option><option value='CANCEL'>CANCEL</option><option value='CHANUNAVAIL'>CHANUNAVAIL</option><option value='CONGESTION'>CONGESTION</option><option value='DISCONNECT'>DISCONNECT</option><option value='DONTCALL'>DONTCALL</option><option value='FAX'>FAX</option><option value='INVALIDARGS'>INVALIDARGS</option><option value='NOANSWER'>NOANSWER</option><option value='TORTURE'>TORTURE</option></td>";
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "<td colspan='3' align='center'><input type='submit' name='submit_khomp' value='"._QXZ("UPDATE")."'> <input type='button' onClick=\"ClearKhompCode()\" value='"._QXZ("CANCEL")."'></td>";
|
echo "<td colspan='3' align='center'><input style='background-color:#$SSbutton_color' type='submit' name='submit_khomp' value='"._QXZ("UPDATE")."'> <input style='background-color:#$SSbutton_color' type='button' onClick=\"ClearKhompCode()\" value='"._QXZ("CANCEL")."'></td>";
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
@@ -477,7 +480,7 @@ array_multisort($blank_khomp_keys, SORT_ASC, $blank_khomp_vals, SORT_ASC, $blank
|
|||||||
echo "<td width='$td_max_width3'><font size=1 color=black align=left>".$vvalues[0]."</font></td>";
|
echo "<td width='$td_max_width3'><font size=1 color=black align=left>".$vvalues[0]."</font></td>";
|
||||||
echo "<td width='$td_max_width3'><font size=1 color=black align=left>".$vvalues[1]."</font></td>";
|
echo "<td width='$td_max_width3'><font size=1 color=black align=left>".$vvalues[1]."</font></td>";
|
||||||
echo "<td width='$td_max_width3'><font size=1 color=black align=left>".$vvalues[2]."</font></td>";
|
echo "<td width='$td_max_width3'><font size=1 color=black align=left>".$vvalues[2]."</font></td>";
|
||||||
echo "<td align='center' width='$td_max_width3'><font size=1 color=black align=left><input type='button' value='"._QXZ("MODIFY")."' onClick=\"ModifyKhompCode(event, '".$kvalues[0]."', '".$kvalues[1]."', '".$vvalues[0]."', '".$vvalues[1]."', '".$vvalues[2]."')\"</td>";
|
echo "<td align='center' width='$td_max_width3'><font size=1 color=black align=left><input style='background-color:#$SSbutton_color' type='button' value='"._QXZ("MODIFY")."' onClick=\"ModifyKhompCode(event, '".$kvalues[0]."', '".$kvalues[1]."', '".$vvalues[0]."', '".$vvalues[1]."', '".$vvalues[2]."')\"</td>";
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
$p++;
|
$p++;
|
||||||
}
|
}
|
||||||
@@ -499,7 +502,7 @@ array_multisort($blank_khomp_keys, SORT_ASC, $blank_khomp_vals, SORT_ASC, $blank
|
|||||||
echo "<td width='$td_max_width3'><font size=1 color=black align=left>".$vvalues[0]."</font></td>";
|
echo "<td width='$td_max_width3'><font size=1 color=black align=left>".$vvalues[0]."</font></td>";
|
||||||
echo "<td width='$td_max_width3'><font size=1 color=black align=left>".$vvalues[1]."</font></td>";
|
echo "<td width='$td_max_width3'><font size=1 color=black align=left>".$vvalues[1]."</font></td>";
|
||||||
echo "<td width='$td_max_width3'><font size=1 color=black align=left>".$vvalues[2]."</font></td>";
|
echo "<td width='$td_max_width3'><font size=1 color=black align=left>".$vvalues[2]."</font></td>";
|
||||||
echo "<td align='center' width='$td_max_width3'><font size=1 color=black align=left><input type='button' value='"._QXZ("MODIFY")."' onClick=\"ModifyKhompCode(event, '".$kvalues[0]."', '".$kvalues[1]."', '".$vvalues[0]."', '".$vvalues[1]."', '".$vvalues[2]."')\"</td>";
|
echo "<td align='center' width='$td_max_width3'><font size=1 color=black align=left><input style='background-color:#$SSbutton_color' type='button' value='"._QXZ("MODIFY")."' onClick=\"ModifyKhompCode(event, '".$kvalues[0]."', '".$kvalues[1]."', '".$vvalues[0]."', '".$vvalues[1]."', '".$vvalues[2]."')\"</td>";
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
$p++;
|
$p++;
|
||||||
}
|
}
|
||||||
@@ -518,7 +521,7 @@ array_multisort($blank_khomp_keys, SORT_ASC, $blank_khomp_vals, SORT_ASC, $blank
|
|||||||
echo "<td NOWRAP width='$td_max_width3'><input type='text' name='new_action' class='form_field' size='10' maxlength='20'></td>";
|
echo "<td NOWRAP width='$td_max_width3'><input type='text' name='new_action' class='form_field' size='10' maxlength='20'></td>";
|
||||||
echo "<td NOWRAP width='$td_max_width3'><input type='text' name='new_status' class='form_field' size='10' maxlength='20'></td>";
|
echo "<td NOWRAP width='$td_max_width3'><input type='text' name='new_status' class='form_field' size='10' maxlength='20'></td>";
|
||||||
echo "<td NOWRAP width='$td_max_width3'><input type='text' name='new_dialstatus' class='form_field' size='10' maxlength='20'></td>";
|
echo "<td NOWRAP width='$td_max_width3'><input type='text' name='new_dialstatus' class='form_field' size='10' maxlength='20'></td>";
|
||||||
echo "<td NOWRAP align='center' width='$td_max_width3'><input type='submit' name='submit_khomp' value='"._QXZ("ADD")."'></td>";
|
echo "<td NOWRAP align='center' width='$td_max_width3'><input style='background-color:#$SSbutton_color' type='submit' name='submit_khomp' value='"._QXZ("ADD")."'></td>";
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
|
|
||||||
echo "</table></form>";
|
echo "</table></form>";
|
||||||
|
|||||||
@@ -0,0 +1,405 @@
|
|||||||
|
<?php
|
||||||
|
# Vicidial_international_DNC_interface.php - version 2.14
|
||||||
|
#
|
||||||
|
# Copyright (C) 2020 Matt Florell <vicidial@gmail.com>, Joe Johnson <joej@vicidial.com> LICENSE: AGPLv2
|
||||||
|
#
|
||||||
|
# ViciDial web-based DNC file loader from formatted file
|
||||||
|
#
|
||||||
|
# CHANGES:
|
||||||
|
# 200813-1230 - First version
|
||||||
|
#
|
||||||
|
|
||||||
|
require("dbconnect_mysqli.php");
|
||||||
|
require("functions.php");
|
||||||
|
|
||||||
|
if (file_exists('options.php'))
|
||||||
|
{
|
||||||
|
require('options.php');
|
||||||
|
}
|
||||||
|
|
||||||
|
$US='_';
|
||||||
|
$MT[0]='';
|
||||||
|
|
||||||
|
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||||
|
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||||
|
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||||
|
if (isset($_GET["file_update_str"])) {$file_update_str=$_GET["file_update_str"];}
|
||||||
|
elseif (isset($_POST["file_update_str"])) {$file_update_str=$_POST["file_update_str"];}
|
||||||
|
|
||||||
|
#############################################
|
||||||
|
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||||
|
$stmt = "SELECT use_non_latin,admin_web_directory,custom_fields_enabled,webroot_writable,enable_languages,language_method,active_modules,admin_screen_colors,web_loader_phone_length,enable_international_dncs FROM system_settings;";
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
if ($DB) {echo "$stmt\n";}
|
||||||
|
$qm_conf_ct = mysqli_num_rows($rslt);
|
||||||
|
if ($qm_conf_ct > 0)
|
||||||
|
{
|
||||||
|
$row=mysqli_fetch_row($rslt);
|
||||||
|
$non_latin = $row[0];
|
||||||
|
$admin_web_directory = $row[1];
|
||||||
|
$custom_fields_enabled = $row[2];
|
||||||
|
$webroot_writable = $row[3];
|
||||||
|
$SSenable_languages = $row[4];
|
||||||
|
$SSlanguage_method = $row[5];
|
||||||
|
$SSactive_modules = $row[6];
|
||||||
|
$SSadmin_screen_colors = $row[7];
|
||||||
|
$SSweb_loader_phone_length = $row[8];
|
||||||
|
$SSenable_international_dncs = $row[9];
|
||||||
|
}
|
||||||
|
##### END SETTINGS LOOKUP #####
|
||||||
|
###########################################
|
||||||
|
|
||||||
|
if ($non_latin < 1)
|
||||||
|
{
|
||||||
|
$PHP_AUTH_USER = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_USER);
|
||||||
|
$PHP_AUTH_PW = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_PW);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$PHP_AUTH_PW = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_PW);
|
||||||
|
$PHP_AUTH_USER = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_USER);
|
||||||
|
}
|
||||||
|
$list_id_override = preg_replace('/[^0-9]/','',$list_id_override);
|
||||||
|
$web_loader_phone_length = preg_replace('/[^0-9]/','',$web_loader_phone_length);
|
||||||
|
|
||||||
|
$STARTtime = date("U");
|
||||||
|
$TODAY = date("Y-m-d");
|
||||||
|
$NOW_TIME = date("Y-m-d H:i:s");
|
||||||
|
$FILE_datetime = $STARTtime;
|
||||||
|
$date = date("r");
|
||||||
|
$ip = getenv("REMOTE_ADDR");
|
||||||
|
$browser = getenv("HTTP_USER_AGENT");
|
||||||
|
$NWB = "<IMG SRC=\"help.png\" onClick=\"FillAndShowHelpDiv(event, '";
|
||||||
|
$NWE = "')\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP>";
|
||||||
|
|
||||||
|
if ($non_latin > 0) {$rslt=mysql_to_mysqli("SET NAMES 'UTF8'", $link);}
|
||||||
|
$stmt="SELECT selected_language from vicidial_users where user='$PHP_AUTH_USER';";
|
||||||
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
$sl_ct = mysqli_num_rows($rslt);
|
||||||
|
if ($sl_ct > 0)
|
||||||
|
{
|
||||||
|
$row=mysqli_fetch_row($rslt);
|
||||||
|
$VUselected_language = $row[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
$auth=0;
|
||||||
|
$auth_message = user_authorization($PHP_AUTH_USER,$PHP_AUTH_PW,'',1,0);
|
||||||
|
if ($auth_message == 'GOOD')
|
||||||
|
{$auth=1;}
|
||||||
|
|
||||||
|
if ($auth < 1)
|
||||||
|
{
|
||||||
|
$VDdisplayMESSAGE = _QXZ("Login incorrect, please try again");
|
||||||
|
if ($auth_message == 'LOCK')
|
||||||
|
{
|
||||||
|
$VDdisplayMESSAGE = _QXZ("Too many login attempts, try again in 15 minutes");
|
||||||
|
Header ("Content-type: text/html; charset=utf-8");
|
||||||
|
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($auth_message == 'IPBLOCK')
|
||||||
|
{
|
||||||
|
$VDdisplayMESSAGE = _QXZ("Your IP Address is not allowed") . ": $ip";
|
||||||
|
Header ("Content-type: text/html; charset=utf-8");
|
||||||
|
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
|
||||||
|
Header("HTTP/1.0 401 Unauthorized");
|
||||||
|
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$PHP_AUTH_PW|$auth_message|\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$stmt="SELECT load_leads,user_group from vicidial_users where user='$PHP_AUTH_USER';";
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
$row=mysqli_fetch_row($rslt);
|
||||||
|
$LOGload_leads = $row[0];
|
||||||
|
$LOGuser_group = $row[1];
|
||||||
|
|
||||||
|
if (!$SSenable_international_dncs)
|
||||||
|
{
|
||||||
|
Header ("Content-type: text/html; charset=utf-8");
|
||||||
|
echo _QXZ("Feature is currently disabled")."\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($LOGload_leads < 1)
|
||||||
|
{
|
||||||
|
Header ("Content-type: text/html; charset=utf-8");
|
||||||
|
echo _QXZ("You do not have permissions to load DNC leads")."\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (preg_match("/;|:|\/|\^|\[|\]|\"|\'|\*/",$LF_orig))
|
||||||
|
{
|
||||||
|
echo _QXZ("ERROR: Invalid File Name").":: $LF_orig\n";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($file_update_str)
|
||||||
|
{
|
||||||
|
$upd_array=explode("|", $file_update_str);
|
||||||
|
if ($upd_array[4]) {$status_clause="file_status='$upd_array[4]', ";}
|
||||||
|
$upd_stmt="update vicidial_country_dnc_queue set $status_clause country_code='$upd_array[1]', file_action='$upd_array[2]', file_layout='$upd_array[3]' where dnc_file_id='$upd_array[0]'";
|
||||||
|
$upd_rslt=mysql_to_mysqli($upd_stmt, $link);
|
||||||
|
|
||||||
|
### LOG INSERTION Admin Log Table ###
|
||||||
|
$log_stmt="INSERT INTO vicidial_admin_log set event_date=now(), user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='$upd_array[4]', record_id='$upd_array[0]', event_code='ADMIN LOAD DNC LIST', event_sql='', event_notes='DNC file ID: $upd_array[0]| File status: $upd_array[4]| File action: $upd_array[2]| File layout: $upd_array[3]";
|
||||||
|
$log_rslt=mysql_to_mysqli($log_stmt, $link);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$SSmenu_background='015B91';
|
||||||
|
$SSframe_background='D9E6FE';
|
||||||
|
$SSstd_row1_background='9BB9FB';
|
||||||
|
$SSstd_row2_background='B9CBFD';
|
||||||
|
$SSstd_row3_background='8EBCFD';
|
||||||
|
$SSstd_row4_background='B6D3FC';
|
||||||
|
$SSstd_row5_background='A3C3D6';
|
||||||
|
$SSalt_row1_background='BDFFBD';
|
||||||
|
$SSalt_row2_background='99FF99';
|
||||||
|
$SSalt_row3_background='CCFFCC';
|
||||||
|
|
||||||
|
if ($SSadmin_screen_colors != 'default')
|
||||||
|
{
|
||||||
|
$stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background FROM vicidial_screen_colors where colors_id='$SSadmin_screen_colors';";
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
if ($DB) {echo "$stmt\n";}
|
||||||
|
$colors_ct = mysqli_num_rows($rslt);
|
||||||
|
if ($colors_ct > 0)
|
||||||
|
{
|
||||||
|
$row=mysqli_fetch_row($rslt);
|
||||||
|
$SSmenu_background = $row[0];
|
||||||
|
$SSframe_background = $row[1];
|
||||||
|
$SSstd_row1_background = $row[2];
|
||||||
|
$SSstd_row2_background = $row[3];
|
||||||
|
$SSstd_row3_background = $row[4];
|
||||||
|
$SSstd_row4_background = $row[5];
|
||||||
|
$SSstd_row5_background = $row[6];
|
||||||
|
$SSalt_row1_background = $row[7];
|
||||||
|
$SSalt_row2_background = $row[8];
|
||||||
|
$SSalt_row3_background = $row[9];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$Mhead_color = $SSstd_row5_background;
|
||||||
|
$Mmain_bgcolor = $SSmenu_background;
|
||||||
|
$Mhead_color = $SSstd_row5_background;
|
||||||
|
|
||||||
|
#if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";}
|
||||||
|
|
||||||
|
header ("Content-type: text/html; charset=utf-8");
|
||||||
|
|
||||||
|
echo "<html>\n";
|
||||||
|
echo "<head>\n";
|
||||||
|
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"vicidial_stylesheet.php\">\n";
|
||||||
|
echo "<script language=\"JavaScript\" src=\"help.js\"></script>\n";
|
||||||
|
echo "<div id='HelpDisplayDiv' class='help_info' style='display:none;'></div>";
|
||||||
|
echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
|
||||||
|
echo "<!-- VERSION: $version BUILD: $build -->\n";
|
||||||
|
echo "<!-- SEED TIME $secX: $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF DST: $isdst -->\n";
|
||||||
|
|
||||||
|
$layout_stmt="select container_entry from vicidial_settings_containers where container_id='DNC_IMPORT_FORMATS'";
|
||||||
|
$layout_rslt=mysql_to_mysqli($layout_stmt, $link);
|
||||||
|
|
||||||
|
$layouts=array();
|
||||||
|
|
||||||
|
while($layout_row=mysqli_fetch_row($layout_rslt))
|
||||||
|
{
|
||||||
|
$container_entry=$layout_row[0];
|
||||||
|
$layout_rows=explode("\n", $container_entry);
|
||||||
|
for ($i=0; $i<count($layout_rows); $i++)
|
||||||
|
{
|
||||||
|
if (!preg_match('/^\#/', $layout_rows[$i]) && preg_match('/\=\>/', $layout_rows[$i]))
|
||||||
|
{
|
||||||
|
$current_layout=explode("=>", $layout_rows[$i]);
|
||||||
|
if (strlen(trim($current_layout[0]))>0 && strlen(trim($current_layout[1]))>0)
|
||||||
|
{
|
||||||
|
$layout_id=trim($current_layout[0]);
|
||||||
|
$layouts["$layout_id"]=trim($current_layout[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ksort($layouts);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script language="JavaScript">
|
||||||
|
function ModifyQueue(file_id, form_action)
|
||||||
|
{
|
||||||
|
if (!file_id) {return false;}
|
||||||
|
var country_code_field="country_code_"+file_id;
|
||||||
|
var file_action_field="file_action_"+file_id;
|
||||||
|
var file_layout_field="file_layout_"+file_id;
|
||||||
|
|
||||||
|
if (form_action=="PENDING" && (document.getElementById(country_code_field).value=="" || document.getElementById(file_action_field).value=="" || document.getElementById(file_layout_field).value=="")) {alert("File cannot be processed without assigning a country code, action, and layout"); return false;}
|
||||||
|
|
||||||
|
var update_string=file_id+"|";
|
||||||
|
update_string+=document.getElementById(country_code_field).value+"|";
|
||||||
|
update_string+=document.getElementById(file_action_field).value+"|";
|
||||||
|
update_string+=document.getElementById(file_layout_field).value+"|";
|
||||||
|
if (form_action) {update_string+=form_action;}
|
||||||
|
|
||||||
|
document.getElementById("file_update_str").value=update_string;
|
||||||
|
document.forms["queue_form"].submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function DisplayFormat(format_value, file_id)
|
||||||
|
{
|
||||||
|
<?php
|
||||||
|
$JSFormats="\tvar JSFormats={";
|
||||||
|
foreach($layouts as $key => $value)
|
||||||
|
{
|
||||||
|
$JSFormats.="$key: \"$value\", ";
|
||||||
|
}
|
||||||
|
$JSFormats2=preg_replace('/, $/', '', $JSFormats);
|
||||||
|
$JSFormats2.="};\n";
|
||||||
|
echo $JSFormats2;
|
||||||
|
|
||||||
|
reset($layouts);
|
||||||
|
?>
|
||||||
|
|
||||||
|
var format_array=JSFormats[format_value].split(/,/);
|
||||||
|
var format_text="";
|
||||||
|
if (format_array[0]=="")
|
||||||
|
{
|
||||||
|
format_text+="<BR>No delimiter/fixed length, file is assumed pre-formatted";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
format_text+="<BR>File format: "+format_array[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (format_array[1]!="") {format_text+="<BR>File delimiter: "+format_array[1];}
|
||||||
|
|
||||||
|
format_text+="<BR>Phone location: ";
|
||||||
|
for (j=2; j<format_array.length; j++)
|
||||||
|
{
|
||||||
|
if (format_array[j].match(/\|/))
|
||||||
|
{
|
||||||
|
var format_subarray=format_array[j].split(/\|/);
|
||||||
|
format_text+="pos. "+format_subarray[0]+" length "+format_subarray[1]+",";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
format_text+=format_array[j]+",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var format_text_field="file_layout_text_"+file_id;
|
||||||
|
document.getElementById(format_text_field).innerHTML="<font face='arial, helvetica' size=1>"+format_text+"</font>";
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<title><?php echo _QXZ("ADMINISTRATION: Lead Loader"); ?></title>
|
||||||
|
</head>
|
||||||
|
<BODY BGCOLOR=WHITE marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
echo "<script language=\"JavaScript\" src=\"help.js\"></script>\n";
|
||||||
|
echo "<div id='HelpDisplayDiv' class='help_info' style='display:none;'></div>";
|
||||||
|
|
||||||
|
$short_header=1;
|
||||||
|
|
||||||
|
require("admin_header.php");
|
||||||
|
|
||||||
|
# print_r($layouts);
|
||||||
|
|
||||||
|
$stmt="select * from vicidial_country_dnc_queue order by date_uploaded asc";
|
||||||
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
echo "<BR><B><font face=\"arial, helvetica\" size=2>"._QXZ("International DNC Loader")."$NWB#international_dnc_loader$NWE</font></B><BR>";
|
||||||
|
echo "<form action='$PHP_SELF' method='POST' name='queue_form'><table border=0 cellpadding=5 cellspacing=0>";
|
||||||
|
echo "<tr bgcolor='#000' valign='top'>";
|
||||||
|
echo "<td nowrap><font face=\"arial, helvetica\" size=1 color=white>"._QXZ("File name")."</font></td>";
|
||||||
|
echo "<td nowrap><font face=\"arial, helvetica\" size=1 color=white>"._QXZ("Date loaded")."</font></td>";
|
||||||
|
echo "<td nowrap><font face=\"arial, helvetica\" size=1 color=white>"._QXZ("Status")."</font></td>";
|
||||||
|
echo "<td nowrap><font face=\"arial, helvetica\" size=1 color=white>"._QXZ("Country")."$NWB#international_dnc_loader-country_code$NWE</font></td>";
|
||||||
|
echo "<td nowrap><font face=\"arial, helvetica\" size=1 color=white>"._QXZ("Action (purge/append)")."$NWB#international_dnc_loader-file_action$NWE</font></td>";
|
||||||
|
echo "<td nowrap><font face=\"arial, helvetica\" size=1 color=white>"._QXZ("Layout")."$NWB#international_dnc_loader-file_layout$NWE</font></td>";
|
||||||
|
echo "<td nowrap><font face=\"arial, helvetica\" size=1 color=white>"._QXZ("Total records")."</font></td>";
|
||||||
|
echo "<td nowrap><font face=\"arial, helvetica\" size=1 color=white>"._QXZ("Records processed")."</font></td>";
|
||||||
|
echo "<td nowrap><font face=\"arial, helvetica\" size=1 color=white>"._QXZ("Records inserted")."</font></td>";
|
||||||
|
echo "<td nowrap><font face=\"arial, helvetica\" size=1 color=white>"._QXZ("Start/Cancel")."$NWB#international_dnc_loader-start_cancel$NWE</font></td>";
|
||||||
|
echo "</tr>";
|
||||||
|
if (mysqli_num_rows($rslt)==0)
|
||||||
|
{
|
||||||
|
echo "<tr><th colspan='10'><font face=\"arial, helvetica\" size=2>** "._QXZ("NO FILES LOADED")." **</font></th></tr>";
|
||||||
|
}
|
||||||
|
while ($row=mysqli_fetch_array($rslt))
|
||||||
|
{
|
||||||
|
$id=$row["dnc_file_id"];
|
||||||
|
$bgcolor="#CCCCCC";
|
||||||
|
switch ($row["file_status"])
|
||||||
|
{
|
||||||
|
case "READY":
|
||||||
|
$bgcolor="#CCFFFF";
|
||||||
|
break;
|
||||||
|
case "PENDING":
|
||||||
|
case "PROCESSING":
|
||||||
|
$bgcolor="#FFFFCC";
|
||||||
|
break;
|
||||||
|
case "CANCELLED":
|
||||||
|
case "INVALID LAYOUT":
|
||||||
|
$bgcolor="#FFCCCC";
|
||||||
|
break;
|
||||||
|
case "FINISHED":
|
||||||
|
$bgcolor="#CCFFCC";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
echo "<tr bgcolor='".$bgcolor."'>\n";
|
||||||
|
echo "<td nowrap><font face=\"arial, helvetica\" size=1>$row[filename]</font></td>";
|
||||||
|
echo "<td nowrap><font face=\"arial, helvetica\" size=1>$row[date_uploaded]</font></td>";
|
||||||
|
echo "<td><font face=\"arial, helvetica\" size=1>$row[file_status]</font></td>";
|
||||||
|
|
||||||
|
echo "<td><select class='form_field' name='country_code_".$id."' id='country_code_".$id."'>";
|
||||||
|
if ($row["file_status"]!="FINISHED" && $row["file_status"]!="PROCESSING") {echo "<option value=''></option>\n";}
|
||||||
|
$country_stmt="select iso3, country_name from vicidial_country_iso_tld where iso3 is not null and iso3!='' order by country_name asc";
|
||||||
|
$country_rslt=mysql_to_mysqli($country_stmt, $link);
|
||||||
|
while($country_row=mysqli_fetch_row($country_rslt))
|
||||||
|
{
|
||||||
|
$iso=$country_row[0];
|
||||||
|
$country_name=$country_row[1];
|
||||||
|
if ($iso==$row["country_code"]) {$s=" selected";} else {$s="";}
|
||||||
|
if (($row["file_status"]!="FINISHED" && $row["file_status"]!="PROCESSING") || $s)
|
||||||
|
{
|
||||||
|
echo "\t\t\t\t<option value='$iso'$s>$iso - $country_name</option>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "</select></font></td>";
|
||||||
|
|
||||||
|
echo "<td><select class='form_field' name='file_action_".$id."' id='file_action_".$id."'>";
|
||||||
|
echo "<option value='$row[file_action]'>"._QXZ("$row[file_action]")."</option>\n";
|
||||||
|
if ($row["file_status"]!="FINISHED" && $row["file_status"]!="PROCESSING")
|
||||||
|
{
|
||||||
|
echo "<option value='PURGE'>"._QXZ("PURGE")."</option>\n";
|
||||||
|
echo "<option value='APPEND'>"._QXZ("APPEND")."</option>\n";
|
||||||
|
}
|
||||||
|
echo "</select></td>";
|
||||||
|
echo "<td><select class='form_field' name='file_layout_".$id."' id='file_layout_".$id."' onChange='DisplayFormat(this.value, $id)'>";
|
||||||
|
echo "<option value='$row[file_layout]'>"._QXZ("$row[file_layout]")."</option>\n";
|
||||||
|
if ($row["file_status"]!="FINISHED" && $row["file_status"]!="PROCESSING")
|
||||||
|
{
|
||||||
|
foreach($layouts as $key => $value)
|
||||||
|
{
|
||||||
|
echo "<option value='$key'>$key</option>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "</select><span id='file_layout_text_".$id."'></span></font></td>";
|
||||||
|
echo "<td><font face=\"arial, helvetica\" size=1>$row[total_records]</font></td>";
|
||||||
|
echo "<td><font face=\"arial, helvetica\" size=1>$row[records_processed]</font></td>";
|
||||||
|
echo "<td><font face=\"arial, helvetica\" size=1>$row[records_inserted]</font></td>";
|
||||||
|
echo "<td nowrap>";
|
||||||
|
if ($row["file_status"]!="FINISHED" && $row["file_status"]!="PROCESSING") {echo "<input type='button' class='green_btn' style='width:90px' value='START FILE' onClick=\"ModifyQueue($id, 'PENDING')\"> <input type='button' class='red_btn' style='width:80px' value='CANCEL' onClick=\"ModifyQueue($id, 'CANCELLED')\">";} else {echo " ";}
|
||||||
|
# <BR><input type='button' class='blue_btn' style='width:60px' value='SAVE' onClick=\"ModifyQueue($id)\">
|
||||||
|
echo "</td>";
|
||||||
|
echo "</tr>";
|
||||||
|
}
|
||||||
|
echo "<tr bgcolor='#000'><th colspan='10'><input type='button' onClick=\"window.location.href='$PHP_SELF'\" value='"._QXZ("REFRESH PAGE")."'></th></tr>";
|
||||||
|
echo "</table>";
|
||||||
|
echo "<input type=hidden name='file_update_str' id='file_update_str'>";
|
||||||
|
echo "</form>";
|
||||||
|
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
+181
-163
File diff suppressed because one or more lines are too long
@@ -271,6 +271,7 @@ $SSstd_row5_background='FFFFFF';
|
|||||||
$SSalt_row1_background='BDFFBD';
|
$SSalt_row1_background='BDFFBD';
|
||||||
$SSalt_row2_background='99FF99';
|
$SSalt_row2_background='99FF99';
|
||||||
$SSalt_row3_background='CCFFCC';
|
$SSalt_row3_background='CCFFCC';
|
||||||
|
$SSbutton_color='DEDEDE';
|
||||||
|
|
||||||
$screen_color_stmt="select admin_screen_colors from system_settings";
|
$screen_color_stmt="select admin_screen_colors from system_settings";
|
||||||
$screen_color_rslt=mysql_to_mysqli($screen_color_stmt, $link);
|
$screen_color_rslt=mysql_to_mysqli($screen_color_stmt, $link);
|
||||||
@@ -279,7 +280,7 @@ $agent_screen_colors="$screen_color_row[0]";
|
|||||||
|
|
||||||
if ($agent_screen_colors != 'default')
|
if ($agent_screen_colors != 'default')
|
||||||
{
|
{
|
||||||
$asc_stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo FROM vicidial_screen_colors where colors_id='$agent_screen_colors';";
|
$asc_stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo,button_color FROM vicidial_screen_colors where colors_id='$agent_screen_colors';";
|
||||||
$asc_rslt=mysql_to_mysqli($asc_stmt, $link);
|
$asc_rslt=mysql_to_mysqli($asc_stmt, $link);
|
||||||
$qm_conf_ct = mysqli_num_rows($asc_rslt);
|
$qm_conf_ct = mysqli_num_rows($asc_rslt);
|
||||||
if ($qm_conf_ct > 0)
|
if ($qm_conf_ct > 0)
|
||||||
@@ -295,7 +296,8 @@ if ($agent_screen_colors != 'default')
|
|||||||
$SSalt_row1_background = $asc_row[7];
|
$SSalt_row1_background = $asc_row[7];
|
||||||
$SSalt_row2_background = $asc_row[8];
|
$SSalt_row2_background = $asc_row[8];
|
||||||
$SSalt_row3_background = $asc_row[9];
|
$SSalt_row3_background = $asc_row[9];
|
||||||
$SSweb_logo = $asc_row[10];
|
$SSweb_logo = $asc_row[10];
|
||||||
|
$SSbutton_color = $asc_row[11];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -575,7 +577,7 @@ else
|
|||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
echo "<tr><td align='right'><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>"._QXZ("Invalid").":</font></td><td align='left'><input type='text' name='invalid_list_id' size='5' maxlength='10'></td></tr>";
|
echo "<tr><td align='right'><FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>"._QXZ("Invalid").":</font></td><td align='left'><input type='text' name='invalid_list_id' size='5' maxlength='10'></td></tr>";
|
||||||
echo "";
|
echo "";
|
||||||
echo "<tr><td align='center' colspan='5'><input type='submit' value='"._QXZ("SUBMIT")."' name='submit_form'></td></tr>";
|
echo "<tr><td align='center' colspan='5'><input style='background-color:#$SSbutton_color' type='submit' value='"._QXZ("SUBMIT")."' name='submit_form'></td></tr>";
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
|
|
||||||
echo "</td></tr>";
|
echo "</td></tr>";
|
||||||
|
|||||||
@@ -229,6 +229,7 @@ if ($names_to_print > 0)
|
|||||||
$camp_name = $row[0];
|
$camp_name = $row[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
require("screen_colors.php");
|
||||||
?>
|
?>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -425,7 +426,7 @@ if ($action == "BLANK")
|
|||||||
echo "<td><font size=1><input type=text size=4 maxlength=3 name=amm_rank value=\"$Ramm_rank\"></td>";
|
echo "<td><font size=1><input type=text size=4 maxlength=3 name=amm_rank value=\"$Ramm_rank\"></td>";
|
||||||
echo "<td><font size=1><input type=text size=20 maxlength=1000 name=amm_wildcard value=\"$Ramm_wildcard\"></td>";
|
echo "<td><font size=1><input type=text size=20 maxlength=1000 name=amm_wildcard value=\"$Ramm_wildcard\"></td>";
|
||||||
echo "<td><font size=1><input type=text size=30 maxlength=255 name=amm_description value=\"$Ramm_description\"></td>";
|
echo "<td><font size=1><input type=text size=30 maxlength=255 name=amm_description value=\"$Ramm_description\"></td>";
|
||||||
echo "<td rowspan=2><font size=1><input type=submit name=SUBMIT value='"._QXZ("SUBMIT")."'>";
|
echo "<td rowspan=2><font size=1><input style='background-color:#$SSbutton_color' type=submit name=SUBMIT value='"._QXZ("SUBMIT")."'>";
|
||||||
echo "<BR><BR>";
|
echo "<BR><BR>";
|
||||||
if ($Ractive == 'N')
|
if ($Ractive == 'N')
|
||||||
{echo "<a href=\"$PHP_SELF?DB=$DB&campaign_id=$campaign_id&entry_type=$entry_type&amm_field=$amm_field&amm_id=$Ramm_id&action=AMM_MULTI_DELETE\">"._QXZ("DELETE")."</a>";}
|
{echo "<a href=\"$PHP_SELF?DB=$DB&campaign_id=$campaign_id&entry_type=$entry_type&amm_field=$amm_field&amm_id=$Ramm_id&action=AMM_MULTI_DELETE\">"._QXZ("DELETE")."</a>";}
|
||||||
@@ -456,7 +457,7 @@ if ($action == "BLANK")
|
|||||||
echo "<td><font size=1>"._QXZ("RANK").": <input type=text size=4 maxlength=3 name=amm_rank value=\"\"></td>";
|
echo "<td><font size=1>"._QXZ("RANK").": <input type=text size=4 maxlength=3 name=amm_rank value=\"\"></td>";
|
||||||
echo "<td><font size=1>"._QXZ("WILDCARD").": <input type=text size=20 maxlength=1000 name=amm_wildcard value=\"\"></td>";
|
echo "<td><font size=1>"._QXZ("WILDCARD").": <input type=text size=20 maxlength=1000 name=amm_wildcard value=\"\"></td>";
|
||||||
echo "<td><font size=1>"._QXZ("DESCRIPTION").": <input type=text size=30 maxlength=255 name=amm_description value=\"\"></td>";
|
echo "<td><font size=1>"._QXZ("DESCRIPTION").": <input type=text size=30 maxlength=255 name=amm_description value=\"\"></td>";
|
||||||
echo "<td rowspan=2><font size=1><input type=submit name=SUBMIT value='"._QXZ("SUBMIT")."'></td>";
|
echo "<td rowspan=2><font size=1><input style='background-color:#$SSbutton_color' type=submit name=SUBMIT value='"._QXZ("SUBMIT")."'></td>";
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
echo "<tr $bgcolor>";
|
echo "<tr $bgcolor>";
|
||||||
echo "<td><font size=1>"._QXZ("FIELD").": <select name=amm_field><option>vendor_lead_code</option><option>source_id</option><option>list_id</option><option>phone_number</option><option>title</option><option>first_name</option><option>middle_initial</option><option>last_name</option><option>address1</option><option>address2</option><option>address3</option><option>city</option><option>state</option><option>province</option><option>postal_code</option><option>country_code</option><option>gender</option><option>date_of_birth</option><option>alt_phone</option><option>email</option><option>security_phrase</option><option>comments</option><option>rank</option><option>owner</option><option>called_count</option></select></td>";
|
echo "<td><font size=1>"._QXZ("FIELD").": <select name=amm_field><option>vendor_lead_code</option><option>source_id</option><option>list_id</option><option>phone_number</option><option>title</option><option>first_name</option><option>middle_initial</option><option>last_name</option><option>address1</option><option>address2</option><option>address3</option><option>city</option><option>state</option><option>province</option><option>postal_code</option><option>country_code</option><option>gender</option><option>date_of_birth</option><option>alt_phone</option><option>email</option><option>security_phrase</option><option>comments</option><option>rank</option><option>owner</option><option>called_count</option></select></td>";
|
||||||
|
|||||||
@@ -531,7 +531,7 @@ if ($form_to_run == "ACCID")
|
|||||||
echo "<input type=hidden name=ACCIDactiveinput value='$ACCIDactiveinput_raw'>";
|
echo "<input type=hidden name=ACCIDactiveinput value='$ACCIDactiveinput_raw'>";
|
||||||
echo "<input type=hidden name=ACCIDactive value='$ACCIDactive'>";
|
echo "<input type=hidden name=ACCIDactive value='$ACCIDactive'>";
|
||||||
echo "<input type=hidden name=ACCIDmethod value='$ACCIDmethod'>";
|
echo "<input type=hidden name=ACCIDmethod value='$ACCIDmethod'>";
|
||||||
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input type=submit name=did_submit value='CONFIRM'></td></tr>\n";
|
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input style='background-color:#$SSbutton_color' type=submit name=did_submit value='CONFIRM'></td></tr>\n";
|
||||||
echo "</table></center></form>\n";
|
echo "</table></center></form>\n";
|
||||||
echo "</html>";
|
echo "</html>";
|
||||||
}
|
}
|
||||||
@@ -735,7 +735,7 @@ elseif ($form_to_run == "ACCIDDELETEselect")
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
echo "</select></td></tr>\n";
|
echo "</select></td></tr>\n";
|
||||||
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input type=submit name=did_submit value='"._QXZ("Submit")."'></td></tr>\n";
|
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input style='background-color:#$SSbutton_color' type=submit name=did_submit value='"._QXZ("Submit")."'></td></tr>\n";
|
||||||
|
|
||||||
echo "</table></center></form>\n";
|
echo "</table></center></form>\n";
|
||||||
echo "</html>";
|
echo "</html>";
|
||||||
@@ -760,7 +760,7 @@ elseif ($form_to_run == "ACCIDDELETEconfirm")
|
|||||||
echo "<input type=hidden name=DB value='$DB'>";
|
echo "<input type=hidden name=DB value='$DB'>";
|
||||||
echo "<input type=hidden name=ACCIDdelete_campaign value='$ACCIDdelete_campaign'>";
|
echo "<input type=hidden name=ACCIDdelete_campaign value='$ACCIDdelete_campaign'>";
|
||||||
echo "<input type=hidden name=ACCIDclear_all_CONFIRMED value='$ACCIDclear_all'>";
|
echo "<input type=hidden name=ACCIDclear_all_CONFIRMED value='$ACCIDclear_all'>";
|
||||||
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input type=submit name=did_submit value='CONFIRM'></td></tr>\n";
|
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input style='background-color:#$SSbutton_color' type=submit name=did_submit value='CONFIRM'></td></tr>\n";
|
||||||
echo "</table></center></form>\n";
|
echo "</table></center></form>\n";
|
||||||
echo "</html>";
|
echo "</html>";
|
||||||
}
|
}
|
||||||
@@ -792,7 +792,7 @@ elseif ($form_to_run == "ACCIDDELETEconfirm")
|
|||||||
echo "<input type=hidden name=DB value='$DB'>";
|
echo "<input type=hidden name=DB value='$DB'>";
|
||||||
echo "<input type=hidden name=ACCIDdelete_from_CONFIRMED value='$ACCIDdelete_from'>";
|
echo "<input type=hidden name=ACCIDdelete_from_CONFIRMED value='$ACCIDdelete_from'>";
|
||||||
echo "<input type=hidden name=ACCIDdelete_campaign value='$ACCIDdelete_campaign'>";
|
echo "<input type=hidden name=ACCIDdelete_campaign value='$ACCIDdelete_campaign'>";
|
||||||
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input type=submit name=did_submit value='CONFIRM'></td></tr>\n";
|
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input style='background-color:#$SSbutton_color' type=submit name=did_submit value='CONFIRM'></td></tr>\n";
|
||||||
echo "</table></center></form>\n";
|
echo "</table></center></form>\n";
|
||||||
echo "</html>";
|
echo "</html>";
|
||||||
}
|
}
|
||||||
@@ -980,7 +980,7 @@ elseif ($form_to_run == "BULKDIDS")
|
|||||||
echo "<input type=hidden name=DB value='$DB'>";
|
echo "<input type=hidden name=DB value='$DB'>";
|
||||||
echo "<input type=hidden name=DIDto_insert_CONFIRMED value='$DIDto_insert'>";
|
echo "<input type=hidden name=DIDto_insert_CONFIRMED value='$DIDto_insert'>";
|
||||||
echo "<input type=hidden name=DIDcopy_from value='$DIDcopy_from'>";
|
echo "<input type=hidden name=DIDcopy_from value='$DIDcopy_from'>";
|
||||||
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input type=submit name=did_submit value='CONFIRM'></td></tr>\n";
|
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input style='background-color:#$SSbutton_color' type=submit name=did_submit value='CONFIRM'></td></tr>\n";
|
||||||
echo "</table></center></form>\n";
|
echo "</table></center></form>\n";
|
||||||
echo "</html>";
|
echo "</html>";
|
||||||
}
|
}
|
||||||
@@ -1172,7 +1172,7 @@ elseif ($form_to_run == "BULKDIDSDELETE")
|
|||||||
echo "<input type=hidden name=form_to_run value='BULKDIDSDELETEconfirmed'>";
|
echo "<input type=hidden name=form_to_run value='BULKDIDSDELETEconfirmed'>";
|
||||||
echo "<input type=hidden name=DB value='$DB'>";
|
echo "<input type=hidden name=DB value='$DB'>";
|
||||||
echo "<input type=hidden name=DIDdelete_from_CONFIRMED value='$DIDdelete_from'>";
|
echo "<input type=hidden name=DIDdelete_from_CONFIRMED value='$DIDdelete_from'>";
|
||||||
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input type=submit name=did_submit value='CONFIRM'></td></tr>\n";
|
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input style='background-color:#$SSbutton_color' type=submit name=did_submit value='CONFIRM'></td></tr>\n";
|
||||||
echo "</table></center></form>\n";
|
echo "</table></center></form>\n";
|
||||||
echo "</html>";
|
echo "</html>";
|
||||||
}
|
}
|
||||||
@@ -1324,7 +1324,7 @@ elseif ($form_to_run == "BULKUSERS")
|
|||||||
echo "<input type=hidden name=USERto_insert value='$USERto_insert'>";
|
echo "<input type=hidden name=USERto_insert value='$USERto_insert'>";
|
||||||
echo "<input type=hidden name=USERcopy_from value='$USERcopy_from'>";
|
echo "<input type=hidden name=USERcopy_from value='$USERcopy_from'>";
|
||||||
echo "<input type=hidden name=USERforce_pw value='$USERforce_pw'>";
|
echo "<input type=hidden name=USERforce_pw value='$USERforce_pw'>";
|
||||||
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input type=submit name=did_submit value='CONFIRM'></td></tr>\n";
|
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input style='background-color:#$SSbutton_color' type=submit name=did_submit value='CONFIRM'></td></tr>\n";
|
||||||
echo "</table></center></form>\n";
|
echo "</table></center></form>\n";
|
||||||
echo "</html>";
|
echo "</html>";
|
||||||
}
|
}
|
||||||
@@ -1575,7 +1575,7 @@ elseif ($form_to_run == "BULKUSERSDELETE") ### BULK USER DELETE
|
|||||||
echo "<input type=hidden name=form_to_run value='BULKUSERSDELETEconfirmed'>";
|
echo "<input type=hidden name=form_to_run value='BULKUSERSDELETEconfirmed'>";
|
||||||
echo "<input type=hidden name=DB value='$DB'>";
|
echo "<input type=hidden name=DB value='$DB'>";
|
||||||
echo "<input type=hidden name=USERdelete_from_CONFIRMED value='$USERdelete_from'>";
|
echo "<input type=hidden name=USERdelete_from_CONFIRMED value='$USERdelete_from'>";
|
||||||
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input type=submit name=did_submit value='CONFIRM'></td></tr>\n";
|
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input style='background-color:#".$SSbutton_color."' type=submit name=did_submit value='CONFIRM'></td></tr>\n";
|
||||||
echo "</table></center></form>\n";
|
echo "</table></center></form>\n";
|
||||||
echo "</html>";
|
echo "</html>";
|
||||||
}
|
}
|
||||||
@@ -1661,7 +1661,7 @@ else
|
|||||||
|
|
||||||
echo "</select></td></tr>\n";
|
echo "</select></td></tr>\n";
|
||||||
echo "<tr bgcolor=#". $SSstd_row1_background ."><td align=right>"._QXZ("DIDs to insert").":</td><td align=left><textarea name='DIDto_insert' cols='11' rows='10'></textarea></td></td></tr>";
|
echo "<tr bgcolor=#". $SSstd_row1_background ."><td align=right>"._QXZ("DIDs to insert").":</td><td align=left><textarea name='DIDto_insert' cols='11' rows='10'></textarea></td></td></tr>";
|
||||||
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input type=submit name=did_submit value='"._QXZ("Submit")."'></td></tr>\n";
|
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input style='background-color:#$SSbutton_color' type=submit name=did_submit value='"._QXZ("Submit")."'></td></tr>\n";
|
||||||
echo "</table></center></form>\n";
|
echo "</table></center></form>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1705,7 +1705,7 @@ else
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
echo "</select></td></tr>\n";
|
echo "</select></td></tr>\n";
|
||||||
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input type=submit name=did_submit value='"._QXZ("Submit")."'></td></tr>\n";
|
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input style='background-color:#$SSbutton_color' type=submit name=did_submit value='"._QXZ("Submit")."'></td></tr>\n";
|
||||||
echo "</table></center></form>\n";
|
echo "</table></center></form>\n";
|
||||||
echo "</html>";
|
echo "</html>";
|
||||||
}
|
}
|
||||||
@@ -1781,7 +1781,7 @@ else
|
|||||||
echo "<option value='F'>"._QXZ("Input")."</option>\n";
|
echo "<option value='F'>"._QXZ("Input")."</option>\n";
|
||||||
echo "</select></td></tr>\n";
|
echo "</select></td></tr>\n";
|
||||||
echo "<tr bgcolor=#". $SSstd_row1_background ."><td align=right>"._QXZ("AC-CIDs").":</td><td align=left><textarea name='ACCIDdids' cols='70' rows='10'></textarea></td>\n";
|
echo "<tr bgcolor=#". $SSstd_row1_background ."><td align=right>"._QXZ("AC-CIDs").":</td><td align=left><textarea name='ACCIDdids' cols='70' rows='10'></textarea></td>\n";
|
||||||
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input type=submit name=accid_submit value='"._QXZ("Submit")."'></td></tr>\n";
|
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input style='background-color:#$SSbutton_color' type=submit name=accid_submit value='"._QXZ("Submit")."'></td></tr>\n";
|
||||||
echo "</table></center></form>\n";
|
echo "</table></center></form>\n";
|
||||||
echo "</html>";
|
echo "</html>";
|
||||||
}
|
}
|
||||||
@@ -1851,7 +1851,7 @@ else
|
|||||||
echo "<option value='N'>"._QXZ("No")."</option>\n";
|
echo "<option value='N'>"._QXZ("No")."</option>\n";
|
||||||
echo "<option value='Y'>"._QXZ("Yes")."</option>\n";
|
echo "<option value='Y'>"._QXZ("Yes")."</option>\n";
|
||||||
echo "</select></td></tr>\n";
|
echo "</select></td></tr>\n";
|
||||||
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input type=submit name=accid_submit value='"._QXZ("Submit")."'></td></tr>\n";
|
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input style='background-color:#$SSbutton_color' type=submit name=accid_submit value='"._QXZ("Submit")."'></td></tr>\n";
|
||||||
echo "</table></center></form>\n";
|
echo "</table></center></form>\n";
|
||||||
echo "</html>";
|
echo "</html>";
|
||||||
}
|
}
|
||||||
@@ -1905,7 +1905,7 @@ else
|
|||||||
echo "<option value='N'>"._QXZ("No")."</option>\n";
|
echo "<option value='N'>"._QXZ("No")."</option>\n";
|
||||||
echo "<option value='Y'>"._QXZ("Yes")."</option>\n";
|
echo "<option value='Y'>"._QXZ("Yes")."</option>\n";
|
||||||
echo "</select></td></tr>\n";
|
echo "</select></td></tr>\n";
|
||||||
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input type=submit name=did_submit value='"._QXZ("Submit")."'></td></tr>\n";
|
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input style='background-color:#$SSbutton_color' type=submit name=did_submit value='"._QXZ("Submit")."'></td></tr>\n";
|
||||||
echo "</table></center></form>\n";
|
echo "</table></center></form>\n";
|
||||||
echo "</html>";
|
echo "</html>";
|
||||||
}
|
}
|
||||||
@@ -1977,7 +1977,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo "</select></td></tr>\n";
|
echo "</select></td></tr>\n";
|
||||||
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input type=submit name=did_submit value='"._QXZ("Submit")."'></td></tr>\n";
|
echo "<tr bgcolor=#". $SSstd_row1_background ."><td colspan=2 align=center><input style='background-color:#$SSbutton_color' type=submit name=did_submit value='"._QXZ("Submit")."'></td></tr>\n";
|
||||||
echo "</table></center></form>\n";
|
echo "</table></center></form>\n";
|
||||||
|
|
||||||
echo "<br> <font size=1><p align=left>"._QXZ("Version").": $version "._QXZ("Build").": $build</p></font>";
|
echo "<br> <font size=1><p align=left>"._QXZ("Version").": $version "._QXZ("Build").": $build</p></font>";
|
||||||
|
|||||||
@@ -116,10 +116,11 @@ $SSstd_row5_background='A3C3D6';
|
|||||||
$SSalt_row1_background='BDFFBD';
|
$SSalt_row1_background='BDFFBD';
|
||||||
$SSalt_row2_background='99FF99';
|
$SSalt_row2_background='99FF99';
|
||||||
$SSalt_row3_background='CCFFCC';
|
$SSalt_row3_background='CCFFCC';
|
||||||
|
$SSbutton_color='EFEFEF';
|
||||||
|
|
||||||
if ($SSadmin_screen_colors != 'default')
|
if ($SSadmin_screen_colors != 'default')
|
||||||
{
|
{
|
||||||
$stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo FROM vicidial_screen_colors where colors_id='$SSadmin_screen_colors';";
|
$stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo,button_color FROM vicidial_screen_colors where colors_id='$SSadmin_screen_colors';";
|
||||||
$rslt=mysql_to_mysqli($stmt, $link);
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
$colors_ct = mysqli_num_rows($rslt);
|
$colors_ct = mysqli_num_rows($rslt);
|
||||||
@@ -136,7 +137,8 @@ if ($SSadmin_screen_colors != 'default')
|
|||||||
$SSalt_row1_background = $row[7];
|
$SSalt_row1_background = $row[7];
|
||||||
$SSalt_row2_background = $row[8];
|
$SSalt_row2_background = $row[8];
|
||||||
$SSalt_row3_background = $row[9];
|
$SSalt_row3_background = $row[9];
|
||||||
$SSweb_logo = $row[10];
|
$SSweb_logo = $row[10];
|
||||||
|
$SSbutton_color = $row[11];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$Mhead_color = $SSstd_row5_background;
|
$Mhead_color = $SSstd_row5_background;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# admin_listloader_fourth_gen.php - version 2.14
|
# admin_listloader_fourth_gen.php - version 2.14
|
||||||
# (based upon - new_listloader_superL.php script)
|
# (based upon - new_listloader_superL.php script)
|
||||||
#
|
#
|
||||||
# Copyright (C) 2019 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: AGPLv2
|
# Copyright (C) 2020 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: AGPLv2
|
||||||
#
|
#
|
||||||
# ViciDial web-based lead loader from formatted file
|
# ViciDial web-based lead loader from formatted file
|
||||||
#
|
#
|
||||||
@@ -76,10 +76,11 @@
|
|||||||
# 180502-2215 - Added new help display
|
# 180502-2215 - Added new help display
|
||||||
# 180927-0702 - Fixed translation-related issue #1114
|
# 180927-0702 - Fixed translation-related issue #1114
|
||||||
# 190503-1547 - Added enable_status_mismatch_leadloader_option
|
# 190503-1547 - Added enable_status_mismatch_leadloader_option
|
||||||
|
# 200812-1745 - Added international DNC scrub option
|
||||||
#
|
#
|
||||||
|
|
||||||
$version = '2.14-74';
|
$version = '2.14-75';
|
||||||
$build = '190503-1547';
|
$build = '200812-1745';
|
||||||
|
|
||||||
require("dbconnect_mysqli.php");
|
require("dbconnect_mysqli.php");
|
||||||
require("functions.php");
|
require("functions.php");
|
||||||
@@ -193,6 +194,8 @@ if (isset($_GET["state_conversion"])) {$state_conversion=$_GET["state_conversi
|
|||||||
elseif (isset($_POST["state_conversion"])) {$state_conversion=$_POST["state_conversion"];}
|
elseif (isset($_POST["state_conversion"])) {$state_conversion=$_POST["state_conversion"];}
|
||||||
if (isset($_GET["web_loader_phone_length"])) {$web_loader_phone_length=$_GET["web_loader_phone_length"];}
|
if (isset($_GET["web_loader_phone_length"])) {$web_loader_phone_length=$_GET["web_loader_phone_length"];}
|
||||||
elseif (isset($_POST["web_loader_phone_length"])) {$web_loader_phone_length=$_POST["web_loader_phone_length"];}
|
elseif (isset($_POST["web_loader_phone_length"])) {$web_loader_phone_length=$_POST["web_loader_phone_length"];}
|
||||||
|
if (isset($_GET["international_dnc_scrub"])) {$international_dnc_scrub=$_GET["international_dnc_scrub"];}
|
||||||
|
elseif (isset($_POST["international_dnc_scrub"])) {$international_dnc_scrub=$_POST["international_dnc_scrub"];}
|
||||||
|
|
||||||
|
|
||||||
if (strlen($dedupe_statuses_override)>0) {
|
if (strlen($dedupe_statuses_override)>0) {
|
||||||
@@ -211,7 +214,7 @@ $vicidial_list_fields = '|lead_id|vendor_lead_code|source_id|list_id|gmt_offset_
|
|||||||
|
|
||||||
#############################################
|
#############################################
|
||||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||||
$stmt = "SELECT use_non_latin,admin_web_directory,custom_fields_enabled,webroot_writable,enable_languages,language_method,active_modules,admin_screen_colors,web_loader_phone_length FROM system_settings;";
|
$stmt = "SELECT use_non_latin,admin_web_directory,custom_fields_enabled,webroot_writable,enable_languages,language_method,active_modules,admin_screen_colors,web_loader_phone_length,enable_international_dncs FROM system_settings;";
|
||||||
$rslt=mysql_to_mysqli($stmt, $link);
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
$qm_conf_ct = mysqli_num_rows($rslt);
|
$qm_conf_ct = mysqli_num_rows($rslt);
|
||||||
@@ -227,6 +230,7 @@ if ($qm_conf_ct > 0)
|
|||||||
$SSactive_modules = $row[6];
|
$SSactive_modules = $row[6];
|
||||||
$SSadmin_screen_colors = $row[7];
|
$SSadmin_screen_colors = $row[7];
|
||||||
$SSweb_loader_phone_length = $row[8];
|
$SSweb_loader_phone_length = $row[8];
|
||||||
|
$SSenable_international_dncs = $row[9];
|
||||||
}
|
}
|
||||||
##### END SETTINGS LOOKUP #####
|
##### END SETTINGS LOOKUP #####
|
||||||
###########################################
|
###########################################
|
||||||
@@ -725,6 +729,40 @@ if ( (!$OK_to_process) or ( ($leadfile) and ($file_layout!="standard" && $file_l
|
|||||||
<option value="DUPTITLEALTPHONESYS"><?php echo _QXZ("CHECK FOR DUPLICATES BY TITLE/ALT-PHONE IN ENTIRE SYSTEM"); ?></option>
|
<option value="DUPTITLEALTPHONESYS"><?php echo _QXZ("CHECK FOR DUPLICATES BY TITLE/ALT-PHONE IN ENTIRE SYSTEM"); ?></option>
|
||||||
</select> <?php echo "$NWB#list_loader-duplicate_check$NWE"; ?></td>
|
</select> <?php echo "$NWB#list_loader-duplicate_check$NWE"; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php
|
||||||
|
if ($SSenable_international_dncs)
|
||||||
|
{
|
||||||
|
$dnc_stmt="select iso3, country_name from vicidial_country_iso_tld where iso3 is not null and iso3!='' order by country_name asc";
|
||||||
|
$dnc_rslt=mysql_to_mysqli($dnc_stmt, $link);
|
||||||
|
$available_countries=0;
|
||||||
|
while($dnc_row=mysqli_fetch_row($dnc_rslt))
|
||||||
|
{
|
||||||
|
$iso=$dnc_row[0];
|
||||||
|
$country_name=$dnc_row[1];
|
||||||
|
$dnc_table_stmt="show tables like 'vicidial_dnc_".$iso."'";
|
||||||
|
$dnc_table_rslt=mysql_to_mysqli($dnc_table_stmt, $link);
|
||||||
|
if (mysqli_num_rows($dnc_table_rslt)>0)
|
||||||
|
{
|
||||||
|
$available_countries++;
|
||||||
|
$drop_down_dnc_options.="\t\t\t\t<option value='$iso'>$iso - $country_name</option>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "\t\t<tr>\n";
|
||||||
|
echo "\t\t\t<td align=right width='20%'><font face='arial, helvetica' size=2>"._QXZ("DNC Scrub by Country").": </font></td>\n";
|
||||||
|
echo "\t\t\t<td align=left width='80%' nowrap><font face='arial, helvetica' size=1><select size='1' name='international_dnc_scrub'>\n";
|
||||||
|
if ($available_countries>0)
|
||||||
|
{
|
||||||
|
echo "\t\t\t\t<option>-- SELECT COUNTRY DNC LIST--</option>\n";
|
||||||
|
echo $drop_down_dnc_options;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo "\t\t\t\t<option>-- NO COUNTRY DNC TABLES EXIST --</option>\n";
|
||||||
|
}
|
||||||
|
echo "\t\t</tr>\n";
|
||||||
|
echo "\t\t<tr>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
<tr bgcolor="#<?php echo $SSframe_background; ?>">
|
<tr bgcolor="#<?php echo $SSframe_background; ?>">
|
||||||
<td width='20%' align="right"><font class="standard"><?php echo _QXZ("Status Duplicate Check"); ?>:</font></td>
|
<td width='20%' align="right"><font class="standard"><?php echo _QXZ("Status Duplicate Check"); ?>:</font></td>
|
||||||
<td width='80%'>
|
<td width='80%'>
|
||||||
@@ -827,6 +865,17 @@ else
|
|||||||
<td align=right width="35%"><B><font face="arial, helvetica" size=2><?php echo _QXZ("Lead Duplicate Check"); ?>:</font></B></td>
|
<td align=right width="35%"><B><font face="arial, helvetica" size=2><?php echo _QXZ("Lead Duplicate Check"); ?>:</font></B></td>
|
||||||
<td align=left width="75%"><font face="arial, helvetica" size=2><?php echo $dupcheck ?></font></td>
|
<td align=left width="75%"><font face="arial, helvetica" size=2><?php echo $dupcheck ?></font></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php
|
||||||
|
if ($SSenable_international_dncs)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td align=right width="35%"><B><font face="arial, helvetica" size=2><?php echo _QXZ("International DNC scrub"); ?>:</font></B></td>
|
||||||
|
<td align=left width="75%"><font face="arial, helvetica" size=2><?php echo $international_dnc_scrub ?></font></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td align=right width="35%"><B><font face="arial, helvetica" size=2><?php echo _QXZ("Lead Time Zone Lookup"); ?>:</font></B></td>
|
<td align=right width="35%"><B><font face="arial, helvetica" size=2><?php echo _QXZ("Lead Time Zone Lookup"); ?>:</font></B></td>
|
||||||
<td align=left width="75%"><font face="arial, helvetica" size=2><?php echo $postalgmt ?></font></td>
|
<td align=left width="75%"><font face="arial, helvetica" size=2><?php echo $postalgmt ?></font></td>
|
||||||
@@ -922,6 +971,10 @@ if ($OK_to_process)
|
|||||||
{
|
{
|
||||||
print "<BR>"._QXZ("LEAD DUPLICATE CHECK").": $dupcheck<BR>\n";
|
print "<BR>"._QXZ("LEAD DUPLICATE CHECK").": $dupcheck<BR>\n";
|
||||||
}
|
}
|
||||||
|
if (strlen($international_dnc_scrub)>0)
|
||||||
|
{
|
||||||
|
print "<BR>"._QXZ("INTERNATIONAL DNC SCRUB").": $international_dnc_scrub<BR>\n";
|
||||||
|
}
|
||||||
if (strlen($status_dedupe_str)>0)
|
if (strlen($status_dedupe_str)>0)
|
||||||
{
|
{
|
||||||
print "<BR>"._QXZ("OMITTING DUPLICATES AGAINST FOLLOWING STATUSES ONLY").": $status_dedupe_str<BR>\n";
|
print "<BR>"._QXZ("OMITTING DUPLICATES AGAINST FOLLOWING STATUSES ONLY").": $status_dedupe_str<BR>\n";
|
||||||
@@ -986,6 +1039,16 @@ if ($OK_to_process)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# If a list is being scrubbed against a country's DNC list, block the list from being dialed and purge any lead from the hopper that belongs to that list.
|
||||||
|
if (strlen($international_dnc_scrub)>0 && strlen($list_id_override)>0 && $SSenable_international_dncs)
|
||||||
|
{
|
||||||
|
$upd_dnc_stmt="update vicidial_settings_containers set container_entry=concat('$list_id_override => $international_dnc_scrub', if(length(container_entry)>0, '\r\n', ''), if(container_entry is null, '', container_entry)) where container_id='DNC_CURRENT_BLOCKED_LISTS'";
|
||||||
|
$upd_dnc_rslt=mysql_to_mysqli($upd_dnc_stmt, $link);
|
||||||
|
|
||||||
|
$delete_hopper_stmt="delete from vicidial_hopper where list_id='$list_id_override'";
|
||||||
|
$delete_hopper_rslt=mysql_to_mysqli($delete_hopper_stmt, $link);
|
||||||
|
}
|
||||||
|
|
||||||
while (!feof($file))
|
while (!feof($file))
|
||||||
{
|
{
|
||||||
$record++;
|
$record++;
|
||||||
@@ -1469,8 +1532,21 @@ if ($OK_to_process)
|
|||||||
$invalid_reason = _QXZ("INVALID PHONE NUMBER NANPA AREACODE PREFIX");
|
$invalid_reason = _QXZ("INVALID PHONE NUMBER NANPA AREACODE PREFIX");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($international_dnc_scrub and $valid_number > 0)
|
||||||
|
{
|
||||||
|
$dnc_table_name="vicidial_dnc_".$international_dnc_scrub;
|
||||||
|
$dnc_stmt="select count(*) from $dnc_table_name where phone_number='$phone_number'";
|
||||||
|
if ($DB>0) {echo "DEBUG: $international_dnc_scrub DNC query - $dnc_stmt\n";}
|
||||||
|
$dnc_rslt=mysql_to_mysqli($dnc_stmt, $link);
|
||||||
|
$dnc_row=mysqli_fetch_row($dnc_rslt);
|
||||||
|
$dnc_matches=$dnc_row[0];
|
||||||
|
if ($dnc_matches >0)
|
||||||
|
{
|
||||||
|
$invalid_reason = _QXZ("NUMBER FOUND IN $international_dnc_scrub DNC LIST");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( ($valid_number>0) and ($dup_lead<1) and ($list_id >= 100 ))
|
if ( ($valid_number>0) and ($dnc_matches<1) and ($dup_lead<1) and ($list_id >= 100 ))
|
||||||
{
|
{
|
||||||
if (preg_match("/TITLEALTPHONE/i",$dupcheck))
|
if (preg_match("/TITLEALTPHONE/i",$dupcheck))
|
||||||
{$phone_list .= "$alt_phone$title$US$list_id|";}
|
{$phone_list .= "$alt_phone$title$US$list_id|";}
|
||||||
@@ -1529,6 +1605,10 @@ if ($OK_to_process)
|
|||||||
{
|
{
|
||||||
print "<BR></b><font size=1 color=red>"._QXZ("record")." $total "._QXZ("BAD- PHONE").": $phone_number "._QXZ("ROW").": |$row[0]| "._QXZ("INV").": $phone_number</font><b>\n";
|
print "<BR></b><font size=1 color=red>"._QXZ("record")." $total "._QXZ("BAD- PHONE").": $phone_number "._QXZ("ROW").": |$row[0]| "._QXZ("INV").": $phone_number</font><b>\n";
|
||||||
}
|
}
|
||||||
|
else if ($dnc_matches > 0)
|
||||||
|
{
|
||||||
|
print "<BR></b><font size=1 color=red>record $total "._QXZ("BAD- PHONE").": $phone_number "._QXZ("ROW").": |$row[0]| "._QXZ("DNC")."($invalid_reason): $phone_number</font><b>\n";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<BR></b><font size=1 color=red>"._QXZ("record")." $total "._QXZ("BAD- PHONE").": $phone_number "._QXZ("ROW").": |$row[0]| "._QXZ("DUP").": $dup_lead $dup_lead_list</font><b>\n";
|
print "<BR></b><font size=1 color=red>"._QXZ("record")." $total "._QXZ("BAD- PHONE").": $phone_number "._QXZ("ROW").": |$row[0]| "._QXZ("DUP").": $dup_lead $dup_lead_list</font><b>\n";
|
||||||
@@ -1556,7 +1636,7 @@ if ($OK_to_process)
|
|||||||
}
|
}
|
||||||
|
|
||||||
### LOG INSERTION Admin Log Table ###
|
### LOG INSERTION Admin Log Table ###
|
||||||
$stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='LOAD', record_id='$list_id_override', event_code='ADMIN LOAD LIST CUSTOM', event_sql='', event_notes='File Name: $leadfile_name, GOOD: $good, BAD: $bad, MOVED: $moved, TOTAL: $total, DEBUG: dedupe_statuses:$dedupe_statuses[0]| dedupe_statuses_override:$dedupe_statuses_override| dupcheck:$dupcheck| status mismatch action: $status_mismatch_action| lead_file:$lead_file| list_id_override:$list_id_override| phone_code_override:$phone_code_override| postalgmt:$postalgmt| template_id:$template_id| usacan_check:$usacan_check| state_conversion:$state_conversion| web_loader_phone_length:$web_loader_phone_length|';";
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='LOAD', record_id='$list_id_override', event_code='ADMIN LOAD LIST CUSTOM', event_sql='', event_notes='File Name: $leadfile_name, GOOD: $good, BAD: $bad, MOVED: $moved, TOTAL: $total, DEBUG: dedupe_statuses:$dedupe_statuses[0]| dedupe_statuses_override:$dedupe_statuses_override| dupcheck:$dupcheck| status mismatch action: $status_mismatch_action| lead_file:$lead_file| list_id_override:$list_id_override| phone_code_override:$phone_code_override| postalgmt:$postalgmt| template_id:$template_id| usacan_check:$usacan_check| dnc_country_scrub:$international_dnc_scrub| state_conversion:$state_conversion| web_loader_phone_length:$web_loader_phone_length|';";
|
||||||
if ($DB) {echo "|$stmt|\n";}
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
$rslt=mysql_to_mysqli($stmt, $link);
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
|
||||||
@@ -1576,7 +1656,7 @@ if (($leadfile) && ($LF_path))
|
|||||||
$total=0; $good=0; $bad=0; $dup=0; $post=0; $moved=0; $phone_list='';
|
$total=0; $good=0; $bad=0; $dup=0; $post=0; $moved=0; $phone_list='';
|
||||||
|
|
||||||
### LOG INSERTION Admin Log Table ###
|
### LOG INSERTION Admin Log Table ###
|
||||||
$stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='LOAD', record_id='$list_id_override', event_code='ADMIN LOAD LIST', event_sql='', event_notes='File Name: $leadfile_name, DEBUG: dedupe_statuses:$dedupe_statuses[0]| dedupe_statuses_override:$dedupe_statuses_override| dupcheck:$dupcheck | status mismatch action: $status_mismatch_action| lead_file:$lead_file| list_id_override:$list_id_override| phone_code_override:$phone_code_override| postalgmt:$postalgmt| template_id:$template_id| usacan_check:$usacan_check| state_conversion:$state_conversion| web_loader_phone_length:$web_loader_phone_length|';";
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='LOAD', record_id='$list_id_override', event_code='ADMIN LOAD LIST', event_sql='', event_notes='File Name: $leadfile_name, DEBUG: dedupe_statuses:$dedupe_statuses[0]| dedupe_statuses_override:$dedupe_statuses_override| dupcheck:$dupcheck | status mismatch action: $status_mismatch_action| lead_file:$lead_file| list_id_override:$list_id_override| phone_code_override:$phone_code_override| postalgmt:$postalgmt| template_id:$template_id| usacan_check:$usacan_check| dnc_country_scrub:$international_dnc_scrub| state_conversion:$state_conversion| web_loader_phone_length:$web_loader_phone_length|';";
|
||||||
if ($DB) {echo "|$stmt|\n";}
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
$rslt=mysql_to_mysqli($stmt, $link);
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
|
||||||
@@ -1717,6 +1797,10 @@ if (($leadfile) && ($LF_path))
|
|||||||
{
|
{
|
||||||
print "<BR>"._QXZ("LEAD DUPLICATE CHECK").": $dupcheck<BR>\n";
|
print "<BR>"._QXZ("LEAD DUPLICATE CHECK").": $dupcheck<BR>\n";
|
||||||
}
|
}
|
||||||
|
if (strlen($international_dnc_scrub)>0)
|
||||||
|
{
|
||||||
|
print "<BR>"._QXZ("INTERNATIONAL DNC SCRUB").": $international_dnc_scrub<BR>\n";
|
||||||
|
}
|
||||||
if (strlen($template_statuses)>0)
|
if (strlen($template_statuses)>0)
|
||||||
{
|
{
|
||||||
print "<BR>"._QXZ("OMITTING DUPLICATES AGAINST FOLLOWING STATUSES ONLY").": ".preg_replace('/\'/', '', $template_statuses)."<BR>\n";
|
print "<BR>"._QXZ("OMITTING DUPLICATES AGAINST FOLLOWING STATUSES ONLY").": ".preg_replace('/\'/', '', $template_statuses)."<BR>\n";
|
||||||
@@ -1741,6 +1825,17 @@ if (($leadfile) && ($LF_path))
|
|||||||
if ($DB > 0) {echo "DEBUG: 90day SQL: |$ninetydaySQL|";}
|
if ($DB > 0) {echo "DEBUG: 90day SQL: |$ninetydaySQL|";}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# If a list is being scrubbed against a country's DNC list, block the list from being dialed and purge any lead from the hopper that belongs to that list.
|
||||||
|
if (strlen($international_dnc_scrub)>0 && strlen($list_id_override)>0 && $SSenable_international_dncs)
|
||||||
|
{
|
||||||
|
$upd_dnc_stmt="update vicidial_settings_containers set container_entry=concat('$list_id_override => $international_dnc_scrub', if(length(container_entry)>0, '\r\n', ''), if(container_entry is null, '', container_entry)) where container_id='DNC_CURRENT_BLOCKED_LISTS'";
|
||||||
|
$upd_dnc_rslt=mysql_to_mysqli($upd_dnc_stmt, $link);
|
||||||
|
|
||||||
|
$delete_hopper_stmt="delete from vicidial_hopper where list_id='$list_id_override'";
|
||||||
|
$delete_hopper_rslt=mysql_to_mysqli($delete_hopper_stmt, $link);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
while (!feof($file))
|
while (!feof($file))
|
||||||
{
|
{
|
||||||
$record++;
|
$record++;
|
||||||
@@ -2166,8 +2261,21 @@ if (($leadfile) && ($LF_path))
|
|||||||
$invalid_reason = _QXZ("INVALID PHONE NUMBER NANPA AREACODE PREFIX");
|
$invalid_reason = _QXZ("INVALID PHONE NUMBER NANPA AREACODE PREFIX");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($international_dnc_scrub and $valid_number > 0)
|
||||||
|
{
|
||||||
|
$dnc_table_name="vicidial_dnc_".$international_dnc_scrub;
|
||||||
|
$dnc_stmt="select count(*) from $dnc_table_name where phone_number='$phone_number'";
|
||||||
|
if ($DB>0) {echo "DEBUG: $international_dnc_scrub DNC query - $dnc_stmt\n";}
|
||||||
|
$dnc_rslt=mysql_to_mysqli($dnc_stmt, $link);
|
||||||
|
$dnc_row=mysqli_fetch_row($dnc_rslt);
|
||||||
|
$dnc_matches=$dnc_row[0];
|
||||||
|
if ($dnc_matches >0)
|
||||||
|
{
|
||||||
|
$invalid_reason = _QXZ("NUMBER FOUND IN $international_dnc_scrub DNC LIST");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( ($valid_number>0) and ($dup_lead<1) and ($list_id >= 100 ))
|
if ( ($valid_number>0) and ($dnc_matches<1) and ($dup_lead<1) and ($list_id >= 100 ))
|
||||||
{
|
{
|
||||||
if (preg_match("/TITLEALTPHONE/i",$dupcheck))
|
if (preg_match("/TITLEALTPHONE/i",$dupcheck))
|
||||||
{$phone_list .= "$alt_phone$title$US$list_id|";}
|
{$phone_list .= "$alt_phone$title$US$list_id|";}
|
||||||
@@ -2284,6 +2392,10 @@ if (($leadfile) && ($LF_path))
|
|||||||
{
|
{
|
||||||
print "<BR></b><font size=1 color=red>"._QXZ("record")." $total "._QXZ("BAD- PHONE").": $phone_number "._QXZ("ROW").":|$row[0]| "._QXZ("INV").": $phone_number</font><b>\n";
|
print "<BR></b><font size=1 color=red>"._QXZ("record")." $total "._QXZ("BAD- PHONE").": $phone_number "._QXZ("ROW").":|$row[0]| "._QXZ("INV").": $phone_number</font><b>\n";
|
||||||
}
|
}
|
||||||
|
else if ($dnc_matches > 0)
|
||||||
|
{
|
||||||
|
print "<BR></b><font size=1 color=red>record $total "._QXZ("BAD- PHONE").": $phone_number "._QXZ("ROW").": |$row[0]| "._QXZ("DNC")."($invalid_reason): $phone_number</font><b>\n";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<BR></b><font size=1 color=red>"._QXZ("record")." $total "._QXZ("BAD- PHONE").": $phone_number "._QXZ("ROW").":|$row[0] | "._QXZ("DUP").": $dup_lead $dup_lead_list</font><b>\n";
|
print "<BR></b><font size=1 color=red>"._QXZ("record")." $total "._QXZ("BAD- PHONE").": $phone_number "._QXZ("ROW").":|$row[0] | "._QXZ("DUP").": $dup_lead $dup_lead_list</font><b>\n";
|
||||||
@@ -2326,7 +2438,7 @@ if (($leadfile) && ($LF_path))
|
|||||||
{fwrite($stmt_file, $custom_ins_stmt."\r\n");}
|
{fwrite($stmt_file, $custom_ins_stmt."\r\n");}
|
||||||
}
|
}
|
||||||
### LOG INSERTION Admin Log Table ###
|
### LOG INSERTION Admin Log Table ###
|
||||||
$stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='LOAD', record_id='$list_id_override', event_code='ADMIN LOAD LIST STANDARD', event_sql='', event_notes='File Name: $leadfile_name, GOOD: $good, BAD: $bad, MOVED: $moved, TOTAL: $total, DEBUG: dedupe_statuses:$dedupe_statuses[0]| dedupe_statuses_override:$dedupe_statuses_override| dupcheck:$dupcheck| status mismatch action: $status_mismatch_action| lead_file:$lead_file| list_id_override:$list_id_override| phone_code_override:$phone_code_override| postalgmt:$postalgmt| template_id:$template_id| usacan_check:$usacan_check| state_conversion:$state_conversion| web_loader_phone_length:$web_loader_phone_length|';";
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='LOAD', record_id='$list_id_override', event_code='ADMIN LOAD LIST STANDARD', event_sql='', event_notes='File Name: $leadfile_name, GOOD: $good, BAD: $bad, MOVED: $moved, TOTAL: $total, DEBUG: dedupe_statuses:$dedupe_statuses[0]| dedupe_statuses_override:$dedupe_statuses_override| dupcheck:$dupcheck| status mismatch action: $status_mismatch_action| lead_file:$lead_file| list_id_override:$list_id_override| phone_code_override:$phone_code_override| postalgmt:$postalgmt| template_id:$template_id| usacan_check:$usacan_check| dnc_country_scrub:$international_dnc_scrub| state_conversion:$state_conversion| web_loader_phone_length:$web_loader_phone_length|';";
|
||||||
if ($DB) {echo "|$stmt|\n";}
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
$rslt=mysql_to_mysqli($stmt, $link);
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
|
||||||
@@ -2438,6 +2550,10 @@ if (($leadfile) && ($LF_path))
|
|||||||
{
|
{
|
||||||
print "<BR>"._QXZ("LEAD DUPLICATE CHECK").": $dupcheck<BR>\n";
|
print "<BR>"._QXZ("LEAD DUPLICATE CHECK").": $dupcheck<BR>\n";
|
||||||
}
|
}
|
||||||
|
if (strlen($international_dnc_scrub)>0)
|
||||||
|
{
|
||||||
|
print "<BR>"._QXZ("INTERNATIONAL DNC SCRUB").": $international_dnc_scrub<BR>\n";
|
||||||
|
}
|
||||||
if (strlen($status_dedupe_str)>0)
|
if (strlen($status_dedupe_str)>0)
|
||||||
{
|
{
|
||||||
print "<BR>"._QXZ("OMITTING DUPLICATES AGAINST FOLLOWING STATUSES ONLY").": $status_dedupe_str<BR>\n";
|
print "<BR>"._QXZ("OMITTING DUPLICATES AGAINST FOLLOWING STATUSES ONLY").": $status_dedupe_str<BR>\n";
|
||||||
@@ -2462,6 +2578,16 @@ if (($leadfile) && ($LF_path))
|
|||||||
if ($DB > 0) {echo "DEBUG: 90day SQL: |$ninetydaySQL|";}
|
if ($DB > 0) {echo "DEBUG: 90day SQL: |$ninetydaySQL|";}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# If a list is being scrubbed against a country's DNC list, block the list from being dialed and purge any lead from the hopper that belongs to that list.
|
||||||
|
if (strlen($international_dnc_scrub)>0 && strlen($list_id_override)>0 && $SSenable_international_dncs)
|
||||||
|
{
|
||||||
|
$upd_dnc_stmt="update vicidial_settings_containers set container_entry=concat('$list_id_override => $international_dnc_scrub', if(length(container_entry)>0, '\r\n', ''), if(container_entry is null, '', container_entry)) where container_id='DNC_CURRENT_BLOCKED_LISTS'";
|
||||||
|
$upd_dnc_rslt=mysql_to_mysqli($upd_dnc_stmt, $link);
|
||||||
|
|
||||||
|
$delete_hopper_stmt="delete from vicidial_hopper where list_id='$list_id_override'";
|
||||||
|
$delete_hopper_rslt=mysql_to_mysqli($delete_hopper_stmt, $link);
|
||||||
|
}
|
||||||
|
|
||||||
while (!feof($file))
|
while (!feof($file))
|
||||||
{
|
{
|
||||||
$record++;
|
$record++;
|
||||||
@@ -2834,6 +2960,7 @@ if (($leadfile) && ($LF_path))
|
|||||||
}
|
}
|
||||||
|
|
||||||
$valid_number=1;
|
$valid_number=1;
|
||||||
|
$dnc_matches=0;
|
||||||
$invalid_reason='';
|
$invalid_reason='';
|
||||||
if ( (strlen($phone_number)<5) || (strlen($phone_number)>18) )
|
if ( (strlen($phone_number)<5) || (strlen($phone_number)>18) )
|
||||||
{
|
{
|
||||||
@@ -2882,8 +3009,21 @@ if (($leadfile) && ($LF_path))
|
|||||||
$invalid_reason = _QXZ("INVALID PHONE NUMBER NANPA AREACODE PREFIX");
|
$invalid_reason = _QXZ("INVALID PHONE NUMBER NANPA AREACODE PREFIX");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($international_dnc_scrub and $valid_number > 0)
|
||||||
|
{
|
||||||
|
$dnc_table_name="vicidial_dnc_".$international_dnc_scrub;
|
||||||
|
$dnc_stmt="select count(*) from $dnc_table_name where phone_number='$phone_number'";
|
||||||
|
if ($DB>0) {echo "DEBUG: $international_dnc_scrub DNC query - $dnc_stmt\n";}
|
||||||
|
$dnc_rslt=mysql_to_mysqli($dnc_stmt, $link);
|
||||||
|
$dnc_row=mysqli_fetch_row($dnc_rslt);
|
||||||
|
$dnc_matches=$dnc_row[0];
|
||||||
|
if ($dnc_matches >0)
|
||||||
|
{
|
||||||
|
$invalid_reason = _QXZ("NUMBER FOUND IN $international_dnc_scrub DNC LIST");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( ($valid_number>0) and ($dup_lead<1) and ($list_id >= 100 ))
|
if ( ($valid_number>0) and ($dnc_matches<1) and ($dup_lead<1) and ($list_id >= 100 ))
|
||||||
{
|
{
|
||||||
if (preg_match("/TITLEALTPHONE/i",$dupcheck))
|
if (preg_match("/TITLEALTPHONE/i",$dupcheck))
|
||||||
{$phone_list .= "$alt_phone$title$US$list_id|";}
|
{$phone_list .= "$alt_phone$title$US$list_id|";}
|
||||||
@@ -2923,6 +3063,10 @@ if (($leadfile) && ($LF_path))
|
|||||||
{
|
{
|
||||||
print "<BR></b><font size=1 color=red>record $total "._QXZ("BAD- PHONE").": $phone_number "._QXZ("ROW").": |$row[0]| "._QXZ("INV")."($invalid_reason): $phone_number</font><b>\n";
|
print "<BR></b><font size=1 color=red>record $total "._QXZ("BAD- PHONE").": $phone_number "._QXZ("ROW").": |$row[0]| "._QXZ("INV")."($invalid_reason): $phone_number</font><b>\n";
|
||||||
}
|
}
|
||||||
|
else if ($dnc_matches > 0)
|
||||||
|
{
|
||||||
|
print "<BR></b><font size=1 color=red>record $total "._QXZ("BAD- PHONE").": $phone_number "._QXZ("ROW").": |$row[0]| "._QXZ("DNC")."($invalid_reason): $phone_number</font><b>\n";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print "<BR></b><font size=1 color=red>record $total "._QXZ("BAD- PHONE").": $phone_number "._QXZ("ROW").": |$row[0]| "._QXZ("DUP").": $dup_lead $dup_lead_list</font><b>\n";
|
print "<BR></b><font size=1 color=red>record $total "._QXZ("BAD- PHONE").": $phone_number "._QXZ("ROW").": |$row[0]| "._QXZ("DUP").": $dup_lead $dup_lead_list</font><b>\n";
|
||||||
@@ -2949,7 +3093,7 @@ if (($leadfile) && ($LF_path))
|
|||||||
{fwrite($stmt_file, $stmtZ."\r\n");}
|
{fwrite($stmt_file, $stmtZ."\r\n");}
|
||||||
}
|
}
|
||||||
### LOG INSERTION Admin Log Table ###
|
### LOG INSERTION Admin Log Table ###
|
||||||
$stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='LOAD', record_id='$list_id_override', event_code='ADMIN LOAD LIST STANDARD', event_sql='', event_notes='File Name: $leadfile_name, GOOD: $good, BAD: $bad, MOVED: $moved, TOTAL: $total, DEBUG: dedupe_statuses:$dedupe_statuses[0]| dedupe_statuses_override:$dedupe_statuses_override| dupcheck:$dupcheck| status mismatch action: $status_mismatch_action| lead_file:$lead_file| list_id_override:$list_id_override| phone_code_override:$phone_code_override| postalgmt:$postalgmt| template_id:$template_id| usacan_check:$usacan_check| state_conversion:$state_conversion| web_loader_phone_length:$web_loader_phone_length|';";
|
$stmt="INSERT INTO vicidial_admin_log set event_date='$NOW_TIME', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='LOAD', record_id='$list_id_override', event_code='ADMIN LOAD LIST STANDARD', event_sql='', event_notes='File Name: $leadfile_name, GOOD: $good, BAD: $bad, MOVED: $moved, TOTAL: $total, DEBUG: dedupe_statuses:$dedupe_statuses[0]| dedupe_statuses_override:$dedupe_statuses_override| dupcheck:$dupcheck| status mismatch action: $status_mismatch_action| lead_file:$lead_file| list_id_override:$list_id_override| phone_code_override:$phone_code_override| postalgmt:$postalgmt| template_id:$template_id| usacan_check:$usacan_check| dnc_country_scrub:$international_dnc_scrub| state_conversion:$state_conversion| web_loader_phone_length:$web_loader_phone_length|';";
|
||||||
if ($DB) {echo "|$stmt|\n";}
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
$rslt=mysql_to_mysqli($stmt, $link);
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
|
||||||
@@ -3113,6 +3257,10 @@ if (($leadfile) && ($LF_path))
|
|||||||
{
|
{
|
||||||
print "<BR>"._QXZ("LEAD DUPLICATE CHECK").": $dupcheck<BR>\n";
|
print "<BR>"._QXZ("LEAD DUPLICATE CHECK").": $dupcheck<BR>\n";
|
||||||
}
|
}
|
||||||
|
if (strlen($international_dnc_scrub)>0)
|
||||||
|
{
|
||||||
|
print "<BR>"._QXZ("INTERNATIONAL DNC SCRUB").": $international_dnc_scrub<BR>\n";
|
||||||
|
}
|
||||||
if (strlen($status_dedupe_str)>0)
|
if (strlen($status_dedupe_str)>0)
|
||||||
{
|
{
|
||||||
print "<BR>"._QXZ("OMITTING DUPLICATES AGAINST FOLLOWING STATUSES ONLY").": $status_dedupe_str<BR>\n";
|
print "<BR>"._QXZ("OMITTING DUPLICATES AGAINST FOLLOWING STATUSES ONLY").": $status_dedupe_str<BR>\n";
|
||||||
@@ -3159,6 +3307,7 @@ if (($leadfile) && ($LF_path))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
print " <tr bgcolor='#$SSmenu_background'>\r\n";
|
print " <tr bgcolor='#$SSmenu_background'>\r\n";
|
||||||
|
print " <input type=hidden name=international_dnc_scrub value=\"$international_dnc_scrub\">\r\n";
|
||||||
print " <input type=hidden name=dedupe_statuses_override value=\"$status_dedupe_str\">\r\n";
|
print " <input type=hidden name=dedupe_statuses_override value=\"$status_dedupe_str\">\r\n";
|
||||||
print " <input type=hidden name=status_mismatch_action value=\"$status_mismatch_action\">\r\n";
|
print " <input type=hidden name=status_mismatch_action value=\"$status_mismatch_action\">\r\n";
|
||||||
print " <input type=hidden name=dupcheck value=\"$dupcheck\">\r\n";
|
print " <input type=hidden name=dupcheck value=\"$dupcheck\">\r\n";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# version: 202000708105201
|
# version: 202000814220301
|
||||||
users-user User ID <QXZ>This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length.</QXZ>
|
users-user User ID <QXZ>This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length.</QXZ>
|
||||||
users-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters.</QXZ>
|
users-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters.</QXZ>
|
||||||
users-force_change_password Force Change Password <QXZ>If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage. Default is N.</QXZ>
|
users-force_change_password Force Change Password <QXZ>If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage. Default is N.</QXZ>
|
||||||
@@ -796,6 +796,11 @@ voicemail-voicemail_timezone Voicemail Zone <QXZ>This setting allows you to set
|
|||||||
voicemail-voicemail_options Voicemail Options <QXZ>This optional setting allows you to define additional voicemail settings. It is recommended that you leave this blank unless you know what you are doing.</QXZ>
|
voicemail-voicemail_options Voicemail Options <QXZ>This optional setting allows you to define additional voicemail settings. It is recommended that you leave this blank unless you know what you are doing.</QXZ>
|
||||||
users-alter_admin_interface_options Alter Admin Interface Options <QXZ>Changing this setting to 1 will allow this user to alter admin interface options.</QXZ>
|
users-alter_admin_interface_options Alter Admin Interface Options <QXZ>Changing this setting to 1 will allow this user to alter admin interface options.</QXZ>
|
||||||
list_loader Admin lead loader <QXZ> The basic web-based lead loader is designed simply to take a lead file - up to 8MB in size - that is either tab or pipe delimited and load it into the list table. The lead loader allows for field choosing and TXT- Plain Text, CSV- Comma Separated Values and XLS- Excel file formats. The lead loader does not do data validation, but it does allow you to check for duplicates in itself, within the campaign or within the entire system. Also, make sure that you have created the list that these leads are to be under so that you can use them. Here is a list of the fields in their proper order for the lead files: </QXZ><OL><LI><QXZ>Vendor Lead Code - shows up in the Vendor ID field of the GUI</QXZ><LI><QXZ>Source Code - internal use only for admins and DBAs</QXZ><LI><QXZ>List ID - the list number that these leads will show up under</QXZ><LI><QXZ>Phone Code - the prefix for the phone number - 1 for US, 44 for UK, 61 for AUS, etc</QXZ><LI><QXZ>Phone Number - must be at least 8 digits long</QXZ><LI><QXZ>Title - title of the customer - Mr. Ms. Mrs, etc...</QXZ><LI><QXZ>First Name</QXZ><LI><QXZ>Middle Initial</QXZ><LI><QXZ>Last Name</QXZ><LI><QXZ>Address Line 1</QXZ><LI><QXZ>Address Line 2</QXZ><LI><QXZ>Address Line 3</QXZ><LI><QXZ>City</QXZ><LI><QXZ>State - limited to 2 characters</QXZ><LI><QXZ>Province</QXZ><LI><QXZ>Postal Code</QXZ><LI><QXZ>Country</QXZ><LI><QXZ>Gender</QXZ><LI><QXZ>Date of Birth</QXZ><LI><QXZ>Alternate Phone Number</QXZ><LI><QXZ>Email Address</QXZ><LI><QXZ>Security Phrase</QXZ><LI><QXZ>Comments</QXZ><LI><QXZ>Rank</QXZ><LI><QXZ>Owner</QXZ></OL><BR><QXZ>NOTES: The Excel Lead loader functionality is enabled by a series of perl scripts and needs to have a properly configured /etc/astguiclient.conf file in place on the web server. Also, a couple perl modules must be loaded for it to work as well - OLE-Storage_Lite and Spreadsheet-ParseExcel. You can check for runtime errors in these by looking at your apache error_log file. Also, for duplication checks against campaign lists, the list that has new leads going into it does need to be created in the system before you start to load the leads.</QXZ>
|
list_loader Admin lead loader <QXZ> The basic web-based lead loader is designed simply to take a lead file - up to 8MB in size - that is either tab or pipe delimited and load it into the list table. The lead loader allows for field choosing and TXT- Plain Text, CSV- Comma Separated Values and XLS- Excel file formats. The lead loader does not do data validation, but it does allow you to check for duplicates in itself, within the campaign or within the entire system. Also, make sure that you have created the list that these leads are to be under so that you can use them. Here is a list of the fields in their proper order for the lead files: </QXZ><OL><LI><QXZ>Vendor Lead Code - shows up in the Vendor ID field of the GUI</QXZ><LI><QXZ>Source Code - internal use only for admins and DBAs</QXZ><LI><QXZ>List ID - the list number that these leads will show up under</QXZ><LI><QXZ>Phone Code - the prefix for the phone number - 1 for US, 44 for UK, 61 for AUS, etc</QXZ><LI><QXZ>Phone Number - must be at least 8 digits long</QXZ><LI><QXZ>Title - title of the customer - Mr. Ms. Mrs, etc...</QXZ><LI><QXZ>First Name</QXZ><LI><QXZ>Middle Initial</QXZ><LI><QXZ>Last Name</QXZ><LI><QXZ>Address Line 1</QXZ><LI><QXZ>Address Line 2</QXZ><LI><QXZ>Address Line 3</QXZ><LI><QXZ>City</QXZ><LI><QXZ>State - limited to 2 characters</QXZ><LI><QXZ>Province</QXZ><LI><QXZ>Postal Code</QXZ><LI><QXZ>Country</QXZ><LI><QXZ>Gender</QXZ><LI><QXZ>Date of Birth</QXZ><LI><QXZ>Alternate Phone Number</QXZ><LI><QXZ>Email Address</QXZ><LI><QXZ>Security Phrase</QXZ><LI><QXZ>Comments</QXZ><LI><QXZ>Rank</QXZ><LI><QXZ>Owner</QXZ></OL><BR><QXZ>NOTES: The Excel Lead loader functionality is enabled by a series of perl scripts and needs to have a properly configured /etc/astguiclient.conf file in place on the web server. Also, a couple perl modules must be loaded for it to work as well - OLE-Storage_Lite and Spreadsheet-ParseExcel. You can check for runtime errors in these by looking at your apache error_log file. Also, for duplication checks against campaign lists, the list that has new leads going into it does need to be created in the system before you start to load the leads.</QXZ>
|
||||||
|
international_dnc_loader International DNC Loader <QXZ>The international DNC loader is used to upload and store DNC lists by country in the dialer database, which can then be used to scrub against in the lead loader. This feature requires that the "Enable International DNC" feature be turned on in the system settings.<BR><BR>A background script constantly runs and checks a user-defined location for files to load. This places them in a queue table, the contents of which are displayed in this interface. From here the user can see what files have been uploaded, are being processed, or are finished/cancelled.<BR><BR>Uploaded files can be processed by assigning them a country code, designating whether or not the uploaded file is meant to purge said country's current DNC list or append to it, and selecting the file format the DNC file follows. <BR><BR>Files are processed automatically when the user presses the "START FILE" button and their progress can be tracked. Or the file can be cancelled and removed from the queue.</QXZ>
|
||||||
|
international_dnc_loader-country_code DNC country code <QXZ>This is the list of countries a DNC gleaned from the "vicidial_country_iso_tld" table in the database. In order to process an uploaded file into a DNC suppression table, you must specify what country it is for here.</QXZ>
|
||||||
|
international_dnc_loader-file_action DNC file action <QXZ>When a user wishes to process a DNC file here, they must specify if the uploaded file is meant to replace the existing data in the country's table (PURGE), or if the uploaded file should insert all new distinct leads in with the records already in the table (APPEND). If this is the first time a file is being loaded for a particular country, it doesn't matter which option is selected.</QXZ>
|
||||||
|
international_dnc_loader-file_layout DNC file layout <QXZ>This field tells the file processing script what kind of file is being loaded and where to look in the file for the phone numbers. The file formats displayed in the drop-down menu are gotten from the settings container "DNC_IMPORT_FORMATS", and formats should be defined or altered there.</QXZ>
|
||||||
|
international_dnc_loader-start_cancel Start/cancel file <QXZ>If the user has properly defined a country code, file action, and file layout for an uploaded "READY" file, they can click the "START FILE" button to set the file status to "PENDING", which will cause it to be picked up and processed by the automated processing script. Or, they can click "CANCEL" to set the file status to "CANCELLED", which will cause the file to eventually be purged from the queue table and also erased from the DNC storage folder by the automated processing script.</QXZ>
|
||||||
admin_phones_bulk_insert-servers Servers <QXZ>This is a list of the server IP addresses of existing servers in the system that you want the phone entries to be populated across. These must be valid IP addresses, they must be active in the system and you must put one per line in this text area input box.</QXZ>
|
admin_phones_bulk_insert-servers Servers <QXZ>This is a list of the server IP addresses of existing servers in the system that you want the phone entries to be populated across. These must be valid IP addresses, they must be active in the system and you must put one per line in this text area input box.</QXZ>
|
||||||
admin_phones_bulk_insert-phones Phones <QXZ>This is a list of the phone extensions that you want to be created on all of the servers listed above. The phone extensions should be letters and numbers only, with no special characters and you must put one per line in this text area box.</QXZ>
|
admin_phones_bulk_insert-phones Phones <QXZ>This is a list of the phone extensions that you want to be created on all of the servers listed above. The phone extensions should be letters and numbers only, with no special characters and you must put one per line in this text area box.</QXZ>
|
||||||
list_loader-duplicate_check Duplicate Checking <QXZ>The duplicate options allow you to check for duplicate entries as you load the leads into the system. You can select to check for duplicates within only the same list, only the same campaign lists or within the entire system. If you have chosen a duplicate check method, you can also optionally select the only specific statuses that you want to duplicate check against.</QXZ>
|
list_loader-duplicate_check Duplicate Checking <QXZ>The duplicate options allow you to check for duplicate entries as you load the leads into the system. You can select to check for duplicates within only the same list, only the same campaign lists or within the entire system. If you have chosen a duplicate check method, you can also optionally select the only specific statuses that you want to duplicate check against.</QXZ>
|
||||||
@@ -1046,6 +1051,7 @@ settings-callcard_enabled Enable CallCard <QXZ>This setting enables the CallCard
|
|||||||
settings-test_campaign_calls Enable Campaign Test Calls <QXZ>This setting enables the ability to enter a phone code and phone number into fields at the bottom of the Campaign Detail screen and place a phone call to that number as if it were a lead being auto-dialed in the system. The phone number will be stored as a new lead in the manual dial list ID list. The campaign must be active for this feature to be enabled, and it is recommended that the lists assigned to the campaign all be set to inactive. The dial prefix, dial timeout and all other dialing related features, except for DNC and call time options, will affect the dialing of the test number. The phone call will be placed on the server selected as the voicemail server in the system settings. Default is 0 for disabled.</QXZ>
|
settings-test_campaign_calls Enable Campaign Test Calls <QXZ>This setting enables the ability to enter a phone code and phone number into fields at the bottom of the Campaign Detail screen and place a phone call to that number as if it were a lead being auto-dialed in the system. The phone number will be stored as a new lead in the manual dial list ID list. The campaign must be active for this feature to be enabled, and it is recommended that the lists assigned to the campaign all be set to inactive. The dial prefix, dial timeout and all other dialing related features, except for DNC and call time options, will affect the dialing of the test number. The phone call will be placed on the server selected as the voicemail server in the system settings. Default is 0 for disabled.</QXZ>
|
||||||
settings-did_system_filter DID System Filter <QXZ>This setting enables the special did_system_filter DID entry. The filter settings in this DID entry will be applied to all incoming calls to the system, prior to any other actions on the call. This feature is commonly used for system-wide inbound blacklists, or filtering of do-not-contact phone numbers. Default is 0 for disabled.</QXZ>
|
settings-did_system_filter DID System Filter <QXZ>This setting enables the special did_system_filter DID entry. The filter settings in this DID entry will be applied to all incoming calls to the system, prior to any other actions on the call. This feature is commonly used for system-wide inbound blacklists, or filtering of do-not-contact phone numbers. Default is 0 for disabled.</QXZ>
|
||||||
settings-inbound_answer_config Inbound Answer Configuration <QXZ>If enabled, this allows you to override the default behavior with inbound calls automatically being answered when they are routed. After this is enabled, you will see options to define if an Answer signal is sent at the individual DID, In-Group or Call Menu level. Default is 0 for disabled.</QXZ>
|
settings-inbound_answer_config Inbound Answer Configuration <QXZ>If enabled, this allows you to override the default behavior with inbound calls automatically being answered when they are routed. After this is enabled, you will see options to define if an Answer signal is sent at the individual DID, In-Group or Call Menu level. Default is 0 for disabled.</QXZ>
|
||||||
|
settings-enable_international_dncs Enable Interational DNCs <QXZ>If enabled, this allows you to create DNC lists for individual companies and provides the option to scrub against these lists when loading lead files.</QXZ>
|
||||||
settings-user_new_lead_limit New Leads Per List Limit <QXZ>This setting enables the new lead limits per list to be set on the list modify page and the user list new lead limit page. This feature will only work properly if the campaign is set to either the MANUAL or INBOUND_MAN Dial Method and No Hopper dialing is enabled. Default is 0 for disabled.</QXZ>
|
settings-user_new_lead_limit New Leads Per List Limit <QXZ>This setting enables the new lead limits per list to be set on the list modify page and the user list new lead limit page. This feature will only work properly if the campaign is set to either the MANUAL or INBOUND_MAN Dial Method and No Hopper dialing is enabled. Default is 0 for disabled.</QXZ>
|
||||||
settings-call_quota_lead_ranking Call Quota Lead Ranking <QXZ>This setting allows you to use the campaign setting for Call Quota Lead Ranking, which allows for a complex set of recycle dialing priorities for non-contact calls. Default is 0 for disabled.</QXZ>
|
settings-call_quota_lead_ranking Call Quota Lead Ranking <QXZ>This setting allows you to use the campaign setting for Call Quota Lead Ranking, which allows for a complex set of recycle dialing priorities for non-contact calls. Default is 0 for disabled.</QXZ>
|
||||||
settings-custom_fields_enabled Enable Custom List Fields <QXZ>This setting enables the custom list fields feature that allows for custom data fields to be defined in the administration web interface on a per-list basis and then have those fields available in a FORM tab to the agent in the agent web interface. Default is 0 for disabled.</QXZ>
|
settings-custom_fields_enabled Enable Custom List Fields <QXZ>This setting enables the custom list fields feature that allows for custom data fields to be defined in the administration web interface on a per-list basis and then have those fields available in a FORM tab to the agent in the agent web interface. Default is 0 for disabled.</QXZ>
|
||||||
|
|||||||
@@ -5,11 +5,12 @@
|
|||||||
# include file to generate screen colors - normally in admin_header.php,
|
# include file to generate screen colors - normally in admin_header.php,
|
||||||
# but most reports include admin_header.php after the colors need to be set
|
# but most reports include admin_header.php after the colors need to be set
|
||||||
#
|
#
|
||||||
# Copyright (C) 2017 Joseph Johnson <freewermadmin@gmail.com>, Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
# Copyright (C) 2020 Joseph Johnson <freewermadmin@gmail.com>, Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# CHANGES:
|
# CHANGES:
|
||||||
# 170828-2345 - First Build
|
# 170828-2345 - First Build
|
||||||
|
# 200814-2247 - Added button color
|
||||||
#
|
#
|
||||||
|
|
||||||
##### BEGIN Define colors and logo #####
|
##### BEGIN Define colors and logo #####
|
||||||
@@ -23,6 +24,7 @@ $SSstd_row5_background='FFFFFF';
|
|||||||
$SSalt_row1_background='BDFFBD';
|
$SSalt_row1_background='BDFFBD';
|
||||||
$SSalt_row2_background='99FF99';
|
$SSalt_row2_background='99FF99';
|
||||||
$SSalt_row3_background='CCFFCC';
|
$SSalt_row3_background='CCFFCC';
|
||||||
|
$SSbutton_color='EFEFEF';
|
||||||
|
|
||||||
$screen_color_stmt="SELECT admin_screen_colors from system_settings";
|
$screen_color_stmt="SELECT admin_screen_colors from system_settings";
|
||||||
$screen_color_rslt=mysql_to_mysqli($screen_color_stmt, $link);
|
$screen_color_rslt=mysql_to_mysqli($screen_color_stmt, $link);
|
||||||
@@ -31,7 +33,7 @@ $agent_screen_colors="$screen_color_row[0]";
|
|||||||
|
|
||||||
if ($agent_screen_colors != 'default')
|
if ($agent_screen_colors != 'default')
|
||||||
{
|
{
|
||||||
$asc_stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo FROM vicidial_screen_colors where colors_id='$agent_screen_colors';";
|
$asc_stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo,button_color FROM vicidial_screen_colors where colors_id='$agent_screen_colors';";
|
||||||
$asc_rslt=mysql_to_mysqli($asc_stmt, $link);
|
$asc_rslt=mysql_to_mysqli($asc_stmt, $link);
|
||||||
$qm_conf_ct = mysqli_num_rows($asc_rslt);
|
$qm_conf_ct = mysqli_num_rows($asc_rslt);
|
||||||
if ($qm_conf_ct > 0)
|
if ($qm_conf_ct > 0)
|
||||||
@@ -47,7 +49,8 @@ if ($agent_screen_colors != 'default')
|
|||||||
$SSalt_row1_background = $asc_row[7];
|
$SSalt_row1_background = $asc_row[7];
|
||||||
$SSalt_row2_background = $asc_row[8];
|
$SSalt_row2_background = $asc_row[8];
|
||||||
$SSalt_row3_background = $asc_row[9];
|
$SSalt_row3_background = $asc_row[9];
|
||||||
$SSweb_logo = $asc_row[10];
|
$SSweb_logo = $asc_row[10];
|
||||||
|
$SSbutton_color = $asc_row[11];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -74,6 +74,8 @@ redalert {font-size: 18px; font-weight:bold; font-family: Arial, Sans-Serif; col
|
|||||||
.alt_row1 {background-color: <?php echo $SSalt_row1_background; ?>}
|
.alt_row1 {background-color: <?php echo $SSalt_row1_background; ?>}
|
||||||
.alt_row2 {background-color: <?php echo $SSalt_row2_background; ?>}
|
.alt_row2 {background-color: <?php echo $SSalt_row2_background; ?>}
|
||||||
.alt_row3 {background-color: <?php echo $SSalt_row3_background; ?>}
|
.alt_row3 {background-color: <?php echo $SSalt_row3_background; ?>}
|
||||||
|
.std_btn {background-color: <?php echo $SSbutton_background; ?>;}
|
||||||
|
|
||||||
|
|
||||||
.border2px {border:solid 2px #<?php echo $SSmenu_background; ?>}
|
.border2px {border:solid 2px #<?php echo $SSmenu_background; ?>}
|
||||||
|
|
||||||
@@ -272,6 +274,7 @@ textarea.chat_box_ended {
|
|||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
input.red_btn{
|
input.red_btn{
|
||||||
font-family: Arial, Sans-Serif;
|
font-family: Arial, Sans-Serif;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|||||||
Reference in New Issue
Block a user