Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/06/2010, 23:20
koxesaurio
 
Fecha de Ingreso: junio-2010
Mensajes: 7
Antigüedad: 13 años, 10 meses
Puntos: 0
Ayuda con mi Ranking

Buenas, pues de php la verdad en estos casos soy nulo y queria ver si aqui pueden echarme una manito , mi ranking es de un juego online pero solo muestra los primeros 100 user y no tiene buscador , mi intencion es ponerle un search y el que buscque aun este en la pocicion 150 lo muestre subrayado o de alguna forma, les dejare el codigo del ranking haber si me echan una manito ^^

<center> &laquo; <a href="index.php?page=ranking" title="Rangliste"><b>Spieler-Rangliste</b></a> &laquo;&raquo; <a href="index.php?page=guildranking" title="Gildenrangliste">Gildenrangliste</a> &raquo;</center><br>
<div class="contentBoxTop"></div>
<div class="contentBox">
<?php
include './inc/dbsettings.php';
$db = "player";
mysql_connect($dbhost, $dbuser, $dbpw) OR
die("ERROR: Connection failed. ".mysql_error());
mysql_select_db($db) OR
die("ERROR: DB allready open. ".mysql_error());
$test = "SELECT * from player";
$testquery = mysql_query($test);
$num2 = mysql_num_rows($testquery);

if($_GET['max']) {
$get = $_GET['max'];
} else {
$get = '0';
}

$max = $get + 20;
$max2 = $get - 20;

if($get > $num2) {
echo "<center><a href=\"index.php?page=ranking&max=$max2\">&laquo; Vorherige Seite</a></center>"; }
elseif($get >= 20 && $get < $num2) { echo "<center><a href=\"index.php?page=ranking&max=$max2\">&laquo; Vorherige Seite</a> <a href=\"index.php?page=ranking&max=$max\">Nächste Seite &raquo;</a></center>"; }
elseif ($num2 <= 20) { echo ""; }
else { echo "<center><a href=\"index.php?page=ranking&max=$max\">Nächste Seite &raquo;</a></center>"; }
echo "</center><br></center>";
?>

<center><table border="0">
<tr>
<th width="150">Platz</th>
<th width="150">Name</th>
<th width="150">Level</th>
<th width="150">Exp</th>
<th width="150">Reich</th>
</tr>
</table></center>

<?php



include('./inc/dbsettings.php'); // Connect to DB
mysql_select_db('player'); // Select DB 'player'



// Select player etc from db //


$rank = "SELECT * from player WHERE name NOT LIKE '[GM]%' AND name NOT LIKE '[GA]%' AND name NOT LIKE '[CoMa]%' AND name NOT LIKE '[SA]%' AND name NOT LIKE '[MoD]%' AND name NOT LIKE '[EV]%' AND name NOT LIKE '[TGM]%' order by level desc, exp desc, name asc limit $get,20";
$query = mysql_query($rank);
echo "<center><table border=\"0\">"; // Open table
$i = 0 + $get;

while($array = mysql_fetch_array($query)) {
$i = $i + 1;


echo "
<tr>
<th width=\"150\"><font color=\"black\">" . $i . "</font></th>
<th width=\"150\"><font color=\"black\"><a href=\"index.php?page=player&char=",$array["name"],"\">",$array["name"],"</a></font></th>
<th width=\"150\"><font color=\"black\">" . $array["level"] . "</font></th>
<th width=\"150\"><font color=\"black\">" . $array["exp"] . "</font></th>";



$reich = "SELECT empire from player_index where id = " . $array[account_id] . "";
$query2 = mysql_query($reich);
$array2 = mysql_fetch_array($query2);


if($array2["empire"] == 1) {
echo "<th width=\"150\"><img src=\"images/icons/shinsoo.jpg\"></th></tr>";
} elseif($array2["empire"] == 2) {
echo "<th width=\"150\"><img src=\"images/icons/chunjo.jpg\"></th></tr>";
} else {
echo "<th width=\"150\"><img src=\"images/icons/jinno.png\"></th></tr>";
}
}
echo "</table></center><br>"; // close table



?>
</div>
<div class="contentBoxBottom"></div>