Elite Diviner
- Joined
- Dec 23, 2008
- Messages
- 425
- Reaction score
- 15
Guild ranking script made by me for Ragezone..
Say thanks if you want more releases by me..
This script shows a table of the top guilds in the server by level,
In addition it shows the guild leader.
@Enjoy
Say thanks if you want more releases by me..
This script shows a table of the top guilds in the server by level,
In addition it shows the guild leader.
@Enjoy
PHP:
<?php
//This script made by TheUnreal. Released for Ragezone. -->Say thanks!
//Connect the database
$connect = mssql_connect("localhost","sa","PASSWORD");
//Set the number of guilds to show below
$num = "5";
?>
<h1>Guild ranking - Top <?php echo $num;?> guilds</h1><hr /><br />
<?php
//Created by TheUnreal
echo '<div align="center"><table width="100%" border="1" bgcolor="#EEEEEE" style="text-align:center;">';
echo '<td width="5%" bgcolor="#FFFFFF"><b>Rank';
echo '<td width="25%" bgcolor="#FFFFFF"><b>Name';
echo '<td width="25%" bgcolor="#FFFFFF"><b>Level';
echo '<td width="25%" bbgcolor="#FFFFFF"><b>Leader';
echo'</tr>';
$rank=1;
mssql_select_db("CHARACTER_01_DBF");
$getguilds = mssql_query('SELECT TOP '.$num.' * FROM GUILD_TBL ORDER BY m_nLevel DESC');
while ($consulta = mssql_fetch_assoc($getguilds)) {
$guildid = $consulta['m_idGuild'];
$getleader = mssql_query('SELECT m_idPlayer FROM GUILD_MEMBER_TBL WHERE m_idGuild = "'.$guildid.'" AND m_nMemberLv = "0"');
while ($leaderid = mssql_fetch_assoc($getleader)) {
$uid = $leaderid['m_idPlayer'];
}
$getname = mssql_query('SELECT m_szName FROM CHARACTER_TBL WHERE m_idPlayer = "'.$uid.'"');
while ($leadername = mssql_fetch_assoc($getname)) {
$leader = $leadername['m_szName'];
}
echo '<tr><td bgcolor="#FFF0F0">'.$rank.'</td>';
echo '<td bgcolor="#FFF0F0"><a href="?page=viewguild&guild='.$consulta['m_szGuild'].'">'.$consulta['m_szGuild'].'</a></td>';
echo '<td bgcolor="#FFF0F0">'.$consulta['m_nLevel'].'</td>';
echo '<td bgcolor="#FFF0F0">'.$leader.'</td></tr>';
$rank++;
}
//Ragezone
?>
</table>
Last edited: