<?php
 session_start();
 include "header.php";
 include "sidebar.php";
  if(!isset($_SESSION["userrpp"]))
  {
	header("Location: login.php");
  }
 
 ?>

 
  <main id="main" class="main">

    <div class="pagetitle">
      <nav>
        <ol class="breadcrumb">
          <li class="breadcrumb-item"><a href="index.php">Home</a></li>
          <li class="breadcrumb-item active">Data RPP</li>
        </ol>
      </nav>
    </div><!-- End Page Title -->
  
  <section class="section">
      <div class="row">
        <div class="col-lg-12">
    
		 <div class="card info-card customers-card">
		 <h5 class="card-title">Input Data Rencana Pelaksanaan Pembelajaran Guru</h5>
			   
                 <?php
				 if (isset($_GET['rpp'])) {
					include 'config.php';
					$userid=$_GET['rpp'];
					$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.tglkirim, drpp.tglvalidasi, drpp.catatan,drpp.peta_cp,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);
					$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'];
					$ntglkirim = $res['tglkirim'];
					$ntglvalidasi = $res['tglvalidasi'];
					$nvalidasi = $res['validasi'];
					$nkbc= $res['peta_cp'];
				
				?>	
					
      
             
              <!-- Horizontal Form -->
              <form name="edit" method="post" action="editrppAction.php">
                 <input type="hidden" class="form-control" name="ikoderpp" id="ikoderpp" width="100" value="<?php echo $nkoderpp?>" > 
                 <table border=0 width=50%>
				  <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>	
				  </table>
				  <Table border=1>
				  <tr bgcolor=#6da66a>
					<td  width=20> No </td>
					<td  width=200> Komponen RPP </td>
					<td> Link Bukti (dari Cloud) </td>
				  </tr>
				  <tr bgcolor=#d9d9d9>
					<td> 1 </td>
					<td >Kalender Akademik </td>
					<td> <input type="text" class="form-control" name="ikalender" maxlength="100" size="50" value="<?php echo $nkaldik ?>"></td>
                  </tr>	
				  <tr bgcolor=#d9d9d9>
					<td> 2 </td>
					<td>Rincian Pekan Efektif </td>
					<td> <input type="text" class="form-control" name="irpe" maxlength="100" size="50" value="<?php echo $nrpe ?>"></td>
                  </tr>	
				  <tr bgcolor=#d9d9d9>
					<td> 3 </td>
					<td>Analisis Alokasi Waktu </td>
					<td> <input type="text" class="form-control" name="ianalisis" maxlength="100" size="50" value="<?php echo $nalokasi ?>"></td>
                  </tr>	
				  <tr bgcolor=#d9d9d9>
					<td> 4 </td>
					<td>Capaian Pembelajaran (CP) / Layanan </td>
					<td> <input type="text" class="form-control" name="icp" maxlength="100" size="50" value="<?php echo $ncp ?>"></td>
                  </tr>	
				   <tr bgcolor=#d9d9d9>
					<td> 5 </td>
					<td>TP dan ATP </td>
					<td> <input type="text" class="form-control" name="itp" maxlength="100" size="50" value="<?php echo $natp?>"></td>
                  </tr>	
				   <tr bgcolor=#d9d9d9>
					<td> 6 </td>
					<td>Program Tahunan </td>
					<td> <input type="text" class="form-control" name="iprota" maxlength="100" size="50" value="<?php echo $nprota ?>"></td>
                  </tr>	
				  <tr bgcolor=#d9d9d9>
					<td> 7 </td>
					<td>Program Semester </td>
					<td> <input type="text" class="form-control" name="ipromes" maxlength="100" size="50" value="<?php echo $npromes ?>"></td>
                  </tr>	
				   <tr bgcolor=#d9d9d9>
					<td> 8 </td>
					<td>KKTP / KKM </td>
					<td> <input type="text" class="form-control" name="ikktp" maxlength="100" size="50" value="<?php echo $nkktp  ?>"></td>
                  </tr>	
				  <tr bgcolor=#d9d9d9>
					<td> 9 </td>
					<td>Modul Ajar / RPP </td>
					<td> <input type="text" class="form-control" name="imodul" maxlength="100" size="50" value="<?php echo $nmodulrpp ?>"></td>
                  	</td>
                  </tr>	
				   <tr bgcolor=#d9d9d9>
					<td> 10 </td>
					<td>Pemetaan CP ( KBC & DPL)</td>
					<td> <input type="text" class="form-control" name="ikbc" maxlength="100" size="50" value="<?php echo $nkbc ?>"></td>
                  	</td>
                  </tr>	
				    <tr>
					<td></td>
					<td></td>
					<td><button type="submit" name="updaterppguru" class="btn btn-primary">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Simpan&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</button>
					  </td>
                  </tr>	
				  </table> 
                 
			<?php
				}	
				?>
             

            
           
        </div><!-- End Left side columns -->

       </div>
      </div>
    </section> 
     
<?php
 include "footer.php";
?>
 