[ Mini Kiebo ]
Server: Windows NT DESKTOP-5B8S0D4 6.2 build 9200 (Windows 8 Professional Edition) i586
Path:
D:
/
xampp182
/
htdocs
/
simpeg
/
administrator
/
[
Home
]
File: top_rank.php
<?php require_once("../lib/konek.php"); require_once("../lib/konfigurasi_semua.php"); require_once("../lib/cur.php"); require_once("../lib/function_tanggal.php"); // $skr=date("Y-m-d"); // $wkt = date("Y-m-d H:i:s"); $sql = "select akses_id from hrd_hak_akses a left join hrd_form b on a.id_form=b.form_id left join hrd_user_login c on a.id_lj = c.id_lj where b.form_nama='top_rank' and c.user_id = ".$_SESSION["hrd-id"]; $rs = mysql_query($sql); $prevO = mysql_fetch_array($rs); if(!$prevO) header("location:../tolak.php"); $bln_array = explode("-",$skr); // $bln = $bln_array[1]; if(!$_POST["bulan"]) { $bln = $bln_array[1]; $_POST["bulan"] = $bln_array[1]; }else{ $bln = $_POST["bulan"]; } if(!$_POST["tahun"]) { $thn = $bln_array[0]; $_POST["tahun"] = $bln_array[0]; }else{ $thn = $_POST["tahun"]; } if($bln == "01") $jml_bln = "31"; if($bln == "02") { if(($bln_array[0]%4) == 0) { $jml_bln = "29"; }else{ $jml_bln = "28"; } } if($bln == "03") $jml_bln = "31"; if($bln == "04") $jml_bln = "30"; if($bln == "05") $jml_bln = "31"; if($bln == "06") $jml_bln = "30"; if($bln == "07") $jml_bln = "31"; if($bln == "08") $jml_bln = "31"; if($bln == "09") $jml_bln = "30"; if($bln == "10") $jml_bln = "31"; if($bln == "11") $jml_bln = "30"; if($bln == "12") $jml_bln = "31"; ?> <html> <head> <title><?php echo $header;?></title> </head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <!--meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"--> <link rel="stylesheet" type="text/css" href="<?php echo $dir_lib;?>/lib-style.css"> <script language="JavaScript" type="text/javascript" src="<?php echo $dir_lib;?>/ew.js"></script> <script language="JavaScript" type="text/javascript" src="<?php echo $dir_lib;?>/func_curr.js"></script> <script language="JavaScript" type="text/javascript" src="<?php echo $dir_lib;?>/elements.js"></script> <!-- calendar stylesheet --> <link rel="stylesheet" type="text/css" media="all" href="<?php echo $dir_lib;?>/jscalendar/css/calendar-system.css" title="calendar-system" /> <!-- calendar script --> <script type="text/javascript" src="<?php echo $dir_lib;?>/jscalendar/calendar.js"></script> <script type="text/javascript" src="<?php echo $dir_lib;?>/jscalendar/lang/calendar-en.js"></script> <script type="text/javascript" src="<?php echo $dir_lib;?>/jscalendar/calendar-setup.js"></script> <!-- end --> <body> <form name="frmEdit" method="POST" action="top_rank.php"> <input type="hidden" name="act" value="<?php echo $_POST["act"];?>"> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td colspan="2" align="left" valign="middle" bgcolor="#000000" height="28"> <font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="white"> <?php echo $header;?></font> </td> </tr> <tr> <td colspan="2" align="left" bgcolor="#DEDBE7" height="20"> <?php include("menu_atas.php"); ?> </td> </tr> <tr> <td colspan="2"> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr valign="middle" height="50"> <td height="50" width="10"> </td> <td height="50" width="200"> </td> <td height="50" width="52"> </td> <td width="52"> </td> <td height="50" width="50" align="center" colspan="7"> </td> </tr> <tr bgcolor="#FFF8DC" valign="middle"> <td width="10"> </td> <td width="200"> </td> <td width="52"> </td> <td width="52"> </td> <td width="100"> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr bgcolor="#FFF8DC"> <td width="25%" align="right"><?php echo $defFont;?>Bulan <?php echo $tFont;?></td> <td width="1%" align="center">:</td> <td width="74%" align="left"> <select name="bulan" class="textField"> <option value="01" <?php if($_POST["bulan"]=="01") echo "selected";?>>Januari</option> <option value="02" <?php if($_POST["bulan"]=="02") echo "selected";?>>Februari</option> <option value="03" <?php if($_POST["bulan"]=="03") echo "selected";?>>Maret</option> <option value="04" <?php if($_POST["bulan"]=="04") echo "selected";?>>April</option> <option value="05" <?php if($_POST["bulan"]=="05") echo "selected";?>>Mei</option> <option value="06" <?php if($_POST["bulan"]=="06") echo "selected";?>>Juni</option> <option value="07" <?php if($_POST["bulan"]=="07") echo "selected";?>>Juli</option> <option value="08" <?php if($_POST["bulan"]=="08") echo "selected";?>>Agustus</option> <option value="09" <?php if($_POST["bulan"]=="09") echo "selected";?>>September</option> <option value="10" <?php if($_POST["bulan"]=="10") echo "selected";?>>Oktober</option> <option value="11" <?php if($_POST["bulan"]=="11") echo "selected";?>>November</option> <option value="12" <?php if($_POST["bulan"]=="12") echo "selected";?>>Desember</option> </select> Tahun <select name="tahun" class="textField"> <?php for($tha=0, $thb=200; $tha<$thb; $tha++) { ?> <option value="<?php echo (1900+$tha);?>" <?php if($_POST["tahun"]== (1900+$tha) ) echo "selected";?>><?php echo (1900+$tha);?></option> <?php } ?> </select> </td> </tr> <tr bgcolor="#FFF8DC"> <td align="right" colspan="2"> </td> <td> <input type="submit" value="Proses" name="btnCari" class="textField"><br><br> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <table border="0" cellspacing="1" cellpadding="1" width="100%"> <tr bgcolor="green"> <td align="center" width="200"><b>Nama Pegawai</td> <td align="center" width="200"><b>Masuk</td> <td align="center" width="200"><b>Telat</td> <td align="center" width="200"><b>Tidak Cek Out</td> <td align="center" width="200"><b>Jam Kerja (<8 jam)</td> </tr> <!--tr bgcolor="green"> <?php for($start=0, $end=$jml_bln; $start<$end; $start++) {?> <td align="center" width="20"> <?php echo $defFont;?><b><?php echo ($start+1);?></b><?php echo $tFont;?> </td> <?php } ?> </tr--> <?php $tgl_awal = $thn."-".$bln."-01"; $tgl_akhir = $thn."-".$bln."-".$jml_bln; $sql = "select pgw_id, pgw_nama, user_name, user_id from hrd_user_login a left join hrd_pgw b on a.id_pgw = b.pgw_id and a.id_lj <> 5 where pgw_id is not null order by pgw_nama asc"; $QdataForm = mysql_query($sql); while($dataForm=mysql_fetch_array($QdataForm)) { ?> <tr bgcolor="#FFF8DC"> <td valign="top" align="<?php echo $tbContentAlign[0];?>" bgcolor="#FFFFFF" onmouseover="this.style.backgroundColor='#00FFFF'" onmouseout="this.style.backgroundColor='#FFFFFF'" height="35"> <?php echo $defFont;?><?php echo $dataForm["pgw_nama"];?> <?php echo $tFont;?> </td> <?php $sql = "select count(masuk) as jum_masuk from (select count(absen_id) as masuk from hrd_absen where id_user = ".$dataForm["user_id"]." and absen_tgl between '".$tgl_awal."' and '".$tgl_akhir."' group by id_user, absen_tgl) as tb1"; $rs = mysql_query($sql); $masuk = mysql_fetch_array($rs); // echo $sql."<br>"; ?> <td align="center" width="200"><?php echo $defFont;?><?php echo $masuk["jum_masuk"];?> <?php echo $tFont;?></td> <?php $sql = "select count(telat) as jum_telat from (select count(absen_id) as telat from hrd_absen where absen_telat = 'y' and id_user = ".$dataForm["user_id"]." and absen_tgl between '".$tgl_awal."' and '".$tgl_akhir."' group by id_user, absen_tgl) as tb1"; $rs = mysql_query($sql); $masuk = mysql_fetch_array($rs); // echo $sql."<br>"; ?> <td align="center" width="200"><?php echo $defFont;?><?php echo $masuk["jum_telat"];?> <?php echo $tFont;?></td> <?php $sql = "select count(t_cout) as jum_t_cout from (select count(absen_id) as t_cout from hrd_absen where absen_cout is null and id_user = ".$dataForm["user_id"]." and absen_tgl between '".$tgl_awal."' and '".$tgl_akhir."' group by id_user, absen_tgl) as tb1"; $rs = mysql_query($sql); $masuk = mysql_fetch_array($rs); // echo $sql."<br>"; ?> <td align="center" width="200"><?php echo $defFont;?><?php echo $masuk["jum_t_cout"];?> <?php echo $tFont;?></td> <td align="center" width="200"> </td> </tr> <?php } ?> </table> </td> </tr> </table> <i><?php echo $hint;?></i> </form> </body> </html>