
<?php
include('dist/includes/dbcon.php');
$date=date('Y-m-d');
   // $datenewko = date('Y-m-d', strtotime("+1 day"));
	$query=mysqli_query($con,"select * from pettycash where date='$date' ")or die(mysqli_error());
    $row=mysqli_num_rows($query);
    
    	$query1=mysqli_query($con,"select * from pettycash order by id desc LIMIT 0,1 ")or die(mysqli_error());
$row1=mysqli_fetch_array($query1);
$beginko=$row1['ee'];
if($row == 0){
	mysqli_query($con,"INSERT INTO pettycash(date,aa,ee,note) VALUES('$date','$beginko','$beginko','begin')")or die(mysqli_error($con));
}elseif($row > 0){

}
?>



<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Login - <?php include('dist/includes/title.php');?></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.5 -->
    <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
    
    <!-- Font Awesome -->
    <!-- Theme style -->
    <link rel="stylesheet" href="dist/css/AdminLTE.min.css">
    <!-- AdminLTE Skins. Choose a skin from the css/skins
         folder instead of downloading all of them to reduce the load. -->
    <link rel="stylesheet" href="dist/css/skins/_all-skins.min.css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <!-- ADD THE CLASS layout-top-nav TO REMOVE THE SIDEBAR. -->
  <body class="hold-transition login-page" style="margin: 0;
    padding: 0;
    height: 530px;
	
    background: url(logo.jpg) no-repeat;
  background-size: cover;
    background-position: center;
    font-family: sans-serif;">
   
    <div class="login-box" >
      <div class="login-logo" style="color:white;background-color:#D2B48C;" >
	 <center> <b>CITI BUILDERS</b> </center>
        <b>Sales and Quote with Credit Management System</b>
      </div><!-- /.login-logo -->
      <div class="login-box-body" style="background-color:#7FFFD4;">
        <p class="login-box-msg">Sign in to start your session</p>
        <form action="login.php" method="post">
          <div class="form-group has-feedback">
            <input type="text" class="form-control" placeholder="Username" name="username" required>
            <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
          </div>
          <div class="form-group has-feedback">
            <input type="password" class="form-control" placeholder="Password" name="password" required>
            <span class="glyphicon glyphicon-lock form-control-feedback"></span>
          </div>
		  <div class="form-group has-feedback">
           <!-- <select class="form-control select2" style="width:100%" name="branch" required>
                <?php
				include('dist/includes/dbcon.php');

                   //$query3=mysqli_query($con,"select * from branch order by branch_name")or die(mysqli_error($con));
                    //  while($row3=mysqli_fetch_array($query3)){
                ?>
                	<option value="2">CASHIER</option>
                    <option value="1">FRONTDESK ROOF</option>
				
					<option value="3">HARDWARE</option>
					<option value="4">ADMINISTRATOR</option>
                 
                </select> -->
          </div>
          <div class="row">
			<div class="col-xs-6 pull-right">
			  <button type="reset" class="btn btn-block btn-flat">Clear</button>
			  <center><a  href="admin/index.php" class="btn btn-block btn-warning" name = "newko"> Admin</a> </center>
            </div><!-- /.col -->
			<div class="col-xs-6 pull-right">
              <button type="submit" class="btn btn-primary btn-block btn-flat" name="login" default>Sign In</button>
            </div><!-- /.col -->
          </div>
        </form>

        

      </div><!-- /.login-box-body -->
    </div><!-- /.login-box -->
      
           
  
<!-- jQuery 2.1.4 -->
    <script src="plugins/jQuery/jQuery-2.1.4.min.js"></script>
    <!-- Bootstrap 3.3.5 -->
    <script src="bootstrap/js/bootstrap.min.js"></script>
    <!-- SlimScroll -->
    <script src="plugins/slimScroll/jquery.slimscroll.min.js"></script>
    <!-- FastClick -->
    <script src="plugins/fastclick/fastclick.min.js"></script>
    <!-- AdminLTE App -->
    <script src="dist/js/app.min.js"></script>
    <!-- AdminLTE for demo purposes -->
    <script src="dist/js/demo.js"></script>
  </body>
</html>
