diff --git a/UPGRADE b/UPGRADE
index 45f18fa6..5e7b86e5 100644
--- a/UPGRADE
+++ b/UPGRADE
@@ -120,6 +120,8 @@ OTHER CHANGES:
26. Added QM Socket-Send functionality for custom queue_log record sending.
+27. Added inbound call time holiday functions.
+
diff --git a/agi/agi-VDAD_ALL_inbound.agi b/agi/agi-VDAD_ALL_inbound.agi
index dd10b102..33f61924 100644
--- a/agi/agi-VDAD_ALL_inbound.agi
+++ b/agi/agi-VDAD_ALL_inbound.agi
@@ -179,6 +179,7 @@
# 121025-2210 - If AGENTDIRECT and no agent defined, set drop call seconds to 1
# 121114-1936 - Added INGROUP recording option
# 121120-0921 - Added QM socket-send functionality
+# 121124-1345 - Added call times holidays function
#
$script = 'agi-VDAD_ALL_inbound.agi';
@@ -802,7 +803,7 @@ if ($wday==6)
}
### Grab call_times values from the database
-$stmtA = "SELECT ct_default_start,ct_default_stop,default_afterhours_filename_override $daySQL $yestSQL FROM vicidial_call_times where call_time_id = '$call_time_id';";
+$stmtA = "SELECT ct_default_start,ct_default_stop,default_afterhours_filename_override $daySQL $yestSQL,ct_holidays FROM vicidial_call_times where call_time_id = '$call_time_id';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -816,6 +817,7 @@ $ct_day_stop = $aryA[4];
$day_afterhours_filename_override = $aryA[5];
$ct_yest_start = $aryA[6];
$ct_yest_stop = $aryA[7];
+$ct_holidays = $aryA[8];
$sthA->finish();
if ( ($ct_yest_start < 1) && ($ct_yest_stop < 1) )
@@ -829,10 +831,58 @@ if ( ($ct_day_start > 0) || ($ct_day_stop > 0) )
$ct_default_stop = $ct_day_stop;
}
+if (length($ct_holidays) > 2)
+ {
+ $stmtA = "SELECT count(*) from vicidial_call_time_holidays where holiday_date='$YMD' and holiday_status='ACTIVE';";
+ if ($DBX) {print " |$stmtA|\n";}
+ $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
+ $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
+ @aryA = $sthA->fetchrow_array;
+ $holiday_today_count = $aryA[0];
+ if ($AGILOG) {$agi_string = "Holiday check: |$holiday_today_count|$stmtA|$ct_holidays|"; &agi_output;}
+
+ $ct_hrs=0;
+ $b=0;
+ if ($holiday_today_count > 0)
+ {
+ @holiday_rules = split(/\|/,$ct_holidays);
+ $ct_hrs = ($#holiday_rules - 0);
+ while($ct_hrs >= $b)
+ {
+ if (length($holiday_rules[$b])>1)
+ {
+ $stmtA = "SELECT holiday_id,holiday_date,holiday_name,ct_default_start,ct_default_stop,default_afterhours_filename_override from vicidial_call_time_holidays where holiday_id='$holiday_rules[$b]' and holiday_status='ACTIVE' and holiday_date='$YMD';";
+ if ($DBX) {print " |$stmtA|\n";}
+ $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
+ $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
+ $sthArows=$sthA->rows;
+ if ($sthArows > 0)
+ {
+ @aryA = $sthA->fetchrow_array;
+ $holiday_id = $aryA[0];
+ $holiday_date = $aryA[1];
+ $holiday_name = $aryA[2];
+ $ct_default_start = $aryA[3];
+ $ct_default_stop = $aryA[4];
+ $default_afterhours_filename_override = $aryA[5];
+ $holiday_afterhours_filename_override = $aryA[5];
+
+ if ($AGILOG) {$agi_string = "Active Holiday found! |$holiday_id|$holiday_date|$holiday_name|$ct_default_start|$ct_default_stop|$default_afterhours_filename_override|"; &agi_output;}
+ }
+ $sthA->finish();
+ }
+ $b++;
+ }
+ }
+ }
+
+
if ( (length($deafult_afterhours_filename_override) > 0) && ($deafult_afterhours_filename_override !~ /---NONE---/) )
{$after_hours_message_filename = $deafult_afterhours_filename_override;}
if ( (length($day_afterhours_filename_override) > 0) && ($day_afterhours_filename_override !~ /---NONE---/) )
{$after_hours_message_filename = $day_afterhours_filename_override;}
+if ( (length($holiday_afterhours_filename_override) > 0) && ($holiday_afterhours_filename_override !~ /---NONE---/) )
+ {$after_hours_message_filename = $holiday_afterhours_filename_override;}
# send call to after hours action if in-group is set to inactive
if ($ingroup_active !~ /Y/)
diff --git a/agi/agi-VDAD_inbound_calltime_check.agi b/agi/agi-VDAD_inbound_calltime_check.agi
index a656159b..51e2f461 100644
--- a/agi/agi-VDAD_inbound_calltime_check.agi
+++ b/agi/agi-VDAD_inbound_calltime_check.agi
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
-# agi-VDAD_inbound_calltime_check.agi version 2.4
+# agi-VDAD_inbound_calltime_check.agi version 2.6
#
# Runs when a call comes in from an inbound call. This script will check the
# settings of the defined calltime scheme in VICIDIAL and either send the call
@@ -48,6 +48,7 @@
# 120706-1659 - Added Qualify SQL option
# 120719-1411 - Fixed issue with inbound IVR calls not showing up in real-time screen
# 120730-0727 - Fixed issue with non-populating phone number
+# 121124-1414 - Added call times holidays function
#
$script = 'agi-VDAD_inbound_calltime_check.agi';
@@ -67,6 +68,7 @@ $hm = ($hm + 0);
$now_date_epoch = time();
$now_date = "$year-$mon-$mday $hour:$min:$sec";
$CLInow_date = "$year-$mon-$mday\\ $hour:$min:$sec";
+$YMD = "$year-$mon-$mday";
$start_time=$now_date;
$CIDdate = "$mon$mday$hour$min$sec";
$tsSQLdate = "$year$mon$mday$hour$min$sec";
@@ -437,7 +439,7 @@ $ct_default_start = '0';
$ct_default_stop = '9999';
### Grab call_times values from the database
-$stmtA = "SELECT ct_default_start,ct_default_stop $daySQL $yestSQL FROM vicidial_call_times where call_time_id = '$call_time_id';";
+$stmtA = "SELECT ct_default_start,ct_default_stop $daySQL $yestSQL,ct_holidays FROM vicidial_call_times where call_time_id = '$call_time_id';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -450,6 +452,7 @@ if ($sthArows > 0)
$ct_day_stop = $aryA[3];
$ct_yest_start = $aryA[4];
$ct_yest_stop = $aryA[5];
+ $ct_holidays = $aryA[6];
$sthA->finish();
if ( ($ct_yest_start < 1) && ($ct_yest_stop < 1) )
@@ -464,6 +467,50 @@ if ($sthArows > 0)
}
}
+if (length($ct_holidays) > 2)
+ {
+ $stmtA = "SELECT count(*) from vicidial_call_time_holidays where holiday_date='$YMD' and holiday_status='ACTIVE';";
+ if ($DBX) {print " |$stmtA|\n";}
+ $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
+ $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
+ @aryA = $sthA->fetchrow_array;
+ $holiday_today_count = $aryA[0];
+ if ($AGILOG) {$agi_string = "Holiday check: |$holiday_today_count|$stmtA|$ct_holidays|"; &agi_output;}
+
+ $ct_hrs=0;
+ $b=0;
+ if ($holiday_today_count > 0)
+ {
+ @holiday_rules = split(/\|/,$ct_holidays);
+ $ct_hrs = ($#holiday_rules - 0);
+ while($ct_hrs >= $b)
+ {
+ if (length($holiday_rules[$b])>1)
+ {
+ $stmtA = "SELECT holiday_id,holiday_date,holiday_name,ct_default_start,ct_default_stop,default_afterhours_filename_override from vicidial_call_time_holidays where holiday_id='$holiday_rules[$b]' and holiday_status='ACTIVE' and holiday_date='$YMD';";
+ if ($DBX) {print " |$stmtA|\n";}
+ $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
+ $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
+ $sthArows=$sthA->rows;
+ if ($sthArows > 0)
+ {
+ @aryA = $sthA->fetchrow_array;
+ $holiday_id = $aryA[0];
+ $holiday_date = $aryA[1];
+ $holiday_name = $aryA[2];
+ $ct_default_start = $aryA[3];
+ $ct_default_stop = $aryA[4];
+ $default_afterhours_filename_override = $aryA[5];
+
+ if ($AGILOG) {$agi_string = "Active Holiday found! |$holiday_id|$holiday_date|$holiday_name|$ct_default_start|$ct_default_stop|$default_afterhours_filename_override|"; &agi_output;}
+ }
+ $sthA->finish();
+ }
+ $b++;
+ }
+ }
+ }
+
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
diff --git a/bin/ADMIN_keepalive_ALL.pl b/bin/ADMIN_keepalive_ALL.pl
index d7f9be11..d6c3c4cf 100644
--- a/bin/ADMIN_keepalive_ALL.pl
+++ b/bin/ADMIN_keepalive_ALL.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
-# ADMIN_keepalive_ALL.pl version 2.4
+# ADMIN_keepalive_ALL.pl version 2.6
#
# Designed to keep the astGUIclient processes alive and check every minute
# Replaces all other ADMIN_keepalive scripts
@@ -75,6 +75,7 @@
# 120706-1325 - Added Call Menu qualify SQL option
# 120820-1026 - Added clearing of vicidial_session_data table at end of day
# 121019-1021 - Added voicemail greeting option
+# 121124-1440 - Added holiday expiration function
#
$DB=0; # Debug flag
@@ -639,7 +640,7 @@ $sthArows=$sthA->rows;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
- $timeclock_end_of_day_NOW = "$aryA[0]";
+ $timeclock_end_of_day_NOW = $aryA[0];
}
$sthA->finish();
@@ -935,8 +936,7 @@ if ($timeclock_end_of_day_NOW > 0)
if ($DB) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
-
- ##### BEGIN max stats end of day process #####
+ ### calculate the date and time for 24 hours ago
$secX = time();
$RMtarget = ($secX - 86400); # 24 hours ago
($RMsec,$RMmin,$RMhour,$RMmday,$RMmon,$RMyear,$RMwday,$RMyday,$RMisdst) = localtime($RMtarget);
@@ -948,7 +948,16 @@ if ($timeclock_end_of_day_NOW > 0)
if ($RMmin < 10) {$RMmin = "0$RMmin";}
if ($RMsec < 10) {$RMsec = "0$RMsec";}
$RMSQLdate = "$RMyear-$RMmon-$RMmday $RMhour:$RMmin:$RMsec";
+ $RMdate = "$RMyear-$RMmon-$RMmday";
+ # set past holidays to EXPIRED status
+ $stmtA = "UPDATE vicidial_call_time_holidays SET holiday_status='EXPIRED' where holiday_date < \"$RMdate\" and holiday_status!='EXPIRED';";
+ if($DBX){print STDERR "\n|$stmtA|\n";}
+ $affected_rows = $dbhA->do($stmtA);
+ if($DB){print STDERR "\n|$affected_rows Holidays set to expired|\n";}
+
+
+ ##### BEGIN max stats end of day process #####
# set OPEN max stats records to CLOSING for processing
$stmtA = "UPDATE vicidial_daily_max_stats SET stats_flag='CLOSING' where stats_flag='OPEN';";
if($DBX){print STDERR "\n|$stmtA|\n";}
diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql
index 5d9592da..1752750a 100644
--- a/extras/MySQL_AST_CREATE_tables.sql
+++ b/extras/MySQL_AST_CREATE_tables.sql
@@ -1252,7 +1252,8 @@ wednesday_afterhours_filename_override VARCHAR(255) default '',
thursday_afterhours_filename_override VARCHAR(255) default '',
friday_afterhours_filename_override VARCHAR(255) default '',
saturday_afterhours_filename_override VARCHAR(255) default '',
-user_group VARCHAR(20) default '---ALL---'
+user_group VARCHAR(20) default '---ALL---',
+ct_holidays TEXT default ''
);
CREATE TABLE vicidial_state_call_times (
@@ -2754,6 +2755,18 @@ audit_comments_enabled TINYINT(1) DEFAULT NULL COMMENT 'invisible',
PRIMARY KEY (list_id)
);
+CREATE TABLE vicidial_call_time_holidays (
+holiday_id VARCHAR(30) PRIMARY KEY NOT NULL,
+holiday_name VARCHAR(100) NOT NULL,
+holiday_comments VARCHAR(255) default '',
+holiday_date DATE,
+holiday_status ENUM('ACTIVE','INACTIVE','EXPIRED') default 'INACTIVE',
+ct_default_start SMALLINT(4) unsigned NOT NULL default '900',
+ct_default_stop SMALLINT(4) unsigned NOT NULL default '2100',
+default_afterhours_filename_override VARCHAR(255) default '',
+user_group VARCHAR(20) default '---ALL---'
+);
+
ALTER TABLE vicidial_qc_codes ADD qc_result_type ENUM( 'PASS', 'FAIL', 'CANCEL', 'COMMIT' ) NOT NULL;
@@ -2987,4 +3000,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='1332',db_schema_update_date=NOW();
+UPDATE system_settings SET db_schema_version='1333',db_schema_update_date=NOW();
diff --git a/extras/upgrade_2.6.sql b/extras/upgrade_2.6.sql
index 84f8259f..cd9ce38a 100644
--- a/extras/upgrade_2.6.sql
+++ b/extras/upgrade_2.6.sql
@@ -166,3 +166,20 @@ ALTER TABLE system_settings ADD queuemetrics_socket VARCHAR(20) default 'NONE';
ALTER TABLE system_settings ADD queuemetrics_socket_url TEXT;
UPDATE system_settings SET db_schema_version='1332',db_schema_update_date=NOW() where db_schema_version < 1332;
+
+CREATE TABLE vicidial_call_time_holidays (
+holiday_id VARCHAR(30) PRIMARY KEY NOT NULL,
+holiday_name VARCHAR(100) NOT NULL,
+holiday_comments VARCHAR(255) default '',
+holiday_date DATE,
+holiday_status ENUM('ACTIVE','INACTIVE','EXPIRED') default 'INACTIVE',
+ct_default_start SMALLINT(4) unsigned NOT NULL default '900',
+ct_default_stop SMALLINT(4) unsigned NOT NULL default '2100',
+default_afterhours_filename_override VARCHAR(255) default '',
+user_group VARCHAR(20) default '---ALL---'
+);
+
+ALTER TABLE vicidial_call_times ADD ct_holidays TEXT default '';
+UPDATE vicidial_call_times SET ct_holidays='' where ct_holidays is NULL;
+
+UPDATE system_settings SET db_schema_version='1333',db_schema_update_date=NOW() where db_schema_version < 1333;
diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.6.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.6.txt
index 0b35f81f..ec17f382 100644
--- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.6.txt
+++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.6.txt
@@ -35,6 +35,43 @@ QueueMetrics Socket Send||
This option, if enabled, will send QM data to a web page that will send it through a socket for logging. The CONNECT_COMPLETE option will send CONNECT, COMPLETEAGENT and COMPLETECALLER events to the url defined below. Default is NONE for disabled||
QueueMetrics Socket Send URL||
If Socket Send is enabled above, this is the URL that is used to send the data to. Default is EMPTY for disabled||
+Add Holiday||
+Modify Holiday||
+Delete Holiday||
+New Holiday Addition||
+Holidays||
+Holiday ID||
+This is the short name of a Holiday Definition. This needs to be a unique identifier. Do not use any spaces or punctuation for this field. max 30 characters, minimum of 2 characters||
+Holiday Name||
+This is a more descriptive name of the Holiday Definition. This is a short summary of the Holiday definition. max 100 characters, minimum of 2 characters||
+Holiday Comments||
+This is where you can place comments for a Holiday Definition such as -10am to 4pm boxing day restrictions-. max 255 characters||
+Holiday Date||
+This is the date of the holiday||
+Holiday Status||
+This is the status of the holiday entry. ACTIVE status means that the holiday will be enabled on the holiday date. INACTIVE status means that the holiday will be ignored even on the holiday date. EXPIRED means that the holiday has passed it's holiday date. Default is INACTIVE||
+short description of the holiday||
+Day and time options will appear once you have created the Holiday Definition||
+HOLIDAY DEFINITION NOT ADDED||
+there is already a holiday entry with this ID||
+Holiday ID, name and date must be populated||
+HOLIDAY ADDED||
+HOLIDAY NOT MODIFIED||
+HOLIDAY MODIFIED||
+HOLIDAY NOT DELETED||
+Holiday ID must be at least 2 characters in length||
+HOLIDAY DELETION CONFIRMATION||
+Click here to delete holiday||
+HOLIDAY DELETION COMPLETED||
+Holiday Rule Removed||
+MODIFY A HOLIDAY||
+CALL TIMES USING THIS HOLIDAY||
+DELETE THIS HOLIDAY DEFINITION||
+Active Inbound Holiday Definitions for this Record||
+Add inbound holiday rule||
+Holiday Rule Added||
+Holiday Rule Removed||
+Click here to see Admin changes to this holiday||
############################################################ CLIENT
diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php
index a729f17b..14da3622 100644
--- a/www/vicidial/admin.php
+++ b/www/vicidial/admin.php
@@ -1766,6 +1766,18 @@ if (isset($_GET["queuemetrics_socket"])) {$queuemetrics_socket=$_GET["queuemet
elseif (isset($_POST["queuemetrics_socket"])) {$queuemetrics_socket=$_POST["queuemetrics_socket"];}
if (isset($_GET["queuemetrics_socket_url"])) {$queuemetrics_socket_url=$_GET["queuemetrics_socket_url"];}
elseif (isset($_POST["queuemetrics_socket_url"])) {$queuemetrics_socket_url=$_POST["queuemetrics_socket_url"];}
+if (isset($_GET["holiday_id"])) {$holiday_id=$_GET["holiday_id"];}
+ elseif (isset($_POST["holiday_id"])) {$holiday_id=$_POST["holiday_id"];}
+if (isset($_GET["holiday_name"])) {$holiday_name=$_GET["holiday_name"];}
+ elseif (isset($_POST["holiday_name"])) {$holiday_name=$_POST["holiday_name"];}
+if (isset($_GET["holiday_comments"])) {$holiday_comments=$_GET["holiday_comments"];}
+ elseif (isset($_POST["holiday_comments"])) {$holiday_comments=$_POST["holiday_comments"];}
+if (isset($_GET["holiday_date"])) {$holiday_date=$_GET["holiday_date"];}
+ elseif (isset($_POST["holiday_date"])) {$holiday_date=$_POST["holiday_date"];}
+if (isset($_GET["holiday_status"])) {$holiday_status=$_GET["holiday_status"];}
+ elseif (isset($_POST["holiday_status"])) {$holiday_status=$_POST["holiday_status"];}
+if (isset($_GET["holiday_rule"])) {$holiday_rule=$_GET["holiday_rule"];}
+ elseif (isset($_POST["holiday_rule"])) {$holiday_rule=$_POST["holiday_rule"];}
if (isset($script_id)) {$script_id= strtoupper($script_id);}
@@ -2356,6 +2368,7 @@ if ($non_latin < 1)
$server_id = ereg_replace("[^-_0-9a-zA-Z]","",$server_id);
$stage = ereg_replace("[^-_0-9a-zA-Z]","",$stage);
$state_rule = ereg_replace("[^-_0-9a-zA-Z]","",$state_rule);
+ $holiday_rule = ereg_replace("[^-_0-9a-zA-Z]","",$holiday_rule);
$trunk_restriction = ereg_replace("[^-_0-9a-zA-Z]","",$trunk_restriction);
$user = ereg_replace("[^-_0-9a-zA-Z]","",$user);
$user_group = ereg_replace("[^-_0-9a-zA-Z]","",$user_group);
@@ -2505,6 +2518,9 @@ if ($non_latin < 1)
$in_group_dial = ereg_replace("[^-_0-9a-zA-Z]","",$in_group_dial);
$in_group_dial_select = ereg_replace("[^-_0-9a-zA-Z]","",$in_group_dial_select);
$queuemetrics_socket = ereg_replace("[^-_0-9a-zA-Z]","",$queuemetrics_socket);
+ $holiday_id = ereg_replace("[^-_0-9a-zA-Z]","",$holiday_id);
+ $holiday_date = ereg_replace("[^-_0-9a-zA-Z]","",$holiday_date);
+ $holiday_status = ereg_replace("[^-_0-9a-zA-Z]","",$holiday_status);
### ALPHA-NUMERIC and underscore and dash and slash and dot
$menu_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_prompt);
@@ -2659,6 +2675,8 @@ if ($non_latin < 1)
$group = ereg_replace("[^- \.\,\_0-9a-zA-Z]","",$group);
$job_title = ereg_replace("[^- \.\,\_0-9a-zA-Z]","",$job_title);
$location = ereg_replace("[^- \.\,\_0-9a-zA-Z]","",$location);
+ $holiday_name = ereg_replace("[^- \.\,\_0-9a-zA-Z]","",$holiday_name);
+ $holiday_comments = ereg_replace("[^- \.\,\_0-9a-zA-Z]","",$holiday_comments);
### ALPHA-NUMERIC and underscore and dash and slash and at and dot
$call_out_number_group = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$call_out_number_group);
@@ -3177,12 +3195,13 @@ else
# 121114-1923 - Added Basic Lead Management page link. Added INGROUP as a recording filename option
# 121116-1410 - Added QC functionality
# 121120-0824 - Added queuemetrics_socket functionality to system settings
+# 121123-1208 - Added inbound holiday functions
#
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time
-$admin_version = '2.6-383a';
-$build = '121120-0824';
+$admin_version = '2.6-384a';
+$build = '121123-1208';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -3510,6 +3529,7 @@ if ($ADD==11111111) {$hh='filters'; echo "Add New Filter";}
if ($ADD==111111111) {$hh='admin'; $sh='times'; echo "Add New Call Time";}
if ($ADD==131111111) {$hh='admin'; $sh='shifts'; echo "Add New Shift";}
if ($ADD==1111111111) {$hh='admin'; $sh='times'; echo "Add New State Call Time";}
+if ($ADD==1211111111) {$hh='admin'; $sh='times'; echo "Add Holiday";}
if ($ADD==11111111111) {$hh='admin'; $sh='phones'; echo "ADD NEW PHONE";}
if ($ADD==12111111111) {$hh='admin'; $sh='phones'; echo "ADD NEW PHONE ALIAS";}
if ($ADD==13111111111) {$hh='admin'; $sh='phones'; echo "ADD NEW GROUP ALIAS";}
@@ -3553,6 +3573,7 @@ if ($ADD==21111111) {$hh='filters'; echo "New Filter Addition";}
if ($ADD==211111111) {$hh='admin'; $sh='times'; echo "New Call Time Addition";}
if ($ADD==231111111) {$hh='admin'; $sh='shifts'; echo "New Shift Addition";}
if ($ADD==2111111111) {$hh='admin'; $sh='times'; echo "New State Call Time Addition";}
+if ($ADD==2211111111) {$hh='admin'; $sh='times'; echo "New Holiday Addition";}
if ($ADD==21111111111) {$hh='admin'; $sh='phones'; echo "ADDING NEW PHONE";}
if ($ADD==22111111111) {$hh='admin'; $sh='phones'; echo "ADDING NEW PHONE ALIAS";}
if ($ADD==23111111111) {$hh='admin'; $sh='phones'; echo "ADDING NEW GROUP ALIAS";}
@@ -3625,6 +3646,7 @@ if ($ADD==311111111) {$hh='admin'; $sh='times'; echo "Modify Call Time";}
if ($ADD==321111111) {$hh='admin'; $sh='times'; echo "Modify Call Time State Definitions List";}
if ($ADD==331111111) {$hh='admin'; $sh='shifts'; echo "Modify Shift";}
if ($ADD==3111111111) {$hh='admin'; $sh='times'; echo "Modify State Call Time";}
+if ($ADD==3211111111) {$hh='admin'; $sh='times'; echo "Modify Holiday";}
if ($ADD==31111111111) {$hh='admin'; $sh='phones'; echo "MODIFY PHONE";}
if ($ADD==32111111111) {$hh='admin'; $sh='phones'; echo "MODIFY PHONE ALIAS";}
if ($ADD==33111111111) {$hh='admin'; $sh='phones'; echo "MODIFY GROUP ALIAS";}
@@ -3668,6 +3690,7 @@ if ($ADD==41111111) {$hh='filters'; echo "Modify Filter";}
if ($ADD==411111111) {$hh='admin'; $sh='times'; echo "Modify Call Time";}
if ($ADD==431111111) {$hh='admin'; $sh='shifts'; echo "Modify Shift";}
if ($ADD==4111111111) {$hh='admin'; $sh='times'; echo "Modify State Call Time";}
+if ($ADD==4211111111) {$hh='admin'; $sh='times'; echo "Modify Holiday";}
if ($ADD==41111111111) {$hh='admin'; $sh='phones'; echo "MODIFY PHONE";}
if ($ADD==42111111111) {$hh='admin'; $sh='phones'; echo "MODIFY PHONE ALIAS";}
if ($ADD==43111111111) {$hh='admin'; $sh='phones'; echo "MODIFY GROUP ALIAS";}
@@ -3703,6 +3726,7 @@ if ($ADD==51111111) {$hh='filters'; echo "Delete Filter";}
if ($ADD==511111111) {$hh='admin'; $sh='times'; echo "Delete Call Time";}
if ($ADD==531111111) {$hh='admin'; $sh='shifts'; echo "Delete Shift";}
if ($ADD==5111111111) {$hh='admin'; $sh='times'; echo "Delete State Call Time";}
+if ($ADD==5211111111) {$hh='admin'; $sh='times'; echo "Delete Holiday";}
if ($ADD==51111111111) {$hh='admin'; $sh='phones'; echo "DELETE PHONE";}
if ($ADD==52111111111) {$hh='admin'; $sh='phones'; echo "DELETE PHONE ALIAS";}
if ($ADD==53111111111) {$hh='admin'; $sh='phones'; echo "DELETE GROUP ALIAS";}
@@ -3739,6 +3763,7 @@ if ($ADD==61111111) {$hh='filters'; echo "Delete Filter";}
if ($ADD==611111111) {$hh='admin'; $sh='times'; echo "Delete Call Time";}
if ($ADD==631111111) {$hh='admin'; $sh='shifts'; echo "Delete Shift";}
if ($ADD==6111111111) {$hh='admin'; $sh='times'; echo "Delete State Call Time";}
+if ($ADD==6211111111) {$hh='admin'; $sh='times'; echo "Delete Holiday";}
if ($ADD==61111111111) {$hh='admin'; $sh='phones'; echo "DELETE PHONE";}
if ($ADD==62111111111) {$hh='admin'; $sh='phones'; echo "DELETE PHONE ALIAS";}
if ($ADD==63111111111) {$hh='admin'; $sh='phones'; echo "DELETE GROUP ALIAS";}
@@ -3779,6 +3804,7 @@ if ($ADD==10000000) {$hh='filters'; echo "Filters";}
if ($ADD==100000000) {$hh='admin'; $sh='times'; echo "Call Times";}
if ($ADD==130000000) {$hh='admin'; $sh='shifts'; echo "Shifts";}
if ($ADD==1000000000) {$hh='admin'; $sh='times'; echo "State Call Times";}
+if ($ADD==1200000000) {$hh='admin'; $sh='times'; echo "Holidays";}
if ($ADD==10000000000) {$hh='admin'; $sh='phones'; echo "PHONE LIST";}
if ($ADD==12000000000) {$hh='admin'; $sh='phones'; echo "PHONE ALIAS LIST";}
if ($ADD==13000000000) {$hh='admin'; $sh='phones'; echo "GROUP ALIAS LIST";}
@@ -7144,6 +7170,26 @@ if ($ADD==99999)
State Call Time State - This is the two letter code for the state that this calling time definition is for. For this to be in effect the local call time that is set in the campaign must have this state call time record in it as well as all of the leads having two letter state codes in them.
+
+
+ Holiday ID - This is the short name of a Holiday Definition. This needs to be a unique identifier. Do not use any spaces or punctuation for this field. max 30 characters, minimum of 2 characters.
+
+
+
+ Holiday Name - This is a more descriptive name of the Holiday Definition. This is a short summary of the Holiday definition. max 100 characters, minimum of 2 characters.
+
+
+
+ Holiday Comments - This is where you can place comments for a Holiday Definition such as -10am to 4pm boxing day restrictions-. max 255 characters.
+
+
+
+ Holiday Date - This is the date of the holiday.
+
+
+
+ Holiday Status - This is the status of the holiday entry. ACTIVE status means that the holiday will be enabled on the holiday date. INACTIVE status means that the holiday will be ignored even on the holiday date. EXPIRED means that the holiday has passed it's holiday date. Default is INACTIVE.
+
@@ -9339,6 +9385,7 @@ if ($ADD==11)
echo " \n";
+
if ($SSoutbound_autodial_active > 0)
{
echo "Local Call Time: $NWB#vicidial_campaigns-local_call_time$NWE \n";
@@ -10485,6 +10532,53 @@ if ($ADD==1111111111)
}
+######################
+# ADD=1211111111 display the ADD NEW HOLIDAY SCREEN
+######################
+
+if ($ADD==1211111111)
+ {
+ if ($LOGmodify_call_times==1)
+ {
+ echo "Voicemail: $NWB#vicidial_campaigns-voicemail_ext$NWE
| \n";
+ echo "";
+
+ echo " ADD NEW STATE CALL TIME | |
| \n"; + $stmt="SELECT ct_state_call_times from vicidial_call_times where call_time_id='$local_call_time';"; + $rslt=mysql_query($stmt, $link); + $call_times_to_print = mysql_num_rows($rslt); + if ($call_times_to_print > 0) + { + $rowx=mysql_fetch_row($rslt); + $ct_state_call_times = $rowx[0]; + $state_rules = explode('|',$ct_state_call_times); + $ct_srs = ((count($state_rules)) - 2); + if ($ct_srs < 0) {$ct_hrs=0;} + echo "State rules defined for this call time: $ct_srs\n"; + } + else + {echo "\n";} + echo " | |
| Dial Timeout: | in seconds$NWB#vicidial_campaigns-dial_timeout$NWE |
| \n"; + $stmt="SELECT ct_holidays from vicidial_call_times where call_time_id='$call_time_id';"; + $rslt=mysql_query($stmt, $link); + $call_times_to_print = mysql_num_rows($rslt); + if ($call_times_to_print > 0) + { + $rowx=mysql_fetch_row($rslt); + $ct_holidays = $rowx[0]; + $holiday_rules = explode('|',$ct_holidays); + $ct_hrs = ((count($holiday_rules)) - 2); + if ($ct_hrs < 0) {$ct_hrs=0;} + echo "Holidays defined for this call time: $ct_hrs\n"; + } + else + {echo "\n";} + echo " | |
| Action Transfer CID: | $NWB#vicidial_inbound_groups-action_xfer_cid$NWE |
| After Hours Action: | $NWB#vicidial_inbound_groups-after_hours_action$NWE |
| Call Time: | $NWB#vicidial_call_menu-call_time_id$NWE |
| Track Calls in Real-Time Report: | |