<?php 
//print_r($blog_article_details);exit; 
?>
    <section class="content-header">
      <h1>
        Terms
      </h1>
      <ol class="breadcrumb">
        <li><a href="<?php echo base_url().'admin';?>"><i class="fa fa-dashboard"></i> Home</a></li>
        <li><a href="<?php echo base_url('admin/blog_article/terms');?>">Terms</a></li>
        <li class="active">List</li>
      </ol>
    </section>

    <section class="content">
      <div class="row">
        <?php echo $this->utility->showMsg();?>
        <div class="col-xs-12">
          <div class="box">
            <div class="box-header">
              <h3 class="box-title">Management</h3>
              
            </div>
               
            <div></div>
            <!-- /.box-header -->
            <div class="box-body">
              <table id="example1" class="table table-bordered table-striped">
                <thead>
                <tr>
                  <th>#</th>
                  <th>Text</th>
                  <?php if(chkWritePermission('Manage_Terms',$this->session->userdata('admin_id'))!=0 || $this->session->userdata('admin_id')=='19624' ){ ?>
                  <th>Action</th>
                  <?php } ?>
                </tr>
                </thead>
                 <?php if(count($terms)>0)
                {?>
                <tbody>
               <?php
                $i=1;
                foreach ($terms as $data) 
                {
                ?>
                <tr>
                    <td><?php echo $i;?></td>
                    <td><?php echo substr(html_entity_decode($data['text']),0,200); ?></td>
                    <?php if(chkWritePermission('Manage_Terms',$this->session->userdata('admin_id'))!=0 || $this->session->userdata('admin_id')=='19624' ){ ?>
                    <td>
                      <a href="<?php echo base_url();?>admin/blog_article/terms_edit/<?php echo base64_encode($data['id']);?>" title="Edit"><span class="fa fa-pencil-square"></span></a>
                    </td>
                    <?php } ?> 
                </tr>

               <?php $i++; } ?>

                </tbody>
                <?php } ?>
                <tfoot>
               
                </tfoot>
              </table>
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </section>
    

    
<script>
  $(function () {
    $("#example1").DataTable();
  });
</script>