<?php
if ($session->Check ()) {
	$session->redirect ( 'home', Admin );
} else {
	?>
<!DOCTYPE html>
<html lang="en">
<head>


<meta name="description" content="User login page" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<!--basic styles-->

<link
	href="<?php echo SITE_URL.'/assets/backend/css/bootstrap.min.css'?>"
	rel="stylesheet" />
<link
	href="<?php echo SITE_URL.'/assets/backend/css/bootstrap-responsive.min.css'?>"
	rel="stylesheet" />
<link rel="stylesheet"
	href="<?php echo SITE_URL.'/assets/backend/css/font-awesome.min.css'?>" />

<!--[if IE 7]>
		  <link rel="stylesheet" href="assets/css/font-awesome-ie7.min.css" />
		<![endif]-->

<!--page specific plugin styles-->

<!--fonts-->

<link rel="stylesheet"
	href="http://fonts.googleapis.com/css?family=Open+Sans:400,300" />

<!--ace styles-->

<link rel="stylesheet"
	href="<?php echo SITE_URL.'/assets/backend/css/ace.min.css'?>" />
<link rel="stylesheet"
	href="<?php echo SITE_URL.'/assets/backend/css/ace-responsive.min.css'?>" />
<link rel="stylesheet"
	href="<?php echo SITE_URL.'/assets/backend/css/ace-skins.min.css'?>" />

<!--[if lte IE 8]>
		  <link rel="stylesheet" href="assets/css/ace-ie.min.css" />
		<![endif]-->

<!--inline styles related to this page-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>

<body class="login-layout">
	<div class="main-container container-fluid">
		<div class="main-content">
			<div class="row-fluid">
				<div class="span12">
					<div class="login-container">
						<div class="row-fluid">
							<div class="center">
								<h1>
									<a href="<?php echo $link->link('home',Admin);?>">
										<h5><?php
	if (LOGO != '') {
		?><center>
												<img src='uploads/image/<?php echo LOGO; ?>'>
											</center><?php
		
		echo '<br>';
	} else {
	}
	?> 
											<span class="white">
											<?php
	$settingcheck = $db->get_count ( "setting" );
	// echo $settingcheck;
	$officecheck = $db->get_count ( "office" );
	// echo $officecheck;
	if ($settingcheck == 1 && $officecheck == 1) {
		echo C_NAME;
	}
	?>
											</span>
										</h5>
									</a>

								</h1>
								<h4 class="blue">&copy; Company Name</h4>
							</div>
						</div>

						<div class="space-6"></div>

						<div class="row-fluid">
							<div class="position-relative">
								<div id="login-box"
									class="login-box visible widget-box no-border">
									<div class="widget-body">
										<div class="widget-main">
													<?php
	if ($try != '') {
		echo $try;
		?>
													<?php
	
	}
	echo $message;
	?>
												<h4 class="header blue lighter bigger">

												<i class="icon-coffee green"></i> Please Enter Your
												Information
											</h4>

											<div class="space-6"></div>

											<form method="post" action="">
												<fieldset>
													<label> <span class="block input-icon input-icon-right"> <input
															type="text" class="span12" name="admin[email]"
															placeholder="Username" /> <i class="icon-user"></i>
													</span>
													</label> <label> <span
														class="block input-icon input-icon-right"> <input
															type="password" class="span12" name="admin[password]"
															placeholder="Password" /> <i class="icon-lock"></i>
													</span>
													</label>

													<div class="space"></div>

													<div class="clearfix">
														<input type="hidden" name="checkadmin" value="admin">
														<button name="submit"
															class="width-35 pull-right btn btn-small btn-primary">
															<i class="icon-key"></i> Login
														</button>
													</div>

													<div class="space-4"></div>
												</fieldset>
											</form>
										</div>
										<div class="toolbar clearfix">
											<div>
												<a href="<?php echo $link->link('forgotpass', Admin);?>"
													class="forgot-password-link"> <i class="icon-arrow-left"></i>
													I forgot my password
												</a>
											</div>
										</div>
										<!--/widget-main-->
									</div>
									<!--/widget-body-->
								</div>
								<!--/login-box-->


								<!--/forgot-box-->

								<div id="signup-box" class="signup-box widget-box no-border">
									<div class="widget-body">
										<div class="widget-main">
											<h4 class="header green lighter bigger">
												<i class="icon-group blue"></i> New User Registration
											</h4>

											<div class="space-6"></div>
											<p>Enter your details to begin:</p>

											<form />
											<fieldset>
												<label> <span class="block input-icon input-icon-right"> <input
														type="email" class="span12" placeholder="Email" /> <i
														class="icon-envelope"></i>
												</span>
												</label> <label> <span
													class="block input-icon input-icon-right"> <input
														type="text" class="span12" placeholder="Username" /> <i
														class="icon-user"></i>
												</span>
												</label> <label> <span
													class="block input-icon input-icon-right"> <input
														type="password" class="span12" placeholder="Password" /> <i
														class="icon-lock"></i>
												</span>
												</label> <label> <span
													class="block input-icon input-icon-right"> <input
														type="password" class="span12"
														placeholder="Repeat password" /> <i class="icon-retweet"></i>
												</span>
												</label> <label> <input type="checkbox" /> <span class="lbl">
														I accept the <a href="#">User Agreement</a>
												</span>
												</label>

												<div class="space-24"></div>

												<div class="clearfix">
													<button type="reset"
														class="width-30 pull-left btn btn-small">
														<i class="icon-refresh"></i> Reset
													</button>

													<button onclick="return false;"
														class="width-65 pull-right btn btn-small btn-success">
														Register <i class="icon-arrow-right icon-on-right"></i>
													</button>
												</div>
											</fieldset>
											</form>
										</div>

										<div class="toolbar center">
											<a href="#" onclick="show_box('login-box'); return false;"
												class="back-to-login-link"> <i class="icon-arrow-left"></i>
												Back to login
											</a>
										</div>
									</div>
									<!--/widget-body-->
								</div>
								<!--/signup-box-->
							</div>
							<!--/position-relative-->
						</div>
					</div>
				</div>
				<!--/.span-->
			</div>
			<!--/.row-fluid-->
		</div>
	</div>
	<!--/.main-container-->

	<!--basic scripts-->

	<!--[if !IE]>-->

	<script
		src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>

	<!--<![endif]-->

	<!--[if IE]>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<![endif]-->

	<!--[if !IE]>-->

	<script type="text/javascript">
			window.jQuery || document.write("<script src='<?php echo SITE_URL. '/assets/backend/js/jquery-2.0.3.min.js'?>'>"+"<"+"/script>");
		</script>

	<!--<![endif]-->

	<!--[if IE]>
<script type="text/javascript">
 window.jQuery || document.write("<script src='assets/js/jquery-1.10.2.min.js'>"+"<"+"/script>");
</script>
<![endif]-->

	<script type="text/javascript">
			if("ontouchend" in document) document.write("<script src='<?php echo SITE_URL. '/assets/backend/js/jquery.mobile.custom.min.js'?>>"+"<"+"/script>");
		</script>
	<script
		src="<?php echo SITE_URL. '/assets/backend/js/bootstrap.min.js'?>"></script>

	<!--page specific plugin scripts-->

	<!--ace scripts-->

	<script
		src="<?php echo SITE_URL. '/assets/backend/js/ace-elements.min.js'?>"></script>
	<script src="<?php echo SITE_URL. '/assets/backend/js/ace.min.js'?>"></script>

	<!--inline scripts related to this page-->

	<script type="text/javascript">
			function show_box(id) {
			 $('.widget-box.visible').removeClass('visible');
			 $('#'+id).addClass('visible');
			}
		</script>
</body>
</html>
<?php }?>