<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
	<meta name="description" content="" />
	<meta name="author" content="" />
	<title>AKS-SIMAKOM | APLIKASI KEUANGAN SEKOLAH</title>
	<!-- Required meta tags -->
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link href="<?php
				$logo = new dirImage;
				//$cekVersi = new update;
				echo $logo->dirImg('./asset/dokumen/foto/', 'aks');
				?>" rel='shortcut icon'>
	<!-- Bootstrap CSS -->

	<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
	<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
	<link rel="stylesheet" href="./asset/bootstrap/css/styles.css" />
	<link rel="stylesheet" href="./asset/bootstrap/plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css">
	<link rel="stylesheet" href="./asset/bootstrap/plugins/icheck-bootstrap/icheck-bootstrap.min.css">
	<link rel="stylesheet" href="./asset/bootstrap/plugins/jqvmap/jqvmap.min.css">
	<link rel="stylesheet" href="./asset/bootstrap/css/adminlte.min.css">
	<link rel="stylesheet" href="./asset/bootstrap/css/bootstrap-icons.css">
	<link rel="stylesheet" href="./asset/bootstrap/plugins/overlayScrollbars/css/OverlayScrollbars.min.css">
	<link rel="stylesheet" href="./asset/bootstrap/plugins/daterangepicker/daterangepicker.css">
	<link rel="stylesheet" href="./asset/bootstrap/plugins/summernote/summernote-bs4.min.css">
	<link rel="stylesheet" href="./asset/bootstrap/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css">
	<link rel="stylesheet" href="./asset/bootstrap/plugins/select2/css/select2.min.css">
	<link rel="stylesheet" href="./asset/bootstrap/plugins/select2-bootstrap4-theme/select2-bootstrap4.min.css">
	<link rel="stylesheet" href="./asset/bootstrap/plugins/bootstrap4-duallistbox/bootstrap-duallistbox.min.css">
	<link rel="stylesheet" href="./asset/bootstrap/plugins/bs-stepper/css/bs-stepper.min.css">
	<link rel="stylesheet" href="./asset/bootstrap/plugins/dropzone/min/dropzone.min.css">
	<link rel="stylesheet" href="./asset/bootstrap/plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
	<link rel="stylesheet" href="./asset/bootstrap/plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
	<link rel="stylesheet" href="./asset/bootstrap/plugins/datatables-buttons/css/buttons.bootstrap4.min.css">
	<link rel="stylesheet" href="./asset/bootstrap/plugins/fontawesome-free/css/all.min.css">


	<style>
		.bgcover {

			position: relative;
			width: auto;
			height: auto;
			min-height: 35rem;
			padding: 15rem 0;
			background: linear-gradient(to bottom,
					rgba(0, 0, 0, 0) 10%,
					rgba(0, 0, 0, 0) 100%,
					#000000 80%),
				url("asset/dokumen/foto/cover.png");
			background-position: center;
			background-repeat: no-repeat;
			background-attachment: scroll;
			background-size: cover;
		}

		.style {
			font-family: Arial, Helvetica, sans-serif;
		}
	</style>
</head>

<body id="page-top" class="bgcover style">

	<div class="mt-4 mx-4 fixed-top">
		<div class="row float-left">
			<div class="col-lg-12 mr-4 pr-3">
				<?php
				$csrf = new csrf;
				$view = new lembaga;
				echo $view->viewImage('./asset/dokumen/foto/', 'logo', '', '45', '45');
				//include "./captcha.php";
				//session_start();
				//$_SESSION['codecapt'];
				?>
			</div>
			<div class="col-lg-12 pl-0">
				<b class="mx-auto my-0 text-primary" style="font-size:1.2em; font-family:helvetica,geneva,optima,courier,arial"><?php $classSekolah = new sekolah;
																																echo $classSekolah->dataSekolah('sekolah');

																																?></b>
				<br>
				<i class="text-secondary mx-auto mt-0 mb-0 " style="font-size:11px; font-family:courier,arial"><?php echo  $classSekolah->dataSekolah('alamat'); ?></i>
				<form action="reset.php" method="post" role="form">
					<input type="text" name="tahun" value="<?php echo  $classSekolah->dataSekolah('tp'); ?>" hidden>
					<?php $csrf->token(); ?>
					<!--
					<div class="col-md-12 float-left">
						<button type="submit" name="submitreset" class="badge badge-sm btn-warning"><span class="bi bi-gear-wide-connected"></span> RESET DATABASE DEMO</button>
					</div>
	-->
				</form>


			</div>

		</div>
		<div class="row float-right">
			<i class="text-success float-right" style="font-size:10px">Versi : <?php require "versi.php";
																				$cekVersi = new versi;
																				echo $cekVersi->aplikasi(); ?></i>
		</div>
	</div>
	<!-- Masthead-->
	<header class="mt-0" style="position: relative;">

		<div class="col-md-12 mt-0 pt-5">
			<div class="container d-flex h-100 align-items-center">
				<div class="col-md-12">

					<div class="box col-md-4 float-right mt-5">
						<div class="card mb-12">
							<div class="card-body login-card-body" style="background:fixed">

								<p class="login-box-msg style">

									<?php
									$view = new lembaga;
									//echo $view->viewImage('./asset/dokumen/foto/', 'logo', 'img-thumbnail', '50', '50'); 
									?>
								<p style="font-family: Arial, Helvetica, sans-serif;font-size : 13px;">Login Aplikasi <?php //echo $_SESSION['codecapt']; 
																														?></p>
								</p>

								<form action="cek_login.php" method="post" role="form">

									<div class="input-group mb-1">
										<input type="text" class="form-control form-control-sm " placeholder="Username" name="username" style="font-family:Arial, Helvetica, sans-serif;font-size:11px" value="" required>
										<div class="input-group-append">
											<div class="input-group-text">
												<span class="fas fa-user"></span>
											</div>
										</div>

									</div>
									<div class="input-group mb-1">
										<input type="password" class="form-control form-control-sm " style="font-family:Arial, Helvetica, sans-serif;font-size:11px" placeholder="Password" name="password" required>
										<div class="input-group-append">
											<div class="input-group-text">
												<span class="fas fa-lock"></span>
											</div>
										</div>

									</div>
									<div class="input-group mb-1">
										<input type="text" name="tp" value="<?php echo $classSekolah->dataSekolah('tp'); ?>" hidden>

										<select name="tahun" class="form-control form-control-sm select2 " value="" style="font-family:Arial, Helvetica, sans-serif;font-size:11px" disabled>
											<option class="col-xs-10 "><?php echo $classSekolah->dataSekolah('tp'); ?></option>
											<?php
											$opt = new form();
											$opval = $opt->optSelect('tb_tp', ' order by tp asc');
											while ($datatp = $opval->fetch(PDO::FETCH_OBJ)) {
												echo "<option class='col-xs-10'>$datatp->tp</option>";
											}
											?>
										</select>
										<div class="input-group-append">
											<div class="input-group-text">
												<span class="fas fa-calendar"></span>
											</div>
										</div>
									</div>
									<div class="row mb-2 mt-2">

										<div class="col-3 mr-1 pt-1">
											<img src="captcha.php" alt="-" width="100" height="30" />

										</div>

										<div class="col-8 ml-3 pl-2 pt-1">
											<input type="text" class="form-control form-control-sm " placeholder="Masukan Kode Pengaman" maxlength="5" name="inputcapt" style="font-family:Arial, Helvetica, sans-serif;font-size:11px;text-align:center" value="" required>

										</div>


									</div>
									<div class="input-group mb-3 mt-2">


										<div class="col-lg-6">
											<div class="custom-control custom-radio">
												<input class="custom-control-input" type="radio" id="customRadio1" value="Operator" name="operator" checked>
												<label for="customRadio1" class="custom-control-label">Operator</label>
											</div>
										</div>
										<div class="col-lg-6">
											<div class="custom-control custom-radio">
												<input class="custom-control-input" type="radio" id="customRadio2" value="Siswa" name="operator">
												<label for="customRadio2" class="custom-control-label">Siswa</label>
											</div>

										</div>


									</div>




									<div class="row">
										<div class="col-5 float-left">
											<button type="submit" class="btn btn-sm btn-primary"><i class="bi bi-box-arrow-in-right"></i> Login</button>
										</div>
										<div class="col-2 float-right">

										</div>
										<div class="col-5 float-right">
											<a href="./app/resetpass/" class="small pl-4 pt-3" style="font-size: 10px;"><i class="text-secondary">Lupa Password?</i></a>
										</div>

									</div>
								</form>

								<?php
								if (isset($_GET['login']) && $_GET['login'] == "errorlog") {
									//$get = $_GET['login'];
									//if ($get == "errorlog") {
									echo "
												<div class='alert alert-danger alert-dismissible mt-4' style='font-family:arial;font-size:10px;'>
													<button type='button' class='close' data-dismiss='alert'>×</button>
													Username atau Password  <strong>Salah !</strong> 
												</div>
												";
								} elseif (isset($_GET['login']) && $_GET['login'] == "errorcapt") {
									//$get = $_GET['login'];
									//if ($get == "errorlog") {
									echo "
												<div class='alert alert-warning alert-dismissible mt-4' style='font-family:arial;font-size:10px;'>
													<button type='button' class='close' data-dismiss='alert'>×</button>
													Captcha <strong>Salah !</strong> 
												</div>
												";
									//session_end;
								} else {
									echo "";
								};
								?>
							</div>

						</div>

					</div>

				</div>
			</div>

		</div>

	</header>


	<script>
		$.widget.bridge('uibutton', $.ui.button)
	</script>
	<script src="asset/bootstrap/plugins/jquery/jquery.min.js"></script>
	<script src="asset/bootstrap/plugins/jquery-ui/jquery-ui.min.js"></script>
	<script src="asset/bootstrap/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
	<script src="asset/bootstrap/plugins/chart.js/Chart.min.js"></script>
	<script src="asset/bootstrap/plugins/sparklines/sparkline.js"></script>
	<script src="asset/bootstrap/plugins/jqvmap/jquery.vmap.min.js"></script>
	<script src="asset/bootstrap/plugins/jqvmap/maps/jquery.vmap.usa.js"></script>
	<script src="asset/bootstrap/plugins/jquery-knob/jquery.knob.min.js"></script>
	<script src="asset/bootstrap/plugins/moment/moment.min.js"></script>
	<script src="asset/bootstrap/plugins/daterangepicker/daterangepicker.js"></script>
	<script src="asset/bootstrap/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
	<script src="asset/bootstrap/plugins/summernote/summernote-bs4.min.js"></script>
	<script src="asset/bootstrap/plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js"></script>
	<script src="asset/bootstrap/js/adminlte.js"></script>
	<script src="asset/bootstrap/js/pages/dashboard.js"></script>
	<script src="asset/bootstrap/plugins/select2/js/select2.full.min.js"></script>
	<script src="asset/bootstrap/plugins/bootstrap4-duallistbox/jquery.bootstrap-duallistbox.min.js"></script>
	<script src="asset/bootstrap/plugins/inputmask/jquery.inputmask.min.js"></script>
	<script src="asset/bootstrap/plugins/bootstrap-switch/js/bootstrap-switch.min.js"></script>
	<script src="asset/bootstrap/plugins/bs-stepper/js/bs-stepper.min.js"></script>
	<script src="asset/bootstrap/plugins/dropzone/min/dropzone.min.js"></script>
	<script src="asset/bootstrap/plugins/datatables/jquery.dataTables.min.js"></script>
	<script src="asset/bootstrap/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
	<script src="asset/bootstrap/plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
	<script src="asset/bootstrap/plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
	<script src="asset/bootstrap/plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
	<script src="asset/bootstrap/plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script>
	<script src="asset/bootstrap/plugins/jszip/jszip.min.js"></script>
	<script src="asset/bootstrap/plugins/pdfmake/pdfmake.min.js"></script>
	<script src="asset/bootstrap/plugins/pdfmake/vfs_fonts.js"></script>
	<script src="asset/bootstrap/plugins/datatables-buttons/js/buttons.html5.min.js"></script>
	<script src="asset/bootstrap/plugins/datatables-buttons/js/buttons.print.min.js"></script>
	<script src="asset/bootstrap/plugins/datatables-buttons/js/buttons.colVis.min.js"></script>
	<script src="asset/bootstrap/plugins/bs-custom-file-input/bs-custom-file-input.min.js"></script>

</body>

</html>
<?php
$csrf = new csrf;
$pandu = new pandu;
$format = new format;
$modal = new modal;
$cekDB = new database();
$classekolah = new sekolah;
$clsWhatsapp = new whatsapp;
$simreport = new simakom_laporan;
$simtran = new simakom_transaksi;
$crud = new crudData();

//Cek Database
$cekDB = $cekDB->cekDatabase();
$sekolah_id = $classekolah->datasekolah('id');
$whatsapp_id = $clsWhatsapp->data('id');
$simtran->simReport();
