
<table width="100%"  border="0" cellspacing="1" cellpadding="0">
  <tr>
    <td width="14%"><a href="?g=suratmasuk&i=index&jenis=1" class="menupidsus">SURAT BIASA </a></td>
    <td width="13%"><a href="?g=suratmasuk&i=index&jenis=2" class="menupidsus">SURAT DALAM </a></td>
    <td width="7%"><a href="?g=suratmasuk&i=index&jenis=3" class="menupidsus">SPDP</a></td>
    <td width="11%"><a href="?g=suratmasuk&i=index&jenis=4" class="menupidsus">NOTA DINAS</a> </td>
    <td width="11%"><a href="?g=suratmasuk&i=index&jenis=5" class="menupidsus">KEP</a></td>
    <td width="15%"><a href="?g=suratmasuk&i=index&jenis=6" class="menupidsus">SURAT PERINTAH</a></td>
    <td width="15%"><a href="?g=suratmasuk&i=index&jenis=7" class="menupidsus">PENGANTAR</a></td>
    <td width="14%"><a href="?g=suratmasuk&i=index&jenis=9" class="menupidsus">UNDANGAN</a></td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="8" cellpadding="8">
  <tr>
    <td width="2%" valign="top">&nbsp;</td>
    <td colspan="2" valign="top"><table width="100%"  border="0" cellspacing="6" cellpadding="6">
      <tr>
        <td><?PHP
		$mytable = $tablesurat;
		$jenis = $_GET['jenis'];
		  $mytabler = $mytable.''.$jenis;
if(empty($action))
{
if (empty($order)) $order =  2;
if (empty($page))  $page  =  1;
if (empty($hits))  $hits  = 50;
$start = $hits*($page-1);
$query = "SELECT * FROM $mytabler where tu_disposisi !== '' && tu_ekspedisi == '4'";
$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;} 
if ($jenis == "1") { echo "SURAT BIASA -";} 
elseif ($jenis == "2") {echo "SURAT BIASA DALAM -";} 
elseif ($jenis == "3") {echo "SPDP -";} 
elseif ($jenis == "4") {echo "NOTA DINAS -";} 
elseif ($jenis == "5") {echo "KEPUTUSAN -";} 
elseif ($jenis == "6") {echo "SPRINT -";} 
elseif ($jenis == "7") {echo "PENGANTAR -";} 
elseif ($jenis == "8") {echo "RAHASIA -";} 
elseif ($jenis == "9") {echo "UNDANGAN -";} 
echo " SURAT TAHUN : $edisi - <strong>$xnum</strong> | ";
for ($i=1;$i<=$stw2;$i++) {if($page==$i){
echo "Halaman <b>$i</b> ";} 
else{echo " <font size=\"2\"><a href=\"?g=viewsurat&i=index&page=$i\">$i</A></font> ";}}
print ('<br><br>');
$query  = "SELECT * FROM ".$mytabler." where tu_disposisi !== '' && tu_ekspedisi == '4'";
if(!empty($squery)) { $query .= "WHERE tu_id LIKE \"%$squery%\" ";}
$query .= "ORDER BY tu_id DESC LIMIT $start,$hits";
$res = mysql_query($query);
print ('<table id="myTable" width="100%"  border="0" cellspacing="1" cellpadding="1" bgcolor="#B05800">
        <thead><tr>
<td width="5%"><span class="style1"><strong>N.A.</strong></span></td>
<td width="10%"><span class="style1"><strong>TGL SURAT</strong></span></td>
<td width="15%"><span class="style1"><strong>NO SURAT</strong></span></td>
<td width="13%"><span class="style1"><strong>ASAL SURAT</strong></span></td>
<td width="5%"><span class="style1"><strong>LAMP</strong></span></td>
<td width="25%"><span class="style1"><strong>PERIHAL / ISI SURAT</strong></span></td>
<td width="25%"><span class="style1"><strong>ISI DISPOSISI</strong></span></td>
<td width="2%"><span class="style1"><strong>FD</strong></span></td>
</tr></thead><tbody>');
 $x=0;
  while($row = mysql_fetch_array($res))
  {
   $x++;
   if($x==2) {$barva = "FFFFB7";$x=0;} else {$barva = "FFD8B0";$x=1;}
$id = $row['tu_id'];
$nosrt = $row['tu_nosrt'];
print ('<tr bgcolor=#'.$barva.'>');
print ('<td>');
echo $na = $row['tu_noagenda'];
print ('</td>');
print ('<td>'.$row['tu_tglsrt'].'</td>');
print ('<td>'.$row['tu_nosrt'].'</td>');
print ('<td>'.$row['tu_asalsrt'].'</td>');
print ('<td>'.$row['tu_lamp'].'</td>');
print ('<td>'.$row['tu_perihal'].'</td>');
print ('<td><b>');
if ($mytables == "3" && $row['tu_disposisi'] == ""){
echo "<a href=\"index.print.spdp.disposisi.php?uid=$id&table=$mytable$mytables&nosurat=$nosrt&&jenis=$mytables&noagenda=$na\" onclick=\"NewWindow(this.href,'mywin','700','450','yes','center');return false\" onfocus=\"this.blur()\">TUNJUK JAKSA</a>";
}
elseif ($mytables !== "3" && $row['tu_disposisi'] !== ""){
if ($row['tu_ekspedisi'] == "0") {
echo "<a href=\"index.viewsurat.disposisi.php?uid=$id&table=$mytable$mytables&nosurat=$nosrt \" onclick=\"NewWindow(this.href,'mywin','700','300','yes','center');return false\" onfocus=\"this.blur()\"  class=\"menu\" >ISI DISPOSISI</a>";
} 
elseif ($row['tu_ekspedisi'] == "1") {echo "Kasubagbin: ";} 
elseif ($row['tu_ekspedisi'] == "2") {echo "Kasi Intel: ";} 
elseif ($row['tu_ekspedisi'] == "3") {echo "Kasi Pidum: ";} 
elseif ($row['tu_ekspedisi'] == "4") {echo "Kasi Pidsus: ";} 
elseif ($row['tu_ekspedisi'] == "5") {echo "Kasi Datun: ";} 
elseif ($row['tu_ekspedisi'] == "6") {echo "Kaur TU: ";} 
elseif ($row['tu_ekspedisi'] == "7") {echo "Lainnya: ";} 
//elseif ($row['tu_ekspedisi'] == "1") {echo "Kasubagbin: ";} 
//elseif ($row['tu_ekspedisi'] == "2") {echo "WAKAJATI: ";} 
//elseif ($row['tu_ekspedisi'] == "3") {echo "ASBIN: ";} 
//elseif ($row['tu_ekspedisi'] == "4") {echo "ASINTEL: ";} 
//elseif ($row['tu_ekspedisi'] == "5") {echo "ASPIDUM: ";} 
//elseif ($row['tu_ekspedisi'] == "6") {echo "ASPIDSUS: ";} 
//elseif ($row['tu_ekspedisi'] == "7") {echo "ASDATUN: ";} 
//elseif ($row['tu_ekspedisi'] == "8") {echo "ASWAS: ";} 
//elseif ($row['tu_ekspedisi'] == "9") {echo "KABAG TU: ";}
//elseif ($row['tu_ekspedisi'] == "10") {echo "LAINNYA: ";}   
print ('</b>');
if ($row['tu_disposisi'] !== "") {print (''.$row['tu_disposisi'].'');
} 
elseif ($row['tu_print'] == "") {
print ('');
}
}
print ('</td>');
print ('<td><a href="../tatapersuratan/'.$mytable.'/');
if ($jenis == "1") { echo "BU-";} 
elseif ($jenis == "2") {echo "BD-";} 
elseif ($jenis == "3") {echo "SPDP-";} 
elseif ($jenis == "4") {echo "ND-";} 
elseif ($jenis == "5") {echo "KEP-";} 
elseif ($jenis == "6") {echo "SPRINT-";} 
elseif ($jenis == "7") {echo "TAR-";} 
elseif ($jenis == "8") {echo "R-";} 
elseif ($jenis == "9") {echo "UND-";} 
print (''.$row['tu_noagenda'].'.pdf" target="_blank"><img src="../images/pdf-ico.png" width="25" height="32"></a></td>');
//--------------
print ('</tr>');
}
print ('</tbody></table>');
echo "<br><br>Ditampilkan $hits Surat /Halaman";
}

?></td>
      </tr>
    </table>
   </td>
  </tr>
  <tr>
    <td valign="top">&nbsp;</td>
    <td width="6%" valign="top"><div align="center"><img src="../images/pdf-ico.png" width="33" height="40"> </div></td>
    <td width="92%">File scan digital disimpan dalam bentuk PDF pastikan komputer untuk melihat telah terinstall aplikasi pedukung pembuka file pdf </td>
  </tr>
</table>
