From f6be9edd401664d95e60ae3c81aeaf36723ba891 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 8 Feb 2009 04:48:53 +0000 Subject: added login capability --- data.php | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) (limited to 'data.php') diff --git a/data.php b/data.php index 284e65e..adcdbfa 100644 --- a/data.php +++ b/data.php @@ -1,21 +1,5 @@ - * - * 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; -- cgit v1.2.1