From d622ec3b81305c3c34adc312093a2db1be18629b Mon Sep 17 00:00:00 2001 From: mattf Date: Mon, 8 Jan 2007 19:48:12 +0000 Subject: [PATCH] added ADAPT OVERRIDE to allow for forcing of dial_level changes even when predictive dialing(using ADAPT dial_methods) merged server_stats.php script into admin.php script made table widths definable by variables at the top of the admin.php screen git-svn-id: svn://192.168.202.10@453 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/www/vicidial/admin.php | 216 +++++++++++++++++++-------- 1 file changed, 151 insertions(+), 65 deletions(-) diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index f1d06303..8133f937 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -7,6 +7,9 @@ require("dbconnect.php"); +$page_width='750'; +$section_width='700'; + $PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; $PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; $PHP_SELF=$_SERVER['PHP_SELF']; @@ -455,8 +458,10 @@ if (isset($_GET["dedicated_trunks"])) {$dedicated_trunks=$_GET["dedicated_trunks elseif (isset($_POST["dedicated_trunks"])) {$dedicated_trunks=$_POST["dedicated_trunks"];} if (isset($_GET["trunk_restriction"])) {$trunk_restriction=$_GET["trunk_restriction"];} elseif (isset($_POST["trunk_restriction"])) {$trunk_restriction=$_POST["trunk_restriction"];} -if (isset($_GET["campaigns"])) {$campaigns=$_GET["campaigns"];} - elseif (isset($_POST["campaigns"])) {$campaigns=$_POST["campaigns"];} +if (isset($_GET["campaigns"])) {$campaigns=$_GET["campaigns"];} + elseif (isset($_POST["campaigns"])) {$campaigns=$_POST["campaigns"];} +if (isset($_GET["dial_level_override"])) {$dial_level_override=$_GET["dial_level_override"];} + elseif (isset($_POST["dial_level_override"])) {$dial_level_override=$_POST["dial_level_override"];} @@ -795,12 +800,14 @@ $lead_filter_sql = ereg_replace(";","",$lead_filter_sql); # 61122-1228 - added user group campaign restrictions # 61122-1535 - changed script_text to unfiltered and added more variables to SCRIPTS # 61129-1028 - Added headers to Users and Phones with clickable order-by titles +# 70108-1405 - Added ADAPT OVERRIDE to allow for forced dial_level changes in ADAPT dial methods +# - Screen width definable at top of script, merged server_stats into this script # # 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 -$version = '2.0.73'; -$build = '61129-1028'; +$version = '2.0.74'; +$build = '70108-1405'; $STARTtime = date("U"); @@ -1022,6 +1029,7 @@ if ($ADD==551) {$hh='users'; echo "SEARCH PHONES";} if ($ADD==66) {$hh='users'; echo "Search Results";} if ($ADD==661) {$hh='users'; echo "SEARCH PHONES RESULTS";} if ($ADD==99999) {$hh='users'; echo "HELP";} +if ($ADD==999999) {$hh='reports'; echo "REPORTS";} if ( ($ADD>9) && ($ADD < 99998) ) { @@ -1505,7 +1513,7 @@ echo "

-Auto Dial Level - This is where you set how many lines VICIDIAL should use per active agent. zero 0 means auto dialing is off and the agents will click to dial each number. Otherwise VICIDIAL will keep dialing lines equal to active agents multiplied by the dial level to arrive at how many lines this campaign on each server should allow. +Auto Dial Level - This is where you set how many lines VICIDIAL should use per active agent. zero 0 means auto dialing is off and the agents will click to dial each number. Otherwise VICIDIAL will keep dialing lines equal to active agents multiplied by the dial level to arrive at how many lines this campaign on each server should allow. The ADAPT OVERRIDE checkbox allows you to force a new dial level even though the dial method is in an ADAPT mode. This is useful if there is a dramatic shift in the quality of leads and you want to drastically change the dial_level manually.
@@ -2744,6 +2752,8 @@ if ($hh=='times') {$times_hh='bgcolor ="#99FF33"'; $times_fc='BLACK';} # hard te else {$times_hh=''; $times_fc='WHITE';} if ($hh=='server') {$server_hh='bgcolor ="#FF99FF"'; $server_fc='BLACK';} # pink else {$server_hh=''; $server_fc='WHITE';} +if ($hh=='reports') {$reports_hh='bgcolor ="#FFFF99"'; $reports_fc='BLACK';} # yellow + else {$reports_hh=''; $reports_fc='WHITE';} ?> @@ -2758,7 +2768,7 @@ function openNewWindow(url) { echo "\n"; ?>
- +
  VICIDIAL ADMIN - Logout  
BGCOLOR=#D9E6FE cellpadding=2 cellspacing=0> @@ -2771,7 +2781,7 @@ echo "\n"; - + @@ -2815,7 +2825,7 @@ if (strlen($server_hh) > 1) { ?> 1) { ?> - + @@ -2858,7 +2868,7 @@ echo ""; echo "
ADD A NEW USER
\n"; echo "\n"; -echo "
  VICIDIAL ADMIN - Logout  
> SIZE=1> USERS > SIZE=1> USER GROUPS > SIZE=1> REMOTE AGENTS > SIZE=1> PHONES > REPORTS > SIZE=1> REPORTS
  PHONES   |   ADD PHONE   |   SERVERS   |   ADD SERVER   |   CONFERENCES   |   ADD CONFERENCE   |   VD CONFERENCES   |   ADD VD CONFERENCE
 
 
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "\n"; @@ -2905,7 +2915,7 @@ echo ""; echo "
ADD A NEW CAMPAIGN\n"; echo "\n"; -echo "
User Number: $NWB#vicidial_users-user$NWE
Password: $NWB#vicidial_users-pass$NWE
Full Name: $NWB#vicidial_users-full_name$NWE
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "\n"; @@ -2939,7 +2949,7 @@ echo ""; echo "
ADD A NEW LIST\n"; echo "\n"; -echo "
Campaign ID: $NWB#vicidial_campaigns-campaign_id$NWE
Campaign Name: $NWB#vicidial_campaigns-campaign_name$NWE
Active: $NWB#vicidial_campaigns-active$NWE
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "
List ID: (digits only)$NWB#vicidial_lists-list_id$NWE
List Name: $NWB#vicidial_lists-list_name$NWE
Campaign: \n"; -echo "
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "
Phone Number: (digits only)$NWB#vicidial_list-dnc$NWE
\n"; @@ -3019,7 +3029,7 @@ echo ""; echo "
ADD A NEW INBOUND GROUP\n"; echo "\n"; -echo "
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "\n"; @@ -3049,7 +3059,7 @@ echo ""; echo "
ADD NEW REMOTE AGENTS\n"; echo "\n"; -echo "
Group ID: (no spaces)$NWB#vicidial_inbound_groups-group_id$NWE
Group Name: $NWB#vicidial_inbound_groups-group_name$NWE
Group Color: $NWB#vicidial_inbound_groups-group_color$NWE
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "
User ID Start: (numbers only, incremented)$NWB#vicidial_remote_agents-user_start$NWE
Number of Lines: (numbers only)$NWB#vicidial_remote_agents-number_of_lines$NWE
Server IP: \n"; -echo "
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "\n"; @@ -3101,7 +3111,7 @@ echo ""; echo "
ADD NEW SCRIPT\n"; echo "\n"; -echo "
Group: (no spaces or punctuation)$NWB#vicidial_user_groups-user_group$NWE
Description: (description of group)$NWB#vicidial_user_groups-group_name$NWE
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "\n"; @@ -3124,7 +3134,7 @@ echo ""; echo "
ADD NEW FILTER\n"; echo "\n"; -echo "
Script ID: (no spaces or punctuation)$NWB#vicidial_scripts-script_id$NWE
Script Name: (title of the script)$NWB#vicidial_scripts-script_name$NWE
Script Comments: $NWB#vicidial_scripts-script_comments$NWE
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "\n"; @@ -3145,7 +3155,7 @@ echo ""; echo "
ADD NEW CALL TIME\n"; echo "\n"; -echo "
Filter ID: (no spaces or punctuation)$NWB#vicidial_lead_filters-lead_filter_id$NWE
Filter Name: (short description of the filter)$NWB#vicidial_lead_filters-lead_filter_name$NWE
Filter Comments: $NWB#vicidial_lead_filters-lead_filter_comments$NWE
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "\n"; @@ -3167,7 +3177,7 @@ echo ""; echo "
ADD NEW STATE CALL TIME\n"; echo "\n"; -echo "
Call Time ID: (no spaces or punctuation)$NWB#vicidial_call_times-call_time_id$NWE
Call Time Name: (short description of the call time)$NWB#vicidial_call_times-call_time_name$NWE
Call Time Comments: $NWB#vicidial_call_times-call_time_comments$NWE
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "\n"; @@ -3190,9 +3200,9 @@ echo ""; echo "
ADD A NEW PHONE\n"; echo "\n"; -echo "
State Call Time ID: (no spaces or punctuation)$NWB#vicidial_call_times-call_time_id$NWE
State Call Time State: (no spaces or punctuation)$NWB#vicidial_call_times-state_call_time_state$NWE
State Call Time Name: (short description of the call time)$NWB#vicidial_call_times-call_time_name$NWE
\n"; +echo "
\n"; -echo "
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "\n"; @@ -3230,7 +3240,7 @@ echo ""; echo "
ADD A NEW SERVER\n"; echo "\n"; -echo "
Phone extension: $NWB#phones-extension$NWE
Dialplan Number: (digits only)$NWB#phones-dialplan_number$NWE
Voicemail Box: (digits only)$NWB#phones-voicemail_id$NWE
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "\n"; @@ -3252,7 +3262,7 @@ echo ""; echo "
ADD A NEW CONFERENCE\n"; echo "\n"; -echo "
Server ID: $NWB#servers-server_id$NWE
Server Description: $NWB#servers-server_description$NWE
Server IP Address: $NWB#servers-server_ip$NWE
\n"; +echo "
\n"; echo "\n"; echo "
Conference Number: (digits only)$NWB#conferences-conf_exten$NWE
Server IP: \n"; -echo "
\n"; +echo "
\n"; echo "\n"; echo "
Conference Number: (digits only)$NWB#conferences-conf_exten$NWE
Server IP: \n";} } echo "\n"; - echo "
\n"; + echo "
\n"; echo "\n"; echo "\n"; echo "\n"; @@ -6095,7 +6112,7 @@ echo "Realtime Scree echo "\n"; echo "\n"; echo "\n"; -echo "
User Number: $row[1]$NWB#vicidial_users-user$NWE
Password: $NWB#vicidial_users-pass$NWE
Full Name: $NWB#vicidial_users-full_name$NWE
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "\n"; @@ -6174,7 +6191,7 @@ echo "\n"; -echo "\n"; +echo "\n"; echo "\n"; @@ -6563,7 +6580,7 @@ echo "Realtime Scree echo "\n"; echo "\n"; echo "\n"; -echo "
Campaign ID: $row[0]$NWB#vicidial_campaigns-campaign_id$NWE
Campaign Name: $NWB#vicidial_campaigns-campaign_name$NWE
Active: $NWB#vicidial_campaigns-active$NWE
Force Reset of Hopper: Dial Method: $NWB#vicidial_campaigns-dial_method$NWE
Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE
Auto Dial Level: (0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE       ADAPT OVERRIDE
Available Only Tally: $NWB#vicidial_campaigns-available_only_ratio_tally$NWE
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "\n"; @@ -6799,7 +6816,7 @@ echo "
MODIFY A LISTS RECORD: $row[0]\n"; echo "\n"; echo "\n"; echo "\n"; -echo "
Campaign ID: $row[0]$NWB#vicidial_campaigns-campaign_id$NWE
Campaign Name: $NWB#vicidial_campaigns-campaign_name$NWE
Active: $NWB#vicidial_campaigns-active$NWE
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "
List ID: $row[0]$NWB#vicidial_lists-list_id$NWE
List Name: $NWB#vicidial_lists-list_name$NWE
Campaign:
\n"; echo "
MODIFY A GROUPS RECORD: $row[0]\n"; echo "\n"; echo "\n"; -echo "
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "\n"; @@ -7207,7 +7224,7 @@ echo "
Group ID: $row[0]$NWB#vicidial_inbound_groups-group_id$NWE
Group Name: $NWB#vicidial_inbound_groups-group_name$NWE
Group Color: $NWB#vicidial_inbound_groups-group_color$NWE
\n"; echo "
MODIFY A REMOTE AGENTS ENTRY: $row[0]\n"; echo "\n"; echo "\n"; -echo "
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "
User ID Start: (numbers only, incremented)$NWB#vicidial_remote_agents-user_start$NWE
Number of Lines: (numbers only)$NWB#vicidial_remote_agents-number_of_lines$NWE
Server IP: \n"; echo "\n"; -echo "
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "
Group: (no spaces or punctuation)$NWB#vicidial_user_groups-user_group$NWE
Description: (description of group)$NWB#vicidial_user_groups-group_name$NWE
Allowed Campaigns: \n"; @@ -7653,7 +7670,7 @@ echo "
MODIFY A PHONE RECORD: $row[1]\n"; echo "\n"; echo "\n"; echo "\n"; -echo "
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "\n"; @@ -7755,7 +7772,7 @@ echo "
MODIFY A SERVER RECORD: $row[0]\n"; echo "\n"; echo "\n"; echo "\n"; -echo "
Phone extension: $NWB#phones-extension$NWE
Dialplan Number: (digits only)$NWB#phones-dialplan_number$NWE
Voicemail Box: (digits only)$NWB#phones-voicemail_id$NWE
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "\n"; @@ -7947,7 +7964,7 @@ echo "
MODIFY A CONFERENCE RECORD: $row[0] echo "\n"; echo "\n"; echo "\n"; -echo "
Server ID: $NWB#servers-server_id$NWE
Server Description: $NWB#servers-server_description$NWE
Server IP Address: $NWB#servers-server_ip$NWE
\n"; +echo "
\n"; echo "\n"; echo "
Conference: $NWB#conferences-conf_exten$NWE
Server IP: \n"; echo "\n"; -echo "
\n"; +echo "
\n"; echo "\n"; echo "
Conference: $NWB#conferences-conf_exten$NWE
Server IP: \n"; -echo "
\n"; +echo "
\n"; echo "\n"; echo "\n"; echo "\n"; @@ -8066,7 +8083,7 @@ echo "
User Number:
Full Name:
User Level:
\n"; $people_to_print = mysql_num_rows($rslt); echo "
SEARCH RESULTS:\n"; -echo "
\n"; +echo "
\n"; $o=0; while ($people_to_print > $o) { @@ -8142,7 +8159,7 @@ $ADD='82'; if ($ADD==82) { echo "
\n"; -echo "
\n"; +echo "
\n"; echo "\n"; $o=0; @@ -8202,7 +8219,7 @@ if (eregi("GROUPDOWN",$stage)) {$SQLorder='order by user_group desc'; $GROUPli $people_to_print = mysql_num_rows($rslt); echo "
USER LISTINGS:\n"; -echo "
LEADLIST CAMPAIGNENTRY DATECALLBACK DATEUSERRECIPIENTSTATUS
\n"; +echo "
\n"; echo ""; echo ""; echo ""; @@ -8238,7 +8255,7 @@ echo "
USER IDFULL NAME
\n"; $people_to_print = mysql_num_rows($rslt); echo "
CAMPAIGN LISTINGS:\n"; -echo "
\n"; +echo "
\n"; $o=0; while ($people_to_print > $o) { @@ -8273,7 +8290,7 @@ echo "
\n"; $people_to_print = mysql_num_rows($rslt); echo "
LIST LISTINGS:\n"; -echo "
\n"; +echo "
\n"; $o=0; while ($people_to_print > $o) { @@ -8284,8 +8301,8 @@ echo "
\n"; {$bgcolor='bgcolor="#9BB9FB"';} echo ""; echo ""; - echo ""; - echo ""; + echo ""; + echo ""; echo "\n"; $o++; } @@ -8308,7 +8325,7 @@ echo "
$row[0] $row[1] $row[2] $row[3] $row[2]$row[4]$row[5] $row[3]$row[7]  MODIFY
\n"; $people_to_print = mysql_num_rows($rslt); echo "
INBOUND GROUP LISTINGS:\n"; -echo "
\n"; +echo "
\n"; $o=0; while ($people_to_print > $o) { @@ -8343,7 +8360,7 @@ echo "
\n"; $people_to_print = mysql_num_rows($rslt); echo "
REMOTE AGENTS LISTINGS:\n"; -echo "
\n"; +echo "
\n"; $o=0; while ($people_to_print > $o) { @@ -8379,7 +8396,7 @@ echo "
\n"; $people_to_print = mysql_num_rows($rslt); echo "
USER GROUPS LISTINGS:\n"; -echo "
\n"; +echo "
\n"; $o=0; while ($people_to_print > $o) { @@ -8411,7 +8428,7 @@ echo "
\n"; $people_to_print = mysql_num_rows($rslt); echo "
SCRIPTS LISTINGS:\n"; -echo "
\n"; +echo "
\n"; $o=0; while ($people_to_print > $o) { @@ -8444,7 +8461,7 @@ echo "
\n"; $filters_to_print = mysql_num_rows($rslt); echo "
LEAD FILTER LISTINGS:\n"; -echo "
\n"; +echo "
\n"; $o=0; while ($filters_to_print > $o) { @@ -8477,7 +8494,7 @@ echo "
\n"; $filters_to_print = mysql_num_rows($rslt); echo "
CALL TIME LISTINGS:\n"; -echo "
\n"; +echo "
\n"; $o=0; while ($filters_to_print > $o) { @@ -8511,7 +8528,7 @@ echo "
\n"; $filters_to_print = mysql_num_rows($rslt); echo "
STATE CALL TIME LISTINGS:\n"; -echo "
\n"; +echo "
\n"; $o=0; while ($filters_to_print > $o) { @@ -8558,7 +8575,7 @@ if (eregi("STATUSDOWN",$stage)) {$SQLorder='order by status desc'; $STATUSlink $phones_to_print = mysql_num_rows($rslt); echo "
PHONE LISTINGS:\n"; -echo "
\n"; +echo "
\n"; echo ""; echo ""; echo ""; @@ -8597,7 +8614,7 @@ echo "
EXTENPROTO
\n"; $phones_to_print = mysql_num_rows($rslt); echo "
SERVER LISTINGS:\n"; -echo "
\n"; +echo "
\n"; $o=0; while ($phones_to_print > $o) { @@ -8630,7 +8647,7 @@ echo "
\n"; $phones_to_print = mysql_num_rows($rslt); echo "
CONFERENCE LISTINGS:\n"; -echo "
\n"; +echo "
\n"; $o=0; while ($phones_to_print > $o) { @@ -8662,7 +8679,7 @@ echo "
\n"; $phones_to_print = mysql_num_rows($rslt); echo "
CONFERENCE LISTINGS:\n"; -echo "
\n"; +echo "
\n"; $o=0; while ($phones_to_print > $o) { @@ -8681,6 +8698,75 @@ echo "
\n"; echo "
\n"; } +###################### +# ADD=999999 display reports section +###################### +if ($ADD==999999) +{ +echo "
\n"; + echo ""; + + $stmt="SELECT * from vicidial_conferences order by conf_exten"; + $rslt=mysql_query($stmt, $link); + $phones_to_print = mysql_num_rows($rslt); + +$stmt="select * from servers;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$servers_to_print = mysql_num_rows($rslt); +$i=0; +while ($i < $servers_to_print) + { + $row=mysql_fetch_row($rslt); + $server_id[$i] = $row[0]; + $server_description[$i] = $row[1]; + $server_ip[$i] = $row[2]; + $active[$i] = $row[3]; + $i++; + } +?> + + + + + +VICIDIAL: Server Stats and Reports +VICIDIAL: Server Stats and Reports

+ + +

+
+ $o)
+	{
+	echo "\n";
+	echo "\n";
+	echo "\n";
+	echo "\n";
+	echo "\n";
+	echo "\n";
+	echo "\n";
+	echo "\n";
+	echo "\n";
+	echo "\n";
+	$o++;
+	}
+
+echo "
SERVERDESCRIPTIONIP ADDRESSACTIVEVDAD timeVDcall timePARK timeCLOSER/INBOUND time
$server_id[$o]$server_description[$o]$server_ip[$o]$active[$o]LINKLINKLINKLINK
\n"; + +} + +