Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Top Forumo nariai,naujienos,pamokos

Parašė MAnjack· 2008 Vas. 2 12:02:41
#16

Bandyk:
opentable("Informacija");
echo "<table width='100%'>
<tr>
<td width='33%'>";
openside("Aktyviausi nariai");
 
$result = dbquery("SELECT * FROM ".$db_prefix."users ORDER BY user_posts DESC LIMIT 0, 10");
echo "<table cellpadding='0' cellspacing='0' width='100%'>";
echo "<td class='side-small' align='left'>";
echo "<b><font color='cc3300'>Aktyviausi nariai</b>";
echo "<td class='side-small' align='right'>";
echo "<b><font color='cc3300'>Ʋinučių</b>";
 
if (dbrows($result) != 0) {
   while ($data = dbarray($result)) {
      echo "<tr>
      <td class='side-small' align='left'><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' title='".$data['user_name']."' class='side'>".trimlink($data['user_name'], 15)."</a></td>
      <td class='side-small' align='right'> ".$data['user_posts']."</td>
      </tr>\n";
   }
}
echo "</table>\n";
closeside();
echo "</td>
<td width='33%'>";
openside("Populiarios naujienos");
$result = dbquery(
"SELECT tn.*, tc.*, user_id, user_name FROM ".$db_prefix."news tn
LEFT JOIN ".$db_prefix."users tu ON tn.news_name=tu.user_id
LEFT JOIN ".$db_prefix."news_cats tc ON tn.news_cat=tc.news_cat_id
WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().")
ORDER BY news_reads DESC LIMIT 0,5"
);
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['news_subject'], 23);
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."news.php?readmore=".$data['news_id']."' title='".$data['news_subject']."' class='side'>$itemsubject</a><br>\n";
}
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside();
echo"</td><td width='33%'>";
openside("Populiariausios pamokos ");
$result = dbquery("SELECT * FROM ".$db_prefix."articles ORDER BY article_reads DESC LIMIT 0,5");
while($data = dbarray($result)) {
$itemsubject = trimlink($data['article_subject'], 23);
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."readarticle.php?article_id=".$data['article_id']."' title='".$data['article_subject']."' class='side'>$itemsubject</a><br>\n";
}

if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['article_subject'], 23);
echo "<img src='".THEME."images/bullet.gif' alt=''> <a href='".BASEDIR."readarticle.php?article_id=".$data['article_id']."' title='".$data['article_subject']."' class='side'>$itemsubject</a><br>\n";
}
} else {
echo "<center>".$locale['004']."</center>\n";
}
closeside();
echo "</tr>
</table>";
closetable();