$val) { if (!is_array($val)) { $in[$k][$key] = stripslashes($val); continue; } $in[]= &$in[$k][$key]; } } unset($in); } // // configuration file // require_once(dirname(__FILE__)."/../conf/mapbender.conf"); // // until we have decided how to implement a public user, // use this constant. In Geoportal.rlp.de it was used as ANONYMOUS_USER // if (!defined("PUBLIC_USER")) define("PUBLIC_USER", ""); if (!defined("LOAD_JQUERY_FROM_GOOGLE")) define("LOAD_JQUERY_FROM_GOOGLE", false); // // database wrapper // if(SYS_DBTYPE=="mysql") { require_once(dirname(__FILE__) . "/../lib/database-mysql.php"); } else { require_once(dirname(__FILE__) . "/../lib/database-pgsql.php"); } // // class for error handling // require_once(dirname(__FILE__)."/../http/classes/class_mb_exception.php"); // // I18n wrapper function, gettext // require_once(dirname(__FILE__) . "/../core/i18n.php"); require_once(dirname(__FILE__) . "/../http/classes/class_locale.php"); $localeObj = new Mb_locale(Mapbender::session()->get("mb_lang")); // // establish database connection // $con = db_connect($DBSERVER, $OWNER, $PW); db_select_db(DB, $con); // // Do not display PHP errors // ini_set("display_errors", "0"); // // AJAX wrapper // require_once(dirname(__FILE__)."/../lib/ajax.php"); // // get real ip address, can be improved, see // http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html // function getRealIpAddr() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet { $ip=$_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy { $ip=$_SERVER['HTTP_X_FORWARDED_FOR']; } else { $ip=$_SERVER['REMOTE_ADDR']; } return $ip; } ?>