forked from cammytaylor/RuneScapeCommunityScript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
315 lines (268 loc) · 9.5 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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
<?php
require('includes/config.php');
require('structure/database.php');
require('structure/base.php');
require('structure/user.php');
$database = new database($db_host, $db_name, $db_user, $db_password);
$base = new base($database);
$user = new user($database);
//set some basic vars
$username = $user->getUsername($_COOKIE['user'], 2);
$rank = $user->getRank($username);
$user->updateLastActive();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns:IE>
<!-- LeeStrong Runescape Website Source --!>
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"><!-- /Added by HTTrack -->
<head>
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta name="MSSmartTagsPreventParsing" content="TRUE">
<title><?php echo $data['wb_title']; ?></title>
<link href="css/basic-3.css" rel="stylesheet" type="text/css" media="all">
<link href="css/main/title-5.css" rel="stylesheet" type="text/css" media="all">
<link rel="shortcut icon" href="img/favicon.ico" />
<?php include('includes/google_analytics.html'); ?>
</head>
<body>
<div id="body">
<div>
<div style="text-align: center; margin-bottom: 10px; position:relative;">
<img src="img/title2/rslogo3.gif" alt="RuneScape"><br>
<?php
$database->processQuery("SELECT * FROM `users`", array(), false);
echo 'There are currently '. number_format($database->getRowCount()) .' people registered!';
?>
</div>
</div>
<div class="left">
<fieldset class="menu rs">
<legend><?php echo $data['wb_abbr']; ?></legend>
<ul>
<?php
if($user->isLoggedIn())
{
?>
<li class="i-create"><a href="logout.php">Logout</a></li>
<li class="i-shop"><a href="donate.php">Donate</a></li>
<?php
}
else
{
?>
<li class="i-create"><a href="create/index.php">Create a free account (New user)</a></li>
<li class="i-play"><a href="login.php">Login with an existing account...</a></li>
<?php
}
?>
<li class="i-screen"><a href="screenshots.php">View daily Screenshot</a></li>
<li class="i-twitter"><a href="#">Twitter</a></li>
<li class="i-youtube"><a href="#">YouTube Channel</a></li>
</ul>
</fieldset>
<fieldset class="menu" style="background-image: url('img/title2/gamehelp.gif');">
<legend>Knowledge Base</legend>
<ul>
<li class="i-rules"><a href="kbase/rules.php">Rules</a></li>
<li class="i-bug"><a href="forums/">Report a bug/fault</a></li></ul>
</fieldset>
<fieldset class="menu poll">
<legend>Latest Poll</legend>
<?php
$poll = $database->processQuery("SELECT `poll_title`,`id` FROM `polls` ORDER BY `id` DESC LIMIT 1", array(), true);
echo stripslashes($poll[0]['poll_title']);
?>
<ul>
<li class="i-vote"><a href="polls/poll.php?id=<?php echo $poll[0]['id']; ?>">Vote in this poll</a></li>
<li class="i-polls"><a href="polls/index.php">Poll Home</a></li>
</ul>
</fieldset>
<fieldset class="menu web">
<legend>Website Features</legend>
<ul>
<li class="i-world"><a href="img/worldmap.jpg">World map</a></li>
<li class="i-score"><a href="highscores/index.php">Hiscores</a></li>
<li class="i-forum"><a href="forums/index.php">Forums</a></li>
<li class="i-story"><a href="stories/">Stories and Letters</a></li>
</ul>
</fieldset>
<?php
if($user->isLoggedIn())
{
if($rank > 3)
{
?>
<fieldset class="menu web">
<legend>Administration</legend>
<ul>
<li class="i-crown"><a href="admin/index.php">Administration</a></li>
<li class="i-crown"><a href="admin/recovery_requests.php">Recovery Apps</a></li>
</ul>
</fieldset>
<?php
}
if($rank > 1)
{
?>
<fieldset class="menu web">
<legend>Moderation</legend>
<ul>
<li class="i-pmod"><a href="mod/fmod/index.php">Moderation</a></li>
<li class="i-pmod"><a href="forums/viewforum.php?forum=49">View reports</a></li>
</ul>
</fieldset>
<?php
}
?>
<fieldset class="menu acc">
<legend>Account Management</legend>
<ul>
<li class="i-msg"><a href="msgcenter/">View Message Centre <?php if($user->hasMail($username) >= 1) echo '<b>('.$user->hasMail($username).')</b>' ?></a></li>
<li class="i-pw"><a href="change_password.php">Change your password</a></li>
<li class="i-recset"><a href="recovery/set_recov.php">Set new recovery questions</a></li>
<li class="i-appeal"><a href="offense.php">View Offenses</a></li>
</ul>
</fieldset>
<?php
}
?>
<fieldset class="menu pmod">
<legend><?php echo $data['wb_abbr']; ?> Moderators</legend>
<ul>
<li class="i-pmod"><a href="modcenter/index.php">Visit the moderation center</a></li>
<li class="i-pmod"><a href="modcenter/info.php">Learn about <?php echo $data['wb_abbr']; ?> moderators</a></li>
<li class="i-pmod"><a href="modcenter/current.php">View the <?php echo $data['wb_abbr']; ?> moderation team</a></li>
</ul>
</fieldset>
<fieldset class="menu rec">
<legend>Account Recovery</legend>
<ul>
<li class="i-rec"><a href="recovery/recover.php">Recover a lost password</a></li>
<li class="i-track"><a href="recovery/track.php">Track a recovery</a></li>
</ul>
</fieldset>
</div>
<div class="newscontainer">
<div class="buttons">
<a href="create/" class="button" id="button-left"><span class="lev1"></span><br style="line-height: 200%">Create a free account<br>(New user)</a>
<a href="<?php echo ($user->isLoggedIn()) ? ($play_url != '') ? $play_url : 'forums/' : 'login.php'; ?>" class="button" id="button-right"><span class="lev1"></span><br style="line-height: 200%">Play <?php echo $data['wb_abbrev']; ?><br>(Existing user)</a>
</div>
<img class="narrowscroll-top" src="img/scroll/scroll457_top.gif" alt="" width="466" height="50">
<div class="narrowscroll-bg">
<div class="narrowscroll-bgimg">
<div class="narrowscroll-content">
<dl class="news scroll">
<dt style="text-align: center;"><img src="img/title2/recent_news.gif" alt="Recent News"></dt>
<?php
//$query = mysql_query("SELECT id,icon,title,content,date FROM news ORDER BY id DESC LIMIT 4");
$news = $database->processQuery("SELECT `id`,`icon`,`title`,`content`,`date` FROM `news` ORDER BY `id` DESC LIMIT 4", array(), true);
if($database->getRowCount() < 1)
{
echo '<b>No news to display.</b>';
}
else
{
foreach($news as $news)
{
switch($news['icon'])
{
case 1:
$img = '<img src="img/news/behind_the-scenes_2.gif">';
break;
case 2:
$img = '<img src="img/news/fris_kingly_helm.gif">';
break;
case 3:
$img = '<img src="img/news/shop_2.gif">';
break;
case 4:
$img = '<img src="img/news/technical_3.gif">';
break;
case 5:
$img = '<img src="img/news/world.gif">';
break;
case 6:
$img = '<img src="img/news/green_cauldron.gif">';
break;
case 7:
$img = '<img src="img/news/goblin.gif">';
break;
case 8:
$img = '<img src="img/news/scroll.gif">';
break;
case 9:
$img = '<img src="img/news/mail.gif">';
break;
case 10:
$img = '<img src="img/news/bug_tracking_3.gif">';
break;
case 11:
$img = '<img src="img/news/cabbage.gif">';
break;
case 12:
$img = '<img src="img/news/coal.gif">';
break;
case 13:
$img = '<img src="img/news/demon.gif">';
break;
case 14:
$img = '<img src="img/news/macaroni_penguin.gif">';
break;
case 15:
$img = '<img src="img/news/gold.gif">';
break;
case 16:
$img = '<img src="img/news/high_priority.gif">';
break;
case 17:
$img = '<img src="img/news/santa.gif">';
break;
case 18:
$img = '<img src="img/news/scroll.gif">';
break;
case 19:
$img = '<img src="img/news/shifter.gif">';
break;
case 20:
$img = '<img src="img/news/squirrel.gif">';
break;
case 21:
$img = '<img src="img/news/pohousing.gif">';
break;
case 22:
$img = '<img src="img/news/presents.gif">';
break;
case 23:
$img = '<img src="img/news/clock.gif">';
break;
}
?>
<dt> </dt>
<dt><span class="newsdate">
<?php echo $news['date']; ?></span><?php echo htmlentities($news['title']); if($rank > 3) { ?> <a href="admin/edit_news.php?id=<?php echo $news['id']; ?>">[Edit]</a> <?php } ?></dt>
<dd>
<table width="100%"><tr>
<td style="text-align: justify; vertical-align: top;"><?php echo stripslashes($base->shorten($news['content'], 150, true)).'. . .'; ?></td>
<td style="padding-left: 1em; text-align: right; vertical-align: top;">
<?php echo $img; ?>
</td></tr></table>
<div style="margin-top: 0.5em;"><a href="news/viewarticle.php?id=<?php echo $news['id']; ?>">Read more...</a></div>
</dd>
<?php
}
}
?>
</dd> </dl>
<div class="right" style="margin-bottom: 0.5em"><a href="news/index.php">Browse the news archives</a></div>
</div>
</div>
</div>
<img class="narrowscroll-bottom" src="img/scroll/scroll457_bottom.gif" alt="" width="466" height="50">
</div>
<div class="tandc"><?php echo $data['wb_foot']; ?></div>
</div>
</body>
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"><!-- /Added by HTTrack -->
</html>