[Openfirst-cvscommit] members logout.php,NONE,1.1 auth.php,1.11,1.12
Brought to you by:
xtimg
From: <xt...@us...> - 2003-06-02 20:01:39
|
Update of /cvsroot/openfirst/members In directory sc8-pr-cvs1:/tmp/cvs-serv28202 Modified Files: auth.php Added Files: logout.php Log Message: Add logout functionality to members area. --- NEW FILE: logout.php --- <?php /* * openFIRST.members - logout.php * * Copyright (C) 2003, * openFIRST Project * Original Author: Tim Ginn <tim...@po...> * * 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. * 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 * */ include("../config/globals.php"); include($header); if(isset($user->user)) { ?> <?php membersmenu($user->membertype); ?> <h1>Logged Out</h1> <?php $q = mysql_query("UPDATE ofirst_members SET authcode = NULL WHERE user='$user->user';"); echo(mysql_error()); session_start(); session_destroy(); ?> <p>You have been logged out of this web site.</p> <?php } else { echo("<h1>Cannot Logout</h1> <p>You must be logged in in order to log out.</p>"); showlogin(); } include($footer); ?> Index: auth.php =================================================================== RCS file: /cvsroot/openfirst/members/auth.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** auth.php 1 Jun 2003 17:33:35 -0000 1.11 --- auth.php 2 Jun 2003 20:01:36 -0000 1.12 *************** *** 53,57 **** } } ! echo("</p>"); return(0); } --- 53,57 ---- } } ! echo(" <a href='../members/logout.php'>Logout</a></p>"); return(0); } |