<table width="100%"  border="0" cellspacing="6" cellpadding="6">
  <tr>
    <td width="17%" valign="top"><img src="images/profile-icon.png" width="200" height="155"></td>
    <td width="83%" valign="top"><table width="100%"  border="0" cellspacing="8" cellpadding="8">
      <tr>
        <td colspan="2"><?
include("../index.cma.db.php");
$mytable = "pengumuman";
if(empty($action))
{
if (empty($order)) $order =  2;
if (empty($page))  $page  =  1;
if (empty($hits))  $hits  = 20;
$start = $hits*($page-1);
$query = "SELECT * FROM $mytable";
$res = mysql_query("$query"); 
$xnum = mysql_num_rows($res);
$stw2 = (int)($xnum/$hits);
if ($xnum%$hits > 0) {$stw2++;}
$np = $page+1;
$pp = $page-1;
if ($page == 1) { $pp=1; }
if ($np > $stw2) { $np = $stw2;} 
echo "DAFTAR PENGUMUMAN <strong>$xnum</strong> | ";
for ($i=1;$i<=$stw2;$i++) {if($page==$i){
echo "Halaman <b>$i</b> ";} 
else{echo " <font size=\"2\"><a href=\"?id=$id1&page=$i\">$i</A></font> ";}}
print ('<br><br>');
$query  = "SELECT * FROM ".$mytable." ";
if(!empty($squery)) { $query .= "WHERE i_id LIKE \"%$squery%\" ";}
$query .= "ORDER BY i_id DESC LIMIT $start,$hits";
$res = mysql_query($query);
print ('<table id="myTable" width="100%"  border="0" cellspacing="1" cellpadding="1">
        <thead><tr>
<td width="5%"><strong>NO</strong></td>
<td width="85%"><strong>PENGUMUMAN</strong></td>
<td width="10%"><strong>DEL</strong></td>


</tr></thead><tbody>');
 $x=0;
  while($row = mysql_fetch_array($res))
  {
   $x++;
   if($x==2) {$barva = "FFFFFF";$x=0;} else {$barva = "FFFFD9";$x=1;}


print ('<tr bgcolor=#'.$barva.'>');
print ('<td><center>'.$row['i_id'].'</center></td>');

print ('<td>'.$row['i_kegiatan'].'<br>Posted.'.$row['i_tgl'].'</td>');
print ('<td><center><a href="?g=pengumumandel&i=index&id='.$row['i_id'].'" class="menupidum">HAPUS</a></center></td>');
print ('</tr>');
}
print ('</tbody></table>');
}
?></td>
      </tr>
      <tr>
        <td width="73%">Apabila terdapat pengumuman yang sudah tidak berlaku harap untuk di Hapus </td>
        <td width="27%"><a href="?g=pengumuman&i=index" class="menubin">TAMBAH BARU </a></td>
      </tr>
    </table></td>
  </tr>
</table>
