Ir para conteúdo

[Znote AAC] Account VIP list


Mudrock

Posts Recomendados

l4M4-WW.png

Tutorial

  • Em
/layout/widgets/loggedin.php
  • Procure por
       <li>
                <a href='myaccount.php'>My Account</a>
            </li>
  • Adicione logo abaixo
 <li>
                <a href='friends.php'>My Friends</a>
            </li>         
  • Crie um arquivo .php com o nome friends
<?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'; ?>

Créditos cbrm

Editado por MudrocK
Link para o comentário
Compartilhar em outros sites

  • 3 years later...
Em 14/05/2015 em 12:11, Mudrock disse:

l4M4-WW.png

 

Tutorial

 

  • Em

/layout/widgets/loggedin.php
  • Procure por

       <li>
                <a href='myaccount.php'>My Account</a>
            </li>
  • Adicione logo abaixo

 <li>
                <a href='friends.php'>My Friends</a>
            </li>         
  • Crie um arquivo .php com o nome friends

<?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'; ?>

Créditos cbrm

deu esse erro >

 Deprecated: mysql_query(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\Program Files (x86)\EasyPHP-Devserver-17\eds-www\friends.php on line 19

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\Program Files (x86)\EasyPHP-Devserver-17\eds-www\friends.php on line 20
You VIP list is empty.

Link para o comentário
Compartilhar em outros sites

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...