From: Pierre Habouzit (MadCoder Date: Mon, 18 Apr 2005 13:11:04 +0000 (+0000) Subject: now learn what code sharing is ! X-Git-Tag: xorg/old~195 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=fc8357d33b279b9ea3fab022c517c2929de2f3d0;p=platal.git now learn what code sharing is ! git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-567 --- diff --git a/htdocs.net/groupe/listes-options.php b/htdocs.net/groupe/listes-options.php new file mode 100644 index 0000000..d1e4496 --- /dev/null +++ b/htdocs.net/groupe/listes-options.php @@ -0,0 +1,35 @@ +setType($globals->asso('cat')); +$page->useMenu(); +$page->assign('ml_index', 'listes.php'); + +require_once('lists.inc.php'); +$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain')); +require(dirname(dirname(dirname(__FILE__))).'/htdocs/listes/options.php'); + +?> diff --git a/htdocs/listes/options.php b/htdocs/listes/options.php index cae85f5..b58e4b4 100644 --- a/htdocs/listes/options.php +++ b/htdocs/listes/options.php @@ -19,14 +19,16 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ -require_once("xorg.inc.php"); -if (!Env::has('liste')) header('Location: index.php'); -$liste = strtolower(Env::get('liste')); +if (!$page) { + require_once("xorg.inc.php"); + if (!Env::has('liste')) header('Location: index.php'); + $liste = strtolower(Env::get('liste')); -new_skinned_page('listes/options.tpl', AUTH_MDP); -require_once('lists.inc.php'); + new_skinned_page('listes/options.tpl', AUTH_MDP); + require_once('lists.inc.php'); -$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password')); + $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password')); +} if (Post::has('submit')) { $values = $_POST; diff --git a/include/platal/page.inc.php b/include/platal/page.inc.php index 48cf158..0e54af0 100644 --- a/include/platal/page.inc.php +++ b/include/platal/page.inc.php @@ -23,7 +23,7 @@ require_once('diogenes/diogenes.core.page.inc.php'); require_once('platal/errors.inc.php'); require_once('platal/smarty.plugins.inc.php'); -// {{{ class XorgPage +// {{{ class PlatalPage class PlatalPage extends DiogenesCorePage { @@ -39,7 +39,7 @@ class PlatalPage extends DiogenesCorePage var $use_sub_dirs = false; // }}} - // {{{ function XorgPage() + // {{{ function PlatalPage() function PlatalPage($tpl, $type=SKINNED) { diff --git a/include/xnet/page.inc.php b/include/xnet/page.inc.php index 1ac7156..0d235dd 100644 --- a/include/xnet/page.inc.php +++ b/include/xnet/page.inc.php @@ -20,6 +20,7 @@ ***************************************************************************/ require_once('platal/page.inc.php'); +require_once('xnet/smarty.plugins.inc.php'); // {{{ class XnetPage @@ -29,13 +30,11 @@ class XnetPage extends PlatalPage function XnetPage($tpl, $type=SKINNED) { - global $globals; $this->PlatalPage($tpl, $type); + $this->register_function('list_all_my_groups', 'list_all_my_groups'); if (Get::has('auth')) { $_SESSION['session']->doAuthX($this); } - require_once('xnet/smarty.plugins.inc.php'); - $this->register_function('list_all_my_groups', 'list_all_my_groups'); } // }}} @@ -85,6 +84,7 @@ class XnetAuth extends XnetPage function doAuth() { + $this->register_function('list_all_my_groups', 'list_all_my_groups'); $_SESSION['session']->doAuth($this); } @@ -92,6 +92,24 @@ class XnetAuth extends XnetPage } // }}} +// {{{ class XnetAdmin + +/** Une classe pour les pages réservées aux admins (authentifiés!). + */ +class XnetAdmin extends XnetAuth +{ + // {{{ function XnetAdmin() + + function XnetAdmin($tpl, $type=SKINNED) + { + $this->XnetAuth($tpl, $type); + check_perms(); + } + + // }}} +} + +// }}} // vim:set et sw=4 sts=4 sws=4 foldmethod=marker: ?> diff --git a/templates/listes/header_listes.tpl b/templates/listes/header_listes.tpl index f8ca6d4..7d6a423 100644 --- a/templates/listes/header_listes.tpl +++ b/templates/listes/header_listes.tpl @@ -1,6 +1,6 @@ {*************************************************************************** * Copyright (C) 2003-2004 Polytechnique.org * - * http ://opensource.polytechnique.org/ * + * http://opensource.polytechnique.org/ * * * * 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 * @@ -22,7 +22,7 @@ diff --git a/templates/xnet/skin.tpl b/templates/xnet/skin.tpl index 947e71d..d4e41aa 100644 --- a/templates/xnet/skin.tpl +++ b/templates/xnet/skin.tpl @@ -67,11 +67,11 @@ {else}
- [Voir toutes les listes] + [Voir toutes les listes]
- LOGO Assos + LOGO Assos - LOGO X.Org - titre_du_site + LOGO X.Org + titre_du_site
----------