예제 #1
0
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
    $s = "update mhsw set PenasehatAkademik='{$_REQUEST['PenasehatAkademik']}', ProgramID='{$_REQUEST['ProgramID']}',\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);
}
예제 #2
0
function ABSSAV()
{
    $inFile = $_REQUEST['inFile'];
    echo "Filename is: {$inFile}<br>";
    require_once 'Excel/reader.php';
    $data = new Spreadsheet_Excel_Reader();
    $data->setOutputEncoding('CP1251');
    $data->read($inFile);
    error_reporting(E_ALL ^ E_NOTICE);
    $Target_Database = 'binawan';
    $Target_Table = $Target_Database . '.ruang';
    $Target_KodeID = "BINAWAN";
    $s = "TRUNCATE TABLE {$Target_Table}";
    $r = _query($s);
    for ($i = 2; $i <= $data->sheets[0]['numRows']; $i++) {
        $w = array();
        $w['RuangID'] = trim($data->sheets[0]['cells'][$i][2]);
        $w['Nama'] = trim($data->sheets[0]['cells'][$i][3]);
        $w['Kapasitas'] = trim($data->sheets[0]['cells'][$i][4]);
        $w['KapasitasUjian'] = trim($data->sheets[0]['cells'][$i][4]);
        $w['KolomUjian'] = trim($data->sheets[0]['cells'][$i][5]);
        $w['KampusID'] = trim($data->sheets[0]['cells'][$i][6]);
        $w['Lantai'] = trim($data->sheets[0]['cells'][$i][7]);
        $w['RuangKuliah'] = trim($data->sheets[0]['cells'][$i][8]);
        $s = "insert into {$Target_Table}\r\n          (RuangID, Nama, Kapasitas, KapasitasUjian, KolomUjian, KampusID, Lantai, KodeID, RuangKuliah, UntukUSM\r\n\t      )\r\n          values\r\n          ('{$w['RuangID']}', '{$w['Nama']}', '{$w['Kapasitas']}', '{$w['KapasitasUjian']}', '{$w['KolomUjian']}', '{$w['KampusID']}', '{$w['Lantai']}', 'BINAWAN', '{$w['RuangKuliah']}', '{$w['RuangKuliah']}'\r\n\t      )";
        $r = _query($s);
    }
    echo "<script>window.location = '?{$mnux}={$_SESSION['mnux']}'</script>";
}
예제 #3
0
function TampilkanDaftarProgramStudi()
{
    global $Cari;
    $Max = 50;
    $arrcr = explode(',', $Cari);
    $arrwhr = array();
    if (!empty($arrcr[0])) {
        $arrwhr[] = "(Nama like '%" . TRIM($arrcr[0]) . "%') ";
    }
    $whr = implode(' and ', $arrwhr);
    // Hitung jumlah baris
    $Jml = GetaField('perguruantinggi', "{$whr} and NA", 'N', "count(PerguruanTinggiID)");
    if ($Jml > $Max) {
        $_Jml = number_format($Jml);
        echo "<p><b>Catatan:</b> Jumlah program studi yang Anda cari mencapai: <b>{$_Jml}</b>, tetapi sistem membatasi\r\n      jumlah program studi yang ditampilkan dan hanya menampilkan: <b>{$Max}</b>.\r\n      Gunakan Nama program studi dengan lebih spesifik untuk membatasi\r\n      jumlah program studi yang ditampilkan.</p>\r\n\r\n      <p><b>Format Pencarian:</b> NamaProgramStudi</p>";
    }
    // Tampilkan
    $s = "select ProdiDiktiID, Nama\r\n    from prodidikti\r\n    where {$whr} and NA='N'\r\n    order by Nama limit {$Max}";
    $r = _query($s);
    $n = 0;
    echo "<p><table class=box cellspacing=1 cellpadding=4 width=100%>\r\n    <tr><th class=ttl>#</th>\r\n    <th class=ttl>Kode Prodi</th>\r\n    <th class=ttl>Nama</th>\r\n    </tr>";
    while ($w = _fetch_array($r)) {
        $n++;
        echo "<tr><td class=ul>{$n}</td>\r\n    <td class=ul><a href='javascript:kembalikan(\"{$w['ProdiDiktiID']}\", \"{$w['Nama']}\")'>{$w['ProdiDiktiID']}</a></td>\r\n    <td class=ul>{$w['Nama']}&nbsp;</td>\r\n    </tr>";
    }
    echo "</table></p>";
}
예제 #4
0
function BuatIsinya($jdwl, $p)
{
    $s = "select pm.MhswID, m.Nama, sum(pm.Nilai) as HDR\r\n    from presensimhsw pm\r\n      left outer join mhsw m on m.MhswID = pm.MhswID and m.KodeID = '" . KodeID . "'\r\n    where pm.JadwalID = '{$jdwl['JadwalID']}'\r\n    group by pm.MhswID";
    $r = _query($s);
    $n = 0;
    $t = 6;
    // Buat header dulu
    $p->SetFont('Helvetica', 'BI', 9);
    $p->Cell(10, $t, 'No', 'BT', 0);
    $p->Cell(22, $t, 'NIM', 'BT', 0);
    $p->Cell(70, $t, 'Mahasiswa', 'BT', 0);
    $p->Cell(20, $t, 'Hadir', 'BT', 0, 'R');
    $p->Cell(20, $t, 'Persen', 'BT', 0, 'R');
    $p->Ln($t);
    // Isinya
    $p->SetFont('Helvetica', '', 9);
    while ($w = _fetch_array($r)) {
        $n++;
        $persen = $jdwl['Kehadiran'] > 0 ? $w['HDR'] / $jdwl['Kehadiran'] * 100 : 0;
        $_persen = number_format($persen, 2);
        $p->Cell(10, $t, $n, 'B', 0);
        $p->Cell(22, $t, $w['MhswID'], 'B', 0);
        $p->Cell(70, $t, $w['Nama'], 'B', 0);
        $p->Cell(20, $t, $w['HDR'] . '/' . $jdwl['Kehadiran'], 'B', 0, 'R');
        $p->Cell(20, $t, $_persen . '%', 'B', 0, 'R');
        $p->Ln($t);
    }
}
예제 #5
0
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);
    }
}
예제 #6
0
function PredDel()
{
    $PredikatID = $_REQUEST['PredikatID'];
    $s = "delete from predikat where PredikatID = '{$PredikatID}' ";
    $r = _query($s);
    BerhasilSimpan("?mnux={$_SESSION['mnux']}&mk=pred&sub=", 100);
}
예제 #7
0
function KurSav()
{
    $md = $_REQUEST['md'] + 0;
    $KurikulumID = $_REQUEST['KurikulumID'];
    $KurikulumKode = $_REQUEST['KurikulumKode'];
    $Nama = sqling($_REQUEST['Nama']);
    $Sesi = sqling($_REQUEST['Sesi']);
    $JmlSesi = $_REQUEST['JmlSesi'] + 0;
    $NA = empty($_REQUEST['NA']) ? 'N' : $_REQUEST['NA'];
    // simpan
    if ($md == 0) {
        $s = "update kurikulum set KurikulumKode='{$KurikulumKode}',\r\n      Nama='{$Nama}', Sesi='{$Sesi}', JmlSesi='{$JmlSesi}', NA='{$NA}', TglEdit=now(), LoginEdit='{$_SESSION['_Login']}'\r\n      where KurikulumID='{$_REQUEST['KurikulumID']}' ";
        $r = _query($s);
        // update jika jadi aktif
    } else {
        $s = "insert into kurikulum (KurikulumKode, KodeID, ProdiID, Nama, Sesi, JmlSesi, NA, TglBuat, LoginBuat)\r\n      values('{$KurikulumKode}', '{$_REQUEST['KodeID']}', '{$_SESSION['prodi']}', '{$Nama}', '{$Sesi}', '{$JmlSesi}', '{$NA}', now(), '{$_SESSION['_Login']}')";
        $r = _query($s);
        $KurikulumID = GetLastID();
    }
    // Non aktifkan yg lain
    /* ~~~ 03/11/2008 --> supaya bisa banyak kurikulum aktif
      if ($NA == 'N') {
        $s1 = "update kurikulum set NA='Y'
          where ProdiID='$_SESSION[prodi]' and KurikulumID<>$KurikulumID";
        $r1 = _query($s1);
      }
      */
    BerhasilSimpan("?mnux={$_SESSION['mnux']}", 100);
}
예제 #8
0
function CreateDBFNilaiMhsw()
{
    global $HeaderTRNLM;
    if (!empty($_SESSION['DariNPM'])) {
        $_SESSION['SampaiNPM'] = empty($_SESSION['SampaiNPM']) ? $_SESSION['DariNPM'] : $_SESSION['SampaiNPM'];
        $_npm = "'{$_SESSION['DariNPM']}' <= MhswID and MhswID <= '{$_SESSION['SampaiNPM']}' ";
    } else {
        $_npm = '';
    }
    $_prd = empty($_SESSION['prodi']) ? "" : "and ProdiID = '{$_SESSION['prodi']}'";
    $s = "select MhswID\r\n    from khs\r\n    where \r\n\t\t\t TahunID = '{$_SESSION['tahun']}' {$_prd} {$_npm}\r\n\t\t\t and StatusMhswID in ('A', 'C')\r\n\t\torder by MhswID";
    $r = _query($s);
    $n = 0;
    $DBFName = "dikti/TRNLM-{$_SESSION['tahun']}.DBF";
    DBFCreate($DBFName, $HeaderTRNLM);
    while ($w = _fetch_array($r)) {
        $n++;
        $_SESSION["DBF-MHSWID-{$n}"] = $w['MhswID'];
    }
    $_SESSION["DBF-TAHUN"] = $_SESSION['tahun'];
    $_SESSION["DBF-FILES"] = $DBFName;
    $_SESSION["DBF-POS"] = 0;
    $_SESSION["DBF-MAX"] = $n;
    echo "<p>Akan diproses <font size=+1>{$n}</font> data.</p>";
    echo "<p><IFRAME src='dikti.nilaimhsw.go.php' frameborder=0 height=400 width=600>\r\n  </IFRAME></p>";
}
예제 #9
0
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();
}
예제 #10
0
function TampilkanDaftar()
{
    //echo $ProdiID;
    $s = "select d.Login, d.Nama, d.Gelar, d.NA\r\n    from dosen d\r\n    where d.KodeID = '" . KodeID . "'\r\n      and d.Nama like '%{$_SESSION['Nama']}%'\r\n      and INSTR(d.ProdiID, '{$_SESSION['ProdiID']}') > 0\r\n    order by d.Nama";
    $r = _query($s);
    $i = 0;
    echo "<table class=bsc cellspacing=1 width=100%>";
    echo "<tr>\r\n    <th class=ttl>#</th>\r\n    <th class=ttl>Kode/NIP</th>\r\n    <th class=ttl>Nama Dosen</th>\r\n    <th class=ttl>NA</th>\r\n    </tr>";
    while ($w = _fetch_array($r)) {
        $i++;
        if ($w['NA'] == 'Y') {
            $c = "class=nac";
            $d = "{$w['Nama']} <sup>{$w['Gelar']}</sup>";
        } else {
            $c = "class=ul";
            $d = "<a href=\"javascript:{$_SESSION['frm']}.DosenID{$_SESSION['indexKompre']}.value='{$w['Login']}';{$_SESSION['frm']}.NamaDosen{$_SESSION['indexKompre']}.value='{$w['Nama']}';toggleBox('{$_SESSION['div']}', 0)\">\r\n        &raquo;\r\n        {$w['Nama']}</a>\r\n        <sup>{$w['Gelar']}</sup>";
        }
        echo <<<SCR
      <tr>
      <td class=inp width=20>{$i}</td>
      <td {$c} width=100 align=center>{$w['Login']}</td>
      <td {$c}>{$d}</td>
      <td class=ul width=20 align=center><img src='../img/book{$w['NA']}.gif' /></td>
      </tr>
SCR;
    }
    echo "</table>";
}
function CetakDataLulus($gels, $p)
{
    $s = "select p.PMBID, p.Nama, p.AsalSekolah, p.NilaiUjian, p.NilaiSekolah,\n      p.ProdiID, p.ProgramID,\n      prg.Nama as _PRG, prd.Nama as _PRD\n    from pmb p\n      left outer join program prg on prg.ProgramID = p.ProgramID and prg.KodeID='" . KodeID . "'\n      left outer join prodi prd on prd.ProdiID = p.ProdiID and prd.KodeID='" . KodeID . "'\n    where p.KodeID = '" . KodeID . "'\n      and p.PMBPeriodID = '{$gels['PMBPeriodID']}'\n      and p.LulusUjian = 'Y'\n    order by p.ProdiID, p.ProgramID, p.PMBID ";
    $r = _query($s);
    $n = 0;
    $t = 6;
    $pr = 'alskdjflaksjdf';
    while ($w = _fetch_array($r)) {
        $n++;
        if ($pr != $w['ProdiID'] . $w['ProgramID']) {
            $pr = $w['ProdiID'] . $w['ProgramID'];
            $p->Ln(1);
            $p->SetFont('Helvetica', 'B', 11);
            $p->Cell(190, 8, "Program Studi: {$w['_PRD']} ~ {$w['_PRG']}", 0, 1);
            BuatHeaderTabel($p);
        }
        $p->SetFont('Helvetica', '', 10);
        $p->Cell(16, $t, $n, 'LB', 0, 'R');
        $p->Cell(24, $t, $w['PMBID'], 'B', 0);
        $p->Cell(60, $t, $w['Nama'], 'B', 0);
        $p->Cell(70, $t, $w['AsalSekolah'], 'B', 0);
        $p->Cell(10, $t, $w['NilaiSekolah'], 'B', 0, 'R');
        $p->Cell(10, $t, $w['NilaiUjian'], 'BR', 0, 'R');
        $p->Ln($t);
    }
}
function CetakMKSetara($kurid, $p)
{
    $lbr = 190;
    $t = 6;
    $p->SetFont('Helvetica', 'B', 11);
    $p->Cell(10, $t, 'No.', 1, 0, 'R');
    $p->Cell(30, $t, 'MKKode', 1, 0, 'L');
    $p->Cell(100, $t, 'Nama Mata Kuliah', 1, 0, 'L');
    $p->Cell(10, $t, 'SKS', 1, 0, 'C');
    $p->Cell(10, $t, 'Sesi', 1, 0, 'C');
    $p->Cell(30, $t, 'MK Setara', 1, 0, 'C');
    $p->Ln($t);
    // tuliskan
    $s = "select MKKode, Nama, SKS, Sesi, MKSetara\r\n    from mk\r\n    where KurikulumID='{$kurid}' and NA='N'\r\n    order by Sesi, MKKode";
    $r = _query($s);
    $n = 0;
    while ($w = _fetch_array($r)) {
        $n++;
        $p->SetFont('Helvetica', 'B', 11);
        $p->Cell(10, $t, $n, 1, 0, 'R');
        $p->Cell(30, $t, $w['MKKode'], 1, 0, 'L');
        $p->Cell(100, $t, $w['Nama'], 1, 0, 'L');
        $p->Cell(10, $t, $w['SKS'], 1, 0, 'C');
        $p->Cell(10, $t, $w['Sesi'], 1, 0, 'C');
        $p->Cell(30, $t, $w['MKSetara'], 1, 0, 'C');
        $p->Ln($t);
    }
}
예제 #13
0
function BuatIsinya($jdwl, $p)
{
    $sudahbayar = "and (h.Biaya - h.Bayar + h.Tarik - h.Potongan) <= 0";
    $sudahpenuhiabsen = "and (select count(pm.PresensiMhswID) from presensimhsw pm left outer join jenispresensi jp on pm.JenisPresensiID=jp.JenisPresensiID where pm.KRSID=k.KRSID and jp.Nilai = 0) < {$jdwl['MaxAbsen']}";
    $s = "select k.MhswID, m.Nama, k._Presensi, k.KRSID\r\n    from krs k\r\n      left outer join mhsw m on m.MhswID = k.MhswID and m.KodeID = '" . KodeID . "'\r\n      left outer join khs h on k.KHSID = h.KHSID\r\n    where k.JadwalID = '{$jdwl['JadwalID']}'\r\n      {$sudahbayar}\r\n\t  {$sudahpenuhiabsen}\r\n    order by k.MhswID";
    $r = _query($s);
    $t = 7;
    $n = 0;
    // Header
    $p->SetFont('Helvetica', 'B', 10);
    $p->Cell(25, $t, 'N I M', 'B', 0);
    $p->Cell(100, $t, 'Nama Mahasiswa', 'B', 0);
    $p->Cell(20, $t, 'No. Kursi', 'B', 0, 'R');
    $p->Cell(20, $t, 'TTD', 'B', 0, 'C');
    $p->Ln($t);
    // Data
    $p->SetFont('Helvetica', '', 9);
    while ($w = _fetch_array($r)) {
        $n++;
        $p->SetFont('Helvetica', '', 9);
        $p->Cell(25, $t, $w['MhswID'], 0, 0);
        $p->Cell(100, $t, $w['Nama'], 0, 0);
        $p->SetFont('Helvetica', 'B', 9);
        $p->Cell(20, $t, $n, 0, 0, 'C');
        $p->Cell(20, $t, '', 'B', 0, 'C');
        $p->Ln($t);
    }
    $p->SetFont('Helvetica', '', 9);
    $p->Cell(165, 2, ' ', 'B', 1);
    $p->Cell(165, $t, 'Jumlah Peserta Ujian : ' . $n, 0, 1);
    $p->Cell(165, $t, 'Catatan: Mahasiswa yang tidak tercetak di daftar berarti belum melunasi kewajibannya.', 0, 1);
}
function DelWawancara()
{
    $id = $_REQUEST['id'];
    $s = "delete from wawancarausm where WawancaraUSMID = '{$id}' ";
    $r = _query($s);
    echo "<script>window.location='index.php?mnux={$_SESSION['mnux']}&gos=wawancarausm'</script>";
}
function CetakMatakuliahnya($MKPaketID, $p)
{
    $whr_pid = empty($MKPaketID) ? "" : "and mp.MKPaketID='{$MKPaketID}'";
    $s = "select mk.Sesi, mk.MKKode, mk.Nama, mk.Responsi, mk.PraktekKerja, mk.TugasAkhir, mk.SKS\r\n    from mkpaketisi mp left outer join mk mk on mp.MKID=mk.MKID\r\n    where mk.KodeID='" . KodeID . "'\r\n\t\t{$whr_pid}\r\n\torder by mk.Sesi, mk.Nama";
    $r = _query($s);
    $n = 0;
    $t = 6;
    $_sesi = '02q350mq3';
    BuatHeaderTabel($p);
    while ($w = _fetch_array($r)) {
        /*if ($_sesi != $w['Sesi']) { 
            $_sesi = $w['Sesi'];
            $p->SetFont('Helvetica', 'B', 10);
            $p->Ln(2);
            $p->Cell(170, $t+2, $w['Sesi'], 1, 1);
            BuatHeaderTabel($p);
          }*/
        $n++;
        $p->SetFont('Helvetica', '', 10);
        $p->Cell(10, $t, $n . '.', 1, 0, 'R');
        $p->Cell(30, $t, $w['MKKode'], 1, 0);
        $p->Cell(100, $t, $w['Nama'], 1, 0);
        $p->Cell(10, $t, $w['SKS'], 1, 0, 'C');
        $p->Cell(1, $t, '', 1, 0, '', true);
        $p->Cell(10, $t, $w['Sesi'], 1, 0, 'C');
        $p->Cell(1, $t, '', 1, 0, '', true);
        $p->Cell(10, $t, $w['Responsi'] == 'Y' ? 'Lab' : '', 1, 0, 'C');
        $p->Cell(10, $t, $w['PraktekKerja'] == 'Y' ? 'KP' : '', 1, 0, 'C');
        $p->Cell(10, $t, $w['TugasAkhir'] == 'Y' ? 'TA' : '', 1, 0, 'C');
        $p->Ln($t);
    }
}
예제 #16
0
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();
}
예제 #17
0
function VirtualBipotMhsw($MhswID, $BIPOTID)
{
    // Ambil BIPOT-nya
    $s = "select * \n    from bipot2 \n    where BIPOTID = '{$BIPOTID}'\n      and Otomatis = 'Y'\n      and NA = 'N'\n    order by TrxID, Prioritas";
    $r = _query($s);
    $total = 0;
    $mhsw = GetFields('mhsw', "KodeID='" . KodeID . "' and MhswID", $MhswID, "BIPOTID, GradeNilai, StatusMhswID, StatusAwalID");
    while ($w = _fetch_array($r)) {
        $oke = true;
        // Apakah sesuai dengan status awalnya?
        $pos = strpos($w['StatusAwalID'], "." . $mhsw['StatusAwalID'] . ".");
        $oke = $oke && !($pos === false);
        // Apakah grade-nya?
        if ($oke) {
            if ($w['GunakanGradeNilai'] == 'Y') {
                $pos = strpos($w['GradeNilai'], "." . $mhsw['GradeNilai'] . ".");
                $oke = $oke && !($pos === false);
            }
        }
        // Simpan data
        if ($oke) {
            // Cek apakah memakai script atau tidak?
            if ($w['GunakanScript'] == 'Y') {
                // BipotGunakanScript($pmb, '', $w, $ada, 0);
            } else {
                // Jika tidak ada duplikasi, maka akan di-insert. Tapi jika sudah ada, maka dicuekin aja.
                $total += $w['Jumlah'];
            }
            // end else
        }
        // end if $oke
    }
    // end while
    return $total;
}
예제 #18
0
function KurSav()
{
    $md = $_REQUEST['md'] + 0;
    $KurikulumID = $_REQUEST['KurikulumID'];
    $KurikulumKode = $_REQUEST['KurikulumKode'];
    $Nama = sqling($_REQUEST['Nama']);
    $Sesi = sqling($_REQUEST['Sesi']);
    $JmlSesi = $_REQUEST['JmlSesi'] + 0;
    $NA = empty($_REQUEST['NA']) ? 'N' : $_REQUEST['NA'];
    // simpan
    if ($md == 0) {
        $s = "update kurikulum set KurikulumKode='{$KurikulumKode}',\r\n      Nama='{$Nama}', Sesi='{$Sesi}', JmlSesi='{$JmlSesi}', NA='{$NA}', TglEdit=now(), LoginEdit='{$_SESSION['_Login']}'\r\n      where KurikulumID='{$_REQUEST['KurikulumID']}' ";
        $r = _query($s);
        // update jika jadi aktif
    } else {
        $s = "insert into kurikulum (KurikulumKode, KodeID, ProdiID, Nama, Sesi, JmlSesi, NA, TglBuat, LoginBuat)\r\n      values('{$KurikulumKode}', '{$_REQUEST['KodeID']}', '{$_SESSION['prodi']}', '{$Nama}', '{$Sesi}', '{$JmlSesi}', '{$NA}', now(), '{$_SESSION['_Login']}')";
        $r = _query($s);
        $KurikulumID = GetLastID();
    }
    // Non aktifkan yg lain
    if ($NA == 'N') {
        $s1 = "update kurikulum set NA='Y'\r\n      where ProdiID='{$_SESSION['prodi']}' and KurikulumID<>{$KurikulumID}";
        $r1 = _query($s1);
    }
    DefKur();
}
예제 #19
0
function AmbilJadwal($TahunID, $dsn, $p)
{
    $s = "select j.*,\r\n      left(j.JamMulai, 5) as _JM,\r\n      left(j.JamSelesai, 5) as _JS, \r\n\t  k.Nama AS namaKelas\r\n    from jadwal j\r\n\tLEFT OUTER JOIN kelas k ON k.KelasID = j.NamaKelas\r\n    where j.TahunID = '{$TahunID}'\r\n      and j.DosenID = '{$dsn['Login']}'\r\n      and j.KodeID = '" . KodeID . "'\r\n    order by j.HariID, j.JamMulai, j.JamSelesai";
    $r = _query($s);
    $n = 0;
    $t = 6;
    $hr = -25;
    $ttl = 0;
    while ($w = _fetch_array($r)) {
        if ($hr != $w['HariID']) {
            $hr = $w['HariID'];
            $NamaHari = GetaField('hari', 'HariID', $hr, 'Nama');
            TampilkanHeaderTabel($NamaHari, $p);
        }
        $n++;
        $ttl += $w['SKS'];
        $p->SetFont('Helvetica', '', 9);
        $p->Cell(7, $t, $n, 1, 0);
        $p->Cell(20, $t, $w['_JM'] . '-' . $w['_JS'], 1, 0);
        $p->Cell(24, $t, $w['MKKode'], 1, 0);
        $p->Cell(70, $t, $w['Nama'], 1, 0);
        $p->Cell(8, $t, $w['SKS'], 1, 0, 'R');
        $p->Cell(18, $t, $w['namaKelas'], 1, 0);
        $p->Cell(18, $t, $w['RuangID'], 1, 0);
        $p->Cell(14, $t, $w['ProgramID'], 1, 0);
        $p->Cell(14, $t, $w['ProdiID'], 1, 0);
        $p->Ln($t);
    }
    $p->SetFont('Helvetica', '', 10);
    $p->Cell(100, $t, "Total SKS: " . $ttl, 0, 1);
}
예제 #20
0
function DSNDel($mhsw, $ta)
{
    $tadid = $_REQUEST['tadid'];
    $s = "delete from tadosen where TADosenID='{$tadid}' ";
    $r = _query($s);
    TADSN($mhsw, $ta);
}
예제 #21
0
function RekapPA($ProdiID, $p)
{
    // Buat headernya
    $t = 6;
    $p->SetFont('Helvetica', 'B', 10);
    $p->Cell(20, $t, 'Nmr', 1, 0);
    $p->Cell(40, $t, 'Kode Dosen', 1, 0);
    $p->Cell(100, $t, 'Nama Dosen', 1, 0);
    $p->Cell(20, $t, 'Mhsw', 1, 1, 'R');
    // Datanya
    $s = "select count(MhswID) as JML,\r\n      m.PenasehatAkademik,\r\n      d.Nama as NamaDosen, d.Gelar\r\n    from mhsw m\r\n      left outer join dosen d on d.Login = m.PenasehatAkademik and d.KodeID = '" . KodeID . "'\r\n    where m.KodeID = '" . KodeID . "'\r\n      and m.ProdiID = '{$ProdiID}'\r\n      and m.Keluar = 'N'\r\n    group by m.PenasehatAkademik";
    $r = _query($s);
    $n = 0;
    $t = 5;
    $p->SetFont('Helvetica', '', 9);
    while ($w = _fetch_array($r)) {
        $n++;
        $NamaDosen = empty($w['NamaDosen']) ? 'Belum diset' : $w['NamaDosen'] . ', ' . $w['Gelar'];
        $p->Cell(20, $t, $n, 'LB', 0);
        $p->Cell(40, $t, $w['PenasehatAkademik'], 'B', 0);
        $p->Cell(100, $t, $NamaDosen, 'B', 0);
        $p->Cell(20, $t, $w['JML'], 'BR', 0, 'R');
        $p->Ln($t);
    }
}
function Hitung1()
{
    $_SESSION['HTG-POS']++;
    $pos = $_SESSION['HTG-POS'];
    $max = $_SESSION['HTG-TOTAL'];
    $KHSID = $_SESSION['HTG-KHSID-' . $pos];
    $MhswID = $_SESSION['HTG-MhswID-' . $pos];
    $Status = $_SESSION['HTG-Status-' . $pos];
    $arr = GetFields("krs", "StatusKRSID='A' and KHSID", $KHSID, "count(*) as JumlahMK, sum(SKS) as TotalSKS");
    $persen = number_format($pos / $_SESSION['HTG-TOTAL'] * 100, 2);
    // Simpan data
    $JumlahMK = $arr['JumlahMK'] + 0;
    $TotalSKS = $arr['TotalSKS'] + 0;
    if ($Status == 'P' && $JumlahMK > 0) {
        $_Status = ", StatusMhswID='A' ";
    } elseif ($Status == 'A' && $JumlahMK == 0) {
        $_Status = ", StatusMhswID='P' ";
    } else {
        $_Status = '';
    }
    $s = "update khs set JumlahMK={$JumlahMK}, TotalSKS={$TotalSKS} {$_Status}\r\n    where KHSID={$KHSID}";
    $r = _query($s);
    echo "<p>{$persen} %</p>\r\n    <p>{$pos}. {$MhswID} ({$KHSID}) [{$Status}] &raquo; {$arr['JumlahMK']} ({$arr['TotalSKS']})</p>\r\n    <p><pre>{$s}</pre></p>";
    if ($pos < $max) {
        echo "<script type='text/javascript'>window.onload=setTimeout('window.location.reload()', 2);</script>";
    } else {
        echo "<hr><p>Proses Selesai. <a href='?'>Kembali</a></p>";
    }
}
예제 #23
0
function ProsesCopyKRS1()
{
    $_JadwalID1 = $_REQUEST['_JadwalID1'];
    $_JadwalID2 = $_REQUEST['_JadwalID2'];
    $jdwl2 = GetFields('jadwal', 'JadwalID', $_JadwalID2, '*');
    $s = "select *\r\n    from krs\r\n    where JadwalID='{$_JadwalID1}'\r\n    order by MhswID";
    $r = _query($s);
    $n = 0;
    echo "<ol>";
    while ($w = _fetch_array($r)) {
        $ada = GetaField("krs", "MhswID='{$w['MhswID']}' and JadwalID", $_JadwalID2, 'KRSID');
        // Jika belum terdaftar, maka daftarkan
        if (empty($ada)) {
            $n++;
            $str = "insert into krs\r\n        (KHSID, MhswID, TahunID, JadwalID,\r\n        MKID, MKKode, SKS, HargaStandar, Harga,\r\n        Catatan, LoginBuat, TanggalBuat)\r\n        values ({$w['KHSID']}, '{$w['MhswID']}', '{$w['TahunID']}', {$_JadwalID2},\r\n        '{$jdwl2['MKID']}', '{$jdwl2['MKKode']}', '{$jdwl2['SKS']}', \r\n        '{$jdwl2['HargaStandar']}', '{$jdwl2['Harga']}',\r\n        'COPY DARI JadwalID: {$_JadwalID1}', 'DEWO', now()\r\n        )";
            $rstr = _query($str);
        } else {
            $str = "<font color=RED>Sudah</font>";
        }
        echo "<li>{$w['MhswID']} &raquo; {$str}</li>";
    }
    // Hitung Jumlah Mhsw di Jadwal2
    $jml = GetaField("krs", "JadwalID", $_JadwalID2, "count(*)") + 0;
    $sx = "update jadwal set JumlahMhsw={$jml} where JadwalID={$_JadwalID2}";
    $rx = _query($sx);
    echo "Telah tercopy <font size=+2>{$n}</font> KRS</td></tr>";
}
예제 #24
0
function CreateDBFMHS()
{
    global $HeaderMSHS;
    if (!empty($_SESSION['DariNPM'])) {
        $_SESSION['SampaiNPM'] = empty($_SESSION['SampaiNPM']) ? $_SESSION['DariNPM'] : $_SESSION['SampaiNPM'];
        $_npm = "'{$_SESSION['DariNPM']}' <= MhswID and MhswID <= '{$_SESSION['SampaiNPM']}' ";
    } else {
        $drmhsw = GetaField('mhsw', "NA", "N", "min(MhswID)");
        $smpmhsw = GetaField('mhsw', "NA", "N", "max(MhswID)");
        $_npm = "'{$drmhsw}' <= MhswID and MhswID <= '{$smpmhsw}' ";
    }
    $s = "select MhswID\r\n    from mhsw\r\n    where {$_npm}\r\n\t\torder by MhswID";
    $r = _query($s);
    $n = 0;
    $DBFName = "dikti/MHMHS-20062.DBF";
    DBFCreate($DBFName, $HeaderMSHS);
    while ($w = _fetch_array($r)) {
        $n++;
        $_SESSION["DBF-MHSWID-{$n}"] = $w['MhswID'];
    }
    $_SESSION["DBF-FILES"] = $DBFName;
    $_SESSION["DBF-POS"] = 0;
    $_SESSION["DBF-MAX"] = $n;
    echo "<p>Akan diproses <font size=+1>{$n}</font> data.</p>";
    echo "<p><IFRAME src='dikti.mastermhsw.go.php' frameborder=0 height=400 width=600>\r\n  </IFRAME></p>";
}
예제 #25
0
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);
}
예제 #26
0
function CetakKSS()
{
    $s = "select khs.*, sm.Nama as STT\r\n    from khs khs\r\n      left outer join statusmhsw sm on khs.StatusMhswID=sm.StatusMhswID\r\n    where khs.MhswID='{$_SESSION['crmhswid']}'\r\n    order by khs.Sesi";
    $r = _query($s);
    echo "<p><table class=box cellspacing=1 cellpadding=4>";
    echo "<tr><th class=ttl>Sesi</th>\r\n    <th class=ttl>Tahun Akd</th>\r\n    <th class=ttl>SKS</th>\r\n    <th class=ttl>MK</th>\r\n    <th class=ttl>Status</th>\r\n    <th class=ttl>Biaya</th>\r\n    <th class=ttl>Bayar</th>\r\n    <th class=ttl>Tarik</th>\r\n    <th class=ttl>Potongan</th>\r\n    <th class=ttl>Balance</th>\r\n    <th class=ttl>Gagal<br />KRS</th>\r\n    <th class=ttl>Cetak</th>\r\n    </tr>";
    while ($w = _fetch_array($r)) {
        if ($w['TahunID'] == $_SESSION['tahun']) {
            $c = "class=ul";
            //$ctk = "<a href='kss.cetak.php?tahun=$w[TahunID]&mhswid=$w[MhswID]&khsid=$w[KHSID]' target=_blank><img src='img/printer.gif'></a>";
            $ctk1 = "<a href='?mnux=kss&gos=cekkss&tahun={$w['TahunID']}&mhswid={$w['MhswID']}&khsid={$w['KHSID']}'>\r\n        <img src='img/printer.gif'></a>";
        } else {
            $c = "class=ul";
            $ctk = "&nbsp;";
        }
        $bia = number_format($w['Biaya']);
        $byr = number_format($w['Bayar']);
        $trk = number_format($w['Tarik']);
        $pot = number_format($w['Potongan']);
        $balance = $w['Bayar'] - $w['Biaya'] + $w['Potongan'] - $w['Tarik'];
        $bal = number_format($balance);
        $cbal = $bal < 0 ? 'class=wrn' : 'class=ul';
        //$ggl = GetaField('krs', "KHSID", $w['KHSID'], "count(KRSID)")+0;
        $ggl = $w['TahunID'] == $_SESSION['tahun'] ? GetaField("krstemp", "NA='Y' and KHSID", $khsid, "count(KRSID)") + 0 : "&nbsp;";
        $cggl = $ggl > 0 ? 'class=wrn' : 'class=ul';
        if ($w['TahunID'] == $_SESSION['tahun']) {
            $ctk = $ggl > 0 ? "<img src='img/check.gif' title='Tidak dapat dicetak karena ada KRS gagal.'>" : "<a href='kss.cetak.php?tahun={$w['TahunID']}&mhswid={$w['MhswID']}&khsid={$w['KHSID']}'><img src='img/printer.gif'></a>";
            $ctk1 = $ggl > 0 ? "<img src='img/check.gif' title='Tidak dapat dicetak karena ada KRS gagal.'>" : "<a href='?mnux=kss&gos=cekkss&tahun={$w['TahunID']}&mhswid={$w['MhswID']}&khsid={$w['KHSID']}'><img src='img/printer.gif'></a>";
        } else {
            $ctk = '&nbsp;';
        }
        echo "<tr><td class=inp>{$w['Sesi']}</td>\r\n      <td {$c}>{$w['TahunID']}</td>\r\n      <td {$c} align=right>{$w['TotalSKS']}</td>\r\n      <td {$c} align=right>{$w['JumlahMK']}</td>\r\n      <td {$c}>{$w['STT']}</td>\r\n      <td {$c} align=right>{$bia}</td>\r\n      <td {$c} align=right>{$byr}</td>\r\n      <td {$c} align=right>{$pot}</td>\r\n      <td {$c} align=right>{$trk}</td>\r\n      <td {$cbal} align=right><b>{$bal}</b></td>\r\n      <td {$cggl} align=right><b>{$ggl}</b></td>\r\n      <td {$c} align=center>{$ctk}</td>\r\n      </tr>";
    }
    echo "</table></p>";
}
예제 #27
0
function Isinya($MhswID, $p)
{
    $lbr = 190;
    $t = 5;
    BuatHeadernya($MhswID, $p);
    JudulKolomnya($p);
    $p->SetFont('Helvetica', '', 9);
    $s = "select k.*\r\n    from krs k\r\n      left outer join khs h on h.KHSID = k.KHSID and h.KodeID = '" . KodeID . "'\r\n      left outer join nilai n on k.GradeNilai=n.Nama and h.ProdiID=n.ProdiID and n.KodeID = '" . KodeID . "'\r\n\twhere k.MhswID = '{$MhswID}'\r\n\t\tand n.Lulus = 'N'\r\n    order by k.TahunID, k.MKKode";
    $r = _query($s);
    $n = 0;
    $_thn = "02n4lajwnrfvnaw34";
    while ($w = _fetch_array($r)) {
        if ($_thn != $w['TahunID']) {
            $p->Ln($t);
            $p->SetFont('Helvetica', 'B', 10);
            $p->Cell(0, $t, $w['TahunID'], 'B', 1);
            $n = 0;
            $p->SetFont('Helvetica', '', 9);
            $_thn = $w['TahunID'];
        }
        $n++;
        $p->Cell(8, $t, $n, 0, 0);
        $p->Cell(25, $t, $w['MKKode'], 0, 0, 'C');
        $p->Cell(100, $t, $w['Nama'], 0, 0);
        $p->Cell(15, $t, $w['SKS'], 0, 0, 'C');
        $p->Cell(15, $t, $w['GradeNilai'], 0, 0, 'C');
        $p->Cell(15, $t, $w['BobotNilai'], 0, 0, 'C');
        $p->Ln($t);
    }
}
예제 #28
0
function DetailBIPOT()
{
    global $_lf;
    $bipotid = $_REQUEST['bipotid'];
    $bpt = GetFields('bipot', 'BIPOTID', $bipotid, '*');
    $prg = GetaField('program', 'ProgramID', $bpt['ProgramID'], 'Nama');
    $prd = GetaField('prodi', 'ProdiID', $bpt['ProdiID'], 'Nama');
    $nmf = HOME_FOLDER . DS . "tmp/{$_SESSION['_Login']}.bipot.dwoprn";
    $f = fopen($nmf, 'w');
    $mxc = 114;
    $grs = str_pad('-', $mxc, '-') . $_lf;
    $hdr = str_pad("Daftar Biaya & Potongan {$bpt['TahunID']}", $mxc, ' ', STR_PAD_BOTH) . $_lf . str_pad($bpt['Nama'], $mxc, ' ', STR_PAD_BOTH) . $_lf . str_pad("Program: {$prg}, Prodi: {$prd}", $mxc, ' ', STR_PAD_BOTH) . $_lf . $grs . "No. Prio " . str_pad("Nama", 30) . str_pad("Jumlah", 12, ' ', STR_PAD_LEFT) . ' ' . str_pad("Penarikan", 12) . str_pad("Oto?", 5) . ' ' . str_pad("St.Awal", 12) . ' ' . str_pad("St.Mhsw", 12) . ' ' . str_pad("Grade", 5) . ' ' . $_lf . $grs;
    $s = "select b2.*, bn.Nama, format(b2.Jumlah, 0) as JML,\r\n      t.Nama as NMTRX, s.Nama as SAAT\r\n      from bipot2 b2\r\n      left outer join bipotnama bn on b2.BIPOTNamaID=bn.BIPOTNamaID\r\n      left outer join saat s on b2.SaatID=s.SaatID\r\n      left outer join trx t on b2.TrxID=t.TrxID\r\n      where b2.BIPOTID='{$bipotid}' and KodeID='{$_SESSION['KodeID']}'\r\n      order by b2.TrxID, b2.Prioritas, b2.GradeNilai";
    $r = _query($s);
    $n = 0;
    fwrite($f, $hdr);
    while ($w = _fetch_array($r)) {
        $n++;
        $jml = number_format($w['Jumlah']);
        $sa = TRIM($w['StatusAwalID'], '.');
        $sa = str_replace('.', ',', $sa);
        $sm = TRIM($w['StatusMhswID'], '.');
        $sm = str_replace('.', ',', $sm);
        fwrite($f, str_pad($n, 4) . str_pad($w['Prioritas'], 5) . str_pad($w['Nama'], 30) . str_pad($jml, 12, ' ', STR_PAD_LEFT) . ' ' . str_pad($w['SAAT'], 12) . str_pad($w['Otomatis'], 5, ' ', STR_PAD_BOTH) . ' ' . str_pad($sa, 12) . ' ' . str_pad($sm, 12) . ' ' . str_pad($w['GradeNilai'], 5, ' ', STR_PAD_BOTH) . $_lf);
    }
    fwrite($f, $grs);
    fclose($f);
    TampilkanFileDWOPRN($nmf);
}
예제 #29
0
function TampilkanJadwalDosen()
{
    $s = "select j.*, h.Nama as HR\n    from jadwal j\n      left outer join hari h on j.HariID=h.HariID\n    where j.DosenID='{$_SESSION['dosen']}'\n    and j.TahunID='{$_SESSION['tahun']}'\n    order by j.HariID, j.JamMulai, j.MKKode";
    $r = _query($s);
    // Tampilkan
    $nomer = 0;
    $hari = -1;
    $totsks = 0;
    $hdrjdwl = "<tr><th class=ttl>No</th>\n    <th class=ttl>Jam</th>\n    <th class=ttl>Ruang</th>\n    <th class=ttl>Kode MK</th>\n    <th class=ttl>Matakuliah</th>\n    <th class=ttl>Kelas</th>\n    <th class=ttl>SKS</th>\n    <th class=ttl>Prodi</th>\n    <th class=ttl>Dosen</th>\n    <th class=ttl title='Presensi'>Prs</th>\n    <th class=ttl>Link</th>\n    </tr>";
    echo "<p><table class=box cellspacing=1 cellpadding=4>";
    while ($w = _fetch_array($r)) {
        if ($hari != $w['HariID']) {
            $hari = $w['HariID'];
            echo "<tr><td class=ul colspan=12><b>{$w['HR']}</b></td></tr>";
            echo $hdrjdwl;
        }
        $nomer++;
        $totsks += $w['SKS'];
        // Array dosen
        $arrdosen = explode('.', TRIM($w['DosenID'], '.'));
        $strdosen = implode(',', $arrdosen);
        $_dosen = empty($strdosen) ? '' : GetArrayTable("select Nama from dosen where Login in ({$strdosen}) order by Nama", "Login", "Nama", '<br />');
        // Array prodi
        $arrprodi = explode('.', TRIM($w['ProdiID'], '.'));
        $strprodi = implode(',', $arrprodi);
        $_prodi = empty($strprodi) ? '' : GetArrayTable("select Nama from prodi where ProdiID in ({$strprodi}) order by ProdiID", "ProdiID", "Nama", '<br />');
        echo "<tr><td class=inp1>{$nomer}</td>\n      <td class=ul>{$w['JamMulai']}-{$w['JamSelesai']}</td>\n      <td class=ul>{$w['RuangID']}</td>\n      <td class=ul>{$w['MKKode']}</td>\n      <td class=ul>{$w['Nama']}</td>\n      <td class=ul>{$w['NamaKelas']}&nbsp;</td>\n      <td class=ul>{$w['SKS']} ({$w['SKSAsli']})</td>\n      <td class=ul>{$_prodi}</td>\n      <td class=ul>{$_dosen}</td>\n      <td class=ul align=right>{$w['Kehadiran']}</td>\n      <td class=ul><a href='?mnux=dosen.nilai&tahun={$_SESSION['tahun']}&jadwalid={$w['JadwalID']}&dosen={$_SESSION['dosen']}'>Nilai</a></td>\n      </tr>";
    }
    echo "<tr><td colspan=6 align=right>Total SKS :</td><td class=cnnY align=right><b>{$totsks}</b></td></tr>\n    </table></p>";
}
예제 #30
0
function CekDataKRS($MhswID, $ProdiID, $KHSID)
{
    $s = "select krs.KRSID, j.HariID, krs.MKID\r\n    from krs\r\n      left outer join jadwal j on krs.JadwalID=j.JadwalID\r\n    where krs.KHSID='{$KHSID}'\r\n    order by j.HariID, krs.MKID";
    $r = _query($s);
    $sebel = '';
    while ($w = _fetch_array($r)) {
        $strpsn = '';
        $skrg = "{$w['HariID']}-{$w['MKID']}";
        if ($sebel == $skrg) {
            $strpsn = "<font size=+2 color=maroon>Dihapus</font>";
            $_SESSION["CEK-KRS-DIHAPUS"]++;
            $sx = "delete from krs where KRSID='{$w['KRSID']}' ";
            $rx = _query($sx);
        }
        echo "<li>{$w['MKID']} {$skrg} {$strpsn}</li>";
        $sebel = $skrg;
    }
    // Hitung KRS
    $jml = GetFields("krs left outer join jadwal j on krs.JadwalID=j.JadwalID", "krs.StatusKRSID='A' and j.JenisJadwalID='K' and krs.KHSID", $KHSID, "sum(krs.SKS) as TotalSKS, count(*) as JumlahMK");
    $TotalSKS = $jml['TotalSKS'] + 0;
    $JumlahMK = $jml['JumlahMK'] + 0;
    $sr = "update khs set TotalSKS={$TotalSKS}, JumlahMK={$JumlahMK} where KHSID='{$KHSID}' ";
    $rr = _query($sr);
    echo "<p>Summary &raquo; Total SKS: <b>{$TotalSKS}</b>, Jumlah MK: <b>{$JumlahMK}</b></p>";
}