
<?php $this->load->view('site/layout');  ?>
  <link href="<?php echo base_url() ?>public/plugins/custom/datatables/datatables.bundle.css" rel="stylesheet" type="text/css" />
  
<link href="<?php echo base_url() ?>public/css/custom_css.css" rel="stylesheet" type="text/css" />
    <?php $this->load->view('site/navbar');  ?>
<div class="kt-content  kt-grid__item kt-grid__item--fluid kt-grid kt-grid--hor" id="kt_content">
            <!-- begin:: Content Head -->
            <div class="kt-subheader  kt-grid__item" id="kt_subheader">
              <div class="kt-container  kt-container--fluid ">
                <div class="kt-subheader__main">
                  <h3 class="kt-subheader__title"><a href="<?php echo base_url() ?>Dashboard/"><?php echo $this->lang->line('dashboard'); ?></a></h3>
                  <span class="kt-subheader__separator kt-subheader__separator--v"></span>
                  <span class="kt-subheader__desc"><?php echo $this->lang->line('data'); ?></span>
                </div>
                
              </div>
            </div>
</div>
        <div class="kt-container  kt-container--fluid  kt-grid__item kt-grid__item--fluid">
              <div class="kt-portlet kt-portlet--mobile">
                <div class="kt-portlet__head kt-portlet__head--lg">
                  <div class="kt-portlet__head-label">
                    <span class="kt-portlet__head-icon">
                      <i class="kt-font-brand flaticon2-line-chart"></i>
                    </span>
                    <h3 class="kt-portlet__head-title">
                      <?php echo $this->lang->line('data'); echo ' '; echo $this->lang->line('list'); ?>
                    </h3>
                  </div> <div class="kt-portlet__head-toolbar">
                    <div class="kt-portlet__head-wrapper">
                      <div class="kt-portlet__head-actions">
                        &nbsp;
                       <a href="<?= base_url()?>/<?=$this->thispage?>/add/" class="btn btn-brand btn-elevate btn-icon-sm">
                          <i class="la la-plus"></i>
                            <?php echo $this->lang->line('add') ?> <?php echo $this->lang->line('data') ?>
                        </a>
                      </div>
                    </div>
                  </div>
                </div>
                <div class="kt-portlet__body">

                  <!--begin: Datatable -->
                  <table class="table table-striped- table-bordered table-hover table-checkable" id="kt_table_1">
                    <thead>
                      <tr>
                        <th><?php echo $this->lang->line('sno') ?></th>
                        <th><?php echo $this->lang->line('english') ?></th>
                        <th><?php echo $this->lang->line('arabic') ?></th>
                        <th><?php echo $this->lang->line('label') ?></th>
                     <th ><?php echo $this->lang->line('edit'); ?></th>
                     <th ><?php echo $this->lang->line('delete'); ?></th>
                      </tr>
                    </thead>
                    <tbody>     <?php $count=1; foreach($result as $row){?>
                
                   <tr>
                  <td><?php echo $count++; ?></td>
                  <td><?php echo $row->english ;?></td>
                  <td><?php echo $row->arabic ;?></td>
                  <td><?php echo $row->lable ;?></td>
                    <td>
                      <a href="<?= base_url(''.$this->thispage.'/edit/'.$row->id)?>" class="btn btn-sm btn-clean btn-icon btn-icon-md" title="Edit details">
                        <i class="la la-edit"></i>
                      </a></td><td>
                      <a href=""  onclick="alert_box(<?php echo $row->id ?>)" class="btn btn-sm btn-clean btn-icon btn-icon-md" title="Delete">
                        <i class="la la-trash"></i>
                      </a>
                      </td> 
                    </tr><?php } ?>
                    </tbody>
                  </table>
                </div>
              </div>
            </div>
  <?php $this->load->view('site/footer'); ?>  

    <script src="<?php echo base_url() ?>public/plugins/global/plugins.bundle.js" type="text/javascript"></script>
    <script src="<?php echo base_url() ?>public/js/scripts.bundle.js" type="text/javascript"></script>      
   

  <script>function alert_box(id) { 
  var result= confirm("Are You Confirm!");
  if(result){
    window.location.href = "<?= base_url(''.$this->thispage.'/delete/')?>" + id;

  }
  
}</script>