Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Topai/Forumo pranešimai

Parašė Kostaw· 2009 Bal. 4 10:04:19
#3

<?php
/*--------------------------------------------+
| PHP-Fusion 5 - Content Management System    |
|---------------------------------------------|
| author: Nick Jones (Digitanium) © 2002-2005 |
| web: http://www.php-fusion.co.uk            |
| email: nick@php-fusion.co.uk                |
|---------------------------------------------|
| Released under the terms and conditions of  |
| the GNU General Public License (Version 2)  |
+--------------------------------------------*/
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";

echo "<div class='side-label'><center><b>&#208;aukyklos TOP 5</b></center></div>\n";
$result=dbquery("SELECT user_name, user_location, user_icq, user_id, count(user_id) AS shout_count FROM ".$db_prefix."shoutbox INNER JOIN
".$db_prefix."users ON shout_name=user_id GROUP BY user_name ORDER BY shout_count DESC LIMIT 0,5");
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
if(dbrows($result)!=0){
while($data=dbarray($result)){
echo "<tr><td class='small2' align='left'> <img src='http://img3.imageshack.us/img3/1711/stari.gif'> <a href='".BASEDIR."profile.php?lookup=$data[user_id]' class='side'>";
echo "$data[user_name]</a></td><td class='small2' align='right'>[$data[shout_count]]</td></tr>";
}
}
echo "</table><br><br>";
echo "<div class='side-label'><center><b>Komentatoriø TOP 5</b></center></div>\n";
$result=dbquery("SELECT user_name, user_location, user_icq, user_id, count(user_id) AS comment_count FROM ".$db_prefix."comments INNER JOIN
".$db_prefix."users ON comment_name=user_id GROUP BY user_name ORDER BY comment_count DESC LIMIT 0,5");
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
if(dbrows($result)!=0){
while($data=dbarray($result)){
echo "<tr><td class='small2' align='left'> <img src='http://img3.imageshack.us/img3/1711/stari.gif'> <a href='".BASEDIR."profile.php?lookup=$data[user_id]' class='side'>";
echo "$data[user_name]</a></td><td class='small2' align='right'>[$data[comment_count]]</td></tr>";
}
}
echo "</table><br><br>";
echo "<div class='side-label'><center><b>Forumo TOP 5</b></center></div>\n";

$sql=dbquery("SELECT * FROM ".$db_prefix."users ORDER BY 'user_posts' DESC LIMIT 0, 5");

echo "<table width='auto' cellspacing='0' cellpadding='0'>";

$i=0;

while ($data=dbarray($sql)) {

echo "<tr>

<td align='left'>

<a href='".BASEDIR."profile.php?lookup=".$data ['user_id']."'>";

if(!empty($data['user_avatar']))

{

$avatar="<img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$data['user_name']."' width='50' height='50'>";}

else

{

$avatar="<img src='".IMAGES."noavatar.gif' alt='".$data['user_name']."' width='50' height='50'>";}




echo"$avatar</a></td>

<td align='left'><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'><img src='http://img3.imageshack.us/img3/1711/stari.gif'>".$data['user_name']."</a><br> - ".$data['user_posts']." Prane&#240;imai</td></tr>";

$i++;

}

echo "</table><br><br>";
echo "<div class='side-label'><center><b>Dainø TOP 5</b></center></div>\n";
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,5");
if (dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while($data = dbarray($result)) {
$itemsubject = trimlink($data['download_title'], 100);
echo "<tr>\n<td class='small'><img src='http://img3.imageshack.us/img3/1711/stari.gif'> <a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>$itemsubject</a></td>\n
<td align='right'>[".$data['download_count']."]</td>\n</tr>\n";
}
echo "</table>";
} else {
echo "<center>".$locale['004']."</center>\n";
}
echo "<div class='side-label'><center><b>Albumø/naujienø TOP 5</b></center></div>\n";
$result = dbquery("SELECT * FROM ".$db_prefix."news ORDER BY news_reads DESC LIMIT 5");
if (dbrows($result) != 0) {
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
while($data = dbarray($result)) {
$itemsubject = trimlink($data['news_subject'], 25);
echo "<tr>\n<td class='small'><img src='http://img3.imageshack.us/img3/1711/stari.gif'> <a href='".BASEDIR."news.php?readmore=".$data['news_id']."' title='".$data['news_subject']."' class='side'>$itemsubject</a></td>\n
<td align='right'>[".$data['news_reads']."]</td>\n</tr>\n";
}
echo "</table>";
} else {
echo "<center>".$locale['004']."</center>\n";
}

require_once "side_right.php";
require_once "footer.php";
?>



Čia pilnas.

Redagavo Kostaw· 2009 Bal. 4 10:04:43