<?php if (@$_SESSION['leveluser'] == 'admin'){ ?>
<div class="sidebar-inner">
<h4>Menu Admin</h4>
<ul>
	<li><a style='margin-bottom:2px;' class='btn btn-success btn-block' href="contact.adm">Kelola Contact</a></li>
	<li><a style='margin-bottom:2px;' class='btn btn-success btn-block' href="media.php?module=hal_web">Halaman WEB</a></li>
	<li><a class='btn btn-danger btn-block' href="media.php?module=berita">Data Berita</a></li>
    <li><a class='btn btn-danger btn-block' href="logout.php">Logout</a></li>
</ul>
</div>
<?php } ?>
<div class="sidebar-inner">
<h4>Waktu Hari ini</h4>
<br />
<center>
<embed src='images/small-website-calendar-141.swf' style='margin-top:-20px;' quality='high' bgcolor='black' width='245' height='250' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi? P1_Prod_Version=ShockwaveFlash'>
</center>
</embed>
</div>

<div class="sidebar-inner">
<h4>Informasi Terbaru</h4>
<?php
	  $sql=mysql_query("select * from tb_berita order by rand() LIMIT 2");
	  while($r=mysql_fetch_array($sql)){
		  $tgl = tgl_indo($r['tanggal']);
		  $judul = nl2br($r['judul']);
		  $isijudul = substr($judul,0, 36);

		  $isi_berita = nl2br($r['isi_berita']);
		  $isi = substr($isi_berita,0, 160);
		  $isi = substr($isi_berita,0,strrpos($isi," "));
			echo "<table><tr>
						<span class='sidebar-title'><a href=news-$r[id_berita].adm>$isijudul...</a></span>
						 <div class='date'>Diposting pada : $r[hari], $tgl - $r[jam] WIB  </div>
						 <p>$isi [...]</p><hr>";
		 }
			echo "</table><br>";
?>
</div>

