-
Notifications
You must be signed in to change notification settings - Fork 0
/
_Set_KHSID_di_KRS.php
52 lines (46 loc) · 1.37 KB
/
_Set_KHSID_di_KRS.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
<?php
// Author: Emanuel Setio Dewo
// 2006-09-16
include_once "sisfokampus.php";
HeaderSisfoKampus("Set KHSID di KRS");
// *** Functions ***
function TampilkanPesan() {
echo "<p>Script ini akan mengeset field KHSID di tabel _krs.
Setelah di set tabel _krs siap untuk diexport ke tabel krs.</p>
<p><form action='?'>
<input type=hidden name='gos' value='ProsesKHSID'>
Tahun: <input type=text name='tahun' value='$_SESSION[tahun]' size=10 maxlength=10>
<input type=submit name='Proses' value='Proses'>
</form>";
}
function ProsesKHSID() {
//
// Hilangkan filter ProdiID='' jika ingin semua data!!!
//
$s = "select KHSID, MhswID
from khs
where TahunID='$_SESSION[tahun]'
and ProdiID in ('10', '11')
order by MhswID";
$r = _query($s);
echo "<p>Berikut adalah daftar mhsw yg diset.</p>";
echo "<ol>";
while ($w = _fetch_array($r)) {
$s1 = "update _krs
set KHSID='$w[KHSID]'
where TahunID='$_SESSION[tahun]'
and KHSID=0
and MhswID='$w[MhswID]' ";
$r1 = _query($s1);
$kena = _affected_rows($r1);
echo "<li>$w[MhswID] » $kena</li>";
}
echo "</ol>";
}
// *** Parameters ***
$tahun = GetSetVar('tahun', '20061');
$gos = (empty($_REQUEST['gos']))? "TampilkanPesan" : $_REQUEST['gos'];
// *** Main ***
TampilkanJudul("Set KHSID di tabel _krs");
$gos();
?>