Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php error_reporting(E_ALL ^ (E_NOTICE | E_WARNING | E_DEPRECATED)); ?> <?php requir..
Decoded Output download
<?php
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING | E_DEPRECATED));
?>
<?php
require_once('koneksi.php');
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ARD Madrasah modified @ Gik </title>
<!-- BOOTSTRAP STYLES-->
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<!-- FONTAWESOME STYLES-->
<link href="assets/css/font-awesome.css" rel="stylesheet" />
<!-- CUSTOM STYLES-->
<link href="assets/css/custom.css" rel="stylesheet" />
<!-- GOOGLE FONTS-->
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
<link href="assets/AdminLTE.min.css"rel="stylesheet" type='text/css'/>
<link href="assets/js/dataTables/dataTables.bootstrap.css" rel="stylesheet" />
<style type="text/css">
.not-active {
pointer-events: none;
cursor: default;
}
.logo{
color:white;
font-family:Arial;
font-weight:bold;
}
@media only screen and (max-width:2160px) and (min-width:800px){
.menu_samping{
height: 100%;
}
}
.select2-container--default .select2-selection--multiple .select2-selection__choice{
color:black;
}
</style>
</head>
<body>
<div id="wrapper">
<nav class="navbar navbar-default navbar-cls-top " role="navigation" style="margin-bottom: 0">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand hidden-xs" href="index.html">
<img src="assets/img/logo_ard.png" />
</a>
</div>
<div class="pull-right navbar-custom-menu">
<ul class="nav navbar-nav ">
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<img src="assets/img/find_user.png" class="user-image" alt="User Image">
</a>
</li>
</ul>
</div>
</nav>
<!-- /. NAV TOP -->
<nav class="menu_samping navbar-default navbar-side" role="navigation">
<div class="sidebar-collapse">
<ul class="nav" id="main-menu">
<li class="text-center">
<img src="assets/img/logo_user.png" class=" user-image img-responsive"/>
<label style="color:#f3f3f3; margin-top:-20px; padding:1% 0%;">Operator Guru</label>
</li>
<li>
<a class="active-menu" href="index.php" style="color:#FFFFFF;"><i class="fa fa-dashboard fa-1x"></i> Dashboard</a>
</li>
<li>
<a href="#" style="color:#FFFFFF;"><i class="fa fa-cog fa-1x"></i> Konfigurasi<span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li>
<a href="ranking.php" style="color:#FFFFFF;">Rekapitulasi</a>
</li>
<li>
<a href="pts.php" style="color:#FFFFFF;">Penilaian Tengah Semester</a>
</li>
<li>
<a href="leger.php" style="color:#FFFFFF;">Leger Per Kelas</a>
</li>
</ul>
</li>
</ul>
</div>
</nav>
<!-- /. NAV SIDE -->
<div id="page-wrapper" >
<div id="page-inner">
<div class="row">
<div class="col-md-12">
<div class="pull-left">
<h3>PENILAIAN TENGAH SEMESTER</h3>
</div>
<div class="pull-right">
</div>
<div class="clearfix"></div>
</div>
</div>
<!-- /. ROW -->
<div class="row">
<div class="col-md-12">
<div class="box box-danger">
<div class="box-body">
<div class="row-fluid">
<div class="bs-callout bs-callout-warning" align="center">
<div>
<p align="justify">
<b>Perhatian: </b><br>
Sebelum Anda melakukan download PTS, pastikan Raport Siswa sudah tercetak dan semua Siswa sudah memiliki nilai dari seluruh mata pelajaran. Apabila ada Nilai Mata pelajaran yang belum masuk, akan sangat mempengaruhi urutan dari posisi nilai dengan mata pelajaran. Supaya tidak terjadi kesalahan pada saat proses download data, pastikan hal tersebut diatas telah terselesaikan.<br>
Untuk download file excel, silahkan menuju kebawah tabel. <br>
<b>Salam Madrasah Hebat Bermartabat @ Gik .......</b><br>
</p>
</div>
</div>
</div>
<form role="form" method="get">
<div class="form-group input-group">
<input type="text" name="data_nsm" class="form-control" placeholder="masukkan NSM disini....">
<span class="input-group-btn">
<button class="btn btn-default" type="submit"><i class="fa fa-search"></i>
</button>
</span>
</div>
</form>
<?php if (isset($_GET['data_nsm']))
$cari = $_GET['data_nsm'];
$query2 = "SELECT * FROM entity__school WHERE school_nsm = '$cari'";
$sql = mysqli_query($koneksi, $query2);
$r = mysqli_fetch_assoc($sql);
$id_mdr = $r['school_id'];
$total_mdr = mysqli_num_rows ($sql);
?>
<?php if ($total_mdr > 0) { ?>
<div class="panel panel-default" style="border-left: #00CC66 solid 5px;">
<div class="panel-body">
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>NSM</th>
<th>NPSN</th>
<th>NAMA MADRASAH</th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo $r['school_nsm']; ?></td>
<td><?php echo $r['school_npsn']; ?></td>
<td><?php echo $r['school_name']; ?></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<form method="post">
<div class="col-md-10">
<div class="row">
<div class="col-md-12 padding-sm">
<select class="form-control" name="kelas_id" required>
<option value="">Pilih Kelas</option>
<?php
$query3 = "SELECT * FROM entity__school_class WHERE school_id = '$id_mdr' order by category_level_id, school_class_name";
$sql1 = mysqli_query($koneksi, $query3);
while ($r2 = mysqli_fetch_assoc($sql1))
{?>
<?php
if ($_POST['kelas_id'] == $r2['school_class_id']) $selected1 = "selected"; else $selected1 = "";?>
<option value="<?php echo $r2['school_class_id'];?>" <?php echo $selected1; ?>><?php echo $r2['category_level_id']; ?><?php echo $r2['school_class_name']; ?></option>
<?php }?>
</select>
</div>
</div>
</div>
<div class="col-md-2 padding-sm">
<button type="submit" class="btn btn-md btn-default form-control">
<i class="fa fa-search"></i> Cari
</button>
</div>
</form>
<?php } ?>
<?php
$no = 1;
$level_klas = "select * from entity__school_class where school_class_id='".$_POST['kelas_id']."'";
$levklas = mysqli_query($koneksi, $level_klas);
$row_levklas = mysqli_fetch_assoc ($levklas);
$level_id = $row_levklas['category_level_id'];
$level_siswa = "select * from entity__student where school_class_id='".$_POST['kelas_id']."'";
$levis = mysqli_query($koneksi, $level_siswa);
while ($row_levis = mysqli_fetch_assoc ($levis)) {
$nama_siswa[] = $row_levis['student_name'];}
$sql_mapel = "select * from entity__category_subjects where category_level_id='$level_id'";
$data_mapel = mysqli_query($koneksi, $sql_mapel);
$jum_mum = mysqli_num_rows ($data_mapel);
while ($row_mapel = mysqli_fetch_assoc ($data_mapel)) {
$mapel1 []= $row_mapel ['category_subjects_name'];}
$sql_lokal = "select * from entity__local_subjects_value where category_level_id='$level_id' and school_id='$id_mdr' order by category_level_id";
$data_lokal = mysqli_query($koneksi, $sql_lokal);
$jum_lok = mysqli_num_rows ($data_lokal);
while ($row_lokal = mysqli_fetch_assoc ($data_lokal)) {
$lokal []= $row_lokal ['local_subjects_value_name'];}
$sql_siswa = "select * from entity__student where school_class_id='".$_POST['kelas_id']."' and school_id='$id_mdr' order by student_name asc";
$sql_levis = mysqli_query($koneksi, $sql_siswa);
$jum_sis = mysqli_num_rows ($sql_levis);
?>
<?php if ($jum_sis > 0) {?>
<form method="post" action="pts_excel.php">
<div class="row">
<div class="col-md-12">
<!-- Kitchen Sink -->
<div class="panel panel-default">
<div class="panel-heading" style="background: #CACAFF; color: #000000; font-size:14px;">DAFTAR NILAI PENILAIAN TENGAH SEMESTER</div>
<div class="panel-body">
<div class="table-responsive" style="overflow-x: auto">
<table class="table table-bordered ">
<thead>
<tr>
<th width="5%" valign="top" bgcolor="#EBEBEB">NO</th>
<th valign="top" bgcolor="#EBEBEB">NAMA</th>
<th valign="top" bgcolor="#EBEBEB">JENIS NILAI</th>
<?php
foreach ($mapel1 as $tamap) {?>
<th valign="top" bgcolor="#EBEBEB">
<?php echo $tamap; ?>
<input name="mu[]" type="hidden" value="<?php echo $tamap; ?>"> </th>
<?php }?>
<?php
foreach ($lokal as $lok) {?>
<th valign="top" bgcolor="#EBEBEB">
<?php echo $lok; ?>
<input name="mlok[]" type="hidden" value="<?php echo $lok; ?>"> </th>
<?php }?>
<th valign="top" bgcolor="#DDDDFF">JUMLAH</th>
<th valign="top" bgcolor="#DDDDFF">RATA-RATA</th>
</tr>
</thead>
<tbody>
<?php
while ($tampil = mysqli_fetch_assoc ($sql_levis)) {
?>
<tr>
<td rowspan="4"><?php echo $no; ?></td>
<td rowspan="4">
<?php echo $tampil ['student_name']; ?>
<input name="nama_siswa[]" type="hidden" value="<?php echo $tampil ['student_name']; ?>">
<input name="s_id[]" type="hidden" value="<?php echo $tampil ['student_id']; ?>"> </td>
<td>Pengetahuan</td>
<?php
$p_siswa = "select * from entity__student_subjects_value, entity__subjects_value, entity__category_subjects where entity__student_subjects_value.subjects_value_id=entity__subjects_value.subjects_value_id and entity__subjects_value.category_subjects_id=entity__category_subjects.category_subjects_id and entity__student_subjects_value.student_id='".$tampil['student_id']."' order by entity__category_subjects.category_subjects_id";
$nilai_p = mysqli_query($koneksi, $p_siswa);
while ($np = mysqli_fetch_assoc ($nilai_p))
{?>
<td>
<?php echo $np['student_subjects_value_knowledge_total'];?></td>
<?php }?>
<?php
$lp_siswa = "select * from entity__local_subjects_value, entity__student_local_subjects_value where entity__local_subjects_value.local_subjects_value_id=entity__student_local_subjects_value.local_subjects_value_id and entity__student_local_subjects_value.student_id='".$tampil['student_id']."' order by entity__local_subjects_value.local_subjects_value_id";
$nilai_lp = mysqli_query($koneksi, $lp_siswa);
while ($nlp = mysqli_fetch_assoc ($nilai_lp))
{?>
<td><?php echo $nlp['student_local_subjects_value_knowledge_total']; ?></td>
<?php }?>
<?php
$jp_siswa = "select *, SUM(student_subjects_value_knowledge_total) as jp from entity__student_subjects_value where student_id='".$tampil['student_id']."'";
$nilai_jp = mysqli_query($koneksi, $jp_siswa);
$njp = mysqli_fetch_assoc ($nilai_jp);
$jlp_siswa = "select *, SUM(student_local_subjects_value_knowledge_total) as jlp from entity__student_local_subjects_value where student_id='".$tampil['student_id']."'";
$nilai_jlp = mysqli_query($koneksi, $jlp_siswa);
$njlp = mysqli_fetch_assoc ($nilai_jlp);
?>
<td rowspan="2" valign="middle" bgcolor="#DDDDFF"><?php
$jutotp = $njp['jp'] + $njlp['jlp'];
echo "$jutotp"; ?></td>
<td rowspan="2" valign="middle" bgcolor="#DDDDFF"><?php
$pembagi = $jum_lok + $jum_mum;
$rps = $jutotp/$pembagi;
$rp = round ($rps);
echo "$rp";
?>
</td>
</tr>
<tr>
<td>Predikat</td>
<?php
$p_pred = "select * from entity__student_subjects_value, entity__subjects_value, entity__category_subjects where entity__student_subjects_value.subjects_value_id=entity__subjects_value.subjects_value_id and entity__subjects_value.category_subjects_id=entity__category_subjects.category_subjects_id and entity__student_subjects_value.student_id='".$tampil['student_id']."' order by entity__category_subjects.category_subjects_id";
$nilai_pred = mysqli_query($koneksi, $p_pred);
while ($npred = mysqli_fetch_assoc ($nilai_pred))
{?>
<td>
<?php echo $npred['student_subjects_value_knowledge_predicate'];?></td>
<?php }?>
<?php
$lp_pred = "select * from entity__local_subjects_value, entity__student_local_subjects_value where entity__local_subjects_value.local_subjects_value_id=entity__student_local_subjects_value.local_subjects_value_id and entity__student_local_subjects_value.student_id='".$tampil['student_id']."' order by entity__local_subjects_value.local_subjects_value_id";
$nilai_lpred = mysqli_query($koneksi, $lp_pred);
while ($nlppred = mysqli_fetch_assoc ($nilai_lpred))
{?>
<td><?php echo $nlppred['student_local_subjects_value_knowledge_predicate']; ?></td>
<?php }?>
</tr>
<tr>
<td>Keterampilan</td>
<?php
$k_siswa = "select * from entity__student_subjects_value, entity__subjects_value, entity__category_subjects where entity__student_subjects_value.subjects_value_id=entity__subjects_value.subjects_value_id and entity__subjects_value.category_subjects_id=entity__category_subjects.category_subjects_id and entity__student_subjects_value.student_id='".$tampil['student_id']."' order by entity__category_subjects.category_subjects_id";
$nilai_k = mysqli_query($koneksi, $k_siswa);
while ($nk = mysqli_fetch_assoc ($nilai_k))
{?>
<td><?php echo $nk['student_subjects_value_skill_total']; ?></td>
<?php }?>
<?php
$lk_siswa = "select * from entity__local_subjects_value, entity__student_local_subjects_value where entity__local_subjects_value.local_subjects_value_id=entity__student_local_subjects_value.local_subjects_value_id and entity__student_local_subjects_value.student_id='".$tampil['student_id']."' order by entity__local_subjects_value.local_subjects_value_id";
$nilai_lk = mysqli_query($koneksi, $lk_siswa);
while ($nlk = mysqli_fetch_assoc ($nilai_lk))
{?>
<td><?php echo $nlk['student_local_subjects_value_skill_total']; ?></td>
<?php }?>
<?php
$jk_siswa = "select *, SUM(student_subjects_value_skill_total) as jk from entity__student_subjects_value where student_id='".$tampil['student_id']."'";
$nilai_jk = mysqli_query($koneksi, $jk_siswa);
$njk = mysqli_fetch_assoc ($nilai_jk);
$jlk_siswa = "select *, SUM(student_local_subjects_value_skill_total) as jlk from entity__student_local_subjects_value where student_id='".$tampil['student_id']."'";
$nilai_jlk = mysqli_query($koneksi, $jlk_siswa);
$njlk = mysqli_fetch_assoc ($nilai_jlk);
?>
<td rowspan="2" valign="middle" bgcolor="#DDDDFF"><?php
$jutotk = $njk['jk'] + $njlk['jlk'];
echo "$jutotk"; ?></td>
<td rowspan="2" valign="middle" bgcolor="#DDDDFF"><?php
$rks = $jutotk/$pembagi;
$rk = round ($rks);
echo $rk ?></td>
</tr>
<tr>
<td>Predikat</td>
<?php
$k_pred = "select * from entity__student_subjects_value, entity__subjects_value, entity__category_subjects where entity__student_subjects_value.subjects_value_id=entity__subjects_value.subjects_value_id and entity__subjects_value.category_subjects_id=entity__category_subjects.category_subjects_id and entity__student_subjects_value.student_id='".$tampil['student_id']."' order by entity__category_subjects.category_subjects_id";
$nilai_kpred = mysqli_query($koneksi, $k_pred);
while ($nkpred = mysqli_fetch_assoc ($nilai_kpred))
{?>
<td>
<?php echo $nkpred['student_subjects_value_skill_predicate'];?></td>
<?php }?>
<?php
$lk_pred = "select * from entity__local_subjects_value, entity__student_local_subjects_value where entity__local_subjects_value.local_subjects_value_id=entity__student_local_subjects_value.local_subjects_value_id and entity__student_local_subjects_value.student_id='".$tampil['student_id']."' order by entity__local_subjects_value.local_subjects_value_id";
$nilai_lkpred = mysqli_query($koneksi, $lk_pred);
while ($nlkpred = mysqli_fetch_assoc ($nilai_lkpred))
{?>
<td><?php echo $nlkpred['student_local_subjects_value_skill_predicate']; ?></td>
<?php }?>
</tr>
<?php $no++;}?>
</tbody>
</table>
</div>
</div>
<div class="panel-footer">
JUMLAH DATA <?php echo $jum_sis; ?> SISWA
</div>
</div>
<button type="submit" class="btn btn-primary" name="cetak">
<i class="fa fa-save"></i> Download Excel Booos!
</button>
<input type="hidden" name="nama_skul" id="textfield" value="<?php echo $r['school_name']; ?>">
<input type="hidden" name="id_mdr" id="textfield" value="<?php echo $r['school_id']; ?>">
<!-- End Kitchen Sink -->
<input type="hidden" name="nsm" id="textfield2" value="<?php echo $r['school_nsm']; ?>">
<input type="hidden" name="npsn" id="textfield3" value="<?php echo $r['school_npsn']; ?>">
<input type="hidden" name="kelas" value="<?php echo "".$row_levklas['category_level_id']." - ".$row_levklas['school_class_name'].""; ?>">
<input type="hidden" name="kelas_id" value="<?php echo "".$row_levklas['category_level_id'].""; ?>">
</div>
</div>
</form>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
<!-- /. PAGE INNER -->
</div>
<!-- /. PAGE WRAPPER -->
</div>
<!-- /. WRAPPER -->
<!-- SCRIPTS -AT THE BOTOM TO REDUCE THE LOAD TIME-->
<!-- JQUERY SCRIPTS -->
<script src="assets/js/jquery-1.10.2.js"></script>
<!-- BOOTSTRAP SCRIPTS -->
<script src="assets/js/bootstrap.min.js"></script>
<!-- METISMENU SCRIPTS -->
<script src="assets/js/jquery.metisMenu.js"></script>
<!-- DATA TABLE SCRIPTS -->
<script src="assets/js/dataTables/jquery.dataTables.js"></script>
<script src="assets/js/dataTables/dataTables.bootstrap.js"></script>
<script>
$(document).ready(function () {
$('#dataTables-example').dataTable();
});
</script>
<!-- CUSTOM SCRIPTS -->
<script src="assets/js/custom.js"></script>
</body>
</html>
Did this file decode correctly?
Original Code
<?php
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING | E_DEPRECATED));
?>
<?php
require_once('koneksi.php');
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ARD Madrasah modified @ Gik </title>
<!-- BOOTSTRAP STYLES-->
<link href="assets/css/bootstrap.css" rel="stylesheet" />
<!-- FONTAWESOME STYLES-->
<link href="assets/css/font-awesome.css" rel="stylesheet" />
<!-- CUSTOM STYLES-->
<link href="assets/css/custom.css" rel="stylesheet" />
<!-- GOOGLE FONTS-->
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
<link href="assets/AdminLTE.min.css"rel="stylesheet" type='text/css'/>
<link href="assets/js/dataTables/dataTables.bootstrap.css" rel="stylesheet" />
<style type="text/css">
.not-active {
pointer-events: none;
cursor: default;
}
.logo{
color:white;
font-family:Arial;
font-weight:bold;
}
@media only screen and (max-width:2160px) and (min-width:800px){
.menu_samping{
height: 100%;
}
}
.select2-container--default .select2-selection--multiple .select2-selection__choice{
color:black;
}
</style>
</head>
<body>
<div id="wrapper">
<nav class="navbar navbar-default navbar-cls-top " role="navigation" style="margin-bottom: 0">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand hidden-xs" href="index.html">
<img src="assets/img/logo_ard.png" />
</a>
</div>
<div class="pull-right navbar-custom-menu">
<ul class="nav navbar-nav ">
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<img src="assets/img/find_user.png" class="user-image" alt="User Image">
</a>
</li>
</ul>
</div>
</nav>
<!-- /. NAV TOP -->
<nav class="menu_samping navbar-default navbar-side" role="navigation">
<div class="sidebar-collapse">
<ul class="nav" id="main-menu">
<li class="text-center">
<img src="assets/img/logo_user.png" class=" user-image img-responsive"/>
<label style="color:#f3f3f3; margin-top:-20px; padding:1% 0%;">Operator Guru</label>
</li>
<li>
<a class="active-menu" href="index.php" style="color:#FFFFFF;"><i class="fa fa-dashboard fa-1x"></i> Dashboard</a>
</li>
<li>
<a href="#" style="color:#FFFFFF;"><i class="fa fa-cog fa-1x"></i> Konfigurasi<span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
<li>
<a href="ranking.php" style="color:#FFFFFF;">Rekapitulasi</a>
</li>
<li>
<a href="pts.php" style="color:#FFFFFF;">Penilaian Tengah Semester</a>
</li>
<li>
<a href="leger.php" style="color:#FFFFFF;">Leger Per Kelas</a>
</li>
</ul>
</li>
</ul>
</div>
</nav>
<!-- /. NAV SIDE -->
<div id="page-wrapper" >
<div id="page-inner">
<div class="row">
<div class="col-md-12">
<div class="pull-left">
<h3>PENILAIAN TENGAH SEMESTER</h3>
</div>
<div class="pull-right">
</div>
<div class="clearfix"></div>
</div>
</div>
<!-- /. ROW -->
<div class="row">
<div class="col-md-12">
<div class="box box-danger">
<div class="box-body">
<div class="row-fluid">
<div class="bs-callout bs-callout-warning" align="center">
<div>
<p align="justify">
<b>Perhatian: </b><br>
Sebelum Anda melakukan download PTS, pastikan Raport Siswa sudah tercetak dan semua Siswa sudah memiliki nilai dari seluruh mata pelajaran. Apabila ada Nilai Mata pelajaran yang belum masuk, akan sangat mempengaruhi urutan dari posisi nilai dengan mata pelajaran. Supaya tidak terjadi kesalahan pada saat proses download data, pastikan hal tersebut diatas telah terselesaikan.<br>
Untuk download file excel, silahkan menuju kebawah tabel. <br>
<b>Salam Madrasah Hebat Bermartabat @ Gik .......</b><br>
</p>
</div>
</div>
</div>
<form role="form" method="get">
<div class="form-group input-group">
<input type="text" name="data_nsm" class="form-control" placeholder="masukkan NSM disini....">
<span class="input-group-btn">
<button class="btn btn-default" type="submit"><i class="fa fa-search"></i>
</button>
</span>
</div>
</form>
<?php if (isset($_GET['data_nsm']))
$cari = $_GET['data_nsm'];
$query2 = "SELECT * FROM entity__school WHERE school_nsm = '$cari'";
$sql = mysqli_query($koneksi, $query2);
$r = mysqli_fetch_assoc($sql);
$id_mdr = $r['school_id'];
$total_mdr = mysqli_num_rows ($sql);
?>
<?php if ($total_mdr > 0) { ?>
<div class="panel panel-default" style="border-left: #00CC66 solid 5px;">
<div class="panel-body">
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>NSM</th>
<th>NPSN</th>
<th>NAMA MADRASAH</th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo $r['school_nsm']; ?></td>
<td><?php echo $r['school_npsn']; ?></td>
<td><?php echo $r['school_name']; ?></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<form method="post">
<div class="col-md-10">
<div class="row">
<div class="col-md-12 padding-sm">
<select class="form-control" name="kelas_id" required>
<option value="">Pilih Kelas</option>
<?php
$query3 = "SELECT * FROM entity__school_class WHERE school_id = '$id_mdr' order by category_level_id, school_class_name";
$sql1 = mysqli_query($koneksi, $query3);
while ($r2 = mysqli_fetch_assoc($sql1))
{?>
<?php
if ($_POST['kelas_id'] == $r2['school_class_id']) $selected1 = "selected"; else $selected1 = "";?>
<option value="<?php echo $r2['school_class_id'];?>" <?php echo $selected1; ?>><?php echo $r2['category_level_id']; ?><?php echo $r2['school_class_name']; ?></option>
<?php }?>
</select>
</div>
</div>
</div>
<div class="col-md-2 padding-sm">
<button type="submit" class="btn btn-md btn-default form-control">
<i class="fa fa-search"></i> Cari
</button>
</div>
</form>
<?php } ?>
<?php
$no = 1;
$level_klas = "select * from entity__school_class where school_class_id='".$_POST['kelas_id']."'";
$levklas = mysqli_query($koneksi, $level_klas);
$row_levklas = mysqli_fetch_assoc ($levklas);
$level_id = $row_levklas['category_level_id'];
$level_siswa = "select * from entity__student where school_class_id='".$_POST['kelas_id']."'";
$levis = mysqli_query($koneksi, $level_siswa);
while ($row_levis = mysqli_fetch_assoc ($levis)) {
$nama_siswa[] = $row_levis['student_name'];}
$sql_mapel = "select * from entity__category_subjects where category_level_id='$level_id'";
$data_mapel = mysqli_query($koneksi, $sql_mapel);
$jum_mum = mysqli_num_rows ($data_mapel);
while ($row_mapel = mysqli_fetch_assoc ($data_mapel)) {
$mapel1 []= $row_mapel ['category_subjects_name'];}
$sql_lokal = "select * from entity__local_subjects_value where category_level_id='$level_id' and school_id='$id_mdr' order by category_level_id";
$data_lokal = mysqli_query($koneksi, $sql_lokal);
$jum_lok = mysqli_num_rows ($data_lokal);
while ($row_lokal = mysqli_fetch_assoc ($data_lokal)) {
$lokal []= $row_lokal ['local_subjects_value_name'];}
$sql_siswa = "select * from entity__student where school_class_id='".$_POST['kelas_id']."' and school_id='$id_mdr' order by student_name asc";
$sql_levis = mysqli_query($koneksi, $sql_siswa);
$jum_sis = mysqli_num_rows ($sql_levis);
?>
<?php if ($jum_sis > 0) {?>
<form method="post" action="pts_excel.php">
<div class="row">
<div class="col-md-12">
<!-- Kitchen Sink -->
<div class="panel panel-default">
<div class="panel-heading" style="background: #CACAFF; color: #000000; font-size:14px;">DAFTAR NILAI PENILAIAN TENGAH SEMESTER</div>
<div class="panel-body">
<div class="table-responsive" style="overflow-x: auto">
<table class="table table-bordered ">
<thead>
<tr>
<th width="5%" valign="top" bgcolor="#EBEBEB">NO</th>
<th valign="top" bgcolor="#EBEBEB">NAMA</th>
<th valign="top" bgcolor="#EBEBEB">JENIS NILAI</th>
<?php
foreach ($mapel1 as $tamap) {?>
<th valign="top" bgcolor="#EBEBEB">
<?php echo $tamap; ?>
<input name="mu[]" type="hidden" value="<?php echo $tamap; ?>"> </th>
<?php }?>
<?php
foreach ($lokal as $lok) {?>
<th valign="top" bgcolor="#EBEBEB">
<?php echo $lok; ?>
<input name="mlok[]" type="hidden" value="<?php echo $lok; ?>"> </th>
<?php }?>
<th valign="top" bgcolor="#DDDDFF">JUMLAH</th>
<th valign="top" bgcolor="#DDDDFF">RATA-RATA</th>
</tr>
</thead>
<tbody>
<?php
while ($tampil = mysqli_fetch_assoc ($sql_levis)) {
?>
<tr>
<td rowspan="4"><?php echo $no; ?></td>
<td rowspan="4">
<?php echo $tampil ['student_name']; ?>
<input name="nama_siswa[]" type="hidden" value="<?php echo $tampil ['student_name']; ?>">
<input name="s_id[]" type="hidden" value="<?php echo $tampil ['student_id']; ?>"> </td>
<td>Pengetahuan</td>
<?php
$p_siswa = "select * from entity__student_subjects_value, entity__subjects_value, entity__category_subjects where entity__student_subjects_value.subjects_value_id=entity__subjects_value.subjects_value_id and entity__subjects_value.category_subjects_id=entity__category_subjects.category_subjects_id and entity__student_subjects_value.student_id='".$tampil['student_id']."' order by entity__category_subjects.category_subjects_id";
$nilai_p = mysqli_query($koneksi, $p_siswa);
while ($np = mysqli_fetch_assoc ($nilai_p))
{?>
<td>
<?php echo $np['student_subjects_value_knowledge_total'];?></td>
<?php }?>
<?php
$lp_siswa = "select * from entity__local_subjects_value, entity__student_local_subjects_value where entity__local_subjects_value.local_subjects_value_id=entity__student_local_subjects_value.local_subjects_value_id and entity__student_local_subjects_value.student_id='".$tampil['student_id']."' order by entity__local_subjects_value.local_subjects_value_id";
$nilai_lp = mysqli_query($koneksi, $lp_siswa);
while ($nlp = mysqli_fetch_assoc ($nilai_lp))
{?>
<td><?php echo $nlp['student_local_subjects_value_knowledge_total']; ?></td>
<?php }?>
<?php
$jp_siswa = "select *, SUM(student_subjects_value_knowledge_total) as jp from entity__student_subjects_value where student_id='".$tampil['student_id']."'";
$nilai_jp = mysqli_query($koneksi, $jp_siswa);
$njp = mysqli_fetch_assoc ($nilai_jp);
$jlp_siswa = "select *, SUM(student_local_subjects_value_knowledge_total) as jlp from entity__student_local_subjects_value where student_id='".$tampil['student_id']."'";
$nilai_jlp = mysqli_query($koneksi, $jlp_siswa);
$njlp = mysqli_fetch_assoc ($nilai_jlp);
?>
<td rowspan="2" valign="middle" bgcolor="#DDDDFF"><?php
$jutotp = $njp['jp'] + $njlp['jlp'];
echo "$jutotp"; ?></td>
<td rowspan="2" valign="middle" bgcolor="#DDDDFF"><?php
$pembagi = $jum_lok + $jum_mum;
$rps = $jutotp/$pembagi;
$rp = round ($rps);
echo "$rp";
?>
</td>
</tr>
<tr>
<td>Predikat</td>
<?php
$p_pred = "select * from entity__student_subjects_value, entity__subjects_value, entity__category_subjects where entity__student_subjects_value.subjects_value_id=entity__subjects_value.subjects_value_id and entity__subjects_value.category_subjects_id=entity__category_subjects.category_subjects_id and entity__student_subjects_value.student_id='".$tampil['student_id']."' order by entity__category_subjects.category_subjects_id";
$nilai_pred = mysqli_query($koneksi, $p_pred);
while ($npred = mysqli_fetch_assoc ($nilai_pred))
{?>
<td>
<?php echo $npred['student_subjects_value_knowledge_predicate'];?></td>
<?php }?>
<?php
$lp_pred = "select * from entity__local_subjects_value, entity__student_local_subjects_value where entity__local_subjects_value.local_subjects_value_id=entity__student_local_subjects_value.local_subjects_value_id and entity__student_local_subjects_value.student_id='".$tampil['student_id']."' order by entity__local_subjects_value.local_subjects_value_id";
$nilai_lpred = mysqli_query($koneksi, $lp_pred);
while ($nlppred = mysqli_fetch_assoc ($nilai_lpred))
{?>
<td><?php echo $nlppred['student_local_subjects_value_knowledge_predicate']; ?></td>
<?php }?>
</tr>
<tr>
<td>Keterampilan</td>
<?php
$k_siswa = "select * from entity__student_subjects_value, entity__subjects_value, entity__category_subjects where entity__student_subjects_value.subjects_value_id=entity__subjects_value.subjects_value_id and entity__subjects_value.category_subjects_id=entity__category_subjects.category_subjects_id and entity__student_subjects_value.student_id='".$tampil['student_id']."' order by entity__category_subjects.category_subjects_id";
$nilai_k = mysqli_query($koneksi, $k_siswa);
while ($nk = mysqli_fetch_assoc ($nilai_k))
{?>
<td><?php echo $nk['student_subjects_value_skill_total']; ?></td>
<?php }?>
<?php
$lk_siswa = "select * from entity__local_subjects_value, entity__student_local_subjects_value where entity__local_subjects_value.local_subjects_value_id=entity__student_local_subjects_value.local_subjects_value_id and entity__student_local_subjects_value.student_id='".$tampil['student_id']."' order by entity__local_subjects_value.local_subjects_value_id";
$nilai_lk = mysqli_query($koneksi, $lk_siswa);
while ($nlk = mysqli_fetch_assoc ($nilai_lk))
{?>
<td><?php echo $nlk['student_local_subjects_value_skill_total']; ?></td>
<?php }?>
<?php
$jk_siswa = "select *, SUM(student_subjects_value_skill_total) as jk from entity__student_subjects_value where student_id='".$tampil['student_id']."'";
$nilai_jk = mysqli_query($koneksi, $jk_siswa);
$njk = mysqli_fetch_assoc ($nilai_jk);
$jlk_siswa = "select *, SUM(student_local_subjects_value_skill_total) as jlk from entity__student_local_subjects_value where student_id='".$tampil['student_id']."'";
$nilai_jlk = mysqli_query($koneksi, $jlk_siswa);
$njlk = mysqli_fetch_assoc ($nilai_jlk);
?>
<td rowspan="2" valign="middle" bgcolor="#DDDDFF"><?php
$jutotk = $njk['jk'] + $njlk['jlk'];
echo "$jutotk"; ?></td>
<td rowspan="2" valign="middle" bgcolor="#DDDDFF"><?php
$rks = $jutotk/$pembagi;
$rk = round ($rks);
echo $rk ?></td>
</tr>
<tr>
<td>Predikat</td>
<?php
$k_pred = "select * from entity__student_subjects_value, entity__subjects_value, entity__category_subjects where entity__student_subjects_value.subjects_value_id=entity__subjects_value.subjects_value_id and entity__subjects_value.category_subjects_id=entity__category_subjects.category_subjects_id and entity__student_subjects_value.student_id='".$tampil['student_id']."' order by entity__category_subjects.category_subjects_id";
$nilai_kpred = mysqli_query($koneksi, $k_pred);
while ($nkpred = mysqli_fetch_assoc ($nilai_kpred))
{?>
<td>
<?php echo $nkpred['student_subjects_value_skill_predicate'];?></td>
<?php }?>
<?php
$lk_pred = "select * from entity__local_subjects_value, entity__student_local_subjects_value where entity__local_subjects_value.local_subjects_value_id=entity__student_local_subjects_value.local_subjects_value_id and entity__student_local_subjects_value.student_id='".$tampil['student_id']."' order by entity__local_subjects_value.local_subjects_value_id";
$nilai_lkpred = mysqli_query($koneksi, $lk_pred);
while ($nlkpred = mysqli_fetch_assoc ($nilai_lkpred))
{?>
<td><?php echo $nlkpred['student_local_subjects_value_skill_predicate']; ?></td>
<?php }?>
</tr>
<?php $no++;}?>
</tbody>
</table>
</div>
</div>
<div class="panel-footer">
JUMLAH DATA <?php echo $jum_sis; ?> SISWA
</div>
</div>
<button type="submit" class="btn btn-primary" name="cetak">
<i class="fa fa-save"></i> Download Excel Booos!
</button>
<input type="hidden" name="nama_skul" id="textfield" value="<?php echo $r['school_name']; ?>">
<input type="hidden" name="id_mdr" id="textfield" value="<?php echo $r['school_id']; ?>">
<!-- End Kitchen Sink -->
<input type="hidden" name="nsm" id="textfield2" value="<?php echo $r['school_nsm']; ?>">
<input type="hidden" name="npsn" id="textfield3" value="<?php echo $r['school_npsn']; ?>">
<input type="hidden" name="kelas" value="<?php echo "".$row_levklas['category_level_id']." - ".$row_levklas['school_class_name'].""; ?>">
<input type="hidden" name="kelas_id" value="<?php echo "".$row_levklas['category_level_id'].""; ?>">
</div>
</div>
</form>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
<!-- /. PAGE INNER -->
</div>
<!-- /. PAGE WRAPPER -->
</div>
<!-- /. WRAPPER -->
<!-- SCRIPTS -AT THE BOTOM TO REDUCE THE LOAD TIME-->
<!-- JQUERY SCRIPTS -->
<script src="assets/js/jquery-1.10.2.js"></script>
<!-- BOOTSTRAP SCRIPTS -->
<script src="assets/js/bootstrap.min.js"></script>
<!-- METISMENU SCRIPTS -->
<script src="assets/js/jquery.metisMenu.js"></script>
<!-- DATA TABLE SCRIPTS -->
<script src="assets/js/dataTables/jquery.dataTables.js"></script>
<script src="assets/js/dataTables/dataTables.bootstrap.js"></script>
<script>
$(document).ready(function () {
$('#dataTables-example').dataTable();
});
</script>
<!-- CUSTOM SCRIPTS -->
<script src="assets/js/custom.js"></script>
</body>
</html>
Function Calls
None |
Stats
MD5 | 8b65b02c264dfec8d4d77593b928a8bd |
Eval Count | 0 |
Decode Time | 145 ms |