addeye

Silacak View Raport

Sep 26th, 2016
45
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. include "koneksi.php";
  3. require "../function.php";
  4. $idn="select * from identitas";
  5. $que=mysql_query($idn,$db);
  6. $i=mysql_fetch_array($que);
  7.  
  8. $edit=$_GET['edit'];
  9. $jur=$_GET['jur'];
  10. $sm=$_GET['sm'];
  11. $thn=$_GET['thn'];
  12.  
  13. $kepsek="select * from kepsek where tahun_ajaran = '$thn' and semester='$sm'";
  14. $que=mysql_query($kepsek,$db);
  15. $k=mysql_fetch_array($que);
  16.  
  17. $quepakademik=mysql_query("SELECT p.*,g.NAMA_GURU,g.NIP,g.`status` FROM pakademik p LEFT JOIN guru g on p.id_guru=g.ID_GURU
  18.  WHERE p.id_akademik='$edit'");
  19. $pak=mysql_fetch_array($quepakademik);
  20.  
  21. $guru_pakademik=$pak['NAMA_GURU'];
  22. if($pak['status']==1){
  23.   $nip_pakademik='';
  24. } else {
  25.   $nip_pakademik='NIP. '.$pak['NIP']; }
  26.  
  27.   $sql_tgl="select * from tgl_raport where semester='$sm' and tahun_ajaran = '$thn'";
  28.   $que_tgl=mysql_query($sql_tgl);
  29.   $t=mysql_fetch_array($que_tgl);
  30.  
  31.   $nam="SELECT w.id_wali_kelas,a.id_akademik, s.NIS,s.NISN, s.NAMA_SISWA
  32.  , s.JENIS_KELAMIN,r.kode_ruang_kelas, r.jurusan,r.kelas
  33.  , a.semester, a.tahun_ajaran , g.NAMA_GURU, g.NIP,g.status
  34.  
  35.  FROM akademik as a, siswa as s, ruang_kelas as r, wali_kelas as w, guru as g
  36.  WHERE a.id_siswa=s.NIS
  37.  and a.id_akademik='$edit'
  38.  and a.id_ruang_kelas=r.id_ruang_kelas
  39.  and a.tahun_ajaran=w.tahun_ajaran
  40.  and w.id_guru=g.ID_GURU
  41.  and a.id_ruang_kelas=w.id_ruang_kelas
  42.  ";
  43.   $vi=mysql_query($nam,$db);
  44.   $ew=mysql_fetch_array($vi);
  45.  
  46.   // $quekkm=mysql_query("SELECT * FROM kkm WHERE kelas='$ew[kelas]'");
  47.   // $km=mysql_fetch_array($quekkm);
  48.   // $kkm=$km['kkm'];
  49.   // $idkkm=$km['idkkm'];
  50.  
  51.   $mu=$ew['id_wali_kelas'];
  52.  
  53.   if($ew['status']!='1'){
  54.     $nip='NIP '.$ew['NIP'];
  55.   }else{
  56.     $nip='';
  57.   }
  58.  
  59.   $kel_a=
  60.   "
  61.  SELECT pel.kode_mapel,pel.nama_mapel, g.ID_GURU,g.NAMA_GURU
  62.  ,t.kd1 as tu1,t.kd2 as tu2,t.kd3 as tu3,t.kd4 as tu4,t.kd5 as tu5
  63.  ,li.kd1 as li1,li.kd2 as li2,li.kd3 as li3,li.kd4 as li4,li.kd5 as li5
  64.  ,tgs.kd1 as tgs1, tgs.kd2 as tgs2, tgs.kd3 as tgs3, tgs.kd4 as tgs4, tgs.kd5 as tgs5
  65.  ,uj.uts, uj.uas
  66.  ,pra.kd1 as pra1, pra.kd2 as pra2, pra.kd3 as pra3, pra.kd4 as pra4, pra.kd5 as pra5
  67.  ,pro.kd1 as pro1, pro.kd2 as pro2, pro.kd3 as pro3, pro.kd4 as pro4, pro.kd5 as pro5
  68.  ,pof.kd1 as por1, pof.kd2 as por2, pof.kd3 as por3, pof.kd4 as por4, pof.kd5 as por5
  69.  ,pos.proses1 as pos1, pos.proses2 as pos2, pos.proses3 as pos3, pos.proses4 as pos4, pos.proses5 as pos5
  70.  
  71.  
  72.  FROM akademik as a INNER JOIN mengajar as m on a.id_ruang_kelas=m.id_ruang_kelas and a.semester=m.semester and a.tahun_ajaran=m.tahun_ajaran
  73.  INNER JOIN siswa as s on a.id_siswa=s.NIS
  74.  INNER JOIN guru as g on m.id_guru=g.ID_GURU
  75.  INNER JOIN mapel as pel on m.kode_mapel=pel.kode_mapel
  76.  LEFT JOIN tes_tulis as t on a.id_akademik=t.id_akademik and m.kode_mapel=t.kode_mapel and t.kode_mapel=pel.kode_mapel
  77.  LEFT JOIN tes_lisan as li on a.id_akademik=li.id_akademik and m.kode_mapel=li.kode_mapel and li.kode_mapel=pel.kode_mapel
  78.  LEFT JOIN tugas as tgs on a.id_akademik=tgs.id_akademik and m.kode_mapel=tgs.kode_mapel and tgs.kode_mapel=pel.kode_mapel
  79.  LEFT JOIN ujian as uj on a.id_akademik=uj.id_akademik and m.kode_mapel=uj.kode_mapel and uj.kode_mapel=pel.kode_mapel
  80.  LEFT JOIN tes_praktik as pra on a.id_akademik=pra.id_akademik and m.kode_mapel=pra.kode_mapel and pra.kode_mapel=pel.kode_mapel
  81.  LEFT JOIN tes_projek as pro on a.id_akademik=pro.id_akademik and m.kode_mapel=pro.kode_mapel and pro.kode_mapel=pel.kode_mapel
  82.  LEFT JOIN tes_portofolio as pof on a.id_akademik=pof.id_akademik and m.kode_mapel=pof.kode_mapel and pof.kode_mapel=pel.kode_mapel
  83.  LEFT JOIN tes_proses as pos on a.id_akademik=pos.id_akademik and m.kode_mapel=pos.kode_mapel and pos.kode_mapel=pel.kode_mapel
  84.  
  85.  WHERE a.id_akademik='$edit'
  86.  and pel.jurusan='UMUM'
  87.  and pel.kelompok='A'
  88.  and m.semester='$sm'
  89.  and m.tahun_ajaran='$thn'
  90.  ORDER BY kode_mapel
  91.  ";
  92.   $que_a=mysql_query($kel_a,$db);
  93.   $disk_a=mysql_query($kel_a,$db);
  94.  
  95.   $kel_b=
  96.   "
  97.  SELECT pel.kode_mapel,pel.nama_mapel, g.ID_GURU,g.NAMA_GURU
  98.  ,t.kd1 as tu1,t.kd2 as tu2,t.kd3 as tu3,t.kd4 as tu4,t.kd5 as tu5
  99.  ,li.kd1 as li1,li.kd2 as li2,li.kd3 as li3,li.kd4 as li4,li.kd5 as li5
  100.  ,tgs.kd1 as tgs1, tgs.kd2 as tgs2, tgs.kd3 as tgs3, tgs.kd4 as tgs4, tgs.kd5 as tgs5
  101.  ,uj.uts, uj.uas
  102.  ,pra.kd1 as pra1, pra.kd2 as pra2, pra.kd3 as pra3, pra.kd4 as pra4, pra.kd5 as pra5
  103.  ,pro.kd1 as pro1, pro.kd2 as pro2, pro.kd3 as pro3, pro.kd4 as pro4, pro.kd5 as pro5
  104.  ,pof.kd1 as por1, pof.kd2 as por2, pof.kd3 as por3, pof.kd4 as por4, pof.kd5 as por5
  105.  ,pos.proses1 as pos1, pos.proses2 as pos2, pos.proses3 as pos3, pos.proses4 as pos4, pos.proses5 as pos5
  106.  
  107.  
  108.  FROM akademik as a INNER JOIN mengajar as m on a.id_ruang_kelas=m.id_ruang_kelas and a.semester=m.semester and a.tahun_ajaran=m.tahun_ajaran
  109.  INNER JOIN siswa as s on a.id_siswa=s.NIS
  110.  INNER JOIN guru as g on m.id_guru=g.ID_GURU
  111.  INNER JOIN mapel as pel on m.kode_mapel=pel.kode_mapel
  112.  LEFT JOIN tes_tulis as t on a.id_akademik=t.id_akademik and m.kode_mapel=t.kode_mapel and t.kode_mapel=pel.kode_mapel
  113.  LEFT JOIN tes_lisan as li on a.id_akademik=li.id_akademik and m.kode_mapel=li.kode_mapel and li.kode_mapel=pel.kode_mapel
  114.  LEFT JOIN tugas as tgs on a.id_akademik=tgs.id_akademik and m.kode_mapel=tgs.kode_mapel and tgs.kode_mapel=pel.kode_mapel
  115.  LEFT JOIN ujian as uj on a.id_akademik=uj.id_akademik and m.kode_mapel=uj.kode_mapel and uj.kode_mapel=pel.kode_mapel
  116.  LEFT JOIN tes_praktik as pra on a.id_akademik=pra.id_akademik and m.kode_mapel=pra.kode_mapel and pra.kode_mapel=pel.kode_mapel
  117.  LEFT JOIN tes_projek as pro on a.id_akademik=pro.id_akademik and m.kode_mapel=pro.kode_mapel and pro.kode_mapel=pel.kode_mapel
  118.  LEFT JOIN tes_portofolio as pof on a.id_akademik=pof.id_akademik and m.kode_mapel=pof.kode_mapel and pof.kode_mapel=pel.kode_mapel
  119.  LEFT JOIN tes_proses as pos on a.id_akademik=pos.id_akademik and m.kode_mapel=pos.kode_mapel and pos.kode_mapel=pel.kode_mapel
  120.  
  121.  WHERE a.id_akademik='$edit'
  122.  and pel.jurusan='UMUM'
  123.  and pel.kelompok='B'
  124.  and m.semester='$sm'
  125.  and m.tahun_ajaran='$thn'
  126.  ORDER BY kode_mapel
  127.  
  128.  ";
  129.   $que_b=mysql_query($kel_b,$db);
  130.   $disk_b=mysql_query($kel_b,$db);
  131.  
  132.   $kel_c="
  133.  
  134.  SELECT pel.kode_mapel,pel.nama_mapel, g.ID_GURU,g.NAMA_GURU
  135.  ,t.kd1 as tu1,t.kd2 as tu2,t.kd3 as tu3,t.kd4 as tu4,t.kd5 as tu5
  136.  ,li.kd1 as li1,li.kd2 as li2,li.kd3 as li3,li.kd4 as li4,li.kd5 as li5
  137.  ,tgs.kd1 as tgs1, tgs.kd2 as tgs2, tgs.kd3 as tgs3, tgs.kd4 as tgs4, tgs.kd5 as tgs5
  138.  ,uj.uts, uj.uas
  139.  ,pra.kd1 as pra1, pra.kd2 as pra2, pra.kd3 as pra3, pra.kd4 as pra4, pra.kd5 as pra5
  140.  ,pro.kd1 as pro1, pro.kd2 as pro2, pro.kd3 as pro3, pro.kd4 as pro4, pro.kd5 as pro5
  141.  ,pof.kd1 as por1, pof.kd2 as por2, pof.kd3 as por3, pof.kd4 as por4, pof.kd5 as por5
  142.  ,pos.proses1 as pos1, pos.proses2 as pos2, pos.proses3 as pos3, pos.proses4 as pos4, pos.proses5 as pos5
  143.  
  144.  
  145.  FROM akademik as a INNER JOIN mengajar as m on a.id_ruang_kelas=m.id_ruang_kelas and a.semester=m.semester and a.tahun_ajaran=m.tahun_ajaran
  146.  INNER JOIN siswa as s on a.id_siswa=s.NIS
  147.  INNER JOIN guru as g on m.id_guru=g.ID_GURU
  148.  INNER JOIN mapel as pel on m.kode_mapel=pel.kode_mapel
  149.  LEFT JOIN tes_tulis as t on a.id_akademik=t.id_akademik and m.kode_mapel=t.kode_mapel and t.kode_mapel=pel.kode_mapel
  150.  LEFT JOIN tes_lisan as li on a.id_akademik=li.id_akademik and m.kode_mapel=li.kode_mapel and li.kode_mapel=pel.kode_mapel
  151.  LEFT JOIN tugas as tgs on a.id_akademik=tgs.id_akademik and m.kode_mapel=tgs.kode_mapel and tgs.kode_mapel=pel.kode_mapel
  152.  LEFT JOIN ujian as uj on a.id_akademik=uj.id_akademik and m.kode_mapel=uj.kode_mapel and uj.kode_mapel=pel.kode_mapel
  153.  LEFT JOIN tes_praktik as pra on a.id_akademik=pra.id_akademik and m.kode_mapel=pra.kode_mapel and pra.kode_mapel=pel.kode_mapel
  154.  LEFT JOIN tes_projek as pro on a.id_akademik=pro.id_akademik and m.kode_mapel=pro.kode_mapel and pro.kode_mapel=pel.kode_mapel
  155.  LEFT JOIN tes_portofolio as pof on a.id_akademik=pof.id_akademik and m.kode_mapel=pof.kode_mapel and pof.kode_mapel=pel.kode_mapel
  156.  LEFT JOIN tes_proses as pos on a.id_akademik=pos.id_akademik and m.kode_mapel=pos.kode_mapel and pos.kode_mapel=pel.kode_mapel
  157.  
  158.  WHERE a.id_akademik='$edit'
  159.  and pel.jurusan='$jur'
  160.  and m.semester='$sm'
  161.  and m.tahun_ajaran='$thn'
  162.  ORDER BY kode_mapel
  163.  
  164.  ";
  165.   $que_c=mysql_query($kel_c,$db);
  166.   $disk_c=mysql_query($kel_c,$db);
  167.  
  168.   $kel_d="
  169.  SELECT pel.kode_mapel,pel.nama_mapel, g.ID_GURU,g.NAMA_GURU
  170.  ,t.kd1 as tu1,t.kd2 as tu2,t.kd3 as tu3,t.kd4 as tu4,t.kd5 as tu5
  171.  ,li.kd1 as li1,li.kd2 as li2,li.kd3 as li3,li.kd4 as li4,li.kd5 as li5
  172.  ,tgs.kd1 as tgs1, tgs.kd2 as tgs2, tgs.kd3 as tgs3, tgs.kd4 as tgs4, tgs.kd5 as tgs5
  173.  ,uj.uts, uj.uas
  174.  ,pra.kd1 as pra1, pra.kd2 as pra2, pra.kd3 as pra3, pra.kd4 as pra4, pra.kd5 as pra5
  175.  ,pro.kd1 as pro1, pro.kd2 as pro2, pro.kd3 as pro3, pro.kd4 as pro4, pro.kd5 as pro5
  176.  ,pof.kd1 as por1, pof.kd2 as por2, pof.kd3 as por3, pof.kd4 as por4, pof.kd5 as por5
  177.  ,pos.proses1 as pos1, pos.proses2 as pos2, pos.proses3 as pos3, pos.proses4 as pos4, pos.proses5 as pos5
  178.  
  179.  
  180.  FROM akademik as a INNER JOIN mengajar as m on a.id_ruang_kelas=m.id_ruang_kelas and a.semester=m.semester and a.tahun_ajaran=m.tahun_ajaran
  181.  INNER JOIN siswa as s on a.id_siswa=s.NIS
  182.  INNER JOIN guru as g on m.id_guru=g.ID_GURU
  183.  INNER JOIN mapel as pel on m.kode_mapel=pel.kode_mapel
  184.  LEFT JOIN tes_tulis as t on a.id_akademik=t.id_akademik and m.kode_mapel=t.kode_mapel and t.kode_mapel=pel.kode_mapel
  185.  LEFT JOIN tes_lisan as li on a.id_akademik=li.id_akademik and m.kode_mapel=li.kode_mapel and li.kode_mapel=pel.kode_mapel
  186.  LEFT JOIN tugas as tgs on a.id_akademik=tgs.id_akademik and m.kode_mapel=tgs.kode_mapel and tgs.kode_mapel=pel.kode_mapel
  187.  LEFT JOIN ujian as uj on a.id_akademik=uj.id_akademik and m.kode_mapel=uj.kode_mapel and uj.kode_mapel=pel.kode_mapel
  188.  LEFT JOIN tes_praktik as pra on a.id_akademik=pra.id_akademik and m.kode_mapel=pra.kode_mapel and pra.kode_mapel=pel.kode_mapel
  189.  LEFT JOIN tes_projek as pro on a.id_akademik=pro.id_akademik and m.kode_mapel=pro.kode_mapel and pro.kode_mapel=pel.kode_mapel
  190.  LEFT JOIN tes_portofolio as pof on a.id_akademik=pof.id_akademik and m.kode_mapel=pof.kode_mapel and pof.kode_mapel=pel.kode_mapel
  191.  LEFT JOIN tes_proses as pos on a.id_akademik=pos.id_akademik and m.kode_mapel=pos.kode_mapel and pos.kode_mapel=pel.kode_mapel
  192.  
  193.  WHERE a.id_akademik='$edit'
  194.  and pel.jurusan!='$jur'
  195.  and pel.lintas_peminatan=1
  196.  and m.semester='$sm'
  197.  and m.tahun_ajaran='$thn'
  198.  ORDER BY kode_mapel
  199.  
  200.  ";
  201.   $que_d=mysql_query($kel_d,$db);
  202.   $disk_d=mysql_query($kel_d,$db);
  203.  
  204.   $eks="SELECT e.nama_ekskul, n.nilai, n.keterangan
  205.  FROM nilai_eks as n, akademik as a, siswa as s, ekskul as e
  206.  WHERE n.id_akademik=a.id_akademik
  207.  and n.id_ekskul=e.id_ekskul
  208.  and a.id_siswa=s.NIS
  209.  and a.id_akademik='$edit'";
  210.  
  211.   $que_eks=mysql_query($eks,$db);
  212.  
  213.   $hadir="SELECT k.sakit, k.izin, k.tanpa_keterangan
  214.  FROM kehadiran as k, akademik as a, siswa as s
  215.  WHERE k.id_akademik=a.id_akademik
  216.  and a.id_siswa=s.NIS
  217.  and a.id_akademik='$edit'";
  218.  
  219.   $que_hadir=mysql_query($hadir,$db);
  220.  
  221.   $kel_e=
  222.   "
  223.  SELECT pel.kode_mapel,pel.nama_mapel, g.ID_GURU,g.NAMA_GURU
  224.  ,t.kd1 as tu1,t.kd2 as tu2,t.kd3 as tu3,t.kd4 as tu4,t.kd5 as tu5
  225.  ,li.kd1 as li1,li.kd2 as li2,li.kd3 as li3,li.kd4 as li4,li.kd5 as li5
  226.  ,tgs.kd1 as tgs1, tgs.kd2 as tgs2, tgs.kd3 as tgs3, tgs.kd4 as tgs4, tgs.kd5 as tgs5
  227.  ,uj.uts, uj.uas
  228.  ,pra.kd1 as pra1, pra.kd2 as pra2, pra.kd3 as pra3, pra.kd4 as pra4, pra.kd5 as pra5
  229.  ,pro.kd1 as pro1, pro.kd2 as pro2, pro.kd3 as pro3, pro.kd4 as pro4, pro.kd5 as pro5
  230.  ,pof.kd1 as por1, pof.kd2 as por2, pof.kd3 as por3, pof.kd4 as por4, pof.kd5 as por5
  231.  ,pos.proses1 as pos1, pos.proses2 as pos2, pos.proses3 as pos3, pos.proses4 as pos4, pos.proses5 as pos5
  232.  
  233.  FROM akademik as a INNER JOIN mengajar as m on a.id_ruang_kelas=m.id_ruang_kelas and a.semester=m.semester and a.tahun_ajaran=m.tahun_ajaran
  234.  INNER JOIN siswa as s on a.id_siswa=s.NIS
  235.  INNER JOIN guru as g on m.id_guru=g.ID_GURU
  236.  INNER JOIN mapel as pel on m.kode_mapel=pel.kode_mapel
  237.  LEFT JOIN tes_tulis as t on a.id_akademik=t.id_akademik and m.kode_mapel=t.kode_mapel and t.kode_mapel=pel.kode_mapel
  238.  LEFT JOIN tes_lisan as li on a.id_akademik=li.id_akademik and m.kode_mapel=li.kode_mapel and li.kode_mapel=pel.kode_mapel
  239.  LEFT JOIN tugas as tgs on a.id_akademik=tgs.id_akademik and m.kode_mapel=tgs.kode_mapel and tgs.kode_mapel=pel.kode_mapel
  240.  LEFT JOIN ujian as uj on a.id_akademik=uj.id_akademik and m.kode_mapel=uj.kode_mapel and uj.kode_mapel=pel.kode_mapel
  241.  LEFT JOIN tes_praktik as pra on a.id_akademik=pra.id_akademik and m.kode_mapel=pra.kode_mapel and pra.kode_mapel=pel.kode_mapel
  242.  LEFT JOIN tes_projek as pro on a.id_akademik=pro.id_akademik and m.kode_mapel=pro.kode_mapel and pro.kode_mapel=pel.kode_mapel
  243.  LEFT JOIN tes_portofolio as pof on a.id_akademik=pof.id_akademik and m.kode_mapel=pof.kode_mapel and pof.kode_mapel=pel.kode_mapel
  244.  LEFT JOIN tes_proses as pos on a.id_akademik=pos.id_akademik and m.kode_mapel=pos.kode_mapel and pos.kode_mapel=pel.kode_mapel
  245.  
  246.  WHERE a.id_akademik='$edit'
  247.  and pel.jurusan='UMUM'
  248.  and pel.kelompok='D'
  249.  and m.semester='$sm'
  250.  and m.tahun_ajaran='$thn'
  251.  ORDER BY kode_mapel
  252.  ";
  253.   $que_e=mysql_query($kel_e,$db);
  254.   $disk_e=mysql_query($kel_e,$db);
  255.   // $sub_bebanjp= array();
  256.   // $sub_nxb=array();
  257.  
  258. //   $tkkm = mysql_query("SELECT * FROM kkm
  259. // WHERE semester='$semester_aktif'
  260. // and tahun_ajaran='$tahun_aktif'");
  261.  
  262.   $sppredikat = mysql_query("SELECT nilai FROM spiritual_nilai
  263.    WHERE id_akademik='$edit'");
  264.   $spval = array();
  265.   while($spvals = mysql_fetch_array($sppredikat))
  266.   {
  267.     $spval[] = $spvals['nilai'];
  268.   }
  269.   $valsp = mmmr($spval, 'mode');
  270.  
  271.   $diskSp1 = predikatdiskripsi($valsp);
  272.  
  273.   $soval = array();
  274.   $sopredikat = mysql_query("SELECT nilai FROM sosial_nilai
  275.    WHERE id_akademik='$edit'");
  276.   while($sovals = mysql_fetch_array($sopredikat))
  277.   {
  278.     $soval[] = $sovals['nilai'];
  279.   }
  280.   $valso = mmmr($soval, 'mode');
  281.   $diskSo1 = predikatdiskripsi($valso);
  282.  
  283.   $diskripsiSp = mysql_query("SELECT sn.*,pd.diskripsi predisk,sd.diskripsi FROM spiritual_nilai sn
  284.    LEFT JOIN predikat_diskripsi pd on sn.nilai=pd.predikat
  285.    LEFT JOIN spiritual_diskripsi sd ON sn.id_spiritual=sd.id
  286.    WHERE sn.id_akademik='$edit'");
  287.  
  288.   $diskripsiSo = mysql_query("SELECT sn.*,pd.diskripsi predisk,sd.diskripsi FROM sosial_nilai sn
  289.    LEFT JOIN predikat_diskripsi pd on sn.nilai=pd.predikat
  290.    LEFT JOIN sosial_diskripsi sd ON sn.id_sosial=sd.id
  291.    WHERE sn.id_akademik='$edit'");
  292.  
  293. /*  $diskripsiraportSp = "Secara Umum Sikap Spiritual Pesera Didik ".$diskSp1.". ";
  294.  
  295.   while($diskSp = mysql_fetch_array($diskripsiSp))
  296.   {
  297.     $diskripsiraportSp .= $diskSp['predisk']." dalam ".$diskSp['diskripsi']." ";
  298.   }
  299.  
  300.   $diskripsiraportSo = "Secara Umum Sikap Sosial Peserta Didik ".$diskSo1.". ";
  301.   while($diskSo = mysql_fetch_array($diskripsiSo))
  302.   {
  303.     $diskripsiraportSo .= $diskSo['predisk']." dalam ".$diskSo['diskripsi']." ";
  304.   }*/
  305.  
  306.  
  307.   $diskripsiraportSp = "Selalu ";
  308.  
  309.   while($diskSp = mysql_fetch_array($diskripsiSp))
  310.   {
  311.     $diskripsiraportSp .= "".$diskSp['diskripsi']." ";
  312.   }
  313.  
  314.   $diskripsiraportSo = "Sikap Sosial Peserta Didik ".$diskSo1." dalam ";
  315.   while($diskSo = mysql_fetch_array($diskripsiSo))
  316.   {
  317.     $diskripsiraportSo .= "".$diskSo['diskripsi']." ";
  318.   }
  319.  
  320.  
  321.   $datanilaip=array();
  322.   $datanilaik=array();
  323.  
  324.  
  325.   ?>
  326.  
  327.  
  328.   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  329.   <html xmlns="http://www.w3.org/1999/xhtml">
  330.   <head>
  331.     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  332.     <LINK rel="stylesheet" type"text/css" href="../print.css" media="print">
  333.       <title>SILACAK Capaian <?=$ew['NIS']?> <?=$ew['NAMA_SISWA']?></title>
  334.       <style type="text/css">
  335.         .right_content table {
  336.          text-align: center;
  337.          width:900px;
  338.          font-size:15px;
  339.        }
  340.        .right_content .kiri {
  341.  
  342.          text-align:left;
  343.          padding:3px;}
  344.          .vtop{vertical-align: top;}
  345.          .style2 {font-size: 12; }
  346.        </style>
  347.        <script type="text/javascript">
  348.         function printPage() { print(document); }
  349.       </script>
  350.     </head>
  351.  
  352.     <body>
  353.      <div align="center" style="width:auto;" class="right_content">
  354.        <div id="header" align="center">
  355.         <!--<img src="../img/kopsma.PNG" width="900" height="130" />-->
  356.       </div>
  357.       <table width="529" class="kiri">
  358.         <tr>
  359.           <td>Nama Madrasah </td>
  360.           <td>:</td>
  361.           <td><?=$i['nama_sekolah']?></td>
  362.           <td>&nbsp;</td>
  363.           <td>Kelas</td>
  364.           <td>:</td>
  365.           <td><?=$ew['kode_ruang_kelas']?></td>
  366.         </tr>
  367.         <tr>
  368.           <td>Alamat</td>
  369.           <td>:</td>
  370.           <td><?=$i['alamat_sekolah']?></td>
  371.           <td>&nbsp;</td>
  372.           <td>Semester</td>
  373.           <td>:</td>
  374.           <td><?=$ew['semester']?> <?=nomor($ew['semester'])?></td>
  375.         </tr>
  376.         <tr>
  377.           <td>Nama Peserta Didik</td>
  378.           <td>:</td>
  379.           <td><?=$ew['NAMA_SISWA']?></td>
  380.           <td>&nbsp;</td>
  381.           <td>Tahun Pelajaran</td>
  382.           <td>:</td>
  383.           <td><?=$ew['tahun_ajaran']?></td>
  384.         </tr>
  385.         <tr>
  386.           <td>Nomor Induk/NISN</td>
  387.           <td>:</td>
  388.           <td><?=$ew['NIS']?>/<?=$ew['NISN']?></td>
  389.           <td>&nbsp;</td>
  390.           <td>&nbsp;</td>
  391.           <td>&nbsp;</td>
  392.           <td>&nbsp;</td>
  393.         </tr>
  394.         <tr>
  395.           <td>&nbsp;</td>
  396.           <td>&nbsp;</td>
  397.           <td>&nbsp;</td>
  398.           <td>&nbsp;</td>
  399.           <td>&nbsp;</td>
  400.           <td>&nbsp;</td>
  401.           <td>&nbsp;</td>
  402.         </tr>
  403.         <tr>
  404.           <td></td>
  405.           <td>&nbsp;</td>
  406.           <td>&nbsp;</td>
  407.           <td>&nbsp;</td>
  408.           <td colspan="3"><div id="atas"><img align="right" onClick="printPage()" style="cursor:pointer;" title="Klik Untuk Mencetak Halaman" src="../img/PRINTER.PNG" alt="printer" width="20" height="20" /></div></td>
  409.         </tr>
  410.       </table>
  411.       <table width="529" border="0" cellspacing="0" cellpadding="3">
  412.         <tr><td><b>CAPAIAN HASIL BELAJAR</b></td></tr>
  413.         <tr>
  414.           <td align="left"><b>A. Sikap</b></td>
  415.         </tr>
  416.         <tr>
  417.           <td align="left"><b>1. Sikap Spiritual</b></td>
  418.         </tr>
  419.         <tr>
  420.           <td>
  421.             <table border="1" cellpadding="5" cellspacing="0">
  422.               <tr class="kiri">
  423.                 <td><div align="center">Predikat</div></td>
  424.                 <td><div align="center">Deskripsi</div></td>
  425.               </tr>
  426.               <tr class="vtop" height="90">
  427.                 <td width="100"><?=$valsp?></td>
  428.                 <td class="kiri"><div align="justify">
  429.                   <?=$diskripsiraportSp?>
  430.                 </div></td>
  431.               </tr>
  432.             </table>
  433.           </td>
  434.         </tr>
  435.         <tr>
  436.           <td align="left"><b>2. Sikap Sosial</b></td>
  437.         </tr>
  438.         <tr>
  439.           <td>
  440.             <table border="1" cellpadding="5" cellspacing="0">
  441.               <tr class="kiri">
  442.                 <td><div align="center">Predikat</div></td>
  443.                 <td><div align="center">Deskripsi</div></td>
  444.               </tr>
  445.               <tr class="vtop" height="25">
  446.                 <td width="100"><?=$valso?></td>
  447.                 <td class="kiri"><div align="justify">
  448.                   <?=$diskripsiraportSo?>
  449.                 </div></td>
  450.               </tr>
  451.             </table>
  452.           </td>
  453.         </tr>
  454.       </table>
  455.       <br>  
  456.       <table width="529" border="0" cellpadding="3" cellspacing="0">
  457.         <tr>
  458.           <td align="left"><label><b>B. Pengetahuan dan Keterampilan</b></label></td>
  459.         </tr>
  460.       </table>
  461.       <table width="529" border="1" cellpadding="0" cellspacing="0">
  462.         <tr>
  463.           <th colspan="2" rowspan="2">Mata Pelajaran</th>
  464.           <th rowspan="2">KKM</th>
  465.           <!-- <th rowspan="2">Beban<br>/JP<br>(B)</th> -->
  466.           <th colspan="2">Pengetahuan</th>
  467.           <th colspan="2">Ketrampilan</th>
  468.           <!-- <th rowspan="2">Rata-<br>rata<br>(N)</th> -->
  469.           <!-- <th rowspan="2">NxB</th> -->
  470.         </tr>
  471.         <tr>
  472.           <th>Angka</th>
  473.           <th>Predikat</th>
  474.           <th>Angka</th>
  475.           <th>Predikat</th>
  476.         </tr>
  477.         <?php
  478.         $mu=$ew['id_wali_kelas'];
  479.         $map="SELECT m.diskripsi, m.tahun_ajaran, g.NAMA_GURU, g.NIP, w.id_wali_kelas, r.kode_ruang_kelas from diskripsi_m as m, wali_kelas as w, guru as g, ruang_kelas as r
  480.        WHERE m.id_wali_kelas=w.id_wali_kelas
  481.        and g.ID_GURU=w.id_guru
  482.        and r.id_ruang_kelas=w.id_ruang_kelas
  483.        and w.id_wali_kelas='$mu'
  484.        "
  485.         ;
  486.         $ant=mysql_query($map,$db);
  487.         $anpel=mysql_fetch_array($ant);
  488.         ?>
  489.         <tr>
  490.           <th class="kiri" colspan="8">Kelompok A (Wajib)</td>
  491.           </tr>
  492.           <tr>
  493.            <td>1</td>
  494.            <th class="kiri" colspan="7">Pendidikan Agama dan Budi Pekerti</td>
  495.            </tr>
  496.            <?php
  497.            $no=2;
  498.            $c=0;
  499.            $abc = 1;
  500.            while ($n=mysql_fetch_array($que_a)){
  501. //proses nilai Pengetahuan    
  502.             $qutestulis = mysql_query("SELECT * FROM tes_tulis_n
  503.              WHERE id_akademik='$edit'
  504.              and kode_mapel='$n[kode_mapel]'");
  505.             while( $row = mysql_fetch_assoc( $qutestulis))
  506.             {
  507.               $datanilaip[] = $row['nilai']; // Inside while loop
  508.             }
  509.  
  510.             $quteslisan = mysql_query("SELECT * FROM tes_lisan_n
  511.              WHERE id_akademik='$edit'
  512.              and kode_mapel='$n[kode_mapel]'");
  513.             while( $row = mysql_fetch_assoc( $quteslisan))
  514.             {
  515.               $datanilaip[] = $row['nilai']; // Inside while loop
  516.             }
  517.  
  518.             $qutestugas = mysql_query("SELECT * FROM tes_tugas_n
  519.              WHERE id_akademik='$edit'
  520.              and kode_mapel='$n[kode_mapel]'");
  521.             while( $row = mysql_fetch_assoc( $qutestugas))
  522.             {
  523.               $datanilaip[] = $row['nilai']; // Inside while loop
  524.             }
  525.  
  526.  
  527.             $rat_peng = mmmr($datanilaip);
  528.  
  529.             if(empty($rat_peng))
  530.             {
  531.               $rat_peng=0;
  532.             }
  533.  
  534.             // return var_dump($rat_peng);
  535.  
  536.             // $rat_peng=rata($n['tu1'],$n['tu2'],$n['tu3'],$n['tu4'],$n['tu5']
  537.             //   ,$n['li1'],$n['li2'],$n['li3'],$n['li4'],$n['li5'],
  538.             //   $n['tgs1'],$n['tgs2'],$n['tgs3'],$n['tgs4'],$n['tgs5']);
  539.  
  540.             $konv_peng=konversi_100($rat_peng,$n['uts'],$n['uas']);
  541.   //end poses nilai
  542.  
  543.   //proses nilai ketrampilan
  544.             // $rat_praktek=rataTagihan($n['pra1'],$n['pra2'],$n['pra3'],$n['pra4'],$n['pra5']);
  545.             // $rat_projek=rataTagihan($n['pro1'],$n['pro2'],$n['pro3'],$n['pro4'],$n['pro5']);
  546.             // $rat_portofolio=rataTagihan($n['por1'],$n['por2'],$n['por3'],$n['por4'],$n['por5']);
  547.  
  548.             $qutespraktek = mysql_query("SELECT * FROM tes_praktek_n
  549.              WHERE id_akademik='$edit'
  550.              and kode_mapel='$n[kode_mapel]'");
  551.             while( $row = mysql_fetch_assoc( $qutespraktek))
  552.             {
  553.               $datanilaik[] = $row['nilai']; // Inside while loop
  554.             }
  555.  
  556.             $qutesprojek = mysql_query("SELECT * FROM tes_projek_n
  557.              WHERE id_akademik='$edit'
  558.              and kode_mapel='$n[kode_mapel]'");
  559.             while( $row = mysql_fetch_assoc( $qutesprojek))
  560.             {
  561.               $datanilaik[] = $row['nilai']; // Inside while loop
  562.             }
  563.  
  564.             $qutesportofolio = mysql_query("SELECT * FROM tes_portofolio_n
  565.              WHERE id_akademik='$edit'
  566.              and kode_mapel='$n[kode_mapel]'");
  567.             while( $row = mysql_fetch_assoc( $qutesportofolio))
  568.             {
  569.               $datanilaik[] = $row['nilai']; // Inside while loop
  570.             }
  571.  
  572.             $rat_ket = mmmr($datanilaik);
  573.             if(empty($rat_ket))
  574.             {
  575.               $rat_ket=0;
  576.             }
  577.  
  578.             // $rat_ket=rataKet($rat_praktek,$rat_projek,$rat_portofolio);
  579.  
  580.             $konv_ket=konv_100($rat_ket);            
  581.  
  582.   //ending ketrampilan
  583.  
  584.   //ending sikap          
  585.             $datanilaip=[];
  586.             $datanilaik=[];
  587.  
  588.  
  589.             if($c!=$n['kode_mapel']) {  
  590.  
  591.               $data = kkmmapel($n['kode_mapel'],$semester_aktif,$tahun_aktif); $kkm=$data['kkm']; $idkkmmapel=$data['idkkmmapel']; $predikatPeng=predikat_kkmmapel($idkkmmapel,$konv_peng); $predikatKet=predikat_kkmmapel($idkkmmapel,$konv_ket);
  592.              
  593.               $ratan=0;
  594.               $ratan=($konv_peng+$konv_ket)/2;
  595.              
  596.  
  597.               if($n['kode_mapel']>0 and $n['kode_mapel']<5) {  
  598.                ?>
  599.                <tr>
  600.                 <td></td>
  601.                 <td class="kiri"><?=strtolower(chr(64+$abc++))?>. <?=$n['nama_mapel']?>
  602.                   <br /></td>
  603.                   <td><?=$kkm?></td>
  604.                   <!-- <td><?=$bebanjp?></td> -->
  605.                   <td><?=$konv_peng?></td>
  606.                   <td><?=$predikatPeng?></td>
  607.                   <td><?=$konv_ket?></td>
  608.                   <td><?=$predikatKet?></td>
  609.                   <!-- <td><?=$ratan?></td> -->
  610.                   <!-- <td><?=$nxb?></td> -->
  611.                 </tr>
  612.                 <?php              
  613.               }else{ ?>
  614.                 <tr>
  615.                   <td><?=$no?></td>
  616.                   <td class="kiri"><?=$n['nama_mapel']?></td>
  617.                   <td><?=$kkm?></td>
  618.                   <!-- <td><?=$bebanjp?></td> -->
  619.                   <td><?=$konv_peng?></td>
  620.                   <td><?=$predikatPeng?></td>
  621.                   <td><?=$konv_ket?></td>
  622.                   <td><?=$predikatKet?></td>
  623.                   <!-- <td><?=$ratan?></td> -->
  624.                   <!-- <td><?=$nxb?></td> -->
  625.                 </tr>
  626.                 <?php
  627.                 $no++;
  628.                 $c=$n['kode_mapel'];}}
  629.               } ?>
  630.               <tr>
  631.                 <th class="kiri" colspan="10">Kelompok B (Wajib)</th>
  632.               </tr>
  633.               <?php
  634.               $no=1;
  635.               $c=0;
  636.               while ($n=mysql_fetch_array($que_b)){
  637. //proses nilai Pengetahuan    
  638.                 $qutestulis = mysql_query("SELECT * FROM tes_tulis_n
  639.                  WHERE id_akademik='$edit'
  640.                  and kode_mapel='$n[kode_mapel]'");
  641.                 while( $row = mysql_fetch_assoc( $qutestulis))
  642.                 {
  643.               $datanilaip[] = $row['nilai']; // Inside while loop
  644.             }
  645.  
  646.             $quteslisan = mysql_query("SELECT * FROM tes_lisan_n
  647.              WHERE id_akademik='$edit'
  648.              and kode_mapel='$n[kode_mapel]'");
  649.             while( $row = mysql_fetch_assoc( $quteslisan))
  650.             {
  651.               $datanilaip[] = $row['nilai']; // Inside while loop
  652.             }
  653.  
  654.             $qutestugas = mysql_query("SELECT * FROM tes_tugas_n
  655.              WHERE id_akademik='$edit'
  656.              and kode_mapel='$n[kode_mapel]'");
  657.             while( $row = mysql_fetch_assoc( $qutestugas))
  658.             {
  659.               $datanilaip[] = $row['nilai']; // Inside while loop
  660.             }
  661.  
  662.  
  663.             $rat_peng = mmmr($datanilaip);
  664.  
  665.             if(empty($rat_peng))
  666.             {
  667.               $rat_peng=0;
  668.             }
  669.  
  670.             // return var_dump($rat_peng);
  671.  
  672.             // $rat_peng=rata($n['tu1'],$n['tu2'],$n['tu3'],$n['tu4'],$n['tu5']
  673.             //   ,$n['li1'],$n['li2'],$n['li3'],$n['li4'],$n['li5'],
  674.             //   $n['tgs1'],$n['tgs2'],$n['tgs3'],$n['tgs4'],$n['tgs5']);
  675.  
  676.             $konv_peng=konversi_100($rat_peng,$n['uts'],$n['uas']);
  677.   //end poses nilai
  678.  
  679.   //proses nilai ketrampilan
  680.             // $rat_praktek=rataTagihan($n['pra1'],$n['pra2'],$n['pra3'],$n['pra4'],$n['pra5']);
  681.             // $rat_projek=rataTagihan($n['pro1'],$n['pro2'],$n['pro3'],$n['pro4'],$n['pro5']);
  682.             // $rat_portofolio=rataTagihan($n['por1'],$n['por2'],$n['por3'],$n['por4'],$n['por5']);
  683.  
  684.             $qutespraktek = mysql_query("SELECT * FROM tes_praktek_n
  685.              WHERE id_akademik='$edit'
  686.              and kode_mapel='$n[kode_mapel]'");
  687.             while( $row = mysql_fetch_assoc( $qutespraktek))
  688.             {
  689.               $datanilaik[] = $row['nilai']; // Inside while loop
  690.             }
  691.  
  692.             $qutesprojek = mysql_query("SELECT * FROM tes_projek_n
  693.              WHERE id_akademik='$edit'
  694.              and kode_mapel='$n[kode_mapel]'");
  695.             while( $row = mysql_fetch_assoc( $qutesprojek))
  696.             {
  697.               $datanilaik[] = $row['nilai']; // Inside while loop
  698.             }
  699.  
  700.             $qutesportofolio = mysql_query("SELECT * FROM tes_portofolio_n
  701.              WHERE id_akademik='$edit'
  702.              and kode_mapel='$n[kode_mapel]'");
  703.             while( $row = mysql_fetch_assoc( $qutesportofolio))
  704.             {
  705.               $datanilaik[] = $row['nilai']; // Inside while loop
  706.             }
  707.  
  708.             $rat_ket = mmmr($datanilaik);
  709.             if(empty($rat_ket))
  710.             {
  711.               $rat_ket=0;
  712.             }
  713.  
  714.             // $rat_ket=rataKet($rat_praktek,$rat_projek,$rat_portofolio);
  715.  
  716.             $konv_ket=konv_100($rat_ket);            
  717.  
  718.   //ending ketrampilan
  719.  
  720.   //ending sikap          
  721.             $datanilaip=[];
  722.             $datanilaik=[];
  723.  
  724.  
  725.  
  726.   //ending sikap
  727.             if($c!=$n['kode_mapel']) {  
  728.  
  729.               $data = kkmmapel($n['kode_mapel'],$semester_aktif,$tahun_aktif); $kkm=$data['kkm']; $idkkmmapel=$data['idkkmmapel']; $predikatPeng=predikat_kkmmapel($idkkmmapel,$konv_peng); $predikatKet=predikat_kkmmapel($idkkmmapel,$konv_ket);
  730.  
  731.               $ratan=0;
  732.               $ratan=($konv_peng+$konv_ket)/2;
  733.  
  734.               ?>
  735.               <tr>
  736.                 <td><?=$no?></td>
  737.                 <td class="kiri"><?=$n['nama_mapel']?>
  738.                   <br /></td>
  739.                   <td><?=$kkm?></td>
  740.                   <!-- <td><?=$bebanjp?></td> -->
  741.                   <td><?=$konv_peng?></td>
  742.                   <td><?=$predikatPeng?></td>
  743.                   <td><?=$konv_ket?></td>
  744.                   <td><?=$predikatKet?></td>
  745.                   <!-- <td><?=$ratan?></td> -->
  746.                   <!-- <td><?=$nxb?></td> -->
  747.                 </tr>
  748.                 <?php $no++;
  749.                 $c=$n['kode_mapel'];
  750.               }
  751.  
  752.             } ?>
  753.             <tr>
  754.               <td><?=$no?></td>
  755.               <th class="kiri" colspan="9">Muatan Lokal</th>
  756.             </tr>
  757.             <?php
  758.             $no=1;
  759.             $c=0;
  760.             $abc = 1;
  761.             while ($n=mysql_fetch_array($que_e)){
  762. //proses nilai Pengetahuan    
  763.               $qutestulis = mysql_query("SELECT * FROM tes_tulis_n
  764.                WHERE id_akademik='$edit'
  765.                and kode_mapel='$n[kode_mapel]'");
  766.               while( $row = mysql_fetch_assoc( $qutestulis))
  767.               {
  768.               $datanilaip[] = $row['nilai']; // Inside while loop
  769.             }
  770.  
  771.             $quteslisan = mysql_query("SELECT * FROM tes_lisan_n
  772.              WHERE id_akademik='$edit'
  773.              and kode_mapel='$n[kode_mapel]'");
  774.             while( $row = mysql_fetch_assoc( $quteslisan))
  775.             {
  776.               $datanilaip[] = $row['nilai']; // Inside while loop
  777.             }
  778.  
  779.             $qutestugas = mysql_query("SELECT * FROM tes_tugas_n
  780.              WHERE id_akademik='$edit'
  781.              and kode_mapel='$n[kode_mapel]'");
  782.             while( $row = mysql_fetch_assoc( $qutestugas))
  783.             {
  784.               $datanilaip[] = $row['nilai']; // Inside while loop
  785.             }
  786.  
  787.  
  788.             $rat_peng = mmmr($datanilaip);
  789.  
  790.             if(empty($rat_peng))
  791.             {
  792.               $rat_peng=0;
  793.             }
  794.  
  795.             // return var_dump($rat_peng);
  796.  
  797.             // $rat_peng=rata($n['tu1'],$n['tu2'],$n['tu3'],$n['tu4'],$n['tu5']
  798.             //   ,$n['li1'],$n['li2'],$n['li3'],$n['li4'],$n['li5'],
  799.             //   $n['tgs1'],$n['tgs2'],$n['tgs3'],$n['tgs4'],$n['tgs5']);
  800.  
  801.             $konv_peng=konversi_100($rat_peng,$n['uts'],$n['uas']);
  802.   //end poses nilai
  803.  
  804.   //proses nilai ketrampilan
  805.             // $rat_praktek=rataTagihan($n['pra1'],$n['pra2'],$n['pra3'],$n['pra4'],$n['pra5']);
  806.             // $rat_projek=rataTagihan($n['pro1'],$n['pro2'],$n['pro3'],$n['pro4'],$n['pro5']);
  807.             // $rat_portofolio=rataTagihan($n['por1'],$n['por2'],$n['por3'],$n['por4'],$n['por5']);
  808.  
  809.             $qutespraktek = mysql_query("SELECT * FROM tes_praktek_n
  810.              WHERE id_akademik='$edit'
  811.              and kode_mapel='$n[kode_mapel]'");
  812.             while( $row = mysql_fetch_assoc( $qutespraktek))
  813.             {
  814.               $datanilaik[] = $row['nilai']; // Inside while loop
  815.             }
  816.  
  817.             $qutesprojek = mysql_query("SELECT * FROM tes_projek_n
  818.              WHERE id_akademik='$edit'
  819.              and kode_mapel='$n[kode_mapel]'");
  820.             while( $row = mysql_fetch_assoc( $qutesprojek))
  821.             {
  822.               $datanilaik[] = $row['nilai']; // Inside while loop
  823.             }
  824.  
  825.             $qutesportofolio = mysql_query("SELECT * FROM tes_portofolio_n
  826.              WHERE id_akademik='$edit'
  827.              and kode_mapel='$n[kode_mapel]'");
  828.             while( $row = mysql_fetch_assoc( $qutesportofolio))
  829.             {
  830.               $datanilaik[] = $row['nilai']; // Inside while loop
  831.             }
  832.  
  833.             $rat_ket = mmmr($datanilaik);
  834.             if(empty($rat_ket))
  835.             {
  836.               $rat_ket=0;
  837.             }
  838.  
  839.             // $rat_ket=rataKet($rat_praktek,$rat_projek,$rat_portofolio);
  840.  
  841.             $konv_ket=konv_100($rat_ket);            
  842.  
  843.   //ending ketrampilan
  844.  
  845.   //ending sikap          
  846.             $datanilaip=[];
  847.             $datanilaik=[];
  848.  
  849.  
  850.   //ending sikap
  851.             if($c!=$n['kode_mapel']) {  
  852.              
  853.               $data = kkmmapel($n['kode_mapel'],$semester_aktif,$tahun_aktif); $kkm=$data['kkm']; $idkkmmapel=$data['idkkmmapel']; $predikatPeng=predikat_kkmmapel($idkkmmapel,$konv_peng); $predikatKet=predikat_kkmmapel($idkkmmapel,$konv_ket);
  854.              
  855.               $ratan=0;
  856.               $ratan=$ratan=($konv_peng+$konv_ket)/2;
  857.              
  858.               ?>
  859.               <tr>
  860.                 <td></td>
  861.                 <td class="kiri"><?=strtolower(chr(64+$abc++))?>. <?=$n['nama_mapel']?>
  862.                   <br /></td>
  863.                   <td><?=$kkm?></td>
  864.                   <!-- <td><?=$bebanjp?></td> -->
  865.                   <td><?=$konv_peng?></td>
  866.                   <td><?=$predikatPeng?></td>
  867.                   <td><?=$konv_ket?></td>
  868.                   <td><?=$predikatKet?></td>
  869.                   <!-- <td><?=$ratan?></td> -->
  870.                   <!-- <td><?=$nxb?></td> -->
  871.                 </tr>
  872.                 <?php $no++;
  873.                 $c=$n['kode_mapel'];}
  874.  
  875.               }
  876.              
  877.               ?>
  878.             <tr>
  879.               <th class="kiri" colspan="10">Kelompok C (Peminatan)</th>
  880.             </tr>
  881.             <tr>
  882.               <th>I</th>
  883.               <th class="kiri" colspan="9">Peminatan <?=ubah($ew['jurusan'])?></th>
  884.             </tr>
  885.             <?php
  886.             $no=1;
  887.             $c=0;
  888.             while ($n=mysql_fetch_array($que_c)){
  889. //proses nilai Pengetahuan    
  890.               $qutestulis = mysql_query("SELECT * FROM tes_tulis_n
  891.                WHERE id_akademik='$edit'
  892.                and kode_mapel='$n[kode_mapel]'");
  893.               while( $row = mysql_fetch_assoc( $qutestulis))
  894.               {
  895.               $datanilaip[] = $row['nilai']; // Inside while loop
  896.             }
  897.  
  898.             $quteslisan = mysql_query("SELECT * FROM tes_lisan_n
  899.              WHERE id_akademik='$edit'
  900.              and kode_mapel='$n[kode_mapel]'");
  901.             while( $row = mysql_fetch_assoc( $quteslisan))
  902.             {
  903.               $datanilaip[] = $row['nilai']; // Inside while loop
  904.             }
  905.  
  906.             $qutestugas = mysql_query("SELECT * FROM tes_tugas_n
  907.              WHERE id_akademik='$edit'
  908.              and kode_mapel='$n[kode_mapel]'");
  909.             while( $row = mysql_fetch_assoc( $qutestugas))
  910.             {
  911.               $datanilaip[] = $row['nilai']; // Inside while loop
  912.             }
  913.  
  914.  
  915.             $rat_peng = mmmr($datanilaip);
  916.  
  917.             if(empty($rat_peng))
  918.             {
  919.               $rat_peng=0;
  920.             }
  921.  
  922.             // return var_dump($rat_peng);
  923.  
  924.             // $rat_peng=rata($n['tu1'],$n['tu2'],$n['tu3'],$n['tu4'],$n['tu5']
  925.             //   ,$n['li1'],$n['li2'],$n['li3'],$n['li4'],$n['li5'],
  926.             //   $n['tgs1'],$n['tgs2'],$n['tgs3'],$n['tgs4'],$n['tgs5']);
  927.  
  928.             $konv_peng=konversi_100($rat_peng,$n['uts'],$n['uas']);
  929.   //end poses nilai
  930.  
  931.   //proses nilai ketrampilan
  932.             // $rat_praktek=rataTagihan($n['pra1'],$n['pra2'],$n['pra3'],$n['pra4'],$n['pra5']);
  933.             // $rat_projek=rataTagihan($n['pro1'],$n['pro2'],$n['pro3'],$n['pro4'],$n['pro5']);
  934.             // $rat_portofolio=rataTagihan($n['por1'],$n['por2'],$n['por3'],$n['por4'],$n['por5']);
  935.  
  936.             $qutespraktek = mysql_query("SELECT * FROM tes_praktek_n
  937.              WHERE id_akademik='$edit'
  938.              and kode_mapel='$n[kode_mapel]'");
  939.             while( $row = mysql_fetch_assoc( $qutespraktek))
  940.             {
  941.               $datanilaik[] = $row['nilai']; // Inside while loop
  942.             }
  943.  
  944.             $qutesprojek = mysql_query("SELECT * FROM tes_projek_n
  945.              WHERE id_akademik='$edit'
  946.              and kode_mapel='$n[kode_mapel]'");
  947.             while( $row = mysql_fetch_assoc( $qutesprojek))
  948.             {
  949.               $datanilaik[] = $row['nilai']; // Inside while loop
  950.             }
  951.  
  952.             $qutesportofolio = mysql_query("SELECT * FROM tes_portofolio_n
  953.              WHERE id_akademik='$edit'
  954.              and kode_mapel='$n[kode_mapel]'");
  955.             while( $row = mysql_fetch_assoc( $qutesportofolio))
  956.             {
  957.               $datanilaik[] = $row['nilai']; // Inside while loop
  958.             }
  959.  
  960.             $rat_ket = mmmr($datanilaik);
  961.             if(empty($rat_ket))
  962.             {
  963.               $rat_ket=0;
  964.             }
  965.  
  966.             // $rat_ket=rataKet($rat_praktek,$rat_projek,$rat_portofolio);
  967.  
  968.             $konv_ket=konv_100($rat_ket);            
  969.  
  970.   //ending ketrampilan
  971.  
  972.   //ending sikap          
  973.             $datanilaip=[];
  974.             $datanilaik=[];
  975.  
  976.  
  977.  
  978.   //ending sikap
  979.  
  980.             if($c!=$n['kode_mapel']) {  
  981.               $data = kkmmapel($n['kode_mapel'],$semester_aktif,$tahun_aktif); $kkm=$data['kkm']; $idkkmmapel=$data['idkkmmapel']; $predikatPeng=predikat_kkmmapel($idkkmmapel,$konv_peng); $predikatKet=predikat_kkmmapel($idkkmmapel,$konv_ket);
  982.  
  983.               $ratan=0;
  984.               $ratan=$ratan=($konv_peng+$konv_ket)/2;
  985.  
  986.               ?>
  987.               <tr>
  988.                 <td><?=$no?></td>
  989.                 <td class="kiri"><?=$n['nama_mapel']?>
  990.                   <br /></td>
  991.                   <td><?=$kkm?></td>
  992.                   <!-- <td><?=$bebanjp?></td> -->
  993.                   <td><?=$konv_peng?></td>
  994.                   <td><?=$predikatPeng?></td>
  995.                   <td><?=$konv_ket?></td>
  996.                   <td><?=$predikatKet?></td>
  997.                   <!-- <td><?=$ratan?></td> -->
  998.                   <!-- <td><?=$nxb?></td> -->
  999.                 </tr>
  1000.                 <?php $no++;
  1001.                 $c=$n['kode_mapel'];}
  1002.  
  1003.               } ?>
  1004.               <tr>
  1005.                 <th>II</th>
  1006.                 <th class="kiri" colspan="9">Lintas Peminatan</th>
  1007.               </tr>
  1008.               <?php
  1009.               $no=1;
  1010.               $c=0;
  1011.               while ($n=mysql_fetch_array($que_d)){
  1012. //proses nilai Pengetahuan    
  1013.                 $qutestulis = mysql_query("SELECT * FROM tes_tulis_n
  1014.                  WHERE id_akademik='$edit'
  1015.                  and kode_mapel='$n[kode_mapel]'");
  1016.                 while( $row = mysql_fetch_assoc( $qutestulis))
  1017.                 {
  1018.               $datanilaip[] = $row['nilai']; // Inside while loop
  1019.             }
  1020.  
  1021.             $quteslisan = mysql_query("SELECT * FROM tes_lisan_n
  1022.              WHERE id_akademik='$edit'
  1023.              and kode_mapel='$n[kode_mapel]'");
  1024.             while( $row = mysql_fetch_assoc( $quteslisan))
  1025.             {
  1026.               $datanilaip[] = $row['nilai']; // Inside while loop
  1027.             }
  1028.  
  1029.             $qutestugas = mysql_query("SELECT * FROM tes_tugas_n
  1030.              WHERE id_akademik='$edit'
  1031.              and kode_mapel='$n[kode_mapel]'");
  1032.             while( $row = mysql_fetch_assoc( $qutestugas))
  1033.             {
  1034.               $datanilaip[] = $row['nilai']; // Inside while loop
  1035.             }
  1036.  
  1037.  
  1038.             $rat_peng = mmmr($datanilaip);
  1039.  
  1040.             if(empty($rat_peng))
  1041.             {
  1042.               $rat_peng=0;
  1043.             }
  1044.  
  1045.             // return var_dump($rat_peng);
  1046.  
  1047.             // $rat_peng=rata($n['tu1'],$n['tu2'],$n['tu3'],$n['tu4'],$n['tu5']
  1048.             //   ,$n['li1'],$n['li2'],$n['li3'],$n['li4'],$n['li5'],
  1049.             //   $n['tgs1'],$n['tgs2'],$n['tgs3'],$n['tgs4'],$n['tgs5']);
  1050.  
  1051.             $konv_peng=konversi_100($rat_peng,$n['uts'],$n['uas']);
  1052.   //end poses nilai
  1053.  
  1054.   //proses nilai ketrampilan
  1055.             // $rat_praktek=rataTagihan($n['pra1'],$n['pra2'],$n['pra3'],$n['pra4'],$n['pra5']);
  1056.             // $rat_projek=rataTagihan($n['pro1'],$n['pro2'],$n['pro3'],$n['pro4'],$n['pro5']);
  1057.             // $rat_portofolio=rataTagihan($n['por1'],$n['por2'],$n['por3'],$n['por4'],$n['por5']);
  1058.  
  1059.             $qutespraktek = mysql_query("SELECT * FROM tes_praktek_n
  1060.              WHERE id_akademik='$edit'
  1061.              and kode_mapel='$n[kode_mapel]'");
  1062.             while( $row = mysql_fetch_assoc( $qutespraktek))
  1063.             {
  1064.               $datanilaik[] = $row['nilai']; // Inside while loop
  1065.             }
  1066.  
  1067.             $qutesprojek = mysql_query("SELECT * FROM tes_projek_n
  1068.              WHERE id_akademik='$edit'
  1069.              and kode_mapel='$n[kode_mapel]'");
  1070.             while( $row = mysql_fetch_assoc( $qutesprojek))
  1071.             {
  1072.               $datanilaik[] = $row['nilai']; // Inside while loop
  1073.             }
  1074.  
  1075.             $qutesportofolio = mysql_query("SELECT * FROM tes_portofolio_n
  1076.              WHERE id_akademik='$edit'
  1077.              and kode_mapel='$n[kode_mapel]'");
  1078.             while( $row = mysql_fetch_assoc( $qutesportofolio))
  1079.             {
  1080.               $datanilaik[] = $row['nilai']; // Inside while loop
  1081.             }
  1082.  
  1083.             $rat_ket = mmmr($datanilaik);
  1084.             if(empty($rat_ket))
  1085.             {
  1086.               $rat_ket=0;
  1087.             }
  1088.  
  1089.             // $rat_ket=rataKet($rat_praktek,$rat_projek,$rat_portofolio);
  1090.  
  1091.             $konv_ket=konv_100($rat_ket);            
  1092.  
  1093.   //ending ketrampilan
  1094.  
  1095.   //ending sikap          
  1096.             $datanilaip=[];
  1097.             $datanilaik=[];
  1098.  
  1099.   //ending sikap
  1100.             if($c!=$n['kode_mapel']) {
  1101.               $data = kkmmapel($n['kode_mapel'],$semester_aktif,$tahun_aktif); $kkm=$data['kkm']; $idkkmmapel=$data['idkkmmapel']; $predikatPeng=predikat_kkmmapel($idkkmmapel,$konv_peng); $predikatKet=predikat_kkmmapel($idkkmmapel,$konv_ket);
  1102.  
  1103.  
  1104.               $ratan=0;
  1105.               $ratan=$ratan=($konv_peng+$konv_ket)/2;
  1106.  
  1107.  
  1108.               ?>
  1109.               <tr>
  1110.                 <td><?=$no?></td>
  1111.                 <td class="kiri"><?=$n['nama_mapel']?></td>
  1112.                 <td><?=$kkm?></td>
  1113.                 <!-- <td><?=$bebanjp?></td> -->
  1114.                 <td><?=$konv_peng?></td>
  1115.                 <td><?=$predikatPeng?></td>
  1116.                 <td><?=$konv_ket?></td>
  1117.                 <td><?=$predikatKet?></td>
  1118.                 <!-- <td><?=$ratan?></td> -->
  1119.                 <!-- <td><?=$nxb?></td> -->
  1120.               </tr>
  1121.               <?php $no++;
  1122.               $c=$n['kode_mapel'];}
  1123.  
  1124.             } ?>
  1125.            
  1126.             </table>                    
  1127.             <br />
  1128.             <table width="529" border="0" cellpadding="3" cellspacing="0">
  1129.               <tr>
  1130.                 <td align="left"><label><b>Tabel Interval Berdasarkan KKM </b></label></td>
  1131.               </tr>
  1132.             </table>
  1133.             <table width="200" border="1" cellpadding="0" cellspacing="0">
  1134.               <tr>
  1135.                 <td rowspan="2">KKM</td>
  1136.                 <td colspan="4">Predikat</td>
  1137.               </tr>
  1138.               <tr>
  1139.                 <td>D=Kurang</td>
  1140.                 <td>C=Cukup</td>
  1141.                 <td>B=Baik</td>
  1142.                 <td>A=Sangat Baik</td>
  1143.               </tr>
  1144.               <tr>
  1145.                 <td>75</td>
  1146.                 <td>&lt; 75</td>
  1147.                 <td>75 &le; 76 </td>
  1148.                 <td>77 &le; 88 </td>
  1149.                 <td>89 &le; 100</td>
  1150.               </tr>
  1151.             </table>
  1152.             <br />
  1153.             <br>
  1154.                     <!-- <table style="display: none" width="529" border="1" cellspacing="0" cellpadding="3">
  1155.                             <tr>
  1156.                               <th rowspan="2">KKM</th>
  1157.                               <th colspan="4">Predikat</th>
  1158.                             </tr>
  1159.                             <tr>
  1160.                               <th>D=Kurang</th>
  1161.                               <th>C=Cukup</th>
  1162.                               <th>B=Baik</th>
  1163.                               <th>A=Sangat Baik</th>
  1164.                             </tr>
  1165.                             <?php while($rkkm = mysql_fetch_array($tkkm)) {
  1166.                               $tidkkm=$rkkm['idkkm'];
  1167.                               ?>
  1168.                             <tr>
  1169.                               <td><?=$rkkm['kkm']?></td>
  1170.                               <?php
  1171.                               $quekkmp = mysql_query("SELECT * FROM kkm_predikat WHERE idkkm='$tidkkm' ORDER BY predikat DESC");
  1172.                               while($ddkkm = mysql_fetch_array($quekkmp))
  1173.                                 {?>
  1174.                               <td>&le; <?=$ddkkm['atas']?></td>                                        
  1175.                               <?php }
  1176.                               } ?>
  1177.                             </tr>                          
  1178.                           </table>                              
  1179.                           <br /> -->
  1180.                         </div>
  1181.                       </body>
  1182.                       </html>
RAW Paste Data