<?PHP
include("index.cma.db.php");
include("index.globalconfig.php");
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><?PHP echo $satker; ?> | <?PHP echo $alamat; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK href="images/index.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--

.style1 {color: #FFFFFF}
body {
	margin-top: 0px;
	margin-bottom: 0px;
	background-color: #336600;
	background-image: url();
}
-->
</style>
<style type="text/css">
#fixmetoo { position: absolute; right: 0px; bottom: 0px; width: 100%;
}
body > div#fixmetoo { position: fixed; }
.style1 {color: #FFFFFF}
.style7 {color: #FFFFFF}
.style7 {color: #FFFFFF}
.style8 {color: #FFFFFF}
.style8 {color: #FFFFFF}
.style9 {
	color: #FFCC00;
	font-weight: bold;
}
.style10 {	font-size: xx-large;
	font-weight: bold;
	color: #006600
}
.style11 {color: #FFFFFF}
.style11 {color: #FFFFFF}
.style14 {	color: #000000;
	font-weight: bold;
}
</style>
<script language="javascript">

/*
Auto center window script- Eric King (http://redrival.com/eak/index.shtml)
Permission granted to Dynamic Drive to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}

</script>
</head>

<body>

<table width="1100"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="200" valign="bottom" background="themes/camelon_a.jpg">&nbsp;</td>
  </tr>
  <tr>
    <td height="25" bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="6" cellpadding="6">
      <tr>
        <td><div align="center"><?PHP echo $satker; ?> | <?PHP echo $alamat; ?></div></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="25" bgcolor="#669900"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="700" height="50">
      <param name="movie" value="themes/top_hijau.swf">
      <param name="quality" value="high">
      <embed src="themes/top_hijau.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="50"></embed>
    </object></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="8" cellpadding="8">
      <tr>
        <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td bgcolor="#669900"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
                <tr>
                  <td><form name="form3" method="post" action="index.search.php">
                      <table width="100%"  border="0" align="center" cellpadding="4" cellspacing="4">
                        <tr>
                          <td width="30%"><div align="center" class="style11"><strong>PENCARIAN TERSANGKA </strong></div></td>
                          <td width="26%"><div align="center"><span class="style11"><strong>
                              <input name="query" type="text" id="query">
                          </strong></span></div></td>
                          <td width="44%"><span class="style11"><strong>
                            <input type="submit" name="Submit3" value="CARI TERSANGKA">
                          </strong></span></td>
                        </tr>
                      </table>
                  </form></td>
                </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table width="100%"  border="0" cellspacing="4" cellpadding="4">
          <tr>
            <td bgcolor="#FF9900"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td><?php
			
			include("index.cma.db.php");
mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");

    $query = $_POST['query'];
	$table = "tab_dataperkara2016";
    $min_length = 3;
    if(strlen($query) >= $min_length){
        $query = htmlspecialchars($query);
        $query = mysql_real_escape_string($query);
        $raw_results = mysql_query("SELECT * FROM $table 
        WHERE (`spdp_namatsk` LIKE '%".$query."%') OR (`spdp_pasal` LIKE '%".$query."%') OR (`p16_jaksa1` LIKE '%".$query."%')") or die(mysql_error());
	
        if(mysql_num_rows($raw_results) > 0){ // if one or more rows are returned do following
             print ('<table width="100%"  border="0" cellspacing="2" cellpadding="2">
  <tr bgcolor="#FF9900">
    <td width="15%"><span class="style1"><strong>NAMA TERSANGKA</strong></span></td>
<td width="15%"><span class="style1"><strong>PENYIDIK</strong></span></td>
<td width="15%"><span class="style1"><strong>PASAL</strong></span></td>
<td width="15%"><span class="style1"><strong>JAKSA</strong></span></td>
<td width="10%"><span class="style1"><strong>P18</strong></span></td>
<td width="10%"><span class="style1"><strong>P21</strong></span></td>
<td width="10%"><span class="style1"><strong>SIDANG</strong></span></td>
<td width="10%"><span class="style1"><strong>PUTUS</strong></span></td>
  </tr>');
            while($results = mysql_fetch_array($raw_results)){
             
    
	  print ('
  <tr bgcolor="#FFF1BB">
    <td>'.$results['spdp_namatsk'].'</td>
    <td>');

	$polisi1 = $results['spdp_dari'];
 mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$sql=mysql_query("select * from tab_polisi where p_nomor = '$polisi1'");
while ($data=mysql_fetch_array($sql)){
print(''.$data['p_nama'].'');
}
	print ('</td>
    <td>'.$results['spdp_pasal'].'</td><td>');
	

$jaksa1 = $results['p16_jaksa1'];
 mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$sql=mysql_query("select * from tab_personil where daftar_pegid = '$jaksa1'");
while ($data=mysql_fetch_array($sql)){
print('<b>'.$data['daftar_nama'].'</b>');
}




	print ('</td>');
  print ('<td>');
if ($results['berkas_tahap1p18tgl'] == "") {print ('-');} elseif ($results['berkas_tahap1p18tgl'] !== "") {print (''.$results['berkas_tahap1p18tgl'] .'');} 
print ('</td>');
print ('<td>');
if ($results['berkas_tahap1p21tgl'] == "") {print ('-');} elseif ($results['berkas_tahap1p21tgl'] !== "") {print (''.$results['berkas_tahap1p21tgl'] .'');} 
print ('</td>');
print ('<td>');
if ($results['berkas_tgltapsidang'] == "") {print ('-');} elseif ($results['berkas_tgltapsidang'] !== "") {print (''.$results['berkas_tgltapsidang'] .'');} 
print ('</td>');
print ('<td>');
if ($results['berkas_ptstgl'] == "") {print ('-');} elseif ($results['berkas_ptstgl'] !== "") {print (''.$results['berkas_ptstgl'] .'');} 
print ('</td></tr>');
  

            }
             print ('</table>');
        }
        else{ 
            echo "Tidak ditemukan nama tersangka tersebut";
        }
         
    }
    else{ // if query length is less than minimum
        echo "Minimum length is ".$min_length;
    }
?></td>
                </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
<table width="1100" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#353500"><table width="699"  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><table width="300" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td><center>
                  <?PHP
mysql_connect("localhost", "root", "benk");
mysql_select_db("cma_tilang");
$query = "Select * from tilang_set"; 
$result = mysql_query($query); 
if($row2 = mysql_fetch_array($result)){ 
if($row2['s_status'] == '0'){ 
print ('<img src="tilang/off.jpg" width="200" height="20">');

}
elseif($row2['s_status'] == '1'){ 
print ('<img src="tilang/on.jpg" width="200" height="20">');
print ('<iframe src="tilang/index_respon.php" height="0" width="0" frameborder="0" scrolling="no"></iframe></center>');
}
}
?>
              </center></td>
            </tr>
        </table></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><div align="center" class="style8">Camelon Atmosphere </div></td>
      </tr>
      <tr>
        <td><div align="center" class="style8">(c) 2013 - 2018 Created By <a href="http://chendia.ihkeren.com" class="style9">Chendia Studio</a></div></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><div align="center"></div></td>
      </tr>
      <tr>
        <td></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
<div align="center" class="style2" id="fixmetoo"> 
  <table width="100%"  border="0" cellspacing="4" cellpadding="4">
    <tr>
      <td width="11%"><a href="tamu/index.php"><img src="tamu/images/tamu_cek.png" width="150" height="150" border="0"></a></td>
      <td width="89%" valign="bottom">&nbsp;</td>
    </tr>
  </table>
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td bgcolor="#CCCCCC"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td bgcolor="#CCCCCC"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
              <tr>
                <td><strong>
                  <marquee>
            Yang Akan Berulang Tahun Pada Bulan Ini :
            <?
$koneksi=mysql_connect("localhost","root","benk");
mysql_select_db("cma",$koneksi);
	$bacadata=mysql_query("SELECT * FROM tab_personil");
	while($cetakdata=mysql_fetch_array($bacadata)){
	$pecahdata=explode("/",$cetakdata['daftar_ultah']);
	$tglskrng=date("d");
	$blnskrng=date("m");
	$pecah1=$pecahdata[0];
	$pecah2=$pecahdata[1];
	//if($tglskrng==$pecah1&&$blnskrng==$pecah2){
	if($blnskrng==$pecah2){
	//echo "<p><strong>UCAPAN SELAMAT</strong></p><img src='HappyBday.gif'><p>Selamat Ulang Tahun <b>$cetakdata[nama]</b><br>Tanggal Lahir : <b>$cetakdata[tgllahir]</b><br><b>Ucapan Buat Kamu :</b> $cetakdata[ucapan]</p>";
		echo "<b>$cetakdata[daftar_nama]</b> Tanggal Lahir : <b> $cetakdata[daftar_ultah]</b> | ";

	} if ($tglskrng==$pecah1 && $blnskrng==$pecah2){
	echo "<span class=\"style6\">YANG BERULANG TAHUN HARI INI : <b>$cetakdata[daftar_nama]</b> Tanggal Lahir : <b> $cetakdata[daftar_ultah]</b></span> ";
	$id1 = $cetakdata['daftar_pegid'];
	$ultah = $cetakdata['ntfy_ultah'];
	if ($ultah=='0'){
	$query = "UPDATE tab_personil Set ntfy_ultah = '1' where daftar_pegid = '$id1'";  
$result = mysql_query($query);
} 
if ($ultah=='1'){

$SQL     = "SELECT * FROM tab_personil where ntfy_ultah = '1'";
$results = mysql_query($SQL);
while ($row = mysql_fetch_array($results)){
	$nama1 = $row['daftar_nama'];
	$notujuan = $row['daftar_nohp'];
$isipesan = "Selamat Ulang Tahun $nama1 Semoga Sehat Selalu, banyak rejeki dari Keluarga Besar Kejari";
$DestinationNumber=addslashes(strip_tags($notujuan));	
$TextDecoded=addslashes(strip_tags($isipesan)); 
$sql="INSERT INTO outbox (`UpdatedInDB` ,`InsertIntoDB` ,`SendingDateTime` ,`Text` ,`DestinationNumber` ,`Coding` ,`UDH` ,`Class` ,`TextDecoded` ,`ID` ,`MultiPart` ,`RelativeValidity` ,`SenderID` ,`SendingTimeOut` ,`DeliveryReport` ,`CreatorID`)
VALUES (NOW() , NOW(), '0000-00-00 00:00:00', NULL , '$DestinationNumber', 'Default_No_Compression', NULL , '-1', '$TextDecoded', NULL , 'false', '-1', NULL , '0000-00-00 00:00:00', 'default', '')";
mysql_query($sql); 
$query = "UPDATE tab_personil Set ntfy_ultah = '2' where daftar_pegid = '$id1'";  
$result = mysql_query($query); 
}}

	}
	}
	
	?>
                  </marquee>
                </strong></td>
              </tr>
          </table></td>
        </tr>
      </table>
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="21%" bgcolor="#669900"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td>
                    <div align="center" class="style7"><strong>CAMELON <? echo date('d/m/Y'); ?></strong></div></td>
                </tr>
            </table></td>
            <td width="79%" bgcolor="#66CC00"><table width="100%"  border="0" cellspacing="2" cellpadding="2">
              <tr>
                <td height="30"><marquee>
                                <?PHP
					$tahun=date("Y");
$link = mysql_connect("localhost", "root", "benk"); mysql_select_db("cma", $link);
$SQL     = "SELECT * FROM pengumuman ORDER By i_id DESC LIMIT 5";
$results = mysql_query($SQL);
while ($row = mysql_fetch_array($results)){
print ('<b>PENGUMUMAN</b> DIKIRIM TANGGAL '.$row['i_tgl'].' [ '.$row['i_kegiatan'].' ] --- ');
} 
print (' -E-N-D- ');
?>
                </marquee></td>
              </tr>
            </table></td>
          </tr>
      </table></td>
    </tr>
  </table>
</div>
</body>
</html>

