-
Notifications
You must be signed in to change notification settings - Fork 2
/
guild.php
126 lines (114 loc) · 3.84 KB
/
guild.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
<?php
/*
Ceres Control Panel
This is a control pannel program for Athena and Freya
Copyright (C) 2005 by Beowulf and Nightroad
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
To contact any of the authors about special permissions send
an e-mail to cerescp@gmail.com
*/
session_start();
include_once 'config.php'; // loads config variables
include_once 'query.php'; // imports queries
include_once 'functions.php';
//if (!empty($_SESSION[$CONFIG_name.'account_id'])) {
// if ($_SESSION[$CONFIG_name.'account_id'] > 0) {
$query = sprintf(GUILD_LADDER);
$result = execute_query($query, "guild.php");
opentable($lang['GUILD_TOP50']);
echo "
<table width=\"550\">
<tr>
<td align=\"right\" class=\"head\">".$lang['POS']."</td>
<td align=\"center\" class=\"head\">".$lang['GUILD_EMBLEM']."</td>
<td> </td>
<td align=\"left\" class=\"head\">".$lang['GUILD_GNAME']."</td>
<td> </td>
<td> </td>
<td align=\"left\" class=\"head\">".$lang['GUILD_GLEVEL']."</td>
<td align=\"right\" class=\"head\">".$lang['GUILD_GEXPERIENCE']."</td>
<td> </td>
<td align=\"center\" class=\"head\">".$lang['GUILD_MEMBERS']."</td>
<td align=\"right\" class=\"head\">".$lang['GUILD_GAVLEVEL']."</td>
</tr>
";
for ($i = 1; $i < 51; $i++) {
if (!($line = $result->fetch_row()))
break;
$gname = $line[0];
$gname = htmlformat($line[0]);
$emblems[$line[4]] = $line[1];
$experience = moneyformat($line[3]);
echo "
<tr>
<td align=\"right\">$i</td>
<td align=\"center\"><img src=\"emblema.php?data=$line[4]\" alt=\"$gname\"></td>
<td> </td>
<td align=\"left\">$gname</td>
<td> </td>
<td> </td>
<td align=\"left\">$line[2]</td>
<td align=\"right\">$experience</td>
<td> </td>
<td align=\"center\">$line[6]</td>
<td align=\"right\">$line[5]</td>
</tr>";
}
echo "</table>";
closetable();
if (is_woe()) {
opentable($lang['WOE_TIME']);
closetable();
} else {
$query = sprintf(GUILD_CASTLE);
$result = execute_query($query, "guild.php");
opentable($lang['GUILD_GCASTLES']);
$castles = $_SESSION[$CONFIG_name.'castles'];
echo "
<table>
<tr>
<td align=\"center\" class=\"head\">".$lang['GUILD_EMBLEM']."</td>
<td> </td>
<td align=\"left\" class=\"head\">".$lang['GUILD_GNAME']."</td>
<td> </td>
<td> </td>
<td align=\"left\" class=\"head\">".$lang['GUILD_GCASTLE']."</td>
</tr>
";
for ($i = $i; $line = $result->fetch_row(); $i++) {
$gname = htmlformat($line[0]);
if (isset($castles[$line[2]]))
$cname = $castles[$line[2]];
else
continue;
$emblems[$line[3]] = $line[1];
echo "
<tr>
<td align=\"center\"><img src=\"emblema.php?data=$line[3]\" alt=\"$gname\"></td>
<td> </td>
<td align=\"left\">$gname</td>
<td> </td>
<td> </td>
<td align=\"left\">$cname</td>
</tr>";
}
echo "</table>";
closetable();
}
if (isset($emblems))
$_SESSION[$CONFIG_name.'emblems'] = $emblems;
// }
fim();
//}
//redir("index.php", "main_div", "You need to be logged to use this page.");
?>