
<div class="page-content" >
    
    <div class="col-xs-3 col-sm-3"></div>
<div class="row">
    <div class="col-sm-5">
        <div class="widget-box">
                         <?php
                                $message = $this->session->userdata('message');
                                if (!empty($message)) {
                                    ?>
                                    <div class="alert alert-block alert-success">
                                        <h6 class="lighter arial green" style="text-align:center;"><b>
                                                <?php echo $message;
                                                $this->session->unset_userdata('message');
                                                ?>
                                            </b></h6>
                                    </div>  
                                    <?php
                                }
                                $errormessage = $this->session->userdata('errormessage');
                                if (!empty($errormessage)) {
                                    ?>
                                    <div class="alert alert-block alert-danger">
                                        <h6 class="lighter arial red" style="text-align:center;"><b>
                                                <?php echo $errormessage;
                                                $this->session->unset_userdata('errormessage');
                                                ?>
                                            </b></h6>
                                    </div> 
                                    <?php
                                }
                                ?>
            <div class="widget-header">
                <h4 class="widget-title">Edit Income category</h4>
            </div>

            <div class="widget-body">
                <div class="widget-main no-padding">
                    <form action="<?php echo admin_url()?>/incomecategorysetup/update_Category/<?php echo $categoryById['category_id'];?> " method="post">
                        <!-- <legend>Form</legend> -->
                        <fieldset>
                            <label class="col-xs-4 col-sm-4">Income Category </label>
                            <?php echo form_error('data[category_name]', '<div style="color: rgb(255, 0, 0);">', '</div>'); ?>
                            <input type="text" name="data[category_name]" value="<?php echo $categoryById['category_name'];?>" placeholder="Income category" class="col-xs-8 col-sm-8" />
                           
                        </fieldset>

                        <div class="form-actions center">
                            <button type="submit" name="btnUpdate" class="btn btn-sm btn-success">
                                 <i class="ace-icon fa fa-check bigger-110"></i>
                                Update
                                
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div></div></div>


<?php if(!empty($allIncomeCategory)){?>
   <div class="page-content" >                     


                        <div class="row">
                            <div class="col-xs-12">
                                <!-- PAGE CONTENT BEGINS -->
       <?php $adminLebel=$this->session->userdata('admin_level');?>                          

                             

                                <div class="row">
                                    <div class="col-xs-12">
                                        

                                        <div class="clearfix">
                                            <div class="pull-right tableTools-container"></div>
                                        </div>
                                        <div class="table-header">
                                            Income Category
                                        </div>

                                        <!-- div.table-responsive -->

                                        <!-- div.dataTables_borderWrap -->
                                        <div>
                                            <table id="dynamic-table" class="table table-striped table-bordered table-hover">
                                                <thead>
                                                    <tr>
                                                        
                                                        
                                                        <th class="hidden-480">Serial</th>

                                                
                                                        <th class="hidden-480">Category Name</th>

                                                        <th> Action </th>
                                                    </tr>
                                                </thead>

                                                <tbody>
                                                    
                <?php 
                $i=0;
                foreach($allIncomeCategory as $value){?>

                                                    <tr>
                                                        

                                                        
                                                        <td class="hidden-480"><?php echo ++$i;?></td>
                                                        

                                                        <td class="hidden-480">
                                                            <span><?php echo $value['category_name'];?></span>
                                                        </td>

                                                        <td>
                                                            <div class="hidden-sm hidden-xs action-buttons">
                                                                <a class="blue" href="#">
                                                                    <i class="ace-icon fa fa-search-plus bigger-130"></i>
                                                                </a>
                                                                <?php if($adminLebel==1){?>
                                                                <a class="green" href="<?php echo admin_url()?>/incomecategorysetup/edit_Category/<?php echo $value['category_id'];?> ">
                                                                    <i class="ace-icon fa fa-pencil bigger-130"></i>
                                                                </a>

                                                                <a class="red" href="<?php echo admin_url()?>/incomecategorysetup/delete_Category/<?php echo $value['category_id'];?> ">
                                                                    <i class="ace-icon fa fa-trash-o bigger-130"></i>
                                                                </a>
                                                                <?php }?>
                                                            </div>

                                                            
                                                        </td>
                                                    </tr>

                   <?php }?>                             

                                                    
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>

                                
                                </div><!-- PAGE CONTENT ENDS -->
                            </div><!-- /.col -->
                        </div><!-- /.row -->
                    <?php }?>

