<?
include("../index.globalconfig.php");
?>
<style type="text/css">
<!--
.style1 {font-weight: bold}
-->
</style>

<table width="100%"  border="0" cellspacing="6" cellpadding="6">
  <tr>
    <td bgcolor="#FF0000"><table width="100%"  border="0" cellpadding="2" cellspacing="2" bgcolor="#FFFFFF">
      <tr>
        <td width="81%" bgcolor="#FFBFBF"><form method="get" action="">
          <table width="100%"  border="0" cellspacing="8" cellpadding="8">
            <tr>
              <td><strong>WARNING</strong> ! Masukkan terlebih dahulu berapa banyak Barang Bukti saat tahap 2 ini. harap teliti sebelum input. Memasukkan BB susulan tidak dapat dilakukan. </td>
            </tr>
          </table>
          <table width="100%"  border="0" cellspacing="4" cellpadding="4">
            <tr>
              <td width="25%" rowspan="2">Ketik Nama Tersangka / Gunakan menu pilihan </td>
              <td width="2%" rowspan="2">:</td>
              <td width="73%">  <script src="jquery.min.js"></script>
<script type="text/javascript">
//jQuery extension method:
jQuery.fn.filterByText = function(textbox) {
  return this.each(function() {
    var select = this;
    var options = [];
    $(select).find('option').each(function() {
      options.push({
        value: $(this).val(),
        text: $(this).text()
      });
    });
    $(select).data('options', options);

    $(textbox).bind('change keyup', function() {
      var options = $(select).empty().data('options');
      var search = $.trim($(this).val());
      var regex = new RegExp(search, "gi");

      $.each(options, function(i) {
        var option = options[i];
        if (option.text.match(regex) !== null) {
          $(select).append(
            $('<option>').text(option.text).val(option.value)
          );
        }
      });
    });
  });
};

// You could use it like this:

$(function() {
  $('select').filterByText($('input'));
});
</script><input name="carinamaterdakwa" type="carinamaterdakwa" id="carinamaterdakwa"></td>
            </tr>
            <tr>
              <td><select name="namaterdakwanya" id="namaterdakwanya">
                <option value=0 selected>- Pilih Nama Tersangka -</option>
                <?php
//$query = "Select * from $table_member where t_passcts!=''";
include("../index.cma.db.php");
$sql=mysql_query("select * from $tahun_now");
while ($row=mysql_fetch_array($sql)){
print ('<option value="'.$row["spdp_namatsk"].'">'.$row["spdp_namatsk"].'</option>');
}
?>
              </select></td>
            </tr>
            <tr>
              <td width="25%">Jumlah Item Barang Bukti / ketikkan angka </td>
              <td width="2%">:</td>
              <td><input type="text" size="5" name="jumlah" />
                <input type="submit" name="btnJumlah" value="OK" />
                <input name="day" type="hidden" id="day" value="<? echo $day=date("d");?>">
                <input name="month" type="hidden" id="month" value="<? echo $month=date("m");?>">
                <input name="year" type="hidden" id="year" value="<? echo $year=date("Y");?>">
                <input name="bidang" type="hidden" id="bidang" value="<? echo $_GET['bidang'];  ?>">
                <input name="jenis" type="hidden" id="jenis" value="<?PHP if ($_GET['bidang'] == "1") {echo "PDM-";} 
		elseif ($_GET['bidang'] == "2") {echo "PDS-";} 
		?>"></td>
            </tr>
            <tr>
              <td colspan="3">Anda akan melakukan posting data Barang Bukti untuk Bidang <b><?PHP if ($_GET['bidang'] == "1") {echo "PDM-";} 
		elseif ($_GET['bidang'] == "2") {echo "PDS-";} 
		?>-<?PHP if ($_GET['bidang'] == "1") {echo "PIDANA UMUM";} 
		elseif ($_GET['bidang'] == "2") {echo "PIDANA KHUSUS";} 
		elseif ($_GET['bidang'] == "") {echo "ERROR JANGAN LANJUTKAN POSTING";} 
		?></b></td>
              </tr>
            <input name="g" type="hidden" id="g" value="bbmasuk">
          </table>
        </form></td>
        <td width="19%"><div align="center"><img src="images/c_toolkitplace.png" width="220" height="153"></div></td>
      </tr>
    </table></td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="4" cellpadding="4">
  <tr>
    <td bgcolor="#FF0000"><table width="100%"  border="0" cellspacing="2" cellpadding="2">
      <tr>
        <td bgcolor="#FFFFFF"><form method="post" action="index.proses.php">
          <br />
          <table width="80%"  border="0" align="center" cellpadding="6" cellspacing="6">
            <tr>
              <td colspan="3"><strong>PROSES REKAM BARANG BUKTI </strong></td>
            </tr>
            <tr>
              <td colspan="3">&nbsp;</td>
            </tr>
            <tr>
              <td colspan="3"><div align="center"><strong><?PHP echo "$satker"; ?>
                    <input name="kode" type="hidden" id="kode" value="<?PHP echo "$kode"; ?>">
                    <input name="kejari" type="hidden" id="kejari" value="<?PHP echo "$satker"; ?>">
</strong></div></td>
              </tr>
            <tr>
              <td colspan="3"><div align="center" class="style1">LABEL BENDA SITAAN / BARANG BUKTI </div></td>
            </tr>
            <tr>
              <td colspan="3">&nbsp;</td>
            </tr>
            <tr>
              <td>Tanggal Proses </td>
              <td>:</td>
              <td><select name="day" id="day">
          <option value="01" <? IF($_GET['day'] == "01"){ echo "selected"; } ?>>01</option>
          <option value="02" <? IF($_GET['day'] == "02"){ echo "selected"; } ?>>02</option>
          <option value="03" <? IF($_GET['day'] == "03"){ echo "selected"; } ?>>03</option>
          <option value="04" <? IF($_GET['day'] == "04"){ echo "selected"; } ?>>04</option>
          <option value="05" <? IF($_GET['day'] == "05"){ echo "selected"; } ?>>05</option>
          <option value="06" <? IF($_GET['day'] == "06"){ echo "selected"; } ?>>06</option>
          <option value="07" <? IF($_GET['day'] == "07"){ echo "selected"; } ?>>07</option>
          <option value="08" <? IF($_GET['day'] == "08"){ echo "selected"; } ?>>08</option>
          <option value="09" <? IF($_GET['day'] == "09"){ echo "selected"; } ?>>09</option>
          <option value="10" <? IF($_GET['day'] == "10"){ echo "selected"; } ?>>10</option>
          <option value="11" <? IF($_GET['day'] == "11"){ echo "selected"; } ?>>11</option>
          <option value="12" <? IF($_GET['day'] == "12"){ echo "selected"; } ?>>12</option>
          <option value="13" <? IF($_GET['day'] == "13"){ echo "selected"; } ?>>13</option>
          <option value="14" <? IF($_GET['day'] == "14"){ echo "selected"; } ?>>14</option>
          <option value="15" <? IF($_GET['day'] == "15"){ echo "selected"; } ?>>15</option>
          <option value="16" <? IF($_GET['day'] == "16"){ echo "selected"; } ?>>16</option>
          <option value="17" <? IF($_GET['day'] == "17"){ echo "selected"; } ?>>17</option>
          <option value="18" <? IF($_GET['day'] == "18"){ echo "selected"; } ?>>18</option>
          <option value="19" <? IF($_GET['day'] == "19"){ echo "selected"; } ?>>19</option>
          <option value="20" <? IF($_GET['day'] == "20"){ echo "selected"; } ?>>20</option>
          <option value="21" <? IF($_GET['day'] == "21"){ echo "selected"; } ?>>21</option>
          <option value="22" <? IF($_GET['day'] == "22"){ echo "selected"; } ?>>22</option>
          <option value="23" <? IF($_GET['day'] == "23"){ echo "selected"; } ?>>23</option>
          <option value="24" <? IF($_GET['day'] == "24"){ echo "selected"; } ?>>24</option>
          <option value="25" <? IF($_GET['day'] == "25"){ echo "selected"; } ?>>25</option>
          <option value="26" <? IF($_GET['day'] == "26"){ echo "selected"; } ?>>26</option>
          <option value="27" <? IF($_GET['day'] == "27"){ echo "selected"; } ?>>27</option>
          <option value="28" <? IF($_GET['day'] == "28"){ echo "selected"; } ?>>28</option>
          <option value="29" <? IF($_GET['day'] == "29"){ echo "selected"; } ?>>29</option>
          <option value="30" <? IF($_GET['day'] == "30"){ echo "selected"; } ?>>30</option>
          <option value="31" <? IF($_GET['day'] == "31"){ echo "selected"; } ?>>31</option>
        </select>
		<select name="month" id="month">
          <option value="01" <? IF($_GET['month'] == "01"){ echo "selected"; } ?>>01</option>
          <option value="02" <? IF($_GET['month'] == "02"){ echo "selected"; } ?>>02</option>
          <option value="03" <? IF($_GET['month'] == "03"){ echo "selected"; } ?>>03</option>
          <option value="04" <? IF($_GET['month'] == "04"){ echo "selected"; } ?>>04</option>
          <option value="05" <? IF($_GET['month'] == "05"){ echo "selected"; } ?>>05</option>
          <option value="06" <? IF($_GET['month'] == "06"){ echo "selected"; } ?>>06</option>
          <option value="07" <? IF($_GET['month'] == "07"){ echo "selected"; } ?>>07</option>
          <option value="08" <? IF($_GET['month'] == "08"){ echo "selected"; } ?>>08</option>
          <option value="09" <? IF($_GET['month'] == "09"){ echo "selected"; } ?>>09</option>
          <option value="10" <? IF($_GET['month'] == "10"){ echo "selected"; } ?>>10</option>
          <option value="11" <? IF($_GET['month'] == "11"){ echo "selected"; } ?>>11</option>
          <option value="12" <? IF($_GET['month'] == "12"){ echo "selected"; } ?>>12</option>
        </select>
		 <select name="year" id="year">
          <option value="2016" <? IF($_GET['year'] == "2016"){ echo "selected"; } ?>>2016</option>
          <option value="2017" <? IF($_GET['year'] == "2017"){ echo "selected"; } ?>>2017</option>
          <option value="2018" <? IF($_GET['year'] == "2018"){ echo "selected"; } ?>>2018</option>
          <option value="2019" <? IF($_GET['year'] == "2019"){ echo "selected"; } ?>>2019</option>
          <option value="2020" <? IF($_GET['year'] == "2020"){ echo "selected"; } ?>>2020</option>
		  <option value="2021" <? IF($_GET['year'] == "2021"){ echo "selected"; } ?>>2021</option>
		  <option value="2022" <? IF($_GET['year'] == "2022"){ echo "selected"; } ?>>2022</option>
		  <option value="2023" <? IF($_GET['year'] == "2023"){ echo "selected"; } ?>>2023</option>
		  <option value="2024" <? IF($_GET['year'] == "2024"){ echo "selected"; } ?>>2024</option>
		  <option value="2025" <? IF($_GET['year'] == "2025"){ echo "selected"; } ?>>2025</option>
		  <option value="2026" <? IF($_GET['year'] == "2026"){ echo "selected"; } ?>>2026</option>
		  <option value="2027" <? IF($_GET['year'] == "2027"){ echo "selected"; } ?>>2027</option>
		  <option value="2028" <? IF($_GET['year'] == "2028"){ echo "selected"; } ?>>2028</option>
		  <option value="2029" <? IF($_GET['year'] == "2029"){ echo "selected"; } ?>>2029</option>
		  <option value="2030" <? IF($_GET['year'] == "2030"){ echo "selected"; } ?>>2030</option>
        </select>
		 <input name="bidangnya" type="hidden" id="bidangnya" value="<? echo $_GET['bidang'];  ?>">
		 <input name="jenisnya" type="hidden" id="jenisnya" value="<?PHP if ($_GET['bidang'] == "1") {echo "PDM-";} 
		elseif ($_GET['bidang'] == "2") {echo "PDS-";} 
		?>"></td>
            </tr>
            <tr>
              <td width="25%">Jenis Perkara </td>
              <td width="2%">:</td>
              <td width="73%"><?PHP echo "$jenis"; ?></td>
            </tr>
            <tr>
              <td>Nama Terdakwa </td>
              <td>:</td>
              <td><input name="namaterdakwa" type="text" id="namaterdakwa" value="<? echo $_GET['namaterdakwa'];  ?>" size="100">
			</td>
            </tr>
            <tr>
              <td>Barang Bukti Berasal dari </td>
              <td>:</td>
              <td><select name="sumberasal" id="sumberasal">
                    <option value=0 selected>- Sumberasal -</option>
                    <?php
mysql_connect("localhost", "root", "benk");
mysql_select_db("cma");
$sql=mysql_query("select * from tab_polisi");
while ($data=mysql_fetch_array($sql)){
print('<option value="'.$data["p_nama"].'">'.$data["p_nama"].'</option>');
}
?>
                  </select></td>
            </tr>
            <tr>
              <td>Ijin Penyitaan PN Nomor </td>
              <td>:</td>
              <td><input name="ijinsita" type="text" id="ijinsita" size="60"></td>
            </tr>
            <tr>
              <td>Reg Perkara / PDM / PDS </td>
              <td>:</td>
              <td><input name="pdm" type="text" id="pdm" size="4">
                / <?PHP echo "$kode"; ?> / <? echo $_GET['month'];  ?> / <? echo $_GET['year'];  ?></td>
            </tr>
            <tr>
              <td>Reg Barang Bukti </td>
              <td>:</td>
              <td><input name="rb" type="text" id="rb" size="4"> 
                /
                  <?PHP echo "$kode"; ?> / <? echo $_GET['month'];  ?> / <? echo $_GET['year'];  ?>                  </td>
            </tr>
            <tr>
              <td>Melanggar Pasal </td>
              <td>:</td>
              <td><input name="pasal" type="text" id="pasal" size="40"></td>
            </tr>
            <tr>
              <td>Nama Barangbukti &amp; Disimpan dimana</td>
              <td>&nbsp;</td>
              <td><?php
$jumlah=$_GET['jumlah'];
for($i=0; $i<$jumlah; $i++){
$nomor = $i + 1;
echo $nomor .". ";
?>
                  <input name="nim[]" type="text" size="60" maxlength="200" />

        <select name="nama[]">
          <option value="1" selected>GUDANG KEJARI</option>
          <option value="2">RUBASAN</option>
          <option value="3">PENITIPAN</option>
          <option value="4">LAINNYA</option>
        </select>
        <? echo "<br>"; }?></td>
            </tr>
            <tr>
              <td>Jaksa / Penuntut Umum </td>
              <td>:</td>
              <td><?php 
	mysql_connect("localhost", "root", "benk");
mysql_select_db("cma");
	$sql = "SELECT * FROM tab_personil where daftar_jenis = '1' ORDER BY daftar_nama";
    $result = mysql_query($sql);
    ?>
    <select name="jaksa1" id="jaksa1" class="font" onChange="updateText();"><option value="" selected></option>
    <?php while($row = mysql_fetch_array($result))
    { ?>
    <option value="<?php echo $row['daftar_nama']; ?>" class="font"><?php echo $row['daftar_nama']; ?></option>
    <?php }?>
    </select></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>Jika tidak ada dalam daftar Jaksa Kejari ketikan dibawah ini. </td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td><input name="jaksa" type="text" id="jaksa" size="40">
                </td>
            </tr>
            <tr>
              <td>Petugas Barang Bukti </td>
              <td>:</td>
              <td><strong><?PHP echo "$petugasbb"; ?></strong></td>
            </tr>
          </table>
          <table width="100%"  border="0" cellspacing="4" cellpadding="4">
            <tr>
              <td width="32%">&nbsp;</td>
              <td width="68%"><?php

if($jumlah >0){
echo "<input type=\"submit\" name=\"btnSiswa\" value=\"Simpan\" />";
}
?></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
          </table>
        </form></td>
      </tr>
    </table></td>
  </tr>
</table>
