<?php
ini_set('session.gc_maxlifetime', 30 * 60 * 60 * 60);
session_start();
if ($_SESSION['company'] == "") { 
    exit("Please Login");
}
if ($_SESSION['CURRENT_USER'] == "") { 
    exit("Please Login");
}
?>
 
<!-- Main content -->
<section class="content">

    <div class="box box-primary">
        <div class="box-header with-border">
            <h3 class="box-title">Employee</h3>
            <b style="margin-top: -10px;"><p style="float: right; color: black" id="time"></p></b> 
        </div>

        <form role="form" name ="form1" class="form-horizontal">
            <div class="box-body">
                <br>               
                <div class="form-group">
                    <a onclick="new_inv();" class="btn btn-default btn-sm">
                        <span class="fa fa-user-plus"></span> &nbsp; New
                    </a>

                    <a onclick="save_inv();" class="btn btn-success btn-sm">
                        <span class="fa fa-save"></span> &nbsp; Save
                    </a>

                    <a onclick="NewWindow('employee_search.php', 'mywin', '800', '700', 'yes', 'center');
                            return false" class="btn btn-info  btn-sm">
                        <span class="fa fa-search"></span> &nbsp; Search
                    </a>
                    
                    <a onclick="update_inv();" class="btn btn-warning btn-sm">
                        <span class="fa fa-edit"></span> &nbsp; Update
                    </a> 
                    
                    <a onclick="cancel_inv();" class="btn btn-danger btn-sm">
                            <span class="fa fa-trash"></span> &nbsp; Cancel
                     </a>    
                    

                </div>
                <div id="msg_box"  class="span12 text-center"  ></div>
                <div class="col-sm-3">
                    <input type="text" placeholder="Uniq"  id="uniq" class="form-control hidden input-sm">
                </div>   

                <div class="form-group"></div>
                
                <div class="form-group">  
                	<label class="col-sm-1 control-label talign" for="invno">Ref No</label>
                    <div class="col-sm-3">
                        <input type="text"  class="form-control input-sm"  disabled="" id="refno">
                    </div>
                </div>   

                <div class="form-group">  
                    <label class="col-sm-1 control-label talign" for="invno">Name</label>
                    <div class="col-sm-3">
                        <input type="text"  class="form-control input-sm"     id="name">
                    </div>
                </div>
                
                <div class="form-group">  
                    <label class="col-sm-1 control-label talign" for="invno">Address</label>
                    <div class="col-sm-3">
                        <input type="text"  class="form-control input-sm"   id="add">
                    </div>
                </div>
                
                <div class="form-group">  
                    <label class="col-sm-1 control-label talign" for="invno">Tele No</label>
                    <div class="col-sm-3">
                        <input type="number"  class="form-control input-sm"   id="tel">
                    </div>
                </div>
                
                <div class="form-group">  
                    <label class="col-sm-1 control-label talign" for="invno">Company</label>
                    <div class="col-sm-3">
                       <select id="company" name="company" class="form-control input-sm" >
                           
                           <?php
                             $sql="select * from invpara  ";
                             foreach ($conn->query($sql) as $row) {
                                echo "<option value='" . $row["flag"] . "'>" . $row["flag"] . " - " . $row["COMPANY"] . " - " . $row["COMPANY1"] . "</option>";
                            }
                        ?>

                        </select>
                    </div> 
                </div>
        </form>
    </div>

</section>

<script src="js/employee.js"></script>


<script> 
         new_inv();
                            
</script> 