[ Mini Kiebo ]
Server: Windows NT DESKTOP-5B8S0D4 6.2 build 9200 (Windows 8 Professional Edition) i586
Path:
D:
/
Backup
/
14082024
/
Data
/
htdocs
/
htdocs
/
siakad
/
akademik
/
ajax
/
[
Home
]
File: rekap_na2.php
<?php require_once("configure_first.php"); $nmForm = "rekap_uas.php"; $nmTable = "p_nilai_siswa"; $formnama = "rekap_uas"; $huruf = "<font face=\"Times New Roman\" size=\"2\">"; if($_GET["id_ta"]) $id_ta = $_GET["id_ta"]; if($_GET["id_sem"]) $id_sem = $_GET["id_sem"]; $query = "select ta_nama from m_tahun_ajaran where ta_id = ".$id_ta; $iData=sAllData($query); for($a=0,$b=count($iData);$a<$b;$a++) { $ta_nama = $iData[$a]["ta_nama"]; } if($_GET["id_kelas"]) { $id_kelas = $_GET["id_kelas"]; $query = "select a.*,substr(kelas_kode,1,2) as kode, upper(kelas_nama) as kelas_nama from m_kelas a where kelas_id = ".$id_kelas; // echo $query."<br>"; $iData=sAllData($query); for($a=0,$b=count($iData);$a<$b;$a++) { $kelas_nama = $iData[$a]["kelas_nama"]; $kelas_kode = $iData[$a]["kode"]; } } ?> <title>Cetak Rekap Nilai NA</title> <table border="0" cellspacing="0" cellpadding="1" width="100%"> <tr> <td width="8%" valign="top"><img src="http://sims.sabilillahsidoarjo.sch.id/akademik/mediamanager/logosabilillah.jpg" width="95px"></td> <td align="left" width="32%"><font face="Times New Roman" size="2"><b>TAMAN PENDIDIKAN ISLAM SABILILLAH<br>SD ISLAM SABILILLAH FULL DAY SCHOOL</b><br><?php echo $huruf;?>Perumahan Gading Fajar II Blok B1-B3 Sidoarjo 61214<br>Phone : TK : (031) 8052492, SD : (031) 8064124, (031) 8064207<br>Email : info@sabilillahsidoarjo.sch.id</td> <td width="60%"> </td> </tr> <tr> <td align="left" colspan="3"> </td> </tr> <tr> <td align="center" colspan="3"><font face="Times New Roman" size="2"><b>REKAPITULASI NILAI <?php echo $jenis_nilai_nama;?> KELAS <?php echo $kelas_nama;?></b><br><b>SEMESTER <?php echo $sem_nama;?> TAHUN PELAJARAN <?php echo $ta_nama;?></b></td> </tr> </table> <?php echo "<table class=\"art-article\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" style=\" margin: 0; width: 100%;\">"; echo "<tr>"; echo "<td width=10 align=center><b><font face=\"Times New Roman\" size=\"1\">No</b></td>"; echo "<td width=50 align=center><b><font face=\"Times New Roman\" size=\"1\">N.I.S</b></td>"; echo "<td width=400 align=center><b><font face=\"Times New Roman\" size=\"1\">Nama Lengkap</b></td>"; $query="select mp_id,mp_nama from m_matapelajaran where mp_status = 1 order by mp_id asc"; $iDataArray=sAllData($query); for($a=0,$b=count($iDataArray);$a<$b;$a++) { // echo "<td width=50 align=center><b><font face=\"Times New Roman\" size=\"1\">".$iDataArray[$a]["mp_id"]."".$iDataArray[$a]["mp_nama"]."</b></td>"; echo "<td width=50 align=center><b><font face=\"Times New Roman\" size=\"1\">".$iDataArray[$a]["mp_nama"]."</b></td>"; } echo "<td width=50 align=center><b><font face=\"Times New Roman\" size=\"1\">Jumlah</b></td>"; echo "</tr>"; $query = "select siswa_nis,siswa_id,siswa_nama from m_siswa a left join p_akad_siswa b on a.siswa_id = b.id_siswa where b.id_ta = ".$id_ta." and b.id_kelas = ".$id_kelas." order by abs(siswa_nis) asc"; $iData=sAllData($query); for($a=0,$b=count($iData);$a<$b;$a++) { echo "<tr>"; echo "<td align=center><font face=\"Times New Roman\" size=\"1\">".($a+1).".</td>"; echo "<td align=center><font face=\"Times New Roman\" size=\"1\">".$iData[$a]["siswa_nis"]."</td>"; echo "<td><font face=\"Times New Roman\" size=\"1\">".$iData[$a]["siswa_nama"]."</td>"; $query2="select mp_id from m_matapelajaran where mp_status = 1 order by mp_id asc"; $iDataArray2=sAllData($query2); for($a2=0,$b2=count($iDataArray2);$a2<$b2;$a2++) { // $query3 = "select abs((a.na_total+b.na_total)/2) as na from posting_na a left join posting_na b on a.id_kelas = b.id_kelas and a.id_mp = b.id_mp and a.id_ta = b.id_ta and a.id_siswa = b.id_siswa where a.na_total <> 0 and a.id_kelas = ".$id_kelas." and a.id_mp = ".$iDataArray[$a]["mp_id"]." and a.id_ta = ".$id_ta." and a.id_sem = 1 and b.id_sem = 2"; $query3 = "select abs((a.na_total+b.na_total)/2) as na from posting_na a left join posting_na b on a.id_kelas = b.id_kelas and a.id_mp = b.id_mp and a.id_ta = b.id_ta and a.id_siswa = b.id_siswa where a.na_total <> 0 and a.id_kelas = ".$id_kelas." and a.id_siswa = ".$iData[$a]["siswa_id"]." and a.id_mp = ".$iDataArray2[$a2]["mp_id"]." and a.id_ta = ".$id_ta." and a.id_sem = 1 and b.id_sem = 2"; // if($iDataArray2[$a2]["mp_id"] == "20") echo $query3."<br>"; // echo $query3."<br>"; $iDataArray3=sAllData($query3); for($e=0,$f=count($iDataArray3);$e<$f;$e++) { $na_akhir = round($iDataArray3[$e]["na"]); } $na_pembulatan = round($na_akhir); echo "<td align=center><font face=\"Times New Roman\" size=\"1\">".$na_pembulatan."</td>"; $natotalsiswa[$iData[$a]["siswa_id"]] = ($na_pembulatan+$natotalsiswa[$iData[$a]["siswa_id"]]); $na_pembulatan = 0; $na_akhir = 0; } // $na_pembulatan = 0; // $na_akhir = 0; echo "<td align=center><font face=\"Times New Roman\" size=\"1\">".$natotalsiswa[$iData[$a]["siswa_id"]]."</td>"; echo "</tr>"; } echo "<tr>"; echo "<td align=center><font face=\"Times New Roman\" size=\"1\"> </td>"; echo "<td align=center><font face=\"Times New Roman\" size=\"1\"> </td>"; echo "<td align=center><font face=\"Times New Roman\" size=\"1\">Rata-rata </td>"; $query2="select mp_id from m_matapelajaran where mp_status = 1 order by mp_id asc"; $iDataArray2=sAllData($query2); for($a2=0,$b2=count($iDataArray2);$a2<$b2;$a2++) { $query3 = "select avg(abs((a.na_total+b.na_total)/2)) as narata from posting_na a left join posting_na b on a.id_kelas = b.id_kelas and a.id_mp = b.id_mp and a.id_ta = b.id_ta and a.id_siswa = b.id_siswa where a.na_total <> 0 and a.id_kelas = ".$id_kelas." and a.id_mp = ".$iDataArray2[$a2]["mp_id"]." and a.id_ta = ".$id_ta." and a.id_sem = 1 and b.id_sem = 2"; // if($iDataArray2[$a2]["mp_id"] == "20") echo $query3."<br>"; // echo $iDataArray2[$a2]["mp_id"]."<br>"; $iDataArray3=sAllData($query3); for($e=0,$f=count($iDataArray3);$e<$f;$e++) { $na_rata = round($iDataArray3[$e]["narata"]); } echo "<td align=center><font face=\"Times New Roman\" size=\"1\">".round($na_rata)."</td>"; $total_rata2 = ($total_rata2+$na_rata); } echo "<td align=center><font face=\"Times New Roman\" size=\"1\">".$total_rata2."</td>"; echo "</tr>"; echo "<tr>"; echo "<td align=center><font face=\"Times New Roman\" size=\"1\"> </td>"; echo "<td align=center><font face=\"Times New Roman\" size=\"1\"> </td>"; echo "<td align=center><font face=\"Times New Roman\" size=\"1\">Max </td>"; $query2="select mp_id from m_matapelajaran where mp_status = 1 order by mp_id asc"; $iDataArray2=sAllData($query2); for($a2=0,$b2=count($iDataArray2);$a2<$b2;$a2++) { $query3 = "select max(abs((a.na_total+b.na_total)/2)) as namax from posting_na a left join posting_na b on a.id_kelas = b.id_kelas and a.id_mp = b.id_mp and a.id_ta = b.id_ta and a.id_siswa = b.id_siswa where a.na_total <> 0 and a.id_kelas = ".$id_kelas." and a.id_mp = ".$iDataArray2[$a2]["mp_id"]." and a.id_ta = ".$id_ta." and a.id_sem = 1 and b.id_sem = 2"; // echo $query3."<br>"; $iDataArray3=sAllData($query3); for($e=0,$f=count($iDataArray3);$e<$f;$e++) { $namax = round($iDataArray3[$e]["namax"]); } echo "<td align=center><font face=\"Times New Roman\" size=\"1\">".round($namax)."</td>"; $total_max = ($total_max+$namax); } echo "<td align=center><font face=\"Times New Roman\" size=\"1\">".$total_max."</td>"; echo "</tr>"; echo "<tr>"; echo "<td align=center><font face=\"Times New Roman\" size=\"1\"> </td>"; echo "<td align=center><font face=\"Times New Roman\" size=\"1\"> </td>"; echo "<td align=center><font face=\"Times New Roman\" size=\"1\">Min </td>"; $query2="select mp_id from m_matapelajaran where mp_status = 1 order by mp_id asc"; $iDataArray2=sAllData($query2); for($a2=0,$b2=count($iDataArray2);$a2<$b2;$a2++) { $query3 = "select min(abs((a.na_total+b.na_total)/2)) as namin from posting_na a left join posting_na b on a.id_kelas = b.id_kelas and a.id_mp = b.id_mp and a.id_ta = b.id_ta and a.id_siswa = b.id_siswa where a.na_total <> 0 and a.id_kelas = ".$id_kelas." and a.id_mp = ".$iDataArray2[$a2]["mp_id"]." and a.id_ta = ".$id_ta." and a.id_sem = 1 and b.id_sem = 2"; // echo $query3."<br>"; $iDataArray3=sAllData($query3); for($e=0,$f=count($iDataArray3);$e<$f;$e++) { $namin = round($iDataArray3[$e]["namin"]); } echo "<td align=center><font face=\"Times New Roman\" size=\"1\">".round($namin)."</td>"; $total_min = ($total_min+$namin); } echo "<td align=center><font face=\"Times New Roman\" size=\"1\">".$total_min."</td>"; echo "</tr>"; echo "</table>"; ?>