luccagomes
New Member
- Joined
- Jul 30, 2015
- Messages
- 153
- Reaction score
- 1
Someone could help me to change my playersonline.php to something like it:
01:54 8 players online:
01:54 Vocations: None [2], Sorcerer [2], Paladin [2], Knight [2].
Im using Znote AAC
01:54 8 players online:
01:54 Vocations: None [2], Sorcerer [2], Paladin [2], Knight [2].
Im using Znote AAC
Code:
<?php require_once 'engine/init.php'; include 'layout/overall/header.php'; ?>
<h1>Who is online?</h1>
<?php
$array = online_list();
if ($array) {
?>
<table id="onlinelistTable" class="table table-striped table-hover">
<tr class="yellow">
<th>Name:</th>
<th>Guild:</th>
<th>Level:</th>
<th>Vocation:</th>
</tr>
<?php
foreach ($array as $value) {
$url = url("characterprofile.php?name=". $value['name']);
echo '<tr class="special" onclick="javascript:window.location.href=\'' . $url . '\'">';
echo '<td><a href="characterprofile.php?name='. $value['name'] .'">'. $value['name'] .'</a></td>';
if (!empty($value['gname'])) echo '<td><a href="guilds.php?name='. $value['gname'] .'">'. $value['gname'] .'</a></td>'; else echo '<td></td>';
echo '<td>'. $value['level'] .'</td>';
echo '<td>'. vocation_id_to_name($value['vocation']) .'</td>';
echo '</tr>';
}
?>
</table>
<?php
} else {
echo 'Nobody is online.';
}
?>
<?php include 'layout/overall/footer.php'; ?>