-
Notifications
You must be signed in to change notification settings - Fork 0
/
_Cek_KRS_Double.php
68 lines (63 loc) · 2.12 KB
/
_Cek_KRS_Double.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
// Author: Emanuel Setio Dewo
// 09 Nov 2006
session_start();
include_once "sisfokampus.php";
HeaderSisfoKampus("Cek Data KRS Mahasiswa");
$tahun = GetSetVar('tahun');
$arrprodi = array('21', '22', '23');
$gos = (empty($_REQUEST['gos']))? "TampilanAwal" : $_REQUEST['gos'];
TampilkanJudul("Cek Data KRS Double Mhsw");
$gos();
// *** Functions ***
function TampilanAwal() {
global $arrprodi;
$prd = implode(', ', $arrprodi);
echo Konfirmasi("Proses Pengecekan KRS Double",
"Proses akan mengecek KRS Mhsw apakah KRS seorang mahasiswa double.<br />
Jika double, maka akan dihapus salah satu.<br />
Pengecekan dilakukan terhadap <b>Hari</b> dan <b>MKID</b>. <br />
Prodi yg akan dicek: <b>$prd</b>.
<hr size=1 color=silver>
<form action='?' method=GET>
<input type=hidden name='gos' value='ProsesKRS'>
Tahun Akademik: <input type=text name='tahun' value='$_SESSION[tahun]' size=10 maxlength=10>
<hr size=1 color=silver>
<input type=submit name='Simpan' value='Simpan'>
</form>");
}
function ProsesKRS() {
if (empty($_SESSION['tahun'])) {
echo ErrorMsg("Tidak Dpt Diproses",
"Tahun Akademik kosong! Proses dibatalkan.");
TampilanAwal();
} else ProsesBeneran();
}
function ProsesBeneran() {
global $arrprodi;
$strprd = '';
foreach($arrprodi as $val) $strprd .= ",'$val'";
$strprd = TRIM($strprd, ',');
$s = "select khs.MhswID, khs.ProdiID, khs.KHSID
from khs
where khs.ProdiID in ($strprd) and khs.TahunID='$_SESSION[tahun]'
order by khs.MhswID";
$r = _query($s);
$jml = _num_rows($r);
$_SESSION['CEK-KRS-JML'] = $jml;
$_SESSION['CEK-KRS-POS'] = 0;
echo "<p>Ada terdaftar <font size=+1>$jml</font> mhsw.</p>";
$n = 0;
while ($w = _fetch_array($r)) {
$n++;
$_SESSION["CEK-KRS-MHSWID-$n"] = $w['MhswID'];
$_SESSION["CEK-KRS-PRODIID-$n"] = $w['ProdiID'];
$_SESSION["CEK-KRS-KHSID-$n"] = $w['KHSID'];
}
$_SESSION["CEK-KRS-JML"] = $n;
$_SESSION["CEK-KRS-DIHAPUS"] = 0;
// IFRAME
echo "<p><IFRAME src='_Cek_KRS_Double.gos.php' frameborder=0 height=100% width=100%>
</IFRAME></p>";
}
?>