        <!DOCTYPE html>
        <html lang="en">


        <!-- Mirrored from edumin.dexignlab.com/xhtml/add-departments.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Nov 2020 13:56:15 GMT -->
        <head>
            
            <meta charset="utf-8">
            <meta http-equiv="X-UA-Compatible" content="IE=edge">
            <meta name="viewport" content="width=device-width,initial-scale=1">
            <title>Rizwan </title>
            <!-- Favicon icon -->
            <link rel="icon" type="image/png" sizes="16x16" href="<?php echo base_url();?>assets/images/favicon.png">
            <link rel="stylesheet" href="<?php echo base_url();?>assets/vendor/bootstrap-select/dist/css/bootstrap-select.min.css">
            <link rel="stylesheet" href="<?php echo base_url();?>assets/css/style.css">
            <!-- Pick date -->
            <link rel="stylesheet" href="<?php echo base_url();?>assets/vendor/pickadate/themes/default.css">
            <link rel="stylesheet" href="<?php echo base_url();?>assets/vendor/pickadate/themes/default.date.css">
             <link href="<?php echo base_url();?>assets/vendor/datatables/css/jquery.dataTables.min.css" rel="stylesheet">
            <!-- Custom Stylesheet -->
             

        </head>

        <body>

            <!--*******************
                Preloader start
            ********************-->
                <div id="preloader">
                <div class="sk-three-bounce">
                    <div class="sk-child sk-bounce1"></div>
                    <div class="sk-child sk-bounce2"></div>
                    <div class="sk-child sk-bounce3"></div>
                </div>
            </div>
            <!--*******************
                Preloader end
            ********************-->

            <!--**********************************
                Main wrapper start
            ***********************************-->
            <div id="main-wrapper">

              <?php  $this->load->view('header'); ?>
                
                <!--**********************************
                    Content body start
                ***********************************-->
                <div class="content-body">
                    <!-- row -->
                    <div class="container-fluid">
                            
                        <div class="row page-titles mx-0">
                            <div class="col-sm-6 p-md-0">
                                <div class="welcome-text">
                                    <h4>Daily Sheet : <?php //echo fullname($this->uri->segment(3)); ?></h4>
                                </div>
                            </div>
                            <div class="col-sm-6 p-md-0 justify-content-sm-end mt-2 mt-sm-0 d-flex">
                                <ol class="breadcrumb">
                                    <li class="breadcrumb-item"><a href="index.html">Home</a></li>
                                    <li class="breadcrumb-item active"><a href="javascript:void(0);">Daily Sheet</a></li>
                                    <li class="breadcrumb-item active"><a href="javascript:void(0);">Add Daily Sheet</a></li>
                                </ol>
                            </div>
                        </div>
                        
                        <div class="row">


        <div class="col-12">
            <div class="card">
                <div class="card-header">
                  
           <div class="modal-body">

         <?php echo form_open_multipart(base_url(''),array('class'=>"form-horizontal update_sheet", 'id'=>"update_sheet")); ?>
                    
                        <?php if($this->session->flashdata('sheet_success')){ ?>
                <div class="alert alert-success solid" style='text-align:center;'><?php echo $this->session->flashdata('sheet_success'); ?></div>
            <?php } ?>              

                    <div class="col-xl-12 col-xxl-12 col-sm-12">
                        <div class="card">
                           
                            <div class="card-body">
                               <div id='sheet_success' class='alert alert-success solid' style='display:none;'></div>
                                    <div class="row">
                                        
                                    <input type="hidden" id="id" value="<?php echo $this->uri->segment(3); ?> ">


                                        
                                                <input type="hidden" value="<?php echo date('Y-m-d H:i:s'); ?>" name="modified" id="modified" class="form-control required">
                                           

                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                            <div class="form-group">
                                                <label class="form-label">Status:</label>
                                                    <select name="status" id="status" class="form-control">
                                                        <option value="<?php echo $get_emp_dailysheet[0]['status'] ?>"><?php echo $get_emp_dailysheet[0]['status']; ?></option>
                                                        <option value="1">Present</option>
                                                        <option value="0">Absent</option>
                                                    </select>
                                            </div>
                                        </div>    
                                               
                                            
                                        

                                        <div class="col-lg-6 col-md-6 col-sm-12">
                                            <div class="form-group">
                                                <label class="form-label">Date:</label>
                                               <input type="date" name="date" value="<?php echo $get_emp_dailysheet[0]['date']; ?>" required="required" id="date" placeholder="Date" class="form-control">
                                            </div>
                                        </div>
                                      
                                       
                                        <div class="col-lg-6 col-md-6 col-sm-12">
                                            <div class="form-group">
                                                <label class="form-label">Enter Time:</label>
                                                    <input type="time" value="<?php echo $get_emp_dailysheet[0]['time_in']; ?>" name="time_in" id="time_in" required="required"  class="form-control">
                                            </div>
                                        </div>

                                        

                                        <div class="col-lg-6 col-md-6 col-sm-12">
                                            <div class="form-group">
                                                <label class="form-label">O.T:</label>
                                                    <input type="number" value="<?php echo $get_emp_dailysheet[0]['o_t']; ?>" name="o_t" id="ot" placeholder="Over Time" class="form-control">
                                            </div>
                                        </div>
                                        
                                        <div class="col-lg-6 col-md-6 col-sm-12">
                                            <div class="form-group">
                                                <label class="form-label">Advance:</label>
                                                    <input type="number" name="advance" required="required" id="advance" value="<?php echo $get_emp_dailysheet[0]['advance']; ?>" placeholder="Advance" class="form-control">
                                            </div>
                                        </div>


                                          <div class="col-lg-6 col-md-6 col-sm-12">
                                            <div class="form-group">
                                                <label class="form-label">Out Time:</label>
                                                    <input type="time" name="out_time" id="out_time" required="required" value="<?php echo $get_emp_dailysheet[0]['out_time']; ?>"  class="form-control">
                                            </div>
                                        </div>
                                     </div>
                        </div>
                        </div>
                    </div>
                    <button type="submit" class="btn btn-primary">Submit <i class="icon-arrow-right14 position-right"></i></button>


                </div>
              
                    <?php form_close();?>
           
                                    </div>
                                    
                                </div>
                            </div>
                            
                        </div>
                    </div>
                </div>

              
                <!--**********************************
                    Content body end
                ***********************************-->


                <!--**********************************
                    Footer start
                ***********************************-->
                <div class="footer">
                    <div class="copyright">
                        <p>Copyright © Designed &amp; Developed by  2020</p>
                    </div>
                </div>
                <!--**********************************
                    Footer end
                ***********************************-->

                <!--**********************************
                   Support ticket button start
                ***********************************-->

                <!--**********************************
                   Support ticket button end
                ***********************************-->


            </div>
            <script src="<?php echo base_url();?>assets/js/jjquery.min.js"></script>





           <script type='text/javascript'>
            
                
        var update_sheet = $('#update_sheet');   
    
    update_sheet.on('submit',function(e){

        e.preventDefault();
        
        var update_sheetdata = update_sheet.serialize();
        
        var idemp = $('#id').val();

            $.ajax({
                type:'POST',
                url:'<?php echo base_url('Admin/update_daily_sheet_data/');?>'+idemp,
                data:update_sheetdata,
                dataType:'json',
                success:function(data){
                    console.log('first'+data.status);
                    if(data.status === 'true'){
                        console.log('second'+data.status);
                        $('#Vendor_success').show().html('Update Successfully').hide(3000);
                       setTimeout(function(){location.href="<?php echo base_url('Admin/update_daily_sheet_data/'); ?>"+idemp} , 3000);
                    }else{
                        console.log('third'+data);          
                    }
                },
                error:function(data){console.log(data.responseText);}
            });
       // }
    });
           
            </script>   

               <?php  $this->load->view('footer'); ?>
                
        </body>

        <!-- Mirrored from edumin.dexignlab.com/xhtml/add-departments.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Nov 2020 13:56:15 GMT -->
        </html>