<?php
session_start();
if(isset($_SESSION['admin_id'])){
		header('location:dashboard');
}
include_once('../db_connect/db.php');
include_once('hub/php/site_info.php');

?>
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>
	<?php if(empty($site_name)){

							}else{
								echo $site_name;
							} ?>

	Login</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link rel="icon" href="images/<?php if(empty($site_fav)){

							}else{
								echo $site_fav;
							} ?>" sizes="32x32" />

	<link rel="icon" href="images/<?php if(empty($site_fav)){

							}else{
								echo $site_fav;
							} ?>" sizes="192x192" />


	<link rel="apple-touch-icon-precomposed" href="images/<?php if(empty($site_fav)){

							}else{
								echo $site_fav;
							} ?>" />

	<meta name="msapplication-TileImage" content="images/<?php if(empty($site_fav)){

							}else{
								echo $site_fav;
							} ?>" />
    <!-- Bootstrap -->
    <!-- global css -->
    <link href="css/app.css" rel="stylesheet">
    <!-- end of global css -->
    <!--page level css -->
    <link rel="stylesheet" href="vendors/iCheck/css/all.css"/>
    <link rel="stylesheet" type="text/css" href="css/custom.css">
    <link href="vendors/iCheck/css/all.css" rel="stylesheet">
    <link href="css/login2.css" rel="stylesheet">
    <!--end page level css-->

	<script src="js/jquery.min.js" type="text/javascript"></script>




 <script type="text/javascript">
     $(document).ready(function(e){



		$("#login_form").submit(function(event){
			event.preventDefault(); //prevent default action
			var post_url = "hub/php/ajax_login.php"; //get form action url
			var request_method = $(this).attr("method"); //get form GET/POST method

			$("#login_error").html('<div style="margin-top:10px"><center>Login, please wait...<br/><img src="images/ajax-loader1.gif" width="10%"/></center></div>');
			document.getElementById("button").style.display = "none";
			var form_data = new FormData(this); //Creates new FormData object


				$.ajax({
					url : post_url,
					type: request_method,
					data : form_data,
					contentType: false,
					cache: false,
					processData:false
				}).done(function(response){ //

					if(response==1){
						$("body").load("dashboard").hide().fadeIn(1500).delay(6000);
//or

					window.location.href = "dashboard";

					}else{

					$("#login_error").html(response);
					document.getElementById("button").style.display = "block";


					}
				});

		});
});
    </script>
</head>

<body class="bg-slider">
<div class="preloader">
    <div class="loader_img"><img src="img/loader.gif" alt="loading..." height="64" width="64"></div>
</div>
<div class="container">
    <div class="row " id="form-login">
        <div class="col-md-8  col-sm-8  col-10 mx-auto login-content">
            <div class="row">
                <div class="col-md-12">
                    <div class="header">
                        <h2 class="text-center">

                            <img src="images/<?php

							if(empty($site_logo)){

							}else{
								echo $site_logo;
							}

							?>" alt="logo" style="width:15%;height:100px;">
                        </h2>
                    </div>
                </div>
            </div>
            <div class="row row-bg-color">
				<div class="col-lg-2 col-12">

					</div>
                <div class="col-lg-8 col-12 core-login">

                        <!-- CSRF Token -->
                        <form id="login_form" method="POST">
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="form-group ">
                                    <label class="control-label" for="email">EMAIL or Username</label>
                                    <div class="input-group">
                                        <input type="text" placeholder="Email Address OR Username" class="form-control"
                                               name="email" id="email" required />
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="form-group ">
                                    <label class="control-label" for="password">PASSWORD</label>
                                    <div class="input-group">
                                        <input type="password" placeholder="Password" class="form-control"
                                               name="password" id="password" required />
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">

                            <a href="#" id="forgot" class="text-primary forgot1  pull-right"> Forgot Password? </a>
                        </div>

						<div class="form-group" id="login_error">

                        </div>
                        <div class="form-group" id="button">
                            <center><button type="submit"   class="btn btn-danger login-btn">Login</button></center>
                            <br>
                        </div>
                    </form>
                </div>
                <div class="col-lg-2 col-12">

                </div>
            </div>
        </div>
    </div>
</div>
<!-- global js -->
<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/bootstrap.min.js" type="text/javascript"></script>
<script src="js/backstretch.js"></script>
<!-- end of global js -->
<!-- page level js -->
<script type="text/javascript" src="vendors/iCheck/js/icheck.js"></script>
<script src="vendors/bootstrapvalidator/js/bootstrapValidator.min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/custom_js/login.js"></script>
<!-- end of page level js -->
</body>


<!-- Mirrored from coreplusdemo.lorvent.com/login by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 24 Dec 2019 11:18:07 GMT -->
</html>
