-
Notifications
You must be signed in to change notification settings - Fork 0
/
_Export_KRS.php
60 lines (54 loc) · 1.82 KB
/
_Export_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
53
54
55
56
57
58
59
60
<?php
// Author: Emanuel Setio Dewo
// 2006-09-16
function TampilkanPesan() {
echo "<p>Script ini akan menyalin data dari tabel _krs ke tabel krs.
Data yg telah disalin tidak akan disalin ulang.</p>
<p>Tekan tombol berikut untuk memulai proses: <input type=button name='Proses' value='Proses Copy' onClick=\"location='?gos=Exportjadwal'\"></p>";
}
function ExportJadwal() {
$s = "select *
from _krs
where Sudah=0";
$r = _query($s); $jml = _num_rows($r);
echo "<p>Jumlah data: <font size=+1>$jml</font></p>";
echo "<ol>";
while ($w = _fetch_array($r)) {
//$ada = GetaField('krs', "MhswID='$w[MhswID]' and JadwalID", $w[JadwalID], 'KRSID');
//if (empty($ada)) {
echo "<li>$w[MhswID] » $w[MKKode]
</li>";
// Export
$s1 = "insert into krs
(KHSID, MhswID, TahunID, JadwalID,
MKID, MKKode, SKS, StatusKRSID,
Harga, HargaStandar,
GradeNilai, BobotNilai,
Catatan,
LoginBuat, TanggalBuat)
values ('$w[KHSID]', '$w[MhswID]', '$w[TahunID]', '$w[JadwalID]',
'$w[MKID]', '$w[MKKode]', '$w[SKS]', '$w[StatusKRSID]',
$w[Harga], '$w[HargaStandar]',
'$w[GradeNilai]', $w[BobotNilai],
'$w[Catatan]',
'$w[LoginBuat]', now())
";
//echo "<pre>$s1</pre>";
$r1 = _query($s1);
// Set bahwa sudah di export
$s2 = "update _krs set Sudah=1 where KRSID=$w[KRSID]";
$r2 = _query($s2);
echo "<pre>$s2</pre>";
//}
//else echo "<li>$w[MhswID] » $w[KRSID]</li>";
}
echo "</ol>";
}
// *** Parameters ***
$gos = (empty($_REQUEST['gos']))? "TampilkanPesan" : $_REQUEST['gos'];
// *** Main ***
include_once "sisfokampus.php";
HeaderSisfoKampus("Proses Export KRS");
TampilkanJudul("Proses Export KRS");
$gos();
?>