本文整理汇总了PHP中ErrorMsg函数的典型用法代码示例。如果您正苦于以下问题:PHP ErrorMsg函数的具体用法?PHP ErrorMsg怎么用?PHP ErrorMsg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ErrorMsg函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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."));
}
}
示例2: 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()' />"));
}
}
示例3: UsrSav
function UsrSav()
{
$b = array();
//$b['lvlid'] = '4';
$b['Login'] = $_REQUEST['Login'];
$b['Nama'] = $_REQUEST['Nama'];
$b['Password'] = $_REQUEST['Password'];
$b['KodeID'] = $_REQUEST['kid'];
$b['LevelID'] = $_REQUEST['lvlid'];
$b['Telephone'] = '0123456789012';
$b['Handphone'] = '0123456789012';
$b['Email'] = 'nobody@invalid.com';
$b['Alamat'] = 'Jl. Contoh Alamat No.1';
$b['Kota'] = 'Bandung';
$b['Propinsi'] = 'Jawa Barat';
$b['Negara'] = 'Indonesia';
$b['ProdiID'] = 'PTE';
$b['NA'] = 'N';
$TabelUser = GetFields('level', 'LevelID', $b['LevelID'], 'Nama, TabelUser');
$ada = GetFields($TabelUser['TabelUser'], 'Login', $b['Login'], 'Login, Nama');
if (empty($ada)) {
$s = "insert into {$TabelUser['TabelUser']} (Login, KodeID, LevelID, Nama, Password, Telephone, Handphone, Email, \n Alamat, Kota, Propinsi, Negara, ProdiID, NA)\n values('{$b['Login']}', '{$b['KodeID']}', '{$b['LevelID']}', '{$b['Nama']}', PASSWORD('{$b['Password']}'), '{$b['Telephone']}', '{$b['Handphone']}', '{$b['Email']}',\n '{$b['Alamat']}', '{$b['Kota']}', '{$b['Propinsi']}', '{$b['Negara']}', '{$b['ProdiID']}', '{$b['NA']}')";
_query($s);
} else {
echo ErrorMsg('Gagal Simpan', "Kode Login: <b>{$Login}</b> telah dipakai oleh user: <b>{$ada['Nama']}</b>.<br>\n Gunakan Kode Login yang lain.") . '<br>';
}
echo "<script>window.location = '?mnux=modules/antrianid/antrianid.dosen&gos=dltUsrCek&LevelID={$b['LevelID']}&Lgn={$b['Login']}';</script>";
}
示例4: Edit
function Edit($tanggal, $md, $id)
{
if ($md == 0) {
$jdl = "Edit Hari Libur";
$w = GetFields('harilibur', "HariLiburID='{$id}' and KodeID", KodeID, '*');
} else {
if ($md == 1) {
$jdl = "Tambah Hari Libur";
$w = array();
$w['Warna'] = '#';
$w['TidakAdaKuliah'] = 'Y';
$w['NA'] = 'N';
$w['TanggalMulai'] = $tanggal;
$w['TanggalSelesai'] = $tanggal;
} else {
die(ErrorMsg("Error", "Mode penyimpanan tidak diketahui"));
}
}
CheckFormScript('Keterangan');
$opttanggalmulai = GetDateOption($w['TanggalMulai'], 'TanggalMulai');
$opttanggalselesai = GetDateOption($w['TanggalSelesai'], 'TanggalSelesai');
$optjenislibur = GetOption2('jenislibur', 'Nama', 'JenisLiburID', $w['JenisLiburID'], "KodeID='" . KodeID . "'", 'JenisLiburID', 0, 1);
$checkadakuliah = $w['TidakAdaKuliah'] == 'Y' ? 'checked' : '';
$NA = $w['NA'] == 'Y' ? 'checked' : '';
echo "<table class=bsc cellspacing=1 width=100%>\r\n\t\t\t<form name='datalibur' id='datalibur' action='?mnux={$_SESSION['mnux']}&gos=SavData' method=POST onSubmit=\"return CheckForm(this)\">\r\n\t\t\t<input type=hidden name='md' value='{$md}'>\r\n\t\t\t<input type=hidden name='id' value='{$id}'>\r\n\t\t\t<tr><td class=inp>Tanggal Mulai:</td>\r\n\t\t\t <td class=ul1>{$opttanggalmulai}</td>\r\n\t\t\t </tr>\r\n\t\t\t<tr><td class=inp>Tanggal Selesai:</td>\r\n\t\t\t <td class=ul1>{$opttanggalselesai}</td>\r\n\t\t\t </tr>\r\n\t\t\t<tr><td class=inp>Keterangan:</td>\r\n\t\t\t <td class=ul1><textarea name='Keterangan' cols=30 row=2>{$w['Keterangan']}</textarea></td>\r\n\t\t\t </tr>\r\n\t\t\t<tr><td class=inp>Jenis Libur:</td>\r\n\t\t\t <td class=ul1><select name='JenisLiburID'>{$optjenislibur}</select></td></tr>\r\n\t\t\t<tr><td class=inp>Tidak ada kuliah/ujian?</td>\r\n\t\t\t <td class=ul1><input type=checkbox name='TidakAdaKuliah' value='Y' {$checkadakuliah}></td>\r\n\t\t\t </tr>\r\n\t\t\t<tr><td class=inp>Tidak Aktif?</td>\r\n\t\t\t <td class=u1l><input type=checkbox name='NA' value='Y' {$NA}></td></tr>\r\n\t\t\t<tr><td colspan=2 align=center><input type=submit name='Simpan' value='Simpan Hari Libur' onClick=\"return CekTanggal(this.form)\">\r\n\t\t\t\t\t\t\t\t\t\t <input type=button name='Batal' value='Batal' onClick=\"window.close()\"></td>\r\n\t\t\t </tr>\r\n\t\t\t </form>\r\n\t\t </table>\r\n\t\t <script>\r\n\t\t\tfunction CekTanggal(frm)\r\n\t\t\t{\tvar mulai = new Date(frm.TanggalMulai_y.value, frm.TanggalMulai_m.value, frm.TanggalMulai_d.value);\r\n\t\t\t\tvar selesai = new Date(frm.TanggalSelesai_y.value, frm.TanggalSelesai_m.value, frm.TanggalSelesai_d.value);\r\n\t\t\t\r\n\t\t\t\tif(selesai < mulai) \r\n\t\t\t\t{\talert('Tanggal Mulai tidak boleh melebihi Tanggal Selesai');\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t </script>\r\n\t\t ";
}
示例5: BeaSav
function BeaSav()
{
$md = $_REQUEST['md'];
$BeasiswaID = $_REQUEST['BeasiswaID'];
$Nama = sqling($_REQUEST['Nama']);
$BIPOTNamaID = $_REQUEST['BIPOTNamaID'];
$IPSMin = $_REQUEST['IPSMin'] + 0;
$IPKMin = $_REQUEST['IPKMin'] + 0;
$Keterangan = sqling($_REQUEST['Keterangan']);
$Prasyarat = sqling($_REQUEST['Prasyarat']);
$NA = empty($_REQUEST['NA']) ? "N" : $_REQUEST['NA'];
// Simpan
if ($md == 0) {
$s = "update beasiswa set Nama='{$Nama}', IPSMin='{$IPSMin}', IPKMin='{$IPKMin}', Keterangan='{$Keterangan}', NA='{$NA}',\r\n BIPOTNamaID='{$BIPOTNamaID}',\r\n Prasyarat='{$Prasyarat}', LoginEdit='{$_SESSION['_Login']}', TanggalEdit=now()\r\n where BeasiswaID='{$BeasiswaID}' ";
$r = _query($s);
} else {
$ada = GetFields('beasiswa', "BeasiswaID", $BeasiswaID, "*");
if (empty($ada)) {
$s = "insert into beasiswa (BeasiswaID, KodeID, BIPOTNamaID, Nama, IPSMin, IPKMin, Keterangan, NA,\r\n Prasyarat, LoginBuat, TanggalBuat)\r\n values ('{$BeasiswaID}', '{$_SESSION['KodeID']}', '{$BIPOTNamaID}', '{$Nama}', '{$IPSMin}', '{$IPKMin}', '{$Keterangan}', '{$NA}',\r\n '{$Prasyarat}', '{$_SESSION['_Login']}', now())";
$r = _query($s);
} else {
echo ErrorMsg("Tidak Dapat Disimpan", "Beasiswa dengan kode: <b>{$ada['BeasiswaID']}</b> telah ada.");
}
}
DftrJenisBeasiswa();
}
示例6: KalendarAkd
function KalendarAkd()
{
$t = GetFields('tahun', "ProdiID='{$_SESSION['prodi']}' and ProgramID='{$_SESSION['prid']}' and TahunID", $_SESSION['tahun'], '*');
if (empty($t)) {
echo ErrorMsg("Kalendar Akademik Tidak Ada", "Kalendar Akademik <font size=+1>{$_SESSION['tahun']}</font> tidak ada atau\n belum dibuat.<br />\n Hubungi MIS/IT untuk informasi lebih lanjut");
} else {
$_prd = GetaField('prodi', 'ProdiID', $_SESSION['prodi'], 'Nama');
$_prg = GetaField('program', 'ProgramID', $_SESSION['prid'], 'Nama');
$TglKRSMulai = FormatTanggal($t['TglKRSMulai']);
$TglKRSSelesai = FormatTanggal($t['TglKRSSelesai']);
$TglUbahKRSMulai = FormatTanggal($t['TglUbahKRSMulai']);
$TglUbahKRSSelesai = FormatTanggal($t['TglUbahKRSSelesai']);
$TglCuti = FormatTanggal($t['TglCuti']);
$TglMundur = FormatTanggal($t['TglMundur']);
$TglKembaliUangKuliah = FormatTanggal($t['TglKembaliUangKuliah']);
$TglBayarMulai = FormatTanggal($t['TglBayarMulai']);
$TglBayarSelesai = FormatTanggal($t['TglBayarSelesai']);
$TglKuliahMulai = FormatTanggal($t['TglKuliahMulai']);
$TglKuliahSelesai = FormatTanggal($t['TglKuliahSelesai']);
$TglUTSMulai = FormatTanggal($t['TglUTSMulai']);
$TglUTSSelesai = FormatTanggal($t['TglUTSSelesai']);
$TglUASMulai = FormatTanggal($t['TglUASMulai']);
$TglUASSelesai = FormatTanggal($t['TglUASSelesai']);
$TglNilai = FormatTanggal($t['TglNilai']);
echo "<p><table class=box cellspacing=1>\n <tr><td class=ul colspan=2><font size=+1>Kalendar Akademik</font></th></tr>\n <tr><td class=inp>Tahun Akademik</td>\n <td class=ul>{$t['TahunID']}</td></tr>\n <tr><td class=inp>Nama Tahun</td>\n <td class=ul>{$t['Nama']}</td></tr>\n <tr><td class=inp>Program</td>\n <td class=ul>{$_prg}</td></tr>\n <tr><td class=inp>Program Studi</td>\n <td class=ul>{$_prd}</td></tr>\n <tr><td class=inp>Tidak Aktif?</td><td class=ul><img src='img/book{$t['NA']}.gif'></td></tr>\n \n <tr><td class=ul colspan=2><font size=+1>KRS</font></td></tr>\n <tr><td class=inp>Mulai KRS</td>\n <td class=ul>{$TglKRSMulai}</td></tr>\n <tr><td class=inp>Selesai KRS</td>\n <td class=ul>{$TglKRSSelesai}</td></tr>\n <tr><td class=inp>Mulai Ubah KRS</td><td class=ul>{$TglUbahKRSMulai}</td></tr>\n <tr><td class=inp>Selesai Ubah KRS</td><td class=ul>{$TglUbahKRSSelesai}</td></tr>\n <tr><td class=inp>Batas Pengajuan Cuti</td><td class=ul>{$TglCuti}</td></tr>\n <tr><td class=inp>Batas Pengajuan Mundur Kuliah</td><td class=ul>{$TglMundur}</td></tr>\n <tr><td class=inp>Batas Pengambilan Kelebihan Uang Kuliah</td><td class=ul>{$TglKembaliUangKuliah}</td></tr>\n \n <tr><td class=ul colspan=2><font size=+1>Masa Pembayaran</font></td></tr>\n <tr><td class=inp>Mulai Pembayaran</td><td class=ul>{$TglBayarMulai}</td></tr>\n <tr><td class=inp>Selesai Pembayaran</td><td class=ul>{$TglBayarSelesai}</td></tr>\n \n <tr><td class=ul colspan=2><font size=+1>Periode Perkuliahan</font></td></tr>\n <tr><td class=inp>Mulai Kuliah</td><td class=ul>{$TglKuliahMulai}</td></tr>\n <tr><td class=inp>Selesai Kuliah</td><td class=ul>{$TglKuliahSelesai}</td></tr>\n \n <tr><td class=ul colspan=2><font size=+1>Periode Ujian Tengah Semester</font></td></tr>\n <tr><td class=inp>Mulai UTS</td><td class=ul>{$TglUTSMulai}</td></tr>\n <tr><td class=inp>Selesai UTS</td><td class=ul>{$TglUTSSelesai}</td></tr>\n \n <tr><td class=ul colspan=2><font size=+1>Periode Ujian Akhir Semester</font></td></tr>\n <tr><td class=inp>Mulai UAS</td><td class=ul>{$TglUASMulai}</td></tr>\n <tr><td class=inp>Selesai UAS</td><td class=ul>{$TglUASSelesai}</td></tr>\n <tr><td class=inp>Batas Akhir Penilaian</td><td class=ul>{$TglNilai}</td></tr>\n <tr><td class=inp>Catatan</td>\n <td class=ul>{$t['Catatan']} </td></tr>\n \n </table></p>";
}
}
示例7: update
public function update($id, $nit, $razon_social, $objeto_social, $direccion, $nombre_contacto_1, $cargo_contacto_1, $email_contacto_1, $telefono_contacto_1, $nombre_contacto_2, $cargo_contacto_2, $email_contacto_2, $telefono_contacto_2, $estado)
{
try {
$stmt = $this->db->prepare("UPDATE cliente SET nit=:nit,\r\n razon_social=:razon_social,\r\n objeto_social=:objeto_social,\r\n direccion=:direccion,\r\n nombre_contacto_1=:nombre_contacto_1,\r\n cargo_contacto_1=:cargo_contacto_1,\r\n email_contacto_1=:email_contacto_1,\r\n telefono_contacto_1=:telefono_contacto_1,\r\n nombre_contacto_2=:nombre_contacto_2,\r\n cargo_contacto_2=:cargo_contacto_2,\r\n email_contacto_2=:email_contacto_2,\r\n telefono_contacto_2=:telefono_contacto_2,\r\n estado=:estado\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE id=:id ");
$stmt->bindparam(":nit", $nit);
$stmt->bindparam(":razon_social", $razon_social);
$stmt->bindparam(":objeto_social", $objeto_social);
$stmt->bindparam(":direccion", $direccion);
$stmt->bindparam(":nombre_contacto_1", $nombre_contacto_1);
$stmt->bindparam(":cargo_contacto_1", $cargo_contacto_1);
$stmt->bindparam(":email_contacto_1", $email_contacto_1);
$stmt->bindparam(":telefono_contacto_1", $telefono_contacto_1);
$stmt->bindparam(":nombre_contacto_2", $nombre_contacto_2);
$stmt->bindparam(":cargo_contacto_2", $cargo_contacto_2);
$stmt->bindparam(":email_contacto_2", $email_contacto_2);
$stmt->bindparam(":telefono_contacto_2", $telefono_contacto_2);
$stmt->bindparam(":estado", $estado);
$stmt->bindparam(":id", $id);
$stmt->execute();
return true;
} catch (PDOException $e) {
echo ErrorMsg();
echo $e->getMessage();
return false;
}
}
示例8: 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);
}
}
示例9: CetakPerolehanSKS
function CetakPerolehanSKS()
{
$s = "select m.MhswID, m.Nama, sm.Nama as SM\r\n from mhsw m\r\n left outer join statusmhsw sm on m.StatusMhswID=sm.StatusMhswID\r\n where ('{$_SESSION['DariNPM']}' <= m.MhswID)\r\n and (m.MhswID <= '{$_SESSION['SampaiNPM']}')\r\n and sm.Nilai=1\r\n order by m.MhswID";
$r = _query($s);
$jml = _num_rows($r);
if ($jml == 0) {
echo ErrorMsg("Tidak ada Data", "Tidak ada mahasiswa dalam rentang NPM: <b>{$_SESSION['DariNPM']}</b> s/d <b>{$_SESSION['SampaiNPM']}</b>.");
} else {
echo "<p>Akan diproses: <font size=+1>{$jml}</font> mahasiswa.\r\n Tunggu sampai proses selesai. Setelah selesai baru akan dicetak.</p>";
// Simpan data ke memori
$n = 0;
while ($w = _fetch_array($r)) {
$n++;
$_SESSION["PERO-MhswID-{$n}"] = $w['MhswID'];
}
$_SESSION["PERO-POS"] = 0;
$_SESSION["PERO-MAX"] = $jml;
$_SESSION["PERO-FILE"] = "tmp/{$_SESSION['_Login']}.PerolehanSKS.dwoprn";
// init file
$f = fopen($_SESSION["PERO-FILE"], 'w');
fwrite($f, chr(27));
fclose($f);
// IFRAME
echo "<p><IFRAME src='akd.lap.perolehansks.go.php' frameborder=0 height=100% width=100%>\r\n </IFRAME></p>";
}
}
示例10: cekkss
function cekkss()
{
$mhswid = $_REQUEST['mhswid'];
$khsid = $_REQUEST['khsid'];
$tahun = $_REQUEST['tahun'];
$khs = GetFields('khs', 'KHSID', $khsid, '*');
$balance = $khs['Biaya'] - $khs['Bayar'] + $khs['Tarik'] - $khs['Potongan'];
// cek sudah lunas atau belum
if ($balance > 0) {
$acc = GetFields('keusetup', 'NA', 'N', '*');
$htg = GetaField('bipotmhsw', "MhswID='{$mshwid}' and TahunID='{$tahun}' and BIPOTNamaID", $acc['HutangNext'], "Jumlah*Besar") + 0;
if ($htg > 0) {
$Nama = GetaField('bipotnama', 'BIPOTNamaID', $acc['HutangNext'], 'Nama');
$_htg = number_format($htg);
echo ErrorMsg("Belum Lunas", "Mahasiswa tidak dapat mencetak KSS karena masih memiliki <b>{$Nama}</b> sebesar <b>{$_htg}</b>");
CetakKSS();
} else {
cetakkssgo();
}
} else {
// cek apakah ada KRS gagal?
$ggl = GetaField("krs", "NA='Y' and KHSID", $khsid, "count(KRSID)") + 0;
if ($ggl > 0) {
echo ErrorMsg("Tidak Dapat Dicetak", "KSS tidak dapat dicetak karena masih ada <b>{$ggl}</b> matakuliah yang gagal KRS.<br />\r\n Hapus terlebih dahulu matakuliah yg gagal baru kemudian cetak KSS.");
CetakKSS();
} else {
cetakkssgo();
}
}
}
示例11: KampSav
function KampSav()
{
$md = $_REQUEST['md'] + 0;
$KampusID = $_REQUEST['KampusID'];
$Nama = sqling($_REQUEST['Nama']);
$KodeID = $_REQUEST['KodeID'];
$Alamat = sqling($_REQUEST['Alamat']);
$Kota = sqling($_REQUEST['Kota']);
$Telepon = sqling($_REQUEST['Telepon']);
$Fax = sqling($_REQUEST['Fax']);
$NA = empty($_REQUEST['NA']) ? 'N' : $_REQUEST['NA'];
// simpan
if ($md == 0) {
$s = "update kampus set Nama='{$Nama}', KodeID='{$KodeID}',\r\n Alamat='{$Alamat}', Kota='{$Kota}', Telepon='{$Telepon}', Fax='{$Fax}', NA='{$NA}'\r\n where KampusID='{$KampusID}' ";
$r = _query($s);
} else {
$ada = GetFields('kampus', 'KampusID', $KampusID, '*');
if (!empty($ada)) {
echo ErrorMsg("Gagal Simpan", "Kampus dengan kode: <b>{$KampusID}</b> telah ada dengan nama <b>{$ada['Nama']}</b>.<br>\r\n Gunakan kode kampus lain.");
} else {
$s = "insert into kampus (KampusID, Nama, KodeID,\r\n Alamat, Kota, Telepon, Fax, NA)\r\n values ('{$KampusID}', '{$Nama}', '{$KodeID}',\r\n '{$Alamat}', '{$Kota}', '{$Telepon}', '{$Fax}', '{$NA}')";
$r = _query($s);
}
}
DftrKampus();
}
示例12: 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."));
}
}
示例13: 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();
}
示例14: SyaratSav
function SyaratSav()
{
$md = $_REQUEST['md'] + 0;
$Nama = sqling($_REQUEST['Nama']);
$_StatusAwalID = array();
$_StatusAwalID = $_REQUEST['StatusAwalID'];
$StatusAwalID = empty($_StatusAwalID) ? '' : "." . implode('.', $_StatusAwalID) . ".";
$_ProdiID = array();
$_ProdiID = $_REQUEST['ProdiID'];
$ProdiID = empty($_ProdiID) ? '' : "." . implode('.', $_ProdiID) . ".";
$NA = empty($_REQUEST['NA']) ? 'N' : $_REQUEST['NA'];
if ($md == 0) {
$s = "update pmbsyarat set ProdiID='{$ProdiID}', StatusAwalID='{$StatusAwalID}', NA='{$NA}'\r\n where PMBSyaratID='{$_REQUEST['syid']}' and KodeID='{$_SESSION['KodeID']}' ";
$r = _query($s);
} else {
$ada = GetFields('pmbsyarat', "KodeID='{$_SESSION['KodeID']}' and PMBSyaratID", $_REQUEST['syid'], '*');
if (empty($ada)) {
$s = "insert into pmbsyarat (PMBSyaratID, KodeID, Nama, StatusAwalID, ProdiID, NA)\r\n values ('{$_REQUEST['syid']}', '{$_SESSION['KodeID']}', '{$Nama}', '{$StatusAwalID}', '{$ProdiID}', '{$NA}')";
$r = _query($s);
} else {
echo ErrorMsg("Gagal Simpan", "Anda tidak bisa menyimpan syarat dengan ID <b>{$_REQUEST['syid']}</b> karena telah digunakan:\r\n <p><table class=bsc cellspacing=1 cellpadding=4>\r\n <tr><td class=ul>ID</td><td class=ul><b>{$ada['PMBSyaratID']}</b></td></tr>\r\n <tr><td class=ul>Nama</td><td class=ul><b>{$ada['Nama']}</b></td></tr>\r\n </table></p>");
}
}
DftrSyarat();
}
示例15: RuangSav
function RuangSav()
{
$md = $_REQUEST['md'] + 0;
$RuangID = $_REQUEST['RuangID'];
$Nama = sqling($_REQUEST['Nama']);
$KampusID = $_REQUEST['KampusID'];
$Lantai = $_REQUEST['Lantai'] + 0;
$RuangKuliah = empty($_REQUEST['RuangKuliah']) ? 'N' : $_REQUEST['RuangKuliah'];
$Kapasitas = $_REQUEST['Kapasitas'] + 0;
$KapasitasUjian = $_REQUEST['KapasitasUjian'] + 0;
$KolomUjian = $_REQUEST['KolomUjian'] + 0;
$UntukUSM = empty($_REQUEST['UntukUSM']) ? 'N' : $_REQUEST['UntukUSM'];
$Keterangan = sqling($_REQUEST['Keterangan']);
$NA = empty($_REQUEST['NA']) ? 'N' : $_REQUEST['NA'];
$prodi = $_REQUEST['ProdiID'];
$ProdiID = empty($prodi) ? '' : '.' . implode('.', $prodi) . '.';
if ($md == 0) {
$s = "update ruang set Nama='{$Nama}', ProdiID='{$ProdiID}',\r\n KampusID='{$KampusID}', Lantai='{$Lantai}',\r\n RuangKuliah='{$RuangKuliah}', Kapasitas='{$Kapasitas}', KapasitasUjian='{$KapasitasUjian}', KolomUjian='{$KolomUjian}',\r\n UntukUSM='{$UntukUSM}', Keterangan='{$Keterangan}', NA='{$NA}' where RuangID='{$RuangID}' ";
$r = _query($s);
} else {
$ada = GetFields('ruang', 'RuangID', $_REQUEST['RuangID'], '*');
if (empty($ada)) {
$s = "insert into ruang(RuangID, Nama, ProdiID, KampusID, Lantai, RuangKuliah,\r\n Kapasitas, KapasitasUjian, KolomUjian, UntukUSM, Keterangan, NA)\r\n values('{$RuangID}', '{$Nama}', '{$ProdiID}', '{$KampusID}', '{$Lantai}', '{$RuangKuliah}',\r\n '{$Kapasitas}', '{$KapasitasUjian}', '{$KolomUjian}', '{$UntukUSM}', '{$Keterangan}', '{$NA}')";
$r = _query($s);
} else {
echo ErrorMsg('Terjadi Kesalahan', "Kode ruang telah digunakan: <b>{$ada['RuangID']} - {$ada['Nama']}</b> di gedung: {$ada['KampusID']}.<br>\r\n Gunakan kode ruang lain.");
}
}
DftrRuang();
}