<? include("../index.cma.db.php");
mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$query = "Select * from tab_dataperkara where t_id = '1'"; 
$result = mysql_query($query); 
if($row2 = mysql_fetch_array($result)){ 
$tabler = $row2['t_table'];
?><style type="text/css">
<!--
body {
	background-color: #FFFFFF;
}
-->
</style><table width="100%"  border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td><table width="100%"  border="0" cellspacing="4" cellpadding="4">
      <tr>
        <td><strong>DAFTAR SPDP YANG TIDAK DILANJUTI DENGAN BERKAS PERKARA DAN TIDAK DI P17</strong></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td bgcolor="#FFE3DD"><form name="form1" method="post" action="index.keterlambatan.sms.php">
      <table width="100%"  border="0" cellspacing="4" cellpadding="4">
        <tr>
          <td width="100%">
            <?PHP
			
			date_default_timezone_set('UTC');
$link = mysql_connect("$server", "$username", "$password"); mysql_select_db("$database", $link);
$result = mysql_query("SELECT * FROM $tabler where late_spdp = '3'", $link);
$num_rows = mysql_num_rows($result);
echo "Jumlah Berkas Perkara : <b>$num_rows</b> Berkas\n<br><br>";
print ('<table width="100%"  border="0" cellspacing="0" cellpadding="0"><tr bgcolor="#996600">
<td height="20" width="40%"><span class="style1"><strong>NAMA TERSANGKA</strong></span></td>
<td height="20" width="25%"><span class="style1"><strong>SURAT DARI</strong></span></td>
<td height="20" width="35%"><span class="style1"><strong>JAKSA P16</strong></span></td>
</tr>');

$SQL     = "SELECT * FROM $tabler where late_spdp = '3' ORDER BY uid DESC";
$results = mysql_query($SQL);
while ($row = mysql_fetch_array($results)){
print ('<tr bgcolor="#FF0000"><td><span class="style1"><b>'.$row['spdp_namatsk'] .'</b></span></td><td height="30"><span class="style1">');
$spdpdari1 = $row['spdp_dari'];
 mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$sql=mysql_query("select * from tab_polisi where p_nomor = '$spdpdari1'");
while ($data=mysql_fetch_array($sql)){
print('<b>'.$data['p_nama'].'</b>');
}
print ('</span></td>');

print ('<td><span class="style1">');
$jaksa1 = $row['p16_jaksa1'];
 mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$sql=mysql_query("select * from tab_personil where daftar_pegid = '$jaksa1'");
while ($data=mysql_fetch_array($sql)){
print('<b>'.$data['daftar_nama'].'</b>');
}
print ('</span></td>');
print ('</tr>');

}
print ('<input name="key" type="hidden" id="key" value="late_spdp">');
print ('<input name="pesan" type="hidden" id="pesan" value="SPDP TANPA BERKAS SEGERA P17">');
print ('</table>');

?>           </td>
        </tr>
        <tr>
          <td bgcolor="#E8E8E8"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
            <tr>
              <td width="71%"><strong>KIRIM SMS NOTIFIKASI KE JAKSA BERSANGKUTAN </strong></td>
              <td width="29%"><div align="center">
                <input type="submit" name="Submit" value="KIRIM ULANG SMS SEKARANG">
              </div></td>
            </tr>
            <tr>
              <td colspan="2">Bahwa sistem telah mengirimkan sms kepada Jaksa Bersangkutan mengenai keterlambatan. Namun otoritas dapat mengirimkan ulang. </td>
              </tr>
          </table></td>
        </tr>
      </table>
    </form></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">
  <tr>
    <td><table width="100%"  border="0" cellspacing="4" cellpadding="4">
      <tr>
        <td><strong>DAFTAR TERLAMBAT P21/P18/P19 (Lebih dari 8 Hari KUHAP/SOP) </strong></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td bgcolor="#FFE3DD"><form name="form1" method="post" action="index.keterlambatan.sms.php">
        <table width="100%"  border="0" cellspacing="4" cellpadding="4">
          <tr>
            <td width="100%">
              <?PHP
			
			date_default_timezone_set('UTC');
$link = mysql_connect("$server", "$username", "$password"); mysql_select_db("$database", $link);
$result = mysql_query("SELECT * FROM $tabler where late_berkas = '3'", $link);
$num_rows = mysql_num_rows($result);
echo "Jumlah Berkas Perkara : <b>$num_rows</b> Berkas\n<br><br>";
print ('<table width="100%"  border="0" cellspacing="0" cellpadding="0"><tr bgcolor="#996600">
<td height="20" width="40%"><span class="style1"><strong>NAMA TERSANGKA</strong></span></td>
<td height="20" width="25%"><span class="style1"><strong>SURAT DARI</strong></span></td>
<td height="20" width="35%"><span class="style1"><strong>JAKSA P16</strong></span></td>
</tr>');

$SQL     = "SELECT * FROM $tabler where late_berkas = '3' ORDER BY uid DESC";

$results = mysql_query($SQL);
while ($row = mysql_fetch_array($results)){
print ('<tr bgcolor="#FF0000"><td><span class="style1"><b>'.$row['spdp_namatsk'] .'</b></span></td><td height="30"><span class="style1">');
$spdpdari1 = $row['spdp_dari'];
 mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$sql=mysql_query("select * from tab_polisi where p_nomor = '$spdpdari1'");
while ($data=mysql_fetch_array($sql)){
print('<b>'.$data['p_nama'].'</b>');
}
print ('</span></td>');

print ('<td><span class="style1">');
$jaksa1 = $row['p16_jaksa1'];
 mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$sql=mysql_query("select * from tab_personil where daftar_pegid = '$jaksa1'");
while ($data=mysql_fetch_array($sql)){
print('<b>'.$data['daftar_nama'].'</b>');
}
print ('</span></td>');
print ('</tr>');

}
print ('<input name="key" type="hidden" id="key" value="late_berkas">');
print ('<input name="pesan" type="hidden" id="pesan" value="TERLAMBAT PEMERIKSAAN BERKAS P17/P18/P19/P21">');
print ('</table>');
?>
            </td>
          </tr>
          <tr>
            <td bgcolor="#E8E8E8"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
                <tr>
                  <td width="71%"><strong>KIRIM SMS NOTIFIKASI KE JAKSA BERSANGKUTAN </strong></td>
                  <td width="29%"><div align="center">
                      <input type="submit" name="Submit2" value="KIRIM ULANG SMS SEKARANG">
                  </div></td>
                </tr>
                <tr>
                  <td colspan="2">Bahwa sistem telah mengirimkan sms kepada Jaksa Bersangkutan mengenai keterlambatan. Namun otoritas dapat mengirimkan ulang. </td>
                </tr>
            </table></td>
          </tr>
        </table>
    </form></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">
  <tr>
    <td><table width="100%"  border="0" cellspacing="4" cellpadding="4">
        <tr>
          <td><strong>DAFTAR TERLAMBAT TAHAP 2 </strong></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td bgcolor="#FFE3DD"><form name="form1" method="post" action="index.keterlambatan.sms.php">
        <table width="100%"  border="0" cellspacing="4" cellpadding="4">
          <tr>
            <td width="100%">
              <?PHP
			  
			date_default_timezone_set('UTC');
$link = mysql_connect("$server", "$username", "$password"); mysql_select_db("$database", $link);
$result = mysql_query("SELECT * FROM $tabler where late_p21 = '3'", $link);
$num_rows = mysql_num_rows($result);
echo "Jumlah Berkas Perkara : <b>$num_rows</b> Berkas\n<br><br>";
print ('<table width="100%"  border="0" cellspacing="0" cellpadding="0"><tr bgcolor="#996600">
<td height="20" width="40%"><span class="style1"><strong>NAMA TERSANGKA</strong></span></td>
<td height="20" width="25%"><span class="style1"><strong>SURAT DARI</strong></span></td>
<td height="20" width="35%"><span class="style1"><strong>JAKSA P16</strong></span></td>
</tr>');

$SQL     = "SELECT * FROM $tabler where late_p21 = '3' ORDER BY uid DESC";
$results = mysql_query($SQL);
while ($row = mysql_fetch_array($results)){
print ('<tr bgcolor="#FF0000"><td><span class="style1"><b>'.$row['spdp_namatsk'] .'</b></span></td><td height="30"><span class="style1">');
$spdpdari1 = $row['spdp_dari'];
 mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$sql=mysql_query("select * from tab_polisi where p_nomor = '$spdpdari1'");
while ($data=mysql_fetch_array($sql)){
print('<b>'.$data['p_nama'].'</b>');
}
print ('</span></td>');

print ('<td><span class="style1">');
$jaksa1 = $row['p16_jaksa1'];
 mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$sql=mysql_query("select * from tab_personil where daftar_pegid = '$jaksa1'");
while ($data=mysql_fetch_array($sql)){
print('<b>'.$data['daftar_nama'].'</b>');
}
print ('</span></td>');
print ('</tr>');
}
print ('<input name="key" type="hidden" id="key" value="late_p21">');
print ('<input name="pesan" type="hidden" id="pesan" value="TERLAMBAT DILAKUKAN TAHAP II">');
print ('</table>');
?>
            </td>
          </tr>
          <tr>
            <td bgcolor="#E8E8E8"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
                <tr>
                  <td width="71%"><strong>KIRIM SMS NOTIFIKASI KE JAKSA BERSANGKUTAN </strong></td>
                  <td width="29%"><div align="center">
                      <input type="submit" name="Submit222" value="KIRIM ULANG SMS SEKARANG">
                  </div></td>
                </tr>
                <tr>
                  <td colspan="2">Bahwa sistem telah mengirimkan sms kepada Jaksa Bersangkutan mengenai keterlambatan. Namun otoritas dapat mengirimkan ulang. </td>
                </tr>
            </table></td>
          </tr>
        </table>
    </form></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">
  <tr>
    <td><table width="100%"  border="0" cellspacing="4" cellpadding="4">
      <tr>
        <td><strong>DAFTAR TERLAMBAT DILIMPAHKAN </strong></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td bgcolor="#FFE3DD"><form name="form1" method="post" action="index.keterlambatan.sms.php">
        <table width="100%"  border="0" cellspacing="4" cellpadding="4">
          <tr>
            <td width="100%">
              <?PHP
			  
			date_default_timezone_set('UTC');
$link = mysql_connect("$server", "$username", "$password"); mysql_select_db("$database", $link);
$result = mysql_query("SELECT * FROM $tabler where late_p31 = '3'", $link);
$num_rows = mysql_num_rows($result);
echo "Jumlah Berkas Perkara : <b>$num_rows</b> Berkas\n<br><br>";
print ('<table width="100%"  border="0" cellspacing="0" cellpadding="0"><tr bgcolor="#996600">
<td height="20" width="40%"><span class="style1"><strong>NAMA TERSANGKA</strong></span></td>
<td height="20" width="25%"><span class="style1"><strong>SURAT DARI</strong></span></td>
<td height="20" width="35%"><span class="style1"><strong>JAKSA P16</strong></span></td>
</tr>');

$SQL     = "SELECT * FROM $tabler where late_p31 = '3' ORDER BY uid DESC";
$results = mysql_query($SQL);
while ($row = mysql_fetch_array($results)){
print ('<tr bgcolor="#FF0000"><td><span class="style1"><b>'.$row['spdp_namatsk'] .'</b></span></td><td height="30"><span class="style1">');
$spdpdari1 = $row['spdp_dari'];
 mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$sql=mysql_query("select * from tab_polisi where p_nomor = '$spdpdari1'");
while ($data=mysql_fetch_array($sql)){
print('<b>'.$data['p_nama'].'</b>');
}
print ('</span></td>');

print ('<td><span class="style1">');
$jaksa1 = $row['p16_jaksa1'];
 mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$sql=mysql_query("select * from tab_personil where daftar_pegid = '$jaksa1'");
while ($data=mysql_fetch_array($sql)){
print('<b>'.$data['daftar_nama'].'</b>');
}
print ('</span></td>');
print ('</tr>');
}
print ('<input name="key" type="hidden" id="key" value="late_p31">');
print ('<input name="pesan" type="hidden" id="pesan" value="TERLAMBAT LIMPAH">');
print ('</table>');
?>
            </td>
          </tr>
          <tr>
            <td bgcolor="#E8E8E8"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
                <tr>
                  <td width="71%"><strong>KIRIM SMS NOTIFIKASI KE JAKSA BERSANGKUTAN </strong></td>
                  <td width="29%"><div align="center">
                      <input type="submit" name="Submit22" value="KIRIM ULANG SMS SEKARANG">
                  </div></td>
                </tr>
                <tr>
                  <td colspan="2">Bahwa sistem telah mengirimkan sms kepada Jaksa Bersangkutan mengenai keterlambatan. Namun otoritas dapat mengirimkan ulang. </td>
                </tr>
            </table></td>
          </tr>
        </table>
    </form></td>
  </tr>
</table>
<? } ?>