<div class="az-content az-content-dashboard">
  <div class="container">
	<div class="az-content-body">
	  <div class="az-content-label mg-b-5">Prestasi</div>
	  <div class="row row-sm mg-b-20">
		<div class="col-lg-2">
		  <p class="mg-b-10">Nama</p>
		</div>
		<div class="col-lg-10">
		  <strong>
			<p>
				: <?php echo $calonsiswa->nama;?>
			</p>
		  </strong>
		</div><!-- col-4 -->
	  </div><!-- row -->
	  <div class="row row-sm mg-b-20">
		<div class="col-lg-2">
		  <p class="mg-b-10">NIK</p>
		</div>
		<div class="col-lg-10">
		  <strong>
			<p>
				: <?php echo $calonsiswa->nik;?>
			</p>
		  </strong>
		</div><!-- col-4 -->
	  </div><!-- row -->
	  <br>
	  <div class="row row-sm mg-b-20">
		<div class="col-lg-12">
		  <a type="submit" class="btn btn-success float-sm-right" href="<?php echo base_url();?>Pendaftaran/addPrestasi">
			<i class="fa fa-plus"></i> Tambah Prestasi
		  </a>
		</div><!-- col-4 -->
	  </div><!-- row --><br>
	  <div class="row row-sm mg-b-20">
		<div class="col-lg-12">
		  <div class="table-responsive">
			<table class="table table-striped mg-b-0">
			  <thead>
				<tr>
				  <th>No</th>
				  <th>Tingkat</th>
				  <th>Juara</th>
				  <th>Nama Kejuaran</th>
				  <th>Tahun</th>
				  <th>Sertifikat</th>
				  <th>Kelola</th>
				</tr>
			  </thead>
			  <tbody>
				<?php
					if($prestasi == NULL)
					{
						?>
						<td colspan="6">Tidak ada data pretasi.</td>
						<?php
					}
					else
					{
						$no = 0;
						foreach($prestasi as $p)
						{
							$no++;
							?>
							<tr>
								<th scope="row"><?php echo $no;?></th>
								<td><?php echo $p['tingkat'];?></td>
								<td><?php echo $p['juara'];?></td>
								<td><?php echo $p['nama_kejuaraan'];?></td>
								<td><?php echo $p['tahun'];?></td>
								<td>
									<a download="Sertifikat <?php echo $calonsiswa->nama." ".$p['nama_kejuaraan'];?>.png" href="<?php echo base_url();?>files/calon_siswa/prestasi/<?php echo $p['sertifikat'];?>" class="btn btn-xs btn-primary">
												<i class="fa fa-download"></i> Download Sertifikat
											</a>
								</td>
								<td>
									<a href="<?php echo base_url();?>Pendaftaran/editPrestasi/<?php echo $p['id_prestasi'];?>" class="btn btn-warning">
										<i class="typcn typcn-edit"></i> Ubah										
									</a>
									<a href="<?php echo base_url();?>Pendaftaran/deletePrestasi/<?php echo $p['id_prestasi'];?>" class="btn btn-danger" onclick="return confirm('Apakah Anda ingin menghapus prestasi ini?');">
										<i class="typcn typcn-trash"></i> Hapus										
									</a>
								</td>
							</tr>
							<?php
						}
					}
				?>
			  </tbody>
			</table>
		  </div><!-- table-responsive -->
		</div><!-- col-4 -->
	  </div><!-- row -->
	  <br>
	  <br>
	  <div class="row row-sm mg-b-20">
		<div class="col-lg-12">
		  <a type="submit" class="btn btn-az-primary float-sm-right" href="<?php echo base_url();?>Pendaftaran/step5" onclick="return confirm('Apakah data Anda sudah benar?\nJika sudah benar, silakan klik OK.\nJika belum, silakan tekan Cancel/Batal, dan perbaiki terlebih dahulu.');">
			Lanjut <i class="fa fa-arrow-right"></i> 
		  </a>
		</div><!-- col-4 -->
	  </div><!-- row -->
	  <p style="color:#ff0000;font-style : italic;font-size:12px;margin:20px 0 00px 0;">Catatan : Lewati jika tidak ada</p>
	</div>
  </div>
</div><!-- az-content -->