|
| |
1 |
|
<?php |
|
| |
2 |
|
if(!strlen($pathtoroot)) |
|
| |
3 |
|
{ |
|
| |
4 |
|
$path=dirname(realpath(__FILE__)); |
|
| |
5 |
|
if(strlen($path)) |
|
| |
6 |
|
{ |
|
| |
7 |
|
|
|
| |
8 |
|
$pos = strpos($path,":"); |
|
| |
9 |
|
if ($pos === false) |
|
| |
10 |
|
{ |
|
| |
11 |
|
$gOS_TYPE="unix"; |
|
| |
12 |
|
$pathchar = "/"; |
|
| |
13 |
|
} |
|
| |
14 |
|
else |
|
| |
15 |
|
{ |
|
| |
16 |
|
$gOS_TYPE="win"; |
|
| |
17 |
|
$pathchar="\\"; |
|
| |
18 |
|
} |
|
| |
19 |
|
$p = $path.$pathchar; |
|
| |
20 |
|
|
|
| |
21 |
|
while(!strlen($pathtoroot) && strlen($p)) |
|
| |
22 |
|
{ |
|
| |
23 |
|
$sub = substr($p,strlen($pathchar)*-1); |
|
| |
24 |
|
if($sub==$pathchar) |
|
| |
25 |
|
{ |
|
| |
26 |
|
$filename = $p."root.flg"; |
|
| |
27 |
|
} |
|
| |
28 |
|
else |
|
| |
29 |
|
$filename = $p.$pathchar."root.flg"; |
|
| |
30 |
|
if(file_exists($filename)) |
|
| |
31 |
|
{ |
|
| |
32 |
|
$pathtoroot = $p; |
|
| |
33 |
|
} |
|
| |
34 |
|
else |
|
| |
35 |
|
{ |
|
| |
36 |
|
$parent = realpath($p.$pathchar."..".$pathchar); |
|
| |
37 |
|
if($parent!=$p) |
|
| |
38 |
|
{ |
|
| |
39 |
|
$p = $parent; |
|
| |
40 |
|
} |
|
| |
41 |
|
else |
|
| |
42 |
|
$p = ""; |
|
| |
43 |
|
} |
|
| |
44 |
|
} |
|
| |
45 |
|
if(!strlen($pathtoroot)) |
|
| |
46 |
|
$pathtoroot = ".".$pathchar; |
|
| |
47 |
|
} |
|
| |
48 |
|
else |
|
| |
49 |
|
{ |
|
| |
50 |
|
$pathtoroot = ".".$pathchar; |
|
| |
51 |
|
} |
|
| |
52 |
|
} |
|
| |
53 |
|
|
|
| |
54 |
|
$sub = substr($pathtoroot,strlen($pathchar)*-1); |
|
| |
55 |
|
if($sub!=$pathchar) |
|
| |
56 |
|
{ |
|
| |
57 |
|
$pathtoroot = $pathtoroot.$pathchar; |
|
| |
58 |
|
} |
|
| |
59 |
|
|
|
| |
60 |
|
|
|
| |
61 |
|
require_once($pathtoroot."kernel/startup.php"); |
|
| |
62 |
|
|
|
| |
63 |
|
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path"); |
|
| |
64 |
|
|
|
| |
65 |
|
$localURL=$rootURL."kernel/"; |
|
| |
66 |
|
|
|
| |
67 |
|
$admin = $objConfig->Get("AdminDirectory"); |
|
| |
68 |
|
if(!strlen($admin)) |
|
| |
69 |
|
$admin = "admin"; |
|
| |
70 |
|
$adminURL = $rootURL.$admin; |
|
| |
71 |
|
$imagesURL = $adminURL."/images"; |
|
| |
72 |
|
$pathtolocal = $pathtoroot; |
|
| |
73 |
|
|
|
| |
74 |
|
|
|
| |
75 |
|
|
|
| |
76 |
|
|
|
| |
77 |
|
|
|
| |
78 |
|
|
|
| |
79 |
|
$userid= $objSession->Get("PortalUserId"); |
|
| |
80 |
|
if($userid!=-1) |
|
| |
81 |
|
{ |
|
| |
82 |
|
$userobj=$objUsers->GetItem($userid); |
|
| |
83 |
|
$loginname= $userobj->Get("Login"); |
|
| |
84 |
|
} |
|
| |
85 |
|
else |
|
| |
86 |
|
$loginname = "root"; |
|
| |
87 |
|
|
|
| |
88 |
|
$logout = $rootURL."admin/"; |
|
| |
89 |
|
$mainpage = $rootURL."admin/subitems.php?"."env=".BuildEnv()."§ion=in-portal:root"; |
|
| |
90 |
|
$objLang = $objLanguages->GetItem($m_var_list["lang"]); |
|
| |
91 |
|
|
|
| |
92 |
|
?> |
|
| |
93 |
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> |
|
| |
94 |
|
<html> |
|
| |
95 |
|
<head> |
|
| |
96 |
|
<title>HEAD</title> |
|
| |
97 |
|
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> |
|
| |
98 |
|
<meta name="generator" content="Notepad"> |
|
| |
99 |
|
<link rel="stylesheet" type="text/css" href="include/style.css"> |
|
| |
100 |
|
</head> |
|
| |
101 |
|
<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" bgcolor="#FFFFFF"> |
|
| |
102 |
|
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%"> |
|
| |
103 |
|
<tr> |
|
| |
104 |
|
<td valign="bottom"> |
|
| |
105 |
|
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="90"> |
|
| |
106 |
|
<tr> |
|
| |
107 |
|
<td rowspan="3" valign="top"><a href="<?php echo $mainpage; ?>" target="main"><img alt="In-portal" src="images/globe.gif" width="84" height="91" border="0"></a></td> |
|
| |
108 |
|
<td rowspan="3" valign="top"><a href="<?php echo $mainpage; ?>" target="main"><img alt="In-portal" src="images/logo.gif" width="150" height="91" border="0"></a></td> |
|
| |
109 |
|
<td rowspan="3" width="100000" align="right"> </td> |
|
| |
110 |
|
<td width="400"><img alt="" src="images/blocks.gif" width="400" height="73"></td> |
|
| |
111 |
|
</tr> |
|
| |
112 |
|
<tr> |
|
| |
113 |
|
<td align="right" background="images/version_bg.gif" class="head_version" valign="bottom"><img alt="" src="images/spacer.gif" width="1" height="10" align="absmiddle"> |
|
| |
114 |
|
|
|
| |
115 |
|
<?php echo prompt_language("la_Logged_in_as")." "; ?><B><?php echo $loginname." "; ?></B> |
|
| |
116 |
|
<a href="<?php echo $logout."login.php?logout=1"; ?>" target="_parent"><img src="images/blue_bar_logout.gif" height="16" WIDTH="16" align="absmiddle" BORDER="0"></A></td> |
|
| |
117 |
|
</tr> |
|
| |
118 |
|
<tr> |
|
| |
119 |
|
<td><img alt="" src="images/blocks2.gif" width="400" height="1"></td> |
|
| |
120 |
|
</tr> <tr> |
|
| |
121 |
|
<td bgcolor="black" colspan="4"><img alt="" src="images/spacer.gif" width="1" height="1"></td> |
|
| |
122 |
|
</tr> |
|
| |
123 |
|
</table> |
|
| |
124 |
|
</td> |
|
| |
125 |
|
</tr> |
|
| |
126 |
|
</table> |
|
| |
127 |
|
|
|
| |
128 |
|
</body> |
|
| |
129 |
|
</html> |