<?PHP
include("index.globalconfig.php");
include("index.cma.db.php");
$query = "Select * from $mytable"; 
$result = mysql_query($query); 
if($row = mysql_fetch_array($result)){

?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>PAPAN KONTROL PERKARA</title>
<LINK href="images/index.css" rel="stylesheet" type="text/css">
<meta http-equiv="refresh" content="1000" >
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <style type="text/css">
#fixmetoo { position: absolute; right: 0px; bottom: 0px; width: 100%;
}
body > div#fixmetoo { position: fixed; }
 </style>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	background-image: url();
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {
	font-weight: bold;
	font-size: 14px;
}

-->
</style>

<style type="text/css">
<!--
.stylesidang {font-size: 12px}
-->
</style>
<style type="text/css">

/*Example CSS for the two demo scrollers*/

#pscroller1{
width: 350px;
height: 300px;
padding: 5px;
}

#pscroller2{
width: 350px;
height: 145px;
padding: 3px;
}

#pscroller2 a{
text-decoration: none;
}

.someclass{ //class to apply to your scroller(s) if desired
}
.style5 {font-size: 14; color: #FFFFFF; }
.style8 {
	font-size: xx-large;
	font-weight: bold;
	color: #006600
}
.style14 {
	color: #FFFFFF;
	font-weight: bold;
	font-size: large;
}
.style15 {
color: #006600
}
</style>



<script type="text/javascript">

/***********************************************
* Pausing up-down scroller- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}

</script>
</head>

<body onLoad="show_clock()">
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="50" bgcolor="#669900"><table width="96%"  border="0" align="center" cellpadding="6" cellspacing="6">
      <tr>
        <td><div align="left"><span class="style14"><b><?PHP echo $satker; ?></b> </span></div></td>
      </tr>
    </table>
      </td>
  </tr>
  <tr>
    <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="90%" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="73%" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td height="135" background="themes/pengumuman_2.jpg"><img src="themes/pengumuman_1.jpg" width="779" height="135"></td>
                      </tr>
                    </table>                      <table width="96%"  border="0" align="center" cellpadding="6" cellspacing="6">
                        <tr>
                          <td height="700" valign="top"><span class="style8">
                            <marquee behavior="scroll" direction="up">
                            <?PHP
					$tahun=date("Y");
$link = mysql_connect("localhost", "root", "benk"); mysql_select_db("cma", $link);
$SQL     = "SELECT * FROM pengumuman";
$results = mysql_query($SQL);
while ($row = mysql_fetch_array($results)){
print (''.$row['i_kegiatan'].'');
print ('<hr>');
} 

?>
                            </marquee></span></td>
                        </tr>
                      </table></td>
                    <td width="27%" valign="top" bgcolor="#66CC00"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td bgcolor="#CC0000"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
                            <tr>
                              <td><strong>JADWAL SIDANG HARI INI </strong></td>
                            </tr>
                            <tr>
                              <td height="250" bgcolor="#FFDFDF"><marquee behavior="scroll" direction="up">
                                <?
mysql_connect("localhost", "root", "benk");
mysql_select_db("cma");
$mytable = "sidang_events";
$day1=date("d");
$year1=date("Y");
$month1=date("m");

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' AND event_tipe = '$tipe1'";
$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' AND event_tipe = '$tipe1' LIKE \"%$squery%\" ";}
$query .= "ORDER BY event_id DESC LIMIT $start,$hits";
$res = mysql_query($query);
print ('<table id="myTable" width="100%"  border="0" cellspacing="0" cellpadding="2" bgcolor="#FF0000">
        <thead><tr>
<td width="5%"><strong>NO</strong></td>
<td width="35%"><strong>TERDAKWA</strong></td>
<td width="20%"><strong>AGENDA</strong></td>
<td width="40%"><strong>P.U.</strong></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><span class="stylesidang">'.$row['event_terdakwa'].'</span></td>');
print ('<td><span class="stylesidang">'.$row['event_agenda'].'</span></td>');
print ('<td><span class="stylesidang">'.$row['event_jaksa'].' </span></td>');


		


print ('</tr>');
}
print ('</tbody></table>');
?>
                              </marquee></td>
                            </tr>
                        </table></td>
                      </tr>
                    </table>                      
                      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td bgcolor="#FF9900"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
                              <tr>
                                <td><strong>NAIK PANGKAT REGULER TAHUN INI </strong></td>
                              </tr>
                              <tr>
                                <td height="300" bgcolor="#FFFF99"><marquee behavior="scroll" direction="up"><?PHP
					$tahun=date("Y");
$link = mysql_connect("localhost", "root", "benk"); mysql_select_db("cma", $link);
print ('<table width="100%"  border="0" cellspacing="1" cellpadding="1">
  <tr>
    <td bgcolor="#CC6600"><table width="100%"  border="0" cellspacing="1" cellpadding="1">
      <tr>
<td width="100%">NAMA PEGAWAI</td>
      </tr>');

$SQL     = "SELECT * FROM tab_personil";
$results = mysql_query($SQL);
while ($row = mysql_fetch_array($results)){

$teks = $row['daftar_npyad'];
//pecah string berdasarkan string ","
$pecah = explode("/", $teks);
//mencari element array 0
$hasil3 = $pecah[2];


 if ($tahun == $hasil3) {

  
  
print ('<tr bgcolor="#FFFFFF">
        <td><b>'.$row['daftar_nama'] . '</b> | ');
 if ($row['daftar_pangkat'] == "1") {echo "YUANA DHARMA";} 
  elseif ($row['daftar_pangkat'] == "2") {echo "MUDA DARMA";} 
   elseif ($row['daftar_pangkat'] == "3") {echo "MADYA DARMA";} 
    elseif ($row['daftar_pangkat'] == "4") {echo "SENA DARMA";} 
	else if ($row['daftar_pangkat'] == "5") {echo "YUANA WIRA";} 
	else if ($row['daftar_pangkat'] == "6") {echo "MUDA WIRA";} 
	else if ($row['daftar_pangkat'] == "7") {echo "MADYA WIRA";} 
	else if ($row['daftar_pangkat'] == "8") {echo "MUDA WIRA";} 
else if ($row['daftar_pangkat'] == "0") {echo "Pangkat tidak dapat ditampilan";} 
print ('| NIP:'.$row['daftar_nip'].'');
print ('</tr>');
} } 
print ('
    </table></td>
  </tr>
</table>');
?>
                                </marquee></td>
                              </tr>
                          </table></td>
                        </tr>
                        <tr>
                          <td bgcolor="#FF9900"><table width="100%"  border="0" cellspacing="6" cellpadding="6">
                            <tr>
                              <td><span class="style1 stylesidang">TOTAL PEGAWAI :
                                      <?php

$link = mysql_connect("localhost", "root", "benk"); mysql_select_db("cma", $link);
$result1 = mysql_query("SELECT * FROM  tab_personil", $link);
$num_rows1 = mysql_num_rows($result1);
echo "$num_rows1"; ?>&nbsp;&nbsp;
ORANG                              </span></td>
                            </tr>
                          </table></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                      </table></td>
                  </tr>
              </table></td>
            </tr>
          </table></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<div id="fixmetoo" align="center"> 
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td bgcolor="#66CC00">
        <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="16%" bgcolor="#669900"><table width="80%"  border="0" align="center" cellpadding="2" cellspacing="2">
              <tr>
                <td><script language="javascript" src="images/liveclock.js">

/*
Live Clock Script-
By Mark Plachetta (astro@bigpond.net.au©) based on code from DynamicDrive.com
For full source code, 100's more DHTML scripts, and Terms Of Use,
visit http://www.dynamicdrive.com
*/

</script><span id="LiveClockIE" style="width:300px;><font style="color:#000000; font-family:Verdana; font-size:14pt;"></font></span>
</td>
              </tr>
            </table></td>
            <td width="84%"><div align="left">
              <table width="100%"  border="0" cellspacing="6" cellpadding="6">
                <tr>
                  <td><marquee>
                    <span class="style1">PAPAN KONTROL INFORMASI KEJAKSAAN NEGERI <span class="style5"><b><?PHP echo htmlspecialchars($row['s_satker']); ?></b></span> LAPORKAN APABILA ANDA MENJUMPAI PUNGLI DI KANTOR INI</span>
                  </marquee></td>
                </tr>
              </table>
            </div></td>
          </tr>
      </table>      </td>
    </tr>
  </table>
</div>
</body>

</html>
<? }  ?>