BGames
Olá visitante! Seja bem vindo á BGames!

Para ter total acesso ao nosso fórum é preciso que você se registre.

Registre-se Aqui!


PARA VER LINKS E IMAGENS É PRECISO SE REGISTRAR!


BGames
Olá visitante! Seja bem vindo á BGames!

Para ter total acesso ao nosso fórum é preciso que você se registre.

Registre-se Aqui!


PARA VER LINKS E IMAGENS É PRECISO SE REGISTRAR!

BGames
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

BGamesEntrar

Fórum de Desenvolvimento de Jogos e Programação


description[+] Script Básico: Ranking Kill + Ranking Arena Empty[+] Script Básico: Ranking Kill + Ranking Arena

more_horiz
Ranking Kill + Arena - Script Básico

....................................................................................................................
SALVE COMO: CONFIG.PHP[/center]

Código:

<?php
$port = "SEU PORT";
$host = "localhost";
$user = "USUÁRIO DO MYSQL";
$pass = "SENHA DO MYSQL";
$characters = "NOME DA DB DE CHARACTERS";
$auth = "auth";
$cod = 'utf8';
?>

....................................................................................................................

Página para Ranking Kill

Código:

<html>
<head>
<title>Ranking Kill - 100</title>
<style>
body
{
color: ORANGE;
font: 10pt Lucida Fax, verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
margin: 0px 0px 0px 0px;
padding: 0px;
text-align: center;
}
a:link
{
color: orange;
text-decoration: none;
}
a:visited
{
color: orange;
text-decoration: none;
}
a:hover, a:active
{
color: yellow;
text-decoration: none;
}
</style>
</head>
<body bgcolor="black">
<?php

include ("config.php");

$connect = mysql_connect($host,$user,$pass) OR DIE("'Can't connect with $host");
mysql_select_db($characters,$connect) or die(mysql_error());

$result = mysql_query("SELECT * FROM `characters` ORDER BY `totalKills` DESC LIMIT 0 , 100 ");

?>
<font color="black">
<table align=center cellpadding="0" cellspacing="0" border="0" width=100%>
<thead>
<td width="4%"><center><font color="white">Nº</font></center></td>
<td width="16%"><center><font color="white">Nome do Personagem</font></center></td>
<td width="4%"><center><font color="white">Kills</font></center></td><td width="4%"><center><font color="white">Level</font></center></td>
</thead>
<tbody>

<?php

while($rows = mysql_fetch_object($result))
{
$i++;
$name = $rows->name;
$Total_Kills = $rows->totalKills;
$level = $rows->level;

echo "
<tr>
<td><center>",$i,"</center></td>
<td><b>",$name,"</b></td>
<td><center>",$Total_Kills,"</center></td>
<td><center>",$level,"</center></td>

</tr>";
}

?>
</body>

....................................................................................................................

Página de Top Arena - OBS: Pode não funcionar perfeitamente em algumas Databases. (:

Código:

<html>
<head>
<title>Top Arena</title>
<style>
body
{
color: WHITE;
font: 10pt Lucida Fax, verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
margin: 0px 0px 0px 0px;
padding: 0px;
text-align: center;
}
a:link
{
color: orange;
text-decoration: none;
}
a:visited
{
color: orange;
text-decoration: none;
}
a:hover, a:active
{
color: yellow;
text-decoration: none;
}
</style>
</head>
<body bgcolor="black">

<?
include ("config.php");

$j=1;
$teamType = array(
'2' => '2x2',
'3' => '3x3',
'5' => '5x5'
);

$connect = mysql_connect($host,$user,$pass) OR DIE("'Can't connect with $host");
mysql_select_db($characters,$connect) or die(mysql_error());
mysql_query("SET NAMES '$cod'");

if(!isset($_GET['guid'])){

$sql = mysql_query("SELECT * FROM `arena_team` ORDER by `name`");

echo "<center><table border=0 width=70%>
<tr>
<td>Nome Time</td>
<td align=center>Tipo de equipe</td>
<td align=center><center>Lider da equipe</center></td>
<td>Facção</td>
<td align=center>Rating</td>

</tr>";
while ($row = mysql_fetch_array($sql)){
$query_num = mysql_query("SELECT COUNT(*) FROM `arena_team_member` WHERE `arenateamid`='$row[arenateamid]'");
$gleader = "SELECT name,race FROM `characters` WHERE `guid`='$row[captainguid]'";
$myrow = mysql_fetch_array(mysql_query($gleader));
$top = mysql_query("SELECT * FROM `arena_team_stats` WHERE `arenateamid`='$row[arenateamid]'");
$toprow = mysql_fetch_array($top);

if($myrow['race']=="1" or $myrow['race']=="3" or $myrow['race']=="4" or $myrow['race']=="7" or $myrow['race']=="11"){

$faction = "alliance";
}else{
$faction = "horde";}



echo "
<tr>
<td >
<p style='padding-left: 5px'><a href='?guid=".$row[arenateamid]."' >".$row['name']."</a></p>
</td>
<td align=center><center>".$teamType[$row['type']]."</center></td>

<td><a href=".$wowd."/index.php?player=".$row[captainguid].">".$myrow['name']."</a></td>
<td align=center><center><img src=images/".$faction.".gif title=".$faction."></center></td>
<td align=right><p style='padding-right: 8px'>".$toprow['rating']."</p></td></tr>";

}
echo "</table></center><br><br>";
}

if (@$_GET['guid'] ) {

$name = "SELECT * FROM `arena_team` WHERE `arenateamid`='$_GET[guid]'";
$nrow = mysql_fetch_array(mysql_query($name));
$top = "SELECT * FROM `arena_team_stats` WHERE `arenateamid`='$_GET[guid]'";
$trow = mysql_fetch_array(mysql_query($top));
$member = "SELECT * FROM `arena_team_member` WHERE `arenateamid`='$_GET[guid]'";
$mrow = mysql_fetch_array(mysql_query($member));

$sql = mysql_query("SELECT * FROM `characters`, `arena_team_member` WHERE `characters`.`guid`=`arena_team_member`.`guid` and `arenateamid` = '".$_GET["guid"]."' ");
$row = mysql_fetch_array($sql);
$data = explode(' ',$row['data']);
$lvl = $data[$ver];
$gender = dechex($data[36]);
$gender = str_pad($gender,8, 0, STR_PAD_LEFT);
$gender = $gender{3};
$guid = $row['guid'];
$race = $row['race'];
$class = $row['class'];
$online = $row['online'];
$j=1;

echo "<center>
<table border=0 width=60%>
<tr>
<td>
<table border=1 width=100%>
<tr><td>Nome do Time</td><td >".$nrow['name']."</td></tr>
<tr><td>Rating</td><td >".$trow['rating']."</td></tr>
<tr><td>Tipo de Nome</td><td >".$teamType[$nrow['type']]."</td></tr>
<tr><td colspan=2 >Statistics of the Week</td></tr>
<tr><td>Played: ".$trow['games']."</td><td >Won: ".$trow['wins']."</td></tr>
<tr><td colspan=2 >Stats</td></tr>
<tr><td>Played: ".$trow['played']."</td><td >Won: ".$trow['wins2']."</td></tr>


</table>
";

echo "<table border=0 width=100%>
<tr>
<td align=center>#</td>
<td align=center>Jogador</td>
<td align=center>Level</td>
<td align=center>Facção</td>
<td align=center>Class</td>
<td align=center>Game of the Week</td>
<td align=center>Won week</td>
<td align=center>Games for the season</td>
<td align=center>Won season</td>
<td align=center>Personal rating</td>
<td align=center>Online</td>
</tr>
";

echo "<tr>
<td valign=center width=3%>$j</td>
<td align=center valign=center width=20%><a href='/wow/wowd/?player=".$guid."' style='color: #ff9900; font-family : Geneva; text-decoration : none;'>".$row[name]."</a></td>
<td width=20 align=center valign=center>$lvl</td>
<td align=center valign=center width=7%><img src=images/race/".$race."-".$gender.".gif></td>
<td align=center valign=center width=7%><img src=images/class/$class.gif></td>
<td align=center width=20%>".$mrow['played_week']."</td>
<td valign=center width=20%>".$mrow['wons_week']."</td>
<td valign=center width=10%>".$mrow['played_season']."</td>
<td valign=center width=10%>".$mrow['wons_season']."</td>
<td valign=center width=10%>".$mrow['personal_rating']."</td>
<td valign=center width=10%><center><img src='images/status/".$online.".gif' height='18' width='18'></center></td>
</tr>
";


echo "</table></td></tr></table></center><br><br><br>";

echo "<table border=0><tr><td><a href='#'>Index</a></td></tr></table>";
}

?>

</body>
</html>

....................................................................................................................
Qualquer erro podem falar ok , "Vivendo & aprendendo"

description[+] Script Básico: Ranking Kill + Ranking Arena EmptyRe: [+] Script Básico: Ranking Kill + Ranking Arena

more_horiz
Mereceu meu ( + ) de novo.
Mas um parecer meu , é que está bem simplesinho...
Você pode jogar um while de incremento ai , pra aparecer tipo,1,2,3...
Ou melhor , acrescentar uma barra de pesquisa com $_Post pra pegar o char e ver qual colocação está..

Enfim , bem legal ai.
Mereceu...continue assim manolo

[+] Script Básico: Ranking Kill + Ranking Arena 985951499

description[+] Script Básico: Ranking Kill + Ranking Arena EmptyRe: [+] Script Básico: Ranking Kill + Ranking Arena

more_horiz
Vlw mlq , (:

description[+] Script Básico: Ranking Kill + Ranking Arena EmptyRe: [+] Script Básico: Ranking Kill + Ranking Arena

more_horiz
muito bom !
+ REP!

description[+] Script Básico: Ranking Kill + Ranking Arena EmptyRe: [+] Script Básico: Ranking Kill + Ranking Arena

more_horiz
Muito bom é ganhar um ~+rep in fórum. \o/

description[+] Script Básico: Ranking Kill + Ranking Arena EmptyRe: [+] Script Básico: Ranking Kill + Ranking Arena

more_horiz
Hey Hey Esses Repack ja vem com site pronto?

description[+] Script Básico: Ranking Kill + Ranking Arena EmptyRe: [+] Script Básico: Ranking Kill + Ranking Arena

more_horiz
Não , não Nath = /
Normalmente vem sites separados dos Repack.

description[+] Script Básico: Ranking Kill + Ranking Arena EmptyRe: [+] Script Básico: Ranking Kill + Ranking Arena

more_horiz
Bom para quem tem dificuldade em cria os arquivos PHP ta aki o zip com ele criados com os códigos acima.

[Tens de ter uma conta e sessão iniciada para poderes visualizar este link]

SCAN

OBS: falta a imagem das facção.

Se ajudei de um + ae [Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]

description[+] Script Básico: Ranking Kill + Ranking Arena EmptyRe: [+] Script Básico: Ranking Kill + Ranking Arena

more_horiz
Gostei +REP Pro Facebooky e pro Fabiozzy

description[+] Script Básico: Ranking Kill + Ranking Arena EmptyRe: [+] Script Básico: Ranking Kill + Ranking Arena

more_horiz

Código:

<?php

include ("../incluide/config.php");

$j=1;
$teamType = array(
'2' => '2x2',
'3' => '3x3',
'5' => '5x5'
);

$connect = mysql_connect($host,$user,$pass) OR DIE("'Can't connect with $host");
mysql_select_db($characters,$connect) or die(mysql_error());
mysql_query("SET NAMES '$cod'");

if(!isset($_GET['guid'])){

$sql = mysql_query("SELECT * FROM `arena_team` ORDER by `name`");

echo "<center><table border=0 width=70%>
<tr>
<td>Nome Time</td>
<td align=center>Tipo de equipe</td>
<td align=center><center>Lider da equipe</center></td>
<td>Facção</td>
<td align=center>Rating</td>

</tr>";
while ($row = mysql_fetch_array($sql)){
$query_num = mysql_query("SELECT COUNT(*) FROM `arena_team_member` WHERE `arenateamid`='$row[arenateamid]'");
$gleader = "SELECT name,race FROM `characters` WHERE `guid`='$row[captainguid]'";
$myrow = mysql_fetch_array(mysql_query($gleader));
$top = mysql_query("SELECT * FROM `arena_team_stats` WHERE `arenateamid`='$row[arenateamid]'");
$toprow = mysql_fetch_array($top);

if($myrow['race']=="1" or $myrow['race']=="3" or $myrow['race']=="4" or $myrow['race']=="7" or $myrow['race']=="11"){

$faction = "alliance";
}else{
$faction = "horde";}



echo "
<tr>
<td >
<p style='padding-left: 5px'><a href='?guid=".$row[arenateamid]."' >".$row['name']."</a></p>
</td>
<td align=center><center>".$teamType[$row['type']]."</center></td>

<td><a href=".$wowd."/index.php?player=".$row[captainguid].">".$myrow['name']."</a></td>
<td align=center><center><img src=images/".$faction.".gif title=".$faction."></center></td>
<td align=right><p style='padding-right: 8px'>".$toprow['rating']."</p></td></tr>";

}
echo "</table></center><br><br>";
}

if (@$_GET['guid'] ) {

$name = "SELECT * FROM `arena_team` WHERE `arenateamid`='$_GET[guid]'";
$nrow = mysql_fetch_array(mysql_query($name));
$top = "SELECT * FROM `arena_team_stats` WHERE `arenateamid`='$_GET[guid]'";
$trow = mysql_fetch_array(mysql_query($top));
$member = "SELECT * FROM `arena_team_member` WHERE `arenateamid`='$_GET[guid]'";
$mrow = mysql_fetch_array(mysql_query($member));

$sql = mysql_query("SELECT * FROM `characters`, `arena_team_member` WHERE `characters`.`guid`=`arena_team_member`.`guid` and `arenateamid` = '".$_GET["guid"]."'

");
$row = mysql_fetch_array($sql);
$data = explode(' ',$row['data']);
$lvl = $data[$ver];
$gender = dechex($data[36]);
$gender = str_pad($gender,8, 0, STR_PAD_LEFT);
$gender = $gender{3};
$guid = $row['guid'];
$race = $row['race'];
$class = $row['class'];
$online = $row['online'];
$j=1;

echo "<center>
<table border=0 width=60%>
<tr>
<td>
<table border=1 width=100%>
<tr><td>Nome do Time</td><td >".$nrow['name']."</td></tr>
<tr><td>Rating</td><td >".$trow['rating']."</td></tr>
<tr><td>Tipo de Nome</td><td >".$teamType[$nrow['type']]."</td></tr>
<tr><td colspan=2 >Statistics of the Week</td></tr>
<tr><td>Played: ".$trow['games']."</td><td >Won: ".$trow['wins']."</td></tr>
<tr><td colspan=2 >Stats</td></tr>
<tr><td>Played: ".$trow['played']."</td><td >Won: ".$trow['wins2']."</td></tr>


</table>
";

echo "<table border=0 width=100%>
<tr>
<td align=center>#</td>
<td align=center>Jogador</td>
<td align=center>Level</td>
<td align=center>Facção</td>
<td align=center>Class</td>
<td align=center>Game of the Week</td>
<td align=center>Won week</td>
<td align=center>Games for the season</td>
<td align=center>Won season</td>
<td align=center>Personal rating</td>
<td align=center>Online</td>
</tr>
";

echo "<tr>
<td valign=center width=3%>$j</td>
<td align=center valign=center width=20%><a href='/wow/wowd/?player=".$guid."' style='color: #ff9900; font-family : Geneva; text-decoration : none;'>".$row[name]."</a></td>
<td width=20 align=center valign=center>$lvl</td>
<td align=center valign=center width=7%><img src=images/race/".$race."-".$gender.".gif></td>
<td align=center valign=center width=7%><img src=images/class/$class.gif></td>
<td align=center width=20%>".$mrow['played_week']."</td>
<td valign=center width=20%>".$mrow['wons_week']."</td>
<td valign=center width=10%>".$mrow['played_season']."</td>
<td valign=center width=10%>".$mrow['wons_season']."</td>
<td valign=center width=10%>".$mrow['personal_rating']."</td>
<td valign=center width=10%><center><img src='images/status/".$online.".gif' height='18' width='18'></center></td>
</tr>
";


echo "</table></td></tr></table></center><br><br><br>";

echo "<table border=0><tr><td><a href='#'>Index</a></td></tr></table>";
}

?>


apenas troquei a extensão do inicio php

está ?> isso é para finalizar script Alterei para
Funcional em qualquer banco de dados

description[+] Script Básico: Ranking Kill + Ranking Arena EmptyRe: [+] Script Básico: Ranking Kill + Ranking Arena

more_horiz
privacy_tip Permissões neste sub-fórum
Não podes responder a tópicos
power_settings_newInicie sessão para responder