-
Account Upgraded | Title Enabled!
help me with rankings on web please
hello guys how can i run my rankings on web please help :) thanks
-
-
Developer
Re: help me with rankings on web please
create a ranking.php file and add this to your code:
<?php
$trimurity = $_GET['god'];
$tribe = $_GET['tribe'];
include('conec.php');
include('login.php');
global $link;
mssql_select_db("Tantra",$link);
$title = 'Tantra Online';
if ($tribe == 0){
$result = mssql_query("select Top 15 * FROM TantraBackup00 order by BrahmanPoint desc");
}
if ($tribe == 4){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Tribe = 4 order by BrahmanPoint desc");
}
if ($tribe == 8){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Tribe = 8 order by BrahmanPoint desc");
}
if ($tribe == 64){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Tribe = 64 order by BrahmanPoint desc");
}
if ($tribe == 128){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Tribe = 128 order by BrahmanPoint desc");
}
if ($tribe == 16){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Tribe = 16 order by BrahmanPoint desc");
}
if ($tribe == 32){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Tribe = 32 order by BrahmanPoint desc");
}
if ($tribe == 1){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Tribe = 1 order by BrahmanPoint desc");
}
if ($tribe == 2){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Tribe = 2 order by BrahmanPoint desc");
}
if (($trimurity == 1) && ($tribe == 0)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 1 order by BrahmanPoint desc");
}
if (($trimurity == 1) && ($tribe == 4)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 1 AND Tribe = 4 order by BrahmanPoint desc");
}
if (($trimurity == 1) && ($tribe == 8)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 1 AND Tribe = 8 order by BrahmanPoint desc");
}
if (($trimurity == 1) && ($tribe == 64)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 1 AND Tribe = 64 order by BrahmanPoint desc");
}
if (($trimurity == 1) && ($tribe == 128)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 1 AND Tribe = 128 order by BrahmanPoint desc");
}
if (($trimurity == 1) && ($tribe == 16)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 1 AND Tribe = 16 order by BrahmanPoint desc");
}
if (($trimurity == 1) && ($tribe == 32)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 1 AND Tribe = 32 order by BrahmanPoint desc");
}
if (($trimurity == 1) && ($tribe == 1)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 1 AND Tribe = 1 order by BrahmanPoint desc");
}
if (($trimurity == 1) && ($tribe == 2)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 1 AND Tribe = 2 order by BrahmanPoint desc");
}
if (($trimurity == 2) && ($tribe == 0)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 2 order by BrahmanPoint desc");
}
if (($trimurity == 2) && ($tribe == 4)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 2 AND Tribe = 4 order by BrahmanPoint desc");
}
if (($trimurity == 2) && ($tribe == 8)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 2 AND Tribe = 8 order by BrahmanPoint desc");
}
if (($trimurity == 2) && ($tribe == 64)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 2 AND Tribe = 64 order by BrahmanPoint desc");
}
if (($trimurity == 2) && ($tribe == 128)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 2 AND Tribe = 128 order by BrahmanPoint desc");
}
if (($trimurity == 2) && ($tribe == 16)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 2 AND Tribe = 16 order by BrahmanPoint desc");
}
if (($trimurity == 2) && ($tribe == 32)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 2 AND Tribe = 32 order by BrahmanPoint desc");
}
if (($trimurity == 2) && ($tribe == 1)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 2 AND Tribe = 1 order by BrahmanPoint desc");
}
if (($trimurity == 2) && ($tribe == 2)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 2 AND Tribe = 2 order by BrahmanPoint desc");
}
if (($trimurity == 4) && ($tribe == 0)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 4 order by BrahmanPoint desc");
}
if (($trimurity == 4) && ($tribe == 4)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 4 AND Tribe = 4 order by BrahmanPoint desc");
}
if (($trimurity == 4) && ($tribe == 8)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 4 AND Tribe = 8 order by BrahmanPoint desc");
}
if (($trimurity == 4) && ($tribe == 64)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 4 AND Tribe = 64 order by BrahmanPoint desc");
}
if (($trimurity == 4) && ($tribe == 128)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 4 AND Tribe = 128 order by BrahmanPoint desc");
}
if (($trimurity == 4) && ($tribe == 16)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 4 AND Tribe = 16 order by BrahmanPoint desc");
}
if (($trimurity == 4) && ($tribe == 32)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 4 AND Tribe = 32 order by BrahmanPoint desc");
}
if (($trimurity == 4) && ($tribe == 1)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 4 AND Tribe = 1 order by BrahmanPoint desc");
}
if (($trimurity == 4) && ($tribe == 2)){
$result = mssql_query("select Top 15 * FROM TantraBackup00 WHERE Trimurity = 4 AND Tribe = 2 order by BrahmanPoint desc");
}
$a=1;
while ($row = mssql_fetch_array($result))
{
$rank .= <<<RANKING
<TR>
<th scope="row" align="center">$row[CharacterName]</th>
<TD align="center" ><div>$row[BrahmanPoint]</div></TD>
<TD align="center" ><div>$row[GuildName]</div></TD>
<TD align="center" ><IMG src="imagenes/$row[God].gif" border=0></TD>
<TD align="center"><IMG src="imagenes/icon$row[Tribe].gif" border=0></TD>
</TR>
RANKING;
$a++;
}
include('ranking2.php');
?>
and this to ranking2.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ranking</title>
<link rel="stylesheet" type="text/css" href="mystyles/table.css">
<style type="text/css">
#arriba table, caption, tbody, tfoot, thead, tr, th, td{
border: 0;
}
#arriba td:hover{
background:#FFFFFF;
}
#arriba tr:hover{
background:#FFFFFF;
}
</style>
</head>
<body>
<div id="itsthetable">
<div id="arriba">
<table width="200" border="0" align="center">
<tr>
<td align="center"><img height=24 src="img/1.gif" /><br /><a href="ranking.php?god=1" >
Brahma</a></td>
<td align="center"><img height=24 src="img/4.gif" /><br /> <a href="ranking.php?god=4" >Shiva </a></td>
<td align="center"><img height=24 src="img/2.gif" /><br /><a href="ranking.php?god=2">
Vishnu</a></td>
</tr>
</table>
<table width="200" border="0" align="center">
<TR>
<TD align="center" ><IMG height=24 src="img/icon4.gif" ><BR>
<a href="ranking.php?god=<?php=$trimurity?>&tribe=4">Asura</a></TD>
<TD align="center" ><IMG height=24 src="img/icon8.gif" ><BR>
<a href="ranking.php?god=<?php=$trimurity?>&tribe=8" >Rakshasa</a></TD>
<TD align="center" ><IMG height=24 src="img/icon64.gif" ><br />
<a href="ranking.php?god=<?php=$trimurity?>&tribe=64" >
Deva</a></TD>
<TD align="center" ><IMG height=24 src="img/icon128.gif" ><br />
<a href="ranking.php?god=<?php=$trimurity?>&tribe=128" >Garuda</a></TD>
<TD align="center" ><IMG height=24 src="img/icon16.gif" ><br />
<a href="ranking.php?god=<?php=$trimurity?>&tribe=16" >Yaksa</a></TD>
<TD align="center" ><IMG height=24 src="img/icon32.gif" ><br />
<a href="ranking.php?god=<?php=$trimurity?>&tribe=32" >Gandharva</a></TD>
<TD align="center" ><IMG height=24 src="img/icon1.gif" ><br />
<a href="ranking.php?god=<?php=$trimurity?>&tribe=1" >Naga</a></TD>
<TD align="center" ><IMG height=24 src="img/icon2.gif" ><br />
<a href="ranking.php?god=<?php=$trimurity?>&tribe=2" >Kimnara</a></TD>
</TR>
</table>
</div>
<table width="403" align="center" summary="ranking">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">God Point</th>
<th scope="col">Ashram</th>
<th scope="col">God</th>
<th scope="col">Tribe</th>
</tr>
</thead>
<tfoot>
<tr>
<th colspan="5" scope="row">
</th>
</tr>
</tfoot>
<tbody>
<?php echo $rank?>
</tbody>
</table>
</div>
</body>
</html>
Have a nice day ^_^
Last edited by Terrified; 27-01-14 at 09:31 AM.
Reason: Put a php code...