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

Parašė arnas120· 2011 Geg. 4 15:05:28
#1

Sveiki man reiketu pakeisti kad vietoj naujausiu ir populiariausiu siuntiniu butu naujausios ir populiariausios naujienos

Naujausiu siuntiniu kodas:

<?php
 
openside_panel("Navigacija");
	$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,10");
	if (dbrows($result) != 0) {
		echo "<table align='center' width='268' cellpadding='0' cellspacing='0' style='padding:10px;'>";
		while ($data = dbarray($result)) {
			echo "<tr>
				<td class='small'>
					<a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."'>".trimlink($data['download_title'], 23)."</a>
				</td>
				<td align='right' style='color:#FFF;'>".$data['download_count']."</td>
			</tr>";
		}
		echo "</table>";
	} else {
		echo "<div style='text-align:center'>nera</div>\n";
	}
closeside_panel();
?>



Populiariasiu siuntiniu kodas:


<?php
global $userdata, $aidlink, $locale, $db_prefix, $theme_width, $result;
 
openside_panel("Navigacija");
$result = dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_count DESC LIMIT 0,10");
if (dbrows($result) != 0) {
	echo "<table align='center' width='264' cellpadding='0' cellspacing='0' style='padding:5px;'>";
	while($data = dbarray($result)) {
		$itemsubject = trimlink($data['download_title'], 23);
		echo "<tr>\n<td class='small'><a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."'>$itemsubject</a></td>\n
		<td align='right' style='color:#FFF;'>".$data['download_count']."</td>\n</tr>\n";
	}
	echo "</table>";
} else {
	echo "<center>nera</center>\n";
}
closeside_panel();
?>


Dekoju is anksto ;)