<?PHP include("../index.globalconfig.php"); ?><form action="log_tahananprintsiap.php" method="post" name="form1" target="_blank">
  <table width="95%"  border="0" align="center" cellpadding="1" cellspacing="1">
    <tr>
      <td colspan="3" bgcolor="#FF6600"><div align="center">
          <table width="100%"  border="0" cellspacing="4" cellpadding="4">
            <tr>
              <td><div align="left"><strong>STEP 1 / TAHAP 1 (SETTING SEBELUM PRINT) </strong></div></td>
            </tr>
          </table>
      </div></td>
    </tr>
    <tr>
      <td colspan="3">&nbsp;</td>
    </tr>
    <tr>
      <td width="47%"><strong><?PHP echo "$satker"; ?></strong></td>
      <td width="44%"><div align="right"><strong>P-38</strong></div></td>
      <td width="9%">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="3"><strong>
        <? $tgl=date("d/m/Y");
$th_skrg=date("Y");
$bl_skrg=date("m");
?>
      </strong></td>
    </tr>
    <tr>
      <td colspan="3"><table width="100%"  border="0" cellspacing="1" cellpadding="0">
          <tr>
            <td width="13%"><p>Nomor </p></td>
            <td width="1%">:</td>
            <td width="36%"><p><strong>B -
                    <input name="no" type="text" id="no" size="5">
                / <?PHP echo $kodesatker; ?> /
                <select name="kodereg" id="kodereg">
                  <option value="Epp.2">Epp.2</option>
                  <option value="Ep.2">Ep.2</option>
                  <option value="Euh.2">Euh.2</option>
                  <option value="BELUM DIPILIH" selected>--Pilih--</option>
                </select>
                /<? echo

$bl_skrg=date("m");
?>  <? echo
$th_skrg=date("Y");
?> </strong></p></td>
            <td width="9%">&nbsp;</td>
            <td width="3%">&nbsp;</td>
            <td width="38%"><p><strong><?PHP echo $kota; ?> , 
                <?php 
							 $namahari = array("Minggu","Senin","Selasa","Rabu","Kamis","Jum'at","Sabtu"); 
							 $namabulan = array("","Januari","Pebruari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"); 
							 //echo $namahari[date("w")].", ".date("j")." ".$namabulan[date("n")]." ".date("Y"); 
							 echo  "".date("j")." ".$namabulan[date("n")]." ".date("Y"); 
							 ?>
            </strong></p></td>
          </tr>
          <tr>
            <td><p>Sifat </p></td>
            <td>:</td>
            <td><p>Segera </p></td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td><p>Lampiran </p></td>
            <td>:</td>
            <td>-</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td rowspan="2"><p>KEPADA YTH <strong>: </strong></p></td>
          </tr>
          <tr>
            <td> Perihal </td>
            <td>:</td>
            <td> <u>Bantuan memanggil Saksi / Terdakwa/ Terpidana </u></td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td><?PHP echo $lapasrutan; ?></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td rowspan="2">&nbsp;</td>
            <td rowspan="2">&nbsp;</td>
            <td rowspan="2">&nbsp;</td>
            <td rowspan="2">&nbsp;</td>
            <td rowspan="2">&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td colspan="4"><p>Guna melaksanakan Surat Pelimpahan Perkara / Penetapan / Putusan Pengadilan Negeri <?PHP echo $kota; ?> yang menetapkan / memutuskan / ditentukan / diputus pada : </p></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td colspan="4"><table width="100%"  border="0" cellspacing="1" cellpadding="1">
                <tr>
                  <td width="11%"> Hari </td>
                  <td width="1%">:</td>
                  <td width="19%"><select name="hari" id="hari">
                    <option value="SENIN">SENIN</option>
                    <option value="SELASA">SELASA</option>
                    <option value="RABU">RABU</option>
                    <option value="KAMIS">KAMIS</option>
                    <option value="JUMAT">JUMAT</option>
                    <option value="BELUM DIPILIH" selected>--PILIH--</option>
                    </select>
                  </td>
                  <td width="15%"> Tanggal </td>
                  <td width="1%">:</td>
                  <td width="53%">
                    <input name="tgl" type="text" id="tgl" value="<?php 
							 $namahari = array("Minggu","Senin","Selasa","Rabu","Kamis","Jum'at","Sabtu"); 
							 $namabulan = array("","Januari","Pebruari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"); 
							 //echo $namahari[date("w")].", ".date("j")." ".$namabulan[date("n")]." ".date("Y"); 
							 echo  "".date("j")." ".$namabulan[date("n")]." ".date("Y"); 
							 ?>">
                  </td>
                </tr>
                <tr>
                  <td> Jam </td>
                  <td>:</td>
                  <td><input name="jam" type="text" id="jam" value="09:00 WIB" size="15"></td>
                  <td> Tempat </td>
                  <td>:</td>
                  <td>
                    <?PHP echo $tempat; ?></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td colspan="4"><p>Sehubungan dengan Perkara atas nama Terdakwa / Terpidana : </p></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td colspan="4">Dengan ini diminta bantuan Saudara agar kepada orang yang namanya tersebut dibawah ini disampaikan Surat Panggilan sebagaimana terlampir. </td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td colspan="4">Setelah ditanda tangani oleh yang bersangkutan agar tanda terimanya dikembalikan kepada kami. </td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td colspan="4"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td height="25">
                    <?
mysql_connect("localhost", "root", "benk");
mysql_select_db("cma");
$mytable = "sidang_events";
$day1 = date("d");
$month1 = date("m");
$year1 = date("Y");

if(empty($action))
{
if (empty($order)) $order =  2;
if (empty($page))  $page  =  1;
if (empty($hits))  $hits  = 30;
$start = $hits*($page-1);
$query = "SELECT * FROM $mytable WHERE event_day = '$day1' and  event_month = '$month1' and event_year = '$year1'";
$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 "MOU DATUN <strong>$xnum</strong> | ";
//for ($i=1;$i<=$stw2;$i++) {if($page==$i){
//echo "Halaman <b>$i</b> ";
} 
//else{echo " <font size=\"2\"><a href=\"?id=$id1&page=$i\">$i</A></font> ";}}
//print ('<br><br>');
$query  = "SELECT * FROM ".$mytable." WHERE event_day = '$day1' and  event_month = '$month1' and event_year = '$year1'";
if(!empty($squery)) { $query .= "WHERE event_day = '$day1' and  event_month = '$month1' and event_year = '$year1' LIKE \"%$squery%\" ";}
$query .= "ORDER BY event_id DESC LIMIT $start,$hits";
$res = mysql_query($query);
print ('<table id="myTable" width="100%"  border="0" cellspacing="1" cellpadding="1" bgcolor="#B0B0B0">
        <thead><tr>
<td width="5%"><span class="style1"><strong>NO</strong></span></td>
<td width="35%"><span class="style1"><strong>NAMA TERDAKWA</strong></span></td>
<td width="25%"><span class="style1"><strong>ALAMAT</strong></span></td>
<td width="35%"><span class="style1"><strong>KET / PENUNTUT UMUM</strong></span></td>


</tr></thead><tbody>');
$no=1; // fungsi nomor
 $x=0;
  while($row = mysql_fetch_array($res))
  {
   $x++;
   if($x==2) {$barva = "FFFFFF";$x=0;} else {$barva = "FFFFD9";$x=1;}


print ('<tr bgcolor=#'.$barva.'>');
print ('<td><center>'.$no++.'</center></td>');
print ('<td>'.$row['event_terdakwa'].'</td>');
print ('<td>'.$row['event_alamat'].'</td>');
print ('<td>'.$row['event_jaksa'].' - '.$row['event_agenda'].'</td>');

print ('</tr>');
}
print ('</tbody></table>');
?>
                    <input name="day" type="hidden" id="day" value="<?PHP echo $day1 = $_GET["day"]; ?>">
                    <input name="month" type="hidden" id="month" value="<?PHP echo $month1 = $_GET["month"]; ?>">
                    <input name="year" type="hidden" id="year" value="<?PHP echo $year1 = $_GET["year"]; ?>">
                    <input name="tipe" type="hidden" id="tipe" value="<?PHP echo $tipe1 = $_GET["tipe"]; ?>"></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td><div align="center">AN . KEPALA KEJAKSAAN NEGERI <?PHP echo $kota; ?></div></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td><div align="center"> KEPALA SEKSI TINDAK PIDANA UMUM</div></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td><p>&nbsp;</p>
                <p>&nbsp;</p>
                <p>&nbsp;</p></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td><div align="center">
                <?PHP echo $kasipidum; ?>            </div></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td><div align="center"></div></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td colspan="6"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="3%"><div align="center">1.</div></td>
                  <td width="44%"><p>YTH. KEPALA KEJAKSAAN NEGERI <?PHP echo $kota; ?> (sebagai laporan) </p></td>
                  <td width="53%">&nbsp;</td>
                </tr>
                <tr>
                  <td><div align="center">2.</div></td>
                  <td>A R S I P </td>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td><hr size="1"></td>
                  <td>&nbsp;</td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td><div align="center">
                <input type="submit" name="Submit" value=" CETAK ">
            </div></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
      </table></td>
    </tr>
  </table>
</form>
