<script src="<?php echo base_url() ?>bootstrap/js/jquery.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
		<script type='text/javascript' src='jquery.min.js'></script>
		<script type='text/javascript' src='../../../jquery.min.js'></script>
		<link rel="stylesheet" href="<?php echo base_url() ?>bootstrap/css/bootstrap.min.css">
        <link rel="stylesheet" href="<?php echo base_url() ?>bootstrap/css/style.css">
        <link rel="stylesheet" href="<?php echo base_url() ?>bootstrap/ui/jquery-ui.min.css">
        <script src="<?php echo base_url() ?>bootstrap/js/jquery.min.js" type="text/javascript"></script>
        <script src="<?php echo base_url() ?>bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
        <script src="<?php echo base_url() ?>bootstrap/ui/jquery-ui.min.js" type="text/javascript"></script>
        <script src="<?php echo base_url() ?>bootstrap/js/jquery-1.12.4.js" type="text/javascript"></script>
        <script src="<?php echo base_url() ?>bootstrap/js/jquery-ui.js" type="text/javascript"></script>
       <link rel="stylesheet" href="<?php echo base_url() ?>bootstrap/js/jquery-ui.css"></script>
       
       



<h3>SALARY CONTROL </h3>
<div class="box box-solid box-info">
        	<div class="box-header" style="cursor: move;"><h4 class="box-title">Search</h4></div>
            <div class="box-body">
            
            
                
                <form action="<?php echo base_url()?>index.php/SalaryControl/search" method="POST">
                <div class="row">
                
                    <div class="col-md-5">
                
                
                 <table border="0" cellspacing="0" >

<tr><td  align=left  >   

Month<select class="form-control input-sm" name=mm value=''>Select Month</option>
<option value='01'>January</option>
<option value='02'>February</option>
<option value='03'>March</option>
<option value='04'>April</option>
<option value='05'>May</option>
<option value='06'>June</option>
<option value='07'>July</option>
<option value='08'>August</option>
<option value='09'>September</option>
<option value='10'>October</option>
<option value='11'>November</option>
<option value='12'>December</option>
</select>



</td>

<?php /*?><select  type="select" id="fname" name="select[]" class="form-control input-sm" required>   <?php echo'<option value="">Select</option>';
        foreach ($expenseHead->result() as $row) {
            echo'<option value=' . $row->expenseId . '>' . $row->name . '</option>';
        }
        
		?> </select>';<?php */?>


<td  align=left  >   
Year(yyyy)<input type=text class="form-control input-sm" name=yy size=4 value=2017>

</table><br>
                   
                


                    
                    <button type="submit"   id="msearch" name="msearch" value="SEARCH" class="btn btn-primary">
                	<i class="fa fa-search"></i> 
                	</button>
                    
                    </div>
               		</form>		
                    
               
           		
            <div class="box-footer">
            	
           </div> 
       </div>
    </div>
    </div>
    </div>
<?php /*?>     <form action="<?php echo base_url()?>index.php/SalaryControl/data" method="POST">
             <input type="text" name="a"  > 
             <input type="text" name="b"  > 
             <input type="text" name="c"  > 
             <input type="text" name="d"  > 
              <input type="text" name="e"  > 
            
             
                    <button type="submit"   id="addd" name="addd" value="ADDd" class="btn btn-primary">
                	<i class="fa fa-plus"></i> 
                	</button>
   
    </form>	
<?php */?> 
     <div class="col-md-7">  
 
<?php if(isset($_POST['msearch']))
		  	{ 
			if($query->num_rows()>0){
			foreach ($query->result() as $row) {}
			
			?>
            
             <form action="<?php echo base_url()?>index.php/SalaryControl/putData" method="POST">
            
    	<div class="box box-solid box-info">
			<div class="box-header"><h4 class="box-title"></h4></div>
    		<div class="box-body">      	
          	<table width="50%" border="0" cellpadding="0" cellspacing="0"
					data-page-navigation=".pagination" data-page-size="5"
             			class="table table-condensed table-responsive table-bordered footable" >
				<thead>
            		<tr>
  	                 	<th width="5%">SL.No</th>
                       	<th width="10%">Transaction No</th>
               			<th width="10%">Session No</th>
                        <th width="20%">Month</th>
                        <th width="10%">Year</th>
                        
                     
                     	
                  	</tr>
              	</thead>
                <tbody>
                <?php 
                    $i=1; foreach ($query->result() as $row) {   
							
					?>
                    <tr>
                        <td><?php echo $i++; ?></td>
                        <td><input type="text" class="form-control input-sm" name="tno[]" value="<?php echo $row->transactionNo; ?>" readonly="readonly"></td> 
                        <td><input type="text" class="form-control input-sm" name="sno[]" value="<?php echo $row->sessionNo; ?>" readonly="readonly"></td> 
                        <td><input type="text" class="form-control input-sm" name="mm[]" value="<?php if($row->month==1){
							echo "January";} else if($row->month==2){
							echo "February";} else if($row->month==3){
							echo "March";} else if($row->month==4){
							echo "April";} else if($row->month==5){
							echo "May";} else if($row->month==6){
							echo "June";} else if($row->month==7){
							echo "July";} else if($row->month==8){
							echo "August";} else if($row->month==9){
							echo "September";} else if($row->month==10){
							echo "October";} else if($row->month==11){
							echo "November";} else if($row->month==12){
							echo "December";} ?> " / readonly="readonly"> 
                            
                            
                            <input type="hidden" name="mid[]" value="<?php if($row->month==1){
							echo 1;} else if($row->month==2){
							echo 2;} else if($row->month==3){
							echo 3;} else if($row->month==4){
							echo 4;} else if($row->month==5){
							echo 5;} else if($row->month==6){
							echo 6;} else if($row->month==7){
							echo 7;} else if($row->month==8){
							echo 8;} else if($row->month==9){
							echo 9;} else if($row->month==10){
							echo 10;} else if($row->month==11){
							echo 11;} else if($row->month==12){
							echo 12;} ?> " / readonly="readonly"></td>
                         <td><input type="text" class="form-control input-sm" name="yy[]" value="<?php echo $row->year; ?>" /readonly="readonly"> </td>
                       
                       
                <?php }?>
                    </tr>
                         </tbody>   
            </table>
             </div>
              </div>
               </div>
               
             <div class="col-md-5">   
           	<table width="50%" border="0" cellpadding="0" cellspacing="0"
					data-page-navigation=".pagination" data-page-size="5"
             			class="table table-condensed table-responsive table-bordered footable" >
            <thead>
            <tr>
            	   <th width="10%">Approval1</th>
                        <th width="10%">Approval2</th>
                        <th width="10%">Approval3</th>
                        <th width="10%">Approval4</th>
            </tr>
            </thead>
            <tbody>
            <tr>
            	 <td><input type="checkbox" name="ap1" class="form-control input-sm"></td>
                        <td><input type="checkbox" name="ap2" class="form-control input-sm"></td>
                        <td><input type="checkbox" name="ap3" class="form-control input-sm"></td>
                        <td><input type="checkbox" name="ap4" class="form-control input-sm"></td>
             </tr>
            </tbody>
           <tfoot>
                            </tfoot>
                     </table><br>
                      <button type="submit"   id="add" name="add" value="ADD" class="btn btn-primary">
                	<i class="fa fa-plus">SAVE</i> 
                	</button>
                    </div>
                    <?php } else  echo "<span style=color:red;>No Data</span>"; ?> 
                    
                  <?php } ?> 
                        
                   
               		</form>	
			
   			
		
         
                