<html>
<body>
<?php
include "connect.php";
session_start();



//cek level user
if($_SESSION['Level']=="hrd" || $_SESSION['Level']=="admin"){
?>

<h3 align="center" style="background-color:#00FF00">:: FORM INPUT KARYAWAN ::</h3>
<form method = post action ="inputstaf.php" enctype="multipart/form-data">

<table border =0 align="center" width="1000" bgcolor="#FFFFCC">
<tr>
  <td colspan="2"><hr></td>
</tr>
<tr><td>Foto</td>
<td>: <input type = file name ="photo"></td></tr>

<tr>
  <td>NIK</td>
<td>: <input type = text name="nik"></td></tr>
<tr><td>Nama </td>
<td>: <input type = text name="nama" size="50"></td></tr>
<tr><td>Tempat lahir </td>
<td>: <input type = text name ="kota_lhr" size="50"></td></tr>
<tr><td>Tanggal Lahir </td>
<td>: 
<input type="text" name="tgl_lhr" 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>Jabatan </td>
<td>: <input type = text name ="jabatan" size="50"></td></tr>
<tr><td>HP</td>
<td>: <input type = text name ="telp"></td></tr>
<tr><td>Alamat</td>
<td>: <textarea name ="alamat" ></textarea></td></tr>

<tr>
  <td>Tanggal Masuk </td>
  <td>: 
<input type="text" name="tgl_msk" 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><input type=submit value ="Kirim">
<input type=reset value="Cancel"></td>
</tr>
</table>
</form>
<?php
} else {
    die("Anda bukan admin");
}
?>
</body>
</html>

