forked from kamenitxan/raidplaner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
210 lines (181 loc) · 9.07 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<?php
define("LOCALE_MAIN", true);
define("STYLE_DEBUG", false);
define("SCRIPT_DEBUG", false);
require_once("lib/private/locale.php");
require_once("lib/private/tools_site.php");
require_once("lib/private/gameconfig.php");
$gSiteVersion = 103.0;
if ( !isset($_REQUEST["nocheck"]) )
include_once("oldbrowser.php");
if ( !file_exists("lib/config/config.php") || !checkVersion($gSiteVersion) )
{
include_once("runsetup.php");
die();
}
require_once("lib/private/userproxy.class.php");
require_once("lib/private/tools_site.php");
UserProxy::getInstance(); // Init user
loadSiteSettings();
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>Raidplaner</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta name="keywords" content="raidplaner, ppx"/>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="icon" href="favicon.png" type="image/png"/>
<?php
if (defined("STYLE_DEBUG") && STYLE_DEBUG)
include_once("lib/layout/_layout.css.php");
else
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"lib/layout/_layout.css.php?version=".$gSiteVersion."\"/>";
?>
<!--[if IE 9]>
<link rel="stylesheet" type="text/css" href="lib/layout/shadowIE.css?version=<?php echo $gSiteVersion; ?>"/>
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="lib/layout/tooltipIE.css?version=<?php echo $gSiteVersion; ?>"/>
<link rel="stylesheet" type="text/css" href="lib/layout/shadowIE.css?version=<?php echo $gSiteVersion; ?>"/>
<link rel="stylesheet" type="text/css" href="lib/layout/sheetIE.css?version=<?php echo $gSiteVersion; ?>"/>
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="lib/layout/tooltipIE.css?version=<?php echo $gSiteVersion; ?>"/>
<link rel="stylesheet" type="text/css" href="lib/layout/shadowIE.css?version=<?php echo $gSiteVersion; ?>"/>
<link rel="stylesheet" type="text/css" href="lib/layout/sheetIE.css?version=<?php echo $gSiteVersion; ?>"/>
<![endif]-->
<script type="text/javascript" src="lib/script/locale.js.php?version=<?php echo $gSiteVersion; ?>"></script>
<script type="text/javascript" src="lib/script/_session.js.php?version=<?php echo $gSiteVersion; ?>"></script>
<script type="text/javascript" src="lib/script/config.js.php?version=<?php echo $gSiteVersion; ?>"></script>
<?php
if (defined("SCRIPT_DEBUG") && SCRIPT_DEBUG)
{
include_once("lib/script/_scripts.js.php");
//echo "<script type=\"text/javascript\" src=\"lib/script/_scripts.js.php?version=".$gSiteVersion."&r=".((registeredUser()) ? 1 : 0)."\"></script>";
}
else
{
$Minified = (registeredUser()) ? "min.registered.js" : "min.login.js";
echo "<script type=\"text/javascript\" src=\"lib/script/".$Minified."?version=".$gSiteVersion."\"></script>";
}
?>
<?php
if ( isset($_REQUEST["user"]) &&
isset($_REQUEST["pass"]) &&
!registeredUser() )
{
echo "<script type=\"text/javascript\">gAfterInit = function() { notify(L(\"WrongPassword\")); };</script>";
}
?>
</head>
<body style="background: <?php echo $gSite["BGColor"] ?> <?php echo ($gSite["Background"] == "none") ? "none" : "url(images/background/".$gSite["Background"].")" ?> <?php echo $gSite["BGRepeat"] ?>">
<div id="appwindow"<?php if ($gSite["PortalMode"]) echo " class=\"portalmode\""; ?>>
<?php
if (strtolower($gSite["Banner"]) != "disable")
{
$BannerImage = (strtolower($gSite["Banner"]) != "none")
? "url(images/banner/".$gSite["Banner"].")"
: "none";
if ( $gSite["BannerLink"] == "" )
echo "<div id=\"logo\" style=\"background-image: ".$BannerImage."\"></div>";
else
echo "<a id=\"logo\" href=\"".$gSite["BannerLink"]."\" style=\"background-image: ".$BannerImage.")\"></a>";
}
?>
<div id="menu">
<?php if ( registeredUser() ) { ?>
<span class="logout">
<form id="logout" method="post" action="index.php">
<input type="hidden" name="nocheck"/>
<input type="hidden" name="logout"/>
<button onclick="return onLogOut()" class="button_logout"><?php echo L("Logout"); ?></button>
</form>
</span>
<?php if ($gSite["HelpLink"] != "") { ?>
<span id="help">
<button onclick="openLink('<?php echo $gSite["HelpLink"] ?>')" class="button_help"></button>
</span>
<?php } ?>
<span id="button_calendar" class="menu_button"><?php echo L("Calendar"); ?></span>
<span id="button_raid" class="menu_button"><?php echo L("Raid"); ?></span>
<span id="button_profile" class="menu_button"><?php echo L("Profile"); ?></span>
<?php if ( validAdmin() ) { ?>
<span id="button_settings_users" class="menu_button"><?php echo L("Settings"); ?></span>
<?php } ?>
<?php } else { ?>
<span id="button_login" class="menu_button"><?php echo L("Login"); ?></span>
<?php if ( ALLOW_REGISTRATION ) { ?>
<span id="button_register" class="menu_button"><?php echo L("Register"); ?></span>
<?php } ?>
<?php } ?>
</div>
<div id="body">
<?php
if ( !validUser() && registeredUser() )
{
echo "<div id=\"lockMessage\">";
echo L("AccountIsLocked")."<br/>";
echo L("ContactAdminToUnlock");
echo "</div>";
}
?>
</div>
<span id="version"><?php echo "version ".intVal($gSiteVersion / 100).".".intVal(($gSiteVersion % 100) / 10).".".intVal($gSiteVersion % 10).(($gSiteVersion - intval($gSiteVersion) > 0) ? chr(round(($gSiteVersion - intval($gSiteVersion)) * 10) + ord("a")-1) : ""); ?></span>
</div>
<div id="eventblocker"></div>
<div id="dialog"></div>
<div id="ajaxblocker">
<div class="background"></div>
<div class="notification ui-corner-all">
<img src="lib/layout/images/busy.gif"/><br/><br/>
<?php echo L("Busy"); ?>
</div>
</div>
<?php if ( registeredUser() ) { ?>
<table id="tooltip" cellspacing="0" border="0">
<tr class="top">
<td class="left"></td>
<td class="center" id="info_arrow_tl"></td>
<td class="center" id="info_arrow_tr"></td>
<td class="right"></td>
</tr>
<tr class="middle">
<td class="left" id="info_arrow_ml"></td>
<td class="center" colspan="2" rowspan="2" id="info_text"></td>
<td class="right"></td>
</tr>
<tr class="middle2">
<td class="left" id="info_arrow_ml2"></td>
<td class="right"></td>
</tr>
<tr class="bottom">
<td class="left"></td>
<td class="center" id="info_arrow_bl"></td>
<td class="center" id="info_arrow_br"></td>
<td class="right"></td>
</tr>
</table>
<table id="sheetoverlay" cellspacing="0" border="0">
<tr class="top">
<td class="left" id="closesheet"></td>
<td class="center"></td>
<td class="right"></td>
</tr>
<tr class="middle">
<td class="left"></td>
<td class="center" id="sheet_body"></td>
<td class="right"></td>
</tr>
<tr class="bottom">
<td class="left"></td>
<td class="center"></td>
<td class="right"></td>
</tr>
</table>
<?php } else { ?>
<div class="preload"><?php include("lib/private/resources.php"); ?></div>
<?php } ?>
</body>
</html>