gunnar: server/kolab-webadmin/admin/distributionlist index.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/distributionlist
In directory doto:/tmp/cvs-serv8206/distributionlist
Modified Files:
index.php
Log Message:
Intermediate commit while restructuring the kolab-webadmin.
Index: index.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/admin/distributionlist/index.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- index.php 17 Aug 2007 08:51:26 -0000 1.1
+++ index.php 21 Aug 2007 17:15:52 -0000 1.2
@@ -1,44 +1,61 @@
<?php
-/*
- * Copyright (c) 2004 Klarälvdalens Datakonsult AB
- * Copyright (c) 2003 Tassilo Erlewein <tassilo.erlewein at erfrakon.de>
- * Copyright (c) 2003 Martin Konold <martin.konold at erfrakon.de>
+/*
+ * COPYRIGHT
+ * ---------
*
- * Written by Steffen Hansen <steffen at klaralvdalens-datakonsult.se>
+ * See ../AUTHORS file
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2, or
+ *
+ * LICENSE
+ * -------
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * $Revision$
+ *
+ * ABOUT
+ * -----
+ *
+ * Display a list of distribution lists.
*
- * You can view the GNU General Public License, online, at the GNU
- * Project's homepage; see <http://www.gnu.org/licenses/gpl.html>.
*/
-require_once('Kolab/Webadmin/mysmarty.php');
-require_once('Kolab/Webadmin/headers.php');
-require_once('Kolab/Webadmin/locale.php');
-require_once('Kolab/Webadmin/authenticate.php');
+/** Our basic webadmin class. */
+require_once('Kolab/Webadmin/webadmin.class.php');
-$errors = array();
+/** Read our configuration. */
+require_once('../config.php');
-/**** Authentication etc. ***/
-$sidx = 'distlist';
+/** Initialize page */
+$ADMIN = new KolabWebadmin($params);
+$ADMIN->setSection('distlist');
-$group = $auth->group();
-if( $group != 'maintainer' && $group != 'admin' && $group != 'domain-maintainer' ) {
- array_push($errors, _("Error: You don't have Permissions to access this Menu") );
+/** Access logic */
+if(!$ADMIN->isMaintainer() &&
+ !$ADMIN->isAdmin() &&
+ !$ADMIN->isDomainMaintainer() ) {
+ $ADMIN->assign('errors',
+ array(_("Error: You don't have Permissions to access this Menu")));
+} else {
+ /** Extract data from LDAP */
+ $ADMIN->assign('entries', $ADMIN->getVisibleDistLists());
}
-require_once('Kolab/Webadmin/menu.php');
+$ADMIN->setContent('distlistall.tpl');
+$ADMIN->render();
-/**** Submenu for current page ***/
-$menuitems[$sidx]['selected'] = 'selected';
/**** Extract data from LDAP ***/
@@ -83,25 +100,10 @@
}
}
-
-/**** Insert into template and output ***/
-$smarty =& new MySmarty();
-$smarty->assign( 'errors', $errors );
-$smarty->assign( 'uid', $auth->uid() );
-$smarty->assign( 'group', $auth->group() );
-$smarty->assign( 'page_title', $menuitems[$sidx]['title'] );
-$smarty->assign( 'entries', $entries );
-$smarty->assign( 'menuitems', $menuitems );
-$smarty->assign( 'submenuitems',
- array_key_exists('submenu',
- $menuitems[$sidx])?$menuitems[$sidx]['submenu']:array() );
-$smarty->assign( 'maincontent', $template );
-$smarty->display('page.tpl');
-
/*
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