Ir para conteúdo

Featured Replies

Postado
  • Este é um post popular.

Vasculhando aqui na net, achei esse latestnews em outro fórum, e achei bem interessante, portanto decide repassar pra vocês ...

 

Latestnews.php

Spoiler

//######################## SHOW TICKERS AND NEWS #######################

$players = $SQL->query('SELECT COUNT(*) FROM `players` WHERE `id`>0;')->fetch();
$accounts = $SQL->query('SELECT COUNT(*) FROM `accounts` WHERE `id`>0;')->fetch();

    $main_content .= '
    <p align="center"><img src="images/latest.png" alt="*">
    <br/>
    <p align="center"><img src="images/line.png" alt="*"><br/>
   
   
    <table class="tg"><td>
<img src="images/logo1.gif" alt="*">


';


                $main_content .= '<font color="green"><a href="?subtopic=whoisonline">Online</a>: '.$config['status']['serverStatus_players'].'</font>';

               
               
        $main_content .= '       
  </td>
  <td>
  <img src="images/logo4.gif" alt="*"> Exp rate: <a href="?subtopic=serverinfo">Here</a>
  </td>
  <td>
  <img src="images/logo7.gif" alt="*"> Inter core i7 - 3.2 ghz
  </td>
  <tr>
  <td>
<img src="images/logo2.gif" alt="*"> Accounts: '.$accounts[0].'
  </td>
    <td>
  <img src="images/logo5.gif" alt="*"> Loot rate: '.$config['site']['sInfoLoot'].'
  </td>
 
    <td>
  <img src="images/logo8.gif" alt="*"> Ram: 32 GB
  </td>
 
  <tr>
   <td>
<img src="images/logo3.gif" alt="*"> Players: '.$players[0].'
  </td>
      <td>
  <img src="images/logo6.gif" alt="*"> Skills rate: '.$config['site']['sInfoSkill'].'
  </td>
 
      <td>
  <img src="images/logo9.gif" alt="*"> Linux Debian 7.0.0
  </td>
  <tr>
  
</table>
<p align="center"><img src="images/line.png" alt="*"><br/>
</p>
    ';

   
    if($group_id_of_acc_logged >= $config['site']['access_admin_panel']){$main_content .=  '<a href="?subtopic=forum&action=new_topic&section_id=1">Add new news</a>';}
$tables = $SQL->query("SELECT `z_forum`.`post_topic`, `z_forum`.`author_guid`, `z_forum`.`post_date`, `z_forum`.`post_text`, `z_forum`.`id`, `z_forum`.`replies`, `players`.`name` FROM `z_forum`, `players` WHERE `section` = '1' AND `z_forum`.`id` = `first_post` AND `players`.`id` = `z_forum`.`author_guid` ORDER BY `post_date` DESC LIMIT 6;")->fetchAll();
foreach ($tables as $row)
{
         $BB = array(
        '/\[b\](.*?)\[\/b\]/is' => '<strong>$1</strong>',
        '/\[quote\](.*?)\[\/quote\]/is' => '<table cellpadding="0" style="background-color: #c4c4c4; width: 480px; border-style: dotted; border-color: #007900; border-width: 2px"><tr><td>$1</td></tr></table>',
        '/\[u\](.*?)\[\/u\]/is' => '<u>$1</u>',
        '/\[i\](.*?)\[\/i\]/is' => '<i>$1</i>',
        '/\[url](.*?)\[\/url\]/is' => '<a href=$1>$1</a>',
        '/\[img\](.*?)\[\/img\]/is' => '<img src=$1 alt=$1 />',
        '/\[player\](.*?)\[\/player\]/is' => '<a href='.$server['ip'].'?subtopic=characters&name=$1>$1</a>',
        '/\[code\](.*?)\[\/code\]/is' => '<div dir="ltr" style="margin: 0px;padding: 2px;border: 1px inset;width: 500px;height: 290px;text-align: left;overflow: auto"><code style="white-space:nowrap">$1</code></div>'
        );
        $message = preg_replace(array_keys($BB), array_values($BB), nl2br($row['post_text']));
        $main_content .= '<div class=\'NewsHeadline\'>

        </div>
        <table style=\'clear:both\' border=0 cellpadding=0 cellspacing=0 width=\'100%\'><tr>
        <td><img src="'.$layout_name.'/images/global/general/blank.gif" width=10 height=1 border=0 alt=\'\' /></td>';
        if($group_id_of_acc_logged >= $config['site']['access_admin_panel'])
        {
            $main_content .='<td width="100%">'.$message.'<br><h6><i>Posted by </i><font color="green">'.$row['name'].'</font></h6><p align="right"><a href="?subtopic=forum&action=remove_post&id='.$row['id'].'"><font color="red">[Delete this news]</font></a>  <a href="?subtopic=forum&action=edit_post&id='.$row['id'].'"><font color="green">[Edit this news]</font></a>      <a href="?subtopic=forum&action=show_thread&id='.$row['id'].'">Comments: '.$row['replies'].'</a></p>';
        }
        else       
        {
            $main_content .='<td width="100%">'.$message.'<br><h6><i>Posted by </i><font color="green">'.$row['name'].'</font></h6><p align="right"><a href="?subtopic=forum&action=show_thread&id='.$row['id'].'">Comments: '.$row['replies'].'</a></p>';       
        }
        $main_content .= '</td>
        <td><img src="'.$layout_name.'/images/global/general/blank.gif" width=10 height=1 border=0 alt=\'\' /></td>
        </tr></table>';
}

?>

 

 

OBS: IMAGENS EM ANEXO!

 

Créditos: Nevix

images.zip

Editado por luanluciano93 (veja o histórico de edições)

  • Respostas 16
  • Visualizações 3.4k
  • Created
  • Última resposta

Top Posters In This Topic

Postado

obrigado por compartilhar,aqui no fórum para gente..

reputado :)

                                                                         github.png TFS 0.4 DEV                                                                                                       nvzl0l.jpg
 
Página no facebook: https://www.facebook.com/Suporterking                                                                                     
Skype: fabinhodias01
 
 
"A almapermanece em suas criações" 


h3dhnuI.jpg           
(Dou suporte apenas em tópicos..)

Postado

Se possível anexa as imagens ou disponibiliza-as Luan.

Mas excelente, parabéns.

YDmXTU2.png

 

Entenda tudo sobre VPS, DEDICADOS & HOSPEDAGENS. => Clique aqui

Global Full Download 10.9x - TFS 1.2/FERUMBRAS/KRAILOS. => Clique aqui

 

Muitos querem aquilo que você tem, 
mas vão desistir quando souberem o preço que você pagou.

 

skype-favicon.png lu.lukinha

message-16.png [email protected]

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo