[Kolab-devel] server/kolab/kolab/admin/administrator index.php,1.8,1.9 by tassilo at doto.intevation.de

root at intevation.de root at intevation.de
Mon Jun 30 17:08:50 CEST 2003


Update of /kolabrepository/server/kolab/kolab/admin/administrator
In directory doto:/tmp/cvs-serv1452

Modified Files:
	index.php 
Log Message:
Martin K.: Fix for incorrect display of administrators


Index: index.php
===================================================================
RCS file: /kolabrepository/server/kolab/kolab/admin/administrator/index.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- index.php	14 Jun 2003 17:06:31 -0000	1.8
+++ index.php	30 Jun 2003 15:08:48 -0000	1.9
@@ -4,6 +4,7 @@
  (c) 2003 Martin Konold <martin.konold at erfrakon.de>
  This program is Free Software under the GNU General Public License (>=v2).
  Read the file COPYING that comes with this packages for details.
+
 */
     include("head.php");
     This("administrator/");
@@ -195,19 +196,19 @@
          $fn = substr($cn, 0, $b - $a);
          $gid = uid2group($userid);
          if ($gid == "admin") {
-			// skipping to correct page and start with first entry
-			if ($skip <= ($page-1)*$views) {
+		// skipping to correct page and start with first entry
+		if ($page != '1') {
+			for ($i = 1; $i <= ($page-1)*$views; $i++)
 				$entry = ldap_next_entry($link, $entry);
-			}
-			else {
-				// counts the entries, which are already listed on this page and breaks on overflow
-				if ($countentries < $views) {
-					if ($dn != "cn=manager,".$_SESSION['base_dn']) {
-					$userid = urlencode($userid);
-					$dn = urlencode($dn);
-					if ($first == 0) printf("<thead><td class=\"content\"> Name </td><td class=\"content\"> UID </td><td class=\"content\"> Action </td></thead>\n");
-						$first++;
-						printf("<tr><td class=\"content\"> %s, %s </td><td class=\"content\"> %s </td><td class=\"contentaction\">
+		}
+		// counts the entries, which are already listed on this page and breaks on overflow
+		if ($countentries < $views) {
+			if ($dn != "cn=manager,".$_SESSION['base_dn']) {
+				$userid = urlencode($userid);
+				$dn = urlencode($dn);
+				if ($first == 0) printf("<thead><td class=\"content\"> Name </td><td class=\"content\"> UID </td><td class=\"content\"> Action </td></thead>\n");
+				$first++;
+				printf("<tr><td class=\"content\"> %s, %s </td><td class=\"content\"> %s </td><td class=\"contentaction\">
 	            	        <a href=\"create_administrator.php?action=modify&dn=%s\"> [Modify]</a>
     	    	            <a href=\"create_administrator.php?action=delete&dn=%s\"> [Delete]</a>
 							</td></tr>\n", $sn, $fn, $userid, $dn,$dn);
@@ -215,8 +216,7 @@
 				}
 				$countentries++;
 			}
-         }
-		$skip++;
+        	$skip++;
 		$entry = ldap_next_entry($link, $entry);
       } 
       ldap_free_result($result);





More information about the devel mailing list