Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Panele naujausias straipsnis

Parašė Roksys· 2011 Sau. 25 18:01:32
#1

Susiradau panele "naujausias straipsnis" (t.y. kad rodytu naujausia visa straipsni pagrindiniame psl.). Bet yra siokia tokia beda kaip padaryti kad panaleje veiktu eiluciu lauzymas?

$shading = true; // 
$num_articles = 0;   // 
 
if (file_exists(INFUSIONS."articles_list_panel/locale/".$settings['locale'].".php")) {
	include INFUSIONS."articles_list_panel/locale/".$settings['locale'].".php";
} else {
	include INFUSIONS."articles_list_panel/locale/English.php";
}
 
function display_articles($article,$category,$a_author) {
	$display_article = "<tr>\n<td align='left' class='tbl2'><a href='".BASEDIR."readarticle.php?article_id=".$article['article_id']."'><b>".$article['article_subject']."</b></a></td>
		<tr><td colspan='5' class='tbl1'><span class=''>".$article['article_article']."</span></td></tr>"; 
	return $display_article;
}
opentable($locale['ALP_001']);
	$most_recent_articles = dbquery("SELECT * FROM ".$db_prefix."articles ORDER BY article_id DESC");
	echo "<table width='100%' cellpadding='0' cellspacing='0' style='text-indent:2px'>\n<tr>\n";
 
	if (dbrows($most_recent_articles)) {
		while($article = dbarray($most_recent_articles)) { 
			if ( $x <= $num_articles ) {
				echo display_articles($article,$category,$a_author);
				$x++;
			}
		}
	} else {
		echo "<tr><td colspan='5' align='center'><p>".$locale['ALP_007']."</p></td></tr>";  
	}
	echo "</table>";
	closetable();