<?
//***************************************************
// http://www.niadesain.com
// Solusi Hemat Script Bisnis Online Anda
// Menerima Jasa Pembuatan Website & Template Website
//***************************************************
?>
<?php
$table=mysql_real_escape_string('berita');
//$query = "SELECT * FROM {$table} ORDER BY RAND() limit 11";
  $query = "SELECT * FROM {$table} where published='1' ORDER BY id_berita DESC";
$hasil = mysql_query($query);

while($b=mysql_fetch_array($hasil)){

    $adafoto = $b[gambar];

                if ($adafoto !=''){
                echo "<a href=./?scrindo=detailberita&nid=$b[id_berita]&id=$id><img class='sidebar-gallery' src='images/news/".$b[gambar]."' width=125 height=51 hspace=8 vspace=8 alt='$b[judul]' title='$b[judul]'></a>";
		}
		else
		{
                echo "<a href=./?scrindo=detailberita&nid=$b[id_berita]&id=$id><img class='sidebar-gallery' src='images/news/noimage.jpg' width=125 height=51 hspace=8 vspace=8 alt='$b[judul]' title='$b[judul]'></a>";
		}

}
?>