<table width="100%"  border="0" cellspacing="4" cellpadding="4">
  <tr>
    <td><table width="100%"  border="0" cellspacing="4" cellpadding="4" class="panel">
        <tr>
          <td bgcolor="#FFFF00">TOMBOL KELUAR ADALAH TOMBOL BARANG BUKTI DIKIRIM KE PENGADILAN </td>
        </tr>
        <tr>
          <td bgcolor="#FFFF00">TOMBOL KEMBALI ADALAH TOMBOL BARANG BUKTI SUDAH TIDAK DIPERGUNAKAN DI PENGADILAN DAN AKAN DI EKSEKUSI. TOMBOL INI AKAN MUNCUL APABILA PERNAH KELUAR. APABILA DISIMPAN DI RUBASAN ARTINYA TIDAK PERLU DILIMPAH DALAM BENTUK FISIK KE PENGADILAN </td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><img src="images/bb_pidum.png" width="300" height="100"></td>
  </tr>
  <tr>
    <td><?PHP
include("index.db.php");
mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
//load year

$query = "Select * from barbuk_db where t_id = '1'"; 
$result = mysql_query($query); 
if($row = mysql_fetch_array($result)){ 
 $mytable = $row['t_table'];

//------end
$page = $_GET["page"];
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 $mytable WHERE BIDANG ='1' && TGLEKSEKUSI =''";
$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;} 
echo "CATATAN BARANG BUKTI DIPERGUNAKAN SIDANG | <strong>$xnum</strong> | ";
for ($i=1;$i<=$stw2;$i++) {if($page==$i){
echo "<b> HAL $i |</b> ";} 
else{echo "<a href=\"?g=bbsidang&page=$i\"> $i |</a>";}}
print ('<br><br>');
$query  = "SELECT * FROM ".$mytable." ";
if(!empty($squery)) { $query .= "LIKE \"%$squery%\" ";}
$query .= "WHERE BIDANG ='1' && TGLEKSEKUSI ='' ORDER BY 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="3%"><span class="style1"><strong>NO</strong></span></td>
<td width="20%"><span class="style1"><strong>NAMA TERDAKWA</strong></span></td>
<td width="17%"><span class="style1"><strong>NOMOR REG. BB</strong></span></td>
<td width="30%"><span class="style1"><strong>NAMA BARANG</strong></span></td>
<td width="10%"><span class="style1"><strong>LOKASI</strong></span></td>
<td width="10%"><span class="style1"><strong>STATUS</strong></span></td>
<td width="10%"><span class="style1"><strong>PROSES</strong></span></td>
</tr></thead>');
$no=1; // fungsi nomor
 $x=0;
  while($row = mysql_fetch_array($res))
  {
   $x++;
if($x==2) {$barva = "FFFFB7";$x=0;} else {$barva = "FFD8B0";$x=1;}
print ('<tr bgcolor=#'.$barva.'><td><center>'.$no++.'<center></td>');
print ('<td>'.$row['TERDAKWA'] .'</td>');
print ('<td>'.$row['RB'] .'</td>');
print ('<td>'.$row['NAMABARANG'] .'</td>');
print ('<td>DI ');
if ($row['LOKASI'] == "1") {print ('GUDANG');} 
elseif ($row['LOKASI'] == "2") {print ('RUBASAN');} 
elseif ($row['LOKASI'] == "3") {print ('PENITIPAN');} 
elseif ($row['LOKASI'] == "4") {print ('LAINNYA');} 
elseif ($row['LOKASI'] == "5") {print ('PENGADILAN');} 
print ('</td>');
print ('<td>');
if ($row['BBSIDANG'] == "0") {
print ('<a href="index.bbsidangpost.php?ukey='.$row['UKEY'] .'&t=keluar" ');
echo "onclick=\"NewWindow(this.href,'mywin','700','400','yes','center');return false\" onfocus=\"this.blur()\" class=\"menupidum\" target=\"_blank\">KELUAR</a>";

} 
elseif ($row['BBSIDANG'] == "1") {
print ('KELUAR TGL '.$row['BBSIDANGTGL'].'Di alihkan ke:'.$row['BBSIDANGPN'].'');
} 
print ('</td>');
print ('<td>');
if ($row['BBSIDANG'] == "0") {
print ('-');
} 
elseif ($row['BBSIDANG'] == "1") {
print ('<a href="index.bbsidangpost.php?ukey='.$row['UKEY'] .'&t=kembali"');
echo "onclick=\"NewWindow(this.href,'mywin','600','400','yes','center');return false\" onfocus=\"this.blur()\" class=\"menupidum\" target=\"_blank\">KEMBALI</a>";
} 
print ('</td>');
print ('</tr>');
}
print ('</tbody></table>');
echo "<br><br>Ditampilkan $hits /Halaman";
}}
?></td>
  </tr>
  <tr>
    <td><img src="images/bb_pidsus.png" width="300" height="100"></td>
  </tr>
  <tr>
    <td><?PHP
include("index.db.php");
mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
//load year

$query = "Select * from barbuk_db where t_id = '1'"; 
$result = mysql_query($query); 
if($row = mysql_fetch_array($result)){ 
 $mytable = $row['t_table'];

//------end
$page = $_GET["page"];
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 $mytable Where BIDANG ='2' && TGLEKSEKUSI =''";
$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;} 
echo "CATATAN BARANG BUKTI DIPERGUNAKAN SIDANG | <strong>$xnum</strong> | ";
for ($i=1;$i<=$stw2;$i++) {if($page==$i){
echo "<b> HAL $i |</b> ";} 
else{echo "<a href=\"?g=bbsidang&page=$i\"> $i |</a>";}}
print ('<br><br>');
$query  = "SELECT * FROM ".$mytable." ";
if(!empty($squery)) { $query .= "LIKE \"%$squery%\" ";}
$query .= "WHERE BIDANG ='2' && TGLEKSEKUSI ='' ORDER BY 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="3%"><span class="style1"><strong>NO</strong></span></td>
<td width="20%"><span class="style1"><strong>NAMA TERDAKWA</strong></span></td>
<td width="17%"><span class="style1"><strong>NOMOR REG. BB</strong></span></td>
<td width="30%"><span class="style1"><strong>NAMA BARANG</strong></span></td>
<td width="10%"><span class="style1"><strong>LOKASI</strong></span></td>
<td width="10%"><span class="style1"><strong>STATUS</strong></span></td>
<td width="10%"><span class="style1"><strong>PROSES</strong></span></td>
</tr></thead>');
$no=1; // fungsi nomor
 $x=0;
  while($row = mysql_fetch_array($res))
  {
   $x++;
if($x==2) {$barva = "FFFFB7";$x=0;} else {$barva = "FFD8B0";$x=1;}
print ('<tr bgcolor=#'.$barva.'><td><center>'.$no++.'<center></td>');
print ('<td>'.$row['TERDAKWA'] .'</td>');
print ('<td>'.$row['RB'] .'</td>');
print ('<td>'.$row['NAMABARANG'] .'</td>');
print ('<td>DI ');
if ($row['LOKASI'] == "1") {print ('GUDANG');} 
elseif ($row['LOKASI'] == "2") {print ('RUBASAN');} 
elseif ($row['LOKASI'] == "3") {print ('PENITIPAN');} 
elseif ($row['LOKASI'] == "4") {print ('LAINNYA');} 
elseif ($row['LOKASI'] == "5") {print ('PENGADILAN');} 
print ('</td>');
print ('<td>');
if ($row['BBSIDANG'] == "0") {
print ('<a href="index.bbsidangpost.php?ukey='.$row['UKEY'] .'&t=keluar" ');
echo "onclick=\"NewWindow(this.href,'mywin','700','400','yes','center');return false\" onfocus=\"this.blur()\" class=\"menupidum\" target=\"_blank\">KELUAR</a>";

} 
elseif ($row['BBSIDANG'] == "1") {
print ('KELUAR TGL '.$row['BBSIDANGTGL'].'Di alihkan ke:'.$row['BBSIDANGPN'].'');
} 
print ('</td>');
print ('<td>');
if ($row['BBSIDANG'] == "0") {
print ('-');
} 
elseif ($row['BBSIDANG'] == "1") {
print ('<a href="index.bbsidangpost.php?ukey='.$row['UKEY'] .'&t=kembali"');
echo "onclick=\"NewWindow(this.href,'mywin','600','400','yes','center');return false\" onfocus=\"this.blur()\" class=\"menupidum\" target=\"_blank\">KEMBALI</a>";
} 
print ('</td>');
print ('</tr>');
}
print ('</tbody></table>');
echo "<br><br>Ditampilkan $hits /Halaman";
}}
?></td>
  </tr>
</table>

