<?php
include("../library/inc.connection.php");
include_once "library/inc.library.php";
include_once "library/inc.sesadmin.php";
include_once "library/inc.dataadmin.php";
?> 
<div class="col-xs-12">
<!-- Standar Tabel awal -->
		<div class="box table-responsive">
            <div class="box-header bg-navy">
              <h3 class="box-title"><li class='glyphicon glyphicon-book'></li> &nbsp;&nbsp; Data Mata Pelajaran Suplemen</h3>
			   <div class="box-tools pull-right">
			  <a href='?page=Tambah-Mapel-Suplemen' target='_self' alt='Tambah KKM' class="btn btn-warning btn-sm"  onclick="jalankanload()"><li class="glyphicon glyphicon-plus"></li> Tambah Mata Pelajaran Suplemen</a> </span>      
            </div>
            </div>
            <!-- /.box-header -->
            <div class="box-body">
<table id="datatabel" class="table table-bordered table-striped table-hover">
<thead>
  <tr class="bg-olive"> 

        <th>No</th>
        <th>Mata Pelajaran</th>
		<th>Ringkas (Singkatan)</th>
       
		 
        <th>Edit</th>
		
        
  </tr>
</thead>

<?php 
    $query=pg_query("SELECT * FROM tabel_mapel WHERE kelompok ='S' order by kelompok ASC,urut_rapor ASC, nm_mapel ASC
      ");
$ni=1;
$counter=1;
while($result=pg_fetch_array($query)){
  $no=$ni++;
  $kelompok=$result['kelompok'];
  $Kode = $result['mata_pelajaran_id'];
    
  echo "<tr>
          <td align='center'>".$no."</td>
          <td align='left'>".$result['nm_mapel']."</td>
		   <td align='left'>".$result['nm_ringkas']."</td>
		          
          <td align='center'><a href='?page=Mapel-Suplemen-Edit&amp;Kode=".$Kode."' target='_self' alt='Edit Data' class='btn btn-warning btn-sm'>Edit</a></td>
           </tr>";

  }
?>



</table>
</div><div id="loading" align="center"></div>
          </div>
<!-- Standar Tabel akhir -->
</div>