gunnar: server/kolab-webadmin/admin/user index.php, 1.3, 1.4 user.php, 1.1, 1.2
cvs at kolab.org
cvs at kolab.org
Tue Aug 21 19:15:54 CEST 2007
Author: gunnar
Update of /kolabrepository/server/kolab-webadmin/admin/user
In directory doto:/tmp/cvs-serv8206/user
Modified Files:
index.php user.php
Log Message:
Intermediate commit while restructuring the kolab-webadmin.
Index: index.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/admin/user/index.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- index.php 20 Aug 2007 10:11:52 -0000 1.3
+++ index.php 21 Aug 2007 17:15:52 -0000 1.4
@@ -38,77 +38,22 @@
/** Read our configuration. */
require_once('../config.php');
-/** Initialize variables */
-$errors = array();
-$entries = array();
-$sublist = '';
-
+/** Initialize page */
$ADMIN = new KolabWebadmin($params);
$ADMIN->setSection('user');
/** Access logic */
-if( !$ADMIN->isMaintainer() &&
- !$ADMIN->isAdmin() &&
- !$ADMIN->isDomainMaintainer() ) {
- array_push($errors,
- _("Error: You don't have Permissions to access this Menu"));
+if(!$ADMIN->isMaintainer() &&
+ !$ADMIN->isAdmin() &&
+ !$ADMIN->isDomainMaintainer() ) {
+ $ADMIN->assign('errors',
+ array(_("Error: You don't have Permissions to access this Menu")));
} else {
- /** Get the request variables */
- $alphaselect = KolabForm::getRequestVar('alphaselect', '[A-F]');
- $page = KolabForm::getRequestVar('page', '1');
- $filterattr = KolabForm::getRequestVar('filterattr');
- $filtertype = KolabForm::getRequestVar('filtertype');
- $filtervalue = KolabForm::getRequestVar('filtervalue');
- $alphalimit = KolabForm::getRequestVar('alphalimit');
- $alphagroup = KolabForm::getRequestVar('alphagroup');
-
- if ( !empty($alphalimit) ) {
- $sublist = $a[0];
- }
-
- /** Extract data from LDAP */
- $users = $ADMIN->getUsersInterface();
- $entries = $users->getVisibleUsers($filterattr, $filtertype,
- $filtervalue, $alphalimit,
- $alphagroup);
+ /** Extract data from LDAP */
+ $ADMIN->assign('entries', $ADMIN->getVisibleUsers());
}
-$count = count($entries);
-
-$title = sprintf(_("Manage Email User (%d Users)"), $count);
-
-// if there are more than 2000 entries, split in 26 categories for every letter,
-// or if more than 50, put in groups, or else just show all.
-if ( $count > 2000) {
- // ... TODO
- //$template = 'userlistalpha.tpl';
- $template = 'userlisterror.tpl';
- } else if( false && $count > 50 ) {
- // ... TODO
- $template = 'userlistgroup.tpl';
- } else {
- $template = 'userlistall.tpl';
- }
-
-
-/** Insert into template and output */
-$ADMIN->assign( 'errors', $errors );
-$ADMIN->assign( 'self_url', $_SERVER['PHP_SELF'] );
-$ADMIN->assign( 'alphagroup', $alphagroup );
-$ADMIN->assign( 'filterattrs', array( 'cn' => _('Name'),
- 'mail' => _('Email'),
- 'uid' => _('UID') ) );
-$ADMIN->assign( 'filtertypes', array( 'contains' => _('contains'),
- 'is' => _('is'),
- 'begins' => _('begins with'),
- 'ends' => _('ends with') ) );
-$ADMIN->assign( 'filterattr', $filterattr );
-$ADMIN->assign( 'filtertype', $filtertype );
-$ADMIN->assign( 'filtervalue', $filtervalue );
-
-$ADMIN->assign( 'sublist', $sublist );
-$ADMIN->assign( 'entries', $entries );
-$ADMIN->setContent($template);
+$ADMIN->setContent('userlistall.tpl');
$ADMIN->render();
/*
Index: user.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/admin/user/user.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- user.php 17 Aug 2007 08:51:26 -0000 1.1
+++ user.php 21 Aug 2007 17:15:52 -0000 1.2
@@ -1,15 +1,57 @@
<?php
-/*
- (c) 2004-2006 Klaraelvdalens Datakonsult AB
- (c) 2004 Martin Konold erfrakon <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.
-*/
+/*
+ * COPYRIGHT
+ * ---------
+ *
[...1178 lines suppressed...]
}
$smarty->assign( 'errors', array_merge((array)$errors,(array)$form->errors) );
-$smarty->assign( 'page_title', $menuitems[$sidx]['title'] );
-$smarty->assign( 'submenuitems',
- array_key_exists('submenu',
- $menuitems[$sidx])?$menuitems[$sidx]['submenu']:array() );
$smarty->assign( 'heading', $heading );
$smarty->assign( 'form', $content );
if( isset( $dn ) ) $smarty->assign( 'dn', $dn );
@@ -871,7 +711,7 @@
/*
Local variables:
mode: php
- indent-tabs-mode: t
+ indent-tabs-mode: f
tab-width: 4
buffer-file-coding-system: utf-8
End:
More information about the commits
mailing list