RosCMS update:

Admin Interface:
* membership page: improved the interface and sql queries, outsourced the color settings
* account page: outsourced the color settings
Modified: trunk/web/reactos.org/htdocs/roscms/inc/admin_user_accounts.php
Modified: trunk/web/reactos.org/htdocs/roscms/inc/admin_user_group_members.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-20 20:07:40 UTC (rev 20277)
+++ trunk/web/reactos.org/htdocs/roscms/inc/admin_user_accounts.php	2005-12-20 20:34:03 UTC (rev 20278)
@@ -459,24 +459,24 @@
 				ORDER BY '$ros_cms_intern_users_sortby' $ros_cms_intern_users_sort LIMIT ". $roscms_SET_curpos ." , ". $roscms_intern_items_per_page ." ;") ;
 	}*/
 
-	$farbe1=$roscms_intern_color1;
-	$farbe2=$roscms_intern_color2;
-	$zaehler="0";
+	$color1=$roscms_intern_color1;
+	$color2=$roscms_intern_color2;
+	$colorcounter="0";
 	//$farbe="#CCCCC";
 	
 	while($result_page = mysql_fetch_array($query_page)) { // users
 ?>
     <tr> 
       <td width="9%" valign="middle" bgcolor="<?php
-								$zaehler++;
-								if ($zaehler == "1") {
-									echo $farbe1;
-									$farbe = $farbe1;
+								$colorcounter++;
+								if ($colorcounter == "1") {
+									echo $color1;
+									$farbe = $color1;
 								}
-								elseif ($zaehler == "2") {
-									$zaehler="0";
-									echo $farbe2;
-									$farbe = $farbe2;
+								elseif ($colorcounter == "2") {
+									$colorcounter="0";
+									echo $color2;
+									$farbe = $color2;
 								}
 							 ?>"> 
         <div align="center"><a href="<?php echo "?page=user&amp;sec=profil&amp;sec2=".$result_page['user_id']; ?>"><img src="images/view.gif" alt="Profil" width="19" height="18" border="0"></a>&nbsp; 

Modified: trunk/web/reactos.org/htdocs/roscms/inc/admin_user_group_members.php
--- trunk/web/reactos.org/htdocs/roscms/inc/admin_user_group_members.php	2005-12-20 20:07:40 UTC (rev 20277)
+++ trunk/web/reactos.org/htdocs/roscms/inc/admin_user_group_members.php	2005-12-20 20:34:03 UTC (rev 20278)
@@ -23,123 +23,340 @@
     filters & sort</a></p>
   <?php
 
-
 	if ($rpm_lang_id == "") {
 		$rpm_lang_id="all";
 	}
-	//echo '<p>Language: ';
-	//echo '<b>All</b>';
-	$ros_cms_intern_users_lang = " ";
-	//echo '</p>';
-
-	if ($rpm_filt == "") {
-		$rpm_filt="active";
+	echo '<p>Language: ';
+	if ($rpm_lang_id == "all") {	
+		echo '<b>All</b>';
+		$ros_cms_intern_users_lang = "AND A1.user_language LIKE '%'";
 	}
-	//echo '<p>Filter: ';
-	//echo '<b>active</b>';
-	$ros_cms_intern_users_filt = " ";
-	//echo '</p>';
+	else {
+		echo '<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid=all">All</a>';
+	}
+	// Languages
+	$sql_lang="SELECT * 
+				FROM languages
+				WHERE lang_level != '0'
+				ORDER BY 'lang_level' DESC";
+	$sql_query_lang=mysql_query($sql_lang);
+	while($myrow_lang=mysql_fetch_row($sql_query_lang)) {
+		$roscms_sel_lang = $myrow_lang[0];
+		echo ' | ';
+		if ($rpm_lang_id == $roscms_sel_lang) {	
+			echo '<b>'.$myrow_lang[1].'</b>';
+			$ros_cms_intern_users_lang = "AND A1.user_language = '".$roscms_sel_lang."'";
+		}
+		else {
+			echo '<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$roscms_sel_lang.'">'.$myrow_lang[1].'</a>';
+		}
+	}
 
+
 	if ($rpm_filt == "") {
 		$rpm_filt="active";
 	}
 	echo '<p>Filter: ';
 	if ($rpm_filt == "active") {	
+		echo '<b>active users</b>';
+		$ros_cms_intern_users_filt = "AND A1.user_account_enabled = 'yes'";
+	}
+	else {
+		echo '<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt=active&amp;langid='.$rpm_lang_id.'">active users</a>';
+	}
+	echo ' | ';
+	if ($rpm_filt == "all") {	
+		echo '<b>all users</b>';
+		$ros_cms_intern_users_filt = "AND A1.user_account_enabled != ''";
+	}
+	else {
+		echo '<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt=all&amp;langid='.$rpm_lang_id.'">all users</a>';
+	}
+	echo '</p>';
+
+	if ($rpm_sort == "") {
+		$rpm_sort="all";
+	}
+	echo '<p>Filter by Group: ';
+	if ($rpm_sort == "all") {	
 		echo '<b>all</b>';
-		$ros_cms_intern_users_filt = " ";
+		$ros_cms_intern_users_sortby=" AND A2.usergroupmember_usergroupid LIKE '%'";
 	}
 	else {
-		echo '<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt=active&amp;langid='.$rpm_lang_id.'">all</a>';
+		echo '<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=view&amp;sort=all&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'">all</a>';
 	}
 	echo ' | ';
-	if ($rpm_filt == "sadmin") {	
+	if ($rpm_sort == "ros_sadmin") {	
 		echo '<b>super admin</b>';
-		$ros_cms_intern_users_filt = " WHERE `usergroupmember_usergroupid` = 'ros_sadmin' ";
+		$ros_cms_intern_users_sortby=" AND A2.usergroupmember_usergroupid = 'ros_sadmin'";
 	}
 	else {
-		echo '<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt=sadmin&amp;langid='.$rpm_lang_id.'">super admin</a>';
+		echo '<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=view&amp;sort=ros_sadmin&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'">super admin</a>';
 	}
 	echo ' | ';
-	if ($rpm_filt == "admin") {	
+	if ($rpm_sort == "ros_admin") {	
 		echo '<b>admin</b>';
-		$ros_cms_intern_users_filt = " WHERE `usergroupmember_usergroupid` = 'ros_admin' ";
+		$ros_cms_intern_users_sortby=" AND A2.usergroupmember_usergroupid = 'ros_admin'";
 	}
 	else {
-		echo '<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt=admin&amp;langid='.$rpm_lang_id.'">admin</a>';
+		echo '<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=view&amp;sort=ros_admin&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'">admin</a>';
 	}
 	echo ' | ';
-	if ($rpm_filt == "dev") {	
+	if ($rpm_sort == "developer") {	
 		echo '<b>developer</b>';
-		$ros_cms_intern_users_filt = " WHERE `usergroupmember_usergroupid` = 'developer' ";
+		$ros_cms_intern_users_sortby=" AND A2.usergroupmember_usergroupid = 'developer'";
 	}
 	else {
-		echo '<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt=dev&amp;langid='.$rpm_lang_id.'">developer</a>';
+		echo '<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=view&amp;sort=developer&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'">developer</a>';
 	}
 	echo ' | ';
-	if ($rpm_filt == "mod") {	
+	if ($rpm_sort == "moderator") {	
 		echo '<b>moderator</b>';
-		$ros_cms_intern_users_filt = " WHERE `usergroupmember_usergroupid` = 'moderator' ";
+		$ros_cms_intern_users_sortby=" AND A2.usergroupmember_usergroupid = 'moderator'";
 	}
 	else {
-		echo '<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt=mod&amp;langid='.$rpm_lang_id.'">moderator</a>';
+		echo '<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=view&amp;sort=moderator&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'">moderator</a>';
 	}
 	echo ' | ';
-	if ($rpm_filt == "trans") {	
+	if ($rpm_sort == "translator") {	
 		echo '<b>translator</b>';
-		$ros_cms_intern_users_filt = " WHERE `usergroupmember_usergroupid` = 'translator' ";
+		$ros_cms_intern_users_sortby=" AND A2.usergroupmember_usergroupid = 'translator'";
 	}
 	else {
-		echo '<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt=trans&amp;langid='.$rpm_lang_id.'">translator</a>';
+		echo '<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=view&amp;sort=translator&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'">translator</a>';
 	}
 	echo ' | ';
-	if ($rpm_filt == "user") {	
-		echo '<b>normal user</b>';
-		$ros_cms_intern_users_filt = " WHERE `usergroupmember_usergroupid` = 'user' ";
+	if ($rpm_sort == "user") {	
+		echo '<b>user</b>';
+		$ros_cms_intern_users_sortby=" AND A2.usergroupmember_usergroupid = 'user'";
 	}
 	else {
-		echo '<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=view&amp;sort='.$rpm_sort.'&amp;filt=user&amp;langid='.$rpm_lang_id.'">normal user</a>';
+		echo '<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=view&amp;sort=user&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'">user</a>';
 	}
+	echo '</p>';
 
-	if ($rpm_sort == "") {
-		$rpm_sort="id";
+?>
+  <?php
+
+// 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> ';
 	}
-	echo '<p>Sorted by: ';
-	if ($rpm_sort == "id") {	
-		echo '<b>user ID</b>';
-		$ros_cms_intern_users_sortby="usergroupmember_userid";
-		$ros_cms_intern_users_sort="ASC";
+	else {
+		echo '  <a href="?page=admin&amp;sec=usrgrpmbr&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=usrgrpmbr&amp;sec2=view&amp;sort=id&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'">user ID</a>';
+		echo '  <a href="?page=admin&amp;sec=usrgrpmbr&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> ';
 	}
-	echo ' | ';
-	if ($rpm_sort == "group") {	
-		echo '<b>group ID</b>';
-		$ros_cms_intern_users_sortby="usergroupmember_usergroupid";
-		$ros_cms_intern_users_sort="ASC";
+
+	if ($roscms_SET_letter == "b") {
+		echo '  <b>B</b> ';
 	}
 	else {
-		echo '<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=view&amp;sort=group&amp;filt='.$rpm_filt.'&amp;opt='.$rpm_opt.'&amp;langid='.$rpm_lang_id.'">group ID</a>';
+		echo '  <a href="?page=admin&amp;sec=usrgrpmbr&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> ';
 	}
-	echo '</p>';
 
-?>
-<?php
+	if ($roscms_SET_letter == "c") {
+		echo '  <b>C</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=usrgrpmbr&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> ';
+	}
 
-// Setting:
-$roscms_intern_items_per_page = 50;
+	if ($roscms_SET_letter == "d") {
+		echo '  <b>D</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=usrgrpmbr&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=usrgrpmbr&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> ';
+	}
 
-$roscms_SET_curpos = "";
-if (array_key_exists("curpos", $_GET)) $roscms_SET_curpos=htmlspecialchars($_GET["curpos"]);
+	if ($roscms_SET_letter == "f") {
+		echo '  <b>F</b> ';
+	}
+	else {
+		echo '  <a href="?page=admin&amp;sec=usrgrpmbr&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=usrgrpmbr&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=usrgrpmbr&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=usrgrpmbr&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=usrgrpmbr&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=usrgrpmbr&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=usrgrpmbr&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=usrgrpmbr&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=usrgrpmbr&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=usrgrpmbr&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=usrgrpmbr&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=usrgrpmbr&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=usrgrpmbr&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=usrgrpmbr&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=usrgrpmbr&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=usrgrpmbr&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=usrgrpmbr&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=usrgrpmbr&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=usrgrpmbr&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=usrgrpmbr&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=usrgrpmbr&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;
 }
 
-$query_count_cat=mysql_query("SELECT COUNT('usergroupmember_userid') 
-								FROM `usergroup_members` 
-								" . $ros_cms_intern_users_filt . "
-								ORDER BY `usergroupmember_userid` ASC ;");	
+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);
 
 	echo "<p align='center'>";
@@ -150,84 +367,75 @@
 			echo "<b>".$j."</b> ";
 		}
 		else {
-			echo "<a href='?page=admin&amp;sec=usrgrpmbr&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=usrgrpmbr&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;
 	echo "</p>";
 
-?>  
-<table width="100%" border="0" cellpadding="1" cellspacing="1">
+?>
+  <table width="100%" border="0" cellpadding="1" cellspacing="1">
     <tr bgcolor="#5984C3"> 
-      <td width="6%"> 
+      <td width="10%"> 
         <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><strong>Action</strong></font></div></td>
-      <td width="4%" bgcolor="#5984C3"> 
+      <td width="10%" bgcolor="#5984C3"> 
         <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><strong>ID</strong></font></div></td>
-      <td width="20%" bgcolor="#5984C3"> 
+      <td width="40%" bgcolor="#5984C3"> 
         <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><strong>Nick</strong></font></div></td>
-      <td width="20%"> 
+      <td width="40%"> 
         <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><strong>Usergroup</strong></font></div></td>
-      <td width="50%" bgcolor="#5984C3"> 
-        <div align="center"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><strong>Usergroup 
-          description</strong></font></div></td>
     </tr>
     <?php
 
-	if($roscms_intern_account_level==100) {
-		$query_page = mysql_query("SELECT * 
-				FROM usergroup_members
-				$ros_cms_intern_users_filt $ros_cms_intern_users_lang
-				ORDER BY '$ros_cms_intern_users_sortby' $ros_cms_intern_users_sort  LIMIT ". $roscms_SET_curpos ." , ". $roscms_intern_items_per_page ." ;") ;
 
-	}
-	else {
-	//AND user_account_hidden != 0
-		$query_page = mysql_query("SELECT * 
-				FROM usergroup_members
-				$ros_cms_intern_users_filt  $ros_cms_intern_users_lang
-				ORDER BY '$ros_cms_intern_users_sortby' $ros_cms_intern_users_sort  LIMIT ". $roscms_SET_curpos ." , ". $roscms_intern_items_per_page ." ;") ;
-	}
+		$roscms_TEMP_sql = "SELECT A1.user_id, A1.user_name, A2.usergroupmember_userid, A2.usergroupmember_usergroupid 
+									FROM users A1, usergroup_members A2
+									WHERE A1.user_id = A2.usergroupmember_userid
+									AND A1.user_name LIKE  '" . $roscms_SET_letter . "%'
+									$ros_cms_intern_users_filt $ros_cms_intern_users_lang $ros_cms_intern_users_sortby
+									GROUP BY A1.user_name
+									LIMIT ". $roscms_SET_curpos ." , ". $roscms_intern_items_per_page ." 
+									 ;";
+//		echo $roscms_TEMP_sql;
+		$query_page = mysql_query($roscms_TEMP_sql) ;
 
-	$farbe1="#E2E2E2";
-	$farbe2="#EEEEEE";
-	$zaehler="0";
+	$color1=$roscms_intern_color1;
+	$color2=$roscms_intern_color2;
+	$colorcounter="0";
 	//$farbe="#CCCCC";
 	
 	while($result_page = mysql_fetch_array($query_page)) { // users
 ?>
     <tr> 
-      <td width="9%" valign="middle" bgcolor="<?php
-								$zaehler++;
-								if ($zaehler == "1") {
-									echo $farbe1;
-									$farbe = $farbe1;
+      <td valign="middle" bgcolor="<?php
+								$colorcounter++;
+								if ($colorcounter == "1") {
+									echo $color1;
+									$farbe = $color1;
 								}
-								elseif ($zaehler == "2") {
-									$zaehler="0";
-									echo $farbe2;
-									$farbe = $farbe2;
+								elseif ($colorcounter == "2") {
+									$colorcounter="0";
+									echo $color2;
+									$farbe = $color2;
 								}
 							 ?>"> 
-        <div align="center"><a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=edit&amp;sec3=<?php echo $result_page['usergroupmember_usergroupid']; ?>&amp;db_id=<?php echo $result_page['usergroupmember_userid']; ?>"><img src="images/view.gif" alt="Edit Membership" width="19" height="18" border="0"></a>&nbsp;<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=add&amp;sec3=new&amp;db_id=<?php echo $result_page['usergroupmember_userid']; ?>"><img src="images/tool.gif" alt="Add Membership" width="19" height="18" border="0"></a>&nbsp;<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=delete&amp;sec3=<?php echo $result_page['usergroupmember_usergroupid']; ?>&amp;db_id=<?php echo $result_page['usergroupmember_userid']; ?>"><img src="images/delete.gif" alt="Delete Membership" width="19" height="18" border="0"></a></div></td>
-      <td width="7%" valign="middle" bgcolor="<?php echo $farbe; ?>"> <div align="center"><font face="Arial, Helvetica, sans-serif"><?php echo "<b>".$result_page['usergroupmember_userid']."</b>"; ?></font></div></td>
-      <td width="10%" valign="middle" bgcolor="<?php echo $farbe; ?>"><font face="Arial, Helvetica, sans-serif"><?php
-		$query_usra = mysql_query("SELECT user_id, user_name FROM users WHERE user_id = '".$result_page['usergroupmember_userid']."'") or die('DB error (membership script)!');
+        <div align="center"><a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=edit&amp;sec3=<?php echo $result_page['usergroupmember_usergroupid']; ?>&amp;db_id=<?php echo $result_page['user_id']; ?>"><img src="images/view.gif" alt="Edit Membership" width="19" height="18" border="0"></a>&nbsp;<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=add&amp;sec3=new&amp;db_id=<?php echo $result_page['usergroupmember_userid']; ?>"><img src="images/tool.gif" alt="Add Membership" width="19" height="18" border="0"></a>&nbsp;<a href="?page=admin&amp;sec=usrgrpmbr&amp;sec2=delete&amp;sec3=<?php echo $result_page['usergroupmember_usergroupid']; ?>&amp;db_id=<?php echo $result_page['usergroupmember_userid']; ?>"><img src="images/delete.gif" alt="Delete Membership" width="19" height="18" border="0"></a></div></td>
+      <td valign="middle" bgcolor="<?php echo $farbe; ?>"> <div align="center"><font face="Arial, Helvetica, sans-serif"><?php echo "<b>".$result_page['user_id']."</b>"; ?></font></div></td>
+      <td valign="middle" bgcolor="<?php echo $farbe; ?>"><font face="Arial, Helvetica, sans-serif"><?php
+		$query_usra = mysql_query("SELECT user_id, user_name FROM users WHERE user_id = '".$result_page['user_id']."'") or die('DB error (membership script)!');
 		$result_usra = mysql_fetch_array($query_usra); // or die('DB error (show_sessions script)');
 	  
-	   echo $result_usra['user_name']." <a href='?page=user&amp;sec=profil&amp;sec2=".$result_page['usergroupmember_userid']."'>[Profil]</a>"; ?> 
+	   echo $result_usra['user_name']." <a href='?page=user&amp;sec=profil&amp;sec2=".$result_page['user_id']."'>[Profil]</a>"; ?> 
         </font></td>
-      <td width="13%" valign="middle" bgcolor="<?php echo $farbe; ?>" title="<?php echo $result_page['usergroupmember_usergroupid']; ?>"><div align="left"><font face="Arial, Helvetica, sans-serif"> 
+      <td valign="middle" bgcolor="<?php echo $farbe; ?>" title="<?php echo $result_page['usergroupmember_usergroupid']; ?>"><div align="left"><font face="Arial, Helvetica, sans-serif"> 
           <?php
-		//echo "SELECT usrgroup_name_id, usrgroup_name FROM usergroups WHERE usrgroup_name_id = '".$result_page['usergroupmember_usergroupid']."'<br>";
 		$query_grpb = mysql_query("SELECT usrgroup_name_id, usrgroup_name, usrgroup_description FROM usergroups WHERE usrgroup_name_id = '".$result_page['usergroupmember_usergroupid']."'") or die('DB error (membership script)!');
 		$result_grpb = mysql_fetch_array($query_grpb) or die('DB error (membership script)');
 	  
-		echo $result_grpb['usrgroup_name']; 
+		echo $result_grpb['usrgroup_name'];
 		 ?>
           </font></div></td>
-      <td width="15%" valign="middle" bgcolor="<?php echo $farbe; ?>"> <font face="Arial, Helvetica, sans-serif"><?php
-		echo substr(htmlentities($result_grpb['usrgroup_description'], ENT_QUOTES), 0, 50)."...";
-		?></font></tr>
+    </tr>
     <?php	
 	}	// end while
 ?>