diff options
author | z0rglub <z0rglub@piwigo.org> | 2003-07-27 08:24:10 +0000 |
---|---|---|
committer | z0rglub <z0rglub@piwigo.org> | 2003-07-27 08:24:10 +0000 |
commit | 45a8139acdc9a175f8f8e1536d42fa36bc57ff4c (patch) | |
tree | df7b51fc1b5063cdbcd46856cd16d0dacc28acd7 /category.php | |
parent | 4e775187b8d054835b179ff136ccd5ad5393711f (diff) |
optional cookie identification
git-svn-id: http://piwigo.org/svn/trunk@45 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'category.php')
-rw-r--r-- | category.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/category.php b/category.php index 5fe713adc..c6cfe1f42 100644 --- a/category.php +++ b/category.php @@ -20,6 +20,17 @@ $t2 = explode( '.', $t1[0] ); $t2 = $t1[1].'.'.$t2[1]; //----------------------------------------------------------- personnal include include_once( './include/init.inc.php' ); +//---------------------------------------------------------------------- logout +if ( $_GET['act'] == 'logout' and isset( $_COOKIE['id'] ) ) +{ + // cookie deletion if exists + setcookie( 'id', '', 0, cookie_path() ); + $url = 'category.php'; + header( 'Request-URI: '.$url ); + header( 'Content-Location: '.$url ); + header( 'Location: '.$url ); + exit(); +} //-------------------------------------------------- access authorization check // creating the plain structure : array of all the available categories and // their relative informations, see the definition of the function @@ -150,7 +161,7 @@ if ( !$user['is_the_guest'] ) { // logout link $vtp->addSession( $handle, 'summary' ); - $vtp->setVar( $handle, 'summary.url', './category.php?cat='.$page['cat'] ); + $vtp->setVar( $handle, 'summary.url', './category.php?act=logout' ); $vtp->setVar( $handle, 'summary.title', '' ); $vtp->setVar( $handle, 'summary.name', replace_space( $lang['logout'] ) ); $vtp->closeSession( $handle, 'summary' ); |