<?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="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>
  <table width="500"  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><center><?PHP echo "$satker"; ?> 
               <br>
                  LABEL BARCODE BENDA SITAAN / BARANG BUKTI
              </center></td>
            </tr>
            <tr>
              <td valign="top"><div align="center">
                <table  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'");
while ($data=mysql_fetch_array($sql)){
print(''.$data["NAMABARANG"].'<br>Terdakwa:'.$data["TERDAKWA"].'');
print ('<br>');
print ('<img src="index.barcode.php?text='.$data["UKEY"].'" alt="barcode" />');
print ('<hr>');
}
?></td>
                  </tr>
                </table>
                  </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 } ?>