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


PHP GetArrayTable函数代码示例

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


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

示例1: TampilkanJadwalDosen

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>";
}
开发者ID:johnxth,项目名称:sisfoapp,代码行数:30,代码来源:dosen.jadwal.php

示例2: inqMhswAkademik

function inqMhswAkademik($m)
{
    $PMB = GetFields('pmb', 'PMBID', $m['PMBID'], "PMBFormulirID, PMBPeriodID, GradeNilai");
    $JF = GetaField('pmbformulir', 'PMBFormulirID', $PMB['PMBFormulirID'], "concat(Nama, ' (', JumlahPilihan, ' pilihan, Rp. ', format(Harga, 0), ')')");
    $sesi = GetaField('khs', 'MhswID', $m['MhswID'], "max(Sesi)") + 0;
    $nmsek = GetaField('asalsekolah', 'SekolahID', $m['AsalSekolah'], "concat(Nama, ', ', Kota)");
    $nmjur = GetaField('jurusansekolah', 'JurusanSekolahID', $m['JurusanSekolah'], "concat(Nama, ' - ', NamaJurusan)");
    $TL = FormatTanggal($m['TglLulusAsalPT']);
    $nmpt = GetaField('perguruantinggi', 'PerguruanTinggiID', $m['AsalPT'], "concat(Nama, ', ', Kota)");
    $Cuti = GetArrayTable("select TahunID from khs where StatusMhswID = 'C' and MhswID = '{$m['MhswID']}' order By TahunID", '', 'TahunID', ', ', '');
    echo "<p><table class=bsc cellspacing=1 cellpadding=4>\r\n  <tr><td class=ul colspan=2><b>Data Akademik</b></td></tr>\r\n  <tr><td class=inp>Program</td><td class=ul>{$m['PRG']}</td></tr>\r\n  <tr><td class=inp>Program Studi</td><td class=ul>{$m['PRD']}</td></tr>\r\n  <tr><td class=inp>Status</td><td class=ul>{$m['SM']}</td></tr>\r\n  <tr><td class=inp>Status Masuk</td><td class=ul>{$m['SA']}</td></tr>\r\n  <tr><td class=inp>Sesi/Smt Terakhir</td><td class=ul>{$sesi}</td></tr>\r\n  <tr><td class=inp>Batas Studi</td><td class=ul>{$m['BatasStudi']} &nbsp;</td></tr>\r\n  <tr><td class=inp>Pernah Cuti</td><td class=ul>{$Cuti} &nbsp;</td></tr>\r\n\t\r\n  <tr><td class=ul colspan=2><b>Data PMB</b></td></tr>\r\n  <tr><td class=inp>No PMB</td><td class=ul>{$m['PMBID']}</td></tr>\r\n  <tr><td class=inp>Periode</td><td class=ul>{$PMB['PMBPeriodID']} &nbsp;</td></tr>\r\n  <tr><td class=inp>Jenis Formulir</td><td class=ul>{$JF} &nbsp;</td></tr>\r\n  <tr><td class=inp>Grade Test</td><td class=ul>{$PMB['GradeNilai']} &nbsp;</td></tr>\r\n  \r\n  <tr><td class=ul colspan=2><b>Asal Sekolah</td></tr>\r\n  <tr><td class=inp>Sekolah</td><td class=ul><span class=oke>{$m['AsalSekolah']}</span> {$nmsek} ({$m['JenisSekolahID']})&nbsp;</td></tr>\r\n  <tr><td class=inp>Jurusan</td><td class=ul>{$m['JurusanSekolah']} {$nmjur}&nbsp;</td></tr>\r\n  <tr><td class=inp>Nilai Sekolah</td><td class=ul>{$m['NilaiSekolah']}&nbsp;</td></tr>\r\n  \r\n  <tr><td class=ul colspan=2><b>Asal Perguruan Tinggi</td></tr>\r\n  <tr><td class=inp>Perguruan Tinggi</td><td class=ul><span class=oke>{$m['AsalPT']}</span> {$nmpt}</td></tr>\r\n  <tr><td class=inp>Program Studi</td><td class=ul>{$m['ProdiAsalPT']} &nbsp;</td></tr>\r\n  <tr><td class=inp>Tgl Lulus</td><td class=ul>{$TL} &nbsp;</td></tr>\r\n  <tr><td class=inp>IPK</td><td class=ul>{$m['IPKAsalPT']} &nbsp;</td></tr>\r\n  </table></p>";
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:12,代码来源:mhsw.inq.det.php

示例3: JdwlTtp

function JdwlTtp()
{
    $JadwalID = $_REQUEST['JadwalID'];
    $jdwl = GetFields('Jadwal', 'JadwalID', $JadwalID, '*');
    $jj = GetaField('jenisjadwal', 'JenisJadwalID', $jdwl['JenisJadwalID'], 'Nama');
    $hr = GetaField('hari', 'HariID', $jdwl['HariID'], 'Nama');
    // Ambil nama dosen
    $arrdosen = explode('.', TRIM($jdwl['DosenID'], '.'));
    $strdosen = implode(',', $arrdosen);
    $dosen = empty($strdosen) ? '' : GetArrayTable("select Nama from dosen where Login in ({$strdosen}) order by Nama", "Login", "Nama", ', ');
    $tgl = GetDateOption(date('Y-m-d'), 'Tgl');
    echo Konfirmasi('Tutup Kelas Kuliah', "<p>Benar Anda akan menutup kelas ini?</p>\r\n    <p><table class=box cellspacing=1 cellpadding=4>\r\n    <tr><td class=inp>Matakuliah</td><td class=ul>{$jdwl['MKKode']} - {$jdwl['Nama']} {$jdwl['NamaKelas']}</td></tr>\r\n    <tr><td class=inp>Jenis</td><td class=ul>{$jj}</td></tr>\r\n    <tr><td class=inp>Hari, Jam</td><td class=ul>{$hr}, {$jdwl['JamMulai']} ~ {$jdwl['JamSelesai']}</td></tr>\r\n    <tr><td class=inp>Dosen Pengampu</td><td class=ul>{$dosen}</td></tr>\r\n    </table></p>\r\n    <p>Jika ya, maka masukkan nomer surat penutupan dari Purek 1 di bawah ini:</p>\r\n    \r\n    <p><table class=box cellspacing=1 cellpadding=4>\r\n    <form action='?' method=POST>\r\n    <input type=hidden name='mnux' value='jadwal.tutup'>\r\n    <input type=hidden name='JadwalID' value='{$JadwalID}'>\r\n    <input type=hidden name='gos' value='JdwlTtp1'>\r\n    <tr><td class=inp>Nomer Surat</td><td class=ul><input type=text name='NoSurat' size=30 maxlength=50></td></tr>\r\n    <tr><td class=inp>Tanggal</td><td class=ul>{$tgl}</td></tr>\r\n    <tr><td class=inp>Alasan Penutupan</td><td class=ul><textarea name='Keterangan' cols=30 rows=5></textarea></td></tr>\r\n    <tr><td class=ul colspan=2><input type=button name='Batal' value='Batal Tutup' onClick=\"location='?mnux=jadwal.tutup'\">\r\n      <input type=reset name='Reset' value='Reset'>\r\n      <input type=submit name='Simpan' value='Tutup Kelas ini'></td></tr>\r\n    </form></table></p>\r\n    ");
}
开发者ID:anggadjava,项目名称:sisfor,代码行数:13,代码来源:jadwal.tutup.php

示例4: Cetak

function Cetak($t = 'UTS')
{
    global $_lf;
    $jdwl = GetFields('jadwal', 'JadwalID', $_REQUEST['jdwlid'], "*");
    $dsn = TRIM($jdwl['DosenID'], '.');
    $arrdsn = explode('.', $dsn);
    $strdsn = empty($arrdsn) ? "GaAdaNih" : implode(',', $arrdsn);
    $nmdsn = GetArrayTable("select concat(Nama, ', ', Gelar) as DSN from dosen where Login in ({$strdsn}) order by Nama", "Login", "DSN");
    // Buat file
    //$nmf = HOME_FOLDER  .  DS . "tmp/uts.$_REQUEST[jdwlid].dwoprn";
    $nmf = HOME_FOLDER . DS . "tmp/{$_SESSION['_Login']}.dwoprn";
    $f = fopen($nmf, 'w');
    $maxkol = 80;
    $maxbrs = 40;
    fwrite($f, chr(27) . chr(77));
    // Buat header
    $div = str_pad('-', $maxkol, '-') . $_lf;
    $NamaTahun = NamaTahun($jdwl['TahunID']);
    $adagrade = $t == 'FINAL' ? 'Grade' : '';
    $adanilai = $t == 'FINAL' ? '       ' : "Nilai  ";
    $hdr = $_lf . $_lf . str_pad("*** Hasil Nilai {$t} ***", $maxkol, ' ', STR_PAD_BOTH) . $_lf . $_lf . "Semester       : " . $NamaTahun . $_lf . "Matakuliah     : " . str_pad($jdwl['MKKode'] . ' - ' . $jdwl['Nama'], 30) . $_lf . "Kelas          : " . $jdwl['NamaKelas'] . $_lf . "Dosen Pengampu : " . $nmdsn . $_lf . $div . "No. NPM             Nama Mahasiswa               {$adanilai}{$adagrade}" . $_lf . $div;
    fwrite($f, $hdr);
    // Tuliskan isinya
    $s = "select krs.*, LEFT(m.Nama, 30) as NamaMhsw\r\n    from krs krs\r\n      left outer join mhsw m on krs.MhswID=m.MhswID\r\n    where krs.JadwalID='{$jdwl['JadwalID']}'\r\n    order by krs.MhswID";
    $r = _query($s);
    $n = 0;
    $brs = 0;
    while ($w = _fetch_array($r)) {
        $n++;
        $brs++;
        $grd = $t == 'FINAL' ? $w['GradeNilai'] : '';
        fwrite($f, str_pad($n . '.', 4) . str_pad($w['MhswID'], 15) . ' ' . str_pad($w['NamaMhsw'], 30) . ' ' . str_pad($w[$t], 3, ' ', STR_PAD_LEFT) . '  ' . str_pad($grd, 3) . $_lf);
        if ($brs > $maxbrs) {
            $hal++;
            fwrite($f, $div);
            $brs = 1;
            fwrite($f, "Hal. " . $hal . $_lf);
            fwrite($f, chr(12));
            fwrite($f, $hdr);
        }
    }
    fwrite($f, $div);
    fwrite($f, str_pad(' ', 50) . "Paraf Dosen" . $_lf . $_lf . $_lf . $lf);
    fwrite($f, str_pad(' ', 50) . $nmdsn);
    // Tutup file
    fwrite($f, chr(12));
    fclose($f);
    // Cetak
    include_once "dwoprn.php";
    DownloadDWOPRN($nmf);
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:51,代码来源:dosen.nilai.cetak.php

示例5: DftrDsn

function DftrDsn()
{
    if (!empty($_SESSION['tahun'])) {
        $_whr = array();
        if (!empty($_SESSION['prodi'])) {
            $_whr[] = "INSTR(j.ProdiID, '.{$_SESSION['prodi']}.')>0";
        }
        if (!empty($_SESSION['prid'])) {
            $_whr[] = "INSTR(j.ProgramID, '.{$_SESSION['prid']}.')>0";
        }
        $whr = empty($_whr) ? '' : 'and ' . implode(' and ', $_whr);
        $s = "select j.*, h.Nama as HR,\r\n\t  time_format(j.JamMulai, '%H:%i') as JM,\r\n\t  time_format(j.JamSelesai, '%H:%i') as JS\r\n\t  from jadwal j\r\n\t    left outer join hari h on j.HariID=h.HariID\r\n\t  where j.TahunID='{$_SESSION['tahun']}' {$whr}\r\n\t  order by j.ProgramID, j.ProdiID, j.MKKode";
        $r = _query($s);
        $nmr = 0;
        $_prodi = '';
        $hdr = "<tr><th class=ttl>#</th>\r\n\t  <th class=ttl>Kode</th>\r\n\t  <th class=ttl>Matakuliah</th>\r\n\t  <th class=ttl>Kelas</th>\r\n\t  <th class=ttl>SKS</th>\r\n\t  <th class=ttl>PROG</th>\r\n\t  <th class=ttl>RG</th>\r\n\t  <th class=ttl>Hari</th>\r\n\t  <th class=ttl>Jam</th>\r\n\t  <th class=ttl>Dosen</th>\r\n\t  <th class=ttl>per SKS</th>\r\n\t  <th class=ttl>per Kuliah</th>\r\n\t  <th class=ttl>Transport</th>\r\n\t  <th class=ttl>Lain2</th>\r\n\t  </tr>";
        echo "<p><table class=box cellspacing=1 cellpadding=4>";
        while ($w = _fetch_array($r)) {
            $nmr++;
            if ($_prodi != $w['ProdiID']) {
                // Ambil nama prodi
                $_prodi = $w['ProdiID'];
                if (!empty($w['ProdiID'])) {
                    $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", ', ');
                } else {
                    $prodi = '';
                }
                $nmprodi = GetaField('prodi', 'ProdiID', $_prodi, 'Nama');
                echo "<tr><td class=ul colspan=15><b>{$prodi}</b></td></tr>";
                echo $hdr;
            }
            // Ambil data dosen
            if (!empty($w['DosenID'])) {
                $arrdosen = explode('.', TRIM($w['DosenID'], '.'));
                $strdosen = implode(',', $arrdosen);
                $dosen = empty($strdosen) ? '' : GetArrayTable("select concat('» ', Nama) as NM from dosen where Login in ({$strdosen}) order by Nama", "Login", "NM", '<br /> ');
            } else {
                $dosen = '';
            }
            $c = "class=ul";
            echo "<tr><td class=inp>{$nmr}</td>\r\n\t    <td {$c} nowrap>{$w['MKKode']}</td>\r\n\t\t<td {$c}>{$w['Nama']}</td>\r\n\t\t<td {$c}>{$w['NamaKelas']}&nbsp;</td>\r\n\t\t<td {$c}>{$w['SKS']} ({$w['SKSAsli']})</td>\t\t\r\n\t\t<td {$c}>{$w['ProgramID']}</td>\r\n\t\t<td {$c}>{$w['RuangID']}</td>\r\n\t\t<td {$c}>{$w['HR']}</td>\r\n\t\t<td {$c}>{$w['JM']}~{$w['JS']}</td>\r\n\t\t<td {$c}>{$dosen}&nbsp;</td>\r\n\t\t<td {$c}>&nbsp;</td>\r\n\t\t<td {$c}>&nbsp;</td>\r\n\t\t<td {$c}>&nbsp;</td>\r\n\t\t<td {$c}>&nbsp;</td>\r\n\t\t</tr>";
        }
        echo "</table></p>";
    }
}
开发者ID:anggadjava,项目名称:sisfor,代码行数:47,代码来源:dosen.honor.x.php

示例6: CheckAmbilTA

function CheckAmbilTA($mhsw)
{
    // Ambil jenis matakuliah
    $_ta = GetArrayTable("select JenisPilihanID \n    from jenispilihan where TA='Y' and ProdiID='{$mhsw['ProdiID']}' \n    order by JenisPilihanID", "JenisPilihanID", "JenisPilihanID");
    //$_ta = (empty($_ta))? '0' : $_ta;
    // Apakah matakuliah sudah pernah diambil?
    /*$sdh = GetaField("krs krs
      left outer join mk mk on krs.MKID=mk.MKID",
      "mk.JenisPilihanID in ($_ta) and krs.MhswID", $mhsw['MhswID'], "count(krs.KRSID)")+0; */
    $sdh = GetaField("krs krs\n    left outer join mk mk on krs.MKID=mk.MKID\n    left outer join jenispilihan jp on mk.JenisPilihanID=jp.JenisPilihanID", "jp.TA='Y' and krs.MhswID", $mhsw['MhswID'], "count(krs.KRSID)") + 0;
    //echo "<h1>$sdh</h1>";
    if ($sdh == 0) {
        echo "<p><table class=box cellspacing=1 cellpadding=4 width=100%>\n    <tr><td class=wrn>Mahasiswa belum mengambil matakuliah TA/Skripsi/Tesis/Disertasi.</td></tr>\n    </table></p>";
        return false;
    } else {
        $a = "<p><table class=box cellspacing=1 cellpadding=4 width=100%>\n      <tr><td class=ul>Mahasiswa telah mengambil matakuliah TA/Skripsi/Tesis/Disertasi.\n      Mahasiswa boleh mendaftarkan tugas akhir.</td></tr>\n      </table></p>";
        return true;
    }
}
开发者ID:johnxth,项目名称:sisfoapp,代码行数:19,代码来源:ta.php

示例7: DaftarSesiMhsw

function DaftarSesiMhsw($mhswid, $mhsw)
{
    // Hitung sudah berapa kali cuti
    $MaxCuti = 4;
    $JmlCuti = GetaField('khs', "MhswID='{$mhswid}' and StatusMhswID", 'C', "count(KHSID)") + 0;
    if ($JmlCuti >= $MaxCuti) {
        echo Konfirmasi1("Mahasiswa telah cuti sebanyak {$JmlCuti}. Tidak dapat mengajukan cuti lagi.");
    }
    $s = "select k.*, sm.Nama as STA, sm.Nilai,\r\n    format(k.SaldoAwal, 0) as SAWAL,\r\n    format(k.Biaya, 0) as BIA,\r\n    format(k.Bayar, 0) as BYR,\r\n    format(k.Tarik, 0) as TRK,\r\n    format(k.Potongan, 0) as POT,\r\n    (k.SaldoAwal - k.Biaya + k.Bayar - k.Tarik + k.Potongan) as SALK,\r\n    format(k.SaldoAwal-k.Biaya+k.Bayar-k.Tarik+k.Potongan, 0) as _SALK\r\n    from khs k\r\n      left outer join statusmhsw sm on k.StatusMhswID=sm.StatusMhswID\r\n    where k.MhswID='{$mhswid}'\r\n    order by k.Sesi";
    $r = _query($s);
    $tot = 0;
    echo "<p><table class=box cellspacing=1>";
    echo "<tr><th class=ttl>Smt</th>\r\n    <th class=ttl>Tahun</th>\r\n    <th class=ttl>Saldo Awal</th>\r\n    <th class=ttl>Biaya2</th>\r\n    <th class=ttl>Potongan2</th>\r\n    <th class=ttl>Bayar2</th>\r\n    <th class=ttl>Tarikan2</th>\r\n    <th class=ttl>Total</th>\r\n    <th class=ttl>Status</th>\r\n    <th class=ttl>Frm Cuti</th>\r\n    <th class=ttl>SK Cuti</th>\r\n    <th class=ttl>KSS</th>\r\n    <th class=ttl>Keterangan</th>\r\n    </tr>";
    while ($w = _fetch_array($r)) {
        $tot += $w['SALK'];
        $c = $w['SALK'] == 0 ? 'class=ul' : 'class=wrn';
        $st = $w['Nilai'] == 1 ? 'class=ul' : 'class=nac';
        if ($w['StatusMhswID'] == 'C') {
            //GetArrayTable($sql, $key, $label, $separator=', ') {
            $ket = GetArrayTable("select TahunID from cuti where MhswID='{$mhswid}' order by TahunID", 'TahunID', 'TahunID');
            $btn = '&nbsp;';
            $sk = $w['NoSurat'];
            $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 {
            $ket = '&nbsp;';
            $ctk1 = '&nbsp;';
            if ($JmlCuti >= $MaxCuti) {
                $btn = "&times;";
                $sk = $w['NoSurat'];
            } else {
                $btn = "<a href='cetak/cuti.cetak.php?mhswid={$mhswid}&tahun={$w['TahunID']}' target=_blank title='Cetak Formulir Cuti'><img src='img/printer.gif'></a>";
                $sk = "<a href='?mnux=cuti&gos=SKCuti&mhswid={$mhswid}&tahun={$w['TahunID']}&khsid={$w['KHSID']}' title='Buat SK Cuti Kuliah'><img src='img/gear.gif' width=20></a>";
            }
        }
        echo "<tr>\r\n      <td class=inp>{$w['Sesi']}</td>\r\n      <td class=ul>{$w['TahunID']}</td>\r\n      <td class=ul align=right>{$w['SAWAL']}</td>\r\n      <td class=ul align=right>{$w['BIA']}</td>\r\n      <td class=ul align=right>{$w['BYR']}</td>\r\n      <td class=ul align=right>{$w['TRK']}</td>\r\n      <td class=ul align=right>{$w['POT']}</td>\r\n      <td {$c} align=right>{$w['_SALK']}</td>\r\n      <td {$st}>{$w['STA']}</td>\r\n      <td class=ul align=center>{$btn}</td>\r\n      <td class=ul align=center>{$sk}&nbsp;</td>\r\n      <td class=ul align=center>{$ctk1}</td>\r\n      <td class=ul>{$ket}&nbsp;</td>\r\n      </tr>";
    }
    $_tot = number_format($tot);
    $c = $tot >= 0 ? 'class=ul' : 'class=wrn';
    echo "<tr><td colspan=7 align=right>Saldo Akhir :</td>\r\n    <td {$c} align=right><b>{$_tot}</b></td></tr>";
    echo "</table></p>";
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:41,代码来源:cuti.php

示例8: DaftarMhswSkorsing

function DaftarMhswSkorsing($mnux = '', $gos = '')
{
    $inqMhswPage = GetSetVar('inqMhswPage');
    $arrKey = array('NPM' => 'MhswID', 'Nama' => 'Nama', 'Semua' => '');
    $whr = '';
    if (!empty($arrKey[$_SESSION['crmhswkey']]) && !empty($_SESSION['crmhswval'])) {
        $whr = "m." . $arrKey[$_SESSION['crmhswkey']] . " like '%" . $_SESSION['crmhswval'] . "%' ";
    }
    $whr = empty($whr) ? '' : "where " . $whr;
    $maxdata = 40;
    // Data
    $s = "select m.MhswID, m.Nama, m.ProgramID, m.ProdiID,\r\n    prg.Nama as PRG, prd.Nama as PRD, sm.Nama as SM, sm.Keluar\r\n    from mhsw m\r\n      left outer join program prg on m.ProgramID=prg.ProgramID\r\n      left outer join prodi prd on m.ProdiID=prd.ProdiID\r\n      left outer join statusmhsw sm on m.StatusMhswID=sm.StatusMhswID\r\n    {$whr}\r\n    order by m.MhswID\r\n    limit {$maxdata}";
    $r = _query($s);
    // Tampilkan
    $jmldata = _num_rows($r);
    echo "<p><table class=box cellspacing=1>\r\n    <tr><th class=ttl>#</th>\r\n    <th class=ttl>NPM</th>\r\n    <th class=ttl>Nama</th>\r\n    <th class=ttl>Program</th>\r\n    <th class=ttl>Status</th>\r\n    <th class=ttl>Skorsing</th>\r\n    </tr>";
    $n = 0;
    while ($w = _fetch_array($r)) {
        if ($w['Keluar'] == "Y") {
            $c = "class=nac";
            $skr = '';
            $strMhswID = $w['MhswID'];
        } else {
            $c = "class=ul";
            $strMhswID = "<a href='?mnux={$mnux}&mhswid={$w['MhswID']}'>{$w['MhswID']}</a>";
            $sqlskorsing = "select TahunID\r\n        from khs\r\n        where MhswID='{$w['MhswID']}'\r\n          and StatusMhswID='S'\r\n        order by TahunID";
            $skr = GetArrayTable($sqlskorsing, 'TahunID', 'TahunID', ', ', '');
        }
        $n++;
        echo "<tr>\r\n      <td class=inp>{$n}</td>\r\n      <td {$c}>{$strMhswID}</td>\r\n      <td {$c}>{$w['Nama']}</td>\r\n      <td {$c}>{$w['PRG']}</td>\r\n      <td {$c}>{$w['SM']}</td>\r\n      <td {$c}>{$skr} &nbsp;</td>\r\n    </tr>";
    }
    echo "</table></p>";
    if ($jmldata >= $maxdata) {
        echo "<p>*) Data yang ditampilkan dibatasi <font size=+1>{$maxdata}</font> mhsw.</p>";
    }
}
开发者ID:anggadjava,项目名称:sisfor,代码行数:36,代码来源:skorsing.php

示例9: Daftar

function Daftar()
{
    global $_lf, $pilstatus;
    $whr = array();
    if (!empty($_SESSION['prodi'])) {
        $whr[] = "m.ProdiID='{$_SESSION['prodi']}'";
    }
    if (!empty($_SESSION['prid'])) {
        $whr[] = "m.ProgramID='{$_SESSION['prid']}'";
    }
    if (!empty($_SESSION['angkat'])) {
        $whr[] = "m.TahunID='{$_SESSION['angkat']}'";
    }
    $_whr = implode(" and ", $whr);
    if (!empty($_whr)) {
        $_whr = " and " . $_whr;
    }
    $_u = explode('~', $pilstatus[$_SESSION['_pilstatus']]);
    $_key = $_u[1];
    // Query
    $pilta = GetArrayTable("select TahunID from khs where TahunID <= '{$_SESSION['tahun']}' and right(TahunID, 1) <> 3 group by TahunID order by TahunID DESC limit 0,{$_SESSION['banyak']}", 'TahunID', 'TahunID');
    $s = "select m.MhswID, LEFT(m.Nama, 25) as Nama, count(khs.MhswID) as tot, KHSID\r\n    from khs \r\n      left outer join mhsw m on khs.MhswID=m.MhswID\r\n    where khs.TahunID in ({$pilta}) {$_whr}\r\n\t  and khs.StatusMhswID = '{$_key}' \r\n\tgroup by khs.MhswID\r\n    order by khs.MhswID ";
    //echo "<pre>$s</pre>";
    $r = _query($s);
    // Buat file
    $MaxCol = 114;
    $nmf = "tmp/{$_SESSION['_Login']}.dwoprn";
    $f = fopen($nmf, 'w');
    fwrite($f, chr(27) . chr(15) . chr(27) . chr(77));
    $div = str_pad('-', $MaxCol, '-') . $_lf;
    // parameter2
    $_prodi = GetaField('prodi', 'ProdiID', $_SESSION['prodi'], 'Nama');
    $_prid = GetaField('program', 'ProgramID', $_SESSION['prid'], 'Nama');
    $n = 0;
    $hal = 1;
    $brs = 0;
    $maxbrs = 50;
    $_Tgl = Date("d-m-Y H:i");
    $Head = $_key == 'C' ? "*** Daftar Mahasiswa Cuti {$_SESSION['banyak']} Semester Berturut-turut ***" : "*** Daftar Mahasiswa Bolos {$_SESSION['banyak']} Semester Berturut-turut ***";
    // Buat header
    $hdr = str_pad($Head, $MaxCol, ' ', STR_PAD_BOTH) . $_lf . $_lf;
    $hdr .= "Priode  : " . NamaTahun($_SESSION['tahun']) . $_lf;
    $hdr .= "Prodi \t: {$_prodi}" . $_lf;
    $hdr .= "Program : {$_prid}" . $_lf;
    $hdr .= $div;
    $hdr .= "No.  NPM          Nama                          SEMESTER" . $_lf . $div;
    fwrite($f, $hdr);
    // Tampilkan
    while ($w = _fetch_array($r)) {
        //if($w['tot'] >= $_SESSION['banyak']){
        //$n++; $brs++;
        //if ($brs > $maxbrs) {
        //  $hal++; $brs =1;
        //  fwrite($f, $div);
        //  fwrite($f, chr(12));
        //  fwrite($f, $hdr);
        //}
        $MH = CariBerurutan($_key, $pilta, $w, $hdr, $brs, $maxbrs, $div, $n);
        //$DET = GetFields("mhsw", "MhswID", $MH, "Nama, MhswID");
        //$isi = str_pad($n.'.', 4, ' ') . ' ' .
        //str_pad($DET['MhswID'], 12) . ' '.
        //str_pad($DET['Nama'], 29) . ' '.
        //$pilta.
        //$_lf;
        fwrite($f, $MH);
        //}
    }
    fwrite($f, $div);
    fwrite($f, str_pad("Akhir laporan", 0, ' ', STR_PAD_LEFT) . $_lf);
    fwrite($f, str_pad("Dicetak oleh : " . $_SESSION['_Login'], 20, ' ') . str_pad("Dicetak Tgl : " . $_Tgl, 90, ' ', STR_PAD_LEFT) . $_lf . $_lf);
    fwrite($f, chr(12));
    fclose($f);
    TampilkanFileDWOPRN($nmf, "akd.lap");
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:74,代码来源:akd.lap.statuscutibolos.php

示例10: BuatExcel

function BuatExcel()
{
    $jdwl = GetFields('jadwal', 'JadwalID', $_REQUEST['jdwlid'], "*");
    $dsn = TRIM($jdwl['DosenID'], '.');
    $arrdsn = explode('.', $dsn);
    $strdsn = empty($arrdsn) ? "GaAdaNih" : implode(',', $arrdsn);
    $nmdsn = GetArrayTable("select concat(Nama, ', ', Gelar) as DSN from dosen where Login in ({$strdsn}) order by Nama", "Login", "DSN");
    $NamaTahun = NamaTahun($jdwl['TahunID']);
    // Olah nilai dari GET value di URL
    $_strTM = $jdwl['tugasmandiri'] == 0 ? '' : $jdwl['tugasmandiri'];
    // query database nilai yang ingin ditampilkan
    $s = "SELECT k.*, m.Nama AS NamaMhsw\r\n\t\t  FROM krs k\r\n\t\t  LEFT OUTER JOIN mhsw m ON k.MhswID=m.MhswID\r\n\t\t  WHERE k.JadwalID='{$_REQUEST['jdwlid']}'\r\n\t\t  ORDER BY k.MhswID";
    $r = _query($s);
    // Buat file Excel
    include_once "Spreadsheet/Excel/Writer.php";
    $xls =& new Spreadsheet_Excel_Writer();
    $xls->send("daftarnilai.xls");
    $sheet =& $xls->addWorksheet('Nilai Mahasiswa');
    // Format untuk title cell
    $formattitle =& $xls->addFormat();
    $formattitle->setAlign('center');
    $formattitle->setBold();
    $formattitle->setSize(16);
    // Format untuk header cell
    $formatheader =& $xls->addFormat();
    $formatheader->setBorder(1);
    $formatheader->setAlign('center');
    $formatheader->setBold();
    // Format untuk data cell
    $format =& $xls->addFormat();
    $format->setAlign('center');
    $format->setBorder(1);
    // Format spesifik untuk nama mahasiswa
    $formatmhs =& $xls->addFormat();
    $formatmhs->setAlign('left');
    $formatmhs->setBorder(1);
    // Cetak header file excel
    $sheet->setMerge(0, 3, 0, 7);
    $sheet->write(0, 3, "Hasil Nilai Mahasiswa", $formattitle);
    $sheet->setMerge(2, 0, 2, 1);
    $sheet->write(2, 0, "Semester:");
    $sheet->write(2, 2, "{$NamaTahun}");
    $sheet->setMerge(3, 0, 3, 1);
    $sheet->write(3, 0, "Matakuliah:");
    $sheet->write(3, 2, "{$jdwl['MKKode']} -  {$jdwl['Nama']}");
    $sheet->setMerge(4, 0, 4, 1);
    $sheet->write(4, 0, "Kelas:");
    $sheet->write(4, 2, "{$jdwl['NamaKelas']}");
    $sheet->setMerge(5, 0, 5, 1);
    $sheet->write(5, 0, "Dosen Pengampu:");
    $sheet->write(5, 2, "{$nmdsn}");
    $sheet->setMerge(6, 0, 7, 0);
    $sheet->setColumn(0, 0, 4);
    $sheet->write(6, 0, "#", $formatheader);
    $sheet->write(7, 0, "", $formatheader);
    $sheet->write(8, 0, "", $formatheader);
    $sheet->setMerge(6, 1, 7, 1);
    $sheet->setColumn(1, 1, 11);
    $sheet->write(6, 1, "NPM", $formatheader);
    $sheet->write(7, 1, "", $formatheader);
    $sheet->write(8, 1, "", $formatheader);
    $sheet->setMerge(6, 2, 7, 2);
    $sheet->setColumn(2, 2, 32);
    $sheet->write(6, 2, "Mahasiswa", $formatheader);
    $sheet->write(7, 2, "", $formatheader);
    $sheet->write(8, 2, "", $formatheader);
    $sheet->setMerge(6, 3, 6, 7);
    $sheet->write(6, 3, "Tugas Mandiri {$_strTM}%", $formatheader);
    $sheet->write(6, 4, "", $formatheader);
    $sheet->write(6, 5, "", $formatheader);
    $sheet->write(6, 6, "", $formatheader);
    $sheet->write(6, 7, "", $formatheader);
    $sheet->setColumn(3, 7, 5.5);
    $sheet->write(7, 3, "1", $formatheader);
    $sheet->write(7, 4, "2", $formatheader);
    $sheet->write(7, 5, "3", $formatheader);
    $sheet->write(7, 6, "4", $formatheader);
    $sheet->write(7, 7, "5", $formatheader);
    $sheet->write(8, 3, "{$jdwl['Tugas1']}%", $formatheader);
    $sheet->write(8, 4, "{$jdwl['Tugas2']}%", $formatheader);
    $sheet->write(8, 5, "{$jdwl['Tugas3']}%", $formatheader);
    $sheet->write(8, 6, "{$jdwl['Tugas4']}%", $formatheader);
    $sheet->write(8, 7, "{$jdwl['Tugas5']}%", $formatheader);
    $sheet->setMerge(6, 8, 7, 8);
    $sheet->setColumn(8, 11, 6);
    // Set column from 8 to 10 -> Pres, UTS, UAS, Resp
    $sheet->write(6, 8, "Pres", $formatheader);
    $sheet->write(7, 8, "", $formatheader);
    $sheet->write(8, 8, "{$jdwl['Presensi']}%", $formatheader);
    $sheet->setMerge(6, 9, 7, 9);
    $sheet->write(6, 9, "UTS", $formatheader);
    $sheet->write(7, 9, "", $formatheader);
    $sheet->write(8, 9, "{$jdwl['UTS']}%", $formatheader);
    $sheet->setMerge(6, 10, 7, 10);
    $sheet->write(6, 10, "UAS", $formatheader);
    $sheet->write(7, 10, "", $formatheader);
    $sheet->write(8, 10, "{$jdwl['UAS']}%", $formatheader);
    $sheet->setMerge(6, 11, 7, 11);
    $sheet->write(6, 11, "Resp", $formatheader);
    $sheet->write(7, 11, "", $formatheader);
//.........这里部分代码省略.........
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:101,代码来源:dosen.nilai.excel.php

示例11: RankingUSM1

function RankingUSM1()
{
    global $_lf, $divider, $divider1, $_pmbaktif, $arrID, $_HeaderPrn;
    $strTanpaTest = array('Y' => 'Tanpa Test', 'N' => 'Dengan Test Masuk');
    $maxcol = 144;
    $_maxbaris = 50;
    $nmf = HOME_FOLDER . DS . "tmp/{$_SESSION['_Login']}.dwoprn";
    $s = "select p.PMBID, LEFT(p.Nama, 20) as Nama,\r\n      LEFT(asek.Nama, 25) as AsalSekolah,\r\n      LEFT(asek.Kota, 20) as KotaSekolah,\r\n      p.Pilihan2,\r\n      p.JenisSekolahID, p.NilaiUjian, p.GradeNilai, p.DetailNilai,\r\n      p.Kelamin, p.Agama, LEFT(p.Kebangsaan, 3) as BANGSA,\r\n      p.TahunLulus, p.StatusAwalID, sa.TanpaTest,\r\n      LEFT(js.NamaJurusan, 10) as JurusanSekolah,\r\n      LEFT(p.Alamat, 30) as Alamat,\r\n      LEFT(p.Kota, 10) as Kota,\r\n      LEFT(p.Telepon, 15) as Telephone\r\n    from pmb p\r\n      left outer join asalsekolah asek on p.AsalSekolah=asek.SekolahID\r\n      left outer join jurusansekolah js on p.JurusanSekolah=js.JurusanSekolahID\r\n      left outer join statusawal sa on p.StatusAwalID=sa.StatusAwalID\r\n    where PMBPeriodID='{$_pmbaktif}' and p.ProdiID='{$_SESSION['prodi']}'\r\n    order by sa.TanpaTest desc, p.NilaiUjian desc, p.PMBID ASC";
    $r = _query($s);
    $dvd = str_pad('-', $maxcol, '-') . $_lf;
    $hal = 1;
    // Tulis ke file
    $NamaProdi = GetaField('prodi', 'ProdiID', $_SESSION['prodi'], 'Nama');
    // Buat array Test
    $stest = "select pru.PMBUSMID, pru.ProdiUSMID, pu.Nama\r\n    from prodiusm pru\r\n    left outer join pmbusm pu on pru.PMBUSMID=pu.PMBUSMID\r\n    where pru.ProdiID='{$_SESSION['prodi']}' and pru.PMBPeriodID='{$_pmbaktif}'\r\n    order by pru.Urutan";
    $rtest = _query($stest);
    $arrTest = array();
    $arrNamaTest = array();
    while ($wtest = _fetch_array($rtest)) {
        $arrTest[] = $wtest['PMBUSMID'];
        $arrNamaTest[] = $wtest['Nama'];
    }
    $f = fopen($nmf, 'w');
    fwrite($f, chr(27) . chr(15) . chr(27) . chr(108) . chr(15));
    $TanpaTest = '';
    $hdr = HeaderRankingUSM($NamaProdi, $maxcol, $hal, $arrTest, $arrNamaTest);
    fwrite($f, $hdr);
    while ($w = _fetch_array($r)) {
        if ($TanpaTest != $w['TanpaTest']) {
            $TanpaTest = $w['TanpaTest'];
            if ($brs > 0) {
                fwrite($f, $_lf);
            }
            //GetArrayTable($sql, $key, $label, $separator=', ') {
            $arrStatusAwal = GetArrayTable("select Nama from statusawal where TanpaTest='{$TanpaTest}'\r\n        order by Nama", "StatusAwalID", "Nama", ', ');
            fwrite($f, $strTanpaTest[$TanpaTest] . ' (' . $arrStatusAwal . ') ' . $_lf);
            $brs++;
            $n = 0;
        }
        if ($brs >= $_maxbaris) {
            fwrite($f, chr(12));
            $hdr = HeaderRankingUSM($NamaProdi, $maxcol, $hal, $arrTest, $arrNamaTest);
            fwrite($f, $hdr);
            $brs = 0;
            $hal++;
        }
        $n++;
        $brs++;
        $w['Alamat'] = str_replace("\n", ' ', $w['Alamat']);
        $w['Alamat'] = str_replace("\r", ' ', $w['Alamat']);
        fwrite($f, str_pad($n, 4, ' ', STR_PAD_LEFT) . '. ');
        fwrite($f, str_pad($w['PMBID'], 15, ' '));
        fwrite($f, str_pad($w['Nama'], 20, ' '));
        fwrite($f, str_pad($w['Kelamin'], 3, ' ', STR_PAD_BOTH) . '|');
        fwrite($f, str_pad($w['Agama'], 3, ' ', STR_PAD_BOTH) . '|');
        fwrite($f, str_pad($w['BANGSA'], 3, ' ', STR_PAD_BOTH) . '|');
        fwrite($f, str_pad($w['AsalSekolah'], 25, ' '));
        fwrite($f, str_pad($w['KotaSekolah'], 20, ' '));
        fwrite($f, str_pad($w['TahunLulus'], 5, ' '));
        fwrite($f, str_pad($w['JurusanSekolah'], 10, ' '));
        fwrite($f, str_pad($w['StatusAwalID'], 3, ' ', STR_PAD_BOTH));
        //fwrite($f, str_pad($w['Pilihan2'], 6, ' ', STR_PAD_BOTH));
        // Extract Detail Nilai
        $_DetailNilai = trim($w['DetailNilai'], '.');
        $arrDetailNilai = explode('.', $_DetailNilai);
        $arrNilai = array();
        for ($i = 0; $i < sizeof($arrDetailNilai); $i++) {
            $_arrDetailNilai = explode(':', $arrDetailNilai[$i]);
            $__test = $_arrDetailNilai[0];
            $__nil = $_arrDetailNilai[1];
            $key = array_search($__test, $arrTest);
            $arrNilai[$key] = str_pad($__nil + 0, 5, ' ', STR_PAD_LEFT);
        }
        for ($i = 0; $i < sizeof($arrTest); $i++) {
            fwrite($f, $arrNilai[$i]);
        }
        fwrite($f, str_pad($w['NilaiUjian'] + 0, 5, ' ', STR_PAD_LEFT));
        fwrite($f, str_pad($w['GradeNilai'], 5, ' ', STR_PAD_LEFT));
        //fwrite($f, $w['DetailNilai']);
        /*fwrite($f, str_pad($w['Alamat'], 20, ' '));
          fwrite($f, str_pad($w['Kota'], 10, ' '));
          fwrite($f, str_pad($w['Telephone'], 15, ' '));
          */
        fwrite($f, $_lf);
    }
    fwrite($f, $dvd);
    fwrite($f, str_pad('Akhir laporan.', $maxcol, ' ', STR_PAD_LEFT));
    fwrite($f, chr(12));
    fclose($f);
    TampilkanFileDWOPRN($nmf, 'pmblap');
}
开发者ID:anggadjava,项目名称:sisfor,代码行数:91,代码来源:pmblap.php

示例12: JdwlDel

function JdwlDel()
{
    $JadwalID = $_REQUEST['JadwalID'];
    $jdwl = GetFields('jadwal left outer join jenisjadwal jj on jadwal.JenisJadwalID = jj.JenisJadwalID', 'JadwalID', $JadwalID, 'jadwal.*, jj.Nama as jNama');
    $hari = GetaField('hari', 'HariID', $jdwl['HariID'], 'Nama');
    // Apakah sudah ada mhsw yang ambil?
    $jmlmhsw = GetaField('krs', "JadwalID", $JadwalID, "count(*)");
    if ($jmlmhsw > 0) {
        echo ErrorMsg("Jadwal Tidak Dapat Dihapus", "<p>Jadwal tidak dapat dihapus karena sudah ada <b>{$jmlmhsw}</b> mahasiswa yang mengambil matakuliah ini.<br />\r\n      Anda harus mengkonfirmasikan kepada mahasiswa dahulu kalau matakuliah ini dihapus.</p>\r\n      <hr size=1 color=silver>\r\n      Pilihan: <a href='?mnux=jadwal'>Kembali</a>");
    } else {
        $dosen = '&nbsp;';
        if (!empty($jdwl['DosenID'])) {
            $arrdosen = explode('.', TRIM($jdwl['DosenID'], '.'));
            $strdosen = implode(',', $arrdosen);
            $dosen = GetArrayTable("select Nama from dosen where Login in ({$strdosen}) order by Nama", 'Login', 'Nama');
        }
        // Paralel
        $par = GetaField('jadwal', "JadwalPar", $jdwl['JadwalID'], "count(JadwalID)") + 0;
        $paralel = $par > 0 ? "<tr><td class=wrn>Kelas Paralel</td>\r\n      <td class=ul>Jadwal ini memiliki <b>{$par}</b> kelas paralel.<br />\r\n      Jika Anda menghapus jadwal ini, maka kelas paralelnya akan dihapus juga.</td></tr>" : '';
        // Serial
        $ser = GetaField('jadwal', "JadwalSer", $jdwl['JadwalID'], "count(JadwalID)") + 0;
        $serial = $ser > 0 ? "<tr><td class=wrn>Kelas Serial</td>\r\n      <td class=ul>Jadwal ini memiliki <b>{$ser}</b> kelas serial.<br />\r\n      Jika Anda menghapus jadwal ini, maka kelas serialnya akan dihapus juga.</td></tr>" : '';
        echo "<p><table class=box cellspacing=1 cellpadding=4>\r\n    <form action='?' method=POST>\r\n    <input type=hidden name='mnux' value='jadwal'>\r\n    <input type=hidden name='gos' value='JdwlDel1'>\r\n    <input type=hidden name='JadwalID' value='{$JadwalID}'>\r\n\r\n    <tr><th class=ttl colspan=2>Konfirmasi Hapus Jadwal</th></td></tr>\r\n    <tr><td class=inp1>No Jadwal</td><td class=ul>{$JadwalID}</td></tr>\r\n    <tr><td class=inp1>Matakuliah</td><td class=ul>{$jdwl['MKKode']} - {$jdwl['Nama']}</td></tr>\r\n    <tr><td class=inp1>Jenis Jadwal</td><td class=ul>{$jdwl['jNama']}</td></tr>\r\n    <tr><td class=inp1>Kelas</td><td class=ul>{$jdwl['NamaKelas']}</td></tr>\r\n    <tr><td class=inp1>Ruang & Waktu</td><td class=ul>{$jdwl['RuangID']} - {$hari}: {$jdwl['JamMulai']}-{$jdwl['JamSelesai']}</td></tr>\r\n    <tr><td class=inp1>Dosen</td><td class=ul>{$dosen}</td></tr>\r\n    {$paralel}\r\n    <tr><td class=ul colspan=2><input type=submit name='Hapus' value='Hapus'>\r\n    <input type=button name='Batal' value='Batal' onClick=\"location='?mnux=jadwal'\"></td></tr>\r\n    </form></table></p>";
    }
}
开发者ID:anggadjava,项目名称:sisfor,代码行数:25,代码来源:jadwal.php

示例13: CetakFormulirCuti

function CetakFormulirCuti($mhswid, $mhsw, $tahun)
{
    global $_lf, $KodeID;
    // Data mhsw
    //$krs = GetFields("krs", "StatusKRSID='A' and MhswID", $mhsw['MhswID'], "sum(SKS) as TSKS, format(sum(SKS*BobotNilai)/sum(SKS), 2) as IPK");
    //$_ips = GetFields('krs left join jadwal j on krs.JadwalID = j.JadwalID', "(j.JenisJadwalID is null or j.JenisJadwalID <> 'R') and StatusKRSID='A' and (GradeNilai<>'-' or GradeNilai <> '' and not GradeNilai is NULL) and krs.Final = 'Y' and krs.MhswID",$mhswid,
    //"sum(krs.SKS * BobotNilai)/sum(krs.SKS) as IPS, sum(krs.SKS) as SKS");
    $thn = GetFields('tahun', "ProgramID='{$mhsw['ProgramID']}' and ProdiID='{$mhsw['ProdiID']}' and TahunID", $tahun, "*");
    $khs = GetFields('khs', "TahunID='{$tahun}' and MhswID", $mhswid, "*");
    $regakhr = GetaField('khs', "TahunID < '{$tahun}' and StatusMhswID='A' and MhswID", $mhswid, 'TahunID', "Order By TahunID DESC");
    //$_Balance = $khs['Biaya'] - $khs['Potongan'] + $khs['Tarik'] - $khs['Bayar'];
    $bolos = GetAfield('khs left outer join tahun on tahun.TahunID = khs.TahunID', "khs.TahunID < '{$tahun}' and tahun.ProdiID = '{$khs['ProdiID']}' and khs.TahunID > '{$regakhr}' and tahun.SP = 'N' and StatusMhswID = 'P' and MhswID", $mhswid, "count(khs.TahunID)");
    $_Balance = HitungHutang($mhswid, $regakhr);
    if ($_Balance >= 0) {
        $jdl = "Kewajiban Keuangan";
    } else {
        $jdl = "Deposit Sebesar";
        $_Balance = str_replace('-', '', $_Balance);
    }
    $bls = $bolos != 0 ? "(Bolos {$bolos} semester)" : '';
    $Balance = number_format($_Balance);
    $pernah = GetArrayTable("select TahunID from khs where MhswID='{$mhswid}' and StatusMhswID='C' order by TahunID", "TahunID", "TahunID", ', ');
    $pernah = empty($pernah) ? '-' : $pernah;
    $TglLahir = FormatTanggal($mhsw['TanggalLahir']);
    // Buat file
    $nmf = HOME_FOLDER . DS . "tmp/cuti.dwoprn";
    $f = fopen($nmf, 'w');
    fwrite($f, chr(27) . chr(18));
    fwrite($f, chr(27) . chr(108) . chr(5));
    // margin
    fwrite($f, $_lf . $_lf);
    // Tuliskan data
    $mrg = '   ';
    fwrite($f, str_pad("Formulir Permohonan Cuti Kuliah", 79, ' ', STR_PAD_BOTH) . $_lf . $_lf);
    fwrite($f, "Saya, yang bertandatangan di bawah ini:" . $_lf);
    fwrite($f, $mrg . str_pad("Nama Mahasiswa", 25, ' ') . " : " . $mhsw['Nama'] . $_lf);
    fwrite($f, $mrg . str_pad("NPM", 25, ' ') . " : " . $mhsw['MhswID'] . $_lf);
    fwrite($f, $mrg . str_pad("Tempat, Tgl Lahir", 25, ' ') . " : " . $mhsw['TempatLahir'] . ', ' . $TglLahir . $_lf);
    fwrite($f, $mrg . str_pad("SKS yang telah diambil", 25, ' ') . " : " . $mhsw['TotalSKS'] . ' SKS' . $_lf);
    fwrite($f, $mrg . str_pad("Registrasi Akhir", 25, ' ') . " : " . NamaTahun($regakhr) . " {$bls}" . $_lf);
    fwrite($f, $mrg . str_pad("IPK (Index Prestasi Kum.)", 25, ' ') . " : " . $mhsw['IPK'] . $_lf);
    fwrite($f, $mrg . str_pad("Alamat", 25, ' ') . " : " . $mhsw['Alamat'] . $_lf);
    fwrite($f, $mrg . str_pad(' ', 25, ' ') . '   ' . $mhsw['Kota'] . ' ' . $mhsw['KodePos'] . $_lf);
    fwrite($f, $mrg . str_pad($jdl, 25, ' ') . " : Rp. " . $Balance . $_lf);
    fwrite($f, $mrg . str_pad("Pernah cuti kuliah", 25, ' ') . " : " . $pernah . $_lf . $_lf);
    fwrite($f, "Mengajukan permohonan cuti kuliah pada semester {$thn['Nama']} karena:" . $_lf . $_lf);
    $garis = $mrg . str_pad('_', 75, '_');
    fwrite($f, $garis . $_lf . $_lf . $garis . $_lf . $_lf);
    // footer 1
    fwrite($f, str_pad(' ', 45, ' ') . "Jakarta, " . date('d-m-Y') . $_lf);
    fwrite($f, str_pad("Disetujui/Tidak Disetujui", 45, ' ') . "Mahasiswa" . $_lf);
    fwrite($f, "Pimpinan Fakultas," . $_lf . $_lf . $_lf . $_lf . $_lf);
    fwrite($f, str_pad("(                            )", 45, ' ') . "( {$mhsw['Nama']} )" . $_lf . $_lf);
    // footer 2
    $pa = GetaField('dosen', 'Login', $mhsw['PenasehatAkademik'], "concat(Nama, ', ', Gelar)");
    $kaperpus = GetaField('pejabat', 'JabatanID', 'KAPERPUS', 'Nama');
    fwrite($f, str_pad("Mengetahui :", 45, ' ') . $_lf);
    fwrite($f, str_pad("Perpustakaan {$KodeID} :", 45, ' ') . $_lf);
    fwrite($f, str_pad("Mahasiswa ini tidak memiliki ", 45, ' ') . "Mengetahui :" . $_lf);
    fwrite($f, str_pad("pinjaman buku yg belum dikembalikan.", 45, ' ') . "P.A." . $_lf);
    fwrite($f, $_lf . $_lf . $_lf . $_lf);
    fwrite($f, str_pad("({$kaperpus})", 45, ' ') . "({$pa})" . $_lf);
    fwrite($f, $_lf . $_lf);
    fwrite($f, "Catatan: Formulir ini harus dikembalikan ke TU Fakultas untuk dibuatkan" . $_lf);
    fwrite($f, "SK Cuti Kuliah");
    fwrite($f, chr(12));
    // Jangan lupa tutup file
    fclose($f);
    TampilkanFileDWOPRN($nmf, 'cuti');
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:70,代码来源:cuti.cetak.php

示例14: KRSMundur

function KRSMundur($mhsw, $datatahun, $khs)
{
    if (date('Y-m-d') > $datatahun['TglMundur'] and $_SESSION['_LevelID'] != 1) {
        die("Sudah tidak dapat mundur");
    }
    $krsid = $_REQUEST['krsid'];
    $krs = GetFields("krstemp k\r\n    left outer join jadwal j on k.JadwalID=j.JadwalID\r\n    left outer join hari h on j.HariID=h.HariID", "k.KRSID", $krsid, "k.*, j.MKKode, j.Nama, j.SKS, j.SKSAsli,\r\n    j.JamMulai, j.JamSelesai, j.HariID, j.DosenID, h.Nama as HR");
    // Daftar Dosen
    $arrdosen = explode('.', TRIM($krs['DosenID'], '.'));
    $strdosen = implode(',', $arrdosen);
    $dosen = empty($strdosen) ? '' : GetArrayTable("select concat(Nama, ', ', Gelar) as NM from dosen where Login in ({$strdosen}) order by Nama", "Login", "NM", '<br />');
    echo Konfirmasi("Konfirmasi Mundur Matakuliah", "<p>Anda akan mengundurkan diri dari matakuliah ini?</p>\r\n  <p><table class=box cellspacing=1 cellpadding=4>\r\n  <tr><td class=inp1>Hari</td><td class=ul>{$krs['HR']}</td></tr>\r\n  <tr><td class=inp1>Jam</td><td class=ul>{$krs['JamMulai']}-{$krs['JamSelesai']}</td></tr>\r\n  <tr><td class=inp1>Kode MK</td><td class=ul>{$krs['MKKode']}</td></tr>\r\n  <tr><td class=inp1>Matakuliah</td><td class=ul>{$krs['Nama']}</td></tr>\r\n  <tr><td class=inp1>SKS</td><td class=ul>{$krs['SKSAsli']}</td></tr>\r\n  <tr><td class=inp1>Dosen pengampu</td><td class=ul>{$dosen}</td></tr>\r\n  </table</p>\r\n  <hr size=1 color=silver>\r\n  <form action='?' method=POST>\r\n  <input type=hidden name='mnux' value='krs'>\r\n  <input type=hidden name='krsid' value='{$krsid}'>\r\n  <input type=hidden name='gos' value=''>\r\n  <input type=hidden name='slnt' value='krs.lib'>\r\n  <input type=hidden name='slntx' value='KRSMundur1'>\r\n  Pilihan: <input type=submit name='Mundur' value='Mundur'>\r\n    <input type=button name='Batal' value='Batal Mundur' onClick=\"location='?mnux=krs'\">\r\n  </form>");
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:13,代码来源:krs.lib.php

示例15: Cetak

function Cetak()
{
    global $_lf;
    $jdwl = GetFields('jadwal', 'JadwalID', $_REQUEST['jdwlid'], "*");
    $jnsr = $jdwl['JenisJadwalID'] == 'R' ? "(RESPONSI) " : "";
    $dsn = TRIM($jdwl['DosenID'], '.');
    $arrdsn = explode('.', $dsn);
    $strdsn = empty($arrdsn) ? "GaAdaNih" : implode(',', $arrdsn);
    $nmdsn = GetArrayTable("select concat(Nama, ', ', Gelar) as DSN from dosen where Login in ({$strdsn}) order by Nama", "Login", "DSN");
    // Ambil program
    $prg = TRIM($jdwl['ProgramID'], '.');
    $_prg = explode('.', $prg);
    $prg = $_prg[0];
    $PRG = GetaField('program', 'ProgramID', $prg, 'Nama');
    // Ambil prodi
    $prd = TRIM($jdwl['ProdiID'], '.');
    $_prd = explode('.', $prd);
    $prd = $_prd[0];
    // Ambil fakultas
    $FakultasID = GetaField('prodi', 'ProdiID', $prd, 'FakultasID');
    $Fak = GetaField('fakultas', 'FakultasID', $FakultasID, 'Nama');
    // Nama tahun
    $thn = GetaField('tahun', "ProgramID='{$prg}' and ProdiID='{$prd}' and TahunID", $jdwl['TahunID'], 'Nama');
    // Buat file
    $nmf = HOME_FOLDER . DS . "tmp/{$_SESSION['_Login']}.rinci.dwoprn";
    $f = fopen($nmf, 'w');
    fwrite($f, chr(27) . chr(15) . chr(27) . chr(80) . chr(27) . chr(108) . chr(10));
    // Buat header
    $MaxCol = 117;
    $div = str_pad('-', $MaxCol, '-') . $_lf;
    $jen = GetaField('jenisjadwal', 'JenisJadwalID', $jdwl['JenisJadwalID'], 'Nama');
    $tgl = date('d-m-Y H:i');
    $Hal = 1;
    $hdr = $_lf . $_lf . "Tgl.  : " . $tgl . "           *** Daftar Rincian Nilai Mahasiswa {$jnsr}***" . $_lf . "Form  : UKW " . $_lf . "Fak.  : " . str_pad($Fak, 40) . "Dosen  : " . $nmdsn . $_lf . "Jur.  : " . str_pad($prd, 40) . "M.K.   : " . "{$jdwl['MKKode']} -  {$jdwl['Nama']}" . $_lf . "Sem.  : " . str_pad($thn, 40) . "Kelas  : " . str_pad($jdwl['NamaKelas'], 40) . " Hal: #" . $_lf . $div . "No. NPM             Nama Mahasiswa                  Tgs1  Tgs2  Tgs3  Tgs4  Tgs5  Pres   UTS   UAS  Resp    Nilai Grd" . $_lf . "                                                   " . str_pad(number_format($jdwl['Tugas1'], 1) . '%', 5, ' ', STR_PAD_LEFT) . ' ' . str_pad(number_format($jdwl['Tugas2'], 1) . '%', 5, ' ', STR_PAD_LEFT) . ' ' . str_pad(number_format($jdwl['Tugas3'], 1) . '%', 5, ' ', STR_PAD_LEFT) . ' ' . str_pad(number_format($jdwl['Tugas4'], 1) . '%', 5, ' ', STR_PAD_LEFT) . ' ' . str_pad(number_format($jdwl['Tugas5'], 1) . '%', 5, ' ', STR_PAD_LEFT) . ' ' . str_pad(number_format($jdwl['Presensi'], 1) . '%', 5, ' ', STR_PAD_LEFT) . ' ' . str_pad(number_format($jdwl['UTS'], 1) . '%', 5, ' ', STR_PAD_LEFT) . ' ' . str_pad(number_format($jdwl['UAS'], 1) . '%', 5, ' ', STR_PAD_LEFT) . ' ' . str_pad(number_format($jdwl['Responsi'], 1) . '%', 5, ' ', STR_PAD_LEFT) . ' ' . $_lf . $div;
    $hdr1 = str_replace('#', $Hal, $hdr);
    fwrite($f, $hdr1);
    // Tuliskan isinya
    //GetArrayTable($sql, $key, $label, $separator=', ') {
    $ikut = GetArrayTable("select StatusKRSID, Nama from statuskrs where Ikut='Y' order by StatusKRSID", "StatusKRSID", "StatusKRSID", ', ', "'");
    $s = "select krs.*, LEFT(m.Nama, 30) as NamaMhsw, sk.Ikut, sk.Hitung\r\n    from krs krs\r\n      left outer join mhsw m on krs.MhswID=m.MhswID\r\n      left outer join statuskrs sk on krs.StatusKRSID=sk.StatusKRSID\r\n    where krs.JadwalID='{$jdwl['JadwalID']}' and krs.StatusKRSID in ({$ikut})\r\n    order by krs.MhswID";
    $r = _query($s);
    $n = 0;
    $brs = 0;
    $maxbrs = 50;
    $arrNilai = array();
    $JmlMhsw = 0;
    while ($w = _fetch_array($r)) {
        $n++;
        $brs++;
        $w['NilaiAkhir'] = number_format($w['NilaiAkhir'], 2);
        $NilaiAkhir = $w['Hitung'] == 'Y' ? $w['NilaiAkhir'] : '-';
        $GradeNilai = $w['Hitung'] == 'Y' ? $w['GradeNilai'] : $w['StatusKRSID'];
        if ($NilaiAkhir != '-') {
            $arrNilai[$w['GradeNilai']] += 1;
            $JmlMhsw++;
        }
        fwrite($f, str_pad($n . '.', 4) . str_pad($w['MhswID'], 15) . ' ' . str_pad($w['NamaMhsw'], 30) . ' ' . str_pad($w['Tugas1'], 5, ' ', STR_PAD_LEFT) . ' ' . str_pad($w['Tugas2'], 5, ' ', STR_PAD_LEFT) . ' ' . str_pad($w['Tugas3'], 5, ' ', STR_PAD_LEFT) . ' ' . str_pad($w['Tugas4'], 5, ' ', STR_PAD_LEFT) . ' ' . str_pad($w['Tugas5'], 5, ' ', STR_PAD_LEFT) . ' ' . str_pad($w['Presensi'], 5, ' ', STR_PAD_LEFT) . ' ' . str_pad($w['UTS'], 5, ' ', STR_PAD_LEFT) . ' ' . str_pad($w['UAS'], 5, ' ', STR_PAD_LEFT) . ' ' . str_pad($w['Responsi'], 5, ' ', STR_PAD_LEFT) . ' ' . str_pad($NilaiAkhir, 8, ' ', STR_PAD_LEFT) . ' ' . str_pad($GradeNilai, 5, ' ', STR_PAD_RIGHT) . $_lf);
        if ($brs > $maxbrs) {
            $Hal++;
            $brs = 1;
            fwrite($f, $div);
            fwrite($f, chr(12));
            $hdr1 = str_replace('#', $Hal, $hdr);
            fwrite($f, $hdr1);
        }
    }
    fwrite($f, $div);
    // Ambil nilai
    $s = "select * from nilai where ProdiID='{$prd}' order by Bobot desc";
    $r = _query($s);
    $str = array();
    $akh = '';
    $cnt = _num_rows($r);
    $n = 0;
    while ($w = _fetch_array($r)) {
        $n++;
        $Jml = empty($arrNilai[$w['Nama']]) ? '0' : $arrNilai[$w['Nama']] + 0;
        $persen = $JmlMhsw == 0 ? 0 : number_format($Jml / $JmlMhsw * 100, 1);
        $tnd = $cnt == $n ? "< " : ">=";
        $nil = $cnt == $n ? $akh : $w['NilaiMin'];
        $str[] = $tnd . str_pad($nil, 5, ' ', STR_PAD_LEFT) . " = " . str_pad($w['Nama'], 3) . "=" . str_pad($Jml, 3) . "=" . str_pad($persen, 5, ' ', STR_PAD_LEFT) . '%    ';
        $akh = $w['NilaiMin'];
    }
    $dua = ceil(sizeof($str) / 2);
    $foot = array();
    $n = 0;
    for ($i = 0; $i < sizeof($str); $i++) {
        $foot[$n] .= $str[$i];
        $n++;
        if ($n >= $dua) {
            $n = 0;
        }
    }
    // Buat tanda tangan
    $foot[0] .= "Paraf Dosen:                        Pimpinan Fakultas:";
    $foot[3] .= $nmdsn;
    for ($i = 0; $i < sizeof($foot); $i++) {
        fwrite($f, $foot[$i] . $_lf);
    }
    // Tutup file
//.........这里部分代码省略.........
开发者ID:anggadjava,项目名称:sisfor,代码行数:101,代码来源:dosen.nilai.rinci.php


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