<table width="100%"  border="0" cellspacing="1" cellpadding="1">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="1" cellpadding="1" class="panel">
  <tr>
    <td><table width="100%"  border="0" cellspacing="4" cellpadding="4" >
        <tr>
          <td bgcolor="#99CC33"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
            <tr>
              <td><strong>INFO DISPOSISI</strong> </td>
            </tr>
          </table></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%"  border="0" cellspacing="6" cellpadding="0">
      <tr>
        <td bgcolor="#FFFFB7"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
            <tr>
              <td>DAFTAR YANG TELAH DI DISPOSISI KAJARI DAN SIAP DILAKSANAKAN / MENJADI PERHATIAN </td>
            </tr>
          </table>
            <table width="100%"  border="0" cellspacing="4" cellpadding="4">
              <tr>
                <td width="25%">DISPOSISI LAPINSUS </td>
                <td width="2%">:</td>
                <td width="73%"><? $link = mysql_connect("localhost", "root", "benk"); mysql_select_db("cma_intel", $link);
$result = mysql_query("SELECT * FROM tlapinhar where i_ntfyintel = '1'", $link);
$num_rows = mysql_num_rows($result);
if ($num_rows == 0) {
print ('TIDAK ADA LAPINHAR BARU BARU YANG SUDAH DI DISPOSISI'); 
} elseif ($num_rows >=1) {
print ('<a href="?g=lapinhar&d=inc&name='.$name1.'&session='.$session1.'" ><b>[ '.$num_rows.' ] LAPINHAR BARU YANG SUDAH DISPOSISI</b> </a><img src="images/ico_new.gif" width="22" height="12">');
} ?></td>
              </tr>
              <tr>
                <td>DISPOSISI LAPINHAR </td>
                <td>:</td>
                <td><? $link = mysql_connect("localhost", "root", "benk"); mysql_select_db("cma_intel", $link);
$result = mysql_query("SELECT * FROM tlapinsus where i_ntfyintel = '1'", $link);
$num_rows = mysql_num_rows($result);
if ($num_rows == 0) {
print ('TIDAK ADA LAPINSUS BARU YANG SUDAH DI DISPOSISI'); 
} elseif ($num_rows >=1) {
print ('<a href="?g=lapinsus&d=inc&name='.$name1.'&session='.$session1.'" ><b>[ '.$num_rows.' ] LAPINSUS BARU YANG SUDAH DISPOSISI</b> </a><img src="images/ico_new.gif" width="22" height="12">');
} ?></td>
              </tr>
              <tr>
                <td>DISPOSISI KIRKA </td>
                <td>:</td>
                <td><? $link = mysql_connect("localhost", "root", "benk"); mysql_select_db("cma_intel", $link);
$result = mysql_query("SELECT * FROM tlapkirka where i_ntfyintel = '1'", $link);
$num_rows = mysql_num_rows($result);
if ($num_rows == 0) {
print ('TIDAK ADA LAPORAN KIRKA BARU YANG SUDAH DI DISPOSISI'); 
} elseif ($num_rows >=1) {
print ('<a href="?g=kirka&d=inc&name='.$name1.'&session='.$session1.'" ><b>[ '.$num_rows.' ] LAPORAN KIRKA BARU YANG SUDAH DISPOSISI</b> </a><img src="images/ico_new.gif" width="22" height="12">');
} ?></td>
              </tr>
          </table></td>
      </tr>
    </table></td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="2" cellpadding="2" class="panel">
  <tr>
    <td><table width="100%"  border="0" cellspacing="6" cellpadding="6">
      <tr>
        <td>&nbsp;</td>
        <td><div align="center"><strong>PETA TEMATIK </strong></div></td>
      </tr>
      <tr>
        <td width="37%" valign="top"><table width="100%"  border="0" cellspacing="8" cellpadding="8">
            <tr>
              <td bgcolor="#CCFFFF"><?
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">
        <thead><tr>
<td width="5%"><strong>NO</strong></td>
<td width="80%"><strong>KEGIATAN</strong></td>
<td width="15%"><strong>TGL GIAT</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>'.$row['i_tgldo'].'</td>');
print ('</tr>');
}
print ('</tbody></table>');
}
?></td>
            </tr>
          </table>
            <table width="100%"  border="0" cellspacing="8" cellpadding="8">
              <tr>
                <td bgcolor="#FFFFCA"> <span class="tabContents">
                  <?
include("../index.cma.db.php");
mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$mytable = "tab_polisi";
if(empty($action))
{
if (empty($order)) $order =  2;
if (empty($page2))  $page2  =  1;
if (empty($hits))  $hits  = 100;
$start = $hits*($page2-1);
$query = "SELECT * FROM $mytable ORDER BY p_id DESC";
$res = mysql_query("$query"); 
$xnum = mysql_num_rows($res);
$stw2 = (int)($xnum/$hits);
if ($xnum%$hits > 0) {$stw2++;}
$np = $page2+1;
$pp = $page2-1;
if ($page2 == 1) { $pp=1; }
if ($np > $stw2) { $np = $stw2;} 

$query  = "SELECT * FROM $mytable ";
if(!empty($squery)) { $query .= "LIKE \"%$squery%\" ";}
$query .= "ORDER BY p_id DESC LIMIT $start,$hits";
$res = mysql_query($query);
print ('<table width="100%"  border="0" cellspacing="2" cellpadding="2">
      <tr>
         <td width="80%">SUMBER SPDP</td>
		 <td width="20%">Jumlah Masuk</td>
      </tr>');
 $x=0;
  while($row = mysql_fetch_array($res))
  {
   $x++;
   if($x==2) {$barva = "FF6600";$x=0;} else {$barva = "FFFFCC";$x=1;}
   
//---------kolom 1
print ('<tbody><tr bgcolor=#'.$barva.'>');
print ('<td><b>'.$row['p_nama'] .'</b></td>');
print ('<td><b>');
$nomor = $row['p_nomor'];
//-----------------
$query = "Select * from tab_dataperkara where t_id = '1'"; 
$result = mysql_query($query); 
if($row = mysql_fetch_array($result)){ 
$mytabler1 = $row['t_table'];
$link = mysql_connect("$server", "$username", "$password"); mysql_select_db("$database", $link);
$result1 = mysql_query("SELECT * FROM $mytabler1 where spdp_dari = '$nomor'", $link);
$num_rows = mysql_num_rows($result1);

print (''.$num_rows.'');
}
print ('</b></td>');
//--------------------
print ('</tr>');} 
print ('</tbody> </table>');
}
?>
                </span></td>
              </tr>
          </table></td>
        <td width="63%"><div align="center"><img src="../themes/peta_tematik.png" width="800" height="614"></div></td>
      </tr>
      <tr>
        <td valign="top">&nbsp;</td>
        <td><div align="right">Peta diatas dapat diganti dalam folder themes dengan jenis file PNG (Transparan) </div></td>
      </tr>
    </table></td>
  </tr>
</table>
