RosCMS update:

* user accounts admin interface page: improve the navigation
Modified: trunk/web/reactos.org/htdocs/roscms/inc/admin_user_accounts.php

Modified: trunk/web/reactos.org/htdocs/roscms/inc/admin_user_accounts.php
--- trunk/web/reactos.org/htdocs/roscms/inc/admin_user_accounts.php	2005-12-15 19:12:37 UTC (rev 20195)
+++ trunk/web/reactos.org/htdocs/roscms/inc/admin_user_accounts.php	2005-12-15 19:49:52 UTC (rev 20196)
@@ -105,10 +105,6 @@
 	else {
 		echo '<a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt=all&amp;langid='.$rpm_lang_id.'">all users</a>';
 	}
-	if ($rpm_filt == "history") {	
-		echo ' | <b>history</b>';
-		$ros_cms_intern_users_filt = "WHERE user_name = '".$rpm_opt."'";
-	}
 	echo '</p>';
 
 	if ($rpm_sort == "") {
@@ -195,17 +191,221 @@
 // Setting:
 $roscms_intern_items_per_page = 50;
 
-
 $roscms_SET_curpos = "";
+$roscms_SET_letter = "";
 if (array_key_exists("curpos", $_GET)) $roscms_SET_curpos=htmlspecialchars($_GET["curpos"]);
+if (array_key_exists("letter", $_GET)) $roscms_SET_letter=htmlspecialchars($_GET["letter"]);
+
+
+
+	echo '<p align="center">';
+	
+	if ($roscms_SET_letter == "all" || $roscms_SET_letter == "") {
+		echo '  <b>All</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=all" class="letterbarlink">All</a> ';
+	}
+
+	if ($roscms_SET_letter == "a") {
+		echo '  <b>A</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=a" class="letterbarlink">A</a> ';
+	}
+
+	if ($roscms_SET_letter == "b") {
+		echo '  <b>B</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=b" class="letterbarlink">B</a> ';
+	}
+
+	if ($roscms_SET_letter == "c") {
+		echo '  <b>C</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=c" class="letterbarlink">C</a> ';
+	}
+
+	if ($roscms_SET_letter == "d") {
+		echo '  <b>D</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=d" class="letterbarlink">D</a> ';
+	}
+
+	if ($roscms_SET_letter == "e") {
+		echo '  <b>E</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=e" class="letterbarlink">E</a> ';
+	}
+
+	if ($roscms_SET_letter == "f") {
+		echo '  <b>F</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=f" class="letterbarlink">F</a> ';
+	}
+
+	if ($roscms_SET_letter == "g") {
+		echo '  <b>G</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=g" class="letterbarlink">G</a> ';
+	}
+
+	if ($roscms_SET_letter == "h") {
+		echo '  <b>H</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=h" class="letterbarlink">H</a> ';
+	}
+
+	if ($roscms_SET_letter == "i") {
+		echo '  <b>I</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=i" class="letterbarlink">I</a> ';
+	}
+
+	if ($roscms_SET_letter == "j") {
+		echo '  <b>J</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=j" class="letterbarlink">J</a> ';
+	}
+
+	if ($roscms_SET_letter == "k") {
+		echo '  <b>K</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=k" class="letterbarlink">K</a> ';
+	}
+
+	if ($roscms_SET_letter == "l") {
+		echo '  <b>L</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=l" class="letterbarlink">L</a> ';
+	}
+
+	if ($roscms_SET_letter == "m") {
+		echo '  <b>M</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=m" class="letterbarlink">M</a> ';
+	}
+	
+	if ($roscms_SET_letter == "n") {
+		echo '  <b>N</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=n" class="letterbarlink">N</a> ';
+	}
+	
+	if ($roscms_SET_letter == "o") {
+		echo '  <b>O</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=o" class="letterbarlink">O</a> ';
+	}
+
+	if ($roscms_SET_letter == "p") {
+		echo '  <b>P</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=p" class="letterbarlink">P</a> ';
+	}
+
+	if ($roscms_SET_letter == "q") {
+		echo '  <b>Q</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=q" class="letterbarlink">Q</a> ';
+	}
+
+	if ($roscms_SET_letter == "r") {
+		echo '  <b>R</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=r" class="letterbarlink">R</a> ';
+	}
+
+	if ($roscms_SET_letter == "s") {
+		echo '  <b>S</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=s" class="letterbarlink">S</a> ';
+	}
+
+	if ($roscms_SET_letter == "t") {
+		echo '  <b>T</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=t" class="letterbarlink">T</a> ';
+	}
+
+	if ($roscms_SET_letter == "u") {
+		echo '  <b>U</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=u" class="letterbarlink">U</a> ';
+	}
+
+	if ($roscms_SET_letter == "v") {
+		echo '  <b>V</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=v" class="letterbarlink">V</a> ';
+	}
+
+	if ($roscms_SET_letter == "w") {
+		echo '  <b>W</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=w" class="letterbarlink">W</a> ';
+	}
+
+	if ($roscms_SET_letter == "x") {
+		echo '  <b>X</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=x" class="letterbarlink">X</a> ';
+	}
+
+	if ($roscms_SET_letter == "y") {
+		echo '  <b>Y</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=y" class="letterbarlink">Y</a> ';
+	}
+
+	if ($roscms_SET_letter == "z") {
+		echo '  <b>Z</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=users&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'&amp;letter=z" class="letterbarlink">Z</a> ';
+	}
+
+	echo "</p>";
+
+
+
 if (!$roscms_SET_curpos) {
 	$roscms_SET_curpos = 0;
 }
 
+if ($roscms_SET_letter == "all") {
+	$roscms_SET_letter = "%";
+}
+
 $query_count_cat=mysql_query("SELECT COUNT('user_id') 
 								FROM `users` 
 								WHERE `user_account_enabled` = 'yes'
 								AND `user_account_hidden` = 'no'
+								AND `user_name` LIKE  '" . $roscms_SET_letter . "%'
 								ORDER BY `user_name` ASC ;");	
 $result_count_cat = mysql_fetch_row($query_count_cat);
 
@@ -217,7 +417,7 @@
 			echo "<b>".$j."</b> ";
 		}
 		else {
-			echo "<a href='?page=admin&amp;sec=users&amp;sec2=view&amp;sort=".$rpm_sort."&amp;filt=".$rpm_filt."&amp;opt=".$rpm_opt."&amp;langid=".$rpm_lang_id."&amp;curpos=".$i."'>".$j."</a> ";
+			echo "<a href='?page=admin&amp;sec=users&amp;sec2=view&amp;sort=".$rpm_sort."&amp;filt=".$rpm_filt."&amp;opt=".$rpm_opt."&amp;langid=".$rpm_lang_id."&amp;letter=".$roscms_SET_letter."&amp;curpos=".$i."'>".$j."</a> ";
 		}
 	}
 	$j=0;
@@ -240,9 +440,10 @@
       <td width="10%"> <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><strong>Lang</strong></font></div></td>
     </tr>
     <?php
+		
 		$query_page = mysql_query("SELECT * 
 				FROM users
-				$ros_cms_intern_users_filt $ros_cms_intern_users_lang
+				$ros_cms_intern_users_filt $ros_cms_intern_users_lang  AND `user_name` LIKE  '" . $roscms_SET_letter . "%' 
 				ORDER BY '$ros_cms_intern_users_sortby' $ros_cms_intern_users_sort LIMIT ". $roscms_SET_curpos ." , ". $roscms_intern_items_per_page ." ;") ;
 
 /*	if($roscms_intern_account_level==100) {