Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php session_start();
- if(isset($_SESSION['username'])){
- include "conn.php";
- $username=$_SESSION['username'];
- ?>
- <link href="print/css/core.css" rel="stylesheet" media="screen" type="text/css" />
- <script src="print/js/jquery-1.6.2.min.js"></script>
- <script src="print/js/jquery.PrintArea.js_4.js"></script>
- <script src="print/js/core.js"></script>
- <a type="submit" href="#" class="print" rel="contentprint"></a>
- <a href="home.php?page=laporan_penilaian_admin" class="balik"></a>
- <div id="contentprint">
- <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
- <tr>
- <th width="4%" class="table-header-repeat line-left minwidth-1"><a href="">Nomor</a></th>
- <th width="12%" class="table-header-repeat line-left minwidth-1"><a href="">Nama Siswa</a></th>
- <th width="10%" class="table-header-repeat line-left minwidth-1"><a href="">NIS</a></th>
- <th width="16%" class="table-header-repeat line-left minwidth-1"><a href="">Nama Guru</a></th>
- <th width="10%" class="table-header-repeat line-left"><a href="">Kelas</a></th>
- <th width="26%" class="table-header-repeat line-left"><a href="">Mata Pelajaran</a></th>
- <th width="9%" class="table-header-options line-left"><a href="">Nilai Angka</a></th>
- <th width="9%" class="table-header-options line-left"><a href="">Nilai Huruf</a></th>
- </tr>
- <?php
- if(isset($_POST['submit'])){
- $id_guru=htmlentities($_POST['id_guru']);
- $id_siswa=htmlentities($_POST['id_siswa']);
- $id_pelajaran=htmlentities($_POST['id_pelajaran']);
- $id_kelas=htmlentities($_POST['id_kelas']);
- if($id_guru!=="0"){
- $filter_guru="and nilai.id_guru='$id_guru'";
- }else{
- $filter_guru="";
- }
- if($id_siswa!=="0"){
- $filter_siswa="and nilai.id_siswa='$id_siswa'";
- }else{
- $filter_siswa="";
- }
- if($id_pelajaran!=="0"){
- $filter_pelajaran="and nilai.id_pelajaran='$id_pelajaran'";
- }else{
- $filter_pelajaran="";
- }
- if($id_kelas!=="0"){
- $filter_kelas="and nilai.id_kelas='$id_kelas'";
- }else{
- $filter_kelas="";
- }
- }else{
- unset($_POST['submit']);
- }
- $view=mysql_query("SELECT nama_siswa, nis, nama_guru, nip, nama_kelas, nama_pelajaran, nilai FROM tbl_nilai nilai, data_siswa siswa, setup_pelajaran pelajaran, setup_kelas kelas, data_guru guru WHERE nilai.id_siswa=siswa.id_siswa and nilai.id_kelas=kelas.id_kelas and nilai.id_pelajaran=pelajaran.id_pelajaran and nilai.id_guru=guru.id_guru $filter_guru $filter_siswa $filter_pelajaran $filter_kelas order by siswa.nama_siswa asc");
- $i = 1;
- while($row=mysql_fetch_array($view)){
- ?>
- <tr>
- <td><?php echo $i;?></td>
- <td><?php echo $row['nama_siswa'];?></td>
- <td><?php echo $row['nis'];?></td>
- <td><?php echo $row['nama_guru'];?></td>
- <td><?php echo $row['nama_kelas'];?></td>
- <td><?php echo $row['nama_pelajaran'];?></td>
- <td><?php echo $row['nilai'];?></td>
- <td><?php $nilaihuruf = $row['nilai'];
- if ( $nilaihuruf >= 85 )
- {
- echo "A";
- }
- elseif ( $nilaihuruf >= 75 )
- {
- echo "B";
- }
- elseif ( $nilaihuruf >= 65 )
- {
- echo "C";
- }
- elseif ( $nilaihuruf >= 55 )
- {
- echo "D";
- }
- else
- {
- echo "E";
- }
- ?></td>
- </tr>
- <?php
- $i++;
- }
- $jumSis = $i-1;
- ?>
- </table>
- <?php
- }else{
- session_destroy();
- header('Location:index.php?status=Silahkan Login');
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement