<?PHP
mysql_connect("$server", "$username", "$password");
mysql_select_db("cma");
date_default_timezone_set('ASIA/JAKARTA');
$tablename3 = "tab_polisi";
$next_increment     = 0;
$qShowStatus        = "SHOW TABLE STATUS LIKE '$tablename3'";
$qShowStatusResult  = mysql_query($qShowStatus) or die ( "Query failed: " . mysql_error() . "<br/>" . $qShowStatus );
$row = mysql_fetch_assoc($qShowStatusResult);
$next_increment = $row['Auto_increment'];
?><table width="100%"  border="0" cellspacing="4" cellpadding="4">
  <tr>
    <td><a href="?g=key&i=index" class="menu">UBAH PASSWORD STANDAR </a></td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="4" cellpadding="4">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="4" cellpadding="4" class="panel">
  <tr>
    <td>Pengaturan Aplikasi </td>
  </tr>
  <tr>
    <td>Gunakan Huruf Kapital/Besar </td>
  </tr>
  <tr>
    <td><?PHP
$query = "Select * from tab_settings"; 
$result = mysql_query($query); 
if($row = mysql_fetch_array($result)){
?><form name="form1" method="post" action="index.pengaturan.add.php">
      <table width="100%"  border="0" cellspacing="4" cellpadding="4">
        <tr>
          <td width="15%">Kejati</td>
          <td width="2%">:</td>
          <td width="83%"><input name="kejati" type="text" id="kejati" value="<?PHP echo htmlspecialchars($row['s_wil']); ?>" size="50"> 
            Contoh : D.I.YOGYAKARTA
            <input name="key" type="hidden" id="key" value="lokasi">
            <input name="table" type="hidden" id="table" value="tab_settings"></td>
        </tr>
        <tr>
          <td>Kejari</td>
          <td>:</td>
          <td><input name="kejari" type="text" id="kejari" value="<?PHP echo htmlspecialchars($row['s_satker']); ?>" size="40"></td>
        </tr>
        <tr>
          <td>Tipe</td>
          <td>:</td>
          <td><input name="tipe" type="text" id="tipe" value="<?PHP echo htmlspecialchars($row['s_tipe']); ?>" size="5"></td>
        </tr>
        <tr>
          <td>Alamat</td>
          <td>:</td>
          <td><input name="alamat" type="text" id="alamat" value="<?PHP echo htmlspecialchars($row['s_alamat']); ?>" size="60"></td>
        </tr>
        <tr>
          <td>NO SMS Center</td>
          <td>:</td>
          <td><input name="nosms" type="text" id="nosms" value="<?PHP echo htmlspecialchars($row['s_sms']); ?>"></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td><input type="submit" name="Submit" value="Simpan"></td>
        </tr>
      </table>
    </form></td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="4" cellpadding="4">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="4" cellpadding="4" class="panel">
  <tr>
    <td>Input Daftar Kepolisian (Polres &amp; Polsek) </td>
  </tr>
  <tr>
    <td>Gunakan Huruf Kapital/Besar </td>
  </tr>
  <tr>
    <td><form name="form1" method="post" action="index.pengaturan.add.php">
        <table width="100%"  border="0" cellspacing="4" cellpadding="4">
          <tr>
            <td width="15%">Instansi</td>
            <td width="2%">:</td>
            <td width="50%"><input name="instansi" type="text" id="instansi" size="30">
              Contoh : POLSEK XXX / POLRES XXX / BNNP/BPOM dsb
                <input name="key" type="hidden" id="key" value="polisi">
                <input name="table" type="hidden" id="table" value="tab_polisi"></td>
            <td width="33%" rowspan="6" valign="top"><table width="100%"  border="0" cellspacing="2" cellpadding="2">
              <tr>
                <td height="200"><iframe src="index.polisi.php" height="200" width="100%" frameborder="0" scrolling="auto"></iframe></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td>Nomor Urut </td>
            <td>:</td>
            <td><input name="nourut" type="text" id="nourut" value="<?PHP echo $next_increment; ?>" size="2" readonly="1"> 
            (tidak diperbolehkan duplikasi nomor urut) (tidak boleh untuk di edit) </td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td><input type="submit" name="Submit2" value="Simpan"></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>Contoh : polsek a - no urut 1, polsek b no urut 2 </td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table>
    </form><? } ?></td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="4" cellpadding="4">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="4" cellpadding="4" class="panel">
  <tr>
    <td><strong>Pengaturan Database </strong></td>
  </tr>
  <tr>
    <td>Pada versi ini tidak dapat melakukan perubahan atau penambahan database. </td>
  </tr>
  <tr>
    <td><table width="100%"  border="0" cellspacing="4" cellpadding="4">
      <tr>
        <td width="48%"><?PHP
$query = "Select * from tab_dataperkara"; 
$result = mysql_query($query); 
if($row = mysql_fetch_array($result)){
?><form name="form1" method="post" action="index.pengaturan.add.php">
          <table width="100%"  border="0" cellspacing="4" cellpadding="4">
            <tr>
              <td colspan="3"><strong>Database Pidum </strong></td>
              </tr>
            <tr>
              <td width="36%">Database Aktif </td>
              <td width="6%">:</td>
              <td width="58%"><?PHP echo htmlspecialchars($row['t_table']); ?> | <?PHP echo htmlspecialchars($row['t_tahun']); ?>
                <input name="key" type="hidden" id="key" value="dbperkara">
                <input name="table" type="hidden" id="table" value="tab_dataperkara"></td>
            </tr>
            <tr>
              <td>Pilih Database </td>
              <td>:</td>
              <td><select name="dbperkara1" id="dbperkara1">
                <option value=0 selected>- Pilih Database -</option>
         
                <?php

mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$sql=mysql_query("Select * from tab_dataperkara");
while ($row=mysql_fetch_array($sql)){
        print ('<option value="'.$row["t_table"].'">'.$row["t_table"].'</option>');


}


?>
            </select></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td><input type="submit" name="Submit22" value="Simpan"></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
          </table>
        </form><? } ?></td>
        <td width="52%"><?PHP
$query = "Select * from tab_surat"; 
$result = mysql_query($query); 
if($row = mysql_fetch_array($result)){
?><form name="form1" method="post" action="index.pengaturan.add.php">
          <table width="100%"  border="0" cellspacing="4" cellpadding="4">
            <tr>
              <td colspan="3"><strong>Database Persuratan </strong></td>
              </tr>
            <tr>
              <td width="25%">Database Aktif </td>
              <td width="3%">:</td>
              <td width="72%"><?PHP echo htmlspecialchars($row['s_nama']); ?> | <?PHP echo htmlspecialchars($row['s_tahun']); ?>
                <input name="key" type="hidden" id="key" value="persuratan">
                <input name="table" type="hidden" id="table" value="tab_surat"></td>
            </tr>
            <tr>
              <td>Pilih Database </td>
              <td>:</td>
              <td><select name="dbpersuratan1" id="dbpersuratan1">
                <option value=0 selected>- Pilih Database -</option>
         
                <?php

mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$sql=mysql_query("Select * from tab_surat");
while ($row=mysql_fetch_array($sql)){
        print ('<option value="'.$row["s_nama"].'">'.$row["s_nama"].'</option>');


}


?>
            </select></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td><input type="submit" name="Submit222" value="Simpan"></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
          </table>
        </form><? } ?></td>
      </tr>
      <tr>
        <td><?PHP
		include("../barbuk/index.db.php");
$query = "Select * from barbuk_db"; 
$result = mysql_query($query); 
if($row = mysql_fetch_array($result)){
?><form name="form1" method="post" action="index.pengaturan.add.php">
          <table width="100%"  border="0" cellspacing="4" cellpadding="4">
            <tr>
              <td colspan="3"><strong>Database Barang Bukti </strong></td>
              </tr>
            <tr>
              <td width="36%">Database Aktif </td>
              <td width="6%">:</td>
              <td width="58%"><?PHP echo htmlspecialchars($row['t_table']); ?> | <?PHP echo htmlspecialchars($row['t_tahun']); ?>
                <input name="key" type="hidden" id="key" value="barbuk">
                <input name="table" type="hidden" id="table" value="barbuk"></td>
            </tr>
            <tr>
              <td>Pilih Database </td>
              <td>:</td>
              <td><select name="barbuk_db1" id="barbuk_db1">
                <option value=0 selected>- Pilih Database -</option>
         
                <?php
$sql=mysql_query("Select * from barbuk_db");
while ($row=mysql_fetch_array($sql)){
        print ('<option value="'.$row["t_table"].'">'.$row["t_table"].'</option>');


}


?>
            </select></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td><input type="submit" name="Submit222" value="Simpan"></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
          </table>
        </form><? } ?></td>
        <td>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="4" cellpadding="4">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="2" cellpadding="2">
  <tr>
    <td bgcolor="#FF9900"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
      <tr>
        <td><strong>Pengaturan Tambahan: </strong></td>
      </tr>
      <tr>
        <td bgcolor="#FFCC99">Beberapa modul seperti modul besuk (T-10) pengelolaan Barang Bukti perlu di definisikan siapa Kasi Pidum, Siapa Petugas Barang Bukti melalui pengaturan pembinaan yang telah ada. </td>
      </tr>
      <tr>
        <td bgcolor="#FFCC99">TIPS. UBAH NAMA FOLDER PHPMYADMIN MENJADI NAMA LAIN SESUAI PILIHAN ANDA AGAR TIDAK MUDAH DITEMUKAN MELALUI JARINGAN </td>
      </tr>
    </table></td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="4" cellpadding="4">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
