<LINK href="images/index.css" rel="stylesheet" type="text/css"><? include("../index.cma.db.php");
$table = $_GET['table'];
$id1 = $_GET['uid'];
$do1 = $_GET['do'];
$query = "Select * from $table where uid = '$id1'"; 
$result = mysql_query($query); 
if($row = mysql_fetch_array($result)){ 
$day = date("d");
$month = date("m");
$year = date("Y");
?><style type="text/css">
<!--
body {
	background-color: #FF9900;
}
-->
</style><table width="100%"  border="0" cellspacing="4" cellpadding="4" class="panel">
  <tr>
    <td>TAHAPAN PERKARA Tersangka / Terdakwa <b><? echo $namatersangka = $row['spdp_namatsk']; ?></b> | Pasal : <b><? echo $namatersangka = $row['spdp_pasal']; ?></b></td>
  </tr>
  <tr>
    <td>
      <? if ($do1 == "eksekusibb"){ ?>
<br>
		<br>
		<form name="form1" method="post" action="index.eksekusibb.post.tahapan.add.php">                
		<table width="100%"  border="0" cellspacing="4" cellpadding="4">
                  <tr>
                    <td width="98%">Dengan ini saya telah memeriksa pengembalian BB dan menyatakan bahwa eksekusi Barang Bukti telah selesai </td>
                  </tr>
                  <tr>
                    <td><?PHP
include("index.db.php");
mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");

$page = $_GET["page"];
$tsk = $_GET["tsk"];
if(empty($action))
{
if (empty($order)) $order =  2;
if (empty($page))  $page  =  1;
if (empty($hits))  $hits  = 500;
$start = $hits*($page-1);
$query = "SELECT * FROM $tahun_now WHERE TERDAKWA ='$tsk'";
$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 "TOTAL BARANG BUKTI TERDAKWA <b>$tsk</b> | <strong>$xnum</strong> <br><br>";
//for ($i=1;$i<=$stw2;$i++) {if($page==$i){
//echo "<b> HAL $i |</b> ";} 
//else{echo "<a href=\"?g=daftartahanan&d=inc_op&page=$i\"> $i |</a>";}}
//print ('<br><br>');
$query  = "SELECT * FROM ".$tahun_now." ";
if(!empty($squery)) { $query .= "LIKE \"%$squery%\" ";}
$query .= "WHERE TERDAKWA ='$tsk' ORDER BY ID DESC LIMIT $start,$hits";
$res = mysql_query($query);
print ('<table 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="7%"><span class="style1"><strong>UKEY</strong></span></td>
<td width="17%"><span class="style1"><strong>NAMA TERDAKWA</strong></span></td>
<td width="25%"><span class="style1"><strong>NOMOR REG. BARANG BUKTI</strong></span></td>
<td width="30%"><span class="style1"><strong>NAMA BARANG</strong></span></td>
<td width="25%"><span class="style1"><strong>STATUS</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['UKEY'] .'</td>');
print ('<td>'.$row['TERDAKWA'] .'</td>');
print ('<td>'.$row['RB'] .'</td>');
print ('<td>'.$row['NAMABARANG'] .'</td>');
print ('<td>');
if ($row['STATUS'] == "0") {
print ('BLM DIEKSEKUSI');
} 
 elseif ($row['STATUS'] == "1") {
print ('TELAH DIKEMBALIKAN KEPADA NAMA '.$row['NAMAPEMILIK'] .' PADA TANGGAL :'.$row['TGLEKSEKUSI'] .'');
 } 
  elseif ($row['STATUS'] == "2") {
print ('SUDAH DILELANG/ PROSES LELANG');
 } 
  elseif ($row['STATUS'] == "3") {
print ('DIMASUKKAN DALAM DAFTAR PEMUSNAHAN');
 } 
   elseif ($row['STATUS'] == "4") {
print ('DIRAMPAS UNTUK NEGARA');
 } 
print ('</td>');
print ('</tr>');
}
print ('</tbody></table>');
}
?></td>
                  </tr>
                  <tr>
                    <td><select name="day" id="day">
                      <option value="01" <? IF($day == "1"){ echo "selected"; } ?>>01</option>
                      <option value="02" <? IF($day == "2"){ echo "selected"; } ?>>02</option>
                      <option value="03" <? IF($day == "3"){ echo "selected"; } ?>>03</option>
                      <option value="04" <? IF($day == "4"){ echo "selected"; } ?>>04</option>
                      <option value="05" <? IF($day == "5"){ echo "selected"; } ?>>05</option>
                      <option value="06" <? IF($day == "6"){ echo "selected"; } ?>>06</option>
                      <option value="07" <? IF($day == "7"){ echo "selected"; } ?>>07</option>
                      <option value="08" <? IF($day == "8"){ echo "selected"; } ?>>08</option>
                      <option value="09" <? IF($day == "9"){ echo "selected"; } ?>>09</option>
                      <option value="10" <? IF($day == "10"){ echo "selected"; } ?>>10</option>
                      <option value="11" <? IF($day == "11"){ echo "selected"; } ?>>11</option>
                      <option value="12" <? IF($day == "12"){ echo "selected"; } ?>>12</option>
                      <option value="13" <? IF($day == "13"){ echo "selected"; } ?>>13</option>
                      <option value="14" <? IF($day == "14"){ echo "selected"; } ?>>14</option>
                      <option value="15" <? IF($day == "15"){ echo "selected"; } ?>>15</option>
                      <option value="16" <? IF($day == "16"){ echo "selected"; } ?>>16</option>
                      <option value="17" <? IF($day == "17"){ echo "selected"; } ?>>17</option>
                      <option value="18" <? IF($day == "18"){ echo "selected"; } ?>>18</option>
                      <option value="19" <? IF($day == "19"){ echo "selected"; } ?>>19</option>
                      <option value="20" <? IF($day == "20"){ echo "selected"; } ?>>20</option>
                      <option value="21" <? IF($day == "21"){ echo "selected"; } ?>>21</option>
                      <option value="22" <? IF($day == "22"){ echo "selected"; } ?>>22</option>
                      <option value="23" <? IF($day == "23"){ echo "selected"; } ?>>23</option>
                      <option value="24" <? IF($day == "24"){ echo "selected"; } ?>>24</option>
                      <option value="25" <? IF($day == "25"){ echo "selected"; } ?>>25</option>
                      <option value="26" <? IF($day == "26"){ echo "selected"; } ?>>26</option>
                      <option value="27" <? IF($day == "27"){ echo "selected"; } ?>>27</option>
                      <option value="28" <? IF($day == "28"){ echo "selected"; } ?>>28</option>
                      <option value="29" <? IF($day == "29"){ echo "selected"; } ?>>29</option>
                      <option value="30" <? IF($day == "30"){ echo "selected"; } ?>>30</option>
                      <option value="31" <? IF($day == "31"){ echo "selected"; } ?>>31</option>
                    </select>
                      <select name="month" id="month">
                        <option value="01" <? IF($month == "1"){ echo "selected"; } ?>>01</option>
                        <option value="02" <? IF($month == "2"){ echo "selected"; } ?>>02</option>
                        <option value="03" <? IF($month == "3"){ echo "selected"; } ?>>03</option>
                        <option value="04" <? IF($month == "4"){ echo "selected"; } ?>>04</option>
                        <option value="05" <? IF($month == "5"){ echo "selected"; } ?>>05</option>
                        <option value="06" <? IF($month == "6"){ echo "selected"; } ?>>06</option>
                        <option value="07" <? IF($month == "7"){ echo "selected"; } ?>>07</option>
                        <option value="08" <? IF($month == "8"){ echo "selected"; } ?>>08</option>
                        <option value="09" <? IF($month == "9"){ echo "selected"; } ?>>09</option>
                        <option value="10" <? IF($month == "10"){ echo "selected"; } ?>>10</option>
                        <option value="11" <? IF($month == "11"){ echo "selected"; } ?>>11</option>
                        <option value="12" <? IF($month == "12"){ echo "selected"; } ?>>12</option>
                      </select>
                      <select name="year" id="year">
                        <option value="2016" <? IF($year == "2016"){ echo "selected"; } ?>>2016</option>
                        <option value="2017" <? IF($year == "2017"){ echo "selected"; } ?>>2017</option>
                        <option value="2018" <? IF($year == "2018"){ echo "selected"; } ?>>2018</option>
                        <option value="2019" <? IF($year == "2019"){ echo "selected"; } ?>>2019</option>
                        <option value="2020" <? IF($year == "2020"){ echo "selected"; } ?>>2020</option>
                      </select>
                      <input name="do" type="hidden" id="do" value="<? echo $do1;?>">
                      <input name="id" type="hidden" id="id" value="<? echo $id1;?>">
                      <input name="table" type="hidden" id="table" value="<? echo $table;?>"></td>
                  </tr>
                  <tr>
                    <td>Hanya Kasi PBB yang berhak melakukan update ini sebagai bentuk koreksi penyelesaian Barang bukti.</td>
                  </tr>
                  <tr>
                    <td><input type="submit" name="Submit2" value="Simpan"></td>
                  </tr>
                  <tr>
                    <td>&nbsp;</td>
                  </tr>
          </table>
        </form>
    <?
}
?>  <? if ($do1 == "eksekusidetail"){ ?>
<br><?PHP
include("index.db.php");
mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");

$page = $_GET["page"];
$tsk = $_GET["tsk"];
if(empty($action))
{
if (empty($order)) $order =  2;
if (empty($page))  $page  =  1;
if (empty($hits))  $hits  = 500;
$start = $hits*($page-1);
$query = "SELECT * FROM $tahun_now WHERE TERDAKWA ='$tsk'";
$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 "TOTAL BARANG BUKTI TERDAKWA <b>$tsk</b> | <strong>$xnum</strong> <br><br>";
//for ($i=1;$i<=$stw2;$i++) {if($page==$i){
//echo "<b> HAL $i |</b> ";} 
//else{echo "<a href=\"?g=daftartahanan&d=inc_op&page=$i\"> $i |</a>";}}
//print ('<br><br>');
$query  = "SELECT * FROM ".$tahun_now." ";
if(!empty($squery)) { $query .= "LIKE \"%$squery%\" ";}
$query .= "WHERE TERDAKWA ='$tsk' ORDER BY ID DESC LIMIT $start,$hits";
$res = mysql_query($query);
print ('<table 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="7%"><span class="style1"><strong>UKEY</strong></span></td>
<td width="17%"><span class="style1"><strong>NAMA TERDAKWA</strong></span></td>
<td width="25%"><span class="style1"><strong>NOMOR REG. BARANG BUKTI</strong></span></td>
<td width="30%"><span class="style1"><strong>NAMA BARANG</strong></span></td>
<td width="25%"><span class="style1"><strong>STATUS</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['UKEY'] .'</td>');
print ('<td>'.$row['TERDAKWA'] .'</td>');
print ('<td>'.$row['RB'] .'</td>');
print ('<td>'.$row['NAMABARANG'] .'</td>');
print ('<td>');
if ($row['STATUS'] == "0") {
print ('BLM DIEKSEKUSI');
} 
 elseif ($row['STATUS'] == "1") {
print ('TELAH DIKEMBALIKAN KEPADA NAMA '.$row['NAMAPEMILIK'] .' PADA TANGGAL :'.$row['TGLEKSEKUSI'] .'');
 } 
  elseif ($row['STATUS'] == "2") {
print ('SUDAH DILELANG/ PROSES LELANG');
 } 
  elseif ($row['STATUS'] == "3") {
print ('DIMASUKKAN DALAM DAFTAR PEMUSNAHAN');
 } 
   elseif ($row['STATUS'] == "4") {
print ('DIRAMPAS UNTUK NEGARA');
 } 
print ('</td>');
print ('</tr>');
}
print ('</tbody></table>');
}
?>
		<br>
		<?
}
?></td>
  </tr>
</table>
<? } ?>
