Added Secondary List Order which allows for further sorting of leads to be dialed by a secondary sorting method
Added Default Campaign setting for the My Callback agent interface option so that the checkbox can be pre-selected or not on every call Added the campaign option for per-call call notes in the agent interface. If the User Group also has Call Log enabled, the agent can also see the call notes from previous calls. git-svn-id: svn://192.168.202.10@1601 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -452,6 +452,16 @@ OTHER CHANGES:
|
||||
are configurable with the Scheduled Callbacks flag in the System
|
||||
Statuses and Campaign Statuses administrative screens.
|
||||
|
||||
106. Added Secondary List Order which allows for further sorting of leads to be
|
||||
dialed by a secondary sorting method
|
||||
|
||||
107. Added Default Campaign setting for the My Callback agent interface option
|
||||
so that the checkbox can be pre-selected or not on every call
|
||||
|
||||
108. Added the campaign option for per-call call notes in the agent interface.
|
||||
If the User Group also has Call Log enabled, the agent can also see
|
||||
the call notes from previous calls.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+13
-4
@@ -66,6 +66,7 @@
|
||||
# 101108-1451 - Added ability for the hopper level to be set automatically and remove excess leads from the hopper (MikeC)
|
||||
# 110103-1118 - Added lead_order_randomize option
|
||||
# 110212-2255 - Added scheduled callback custom statuses capability
|
||||
# 110214-2319 - Added lead_order_secondary option
|
||||
#
|
||||
|
||||
# constants
|
||||
@@ -800,11 +801,11 @@ if ($hopper_dnc_count > 0)
|
||||
|
||||
if ($CLIcampaign)
|
||||
{
|
||||
$stmtA = "SELECT campaign_id,lead_order,hopper_level,auto_dial_level,local_call_time,lead_filter_id,use_internal_dnc,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,dial_statuses,list_order_mix,use_campaign_dnc,drop_lockout_time,no_hopper_dialing,auto_alt_dial_statuses,dial_timeout,auto_hopper_multi,use_auto_hopper,auto_trim_hopper,lead_order_randomize from vicidial_campaigns where campaign_id='$CLIcampaign';";
|
||||
$stmtA = "SELECT campaign_id,lead_order,hopper_level,auto_dial_level,local_call_time,lead_filter_id,use_internal_dnc,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,dial_statuses,list_order_mix,use_campaign_dnc,drop_lockout_time,no_hopper_dialing,auto_alt_dial_statuses,dial_timeout,auto_hopper_multi,use_auto_hopper,auto_trim_hopper,lead_order_randomize,lead_order_secondary from vicidial_campaigns where campaign_id='$CLIcampaign';";
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmtA = "SELECT campaign_id,lead_order,hopper_level,auto_dial_level,local_call_time,lead_filter_id,use_internal_dnc,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,dial_statuses,list_order_mix,use_campaign_dnc,drop_lockout_time,no_hopper_dialing,auto_alt_dial_statuses,dial_timeout,auto_hopper_multi,use_auto_hopper,auto_trim_hopper,lead_order_randomize from vicidial_campaigns where active='Y';";
|
||||
$stmtA = "SELECT campaign_id,lead_order,hopper_level,auto_dial_level,local_call_time,lead_filter_id,use_internal_dnc,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,dial_statuses,list_order_mix,use_campaign_dnc,drop_lockout_time,no_hopper_dialing,auto_alt_dial_statuses,dial_timeout,auto_hopper_multi,use_auto_hopper,auto_trim_hopper,lead_order_randomize,lead_order_secondary from vicidial_campaigns where active='Y';";
|
||||
}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
@@ -838,6 +839,7 @@ while ($sthArows > $rec_count)
|
||||
$use_auto_hopper[$rec_count] = $aryA[19];
|
||||
$auto_trim_hopper[$rec_count] = $aryA[20];
|
||||
$lead_order_randomize[$rec_count] = $aryA[21];
|
||||
$lead_order_secondary[$rec_count] = $aryA[22];
|
||||
|
||||
### Auto Hopper Level
|
||||
if ( $use_auto_hopper[$rec_count] =~ /Y/)
|
||||
@@ -1595,7 +1597,7 @@ foreach(@campaign_id)
|
||||
}
|
||||
##### END lead recycling parsing and prep ###
|
||||
|
||||
if ($DB) {print "Starting hopper run for $campaign_id[$i] campaign- GMT: $local_call_time[$i] HOPPER: $hopper_level[$i] ORDER: $lead_order[$i]|$lead_order_randomize[$i]\n";}
|
||||
if ($DB) {print "Starting hopper run for $campaign_id[$i] campaign- GMT: $local_call_time[$i] HOPPER: $hopper_level[$i] ORDER: $lead_order[$i]|$lead_order_randomize[$i]|$lead_order_secondary[$i]\n";}
|
||||
|
||||
### Delete the DONE leads if there are any
|
||||
$stmtA = "DELETE from $vicidial_hopper where campaign_id='$campaign_id[$i]' and status IN('DONE');";
|
||||
@@ -1836,7 +1838,14 @@ foreach(@campaign_id)
|
||||
$OTHER_level = $hopper_level[$i];
|
||||
|
||||
if ($lead_order_randomize[$i] =~ /Y/) {$last_order = "RAND()";}
|
||||
else {$last_order = "lead_id asc";}
|
||||
else
|
||||
{
|
||||
$last_order = "lead_id asc";
|
||||
if ($lead_order_secondary[$i] =~ /LEAD_ASCEND/) {$last_order = "lead_id asc";}
|
||||
if ($lead_order_secondary[$i] =~ /LEAD_DESCEND/) {$last_order = "lead_id desc";}
|
||||
if ($lead_order_secondary[$i] =~ /CALLTIME_ASCEND/) {$last_order = "last_local_call_time asc";}
|
||||
if ($lead_order_secondary[$i] =~ /CALLTIME_DESCEND/) {$last_order = "last_local_call_time desc";}
|
||||
}
|
||||
|
||||
if ($lead_order[$i] =~ /^DOWN/) {$order_stmt = "order by lead_id asc";}
|
||||
if ($lead_order[$i] =~ /^UP/) {$order_stmt = "order by lead_id desc";}
|
||||
|
||||
@@ -782,7 +782,10 @@ auto_trim_hopper ENUM('Y','N') default 'Y',
|
||||
api_manual_dial ENUM('STANDARD','QUEUE','QUEUE_AND_AUTOCALL') default 'STANDARD',
|
||||
manual_dial_call_time_check ENUM('DISABLED','ENABLED') default 'DISABLED',
|
||||
display_leads_count ENUM('Y','N') default 'N',
|
||||
lead_order_randomize ENUM('Y','N') default 'N'
|
||||
lead_order_randomize ENUM('Y','N') default 'N',
|
||||
lead_order_secondary ENUM('LEAD_ASCEND','LEAD_DESCEND','CALLTIME_ASCEND','CALLTIME_DESCEND') default 'LEAD_ASCEND',
|
||||
per_call_notes ENUM('ENABLED','DISABLED') default 'DISABLED',
|
||||
my_callback_option ENUM('CHECKED','UNCHECKED') default 'UNCHECKED'
|
||||
);
|
||||
|
||||
CREATE TABLE vicidial_lists (
|
||||
@@ -2419,7 +2422,7 @@ CREATE TABLE vicidial_carrier_log_archive LIKE vicidial_carrier_log;
|
||||
CREATE TABLE vicidial_call_notes_archive LIKE vicidial_call_notes;
|
||||
ALTER TABLE vicidial_call_notes_archive MODIFY notesid INT(9) UNSIGNED NOT NULL;
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1259',db_schema_update_date=NOW();
|
||||
UPDATE system_settings SET db_schema_version='1260',db_schema_update_date=NOW();
|
||||
|
||||
GRANT RELOAD ON *.* TO cron@'%';
|
||||
GRANT RELOAD ON *.* TO cron@localhost;
|
||||
|
||||
@@ -657,3 +657,9 @@ UPDATE vicidial_campaign_statuses SET scheduled_callback='Y' where status='CALLB
|
||||
ALTER TABLE vicidial_callbacks ADD lead_status VARCHAR(6) default 'CALLBK';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1259',db_schema_update_date=NOW();
|
||||
|
||||
ALTER TABLE vicidial_campaigns ADD lead_order_secondary ENUM('LEAD_ASCEND','LEAD_DESCEND','CALLTIME_ASCEND','CALLTIME_DESCEND') default 'LEAD_ASCEND';
|
||||
ALTER TABLE vicidial_campaigns ADD per_call_notes ENUM('ENABLED','DISABLED') default 'DISABLED';
|
||||
ALTER TABLE vicidial_campaigns ADD my_callback_option ENUM('CHECKED','UNCHECKED') default 'UNCHECKED';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1260',db_schema_update_date=NOW();
|
||||
|
||||
@@ -504,6 +504,13 @@ This option allows you to randomize the order of the leads in the hopper load wi
|
||||
NONE will not log any logins and logouts within queue_log||
|
||||
QueueMetrics Dispo Pause Code||
|
||||
This option, if populated, allows you to define whether a dispo pause code is entered into queue_log when an agent is in dispo status. Default is empty for disabled||
|
||||
List Order Secondary||
|
||||
This option allows you to select the second sorting order of the leads in the hopper load after the List Order and within the results defined by the criteria set above. For instance, the List Order will be used for the first sort of the leads, but the results will be sorted a second time within that sorting across the same set of the first List Order. For example, if you have List Order set to DOWN COUNT and you only have leads that have been attempted 1 and 2 times, then if you have the List Order Secondary set to LEAD_ASCEND all of the attempt 1 leads will be sorted by the oldest leads first and will be put into the hopper that way. Default is LEAD_ASCEND. NOTE, if you have a large number of leads using one of the CALLTIME options may slow down the speed of the hopper loading script||
|
||||
My Callbacks Checkbox Default||
|
||||
This option allows you to pre-set the My Callback checkbox on the agent scheduled callback screen. CHECKED will check the checkbox automatically for every call. Default is UNCHECKED||
|
||||
Call Notes Per Call||
|
||||
Setting this option to ENABLED will allow agents to enter in notes for every call they handle in the agent interface. The notes entry field will appear below the Comments field in the agent interface. Also, if the Agent User Group is allowed to view Call Logs then the agent will be able to view past call notes for a lead at any time. Default is DISABLED||
|
||||
If List Order Randomize is enabled, this option will be ignored||
|
||||
|
||||
|
||||
AST_LISTS_campaign_stats.php
|
||||
@@ -526,6 +533,12 @@ Manual Queue||
|
||||
This phone number is outside of the local call time||
|
||||
Manual Queue is Off||
|
||||
Manual Queue is On||
|
||||
Call Notes:||
|
||||
Call Notes List||
|
||||
view notes||
|
||||
CALL NOTES LOG||
|
||||
Close Call Notes||
|
||||
CALL LOG FOR THIS LEAD||
|
||||
|
||||
|
||||
############################################################ MANAGER Manual
|
||||
|
||||
+373
-5
@@ -89,6 +89,7 @@
|
||||
# - $DiaL_SecondS - ('0','1','2',...)
|
||||
# - $date - ('2010-02-19')
|
||||
# - $custom_field_names - ('|start_date|finish_date|favorite_color|')
|
||||
# - $call_notes
|
||||
#
|
||||
# CHANGELOG:
|
||||
# 50629-1044 - First build of script
|
||||
@@ -269,10 +270,12 @@
|
||||
# 110124-1134 - Small query fix for large queue_log tables
|
||||
# 110124-1456 - Fixed AREACODE DNC manual dial bug
|
||||
# 110212-2103 - Added support for custom scheduled callback statuses
|
||||
# 110214-2320 - Added support for lead_order_secondary option
|
||||
# 110215-1125 - Added support for call_notes
|
||||
#
|
||||
|
||||
$version = '2.4-175';
|
||||
$build = '110212-2103';
|
||||
$version = '2.4-177';
|
||||
$build = '110215-1125';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=365;
|
||||
$one_mysql_log=0;
|
||||
@@ -465,6 +468,8 @@ if (isset($_GET["manual_dial_call_time_check"])) {$manual_dial_call_time_check
|
||||
elseif (isset($_POST["manual_dial_call_time_check"])) {$manual_dial_call_time_check=$_POST["manual_dial_call_time_check"];}
|
||||
if (isset($_GET["CallBackLeadStatus"])) {$CallBackLeadStatus=$_GET["CallBackLeadStatus"];}
|
||||
elseif (isset($_POST["CallBackLeadStatus"])) {$CallBackLeadStatus=$_POST["CallBackLeadStatus"];}
|
||||
if (isset($_GET["call_notes"])) {$call_notes=$_GET["call_notes"];}
|
||||
elseif (isset($_POST["call_notes"])) {$call_notes=$_POST["call_notes"];}
|
||||
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
@@ -1447,7 +1452,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
else
|
||||
{
|
||||
##### gather no hopper dialing settings from campaign
|
||||
$stmt="SELECT no_hopper_dialing,agent_dial_owner_only,local_call_time,dial_statuses,drop_lockout_time,lead_filter_id,lead_order,lead_order_randomize FROM vicidial_campaigns where campaign_id='$campaign';";
|
||||
$stmt="SELECT no_hopper_dialing,agent_dial_owner_only,local_call_time,dial_statuses,drop_lockout_time,lead_filter_id,lead_order,lead_order_randomize,lead_order_secondary FROM vicidial_campaigns where campaign_id='$campaign';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00236',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
@@ -1463,6 +1468,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
$lead_filter_id = $row[5];
|
||||
$lead_order = $row[6];
|
||||
$lead_order_randomize = $row[7];
|
||||
$lead_order_secondary = $row[8];
|
||||
}
|
||||
if (eregi("N",$no_hopper_dialing))
|
||||
{
|
||||
@@ -1862,7 +1868,14 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
if (eregi("USER_GROUP",$agent_dial_owner_only)) {$adooSQL = "and owner='$user_group'";}
|
||||
|
||||
if ($lead_order_randomize == 'Y') {$last_order = "RAND()";}
|
||||
else {$last_order = "lead_id asc";}
|
||||
else
|
||||
{
|
||||
$last_order = "lead_id asc";
|
||||
if ($lead_order_secondary == 'LEAD_ASCEND') {$last_order = "lead_id asc";}
|
||||
if ($lead_order_secondary == 'LEAD_DESCEND') {$last_order = "lead_id desc";}
|
||||
if ($lead_order_secondary == 'CALLTIME_ASCEND') {$last_order = "last_local_call_time asc";}
|
||||
if ($lead_order_secondary == 'CALLTIME_DESCEND') {$last_order = "last_local_call_time desc";}
|
||||
}
|
||||
|
||||
$order_stmt = '';
|
||||
if (eregi("DOWN",$lead_order)){$order_stmt = 'order by lead_id asc';}
|
||||
@@ -5945,6 +5958,34 @@ if ($ACTION == 'updateDISPO')
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00154',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
|
||||
### BEGIN Call Notes Logging ###
|
||||
if (strlen($call_notes) > 1)
|
||||
{
|
||||
$VDADchannel_group=$campaign;
|
||||
$stmt = "SELECT campaign_id,closecallid from vicidial_closer_log where uniqueid='$uniqueid' and user='$user' order by call_date desc limit 1;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VDCL_cn_ct = mysql_num_rows($rslt);
|
||||
if ($VDCL_cn_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$VDADchannel_group = $row[0];
|
||||
$vicidial_id = $row[1];
|
||||
}
|
||||
else
|
||||
{$vicidial_id = $uniqueid;}
|
||||
|
||||
# Insert into vicidial_call_notes
|
||||
$stmt="INSERT INTO vicidial_call_notes set lead_id='$lead_id',vicidial_id='$vicidial_id',call_date='$NOW_TIME',call_notes='" . mysql_real_escape_string($call_notes) . "';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$affected_rows = mysql_affected_rows($link);
|
||||
$notesid = mysql_insert_id($link);
|
||||
}
|
||||
### END Call Notes Logging ###
|
||||
|
||||
$stmt="SELECT auto_alt_dial_statuses,use_internal_dnc,use_campaign_dnc,api_manual_dial from vicidial_campaigns where campaign_id='$campaign';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00155',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -7950,7 +7991,7 @@ if ($ACTION == 'LEADINFOview')
|
||||
echo "<CENTER>\n";
|
||||
echo "<TABLE CELLPADDING=0 CELLSPACING=1 BORDER=0 WIDTH=500>";
|
||||
|
||||
$stmt="select status,vendor_lead_code,list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,alt_phone,email,security_phrase,comments,called_count,last_local_call_time,rank,owner,entry_list_id from vicidial_list where lead_id='$lead_id'limit 1;";
|
||||
$stmt="select status,vendor_lead_code,list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,alt_phone,email,security_phrase,comments,called_count,last_local_call_time,rank,owner,entry_list_id from vicidial_list where lead_id='$lead_id' limit 1;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$info_to_print = mysql_num_rows($rslt);
|
||||
if ($format=='debug') {echo "|$out_logs_to_print|$stmt|";}
|
||||
@@ -7991,12 +8032,339 @@ if ($ACTION == 'LEADINFOview')
|
||||
|
||||
echo "</TABLE>";
|
||||
echo "<BR>";
|
||||
|
||||
echo "<CENTER>CALL LOG FOR THIS LEAD:<br>\n";
|
||||
echo "<TABLE CELLPADDING=0 CELLSPACING=1 BORDER=0 WIDTH=$stage>";
|
||||
echo "<TR>";
|
||||
echo "<TD BGCOLOR=\"#CCCCCC\"><font style=\"font-size:10px;font-family:sans-serif;\"><B> # </font></TD>";
|
||||
echo "<TD BGCOLOR=\"#CCCCCC\"><font style=\"font-size:11px;font-family:sans-serif;\"><B> DATE/TIME </font></TD>";
|
||||
echo "<TD BGCOLOR=\"#CCCCCC\"><font style=\"font-size:11px;font-family:sans-serif;\"><B> AGENT </font></TD>";
|
||||
echo "<TD BGCOLOR=\"#CCCCCC\"><font style=\"font-size:11px;font-family:sans-serif;\"><B> LENGTH </font></TD>";
|
||||
echo "<TD BGCOLOR=\"#CCCCCC\"><font style=\"font-size:11px;font-family:sans-serif;\"><B> STATUS </font></TD>";
|
||||
echo "<TD BGCOLOR=\"#CCCCCC\"><font style=\"font-size:11px;font-family:sans-serif;\"><B> PHONE </font></TD>";
|
||||
echo "<TD BGCOLOR=\"#CCCCCC\"><font style=\"font-size:11px;font-family:sans-serif;\"><B> CAMPAIGN </font></TD>";
|
||||
echo "<TD BGCOLOR=\"#CCCCCC\"><font style=\"font-size:11px;font-family:sans-serif;\"><B> IN/OUT </font></TD>";
|
||||
echo "<TD BGCOLOR=\"#CCCCCC\"><font style=\"font-size:11px;font-family:sans-serif;\"><B> ALT </font></TD>";
|
||||
echo "<TD BGCOLOR=\"#CCCCCC\"><font style=\"font-size:11px;font-family:sans-serif;\"><B> HANGUP </font></TD>";
|
||||
# echo "</TR><TR>";
|
||||
# echo "<TD BGCOLOR=\"#CCCCCC\" COLSPAN=9><font style=\"font-size:11px;font-family:sans-serif;\"><B> FULL NAME </font></TD>";
|
||||
echo "</TR>";
|
||||
|
||||
|
||||
$stmt="select start_epoch,call_date,campaign_id,length_in_sec,status,phone_code,phone_number,lead_id,term_reason,alt_dial,comments,uniqueid,user from vicidial_log where lead_id='$lead_id' order by call_date desc limit 10000;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$out_logs_to_print = mysql_num_rows($rslt);
|
||||
if ($format=='debug') {echo "|$out_logs_to_print|$stmt|";}
|
||||
|
||||
$g=0;
|
||||
$u=0;
|
||||
while ($out_logs_to_print > $u)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$ALLsort[$g] = "$row[0]-----$g";
|
||||
$ALLstart_epoch[$g] = $row[0];
|
||||
$ALLcall_date[$g] = $row[1];
|
||||
$ALLcampaign_id[$g] = $row[2];
|
||||
$ALLlength_in_sec[$g] = $row[3];
|
||||
$ALLstatus[$g] = $row[4];
|
||||
$ALLphone_code[$g] = $row[5];
|
||||
$ALLphone_number[$g] = $row[6];
|
||||
$ALLlead_id[$g] = $row[7];
|
||||
$ALLhangup_reason[$g] = $row[8];
|
||||
$ALLalt_dial[$g] = $row[9];
|
||||
$ALLuniqueid[$g] = $row[11];
|
||||
$ALLuser[$g] = $row[12];
|
||||
$ALLin_out[$g] = "OUT-AUTO";
|
||||
if ($row[10] == 'MANUAL') {$ALLin_out[$g] = "OUT-MANUAL";}
|
||||
|
||||
$stmtA="SELECT call_notes FROM vicidial_call_notes WHERE lead_id='$ALLlead_id[$g]' and vicidial_id='$ALLuniqueid[$g]';";
|
||||
$rsltA=mysql_query($stmtA, $link);
|
||||
$out_notes_to_print = mysql_num_rows($rslt);
|
||||
if ($out_notes_to_print > 0)
|
||||
{
|
||||
$rowA=mysql_fetch_row($rsltA);
|
||||
$Allcall_notes[$g] = $rowA[0];
|
||||
if (strlen($Allcall_notes[$g]) > 0)
|
||||
{$Allcall_notes[$g] = "<b>NOTES: </b> $Allcall_notes[$g]";}
|
||||
}
|
||||
$stmtA="SELECT full_name FROM vicidial_users WHERE user='$ALLuser[$g]';";
|
||||
$rsltA=mysql_query($stmtA, $link);
|
||||
$users_to_print = mysql_num_rows($rslt);
|
||||
if ($users_to_print > 0)
|
||||
{
|
||||
$rowA=mysql_fetch_row($rsltA);
|
||||
$ALLuser[$g] .= " - $rowA[0]";
|
||||
}
|
||||
|
||||
$Allcounter[$g] = $g;
|
||||
|
||||
$g++;
|
||||
$u++;
|
||||
}
|
||||
|
||||
$stmt="select start_epoch,call_date,campaign_id,length_in_sec,status,phone_code,phone_number,lead_id,term_reason,queue_seconds,uniqueid,closecallid,user from vicidial_closer_log where lead_id='$lead_id' order by call_date desc limit 10000;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$in_logs_to_print = mysql_num_rows($rslt);
|
||||
if ($format=='debug') {echo "|$in_logs_to_print|$stmt|";}
|
||||
|
||||
$u=0;
|
||||
while ($in_logs_to_print > $u)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$ALLsort[$g] = "$row[0]-----$g";
|
||||
$ALLstart_epoch[$g] = $row[0];
|
||||
$ALLcall_date[$g] = $row[1];
|
||||
$ALLcampaign_id[$g] = $row[2];
|
||||
$ALLlength_in_sec[$g] = ($row[3] - $row[9]);
|
||||
if ($ALLlength_in_sec[$g] < 0) {$ALLlength_in_sec[$g]=0;}
|
||||
$ALLstatus[$g] = $row[4];
|
||||
$ALLphone_code[$g] = $row[5];
|
||||
$ALLphone_number[$g] = $row[6];
|
||||
$ALLlead_id[$g] = $row[7];
|
||||
$ALLhangup_reason[$g] = $row[8];
|
||||
$ALLuniqueid[$g] = $row[10];
|
||||
$ALLclosecallid[$g] = $row[11];
|
||||
$ALLuser[$g] = $row[12];
|
||||
$ALLalt_dial[$g] = "MAIN";
|
||||
$ALLin_out[$g] = "IN";
|
||||
|
||||
$stmtA="SELECT call_notes FROM vicidial_call_notes WHERE lead_id='$ALLlead_id[$g]' and vicidial_id='$ALLclosecallid[$g]';";
|
||||
$rsltA=mysql_query($stmtA, $link);
|
||||
$in_notes_to_print = mysql_num_rows($rslt);
|
||||
if ($in_notes_to_print > 0)
|
||||
{
|
||||
$rowA=mysql_fetch_row($rsltA);
|
||||
$Allcall_notes[$g] = $rowA[0];
|
||||
if (strlen($Allcall_notes[$g]) > 0)
|
||||
{$Allcall_notes[$g] = "<b>NOTES: </b> $Allcall_notes[$g]";}
|
||||
}
|
||||
$stmtA="SELECT full_name FROM vicidial_users WHERE user='$ALLuser[$g]';";
|
||||
$rsltA=mysql_query($stmtA, $link);
|
||||
$users_to_print = mysql_num_rows($rslt);
|
||||
if ($users_to_print > 0)
|
||||
{
|
||||
$rowA=mysql_fetch_row($rsltA);
|
||||
$ALLuser[$g] .= " - $rowA[0]";
|
||||
}
|
||||
|
||||
$Allcounter[$g] = $g;
|
||||
|
||||
$g++;
|
||||
$u++;
|
||||
}
|
||||
|
||||
if ($g > 0)
|
||||
{sort($ALLsort, SORT_NUMERIC);}
|
||||
else
|
||||
{echo "<tr bgcolor=white><td colspan=11 align=center>No calls on this day</td></tr>";}
|
||||
|
||||
$u=0;
|
||||
while ($g > $u)
|
||||
{
|
||||
$sort_split = explode("-----",$ALLsort[$u]);
|
||||
$i = $sort_split[1];
|
||||
|
||||
if (eregi("1$|3$|5$|7$|9$", $u))
|
||||
{$bgcolor='bgcolor="#B9CBFD"';}
|
||||
else
|
||||
{$bgcolor='bgcolor="#9BB9FB"';}
|
||||
|
||||
$u++;
|
||||
echo "<tr $bgcolor>";
|
||||
echo "<td><font size=1>$u</td>";
|
||||
echo "<td align=right><font size=2>$ALLcall_date[$i]</td>";
|
||||
echo "<td align=right><font size=2> $ALLuser[$i]</td>\n";
|
||||
echo "<td align=right><font size=2> $ALLlength_in_sec[$i]</td>\n";
|
||||
echo "<td align=right><font size=2> $ALLstatus[$i]</td>\n";
|
||||
echo "<td align=right><font size=2> $ALLphone_code[$i] $ALLphone_number[$i] </td>\n";
|
||||
echo "<td align=right><font size=2> $ALLcampaign_id[$i] </td>\n";
|
||||
echo "<td align=right><font size=2> $ALLin_out[$i] </td>\n";
|
||||
echo "<td align=right><font size=2> $ALLalt_dial[$i] </td>\n";
|
||||
echo "<td align=right><font size=2> $ALLhangup_reason[$i] </td>\n";
|
||||
echo "</TR><TR>";
|
||||
echo "<td></td>";
|
||||
echo "<TD $bgcolor COLSPAN=9><font style=\"font-size:11px;font-family:sans-serif;\"> $Allcall_notes[$i] </font></TD>";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
echo "</TABLE>";
|
||||
echo "<BR>";
|
||||
|
||||
echo "<a href=\"#\" onclick=\"hideDiv('LeaDInfOBox');return false;\">Close Info Box</a>";
|
||||
echo "</CENTER>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
################################################################################
|
||||
### CALLNOTESview - display all notes for a specific lead
|
||||
################################################################################
|
||||
if ($ACTION == 'CALLNOTESview')
|
||||
{
|
||||
if (strlen($stage) < 3)
|
||||
{$stage = '670';}
|
||||
|
||||
echo "<CENTER>\n";
|
||||
echo "<TABLE CELLPADDING=0 CELLSPACING=1 BORDER=0 WIDTH=$stage>";
|
||||
echo "<TR>";
|
||||
echo "<TD BGCOLOR=\"#CCCCCC\"><font style=\"font-size:10px;font-family:sans-serif;\"><B> # </font></TD>";
|
||||
echo "<TD BGCOLOR=\"#CCCCCC\"><font style=\"font-size:11px;font-family:sans-serif;\"><B> DATE/TIME </font></TD>";
|
||||
echo "<TD BGCOLOR=\"#CCCCCC\"><font style=\"font-size:11px;font-family:sans-serif;\"><B> AGENT </font></TD>";
|
||||
echo "<TD BGCOLOR=\"#CCCCCC\"><font style=\"font-size:11px;font-family:sans-serif;\"><B> LENGTH </font></TD>";
|
||||
echo "<TD BGCOLOR=\"#CCCCCC\"><font style=\"font-size:11px;font-family:sans-serif;\"><B> STATUS </font></TD>";
|
||||
echo "<TD BGCOLOR=\"#CCCCCC\"><font style=\"font-size:11px;font-family:sans-serif;\"><B> PHONE </font></TD>";
|
||||
echo "<TD BGCOLOR=\"#CCCCCC\"><font style=\"font-size:11px;font-family:sans-serif;\"><B> CAMPAIGN </font></TD>";
|
||||
echo "<TD BGCOLOR=\"#CCCCCC\"><font style=\"font-size:11px;font-family:sans-serif;\"><B> IN/OUT </font></TD>";
|
||||
echo "<TD BGCOLOR=\"#CCCCCC\"><font style=\"font-size:11px;font-family:sans-serif;\"><B> ALT </font></TD>";
|
||||
echo "<TD BGCOLOR=\"#CCCCCC\"><font style=\"font-size:11px;font-family:sans-serif;\"><B> HANGUP </font></TD>";
|
||||
# echo "</TR><TR>";
|
||||
# echo "<TD BGCOLOR=\"#CCCCCC\" COLSPAN=9><font style=\"font-size:11px;font-family:sans-serif;\"><B> FULL NAME </font></TD>";
|
||||
echo "</TR>";
|
||||
|
||||
|
||||
$stmt="select start_epoch,call_date,campaign_id,length_in_sec,status,phone_code,phone_number,lead_id,term_reason,alt_dial,comments,uniqueid,user from vicidial_log where lead_id='$lead_id' order by call_date desc limit 10000;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$out_logs_to_print = mysql_num_rows($rslt);
|
||||
if ($format=='debug') {echo "|$out_logs_to_print|$stmt|";}
|
||||
|
||||
$g=0;
|
||||
$u=0;
|
||||
while ($out_logs_to_print > $u)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$ALLsort[$g] = "$row[0]-----$g";
|
||||
$ALLstart_epoch[$g] = $row[0];
|
||||
$ALLcall_date[$g] = $row[1];
|
||||
$ALLcampaign_id[$g] = $row[2];
|
||||
$ALLlength_in_sec[$g] = $row[3];
|
||||
$ALLstatus[$g] = $row[4];
|
||||
$ALLphone_code[$g] = $row[5];
|
||||
$ALLphone_number[$g] = $row[6];
|
||||
$ALLlead_id[$g] = $row[7];
|
||||
$ALLhangup_reason[$g] = $row[8];
|
||||
$ALLalt_dial[$g] = $row[9];
|
||||
$ALLuniqueid[$g] = $row[11];
|
||||
$ALLuser[$g] = $row[12];
|
||||
$ALLin_out[$g] = "OUT-AUTO";
|
||||
if ($row[10] == 'MANUAL') {$ALLin_out[$g] = "OUT-MANUAL";}
|
||||
|
||||
$stmtA="SELECT call_notes FROM vicidial_call_notes WHERE lead_id='$ALLlead_id[$g]' and vicidial_id='$ALLuniqueid[$g]';";
|
||||
$rsltA=mysql_query($stmtA, $link);
|
||||
$out_notes_to_print = mysql_num_rows($rslt);
|
||||
if ($out_notes_to_print > 0)
|
||||
{
|
||||
$rowA=mysql_fetch_row($rsltA);
|
||||
$Allcall_notes[$g] = $rowA[0];
|
||||
if (strlen($Allcall_notes[$g]) > 0)
|
||||
{$Allcall_notes[$g] = "<b>NOTES: </b> $Allcall_notes[$g]";}
|
||||
}
|
||||
$stmtA="SELECT full_name FROM vicidial_users WHERE user='$ALLuser[$g]';";
|
||||
$rsltA=mysql_query($stmtA, $link);
|
||||
$users_to_print = mysql_num_rows($rslt);
|
||||
if ($users_to_print > 0)
|
||||
{
|
||||
$rowA=mysql_fetch_row($rsltA);
|
||||
$ALLuser[$g] .= " - $rowA[0]";
|
||||
}
|
||||
|
||||
$Allcounter[$g] = $g;
|
||||
|
||||
$g++;
|
||||
$u++;
|
||||
}
|
||||
|
||||
$stmt="select start_epoch,call_date,campaign_id,length_in_sec,status,phone_code,phone_number,lead_id,term_reason,queue_seconds,uniqueid,closecallid,user from vicidial_closer_log where lead_id='$lead_id' order by call_date desc limit 10000;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$in_logs_to_print = mysql_num_rows($rslt);
|
||||
if ($format=='debug') {echo "|$in_logs_to_print|$stmt|";}
|
||||
|
||||
$u=0;
|
||||
while ($in_logs_to_print > $u)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$ALLsort[$g] = "$row[0]-----$g";
|
||||
$ALLstart_epoch[$g] = $row[0];
|
||||
$ALLcall_date[$g] = $row[1];
|
||||
$ALLcampaign_id[$g] = $row[2];
|
||||
$ALLlength_in_sec[$g] = ($row[3] - $row[9]);
|
||||
if ($ALLlength_in_sec[$g] < 0) {$ALLlength_in_sec[$g]=0;}
|
||||
$ALLstatus[$g] = $row[4];
|
||||
$ALLphone_code[$g] = $row[5];
|
||||
$ALLphone_number[$g] = $row[6];
|
||||
$ALLlead_id[$g] = $row[7];
|
||||
$ALLhangup_reason[$g] = $row[8];
|
||||
$ALLuniqueid[$g] = $row[10];
|
||||
$ALLclosecallid[$g] = $row[11];
|
||||
$ALLuser[$g] = $row[12];
|
||||
$ALLalt_dial[$g] = "MAIN";
|
||||
$ALLin_out[$g] = "IN";
|
||||
|
||||
$stmtA="SELECT call_notes FROM vicidial_call_notes WHERE lead_id='$ALLlead_id[$g]' and vicidial_id='$ALLclosecallid[$g]';";
|
||||
$rsltA=mysql_query($stmtA, $link);
|
||||
$in_notes_to_print = mysql_num_rows($rslt);
|
||||
if ($in_notes_to_print > 0)
|
||||
{
|
||||
$rowA=mysql_fetch_row($rsltA);
|
||||
$Allcall_notes[$g] = $rowA[0];
|
||||
if (strlen($Allcall_notes[$g]) > 0)
|
||||
{$Allcall_notes[$g] = "<b>NOTES: </b> $Allcall_notes[$g]";}
|
||||
}
|
||||
$stmtA="SELECT full_name FROM vicidial_users WHERE user='$ALLuser[$g]';";
|
||||
$rsltA=mysql_query($stmtA, $link);
|
||||
$users_to_print = mysql_num_rows($rslt);
|
||||
if ($users_to_print > 0)
|
||||
{
|
||||
$rowA=mysql_fetch_row($rsltA);
|
||||
$ALLuser[$g] .= " - $rowA[0]";
|
||||
}
|
||||
|
||||
$Allcounter[$g] = $g;
|
||||
|
||||
$g++;
|
||||
$u++;
|
||||
}
|
||||
|
||||
if ($g > 0)
|
||||
{sort($ALLsort, SORT_NUMERIC);}
|
||||
else
|
||||
{echo "<tr bgcolor=white><td colspan=11 align=center>No calls on this day</td></tr>";}
|
||||
|
||||
$u=0;
|
||||
while ($g > $u)
|
||||
{
|
||||
$sort_split = explode("-----",$ALLsort[$u]);
|
||||
$i = $sort_split[1];
|
||||
|
||||
if (eregi("1$|3$|5$|7$|9$", $u))
|
||||
{$bgcolor='bgcolor="#B9CBFD"';}
|
||||
else
|
||||
{$bgcolor='bgcolor="#9BB9FB"';}
|
||||
|
||||
$u++;
|
||||
echo "<tr $bgcolor>";
|
||||
echo "<td><font size=1>$u</td>";
|
||||
echo "<td align=right><font size=2>$ALLcall_date[$i]</td>";
|
||||
echo "<td align=right><font size=2> $ALLuser[$i]</td>\n";
|
||||
echo "<td align=right><font size=2> $ALLlength_in_sec[$i]</td>\n";
|
||||
echo "<td align=right><font size=2> $ALLstatus[$i]</td>\n";
|
||||
echo "<td align=right><font size=2> $ALLphone_code[$i] $ALLphone_number[$i] </td>\n";
|
||||
echo "<td align=right><font size=2> $ALLcampaign_id[$i] </td>\n";
|
||||
echo "<td align=right><font size=2> $ALLin_out[$i] </td>\n";
|
||||
echo "<td align=right><font size=2> $ALLalt_dial[$i] </td>\n";
|
||||
echo "<td align=right><font size=2> $ALLhangup_reason[$i] </td>\n";
|
||||
echo "</TR><TR>";
|
||||
echo "<td></td>";
|
||||
echo "<TD $bgcolor COLSPAN=9><font style=\"font-size:11px;font-family:sans-serif;\"> $Allcall_notes[$i] </font></TD>";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
echo "</TABLE>";
|
||||
echo "<BR>";
|
||||
echo "<a href=\"#\" onclick=\"hideDiv('CalLNotesDisplaYBox');return false;\">Close Call Notes</a>";
|
||||
echo "</CENTER>";
|
||||
}
|
||||
|
||||
|
||||
################################################################################
|
||||
### CALLSINQUEUEgrab - grab a call in queue and reserve it for that agent
|
||||
################################################################################
|
||||
|
||||
+106
-5
@@ -333,10 +333,11 @@
|
||||
# 110129-1050 - Changed to XHTML compliant formatting, issue #444
|
||||
# 110208-1202 - Made scheduled callbacks notice move when on script/form tabs
|
||||
# 110212-2206 - Added scheduled callback custom statuses compatibility
|
||||
# 110215-1412 - Added my_callback_option and per_call_notes options
|
||||
#
|
||||
|
||||
$version = '2.4-310';
|
||||
$build = '110212-2206';
|
||||
$version = '2.4-311';
|
||||
$build = '110215-1412';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=69;
|
||||
$one_mysql_log=0;
|
||||
@@ -1307,7 +1308,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 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 FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
|
||||
$rslt=mysql_query($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";}
|
||||
@@ -1396,6 +1397,8 @@ else
|
||||
$manual_preview_dial = $row[81];
|
||||
$api_manual_dial = $row[82];
|
||||
$manual_dial_call_time_check = $row[83];
|
||||
$my_callback_option = $row[84];
|
||||
$per_call_notes = $row[85];
|
||||
|
||||
|
||||
$AllowManualQueueCalls=1;
|
||||
@@ -3224,6 +3227,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
var call_variables='';
|
||||
var focus_blur_enabled='<?php echo $focus_blur_enabled ?>';
|
||||
var CBlinkCONTENT='';
|
||||
var my_callback_option='<?php echo $my_callback_option ?>';
|
||||
var per_call_notes='<?php echo $per_call_notes ?>';
|
||||
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\" />";
|
||||
@@ -7808,6 +7813,18 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
{
|
||||
document.getElementById("DispoManualQueueMessage").innerHTML = "<br /><b><font color=\"red\" size=\"3\">Manual Dial Queue Calls Waiting: " + APIManualDialQueue + "</font></b><br />";
|
||||
}
|
||||
if (per_call_notes == 'ENABLED')
|
||||
{
|
||||
var test_notes = document.vicidial_form.call_notes_dispo.value;
|
||||
if (test_notes.length > 0)
|
||||
{document.vicidial_form.call_notes.value = document.vicidial_form.call_notes_dispo.value}
|
||||
document.getElementById("PerCallNotesContent").innerHTML = "<br /><b><font size=\"3\">Call Notes: </font></b><br /><textarea name=\"call_notes_dispo\" id=\"call_notes_dispo\" rows=\"2\" cols=\"100\" class=\"cust_form_text\" value=\"\">" + document.vicidial_form.call_notes.value + "</textarea>";
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("PerCallNotesContent").innerHTML = "<input type=\"hidden\" name=\"call_notes_dispo\" id=\"call_notes_dispo\" value=\"\" />";
|
||||
}
|
||||
|
||||
HidEGenDerPulldown();
|
||||
AgentDispoing = 1;
|
||||
var CBflag = '';
|
||||
@@ -7843,6 +7860,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
document.inert_form.inert_button.focus();
|
||||
document.inert_form.inert_button.blur();
|
||||
}
|
||||
if (my_callback_option == 'CHECKED')
|
||||
{document.vicidial_form.CallBackOnlyMe.checked=true;}
|
||||
}
|
||||
|
||||
// ################################################################################
|
||||
@@ -8101,7 +8120,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
}
|
||||
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 + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&MDnextCID=" + LasTCID + "&stage=" + group + "&vtiger_callback_id=" + vtiger_callback_id + "&phone_number=" + document.vicidial_form.phone_number.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&dial_method" + dial_method + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&CallBackLeadStatus=" + CallBackLeadStatus + "&comments=" + CallBackCommenTs + "&custom_field_names=" + custom_field_names;
|
||||
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 + "&use_campaign_dnc=" + use_campaign_dnc + "&MDnextCID=" + LasTCID + "&stage=" + group + "&vtiger_callback_id=" + vtiger_callback_id + "&phone_number=" + document.vicidial_form.phone_number.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&dial_method" + dial_method + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&CallBackLeadStatus=" + CallBackLeadStatus + "&comments=" + CallBackCommenTs + "&custom_field_names=" + custom_field_names + "&call_notes=" + document.vicidial_form.call_notes_dispo.value;
|
||||
xmlhttp.open('POST', 'vdc_db_query.php');
|
||||
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
|
||||
xmlhttp.send(DSupdate_query);
|
||||
@@ -8155,6 +8174,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
document.vicidial_form.security_phrase.value='';
|
||||
document.vicidial_form.comments.value ='';
|
||||
document.vicidial_form.called_count.value ='';
|
||||
document.vicidial_form.call_notes.value ='';
|
||||
document.vicidial_form.call_notes_dispo.value ='';
|
||||
VDCL_group_id = '';
|
||||
fronter = '';
|
||||
inOUT = 'OUT';
|
||||
@@ -10174,6 +10195,52 @@ function phone_number_format(formatphone) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ################################################################################
|
||||
// Refresh the lead notes display
|
||||
function VieWNotesLoG(logframe)
|
||||
{
|
||||
showDiv('CalLNotesDisplaYBox');
|
||||
|
||||
var xmlhttp=false;
|
||||
/*@cc_on @*/
|
||||
/*@if (@_jscript_version >= 5)
|
||||
// JScript gives us Conditional compilation, we can cope with old IE versions.
|
||||
// and security blocked creation of the objects.
|
||||
try {
|
||||
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
||||
} catch (e) {
|
||||
try {
|
||||
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
} catch (E) {
|
||||
xmlhttp = false;
|
||||
}
|
||||
}
|
||||
@end @*/
|
||||
if (!xmlhttp && typeof XMLHttpRequest!='undefined')
|
||||
{
|
||||
xmlhttp = new XMLHttpRequest();
|
||||
}
|
||||
if (xmlhttp)
|
||||
{
|
||||
RAview_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=CALLNOTESview&format=text&user=" + user + "&pass=" + pass + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&stage=<?php echo $HCwidth ?>";
|
||||
xmlhttp.open('POST', 'vdc_db_query.php');
|
||||
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
|
||||
xmlhttp.send(RAview_query);
|
||||
xmlhttp.onreadystatechange = function()
|
||||
{
|
||||
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
|
||||
{
|
||||
// alert(xmlhttp.responseText);
|
||||
document.getElementById('CallNotesSpan').innerHTML = xmlhttp.responseText + "\n";
|
||||
}
|
||||
}
|
||||
delete xmlhttp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ################################################################################
|
||||
// Run the logging process for customer 3way hangup
|
||||
function customer_3way_hangup_process(temp_hungup_time,temp_xfer_call_seconds)
|
||||
@@ -10416,6 +10483,8 @@ else
|
||||
}
|
||||
document.getElementById("CallBackDatEPrinT").innerHTML = "Select a Date Below";
|
||||
document.vicidial_form.CallBackOnlyMe.checked=false;
|
||||
if (my_callback_option == 'CHECKED')
|
||||
{document.vicidial_form.CallBackOnlyMe.checked=true;}
|
||||
document.vicidial_form.CallBackDatESelectioN.value = '';
|
||||
document.vicidial_form.CallBackCommenTsField.value = '';
|
||||
|
||||
@@ -10571,6 +10640,7 @@ else
|
||||
hideDiv('AgentXferViewSpan');
|
||||
hideDiv('TimerSpan');
|
||||
hideDiv('CalLLoGDisplaYBox');
|
||||
hideDiv('CalLNotesDisplaYBox');
|
||||
hideDiv('LeaDInfOBox');
|
||||
hideDiv('agentdirectlink');
|
||||
hideDiv('blind_monitor_notice_span');
|
||||
@@ -10587,7 +10657,10 @@ else
|
||||
if (agentcall_manual != '1')
|
||||
{hideDiv('ManuaLDiaLButtons');}
|
||||
if (agent_call_log_view != '1')
|
||||
{hideDiv('CallLogButtons');}
|
||||
{
|
||||
hideDiv('CallNotesButtons');
|
||||
hideDiv('CallLogButtons');
|
||||
}
|
||||
if (callholdstatus != '1')
|
||||
{hideDiv('AgentStatusCalls');}
|
||||
if (agentcallsstatus != '1')
|
||||
@@ -11760,6 +11833,22 @@ $zi=2;
|
||||
{echo "<input type=\"text\" size=\"65\" name=\"comments\" maxlength=\"255\" class=\"cust_form\" value=\"\" />\n";}
|
||||
}
|
||||
|
||||
echo "</font></td></tr><tr><td align=\"right\"><font class=\"body_text\">\n";
|
||||
|
||||
if ($per_call_notes == 'ENABLED')
|
||||
{
|
||||
echo "Call Notes: ";
|
||||
if ($agent_call_log_view == '1')
|
||||
{echo "<br /><span id=\"CallNotesButtons\"><a href=\"#\" onclick=\"VieWNotesLoG();return false;\">view notes</a></span> ";}
|
||||
echo "</td><td align=\"left\" colspan=\"5\"><font class=\"body_text\">";
|
||||
echo "<textarea name=\"call_notes\" id=\"call_notes\" rows=\"2\" cols=\"85\" class=\"cust_form_text\" value=\"\"></textarea>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo " </td><td align=\"left\" colspan=5><input type=\"hidden\" name=\"call_notes\" id=\"call_notes\" value=\"\" /><span id=\"CallNotesButtons\"></span>\n";
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
</font>
|
||||
</td>
|
||||
@@ -12169,6 +12258,7 @@ Available Agents Transfer: <span id="AgentXferViewSelect"></span></center></font
|
||||
?>
|
||||
<span id="Dispo3wayMessage"></span>
|
||||
<span id="DispoManualQueueMessage"></span>
|
||||
<span id="PerCallNotesContent"><input type="hidden" name="call_notes_dispo" id="call_notes_dispo" value="" /></span>
|
||||
<span id="DispoSelectContent"> End-of-call Disposition Selection </span>
|
||||
<input type="hidden" name=DispoSelection /><br />
|
||||
<input type=checkbox name=DispoSelectStop id=DispoSelectStop size="1" value="0" /> PAUSE AGENT DIALING <br />
|
||||
@@ -12352,6 +12442,17 @@ Available Agents Transfer: <span id="AgentXferViewSelect"></span></center></font
|
||||
</td></tr></table>
|
||||
</span>
|
||||
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:<?php $zi++; echo $zi ?>;" id="CalLNotesDisplaYBox">
|
||||
<table border="1" bgcolor="#CCFFCC" width="<?php echo $CAwidth ?>px" height="<?php echo $WRheight ?>px"><tr><td align="center" valign="top"> CALL NOTES LOG:<br />
|
||||
<?php
|
||||
if ($webphone_location == 'bar')
|
||||
{echo "<br /><img src=\"images/pixel.gif\" width=\"1px\" height=\"".$webphone_height."px\" /><br />\n";}
|
||||
?>
|
||||
<div class="scroll_calllog" id="CallNotesSpan"> Call Notes List </div>
|
||||
<br /><br />
|
||||
</td></tr></table>
|
||||
</span>
|
||||
|
||||
<span style="position:absolute;left:0px;top:0px;z-index:<?php $zi++; echo $zi ?>;" id="LeaDInfOBox">
|
||||
<table border="1" bgcolor="#CCFFCC" width="<?php echo $CAwidth ?>px" height="<?php echo $WRheight ?>px"><tr><td align="center" valign="top"> Customer Information:<br />
|
||||
<?php
|
||||
|
||||
+40
-5
File diff suppressed because one or more lines are too long
@@ -41,6 +41,7 @@
|
||||
# 100924-1431 - Added Called Count display
|
||||
# 101127-1610 - Added ability to set a scheduled callback date and time
|
||||
# 110212-2041 - Added compatibility with definable scheduled callback statuses
|
||||
# 110215-1411 - Added display of call notes to log records
|
||||
#
|
||||
|
||||
require("dbconnect.php");
|
||||
@@ -541,6 +542,21 @@ else
|
||||
$call_log .= "<td align=right><font size=2> $row[15] </td>\n";
|
||||
$call_log .= "<td align=right><font size=2> $row[10] </td></tr>\n";
|
||||
|
||||
$stmtA="SELECT call_notes FROM vicidial_call_notes WHERE lead_id='" . mysql_real_escape_string($lead_id) . "' and vicidial_id='$row[0]';";
|
||||
$rsltA=mysql_query($stmtA, $link);
|
||||
$out_notes_to_print = mysql_num_rows($rslt);
|
||||
if ($out_notes_to_print > 0)
|
||||
{
|
||||
$rowA=mysql_fetch_row($rsltA);
|
||||
if (strlen($rowA[0]) > 0)
|
||||
{
|
||||
$call_log .= "<TR>";
|
||||
$call_log .= "<td></td>";
|
||||
$call_log .= "<TD $bgcolor COLSPAN=9><font style=\"font-size:11px;font-family:sans-serif;\"> NOTES: $rowA[0] </font></TD>";
|
||||
$call_log .= "</TR>";
|
||||
}
|
||||
}
|
||||
|
||||
$campaign_id = $row[3];
|
||||
}
|
||||
|
||||
@@ -608,6 +624,21 @@ else
|
||||
$closer_log .= "<td align=right><font size=2> $row[14] </td>\n";
|
||||
$closer_log .= "<td align=right><font size=2> $row[17] </td></tr>\n";
|
||||
|
||||
$stmtA="SELECT call_notes FROM vicidial_call_notes WHERE lead_id='" . mysql_real_escape_string($lead_id) . "' and vicidial_id='$row[0]';";
|
||||
$rsltA=mysql_query($stmtA, $link);
|
||||
$in_notes_to_print = mysql_num_rows($rslt);
|
||||
if ($in_notes_to_print > 0)
|
||||
{
|
||||
$rowA=mysql_fetch_row($rsltA);
|
||||
if (strlen($rowA[0]) > 0)
|
||||
{
|
||||
$closer_log .= "<TR>";
|
||||
$closer_log .= "<td></td>";
|
||||
$closer_log .= "<TD $bgcolor COLSPAN=9><font style=\"font-size:11px;font-family:sans-serif;\"> NOTES: $rowA[0] </font></TD>";
|
||||
$closer_log .= "</TR>";
|
||||
}
|
||||
}
|
||||
|
||||
$campaign_id = $row[3];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user