From 83f2b5aa452bdee218d832edb1cf87c8313a935f Mon Sep 17 00:00:00 2001 From: mattf Date: Tue, 2 Sep 2008 11:15:54 +0000 Subject: [PATCH] added hard-coded vicidial.php option to allow for restriction of manual dialing to only the leads within the lists for the active campaigns git-svn-id: svn://192.168.202.10@946 3d104415-ff17-0410-8863-d5cf3c621b8a --- .../agc_2.0.4/www/agc/vdc_db_query.php | 36 +++++++++++- .../branches/agc_2.0.4/www/agc/vicidial.php | 56 +++++++++++++++---- 2 files changed, 79 insertions(+), 13 deletions(-) diff --git a/agc_2-X/branches/agc_2.0.4/www/agc/vdc_db_query.php b/agc_2-X/branches/agc_2.0.4/www/agc/vdc_db_query.php index 253ec880..4b428b77 100644 --- a/agc_2-X/branches/agc_2.0.4/www/agc/vdc_db_query.php +++ b/agc_2-X/branches/agc_2.0.4/www/agc/vdc_db_query.php @@ -70,6 +70,7 @@ # - $omit_phone_code - ('Y','N') # - $no_delete_sessions - ('0','1') # - $LogouTKicKAlL - ('0','1'); +# - $manual_dial_filter = ('NONE','CAMPLISTS','DNC','CAMPLISTS_DNC'); # CHANGELOG: # 50629-1044 - First build of script @@ -143,10 +144,12 @@ # 80128-1159 - fixed vicidial_log bugs # 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag # 80424-0442 - Added non_latin lookup from system_settings +# 80722-1000 - Fixed small bugs +# 80815-1020 - Added manual dial list restriction option # -$version = '2.0.4-69'; -$build = '80424-0442'; +$version = '2.0.4-71'; +$build = '80815-1020'; require("dbconnect.php"); @@ -281,6 +284,8 @@ if (isset($_GET["status"])) {$status=$_GET["status"];} elseif (isset($_POST["status"])) {$status=$_POST["status"];} if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];} elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];} +if (isset($_GET["manual_dial_filter"])) {$manual_dial_filter=$_GET["manual_dial_filter"];} + elseif (isset($_POST["manual_dial_filter"])) {$manual_dial_filter=$_POST["manual_dial_filter"];} header ("Content-type: text/html; charset=utf-8"); @@ -573,6 +578,33 @@ if ($ACTION == 'manDiaLnextCaLL') exit; } } + if (ereg("CAMPLISTS",$manual_dial_filter)) + { + $stmt="SELECT list_id,active from vicidial_lists where campaign_id='$campaign'"; + $rslt=mysql_query($stmt, $link); + $lists_to_parse = mysql_num_rows($rslt); + $camp_lists=''; + $o=0; + while ($lists_to_parse > $o) + { + $rowx=mysql_fetch_row($rslt); + if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";} + if (ereg("N", $rowx[1])) {$inactive_lists++;} + $o++; + } + $camp_lists = eregi_replace(".$","",$camp_lists); + + $stmt="SELECT count(*) FROM vicidial_list where phone_number='$phone_number' and list_id IN($camp_lists);"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $row=mysql_fetch_row($rslt); + + if ($row[0] < 1) + { + echo "NUMBER NOT IN CAMPLISTS\n"; + exit; + } + } if ($stage=='lookup') { $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; diff --git a/agc_2-X/branches/agc_2.0.4/www/agc/vicidial.php b/agc_2-X/branches/agc_2.0.4/www/agc/vicidial.php index 862f2936..09265f57 100644 --- a/agc_2-X/branches/agc_2.0.4/www/agc/vicidial.php +++ b/agc_2-X/branches/agc_2.0.4/www/agc/vicidial.php @@ -177,10 +177,13 @@ # 80428-0413 - UTF8 changes and testing # 80507-0932 - Fixed Script display bug (+ instead of space) # 80519-1425 - Added calls in queue display +# 80722-1000 - Fixed quote display bug +# 80815-1015 - Added manual dial list restriction option +# 80823-2127 - Fixed form scroll for IE # -$version = '2.0.4-148'; -$build = '80519-1425'; +$version = '2.0.4-151'; +$build = '80823-2127'; require("dbconnect.php"); @@ -285,6 +288,7 @@ $PreseT_DiaL_LinKs = '1'; # set to 1 to show a DIAL link for Dial Presets $LogiNAJAX = '1'; # set to 1 to do lookups $HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls" $LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout +$CamPManDiaLLocK = '0'; # set to 1 to lock out all manual dials to only numbers in camp lists $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen @@ -348,6 +352,11 @@ echo "\n"; echo "\n"; echo "\n"; +if ($CamPManDiaLLocK > 0) + {$manual_dial_filter = "CAMPLISTS_ONLY";} +else + {$manual_dial_filter = "NONE";} + if ($campaign_login_list > 0) { $camp_form_code = "\n";} else {echo "\n";} ?>