<LINK href="images/index.css" rel="stylesheet" type="text/css">
<?PHP
include("../index.globalconfig.php");
$ukey1 = $_GET['ukey'];
$t1 = $_GET['t'];
include("index.db.php");
mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$mytable = "$tahun_now";
$sql=mysql_query("select * from $mytable where UKEY='$ukey1'");
if($row=mysql_fetch_array($sql)){
$day = date("d");
$month = date("m");
$year = date("Y");
?>
<table width="100%"  border="0" cellspacing="4" cellpadding="4" class="panel">
  <tr>
    <td>TAHAPAN BARANG BUKTI <b><? echo $row['TERDAKWA']; ?></b> | Pasal : <b><? echo $row['PASAL']; ?></b></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><? if ($t1 == "SMS"){ ?>
		<br>
		<form name="form1" method="post" action="index.panggilan.add.php">
		  <table width="100%"  border="0" cellspacing="4" cellpadding="4">
            <tr>
              <td colspan="3"><strong>PANGGILAN UNTUK MENGAMBIL BARANG BUKTI VIA SMS </strong></td>
            </tr>
            <tr>
              <td width="12%">Diproses Tanggal</td>
              <td width="1%">:</td>
              <td width="87%"> <?PHP echo $day; ?>/<?PHP echo $month; ?>/<?PHP echo $year; ?> </td>
            </tr>
            <tr>
              <td>Dikembalikan Kepada </td>
              <td>:</td>
              <td><b><? echo $row['NAMAPEMILIK']; ?></b></td>
            </tr>
            <tr>
              <td>Alamat</td>
              <td>:</td>
              <td><b><? echo $row['ALAMATPEMILIK']; ?></b></td>
            </tr>
            <tr>
              <td>No Telp </td>
              <td>:</td>
              <td><input name="notelp" type="text" id="notelp" value="<? echo $row['NOHPPEMILIK']; ?>"> 
              Ubah/Isikan jika yang ini salah. </td>
            </tr>
            <tr>
              <td>Berupa</td>
              <td>:</td>
              <td><b><? echo $row['NAMABARANG']; ?></b></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>Bahwa terdapat beberapa barang bukti yang dimiliki oleh 1 orang. agar cukup 1 kali saja dan abaikan proses sms yg lainnya. </td>
            </tr>
            <tr>
              <td>Isi Pesan </td>
              <td>:</td>
              <td><input name="isipesan" type="text" id="isipesan" value="Agar kpd. Saudara yg mendapatkan SMS ini untuk ke Kejaksaan mengambil Barang Bukti milik anda pada Jam Kerja" size="60"></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td><input type="submit" name="Submit3" value="Simpan"></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td><input name="day3" type="hidden" id="day3" value="<?PHP echo $day; ?>">
                <input name="month3" type="hidden" id="month3" value="<?PHP echo $month; ?>">
                <input name="year3" type="hidden" id="year3" value="<?PHP echo $year; ?>">
                <input name="do" type="hidden" id="do" value="SMS">
                <input name="id" type="hidden" id="id" value="<? echo $row['ID']; ?>"></td>
            </tr>
          </table>
		</form>
        <?
}
?>
        <? if ($t1 == "SURAT"){ 
		?>		<br>
		<br><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>


		  <table width="100%"  border="0" cellspacing="4" cellpadding="4">
            <tr>
              <td height="23"><strong>PEMGEMBALIAN BERDASARKAN SURAT </strong></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <td><div id="printData"><LINK href="images/index.css" rel="stylesheet" type="text/css"><table width="90%"  border="0" align="center" cellpadding="4" cellspacing="4">
               <?PHP 
include("index.db.php");
mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$mytable = "$tahun_now";
$id1 = $row['ID'];
$query = "UPDATE $mytable Set ntfy_surat  = '1' where ID = '$id1'";  
$result = mysql_query($query); 
?> 
               <tr>
                  <td colspan="4">
                    <table width="80%"  border="0" align="center" cellpadding="1" cellspacing="1">
                      <tr>
                        <td><b><center><? echo $satker; ?></center></b></td>
                      </tr>
                      <tr>
                        <td><b><center><? echo $alamat; ?></center></b></td>
                      </tr>
                    </table></td>
                  <td colspan="2"><table width="100"  border="0" align="right" cellpadding="1" cellspacing="1">
                    <tr>
                      <td bgcolor="#CCCCCC"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
                        <tr>
                          <td><div align="center"><strong>POST CARD </strong></div></td>
                        </tr>
                      </table></td>
                    </tr>
                  </table></td>
                </tr>
                <tr>
                  <td colspan="4">&nbsp;</td>
                  <td colspan="2">&nbsp;</td>
                </tr>
                <tr>
                  <td width="14%"><div align="right">Perihal</div></td>
                  <td width="2%">:</td>
                  <td width="18%">Panggilan Untuk Mengambil Barang Bukti </td>
                  <td width="14%">&nbsp;</td>
                  <td width="37%">KEPADA YTH. </td>
                  <td width="15%" rowspan="5" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td bgcolor="#000000"><table width="100%"  border="0" cellspacing="1" cellpadding="1">
                        <tr>
                          <td bgcolor="#FFFFFF"><p>&nbsp;</p>
                          <p>&nbsp;</p>
                          <p align="center"><strong>PERANGKO </strong><br>
                            Rp. 3.000,-</p>
                          <p align="center">&nbsp;</p>
                          <p align="center">&nbsp; </p>                          </td>
                        </tr>
                      </table></td>
                    </tr>
                  </table></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td valign="top"><hr size="1"></td>
                  <td>&nbsp;</td>
                  <td><b><? echo $row['NAMAPEMILIK']; ?></b></td>
                </tr>
                <tr>
                  <td colspan="4">&nbsp;</td>
                  <td rowspan="3" valign="top">Alamat Di: <b><? echo $row['ALAMATPEMILIK']; ?></b><br><br> No HP: <b><? echo $row['NOHPPEMILIK']; ?></b></td>
                </tr>
                <tr>
                  <td colspan="4">&nbsp;</td>
                </tr>
                <tr>
                  <td colspan="4">&nbsp;</td>
                </tr>
                <tr>
                  <td colspan="4">&nbsp;</td>
                  <td colspan="2">&nbsp;</td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td colspan="4">Diberitahukan kepada saudara agar dapat hadir di <b><? echo $satker; ?></b> yang beralamat di <b><? echo $alamat; ?></b> Pada Hari dan Jam Kerja Senin S/d Jumat Jam 08.00 sd 16.00 WIB guna mengambil Barang Bukti yang sudah tidak dipergunakan oleh Penuntut Umum sebagai pembuktian di Persidangan. </td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td colspan="4">&nbsp;</td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td colspan="4">Demikian untuk menjadi perhatian. </td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td colspan="4">&nbsp;</td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td colspan="2"><b><? echo $kota; ?></b>, <?PHP echo $day; ?>/<?PHP echo $month; ?>/<?PHP echo $year; ?> </td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td colspan="2">&nbsp;</td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td colspan="2">&nbsp;</td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td colspan="2">&nbsp;</td>
                </tr>
              </table></div></td>
            </tr>
            <tr>
              <td><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>
              </td>
            </tr>
          </table>

        <?
}
?> 
<? } ?>