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

Parašė Deiviuxsz· 2011 Lap. 15 22:11:06
#1

Sveiki,kaip reikia perdaryti i naujausius siuntinius o ne naujienas?
Stai kodas:


<?php
/*---------------------------------------------------------------------------+
| PHP-Fusion: Modifikacija
| Sukurë:
| Skype:
+----------------------------------------------------------------------------+
| Failas: naujausi.php
| Versija: v0.01
+---------------------------------------------------------------------------*/

if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }

   $qresult=dbquery("SELECT * FROM ".DB_NEWS." ORDER BY RAND() LIMIT 0,08");
   
   if(dbrows($qresult)!=0){   
   echo "<table width='150' cellpadding='0' cellspacing='0'>";
   while($data=dbarray($qresult)){
   echo "<tr><td class='naujausi-top-tekstas'>";
   echo "<img src='".THEME."paveiksliukai/rodyklele.png'>";
   echo "<a href='news.php?readmore=".$data['news_id']."' title='".$data['news_subject']."' class='naujausi-top-tekstas'>";
   echo trimlink($data['news_subject'], 23)."";
   echo "</td><td class='naujausi-top-tekstas' align='right'>".$data['news_reads']."</td></tr>"; }
   echo "</table>";
      
   } else {
   echo "<br><br><br><br><br><div class='naujausi-top-tekstas' style='text-align:center'>Filmų nėra...</div>"; }

?>





Parašė mNm.· 2011 Lap. 15 22:11:42
#2


$result = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_submit = '0' ORDER BY download_datestamp DESC LIMIT 10");
if (dbrows($result) != 0) {
	echo "<table width='100%' cellpadding='0' cellspacing='0'>";
	while($data = dbarray($result)) {
		$itemsubject = trimlink($data['download_title'], 30);
		$dateadded = date('Y-m-d', $data['download_datestamp']);
		echo "<tr>\n<td class='small' align='left'>» <a href='".BASEDIR."downloads.php?page_id=".$data['download_id']."'title='".$data['download_title']."' class='side'><font size='1'>$itemsubject</font></a></td>
<td align='right' width='25%'>$dateadded</td>
\n</tr>\n";
	}
	echo "</table>";
	} else {
	echo "<center>Nėra siuntinių!</center>\n";
}