Advertisement
cdsatrian

#1

Oct 10th, 2013
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.76 KB | None | 0 0
  1. <table width='100%' border='0'>
  2.   <tr bgcolor='#008080'>
  3.     <td><b> -- Nilai Mata Palajaran Produktif RPL --</b></td>
  4.   </tr>
  5.   <tr><td><hr></td></tr>
  6.   <tr><td><a href="javascript:popUp('input/inputnilai.php?kat=<?php echo $_GET['menu'];?>')">Tambah Siswa</a></td></tr>
  7. </table>
  8. <table border='1' width='100%'>
  9.   <tr bgcolor='#008080'>
  10.     <th>No</th>
  11.     <th>NIS</th>
  12.     <th>Nama</th>
  13.     <th>Kelas,<br>Jurusan</th>
  14.     <th>Jumlah<br>Absen</th>
  15.     <th>Nilai Harian</th>
  16.     <th>UTS</th>
  17.     <th>UAS</th>
  18.     <th>Nilai Raport</th>
  19.     <th>Rangking</th>
  20.     <th>aksi</th>
  21.   </tr>
  22. <?php
  23. include "connect.php";
  24. $sql="
  25. SELECT
  26.  a.siswa_nis,
  27.  a.siswa_nama,
  28.  b.kelas_nama,
  29.  c.jurusan_nama,
  30.  d.nilai_harian,
  31.  d.nilai_uts,
  32.  d.nilai_uas,
  33.  (0.75*(d.nilai_uts)+(1.25*(d.nilai_uas))/3) as nilai_raport
  34. FROM
  35.  siswa a
  36.  JOIN kelas b ON a.siswa_kode_kelas=b.kelas_kode
  37.  JOIN jurusan c ON a.siswa_kode_jurusan=c.jurusan_kode
  38.  JOIN nilai d ON a.siswa_nis=d.kode_siswa
  39. ORDER BY
  40.  a.siswa_nis ASC";
  41. $result=mysql_query($sql);
  42. $no=1;
  43. while($record=mysql_fetch_object($result))
  44. {
  45.   echo
  46.       "<tr>
  47.        <td>".$no++."</td>
  48.        <td>"$record->siswa_nis."</td>
  49.        <td>".$record->siswa_nama."</td>
  50.        <td>".$record->kelas_nama.",".$record->jurusan_nama."</td>
  51.        <td>&nbsp;</td>
  52.        <td>".$record->nilai_harian."</td>
  53.        <td>".$record->nilai_uts."</td>
  54.        <td>".$record->nilai_uas."</td>
  55.        <td>".$record->nilai_raport."</td>
  56.        <td>&nbsp;</td>
  57.        <td align='center'>
  58.          <a href=\"javascript:popUp('input/editnilai.php?kat=".$_GET['kat']."&kode=".$record->siswa_nis."')\">
  59.            <img src='gambar/edit.png' title='input nilai'>
  60.          </a>
  61.        </td>
  62.      </tr>";
  63. }
  64. ?>
  65. </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement