aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/index.php b/index.php
index 472ca8d15..3ac140699 100644
--- a/index.php
+++ b/index.php
@@ -7,6 +7,14 @@
* *
* $Id$
* *
+ ***************************************************************************
+
+/***************************************************************************
+ * *
+ * 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; *
+ * *
***************************************************************************/
define( PREFIX_INCLUDE, '' );
@@ -16,8 +24,12 @@ database_connection();
$query = 'SELECT access';
$query.= ' FROM '.PREFIX_TABLE.'config;';
$row = mysql_fetch_array( mysql_query( $query ) );
-if ( $row['access'] == 'restricted' ) $url = 'identification';
-else $url = 'category';
+if ( $row['access'] == 'restricted' )
+{
+ if ( isset( $_COOKIE['id'] ) ) $url = 'category';
+ else $url = 'identification';
+}
+else $url = 'category';
// redirection
$url.= '.php';
header( 'Request-URI: '.$url );