[ Mini Kiebo ]
Server: Windows NT DESKTOP-5B8S0D4 6.2 build 9200 (Windows 8 Professional Edition) i586
Path:
D:
/
Backup
/
05122024
/
htdocs
/
siakad
/
akademik
/
Laporan13
/
[
Home
]
File: MonitoringNilai.inc.php
<?php $title = $nmsd." : Rekap Nilai"; $nmForm = "index.php?MonitoringNilai"; $nmTable = "p_nilai_siswa2"; //deskripsikan nama variabel $nilai_siswa_id = ""; $prosentase_alokasi = ""; $id_kelas = ""; $id_mp = ""; $siswa_kelas = ""; $siswa_mp = ""; $tema_nama = ""; $alert = 0; $id_tema = ""; //hak akses $formnama = "rekap_uas"; $registerform = lastlogin($_SESSION["user-id"],$formnama); if(isset($_SESSION["id-profil"])) $idlogprof = $_SESSION["id-profil"]; else $idlogprof = 0; if($idlogprof == 0) echo "<script>window.alert('".$lsm."');location.href='index.php';</script>"; $hakakses = cekhakakses($idlogprof,$formnama); if($hakakses[0] == 0) echo "<script>window.alert('".$erme."');location.href='mainform.php';</script>"; if($hakakses[1] == 0) $bt_simpan = " "; if($hakakses[3] == 0) $bt_multipledelete = " "; $query="select * from m_wali_kelas a left join m_kelas b on a.id_kelas = b.kelas_id where id_ta = ".$id_ta." and (id_pgw = ".$_SESSION["id-pgw"]." or id_pgw2 = ".$_SESSION["id-pgw"].")"; // echo $query; $iDataArray=sAllData($query); for($a=0,$b=1;$a<$b;$a++) { $id_pgw = $iDataArray[$a]["id_pgw"]; $id_pgw2 = $iDataArray[$a]["id_pgw2"]; $id_kelas = $iDataArray[$a]["id_kelas"]; $kelas_kode = substr($iDataArray[$a]["kelas_kode"],0,2); $siswa_kelas = $iDataArray[$a]["kelas_nama"]; // echo $id_kelas; } // if($id_kelas == 0 || !$id_kelas) echo "<script>window.alert('".$erme."');location.href='mainform.php';</script>"; // if($kelas_kode == 1 || $kelas_kode == 22) { // }else echo "<script>window.alert('".$erme."');location.href='mainform.php';</script>"; //deskripsikan get variabel $edit = ""; if(!isset($_GET["edit"])) $_GET["edit"] = ""; else $edit = $_GET["edit"]; $delete = ""; if(!isset($_GET["delete"])) $_GET["delete"] = ""; else $delete = $_GET["delete"]; ?> <?php echo "<title>".$title."</title>";?> <script> $(function() { $( "#dialog-rekap" ).dialog({ autoOpen: false, resizable: false, draggable: false, height: $(window).height()-40, width: $(window).width()-40, modal: true, close: function() { allFields.val( "" ).removeClass( "ui-state-error" ); } }); $( "#dialog-rekap-tema" ).dialog({ autoOpen: false, resizable: false, draggable: false, height: $(window).height()-40, width: $(window).width()-340, modal: true, close: function() { allFields.val( "" ).removeClass( "ui-state-error" ); } }); $( "#dialog-prev-nilai" ).dialog({ autoOpen: false, resizable: false, draggable: false, height: 200, width: 1000, modal: true, buttons: { Cancel: function() { $( this ).dialog( "close" ); } }, close: function() { allFields.val( "" ).removeClass( "ui-state-error" ); } }); $( "#dialog-form" ).dialog({ autoOpen: false, resizable: false, draggable: false, height: 350, width: 650, modal: true, buttons: { Cancel: function() { $( this ).dialog( "close" ); } }, close: function() { allFields.val( "" ).removeClass( "ui-state-error" ); } }); $( "#dialog-form2" ).dialog({ autoOpen: false, resizable: false, draggable: false, height: 600, width: 450, modal: true, buttons: { Cancel: function() { $( this ).dialog( "close" ); } }, close: function() { allFields.val( "" ).removeClass( "ui-state-error" ); } }); $( "#dialog-form3" ).dialog({ autoOpen: false, resizable: false, draggable: false, height: 300, width: 350, modal: true, buttons: { Cancel: function() { $( this ).dialog( "close" ); } }, close: function() { allFields.val( "" ).removeClass( "ui-state-error" ); } }); $( "#create-user" ) .click(function() { $( "#dialog-form" ).dialog( "open" ); }); $( "#create-user2" ) .click(function() { $( "#dialog-form2" ).dialog( "open" ); }); $( "#create-user3" ) .click(function() { $( "#dialog-form3" ).dialog( "open" ); }); $( "#show-prev-siswa" ) .click(function() { $( "#dialog-prev-nilai" ).dialog( "open" ); }); $( "#cetak-rekap" ) .click(function() { $( "#dialog-rekap" ).dialog( "open" ); showrekap(); }); $( "#print-rekap" ) .click(function() { printrekap(); }); $( "#print-rekap-kd" ) .click(function() { printrekapkd(); }); $( "#cetak-rekap-tema" ) .click(function() { $( "#dialog-rekap-tema" ).dialog( "open" ); showrekaptema(); }); $( "#print-rekap-tema" ) .click(function() { printrekaptema(); }); }); function printrekap(){ id_kelas = document.getElementById('id_kelas').value; id_ta = document.getElementById('id_ta').value; id_sem = document.getElementById('id_sem').value; id_mp = document.getElementById('id_mp').value; nilai_jenis = document.getElementById('nilai_jenis').value; window.open("ajax/rekap_nilai_baru.php?nilai_jenis="+nilai_jenis+"&id_mp="+id_mp+"&id_ta="+id_ta+"&id_sem="+id_sem+"&id_kelas="+id_kelas); } function printrekapkd(){ id_kelas = document.getElementById('id_kelas').value; id_ta = document.getElementById('id_ta').value; id_sem = document.getElementById('id_sem').value; id_mp = document.getElementById('id_mp').value; nilai_jenis = document.getElementById('nilai_jenis').value; window.open("ajax/rekap_nilai_baru_kd.php?nilai_jenis="+nilai_jenis+"&id_mp="+id_mp+"&id_ta="+id_ta+"&id_sem="+id_sem+"&id_kelas="+id_kelas); } function showrekap(){ document.getElementById('rekap').innerHTML="Please wait,... Loading data rekap nilai siswa..."; if (window.XMLHttpRequest){ xmlhttp=new XMLHttpRequest(); }else{ xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4 && xmlhttp.status==200){ document.getElementById('rekap').innerHTML=xmlhttp.responseText; } } id_kelas = document.getElementById('id_kelas').value; id_ta = document.getElementById('id_ta').value; id_sem = document.getElementById('id_sem').value; id_mp = document.getElementById('id_mp').value; nilai_jenis = document.getElementById('nilai_jenis').value; xmlhttp.open("GET","ajax/rekap_nilai_baru.php?nilai_jenis="+nilai_jenis+"&id_mp="+id_mp+"&id_ta="+id_ta+"&id_sem="+id_sem+"&id_kelas="+id_kelas,true); xmlhttp.send(); } function printrekaptema(){ id_kelas = document.getElementById('id_kelas').value; id_ta = document.getElementById('id_ta').value; id_sem = document.getElementById('id_sem').value; id_mp = document.getElementById('id_mp').value; id_tema = document.getElementById('id_tema').value; nilai_jenis = document.getElementById('nilai_jenis').value; window.open("ajax/rekap_nilai_tema.php?nilaike=0&nilai_jenis="+nilai_jenis+"&id_tema="+id_tema+"&id_mp="+id_mp+"&id_ta="+id_ta+"&id_sem="+id_sem+"&id_kelas="+id_kelas); } function showrekaptema(){ document.getElementById('rekaptema').innerHTML="Please wait,... Loading data rekap nilai siswa..."; if (window.XMLHttpRequest){ xmlhttp=new XMLHttpRequest(); }else{ xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4 && xmlhttp.status==200){ document.getElementById('rekaptema').innerHTML=xmlhttp.responseText; } } id_kelas = document.getElementById('id_kelas').value; id_ta = document.getElementById('id_ta').value; id_sem = document.getElementById('id_sem').value; id_mp = document.getElementById('id_mp').value; id_tema = document.getElementById('id_tema').value; nilai_jenis = document.getElementById('nilai_jenis').value; xmlhttp.open("GET","ajax/rekap_nilai_tema.php?nilaike=0&nilai_jenis="+nilai_jenis+"&id_tema="+id_tema+"&id_mp="+id_mp+"&id_ta="+id_ta+"&id_sem="+id_sem+"&id_kelas="+id_kelas,true); xmlhttp.send(); } function report_xls(a,b,c,d){ id_ta = b; id_sem = a; id_tema = d; id_kelas = c; window.open("ajax/p_nilai_tema_xls.php?id_kelas="+id_kelas+"&id_tema="+id_tema+"&id_ta="+id_ta+"&id_sem="+id_sem); } </script> <script> function waktupilih3(a,b) { document.getElementById('tema_nama').value = b; document.getElementById('id_tema').value = a; $('#modalWider2').modal('hide'); } function waktupilih(a,b) { document.getElementById('siswa_kelas').value = b; document.getElementById('id_kelas').value = a; $('#modalWider').modal('hide'); } function waktupilih2(a,b) { document.getElementById('siswa_mp').value = b; document.getElementById('id_mp').value = a; $('#modalWider3').modal('hide'); } </script> <!-- Modal Default --> <div class="modal fade" id="modalWider" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">Silahkan Pilih Kelas</h4> </div> <div class="modal-body"> <?php echo "<table class=\"table table-hover\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\" margin: 0; width: 100%;\">"; echo "<tr>"; $query="select * from m_kelas where length(kelas_kode) = 2 order by kelas_kode asc"; $iDataArray=sAllData($query); for($a=0,$b=count($iDataArray);$a<$b;$a++) { echo "<td><b>Kelas ".$iDataArray[$a]["kelas_nama"]."</b><br>"; $query2="select * from m_kelas where substr(kelas_kode,1,2) = ".$iDataArray[$a]["kelas_kode"]." and length(kelas_kode) = 4 order by kelas_kode asc"; $iDataArray2=sAllData($query2); for($ax=0,$bx=count($iDataArray2);$ax<$bx;$ax++) { echo "<input name=\"kelasid\" id=\"kelasid\" type=radio value=\"".$iDataArray2[$ax]["kelas_id"]."\" onclick=\"waktupilih(".$iDataArray2[$ax]["kelas_id"].",'".$iDataArray2[$ax]["kelas_nama"]."');\"> ".$iDataArray2[$ax]["kelas_nama"]."<br>"; } echo "</td>"; } echo "</tr>"; echo "</table>"; ?> </div> <div class="modal-footer"> <button type="button" class="btn btn-link" data-dismiss="modal">Close</button> </div> </div> </div> </div> <!-- Modal Default --> <div class="modal fade" id="modalWider3" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">Silahkan Pilih Mata Pelajaran</h4> </div> <div class="modal-body"> <?php echo "<table class=\"table table-striped\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\" margin: 0; width: 100%;\">"; $query="select * 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 "<tr>"; echo "<td>"; echo "<input name=\"mpid\" id=\"mpid\" type=radio value=\"".$iDataArray[$a]["mp_id"]."\" onclick=\"waktupilih2(".$iDataArray[$a]["mp_id"].",'".$iDataArray[$a]["mp_nama"]."');\"> ".$iDataArray[$a]["mp_nama"]; echo "</td>"; echo "</tr>"; } echo "</table>"; ?> </div> <div class="modal-footer"> <button type="button" class="btn btn-link" data-dismiss="modal">Close</button> </div> </div> </div> </div> <!-- Modal Default --> <div class="modal fade" id="modalWider2" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">Silahkan Pilih Tema</h4> </div> <div class="modal-body"> <?php echo "<table class=\"table table-hover\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\" margin: 0; width: 100%;\">"; // $query="select jenis_nilai_tree,jenis_nilai_urutan,tema_nama,jenis_nilai_id,tema_nama,b.id_kelas as kelas_kode from m_jenis_nilai2 a left join m_set_tema b on a.id_tema = b.tema_id where a.id_ta = ".$id_ta." and a.id_sem = ".$id_sem." order by jenis_nilai_urutan asc"; // echo $query; $query="select a.*,length(tema_kode) as panjang from sab_set_tema a where id_ta = ".$id_ta." and id_sem = ".$id_sem." order by tema_kode asc"; $iDataArray=sAllData($query); echo "<tr>"; echo "<td>"; for($a=0,$b=count($iDataArray);$a<$b;$a++) { $jum_str = $iDataArray[$a]["panjang"]; if($jum_str == 2 || $jum_str < 4) { echo " - <b>".$iDataArray[$a]["tema_nama"]."</b><br>"; } else echo "<input name=\"tema_id\" id=\"tema_id\" type=radio value=\"".$iDataArray[$a]["tema_id"]."\" onclick=\"waktupilih3(".$iDataArray[$a]["tema_id"].",'".$iDataArray[$a]["tema_nama"]."');\"> ".$iDataArray[$a]["tema_nama"]."<br>"; } echo "</td>"; echo "</tr>"; echo "</table>"; ?> </div> <div class="modal-footer"> <button type="button" class="btn btn-link" data-dismiss="modal">Close</button> </div> </div> </div> </div> <section id="content"> <div class="container"> <div class="card"> <div class="card-header"> <h2>Monitoring Nilai Siswa <small>Form berikut ini berisi tentang monitoring nilai</small></h2> </div> <div class="card-body"> <?php echo "<form id=\"fanform\" name=\"fanform\" method=\"POST\" action=\"".$nmForm."\">"; echo "<table class=\"table table-striped\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\" margin: 0; width: 100%;\">"; echo "<tr>"; echo "<td width=28%><b>Tahun Ajaran</b></td>"; echo "<td width=2%>:</td>"; if(isset($_POST["id_ta"])) $id_ta = $_POST["id_ta"]; $cmbox = "<select class=\"form-control\"id=\"id_ta\" name=\"id_ta\">"; $cmbox .= iComboB(0,0,$id_ta,""); $query="select * from m_tahun_ajaran order by ta_id asc"; $iDataArray=sAllData($query); for($a=0,$b=count($iDataArray);$a<$b;$a++) { $cmbox .= iComboB($iDataArray[$a]["ta_id"],$iDataArray[$a]["ta_id"],$id_ta,$iDataArray[$a]["ta_nama"]); } $cmbox .= "</select>"; echo "<td>".$cmbox."</td>"; echo "</tr>"; echo "<tr>"; echo "<td width=28%><b>Semester</b></td>"; echo "<td width=2%>:</td>"; if(isset($_POST["id_sem"])) $id_sem = $_POST["id_sem"]; $cmbox = "<select class=\"form-control\"id=\"id_sem\" name=\"id_sem\">"; $cmbox .= iComboB(0,0,$id_sem,""); $query="select * from m_semester order by sem_id asc"; $iDataArray=sAllData($query); for($a=0,$b=count($iDataArray);$a<$b;$a++) { $cmbox .= iComboB($iDataArray[$a]["sem_id"],$iDataArray[$a]["sem_id"],$id_sem,$iDataArray[$a]["sem_nama"]); } $cmbox .= "</select>"; echo "<td>".$cmbox."</td>"; echo "</tr>"; echo "<tr>"; echo "<td width=28%><b>Jenis Penilaian</b></td>"; echo "<td width=2%>:</td>"; if(isset($_POST["nilai_jenis"])) $nilai_jenis = $_POST["nilai_jenis"]; $cmbox = "<select class=\"form-control\"id=\"nilai_jenis\" name=\"nilai_jenis\">"; $cmbox .= iComboB(0,0,$nilai_jenis,""); $cmbox .= iComboB("Pengetahuan","Pengetahuan",$nilai_jenis,"Pengetahuan"); $cmbox .= iComboB("Ketrampilan","Ketrampilan",$nilai_jenis,"Ketrampilan"); $cmbox .= "</select>"; echo "<td>".$cmbox."</td>"; echo "</tr>"; echo "<tr>"; echo "<td width=28%><b>Kelas</b></td>"; echo "<td width=2%>:</td>"; if(isset($_POST["id_kelas"])) $id_kelas = $_POST["id_kelas"]; if(isset($_POST["siswa_kelas"])) $siswa_kelas = $_POST["siswa_kelas"]; echo "<td width=70%>".iTBox("45","255","siswa_kelas",$siswa_kelas,"style=\"width: 15%;\" readonly")."".iTextH("id_kelas",$id_kelas)." ".iBtn2("create-user","Pilih Kelas","data-toggle=\"modal\" href=\"#modalWider\"")."</td>"; echo "</tr>"; echo "<tr>"; echo "<td width=28%><b>Mata Pelajaran</b></td>"; echo "<td width=2%>:</td>"; if(isset($_POST["id_mp"])) $id_mp = $_POST["id_mp"]; if(isset($_POST["siswa_mp"])) $siswa_mp = $_POST["siswa_mp"]; echo "<td width=70%>".iTBox("45","255","siswa_mp",$siswa_mp,"style=\"width: 55%;\" readonly")."".iTextH("id_mp",$id_mp)." ".iBtn2("create-user2","Pilih Pelajaran","data-toggle=\"modal\" href=\"#modalWider3\"")."</td>"; echo "</tr>"; echo "<tr>"; echo "<td width=28%><b>Tema</b></td>"; echo "<td width=2%>:</td>"; if(isset($_POST["id_tema"])) $id_tema = $_POST["id_tema"]; if(isset($_POST["tema_nama"])) $tema_nama = $_POST["tema_nama"]; echo "<td width=70%>".iTBox("45","255","tema_nama",$tema_nama,"style=\"width: 45%;\" readonly")."".iTextH("id_tema",$id_tema)." ".iBtn2("create-user3","Pilih Tema","data-toggle=\"modal\" href=\"#modalWider2\"")."</td>"; echo "</tr>"; echo "<tr>"; echo "<td> </td>"; echo "<td> </td>"; // echo "<td> ".iBtn2("cetak-rekap","Preview","")." ".iBtn2("print-rekap","Cetak","")." ".iBtn2("xls-rekap","Export Excel","")."</td>"; // echo "<td> ".iBtn2("cetak-rekap-tema","Rekap per Tema","")." ".iBtn2("print-rekap-tema","Print Rekap per Tema","")." ".iBtn2("cetak-rekap","Preview Rekap","")." ".iBtn2("print-rekap","Print Rekap","")."</td>"; echo "<td> ".iBtn2("print-rekap-tema","Print Rekap per Tema","onclick='printrekaptema();'")." ".iBtn2("print-rekap","Print Rekap","onclick='printrekap();'")." ".iBtn2("print-rekap-kd","Print Rekap KD","onclick='printrekapkd();'")."</td>"; echo "</tr>"; echo "</table>"; ?> <br> </div> </div> </div> </section>