Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Kaip padaryt savaites top naujienu panele

Parašė lilas· 2008 Rugp. 31 18:08:17
#1

vat kaip padaryt tokia panele?

Cia tik visu laiku top 10 naujienos kaip perdaryt kad butu savaites top
$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,20"
);
if (dbrows($result) != 0) {
while($data = dbarray($result)) {
$itemsubject = trimlink($data['news_subject'], 21);
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 "Najienu nera";
}



Redagavo lilas· 2008 Rugp. 31 20:08:36