1 |
<?php |
---|
2 |
|
---|
3 |
|
---|
4 |
|
---|
5 |
if(!defined("COMMON")) |
---|
6 |
define( "COMMON", str_replace("\\","/",dirname(__FILE__))."/../common/" ); |
---|
7 |
if(!defined("WEBCOMMON")) |
---|
8 |
define( "WEBCOMMON", dirname($_SERVER['PHP_SELF'])."/../common/" ); |
---|
9 |
|
---|
10 |
if (!defined("CONFIG_PATH")) |
---|
11 |
define("CONFIG_PATH", "../../config/"); |
---|
12 |
|
---|
13 |
include_once(COMMON."logger/logfile.php"); |
---|
14 |
include_once(COMMON."logger/logger.php"); |
---|
15 |
include_once(COMMON."logger/error_manager.php"); |
---|
16 |
|
---|
17 |
if (defined("LOAD_MAPSESSION")) |
---|
18 |
{ |
---|
19 |
|
---|
20 |
include_once(COMMON."wrapper/map_session.php" ); |
---|
21 |
} |
---|
22 |
|
---|
23 |
include_once(COMMON."session/session.php"); |
---|
24 |
|
---|
25 |
installSessionDirectoryHandler(); |
---|
26 |
$GLOBALS['bSessionOK'] = initializeSession("sid"); |
---|
27 |
if ($GLOBALS['bSessionOK']) |
---|
28 |
{ |
---|
29 |
|
---|
30 |
|
---|
31 |
if ( PHP_OS == "WINNT" || PHP_OS == "WIN32" ) |
---|
32 |
{ |
---|
33 |
if ( version_compare( phpversion(), "4.2.1" ) < 0 ) |
---|
34 |
{ |
---|
35 |
$_SESSION = &$HTTP_SESSION_VARS; |
---|
36 |
} |
---|
37 |
} |
---|
38 |
|
---|
39 |
|
---|
40 |
|
---|
41 |
|
---|
42 |
|
---|
43 |
|
---|
44 |
|
---|
45 |
|
---|
46 |
|
---|
47 |
|
---|
48 |
|
---|
49 |
|
---|
50 |
|
---|
51 |
if (!isset($_SESSION["gErrorManager"])) |
---|
52 |
{ |
---|
53 |
$_SESSION['gErrorManager'] = new ErrorManager($_SESSION['gbLogError']); |
---|
54 |
} |
---|
55 |
|
---|
56 |
if (defined("LOAD_MAPSESSION")) |
---|
57 |
{ |
---|
58 |
|
---|
59 |
if (!extension_loaded("MapScript")) dl($_SESSION['gszMapscriptModule']); |
---|
60 |
|
---|
61 |
|
---|
62 |
if ($_SESSION['gnMapSessionMode'] == "1") |
---|
63 |
{ |
---|
64 |
$oMapSession = new MapSession_RW; |
---|
65 |
} |
---|
66 |
else |
---|
67 |
{ |
---|
68 |
$oMapSession = new MapSession_R; |
---|
69 |
} |
---|
70 |
|
---|
71 |
|
---|
72 |
$oMapSession->setLogFile( $gLogFile ); |
---|
73 |
$oMapSession->setErrorManager( $_SESSION["gErrorManager"] ); |
---|
74 |
|
---|
75 |
|
---|
76 |
$oMapSession->setTempDir( $_SESSION['gszTmpPath'] ); |
---|
77 |
|
---|
78 |
|
---|
79 |
|
---|
80 |
|
---|
81 |
|
---|
82 |
$oMapSession->restoreState( $_SESSION["gszCurrentState"], $_SESSION['gszMapName'],dirname( $_SESSION['gszMapName'] ) ); |
---|
83 |
} |
---|
84 |
|
---|
85 |
$http_form_vars = (count($_POST) > 0) ? |
---|
86 |
$_POST : ((count($_GET) > 0) ? $_GET : array() ); |
---|
87 |
|
---|
88 |
|
---|
89 |
|
---|
90 |
|
---|
91 |
|
---|
92 |
|
---|
93 |
if ( !defined("ERROR_CRITICAL") ) |
---|
94 |
{ |
---|
95 |
|
---|
96 |
define("ERROR_CRITICAL", 2); |
---|
97 |
} |
---|
98 |
|
---|
99 |
|
---|
100 |
include_once( COMMON."mlt/mlt.php" ); |
---|
101 |
|
---|
102 |
|
---|
103 |
$oMLT = new MLTdBase( $_SESSION['gszCurrentLanguage'] ); |
---|
104 |
$oMLT->setLogFile( $gLogFile ); |
---|
105 |
$oMLT->setErrorManager( $_SESSION["gErrorManager"] ); |
---|
106 |
|
---|
107 |
|
---|
108 |
$oCommonMLT = new MLTdBase( $_SESSION['gszCurrentLanguage'] ); |
---|
109 |
|
---|
110 |
$oCommonMLT->setLogFile( $gLogFile ); |
---|
111 |
$oCommonMLT->setErrorManager( $_SESSION["gErrorManager"] ); |
---|
112 |
|
---|
113 |
|
---|
114 |
if (isset( $GLOBALS["szLanguageResource"] )) |
---|
115 |
{ |
---|
116 |
$oMLT->loadResource( $GLOBALS["szLanguageResource"], $_SESSION['aszLang'] ); |
---|
117 |
} |
---|
118 |
|
---|
119 |
|
---|
120 |
$oCommonMLT->loadResource( str_replace("\\", "/", $_SESSION['gszCorePath']). |
---|
121 |
"/common.dbf", $_SESSION['aszLang'] ); |
---|
122 |
|
---|
123 |
if (isset($_SESSION['gszCSSFile'])) |
---|
124 |
{ |
---|
125 |
$szCSSFile = $_SESSION['gszCSSFile']; |
---|
126 |
} |
---|
127 |
else |
---|
128 |
{ |
---|
129 |
$szCSSFile = $_SESSION['gszCoreWebPath']."/skins/default/css/popup.css"; |
---|
130 |
} |
---|
131 |
} |
---|
132 |
else if (!isset($GLOBALS['bInvalidSessionDontFail'])) |
---|
133 |
{ |
---|
134 |
?> |
---|
135 |
<html><head> |
---|
136 |
<title>Invalid Session</title> |
---|
137 |
</head> |
---|
138 |
<body>Your session is invalid or has expired.</body> |
---|
139 |
</html> |
---|
140 |
<?php |
---|
141 |
exit; |
---|
142 |
} |
---|
143 |
?> |
---|
144 |
|
---|