<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Cetak Bukti RPP</title>
 </head>
 
  <body>

 <?php 
  include "config.php"; 
  if (isset($_GET['idrpp'])) {
  include 'config.php';
	include "phpqrcode/qrlib.php";
	//hapus gambarqrcode di folder images
	$filesqr    =glob('qrimg/*.png');
	foreach ($filesqr as $fileqr) {
	if (is_file($fileqr))
	unlink($fileqr); // hapus file
	}
	$path = 'qrimg/'; 

	// $ecc stores error correction capability('L') 
	 $ecc = 'L'; 
	 $pixel_Size = 5; 
	 $frame_Size = 2; 
		// Generates QR Code and Stores it in directory given
	    

	$userid=$_GET['idrpp'];
	$result = mysqli_query($mysqli, "SELECT drpp.Idrpp kodeid,tapel.nama nmtapel,tapel.semester, user.madrasah, user.nama nmguru,mapel.nama nmmapel, kelas.nama nmkelas,drpp.kaldik,drpp.rpe,drpp.alokasiwaktu,drpp.cp,drpp.atp,drpp.prota,drpp.promes, drpp.kktp,drpp.modulrpp,drpp.peta_cp,drpp.tglkirim, drpp.tglvalidasi, drpp.catatan,drpp.validasi FROM drpp,tapel,user,mapel,kelas WHERE drpp.Iduser=user.Iduser AND drpp.Idtapel=tapel.Idtapel AND drpp.Idmapel=mapel.Idmapel AND drpp.Idkelas=kelas.Idkelas AND drpp.Idrpp=$userid ORDER BY drpp.Idrpp ASC");
	$res = mysqli_fetch_assoc($result);
	if ($res>=1){
	$nkoderpp = $res['kodeid'];
	$ntapel = $res['nmtapel'];
	$nsemester = $res['semester'];
	$nmadrasah = $res['madrasah'];
	$nguru = $res['nmguru'];
	$nmapel = $res['nmmapel'];
	$nkelas = $res['nmkelas'];
	$nkaldik = $res['kaldik'];
	$nrpe = $res['rpe'];
	$nalokasi = $res['alokasiwaktu'];
	$ncp = $res['cp'];
	$natp = $res['atp'];
	$nprota = $res['prota'];
	$npromes = $res['promes'];
	$nkktp = $res['kktp'];
	$nmodulrpp = $res['modulrpp'];
	$nkbc = $res['peta_cp'];
	$ntglkirim = $res['tglkirim'];
	$ntglvalidasi = $res['tglvalidasi'];
	$nvalidasi = $res['validasi'];
	
	$file = $path."kaldik.png"; 
	QRcode::png($nkaldik, $file, $ecc, $pixel_Size, $frame_Size); 
                    $file = $path."rpe.png"; 
	QRcode::png($nrpe, $file, $ecc, $pixel_Size, $frame_Size); 
	$file = $path."alokasi.png"; 
	QRcode::png($nalokasi, $file, $ecc, $pixel_Size, $frame_Size); 
	$file = $path."cp.png"; 
	QRcode::png($ncp, $file, $ecc, $pixel_Size, $frame_Size); 
	$file = $path."atp.png"; 
	QRcode::png($natp, $file, $ecc, $pixel_Size, $frame_Size); 
	$file = $path."prota.png"; 
	QRcode::png($nprota, $file, $ecc, $pixel_Size, $frame_Size);
	$file = $path."promes.png"; 
	QRcode::png($npromes, $file, $ecc, $pixel_Size, $frame_Size); 
	$file = $path."kktp.png"; 
	QRcode::png($nkktp, $file, $ecc, $pixel_Size, $frame_Size); 
	$file = $path."modul.png"; 
	QRcode::png($nmodulrpp, $file, $ecc, $pixel_Size, $frame_Size); 
	$file = $path."kbc.png"; 
	QRcode::png($nkbc, $file, $ecc, $pixel_Size, $frame_Size); 


  $aa= mysqli_query($mysqli,"SELECT * FROM print");
  $kop= mysqli_fetch_array($aa);
  $kop1=$kop['kop1'];
  $kop2=$kop['kop2'];
  $kop3=$kop['kop3'];
  $kop4=$kop['kop4'];
  $logo="assets/img/".$kop['logo'];
  $kepala=$kop['kepala'];
  $file = $path."kepala.png";
  $text = "merupakan dokumen yang sah dan telah di setujui oleh Kepala Madrasah ".$kepala;
  QRcode::png($text, $file, $ecc, $pixel_Size, $frame_Size);
  
 ?>


<table width="100%" border="0" cellspacing="0" cellpadding="2">
  <tr>
    <td width="14%" rowspan="4"><div align="right"><?php echo "<img src=\"$logo\" height=\"100\">" ?></div></td>
    <td width="86%"><div align="center"><strong><font size="5" ><?php echo $kop1 ?></font><strong></div></td>
  </tr>
  <tr>
    <td><div align="center"><strong><font size="4" ><?php echo $kop2 ?></font><strong></td>
  </tr>
  <tr>
    <td><div align="center"><strong><font size="4" ><?php echo $kop3 ?></font><strong></td>
  </tr>
  <tr>
    <td><div align="center"><font size="2" ><?php echo $kop4 ?></font></div></td>
  </tr>
  
</table>
<HR>
<div align="center"><h4>LEMBAR BUKTI VERIFIKASI ADMINISTRASI PERANGKAT PEMBELAJARAN</h4></div>
<div align="left">
   <table border=0 width=100% >
 <tr>
 <td width=200 >Nama Madrasah </td>
					<td>: <?php echo $nmadrasah; ?> </td>
                  </tr>			  
<tr>
					<td >Nama Guru </td>
					<td>: <?php echo $nguru; ?> </td>
                  </tr>	 <tr>
					<td >Mata Pelajaran </td>
					<td>: <?php echo $nmapel; ?> </td>
                  </tr>	
 <tr>
					<td >Kelas </td>
					<td>: <?php echo $nkelas; ?> </td>
                  </tr>	
 <tr>
					<td >Tahun Pelajaran </td>
					<td>: <?php echo $ntapel; ?> </td>
                  </tr>
 <tr>
					<td >Semester </td>
					<td>: <?php echo $nsemester; ?> </td>
                  </tr>	
 <tr>
					<td >Tanggal Kirim </td>
					<td>: <?php echo $ntglkirim; ?> </td>
                  </tr>	
                 </tr>	
	</table>
<div>
<div align="left">
   <table border=1 width=100% >
	<tr bgcolor=#6da66a align="center">
	<td>Kalender Akademik</td>
	<td>Rincian Pekan Efektif</td>
	<td>Analisis Alokasi Waktu</td>
    </tr>
	<tr align="center">
	<td>
	<?php 
	echo "<img src=\"qrimg/kaldik.png\" width=\"150\" height=\"150\" border=\"0\" >";
	 
	?> 
	</td>
	<td>
	<?php 
	echo "<img src=\"qrimg/rpe.png\" width=\"150\" height=\"150\" border=\"0\" >";		  
	?> 
	</td>
	<td>
	<?php 
	echo "<img src=\"qrimg/alokasi.png\" width=\"150\" height=\"150\" border=\"0\" >";
	?> 
	 </td>
	 </tr>
	 <tr bgcolor=#6da66a align="center">
	<td>CP / Layanan</td>
	<td>TP dan ATP</td>
	<td>KKTP</td>
    </tr>
	<tr align="center">
	<td>
	<?php 
	echo "<img src=\"qrimg/cp.png\" width=\"150\" height=\"150\" border=\"0\" >";
	 
	?> 
	</td>
	<td>
	<?php 
	echo "<img src=\"qrimg/atp.png\" width=\"150\" height=\"150\" border=\"0\" >";		  
	?> 
	</td>
	<td>
	<?php 
	echo "<img src=\"qrimg/kktp.png\" width=\"150\" height=\"150\" border=\"0\" >";
	?> 
	 </td>
	 </tr>
	 <tr bgcolor=#6da66a align="center">
	<td>Program Tahunan</td>
	<td>Program Semester</td>
	<td>Modul Ajar / RPP</td>
    </tr>
	<tr align="center">
	<td>
	<?php 
	echo "<img src=\"qrimg/prota.png\" width=\"150\" height=\"150\" border=\"0\" >";
	 
	?> 
	</td>
	<td>
	<?php 
	echo "<img src=\"qrimg/promes.png\" width=\"150\" height=\"150\" border=\"0\" >";		  
	?> 
	</td>
	<td>
	<?php 
	echo "<img src=\"qrimg/modul.png\" width=\"150\" height=\"150\" border=\"0\" >";
	?> 
	 </td>
	 </tr>
	 <tr bgcolor=#6da66a align="center">
	<td>Pemetaan CP (KBC & DPL) </td>
	<td colspan=2>Pengesahan</td>
	 </tr>
	 <tr align="center">
	<td>
	<?php 
	echo "<img src=\"qrimg/kbc.png\" width=\"150\" height=\"150\" border=\"0\" >";
	 
	?> 
	</td>
	<td colspan=2>
	  <table>
 <tr>
 <td>
 <strong>Telah diverifikasi pada tanggal <?php echo "$ntglvalidasi ";?>  </strong> 
 <br>Mengetahui:<br>Kepala Madrasah,<br>
 <?php 
	echo "<img src=\"qrimg/kepala.png\" width=\"50\" height=\"50\" border=\"0\" alt=\"Bukti Dukung\"><br><strong>$kepala</strong>";
	?> 
	</td>
	</tr>
	</table>
 </div>
	</td>
	
	 </tr>
    </table>
	</div>
 <div align="left"> 

 <?php
	} else {
	echo " Tidak ada data RPP yang disetak ";
	}

  }
 ?>
</body>
</html>


