<?PHP
session_start();
if(isset($_SESSION['Nama']) and isset($_SESSION['Pass'])) {
$Nama = $_SESSION['Nama'];
if ($Nama == "besuk"){
?>
<?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"; ?></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">
<!--
body {
	background-image: url();
	margin-top: 0px;
	background-color: #999999;
	margin-bottom: 0px;
	margin-left: 0px;
	margin-right: 0px;
}
-->
</style> <link rel="stylesheet" href="images/date_css.css" />
<script src="images/date_javascript.js"></script>
<script src="images/date_jquery.js"></script>
 <script>
$(function() {
$( "#datepicker" ).datepicker();
$( "#datepicker2" ).datepicker();
});
</script>
<SCRIPT TYPE="text/javascript">
<!--
// copyright 1999 Idocs, Inc. http://www.idocs.com
// Distribute this script freely but keep this notice in place
function numbersonly(myfield, e, dec)
{
var key;
var keychar;

if (window.event)
key = window.event.keyCode;
else if (e)
key = e.which;
else
return true;
keychar = String.fromCharCode(key);

// control keys
if ((key==null) || (key==0) || (key==8) ||
(key==9) || (key==13) || (key==27) )
return true;

// numbers
else if ((("0123456789").indexOf(keychar) > -1))
return true;

// decimal point jump
else if (dec && (keychar == "."))
{
myfield.form.elements[dec].focus();
return false;
}
else
return false;
}

//-->
</SCRIPT>
</head>

<body>
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#FF0000"><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_merah.swf">
      <param name="quality" value="high">
      <embed src="../themes/top_merah.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><table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="2%" bgcolor="#336600">&nbsp;</td>
        <td width="98%" valign="top" 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><div align="center"><strong>LAYANAN BESUK TIKET <?PHP echo "$satker"; ?></strong></div></td>
                  <td>&nbsp;</td>
                </tr>
              </table></td>
            </tr>
          </table>
          </td>
      </tr>
    </table>
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td colspan="5" valign="top"><script type="text/javascript">

/*
Form field Limiter script- By Dynamic Drive
For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
This credit MUST stay intact for use
*/

var ns6=document.getElementById&&!document.all

function restrictinput(maxlength,e,placeholder){
if (window.event&&event.srcElement.value.length>=maxlength)
return false
else if (e.target&&e.target==eval(placeholder)&&e.target.value.length>=maxlength){
var pressedkey=/[a-zA-Z0-9\.\,\/]/ //detect alphanumeric keys
if (pressedkey.test(String.fromCharCode(e.which)))
e.stopPropagation()
}
}

function countlimit(maxlength,e,placeholder){
var theform=eval(placeholder)
var lengthleft=maxlength-theform.value.length
var placeholderobj=document.all? document.all[placeholder] : document.getElementById(placeholder)
if (window.event||e.target&&e.target==eval(placeholder)){
if (lengthleft<0)
theform.value=theform.value.substring(0,maxlength)
placeholderobj.innerHTML=lengthleft
}
}


function displaylimit(thename, theid, thelimit){
var theform=theid!=""? document.getElementById(theid) : thename
var limit_text='<b><span id="'+theform.toString()+'">'+thelimit+'</span></b> Batasan karakter'
if (document.all||ns6)
document.write(limit_text)
if (document.all){
eval(theform).onkeypress=function(){ return restrictinput(thelimit,event,theform)}
eval(theform).onkeyup=function(){ countlimit(thelimit,event,theform)}
}
else if (ns6){
document.body.addEventListener('keypress', function(event) { restrictinput(thelimit,event,theform) }, true); 
document.body.addEventListener('keyup', function(event) { countlimit(thelimit,event,theform) }, true); 
}
}

          </script>
              </td>
            </tr>
            <tr>
              <td width="17%"><a href="index.php" class="menu">BERANDA</a></td>
              <td width="16%"><a href="?g=daftartahanan" class="menu">VIEW DAFTAR TERDAKWA</a>
                </td>
              <td width="28%">                <div align="left"><a href="?g=rekapitulasi" class="menu">REKAPITULASI BESUK</a> </div></td>
              <td width="29%">&nbsp;</td>
              <td width="10%"><a href="../index.logout.php" class="menu">LOGOUT</a></td>
            </tr>
            <tr bgcolor="#FF0000">
              <td colspan="5"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
                  <tr>
                    <td bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="6" cellpadding="6">
                        <tr>
                          <td>
                           <? $tgl=date("d/m/Y");
$th_skrg=date("Y");
$bl_skrg=date("m");
?>      <?php
include("../index.cma.db.php");
$link = mysql_connect("$server", "$username", "$password"); mysql_select_db("$database", $link);
$result7 = mysql_query("SELECT * FROM besuk_events where event_month = '$bl_skrg'", $link);
$num_rows7 = mysql_num_rows($result7);
echo "TOTAL BESUK BULAN INI $num_rows7 PEMOHON"; 
?>
                         </td>
                        </tr>
                        <tr>
                          <td><?PHP
$g1 = $_GET["g"];  
$d1 = $_GET["d"]; 
$id1 = $_GET["id"]; 
$bulan1 = $_GET["month"]; 
if($g1 == "home"){ include("log_besukprint.php"); }
elseif($g1 == "daftartahanan"){ include("log_besuk.php"); }
elseif($g1 == "rekapitulasi"){ include("log_rekapitulasi.php"); }
elseif($g1 == "rekapitulasidetail"){ include("log_rekapitulasidetail.php?month=$bulan1"); }
else{ include("log_besukprint.php"); }
?></td>
                        </tr>
                    </table></td>
                  </tr>
              </table></td>
            </tr>
          </table></td>
        </tr>
      </table></td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td bgcolor="#FF0000"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
        <tr>
          <td><?PHP echo $satker; ?> | <?PHP echo $alamat; ?></td>
        </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
<?PHP
}
else {
echo "ANDA BELUM LOGIN, GAGAL AKSES";
echo "<meta http-equiv=\"refresh\" content=\"3; url=../index.php\">";
}}

?>

