<table width="100%"  border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td><strong>DAFTAR MOU DATUN </strong></td>
  </tr>
  <tr>
    <td><table width="100%"  border="0" cellspacing="2" cellpadding="2">
      <tr>
        <td width="82%">Daftar MOU yang telah dilakukan bidang Datun untuk diketahui pimpinan</td>
        <td width="18%"><a href="?g=moupost&d=inc" class="menu">TAMBAH BARU </a></td>
      </tr>
    </table>

      <table width="100%"  border="0" cellspacing="4" cellpadding="4">
        <tr>
          <td><?
include("index.db.php");
$page = $_GET["page"];
$mytable = "mou";
if(empty($action))
{
if (empty($order)) $order =  2;
if (empty($page))  $page  =  1;
if (empty($hits))  $hits  = 100;
$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 "MOU DATUN <strong>$xnum</strong> | ";
for ($i=1;$i<=$stw2;$i++) {if($page==$i){
echo "Halaman <b>$i</b> ";} 
else{echo " <font size=\"2\"><a href=\"index.page.php?g=mou&d=inc&page=$i\">$i</A></font> ";}}
print ('<br><br>');
$query  = "SELECT * FROM ".$mytable." ";
if(!empty($squery)) { $query .= "WHERE i_id LIKE \"%$squery%\" ";}
$query .= "ORDER BY d_id DESC LIMIT $start,$hits";
$res = mysql_query($query);
print ('<table id="myTable" width="100%"  border="0" cellspacing="1" cellpadding="1" bgcolor="#B0B0B0">
        <thead><tr>
<td width="5%"><span class="style1"><strong>NO</strong></span></td>
<td width="10%"><span class="style1"><strong>TGL MOU</strong></span></td>
<td width="75%"><span class="style1"><strong>MOU DENGAN & TENTANG</strong></span></td>
<td width="10%"><span class="style1"><strong>View</strong></span></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['d_id'].'</center></td>');
print ('<td>'.$row['d_tgl'].'</td>');

print ('<td><b>'.$row['d_dengan'].'</b><br>');

print (''.$row['d_tentang'].'</td>');
print ('<td>EDIT / DELETE</td>');
print ('</tr>');
}
print ('</tbody></table>');
echo "<br><br>Ditampilkan $hits /Halaman";
}
?>
          </td>
        </tr>
      </table>
  </td>
  </tr>
</table>
