<?php include "menu_utama.php";?>
<style>
.tabel{
	font-family:arial;
	font-size:40px;
	color:#600;
}
.besar{
	font-family:arial;
	font-size:80px;
	color:#600;
}
</style>
<?php
 include "koneksi.php";

//Jumlah Data
$query=mysql_query("select * from daf_0");
$jm=mysql_num_rows($query);
$query=mysql_query("SELECT max(no) as maksimal FROM daf_0")or die(mysql_error());
while($hasilmax=mysql_fetch_array($query))
{
$max=$hasilmax['maksimal'];
}	
if(isset($_GET['no_pros'])){$no_db=$_GET['no_pros'];}else{$no_db=$max;};
$pros_0=$no_db-1;
$pros_1=$no_db+1;


?>

<body>

<?php 
 include "koneksi.php";
$cari="SELECT * FROM daf_0 WHERE no='$no_db'";
	$hasil=mysql_query($cari,$konek);
	$data=mysql_fetch_array($hasil);
	//panggil database ke form
	//$noreg=$data['no'];
	$idsekolah=md5($data['sekolah']);
	$idjenjang=md5($data['jenjang']);
	$idversi=md5($data['versi']);
	$jenjang=$data['jenjang'];
	$versi=$data['versi'];
	$sekolah=$data['sekolah'];
	$email=$data['email'];
	$hp=$data['hp'];
	$aplikasi=$data['aplikasi'];
	$tanggal=$data['tanggal'];
	$harga=$data['harga'];
	$token=$data['token'];
	$id_link=$data['id_link'];
	$daf1=$data['daf1'];
	$daf2=$data['daf2'];
	$daf3=$data['daf3'];
	$daf4=$data['daf4'];
	$daf5=$data['daf5'];
	$akt=strtoupper($data['akt']);
	
	$serial=strtoupper($data['daf1'])."-".strtoupper($data['daf2'])."-".strtoupper($data['daf3'])."-".strtoupper($data['daf4'])."-".strtoupper($data['daf5']);

?>
<table width="2000" border="0" cellspacing="2" cellpadding="2" class="tabel">
   <tr height="70">
    <td colspan="3"><h1>PERMOHONAN SERIAL NUMBER APLIKASI AKS</h1></td>
   
  </tr>
   <tr height="70">
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height="70">
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr height="70">
    <td width="140">Nama Lembaga</td>
    <td width="10">:</td>
    <td width="850">&nbsp;<?php echo $sekolah;?></td>
  </tr>
  <tr height="70">
    <td>Jenjang</td>
    <td>:</td>
    <td>&nbsp;<?php echo $jenjang;?></td>
  </tr>
  <tr height="70">
    <td>Jenis Aplikasi</td>
    <td>:</td>
    <td>&nbsp;<?php echo $versi;?></td>
  </tr>
  <tr height="70">
    <td>Harga</td>
    <td>:</td>
    <td>&nbsp;<?php echo number_format($harga,0,",",".");?></td>
  </tr >
  <tr height="70">
    <td>Serial Number</td>
    <td>:</td>
    <td>&nbsp;<?php echo $serial;?></td>
  </tr>
  <tr height="70">
    <td>Kode Aktivasi</td>
    <td>:</td>
    <td>&nbsp;<?php echo $akt;?></td>
  </tr>
  <tr height="70">
    <td>Tanggal</td>
    <td>:</td>
    <td>&nbsp;<?php echo $tanggal;?></td>
  </tr>
  <tr height="70">
    <td>HP</td>
    <td>:</td>
    <td>&nbsp;<?php echo $hp;?></td>
  </tr>
  <tr height="70">
    <td>E-mail</td>
    <td>:</td>
    <td>&nbsp;<?php echo $email;?></td>
  </tr>
  <tr height="70">
    <td valign="top">Link </td>
    <td valign="top">:</td>
    <td align="left" valign="justify">&nbsp;<?php echo "<a href='http://aplikasiaks.com/softg2.php?page=".$id_link."&id=".$token."'>Link Serial</a>";?></td>
  </tr>
  <tr height="70">
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr height="70">
    <td colspan="3" align="left">

 <a href="simpan_lembaga2.php?no=<?php echo $no_db;?>&aksi=1"><button value="back"><b class="tabel besar">PROSES & KIRIM SN</b></BUTTON></a>&nbsp;
</td>
  </tr>
   <tr height="80">
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr height="70">
    <td colspan="3">
      <a href="list.php?no_pros=<?php echo $pros_0;?>&aksi=1"><button value="back"><b class="tabel besar"><< Back</b></BUTTON></a>&nbsp;
      <a href="list.php?no_pros=<?php echo $pros_1;?>&aksi=1"><button value="next"><b class="tabel besar">Next >></b></BUTTON></a>&nbsp;
      <a href="list.php?aksi=1"><button value="RESET"><b class="tabel besar">RESET</b></BUTTON></a>&nbsp;
      <?php echo $no_db;?>
      </td>
  </tr>
</table>

</body>
</html>