[ Mini Kiebo ]
Server: Windows NT DESKTOP-5B8S0D4 6.2 build 9200 (Windows 8 Professional Edition) i586
Path:
D:
/
Backup
/
14082024
/
Data
/
htdocs
/
htdocs
/
simpeg
/
administrator
/
[
Home
]
File: rekap_absensi_v.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='rekap_absensi' 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"; //konfigurasi tabel utama // $tbHeader[0] = "Tanggal"; // $tbHeaderWidth[0] = "200"; // $tbContent[0] = "absen_tgl"; // $tbContentAlign[0] = "center"; // // $tbHeader[1] = "Karyawan"; // $tbHeaderWidth[1] = "250"; // $tbContent[1] = "user_name"; // $tbContentAlign[1] = "center"; // // $tbHeader[2] = "Cek In"; // $tbHeaderWidth[2] = "250"; // $tbContent[2] = "absen_cin"; // $tbContentAlign[2] = "center"; // // $tbHeader[3] = "Cek Out"; // $tbHeaderWidth[3] = "250"; // $tbContent[3] = "absen_cout"; // $tbContentAlign[3] = "center"; // // $tbHeader[4] = "Keterangan"; // $tbHeaderWidth[4] = "300"; // $tbContent[4] = "absen_ket"; // $tbContentAlign[4] = "left"; //query ke tabel form // if($_POST["absen_tgl"]) $sql_select[]= "absen_tgl = '".date_db($_POST["absen_tgl"])."'"; // // $sql = "select * from hrd_absen a left join hrd_user_login b on a.id_user = b.user_id"; // // if($sql_select){ // $sql_select = implode(" and ",$sql_select); // $sql = $sql ." where ".$sql_select; // } // // if($_POST["order_by"]) { // $sql .= " order by ".$_POST["order_by"]." ".$_POST["sort"]; // }else{ // $sql .= " order by absen_tgl desc,user_name"; // } // $QdataForm = mysql_query($sql); //echo $sql; ?> <html> <head> <title>SimplySoft</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="rekap_absensi_v.php"> <input type="hidden" name="act" value="<?php echo $_POST["act"];?>"> <table border="0" cellspacing="0" cellpadding="0" width="800"> <tr> <td align="left" bgcolor="#000000" height="28" width="28"> <img src="<?php echo $dir_img;?>/RocketDock.png" width="28" height="28" border="0"> </td> <td 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"> <table border="0" cellspacing="0" cellpadding="0" width="800"> <tr background="<?php echo $dir_img;?>/background.jpg" 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" align="center" onmouseover="this.style.backgroundColor='#FF6666'" onmouseout="this.style.backgroundColor='#FFF8DC'" colspan="7"> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <table border="0" cellspacing="0" cellpadding="0" width="800"> <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="800"> <tr bgcolor="green"> <td align="center" rowspan="2" width="200"><b>Nama Pegawai</td> <td align="center" colspan="<?php echo $jml_bln;?>"><b>Tanggal</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 $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 for($start=0, $end=$jml_bln; $start<$end; $start++) { if(($start+1) < 10) $dt = "0".($start+1); else $dt = ($start+1); $tgl = $thn."-".$bln."-".$dt; $hari = GetDayName($tgl); $sql = "select distinct absen_id, absen_tgl from hrd_absen where id_user = ".$dataForm["user_id"]." and absen_tgl = '".$tgl."'"; $rs = mysql_query($sql); $cekAbsen = mysql_fetch_array($rs); if($cekAbsen) { $stat = "blue"; }else{ $stat = "#FFF8DC"; if($hari=="Minggu") { $stat = "red"; } } ?> <td align="center" bgcolor="<?php echo $stat;?>" onMouseOver="this.style.backgroundColor='#FF6666'" onMouseOut="this.style.backgroundColor='<?php echo $stat;?>'"> <?php echo $defFont;?> <?php echo $tFont;?> </td> <?php } ?> </tr> <?php } ?> </table> </td> </tr> </table> <i><?php echo $hint;?></i> </form> </body> </html>