Add SPOTA core PHP application

Add the main admin, dosen, mahasiswa, API, and service code needed to run the core legacy application with configurable upload storage.
This commit is contained in:
Power BI Dev
2026-05-02 10:08:52 +07:00
parent 874dbbe8e8
commit efdb11db3f
221 changed files with 43273 additions and 0 deletions

156
cek_banyak_sidang.php Normal file
View File

@@ -0,0 +1,156 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Data Presensi Seminar/Sidang Skripsi</title>
<link
rel="stylesheet"
href="steven/libs/Fomantic-UI/semantic.css"
type="text/css"
charset="utf-8"
/>
<link
rel="stylesheet"
href="steven/libs/DataTable/datatables.min.css"
type="text/css"
charset="utf-8"
/>
<script src="steven/libs/jquery-3.3.1.js"></script>
<script src="steven/libs/Fomantic-UI/semantic.min.js"></script>
<script src="steven/libs/DataTable/datatables.min.js"></script>
</head>
<style>
tfoot {
display: table-header-group;
}
</style>
<body>
<?php
include 'steven/conf/koneksiPDO.php';
$angkatan = date('Y');
if(isset($_GET['angkatan'])){
$angkatan = intval($_GET['angkatan']);
}
$conn = new createCon();
$dbh = $conn->connect();
$getBanyakSidang = file_get_contents("https://gis.my.id/_API/getListCountPresensiSidangByAngkatan.php");
$decodedBanyakSidang = json_decode($getBanyakSidang, true);
$listBanyakSidang = $decodedBanyakSidang['data'];
$getListMahasiswa = file_get_contents("https://informatika.untan.ac.id/API/public/data_mahasiswa_per_angkatan.php?angkatan=$angkatan&key=MfQE6ej2ffxEKgVx7YXVA3HbHg3d4hRhXyBnRnYgkjwuSaLNW2V5PxeVSKWySUsbbhVyEWVSs", true);
$decodedBanyakMahasiswa = json_decode($getListMahasiswa, true);
$listData = [];
foreach($decodedBanyakMahasiswa as $key => $val){
$nim = strtoupper(trim($val['nim']));
$nama = strtoupper(trim($val['nama']));
$dataSidang = [
'proposal' => 0,
'hasil' => 0,
'akhir' => 0,
];
if(isset($listBanyakSidang[$nim])){
$dataSidang = $listBanyakSidang[$nim];
}
array_push($listData, [
'nim' => $nim,
'nama' => $nama,
'banyak' => $dataSidang,
]);
}
$no = 1;
foreach($listData as $key=>$val){
$nama = $val['nama'];
$nim = $val['nim'];
$banyakSidang = $val['banyak'];
$bProposal = $banyakSidang['proposal'];
$bHasil = $banyakSidang['hasil'];
$bAkhir = $banyakSidang['akhir'];
$colorProp = "";
$colorAkhir = "";
if($bProposal < 10){
$colorProp = " style='background-color:yellow' ";
}
if($bAkhir < 10){
$colorAkhir = " style='background-color:yellow' ";
}
$isiTabel .= "<tr><td>$no</td><td>$nama</td><td>$nim</td><td $colorProp>$bProposal</td><td $colorAkhir>$bAkhir</td></tr>";
$no++;
}
if(sizeof($listData) == 0){
$isiTabel = "<tr><td colspan='5'>Tidak ada data mahasiswa untuk angkatan ini</td></tr>";
}
echo '
<style>
</style>
';
?>
<div class="ui segment">
<h3 class='ui blue inverted segment center aligned header'>Data Presensi Seminar/Sidang Skripsi</h3>
<div class="ui form" id="formFilter">
<div class="fields">
<div class="field">
<label>Angkatan Mahasiswa</label>
<select id="angkatanField" name="angkatanField" class="ui dropdown">
<?php
for($i = date('Y'); $i > 2014; $i--){
echo "<option value='$i'>$i</option>";
}
?>
</select>
</div>
<div class="field">
<label style="color:white">.</label>
<button class="ui blue button" onClick="filterData()">Filter</button>
</div>
</div>
</div>
<table class='ui selectable celled table' id='tableData'><thead><tr><th>No</th><th>Nama</th><th>NIM</th><th>Banyak Seminar Proposal</th><th>Banyak Sidang Akhir</th></tr><tbody><?php echo $isiTabel; ?></tbody></table>
</div>
</div>
</body>
</html>
<script>
function filterData(){
const angkatan = $('#angkatanField').val();
window.location = `https://spota.untan.ac.id/cek_banyak_sidang.php?angkatan=${angkatan}`;
}
$(document).ready(function () {
$('#formFilter').form('set values', {
angkatanField : "<?php echo $angkatan; ?>",
});
$('#tableData').dataTable({
paging: false,
});
});
</script>