<?php session_start();
require_once 'inc/dbcon.php';
require_once 'inc/functions.php';
if(isset($_POST['save_limit'])){
    $expdate = remove_junk(escape($_POST['expdate']));
	$password = remove_junk(escape($_POST['password']));
    
	
	if($password=='arica') {
        $sql="UPDATE tbl_limitset SET expDate='$expdate' WHERE id=1";    
        $result = mysqli_query($con,$sql) or die(mysqli_error($con));   
        $efid=mysqli_affected_rows($con);    
        if($efid>0){
        save_msg('s','Expire Date Successfully Update!');
        echo "<script>window.location='axe_limit.php'</script>";
        }else{
        save_msg('w','Expire Date to Update!');
        echo "<script>window.location='axe_limit.php'</script>";    
        }
		
	}else{
        
        save_msg('i','Password is wrong.Please try again.');
		echo "<script>window.location='axe_limit.php'</script>";
	}  
}
?>

<head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>Axes Business Automation</title>
        <meta name="description" content="Purchase, Sales and Accounting are just the beginning. Discover more every day. Find your business.">
        <meta property="og:title" content="Axes Business Automation" />
        <meta property="og:url" content="https://www.axesgl.com/" />
        <meta property="og:description" content="Purchase, Sales and Accounting are just the beginning. Discover more every day. Find your business.">
        <meta property="og:type" content="Software" />
        <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
        <link rel="shortcut icon" type="image/x-icon" href="../img/favicon.png">
        <link rel="stylesheet" href="css/bootstrap.min.css">
        <link rel="stylesheet" href="css/font-awesome.min.css">
        <!-- Theme style -->
        <link rel="stylesheet" href="css/axes.css?V=1.0">
        <link href="https://fonts.googleapis.com/css?family=Roboto:400,700" rel="stylesheet">
        <link rel="stylesheet" href="css/custome.css?V=1.0">
        <link rel="stylesheet" href="css/responsive.css?V=1.0">
        <link rel="stylesheet" type="text/css" href="css/login.css">
        <style>
        </style>
</head>   
<body class="loginbg" style=" margin-right: 25px;">
<div class="wrapper">
<div class="login-box" style=" margin-bottom: 5px;">
<div class="login-logo">
<img src="img/axes.png" />
</div>
<!-- /.login-logo -->
<div class="login-box-body">
<p class="login-box-msg">Extend Client Expired Date</p>
<?php echo display_msg();?>  
<form action="axe_limit.php" autocomplete="off" method="post" accept-charset="utf-8">
<div class="form-group">
<div class="input-group date datetimepicker">
<span class="input-group-addon"><span class="fa fa-calendar"></span></span>
<input type="text" maxlength="18" autocomplete="off" class="form-control" name="expdate" value="<?php echo get_fild_data('tbl_limitset',1,'expDate');?>" required autocomplete="off" required>
</div>
</div>
<div class="form-group">
<input type="password" name="password" autocomplete="off" class="form-control" value="" placeholder="Password" required>
</div>
<div class="row">
<!-- /.col -->
<div class="col-xs-4 text-left">
<button type="submit" name="save_limit" value="save_limit" class="btn btn-flat bg-purple btn-sm">Save</button>
</div>
</div>    
</form>                        

</div>
<!-- /.login-box-body -->
</div>
</div>
<!--iCheck-->
<link rel="stylesheet" href="plugins/icheck/all.css">
<script src="plugins/icheck/icheck.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/bootstrap-datepicker.js?V=1.0"></script>
<script>
$('.datetimepicker').datepicker({format: "yyyy-mm-dd", autoclose: true, clearBtn: true, orientation: 'auto bottom'});    


</script>



</body>
</html>
