Raggaer
Godly Member
Hello, I made this table few days ago to train, its based on Alehs table
- Screenshot -
- Install -
1- open your news.php and fine this
then paste after that this
we are done
- Screenshot -
- Install -
1- open your news.php and fine this
PHP:
<div class="mid">
PHP:
<?php
$query1 = mysql_query("SELECT * FROM players ORDER BY id DESC LIMIT 1");
while($get1 = mysql_Fetch_assoc($query1)) {
$name = $get1['name'];
$id = $get1['id'];
}
$query2 = mysql_query("SELECT MAX(level) AS pro FROM players");
while($get2 = mysql_Fetch_assoc($query2)) {
$level = $get2['pro'];
}
$query3 = mysql_query("SELECT * FROM players WHERE level = $level");
while ($rowq = mysql_fetch_assoc($query3)) {
$name2 = $rowq['name'];
}
$query4 = mysql_query("SELECT * FROM server_motd ORDER BY id DESC LIMIT 1");
while ($rowqq = mysql_fetch_assoc($query4)) {
$motd = $rowqq['text'];
}
$query5 = mysql_query("SELECT COUNT(*) AS total FROM accounts ORDER BY id DESC");
while($tt = mysql_fetch_assoc($query5)) {
$tacc = $tt['total'];
}
$query6 = mysql_query("SELECT COUNT(*) AS tot FROM players ORDER BY id DESC");
while($rot = mysql_fetch_assoc($query6)) {
$tpp = $rot['tot'];
}
echo'
<table width=100% border="1" cellpadding="2" cellspacing="0" style="border: 0px solid #000;">
<tr class="color1">
<td>
<center>Server info</center>
</td>
</tr>
<tr class="color2">
<td>
<center>Last player joined was : <b><a href="characters.php?player_name='.$name.'">'.$name.'</a></b>, player number :<b> '.$id.'</b></center>
</td>
</tr>
<tr class="color2">
<td>
<center>The best player in the server is : <b><a href="characters.php?player_name='.$name2.'">'.$name2.'</a> ('.$level.') </b> congratulations!</b></center>
</td>
</tr>
<tr class="color2">
<td>
<center>Server motd : <b>'.$motd.'</b></center>
</td>
</tr>
</tr>
<tr class="color2">
<td>
<center>Total accounts in database : <b>'.$tacc.'</b></center>
</td>
</tr>
</tr>
<tr class="color2">
<td>
<center>Total players in database : <b>'.$tpp.'</b></center>
</td>
</tr>
</table>
';
?>
we are done