<?php //print_r($usertype);exit; ?>
    <section class="content-header">
      <h1>
        Translation
      </h1>
      <ol class="breadcrumb">
        <li><a href="<?php echo base_url().'admin';?>"><i class="fa fa-dashboard"></i> Home</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">
            <form action="<?php echo base_url(); ?>admin/language/email_update" method="post">
              <table id="example1" class="table table-bordered table-striped">
                <thead>
                <tr>
                  <th>Code</th>
                  <th>English</th>
                  <?php if(!empty($languages))
                        {
                          foreach ($languages as $value) {
                  ?>
                  <th><?php echo $value['name']; ?></th>
                  <?php
                          }
                        }
                  ?>
                  
                </tr>
                </thead>
                 <?php if(count($translation)>0)
                {?>
                <tbody>
               <?php
                $i=1;
                foreach ($translation as $data) 
                {
                ?>
                <tr>
                    <td><?php echo $data['key']; ?></td>
                    <td><?php echo $data['value']; ?></td>
                    <?php if(!empty($languages))
                        {
                          foreach ($languages as $value) {
                    ?>
                    <?php $text =  getValue('language_values',array('key'=>$data['key'],'lang_id'=>$value['id'])); ?>
                    <td><textarea style="color: #000;" name="text_<?php echo $data['key']; ?>_<?php echo $value['id']; ?>"><?php echo $text['value']; ?></textarea></td>
                    <?php
                            }
                          }
                    ?>
                    
                </tr>

               <?php $i++; } ?>

                </tbody>
                <?php } ?>
                <tfoot>
               
                </tfoot>
              </table>
              <div class="box-footer">

                <input type="submit" class="btn btn-info " value="Update" id="add">

              </div>
            </form>  
              
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </section>
    

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