<html>
<body>
<h3 align="center" style="background-color:#00FF00">:: Setting Admin ::</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"){

$id=1;
$update = "select * from tset where idset ='$id'";
$hasil = mysql_query($update);
$row=mysql_fetch_array($hasil);

?>
<form method = post action ="editset.php">
<table border =0 align="center" width="1000" bgcolor="#FFFFCC">
<tr>
<td><input type = text hidden name="idset" value="<? echo $id; ?>"></td></tr>
<tr>
  <td>Tahun Akademik SPMB </td>
  <td>: 
    <input type = text name="taspmb" value="<? echo $row[1]; ?>"></td>
</tr>
<tr>
  <td>Tahun Akademik Berjalan </td>
<td>: <input type = text name="ta" value="<? echo $row[2]; ?>"> 
Kurikulum : 
  <input type = text name="kur" value="<? echo $row[10]; ?>"></td>
</tr>
<tr><td>Jadwal Ujian Tulis</td>
<td>: <input type = text name ="ttul" size="100" value="<? echo $row[3]; ?>"></td></tr>
<tr><td>Jadwal Test Kesehatan</td>
<td>: <input type = text name ="tkes" size="100" value="<? echo $row[4]; ?>"></td></tr>
<tr><td>Jadwal Psikotest</td>
<td>: <input type = text name ="tpsik" size="100" value="<? echo $row[5]; ?>"></td></tr>
<tr><td>Jadwal Test Wawancara</td>
<td>: <input type=text name ="tintv"  size="100" value="<? echo $row[6]; ?>"></td></tr>
<tr><td>Jadwal Pengumuman Hasil Sekeksi</td>
<td>: <input type = text name ="hasilt" size="100" value="<? echo $row[7]; ?>"></td></tr>
<tr>
  <td>Ketua SPMB</td>
  <td>: <input type = text name ="kspmb" size="70" value="<? echo $row[8]; ?>"></td>
</tr>
<tr>
  <td>Gelombang</td>
<td>: 
  <input type = text name ="gel" size="20" value="<? echo $row[9]; ?>"></td></tr>
<tr><td><input type=submit value ="Update"></td></tr>
</table>
</form>
<?php
} else {
    die("Anda bukan admin");
}
?>
</body>
</html>

