<?php
include("../index.globalconfig.php");
$ukey1 = $_GET['ukey'];
include("index.db.php");
mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$mytable = "$tahun_now";
$sql2=mysql_query("select * from $mytable where RB='$ukey1' LIMIT 1");
while ($data2=mysql_fetch_array($sql2)){
?>
<script type="text/javascript">
function printF(printData)
{
var a = window.open ('', '',"status=1,scrollbars=1, width=900,height=600");
a.document.write(document.getElementById(printData).innerHTML.replace(/<a\/?[^>]+>/gi, ''));
a.document.close();
a.focus();
a.print();
a.close();
}
</script>

 <script>
$(function() {
$( "#datepicker" ).datepicker();
});
</script>
<style type="text/css">
<!--
.style1 {
	font-size: 24px;
	font-weight: bold;
}
-->
</style>

<div id="printData"><LINK href="../images/index.css" rel="stylesheet" type="text/css">
  <table width="100%"  border="0" cellspacing="1" cellpadding="1">
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td bgcolor="#000000"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
        <tr>
          <td bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
            <tr>
              <td><div align="right">
              </div></td>
            </tr>
            <tr>
              <td><div align="center"><? echo "$satker"; ?></div></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td><div align="center" class="style1">EKSEKUSI BARANG BUKTI </div></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td><hr></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td><table width="100%"  border="0" cellspacing="6" cellpadding="6">
                  <tr>
                    <td width="24%">Register Bukti No. Tanggal</td>
                    <td width="2%">:</td>
                    <td width="74%"><?PHP print('<b>'.$data2["RB"].'</b>'); ?></td>
                  </tr>
                  <tr>
                    <td>Register Perkara No. </td>
                    <td>:</td>
                    <td><?PHP print('<b>'.$data2["PDM"].'</b>'); ?></td>
                  </tr>
                  <tr>
                    <td>Nama Terdakwa </td>
                    <td>:</td>
                    <td><?PHP print('<b>'.$data2["TERDAKWA"].'</b>'); ?></td>
                  </tr>
                  <tr>
                    <td>Melanggar Pasal </td>
                    <td>:</td>
                    <td><?PHP print('<b>'.$data2["PASAL"].'</b>'); ?></td>
                  </tr>
                  <tr>
                    <td>Barang Bukti </td>
                    <td>:</td>
                    <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td>
                  
                          <?php
include("index.db.php");
mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$mytable = "$tahun_now";
$sql=mysql_query("select * from $mytable where RB='$ukey1'");
print ('<table width="100%"  border="0" cellspacing="1" cellpadding="1">
                      <tr>
                 
                        <td width="66%">Nama Barang </td>
                        <td width="33%">Lokasi</td></tr>');
while ($data=mysql_fetch_array($sql)){

print('<tr><td>'.$data["NAMABARANG"].'</td>');
print ('<td>');
if($data['LOKASI'] == "1"){ echo "GUDANG KEJARI"; }
if($data['LOKASI'] == "2"){ echo "RUBASAN"; }
if($data['LOKASI'] == "3"){ echo "PENITIPAN"; }
print ('</td>');
print ('<td>EKSEKUSI</td>');
print ('</tr>');
}
print ('</table>');
?>
                     
                      
                    </td>
                      </tr>
                    </table></td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td></td>
                  </tr>
              </table></td>
            </tr>
            <tr>
              <td><table width="100%"  border="0" cellspacing="2" cellpadding="2">
                  <tr>
                    <td width="13%">&nbsp;</td>
                    <td width="23%"><div align="center">PENUNTUT UMUM </div></td>
                    <td width="35%">&nbsp;</td>
                    <td width="29%"><div align="center">PETUGAS PENYIMPANAN BENDA SITAAN / BARANG BUKTI </div></td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td><center>
                        <?PHP print('<b>'.$data2["JAKSA"].'</b>'); ?>                    </center></td>
                    <td>&nbsp;</td>
                    <td><center>
                        <?PHP print('<b>'.$data2["PETUGAS"].'</b>'); ?>                    </center></td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                  </tr>
              </table></td>
            </tr>
            <tr>
              <td><div align="center"></div></td>
            </tr>
          </table></td>
        </tr>
      </table></td>
    </tr>
  </table>
  </div>
<table width="100%"  border="0" cellspacing="6" cellpadding="6">
  <tr>
    <td width="93%">&nbsp;</td>
    <td width="7%"><a href="#"  onClick="printF('printData')"><img src="print-icon.png" border="0"></a></td>
  </tr>
</table>
<?PHP } ?>