<table width="100%"  border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td><div align="center"><strong>LAPINHAR (Laporan Informasi Harian)</strong></div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="90%"  border="0" align="center" cellpadding="2" cellspacing="2" class="panel">
  <tr>
    <td width="87%"><p align="center">laporan hasil kegiatan pengumpulan data/informasi dari satuan organisasi intelejen mengenai situasi/ masalah yang berkaitan dengan aspek hukum . </p>      
    </td>
    <td width="13%"><a href="?g=lapinharpost&d=inc" class="menu">TAMBAH BARU </a></td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="4" cellpadding="4">
  <tr>
    <td>&nbsp;    </td>
  </tr>
  <tr>
    <td><?
include("intel_.db.inc.php");
$mytable = "tlapinhar";
$page = $_GET["page"];
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 "JUMLAH LAPINHAR <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 SURAT</strong></span></td>
<td width="20%"><span class="style1"><strong>NO SURAT</strong></span></td>
<td width="33%"><span class="style1"><strong>PERIHAL</strong></span></td>
<td width="23%"><span class="style1"><strong>PENDAPAT KAJARI</strong></span></td>
<td width="3%"><span class="style1"><strong>EDIT</strong></span></td>
<td width="3%"><span class="style1"><strong>VIEW</strong></span></td>
<td width="3%"><span class="style1"><strong>DEL</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_no'].'</td>');

print ('<td>');
$i_info1 = $row['i_info'];
$maxlen=200;
if (strlen($i_info1)>$maxlen)
echo $i_info2 = substr($i_info1,0,$maxlen-3)."*****";
else 
echo $i_info2  = $i_info1;
print ('</td><td>');

if ($row['i_pdpt_kajari'] == "") {
print ('<center>-kosong-</center>');} 
elseif ($row['i_pdpt_kajari'] !== "") {
print ('<font color="green"><b><center>'.$row['i_pdpt_kajari'].'</center></b></font>');} 
print ('</td>');
print ('<td><a href="?g=lapinharedit&d=inc&id='.$row['i_id'].'" ><img src="./images/intel_edit.png" width="40" height="40"></a></td>');
print ('<td><a href="?g=viewlapinhar&d=inc&id='.$row['i_id'].'" ><img src="./images/intel_view.png" width="40" height="40"></a></td>');
print ('<td><a href="inc/intel_delete.php?id='.$row['i_id'].'&do=lapinhar" ');
echo "onclick=\"NewWindow(this.href,'mywin','400','200','yes','center');return false\" onfocus=\"this.blur()\" target=\"_blank\"><img src=\"./images/intel_delete.png\" width=\"40\" height=\"40\"></a></td>";
print ('</tr>');
}
print ('</tbody></table>');
echo "<br><br>Ditampilkan $hits /Halaman";
}
?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
