gunnar: server/kolab-webadmin/admin/maintainer 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/maintainer
In directory doto:/tmp/cvs-serv8206/maintainer

Modified Files:
	index.php 
Log Message:
Intermediate commit while restructuring the kolab-webadmin.

Index: index.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/admin/maintainer/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,41 +1,59 @@
 <?php
-/*
- *  Copyright (c) 2004 Klarälvdalens Datakonsult AB
+/*  
+ *  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
+ *  -----
+ *
+ *  Generate a list of maintainers.
  *
- *  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 = 'maintainer';
+/** Initialize page */
+$ADMIN = new KolabWebadmin($params);
+$ADMIN->setSection('maintainer');
 
-if( $auth->group() != 'admin' ) {
-   array_push($errors, _("Error: You don't have Permissions to access this Menu"));
+/** Access logic */
+if(!$ADMIN->isAdmin()) {
+	$ADMIN->assign('errors', 
+				   array(_("Error: You don't have Permissions to access this Menu")));
+} else {
+	/** Extract data from LDAP */
+	$ADMIN->assign('entries', $ADMIN->getVisibleMaintainers());
 }
 
-require_once('Kolab/Webadmin/menu.php');
+$ADMIN->setContent('maintainerlistall.tpl');
+$ADMIN->render();
 
-/**** Submenu for current page ***/
-$menuitems[$sidx]['selected'] = 'selected';
 
 /**** Extract data from LDAP ***/
 
@@ -96,24 +114,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