<html>
<head>
<title> Form Cetak KRS </title>
</head>
<body>
<h3 align="center">Cetak KRS</h3>
<?php
include "connect.php";
session_start();

//cek apakah user sudah login
//if(!isset($_SESSION['username'])){
 //   die("Anda belum <a href=index.php>Login</a>");//jika belum login jangan lanjut..
//}

//cek level user
if($_SESSION['Level']=="baak" || $_SESSION['Level']=="admin" || $_SESSION['Level']=="dosen"){
$id=1;
$hasil = mysqli_query($koneksi,"select * from tset where idset ='$id'");
$row=mysqli_fetch_array($hasil);
?>
<table align="center" frame="border" width="300">
<form method=post action="cetakkrs.php">
<tr>
<td>NIM</td>
<td><input type=text name="nim"></td></tr>
<tr><td>Semester </td>
<td><select size="1" name ="semester">
	<option selected></option>
	<option>1</option>
    <option>2</option>
    <option>3</option>
    <option>4</option>
	<option>5</option>
    <option>6</option>
  </select></td>
<tr><td>TA</td>
<td><input type = text name ="ta" value="<? echo $row[2]; ?>" style="background-color:#CCFFFF "></td></tr>
<tr><td>

<tr>
  <td colspan="2"> </td>
  </tr>
<tr><td>
<input type =submit value="Cetak">
<input type="button" value="Kembali" onclick="history.back(-1)"></td>
<td><strong><a href=logout.php>Log Out</a></strong></td>
</tr>
</form>
</table>
<?php
} else {
    die("Anda bukan admin");
}
?>
</body>
</html>

