Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Bendroji Off-Topic Tema(Wipe 4)

Parašė Gugiss· 2008 Bir. 27 14:06:43
#1085

Bože moj karuočia pamūčinkit man trupučiuką. Padariau kad rodytų 3 paskutines naujienas, bet kažkodėl rodo tik 1. Kame bitė?

  $result = dbquery("SELECT * FROM ".$db_prefix."news LEFT JOIN ".$db_prefix."news_cats ON news_cat_id = news_cat 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,3");
while ($data = dbarray($result)) {
$title = $data['news_subject'];
$nc_img = $data['news_cat_images'];
$n_text = $data['news_news'];
$n_text2 = trimlink($n_text, 120);
$cat = $data['news_cat_name'];
$folder = $data['news_cat_folder'];
$sh_title = $title;
$n_id = $data['news_id'];
$v_id = $data['news_reads'];
$comments_n = dbcount("(comment_id)", "comments", "comment_type='N' AND comment_item_id=$n_id");
$date = $data['news_datestamp'];
$n_date = showdate("%Y %B %d", $date);
$name = $data['news_cat'];
echo "<div class='welcome_box' id='layer_welcome'>";

echo "<a href='$folder/naujienos.php'><img src='$nc_img' width='80' height='80' align='left'></a><span style='color:orange'><b>$title</b></span><br>$n_text2<br><br><a href='$folder/naujienos.php?$n_id'><b>Toliau</b></a><br><br>";
}
echo "</div>";
echo "<div class='welcome_box' id='layer_license'>".$locale['ip_020']."</div>";
echo "<div class='welcome_box' id='layer_version'>".$locale['ip_030']."</div>";
echo "<div class='welcome_box' id='layer_copyright'>".$locale['ip_040']."</div>";