本文整理汇总了PHP中TutupScript函数的典型用法代码示例。如果您正苦于以下问题:PHP TutupScript函数的具体用法?PHP TutupScript怎么用?PHP TutupScript使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TutupScript函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Gagalkan
function Gagalkan($jdwl)
{
$jadwalid = $_REQUEST['id'];
$NilaiGagal = $_REQUEST['NilaiGagal'];
if (empty($NilaiGagal)) {
echo ErrorMsg("Nilai Belum Diset", "Anda harus mengeset nilai gagal penilaian dosen untuk matakuliah ini.<br>\r\n Proses Gagal Nilai Dosen tidak dilakukan.");
} else {
// Gagalkan jadwal
$Nilai = GetFields('nilai', 'NilaiID', $NilaiGagal, '*');
$BobotNilai = $Nilai['Bobot'];
$GradeNilai = $Nilai['Nama'];
$CatatanGagal = sqling($_REQUEST['CatatanGagal']);
$s = "update jadwal set Gagal='Y', Final = 'Y', \r\n CatatanGagal = '{$CatatanGagal}', NilaiGagal = '{$GradeNilai}'\r\n where JadwalID = '{$jadwalid}' ";
$r = _query($s);
// Set semua nilai mahasiswa
$s1 = "update krs set GradeNilai='{$GradeNilai}', BobotNilai={$BobotNilai}, Final='Y'\r\n where JadwalID='{$jadwalid}' and NA = 'N' ";
$r1 = _query($s1);
// finalisasi jadwal uts
$s = "update jadwaluts set Final = 'Y'\r\n\twhere JadwalID = {$id}";
$r = _query($s);
$s = "update jadwaluas set Final = 'Y'\r\n\twhere JadwalID = {$id}";
$r = _query($s);
// finalisasi jadwal responsi/lab/tutorial tambahan
$s = "select JadwalID from jadwal where JadwalRefID = '{$id}' and KodeID='" . KodeID . "'";
$r = _query($s);
while ($w = _fetch_array($r)) {
$s1 = "update jadwal set Final = 'Y', Gagal = 'N',\r\n\t\t\tTglEdit=now(), LoginEdit = '{$_SESSION['_Login']}'\r\n\t\t\twhere JadwalID='{$w['JadwalID']}'";
$r1 = _query($s1);
$s1 = "update krs\r\n\t\tset Final = 'Y',\r\n\t\t\tTanggalEdit = now(), LoginEdit = '{$_SESSION['_Login']}'\r\n\t\twhere JadwalID = '{$w['JadwalID']}'";
$r1 = _query($s1);
}
// Kembali
TutupScript($jadwalid);
}
}
示例2: Gagalkan
function Gagalkan($jdwl)
{
$id = $_REQUEST['id'];
$NilaiGagal = $_REQUEST['NilaiGagal'];
if (empty($NilaiGagal)) {
echo ErrorMsg("Nilai Belum Diset", "Anda harus mengeset nilai gagal penilaian dosen untuk matakuliah ini.<br>\r\n Proses Gagal Nilai Dosen tidak dilakukan.");
} else {
// Gagalkan jadwal
$Nilai = GetFields('nilai', 'NilaiID', $NilaiGagal, '*');
$BobotNilai = $Nilai['Bobot'];
$GradeNilai = $Nilai['Nama'];
$CatatanGagal = sqling($_REQUEST['CatatanGagal']);
$s = "update jadwalremedial set Gagal='Y', Final = 'Y', \r\n CatatanGagal = '{$CatatanGagal}', NilaiGagal = '{$GradeNilai}'\r\n where JadwalID = '{$id}' ";
$r = _query($s);
// Set semua nilai mahasiswa
$s1 = "update krsremedial set GradeNilai='{$GradeNilai}', BobotNilai={$BobotNilai}, Final='Y'\r\n where JadwalRemedialID='{$id}' and NA = 'N' ";
$r1 = _query($s1);
// Anggap Remedial sudah beres dan bisa di-remedialkan lagi bila diperlukan lagi nanti
$s = "select KRSID from krsremedial where JadwalRemedialID='{$JadwalRemedialID}' and KodeID='" . KodeID . "'";
$r = _query($s);
while ($w = _fetch_array($r)) {
$s1 = "update krs set SedangRemedial = 'N' where KRSID='{$w['KRSID']}' and KodeID='" . KodeIID . "'";
$r1 = _query($s1);
}
// Kembali
TutupScript($id);
}
}
示例3: SekSav
function SekSav()
{
$md = $_REQUEST['md'] + 0;
$SekolahID = $_REQUEST['SekolahID'];
$Nama = sqling($_REQUEST['Nama']);
$JenisSekolahID = $_REQUEST['JenisSekolahID'];
$Alamat1 = sqling($_REQUEST['Alamat1']);
$Alamat2 = sqling($_REQUEST['Alamat2']);
$Kota = sqling($_REQUEST['Kota']);
$KodePos = $_REQUEST['KodePos'];
$Telephone = sqling($_REQUEST['Telephone']);
$Fax = sqling($_REQUEST['Fax']);
$Website = sqling($_REQUEST['Website']);
$Email = sqling($_REQUEST['Email']);
$Kontak = sqling($_REQUEST['Kontak']);
$JabatanKontak = sqling($_REQUEST['JabatanKontak']);
$HandphoneKontak = sqling($_REQUEST['HandphoneKontak']);
$EmailKontak = sqling($_REQUEST['EmailKontak']);
$NA = empty($_REQUEST['NA']) ? 'N' : $_REQUEST['NA'];
if ($md == 0) {
$s = "update asalsekolah set Nama='{$Nama}', Alamat1='{$Alamat1}', Alamat2='{$Alamat2}',\r\n JenisSekolahID='{$JenisSekolahID}', Kota='{$Kota}', KodePos='{$KodePos}', NA='{$NA}',\r\n Website='{$Website}', Email='{$Email}', Telephone='{$Telephone}', Fax='{$Fax}',\r\n Kontak='{$Kontak}', JabatanKontak='{$JabatanKontak}',\r\n HandphoneKontak='{$HandphoneKontak}', EmailKontak='{$EmailKontak}'\r\n where SekolahID='{$SekolahID}'";
$r = _query($s);
} else {
$ada = GetFields('asalsekolah', 'SekolahID', $SekolahID, '*');
if (!empty($ada)) {
echo ErrorMsg("Data tidak dapat disimpan", "Data tidak dapat disimpan karena kode sekolah <b>{$SekolahID}</b> telah digunakan oleh\r\n sekolah <b>{$ada['Nama']}</b>.<br>\r\n Gunakan kode sekolah yg lain.");
} else {
$s = "insert into asalsekolah (SekolahID, Nama, JenisSekolahID, Alamat1, Alamat2, Kota, KodePos, NA,\r\n Telephone, Fax, Website, Email, \r\n Kontak, JabatanKontak, HandphoneKontak, EmailKontak)\r\n values('{$SekolahID}', '{$Nama}', '{$JenisSekolahID}', '{$Alamat1}', '{$Alamat2}', '{$Kota}', '{$KodePos}', '{$NA}',\r\n '{$Telephone}', '{$Fax}', '{$Website}', '{$Email}',\r\n '{$Kontak}', '{$JabatanKontak}', '{$HandphoneKontak}', '{$EmailKontak}')";
$r = _query($s);
}
}
TutupScript();
}
示例4: ProsesNIM
function ProsesNIM($pmbid, $pmb)
{
$StatusMhswID = 'A';
// Default
$Tahun_Akd = $_REQUEST['Tahun_Akd'];
// 1. Buat NIM Mhsw & Hitung Batas studi
$NIM = GetaField('prodi', 'ProdiID', $pmb['ProdiID'], 'GunakanNIMSementara') == 'Y' ? GetNextNIMSementara($Tahun_Akd, $pmb) : GetNextNIM($Tahun_Akd, $pmb);
$NIMSementara = GetaField('prodi', 'ProdiID', $pmb['ProdiID'], 'GunakanNIMSementara');
$Batas = HitungBatasStudi($Tahun_Akd, $pmb['ProdiID']);
//die($Batas);
// 2. Copy data PMB ke Mhsw
$s = "insert into mhsw\r\n (MhswID, Login, LevelID, KodeID, Password,\r\n NIMSementara, PMBID, PSSBID, TahunID, BIPOTID,\r\n Nama, StatusAwalID, StatusMhswID,\r\n ProgramID, ProdiID, Kelamin, WargaNegara, Kebangsaan,\r\n TempatLahir, TanggalLahir,\r\n Agama, StatusSipil,\r\n TinggiBadan, BeratBadan,\r\n Alamat, Kota, RT, RW, KodePos, Propinsi, Negara,\r\n Telepon, Handphone, Email,\r\n AlamatAsal, KotaAsal, RTAsal, RWAsal, KodePosAsal, PropinsiAsal, NegaraAsal,\r\n TeleponAsal,\r\n NamaAyah, AgamaAyah, PendidikanAyah, PekerjaanAyah, HidupAyah,\r\n NamaIbu, AgamaIbu, PendidikanIbu, PekerjaanIbu, HidupIbu,\r\n AlamatOrtu, KotaOrtu, RTOrtu, RWOrtu, KodePosOrtu, PropinsiOrtu, NegaraOrtu,\r\n TeleponOrtu, HandphoneOrtu, EmailOrtu,\r\n PendidikanTerakhir, AsalSekolah, JenisSekolahID, AlamatSekolah, KotaSekolah, \r\n JurusanSekolah, NilaiSekolah, TahunLulus, IjazahSekolah,\r\n AsalPT, MhswIDAsalPT, ProdiAsalPT, LulusAsalPT, TglLulusAsalPT,\r\n IPKAsalPT, Pilihan1, Pilihan2, Pilihan3, PrestasiTambahan,\r\n BatasStudi, LulusUjian, NilaiUjian, GradeNilai, Syarat, SyaratLengkap,\r\n TotalBiaya, TotalBayar, LoginBuat, TanggalBuat)\r\n values\r\n ('{$NIM}', '{$NIM}', '120', '" . KodeID . "', PASSWORD('{$pmb['TanggalLahir']}'),\r\n\t'{$NIMSementara}', '{$pmb['PMBID']}', '{$pmb['PSSBID']}', '{$Tahun_Akd}', '{$pmb['BIPOTID']}',\r\n '{$pmb['Nama']}', '{$pmb['StatusAwalID']}', '{$StatusMhswID}',\r\n '{$pmb['ProgramID']}', '{$pmb['ProdiID']}', '{$pmb['Kelamin']}', '{$pmb['WargaNegara']}', '{$pmb['Kebangsaan']}',\r\n '{$pmb['TempatLahir']}', '{$pmb['TanggalLahir']}',\r\n '{$pmb['Agama']}', '{$pmb['StatusSipil']}',\r\n '{$pmb['TinggiBadan']}', '{$pmb['BeratBadan']}',\r\n '{$pmb['Alamat']}', '{$pmb['Kota']}', '{$pmb['RT']}', '{$pmb['RW']}', '{$pmb['KodePos']}', '{$pmb['Propinsi']}', '{$pmb['Negara']}',\r\n '{$pmb['Telepon']}', '{$pmb['Handphone']}', '{$pmb['Email']}',\r\n '{$pmb['AlamatAsal']}', '{$pmb['KotaAsal']}', '{$pmb['RTAsal']}', '{$pmb['RWAsal']}', '{$pmb['KodePosAsal']}', '{$pmb['PropinsiAsal']}', '{$pmb['NegaraAsal']}',\r\n '{$pmb['TeleponAsal']}',\r\n '{$pmb['NamaAyah']}', '{$pmb['AgamaAyah']}', '{$pmb['PendidikanAyah']}', '{$pmb['PekerjaanAyah']}', '{$pmb['HidupAyah']}',\r\n '{$pmb['NamaIbu']}', '{$pmb['AgamaIbu']}', '{$pmb['PendidikanIbu']}', '{$pmb['PekerjaanIbu']}', '{$pmb['HidupIbu']}',\r\n '{$pmb['AlamatOrtu']}', '{$pmb['KotaOrtu']}', '{$pmb['RTOrtu']}', '{$pmb['RWOrtu']}', '{$pmb['KodePosOrtu']}', '{$pmb['PropinsiOrtu']}', '{$pmb['NegaraOrtu']}',\r\n '{$pmb['TeleponOrtu']}', '{$pmb['HandphoneOrtu']}', '{$pmb['EmailOrtu']}',\r\n '{$pmb['PendidikanTerakhir']}', '{$pmb['AsalSekolah']}', '{$pmb['JenisSekolahID']}', '{$pmb['AlamatSekolah']}', '{$pmb['KotaSekolah']}',\r\n '{$pmb['JurusanSekolah']}', '{$pmb['NilaiSekolah']}', '{$pmb['TahunLulus']}', '{$pmb['IjazahSekolah']}',\r\n '{$pmb['AsalPT']}', '{$pmb['MhswIDAsalSekolah']}', '{$pmb['ProdiAsalPT']}', '{$pmb['LulusAsalPT']}', '{$pmb['TglLulusAsalPT']}',\r\n '{$pmb['IPKAsalPT']}', '{$pmb['Pilihan1']}', '{$pmb['Pilihan2']}', '{$pmb['Pilihan3']}', '{$pmb['PrestasiTambahan']}',\r\n '{$Batas}', '{$pmb['LulusUjian']}', '{$pmb['NilaiSekolah']}', '{$pmb['GradeNilai']}', '{$pmb['Syarat']}', '{$pmb['SyaratLengkap']}',\r\n '{$pmb['TotalBiaya']}', '{$pmb['TotalBayar']}', '{$_SESSION['_Login']}', now())";
// Nilai Ujian untuk Kasih Bangsa adalah Nilai Sekolah. Ralat baris kedua di atas ini untuk mengubah ke default
$r = _query($s);
// Set NIM di data PMB
$s = "update pmb set MhswID = '{$NIM}'\r\n where KodeID='" . KodeID . "' and PMBID = '{$pmbid}' ";
$r = _query($s);
// Set Status Aplikan dari murid PMB menjadi REG
include_once "../pmb/statusaplikan.lib.php";
SetStatusAplikan('REG', GetaField('pmb', "PMBID='{$pmbid}' and KodeID", KodeID, "AplikanID"), GetaField('pmbperiod', "KodeID='" . KodeID . "' and NA", 'N', "PMBPeriodID"));
// Transfer BIPOTMhsw ke Mhsw
$s = "update bipotmhsw\r\n set MhswID = '{$NIM}',\r\n PMBMhswID = 1,\r\n TahunID = '{$Tahun_Akd}',\r\n LoginEdit = '{$_SESSION['_Login']}',\r\n TanggalEdit = now()\r\n where PMBID = '{$pmbid}'\r\n and PMBMhswID = 0\r\n and KodeID = '" . KodeID . "' ";
$r = _query($s);
// Transfer Pembayaran ke Mhsw
$s = "update bayarmhsw\r\n set MhswID = '{$NIM}',\r\n PMBMhswID = 1,\r\n TahunID = '{$Tahun_Akd}',\r\n LoginEdit = '{$_SESSION['_Login']}',\r\n TanggalEdit = now()\r\n where PMBID = '{$pmbid}'\r\n and PMBMhswID = 0\r\n and KodeID = '" . KodeID . "' ";
$r = _query($s);
// Otomatis Registrasi di Semester
$MaxSKS = GetaField('prodi', "KodeID='" . KodeID . "' and ProdiID", $pmb['ProdiID'], 'DefSKS') + 0;
$s = "insert into khs\r\n (KodeID, TahunID, ProgramID, ProdiID,\r\n MhswID, StatusMhswID, Sesi, BIPOTID,\r\n Biaya, Bayar, MaxSKS,\r\n Keterangan, LoginBuat, TanggalBuat)\r\n values\r\n ('" . KodeID . "', '{$Tahun_Akd}', '{$pmb['ProgramID']}', '{$pmb['ProdiID']}',\r\n '{$NIM}', '{$StatusMhswID}', 1, '{$pmb['BIPOTID']}',\r\n '{$pmb['TotalBiaya']}', '{$pmb['TotalBayar']}', {$MaxSKS},\r\n 'Auto-registrasi', '{$_SESSION['_Login']}', now())";
$r = _query($s);
// Tutup aplikasi
TutupScript();
}
示例5: Finalisasi
function Finalisasi($jdwl)
{
$id = $_REQUEST['id'];
// finalisasi jadwal
$s = "update jadwal \n set Final = 'Y', Gagal = 'N',\n TglEdit = now(), LoginEdit = '{$_SESSION['_Login']}'\n where JadwalID = {$id}";
$r = _query($s);
// finalisasi krs
$s = "update krs\n set Final = 'Y',\n TanggalEdit = now(), LoginEdit = '{$_SESSION['_Login']}'\n where JadwalID = {$id}";
$r = _query($s);
// finalisasi jadwal uts
$s = "update jadwaluts set Final = 'Y'\n\twhere JadwalID = {$id}";
$r = _query($s);
$s = "update jadwaluas set Final = 'Y'\n\twhere JadwalID = {$id}";
$r = _query($s);
// finalisasi jadwal responsi/lab/tutorial tambahan
$s = "select JadwalID from jadwal where JadwalRefID = '{$id}' and KodeID='" . KodeID . "'";
$r = _query($s);
while ($w = _fetch_array($r)) {
$s1 = "update jadwal set Final = 'Y', Gagal = 'N',\n\t\t\tTglEdit=now(), LoginEdit = '{$_SESSION['_Login']}'\n\t\t\twhere JadwalID='{$w['JadwalID']}'";
$r1 = _query($s1);
$s1 = "update krs\n set Final = 'Y',\n TanggalEdit = now(), LoginEdit = '{$_SESSION['_Login']}'\n where JadwalID = '{$w['JadwalID']}'";
$r1 = _query($s1);
}
// Kembali
TutupScript($id);
}
示例6: Simpan
function Simpan($md, $id, $bck)
{
TutupScript();
$Nama = sqling($_REQUEST['Nama']);
$p = array();
$p = $_REQUEST['ProdiID'];
if (!empty($p)) {
$ProdiID = implode('.', $p);
$ProdiID = empty($ProdiID) ? '' : '.' . $ProdiID . '.';
} else {
$ProdiID = '';
}
$Keterangan = sqling($_REQUEST['Keterangan']);
$NA = empty($_REQUEST['NA']) ? 'N' : 'Y';
if ($md == 0) {
$s = "update pmbsyarat\n set Nama = '{$Nama}',\n ProdiID = '{$ProdiID}',\n Keterangan = '{$Keterangan}',\n NA = '{$NA}',\n LoginEdit = '{$_SESSION['_Login']}',\n TanggalEdit = now()\n where KodeID = '" . KodeID . "' and PMBSyaratID = '{$id}' ";
$r = _query($s);
echo "<script>ttutup('{$_SESSION['mnux']}');</script>";
} elseif ($md == 1) {
// Cek ID-nya dulu
$ada = GetFields('pmbsyarat', "KodeID='" . KodeID . "' and PMBSyaratID", $id, '*');
if (!empty($ada)) {
die(ErrorMsg('Error', "Syarat dengan kode <b>{$id}</b> sudah ada.<br />\n Gunakan kode yang lain.\n <hr size=1 color=silver />\n <input type=button name='Tutup' value='Tutup' onClick=\"window.close()\" />"));
}
$s = "insert into pmbsyarat\n (PMBSyaratID, KodeID, Nama, ProdiID,\n Keterangan, LoginBuat, TanggalBuat, NA)\n values\n ('{$id}', '" . KodeID . "', '{$Nama}', '{$ProdiID}',\n '{$Keterangan}', '{$_SESSION['_Login']}', now(), '{$NA}')";
$r = _query($s);
echo "<script>ttutup('{$_SESSION['mnux']}');</script>";
} else {
die(ErrorMsg('Error', "Mode edit tidak ditemukan."));
}
}
示例7: ReverseStatus
function ReverseStatus()
{
TutupScript();
$AplikanID = $_REQUEST['id'];
$StatusMundur = GetaField('aplikan', 'AplikanID', $AplikanID, "StatusMundur");
if ($StatusMundur == 'Y') {
$s = "update `aplikan` set StatusMundur = 'N',\r\n\t\t\t\t\t\t\t\t\t\tLoginMundur = '{$_SESSION['_Login']}',\r\n\t\t\t\t\t\t\t\t\t\tTanggalMundur = now()\r\n\t\t\t\t\t\t\t\t\twhere AplikanID='{$AplikanID}'";
$r = _query($s);
/*$StatusAplikanMhswUpdate = GetaField('statusaplikanmhsw sam left outer join statusaplikan sa',
"sa.Urutan=(select max(Urutan) from statusaplikanmhsw sam2 where sam2.AplikanID='$AplikanID') and sam.AplikanID='$AplikanID' and sam.KodeID",
KodeID,
'StatusAplikanMhswID');
$s = "update statusaplikanmhsw setStatusMundur='N' where StatusAplikanMhswID='$StatusAplikanMhswUpdate'";
*/
echo "<script>ttutup('{$_SESSION['mnux']}');</script>";
} else {
if ($StatusMundur == 'N') {
$s = "update `aplikan` set StatusMundur = 'Y' where AplikanID='{$AplikanID}'";
$r = _query($s);
echo "<script>ttutup('{$_SESSION['mnux']}');</script>";
} else {
echo ErrorMessage("Error", "Status Mundur tidka dikenali. Harap hubungi administrator");
}
}
}
示例8: Simpan
function Simpan()
{
$md = $_REQUEST['md'] + 0;
$id = sqling($_REQUEST['id']);
$Nama = sqling($_REQUEST['Nama']);
$NA = empty($_REQUEST['NA']) ? 'N' : $_REQUEST['NA'];
// Simpan
if ($md == 0) {
$s = "update wisudaprasyarat\r\n set Nama = '{$Nama}',\r\n NA = '{$NA}',\r\n LoginEdit = '{$_SESSION['_Login']}',\r\n TglEdit = now()\r\n where PrasyaratID = '{$id}' and KodeID = '" . KodeID . "' limit 1";
$r = _query($s);
//die($s);
TutupScript();
} elseif ($md == 1) {
$ada = GetFields('wisudaprasyarat', "KodeID='" . KodeID . "' and PrasyaratID", $id, '*');
if (empty($ada)) {
$s = "insert into wisudaprasyarat\r\n (PrasyaratID, KodeID, Nama, LoginBuat, TglBuat, NA)\r\n values\r\n (upper('{$id}'), '" . KodeID . "', '{$Nama}', '{$_SESSION['_Login']}', now(), '{$NA}')";
$r = _query($s);
TutupScript();
} else {
die(ErrorMsg('Error', "Kode <b>{$id}</b> sudah dipakai.<br />\r\n Gunakan kode prasyarat yang lain!\r\n <hr size=1 color=silver />\r\n <input type=button name='Tutup' value='Tutup' onClick='window.close()' />"));
}
} else {
die(ErrorMsg('Error', "Mode edit <b>{$md}</b> tidak dikenali.<br />\r\n Hubungi Sysadmin untuk informasi lebih lanjut.\r\n <hr size=1 color=silver />\r\n <input type=button name='Tutup' value='Tutup' onClick='window.close()' />"));
}
}
示例9: Simpan
function Simpan($md, $id, $max)
{
TutupScript();
$gel = $_REQUEST['gel'];
$prodi = $_REQUEST['prodi'];
$DariNilai = $_REQUEST['DariNilai'] + 0;
$Diskon = $_REQUEST['Diskon'] + 0;
$Keterangan = sqling($_REQUEST['Keterangan']);
$NA = empty($_REQUEST['NA']) ? 'N' : 'Y';
if ($md == 0) {
$DariNilaiLama = GetaField('quotabeasiswa', "KodeID = '" . KodeID . "' and MaxQuotaID", $id, 'DariNilai');
$cari = GetaField('quotabeasiswa', "PMBPeriodID='{$gel}' and ProdiID='{$prodi}' and SampaiNilai='{$DariNilaiLama}' and KodeID", KodeID, 'MaxQuotaID');
if (!empty($cari)) {
$s = "update quotabeasiswa set SampaiNilai='{$DariNilai}' where MaxQuotaID='{$cari}'";
$r = _query($s);
}
$s = "update quotabeasiswa\n set DariNilai = '{$DariNilai}',\r\n\t\t Diskon = '{$Diskon}',\n Keterangan = '{$Keterangan}',\n NA = '{$NA}',\n LoginEdit = '{$_SESSION['_Login']}',\n TanggalEdit = now()\n where KodeID = '" . KodeID . "' and MaxQuotaID = {$id} ";
$r = _query($s);
echo "<script>ttutup('{$_SESSION['mnux']}');</script>";
} elseif ($md == 1) {
$cari = GetaField('quotabeasiswa', "PMBPeriodID='{$gel}' and ProdiID='{$prodi}' and SampaiNilai='{$max}' and KodeID", KodeID, 'MaxQuotaID');
if (!empty($cari)) {
$s = "update quotabeasiswa set SampaiNilai='{$DariNilai}' where MaxQuotaID='{$cari}'";
$r = _query($s);
}
$s = "insert into quotabeasiswa\n (PMBPeriodID, ProdiID, KodeID, DariNilai, SampaiNilai, Diskon,\n Keterangan, LoginBuat, TanggalBuat, NA)\n values\n ('{$gel}', '{$prodi}', '" . KodeID . "', '{$DariNilai}', '{$max}', '{$Diskon}',\n '{$Keterangan}', '{$_SESSION['_Login']}', now(), '{$NA}')";
$r = _query($s);
echo "<script>ttutup('{$_SESSION['mnux']}');</script>";
} else {
die(ErrorMsg('Error', "Mode edit tidak ditemukan."));
}
}
示例10: Simpan
function Simpan($md, $id, $bck)
{
TutupScript();
$idlama = $_REQUEST['idlama'];
$Nama = sqling($_REQUEST['Nama']);
$NA = empty($_REQUEST['NA']) ? 'N' : 'Y';
if ($id != $idlama) {
$ada = GetFields('presenter', "KodeID='" . KodeID . "' and PresenterID", $id, '*');
if (!empty($ada)) {
die(ErrorMsg('Error', "<br />Presenter dengan kode <b>{$id}</b> sudah ada.<br />\r\n Gunakan kode yang lain.\r\n <hr size=1 color=silver />\r\n <input type=button name='Tutup' value='Tutup' onClick=\"window.close()\" />"));
}
}
if ($md == 0) {
$s = "update presenter\r\n set Nama = '{$Nama}',\r\n PresenterID = '{$id}',\r\n NA = '{$NA}',\r\n LoginEdit = '{$_SESSION['_Login']}',\r\n TanggalEdit = now()\r\n where KodeID = '" . KodeID . "' and PresenterID = '{$idlama}' ";
$r = _query($s);
echo "<script>ttutup('{$_SESSION['mnux']}');</script>";
} elseif ($md == 1) {
// Cek ID-nya dulu
$s = "insert into presenter\r\n (PresenterID, KodeID, Nama, LoginBuat, TanggalBuat, NA)\r\n values\r\n ('{$id}', '" . KodeID . "', '{$Nama}', '{$_SESSION['_Login']}', now(), '{$NA}')";
$r = _query($s);
echo "<script>ttutup('{$_SESSION['mnux']}');</script>";
} else {
die(ErrorMsg('Error', "Mode edit tidak ditemukan."));
}
}
示例11: Simpan
function Simpan($bayarid, $md)
{
$Tanggal = "{$_REQUEST['Tanggal_y']}-{$_REQUEST['Tanggal_m']}-{$_REQUEST['Tanggal_d']}";
$Keterangan = $_REQUEST['Keterangan'];
$s = "update bayarmhsw set Tanggal = '{$Tanggal}', Keterangan='{$Keterangan}' where BayarMhswID = '{$bayarid}'";
$r = _query($s);
TutupScript();
}
示例12: Simpan
function Simpan()
{
$MhswID = sqling($_REQUEST['MhswID']);
$BIPOTID = $_REQUEST['BIPOTID'];
// Simpan
$s = "update mhsw\r\n set BIPOTID = '{$BIPOTID}',\r\n LoginEdit = '{$_SESSION['_Login']}',\r\n TanggalEdit = now()\r\n where KodeID = '" . KodeID . "' and MhswID = '{$MhswID}' ";
$r = _query($s);
TutupScript($MhswID);
}
示例13: Simpan
function Simpan()
{
$KHSID = $_REQUEST['KHSID'];
$StatusMhswID = sqling($_REQUEST['StatusMhswID']);
// Simpan
$s = "update khs set StatusMhswID = '{$StatusMhswID}'\n where KHSID = '{$KHSID}' ";
$r = _query($s);
// Tutup
TutupScript();
}
示例14: Simpan
function Simpan()
{
$ProdiID = sqling($_REQUEST['ProdiID']);
$TahunID = sqling($_REQUEST['TahunID']);
// Ambil data dari sumber tahun akademik
$data = GetFields('tahun', "TahunID='{$TahunID}' and ProgramID='{$_SESSION['prid']}' and ProdiID", $ProdiID, '*');
if ($data['NA'] == 'N') {
// Set all NA to Y
$s = "update tahun set NA='Y' where ProgramID='{$_SESSION['prid']}' and ProdiID='{$_SESSION['prodi']}'";
$r = _query($s);
} else {
}
$s = "insert into tahun\r\n\t(TahunID, KodeID, ProdiID, ProgramID, Nama, SP,\r\n\tTglKuliahMulai, TglKuliahSelesai,\r\n\tTglKRSMulai, TglKRSSelesai,\r\n\tTglKRSOnlineMulai, TglKRSOnlineSelesai,\r\n\tTglBayarMulai, TglBayarSelesai,\r\n\tTglAutodebetSelesai, TglAutodebetSelesai2,\r\n\tTglKembaliUangKuliah, \r\n\tTglUbahKRSMulai, TglUbahKRSSelesai,\r\n\tTglCetakKSS1, TglCetakKSS2, \r\n\tTglUTSMulai, TglUTSSelesai,\t\r\n\tTglUASMulai, TglUASSelesai,\t\r\n\tTglCuti, TglMundur, TglNilai, TglAkhirKSS, HanyaAngkatan, \r\n\tProsesBuka, ProsesIPK, ProsesTutup, Catatan,\r\n\tLoginBuat, TglBuat, NA)\r\n\tvalues ('{$data['TahunID']}', '" . KodeID . "', '{$_SESSION['prodi']}', '{$_SESSION['prid']}', '{$data['Nama']}', '{$data['SP']}',\r\n\t'{$data['TglKuliahMulai']}', '{$data['TglKuliahSelesai']}',\r\n\t'{$data['TglKRSMulai']}', '{$data['TglKRSSelesai']}',\r\n\t'{$data['TglKRSOnlineMulai']}', '{$data['TglKRSOnlineSelesai']}',\r\n\t'{$data['TglBayarMulai']}', '{$data['TglBayarSelesai']}',\r\n\t'{$data['TglAutodebetSelesai']}', '{$data['TglAutodebetSelesai2']}',\r\n\t'{$data['TglKembaliUangKuliah']}',\r\n\t'{$data['TglUbahKRSMulai']}', '{$data['TglUbahKRSSelesai']}',\r\n\t'{$data['TglCetakKSS1']}', '{$data['TglCetakKSS2']}',\r\n\t'{$data['TglUTSMulai']}', '{$data['TglUTSSelesai']}',\t\r\n\t'{$data['TglUASMulai']}', '{$data['TglUASSelesai']}',\t\r\n\t'{$data['TglCuti']}', '{$data['TglMundur']}', '{$data['TglNilai']}', '{$data['TglAkhirKSS']}', '{$data['HanyaAngkatan']}', \r\n\t'{$data['ProsesBuka']}', '{$data['ProsesIPK']}', '{$data['ProsesTutup']}', '{$data['Catatan']}',\r\n\t'{$_SESSION['_Login']}', now(), '{$data['NA']}')";
$r = _query($s);
TutupScript();
}
示例15: Simpan
function Simpan($MhswID, $mhsw, $back)
{
$upf = $_FILES['foto']['tmp_name'];
$arrNama = explode('.', $_FILES['foto']['name']);
$tipe = $_FILES['foto']['type'];
$arrtipe = explode('/', $tipe);
$extensi = $arrtipe[1];
$dest = "foto/" . $MhswID . '.' . $extensi;
//echo $dest;
if (move_uploaded_file($upf, "../{$dest}")) {
$s = "update mhsw set Foto='{$dest}' where MhswID='{$MhswID}' ";
$r = _query($s);
TutupScript($back);
} else {
echo ErrorMsg("Gagal Upload Foto", "Tidak dapat meng-upload file foto.<br />\r\n Periksa file yg di-upload, karena besar file dibatasi cuma: <b>{$_REQUEST['MAX_FILE_SIZE']}</b> byte.");
}
//print_r($_FILES);
}