Added names to select list on the outbound report

Added longest wait time as next agent call option
Added option to the Outbound(VDAD) report to calculate stats including the overflow drop in-group stats with the outbound campaign stats
Changed Real-time Report screen agent time display to be based upon a change in "state"(INCALL, READY, PAUSED, etc...) instead of being based upon the time of the last call they handled
Fixed manual dial calls_today bug in vicidial.php
Several small bug fixes

git-svn-id: svn://192.168.202.10@1199 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2009-08-08 07:33:46 +00:00
parent 9e8c67dace
commit 8124e3f74f
15 changed files with 2276 additions and 1953 deletions
+10
View File
@@ -183,6 +183,16 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
down per in-group in hourly increments. This report also allows down per in-group in hourly increments. This report also allows
filtering of the stats by call time scheme. filtering of the stats by call time scheme.
46. Added option to the Outbound(VDAD) report to calculate stats including the
overflow drop in-group stats with the outbound campaign stats.
47. Added longest_wait_time option for Next Agent Call in Campaigns and
In-Groups.
48. Changed Real-time Report screen agent time display to be based upon a change
in "state"(INCALL, READY, PAUSED, etc...) instead of being based upon
the time of the last call they handled.
+2
View File
@@ -100,6 +100,7 @@
# 90712-2307 - Added agent grab call in queue # 90712-2307 - Added agent grab call in queue
# 90720-0023 - Added checks for filename validity before streaming, changed initial heavy search from 3 to 2 seconds # 90720-0023 - Added checks for filename validity before streaming, changed initial heavy search from 3 to 2 seconds
# 90726-0114 - Fixed bug on some calls for agent grab # 90726-0114 - Fixed bug on some calls for agent grab
# 90808-0307 - Added longest_wait_time as agent routing option
# #
$script = 'agi-VDAD_ALL_inbound.agi'; $script = 'agi-VDAD_ALL_inbound.agi';
@@ -1225,6 +1226,7 @@ if ($channel_status < 1)
$cbc=0; $cbc=0;
$aco_sub=0; $aco_sub=0;
$agent_call_order='order by last_call_finish'; $agent_call_order='order by last_call_finish';
if ($CAMP_callorder =~ /longest_wait_time/i) {$agent_call_order = 'order by vicidial_live_agents.last_state_change';}
if ($CAMP_callorder =~ /overall_user_level/i) {$agent_call_order = 'order by user_level desc,last_call_finish';} if ($CAMP_callorder =~ /overall_user_level/i) {$agent_call_order = 'order by user_level desc,last_call_finish';}
if ($CAMP_callorder =~ /oldest_call_start/i) {$agent_call_order = 'order by vicidial_live_agents.last_call_time';} if ($CAMP_callorder =~ /oldest_call_start/i) {$agent_call_order = 'order by vicidial_live_agents.last_call_time';}
if ($CAMP_callorder =~ /oldest_call_finish/i) {$agent_call_order = 'order by vicidial_live_agents.last_call_finish';} if ($CAMP_callorder =~ /oldest_call_finish/i) {$agent_call_order = 'order by vicidial_live_agents.last_call_finish';}
+2
View File
@@ -66,6 +66,7 @@
# 90630-2250 - Added more Sangoma CDP statuses # 90630-2250 - Added more Sangoma CDP statuses
# 90702-2240 - Added option to send to remote agent as phone*vendor_id # 90702-2240 - Added option to send to remote agent as phone*vendor_id
# 90721-1137 - Added rank and owner as vicidial_list fields # 90721-1137 - Added rank and owner as vicidial_list fields
# 90808-0307 - Added longest_wait_time as agent routing option
# #
$script = 'agi-VDAD_ALL_outbound.agi'; $script = 'agi-VDAD_ALL_outbound.agi';
@@ -1322,6 +1323,7 @@ while ($drop_timer <= $DROP_TIME)
$cbc=0; $cbc=0;
$aco_sub=0; $aco_sub=0;
$agent_call_order='order by last_call_finish'; $agent_call_order='order by last_call_finish';
if ($CAMP_callorder =~ /longest_wait_time/i) {$agent_call_order = 'order by last_state_change';}
if ($CAMP_callorder =~ /overall_user_level/i) {$agent_call_order = 'order by user_level desc,last_call_finish';} if ($CAMP_callorder =~ /overall_user_level/i) {$agent_call_order = 'order by user_level desc,last_call_finish';}
if ($CAMP_callorder =~ /oldest_call_start/i) {$agent_call_order = 'order by last_call_time';} if ($CAMP_callorder =~ /oldest_call_start/i) {$agent_call_order = 'order by last_call_time';}
if ($CAMP_callorder =~ /oldest_call_finish/i) {$agent_call_order = 'order by last_call_finish';} if ($CAMP_callorder =~ /oldest_call_finish/i) {$agent_call_order = 'order by last_call_finish';}
+6 -5
View File
@@ -37,6 +37,7 @@
# 80128-0105 - Fixed calls_today bug # 80128-0105 - Fixed calls_today bug
# 81007-1746 - Added debugX output for count statements and changed to if from while # 81007-1746 - Added debugX output for count statements and changed to if from while
# 81026-1246 - Added better logging of calls and fixed the DROP bug # 81026-1246 - Added better logging of calls and fixed the DROP bug
# 90808-0247 - Added agent last_state_change field
# #
### begin parsing run-time options ### ### begin parsing run-time options ###
@@ -284,7 +285,7 @@ while($one_day_interval > 0)
$w=0; $w=0;
while ($vla_qh_ct > $w) while ($vla_qh_ct > $w)
{ {
$stmtA = "UPDATE vicidial_live_agents set status='INCALL', last_call_time='$SQLdate',comments='REMOTE',calls_today='$calls_today' where live_agent_id='$QHlive_agent_id[$w]';"; $stmtA = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$SQLdate',comments='REMOTE',calls_today='$calls_today',last_state_change='$SQLdate' where live_agent_id='$QHlive_agent_id[$w]';";
$Aaffected_rows = $dbhA->do($stmtA); $Aaffected_rows = $dbhA->do($stmtA);
$stmtB = "UPDATE vicidial_list set status='XFER',user='$QHuser[$w]' where lead_id='$QHlead_id[$w]';"; $stmtB = "UPDATE vicidial_list set status='XFER',user='$QHuser[$w]' where lead_id='$QHlead_id[$w]';";
@@ -475,7 +476,7 @@ while($one_day_interval > 0)
if ($loginexistsALL[$h] > 0) if ($loginexistsALL[$h] > 0)
{ {
$stmtA = "UPDATE vicidial_live_agents set random_id='$DBremote_random[$h]',campaign_id='$DBremote_campaign[$h]',conf_exten='$DBremote_conf_exten[$h]',closer_campaigns='$DBremote_closer[$h]', status='READY' where user='$DBremote_user[$h]' and server_ip='$server_ip';"; $stmtA = "UPDATE vicidial_live_agents set random_id='$DBremote_random[$h]',campaign_id='$DBremote_campaign[$h]',conf_exten='$DBremote_conf_exten[$h]',closer_campaigns='$DBremote_closer[$h]', status='READY',last_state_change='$SQLdate' where user='$DBremote_user[$h]' and server_ip='$server_ip';";
$affected_rows = $dbhA->do($stmtA); $affected_rows = $dbhA->do($stmtA);
if ($DBX) {print STDERR "$DBremote_user[$h] ALL UPDATE: $affected_rows\n";} if ($DBX) {print STDERR "$DBremote_user[$h] ALL UPDATE: $affected_rows\n";}
# if ($affected_rows>0) # if ($affected_rows>0)
@@ -513,7 +514,7 @@ while($one_day_interval > 0)
} }
$sthA->finish(); $sthA->finish();
$stmtA = "INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,campaign_id,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,channel,uniqueid,callerid,user_level,comments) values('$DBremote_user[$h]','$server_ip','$DBremote_conf_exten[$h]','R/$DBremote_user[$h]','READY','$DBremote_campaign[$h]','$DBremote_random[$h]','$SQLdate','$FDtsSQLdate','$SQLdate','$DBremote_closer[$h]','','','','$DBuser_level[$h]','REMOTE');"; $stmtA = "INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,campaign_id,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,channel,uniqueid,callerid,user_level,comments,last_state_change) values('$DBremote_user[$h]','$server_ip','$DBremote_conf_exten[$h]','R/$DBremote_user[$h]','READY','$DBremote_campaign[$h]','$DBremote_random[$h]','$SQLdate','$FDtsSQLdate','$SQLdate','$DBremote_closer[$h]','','','','$DBuser_level[$h]','REMOTE','$SQLdate');";
$affected_rows = $dbhA->do($stmtA); $affected_rows = $dbhA->do($stmtA);
if ($DBX) {print STDERR "$DBremote_user[$h] NEW INSERT\n";} if ($DBX) {print STDERR "$DBremote_user[$h] NEW INSERT\n";}
if ($TESTrun > 0) if ($TESTrun > 0)
@@ -618,7 +619,7 @@ while($one_day_interval > 0)
{ {
if ($DELusers =~ /R\/$VD_user[$z]\|/) if ($DELusers =~ /R\/$VD_user[$z]\|/)
{ {
$stmtA = "UPDATE vicidial_live_agents set random_id='$VD_random[$z]',status='PAUSED', last_call_finish='$SQLdate',lead_id='',uniqueid='',callerid='',channel='' where user='$VD_user[$z]' and server_ip='$server_ip';"; $stmtA = "UPDATE vicidial_live_agents set random_id='$VD_random[$z]',status='PAUSED', last_call_finish='$SQLdate',lead_id='',uniqueid='',callerid='',channel='',last_state_change='$SQLdate' where user='$VD_user[$z]' and server_ip='$server_ip';";
$affected_rows = $dbhA->do($stmtA); $affected_rows = $dbhA->do($stmtA);
if ($DB) {print STDERR "$VD_user[$z] CALL WIPE UPDATE: $affected_rows|PAUSED|$VD_uniqueid[$z]|$VD_user[$z]|\n";} if ($DB) {print STDERR "$VD_user[$z] CALL WIPE UPDATE: $affected_rows|PAUSED|$VD_uniqueid[$z]|$VD_user[$z]|\n";}
if ($affected_rows>0) if ($affected_rows>0)
@@ -660,7 +661,7 @@ while($one_day_interval > 0)
} }
else else
{ {
$stmtA = "UPDATE vicidial_live_agents set random_id='$VD_random[$z]', last_call_finish='$SQLdate',lead_id='',uniqueid='',callerid='',channel='' where user='$VD_user[$z]' and server_ip='$server_ip';"; $stmtA = "UPDATE vicidial_live_agents set random_id='$VD_random[$z]', last_call_finish='$SQLdate',lead_id='',uniqueid='',callerid='',channel='',last_state_change='$SQLdate' where user='$VD_user[$z]' and server_ip='$server_ip';";
$affected_rows = $dbhA->do($stmtA); $affected_rows = $dbhA->do($stmtA);
if ($DB) {print STDERR "$VD_user[$z] CALL WIPE UPDATE: $affected_rows|READY|$VD_uniqueid[$z]|$VD_user[$z]|\n";} if ($DB) {print STDERR "$VD_user[$z] CALL WIPE UPDATE: $affected_rows|READY|$VD_uniqueid[$z]|$VD_user[$z]|\n";}
+47 -31
View File
@@ -22,6 +22,7 @@
# 90710-0514 - Fixes for data output formatting changes # 90710-0514 - Fixes for data output formatting changes
# 90721-1314 - Added rank and owner as vicidial_list fields # 90721-1314 - Added rank and owner as vicidial_list fields
# 90731-0555 - Added call time scheme restriction # 90731-0555 - Added call time scheme restriction
# 90807-1632 - Fixed call time bug and call length bug
# #
$txt = '.txt'; $txt = '.txt';
@@ -466,24 +467,6 @@ if ($sthArows > 0)
$Gct_saturday_start = "$aryA[17]"; $Gct_saturday_start = "$aryA[17]";
$Gct_saturday_stop = "$aryA[18]"; $Gct_saturday_stop = "$aryA[18]";
$sthA->finish(); $sthA->finish();
$CTstart = $Gct_default_start;
$CTstop = $Gct_default_stop;
if ( ($Cwday == 0) && ( ($Gct_sunday_start > 0) && ($Gct_sunday_stop > 0) ) )
{$CTstart = $Gct_sunday_start; $CTstop = $Gct_sunday_stop;}
if ( ($Cwday == 1) && ( ($Gct_monday_start > 0) && ($Gct_monday_stop > 0) ) )
{$CTstart = $Gct_monday_start; $CTstop = $Gct_monday_stop;}
if ( ($Cwday == 2) && ( ($Gct_tuesday_start > 0) && ($Gct_tuesday_stop > 0) ) )
{$CTstart = $Gct_tuesday_start; $CTstop = $Gct_tuesday_stop;}
if ( ($Cwday == 3) && ( ($Gct_wednesday_start > 0) && ($Gct_wednesday_stop > 0) ) )
{$CTstart = $Gct_wednesday_start; $CTstop = $Gct_wednesday_stop;}
if ( ($Cwday == 4) && ( ($Gct_thursday_start > 0) && ($Gct_thursday_stop > 0) ) )
{$CTstart = $Gct_thursday_start; $CTstop = $Gct_thursday_stop;}
if ( ($Cwday == 5) && ( ($Gct_friday_start > 0) && ($Gct_friday_stop > 0) ) )
{$CTstart = $Gct_friday_start; $CTstop = $Gct_friday_stop;}
if ( ($Cwday == 6) && ( ($Gct_saturday_start > 0) && ($Gct_saturday_stop > 0) ) )
{$CTstart = $Gct_saturday_start; $CTstop = $Gct_saturday_stop;}
} }
else else
{ {
@@ -495,7 +478,7 @@ else
########################################################################### ###########################################################################
########### CURRENT DAY SALES GATHERING outbound-only: vicidial_log ###### ########### CURRENT DAY SALES GATHERING outbound-only: vicidial_log ######
########################################################################### ###########################################################################
$stmtA = "select vicidial_log.user,first_name,last_name,address1,address2,city,state,postal_code,vicidial_list.phone_number,vicidial_list.email,security_phrase,vicidial_list.comments,call_date,vicidial_list.lead_id,vicidial_users.full_name,vicidial_log.status,vicidial_list.vendor_lead_code,vicidial_list.source_id,vicidial_log.list_id,title,address3,last_local_call_time,uniqueid,length_in_sec,vicidial_list.list_id,vicidial_list.list_id,UNIX_TIMESTAMP(vicidial_log.call_date),vicidial_campaigns.campaign_name from vicidial_list,vicidial_log,vicidial_users,vicidial_campaigns where $campaignSQL $sale_statusesSQL and call_date > '$shipdate 00:00:01' and call_date < '$shipdate 23:59:59' and vicidial_log.lead_id=vicidial_list.lead_id and vicidial_users.user=vicidial_log.user and vicidial_log.campaign_id=vicidial_campaigns.campaign_id order by call_date;"; $stmtA = "select vicidial_log.user,first_name,last_name,address1,address2,city,state,postal_code,vicidial_list.phone_number,vicidial_list.email,security_phrase,vicidial_list.comments,call_date,vicidial_list.lead_id,vicidial_users.full_name,vicidial_log.status,vicidial_list.vendor_lead_code,vicidial_list.source_id,vicidial_log.list_id,title,address3,last_local_call_time,uniqueid,length_in_sec,vicidial_list.list_id,vicidial_list.list_id,UNIX_TIMESTAMP(vicidial_log.call_date),vicidial_campaigns.campaign_name,vicidial_campaigns.campaign_cid from vicidial_list,vicidial_log,vicidial_users,vicidial_campaigns where $campaignSQL $sale_statusesSQL and call_date > '$shipdate 00:00:01' and call_date < '$shipdate 23:59:59' and vicidial_log.lead_id=vicidial_list.lead_id and vicidial_users.user=vicidial_log.user and vicidial_log.campaign_id=vicidial_campaigns.campaign_id order by call_date;";
#$stmtA = "select vicidial_users.user,first_name,last_name,address1,address2,city,state,postal_code,phone_number,email,security_phrase,comments,last_local_call_time,lead_id,vicidial_users.full_name,status,vendor_lead_code,source_id,list_id,title,address3,last_local_call_time from vicidial_list,vicidial_users where list_id NOT IN('999','998') $sale_statusesSQL and called_count > 0 and vicidial_users.user=vicidial_list.user;"; #$stmtA = "select vicidial_users.user,first_name,last_name,address1,address2,city,state,postal_code,phone_number,email,security_phrase,comments,last_local_call_time,lead_id,vicidial_users.full_name,status,vendor_lead_code,source_id,list_id,title,address3,last_local_call_time from vicidial_list,vicidial_users where list_id NOT IN('999','998') $sale_statusesSQL and called_count > 0 and vicidial_users.user=vicidial_list.user;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -534,9 +517,10 @@ while ($sthArows > $rec_count)
$owner = $aryA[25]; $owner = $aryA[25];
$epoch = $aryA[26]; $epoch = $aryA[26];
$did_name = $aryA[27]; $did_name = $aryA[27];
$did_pattern = $aryA[28];
$outbound = 'Y'; $outbound = 'Y';
$domestic = 'N'; $domestic = 'Y';
$queue_seconds = '0'; $queue_seconds = '0';
$closer=''; $closer='';
@@ -551,7 +535,7 @@ if (length($with_inboundSQL)>3)
########################################################################### ###########################################################################
########### CURRENT DAY SALES GATHERING inbound-only: vicidial_closer_log ###### ########### CURRENT DAY SALES GATHERING inbound-only: vicidial_closer_log ######
########################################################################### ###########################################################################
$stmtA = "select vicidial_closer_log.user,first_name,last_name,address1,address2,city,state,postal_code,vicidial_list.phone_number,vicidial_list.email,security_phrase,vicidial_list.comments,call_date,vicidial_list.lead_id,vicidial_users.full_name,vicidial_closer_log.status,vicidial_list.vendor_lead_code,vicidial_list.source_id,vicidial_closer_log.list_id,campaign_id,title,address3,last_local_call_time,xfercallid,closecallid,uniqueid,length_in_sec,queue_seconds,vicidial_list.list_id,vicidial_list.list_id,UNIX_TIMESTAMP(vicidial_closer_log.call_date) from vicidial_list,vicidial_closer_log,vicidial_users where campaign_id IN($with_inboundSQL) $close_statusesSQL and call_date > '$shipdate 00:00:01' and call_date < '$shipdate 23:59:59' and vicidial_closer_log.lead_id=vicidial_list.lead_id and vicidial_users.user=vicidial_closer_log.user order by call_date;"; $stmtA = "select vicidial_closer_log.user,first_name,last_name,address1,address2,city,state,postal_code,vicidial_list.phone_number,vicidial_list.email,security_phrase,vicidial_list.comments,call_date,vicidial_list.lead_id,vicidial_users.full_name,vicidial_closer_log.status,vicidial_list.vendor_lead_code,vicidial_list.source_id,vicidial_closer_log.list_id,campaign_id,title,address3,last_local_call_time,xfercallid,closecallid,uniqueid,length_in_sec,queue_seconds,vicidial_list.list_id,vicidial_list.list_id,UNIX_TIMESTAMP(vicidial_closer_log.call_date),agent_alert_delay from vicidial_list,vicidial_closer_log,vicidial_users,vicidial_inbound_groups where campaign_id IN($with_inboundSQL) $close_statusesSQL and call_date > '$shipdate 00:00:01' and call_date < '$shipdate 23:59:59' and vicidial_closer_log.lead_id=vicidial_list.lead_id and vicidial_users.user=vicidial_closer_log.user and vicidial_inbound_groups.group_id=vicidial_closer_log.campaign_id order by call_date;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows; $sthArows=$sthA->rows;
@@ -591,9 +575,10 @@ if (length($with_inboundSQL)>3)
$rank = $aryA[28]; $rank = $aryA[28];
$owner = $aryA[29]; $owner = $aryA[29];
$epoch = $aryA[30]; $epoch = $aryA[30];
$agent_alert_delay = int($aryA[31] / 1000);
$outbound = 'N'; $outbound = 'N';
$domestic = 'N'; $domestic = 'Y';
$user = ''; $user = '';
$agent_name=''; $agent_name='';
@@ -673,11 +658,6 @@ if ( (length($Ealert)>5) && (length($email_list) > 3) )
# $VARREPORT_user = 'cron'; # $VARREPORT_user = 'cron';
# $VARREPORT_pass = 'test'; # $VARREPORT_pass = 'test';
# $VARREPORT_dir = ''; # $VARREPORT_dir = '';
$VARREPORT_host = 'ftp.aats-inc.com';
$VARREPORT_port = '21';
$VARREPORT_user = 'aats-inc.com';
$VARREPORT_pass = '_dMujnvf_';
$VARREPORT_dir = '';
$NODATEDIR = 0; # Don't use dated directories for audio $NODATEDIR = 0; # Don't use dated directories for audio
$YEARDIR = 1; # put dated directories in a year directory first $YEARDIR = 1; # put dated directories in a year directory first
@@ -759,6 +739,24 @@ sub select_format_loop
if ($Cmin < 10) {$Cmin = "0$Cmin";} if ($Cmin < 10) {$Cmin = "0$Cmin";}
$CThourminute = "$Chour$Cmin"; $CThourminute = "$Chour$Cmin";
$CTstart = $Gct_default_start;
$CTstop = $Gct_default_stop;
if ( ($Cwday == 0) && ( ($Gct_sunday_start > 0) && ($Gct_sunday_stop > 0) ) )
{$CTstart = $Gct_sunday_start; $CTstop = $Gct_sunday_stop;}
if ( ($Cwday == 1) && ( ($Gct_monday_start > 0) && ($Gct_monday_stop > 0) ) )
{$CTstart = $Gct_monday_start; $CTstop = $Gct_monday_stop;}
if ( ($Cwday == 2) && ( ($Gct_tuesday_start > 0) && ($Gct_tuesday_stop > 0) ) )
{$CTstart = $Gct_tuesday_start; $CTstop = $Gct_tuesday_stop;}
if ( ($Cwday == 3) && ( ($Gct_wednesday_start > 0) && ($Gct_wednesday_stop > 0) ) )
{$CTstart = $Gct_wednesday_start; $CTstop = $Gct_wednesday_stop;}
if ( ($Cwday == 4) && ( ($Gct_thursday_start > 0) && ($Gct_thursday_stop > 0) ) )
{$CTstart = $Gct_thursday_start; $CTstop = $Gct_thursday_stop;}
if ( ($Cwday == 5) && ( ($Gct_friday_start > 0) && ($Gct_friday_stop > 0) ) )
{$CTstart = $Gct_friday_start; $CTstop = $Gct_friday_stop;}
if ( ($Cwday == 6) && ( ($Gct_saturday_start > 0) && ($Gct_saturday_stop > 0) ) )
{$CTstart = $Gct_saturday_start; $CTstop = $Gct_saturday_stop;}
if ( ($CThourminute < $CTstart) || ($CThourminute > $CTstop) ) if ( ($CThourminute < $CTstart) || ($CThourminute > $CTstop) )
{ {
if ($DB > 0) {print "Call is outside of defined call time: $CThourminute|$Cwday| |$CTstart|$CTstop| \n";} if ($DB > 0) {print "Call is outside of defined call time: $CThourminute|$Cwday| |$CTstart|$CTstop| \n";}
@@ -882,7 +880,7 @@ sub select_format_loop
### Look for other closer calls after this call ### Look for other closer calls after this call
$more_calls[0]=''; $more_calls[0]='';
$stmtB = "select closecallid,length_in_sec,queue_seconds from vicidial_closer_log where lead_id='$lead_id' and call_date > '$call_date' and call_date < '$shipdate 23:59:59' order by call_date limit 10;"; $stmtB = "select closecallid,length_in_sec,queue_seconds,agent_alert_delay from vicidial_closer_log,vicidial_inbound_groups where lead_id='$lead_id' and call_date > '$call_date' and call_date < '$shipdate 23:59:59' and campaign_id=group_id order by call_date limit 10;";
$sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr; $sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr;
$sthB->execute or die "executing: $stmtB ", $dbhB->errstr; $sthB->execute or die "executing: $stmtB ", $dbhB->errstr;
$sthBrows=$sthB->rows; $sthBrows=$sthB->rows;
@@ -891,7 +889,8 @@ sub select_format_loop
{ {
@aryB = $sthB->fetchrow_array; @aryB = $sthB->fetchrow_array;
$more_calls[$rec_countB] = "$aryB[0]"; $more_calls[$rec_countB] = "$aryB[0]";
$length_in_sec = ($length_in_sec + $aryB[1]); $Xagent_alert_delay = int($aryB[3] / 1000);
$length_in_sec = (($length_in_sec + $aryB[1]) - $Xagent_alert_delay);
$queue_seconds = ($queue_seconds + $aryB[2]); $queue_seconds = ($queue_seconds + $aryB[2]);
$rec_countB++; $rec_countB++;
} }
@@ -953,6 +952,22 @@ sub select_format_loop
$did_date = "$aryB[2]"; $did_date = "$aryB[2]";
$sthB->finish(); $sthB->finish();
} }
else
{
$stmtB = "select vc.campaign_cid,vc.campaign_name,call_date from vicidial_campaigns vc,vicidial_log vl where lead_id='$lead_id' and call_date > '$shipdate 00:00:01' and call_date <= '$call_date' and vc.campaign_id=vl.campaign_id order by call_date desc limit 1;";
if ($DBX > 0) {print "$stmtB\n";}
$sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr;
$sthB->execute or die "executing: $stmtB ", $dbhB->errstr;
$sthBrows=$sthB->rows;
if ($sthBrows > 0)
{
@aryB = $sthB->fetchrow_array;
$did_pattern = "$aryB[0]";
$did_name = "$aryB[1]";
$did_date = "$aryB[2]";
$sthB->finish();
}
}
} }
##### BEGIN DID lookup ##### ##### BEGIN DID lookup #####
@@ -1065,12 +1080,13 @@ sub select_format_loop
if ($closer =~ /VDCL|VDAD/) {$closer='-';} if ($closer =~ /VDCL|VDAD/) {$closer='-';}
$application = substr($did_name, 0, 4); $application = substr($did_name, 0, 4);
$queue_seconds = int($queue_seconds + .5); $queue_seconds = int($queue_seconds + .5);
$talk_seconds = ($length_in_sec - $queue_seconds); $talk_seconds = ( ($length_in_sec - $queue_seconds) - $agent_alert_delay);
if ($talk_seconds < 0) {$talk_seconds=0;}
$dispo_time = 0; $dispo_time = 0;
if ($uniqueidLIST !~ /\|$uniqueid\|/) if ($uniqueidLIST !~ /\|$uniqueid\|/)
{ {
$str = "$uniqueid\t$call_date_array[0]\t$call_date_array[1]\t$phone_areacode\t$phone_number\t$did_pattern\t$closer\t$queue_seconds\t$talk_seconds\t$dispo_time\t$application\t-\t$ivr_filename\t$outbound\t$domestic\t\n"; $str = "103$uniqueid\t$call_date_array[0]\t$call_date_array[1]\t$phone_areacode\t$phone_number\t$did_pattern\t$closer\t$queue_seconds\t$talk_seconds\t$dispo_time\t$application\t-\t$ivr_filename\t$outbound\t$domestic\t\n";
$uniqueidLIST .= "$uniqueid|"; $uniqueidLIST .= "$uniqueid|";
if ($DBX > 0) {print "UNIQUE: -----$uniqueidLIST-----$uniqueid";} if ($DBX > 0) {print "UNIQUE: -----$uniqueidLIST-----$uniqueid";}
+34 -5
View File
@@ -16,6 +16,7 @@
# 90423-0453 - Added calls file and hours file reports # 90423-0453 - Added calls file and hours file reports
# 90424-1157 - Added orders file report # 90424-1157 - Added orders file report
# 90517-1404 - Added date override and fixed order file report # 90517-1404 - Added date override and fixed order file report
# 90806-1654 - Added vicidial-owner-update option
# #
$secX = time(); $secX = time();
@@ -114,6 +115,7 @@ if (length($ARGV[0])>1)
print " [--help] = this help screen\n"; print " [--help] = this help screen\n";
print " vicidial update options:\n"; print " vicidial update options:\n";
print " [--skip-vicidial-update] = skips the lead file export and all ViciDial list updating functions\n"; print " [--skip-vicidial-update] = skips the lead file export and all ViciDial list updating functions\n";
print " [--vicidial-owner-update] = updates the vicidial_list.owner field with the vtiger owner\n";
print " [--format=standard] = ability to define a format, standard is default, formats allowed shown in examples\n"; print " [--format=standard] = ability to define a format, standard is default, formats allowed shown in examples\n";
print " [--forcelistid=1234] = overrides the listID given in the file with the 1234\n"; print " [--forcelistid=1234] = overrides the listID given in the file with the 1234\n";
print " [--duplicate-system-check] = checks for the same phone number in the entire system before inserting lead\n"; print " [--duplicate-system-check] = checks for the same phone number in the entire system before inserting lead\n";
@@ -270,6 +272,11 @@ if (length($ARGV[0])>1)
$skip_vicidial_update=1; $skip_vicidial_update=1;
if ($q < 1) {print "\n----- SKIP VICIDIAL UPDATE -----\n\n";} if ($q < 1) {print "\n----- SKIP VICIDIAL UPDATE -----\n\n";}
} }
if ($args =~ /--vicidial-owner-update/i)
{
$vicidial_owner_update=1;
if ($q < 1) {print "\n----- VICIDIAL OWNER UPDATE -----\n\n";}
}
if ($args =~ /-ftp-pull/i) if ($args =~ /-ftp-pull/i)
{ {
$ftp_pull=1; $ftp_pull=1;
@@ -634,7 +641,7 @@ if ( ($vt_sales_update > 0) || ($vt_sales_update_alldate > 0) )
### Gather all non-deleted Accounts in Vtiger ### Gather all non-deleted Accounts in Vtiger
$stmtB="SELECT crmid from vtiger_crmentity where setype='Accounts' and deleted='0' order by crmid limit 3000000;"; $stmtB="SELECT crmid,smownerid from vtiger_crmentity where setype='Accounts' and deleted='0' order by crmid limit 3000000;";
$sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr; $sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr;
$sthB->execute or die "executing: $stmtB ", $dbhB->errstr; $sthB->execute or die "executing: $stmtB ", $dbhB->errstr;
$sthBrowsC=$sthB->rows; $sthBrowsC=$sthB->rows;
@@ -642,7 +649,8 @@ $i=0;
while ($sthBrowsC > $i) while ($sthBrowsC > $i)
{ {
@aryB = $sthB->fetchrow_array; @aryB = $sthB->fetchrow_array;
$crmid[$i] = $aryB[0]; $crmid[$i] = $aryB[0];
$smownerid[$i] = $aryB[1];
$i++; $i++;
} }
$sthB->finish(); $sthB->finish();
@@ -1166,13 +1174,34 @@ while ($sthBrowsC > $i)
$sthA->finish(); $sthA->finish();
} }
$vicidial_owner_updateSQL='';
$vicidial_owner_updateFILE='';
if ($vicidial_owner_update > 0)
{
$user='';
$stmtB="SELECT user_name from vtiger_users where id='$smownerid[$i]';";
if($DBX){print STDERR "\n|$stmtB|\n";}
$sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr;
$sthB->execute or die "executing: $stmtB ", $dbhB->errstr;
$sthBrows=$sthB->rows;
if ($sthBrows > 0)
{
@aryB = $sthB->fetchrow_array;
$user = $aryB[0];
}
$sthB->finish();
$vicidial_owner_updateSQL = ",owner='$user'";
$vicidial_owner_updateFILE = "|||||$user";
}
if ($VL_phone_dup > 0) if ($VL_phone_dup > 0)
{ {
if($DB){print "DUPLICATE PHONE: $phone|$crmid[$i]\n";} if($DB){print "DUPLICATE PHONE: $phone|$crmid[$i]\n";}
$f++; $f++;
$affected_rowsA=0; $affected_rowsA=0;
### update the existing vicidial_list entry ### ### update the existing vicidial_list entry ###
$stmtA = "UPDATE vicidial_list SET first_name='$accountname',last_name='$ownership',address1='$bill_street',address2='$bill_pobox',city='$bill_city',state='$bill_state',postal_code='$bill_code',country='$bill_country',vendor_lead_code='$crmid[$i]',address3='$fax',alt_phone='$otherphone',email='$email1',province='$website',security_phrase='$tickersymbol',comments='$siccode|$annualrevenue' where phone_number='$phone' limit 1;"; $stmtA = "UPDATE vicidial_list SET first_name='$accountname',last_name='$ownership',address1='$bill_street',address2='$bill_pobox',city='$bill_city',state='$bill_state',postal_code='$bill_code',country='$bill_country',vendor_lead_code='$crmid[$i]',address3='$fax',alt_phone='$otherphone',email='$email1',province='$website',security_phrase='$tickersymbol',comments='$siccode|$annualrevenue' $vicidial_owner_updateSQL where phone_number='$phone' limit 1;";
if ($T < 1) {$affected_rowsA = $dbhA->do($stmtA); } # or die "Couldn't execute query: |$stmtB|\n"; if ($T < 1) {$affected_rowsA = $dbhA->do($stmtA); } # or die "Couldn't execute query: |$stmtB|\n";
if($DB){print STDERR "\n|$affected_rowsA|$stmtA|\n";} if($DB){print STDERR "\n|$affected_rowsA|$stmtA|\n";}
$c = ($affected_rowsA + $c); $c = ($affected_rowsA + $c);
@@ -1185,7 +1214,7 @@ while ($sthBrowsC > $i)
$e++; $e++;
$affected_rowsA=0; $affected_rowsA=0;
### update the existing vicidial_list entry ### ### update the existing vicidial_list entry ###
$stmtA = "UPDATE vicidial_list SET first_name='$accountname',last_name='$ownership',address1='$bill_street',address2='$bill_pobox',city='$bill_city',state='$bill_state',postal_code='$bill_code',country_code='$bill_country',phone_number='$phone',address3='$fax',alt_phone='$otherphone',email='$email1',province='$website',security_phrase='$tickersymbol',comments='$siccode $annualrevenue' where vendor_lead_code='$crmid[$i]' limit 1;"; $stmtA = "UPDATE vicidial_list SET first_name='$accountname',last_name='$ownership',address1='$bill_street',address2='$bill_pobox',city='$bill_city',state='$bill_state',postal_code='$bill_code',country_code='$bill_country',phone_number='$phone',address3='$fax',alt_phone='$otherphone',email='$email1',province='$website',security_phrase='$tickersymbol',comments='$siccode $annualrevenue' $vicidial_owner_updateSQL where vendor_lead_code='$crmid[$i]' limit 1;";
if ($T < 1) {$affected_rowsA = $dbhA->do($stmtA); } # or die "Couldn't execute query: |$stmtB|\n"; if ($T < 1) {$affected_rowsA = $dbhA->do($stmtA); } # or die "Couldn't execute query: |$stmtB|\n";
if($DB){print STDERR "\n|$affected_rowsA|$stmtA|\n";} if($DB){print STDERR "\n|$affected_rowsA|$stmtA|\n";}
$c = ($affected_rowsA + $c); $c = ($affected_rowsA + $c);
@@ -1193,7 +1222,7 @@ while ($sthBrowsC > $i)
else else
{ {
### print the output file in proper format ### print the output file in proper format
print out "$crmid[$i]||$list_id|$phone_code|$phone||$accountname||$ownership|$bill_street|$bill_pobox|$fax|$bill_city|$bill_state|$website|$bill_code|$bill_country|||$otherphone|$email1|$ticketsymbol|$siccode $annualrevenue\n"; print out "$crmid[$i]||$list_id|$phone_code|$phone||$accountname||$ownership|$bill_street|$bill_pobox|$fax|$bill_city|$bill_state|$website|$bill_code|$bill_country|||$otherphone|$email1|$ticketsymbol|$siccode $annualrevenue$vicidial_owner_updateFILE\n";
$b++; $b++;
} }
} }
+4 -3
View File
@@ -348,6 +348,7 @@ external_status VARCHAR(6) default '',
external_pause VARCHAR(20) default '', external_pause VARCHAR(20) default '',
external_dial VARCHAR(100) default '', external_dial VARCHAR(100) default '',
agent_log_id INT(9) UNSIGNED default '0', agent_log_id INT(9) UNSIGNED default '0',
last_state_change DATETIME,
index (random_id), index (random_id),
index (last_call_time), index (last_call_time),
index (last_update_time), index (last_update_time),
@@ -558,7 +559,7 @@ web_form_address VARCHAR(255),
allow_closers ENUM('Y','N'), allow_closers ENUM('Y','N'),
hopper_level INT(8) UNSIGNED default '1', hopper_level INT(8) UNSIGNED default '1',
auto_dial_level VARCHAR(6) default '0', auto_dial_level VARCHAR(6) default '0',
next_agent_call ENUM('random','oldest_call_start','oldest_call_finish','campaign_rank','overall_user_level','fewest_calls') default 'oldest_call_finish', next_agent_call ENUM('random','oldest_call_start','oldest_call_finish','campaign_rank','overall_user_level','fewest_calls','longest_wait_time') default 'longest_wait_time',
local_call_time VARCHAR(10) DEFAULT '9am-9pm', local_call_time VARCHAR(10) DEFAULT '9am-9pm',
voicemail_ext VARCHAR(10), voicemail_ext VARCHAR(10),
dial_timeout TINYINT UNSIGNED default '60', dial_timeout TINYINT UNSIGNED default '60',
@@ -749,7 +750,7 @@ group_color VARCHAR(7),
active ENUM('Y','N'), active ENUM('Y','N'),
web_form_address VARCHAR(255), web_form_address VARCHAR(255),
voicemail_ext VARCHAR(10), voicemail_ext VARCHAR(10),
next_agent_call ENUM('random','oldest_call_start','oldest_call_finish','overall_user_level','inbound_group_rank','campaign_rank','fewest_calls','fewest_calls_campaign') default 'oldest_call_finish', next_agent_call ENUM('random','oldest_call_start','oldest_call_finish','overall_user_level','inbound_group_rank','campaign_rank','fewest_calls','fewest_calls_campaign','longest_wait_time') default 'longest_wait_time',
fronter_display ENUM('Y','N') default 'Y', fronter_display ENUM('Y','N') default 'Y',
ingroup_script VARCHAR(10), ingroup_script VARCHAR(10),
get_call_launch ENUM('NONE','SCRIPT','WEBFORM') default 'NONE', get_call_launch ENUM('NONE','SCRIPT','WEBFORM') default 'NONE',
@@ -1889,7 +1890,7 @@ CREATE INDEX phone_number on vicidial_closer_log (phone_number);
CREATE INDEX date_user on vicidial_closer_log (call_date,user); CREATE INDEX date_user on vicidial_closer_log (call_date,user);
CREATE INDEX comment_a on live_inbound_log (comment_a); CREATE INDEX comment_a on live_inbound_log (comment_a);
UPDATE system_settings SET db_schema_version='1166'; UPDATE system_settings SET db_schema_version='1167';
GRANT RELOAD ON *.* TO cron@'%'; GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost; GRANT RELOAD ON *.* TO cron@localhost;
+8
View File
@@ -477,3 +477,11 @@ index (event_time)
); );
UPDATE system_settings SET db_schema_version='1166'; UPDATE system_settings SET db_schema_version='1166';
ALTER TABLE vicidial_live_agents ADD last_state_change DATETIME;
ALTER TABLE vicidial_campaigns MODIFY next_agent_call ENUM('random','oldest_call_start','oldest_call_finish','campaign_rank','overall_user_level','fewest_calls','longest_wait_time') default 'longest_wait_time';
ALTER TABLE vicidial_inbound_groups MODIFY next_agent_call ENUM('random','oldest_call_start','oldest_call_finish','overall_user_level','inbound_group_rank','campaign_rank','fewest_calls','fewest_calls_campaign','longest_wait_time') default 'longest_wait_time';
UPDATE system_settings SET db_schema_version='1167';
@@ -258,6 +258,7 @@ This option if enabled will show the number of dialable leads available in the c
VICIDIAL Balance Rank|| VICIDIAL Balance Rank||
This field allows you to set the order in which this server is to be used for balance dialing, if balance dialing is enabled. The server with the highest rank will be used first in placing Balance fill calls. Default is 0|| This field allows you to set the order in which this server is to be used for balance dialing, if balance dialing is enabled. The server with the highest rank will be used first in placing Balance fill calls. Default is 0||
Inbound Summary Hourly Report|| Inbound Summary Hourly Report||
orders by the amount of time agent has been actively waiting for a call||
add-file: user_territories.php add-file: user_territories.php
+1152 -1166
View File
File diff suppressed because it is too large Load Diff
+40 -33
View File
@@ -243,10 +243,11 @@
# 90726-2012 - Added allow_alerts option # 90726-2012 - Added allow_alerts option
# 90729-0647 - Added agent_display_dialable_leads option # 90729-0647 - Added agent_display_dialable_leads option
# 90730-0145 - Fixed bugs in re-queue and INBOUND_MAN with blended selected # 90730-0145 - Fixed bugs in re-queue and INBOUND_MAN with blended selected
# 90808-0117 - Fixed manual dial calls today bug, added last_state_change to vicidial_live_agents
# #
$version = '2.2.0-221'; $version = '2.2.0-222';
$build = '90730-0145'; $build = '90808-0117';
$mel=1; # Mysql Error Log enabled = 1 $mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=61; $mysql_log_count=61;
$one_mysql_log=0; $one_mysql_log=0;
@@ -1143,17 +1144,17 @@ $VDloginDISPLAY=0;
else else
{$no_hopper_dialing=0;} {$no_hopper_dialing=0;}
if (preg_match("/Y/",$call_requeue_button)) if ( (preg_match("/Y/",$call_requeue_button)) and ($auto_dial_level > 0) )
{$call_requeue_button=1;} {$call_requeue_button=1;}
else else
{$call_requeue_button=0;} {$call_requeue_button=0;}
if (preg_match("/AUTO/",$view_calls_in_queue_launch)) if ( (preg_match("/AUTO/",$view_calls_in_queue_launch)) and ($auto_dial_level > 0) )
{$view_calls_in_queue_launch=1;} {$view_calls_in_queue_launch=1;}
else else
{$view_calls_in_queue_launch=0;} {$view_calls_in_queue_launch=0;}
if (!preg_match("/NONE/",$view_calls_in_queue)) if ( (!preg_match("/NONE/",$view_calls_in_queue)) and ($auto_dial_level > 0) )
{$view_calls_in_queue=1;} {$view_calls_in_queue=1;}
else else
{$view_calls_in_queue=0;} {$view_calls_in_queue=0;}
@@ -1826,36 +1827,38 @@ else
$affected_rows = mysql_affected_rows($link); $affected_rows = mysql_affected_rows($link);
print "<!-- call placed to session_id: $session_id from phone: $SIP_user $SIP_user_DiaL -->\n"; print "<!-- call placed to session_id: $session_id from phone: $SIP_user $SIP_user_DiaL -->\n";
##### grab the campaign_weight and number of calls today on that campaign for the agent
$stmt="SELECT campaign_weight,calls_today FROM vicidial_campaign_agents where user='$VD_login' and campaign_id = '$VD_campaign';";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01042',$VD_login,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$vca_ct = mysql_num_rows($rslt);
if ($vca_ct > 0)
{
$row=mysql_fetch_row($rslt);
$campaign_weight = $row[0];
$calls_today = $row[1];
$i++;
}
else
{
$campaign_weight = '0';
$calls_today = '0';
$stmt="INSERT INTO vicidial_campaign_agents (user,campaign_id,campaign_rank,campaign_weight,calls_today) values('$VD_login','$VD_campaign','0','0','$calls_today');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01043',$VD_login,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($link);
print "<!-- new vicidial_campaign_agents record inserted: |$affected_rows| -->\n";
}
if ($auto_dial_level > 0) if ($auto_dial_level > 0)
{ {
print "<!-- campaign is set to auto_dial_level: $auto_dial_level -->\n"; print "<!-- campaign is set to auto_dial_level: $auto_dial_level -->\n";
##### grab the campaign_weight and number of calls today on that campaign for the agent
$stmt="SELECT campaign_weight,calls_today FROM vicidial_campaign_agents where user='$VD_login' and campaign_id = '$VD_campaign';";
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01042',$VD_login,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$vca_ct = mysql_num_rows($rslt);
if ($vca_ct > 0)
{
$row=mysql_fetch_row($rslt);
$campaign_weight = $row[0];
$calls_today = $row[1];
$i++;
}
else
{
$campaign_weight = '0';
$calls_today = '0';
$stmt="INSERT INTO vicidial_campaign_agents (user,campaign_id,campaign_rank,campaign_weight,calls_today) values('$VD_login','$VD_campaign','0','0','$calls_today');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01043',$VD_login,$server_ip,$session_name,$one_mysql_log);}
$affected_rows = mysql_affected_rows($link);
print "<!-- new vicidial_campaign_agents record inserted: |$affected_rows| -->\n";
}
$closer_chooser_string=''; $closer_chooser_string='';
$stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,user_level,campaign_weight,calls_today) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level','$campaign_weight','$calls_today');"; $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,user_level,campaign_weight,calls_today,last_state_change) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level','$campaign_weight','$calls_today','$NOW_TIME');";
if ($DB) {echo "$stmt\n";} if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link); $rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01044',$VD_login,$server_ip,$session_name,$one_mysql_log);} if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01044',$VD_login,$server_ip,$session_name,$one_mysql_log);}
@@ -1895,7 +1898,7 @@ else
{ {
print "<!-- campaign is set to manual dial: $auto_dial_level -->\n"; print "<!-- campaign is set to manual dial: $auto_dial_level -->\n";
$stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,user_level) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$user_level');"; $stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,user_level,campaign_weight,calls_today,last_state_change) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$user_level', '$campaign_weight', '$calls_today','$NOW_TIME');";
if ($DB) {echo "$stmt\n";} if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link); $rslt=mysql_query($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01047',$VD_login,$server_ip,$session_name,$one_mysql_log);} if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01047',$VD_login,$server_ip,$session_name,$one_mysql_log);}
@@ -5455,8 +5458,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
} }
var dispnum = document.vicidial_form.phone_number.value; var dispnum = document.vicidial_form.phone_number.value;
var status_display_number = phone_number_format(dispnum); var status_display_number = phone_number_format(dispnum);
var callnum = dialed_number;
var dial_display_number = phone_number_format(callnum);
document.getElementById("MainStatuSSpan").innerHTML = " Incoming: " + status_display_number + " Group- " + VDIC_data_VDIG[1] + " &nbsp; " + VDIC_fronter; document.getElementById("MainStatuSSpan").innerHTML = " Incoming: " + dial_display_number + " Group- " + VDIC_data_VDIG[1] + " &nbsp; " + VDIC_fronter;
} }
document.getElementById("ParkControl").innerHTML ="<a href=\"#\" onclick=\"mainxfer_send_redirect('ParK','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"./images/vdc_LB_parkcall.gif\" border=0 alt=\"Park Call\"></a>"; document.getElementById("ParkControl").innerHTML ="<a href=\"#\" onclick=\"mainxfer_send_redirect('ParK','" + lastcustchannel + "','" + lastcustserverip + "');return false;\"><IMG SRC=\"./images/vdc_LB_parkcall.gif\" border=0 alt=\"Park Call\"></a>";
@@ -5653,7 +5658,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
if (alert_enabled=='ON') if (alert_enabled=='ON')
{ {
alert(" Incoming: " + status_display_number + "\n Group- " + VDIC_data_VDIG[1] + " &nbsp; " + VDIC_fronter); var callnum = dialed_number;
var dial_display_number = phone_number_format(callnum);
alert(" Incoming: " + dial_display_number + "\n Group- " + VDIC_data_VDIG[1] + " &nbsp; " + VDIC_fronter);
} }
} }
else else
+6 -5
View File
@@ -307,7 +307,7 @@ else
$MAIN .= "Inbound Summary Hourly Report: $group_string $NOW_TIME\n"; $MAIN .= "Inbound Summary Hourly Report: $group_string $NOW_TIME\n";
if ($group_ct > 1) if ($group_ct > 0)
{ {
$MAIN .= "\n"; $MAIN .= "\n";
$MAIN .= "---------- MULTI-GROUP BREAKDOWN:\n"; $MAIN .= "---------- MULTI-GROUP BREAKDOWN:\n";
@@ -330,11 +330,12 @@ else
while($i < $group_ct) while($i < $group_ct)
{ {
$stmt="select group_name from vicidial_inbound_groups where group_id='$group[$i]';"; $stmt="select group_name,agent_alert_delay from vicidial_inbound_groups where group_id='$group[$i]';";
$rslt=mysql_query($stmt, $link); $rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";} if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt); $row=mysql_fetch_row($rslt);
$group_name[$i] = $row[0]; $group_name[$i] = $row[0];
$agent_alert_delay[$i] = round($row[1] / 1000);
$out_of_call_time=0; $out_of_call_time=0;
$length_in_sec[$i]=0; $length_in_sec[$i]=0;
@@ -406,7 +407,7 @@ else
$calls_count[$i]++; $calls_count[$i]++;
$length_in_sec[$i] = ($length_in_sec[$i] + $row[1]); $length_in_sec[$i] = ($length_in_sec[$i] + $row[1]);
$queue_seconds[$i] = ($queue_seconds[$i] + $row[2]); $queue_seconds[$i] = ($queue_seconds[$i] + $row[2]);
$TEMPtalk = ($row[1] - $row[2]); $TEMPtalk = ( ($row[1] - $row[2]) - $agent_alert_delay[$i]);
if ($TEMPtalk < 0) {$TEMPtalk = 0;} if ($TEMPtalk < 0) {$TEMPtalk = 0;}
$talk_sec[$i] = ($talk_sec[$i] + $TEMPtalk); $talk_sec[$i] = ($talk_sec[$i] + $TEMPtalk);
if ($max_queue_seconds[$i] < $row[2]) if ($max_queue_seconds[$i] < $row[2])
@@ -602,7 +603,7 @@ else
$inbound_cost = ($rawTOTtalk_min * $inbound_rate); $inbound_cost = ($rawTOTtalk_min * $inbound_rate);
$inbound_cost = sprintf("%8.2f", $inbound_cost); $inbound_cost = sprintf("%8.2f", $inbound_cost);
echo "$query_date to $end_date, &nbsp; $rawTOTtalk_min minutes at \$0.60 = \$$inbound_cost\n"; echo "INBOUND $query_date to $end_date, &nbsp; $rawTOTtalk_min minutes at \$$inbound_rate = \$$inbound_cost\n";
exit; exit;
} }
File diff suppressed because it is too large Load Diff
+8 -5
View File
@@ -53,10 +53,11 @@
# 90603-1845 - Fixed color coding bug # 90603-1845 - Fixed color coding bug
# 90627-0608 - Some Formatting changes, added in-group name display # 90627-0608 - Some Formatting changes, added in-group name display
# 90701-0657 - Fixed inbound=No calculation issues # 90701-0657 - Fixed inbound=No calculation issues
# 90808-0212 - Fixed inbound only non-ALL bug, changed times to use agent last_state_change
# #
$version = '2.0.5-44'; $version = '2.0.5-45';
$build = '90701-0657'; $build = '90808-0212';
header ("Content-type: text/html; charset=utf-8"); header ("Content-type: text/html; charset=utf-8");
@@ -563,6 +564,7 @@ if (ereg('O',$with_inbound))
$stmt = "select closer_campaigns from vicidial_campaigns where campaign_id IN($group_SQL);"; $stmt = "select closer_campaigns from vicidial_campaigns where campaign_id IN($group_SQL);";
$rslt=mysql_query($stmt, $link); $rslt=mysql_query($stmt, $link);
$ccamps_to_print = mysql_num_rows($rslt); $ccamps_to_print = mysql_num_rows($rslt);
$c=0;
while ($ccamps_to_print > $c) while ($ccamps_to_print > $c)
{ {
$row=mysql_fetch_row($rslt); $row=mysql_fetch_row($rslt);
@@ -1404,7 +1406,7 @@ else {$UgroupSQL = " and vicidial_live_agents.campaign_id IN($group_SQL)";}
if (strlen($usergroup)<1) {$usergroupSQL = '';} if (strlen($usergroup)<1) {$usergroupSQL = '';}
else {$usergroupSQL = " and user_group='" . mysql_real_escape_string($usergroup) . "'";} else {$usergroupSQL = " and user_group='" . mysql_real_escape_string($usergroup) . "'";}
$stmt="select extension,vicidial_live_agents.user,conf_exten,vicidial_live_agents.status,vicidial_live_agents.server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,vicidial_live_agents.campaign_id,vicidial_users.user_group,vicidial_users.full_name,vicidial_live_agents.comments,vicidial_live_agents.calls_today,vicidial_live_agents.callerid,lead_id from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user $UgroupSQL $usergroupSQL order by $orderSQL;"; $stmt="select extension,vicidial_live_agents.user,conf_exten,vicidial_live_agents.status,vicidial_live_agents.server_ip,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish),call_server_ip,vicidial_live_agents.campaign_id,vicidial_users.user_group,vicidial_users.full_name,vicidial_live_agents.comments,vicidial_live_agents.calls_today,vicidial_live_agents.callerid,lead_id,UNIX_TIMESTAMP(last_state_change) from vicidial_live_agents,vicidial_users where vicidial_live_agents.user=vicidial_users.user $UgroupSQL $usergroupSQL order by $orderSQL;";
$rslt=mysql_query($stmt, $link); $rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";} if ($DB) {echo "$stmt\n";}
$talking_to_print = mysql_num_rows($rslt); $talking_to_print = mysql_num_rows($rslt);
@@ -1430,6 +1432,7 @@ $talking_to_print = mysql_num_rows($rslt);
$Acalls_today[$i] = $row[12]; $Acalls_today[$i] = $row[12];
$Acallerid[$i] = $row[13]; $Acallerid[$i] = $row[13];
$Alead_id[$i] = $row[14]; $Alead_id[$i] = $row[14];
$Astate_change[$i] = $row[15];
$i++; $i++;
} }
@@ -1537,7 +1540,7 @@ $calls_to_list = mysql_num_rows($rslt);
if (eregi("READY|PAUSED",$Astatus[$i])) if (eregi("READY|PAUSED",$Astatus[$i]))
{ {
$Acall_time[$i]=$Acall_finish[$i]; $Acall_time[$i]=$Astate_change[$i];
if ($Alead_id[$i] > 0) if ($Alead_id[$i] > 0)
{ {
@@ -1628,7 +1631,7 @@ $calls_to_list = mysql_num_rows($rslt);
} }
} }
if (!eregi("INCALL|QUEUE",$Astatus[$i])) if (!eregi("INCALL|QUEUE",$Astatus[$i]))
{$call_time_S = ($STARTtime - $Acall_finish[$i]);} {$call_time_S = ($STARTtime - $Astate_change[$i]);}
else else
{$call_time_S = ($STARTtime - $Acall_time[$i]);} {$call_time_S = ($STARTtime - $Acall_time[$i]);}
+9 -6
View File
@@ -1906,11 +1906,12 @@ else
# 90722-1235 - Added list reset time and campaign no hopper dialing, agent dial owner only options # 90722-1235 - Added list reset time and campaign no hopper dialing, agent dial owner only options
# 90726-0153 - Added allow_alerts for users to disable agent browser alerts # 90726-0153 - Added allow_alerts for users to disable agent browser alerts
# 90729-0555 - Added agent_display_dialable_leads and vicidial_balance_rank options # 90729-0555 - Added agent_display_dialable_leads and vicidial_balance_rank options
# 90808-0300 - Added longest_wait_time option for agent call routing
# #
# 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 # 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.2.0-210'; $admin_version = '2.2.0-211';
$build = '90729-0555'; $build = '90808-0300';
$STARTtime = date("U"); $STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s"); $SQLdate = date("Y-m-d H:i:s");
@@ -3569,6 +3570,7 @@ if ($SSoutbound_autodial_active > 0)
<BR> &nbsp; - overall_user_level: orders by the user_level of the agent as defined in the vicidial_users table a higher user_level will receive more calls. <BR> &nbsp; - overall_user_level: orders by the user_level of the agent as defined in the vicidial_users table a higher user_level will receive more calls.
<BR> &nbsp; - campaign_rank: orders by the rank given to the agent for the campaign. Highest to Lowest. <BR> &nbsp; - campaign_rank: orders by the rank given to the agent for the campaign. Highest to Lowest.
<BR> &nbsp; - fewest_calls: orders by the number of calls received by an agent for that specific inbound group. Least calls first. <BR> &nbsp; - fewest_calls: orders by the number of calls received by an agent for that specific inbound group. Least calls first.
<BR> &nbsp; - longest_wait_time: orders by the amount of time agent has been actively waiting for a call.
<BR> <BR>
<A NAME="vicidial_campaigns-local_call_time"> <A NAME="vicidial_campaigns-local_call_time">
@@ -3914,6 +3916,7 @@ if ($SSqc_features_active > 0)
<BR> &nbsp; - fewest_calls: orders by the number of calls received by an agent for that specific inbound group. Least calls first. <BR> &nbsp; - fewest_calls: orders by the number of calls received by an agent for that specific inbound group. Least calls first.
<BR> &nbsp; - campaign_rank: orders by the rank given to the agent for the campaign. Highest to Lowest. <BR> &nbsp; - campaign_rank: orders by the rank given to the agent for the campaign. Highest to Lowest.
<BR> &nbsp; - fewest_calls_campaign: orders by the number of calls received by an agent for the campaign. Least calls first. <BR> &nbsp; - fewest_calls_campaign: orders by the number of calls received by an agent for the campaign. Least calls first.
<BR> &nbsp; - longest_wait_time: orders by the amount of time agent has been actively waiting for a call.
<BR> <BR>
<BR> <BR>
@@ -6192,7 +6195,7 @@ if ($ADD==11)
} }
echo "<option>$adl</option></select>(0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE</td></tr>\n"; echo "<option>$adl</option></select>(0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE</td></tr>\n";
} }
echo "<tr bgcolor=#B6D3FC><td align=right>Next Agent Call: </td><td align=left><select size=1 name=next_agent_call><option >random</option><option>oldest_call_start</option><option>oldest_call_finish</option><option>overall_user_level</option><option>campaign_rank</option><option>fewest_calls</option></select>$NWB#vicidial_campaigns-next_agent_call$NWE</td></tr>\n"; echo "<tr bgcolor=#B6D3FC><td align=right>Next Agent Call: </td><td align=left><select size=1 name=next_agent_call><option >random</option><option>oldest_call_start</option><option>oldest_call_finish</option><option>overall_user_level</option><option>campaign_rank</option><option>fewest_calls</option><option>longest_wait_time</option></select>$NWB#vicidial_campaigns-next_agent_call$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Local Call Time: </td><td align=left><select size=1 name=local_call_time>"; echo "<tr bgcolor=#B6D3FC><td align=right>Local Call Time: </td><td align=left><select size=1 name=local_call_time>";
echo "$call_times_list"; echo "$call_times_list";
echo "</select>$NWB#vicidial_campaigns-local_call_time$NWE</td></tr>\n"; echo "</select>$NWB#vicidial_campaigns-local_call_time$NWE</td></tr>\n";
@@ -6536,7 +6539,7 @@ if ($ADD==1111)
echo "<tr bgcolor=#B6D3FC><td align=right>Active: </td><td align=left><select size=1 name=active><option SELECTED>Y</option><option>N</option></select>$NWB#vicidial_inbound_groups-active$NWE</td></tr>\n"; echo "<tr bgcolor=#B6D3FC><td align=right>Active: </td><td align=left><select size=1 name=active><option SELECTED>Y</option><option>N</option></select>$NWB#vicidial_inbound_groups-active$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Web Form: </td><td align=left><input type=text name=web_form_address size=70 maxlength=255 value=\"$web_form_address\">$NWB#vicidial_inbound_groups-web_form_address$NWE</td></tr>\n"; echo "<tr bgcolor=#B6D3FC><td align=right>Web Form: </td><td align=left><input type=text name=web_form_address size=70 maxlength=255 value=\"$web_form_address\">$NWB#vicidial_inbound_groups-web_form_address$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Voicemail: </td><td align=left><input type=text name=voicemail_ext size=10 maxlength=10 value=\"$voicemail_ext\">$NWB#vicidial_inbound_groups-voicemail_ext$NWE</td></tr>\n"; echo "<tr bgcolor=#B6D3FC><td align=right>Voicemail: </td><td align=left><input type=text name=voicemail_ext size=10 maxlength=10 value=\"$voicemail_ext\">$NWB#vicidial_inbound_groups-voicemail_ext$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Next Agent Call: </td><td align=left><select size=1 name=next_agent_call><option >random</option><option>oldest_call_start</option><option>oldest_call_finish</option><option>overall_user_level</option><option>inbound_group_rank</option><option>campaign_rank</option><option>fewest_calls</option><option>fewest_calls_campaign</option></select>$NWB#vicidial_inbound_groups-next_agent_call$NWE</td></tr>\n"; echo "<tr bgcolor=#B6D3FC><td align=right>Next Agent Call: </td><td align=left><select size=1 name=next_agent_call><option >random</option><option>oldest_call_start</option><option>oldest_call_finish</option><option>overall_user_level</option><option>inbound_group_rank</option><option>campaign_rank</option><option>fewest_calls</option><option>fewest_calls_campaign</option><option>longest_wait_time</option></select>$NWB#vicidial_inbound_groups-next_agent_call$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Fronter Display: </td><td align=left><select size=1 name=fronter_display><option SELECTED>Y</option><option>N</option></select>$NWB#vicidial_inbound_groups-fronter_display$NWE</td></tr>\n"; echo "<tr bgcolor=#B6D3FC><td align=right>Fronter Display: </td><td align=left><select size=1 name=fronter_display><option SELECTED>Y</option><option>N</option></select>$NWB#vicidial_inbound_groups-fronter_display$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Script: </td><td align=left><select size=1 name=script_id>\n"; echo "<tr bgcolor=#B6D3FC><td align=right>Script: </td><td align=left><select size=1 name=script_id>\n";
echo "$scripts_list"; echo "$scripts_list";
@@ -15508,7 +15511,7 @@ if ($ADD==31)
echo "<tr bgcolor=#B6D3FC><td align=right>Auto Alt-Number Dialing: </td><td align=left><select size=1 name=auto_alt_dial><option >NONE</option><option>ALT_ONLY</option><option>ADDR3_ONLY</option><option>ALT_AND_ADDR3</option><option>ALT_AND_EXTENDED</option><option>ALT_AND_ADDR3_AND_EXTENDED</option><option>EXTENDED_ONLY</option><option SELECTED>$auto_alt_dial</option></select>$NWB#vicidial_campaigns-auto_alt_dial$NWE</td></tr>\n"; echo "<tr bgcolor=#B6D3FC><td align=right>Auto Alt-Number Dialing: </td><td align=left><select size=1 name=auto_alt_dial><option >NONE</option><option>ALT_ONLY</option><option>ADDR3_ONLY</option><option>ALT_AND_ADDR3</option><option>ALT_AND_EXTENDED</option><option>ALT_AND_ADDR3_AND_EXTENDED</option><option>EXTENDED_ONLY</option><option SELECTED>$auto_alt_dial</option></select>$NWB#vicidial_campaigns-auto_alt_dial$NWE</td></tr>\n";
} }
echo "<tr bgcolor=#B6D3FC><td align=right>Next Agent Call: </td><td align=left><select size=1 name=next_agent_call><option >random</option><option>oldest_call_start</option><option>oldest_call_finish</option><option>overall_user_level</option><option>campaign_rank</option><option>fewest_calls</option><option SELECTED>$next_agent_call</option></select>$NWB#vicidial_campaigns-next_agent_call$NWE</td></tr>\n"; echo "<tr bgcolor=#B6D3FC><td align=right>Next Agent Call: </td><td align=left><select size=1 name=next_agent_call><option >random</option><option>oldest_call_start</option><option>oldest_call_finish</option><option>overall_user_level</option><option>campaign_rank</option><option>fewest_calls</option><option>longest_wait_time</option><option SELECTED>$next_agent_call</option></select>$NWB#vicidial_campaigns-next_agent_call$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=311111111&call_time_id=$local_call_time\">Local Call Time: </a></td><td align=left><select size=1 name=local_call_time>\n"; echo "<tr bgcolor=#B6D3FC><td align=right><a href=\"$PHP_SELF?ADD=311111111&call_time_id=$local_call_time\">Local Call Time: </a></td><td align=left><select size=1 name=local_call_time>\n";
echo "$call_times_list"; echo "$call_times_list";
@@ -18164,7 +18167,7 @@ if ($ADD==3111)
echo "<tr bgcolor=#B6D3FC><td align=right>Group Color: </td><td align=left bgcolor=\"$row[2]\" id=\"group_color_td\"><input type=text name=group_color size=7 maxlength=7 value=\"$row[2]\">$NWB#vicidial_inbound_groups-group_color$NWE</td></tr>\n"; echo "<tr bgcolor=#B6D3FC><td align=right>Group Color: </td><td align=left bgcolor=\"$row[2]\" id=\"group_color_td\"><input type=text name=group_color size=7 maxlength=7 value=\"$row[2]\">$NWB#vicidial_inbound_groups-group_color$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Active: </td><td align=left><select size=1 name=active><option>Y</option><option>N</option><option SELECTED>$active</option></select>$NWB#vicidial_inbound_groups-active$NWE</td></tr>\n"; echo "<tr bgcolor=#B6D3FC><td align=right>Active: </td><td align=left><select size=1 name=active><option>Y</option><option>N</option><option SELECTED>$active</option></select>$NWB#vicidial_inbound_groups-active$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Web Form: </td><td align=left><input type=text name=web_form_address size=70 maxlength=255 value=\"$web_form_address\">$NWB#vicidial_inbound_groups-web_form_address$NWE</td></tr>\n"; echo "<tr bgcolor=#B6D3FC><td align=right>Web Form: </td><td align=left><input type=text name=web_form_address size=70 maxlength=255 value=\"$web_form_address\">$NWB#vicidial_inbound_groups-web_form_address$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Next Agent Call: </td><td align=left><select size=1 name=next_agent_call><option >random</option><option>oldest_call_start</option><option>oldest_call_finish</option><option>overall_user_level</option><option>inbound_group_rank</option><option>campaign_rank</option><option>fewest_calls</option><option>fewest_calls_campaign</option><option SELECTED>$next_agent_call</option></select>$NWB#vicidial_inbound_groups-next_agent_call$NWE</td></tr>\n"; echo "<tr bgcolor=#B6D3FC><td align=right>Next Agent Call: </td><td align=left><select size=1 name=next_agent_call><option >random</option><option>oldest_call_start</option><option>oldest_call_finish</option><option>overall_user_level</option><option>inbound_group_rank</option><option>campaign_rank</option><option>fewest_calls</option><option>fewest_calls_campaign</option><option>longest_wait_time</option><option SELECTED>$next_agent_call</option></select>$NWB#vicidial_inbound_groups-next_agent_call$NWE</td></tr>\n";
echo "<tr bgcolor=#BDFFBD><td align=right>Queue Priority: </td><td align=left><select size=1 name=queue_priority>\n"; echo "<tr bgcolor=#BDFFBD><td align=right>Queue Priority: </td><td align=left><select size=1 name=queue_priority>\n";
$n=99; $n=99;