Advertisement
21ani

view index mhs

Jan 7th, 2020
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.70 KB | None | 0 0
  1. <div class="container">
  2. <?php if($this->session->flashdata() ):?>
  3. <div style="position:fixed;top:75px;width:65%;left:0;right:0;margin:auto;" id="alertnya">
  4. <div class="col-md-6">
  5. <div class="alert alert-success alert-dismissible fade show" role="alert">
  6.   <strong>Sukses..!</strong> Data Mahasiswa <?= $this->session->flashdata('flash');?>.
  7.   <button type="button" class="close" data-dismiss="alert" aria-label="Close">
  8.     <span aria-hidden="true">&times;</span>
  9.   </button>
  10. </div>
  11. </div>
  12. </div>
  13. <?php endif;?>
  14.  
  15. <div class="row mt-4">
  16. <div class="col-md-6">
  17. <a href="<?= base_url();?>mahasiswa/tambah" class="btn btn-primary">Tambah Data</a>
  18. </div>
  19. </div>
  20.  
  21. <div class="row mt-3">
  22. <div class="col-md-6">
  23. <h3>Daftar Mahasiswa</h3>
  24. <!-- <ul class="list-group">
  25.  samakan dengan variable di mahasiswa control
  26.   <li class="list-group-item"></li>
  27.  
  28. </ul> -->
  29.  
  30. </div>
  31.  
  32. </div>
  33. <table class="table">
  34.       <thead>
  35.         <tr>
  36.             <th>No</th>
  37.             <th>Nama</th>
  38.             <th>Fakultas</th>
  39.             <th>Prodi</th>
  40.             <th>Aksi</th>
  41.         </tr>
  42.       </thead>
  43.       <tbody>
  44.       <?php
  45.       $no=1;
  46.       foreach($mhs as $datafakultas):?>
  47.         <tr>
  48.             <th><?= $no++ ?></th>
  49.            
  50.             <td><?= $datafakultas['nama_mhs']?></td>
  51.            
  52.            
  53.  
  54.            <?php foreach($fakultas as $fak) ?>
  55.            <td><?=$fak['nama_fakultas']?></td>
  56.          
  57.             <td><?=$datafakultas['id_prodi']?></td>            
  58.             <td><button class="btn btn-outline-warning" type="button">Edit</button></td>
  59.          
  60.         </tr>
  61.         <?php endforeach;?>
  62.        
  63.       </tbody>
  64.     </table>
  65.    
  66.  
  67.   </div>
  68.  
  69.  
  70. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement