<?PHP include("components/adm_head.php"); ?>
<!-- Simple login form -->
					<form action="" method="post">
						<div class="panel panel-body login-form">
							<div class="text-center">
								<div class="icon-object border-slate-300 text-slate-300"><i class="icon-reading"></i></div>
								<h5 class="content-group">Вход в админ панель <small class="display-block">Введите свои учетные данные ниже</small></h5>
							</div>
<?PHP
if(isset($_SESSION["admin"])){ Header("Location: /?menu=masteruser"); return; }

if(isset($_POST["admlogin"])){

	$db->Query("SELECT * FROM db_config WHERE id = 1 LIMIT 1");
	$data_log = $db->FetchArray();

	if(strtolower($_POST["admlogin"]) == strtolower("master") AND strtolower($_POST["admpass"]) == strtolower("master") ){

		$_SESSION["admin"] = true;
		Header("Location: /?menu=masteruser");
		return;
	}else echo "<center><font color = 'red'><b>Неверно введен логин и/или пароль</b></font></center><BR />";

}

?>
							<div class="form-group has-feedback has-feedback-left">
								<input type="text" class="form-control" name="admlogin" placeholder="Логин">
								<div class="form-control-feedback">
									<i class="icon-user text-muted"></i>
								</div>
							</div>

							<div class="form-group has-feedback has-feedback-left">
								<input type="password" class="form-control" name="admpass" placeholder="Пароль">
								<div class="form-control-feedback">
									<i class="icon-lock2 text-muted"></i>
								</div>
							</div>

							<div class="form-group">
								<button type="submit" class="btn btn-primary btn-block">Авторизоваться <i class="icon-circle-right2 position-right"></i></button>
							</div>

							<div class="text-center">
								<a href="login_password_recover.html">Forgot password?</a>
							</div>
						</div>
					</form>
					<!-- /simple login form -->