<?php
/***************************************************************************
- * Copyright (C) 2003-2004 Polytechnique.org *
+ * Copyright (C) 2003-2006 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
$menu = array();
$sub = array();
- $sub['accueil'] = 'index.php';
+ $sub['accueil'] = '';
$sub['liste des groupes'] = 'plan.php';
if (logged()) {
if (has_perms()) {
$sub = array();
$dim = $globals->asso('diminutif');
$sub['présentation'] = "$dim/asso.php";
- if (may_update() || $globals->asso('pub') == 'public')
+ if (may_update() || $globals->asso('pub') == 'public') {
$sub['annuaire du groupe'] = "$dim/annuaire.php";
+ if ($globals->xnet->geoloc)
+ $sub['carte'] = "$dim/geoloc.php";
+ }
if ($globals->asso('mail_domain')) {
$sub['listes de diffusion'] = "$dim/listes.php";
}
if (logged() && may_update()) {
$sub = array();
$sub['modifier l\'accueil'] = "$dim/edit.php";
+ if ($globals->wiki->wikidir && $globals->xnet->wiki)
+ $sub['wiki'] = "$dim/Accueil";
if ($globals->asso('mail_domain')) {
- $sub['syncrho annuaire'] = "$dim/annuaire-admin.php";
$sub['envoyer un mail'] = "$dim/mail.php";
$sub['créer une liste'] = "$dim/listes-create.php";
$sub['créer un alias'] = "$dim/alias-create.php";
// }}}
// {{{ function doAuth()
- function doAuth()
+ function doAuth($force = false)
{
$this->register_function('list_all_my_groups', 'list_all_my_groups');
$this->register_modifier('cat_pp', 'cat_pp');
$this->assign('it_is_xnet', true);
+ if (!logged() && $force) {
+ $_SESSION['session']->doLogin($this);
+ }
if (!logged() && Get::has('auth')) {
$_SESSION['session']->doAuthX($this);
}
}
// }}}
-// {{{ class XnetAuth
-
-/** Une classe pour les pages nécessitant l'authentification.
- * (equivalent de controlauthentification.inc.php)
- */
-class XnetAuth extends XnetPage
-{
- // {{{ function XnetAuth()
-
- function XnetAuth($tpl, $type=SKINNED)
- {
- $this->XnetPage($tpl, $type);
- }
-
- // }}}
- // {{{ function doAuth()
-
- function doAuth()
- {
- parent::doAuth();
- $_SESSION['session']->doAuth($this);
- }
-
- // }}}
-}
-
-// }}}
-// {{{ 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)
- {
- global $globals;
-
- $this->XnetAuth($tpl, $type);
- check_perms();
-
- $this->useMenu();
- if ($globals->asso('cat')) {
- $this->assign('asso', $globals->asso());
- $this->setType($globals->asso('cat'));
- }
- }
-
- // }}}
-}
-
-// }}}
-// {{{ class XnetGroupPage
-
-/** Une classe pour les pages réservées aux admins (authentifiés!).
- */
-class XnetGroupPage extends XnetAuth
-{
- // {{{ function XnetAdmin()
-
- function XnetGroupPage($tpl, $type=SKINNED)
- {
- global $globals;
-
- $this->XnetAuth($tpl, $type);
- if (!is_member() && !has_perms()) {
- $this->kill("You have not sufficient credentials");
- }
-
- $this->useMenu();
- $this->assign('asso', $globals->asso());
- $this->setType($globals->asso('cat'));
- }
-
- // }}}
-}
-
-// }}}
-// {{{ class XnetGroupAdmin
-
-/** Une classe pour les pages réservées aux admins (authentifiés!).
- */
-class XnetGroupAdmin extends XnetAuth
-{
- // {{{ function XnetAdmin()
-
- function XnetGroupAdmin($tpl, $type=SKINNED)
- {
- global $globals;
-
- $this->XnetAuth($tpl, $type);
- if (!may_update()) {
- $this->kill("You have not sufficient credentials");
- }
-
- $this->useMenu();
- $this->assign('asso', $globals->asso());
- $this->setType($globals->asso('cat'));
- }
-
- // }}}
-}
-
-// }}}
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
?>