<html>
<body>
<h3 align="center" style="background-color:#00FF00">:: FORM EDIT KARYAWAN ::</h3>
<?php
include "connect.php";
$id=$_GET['id'];
$update = "select * from staf where nik ='$id'";
$hasil = mysql_query($update);
$row=mysql_fetch_array($hasil);

?>
<form method = post action ="editstaf.php" enctype="multipart/form-data">
<table border =0 align="center" width="1000" bgcolor="#FFFFCC">
<tr><td>NIK </td>
<td>: <input type = text name="nik" size="25" value="<? echo $id; ?>" readonly="yes"></td></tr>
<tr><td>Nama </td>
<td>: <input type = text name="nama" size="50" value="<? echo $row[1]; ?>"></td></tr>
<tr><td>Jabatan </td>
<td>: <input type = text name="jabatan" size="25" value="<? echo $row[2]; ?>"></td></tr>
<tr><td>No. HP </td>
<td>: <input type = text name="telp" size="50" value="<? echo $row[3]; ?>"></td></tr>
<tr><td>Alamat </td>
<td>: <input type = text name ="alamat" size="50" value="<? echo $row[4]; ?>"></td></tr>
<tr><td>Kota Lahir</td>
<td>: <input type = text name ="kota_lhr" size="50" value="<? echo $row[6]; ?>"></td></tr>
<tr><td>Tanggal Lahir </td>
<td>: 
<input type="text" name="tgl_lhr" value="<? echo $row[7]; ?>"id="tgl_lhr" style="background-color:#CCFFFF "/>
<input type="button" value="" style="background-image:url(cal.gif); background-repeat:no-repeat; background-position:center; border:none;" onClick="pick('tgl_lhr');" />
<script type="text/javascript" language="javascript">
<!--
function pick(tgt)
{
 window.open("kalender_pick.php?rand="+Math.random()+"&tgt="+tgt,"Kalender","width=500,height=400,alwaysRaised=yes,scrollbars=yes,directories=no,location=no,menubar=no,toolbar=no");
}
//-->
</script>
</td></tr>
<tr><td>Tanggal Masuk </td>
<td>: 
<input type="text" name="tgl_msk" value="<? echo $row[8]; ?>"id="tgl_msk" style="background-color:#CCFFFF "/>
<input type="button" value="" style="background-image:url(cal.gif); background-repeat:no-repeat; background-position:center; border:none;" onClick="pick('tgl_msk');" />
<script type="text/javascript" language="javascript">
<!--
function pick(tgt)
{
 window.open("kalender_pick.php?rand="+Math.random()+"&tgt="+tgt,"Kalender","width=500,height=400,alwaysRaised=yes,scrollbars=yes,directories=no,location=no,menubar=no,toolbar=no");
}
//-->
</script>
</td></tr>
<tr><td>Foto</td>
<td>: <input type = file name ="photo" value="id"></td>
<tr><td><? echo "<img src=photo1.php?idf=$row[nik] width=150 />"; ?></td></tr>
<tr><td><input type=submit value ="Update"></td></tr>
</table>
</form>
</body>
</html>

