<table width="100%"  border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="90%"  border="0" align="center" cellpadding="2" cellspacing="2" class="panel">
  <tr>
    <td><strong>AGENDA INTELIJEN</strong>   
    </td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="90%"  border="0" align="center" cellpadding="2" cellspacing="2">
  <tr>
    <td width="82%">Daftar Acara Intelijen yang terarah untuk diketahui pimpinan, JMS, TP4D, Sosialisasi </td>
    <td width="18%"><a href="?g=agendapost&d=inc" class="menu">TAMBAH BARU </a></td>
  </tr>
</table>
<table width="95%"  border="0" align="center" cellpadding="4" cellspacing="4">
  <tr>
    <td>&nbsp;    </td>
  </tr>
  <tr>
    <td><?
include("intel_agendaintel.db.inc_.php");
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 "AGENDA INTELIJEN <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" bgcolor="#B0B0B0">
        <thead><tr>
<td width="5%"><span class="style1"><strong>NO</strong></span></td>
<td width="10%"><span class="style1"><strong>TGL POST</strong></span></td>
<td width="55%"><span class="style1"><strong>KEGIATAN</strong></span></td>
<td width="15%"><span class="style1"><strong>TGL PELAKSANAAN</strong></span></td>
<td width="15%"><span class="style1"><strong>DELETE</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['i_id'].'</center></td>');
print ('<td>'.$row['i_tgl'].'</td>');

print ('<td>'.$row['i_kegiatan'].'</td>');

print ('<td>'.$row['i_tgldo'].'</td>');
print ('<td><a href="inc/intel_delete.php?id='.$row['i_id'].'&do=agendaintel" ');
echo "onclick=\"NewWindow(this.href,'mywin','400','200','yes','center');return false\" onfocus=\"this.blur()\" class=\"menu\" target=\"_blank\">DELETE</a></td>";
print ('</tr>');
}
print ('</tbody></table>');
echo "<br><br>Ditampilkan $hits /Halaman";
}
?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
