
<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">Add Income category</h4>
            </div>

            <div class="widget-body">
                <div class="widget-main no-padding">
                    <form action="<?php echo admin_url()?>/incomecategorysetup/addCategory " 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]" autocomplete="off" value="" placeholder="Income category" class="col-xs-8 col-sm-8" />
                           
                        </fieldset>

                        <div class="form-actions center">
                            <button type="submit" class="btn btn-sm btn-success">
                                 <i class="ace-icon fa fa-check bigger-110"></i>
                                Save
                                
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div></div></div>
<?php if(!empty($allIncomeCategory)){?>
      <div class="page-content" >
    <div class="row col-xs-12 col-sm-12">
<div class="col-xs-12 col-sm-12 widget-container-col">
                                        <div class="widget-box widget-color-blue">
                                            <div class="widget-header">
                                                <h5 class="widget-title bigger lighter">
                                                    <i class="ace-icon fa fa-table"></i>
                                                    Income Category
                                                </h5>

                                                
                                            </div>

                                            <div class="widget-body">
                                                <div class="widget-main no-padding">
                                                    <table class="table table-striped table-bordered table-hover">
                                                        <thead class="thin-border-bottom">
                                                            <tr style="color:red">
                                                                <th>
                                                                    <i ></i>
                                                                    Serial
                                                                </th>

                                                                <th>
                                                                  
                                                                    Category
                                                                </th>
                                                                <th class="hidden-480"> Action</th>
                                                                
                                                            </tr>
                                                        </thead>

                                                        <tbody>
                                  <?php $adminLebel=$this->session->userdata('admin_level');?>                           
                                                <?php $i=0;foreach($allIncomeCategory as $value){ ?>
                                                            <tr>
                                                                <td ><?php echo ++$i ?></td>

                                                                <td>
                                                                    <a href="#"><?php echo $value['category_name'];?></a>
                                                                </td>

                                                                <td class="hidden-480">
                                                                   <div class="hidden-sm hidden-xs action-buttons">
                                                                
                                                                <?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'];?> " onclick="return ConfirmDelete()">
                                                                    <i class="ace-icon fa fa-trash-o bigger-130"></i>
                                                                </a>
                                                                <?php }?>
                                                            </div>
                                                                </td>
                                                                
                                                            </tr>
                                                <?php }?>
                                                        </tbody>
                                                    </table>
                                                </div>
                                            </div>
                                        </div>
                </div><!-- /.span -->
    </div><!-- /.row -->
    </div>
      <?php }?>