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:
104
kelompokKeahlianDosen.php
Normal file
104
kelompokKeahlianDosen.php
Normal file
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
|
||||
header('X-Frame-Options: *');
|
||||
|
||||
include 'steven/conf/koneksiPDO.php';
|
||||
|
||||
$conn = new createCon();
|
||||
$dbh = $conn->connect();
|
||||
|
||||
$sql = "SELECT * FROM tb_kelompok_keahlian WHERE idKK != '8'";
|
||||
$stmt = $dbh->prepare($sql);
|
||||
$stmt->execute();
|
||||
|
||||
$listKK = [];
|
||||
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
array_push($listKK, [
|
||||
'id' => $row['idKK'],
|
||||
'nama' => $row['namaKK'],
|
||||
'ketua' => $row['ketuaKK'],
|
||||
'sekretaris' => $row['sekretarisKK'],
|
||||
'anggota' => [],
|
||||
]);
|
||||
}
|
||||
|
||||
foreach ($listKK as $key => $val) {
|
||||
$sql = "SELECT * FROM tbdosen WHERE status = 'A' AND idDosen != '44' AND kelompokKeahlian = '".$val['id']."' ORDER BY nmLengkap ASC";
|
||||
$stmt = $dbh->prepare($sql);
|
||||
$stmt->execute();
|
||||
|
||||
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
if ($val['ketua'] == $row['iddosen']) {
|
||||
$listKK[$key]['ketua'] = $row['nmLengkap'];
|
||||
} elseif ($val['sekretaris'] == $row['iddosen']) {
|
||||
$listKK[$key]['sekretaris'] = $row['nmLengkap'];
|
||||
} else {
|
||||
array_push($listKK[$key]['anggota'], $row['nmLengkap']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<!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 Kelompok Keahlian Jurusan Informatika Universitas Tanjungpura</title>
|
||||
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="libs/Semantic/Fomantic-UI/semantic.css"
|
||||
type="text/css"
|
||||
charset="utf-8"
|
||||
/>
|
||||
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="libs/DataTable/datatables.min.css"
|
||||
type="text/css"
|
||||
charset="utf-8"
|
||||
/>
|
||||
|
||||
<script src="libs/jquery-3.3.1.js"></script>
|
||||
|
||||
<script src="libs/Semantic/Fomantic-UI/semantic.min.js"></script>
|
||||
|
||||
<script src="libs/DataTable/datatables.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="ui styled fluid accordion">
|
||||
<?php
|
||||
foreach ($listKK as $key => $val) {
|
||||
$textListAnggotaKK = '';
|
||||
foreach ($val['anggota'] as $keyAnggota => $valAnggota) {
|
||||
$textListAnggotaKK .= '<li>'.$valAnggota.'</li>';
|
||||
}
|
||||
|
||||
echo '
|
||||
|
||||
<div class="active title" style="color:#3C85D0; font-size:18px">
|
||||
<i class="dropdown icon"></i>
|
||||
'.$val['nama'].'
|
||||
</div>
|
||||
<div class="active content">
|
||||
<ul>
|
||||
<li>'.$val['ketua'].' <b style="color:#3C85D0">(Ketua Kelompok)</b></li>
|
||||
<li>'.$val['sekretaris'].' <b style="color:#3C85D0">(Sekretaris Kelompok)</b></li>
|
||||
'.$textListAnggotaKK.'
|
||||
</ul>
|
||||
</div>
|
||||
';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<script>
|
||||
$('.ui.accordion').accordion({
|
||||
exclusive : false
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user