SMFPT - Suporte e Manutenção de Fórum em Português

Customizing SMF => Portal System para SMF => Simpleportal => Tópico iniciado por: candidosa2 em 26 de Agosto de 2013, 23:29

Título: Top 10 Daily Post - PHP bloco
Enviado por: candidosa2 em 26 de Agosto de 2013, 23:29

(http://aplicimagens.info/image-E87A_521BBA36.jpg) (http://aplicimagens.info/share-E87A_521BBA36.html)




PHP Personalizado


Código: [Seleccione]
global $smcFunc, $scripturl;
$members_result = $smcFunc['db_query']('', '
      SELECT id_member, real_name, posts/((UNIX_TIMESTAMP() - date_registered) / (3600 * 24)) as hits
      FROM {db_prefix}members
      ORDER BY hits DESC
      LIMIT 10');


echo'<div align="left">
<table border="1" width="100%" id="table1" style="border-width: 0px">';
while ($row_members = $smcFunc['db_fetch_assoc']($members_result))
{
echo'
<tr>
<td style="border-style: none; border-width: medium" align="left">', sp_embed_image($user['name'] == 'H' ? 'tux' : 'user'), ' ', $user['hidden'] ? '<em>' . $user['link'] . '</em>' : $user['link'], '<a href="' . $scripturl . '?action=profile;u=' . $row_members['id_member'] . '">' . $row_members['real_name'] . '</a></td>
<td style="border-style: none; border-width: medium" align="right">'.$row_members['hits'].'<br /></td>
</tr>';
}
echo'</table><>';
$smcFunc['db_free_result']($members_result);