Raggaer
Godly Member
Hello, I made this simple script for znote acc based on the gesior one
*Note: tested on TFS 2.0!
- Photo -
- Install -
Open index.php and locate this part
We are done._
*Note: tested on TFS 2.0!
- Photo -
- Install -
Open index.php and locate this part
PHP:
<?php
// Load the data from SQL or cache
$cache = new Cache('engine/cache/serverstats');
if ($cache->hasExpired()) {
$stats = array(
'newPlayer' => mysql_select_single("SELECT `id`, `name` FROM `players` ORDER BY `id` DESC LIMIT 1"),
'playerCount' => mysql_select_single("SELECT COUNT(`id`) as `value` FROM `players`"),
'bestPlayer' => mysql_select_single("SELECT `name`, `level` FROM `players` ORDER BY `level` DESC LIMIT 1"),
'accountCount' => mysql_select_single("SELECT COUNT(`id`) as `value` FROM `accounts`"),
'guildCount' => mysql_select_single("SELECT COUNT(`id`) as `value` FROM `guilds`")
);
$cache->setContent($stats);
$cache->save();
} else {
$stats = $cache->load();
}
// Present the data:
?>
<table border="0" cellspacing="0">
<tr class="yellow">
<td><center>Server Information</center></td>
</tr>
<tr>
<td>
<center><?php
echo 'Welcome to our newest player: <a href="characterprofile.php?name='.$stats['newPlayer']['name'].'">'.$stats['newPlayer']['name'].'</a>';
?></center>
</td>
</tr>
<tr>
<td>
<center><?php
echo 'The best player is: <a href="characterprofile.php?name='.$stats['bestPlayer']['name'].'">'.$stats['bestPlayer']['name'].'</a> level: '.$stats['bestPlayer']['level'].' congratulations!';
?></center>
</td>
</tr>
<tr>
<td>
<center><?php
echo 'We have <b>'.$stats['accountCount']['value'].'</b> accounts in our database, <b>'.$stats['playerCount']['value'].'</b> players, and <b>'.$stats['guildCount']['value'].' </b>guilds';
?></center>
</td>
</tr>
</table>
We are done._
Last edited by a moderator: