<?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><?
$link = mysql_connect("$server", "$username", "$password"); mysql_select_db("$database", $link);
$result = mysql_query("SELECT * FROM tab_personil where daftar_status='0'", $link);
$num_rows = mysql_num_rows($result);
echo "<br><br><div align=\"center\"><b>Jumlah Total Pegawai $num_rows Orang</b></div><br><br>";
print ('<table width="100%"  border="0" cellspacing="2" cellpadding="2" class="panel">
  <tr>
    <td><table width="100%"  border="0" cellspacing="2" cellpadding="2">
      <tr>
         <td width="25%">Nama Pegawai </td>
		 <td width="20%">Pangkat </td>
		  <td width="15%">NIP </td>

		 <td width="15%">NAIK PANGKAT YAD</td>
		 <td width="15%">KGB YANG AKAN DATANG</td>
		 <td width="10%">Bidang </td>
		
      </tr>');
                   


$SQL     = "SELECT * FROM tab_personil where daftar_status='0' ORDER BY daftar_jenis ASC";
$results = mysql_query($SQL);
while ($row = mysql_fetch_array($results)){
print ('<tr bgcolor="#FFFFCC">
        <td><b>'.$row['daftar_nama'] . '</b></td><td>');
		if ($row['daftar_pangkat'] == "1") {echo "YUANA DHARMA TU / II.A";} 
		elseif ($row['daftar_pangkat'] == "2") {echo "MUDA DHARMA TU/ II.B";} 
		elseif ($row['daftar_pangkat'] == "3") {echo "MADYA DHARMA TU / II.C";} 
		elseif ($row['daftar_pangkat'] == "4") {echo "SENA DHARMA TU / II.D";} 
		elseif ($row['daftar_pangkat'] == "5") {echo "YUANA WIRA TU / III.A";} 
		elseif ($row['daftar_pangkat'] == "6") {echo "MUDA WIRA TU / III.B";} 
		elseif ($row['daftar_pangkat'] == "7") {echo "MADYA WIRA TU / III.C";} 
		elseif ($row['daftar_pangkat'] == "8") {echo "SENA WIRA TU / III.D";} 
		elseif ($row['daftar_pangkat'] == "9") {echo "ADI WIRA TU / IV.A";} 
		elseif ($row['daftar_pangkat'] == "10") {echo "NINDYA WIRA TU / IV.B";} 
		elseif ($row['daftar_pangkat'] == "11") {echo "AJUN JAKSA MADYA / III.A";} 
  elseif ($row['daftar_pangkat'] == "12") {echo "AJUN JAKSA / III.B";} 
   elseif ($row['daftar_pangkat'] == "13") {echo "JAKSA PRATAMA / III.C";} 
    elseif ($row['daftar_pangkat'] == "14") {echo "JAKSA MUDA / III.D";} 
	else if ($row['daftar_pangkat'] == "15") {echo "JAKSA MADYA / IV.A";} 
	else if ($row['daftar_pangkat'] == "16") {echo "JAKSA UTAMA PRATAMA / IV.B";} 
	elseif ($row['daftar_pangkat'] == "17") {echo "JAKSA UTAMA MUDA / IV.C";} 
	elseif ($row['daftar_pangkat'] == "18") {echo "JAKSA UTAMA MADYA / IV.D";} 
	elseif ($row['daftar_pangkat'] == "19") {echo "JAKSA UTAMA / IV.E";}  
else if ($row['daftar_pangkat'] == "0") {echo "Pangkat tidak dapat ditampilan";}
print ('</td><td>'.$row['daftar_nip'].'</td>');
print ('<td>'.$row['daftar_npyad'].'</td>');
print ('<td>'.$row['daftar_kgbyad'].'</td>');
print ('<td>');
if ($row['daftar_jenis'] == "1") {echo "JAKSA";} 
		elseif ($row['daftar_jenis'] == "2") {echo "PEMBINAAN";} 
		elseif ($row['daftar_jenis'] == "3") {echo "INTEL";} 
		elseif ($row['daftar_jenis'] == "4") {echo "PIDUM";} 
		elseif ($row['daftar_jenis'] == "5") {echo "PIDSUS";} 
		elseif ($row['daftar_jenis'] == "6") {echo "DATUN";} 
		elseif ($row['daftar_jenis'] == "7") {echo "HONORER";} 
		
		
		
		
print ('</td>');

} 
print ('
    </tr></table>
  </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>
    </table></td>
  </tr>
</table>
<div align="center" class="style2" id="fixmetoo"> 
  <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>

