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

Parašė Am1go· 2010 Lap. 18 00:11:55
#1

Sveiki, turiu 2 php failus, populeriausiom ir naujausiom naujienom.. ir gal kas nors galit juos pakoreguot kad rodytu populeriausia ir naujausia muzika?
štai kodai kam nesunku padėkit ;)

POPULERIAUSIA MUZIKA:


<?php
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
 
$result = dbquery("SELECT * FROM ".$db_prefix."news 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) {
	echo "<table width='274' cellpadding='0' cellspacing='0' align='left'>\n";
	while ($data = dbarray($result)) {
	$title = $data['news_subject'];
	$id = $data['news_id'];
	$views = $data['news_reads'];
	echo "<tr>
	<td align='left'><a href='".BASEDIR."downloads.php?d_id=' style='color: #FFFFFF'>".trimlink($title, 35)."</a></td>
	<td align='right'><span style='color: #FFFFFF'>[$views]</span></td>
	</tr>\n";
	}
	echo "</table>";
}
 
?>




NAUJAUSIA MUZIKA:



<?php
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
 
$result = dbquery("SELECT * FROM ".$db_prefix."news WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") ORDER BY news_datestamp DESC LIMIT 0,5");
if (dbrows($result) != 0) {
	echo "<table width='274' cellpadding='0' cellspacing='0' align='left'>\n";
	while ($data = dbarray($result)) {
	$title = $data['news_subject'];
	$id = $data['news_id'];
	$views = $data['news_reads'];
	echo "<tr>
	<td align='left'><a href='".BASEDIR."news.php?readmore=$id' style='color: #FFFFFF'>".trimlink($title, 35)."</a></td>
	<td align='right'><span style='color: #FFFFFF'>[$views]</span></td>
	</tr>\n";
	}
	echo "</table>";
}
 
?>



Už pagalba +10 ;)