forked from FlippAcademy/StarGamesControlPanel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
guild_rank.php
executable file
·101 lines (100 loc) · 3.26 KB
/
guild_rank.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
<!--
// =========================================================================
// ______
// / __/ /____ ________ ____ ___ _ ___ ___
// _\ \/ __/ _ `/ __/ _ `/ _ `/ ' \/ -_|_-<
// /___/\__/\_,_/_/ \_, /\_,_/_/_/_/\__/___/
// _____ /___/ __ ___ __
// / ___/__ ___ / /________ / / / _ \___ ____ ___ / /
// / /__/ _ \/ _ \/ __/ __/ _ \/ / / ___/ _ `/ _ \/ -_) /
// \___/\___/_//_/\__/_/ \___/_/ /_/ \_,_/_//_/\__/_/
// =========================================================================
// Copyright (c) Stargames Control Panel - Licensed under GNU GPL.
// See LICENSE File
// =========================================================================
// Project Lead by: Mysterious
// =========================================================================
-->
<?php
if(!$SERVER['system_safe']) exit();
if ($STORED_loginname && $STORED_loginpass && !empty($guild_rank_menu)) {
if(!isset($GET_st)) $GET_st = 0;
$GET_st = (int)$GET_st;
$page=get_page($GET_st,$CONFIG_guild_per_page);
$query = "SELECT COUNT(*) FROM $CONFIG_sql_dbname.guild";
$sql->result = $sql->execute_query($query,'guild_rank.php');$sql->total_query++;
$total = $sql->result();
$query = "SELECT name,master,guild_id,emblem_data,guild_lv,average_lv FROM $CONFIG_sql_dbname.guild ORDER by guild_lv DESC LIMIT ".mysql_res($GET_st).",".mysql_res($CONFIG_guild_per_page)."";
$sql->result = $sql->execute_query($query,'guild_rank.php');$sql->total_query++;
echo "<TABLE width=\"95%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">
<TBODY>
<TR>
<TD align=\"right\">
";
get_selectpage($total,$CONFIG_guild_per_page,$page,"index.php?act=g_rank");
echo "
</TD>
</TR>
</TBODY>
</TABLE>
<BR>
";
opmain_body("Guild Ranking");
echo "<TABLE width=\"100%\" cellspacing=\"1\" cellpadding=\"1\" align=\"center\">
<TBODY>
<TR align=\"center\" class=\"topic_title3\" style=\"font-weight: bold;\">
<TD>No.</TD>
<TD>Guild</TD>
<TD>Guild Master</TD>
<TD>Guild Level</TD>
<TD>Average Level</TD>
<TD>Emblem</TD>
</TR>
";
if ($sql->count_rows()) {
$countstanding=0;
$i=($page-1)*$CONFIG_guild_per_page;
while ($grow = $sql->fetch_row()) {
$i++;
$countstanding=1;
$guild_name = htmlspecialchars($grow['name']);
$g_master_name = htmlspecialchars($grow['master']);
$guild_id=$grow[guild_id];
$emblems[$guild_id]=$grow[emblem_data];
echo " <TR align=\"center\" class=\"topic_title4\">
<TD>$i</TD>
<TD><a href=\"index.php?act=guildinfo&guild_id=$guild_id\">$guild_name</a></TD>
<TD>$g_master_name</TD>
<TD>$grow[guild_lv]</TD>
<TD>$grow[average_lv]</TD>
<TD><img src=\"emblem.php?data=$guild_id\" alt=\"$guild_name\"></TD>
</TR>
";
}
if (isset($emblems)) {
session_register(emblems);
$_SESSION['emblems'] = $emblems;
}
} else {
$countstanding=1;
echo " <TR align=\"center\" class=\"topic_title4\">
<TD colspan=\"6\">
$lang[GuildR_nf]
</TD>
</TR>
";
}
if(!$countstanding) {
echo " <TR align=\"center\" class=\"topic_title4\">
<TD colspan=\"6\">
$lang[GuildR_nf]
</TD>
</TR>
";
}
echo " </TBODY>
</TABLE>
";
clmain_body();
}
?>