Ir para conteúdo
Entre para seguir isso  
Mudrock

[Znote AAC] Account VIP list

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

Compartilhar este post


Link para o post
Compartilhar em outros sites
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.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

Entre para seguir isso  

×
×
  • Criar Novo...