<?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>Besuk Tahanan | <?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: #669900;
	margin-bottom: 0px;
}
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
-->
</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>
<style type="text/css">
<!--
.style2 {color: #FFFFFF}
-->
</style>
</head>

<body>
<table width="1100"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="190" valign="bottom" background="../images/camelon_a.jpg">&nbsp;</td>
  </tr>
  <tr>
    <td><table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="22%" valign="top" bgcolor="#336600"><table width="300" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td bgcolor="#669900"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><form name="form1" method="post" action="index.auth.php">
                  <table width="300" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td background="../images/bg.jpg"><table width="300" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                          <td><a href="index.php" class="menu">BERANDA</a></td>
                        </tr>
                      </table>                        </td>
                    </tr>
                  </table>
                </form></td>
              </tr>
            </table></td>
          </tr>
        </table>
          </td>
        <td width="78%" valign="top" bgcolor="#CCCCCC"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td bgcolor="#FF0000"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
                <tr>
                  <td><span class="style1">LAYANAN BESUK TIKET <?PHP echo "$satker"; ?></span></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="4" 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="21%"><a href="index.php?g=daftartahanan" class="menu">VIEW DAFTAR TERDAKWA</a></td>
              <td width="21%">
                <a href="index.php?g=rekapitulasi" class="menu">REKAPITULASI BESUK</a>
             </td>
              <td width="48%" bgcolor="#CCCCCC"><center>
                <?PHP echo "$satker"; ?></center></td>
              <td width="10%"><a href="../index.logout.php" class="menu">LOGOUT</a></td>
            </tr>
            <tr bgcolor="#FF0000">
              <td colspan="4"><table width="100%"  border="0" cellspacing="4" cellpadding="4">
                  <tr>
                    <td bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="6" cellpadding="6">
                        <tr>
                          <td><?
mysql_connect("localhost", "root", "benk");
mysql_select_db("cma");
$bulan = $_GET["month"];
$page = $_GET["page"];
if(empty($action))
{
if (empty($order)) $order =  2;
if (empty($page))  $page  =  1;
if (empty($hits))  $hits  = 500;
$start = $hits*($page-1);
$query = "SELECT * FROM besuk_events WHERE event_month = '$bulan'";
$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 "DAFTAR PEMOHON BESUK <strong>$xnum</strong> | ";
for ($i=1;$i<=$stw2;$i++) {if($page==$i){
echo "<b> HAL $i |</b> ";} 
else{echo "<a href=\"?g=daftartahanan&d=inc_op&page=$i\"> $i |</a>";}}
print ('<br><br>');
$query  = "SELECT * FROM besuk_events ";
if(!empty($squery)) { $query .= "LIKE \"%$squery%\" ";}
$query .= "WHERE event_month = '$bulan' ORDER BY event_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="10%"><span class="style1"><strong>TIKET</strong></span></td>
<td width="15%"><span class="style1"><strong>NOHP</strong></span></td>
<td width="60%"><span class="style1"><strong>IDENTITAS</strong></span></td>
<td width="22%"><span class="style1"><strong>DETAIL</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><td><b>'.$row['event_tiket'] .'</b></td>');
print ('<td>'.$row['event_nohp'] .'</td>');

print ('<td>'.$row['event_identitas'] .'</td>');

print ('<td><a href="log_besukprinting.php?tiket='.$row['event_tiket'] .'" class="menu">VIEW</a></td>');

print ('</tr>');
}
print ('</tbody></table>');
echo "<br><br>Ditampilkan $hits /Halaman";
}
//}
?>
&nbsp;</td>
                        </tr>
                    </table></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="#EEEEEE"><table width="699"  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td><div align="center">Thank you for using Camelon (Pro Version) Need upgrade <a href="readme/index.php"><strong>Click Here</strong></a> </div></td>
      </tr>
      <tr>
        <td><div align="center">(c) 2016 Created By <a href="http://www.chendia.net"><strong>Chendia Studio</strong></a></div></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>


