<?php
include_once "../library/inc.sesadmin.php";
include_once "../library/inc.library.php";
include_once "../library/inc.connection.php";
?>

<!-- Server side start -->
<div class="col-12">
	<div class="card mt-5">
		<div class="card-body">
			<h4 class="header-title">Laporan SPMP Per Kelas</h4>
			<form action="?page=Tampil-Laporan-SPMP-Kelas" method="GET">
				<input type="hidden" name="page" value="Tampil-Laporan-SPMP-Kelas">
				<div class="form-row">
					<div class="col-md-6 mb-3">
						<label for="example-date-input" class="col-form-label">Tanggal Awal</label>
						<input class="form-control" type="date" id="example-date-input" name="dari">
					</div>
					<div class="col-md-6 mb-3">
						<label for="example-date-input" class="col-form-label">Tanggal Akhir</label>
						<input class="form-control" type="date" id="example-date-input" name="sampai">
					</div>
				</div>
				<div class="form-row">
					<div class="col-md-12">
						<label class="col-form-label">Pilih kelas</label>
						<select class="form-control form-control-lg mb-4" name="kelas">
							<option value="#">-- Silahkan Pilih --</option>
							<?php

							$query = "SELECT DISTINCT namakelas FROM kelas ORDER BY namakelas ASC";
							$hasil = mysql_query($query);
							while ($qtabel = mysql_fetch_array($hasil))
							{
								?>
								<option><?php echo $qtabel['namakelas']; ?></option>
								<?php 
							} 
							?>
						</select>
						<button class="btn btn-primary col-12" type="submit" value="Lihat">Lihat Laporan</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
<!-- Server side end -->

<!-- Server side start -->
<div class="col-12">
	<div class="card mt-5">
		<div class="card-body">
			<h4 class="header-title">Laporan SPMP Semua Kelas</h4>
			<form action="?page=Tampil-Laporan-SPMP-Semua" method="GET">
				<input type="hidden" name="page" value="Tampil-Laporan-SPMP-Semua">
				<div class="form-row">
					<div class="col-md-6 mb-3">
						<label for="example-date-input" class="col-form-label">Tanggal Awal</label>
						<input class="form-control" type="date" id="example-date-input" name="dari">
					</div>
					<div class="col-md-6 mb-3">
						<label for="example-date-input" class="col-form-label">Tanggal Akhir</label>
						<input class="form-control" type="date" id="example-date-input" name="sampai">
					</div>
				</div>
				<div class="form-row">
					<div class="col-md-12">
						<button class="btn btn-primary col-12" type="submit" value="Lihat">Lihat Laporan</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
<!-- Server side end -->