various fixes + deconnexion.php
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Mon, 18 Apr 2005 16:29:57 +0000 (16:29 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:28:40 +0000 (23:28 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-572

htdocs.net/deconnexion.php [new file with mode: 0644]
htdocs.net/groupes.php
include/xnet/session.inc.php
templates/xnet/deconnexion.tpl [new file with mode: 0644]

diff --git a/htdocs.net/deconnexion.php b/htdocs.net/deconnexion.php
new file mode 100644 (file)
index 0000000..9672536
--- /dev/null
@@ -0,0 +1,9 @@
+<?php
+    require 'xnet.inc.php';
+
+    XnetSession::destroy();
+
+    new_page('xnet/deconnexion.tpl', AUTH_PUBLIC);
+    $page->run();
+
+?>
index 7f44015..e2f73c4 100644 (file)
@@ -6,7 +6,7 @@
         exit;
     }
 
-    new_skinned_page('xnet/groupes.tpl', AUTH_PUBLIC);
+    new_page('xnet/groupes.tpl', AUTH_PUBLIC);
 
     $res = $globals->xdb->iterator("SELECT id,nom FROM groupex.dom WHERE FIND_IN_SET({?}, cat) ORDER BY nom", $cat);
     $page->assign('doms', $res);
index c1ff469..0e16fa3 100644 (file)
@@ -138,6 +138,7 @@ class XnetSession extends DiogenesCoreSession
 
 function may_update() {
     global $globals;
+    if (!$globals->asso('id')) { return false; }
     if (has_perms()) { return true; }
     $res = $globals->xdb->query(
             "SELECT  perms
@@ -151,6 +152,7 @@ function may_update() {
 
 function is_member() {
     global $globals;
+    if (!$globals->asso('id')) { return false; }
     $res = $globals->xdb->query(
             "SELECT  COUNT(*)
                FROM  groupex.membres
diff --git a/templates/xnet/deconnexion.tpl b/templates/xnet/deconnexion.tpl
new file mode 100644 (file)
index 0000000..7aaa6c6
--- /dev/null
@@ -0,0 +1,28 @@
+{***************************************************************************
+ *  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                *
+ ***************************************************************************}
+
+
+<div id="content">
+  Au revoir  !
+  <br />
+  Tu as bien été déconnecté du site Polytechnique.net.
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2: *}