git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-126
--- /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 *
+ ***************************************************************************/
+
+// {{{ menu HOOK
+
+function emails_menu(&$return)
+{
+ global $globals;
+ $globals->menu->addPrivateEntry(XOM_CUSTOM, 00, 'Mes emails', 'emails.php');
+
+ if ($globals->mail->send_form) {
+ $globals->menu->addPrivateEntry(XOM_SERVICES, 00, 'Envoyer un mail', 'emails/send.php');
+ }
+
+ $globals->menu->addPrivateEntry(XOM_SERVICES, 40, 'Patte cassée', 'emails/broken.php');
+
+}
+
+// }}}
+
+?>
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-// {{{ function lists_subscribe()
+// {{{ menu HOOK
+
+function &lists_menu(&$result)
+{
+ global $globals;
+ $globals->menu->addPrivateEntry(XOM_SERVICES, 20, 'Listes de diffusion', 'listes/');
+}
+
+// }}}
+// {{{ subscribe HOOK
function &lists_subscribe($forlife, $uid, $promo, $password, &$result)
{
--- /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 *
+ ***************************************************************************/
+
+// {{{ menu HOOK
+
+function money_menu(&$result)
+{
+ global $globals;
+ if ($globals->money->mpay_enable) {
+ $globals->menu->addPrivateEntry(XOM_SERVICES, 30, 'Micropaiments', 'paiement/');
+ }
+}
+
+// }}}
+
+?>
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
-// {{{ function newsletter_subscirbe()
+// {{{ menu HOOK
+
+function &newsletter_menu(&$result)
+{
+ global $globals;
+ $globals->menu->addPrivateEntry(XOM_INFOS, 0, 'Lettres mensuelles', 'newsletter/');
+}
+
+// }}}
+// {{{ subscribe HOOK
function &newsletter_subscribe($forlife, $uid, $promo, $password, &$result)
{
--- /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 *
+ ***************************************************************************/
+
+// {{{ menu HOOK
+
+function search_menu(&$result)
+{
+ global $globals;
+ $globals->menu->addPrivateEntry(XOM_GROUPS, 00, 'Annuaire', 'search.php');
+ $globals->menu->addPublicEntry(XOM_EXT, 00, 'Annuaire de l\'X', 'search.php');
+}
+
+// }}}
+
+?>
--- /dev/null
+<?php
+
+function tmp_menu(&$result)
+{
+ global $globals;
+ $globals->menu->addPrivateEntry(XOM_NO, 10, 'Page d\'accueil', 'login.php');
+
+ $globals->menu->addPrivateEntry(XOM_CUSTOM, 10, 'Mon profil', 'profil.php');
+ $globals->menu->addPrivateEntry(XOM_CUSTOM, 20, 'Mes contacts', 'carnet/mescontacts.php');
+ $globals->menu->addPrivateEntry(XOM_CUSTOM, 30, 'Mon carnet', 'carnet/');
+ $globals->menu->addPrivateEntry(XOM_CUSTOM, 40, 'Mon mot de passe', 'motdepassemd5.php');
+ $globals->menu->addPrivateEntry(XOM_CUSTOM, 50, 'Mes préférences', 'preferences.php');
+
+ $globals->menu->addPrivateEntry(XOM_GROUPS, 10, 'Trombi promo', 'trombipromo.php');
+ $globals->menu->addPrivateEntry(XOM_GROUPS, 20, 'Conseil Pro.', 'referent.php');
+ $globals->menu->addPrivateEntry(XOM_GROUPS, 30, 'Groupes X', 'http://www.polytechnique.net/plan.php');
+ $globals->menu->addPrivateEntry(XOM_GROUPS, 40, 'Web Polytechnicien', 'http://www.polytechnique.net/');
+
+ $globals->menu->addPrivateEntry(XOM_INFOS, 10, 'Documentations', 'docs/');
+ $globals->menu->addPrivateEntry(XOM_INFOS, 20, 'Nous contacter', 'docs/contacts.php');
+ $globals->menu->addPrivateEntry(XOM_INFOS, 30, 'Emploi', 'http://www.manageurs.com/');
+
+ $globals->menu->addPrivateEntry(XOM_ADMIN, 00, 'Marketing', 'marketing/');
+ $globals->menu->addPrivateEntry(XOM_ADMIN, 10, 'Administration', 'admin/');
+ $globals->menu->addPrivateEntry(XOM_ADMIN, 20, 'Clear cache', 'clear_all_cache.php');
+
+ $globals->menu->addPublicEntry(XOM_US, 00, 'Me connecter !', 'login.php');
+ $globals->menu->addPublicEntry(XOM_US, 10, 'M\'inscrire', 'inscription/');
+ $globals->menu->addPublicEntry(XOM_US, 20, 'Pourquoi m\'inscrire ?', 'docs/services.php');
+
+ $globals->menu->addPublicEntry(XOM_EXT, 10, 'Associations X', 'http://www.polytechnique.net/');
+ $globals->menu->addPublicEntry(XOM_EXT, 20, 'Recrutement', 'http://www.manageurs.com/');
+
+ $globals->menu->addPublicEntry(XOM_INFOS, 00, 'A propos du site', 'docs/apropos.php');
+ $globals->menu->addPublicEntry(XOM_INFOS, 10, 'Nous contacter', 'docs/contacts.php');
+ $globals->menu->addPublicEntry(XOM_INFOS, 20, 'FAQ', 'docs/faq.php');
+}
+?>
+++ /dev/null
-<?php
-$this->addPrivateEntry(XOM_CUSTOM, 00, 'Mes emails', 'emails.php');
-
-if ($globals->mail->send_form) {
- $this->addPrivateEntry(XOM_SERVICES, 00, 'Envoyer un mail', 'emails/send.php');
-}
-
-$this->addPrivateEntry(XOM_SERVICES, 40, 'Patte cassée', 'emails/broken.php');
-?>
+++ /dev/null
-<?php
-$this->addPrivateEntry(XOM_SERVICES, 20, 'Listes de diffusion', 'listes/');
-?>
+++ /dev/null
-<?php
-if ($globals->money->mpay_enable) {
- $this->addPrivateEntry(XOM_SERVICES, 30, 'Micropaiments', 'paiement/');
-}
-?>
+++ /dev/null
-<?php
-$this->addPrivateEntry(XOM_INFOS, 00, 'Lettres mensuelles', 'newsletter/');
-?>
+++ /dev/null
-<?php
-
-$this->addPrivateEntry(XOM_GROUPS, 00, 'Annuaire', 'search.php');
-$this->addPublicEntry(XOM_EXT, 00, 'Annuaire de l\'X', 'search.php');
-
-?>
+++ /dev/null
-<?php
-$this->addPrivateEntry(XOM_NO, 10, 'Page d\'accueil', 'login.php');
-
-$this->addPrivateEntry(XOM_CUSTOM, 10, 'Mon profil', 'profil.php');
-$this->addPrivateEntry(XOM_CUSTOM, 20, 'Mes contacts', 'carnet/mescontacts.php');
-$this->addPrivateEntry(XOM_CUSTOM, 30, 'Mon carnet', 'carnet/');
-$this->addPrivateEntry(XOM_CUSTOM, 40, 'Mon mot de passe', 'motdepassemd5.php');
-$this->addPrivateEntry(XOM_CUSTOM, 50, 'Mes préférences', 'preferences.php');
-
-$this->addPrivateEntry(XOM_GROUPS, 10, 'Trombi promo', 'trombipromo.php');
-$this->addPrivateEntry(XOM_GROUPS, 20, 'Conseil Pro.', 'referent.php');
-$this->addPrivateEntry(XOM_GROUPS, 30, 'Groupes X', 'http://www.polytechnique.net/plan.php');
-$this->addPrivateEntry(XOM_GROUPS, 40, 'Web Polytechnicien', 'http://www.polytechnique.net/');
-
-$this->addPrivateEntry(XOM_INFOS, 10, 'Documentations', 'docs/');
-$this->addPrivateEntry(XOM_INFOS, 20, 'Nous contacter', 'docs/contacts.php');
-$this->addPrivateEntry(XOM_INFOS, 30, 'Emploi', 'http://www.manageurs.com/');
-
-$this->addPrivateEntry(XOM_ADMIN, 00, 'Marketing', 'marketing/');
-$this->addPrivateEntry(XOM_ADMIN, 10, 'Administration', 'admin/');
-$this->addPrivateEntry(XOM_ADMIN, 20, 'Clear cache', 'clear_all_cache.php');
-
-$this->addPublicEntry(XOM_US, 00, 'Me connecter !', 'login.php');
-$this->addPublicEntry(XOM_US, 10, 'M\'inscrire', 'inscription/');
-$this->addPublicEntry(XOM_US, 20, 'Pourquoi m\'inscrire ?', 'docs/services.php');
-
-$this->addPublicEntry(XOM_EXT, 10, 'Associations X', 'http://www.polytechnique.net/');
-$this->addPublicEntry(XOM_EXT, 20, 'Recrutement', 'http://www.manageurs.com/');
-
-$this->addPublicEntry(XOM_INFOS, 00, 'A propos du site', 'docs/apropos.php');
-$this->addPublicEntry(XOM_INFOS, 10, 'Nous contacter', 'docs/contacts.php');
-$this->addPublicEntry(XOM_INFOS, 20, 'FAQ', 'docs/faq.php');
-?>
}
$globals->hook = new XOrgHook();
- $globals->menu = new XOrgMenu($globals->root.'/include/conf.d/');
+ $globals->menu = new XOrgMenu();
$globals->hook->menu(null);
$globals->dbconnect();
// }}}
// {{{ constructor
- function XOrgMenu($path)
+ function XOrgMenu()
{
global $globals;
$this->_ext[XOM_US] = Array();
$this->_ext[XOM_EXT] = Array();
$this->_ext[XOM_INFOS] = Array();
-
- foreach (glob($path.'*.menu.inc.php') as $inc) {
- require_once($inc);
- }
}
// }}}