Server IP : 101.255.104.117 / Your IP : 101.255.104.117 Web Server : Apache/2.4.34 (Win32) OpenSSL/1.0.2o PHP/5.6.38 System : Windows NT DESKTOP-5B8S0D4 6.2 build 9200 (Windows 8 Professional Edition) i586 User : user ( 0) PHP Version : 5.6.38 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : D:/xampp182/htdocs/simpegx/administrator/ |
Upload File : |
<?php require_once("../lib/konek.php"); require_once("../lib/konfigurasi_semua.php"); require_once("../lib/cur.php"); require_once("../lib/function_tanggal.php"); $dir_img = "../img"; $dir_lib = "../lib"; if($_GET["absen_id"]) { $_POST["absen_id"] = $_GET["absen_id"]; $sql = "select * from hrd_absen where absen_id = ".$_POST["absen_id"]; $qId = mysql_query($sql); $dataAbsen = mysql_fetch_array($qId); // echo $sql; $cekIn = explode(":",$dataAbsen["absen_cin"]); $_POST["absen_cin_jam"] = $cekIn[0]; $_POST["absen_cin_mnt"] = $cekIn[1]; $_POST["absen_cin_dtk"] = $cekIn[2]; $cekOut = explode(":",$dataAbsen["absen_cout"]); $_POST["absen_cout_jam"] = $cekOut[0]; $_POST["absen_cout_mnt"] = $cekOut[1]; $_POST["absen_cout_dtk"] = $cekOut[2]; $_POST["absen_ket"] = $dataAbsen["absen_ket"]; $_POST["absen_telat"] = $dataAbsen["absen_telat"]; $_POST["absen_tgl"] = date_db($dataAbsen["absen_tgl"]); } if($_POST["Update"]) { $absen_cin = $_POST["absen_cin_jam"].":".$_POST["absen_cin_mnt"].":".$_POST["absen_cin_dtk"]; $absen_cout = $_POST["absen_cout_jam"].":".$_POST["absen_cout_mnt"].":".$_POST["absen_cout_dtk"]; $sql = "update hrd_absen set absen_telat = '".$_POST["absen_telat"]."', absen_tgl = '".date_db($_POST["absen_tgl"])."', absen_cin = '".$absen_cin."', absen_cout = '".$absen_cout."', absen_ket = '".$_POST["absen_ket"]."' where absen_id = ".$_POST["absen_id"]; $rs = mysql_query($sql); header("location:edit_absensi.php?absen_tgl=".$_POST["absen_tgl"]); // echo $sql; } ?> <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="edit_absensi_e.php"> <input type="hidden" name="absen_id" value="<?php echo $_POST["absen_id"];?>"> <input type="hidden" name="absen_tgl" value="<?php echo $_POST["absen_tgl"];?>"> <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" width="100%"> <tr> <td align="right" width="20%"><?php echo $defFont;?>Cek In <?php echo $tFont;?></td> <td width="80%"> <select name="absen_cin_jam" class="textField"> <?php for($a=0, $b=24; $a<$b; $a++) {?> <option value="<?php echo $a;?>" <?php if($_POST["absen_cin_jam"]==$a) echo "selected";?>><?php echo $a;?></option> <?php }?> </select> <select name="absen_cin_mnt" class="textField"> <?php for($a=0, $b=60; $a<$b; $a++) {?> <option value="<?php echo $a;?>" <?php if($_POST["absen_cin_mnt"]==$a) echo "selected";?>><?php echo $a;?></option> <?php }?> </select> <select name="absen_cin_dtk" class="textField"> <?php for($a=0, $b=60; $a<$b; $a++) {?> <option value="<?php echo $a;?>" <?php if($_POST["absen_cin_dtk"]==$a) echo "selected";?>><?php echo $a;?></option> <?php }?> </select> </td> </tr> <tr> <td align="right"><?php echo $defFont;?>Cek Out <?php echo $tFont;?></td> <td> <select name="absen_cout_jam" class="textField"> <?php for($a=0, $b=24; $a<$b; $a++) {?> <option value="<?php echo $a;?>" <?php if($_POST["absen_cout_jam"]==$a) echo "selected";?>><?php echo $a;?></option> <?php }?> </select> <select name="absen_cout_mnt" class="textField"> <?php for($a=0, $b=60; $a<$b; $a++) {?> <option value="<?php echo $a;?>" <?php if($_POST["absen_cout_mnt"]==$a) echo "selected";?>><?php echo $a;?></option> <?php }?> </select> <select name="absen_cout_dtk" class="textField"> <?php for($a=0, $b=60; $a<$b; $a++) {?> <option value="<?php echo $a;?>" <?php if($_POST["absen_cout_dtk"]==$a) echo "selected";?>><?php echo $a;?></option> <?php }?> </select> </td> </tr> <tr> <td align="right"><?php echo $defFont;?>Tanggal <?php echo $tFont;?></td> <td> <input onKeyDown="return tabOnEnter_select_with_button(this, event);" type="text" class="textField" name="absen_tgl" id ="absen_tgl" size="10" maxlength="10" value="<?php echo $_POST["absen_tgl"];?>"/> <img src="../img/b_calendar.png" width="16" height="16" align="middle" id="img_absen_tgl" style="cursor: pointer; border: 0px solid white;" title="Date selector" onMouseOver="this.style.background='red';" onMouseOut="this.style.background=''" />(tanggal-bulan-tahun) </td> </tr> <tr> <td align="right"><?php echo $defFont;?>Status Telat (y/n) <?php echo $tFont;?></td> <td> <input onKeyDown="return tabOnEnter_select_with_button(this, event);" type="text" class="textField" name="absen_telat" id ="absen_telat" size="1" maxlength="1" value="<?php echo $_POST["absen_telat"];?>"/> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <?php echo $defFont;?><font color="black">Keterangan : <br> <textarea name="absen_ket" cols="80" rows="5" class="textField"><?php echo nl2br($_POST["absen_ket"]);?></textarea> <br> <input type="submit" name="Update" value="Update" class="textField"> </td> </tr> </table> <i><?php echo $hint;?></i> </form> <script type="text/javascript"> Calendar.setup({ inputField : "absen_tgl", // id of the input field ifFormat : "<?=$formatCal;?>", // format of the input field showsTime : false, // will display a time selector button : "img_absen_tgl", // trigger for the calendar (button ID) singleClick : true, // double-click mode step : 1 // show all years in drop-down boxes (instead of every other year as default) }); </script> </body> </html>