diff options
author | Christian Pointner <equinox@ffgraz.net> | 2009-02-08 04:48:53 +0000 |
---|---|---|
committer | Christian Pointner <equinox@ffgraz.net> | 2009-02-08 04:48:53 +0000 |
commit | f6be9edd401664d95e60ae3c81aeaf36723ba891 (patch) | |
tree | 86f2127f51f0f16053c1b593c722cf0a5eeecba4 /data.php | |
parent | 0c420c393dba896e14972ecb5181904f1a1342a4 (diff) |
added login capability
Diffstat (limited to 'data.php')
-rw-r--r-- | data.php | 24 |
1 files changed, 7 insertions, 17 deletions
@@ -1,21 +1,5 @@ <?php
-/*
- * Copyright (C) 2006 Gaubatz Patrick <patrick@gaubatz.at>
- *
- * 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
- */
+session_start();
require_once("db.class.php");
require_once("ipmatch.php");
@@ -28,6 +12,12 @@ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); $db = new DB($conf['db']['user'], $conf['db']['password'], $conf['db']['host'], $conf['db']['database']);
$conf['acl']['auth'] = match_network($conf['acl']['range'],$_SERVER[REMOTE_ADDR]);
+if(!$conf['acl']['auth'] )
+{
+ if (isset($_SESSION['logged_in']) && $_SESSION['logged_in'])
+ $conf['acl']['auth'] = true;
+}
+
$x_startpoint = 4080;
$lng_startpoint = 15.43844103813;
$dx_dLng = 50675.5176;
|