<?php
session_start();
include_once"config.php";
$loginuser = isset($_session['loginuser'])?$_session['loginuser']:null;
if($loginuser =='admin'){
	header("location:dashbaord.php");
}
$try = isset($_SESSION['try'])?$_SESSION['try']:null;

?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

  
   
    <!-- Meta -->
    <meta name="description" content="Premium Quality and Responsive UI for Dashboard.">
    <meta name="author" content="ThemePixels">

  <title> :: SMS DataTable ::</title>

    <!-- vendor css -->
    <link href="lib/font-awesome/css/font-awesome.css" rel="stylesheet">
    <link href="lib/Ionicons/css/ionicons.css" rel="stylesheet">


    <!-- Starlight CSS -->
    <link rel="stylesheet" href="css/starlight.css">
  </head>

  <body>

    <div class="d-flex align-items-center justify-content-center bg-sl-primary ht-100v">

      <div class="login-wrapper wd-300 wd-xs-350 pd-25 pd-xs-40 bg-white">
	  <?php if($try == 1){success_insert();}elseif($try == 2){update();}elseif($try == 3){ deleted();}elseif($try == 4){ tryagain();} unset($_SESSION['try']); ?>
<div style="clear:both"></div>
        <div class="signin-logo tx-center tx-24 tx-bold tx-inverse">SMS Database <span class="tx-info tx-normal">admin</span></div>
        <div class="tx-center mg-b-10 mg-t-20"><img src="img/logo.png" width="200"></div>
<form method="post" action="query/login.php">
        <div class="form-group">
          <input type="text" class="form-control" name="user" placeholder="Enter your username">
        </div><!-- form-group -->
        <div class="form-group">
          <input type="password" class="form-control" name="pwd" placeholder="Enter your password">
          <!--<a href="" class="tx-info tx-12 d-block mg-t-10">Forgot password?</a>-->
        </div><!-- form-group -->
      <button type="submit" class="btn btn-info btn-block">Sign In</button>
</form>
      <!--  <div class="mg-t-60 tx-center">Not yet a member? <a href="page-signup.html" class="tx-info">Sign Up</a></div>-->
      </div><!-- login-wrapper -->
    </div><!-- d-flex -->

    <script src="lib/jquery/jquery.js"></script>
    <script src="lib/popper.js/popper.js"></script>
    <script src="lib/bootstrap/bootstrap.js"></script>

  </body>
</html>
