<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="panel">
  <tr bgcolor="#99CC33">
    <td width="79%"><table width="100%"  border="0" cellspacing="2" cellpadding="2">
      <tr>
        <td><strong>TP4</strong></td>
      </tr>
    </table></td>
    <td width="21%"><a href="?g=tp4post&d=inc" class="menu">TAMBAH BARU</a></td>
  </tr>
  <tr>
    <td colspan="2"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
        <tr>
          <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="56%">&nbsp;</td>
              <td width="18%"><div align="right">Lampiran</div></td>
              <td width="3%">:</td>
              <td width="23%">Surat JAM Intelijen Nomor </td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>B-1104/D/Dek/08/2017</td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>Tanggal 28 Agustus 2017 </td>
            </tr>
          </table>
            <table width="100%"  border="0" cellspacing="2" cellpadding="2">
              <tr>
                <td><div align="center"><strong>TABEL LAPORAN KEGIATAN </strong></div></td>
              </tr>
              <tr>
                <td><div align="center"><strong>TIM PENGAWAL DAN PENGAMAN PEMERINTAHAN DAN PEMBANGUNAN (TP4) DAERAH </strong></div></td>
              </tr>
              <tr>
                <td><div align="center"><strong><?PHP echo $satker; ?></strong></div></td>
              </tr>
            </table></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td colspan="2"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
        <tr>
          <td width="100%" bgcolor="#FFFFFF"><?
include("intel_tp4.db.inc.php");
if(empty($action))
{
if (empty($order)) $order =  2;
if (empty($page))  $page  =  1;
if (empty($hits))  $hits  = 30;
$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 DATA : <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 tid LIKE \"%$squery%\" ";}
$query .= "ORDER BY tid 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="4%"><span class="style1"><strong>EDIT</strong></span></td>
<td width="3%"><span class="style1"><strong>NO</strong></span></td>
<td width="10%"><span class="style1"><strong>KEGIATAN</strong></span></td>
<td width="5%"><span class="style1"><strong>K/L/D/I</strong></span></td>
<td width="10%"><span class="style1"><strong>JENIS PEKERJAAN/PROYEK</strong></span></td>
<td width="10%"><span class="style1"><strong>PAGU ANGGARAN</strong></span></td>
<td width="8%"><span class="style1"><strong>SUMBER DANA APBN/APBD</strong></span></td>
<td width="10%"><span class="style1"><strong>TAHAPAN PROYEK/PEKERJAAN</strong></span></td>
<td width="10%"><span class="style1"><strong>TAHAPAN PENGAWASAL & PENGAMANAN</strong></span></td>
<td width="10%"><span class="style1"><strong>NO & TANGGAL SURAT PERINTAH</strong></span></td>
<td width="10%"><span class="style1"><strong>PENYERAPAN ANGGARAN <br>(%)</strong></span></td>
<td width="10%"><span class="style1"><strong>KET</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><a href="?g=tp4edit&d=inc&id='.$row['tagenda'].'"><img src="./images/doc_edit.png" width="24" height="24"></a></center></td>');
print ('<td><center>'.$row['tagenda'].'</center></td>');
print ('<td>'.$row['tkegiatan'].'</td>');
print ('<td>'.$row['tkldi'].'</td>');
print ('<td>'.$row['tjenisproyek'].'</td>');
print ('<td><center>'.$row['tpagu'].'</center></td>');
print ('<td>');
if ($row['tdana'] == "1") {
print ('<center><img src="./images/intel_apbn.jpg" width="80" height="30"></center>');
} 
elseif ($row['tdana'] == "2") {

print ('<center><img src="./images/intel_apbd.jpg" width="80" height="30"></center>');
}
print ('</td>');
print ('<td>'.$row['ttahapan'].'</td>');
print ('<td>'.$row['tkawal'].'</td>');
print ('<td>'.$row['tsprint'].'</td>');
print ('<td><center>'.$row['tserap'].'%<center></td>');
print ('<td>'.$row['tket'].'</td>');


print ('</tr>');
}
print ('</tbody></table>');
}
?>
             </td>
        </tr>
    </table></td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="30"><div align="center"></div></td>
  </tr>
  <tr>
    <td height="30">&nbsp;</td>
  </tr>
  <tr>
    <td height="30"><div align="center">Hati-hati dalam input data. yang sudah tersave tidak bisa di delete nomor agenda </div></td>
  </tr>
  <tr>
    <td height="30">&nbsp;</td>
  </tr>
</table>
