[ 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: tentang_anda.php
<?php require_once("../lib/konek.php"); require_once("../lib/konfigurasi_semua.php"); require_once("../lib/cur.php"); require_once("../lib/function_tanggal.php"); //cek absensi $ar_wkt = explode(":",$wkt); $detik_wkt = ($ar_wkt[0]*60*60)+($ar_wkt[1]*60)+$ar_wkt[2]; $sql = "select * from hrd_user_login a left join hrd_pgw b on a.id_pgw = b.pgw_id left join hrd_jabatan_pegawai c on b.id_jab_pgw = c.jab_pgw_id where user_id = ".$_SESSION["hrd-id"]; $rs = mysql_query($sql); $dataPgw=mysql_fetch_array($rs); $sql = "select count(absen_id) as jml from hrd_absen where id_user = ".$_SESSION["hrd-id"]." and absen_tgl = '".$skr."'"; $rs = mysql_query($sql); $statCek = mysql_fetch_array($rs); if($statCek["jml"]==0) { $act = "in"; $_POST["act"] = $act; }else{ $sql = "select absen_id from hrd_absen where absen_cout is null and id_user = ".$_SESSION["hrd-id"]." and absen_tgl = '".$skr."' order by absen_cin desc"; $rs = mysql_query($sql); $statCek2 = mysql_fetch_array($rs); if($statCek2["absen_id"]) { $act = "out"; $_POST["act"] = $act; }else{ $act = "in"; $_POST["act"] = $act; } } $absen = 0; //config bln $bln_array = explode("-",$skr); $tgl_now = $bln_array[2]; 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"; //end //kuota jam perbulan $totalBln = 0; $date_array = explode("-",$skr); $sql = "select * from hrd_absen where absen_tgl between '".$date_array[0]."-".$date_array[1]."-01' and '".$date_array[0]."-".$date_array[1]."-".$jml_bln."' and id_user = ".$_SESSION["hrd-id"]." and absen_cin is not null and absen_cout is not null"; $rs = mysql_query($sql); while($dataAbsensi=mysql_fetch_array($rs)) { $total = (strtotime($dataAbsensi["absen_cout"])-strtotime($dataAbsensi["absen_cin"])); $totalBln = $totalBln+$total; } $total_menit = round($totalBln/60); $total_jam = 0; if($total_menit>60) { $total_jam = round($totalBln/3600); $tJam = ($totalBln/3600)+0.5; if($tJam<=($total_jam+0.5)) { $total_jam = $total_jam-1; } $total_menit = round(($totalBln-($total_jam*3600))/60); } //end //kuota perhari $sql = "select * from hrd_absen where absen_tgl = '".$skr."' and id_user = ".$_SESSION["hrd-id"]." and absen_cin is not null and absen_cout is not null"; $rs = mysql_query($sql); while($dataAbsensi=mysql_fetch_array($rs)) { $total_hr_ini = (strtotime($dataAbsensi["absen_cout"])-strtotime($dataAbsensi["absen_cin"])); $totalBln_hr_ini = $totalBln_hr_ini+$total_hr_ini; } $total_menit_hr_ini = round($totalBln_hr_ini/60); $total_jam_hr_ini = 0; if($total_menit_hr_ini>60) { $total_jam_hr_ini = round($totalBln_hr_ini/3600); $tJam_hr_ini = ($totalBln_hr_ini/3600)+0.5; if($tJam_hr_ini<=($total_jam_hr_ini+0.5)) { $total_jam_hr_ini = $total_jam_hr_ini-1; } $total_menit_hr_ini = round(($totalBln_hr_ini-($total_jam_hr_ini*3600))/60); } //end //krng kuota $sql = "select Distinct absen_tgl from hrd_absen where absen_tgl between '".$date_array[0]."-".$date_array[1]."-01' and '".$date_array[0]."-".$date_array[1]."-".$jml_bln."' and id_user = ".$_SESSION["hrd-id"]." and absen_cin is not null and absen_cout is not null order by absen_tgl"; $rs2 = mysql_query($sql); // echo $sql; $tdkKuota = 0; while($dataAbsensi2=mysql_fetch_array($rs2)) { $tot = 0; $sql = "select * from hrd_absen where absen_tgl = '".$dataAbsensi2["absen_tgl"]."' and id_user = ".$_SESSION["hrd-id"]." and absen_cin is not null and absen_cout is not null"; $rs3 = mysql_query($sql); // echo $sql."<br>"; while($dataAbsensi=mysql_fetch_array($rs3)) { $sql = "select count(absen_id) as jml from hrd_absen where absen_tgl = '".$dataAbsensi2["absen_tgl"]."' and id_user = ".$_SESSION["hrd-id"]." and absen_cin is not null and absen_cout is not null"; $rs4 = mysql_query($sql); $dataCek4=mysql_fetch_array($rs4); $jml = $dataCek4["jml"]; $total_hr_ini = round((strtotime($dataAbsensi["absen_cout"])-strtotime($dataAbsensi["absen_cin"]))/60); if($jml <2 ) { $tot = $total_hr_ini; } else { $tot = $tot+$total_hr_ini; } if($tot < 480) $tdkKuota = $tdkKuota+1; $sql = "select * from hrd_absen a left join hrd_hari_libur b on a.absen_tgl = b.libur_tgl and a.absen_ket = b.libur_ket where absen_tgl = '".$dataAbsensi2["absen_tgl"]."' and libur_id is not null and id_user = ".$_SESSION["hrd-id"]." and absen_cin is not null and absen_cout is not null"; $rs5 = mysql_query($sql); $cekAbsen5 = mysql_fetch_array($rs5); if($cekAbsen5) { $tdkKuota = 0; } // echo $total_hr_ini." & ".$jml." & ".$tot." & ".$tdkKuota."<br>"; } } // //telat $totalBln = 0; $date_array = explode("-",$skr); $sql = "select count(absen_id) as jml_tlt from hrd_absen where absen_tgl between '".$date_array[0]."-".$date_array[1]."-01' and '".$date_array[0]."-".$date_array[1]."-".$jml_bln."' and id_user = ".$_SESSION["hrd-id"]." and absen_telat = 'y'"; $rs = mysql_query($sql); $dataTelat=mysql_fetch_array($rs); $telat_bln = $dataTelat["jml_tlt"]; //end // $sql = "select count(absen_id) as jml_cekout from hrd_absen where absen_tgl between '".$date_array[0]."-".$date_array[1]."-01' and '".$date_array[0]."-".$date_array[1]."-".$jml_bln."' and id_user = ".$_SESSION["hrd-id"]." and absen_cout is null"; $rs = mysql_query($sql); $dataCekOut = mysql_fetch_array($rs); $jml_cekout = $dataCekOut["jml_cekout"]; // //kehadiran for($start=0, $end=$tgl_now; $start<$end; $start++) { if(($start+1) < 10) $dt = "0".($start+1); else $dt = ($start+1); $tgl = $thn."-".$bln."-".$dt; $hari = GetDayName($tgl); if($hari!="Minggu") { $sql = "select distinct absen_id, absen_tgl from hrd_absen where id_user = ".$_SESSION["hrd-id"]." and absen_tgl = '".$tgl."'"; $rs = mysql_query($sql); $cekAbsen = mysql_fetch_array($rs); if($cekAbsen) { $hadir = $hadir+1; $jmlHrGj = $jmlHrGj+1; }else{ $hadir = $hadir+0; $absen = $absen+1; } }else{ $jmlHrGj = $jmlHrGj+1; } } //end // $hitung_kmrn = strtotime($skr)-(86400*1); $kmrn = date("Y-m-d",$hitung_kmrn); $sql = "select * from hrd_absen where absen_tgl = '".$kmrn."' and id_user = ".$_SESSION["hrd-id"]; $rs = mysql_query($sql); $cekAbsenKemarin = mysql_fetch_array($rs); if(!$cekAbsenKemarin) { $ketAbsen = "absen / tidak masuk"; }else{ $sql = "select * from hrd_absen where absen_tgl = '".$kmrn."' and id_user = ".$_SESSION["hrd-id"]." order by absen_cout desc"; $rs = mysql_query($sql); $cekAbsenKemarinCout = mysql_fetch_array($rs); if(!$cekAbsenKemarinCout["absen_cout"]) { $ketAbsen = "cek out"; } } // // $sql = "select count(sms_id) as jum from hrd_sms where sms_dibaca = 'belum' and id_pgw_penerima = ".$pgw_id; $QdataSMS = mysql_query($sql); $dataSMS=mysql_fetch_array($QdataSMS); $sql = "select count(tl_id) as jum from hrd_tasklist where tl_progres <> '100' and id_pgw_penerima = ".$pgw_id; $QdataPekerjaan = mysql_query($sql); $dataPekerjaan=mysql_fetch_array($QdataPekerjaan); $sql = "select count(counter_id) as jum_hr_ini from counter where counter_tgl = '".$skr."'"; $rs = mysql_query($sql); $DataPengunjung1 = mysql_fetch_array($rs); $hrIni = $DataPengunjung1["jum_hr_ini"]; $sql = "select * from hrd_user_login a left join hrd_pgw b on a.id_pgw = b.pgw_id left join hrd_jabatan_pegawai c on b.id_jab_pgw = c.jab_pgw_id where user_id = ".$_SESSION["hrd-id"]; $rs = mysql_query($sql); $dataPgw=mysql_fetch_array($rs); ?> <html> <head> <title><?php echo $header;?></title> </head> <body bgcolor="#efefef"> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <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 align="left" bgcolor="#DEDBE7" height="20"> <?php include("menu_atas.php"); ?> </td> </tr> <tr> <td> <fieldset> <legend> <?php echo $defFont;?><b> Tentang Anda </legend> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td><?php echo $defFont;?>Anda mempunyai <a href='pesan_singkat_v.php'><?php echo $dataSMS["jum"];?> sms belum terbaca</a>.</td> </tr> <tr> <td><?php echo $defFont;?>Pekerjaan yang belum terselesaikan ada <a href='tasklist_v.php'><?php echo $dataPekerjaan["jum"];?> pekerjaan</a>.</td> </tr> <tr> <td><?php echo $defFont;?>Anda kemarin belum <a href='absensi.php'><?php echo $ketAbsen;?></a>.</td> </tr> <tr> <td><br> <fieldset> <legend><b><?php echo $defFont;?> Data Pribadi </font></b></legend> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="30%"><?php echo $defFont;?><b>Nama Karyawan</b></td> <td width="2%"><?php echo $defFont;?>:</td> <td width="68%"><?php echo $defFont;?><?php echo $dataPgw["pgw_nama"];?></td> <tr> <tr> <td width="30%"><?php echo $defFont;?><b>Jabatan</b></td> <td width="2%"><?php echo $defFont;?>:</td> <td width="68%"><?php echo $defFont;?><?php echo $dataPgw["jab_pgw_nama"];?></td> <tr> </table> </fieldset> </td> </tr> <tr> <td><br> <fieldset> <legend><b><?php echo $defFont;?> Jam Kerja </font></b></legend> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="30%"><?php echo $defFont;?><b>Jam Masuk / Pulang</b></td> <td width="2%"><?php echo $defFont;?>:</td> <td width="68%"><?php echo $defFont;?><?php echo $dataPgw["pgw_cin"];?> / <?php echo $dataPgw["pgw_cout"];?></td> <tr> <tr> <td><?php echo $defFont;?><b>Jumlah Jam Kerja hari ini</b></td> <td><?php echo $defFont;?>:</td> <td><?php echo $defFont;?><?php echo $total_jam_hr_ini;?> jam, <?php echo $total_menit_hr_ini;?> menit</td> <tr> <tr> <td><?php echo $defFont;?><b>Jumlah Jam Kerja bulan ini</b></td> <td><?php echo $defFont;?>:</td> <td><?php echo $defFont;?><?php echo $total_jam;?> jam, <?php echo $total_menit;?> menit</td> <tr> </table> <hr> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="30%"><?php echo $defFont;?><b>Jumlah Telat bulan ini</b></td> <td width="2%"><?php echo $defFont;?>:</td> <td width="68%"><?php echo $defFont;?><?php echo $telat_bln;?> kali</td> <tr> <tr> <td><?php echo $defFont;?><b>Hadir / Absen</b></td> <td><?php echo $defFont;?>:</td> <td><?php echo $defFont;?><?php echo $hadir;?> / <?php echo $absen;?></td> <tr> <tr> <td><?php echo $defFont;?><b>Tidak Cek Out / Tidak Kuota</b></td> <td><?php echo $defFont;?>:</td> <td><?php echo $defFont;?><?php echo $jml_cekout;?> / <?php echo $tdkKuota;?></td> <tr> <tr> <td><?php echo $defFont;?><b>Gaji Anda Hari Ini</b></td> <td><?php echo $defFont;?>:</td> <td><?php echo $defFont;?>Rp. <?php echo currency_format(round(($dataPgw["pgw_gaji_pokok"]/$jml_bln)*$jmlHrGj));?></td> <tr> <tr> <td><?php echo $defFont;?><b>Denda telat</b></td> <td><?php echo $defFont;?>:</td> <td> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="30%"> </td> <td width="70%"> <?php echo $defFont;?>Rp. <?php echo currency_format($telat_bln*5000);?> </tdd> </tr> </table> </td> <tr> <tr> <td><?php echo $defFont;?><b>Denda tidak cek out</b></td> <td><?php echo $defFont;?>:</td> <td> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="30%"> </td> <td width="70%"> <?php echo $defFont;?>Rp. <?php echo currency_format($jml_cekout*5000);?> </tdd> </tr> </table> </td> <tr> <tr> <td><?php echo $defFont;?><b>Denda tidak kuota</b></td> <td><?php echo $defFont;?>:</td> <td> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td width="30%"> </td> <td width="70%"> <?php echo $defFont;?>Rp. <?php echo currency_format($tdkKuota*5000);?> </tdd> </tr> </table> </td> <tr> <tr> <td><?php echo $defFont;?><b>Gaji Total</b></td> <td><?php echo $defFont;?>:</td> <td><?php echo $defFont;?>Rp. <?php echo currency_format(round(($dataPgw["pgw_gaji_pokok"]/$jml_bln)*$jmlHrGj));?></td> <tr> <tr> <td><?php echo $defFont;?> </td> <td><?php echo $defFont;?> </td> <td><?php echo $defFont;?><hr width="50%" align="left"></td> <tr> <tr> <td><?php echo $defFont;?><b>Gaji Bersih</b></td> <td><?php echo $defFont;?>:</td> <td><?php echo $defFont;?>Rp. <?php echo currency_format(round(($dataPgw["pgw_gaji_pokok"]/$jml_bln)*$jmlHrGj)-(($jml_cekout*5000)+($telat_bln*5000)+($tdkKuota*5000)));?></td> <tr> </table> </fieldset> </td> </tr> </table> </fieldset> </td> </tr> </table> </body> </html>