当前位置: 首页>>代码示例>>PHP>>正文


PHP sqling函数代码示例

本文整理汇总了PHP中sqling函数的典型用法代码示例。如果您正苦于以下问题:PHP sqling函数的具体用法?PHP sqling怎么用?PHP sqling使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了sqling函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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."));
    }
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:32,代码来源:quotabeasiswa.edt.php

示例2: 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."));
    }
}
开发者ID:anggadjava,项目名称:sisfor,代码行数:25,代码来源:pmbsetup.presenter.edit.php

示例3: 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);
    }
}
开发者ID:anggadjava,项目名称:sisfor,代码行数:35,代码来源:nilai.gagal.php

示例4: 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();
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:30,代码来源:ruang.php

示例5: CheckDulu

function CheckDulu()
{
    $Angkatan = sqling($_REQUEST['Angkatan']);
    $ProdiID = sqling($_REQUEST['ProdiID']);
    $BIPOTID = $_REQUEST['BIPOTID'];
    $s = "select m.MhswID, m.ProdiID, m.ProgramID, k.TahunID\r\n    from mhsw m\r\n\tleft outer join khs k on k.MhswID = m.MhswID\r\n    where m.KodeID = '" . KodeID . "'\r\n      and m.ProdiID = '{$ProdiID}'\r\n      and LEFT(k.TahunID,4) = '{$Angkatan}'\r\n      and k.BIPOTID = 0\r\n    order by k.MhswID";
    $r = _query($s);
    $n = 0;
    while ($w = _fetch_array($r)) {
        $n++;
        $_SESSION['_bipotMhswID_' . $n] = $w['MhswID'];
        $_SESSION['_bipotProdiID_' . $n] = $w['ProdiID'];
        $_SESSION['_bipotProgramID_' . $n] = $w['ProgramID'];
        $_SESSION['_bipotTahunID_' . $n] = $w['TahunID'];
    }
    $_SESSION['_bipotBIPOTID'] = $BIPOTID;
    $_SESSION['_bipotJumlah'] = $n;
    $_SESSION['_bipotProgress'] = 1;
    echo Konfirmasi("Proses Isi BIPOT Mhsw", "Ada <b>{$n}</b> data mahasiswa yg akan diproses.<br />\r\n    Silakan klik tombol di bawah ini untuk memulai proses.\r\n    <hr size=1 color=silver />\r\n    Opsi: <input type=button name='Proses' value='Proses'\r\n      onClick=\"javascript:ProsesBipotMhsw('{$ProdiID}', '{$Angkatan}')\" />\r\n      <input type=button name='Batal' value='Batal'\r\n      onClick=\"location='?mnux={$_SESSION['mnux']}'\" />");
    echo <<<ESD
  <script>
  <!--
  function ProsesBipotMhsw(prd, angk) {
    lnk = "{$_SESSION['mnux']}.proses.php?ProdiID="+prd+"&Angkatan="+angk;
    win2 = window.open(lnk, "", "width=300, height=250, scrollbars, status");
    if (win2.opener == null) childWindow.opener = self;
  }
  //-->
  </script>
ESD;
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:31,代码来源:bipotmhsw.php

示例6: BPMSav

function BPMSav()
{
    $bpmid = $_REQUEST['bpmid'];
    $RekeningID = $_REQUEST['RekeningID'];
    $Autodebet = empty($_REQUEST['Autodebet']) ? '0' : $_REQUEST['Autodebet'];
    $Bank = $_REQUEST['Bank'];
    $BuktiSetoran = $_REQUEST['BuktiSetoran'];
    $Tanggal = "{$_REQUEST['Tanggal_y']}-{$_REQUEST['Tanggal_m']}-{$_REQUEST['Tanggal_d']}";
    $Jumlah = $_REQUEST['Jumlah'] + 0;
    $JumlahLain = $_REQUEST['JumlahLain'] + 0;
    $Keterangan = sqling($_REQUEST['Keterangan']);
    $MhswID = $_REQUEST['MhswID'];
    $khsid = $_REQUEST['khsid'];
    // Simpan
    $s = "update bayarmhsw\r\n    set RekeningID='{$RekeningID}', Autodebet='{$Autodebet}',\r\n    Bank='{$Bank}', BuktiSetoran='{$BuktiSetoran}', Keterangan='{$Keterangan}',\r\n    Jumlah={$Jumlah}, JumlahLain={$JumlahLain},\r\n    Tanggal='{$Tanggal}', LoginEdit='{$_SESSION['_Login']}', TanggalEdit=now()\r\n    where BayarMhswID='{$bpmid}'";
    $r = _query($s);
    // update pembayaran
    /*$_REQUEST['khsid'] = $khsid;
      $_REQUEST['mhswid'] = $MhswID;
      $_REQUEST['pmbmhswid'] = 1;
      PrcBIPOTSesi(); */
    include_once "mhswkeu.lib.php";
    HitungBiayaBayarMhsw($MhswID, $khsid);
    echo "<script>window.location='?mnux={$_SESSION['bck']}&gos={$_SESSION['bckgos']}&MhswID={$MhswID}&khsid={$khsid}';</script>";
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:25,代码来源:bpm.edt.php

示例7: NilaiKlinikSav

function NilaiKlinikSav($jdwl)
{
    global $KodeID;
    // Simpan jdwl dulu
    $NoSurat = sqling($_REQUEST['NoSurat']);
    $TglSurat = "{$_REQUEST['TglSurat_y']}-{$_REQUEST['TglSurat_m']}-{$_REQUEST['TglSurat_d']}";
    if ($NoSurat != $jdwl['NoSurat'] || $TglSurat != $jdwl['TglSurat']) {
        $s = "update jadwal set NoSurat='{$NoSurat}', TglSurat='{$TglSurat}' where JadwalID='{$jdwl['JadwalID']}' ";
        $r = _query($s);
    }
    // Simpan data nilai
    $jml = $_REQUEST['jml'] + 0;
    if ($jml > 0) {
        for ($i = 1; $i <= $jml; $i++) {
            $krsid = $_REQUEST["KRS_{$i}"] + 0;
            $NilaiAkhir = $_REQUEST["NilaiAkhir_{$i}"] + 0;
            $krs = GetFields('krs', 'KRSID', $krsid, "*");
            $ProdiID = GetaField('mhsw', 'MhswID', $krs['MhswID'], 'ProdiID');
            $arrnilai = GetFields('nilai', "KodeID='{$KodeID}' and NilaiMin <= '{$NilaiAkhir}' and '{$NilaiAkhir}' <= NilaiMax and ProdiID", $ProdiID, "Nama, Bobot");
            $GradeNilai = empty($arrnilai['Nama']) ? 'X' : $arrnilai['Nama'];
            $BobotNilai = $arrnilai['Bobot'] + 0;
            // Simpan data
            $s = "update krs set NilaiAkhir='{$NilaiAkhir}',\r\n        GradeNilai='{$GradeNilai}', BobotNilai='{$BobotNilai}'\r\n        where KRSID={$krsid}";
            $r = _query($s);
        }
    }
    echo "<script>window.location = '?mnux={$_SESSION['mnux']}';</script>";
}
开发者ID:anggadjava,项目名称:sisfor,代码行数:28,代码来源:klinik.nilai.php

示例8: AlumniKrjSav

function AlumniKrjSav()
{
    $md = $_REQUEST['md'];
    $AlumniID = $_REQUEST['AlumniID'];
    $Nama = sqling($_REQUEST['Nama']);
    $Jabatan = sqling($_REQUEST['Jabatan']);
    $Alamat = sqling($_REQUEST['Alamat']);
    $Kota = sqling($_REQUEST['Kota']);
    $KodePos = sqling($_REQUEST['KodePos']);
    $Propinsi = sqling($_REQUEST['Propinsi']);
    $Negara = sqling($_REQUEST['Negara']);
    $Telepon = sqling($_REQUEST['Telepon']);
    $Facsimile = sqling($_REQUEST['Facsimile']);
    $Website = sqling($_REQUEST['Website']);
    $NA = empty($_REQUEST['NA']) ? "N" : $_REQUEST['NA'];
    $MK = "{$_REQUEST['MK_y']}-{$_REQUEST['MK_m']}-{$_REQUEST['MK_d']}";
    $KK = "{$_REQUEST['KK_y']}-{$_REQUEST['KK_m']}-{$_REQUEST['KK_d']}";
    // simpan
    if ($md == 0) {
        $AlumniKerjaID = $_REQUEST['AlumniKerjaID'];
        $s = "update alumnikerja set Nama='{$Nama}', Jabatan='{$Jabatan}',\r\n      Alamat='{$Alamat}', Kota='{$Kota}', KodePos='{$KodePos}',\r\n      Propinsi='{$Propinsi}', Negara='{$Negara}',\r\n      Telepon='{$Telepon}', Facsimile='{$Facsimile}',\r\n      Website='{$Website}', NA='{$NA}',\r\n      MulaiKerja='{$MK}', KeluarKerja='{$KK}',\r\n      LoginEdit='{$_SESSION['_Login']}', TanggalEdit=now()\r\n      where AlumniKerjaID='{$AlumniKerjaID}' ";
        $r = _query($s);
    } else {
        $s = "insert into alumnikerja (MhswID, Nama, Jabatan,\r\n      Alamat, Kota, KodePos, Propinsi, Negara,\r\n      Telepon, Facsimile, Website, NA,\r\n      MulaiKerja, KeluarKerja)\r\n      values ('{$AlumniID}', '{$Nama}', '{$Jabatan}',\r\n      '{$Alamat}', '{$Kota}', '{$KodePos}', '{$Propinsi}', '{$Negara}',\r\n      '{$Telepon}', '{$Facsimile}', '{$Website}', '{$NA}',\r\n      '{$MK}', '{$KK}')";
        $r = _query($s);
    }
}
开发者ID:anggadjava,项目名称:sisfor,代码行数:27,代码来源:alumni.sav.php

示例9: JdwlTtp1

function JdwlTtp1()
{
    $JadwalID = $_REQUEST['JadwalID'];
    $jdwl = GetFields('jadwal', 'JadwalID', $JadwalID, '*');
    // Parameter
    $NoSurat = sqling($_REQUEST['NoSurat']);
    $Tgl = "{$_REQUEST['Tgl_y']}-{$_REQUEST['Tgl_m']}-{$_REQUEST['Tgl_d']}";
    $Keterangan = sqling($_REQUEST['Keterangan']);
    // Tutup
    $st = "insert into jadwaltutup (TahunID, ProgramID, ProdiID,\r\n    JadwalID, MKID, MKKode, Nama, DosenID,\r\n    NamaKelas, JenisJadwalID, \r\n    HariID, JamMulai, JamSelesai,\r\n    NoSurat, Tanggal, Keterangan,\r\n    LoginBuat, TanggalBuat)\r\n    values ('{$jdwl['TahunID']}', '{$jdwl['ProgramID']}', '{$jdwl['ProdiID']}',\r\n    '{$JadwalID}', '{$jdwl['MKID']}', '{$jdwl['MKKode']}', '{$jdwl['Nama']}', '{$jdwl['DosenID']}',\r\n    '{$jdwl['NamaKelas']}', '{$jdwl['JenisJadwalID']}',\r\n    '{$jdwl['HariID']}', '{$jdwl['JamMulai']}', '{$jdwl['JamSelesai']}',\r\n    '{$NoSurat}', '{$Tgl}', '{$Keterangan}',\r\n    '{$_SESSION['_Login']}', now())";
    $rt = _query($st);
    // set semua krs menjadi tutup
    echo "<p>KRS Mahasiswa yg dibatalkan:</p>";
    echo "<ol>";
    $s = "select * from krs where JadwalID={$JadwalID}";
    $r = _query($s);
    while ($w = _fetch_array($r)) {
        // batalkan KRS
        $sk = "update krs set StatusKRSID='M', NA='Y', CatatanError='Jadwal dihapus'\r\n      where KRSID={$w['KRSID']} ";
        $rk = _query($sk);
        // update pembayaran
        $_REQUEST['khsid'] = $w['KHSID'];
        $_REQUEST['mhswid'] = $w['MhswID'];
        $_REQUEST['pmbmhswid'] = 1;
        PrcBIPOTSesi();
        echo "<li>{$w['MhswID']}</li>";
    }
    echo "</ol>";
    // Hapus
    $sh = "update jadwal set NA='Y' where JadwalID={$JadwalID} ";
    $rh = _query($sh);
    DftrJdwl();
}
开发者ID:anggadjava,项目名称:sisfor,代码行数:33,代码来源:jadwal.tutup.php

示例10: 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();
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:26,代码来源:beasiswa.jen.php

示例11: vendorSav

function vendorSav() {
  global $DefaultGOS, $KodeID;
  $md = $_REQUEST['md']+0;
  $nm = strtoupper(sqling($_REQUEST['Nama']));
  $vendorid = $_REQUEST['VendorID']+0;
  $alamat =$_REQUEST['Alamat'];
  $telp =$_REQUEST['Telp'];
  $fax =$_REQUEST['Fax'];

  $NA = (empty($_REQUEST['NA']))? 'N' : $_REQUEST['NA'];
  if ($md == 0) {
    $s = "update vendor set VendorID='$vendorid', Alamat='$alamat', Telp='$telp', Fax='$fax', LoginEdit='$_SESSION[_Nama]', TglEdit='$Actiondate', NA='$NA'
      where VendorID=$vendorid";
    $r = _query($s);
    $DefaultGOS();
  }
  else {
    $ada = GetFields('kelompokasset', "KodeID='$KodeID' and KelompokID", $KelompokID, '*');
    if (empty($ada)) {
      $s = "insert into vendor (VendorID, Nama, Alamat, Telp, Fax, KodeID, LoginAdd, TglAdd, NA)
        values ('$vendorid', '$nm', '$alamat', '$telp', '$fax', '$KodeID', '$_SESSION[_Nama]', '$Actiondate', '$NA')";
      $r = _query($s);
      echo "<script>window.location = '?mnux=vendor'; </script>";
    }
    else {
      echo ErrorMsg("Gagal Simpan",
      "Data pejabat <b>$JabatanID</b> sudah ada.<br />
      Anda tidak dapat memasukkan jabatan ini lebih dari 1 kali.");
      $DefaultGOS();
    }
  }
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:32,代码来源:vendor.php

示例12: AkademikSav

function AkademikSav()
{
    // Cek Kelengkapan
    $_syarat = array();
    $_syarat = $_REQUEST['PMBSyaratID'];
    $syarat = empty($_syarat) ? '' : '.' . implode('.', $_syarat) . '.';
    // Cek Kelengkapan
    $mhsw = GetFields('mhsw', 'MhswID', $_REQUEST['mhswid'], 'StatusAwalID, ProdiID, Syarat, SyaratLengkap');
    $s = "select PMBSyaratID, Nama\r\n    from pmbsyarat\r\n    where NA='N' and KodeID='{$_SESSION['KodeID']}'\r\n      and INSTR(StatusAwalID, '.{$mhsw['StatusAwalID']}.') >0\r\n      and INSTR(ProdiID, '.{$mhsw['ProdiID']}.') >0\r\n    order by PMBSyaratID";
    $r = _query($s);
    $lkp = True;
    if (!empty($_syarat)) {
        while ($w = _fetch_array($r)) {
            if (array_search($w['PMBSyaratID'], $_syarat) === false) {
                $lkp = false;
            }
        }
    } else {
        $lkp = false;
    }
    $Lengkap = $lkp == true ? 'Y' : 'N';
    // Simpan
    $TahunID = sqling($_REQUEST['TahunID']);
    $s = "update mhsw \r\n    set PenasehatAkademik='{$_REQUEST['PenasehatAkademik']}', ProgramID='{$_REQUEST['ProgramID']}',\r\n        TahunID = '{$TahunID}',\r\n        StatusAwalID='{$_REQUEST['StatusAwalID']}', StatusMhswID='{$_REQUEST['StatusMhswID']}',\r\n        Syarat='{$syarat}', SyaratLengkap='{$Lengkap}', BatasStudi='{$_REQUEST['BatasStudi']}'\r\n    where MhswID='{$_REQUEST['mhswid']}' ";
    $r = _query($s);
    BerhasilSimpan("?mnux={$_SESSION['mnux']}&submodul={$_SESSION['submodul']}", 10);
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:27,代码来源:mhsw.edt.akd.php

示例13: DataSav

function DataSav()
{
    $md = $_REQUEST['md'] + 0;
    $Kode = $_REQUEST['Kode'];
    $KodeHukum = sqling($_REQUEST['KodeHukum']);
    $Nama = sqling($_REQUEST['Nama']);
    $Yayasan = sqling($_REQUEST['Yayasan']);
    //$NA = empty($_REQUEST['NA'])? 'N' : $_REQUEST['NA'];
    if ($md == 0) {
        /*$s = "update rekening set Nama='$Nama', Bank='$Bank', Cabang='$Cabang', NA='$NA'
            where RekeningID='$RekeningID' ";
          $r = _query($s);*/
    } else {
        // Migrate
        $ada = '';
        //GetFields('rekening', 'RekeningID', $RekeningID, '*');
        if (empty($ada)) {
            // Initializing database => first thing to do
            InitDBSav($Kode);
        } else {
            /*echo ErrorMsg('Rekening Tidak Dapat Disimpan',
              "<p>Nomer rekening sudah ada. Berikut adalah data rekening tersebut:</p>
              <p><table class=box cellspacing=1 cellpadding=4>
              <tr><td class=inp1>Nomer Rekening</td><td class=ul>$ada[RekeningID]</td></tr>
              <tr><td class=inp1>Kode Institusi</td><td class=ul>$ada[KodeID]</td></tr>
              <tr><td class=inp1>Nama Pemilik</td><td class=ul>$ada[Nama]</td></tr>
              <tr><td class=inp1>Nama Bank</td><td class=ul>$ada[Bank]</td></tr>
              <tr><td class=inp1>Tidak aktif?</td><td class=ul><img src='img/book$ada[NA].gif'></td></tr>
              </table></p>");*/
        }
    }
    BerhasilSimpan("?mnux={$_SESSION['mnux']}", 10);
}
开发者ID:anggadjava,项目名称:sisfor,代码行数:33,代码来源:dbmigration.php

示例14: KelompokAssetSav

function KelompokAssetSav() {
  global $DefaultGOS, $KodeID;
  $md = $_REQUEST['md']+0;
  $nm = strtoupper(sqling($_REQUEST['Nama']));
  $KelompokID = $_REQUEST['KelompokID']+0;
  $manfaatkomersil =$_REQUEST['ManfaatKomersil'];
  $manfaatfiskal =$_REQUEST['ManfaatFiskal'];
  $prosentasekomersil =$_REQUEST['ProsentaseKomersil'];
  $prosentasefiskal =$_REQUEST['ProsentaseFiskal'];

  $NA = (empty($_REQUEST['NA']))? 'N' : $_REQUEST['NA'];
  if ($md == 0) {
    $s = "update kelompokasset set KelompokID='$KelompokID', MasaKomersil='$manfaatkomersil', MasaFiskal='$manfaatfiskal', ProsentaseKomersil='$prosentasekomersil', ProsentaseFiskal='$prosentasefiskal', LoginEdit='$_SESSION[_Nama]', TanggalEdit='$Actiondate', NA='$NA'
      where KelompokID=$KelompokID";
    $r = _query($s);
    $DefaultGOS();
  }
  else {
    $ada = GetFields('kelompokasset', "KodeID='$KodeID' and KelompokID", $KelompokID, '*');
    if (empty($ada)) {
      $s = "insert into kelompokasset (KelompokID, Nama, MasaKomersil, MasaFiskal, ProsentaseKomersil, ProsentaseFiskal, KodeID, LoginAdd, TangalAdd, NA)
        values ('$KelompokID', '$nm', '$manfaatkomersil', '$manfaatfiskal', '$prosentasekomersil', '$prosentasefiskal', '$KodeID', '$_SESSION[_Nama]', '$Actiondate', '$NA')";
      $r = _query($s);
      echo "<script>window.location = '?mnux=kelompok.asset'; </script>";
    }
    else {
      echo ErrorMsg("Gagal Simpan",
      "Data pejabat <b>$JabatanID</b> sudah ada.<br />
      Anda tidak dapat memasukkan jabatan ini lebih dari 1 kali.");
      $DefaultGOS();
    }
  }
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:33,代码来源:kelompok.asset.php

示例15: BipotMasterSav

function BipotMasterSav()
{
    $md = $_REQUEST['md'] + 0;
    $Tahun = sqling($_REQUEST['Tahun']);
    $Nama = sqling($_REQUEST['Nama']);
    $Catatan = sqling($_REQUEST['Catatan']);
    $Def = empty($_REQUEST['Def']) ? 'N' : $_REQUEST['Def'];
    $NA = empty($_REQUEST['NA']) ? 'N' : $_REQUEST['NA'];
    $SP = empty($_REQUEST['SP']) ? 'N' : $_REQUEST['SP'];
    // Simpan
    if ($md == 0) {
        $BIPOTID = $_REQUEST['bipotid'];
        $s = "update bipot set Nama='{$Nama}', Tahun='{$Tahun}', Catatan='{$Catatan}', \r\n      Def='{$Def}', NA='{$NA}', SP='{$SP}',\r\n      LoginEdit='{$_SESSION['_Login']}', TglEdit=now()\r\n      where BIPOTID='{$BIPOTID}' ";
        $r = _query($s);
    } else {
        $s = "insert into bipot (Tahun, Nama, KodeID, ProgramID, ProdiID, Catatan, \r\n      Def, NA, SP,\r\n      TglBuat, LoginBuat)\r\n      values('{$Tahun}', '{$Nama}', '{$_SESSION['KodeID']}', '{$_SESSION['prid']}',\r\n      '{$_SESSION['prodi']}', '{$Catatan}', \r\n      '{$Def}', '{$NA}', '{$SP}',\r\n      now(), '{$_SESSION['_Login']}')";
        $r = _query($s);
        // Ambil Last_Insert_ID
        $s_last = "select LAST_INSERT_ID() as ID";
        $r_last = _query($s_last);
        $w_last = _fetch_array($r_last);
        $BIPOTID = $w_last['ID'];
    }
    // Apakah diset menjadi default?
    if ($Def == 'Y') {
        $sd = "update bipot set Def='N' \r\n      where ProgramID='{$_SESSION['prid']}' and ProdiID='{$_SESSION['prodi']}'\r\n      and BIPOTID<>{$BIPOTID}";
        //echo $sd;
        $rd = _query($sd);
    }
    return DftrBipotIsi();
}
开发者ID:anggadjava,项目名称:sisfor,代码行数:31,代码来源:bipot.beasiswa.php


注:本文中的sqling函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。