From 45a987ba15e4c97b41027aac89fbadcacb3d7426 Mon Sep 17 00:00:00 2001 From: mattf Date: Wed, 29 Nov 2006 15:34:03 +0000 Subject: [PATCH] added column headers to Users and Phones listings with order-by titles in admin.php script git-svn-id: svn://192.168.202.10@420 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/www/vicidial/admin.php | 59 +++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 9 deletions(-) diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index 66d227a3..2400b265 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -794,12 +794,13 @@ $lead_filter_sql = ereg_replace(";","",$lead_filter_sql); # 61110-1502 - add ability to select NONE in dial statuses, new list_id must not be < 100 # 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 # # 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.72'; -$build = '61122-1535'; +$version = '2.0.73'; +$build = '61129-1028'; $STARTtime = date("U"); @@ -8136,14 +8137,33 @@ echo "\n"; if ($ADD==0) { echo "
\n"; - echo ""; +echo ""; - $stmt="SELECT * from vicidial_users order by full_name"; +$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"; $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"; $o=0; while ($people_to_print > $o) { @@ -8152,7 +8172,7 @@ echo "
USER IDFULL NAMELEVELGROUPLINKS
\n"; {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; + echo ""; echo "\n"; $o++; } @@ -8473,15 +8493,36 @@ echo "
$row[1]$row[3]$row[4]$row[5]
$row[1]$row[3]$row[4]$row[5]MODIFY | STATS | STATUS | TIME
\n"; if ($ADD==10000000000) { echo "
\n"; +echo ""; - echo ""; - - $stmt="SELECT * from phones order by extension,server_ip"; +$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"; $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"; $o=0; while ($phones_to_print > $o) { @@ -8490,7 +8531,7 @@ echo "
EXTENPROTOSERVERDIALPLANSTATUSNAMEVMAILLINKS
\n"; {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} - echo ""; + echo ""; echo "\n"; $o++; }
$row[0]$row[16]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]
$row[0]$row[16]$row[5]$row[1]$row[2]$row[8]$row[11]$row[14]$row[15]MODIFY | STATS