<?
//*********************************************************************************
// Original Website By : Niadesain.com Di Jual melalui http://niadesain.com
// Please Call / SMS : 081384745483 (support@niadesain.com)
// Niadesain.com - Jasa Pembuatan Website Paling Murah dan Paling Lengkap
//*********************************************************************************
?>
<?
 $db->insert("click", "", "'$ref', '$clientdate', '$clienttime', '$clientbrowser', '$REMOTE_ADDR', '$clienturl', ''");
?>   	

<style type="text/css">
<!--
.isi {
	font-family:verdana;
	font-size:11px;
	padding-left:4px;
	text-align:left;
	line-height: 16px;
}
iframe{/*Perform to all iframes*/
        width: 100%;
        margin: 5px;
    }
}
.bullet{
	font-family:Tahoma;
	font-size:14px;
	padding-left:4px;
	color:#ffffff;
	text-align:justify;
	line-height: 18px;
}
.isi_kecil{
	font-family:Tahoma;
	font-size:11px;
	padding-left:4px;
	color:#FF6600;
}
.judul {
	font-family:Tahoma;
	font-size:12px;
	font-weight:bold;
	color:#265180;
	padding-left:4px;
}
.judul_head {
	font-family:Georgia;
	font-size:12px;
	font-weight:bold;
	background-color: #B7BCC2;
  color:#333333;
  padding-left:4px;
}
.kembali {
	font-family:Tahoma;
	font-size:11px;
	padding-left:4px;
	text-align:center;
}
.style3 {
	font-size: 12px;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-weight: bold;
}
-->
</style>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#E5E5E5" style="border-collapse: collapse">
  <tr bgcolor="#FF0000" > 
    <td height="40" colspan="3" align="center" bgcolor="#FFFFFF" ><span class="style3">BERITA SELENGKAPNYA </span></td>
  </tr>
  <tr> 
    <td width="14" height="3" align="center"><div align="justify"><font color="" size="2" face="Tahoma, Arial, Helvetica, sans-serif"><font size="1"><font face="Verdana, Arial, Helvetica, sans-serif"><font size="1"><font face="Arial, Helvetica, sans-serif"><font size="1"><font size="1"><font face="Verdana, Arial, Helvetica, sans-serif"><font size="2"><font face="Arial, Helvetica, sans-serif"></font></font></font></font></font></font></font></font></font> 
        </font></div></td>
    <td width="500" rowspan="2" align="center"><div align="left">
      <p><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><span class="cc01">
        <?
$db->select("id_berita, id_user, judul, isi_berita, gambar, tanggal, counter, published", "berita", "id_berita='$nid'","");
	$row = $db->fetch_row();
	$adafoto = $row[4];
	    echo "<table>";
	    echo "<tr><td>";
		echo "<div class=isi>post: $row[5]</div>";
		echo "<div class=isi>berita ini telah dibaca: $row[6] kali</div>";
		echo "<br>";
		echo "</td></tr>";
		echo "<tr><td align=center>";
		if ($adafoto !=''){
		echo "<div class='imgku'><img src='images/news/".$row[4]."' width= height= align=center></a></div>";
		}
		else
		{
		echo "<div class='imgku'><img src='images/noimage.jpg' width=200 height=200 align=center></a></div>";
		} 
		echo "</td></tr>";
		echo "<tr><td>";
		
		//echo "<div class='author'><em>Oleh: $row[2]</em></div>";
		echo "<br>";
		echo "<div class=judul>$row[2]</a></div>";
		echo "<br>";
		
		// Tampilkan hanya sebagian isi berita 
  	  	$isi_berita = nl2br($row[3]);
    	$isi = substr($isi_berita,0,400); // ambil sebanyak 410 karakter
   		 $isi = substr($isi_berita,0,strrpos($isi," ")); // spasi antar kalimat 
		echo "<tr><td class=isi>$row[3]</td></tr>";
		echo "<br>";
		echo "<tr><td class=kembali><br>
        [ <a href=javascript:history.go(-1)>Kembali</a> ]</td></tr>";	  
		echo "</td></tr></table>";
		$db->update("berita", "counter=$row[6]+1", "id_berita='$nid'");
?>
        </span></font></p>
      <p>&nbsp;</p>
    </div></td>
    <td width="16" align="center">&nbsp;</td>
  </tr>
  <tr>
    <td height="4" align="center">&nbsp;</td>
    <td width="16" align="center">&nbsp;</td>
  </tr>
</table>
