<?php
session_start();
include("include/connection.php");

if (isset($_SESSION['admin_name'])) {
    
    echo "<script>
    window.location = './desktop.php';
</script>";
} 
?>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Adminsuit | Log in</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <!-- Bootstrap 3.3.6 -->
  <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="bootstrap/font-awesome.min.css">
  <!-- Ionicons -->
  <!-- Theme style -->
  <link rel="stylesheet" href="dist/css/AdminLTE.min.css">
  <!-- iCheck -->
  <link rel="stylesheet" href="plugins/iCheck/square/blue.css">

</head>
<body class="hold-transition login-page">
<div class="login-box">
<!--<center class=""> <img src="images/logo.jpg" class="" alt="logo"> </center>-->
  <div class="login-logo">
  SGS Admin Panel
 <h5> <?php if(isset($_GET['err'])=="ture") { ?>
				<span class="red_txt">You are entering wrong details ask SGS</span>
				<?php  }?>
                <?php if(isset($_GET['msg1'])=="notauthorized") { ?>
				<span class="red_txt">Wrong Action Performed By User</span>
				<?php  }?>
                <?php if(isset($_GET['logout'])=="sucess") { ?>
			<span class="red_txt">You Are Logged Out Sucessfully.....</span>
				<?php  }?></h5>
  </div>
  
  <!-- /.login-logo -->
  <div class="login-box-body">
  
    <p class="login-box-msg">Sign in to see Cicken Road Game Admin</p>
    <p class="login-box-msg">Telegram - @Rsk_yt</p>

                
    <form action="validateAdmin.php" method="post">
      <div class="form-group has-feedback">
        <input type="text" class="form-control" placeholder="Username" name="namea">
        <span class="glyphicon glyphicon-user form-control-feedback"></span>
      </div>
      <div class="form-group has-feedback">
        <input type="password" class="form-control" placeholder="Password" name="spass">
        <input type="hidden" name="login" value="login">
        <span class="glyphicon glyphicon-lock form-control-feedback"></span>
      </div>
      <div class="row">
        <div class="col-xs-8">
          <div class="checkbox icheck">
           
          </div>
        </div>
        <!-- /.col -->
        <div class="col-xs-4">
 <button type="submit" class="btn btn-primary btn-block btn-flat">Log in</button>
        </div>
        <!-- /.col -->
      </div>
    </form>

<!--<a href="#">I forgot my password</a>-->
    

  </div>
  <!-- /.login-box-body -->
</div>
<!-- /.login-box -->

<!-- jQuery 2.2.0 -->
<script src="plugins/jQuery/jQuery-2.2.0.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="bootstrap/js/bootstrap.min.js"></script>
<!-- iCheck -->
<script src="plugins/iCheck/icheck.min.js"></script>
<script>
  $(function () {
    $('input').iCheck({
      checkboxClass: 'icheckbox_square-blue',
      radioClass: 'iradio_square-blue',
      increaseArea: '20%' // optional
    });
  });
</script>
<script> 
/** 
 * Disable right-click of mouse, F12 key, and save key combinations on page 
 */ 
 document.addEventListener("contextmenu", function(e){ 
 e.preventDefault(); 
 }, false); 
 document.addEventListener("keydown", function(e) { 
 //document.onkeydown = function(e) { 
 // "I" key 
 if (e.ctrlKey && e.shiftKey && e.keyCode == 73) { 
 disabledEvent(e); 
 } 
 // "J" key 
 if (e.ctrlKey && e.shiftKey && e.keyCode == 74) { 
 disabledEvent(e); 
 } 
 // "S" key + macOS 
 if (e.keyCode == 83 && (navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey)) { 
 disabledEvent(e); 
 } 
 // "U" key 
 if (e.ctrlKey && e.keyCode == 85) { 
 disabledEvent(e); 
 } 
 // "F12" key 
 if (event.keyCode == 123) { 
 disabledEvent(e); 
 } 
 // "C" key 
 if (e.ctrlKey && event.keyCode == 67) { 
 disabledEvent(e); 
 } 
 }, false); 
 function disabledEvent(e){ 
 if (e.stopPropagation){ 
 e.stopPropagation(); 
 } else if (window.event){ 
 window.event.cancelBubble = true; 
 } 
 e.preventDefault(); 
 return false; 
 }</script>
</body>
</html>
