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

// deskripsi halaman
$pagedesc = "Data Kelas";
$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 Tingkatan</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="tingkatan_insert.php" method="POST" enctype="multipart/form-data">
					<div class="panel panel-default">
						<div class="panel-heading">
							<h3>Tambah Data</h3>
						</div>
						<div class="panel-body">
							<div class="form-group">
								<label class="control-label col-sm-3">Tingkatan Kelas</label>
								<div class="col-sm-4">
									<input type="text" name="tingkatan" class="form-control" placeholder="Tingkat Kelas" required>
								</div>
							</div>

							<div class="form-group">
								<label class="control-label col-sm-3">Tahun Ajaran</label>
								<div class="col-sm-4">
									<select name="id_tahun" id="tahun" class="form-control" required>
										<option value="">==== Pilih Tahun Ajaran ====</option>
										<?php
										$sql_brg = "SELECT masuk.id_tahun,status.id_status,masuk.tahun_ajaran FROM masuk INNER JOIN status on status.id_status=masuk.id_status WHERE masuk.id_tahun AND status.status BETWEEN 'Aktif' AND 'Aktif'";
										$ress_brg = mysqli_query($conn, $sql_brg);
										while ($li = mysqli_fetch_array($ress_brg)) {
											echo '<option value="' . $li['id_tahun'] . '">' . $li['tahun_ajaran'] . '</option>';
										}
										?>
									</select>
								</div>
							</div>
						</div>
						<div class="panel-footer">
							<button type="submit" name="simpan" class="btn btn-success">Simpan</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");
?>