<?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: 16px;
	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 colspan="2"><div class="style1"><?PHP echo "$satker"; ?> 
               <br>
                  LABEL BENDA SITAAN / BARANG BUKTI
              </div></td>
            </tr>
            <tr>
              <td width="57%" valign="top"><div align="center">
                  <table width="100%"  border="0" cellspacing="4" cellpadding="4">
                    <tr>
                      <td width="31%">Reg. Bukti </td>
                      <td width="3%">:</td>
                      <td width="66%"><?PHP print('<b>'.$data2["RB"].'</b>'); ?>  </td>
                    </tr>
                    <tr>
                      <td>Reg. Perkara</td>
                      <td width="3%">:</td>
                      <td width="66%"><?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>Pasal</td>
                      <td>:</td>
                      <td><?PHP print('<b>'.$data2["PASAL"].'</b>'); ?></td>
                    </tr>
                    <tr>
                      <td>BA Penelitian (BA-5) </td>
                      <td>:</td>
                      <td><?PHP print('<b>'.$data2["TGLPROSES"].'</b>'); ?></td>
                    </tr>
                    <tr>
                      <td>Jaksa Peneliti </td>
                      <td>:</td>
                      <td><?PHP print('<b>'.$data2["JAKSA"].'</b>'); ?></td>
                    </tr>
                    <tr>
                      <td>Petugas Barang Bukti </td>
                      <td>:</td>
                      <td><?PHP print('<b>'.$data2["PETUGAS"].'</b>'); ?></td>
                    </tr>
                  </table>
              </div></td>
              <td width="43%" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td>Daftar Barang Bukti:                     </td>
                </tr>
                <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'");
while ($data=mysql_fetch_array($sql)){
print(''.$data["NAMABARANG"].' - Lokasi Simpan : ');
if($data['LOKASI'] == "1"){ echo "GUDANG KEJARI"; }
if($data['LOKASI'] == "2"){ echo "RUBASAN"; }
if($data['LOKASI'] == "3"){ echo "PENITIPAN"; }
print ('<br>');
print ('<img src="index.barcode.php?text='.$data["UKEY"].'" alt="barcode" />');
print ('<br>');
}
?></td>
                </tr>
              </table></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 } ?>