2006-06-16 snapshot

git-svn-id: svn://192.168.202.10@9 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2006-07-07 15:27:12 +00:00
parent 7b2622b826
commit ca8e640156
30 changed files with 4284 additions and 450 deletions
+2 -2
View File
@@ -363,8 +363,8 @@ else
while ($favorites_count > $o)
{
$stmt="SELECT fullname,protocol from phones where extension = '$favorites[$o]' and server_ip='$server_ip';";
$rsltx=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rsltx);
$rslt=mysql_query($stmt, $link);
$rowx=mysql_fetch_row($rslt);
$favorites_names[$o] = $rowx[0];
$favorites_listX .= "$rowx[1]/$favorites[$o],";
$o++;
+56 -28
View File
@@ -66,7 +66,7 @@
# - $CallBackDatETimE - ('2006-04-21 14:30:00',...)
# - $recipient - ('ANYONE,'USERONLY')
# - $callback_id - ('12345','12346',...)
#
# - $use_internal_dnc - ('Y','N')
# changes
# 50629-1044 - First build of script
@@ -101,10 +101,11 @@
# 60419-1517 - After CALLBK is sent to agent, update callback record to INACTIVE
# 60421-1419 - check GET/POST vars lines with isset to not trigger PHP NOTICES
# 60427-1236 - Fixed closer_choice error for CLOSER campaigns
# 60609-1148 - Added ability to check for manual dial numbers in DNC
#
$version = '0.0.31';
$build = '60427-1236';
$version = '0.0.32';
$build = '60609-1148';
require("dbconnect.php");
@@ -368,40 +369,56 @@ if ($ACTION == 'manDiaLnextCaLL')
{
if (strlen($phone_number)>3)
{
if ($stage=='lookup')
if ($use_internal_dnc=='Y')
{
$stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;";
$stmt="SELECT count(*) FROM vicidial_dnc where phone_number='$phone_number';";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$man_leadID_ct = mysql_num_rows($rslt);
if ($man_leadID_ct > 0)
$row=mysql_fetch_row($rslt);
if ($row[0] > 0)
{
$row=mysql_fetch_row($rslt);
$affected_rows=1;
$lead_id =$row[0];
$CBleadIDset=1;
echo "DNC NUMBER\n";
exit;
}
else
{
### insert a new lead in the system with this phone number
$stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
$lead_id = mysql_insert_id();
$CBleadIDset=1;
if ($stage=='lookup')
{
$stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$man_leadID_ct = mysql_num_rows($rslt);
if ($man_leadID_ct > 0)
{
$row=mysql_fetch_row($rslt);
$affected_rows=1;
$lead_id =$row[0];
$CBleadIDset=1;
}
else
{
### insert a new lead in the system with this phone number
$stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
$lead_id = mysql_insert_id();
$CBleadIDset=1;
}
}
else
{
### insert a new lead in the system with this phone number
$stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
$lead_id = mysql_insert_id();
$CBleadIDset=1;
}
}
}
else
{
### insert a new lead in the system with this phone number
$stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$affected_rows = mysql_affected_rows($link);
$lead_id = mysql_insert_id();
$CBleadIDset=1;
}
}
else
{
@@ -1254,6 +1271,17 @@ if ($ACTION == 'updateDISPO')
$stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_query($stmt, $link);
if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') )
{
$stmt = "select phone_number from vicidial_list where lead_id='$lead_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$stmt="INSERT INTO vicidial_dnc (phone_number) values('$row[0]');";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
}
}
$dispo_sec=0;
+16 -10
View File
@@ -109,6 +109,7 @@
# - Fixed recording filename display to not overrun 25 characters
# 60510-1051 - Added Wrapup timer and wrapup message on wrapup screen after dispo
# 60608-1453 - Added CLOSER campaign allowable in-groups limitations
# 60609-1123 - Added add-number-to-DNC-list function and manual dial check DNC
#
require("dbconnect.php");
@@ -145,8 +146,8 @@ if (isset($_GET["relogin"])) {$relogin=$_GET["relogin"];}
$forever_stop=0;
$version = '1.1.83';
$build = '60608-1453';
$version = '1.1.84';
$build = '60609-1123';
if ($force_logout)
{
@@ -212,13 +213,13 @@ $camp_form_code = "<select size=1 name=VD_campaign>\n";
$camp_form_code .= "<option value=\"\"></option>\n";
$stmt="SELECT campaign_id from vicidial_campaigns where active='Y' order by campaign_id";
$rsltx=mysql_query($stmt, $link);
$camps_to_print = mysql_num_rows($rsltx);
$rslt=mysql_query($stmt, $link);
$camps_to_print = mysql_num_rows($rslt);
$o=0;
while ($camps_to_print > $o)
{
$rowx=mysql_fetch_row($rsltx);
$rowx=mysql_fetch_row($rslt);
if ($VD_campaign)
{
if (eregi("$VD_campaign",$rowx[0]))
@@ -501,7 +502,7 @@ $VDloginDISPLAY=0;
$HKstatusnames = substr("$HKstatusnames", 0, -1);
##### grab the statuses to be dialed for your campaign as well as other campaign settings
$stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,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 FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
$stmt="SELECT dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,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 FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
@@ -534,6 +535,7 @@ $VDloginDISPLAY=0;
$wrapup_seconds=$row[26];
$wrapup_message=$row[27];
$closer_campaigns=$row[28];
$use_internal_dnc=$row[29];
if ( ($VC_scheduled_callbacks=='Y') and ($VU_scheduled_callbacks=='1') )
{$scheduled_callbacks='1';}
@@ -1326,6 +1328,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var wrapup_message = '<? echo $wrapup_message ?>'
var wrapup_counter = 0;
var wrapup_waiting = 0;
var use_internal_dnc = '<? echo $use_internal_dnc ?>'
var DiaLControl_auto_HTML = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\"Pause\"><a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready');\"><IMG SRC=\"./images/vdc_LB_resume.gif\" border=0 alt=\"Resume\"></a>";
var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause');\"><IMG SRC=\"./images/vdc_LB_pause.gif\" border=0 alt=\"Pause\"></a><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
var DiaLControl_auto_HTML_OFF = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\"Pause\"><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
@@ -2548,7 +2551,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
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=" + dial_prefix + "&campaign_cid=" + campaign_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 ;
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=" + dial_prefix + "&campaign_cid=" + campaign_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 ;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(manDiaLnext_query);
@@ -2562,9 +2565,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var MDnextResponse_array=MDnextResponse.split("\n");
MDnextCID = MDnextResponse_array[0];
if (MDnextCID == "HOPPER EMPTY")
if ( (MDnextCID == "HOPPER EMPTY") || (MDnextCID == "DNC NUMBER") )
{
alert("No more leads in the hopper for campaign:\n" + campaign);
if (MDnextCID == "HOPPER EMPTY")
{alert("No more leads in the hopper for campaign:\n" + campaign);}
else
{alert("This phone number is in the DNC list:\n" + mdnPhonENumbeR);}
}
else
{
@@ -3784,7 +3790,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&comments=" + CallBackCommenTs;
DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&comments=" + CallBackCommenTs;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(DSupdate_query);