<?php
include("sess_check.php");

if (isset($_GET['masuk'])) {
	$sql = "SELECT * FROM masuk WHERE id_tahun='" . $_GET['masuk'] . "'";
	$ress = mysqli_query($conn, $sql);
	$data = mysqli_fetch_array($ress);
}
// deskripsi halaman
$pagedesc = "Data Tahun";
$menuparent = "kelas";
include("layout_top.php");
?>
<!-- top of file -->
<!-- Page Content -->
<div id="page-wrapper">
	<div class="container-fluid">
		<div class="row">
			<div class="col-lg-12">
				<h1 class="page-header">Data Tahun Ajaran</h1>
			</div><!-- /.col-lg-12 -->
		</div><!-- /.row -->

		<div class="row">
			<div class="col-lg-12"><?php include("layout_alert.php"); ?></div>
		</div>

		<div class="row">
			<div class="col-lg-12">
				<form class="form-horizontal" action="tahun_update.php" method="POST" enctype="multipart/form-data">
					<div class="panel panel-default">
						<div class="panel-heading">
							<h3>Edit Data</h3>
						</div>
						<div class="panel-body">

							<div class="form-group">
								<label class="control-label col-sm-3">Tahun Ajaran</label>
								<div class="col-sm-4">
									<input type="text" name="id_tahun" class="form-control" placeholder="Id Tahun" value="<?php echo $data['id_tahun'] ?>" required>
									<input type="hidden" name="masuk" class="form-control" placeholder="ID" value="<?php echo $data['id_tahun'] ?>" required>
								</div>
							</div>
							<div class="form-group">
								<label class="control-label col-sm-3">Tahun Ajaran</label>
								<div class="col-sm-4">
									<input type="text" name="tahun_ajaran" class="form-control" placeholder="Tahun Ajaran" value="<?php echo $data['tahun_ajaran'] ?>" required>
								</div>
							</div>
							<div class="form-group">
								<label class="control-label col-sm-3">Keterangan Masuk</label>
								<div class="col-sm-4">
									<textarea name="keterangan_masuk" class="form-control" placeholder="Keterangan_masuk" rows="3" required><?php echo $data['keterangan_masuk'] ?></textarea>
								</div>
							</div>
						</div>
						<div class="panel-footer">
							<button type="submit" name="perbarui" class="btn btn-success">Update</button>
						</div>
					</div><!-- /.panel -->
				</form>
			</div><!-- /.col-lg-12 -->
		</div><!-- /.row -->
	</div><!-- /.container-fluid -->
</div><!-- /#page-wrapper -->
<!-- bottom of file -->
<?php
include("layout_bottom.php");
?>