[ Mini Kiebo ]
Server: Windows NT DESKTOP-5B8S0D4 6.2 build 9200 (Windows 8 Professional Edition) i586
Path:
D:
/
Backup
/
05122024
/
htdocs
/
simpeg
/
administrator
/
[
Home
]
File: tasklist_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='daftar_tasklist' and c.user_id = ".$_SESSION["hrd-id"]; $rs = mysql_query($sql); $prevO = mysql_fetch_array($rs); if(!$prevO) header("location:tolak.php"); //konfigurasi tabel utama $tbHeader[0] = "Tanggal"; $tbHeaderWidth[0] = "150"; $tbContent[0] = "tl_tgl"; $tbContentAlign[0] = "center"; $tbHeader[1] = "Pemberi"; $tbHeaderWidth[1] = "200"; $tbContent[1] = "pgw_nama"; $tbContentAlign[1] = "center"; $tbHeader[2] = "Keterangan"; $tbHeaderWidth[2] = "400"; $tbContent[2] = "tl_ket"; $tbContentAlign[2] = "center"; $tbHeader[3] = "Lama Pengerjaan"; $tbHeaderWidth[3] = "200"; $tbContent[3] = "tl_wkt_pengerjaan"; $tbContentAlign[3] = "center"; $tbHeader[4] = "Progres"; $tbHeaderWidth[4] = "50"; $tbContent[4] = "tl_progres"; $tbContentAlign[4] = "center"; if($_POST["btnProses"]) { $tl_progres = & $_POST["tl_progres"]; $sql = "select a.*,b.pgw_nama from hrd_tasklist a left join hrd_pgw b on a.id_pgw_pemberi = b.pgw_id where id_pgw_penerima = ".$pgw_id." order by tl_tgl desc, tl_id"; $rs = mysql_query($sql); $i = 0; while($dataTasklist=mysql_fetch_array($rs)) { if($dataTasklist["tl_progres"] != 100) { $sql = "update hrd_tasklist set tl_progres = ".$tl_progres[$i]." where tl_id = ".$dataTasklist["tl_id"]; $update = mysql_query($sql); $i = $i+1; } } } //query ke tabel form $sql = "select * from hrd_tasklist a left join hrd_pgw b on a.id_pgw_pemberi = b.pgw_id where id_pgw_penerima = ".$pgw_id; if($_POST["order_by"]) { $sql .= " order by ".$_POST["order_by"]." ".$_POST["sort"]; }else{ $sql .= " order by tl_tgl desc, tl_id"; } $QdataForm = mysql_query($sql); //echo $sql; $dir_img = "../img"; $dir_lib = "../lib"; ?> <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="<?php $thisForm;?>"> <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="60" align="center"> <button type="submit" name="btnProses" value="btnProses"> <img width="24" src="<?php echo $dir_img;?>/greenshd.gif"> </button> </td> <td height="50" width="10"> </td> <td height="50" width="100" align="center"> <?php $sql = "select pgw_stat_tasklist from hrd_pgw where pgw_id = ".$pgw_id; $rs = mysql_query($sql); $dataStatPgw=mysql_fetch_array($rs); if($dataStatPgw["pgw_stat_tasklist"] == "y") { ?> <button type="button" name="btnProses" value="btnProses"> <a href="tasklist_e.php"><img src="<?php echo $dir_img;?>/add23.png" border="0" height="32" width="32"></a> </button> <?php }else{ ?> <?php } ?> </td> <td width="*"> </td> </tr> <tr bgcolor="#FFF8DC" valign="middle"> <td align="center" onMouseOver="this.style.backgroundColor='#FF6666'" onMouseOut="this.style.backgroundColor='#FFF8DC'"> <?php echo $defFont;?>Simpan</font> </td> <td> </td> <td align="center" onMouseOver="this.style.backgroundColor='#FF6666'" onMouseOut="this.style.backgroundColor='#FFF8DC'"> <?php if($dataStatPgw["pgw_stat_tasklist"] == "y") { ?> <?php echo $defFont;?>Beri Tasklist</font> <?php }else{ ?> <?php } ?> </td> <td> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> <table border="0" cellspacing="1" cellpadding="1" width="100%"> <tr background="<?php echo $dir_img;?>/bg_tr.png"> <?php for($start=0, $end=count($tbHeader); $start<$end; $start++) {?> <td width="<?php echo $tbHeaderWidth[$start];?>" align="center"> <?php echo $defFont;?><b><?php echo $tbHeader[$start];?></b><?php echo $tFont;?> </td> <?php } ?> </tr> <?php while($dataForm=mysql_fetch_array($QdataForm)) {?> <?php if($dataForm["tl_progres"] != 100) {?> <tr bgcolor="#FFFFFF" onmouseover="this.style.backgroundColor='#00FFFF'" onmouseout="this.style.backgroundColor='#FFFFFF'"> <td valign="top" align="<?php echo $tbContentAlign[0];?>"> <?php echo $defFont;?><?php echo format_date_long($dataForm[$tbContent[0]]);?> <?php echo $tFont;?> </td> <?php for($start=1, $end=count($tbHeader)-1; $start<$end; $start++) {?> <td valign="top" align="<?php echo $tbContentAlign[$start];?>"> <?php echo $defFont;?><?php echo nl2br($dataForm[$tbContent[$start]]);?> <?php echo $tFont;?> </td> <?php } ?> <td valign="top" align="<?php echo $tbContentAlign[4];?>"> <select name="tl_progres[]" class="textField"> <?php for($a=0, $b=10; $a<=$b; $a++) { ?> <option value="<?php echo ($a*10);?>" <?php if($dataForm["tl_progres"] == ($a*10)) echo "selected";?>><?php echo ($a*10);?>%</option> <?php } ?> </select> </td> </tr> <?php } ?> <?php } ?> </table> </td> </tr> </table> <i><?php echo $hint;?></i> </form> </body> </html>