<?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 bgcolor="#FFFFFF">
          <?php
		  mysql_connect("localhost","root","benk");
mysql_select_db("ebarbuk");
include("FusionCharts/FC_Colors.php");
include("FusionCharts/FusionCharts_Gen.php");
include("FusionCharts/FusionCharts.php");
echo"<SCRIPT LANGUAGE='Javascript' SRC='FusionCharts/FusionCharts.js'></SCRIPT>";
 $strXML="<graph caption='GRAFIK PENGELOLAAN BARANG BUKTI BERDASARKAN LOKASI' numberPrefix='' yAxisName='Jumlah' decimalPrecision='0' formatNumberScale='0'>";
	$kategori="<categories>";
	//Data Macam Surat
	$data = "<dataset seriesName='GUDANG' color='".getFCColor()."' >";
	$data1 = "<dataset seriesName='RUBASAN' color='".getFCColor()."' >";
	$data2 = "<dataset seriesName='PENITIPAN' color='".getFCColor()."' >";
	$data3 = "<dataset seriesName='LIMPAH PN' color='".getFCColor()."' >";
	$data4 = "<dataset seriesName='LAINNYA' color='".getFCColor()."' >";

	
	//Load Database
	$sql="SELECT * FROM barbuk_grafik1 "; $qr=mysql_query($sql); while($Data=mysql_fetch_array($qr)){
   	$arrData[0][1]="$Data[nama_produk]";
   	$arrData[0][2]="$Data[jumlah_a]";
   	$arrData[0][3]="$Data[jumlah_b]";
    $arrData[0][4]="$Data[jumlah_c]";
	$arrData[0][5]="$Data[jumlah_d]";
	$arrData[0][6]="$Data[jumlah_e]";
	
   foreach ($arrData as $arSubData) {
      $kategori .= "<category name='".$arSubData[1]."' />";
      $data .= "<set value='".$arSubData[2] ."' />";
      $data1 .= "<set value='".$arSubData[3] ."' />";
	  $data2 .= "<set value='".$arSubData[4] ."' />";
	  $data3 .= "<set value='".$arSubData[5] ."' />";
	  $data4 .= "<set value='".$arSubData[6] ."' />";
	 $data5 .= "<set value='".$arSubData[7] ."' />";
   }
}
$kategori .= "</categories>";

   $data .= "</dataset>";
   $data1 .= "</dataset>";
   $data2 .= "</dataset>";
   $data3 .= "</dataset>";
  $data4 .= "</dataset>";
  
   $strXML .= $kategori . $data . $data1 . $data2 . $data3 . $data4. $data5;
   $strXML .= "</graph>";
   echo renderChart("FusionCharts/FCF_MSColumn3D.swf", "", $strXML, "productSales", 1000, 300);

?></td>
      </tr>
    </table>
      <table width="100%"  border="0" cellspacing="8" cellpadding="8">
        <tr>
          <td bgcolor="#FFFFFF">
            <?php
		  echo"<div align='center'><SCRIPT LANGUAGE='Javascript' SRC='FusionCharts/FusionCharts.js'></SCRIPT>";
	
	 $FC = new FusionCharts("Column3D","1000","300"); 
	 $FC->setSWFPath("FusionCharts/");
	 
	 $strParam="caption=GRAFIK PENYELESAIAN BARANG BUKTI ; subcaption=Dalam Tahun Berjalan; xAxisName=JUMLAH PENYELESAIAN ; yAxisName=Jumlah; numberPrefix=; decimalPrecision=0";
	
	 $FC->setChartParams($strParam);
	 $qr=mysql_query("select* from barbuk_grafik2"); 
	 while($data=mysql_fetch_array($qr)){ 
	 $FC->addChartData("$data[jumlah_a]","name=Belum Di Eksekusi");
	 $FC->addChartData("$data[jumlah_b]","name=Kembali");
	 $FC->addChartData("$data[jumlah_c]","name=Lelang");
	 $FC->addChartData("$data[jumlah_d]","name=Rampas Untuk Dimusnahkan");
	 $FC->addChartData("$data[jumlah_e]","name=Rampas Untuk Negara");
}	 	 

	$FC->renderChart();
echo"</div>";

?></td>
        </tr>
      </table>
      <table width="100%"  border="0" cellspacing="8" cellpadding="8">
      <tr>
        <td><?PHP
		$page = $_GET["page"];
include("barbuk/index.db.php");
mysql_connect("$server", "$username", "$password");
mysql_select_db("$database");
$mytable = "$tahun_now";

if(empty($action))
{
if (empty($order)) $order =  2;
if (empty($page))  $page  =  1;
if (empty($hits))  $hits  = 100;
$start = $hits*($page-1);
$query = "SELECT * FROM $mytable";
$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 "PANTAUAN SELURUH BARANG BUKTI | TOTAL DIKELOLA <strong>$xnum</strong> BARANG| ";
for ($i=1;$i<=$stw2;$i++) {if($page==$i){
echo "<b> HAL $i |</b> ";} 
else{echo "<a href=\"?g=rekapgudang&page=$i\"> $i |</a>";}}
print ('<br><br>');
$query  = "SELECT * FROM ".$mytable." ";
if(!empty($squery)) { $query .= "LIKE \"%$squery%\" ";}
$query .= "ORDER BY ID DESC LIMIT $start,$hits";
$res = mysql_query($query);
print ('<table id="myTable" width="100%"  border="0" cellspacing="1" cellpadding="1" bgcolor="#B05800">
        <thead><tr>
		<td width="3%"><span class="style1"><strong>NO</strong></span></td>
		
<td width="15%"><span class="style1"><strong>NAMA TERDAKWA</strong></span></td>
<td width="12%"><span class="style1"><strong>NOMOR REGISTER BARANG BUKTI</strong></span></td>
<td width="15%"><span class="style1"><strong>IJIN SITA</strong></span></td>
<td width="30%"><span class="style1"><strong>DAFTAR BARANG BUKTI</strong></span></td>
<td width="15%"><span class="style1"><strong>LOKASI</strong></span></td>
<td width="10%"><span class="style1"><strong>STATUS</strong></span></td>
</tr></thead>');
$no=1; // fungsi nomor
 $x=0;
  while($row = mysql_fetch_array($res))
  {
   $x++;
   if($x==2) {$barva = "FFFFB7";$x=0;} else {$barva = "FFD8B0";$x=1;}
print ('<tr bgcolor=#'.$barva.'><td><center>'.$no++.'<center></td>');
print ('<td>'.$row['TERDAKWA'] .'</td>');
print ('<td>'.$row['RB'] .'</td>');
print ('<td>'.$row['IJINSITA'] .'</td>');
print ('<td>'.$row['NAMABARANG'] .'</td>');
print ('<td>');
if ($row['LOKASI'] == "0") {
print ('<img src="barbuk/images/b_belumproses.png" width="150" height="20">');
} 
 elseif ($row['LOKASI'] == "1") {
print ('<img src="barbuk/images/b_gudang.png" width="150" height="20">');
 } 
  elseif ($row['LOKASI'] == "2") {
print ('<img src="barbuk/images/b_rubasan.png" width="150" height="20">');
 } 
  elseif ($row['LOKASI'] == "3") {
print ('<img src="barbuk/images/b_penitipan.png" width="150" height="20">');
 } 
   elseif ($row['LOKASI'] == "4") {
print ('<img src="barbuk/images/b_lainlain.png" width="150" height="20">');
 } 
    elseif ($row['LOKASI'] == "5") {
print ('<img src="barbuk/images/b_limpahpn.png" width="150" height="20">');
 } 
print ('</td>');
print ('<td>');
if ($row['STATUS'] == "0") {
print ('BLM DIEKSEKUSI');
} 
 elseif ($row['STATUS'] == "1") {
print ('KEMBALI');
 } 
  elseif ($row['STATUS'] == "2") {
print ('LELANG');
 } 
  elseif ($row['STATUS'] == "3") {
print ('MUSNAH');
 } 
   elseif ($row['STATUS'] == "4") {
print ('DIRAMPAS UNTUK NEGARA');
 } 
print ('</td>');

print ('</tr>');
}
print ('</tbody></table>');
echo "<br><br>Ditampilkan $hits /Halaman";
}

?></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>

