<?php
include("../library/inc.connection.php");
include_once "library/inc.library.php";
include_once "library/inc.sesadmin.php";
include_once "library/inc.dataadmin.php";
 $sqlShow = pg_query("SELECT max(mata_pelajaran_id) AS kode FROM tabel_mapel 
  WHERE kelompok IN('S','D')");
  $dataShow = pg_fetch_array($sqlShow);
  $cekKode = $dataShow['kode'];
  if($cekKode==''){$cekKode=999910000;} 
$kodempl=$cekKode+1;

?>
<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-plus'></li> &nbsp;&nbsp; Tambah Data Mata Pelajaran Suplemen Rapor</h3>
			  <div class="box-tools pull-right">
			  <a href='?page=Data-Mapel-Suplemen' target='_self' alt='Tambah Guru' class="btn btn-warning btn-sm"><li class="glyphicon glyphicon-eject"></li> Batal Tambah</a>   
            </div>
            </div>
            <!-- /.box-header -->
            <div class="box-body">
<form action="?page=Mapel-Suplemen-Simpan" method="post" name="frmadd">
<table class="table">
<tr>
    <td width="15%"><b>Kode Mapel</b></td>
    <td width="1%" align="center"><b>:</b></td>
    <td width="84%"><input class="form-control" type='text' name ='txtKode' value="<?php echo $kodempl; ?>" readonly></td>
</tr>

 <tr>
    <td><b>Nama Mapel</b></td>
    <td align="center"><b>:</b></td>
    <td><input class="form-control" type='text' name ='txtMapel' value="">
    <td>
   </tr>
 
  <tr>
    <td><b>Nama Ringkas</b></td>
    <td align="center"><b>:</b></td>
    <td><input class="form-control" type='text' name ='txtringkas' value="">
    <td>
   </tr>
   

 <tr class="bg-info">
 <td colspan="3">
  <div class="box-tools pull-right">  
            <input class="btn btn-success" type='submit' name="btnSave" value='SIMPAN' onclick="jalankanload()">
			</div>
  
  </td>
</tr> 
</table>
</form>
</div><div id="loading" align="center"></div>
          </div>
<!-- Standar Tabel akhir -->
</div>