Advertisement
Dyxsi

raport.php

May 21st, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.06 KB | None | 0 0
  1. <?php
  2. include ("koneksi.php");
  3.  
  4. ini_set( "display_errors", 0);
  5.  
  6. $kata_kunci = $_POST ['kata_kunci'];
  7. $cari=mysql_query("SELECT siswa.NISN, siswa.Nama_Siswa, mata_diklat.nama_mata_diklat, siswa.Kode_KK, nilai.Nilai_huruf
  8. FROM siswa, mata_diklat, nilai
  9. WHERE nilai.NISN = siswa.NISN
  10. AND nilai.Kode_mata_diklat = mata_diklat.Kode_mata_diklat and siswa.NISN like '%$kata_kunci%' ");
  11.  
  12.  
  13. ?>
  14.  
  15. <html>
  16. <head>
  17.     <link href="../css/bootstrap.min.css" rel="stylesheet">
  18.     <link href="../css/bootstrap.css" rel="stylesheet">
  19.     <link href="../css/simple-sidebar.css" rel="stylesheet">
  20.     <link href="../css/adm.css" rel="stylesheet">
  21. </head>
  22.  
  23. <body>
  24.     <form action="raport.php" method="POST">
  25. <table border="1" class="table table-striped" align="center" >
  26.  
  27.     <tr>
  28.     <th colspan = "9"> <center> <h1>Hasil Belajar Mahasiswa</h1> </center>
  29.     <span class="glyphicon glyphicon-search" aria-hidden="true" ></span>
  30.     <input type="text" class = "cari"  name="kata_kunci" placeholder = "Cari berdasarkan NISN"/> </th> </tr>
  31.    
  32.             <tr>
  33.                 <th> <center> No </center></th>
  34.                 <th> <center> NIM </center></th>
  35.                 <th> <center> Nama Mahasiswa  </center> </th>
  36.                 <th> <center> Prodi  </center> </th>
  37.                 <th> <center> Mata Diklat   </center> </th>
  38.                 <th> <center> Grade  </center> </th>
  39.             </tr>
  40.            
  41.             <?php
  42.                 $no=1;
  43.                 while($data = mysql_fetch_array($cari)){
  44.                     ?>
  45.                         <tr>
  46.                             <td> <center> <?php echo $no; ?> </center> </td>
  47.                             <td> <?php echo $data['NISN']; ?> </td>
  48.                             <td> <?php echo $data['Nama_Siswa']; ?> </td>
  49.                             <td> <?php echo $data['Kode_KK']; ?> </td>
  50.                             <td> <?php echo $data['nama_mata_diklat']; ?> </td>
  51.                             <td> <?php echo $data['Nilai_huruf']; ?> </td>             
  52.                             </tr>
  53.                            
  54.                             <?php
  55.                             $no++;
  56.                 }
  57.                 ?>
  58.                
  59.             </table>
  60.  
  61.             <a href = "cetak_raport.php?kata_kunci=<?php echo $kata_kunci ?>" target = "blank" style ="text-decoration : none;">
  62.              <span class="glyphicon glyphicon-download-alt" aria-hidden="true"  style = "margin-left : %;"></span> &nbsp; Cetak ke PDF </a>
  63.  
  64.         </form>
  65.     </body>
  66. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement