diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index 12466c0c..1ec43c89 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -1490,11 +1490,12 @@ $survey_camp_record_dir = ereg_replace(";","",$survey_camp_record_dir); # 81119-0715 - Added ability to bulk enable/disable lists from modify campaign screen # 81209-1538 - Added web_form_target to campaign screen # 81210-1430 - Added http server IP and recording link options to servers +# 81222-0500 - Reformatted all listings to same format changed to field selects instead of * # # 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.0.5-153'; -$build = '81210-1430'; +$admin_version = '2.0.5-154'; +$build = '81222-0500'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -16026,177 +16027,218 @@ echo "$CBinactiveLINK"; # ADD=0 display all active users ###################### if ($ADD==0) -{ -echo "
\n"; -echo ""; + { + echo "
\n"; + echo ""; -$USERlink='stage=USERIDDOWN'; -$NAMElink='stage=NAMEDOWN'; -$LEVELlink='stage=LEVELDOWN'; -$GROUPlink='stage=GROUPDOWN'; -$SQLorder='order by full_name'; -if (eregi("USERIDUP",$stage)) {$SQLorder='order by user asc'; $USERlink='stage=USERIDDOWN';} -if (eregi("USERIDDOWN",$stage)) {$SQLorder='order by user desc'; $USERlink='stage=USERIDUP';} -if (eregi("NAMEUP",$stage)) {$SQLorder='order by full_name asc'; $NAMElink='stage=NAMEDOWN';} -if (eregi("NAMEDOWN",$stage)) {$SQLorder='order by full_name desc'; $NAMElink='stage=NAMEUP';} -if (eregi("LEVELUP",$stage)) {$SQLorder='order by user_level asc'; $LEVELlink='stage=LEVELDOWN';} -if (eregi("LEVELDOWN",$stage)) {$SQLorder='order by user_level desc'; $LEVELlink='stage=LEVELUP';} -if (eregi("GROUPUP",$stage)) {$SQLorder='order by user_group asc'; $GROUPlink='stage=GROUPDOWN';} -if (eregi("GROUPDOWN",$stage)) {$SQLorder='order by user_group desc'; $GROUPlink='stage=GROUPUP';} - $stmt="SELECT * from vicidial_users $SQLorder"; + $USERlink='stage=USERIDDOWN'; + $NAMElink='stage=NAMEDOWN'; + $LEVELlink='stage=LEVELDOWN'; + $GROUPlink='stage=GROUPDOWN'; + $SQLorder='order by full_name'; + if (eregi("USERIDUP",$stage)) {$SQLorder='order by user asc'; $USERlink='stage=USERIDDOWN';} + if (eregi("USERIDDOWN",$stage)) {$SQLorder='order by user desc'; $USERlink='stage=USERIDUP';} + if (eregi("NAMEUP",$stage)) {$SQLorder='order by full_name asc'; $NAMElink='stage=NAMEDOWN';} + if (eregi("NAMEDOWN",$stage)) {$SQLorder='order by full_name desc'; $NAMElink='stage=NAMEUP';} + if (eregi("LEVELUP",$stage)) {$SQLorder='order by user_level asc'; $LEVELlink='stage=LEVELDOWN';} + if (eregi("LEVELDOWN",$stage)) {$SQLorder='order by user_level desc'; $LEVELlink='stage=LEVELUP';} + if (eregi("GROUPUP",$stage)) {$SQLorder='order by user_group asc'; $GROUPlink='stage=GROUPDOWN';} + if (eregi("GROUPDOWN",$stage)) {$SQLorder='order by user_group desc'; $GROUPlink='stage=GROUPUP';} + $stmt="SELECT user,full_name,user_level,user_group from vicidial_users $SQLorder"; $rslt=mysql_query($stmt, $link); $people_to_print = mysql_num_rows($rslt); -echo "
USER LISTINGS:\n"; -echo "
\n"; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo "\n"; + echo "
USER LISTINGS:\n"; + echo "
USER IDFULL NAMELEVELGROUPLINKS
\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; $o=0; - while ($people_to_print > $o) { + while ($people_to_print > $o) + { $row=mysql_fetch_row($rslt); if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; $o++; - } + } -echo "
USER IDFULL NAMELEVELGROUPLINKS
$row[1]$row[3]$row[4]$row[5]MODIFY | STATS | STATUS | TIME
$row[0]$row[1]$row[2]$row[3]
MODIFY | STATS | STATUS | TIME
\n"; -} + echo "
\n"; + } ###################### # ADD=10 display all campaigns ###################### if ($ADD==10) -{ -echo "
\n"; + { + echo "
\n"; echo ""; - $stmt="SELECT * from vicidial_campaigns order by campaign_id"; + $stmt="SELECT campaign_id,campaign_name,active,dial_method,auto_dial_level,lead_order,dial_statuses from vicidial_campaigns order by campaign_id"; $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); + $campaigns_to_print = mysql_num_rows($rslt); -echo "
CAMPAIGN LISTINGS:\n"; -echo "
\n"; + echo "
CAMPAIGN LISTINGS:\n"; + echo "
\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; $o=0; - while ($people_to_print > $o) { + while ($campaigns_to_print > $o) + { $row=mysql_fetch_row($rslt); if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo "\n"; $o++; - } + } -echo "
CAMPAIGN ID
NAME
ACTIVE   DIAL METHOD   LEVEL   LEAD ORDER   DIAL STATUSES   MODIFY
$row[0] $row[1] $row[2] $row[3]$row[4]$row[5] $row[6]$row[7]  
$row[0]   $row[1]   $row[2]   $row[3]   $row[4]   $row[5]   $row[6]MODIFY
\n"; -} + echo "
\n"; + } ###################### # ADD=100 display all lists ###################### if ($ADD==100) -{ -echo "
\n"; + { + echo "
\n"; echo ""; -$LISTlink='stage=LISTIDDOWN'; -$TALLYlink='stage=TALLYDOWN'; -$ACTIVElink='stage=ACTIVEDOWN'; -$CAMPAIGNlink='stage=CAMPAIGNDOWN'; -$CALLDATElink='stage=CALLDATEDOWN'; -$SQLorder='order by list_id'; -if (eregi("LISTIDUP",$stage)) {$SQLorder='order by list_id asc'; $LISTlink='stage=LISTIDDOWN';} -if (eregi("LISTIDDOWN",$stage)) {$SQLorder='order by list_id desc'; $LISTlink='stage=LISTIDUP';} -if (eregi("TALLYUP",$stage)) {$SQLorder='order by tally asc'; $TALLYlink='stage=TALLYDOWN';} -if (eregi("TALLYDOWN",$stage)) {$SQLorder='order by tally desc'; $TALLYlink='stage=TALLYUP';} -if (eregi("ACTIVEUP",$stage)) {$SQLorder='order by active asc'; $ACTIVElink='stage=ACTIVEDOWN';} -if (eregi("ACTIVEDOWN",$stage)) {$SQLorder='order by active desc'; $ACTIVElink='stage=ACTIVEUP';} -if (eregi("CAMPAIGNUP",$stage)) {$SQLorder='order by campaign_id asc'; $CAMPAIGNlink='stage=CAMPAIGNDOWN';} -if (eregi("CAMPAIGNDOWN",$stage)) {$SQLorder='order by campaign_id desc'; $CAMPAIGNlink='stage=CAMPAIGNUP';} -if (eregi("CALLDATEUP",$stage)) {$SQLorder='order by list_lastcalldate asc'; $CALLDATElink='stage=CALLDATEDOWN';} -if (eregi("CALLDATEDOWN",$stage)) {$SQLorder='order by list_lastcalldate desc'; $CALLDATElink='stage=CALLDATEUP';} + $LISTlink='stage=LISTIDDOWN'; + $TALLYlink='stage=TALLYDOWN'; + $ACTIVElink='stage=ACTIVEDOWN'; + $CAMPAIGNlink='stage=CAMPAIGNDOWN'; + $CALLDATElink='stage=CALLDATEDOWN'; + $SQLorder='order by list_id'; + if (eregi("LISTIDUP",$stage)) {$SQLorder='order by list_id asc'; $LISTlink='stage=LISTIDDOWN';} + if (eregi("LISTIDDOWN",$stage)) {$SQLorder='order by list_id desc'; $LISTlink='stage=LISTIDUP';} + if (eregi("TALLYUP",$stage)) {$SQLorder='order by tally asc'; $TALLYlink='stage=TALLYDOWN';} + if (eregi("TALLYDOWN",$stage)) {$SQLorder='order by tally desc'; $TALLYlink='stage=TALLYUP';} + if (eregi("ACTIVEUP",$stage)) {$SQLorder='order by active asc'; $ACTIVElink='stage=ACTIVEDOWN';} + if (eregi("ACTIVEDOWN",$stage)) {$SQLorder='order by active desc'; $ACTIVElink='stage=ACTIVEUP';} + if (eregi("CAMPAIGNUP",$stage)) {$SQLorder='order by campaign_id asc'; $CAMPAIGNlink='stage=CAMPAIGNDOWN';} + if (eregi("CAMPAIGNDOWN",$stage)) {$SQLorder='order by campaign_id desc'; $CAMPAIGNlink='stage=CAMPAIGNUP';} + if (eregi("CALLDATEUP",$stage)) {$SQLorder='order by list_lastcalldate asc'; $CALLDATElink='stage=CALLDATEDOWN';} + if (eregi("CALLDATEDOWN",$stage)) {$SQLorder='order by list_lastcalldate desc'; $CALLDATElink='stage=CALLDATEUP';} $stmt="SELECT vls.list_id,list_name,list_description,count(*) as tally,active,list_lastcalldate,campaign_id from vicidial_lists vls,vicidial_list vl where vls.list_id=vl.list_id group by list_id $SQLorder"; $rslt=mysql_query($stmt, $link); $lists_to_print = mysql_num_rows($rslt); -echo "
LIST LISTINGS:\n"; -echo "
\n"; -echo ""; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; + echo "
LIST LISTINGS:\n"; + echo "
LIST IDLIST NAMEDESCRIPTIONLEADS COUNTACTIVELAST CALL DATECAMPAIGNMODIFY
\n"; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; -$o=0; -while ($lists_to_print > $o) - { - $row=mysql_fetch_row($rslt); - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - $o++; + $lists_printed = ''; + $o=0; + while ($lists_to_print > $o) + { + $row=mysql_fetch_row($rslt); + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; + $lists_printed .= "'$row[0]',"; + $o++; + } + + $stmt="SELECT list_id,list_name,list_description,0,active,list_lastcalldate,campaign_id from vicidial_lists where list_id NOT IN($lists_printed'');"; + $rslt=mysql_query($stmt, $link); + $lists_to_print = mysql_num_rows($rslt); + $o=0; + while ($lists_to_print > $o) + { + $row=mysql_fetch_row($rslt); + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; + $o++; + } + + echo "
LIST IDLIST NAMEDESCRIPTIONLEADS COUNTACTIVELAST CALL DATECAMPAIGNMODIFY
$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] $row[6]MODIFY
$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] $row[6]MODIFY
$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] $row[6]MODIFY
\n"; } -echo "
\n"; -} - ###################### # ADD=1000 display all inbound groups ###################### if ($ADD==1000) -{ -echo "
\n"; + { + echo "
\n"; echo ""; - $stmt="SELECT * from vicidial_inbound_groups order by group_id"; + $stmt="SELECT group_id,group_name,queue_priority,active,call_time_id,group_color from vicidial_inbound_groups order by group_id"; $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); + $ingroups_to_print = mysql_num_rows($rslt); -echo "
INBOUND GROUP LISTINGS:\n"; -echo "
\n"; -echo ""; -echo ""; -echo ""; -echo "\n"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; -echo "\n"; + echo "
INBOUND GROUP LISTINGS:\n"; + echo "
IN-GROUPNAMEPRIORITYACTIVETIMECOLORMODIFY
\n"; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; $o=0; - while ($people_to_print > $o) { + while ($ingroups_to_print > $o) + { $row=mysql_fetch_row($rslt); if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} @@ -16204,43 +16246,44 @@ echo "\n"; {$bgcolor='bgcolor="#9BB9FB"';} echo ""; echo ""; - echo ""; + echo ""; echo ""; - echo ""; - echo ""; + echo ""; + echo ""; echo "\n"; $o++; - } + } -echo "
IN-GROUPNAMEPRIORITYACTIVETIMECOLORMODIFY
$row[0] $row[1] $row[29] $row[2] $row[3] $row[17]   $row[4]  MODIFY
\n"; -} + echo "
\n"; + } ###################### # ADD=1300 display all inbound dids ###################### if ($ADD==1300) -{ -echo "
\n"; + { + echo "
\n"; echo ""; - $stmt="SELECT * from vicidial_inbound_dids order by did_pattern"; + $stmt="SELECT did_id,did_pattern,did_description,did_active,did_route from vicidial_inbound_dids order by did_pattern"; $rslt=mysql_query($stmt, $link); $dids_to_print = mysql_num_rows($rslt); -echo "
INBOUND GROUP LISTINGS:\n"; -echo "
\n"; -echo ""; -echo ""; -echo ""; -echo "\n"; -echo ""; -echo ""; -echo "\n"; -echo "\n"; + echo "
INBOUND GROUP LISTINGS:\n"; + echo "
#DIDDESCRIPTIONACTIVEROUTEMODIFY
\n"; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo ""; + echo ""; + echo "\n"; + echo "\n"; $o=0; - while ($dids_to_print > $o) { + while ($dids_to_print > $o) + { $row=mysql_fetch_row($rslt); if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} @@ -16253,29 +16296,38 @@ echo "\n"; echo ""; echo "\n"; $o++; - } + } -echo "
#DIDDESCRIPTIONACTIVEROUTEMODIFY
$row[4]MODIFY
\n"; -} + echo "
\n"; + } ###################### # ADD=10000 display all remote agents ###################### if ($ADD==10000) -{ -echo "
\n"; + { + echo "
\n"; echo ""; - $stmt="SELECT * from vicidial_remote_agents order by server_ip,campaign_id,user_start"; + $stmt="SELECT remote_agent_id,user_start,number_of_lines,server_ip,conf_exten,status,campaign_id from vicidial_remote_agents order by server_ip,campaign_id,user_start"; $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); + $remoteagents_to_print = mysql_num_rows($rslt); -echo "
REMOTE AGENTS LISTINGS:\n"; -echo "
\n"; + echo "
REMOTE AGENTS LISTINGS:\n"; + echo "
\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; $o=0; - while ($people_to_print > $o) { + while ($remoteagents_to_print > $o) + { $row=mysql_fetch_row($rslt); if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} @@ -16287,31 +16339,37 @@ echo "
USERLINESSERVER   CONF-EXTEN   STATUS   CAMPAIGN   MODIFY
\n"; echo ""; echo ""; echo ""; - echo "\n"; + echo "\n"; $o++; - } + } -echo "
$row[4] $row[5] $row[6]MODIFY
MODIFY
\n"; -} + echo "
\n"; + } ###################### # ADD=100000 display all user groups ###################### if ($ADD==100000) -{ -echo "
\n"; + { + echo "
\n"; echo ""; - $stmt="SELECT * from vicidial_user_groups order by user_group"; + $stmt="SELECT user_group,group_name,forced_timeclock_login from vicidial_user_groups order by user_group"; $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); + $usergroups_to_print = mysql_num_rows($rslt); -echo "
USER GROUPS LISTINGS:\n"; -echo "
\n"; + echo "
USER GROUPS LISTINGS:\n"; + echo "
\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; $o=0; - while ($people_to_print > $o) { + while ($usergroups_to_print > $o) + { $row=mysql_fetch_row($rslt); if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} @@ -16319,31 +16377,38 @@ echo "
USER GROUPGROUP NAMEFORCE TIMECLOCK   MODIFY
\n"; {$bgcolor='bgcolor="#9BB9FB"';} echo ""; echo ""; - echo "\n"; + echo ""; + echo "\n"; $o++; - } + } -echo "
$row[0] $row[1]MODIFY
$row[2]MODIFY
\n"; -} + echo "
\n"; + } ###################### # ADD=1000000 display all scripts ###################### if ($ADD==1000000) -{ -echo "
\n"; + { + echo "
\n"; echo ""; - $stmt="SELECT * from vicidial_scripts order by script_id"; + $stmt="SELECT script_id,script_name,active from vicidial_scripts order by script_id"; $rslt=mysql_query($stmt, $link); - $people_to_print = mysql_num_rows($rslt); + $scripts_to_print = mysql_num_rows($rslt); -echo "
SCRIPTS LISTINGS:\n"; -echo "
\n"; + echo "
SCRIPTS LISTINGS:\n"; + echo "
\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; $o=0; - while ($people_to_print > $o) { + while ($scripts_to_print > $o) + { $row=mysql_fetch_row($rslt); if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} @@ -16351,32 +16416,37 @@ echo "
SCRIPT IDSCRIPT NAMEACTIVE   MODIFY
\n"; {$bgcolor='bgcolor="#9BB9FB"';} echo ""; echo ""; - echo "\n"; + echo ""; + echo "\n"; $o++; - } + } -echo "
$row[0] $row[1]MODIFY
$row[2]MODIFY
\n"; -} + echo "
\n"; + } ###################### # ADD=10000000 display all filters ###################### if ($ADD==10000000) -{ -echo "
\n"; - + { + echo "
\n"; echo ""; - $stmt="SELECT * from vicidial_lead_filters order by lead_filter_id"; + $stmt="SELECT lead_filter_id,lead_filter_name from vicidial_lead_filters order by lead_filter_id"; $rslt=mysql_query($stmt, $link); $filters_to_print = mysql_num_rows($rslt); -echo "
LEAD FILTER LISTINGS:\n"; -echo "
\n"; + echo "
LEAD FILTER LISTINGS:\n"; + echo "
\n"; + echo ""; + echo ""; + echo ""; + echo "\n"; $o=0; - while ($filters_to_print > $o) { + while ($filters_to_print > $o) + { $row=mysql_fetch_row($rslt); if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} @@ -16384,32 +16454,38 @@ echo "
SCRIPT IDSCRIPT NAMEMODIFY
\n"; {$bgcolor='bgcolor="#9BB9FB"';} echo ""; echo ""; - echo "\n"; + echo "\n"; $o++; - } + } -echo "
$row[0] $row[1]MODIFY
MODIFY
\n"; -} + echo "
\n"; + } ###################### # ADD=100000000 display all call times ###################### if ($ADD==100000000) -{ -echo "
\n"; - + { + echo "
\n"; echo ""; - $stmt="SELECT * from vicidial_call_times order by call_time_id"; + $stmt="SELECT call_time_id,call_time_name,ct_default_start,ct_default_stop from vicidial_call_times order by call_time_id"; $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); + $calltimes_to_print = mysql_num_rows($rslt); -echo "
CALL TIME LISTINGS:\n"; -echo "
\n"; + echo "
CALL TIME LISTINGS:\n"; + echo "
\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; $o=0; - while ($filters_to_print > $o) { + while ($calltimes_to_print > $o) + { $row=mysql_fetch_row($rslt); if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} @@ -16417,33 +16493,41 @@ echo "
CALLTIME IDCALLTIME NAMEDEFAULT STARTDEFAULT STOPMODIFY
\n"; {$bgcolor='bgcolor="#9BB9FB"';} echo ""; echo ""; + echo ""; echo ""; - echo ""; - echo "\n"; + echo "\n"; $o++; - } + } -echo "
$row[0] $row[1] $row[2] $row[3] $row[4] MODIFY
MODIFY
\n"; -} + echo "
\n"; + } ###################### # ADD=1000000000 display all state call times ###################### if ($ADD==1000000000) -{ -echo "
\n"; - + { + echo "
\n"; echo ""; - $stmt="SELECT * from vicidial_state_call_times order by state_call_time_id"; + $stmt="SELECT state_call_time_id,state_call_time_state,state_call_time_name,sct_default_start,sct_default_stop from vicidial_state_call_times order by state_call_time_id"; $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); + $statecalltimes_to_print = mysql_num_rows($rslt); + + echo "
STATE CALL TIME LISTINGS:\n"; + echo "
\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; -echo "
STATE CALL TIME LISTINGS:\n"; -echo "
CALLTIME IDCALLTIME STATECALLTIME NAMEDEFAULT STARTDEFAULT STOPMODIFY
\n"; $o=0; - while ($filters_to_print > $o) { + while ($statecalltimes_to_print > $o) + { $row=mysql_fetch_row($rslt); if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} @@ -16454,31 +16538,38 @@ echo "
\n"; echo ""; echo ""; echo ""; - echo "\n"; + echo "\n"; $o++; - } + } -echo "
$row[2] $row[3] $row[4] MODIFY
MODIFY
\n"; -} + echo "
\n"; + } ###################### # ADD=130000000 display all shifts ###################### if ($ADD==130000000) -{ -echo "
\n"; - + { + echo "
\n"; echo ""; - $stmt="SELECT * from vicidial_shifts order by shift_id"; + $stmt="SELECT shift_id,shift_name,shift_start_time,shift_length,shift_weekdays from vicidial_shifts order by shift_id"; $rslt=mysql_query($stmt, $link); - $filters_to_print = mysql_num_rows($rslt); + $shifts_to_print = mysql_num_rows($rslt); -echo "
SHIFT LISTINGS:\n"; -echo "
\n"; + echo "
SHIFT LISTINGS:\n"; + echo "
\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; $o=0; - while ($filters_to_print > $o) { + while ($shifts_to_print > $o) + { $row=mysql_fetch_row($rslt); if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} @@ -16489,182 +16580,219 @@ echo "
SHIFT IDSHIFT NAMESHIFT STARTSHIFT LENGTHWEEKDAYSMODIFY
\n"; echo ""; echo ""; echo ""; - echo "\n"; + echo "\n"; $o++; - } + } -echo "
$row[2] $row[3] $row[4] MODIFY
MODIFY
\n"; -} + echo "
\n"; + } ###################### # ADD=10000000000 display all phones ###################### if ($ADD==10000000000) -{ -echo "
\n"; -echo ""; + { + echo "
\n"; + echo ""; -$EXTENlink='stage=EXTENDOWN'; -$PROTOlink='stage=PROTODOWN'; -$SERVERlink='stage=SERVERDOWN'; -$STATUSlink='stage=STATUSDOWN'; -$SQLorder='order by extension,server_ip'; -if (eregi("EXTENUP",$stage)) {$SQLorder='order by extension asc'; $EXTENlink='stage=EXTENDOWN';} -if (eregi("EXTENDOWN",$stage)) {$SQLorder='order by extension desc'; $EXTENlink='stage=EXTENUP';} -if (eregi("PROTOUP",$stage)) {$SQLorder='order by protocol asc'; $PROTOlink='stage=PROTODOWN';} -if (eregi("PROTODOWN",$stage)) {$SQLorder='order by protocol desc'; $PROTOlink='stage=PROTOUP';} -if (eregi("SERVERUP",$stage)) {$SQLorder='order by server_ip asc'; $SERVERlink='stage=SERVERDOWN';} -if (eregi("SERVERDOWN",$stage)) {$SQLorder='order by server_ip desc'; $SERVERlink='stage=SERVERUP';} -if (eregi("STATUSUP",$stage)) {$SQLorder='order by status asc'; $STATUSlink='stage=STATUSDOWN';} -if (eregi("STATUSDOWN",$stage)) {$SQLorder='order by status desc'; $STATUSlink='stage=STATUSUP';} - $stmt="SELECT * from phones $SQLorder"; + $EXTENlink='stage=EXTENDOWN'; + $PROTOlink='stage=PROTODOWN'; + $SERVERlink='stage=SERVERDOWN'; + $STATUSlink='stage=STATUSDOWN'; + $SQLorder='order by extension,server_ip'; + if (eregi("EXTENUP",$stage)) {$SQLorder='order by extension asc'; $EXTENlink='stage=EXTENDOWN';} + if (eregi("EXTENDOWN",$stage)) {$SQLorder='order by extension desc'; $EXTENlink='stage=EXTENUP';} + if (eregi("PROTOUP",$stage)) {$SQLorder='order by protocol asc'; $PROTOlink='stage=PROTODOWN';} + if (eregi("PROTODOWN",$stage)) {$SQLorder='order by protocol desc'; $PROTOlink='stage=PROTOUP';} + if (eregi("SERVERUP",$stage)) {$SQLorder='order by server_ip asc'; $SERVERlink='stage=SERVERDOWN';} + if (eregi("SERVERDOWN",$stage)) {$SQLorder='order by server_ip desc'; $SERVERlink='stage=SERVERUP';} + if (eregi("STATUSUP",$stage)) {$SQLorder='order by status asc'; $STATUSlink='stage=STATUSDOWN';} + if (eregi("STATUSDOWN",$stage)) {$SQLorder='order by status desc'; $STATUSlink='stage=STATUSUP';} + $stmt="SELECT extension,protocol,server_ip,dialplan_number,voicemail_id,status,fullname,messages,old_messages from phones $SQLorder"; $rslt=mysql_query($stmt, $link); $phones_to_print = mysql_num_rows($rslt); -echo "
PHONE LISTINGS:\n"; -echo "
\n"; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo ""; -echo "\n"; + echo "
PHONE LISTINGS:\n"; + echo "
EXTENPROTOSERVERDIAL PLANSTATUSNAMEVMAILLINKS
\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; $o=0; - while ($phones_to_print > $o) { + while ($phones_to_print > $o) + { $row=mysql_fetch_row($rslt); if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; + echo " + + + + + + + + "; + echo "\n"; $o++; - } + } -echo "
EXTENPROTOSERVERDIAL PLANSTATUSNAMEVMAILLINKS
$row[0]$row[16]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]MODIFY | STATS
$row[0]$row[1]$row[2]$row[3]$row[4]$row[5]$row[6]$row[7]$row[8]MODIFY | STATS
\n"; -} + echo "
\n"; + } ###################### # ADD=12000000000 display all phones alias ###################### if ($ADD==12000000000) -{ -echo "
\n"; -echo ""; + { + echo "
\n"; + echo ""; - $stmt="SELECT * from phones_alias order by alias_id;"; + $stmt="SELECT alias_id,alias_name,logins_list from phones_alias order by alias_id;"; $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); + $phonealias_to_print = mysql_num_rows($rslt); -echo "
PHONE ALIAS LISTINGS:\n"; -echo "
\n"; -echo ""; -echo ""; -echo ""; -echo ""; -echo "\n"; + echo "
PHONE ALIAS LISTINGS:\n"; + echo "
ALIAS IDALIAS NAMEPHONE LOGINS LISTMODIFY
\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; $o=0; - while ($phones_to_print > $o) { + while ($phonealias_to_print > $o) + { $row=mysql_fetch_row($rslt); if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo "\n"; + echo ""; + echo ""; + echo ""; + echo "\n"; $o++; - } + } -echo "
ALIAS IDALIAS NAMEPHONE LOGINS LISTMODIFY
$row[0]$row[1]$row[2]MODIFY
$row[0]$row[1]$row[2]MODIFY
\n"; -} + echo "
\n"; + } ###################### # ADD=100000000000 display all servers ###################### if ($ADD==100000000000) -{ -echo "
\n"; + { + echo "
\n"; echo ""; - $stmt="SELECT * from servers order by server_id"; + $stmt="SELECT server_id,server_description,server_ip,active,asterisk_version,max_vicidial_trunks,local_gmt from servers order by server_id"; $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); + $servers_to_print = mysql_num_rows($rslt); -echo "
SERVER LISTINGS:\n"; -echo "
\n"; + echo "
SERVER LISTINGS:\n"; + echo "
\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; $o=0; - while ($phones_to_print > $o) { + while ($servers_to_print > $o) + { $row=mysql_fetch_row($rslt); if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; $o++; - } + } -echo "
SERVER IDNAMESERVER IPACTIVEASTERISKTRUNKSGMTMODIFY
$row[0]$row[1] $row[2] $row[4] $row[3]  MODIFY
$row[0]$row[1]$row[2]$row[3]$row[4]$row[5]$row[6]MODIFY
\n"; -} + echo "
\n"; + } ###################### # ADD=1000000000000 display all conferences ###################### if ($ADD==1000000000000) -{ -echo "
\n"; + { + echo "
\n"; echo ""; - $stmt="SELECT * from conferences order by conf_exten"; + $stmt="SELECT conf_exten,server_ip,extension from conferences order by conf_exten"; $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); + $conferences_to_print = mysql_num_rows($rslt); -echo "
CONFERENCE LISTINGS:\n"; -echo "
\n"; + echo "
CONFERENCE LISTINGS:\n"; + echo "
\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; $o=0; - while ($phones_to_print > $o) { + while ($conferences_to_print > $o) + { $row=mysql_fetch_row($rslt); if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} echo ""; - echo ""; - echo ""; - echo "\n"; + echo ""; + echo ""; + echo "\n"; $o++; - } + } -echo "
CONFERENCESERVER IPEXTENSIONMODIFY
$row[0] $row[1] $row[2]$row[4]  MODIFY
$row[1]$row[2]MODIFY
\n"; -} + echo "
\n"; + } ###################### # ADD=10000000000000 display all vicidial conferences ###################### if ($ADD==10000000000000) -{ -echo "
\n"; + { + echo "
\n"; echo ""; - $stmt="SELECT * from vicidial_conferences order by conf_exten"; + $stmt="SELECT conf_exten,server_ip,extension from vicidial_conferences order by conf_exten"; $rslt=mysql_query($stmt, $link); - $phones_to_print = mysql_num_rows($rslt); + $vicidialconf_to_print = mysql_num_rows($rslt); -echo "
CONFERENCE LISTINGS:\n"; -echo "
\n"; + echo "
VICIDIAL CONFERENCE LISTINGS:\n"; + echo "
\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; $o=0; - while ($phones_to_print > $o) { + while ($vicidialconf_to_print > $o) + { $row=mysql_fetch_row($rslt); if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} @@ -16672,13 +16800,18 @@ echo "
CONFERENCESERVER IPEXTENSIONMODIFY
\n"; {$bgcolor='bgcolor="#9BB9FB"';} echo ""; echo ""; - echo ""; - echo "\n"; + echo ""; + echo "\n"; $o++; + } + + echo "
$row[0] $row[1] $row[2]$row[4]  MODIFY
$row[2]MODIFY
\n"; } -echo "
\n"; -} + + + + ###################### # ADD=999999 display reports section @@ -16690,10 +16823,6 @@ 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";}