<html>
<body>
<h3 align="center" style="background-color:#00FF00">:: FORM INPUT PENDAFTARAN SELEKSI PENERIMAAN MAHASISWA BARU ::</h3>
<?php
include "connect.php";
session_start();

//cek apakah user sudah login
if(!isset($_SESSION['username'])){
    die("Anda belum login");//jika belum login jangan lanjut..
}

//cek level user
if($_SESSION['Level']=="admin" || $_SESSION['Level']=="spmb"){
$idset=1;
	$cset="select * from tset where idset='$idset'";
	$hset=mysql_query($cset);
	$pset=mysql_fetch_array($hset);

?>
<form method = post action ="inputcmhs.php" enctype="multipart/form-data">

<table border =0 align="center" width="1000" bgcolor="#FFFFCC">
<tr>
  <td colspan="2"><?php include "test2.html"; ?> selesai foto isi data dibawah ini..
    <hr></td>
</tr>
<tr><td>Foto</td>
<td>: <input type = file name ="photo">
cari nama file sesuai foto diatas (d:/xampp/spmb/...) </td>
</tr>
<tr><td>&nbsp;</td>
<td> <input type = text name="tgl_daf" value="<? echo date('Y-n-j'); ?>" size="10" hidden ></td></tr>
<tr><td>No.Peserta </td>
<td>: <input type = text name="no_cmhs"></td></tr>
<tr><td>Nama </td>
<td>: <input type = text name="nm_cmhs" 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" value="<? echo date('Y-n-j'); ?>" 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');" /> 
Tahun-Bulan-Tanggal
<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>Agama</td>
<td>: <select size="1"  name ="agama">
	<option selected>Islam</option>
	<option>Katolik</option>
    <option>Kristen</option>
    <option>Hindu</option>
    <option>Budha</option>
</td>
  </select></td></tr>
<tr><td>Jenis Kelamin </td>
<td>: <select size="1"  name ="jenkel">
	<option selected>L</option>
	<option>P</option>
</td>
  </select></td></tr> 
<tr><td>Tinggi Badan</td>
<td>: <input type = text name ="tbadan">Cm</td></tr>
<tr><td>Berat Badan</td>
<td>: <input type = text name ="bbadan">Kg</td></tr>
<tr><td>Alamat</td>
<td>: <textarea name ="alamat" ></textarea></td></tr>
<tr><td>Telpon / HP</td>
<td>: <input type = text name ="telp"></td></tr>
<tr><td>Sekolah Asal</td>
<td>: <input type = text name ="sklh_asal" size="50"></td></tr>
<tr><td>Rekomendasi</td>
<td>: <input type = text name ="rekomendasi" size="50"></td></tr>
<tr><td>Orang Tua/Wali</td>
<td>: <input type = text name ="wali" size="50"></td></tr>
<tr><td>Program Study </td>
<td>: <select size="1"  name ="prog_study">
	<option selected>AKPER</option>
	<option>AKBID</option>
</td>
  </select></td></tr>
<tr><td>TA</td>
<td>: <input type = text name ="ta" value="<? echo $pset[1]; ?>" style="background-color:#CCFFFF" readonly="yes"></td></tr>
</tr>
<tr><td>Gelombang</td>
<td>: 
  <input type = text name ="gel" value="<? echo $pset[9]; ?>" style="background-color:#CCFFFF" readonly="yes"></td></tr>
<tr><td>&nbsp;</td>
<td> <input type = text name="ket" value="TL" size="5" hidden ></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>

