From 1fe552411d990b619d5aba82050c69da19c26b17 Mon Sep 17 00:00:00 2001 From: x2001corpet Date: Thu, 25 Jan 2007 23:16:12 +0000 Subject: [PATCH] bandeau git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1394 839d8a87-29fc-0310-9880-83ba4fa771e5 --- htdocs/css/bandeau.css | 28 +++++++++++++++++ htdocs/xorg.php | 2 +- modules/bandeau.php | 55 ++++++++++++++++++++++++++++++++++ templates/skin/common.bandeau.head.tpl | 23 ++++++++++++++ templates/skin/common.bandeau.tpl | 31 +++++++++++++------ 5 files changed, 129 insertions(+), 10 deletions(-) create mode 100644 htdocs/css/bandeau.css create mode 100644 modules/bandeau.php diff --git a/htdocs/css/bandeau.css b/htdocs/css/bandeau.css new file mode 100644 index 0000000..5cfd3c0 --- /dev/null +++ b/htdocs/css/bandeau.css @@ -0,0 +1,28 @@ +/*************************************************************************** + * Copyright (C) 2003-2007 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 * + ***************************************************************************/ + +#bandeau-X a { vertical-align: middle; } +#bandeau-X a:link, #bandeau-X a:visited { text-decoration: none ; color: #505050; } +#bandeau-X a:hover { text-decoration: underline; color: black; } +#bandeau-X a:active { color: #CCCCCC ; background: #505050 ; } +body {margin:0px;} +#bandeau-X { +background:#CCCCCC;color:#505050;font-size:10px;font-family:Verdana, Arial, Helvetica, sans-serif;height:15px;border:none;padding:0;margin:0 } +#bandeau-X img { vertical-align:middle;border:0;padding:0;margin:0 } diff --git a/htdocs/xorg.php b/htdocs/xorg.php index 82f398b..fc0bb57 100644 --- a/htdocs/xorg.php +++ b/htdocs/xorg.php @@ -28,7 +28,7 @@ if (!($path = Env::v('n')) || ($path{0} < 'A' || $path{0} > 'Z')) { $platal = new Platal('auth', 'banana', 'carnet', 'email', 'events', 'geoloc', 'lists', 'marketing', 'payment', 'platal', 'profile', 'register', 'search', 'stats', 'admin', - 'newsletter', 'axletter'); + 'newsletter', 'axletter', 'bandeau'); $platal->run(); exit; diff --git a/modules/bandeau.php b/modules/bandeau.php new file mode 100644 index 0000000..94d0cbb --- /dev/null +++ b/modules/bandeau.php @@ -0,0 +1,55 @@ + $this->make_hook('icone',AUTH_PUBLIC), + 'bandeau' => $this->make_hook('html', AUTH_PUBLIC), + 'bandeau.css' => $this->make_hook('css', AUTH_PUBLIC), + ); + } + + function handler_icone(&$page) + { + header("Content-Type: image/png"); + readfile('../htdocs/images/x.png'); + exit(); + } + + function handler_html(&$page, $login = '') + { + $page->changeTpl('skin/common.bandeau.tpl', NO_SKIN); + $page->assign('login', $login); + } + + function handler_css(&$page) + { + header("Content-Type: text/css"); + readfile('../htdocs/css/bandeau.css'); + exit(); + } + +} + +?> diff --git a/templates/skin/common.bandeau.head.tpl b/templates/skin/common.bandeau.head.tpl index e69de29..e8a5a7e 100644 --- a/templates/skin/common.bandeau.head.tpl +++ b/templates/skin/common.bandeau.head.tpl @@ -0,0 +1,23 @@ +{**************************************************************************} +{* *} +{* Copyright (C) 2003-2007 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 *} +{* *} +{**************************************************************************} + + diff --git a/templates/skin/common.bandeau.tpl b/templates/skin/common.bandeau.tpl index afcfaec..b4cf84b 100644 --- a/templates/skin/common.bandeau.tpl +++ b/templates/skin/common.bandeau.tpl @@ -20,15 +20,28 @@ {* *} {**************************************************************************} + - - - - - -
-   L'École · Institutional site  ~~  FX · AX  ~~  Polytechnique.org · Associations polytechniciennes · Élèves · Manageurs -
- +{if !$login && $smarty.session.auth} + {assign var="login" value="true"} +{/if} + +
+ + L'École · + Institutional site + ˜˜ + FX · + AX + ˜˜ + Polytechnique.org · + Associations polytechniciennes · + Élèves · + Manageurs +
{* vim:set et sw=2 sts=2 sws=2: *} -- 2.1.4