git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-568
--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2004 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 *
+ * 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. *
+ * *
+ * 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., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
+ ***************************************************************************/
+
+require_once 'xnet.inc.php';
+if (!Env::has('liste')) header('Location: listes.php');
+$liste = strtolower(Env::get('liste'));
+
+new_skinned_page('listes/admin.tpl', AUTH_MDP);
+$page->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/admin.php');
+
+?>
--- /dev/null
+../../htdocs/images/retirer.gif
\ No newline at end of file
* 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/admin.tpl', AUTH_MDP);
-require_once('lists.inc.php');
+ new_skinned_page('listes/admin.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 (Env::has('add_member')) {
require_once('user.func.inc.php');
function XnetPage($tpl, $type=SKINNED)
{
$this->PlatalPage($tpl, $type);
- $this->register_function('list_all_my_groups', 'list_all_my_groups');
- if (Get::has('auth')) {
- $_SESSION['session']->doAuthX($this);
- }
}
// }}}
}
// }}}
+ // {{{ function doAuth()
+
+ function doAuth()
+ {
+ $this->register_function('list_all_my_groups', 'list_all_my_groups');
+ $this->assign('it_is_xnet', true);
+ if (Get::has('auth')) {
+ $_SESSION['session']->doAuthX($this);
+ }
+ }
}
// }}}
function doAuth()
{
- $this->register_function('list_all_my_groups', 'list_all_my_groups');
+ parent::doAuth();
$_SESSION['session']->doAuth($this);
}
<p>
Pour inscrire un utilisateur, il faut remplir les champs prévus à cet effet en saisissant
son identifiant, de la forme "prenom.nom", ou "prenom.nom.promo" en cas d'homonymie.
-L'icône <img src='{"images/retirer.gif"|url}' alt='retirer membre' title='retirer membre' /> permet de désinscrire de la liste quelqu'un
+L'icône <img src='{rel}/images/retirer.gif' alt='retirer membre' title='retirer membre' /> permet de désinscrire de la liste quelqu'un
qui y était abonné.
</p>
{else}
{$x.l}
{/if}
- <a href='?liste={$smarty.get.liste}&del_owner={$x.l}'><img src='{"images/retirer.gif"|url}' alt='retirer modérateur' title='retirer modérateur' /></a>
+ <a href='?liste={$smarty.get.liste}&del_owner={$x.l}'><img src='{rel}/images/retirer.gif' alt='retirer modérateur' title='retirer modérateur' /></a>
<br />
{/foreach}
</td>
{else}
{$x.l}
{/if}
- <a href='?liste={$smarty.get.liste}&del_member={$x.l}'><img src='{"images/retirer.gif"|url}' alt='retirer membre' title='retirer membre' /></a>
+ <a href='?liste={$smarty.get.liste}&del_member={$x.l}'><img src='{rel}/images/retirer.gif' alt='retirer membre' title='retirer membre' /></a>
<br />
{/foreach}
</td>
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************}
+{if $it_is_xnet}
+{assign var=index value="listes.php"}
+{assign var=prefix value="listes-"}
+{else}
+{assign var=index value="index.php"}
+{assign var=prefix value=""}
+{/if}
<table>
<tr>
<td colspan='2'>
- [<a href='{$ml_index|default:"index.php"}'>Voir toutes les listes</a>]
+ [<a href='{$index}'>Voir toutes les listes</a>]
</td>
</tr>
<tr>
<td><strong>Liste {$smarty.request.liste} :</strong></td>
<td>
{if $on neq members}
- [<a href='members.php?liste={$smarty.request.liste}'>liste des membres</a>]
+ [<a href='{$prefix}members.php?liste={$smarty.request.liste}'>liste des membres</a>]
{else}
[liste des membres]
{/if}
{if $on neq trombi}
- [<a href='trombi.php?liste={$smarty.request.liste}'>trombinoscope</a>]
+ [<a href='{$prefix}trombi.php?liste={$smarty.request.liste}'>trombinoscope</a>]
{else}
[trombinoscope]
{/if}
{if $on neq archives}
- [<a href='archives.php?liste={$smarty.request.liste}'>archives</a>]
+ [<a href='{$prefix}archives.php?liste={$smarty.request.liste}'>archives</a>]
{else}
[archives]
{/if}
<td><strong>Administrer la liste :</strong></td>
<td>
{if $on neq moderate}
- [<a href='moderate.php?liste={$smarty.get.liste}'>modération</a>]
+ [<a href='{$prefix}moderate.php?liste={$smarty.get.liste}'>modération</a>]
{else}
[modération]
{/if}
{if $on neq admin}
- [<a href='admin.php?liste={$smarty.get.liste}'>ajout/retrait de membres</a>]
+ [<a href='{$prefix}admin.php?liste={$smarty.get.liste}'>ajout/retrait de membres</a>]
{else}
[ajout/retrait de membres]
{/if}
{if $on neq options}
- [<a href='options.php?liste={$smarty.get.liste}'>options</a>]
+ [<a href='{$prefix}options.php?liste={$smarty.get.liste}'>options</a>]
{else}
[options]
{/if}
{if $on neq delete}
- [<a href='delete.php?liste={$smarty.get.liste}'>détruire</a>]
+ [<a href='{$prefix}delete.php?liste={$smarty.get.liste}'>détruire</a>]
{else}
[détruire liste]
{/if}
<td><strong>Administrer (avancé) :</strong></td>
<td>
{if $on neq soptions}
- [<a href='soptions.php?liste={$smarty.get.liste}'>options avancées</a>]
+ [<a href='{$prefix}soptions.php?liste={$smarty.get.liste}'>options avancées</a>]
{else}
[options avancées]
{/if}
{if $on neq check}
- [<a href='check.php?liste={$smarty.get.liste}'>vérifications</a>]
+ [<a href='{$prefix}check.php?liste={$smarty.get.liste}'>vérifications</a>]
{else}
[vérifications]
{/if}