Habe folgendes script, aber kann nicht blättern ,.(
PHP-Code:
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
ini_set('default_mimetype', 'text/html');
ini_set('default_charset', 'utf-8');
header('Content-Type: text/html; charset=utf-8');
?>
<style type="text/css">
<!--
a:link, a:visited, a:active {
font-family: Arial, serif;
font-size: 8px;
font-weight: normal;
color: #ffffff;
}
table {color:#ffffff;
font-size: 9px;
font-family: Arial, serif;
}
body {
background-color: #292728;
}
-->
</style>
<?php
include 'inc/var.php';
include 'inc/config.php';
$start = (isset($start)) ? abs((int)$start) : 0;
$limit = 10;
if(!@mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS)) {
die("Es konnte keine Verbindung aufgebaut werden");
}
if(!mysql_select_db(MYSQL_DATABASE)) {
die("Konnte Datenbank nicht benutzen, Fehlermeldung: ".mysql_error());
}
$resultID = @mysql_query("SELECT COUNT(Id) FROM Spieler");
$total = @mysql_result($resultID,0);
$start = ($start >= $total) ? $total - $limit : $start;
mysql_query("SET NAMES 'utf-8'");
$sql = "
SELECT Name
FROM Spieler
where game = '$server'
ORDER BY
Punkte desc
LIMIT ".$start.",".$limit;
$resultID = @mysql_query($sql);
?>
<table width="150" bgcolor="292728" align="center" >
<table width="150" height="125" background="./image/topten.jpg" bgcolor="292728" align="center" >
<tr> <td style="color:#FF0000;" height="43" > </td> <td> </td> </tr>
<tr> <td style="PADDING-RIGHT: 0px; PADDING-LEFT: 35px; color:#FFffff; PADDING-TOP: 7px;" height="10" colspan="2"> dust2only|No AWP</td>
<tr> <td style="PADDING-RIGHT: 0px; PADDING-LEFT: 15px; color:#FFffff; PADDING-TOP: 7px;" height="10" width="15" > 88.198.0.93 </td>
<td style="PADDING-RIGHT: 0px; PADDING-LEFT: 45px; color:#FFffff; PADDING-TOP: 7px;"> 27015</td>
</tr>
</table>
<table bgcolor="292728" width="150" align="center" >
<?
while($row = mysql_fetch_array($resultID)) {
echo "<tr><td> ".$row['Name']." </td></tr>";
}
if ($start > 0)
{
$newStart = ($start - $limit < 0) ? 0 : ($start-$limit);
echo "<a href=".$_SERVER['PHP_SELF']."?start=".$newStart
."><< zurück</a>";
}
if ($start + $limit < $total)
{
$newStart = $start + $limit;
echo " <a href=".$_SERVER['PHP_SELF']."?start=".$newStart
.">vor >></a>";
}
?>
</table></table>
Kommentar