<div class="data-table-area">
        <div class="container">
            <div class="row">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <div class="data-table-list">
                        <div class="basic-tb-hd">
                            <h2>FAQ</h2>
								<?php if ($this->session->userdata('admin_level') == "Admin"){ ?> <!-- Action Admin -->
					 <a href="<?php echo base_URL(); ?>admin/faq/add"> <i class="btn btn-info"> Tambah Data 	</i></a>
					 <?php } ?>
						 <?php echo $this->session->flashdata("k");?>
                        <div class="table-responsive">
                            <table id="data-table-basic" class="table table-striped">
                                <thead>
                                    <tr>
                                        <th>Nomor</th>
                                        <th>Pertanyaan</th>
                                        <th>Jawaban</th>
									<?php if ($this->session->userdata('admin_level') == "Admin"){ ?> 
                                        <th>Action</th>
                                    <?php } ?> 
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                       <?php 
										if (empty($data)) {
										echo "<tr></tr>";
														} else {
										$no 	= ($this->uri->segment(4) + 1);
										foreach ($data as $b) {
										?> 
										<td><?php  echo $no?></td>
										<td><?php  echo $b->pertanyaan?></td>
									
										 <td><button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" data-isi="<?php  echo $b->jawaban?> ">Lihat Jawaban</button></td>
								<?php if ($this->session->userdata('admin_level') == "Admin"){ ?> 
								<td>  <a href="<?=base_URL()?>admin/faq/edt/<?php echo $b->id?>" </a> <span class="btn btn-success success-icon-notika btn-reco-mg btn-button-mg">edit</span>
									
										<a href="<?=base_URL()?>admin/faq/del/<?php echo $b->id?>" onclick="return confirm('Hapus Data?')" </a> <span class="btn btn-warning warning-icon-notika btn-reco-mg btn-button-mg">delete</span>
									</td>
								<?php } ?> 
									</tr>
                                   <?php 
			$no++;
			}
		}
		?>
                                </tbody>
                                
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
	<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel"> </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
        <form>
          <div class="form-group">
            <label for="recipient-name"   class="form-control-label">Jawaban:</label>
			
            <textarea type="text"  height=800px class="form-control" id="recipient-name" readonly ></textarea>
          </div>
         
        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
       
      </div>
    </div>
  </div>
</div>
	