Added lead status display for callbacks list output

git-svn-id: svn://192.168.202.10@3953 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2025-11-24 14:50:20 +00:00
parent 843de4a671
commit 14a882916a
2 changed files with 18 additions and 12 deletions
+9 -5
View File
@@ -564,10 +564,11 @@
# 250923-1755 - Added talk_sec_url features # 250923-1755 - Added talk_sec_url features
# 251002-1352 - Added call_count_limit_restrict campaign option # 251002-1352 - Added call_count_limit_restrict campaign option
# 251005-0931 - Added code for recording_dtmf_muting # 251005-0931 - Added code for recording_dtmf_muting
# 251124-0935 - Added lead status display for callbacks list output
# #
$version = '2.14-457'; $version = '2.14-458';
$build = '251005-0931'; $build = '251124-0935';
$php_script = 'vdc_db_query.php'; $php_script = 'vdc_db_query.php';
$mel=1; # Mysql Error Log enabled = 1 $mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=995; $mysql_log_count=995;
@@ -19888,7 +19889,7 @@ if ($ACTION == 'AGENTSview')
################################################################################ ################################################################################
if ($ACTION == 'CALLSINQUEUEview') if ($ACTION == 'CALLSINQUEUEview')
{ {
$stmt="SELECT view_calls_in_queue,grab_calls_in_queue,calls_waiting_vl_one,calls_waiting_vl_two from vicidial_campaigns where campaign_id='$campaign'"; $stmt="SELECT view_calls_in_queue,grab_calls_in_queue,calls_waiting_vl_one,calls_waiting_vl_two,disable_alter_custphone from vicidial_campaigns where campaign_id='$campaign'";
if ($non_latin > 0) {$rslt=mysql_to_mysqli("SET NAMES 'UTF8'", $link);} if ($non_latin > 0) {$rslt=mysql_to_mysqli("SET NAMES 'UTF8'", $link);}
$rslt=mysql_to_mysqli($stmt, $link); $rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00228',$user,$server_ip,$session_name,$one_mysql_log);} if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00228',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -19897,6 +19898,7 @@ if ($ACTION == 'CALLSINQUEUEview')
$grab_calls_in_queue = $row[1]; $grab_calls_in_queue = $row[1];
$calls_waiting_vl_one = $row[2]; $calls_waiting_vl_one = $row[2];
$calls_waiting_vl_two = $row[3]; $calls_waiting_vl_two = $row[3];
$disable_alter_custphone = $row[4];
if (preg_match('/NONE/i',$view_calls_in_queue)) if (preg_match('/NONE/i',$view_calls_in_queue))
{ {
@@ -22210,7 +22212,7 @@ if ($ACTION == 'CalLBacKLisT')
if ($agentonly_callback_campaign_lock > 0) if ($agentonly_callback_campaign_lock > 0)
{$campaignCBsql = "and campaign_id='$campaign'";} {$campaignCBsql = "and campaign_id='$campaign'";}
$stmt = "SELECT callback_id,lead_id,campaign_id,status,entry_time,callback_time,comments,customer_timezone,customer_time,customer_timezone_diff from vicidial_callbacks where recipient='USERONLY' and user='$user' $campaignCBsql $campaignCBhoursSQL $campaignCBdisplaydaysSQL and status NOT IN('INACTIVE','DEAD') order by callback_time;"; $stmt = "SELECT callback_id,lead_id,campaign_id,status,entry_time,callback_time,comments,customer_timezone,customer_time,customer_timezone_diff,lead_status from vicidial_callbacks where recipient='USERONLY' and user='$user' $campaignCBsql $campaignCBhoursSQL $campaignCBdisplaydaysSQL and status NOT IN('INACTIVE','DEAD') order by callback_time;";
if ($DB) {echo "$stmt\n";} if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link); $rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00178',$user,$server_ip,$session_name,$one_mysql_log);} if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00178',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -22221,6 +22223,7 @@ if ($ACTION == 'CalLBacKLisT')
$lead_id = array(); $lead_id = array();
$campaign_id = array(); $campaign_id = array();
$status = array(); $status = array();
$lead_status = array();
$entry_time = array(); $entry_time = array();
$callback_time = array(); $callback_time = array();
$comments = array(); $comments = array();
@@ -22242,6 +22245,7 @@ if ($ACTION == 'CalLBacKLisT')
$customer_timezone[$loop_count] = preg_replace("/.*,/",'',$row[7]); $customer_timezone[$loop_count] = preg_replace("/.*,/",'',$row[7]);
$customer_time[$loop_count] = $row[8]; $customer_time[$loop_count] = $row[8];
$customer_timezone_diff[$loop_count] = $row[9]; $customer_timezone_diff[$loop_count] = $row[9];
$lead_status[$loop_count] = $row[10];
$loop_count++; $loop_count++;
} }
$loop_count=0; $loop_count=0;
@@ -22302,7 +22306,7 @@ if ($ACTION == 'CalLBacKLisT')
{ {
$customer_time_CB_output = "-!T-$customer_timezone[$loop_count]-!T-$customer_time[$loop_count]"; $customer_time_CB_output = "-!T-$customer_timezone[$loop_count]-!T-$customer_time[$loop_count]";
} }
$CBoutput = "$row[0]-!T-$row[1]-!T-$row[2]-!T-$callback_id[$loop_count]-!T-$lead_id[$loop_count]-!T-$campaign_id[$loop_count]-!T-"._QXZ("$status[$loop_count]")."-!T-$entry_time[$loop_count]-!T-$callback_time[$loop_count]-!T-$comments[$loop_count]-!T-$PHONEdialable-!T-$alt_phone$customer_time_CB_output"; $CBoutput = "$row[0]-!T-$row[1]-!T-$row[2]-!T-$callback_id[$loop_count]-!T-$lead_id[$loop_count]-!T-$campaign_id[$loop_count]-!T-"._QXZ("$status[$loop_count]")."-!T-$entry_time[$loop_count]-!T-$callback_time[$loop_count]-!T-$comments[$loop_count]-!T-$PHONEdialable-!T-$alt_phone-!T-$lead_status[$loop_count]$customer_time_CB_output";
echo "$CBoutput\n"; echo "$CBoutput\n";
$loop_count++; $loop_count++;
} }
+9 -7
View File
@@ -752,10 +752,11 @@
# 250924-0953 - Added Talk Seconds URLs features # 250924-0953 - Added Talk Seconds URLs features
# 251002-1353 - Added call_count_limit_restrict campaign option # 251002-1353 - Added call_count_limit_restrict campaign option
# 251020-0849 - Added code for recording_dtmf_muting, fix for Stereo Call Recording # 251020-0849 - Added code for recording_dtmf_muting, fix for Stereo Call Recording
# 251124-0936 - Added lead status display for callbacks list
# #
$version = '2.14-718c'; $version = '2.14-719c';
$build = '251020-0849'; $build = '251124-0936';
$php_script = 'vicidial.php'; $php_script = 'vicidial.php';
$mel=1; # Mysql Error Log enabled = 1 $mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=108; $mysql_log_count=108;
@@ -10313,7 +10314,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
var CB_calls = all_CBs_array[0]; var CB_calls = all_CBs_array[0];
var loop_ct=0; var loop_ct=0;
var conv_start=0; var conv_start=0;
var CB_HTML = "<table width=\"<?php echo $HCwidth ?>px\"><tr bgcolor=\"<?php echo $SCRIPT_COLOR ?>\"><td><font class=\"log_title\">#</font></td><td align=\"center\"><font class=\"log_title\"> <?php echo _QXZ("CALLBACK DATE/TIME"); ?> </font></td><td align=\"center\"><font class=\"log_title\"> <?php echo _QXZ("NUMBER"); ?> </font></td><td align=\"center\"><font class=\"log_title\"> <?php echo _QXZ("INFO"); ?> </font></td><td align=\"center\"><font class=\"log_title\"> <?php echo _QXZ("FULL NAME"); ?> </font></td><td align=\"center\"><font class=\"log_title\"> <?php echo _QXZ("STATUS"); ?> </font></td><td align=\"center\"><font class=\"log_title\"> <?php echo _QXZ("CAMPAIGN"); ?> </font></td><td align=\"center\"><font class=\"log_title\"> <?php echo _QXZ("LAST CALL DATE/TIME"); ?> </font></td><td align=\"center\"><font class=\"log_title\"> <?php echo _QXZ("DIAL"); ?></font></td><td align=\"center\"><font class=\"log_title\"> <?php echo _QXZ("ALT"); ?> </font></td></tr>" var CB_HTML = "<table width=\"<?php echo $HCwidth ?>px\"><tr bgcolor=\"<?php echo $SCRIPT_COLOR ?>\"><td><font class=\"log_title\">#</font></td><td align=\"center\"><font class=\"log_title\"> <?php echo _QXZ("CALLBACK DATE/TIME"); ?> </font></td><td align=\"center\"><font class=\"log_title\"> <?php echo _QXZ("NUMBER"); ?> </font></td><td align=\"center\"><font class=\"log_title\"> <?php echo _QXZ("INFO"); ?> </font></td><td align=\"center\"><font class=\"log_title\"> <?php echo _QXZ("FULL NAME"); ?> </font></td><td align=\"center\"><font class=\"log_title\"> <?php echo _QXZ("CB STATUS"); ?> </font></td><td align=\"center\"><font class=\"log_title\"> <?php echo _QXZ("LEAD STATUS"); ?> </font></td><td align=\"center\"><font class=\"log_title\"> <?php echo _QXZ("CAMPAIGN"); ?> </font></td><td align=\"center\"><font class=\"log_title\"> <?php echo _QXZ("LAST CALL DATE/TIME"); ?> </font></td><td align=\"center\"><font class=\"log_title\"> <?php echo _QXZ("DIAL"); ?></font></td><td align=\"center\"><font class=\"log_title\"> <?php echo _QXZ("ALT"); ?> </font></td></tr>"
while (loop_ct < CB_calls) while (loop_ct < CB_calls)
{ {
loop_ct++; loop_ct++;
@@ -10338,8 +10339,9 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
var CB_comments = call_array[9]; var CB_comments = call_array[9];
var CB_dialable = call_array[10]; var CB_dialable = call_array[10];
var CB_alt_phone = call_array[11]; var CB_alt_phone = call_array[11];
var CB_cust_timezone = call_array[12]; var CB_lead_status = call_array[12];
var CB_cust_time = call_array[13]; var CB_cust_timezone = call_array[13];
var CB_cust_time = call_array[14];
var CB_comments_ten = CB_comments; var CB_comments_ten = CB_comments;
var CB_cust_content=''; var CB_cust_content='';
if (CB_cust_timezone.length > 0) if (CB_cust_timezone.length > 0)
@@ -10356,11 +10358,11 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
var alt_link = "<a href=\"#\" onclick=\"new_callback_call('" + CB_id + "','" + CB_lead_id + "','ALT');return false;\"><?php echo _QXZ("ALT"); ?></a>&nbsp;"; var alt_link = "<a href=\"#\" onclick=\"new_callback_call('" + CB_id + "','" + CB_lead_id + "','ALT');return false;\"><?php echo _QXZ("ALT"); ?></a>&nbsp;";
if (CB_alt_phone.length < 3) if (CB_alt_phone.length < 3)
{alt_link = "<?php echo _QXZ("ALT"); ?>&nbsp;";} {alt_link = "<?php echo _QXZ("ALT"); ?>&nbsp;";}
CB_HTML = CB_HTML + "<tr bgcolor=\"" + row_color + "\"><td><font class=\"log_text\">" + loop_ct + "</font></td><td align=\"left\"><font class=\"log_text\">" + CB_callback_time + "</td><td align=\"right\"><font class=\"log_text\">" + CB_phone_display + "</td><td align=\"right\"><font class=\"log_text\">" + CB_comments_ten + " - <a href=\"#\" onclick=\"VieWLeaDInfO('" + CB_lead_id + "','" + CB_id + "');return false;\"><?php echo _QXZ("INFO"); ?></a></font></td><td align=\"right\"><font class=\"log_text\">" + CB_name + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_status + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_campaign + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_lastcall_time + "&nbsp;</font></td><td align=\"right\"><font class=\"log_text\"><a href=\"#\" onclick=\"new_callback_call('" + CB_id + "','" + CB_lead_id + "','MAIN');return false;\"><?php echo _QXZ("DIAL"); ?></a>&nbsp;</font></td><td align=\"right\"><font class=\"log_text\">" + alt_link + "</font></td></tr>" + CB_cust_content; CB_HTML = CB_HTML + "<tr bgcolor=\"" + row_color + "\"><td><font class=\"log_text\">" + loop_ct + "</font></td><td align=\"left\"><font class=\"log_text\">" + CB_callback_time + "</td><td align=\"right\"><font class=\"log_text\">" + CB_phone_display + "</td><td align=\"right\"><font class=\"log_text\">" + CB_comments_ten + " - <a href=\"#\" onclick=\"VieWLeaDInfO('" + CB_lead_id + "','" + CB_id + "');return false;\"><?php echo _QXZ("INFO"); ?></a></font></td><td align=\"right\"><font class=\"log_text\">" + CB_name + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_status + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_lead_status + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_campaign + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_lastcall_time + "&nbsp;</font></td><td align=\"right\"><font class=\"log_text\"><a href=\"#\" onclick=\"new_callback_call('" + CB_id + "','" + CB_lead_id + "','MAIN');return false;\"><?php echo _QXZ("DIAL"); ?></a>&nbsp;</font></td><td align=\"right\"><font class=\"log_text\">" + alt_link + "</font></td></tr>" + CB_cust_content;
} }
else else
{ {
CB_HTML = CB_HTML + "<tr bgcolor=\"" + row_color + "\"><td><font class=\"log_text\">" + loop_ct + "</font></td><td align=\"left\"><font class=\"log_text\">" + CB_callback_time + "</td><td align=\"right\"><font class=\"log_text\">" + CB_phone_display + "</td><td align=\"right\"><font class=\"log_text\">" + CB_comments_ten + " - INFO</font></td><td align=\"right\"><font class=\"log_text\">" + CB_name + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_status + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_campaign + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_lastcall_time + "&nbsp;</font></td><td align=\"right\" colspan=2><font class=\"log_text\"><?php echo _QXZ("NON-DIALABLE"); ?>&nbsp;</font></td></tr> + CB_cust_content"; CB_HTML = CB_HTML + "<tr bgcolor=\"" + row_color + "\"><td><font class=\"log_text\">" + loop_ct + "</font></td><td align=\"left\"><font class=\"log_text\">" + CB_callback_time + "</td><td align=\"right\"><font class=\"log_text\">" + CB_phone_display + "</td><td align=\"right\"><font class=\"log_text\">" + CB_comments_ten + " - INFO</font></td><td align=\"right\"><font class=\"log_text\">" + CB_name + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_status + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_lead_status + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_campaign + "</font></td><td align=\"right\"><font class=\"log_text\">" + CB_lastcall_time + "&nbsp;</font></td><td align=\"right\" colspan=2><font class=\"log_text\"><?php echo _QXZ("NON-DIALABLE"); ?>&nbsp;</font></td></tr> + CB_cust_content";
} }
} }
CB_HTML = CB_HTML + "</table>"; CB_HTML = CB_HTML + "</table>";