Added Local Call Time option for Lists to further restrict call times already set in the campaign.(issue #812)

Added Manual Dial Lead Search Filter option to limit the search of manual dials to within one campaign's lists from the manual dial screen.

git-svn-id: svn://192.168.202.10@2244 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2015-01-12 06:18:46 +00:00
parent eb7ed8c0f3
commit edb88a8fec
9 changed files with 2545 additions and 379 deletions
+6
View File
@@ -114,6 +114,12 @@ OTHER CHANGES:
systemwide even in lists belonging to campaigns that the user's User
Group settings don't allow them to view
21. Added Local Call Time option for Lists to further restrict call times
already set in the campaign.
22. Added Manual Dial Lead Search Filter option to limit the search of manual
dials to within one campaign's lists.
+677 -117
View File
File diff suppressed because it is too large Load Diff
+5 -3
View File
@@ -920,7 +920,8 @@ comments_callback_screen ENUM('DISABLED','ENABLED','REPLACE_CB_NOTES') default '
qc_comment_history ENUM('CLICK','AUTO_OPEN','CLICK_ALLOW_MINIMIZE','AUTO_OPEN_ALLOW_MINIMIZE') default 'CLICK',
show_previous_callback ENUM('DISABLED','ENABLED') default 'ENABLED',
clear_script ENUM('DISABLED','ENABLED') default 'DISABLED',
cpd_unknown_action ENUM('DISABLED','DISPO','MESSAGE','CALLMENU','INGROUP') default 'DISABLED'
cpd_unknown_action ENUM('DISABLED','DISPO','MESSAGE','CALLMENU','INGROUP') default 'DISABLED',
manual_dial_search_filter VARCHAR(50) default 'NONE'
) ENGINE=MyISAM;
CREATE TABLE vicidial_lists (
@@ -946,7 +947,8 @@ web_form_address_two TEXT,
time_zone_setting ENUM('COUNTRY_AND_AREA_CODE','POSTAL_CODE','NANPA_PREFIX','OWNER_TIME_ZONE_CODE') default 'COUNTRY_AND_AREA_CODE',
inventory_report ENUM('Y','N') default 'Y',
expiration_date DATE default '2099-12-31',
na_call_url TEXT
na_call_url TEXT,
local_call_time VARCHAR(10) NOT NULL DEFAULT 'campaign'
) ENGINE=MyISAM;
CREATE TABLE vicidial_statuses (
@@ -3363,4 +3365,4 @@ UPDATE vicidial_configuration set value='1766' where name='qc_database_version';
UPDATE system_settings set vdc_agent_api_active='1';
UPDATE system_settings SET db_schema_version='1399',db_schema_update_date=NOW(),reload_timestamp=NOW();
UPDATE system_settings SET db_schema_version='1400',db_schema_update_date=NOW(),reload_timestamp=NOW();
+6
View File
@@ -164,3 +164,9 @@ UPDATE system_settings SET db_schema_version='1398',db_schema_update_date=NOW()
ALTER TABLE vicidial_live_agents MODIFY external_transferconf VARCHAR(120) default '';
UPDATE system_settings SET db_schema_version='1399',db_schema_update_date=NOW() where db_schema_version < 1399;
ALTER TABLE vicidial_lists ADD local_call_time VARCHAR(10) NOT NULL DEFAULT 'campaign';
ALTER TABLE vicidial_campaigns ADD manual_dial_search_filter VARCHAR(50) default 'NONE';
UPDATE system_settings SET db_schema_version='1400',db_schema_update_date=NOW() where db_schema_version < 1400;
+322 -90
View File
@@ -25,6 +25,7 @@
# 141128-0846 - Code cleanup for QXZ functions
# 141216-1902 - Added MYSQL language method
# 150108-1647 - removed phones count as part of validation, can cause problems when there are many phones
# 150111-1541 - Added lists option: local call time(Issue #812)
#
# $mysql_queries = 20
@@ -1659,9 +1660,8 @@ function lookup_gmt($phone_code,$USarea,$state,$LOCAL_GMT_OFF_STD,$Shour,$Smin,$
##### DETERMINE IF LEAD IS DIALABLE #####
function dialable_gmt($DB,$link,$local_call_time,$gmt_offset,$state)
{
{
require("dbconnect_mysqli.php");
$dialable=0;
$pzone=3600 * $gmt_offset;
@@ -1672,8 +1672,9 @@ function dialable_gmt($DB,$link,$local_call_time,$gmt_offset,$state)
$GMT_gmt = "$tz";
$GMT_day = "$pday";
$GMT_hour = ($phour + $pmin);
$stmt="SELECT call_time_id,call_time_name,call_time_comments,ct_default_start,ct_default_stop,ct_sunday_start,ct_sunday_stop,ct_monday_start,ct_monday_stop,ct_tuesday_start,ct_tuesday_stop,ct_wednesday_start,ct_wednesday_stop,ct_thursday_start,ct_thursday_stop,ct_friday_start,ct_friday_stop,ct_saturday_start,ct_saturday_stop,ct_state_call_times FROM vicidial_call_times where call_time_id='$local_call_time';";
$YMD = date("Y-m-d");
$stmt="SELECT call_time_id,call_time_name,call_time_comments,ct_default_start,ct_default_stop,ct_sunday_start,ct_sunday_stop,ct_monday_start,ct_monday_stop,ct_tuesday_start,ct_tuesday_stop,ct_wednesday_start,ct_wednesday_stop,ct_thursday_start,ct_thursday_stop,ct_friday_start,ct_friday_stop,ct_saturday_start,ct_saturday_stop,ct_state_call_times,ct_holidays FROM vicidial_call_times where call_time_id='$local_call_time';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$rowx=mysqli_fetch_row($rslt);
@@ -1694,99 +1695,330 @@ function dialable_gmt($DB,$link,$local_call_time,$gmt_offset,$state)
$Gct_saturday_start = $rowx[17];
$Gct_saturday_stop = $rowx[18];
$Gct_state_call_times = $rowx[19];
$Gct_holidays = $rowx[20];
if ($GMT_day==0) #### Sunday local time
### BEGIN Check for outbound holiday ###
$holiday_id = '';
if (strlen($Gct_holidays)>2)
{
if (($Gct_sunday_start==0) and ($Gct_sunday_stop==0))
$Gct_holidaysSQL = preg_replace("/\|/", "','", "$Gct_holidays");
$Gct_holidaysSQL = "'".$Gct_holidaysSQL."'";
$stmt = "SELECT holiday_id,holiday_date,holiday_name,ct_default_start,ct_default_stop from vicidial_call_time_holidays where holiday_id IN($Gct_holidaysSQL) and holiday_status='ACTIVE' and holiday_date='$YMD' order by holiday_id;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {echo "$stmt\n";}
$sthCrows=mysqli_num_rows($rslt);
if ($sthCrows > 0)
{
if ( ($GMT_hour>=$Gct_default_start) and ($GMT_hour<$Gct_default_stop) )
{$dialable=1;}
}
else
{
if ( ($GMT_hour>=$Gct_sunday_start) and ($GMT_hour<$Gct_sunday_stop) )
{$dialable=1;}
$aryC=mysqli_fetch_row($rslt);
$holiday_id = $aryC[0];
$holiday_date = $aryC[1];
$holiday_name = $aryC[2];
if ( ($Gct_default_start < $aryC[3]) && ($Gct_default_stop > 0) ) {$Gct_default_start = $aryC[3];}
if ( ($Gct_default_stop > $aryC[4]) && ($Gct_default_stop > 0) ) {$Gct_default_stop = $aryC[4];}
if ( ($Gct_sunday_start < $aryC[3]) && ($Gct_sunday_stop > 0) ) {$Gct_sunday_start = $aryC[3];}
if ( ($Gct_sunday_stop > $aryC[4]) && ($Gct_sunday_stop > 0) ) {$Gct_sunday_stop = $aryC[4];}
if ( ($Gct_monday_start < $aryC[3]) && ($Gct_monday_stop > 0) ) {$Gct_monday_start = $aryC[3];}
if ( ($Gct_monday_stop > $aryC[4]) && ($Gct_monday_stop > 0) ) {$Gct_monday_stop = $aryC[4];}
if ( ($Gct_tuesday_start < $aryC[3]) && ($Gct_tuesday_stop > 0) ) {$Gct_tuesday_start = $aryC[3];}
if ( ($Gct_tuesday_stop > $aryC[4]) && ($Gct_tuesday_stop > 0) ) {$Gct_tuesday_stop = $aryC[4];}
if ( ($Gct_wednesday_start < $aryC[3]) && ($Gct_wednesday_stop > 0) ) {$Gct_wednesday_start = $aryC[3];}
if ( ($Gct_wednesday_stop > $aryC[4]) && ($Gct_wednesday_stop > 0) ) {$Gct_wednesday_stop = $aryC[4];}
if ( ($Gct_thursday_start < $aryC[3]) && ($Gct_thursday_stop > 0) ) {$Gct_thursday_start = $aryC[3];}
if ( ($Gct_thursday_stop > $aryC[4]) && ($Gct_thursday_stop > 0) ) {$Gct_thursday_stop = $aryC[4];}
if ( ($Gct_friday_start < $aryC[3]) && ($Gct_friday_stop > 0) ) {$Gct_friday_start = $aryC[3];}
if ( ($Gct_friday_stop > $aryC[4]) && ($Gct_friday_stop > 0) ) {$Gct_friday_stop = $aryC[4];}
if ( ($Gct_saturday_start < $aryC[3]) && ($Gct_saturday_stop > 0) ) {$Gct_saturday_start = $aryC[3];}
if ( ($Gct_saturday_stop > $aryC[4]) && ($Gct_saturday_stop > 0) ) {$Gct_saturday_stop = $aryC[4];}
if ($DB) {echo "CALL TIME HOLIDAY FOUND! $local_call_time|$holiday_id|$holiday_date|$holiday_name|$Gct_default_start|$Gct_default_stop|\n";}
}
}
if ($GMT_day==1) #### Monday local time
{
if (($Gct_monday_start==0) and ($Gct_monday_stop==0))
### END Check for outbound holiday ###
if( $state != '')
{
if ( ($GMT_hour>=$Gct_default_start) and ($GMT_hour<$Gct_default_stop) )
{$dialable=1;}
$ct_states = '';
$ct_state_gmt_SQL = '';
$ct_srs=0;
$b=0;
if (strlen($Gct_state_call_times)>2)
{
$state_rules = explode('|',$Gct_state_call_times);
$ct_srs = ((count($state_rules)) - 2);
}
while($ct_srs >= $b)
{
if (strlen($state_rules[$b])>1)
{
$stmt = "SELECT state_call_time_id,state_call_time_state,state_call_time_name,state_call_time_comments,sct_default_start,sct_default_stop,sct_sunday_start,sct_sunday_stop,sct_monday_start,sct_monday_stop,sct_tuesday_start,sct_tuesday_stop,sct_wednesday_start,sct_wednesday_stop,sct_thursday_start,sct_thursday_stop,sct_friday_start,sct_friday_stop,sct_saturday_start,sct_saturday_stop,ct_holidays from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {echo "$stmt\n";}
$sthCrows=mysqli_num_rows($rslt);
if ($sthCrows > 0)
{
$aryC=mysqli_fetch_row($rslt);
$Gstate_call_time_state = $aryC[1];
if ($Gstate_call_time_state == $state)
{
$Gstate_call_time_id = $aryC[0];
$Gsct_default_start = $aryC[4];
$Gsct_default_stop = $aryC[5];
$Gsct_sunday_start = $aryC[6];
$Gsct_sunday_stop = $aryC[7];
$Gsct_monday_start = $aryC[8];
$Gsct_monday_stop = $aryC[9];
$Gsct_tuesday_start = $aryC[10];
$Gsct_tuesday_stop = $aryC[11];
$Gsct_wednesday_start = $aryC[12];
$Gsct_wednesday_stop = $aryC[13];
$Gsct_thursday_start = $aryC[14];
$Gsct_thursday_stop = $aryC[15];
$Gsct_friday_start = $aryC[16];
$Gsct_friday_stop = $aryC[17];
$Gsct_saturday_start = $aryC[18];
$Gsct_saturday_stop = $aryC[19];
$Sct_holidays = $aryC[20];
$ct_states .="'$Gstate_call_time_state',";
### BEGIN Check for outbound state holiday ###
$Sholiday_id = '';
if ((strlen($Sct_holidays)>2) or ((strlen($holiday_id)>2) and (strlen($Sholiday_id)<2)))
{
# Apply state holiday
if (strlen($Sct_holidays)>2)
{
$Sct_holidaysSQL = preg_replace("/\|/", "','", "$Sct_holidays");
$Sct_holidaysSQL = "'".$Sct_holidaysSQL."'";
$stmt = "SELECT holiday_id,holiday_date,holiday_name,ct_default_start,ct_default_stop from vicidial_call_time_holidays where holiday_id IN($Sct_holidaysSQL) and holiday_status='ACTIVE' and holiday_date='$YMD' order by holiday_id;";
$holidaytype = "STATE CALL TIME HOLIDAY FOUND! ";
}
# Apply call time wide holiday
elseif ((strlen($holiday_id)>2) and (strlen($Sholiday_id)<2))
{
$stmt = "SELECT holiday_id,holiday_date,holiday_name,ct_default_start,ct_default_stop from vicidial_call_time_holidays where holiday_id='$holiday_id' and holiday_status='ACTIVE' and holiday_date='$YMD' order by holiday_id;";
$holidaytype = "NO STATE HOLIDAY APPLYING CALL TIME HOLIDAY! ";
}
$rslt=mysql_to_mysqli($stmt, $link);
if ($DB) {echo "$stmt\n";}
$sthCrows=mysqli_num_rows($rslt);
if ($sthCrows > 0)
{
$aryC=mysqli_fetch_row($rslt);
$Sholiday_id = $aryC[0];
$Sholiday_date = $aryC[1];
$Sholiday_name = $aryC[2];
if ( ($Gsct_default_start < $aryC[3]) && ($Gsct_default_stop > 0) ) {$Gsct_default_start = $aryC[3];}
if ( ($Gsct_default_stop > $aryC[4]) && ($Gsct_default_stop > 0) ) {$Gsct_default_stop = $aryC[4];}
if ( ($Gsct_sunday_start < $aryC[3]) && ($Gsct_sunday_stop > 0) ) {$Gsct_sunday_start = $aryC[3];}
if ( ($Gsct_sunday_stop > $aryC[4]) && ($Gsct_sunday_stop > 0) ) {$Gsct_sunday_stop = $aryC[4];}
if ( ($Gsct_monday_start < $aryC[3]) && ($Gsct_monday_stop > 0) ) {$Gsct_monday_start = $aryC[3];}
if ( ($Gsct_monday_stop > $aryC[4]) && ($Gsct_monday_stop > 0) ) {$Gsct_monday_stop = $aryC[4];}
if ( ($Gsct_tuesday_start < $aryC[3]) && ($Gsct_tuesday_stop > 0) ) {$Gsct_tuesday_start = $aryC[3];}
if ( ($Gsct_tuesday_stop > $aryC[4]) && ($Gsct_tuesday_stop > 0) ) {$Gsct_tuesday_stop = $aryC[4];}
if ( ($Gsct_wednesday_start < $aryC[3]) && ($Gsct_wednesday_stop > 0) ) {$Gsct_wednesday_start = $aryC[3];}
if ( ($Gsct_wednesday_stop > $aryC[4]) && ($Gsct_wednesday_stop > 0) ) {$Gsct_wednesday_stop = $aryC[4];}
if ( ($Gsct_thursday_start < $aryC[3]) && ($Gsct_thursday_stop > 0) ) {$Gsct_thursday_start = $aryC[3];}
if ( ($Gsct_thursday_stop > $aryC[4]) && ($Gsct_thursday_stop > 0) ) {$Gsct_thursday_stop = $aryC[4];}
if ( ($Gsct_friday_start < $aryC[3]) && ($Gsct_friday_stop > 0) ) {$Gsct_friday_start = $aryC[3];}
if ( ($Gsct_friday_stop > $aryC[4]) && ($Gsct_friday_stop > 0) ) {$Gsct_friday_stop = $aryC[4];}
if ( ($Gsct_saturday_start < $aryC[3]) && ($Gsct_saturday_stop > 0) ) {$Gsct_saturday_start = $aryC[3];}
if ( ($Gsct_saturday_stop > $aryC[4]) && ($Gsct_saturday_stop > 0) ) {$Gsct_saturday_stop = $aryC[4];}
if ($DB) {echo "$holidaytype |$Gstate_call_time_id|$Gstate_call_time_state|$Sholiday_id|$Sholiday_date|$Sholiday_name|$Gsct_default_start|$Gsct_default_stop|\n";}
}
}
}
}
}
$b++;
}
}
### END Check for outbound state holiday ###
if(strlen($Gstate_call_time_id)>2){
# STATE RULES
if ($GMT_day==0) #### Sunday local time
{
if (($Gsct_sunday_start==0) && ($Gsct_sunday_stop==0))
{
if ( ($GMT_hour>=$Gsct_default_start) && ($GMT_hour<$Gsct_default_stop) )
{$dialable=1;}
}
else
{
if ( ($GMT_hour>=$Gsct_sunday_start) && ($GMT_hour<$Gsct_sunday_stop) )
{$dialable=1;}
}
}
if ($GMT_day==1) #### Monday local time
{
if (($Gsct_monday_start==0) && ($Gsct_monday_stop==0))
{
if ( ($GMT_hour>=$Gsct_default_start) && ($GMT_hour<$Gsct_default_stop) )
{$dialable=1;}
}
else
{
if ( ($GMT_hour>=$Gsct_monday_start) && ($GMT_hour<$Gsct_monday_stop) )
{$dialable=1;}
}
}
if ($GMT_day==2) #### Tuesday local time
{
if (($Gsct_tuesday_start==0) && ($Gsct_tuesday_stop==0))
{
if ( ($GMT_hour>=$Gsct_default_start) && ($GMT_hour<$Gsct_default_stop) )
{$dialable=1;}
}
else
{
if ( ($GMT_hour>=$Gsct_tuesday_start) && ($GMT_hour<$Gsct_tuesday_stop) )
{$dialable=1;}
}
}
if ($GMT_day==3) #### Wednesday local time
{
if (($Gsct_wednesday_start==0) && ($Gsct_wednesday_stop==0))
{
if ( ($GMT_hour>=$Gsct_default_start) && ($GMT_hour<$Gsct_default_stop) )
{$dialable=1;}
}
else
{
if ( ($GMT_hour>=$Gsct_wednesday_start) && ($GMT_hour<$Gsct_wednesday_stop) )
{$dialable=1;}
}
}
if ($GMT_day==4) #### Thursday local time
{
if (($Gsct_thursday_start==0) && ($Gsct_thursday_stop==0))
{
if ( ($GMT_hour>=$Gsct_default_start) && ($GMT_hour<$Gsct_default_stop) )
{$dialable=1;}
}
else
{
if ( ($GMT_hour>=$Gsct_thursday_start) && ($GMT_hour<$Gsct_thursday_stop) )
{$dialable=1;}
}
}
if ($GMT_day==5) #### Friday local time
{
if (($Gsct_friday_start==0) && ($Gsct_friday_stop==0))
{
if ( ($GMT_hour>=$Gsct_default_start) && ($GMT_hour<$Gsct_default_stop) )
{$dialable=1;}
}
else
{
if ( ($GMT_hour>=$Gsct_friday_start) && ($GMT_hour<$Gsct_friday_stop) )
{$dialable=1;}
}
}
if ($GMT_day==6) #### Saturday local time
{
if (($Gsct_saturday_start==0) && ($Gsct_saturday_stop==0))
{
if ( ($GMT_hour>=$Gsct_default_start) && ($GMT_hour<$Gsct_default_stop) )
{$dialable=1;}
}
else
{
if ( ($GMT_hour>=$Gsct_saturday_start) && ($GMT_hour<$Gsct_saturday_stop) )
{$dialable=1;}
}
}
} else {
#NO STATE RULES
if ($GMT_day==0) #### Sunday local time
{
if (($Gct_sunday_start==0) and ($Gct_sunday_stop==0))
{
if ( ($GMT_hour>=$Gct_default_start) and ($GMT_hour<$Gct_default_stop) )
{$dialable=1;}
}
else
{
if ( ($GMT_hour>=$Gct_sunday_start) and ($GMT_hour<$Gct_sunday_stop) )
{$dialable=1;}
}
}
if ($GMT_day==1) #### Monday local time
{
if (($Gct_monday_start==0) and ($Gct_monday_stop==0))
{
if ( ($GMT_hour>=$Gct_default_start) and ($GMT_hour<$Gct_default_stop) )
{$dialable=1;}
}
else
{
if ( ($GMT_hour>=$Gct_monday_start) and ($GMT_hour<$Gct_monday_stop) )
{$dialable=1;}
}
}
if ($GMT_day==2) #### Tuesday local time
{
if (($Gct_tuesday_start==0) and ($Gct_tuesday_stop==0))
{
if ( ($GMT_hour>=$Gct_default_start) and ($GMT_hour<$Gct_default_stop) )
{$dialable=1;}
}
else
{
if ( ($GMT_hour>=$Gct_tuesday_start) and ($GMT_hour<$Gct_tuesday_stop) )
{$dialable=1;}
}
}
if ($GMT_day==3) #### Wednesday local time
{
if (($Gct_wednesday_start==0) and ($Gct_wednesday_stop==0))
{
if ( ($GMT_hour>=$Gct_default_start) and ($GMT_hour<$Gct_default_stop) )
{$dialable=1;}
}
else
{
if ( ($GMT_hour>=$Gct_wednesday_start) and ($GMT_hour<$Gct_wednesday_stop) )
{$dialable=1;}
}
}
if ($GMT_day==4) #### Thursday local time
{
if (($Gct_thursday_start==0) and ($Gct_thursday_stop==0))
{
if ( ($GMT_hour>=$Gct_default_start) and ($GMT_hour<$Gct_default_stop) )
{$dialable=1;}
}
else
{
if ( ($GMT_hour>=$Gct_thursday_start) and ($GMT_hour<$Gct_thursday_stop) )
{$dialable=1;}
}
}
if ($GMT_day==5) #### Friday local time
{
if (($Gct_friday_start==0) and ($Gct_friday_stop==0))
{
if ( ($GMT_hour>=$Gct_default_start) and ($GMT_hour<$Gct_default_stop) )
{$dialable=1;}
}
else
{
if ( ($GMT_hour>=$Gct_friday_start) and ($GMT_hour<$Gct_friday_stop) )
{$dialable=1;}
}
}
if ($GMT_day==6) #### Saturday local time
{
if (($Gct_saturday_start==0) and ($Gct_saturday_stop==0))
{
if ( ($GMT_hour>=$Gct_default_start) and ($GMT_hour<$Gct_default_stop) )
{$dialable=1;}
}
else
{
if ( ($GMT_hour>=$Gct_saturday_start) and ($GMT_hour<$Gct_saturday_stop) )
{$dialable=1;}
}
}
}
else
{
if ( ($GMT_hour>=$Gct_monday_start) and ($GMT_hour<$Gct_monday_stop) )
{$dialable=1;}
}
}
if ($GMT_day==2) #### Tuesday local time
{
if (($Gct_tuesday_start==0) and ($Gct_tuesday_stop==0))
{
if ( ($GMT_hour>=$Gct_default_start) and ($GMT_hour<$Gct_default_stop) )
{$dialable=1;}
}
else
{
if ( ($GMT_hour>=$Gct_tuesday_start) and ($GMT_hour<$Gct_tuesday_stop) )
{$dialable=1;}
}
}
if ($GMT_day==3) #### Wednesday local time
{
if (($Gct_wednesday_start==0) and ($Gct_wednesday_stop==0))
{
if ( ($GMT_hour>=$Gct_default_start) and ($GMT_hour<$Gct_default_stop) )
{$dialable=1;}
}
else
{
if ( ($GMT_hour>=$Gct_wednesday_start) and ($GMT_hour<$Gct_wednesday_stop) )
{$dialable=1;}
}
}
if ($GMT_day==4) #### Thursday local time
{
if (($Gct_thursday_start==0) and ($Gct_thursday_stop==0))
{
if ( ($GMT_hour>=$Gct_default_start) and ($GMT_hour<$Gct_default_stop) )
{$dialable=1;}
}
else
{
if ( ($GMT_hour>=$Gct_thursday_start) and ($GMT_hour<$Gct_thursday_stop) )
{$dialable=1;}
}
}
if ($GMT_day==5) #### Friday local time
{
if (($Gct_friday_start==0) and ($Gct_friday_stop==0))
{
if ( ($GMT_hour>=$Gct_default_start) and ($GMT_hour<$Gct_default_stop) )
{$dialable=1;}
}
else
{
if ( ($GMT_hour>=$Gct_friday_start) and ($GMT_hour<$Gct_friday_stop) )
{$dialable=1;}
}
}
if ($GMT_day==6) #### Saturday local time
{
if (($Gct_saturday_start==0) and ($Gct_saturday_stop==0))
{
if ( ($GMT_hour>=$Gct_default_start) and ($GMT_hour<$Gct_default_stop) )
{$dialable=1;}
}
else
{
if ( ($GMT_hour>=$Gct_saturday_start) and ($GMT_hour<$Gct_saturday_stop) )
{$dialable=1;}
}
}
return $dialable;
}
+800 -89
View File
File diff suppressed because it is too large Load Diff
+9 -6
View File
@@ -466,10 +466,11 @@
# 141229-1429 - Changed single-quote QXZ arguments to double-quotes
# 150101-1516 - Updated for 2015
# 150108-1725 - Added more validation for API transfer commands
# 150111-1545 - Added manual_dial_search_filter campaign option(Issue #812)
#
$version = '2.10-437c';
$build = '150108-1725';
$version = '2.10-438c';
$build = '150111-1545';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=85;
$one_mysql_log=0;
@@ -1560,7 +1561,7 @@ else
$HKstatusnames = substr("$HKstatusnames", 0, -1);
##### grab the campaign settings
$stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,manual_preview_dial,api_manual_dial,manual_dial_call_time_check,my_callback_option,per_call_notes,agent_lead_search,agent_lead_search_method,queuemetrics_phone_environment,auto_pause_precall,auto_pause_precall_code,auto_resume_precall,manual_dial_cid,custom_3way_button_transfer,callback_days_limit,disable_dispo_screen,disable_dispo_status,screen_labels,status_display_fields,pllb_grouping,pllb_grouping_limit,in_group_dial,in_group_dial_select,pause_after_next_call,owner_populate,manual_dial_lead_id,dead_max,dispo_max,pause_max,dead_max_dispo,dispo_max_dispo,max_inbound_calls,manual_dial_search_checkbox,hide_call_log_info,timer_alt_seconds,wrapup_bypass,wrapup_after_hotkey,callback_active_limit,callback_active_limit_override,comments_all_tabs,comments_dispo_screen,comments_callback_screen,qc_comment_history,show_previous_callback,clear_script FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
$stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,manual_preview_dial,api_manual_dial,manual_dial_call_time_check,my_callback_option,per_call_notes,agent_lead_search,agent_lead_search_method,queuemetrics_phone_environment,auto_pause_precall,auto_pause_precall_code,auto_resume_precall,manual_dial_cid,custom_3way_button_transfer,callback_days_limit,disable_dispo_screen,disable_dispo_status,screen_labels,status_display_fields,pllb_grouping,pllb_grouping_limit,in_group_dial,in_group_dial_select,pause_after_next_call,owner_populate,manual_dial_lead_id,dead_max,dispo_max,pause_max,dead_max_dispo,dispo_max_dispo,max_inbound_calls,manual_dial_search_checkbox,hide_call_log_info,timer_alt_seconds,wrapup_bypass,wrapup_after_hotkey,callback_active_limit,callback_active_limit_override,comments_all_tabs,comments_dispo_screen,comments_callback_screen,qc_comment_history,show_previous_callback,clear_script,manual_dial_search_filter FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01013',$VD_login,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
@@ -1690,6 +1691,7 @@ else
$qc_comment_history = $row[122];
$show_previous_callback = $row[123];
$clear_script = $row[124];
$manual_dial_search_filter =$row[125];
if ( ($callback_active_limit_override == 'Y') and ($callback_active_limit > 0) )
{
@@ -3825,6 +3827,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var vdc_header_phone_format = '<?php echo $vdc_header_phone_format ?>';
var disable_alter_custphone = '<?php echo $disable_alter_custphone ?>';
var manual_dial_filter = '<?php echo $manual_dial_filter ?>';
var manual_dial_search_filter = '<?php echo $manual_dial_search_filter ?>';
var CopY_tO_ClipboarD = '<?php echo $CopY_tO_ClipboarD ?>';
var inOUT = 'OUT';
var useIE = '<?php echo $useIE ?>';
@@ -7763,7 +7766,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
else
{var call_prefix = manual_dial_prefix;}
manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method + "&manual_dial_call_time_check=" + manual_dial_call_time_check + "&qm_extension=" + qm_extension + "&dial_ingroup=" + active_ingroup_dial + "&nocall_dial_flag=" + nocall_dial_flag + "&cid_lock=" + cid_lock;
manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + call_prefix + "&campaign_cid=" + call_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter + "&manual_dial_search_filter=" + manual_dial_search_filter + "&vendor_lead_code=" + mdVendorid + "&usegroupalias=" + mdgroupalias + "&account=" + active_group_alias + "&agent_dialed_number=" + agent_dialed_number + "&agent_dialed_type=" + agent_dialed_type + "&vtiger_callback_id=" + vtiger_callback_id + "&dial_method=" + dial_method + "&manual_dial_call_time_check=" + manual_dial_call_time_check + "&qm_extension=" + qm_extension + "&dial_ingroup=" + active_ingroup_dial + "&nocall_dial_flag=" + nocall_dial_flag + "&cid_lock=" + cid_lock;
// alert(manual_dial_filter + "\n" +manDiaLnext_query);
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
@@ -7773,8 +7776,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
var MDnextResponse = null;
// alert(manDiaLnext_query);
// alert(xmlhttp.responseText);
// alert(manDiaLnext_query + "\n" + xmlhttp.responseText);
// document.getElementById("debugbottomspan").innerHTML = manDiaLnext_query + "\n" + xmlhttp.responseText;
MDnextResponse = xmlhttp.responseText;
if (active_ingroup_dial.length > 0)
+708 -73
View File
File diff suppressed because one or more lines are too long
+12 -1
View File
@@ -33,6 +33,7 @@
# 141212-0945 - Added user_choose_language, selected_language and language_method
# 141230-1503 - Added code for on-the-fly language translations display
# 150107-1954 - Added users-ignore_group_on_search
# 150111-1542 - Added lists-local_call_time and manual_dial_search_filter
#
require("dbconnect_mysqli.php");
@@ -1195,7 +1196,7 @@ if ($SSoutbound_autodial_active > 0)
<BR>
<A NAME="campaigns-local_call_time">
<BR>
<B><?php echo _QXZ("Local Call Time"); ?> -</B><?php echo _QXZ("This is where you set during which hours you would like to dial, as determined by the local time in the are in which you are calling. This is controlled by area code and is adjusted for Daylight Savings time if applicable. General Guidelines in the USA for Business to Business is 9am to 5pm and Business to Consumer calls is 9am to 9pm."); ?>
<B><?php echo _QXZ("Local Call Time"); ?> -</B><?php echo _QXZ("This is where you set during which hours you would like to dial, as determined by the local time in the area in which you are calling. This is controlled by area code and is adjusted for Daylight Savings time if applicable. General Guidelines in the USA for Business to Business is 9am to 5pm and Business to Consumer calls is 9am to 9pm."); ?>
<BR>
<A NAME="campaigns-dial_prefix">
@@ -1552,6 +1553,11 @@ if ($SSoutbound_autodial_active > 0)
<BR>
<B><?php echo _QXZ("Manual Dial Search Checkbox"); ?> -</B><?php echo _QXZ("This allows you to define if you want the manual dial search checkbox to be selected by default or not. If an option with RESET is chosen, then the checkbox will be reset after every call. Default is SELECTED."); ?>
<BR>
<A NAME="campaigns-manual_dial_search_filter">
<BR>
<B><?php echo _QXZ("Manual Dial Search Filter"); ?> -</B><?php echo _QXZ("This allows the agent to search only within lists belonging to this campaign when the agent has the Manual Dial Search Checkbox selected in the manual dial screen. The options are, CAMPLISTS_ONLY - will check for the number within the active lists for the campaign, CAMPLISTS_ALL - will also include inactive lists in the search for the number, NONE - no filter on manual dial searching. Default is NONE. If a lead is not found, then a new lead will be added."); ?>
<BR>
<A NAME="campaigns-manual_preview_dial">
<BR>
@@ -1858,6 +1864,11 @@ if ($SSqc_features_active > 0)
<BR>
<B><?php echo _QXZ("Expiration Date"); ?> -</B><?php echo _QXZ("This option allows you to set the date after which leads in this list will not be allowed to be auto-dialed or manual-list-dialed by the system. Default is 2099-12-31."); ?>
<BR>
<A NAME="lists-local_call_time">
<BR>
<B><?php echo _QXZ("Local Call Time"); ?> -</B><?php echo _QXZ("This is a setting for this list only, where you set during which hours you would like to dial leads within this specific list, as determined by the local time in the area in which you are calling. This is controlled by the time zone, as defined by that list setting, and is adjusted for Daylight Savings time if applicable. However, state rules are based on the state field for the lead and not only the time zone that is set. This call time setting is applied after the campaign local call time has been applied to the list and will NOT override the campaign settings. This setting will only narrow down call times in relation to the campaign local call time setting. It will NOT allow calling outside the hours set by the campaign local call time setting. This is useful if you have lists that need different call times within the same campaign. For example calling business numbers between 9am to 5pm and consumer phones between 9am to 9pm within the same campaign. General Guidelines in the USA for Business to Business is 9am to 5pm and Business to Consumer calls is 9am to 9pm. Default is campaign."); ?>
<BR>
<A NAME="lists-audit_comments">
<BR>