Preview:
Edit /layout/widgets/loggedin.php
Below:
PHP:
<li>
<a href='myaccount.php'>My Account</a>
</li>
Add:
PHP:
<li>
<a href='friends.php'>My Friends</a>
</li>
friends.php
PHP:
<?php
# TFS 0.3 VIP Friends for ZnoteAAC
# By cbrm @ otland.net
require_once 'engine/init.php';
protect_page();
include 'layout/overall/header.php';
echo'<h1>VIP Friends</h1>';
$vip = mysql_query('SELECT
p.name AS name, p.id AS id, p.online AS online, player_id
FROM
account_viplist
LEFT JOIN
players p ON account_viplist.player_id = p.id
WHERE
account_viplist.account_id = '.$user_data['id'].'
ORDER BY
name, online ASC LIMIT 0,100');
while ($row = mysql_fetch_assoc($vip)) {$data[] = $row;}
if (empty($data)) {echo 'You VIP list is empty.'; return include 'layout/overall/footer.php';}
?>
<table><tr class="yellow"><td width="60%"><strong>Name</strong></td><td width="40%"><strong>Status</strong></td></tr>
<?php
foreach($data as $friend)
{
echo '<tr><td><a href="characterprofile.php?name='.$friend['name'].'">'.$friend['name'].'</a></td>';
echo '<td><span style="color:'.($friend['online'] == 0 ? 'red;">Offline':'green;">Online').'</span></td></tr>';
}
echo'</table>'; include 'layout/overall/footer.php'; ?>
Last edited: