Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Dizainas

Parašė arnas120· 2011 Sau. 1 18:01:07
#1

sveiki turiu problemele kai pakeisti kad vietoj naujausiu siuntiniu rodytu populiaraiusias naujienas stai nuotrukau kur turi but naujienos

stai siuntini kodas:

<?php
global $userdata, $aidlink, $locale, $db_prefix, $theme_width, $result;
 
openside_panel($locale['001']);
	$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,5");
	if (dbrows($result) != 0) {
		echo "<table align='center' width='380' cellpadding='0' cellspacing='2'>";
		while ($data = dbarray($result)) {
			echo "<tr>
				<td class='nauji_vienas'>
					<a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' style='color:#FFF;'>".trimlink($data['download_title'], 23)."</a>
				</td>
				<td align='center' class='nauji_du'>".$data['download_count']."</td>
			</tr>";
		}
		echo "</table>";
	} else {
		echo "<div style='text-align:center'>".$locale['004']."</div>\n";
	}
	echo "<div align='center'><a href='".BASEDIR."downloads.php' title='Visi siuntiniai' style='color:#FFF;'>Visi siuntiniai</a></div\n";
closeside_panel();
?>

dekoju is anksto :)

Parašė Ponas24· 2011 Sau. 1 18:01:02
#2


$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";
}