コード例 #1
0
ファイル: global.function.php プロジェクト: vagsy/demoset
/**
*_paging 分页函数
*@param $_type
*@return 返回分页
*/
function _page($_sql, $_size)
{
    //将里面的所有变量取出来,外部可以访问
    global $_page, $_pagesize, $_pagenum, $_pageabsolute, $_num;
    if (isset($_GET['page'])) {
        $_page = $_GET['page'];
        if (empty($_page) || $_page < 0 || !is_numeric($_page)) {
            $_page = 1;
        } else {
            $_page = intval($_page);
            //取整,取一个小数的整数部分
        }
    } else {
        $_page = 1;
    }
    $_pagesize = $_size;
    //每页多少条
    //首先要得到所有的数据总和
    $_num = _num_rows(_query($_sql));
    if ($_num == 0) {
        $_pageabsolute = 1;
    } else {
        $_pageabsolute = ceil($_num / $_pagesize);
    }
    if ($_page > $_pageabsolute) {
        $_page = $_pageabsolute;
    }
    $_pagenum = ($_page - 1) * $_pagesize;
    //从第几条开始
}
コード例 #2
0
function BuatIsinya($TahunID, $ProdiID, $p)
{
    $whr_prodi = empty($ProdiID) ? '' : "and k.ProdiID = '{$ProdiID}' ";
    $whr_tahun = empty($TahunID) ? '' : "and k.TahunID = '{$TahunID}'";
    $s = "select k.MhswID, m.Nama, k.ProdiID, k.IP, k.SKS, k.TahunID,  \r\n      (k.Biaya - k.Potongan) as Tagihan,\r\n\t  k.Bayar\r\n    from khs k \r\n      left outer join mhsw m on m.MhswID = k.MhswID and m.KodeID = '" . KodeID . "'\r\n    where k.KodeID='" . KodeID . "'\r\n\t  {$whr_tahun}\r\n      {$whr_prodi}\r\n\t  and ((k.Biaya-k.Potongan)-k.Bayar) != 0\r\n    order by k.MhswID";
    $r = _query($s);
    $n = 0;
    $t = 5;
    $ttl = 0;
    $_mhsw = ';alskdjfa;lsdhguairgsofjhjg9e8rgjpsofjg';
    if (_num_rows($r) > 0) {
        while ($w = _fetch_array($r)) {
            $n++;
            $ttlsks += $w['SKS'];
            $ttlipk += $w['IP'];
            $selisih = $w['Tagihan'] - $w['Bayar'];
            $ttlselisih += $selisih;
            $p->SetFont('Helvetica', '', 10);
            $p->Cell(10, $t, $n, 'LB', 0);
            $p->Cell(25, $t, $w['MhswID'], 'B', 0);
            $p->Cell(70, $t, $w['Nama'], 'B', 0);
            $p->Cell(22, $t, $w['IP'] . '/' . $w['SKS'], 'B', 0, 'C');
            $p->Cell(15, $t, $w['TahunID'], 'B', 0, 'C');
            $p->Cell(22, $t, number_format($selisih, 0, ',', '.'), 'B', 0, 'R');
            $p->Ln($t);
        }
        $_ttl = number_format($ttl + 0);
        $p->SetFont('Helvetica', 'B', 11);
        $p->Cell($lbr, 1, ' ', 1, 1);
        $p->Cell(105, $t, 'TOTAL :', 0, 0, 'R');
        $p->Cell(22, $t, number_format($ttlipk / $n, 2) . '/' . number_format($ttlsks / $n, 2), 0, 0, 'R');
        $p->Cell(22, $t, $_ttl, 0, 0, 'R');
        $p->Ln($t + 2);
    }
}
コード例 #3
0
function DaftarGagal()
{
    include_once "../sisfokampus1.php";
    HeaderSisfoKampus("Laporan Daftar Gagal Remedial Mahasiswa");
    TampilkanJudul("Laporan Daftar Gagal Remedial Mahasiswa");
    $tahunstring = empty($_SESSION['_remedialTahunID']) ? "" : "and r.TahunID='{$_SESSION['_remedialTahunID']}'";
    $prodistring = empty($_SESSION['_remedialProdiID']) ? "" : "and mk.ProdiID='{$_SESSION['_remedialProdiID']}'";
    $s = "select r.MhswID, r.TahunID, m.Nama, jd.MKKode, jd.Nama as _MKNama, jd.SKS, r.GradeNilai, r.BobotNilai\r\n\t\t\tfrom krsremedial r left outer join mhsw m on r.MhswID=m.MhswID and r.KodeID=m.KodeID\r\n\t\t\t\t\t\t\tleft outer join jadwalremedial jd on r.JadwalRemedialID=jd.JadwalRemedialID and r.KodeID=jd.KodeID\r\n\t\t\t\t\t\t\tleft outer join mk on mk.MKID=jd.MKID and mk.KodeID=r.KodeID\r\n\t\t\twhere r.Final='Y' and (r.GradeNilai = 'D' or r.GradeNilai = 'E') {$tahunstring} {$prodistring} and r.KodeID='" . KodeID . "' \r\n\t\t\torder by m.MhswID";
    $r = _query($s);
    $n = _num_rows($r);
    echo "<table class=box cellspacing=1 align=center width=700>\r\n\t\t\t<form name='rem_form' action='?' method=POST onSubmit=\"\">\r\n\t\t\t\t<input type=hidden name='gos' value='CetakLaporanRemedialMahasiswa' \\>\r\n\t\t\t\t<input type=hidden name='TahunID' value='{$_SESSION['_remedialTahunID']}' \\>\r\n\t\t\t\t<input type=hidden name='ProdiID' value='{$_SESSION['_remedialProdiID']}' \\>\r\n\t\t\t\t\r\n\t\t\t\t<tr><td colspan=10 align=center>\r\n\t\t\t\t\t\t\t\t\t<input type=button name='Batal' value='Tutup' onClick=\"self.close()\" ></td></tr>\r\n\t\t\t\t<tr><th class=ttl width=20>#</th>\r\n\t\t\t\t\t<th class=ttl width=80>NIM</th>\r\n\t\t\t\t\t<th class=ttl width=200>Nama</th>\r\n\t\t\t\t\t<th class=ttl width=>Mata Kuliah</th>\r\n\t\t\t\t\t<th class=ttl width=40>SKS</th>\r\n\t\t\t\t\t<th class=ttl width=40>Grade</th>\r\n\t\t\t\t\t<th class=ttl width=40>Bobot</th></tr>";
    $count = 0;
    $curID = '1knckosjkdfo2skdkj';
    while ($w = _fetch_array($r)) {
        $MhswID = '';
        $Nama = '';
        $counting = '';
        $gantibaris = '';
        if ($curID != $w['MhswID']) {
            $MhswID = $w['MhswID'];
            $Nama = $w['Nama'];
            $curID = $MhswID;
            $count++;
            $counting = $count . ".";
            $gantibaris = $count != 1 ? '<tr><td colspan=10><hr color=green size=1></hr></td></tr>' : '';
        }
        echo "\t{$gantibaris}\r\n\t\t\t\t<tr><td class=ul1 align=center>{$counting}</td>\r\n\t\t\t\t\t<td class=ul1>{$MhswID}</td>\r\n\t\t\t\t\t<td class=ul1>{$Nama}</td>\r\n\t\t\t\t\t<td class=ul1>{$w['_MKNama']}<sup>{$w['MKKode']}</sup></td>\r\n\t\t\t\t\t<td class=ul1 align=center>{$w['SKS']}</td>\r\n\t\t\t\t\t<td class=ul1>{$w['GradeNilai']}</td>\r\n\t\t\t\t\t<td class=ul1>{$w['BobotNilai']}</td>\r\n\t\t\t\t\t";
    }
    echo "\t</form>\r\n\t\t</table></p>";
}
コード例 #4
0
function BuatIsinya2($TahunID, $ProdiID, $p)
{
    $maxentryperpage = 45;
    BuatHeader2($TahunID, 'Quota Absensi', ceil($ttl / $maxentryperpage) + 1, $p);
    $whr_prodi = empty($ProdiID) ? '' : "j.ProdiID = '{$ProdiID}' ";
    $whr_tahun = empty($TahunID) ? '' : "and j.TahunID = '{$TahunID}' ";
    $s = "select DISTINCT(p.MhswID), count(p.PresensiID) as _countAbsensi,\r\n      m.Nama as NamaMhsw, j.Nama,\r\n      d.Nama as NamaPA, d.Gelar,\r\n\t  j.MaxAbsen\r\n    from presensimhsw p\r\n\t  left outer join jadwal j on j.JadwalID=p.JadwalID and j.KodeID= '" . KodeID . "'\r\n\t  left outer join jenispresensi jp on p.JenisPresensiID=jp.JenisPresensiID\r\n\t  left outer join mhsw m on m.MhswID = p.MhswID and m.KodeID = '" . KodeID . "'\r\n\t  left outer join dosen d on d.Login = m.PenasehatAkademik and d.KodeID = '" . KodeID . "'\r\n    where \r\n      {$whr_prodi}\r\n\t  {$whr_tahun}\r\n\t  and jp.Nilai = 0\r\n\tgroup by p.MhswID, j.JadwalID\r\n    order by p.MhswID";
    $r = _query($s);
    $n = 0;
    $t = 5;
    if (_num_rows($r) > 0) {
        while ($w = _fetch_array($r)) {
            if ($w['_countAbsensi'] > $w['MaxAbsen']) {
                $n++;
                $NamaPA = empty($w['NamaPA']) ? '(Belum diset)' : $w['NamaPA'];
                $p->SetFont('Helvetica', '', 8);
                $p->Cell(10, $t, $n, 'LB', 0);
                $p->Cell(25, $t, $w['MhswID'], 'B', 0);
                $p->Cell(60, $t, $w['NamaMhsw'], 'B', 0);
                $p->Cell(10, $t, $w['_countAbsensi'], 'B', 0, 'C');
                $p->Cell(10, $t, $w['MaxAbsen'], 'B', 0, 'C');
                $p->Cell(75, $t, $w['Nama'], 'BR', 0);
                $p->Ln($t);
            }
        }
    } else {
        $p->SetFont('Helvetica', 'B', 8);
        $p->Cell(0, $t, '(Tidak ada mahasiswa yang dapat dicetak)', 0, 1, 'C');
    }
    $p->Ln($t);
    $p->SetFont('Helvetica', 'B', 12);
    $p->Cell(100, $t, 'Jumlah Mahasiswa: ' . $n, 0, 0);
}
コード例 #5
0
function Proses()
{
    $_max = 100;
    $_praPrc = GetSetVar('_praPrc');
    $_praCnt = GetSetVar('_praCnt');
    $_dari = $_praPrc * $_max;
    $s = "select m.MhswID, m.Nama\r\n    from mhsw m\r\n    where m.KodeID = '" . KodeID . "'\r\n      and m.ProdiID = '{$_SESSION['ProdiID']}'\r\n      and m.StatusMhswID = 'A'\r\n    order by m.MhswID\r\n    limit {$_dari}, {$_max}";
    //die($s);
    $r = _query($s);
    $jml = _num_rows($r);
    if ($jml > 0) {
        while ($w = _fetch_array($r)) {
            $_SESSION['_praCnt']++;
            // Proses satu per satu
            $MhswID = $w['MhswID'];
            $Nama = $w['Nama'];
            $oke = true;
            $psn = '';
            // Apakah ada SKS Minimalnya?
            $oke = CheckSKSMin($MhswID, $psn);
            // Apakah ada IP Minimalnya?
            if ($oke) {
                $oke = CheckIPMin($MhswID, $psn);
            }
            // Apakah ada MK Prasyaratnya?
            if ($oke) {
                $oke = CheckPrasyarat($MhswID, $psn);
            }
            echo <<<ESD
      <script>
      self.parent.Progresnya({$_SESSION['_praCnt']}, '{$MhswID}', '{$Nama}', '{$psn}');
      </script>
ESD;
            // Jika memenuhi syarat
            if ($oke == true) {
                $f = fopen("../" . $_SESSION['_praFile'] . ".txt", 'a');
                fwrite($f, "{$MhswID}|{$Nama}|Oke\r\n");
                fclose($f);
            } else {
                // Jika tidak memenuhi syarat
                $f = fopen("../" . $_SESSION['_praFile'] . "_gagal.txt", 'a');
                fwrite($f, "{$MhswID}|{$Nama}|{$psn}\r\n");
                fclose($f);
            }
        }
        // Nex Process
        $_SESSION['_praPrc']++;
        $time = 10;
        echo <<<ESD
    <script>
    <!--
    //window.setTimeout("location='{$_SESSION['mnux']}.proses.php?gos=Proses&_praPrc={$_praPrc}&_praCnt={$_SESSION['_praCnt']}'", {$time});
    window.setTimeout("location='../{$_SESSION['mnux']}.proses.php'", {$time});
    //-->
    </script>
ESD;
    } else {
        echo "\r\n    <script>\r\n    self.parent.Selesai();\r\n    </script>\r\n    ";
    }
}
コード例 #6
0
ファイル: _Cek_Pres.php プロジェクト: anggadjava/sisfor
function ProsesBeneran()
{
    global $arrprodi;
    $strprd = '';
    foreach ($arrprodi as $val) {
        $strprd .= ",'{$val}'";
    }
    $strprd = TRIM($strprd, ',');
    $s = "select khs.MhswID, khs.ProdiID, khs.KHSID\r\n    from khs\r\n    where khs.ProdiID in ({$strprd}) and khs.TahunID='{$_SESSION['tahun']}'\r\n    order by khs.MhswID";
    $r = _query($s);
    $jml = _num_rows($r);
    $_SESSION['CEK-KRS-JML'] = $jml;
    $_SESSION['CEK-KRS-POS'] = 0;
    echo "<p>Ada terdaftar <font size=+1>{$jml}</font> mhsw.</p>";
    $n = 0;
    while ($w = _fetch_array($r)) {
        $n++;
        $_SESSION["CEK-KRS-MHSWID-{$n}"] = $w['MhswID'];
        $_SESSION["CEK-KRS-PRODIID-{$n}"] = $w['ProdiID'];
        $_SESSION["CEK-KRS-KHSID-{$n}"] = $w['KHSID'];
    }
    $_SESSION["CEK-KRS-JML"] = $n;
    $_SESSION["CEK-KRS-DIHAPUS"] = 0;
    // IFRAME
    echo "<p><IFRAME src='_Cek_KRS_Double.gos.php' frameborder=0 height=100% width=100%>\r\n  </IFRAME></p>";
}
コード例 #7
0
function ProsesHitungMundur()
{
    $tahun1 = $_REQUEST['tahun1'];
    $DariNPM = $_REQUEST['DariNPM'];
    $SampaiNPM = $_REQUEST['SampaiNPM'];
    $_SESSION['HM-tahun1'] = $tahun1;
    // Bila hanya 1 mhsw
    if (empty($SampaiNPM)) {
        $_SESSION['HM-JML'] = 1;
        $_SESSION['HM-MhswID-1'] = $DariNPM;
        $_SESSION['HM-POS'] = 0;
    } else {
        $s = "select MhswID\r\n      from mhsw\r\n      where '{$DariNPM}' <= MhswID and MhswID <= '{$SampaiNPM}'\r\n        and NA='N'";
        $r = _query($s);
        $jml = _num_rows($r);
        $n = 0;
        while ($w = _fetch_array($r)) {
            $n++;
            $_SESSION['HM-MhswID-' . $n] = $w['MhswID'];
        }
        $_SESSION['HM-JML'] = $n;
        $_SESSION['HM-POS'] = 0;
    }
    echo "<p>Akan diproses: <font size=+2>" . $_SESSION['HM-JML'] . "</font> mahasiswa.</p>\r\n  <p><IFRAME SRC='_jumlahsks_akademik.php?gos=PRCMUNDUR&tahun={$tahun}&prodi={$prodi}&prid={$prid}' width=90% frameborder=0>\r\n  </IFRAME></p>";
}
コード例 #8
0
function DaftarMatrikulasi()
{
    $s = "select Nama, MhswID, Kelamin, ProdiID, NilaiUjian, MatriHadir from `mhsw` where MatriID='{$_SESSION['matri_kelompok']} order by Nama'";
    $r = _query($s);
    $xx = _num_rows($r);
    $sss = "select KapasitasSekarang, KapasitasMaksimum from `matrikulasi` where MatriID='{$_SESSION['matri_kelompok']}'";
    $rrr = _query($sss);
    $www = _fetch_array($rrr);
    $wheretahun = "TahunID='{$_SESSION['matri_tahun']}'";
    if (empty($_SESSION['matri_tahun']) or $_SESSION['matri_tahun'] == '') {
        $optkelompok = "<option value=''>--Isi Tahun Dulu--</option>";
    } else {
        $optkelompok = GetOption2('matrikulasi', "Nama", 'Nama', $_SESSION['matri_kelompok'], $wheretahun, 'MatriID');
        if ($optkelompok == '' or empty($optkelompok)) {
            $optkelompok = "<option value=''>--Tidak ada kelompok--</option>";
        }
    }
    echo "<p><table class=box cellspacing=1 align=center width=395>\r\n\t\t\t\t<form action='?' method=POST>\r\n\t\t\t\t<input type=hidden name='mnux' value='{$_SESSION['mnux']}' />\r\n\t\t\t\t<input type=hidden id='gos' name='gos' value='' />\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=inp width=130>Tahun Akademik: </td>\r\n\t\t\t\t\t<td class=ul1 colspan=3><input type=text name='matri_tahun' value='{$_SESSION['matri_tahun']}' size=3 maxlength=10>\r\n\t\t\t\t\t\t\t\t\t\t\t<input type=submit name='Set' value='Set'>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=inp>Kelompok: </td>\r\n\t\t\t\t\t<td class=ul1 colspan=3><select name='matri_kelompok' onChange='this.form.submit()'>{$optkelompok}</select></td>\r\n\t\t\t\t\t\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=inp>Kapasitas Sekarang:</td>\r\n\t\t\t\t\t<td class=ul1>{$www['KapasitasSekarang']}</td>\r\n\t\t\t\t\t<td class=inp width=200>Kapasitas Maksimum:</td>\r\n\t\t\t\t\t<td class=ul1>{$www['KapasitasMaksimum']}</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t</form>\r\n\t\t\t</table></p>";
    echo "<table class=box cellspacing=1 align=center width=395>\r\n\t\t\t\t<form name='form2' action='?' method=POST>\r\n\t\t\t\t<input type=hidden name='mnux' value='{$_SESSION['mnux']}' />\r\n\t\t\t\t<input type=hidden name='sub' value='KehadiranSiswa' />\r\n\t\t\t\t\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th class=ttl>No</th>\r\n\t\t\t\t\t<th class=ttl>Mahasiswa di Kelompok ini</th>\r\n\t\t\t\t\t<th class=ttl align=center><input type=button name='CheckAllMember' value='Cek Semua' onClick=\"CheckAll('HM')\" /></th>\t\r\n\t\t\t\t</tr>\r\n\t\t\t";
    if (!empty($_SESSION['matri_kelompok'])) {
        $x1 = 0;
        while ($w = _fetch_array($r)) {
            $x1++;
            $ck = $w['MatriHadir'] == 'Y' ? 'checked' : '';
            echo "<tr>\r\n\t\t\t\t\t\t<td class=ul1 width=12 align=right>{$x1}.</td> \r\n\t\t\t\t\t\t<td class=ul1>{$w['Nama']} <img src='img/{$w['Kelamin']}.bmp'></img><font size=1 color=teal>{$w['ProdiID']} - {$w['NilaiUjian']}</font></td>\r\n\t\t\t\t\t\t<td class=ul1 align=center><input type=checkbox id='HM{$x1}' name='PilihKehadiran[]' value='{$w['MhswID']}' {$ck}>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=hidden name='SemuaPilihan[]' value='{$w['MhswID']}'></td>\r\n\t\t\t\t\t</tr>";
        }
        echo "<input type=hidden id='JumlahHM' name='JumlahHM' value='{$x1}'>";
        if ($xx > 0) {
            echo "\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td></td>\r\n\t\t\t\t\t\t<td class=ul1 align=center><input type=submit name='Kehadiran Siswa' value='Simpan Kehadiran'/></td>\r\n\t\t\t\t\t\t<td class=ul1 align=center><input type=button name='UnCheckAllMember' value='Clear Semua' onClick=\"UnCheckAll('HM')\" /></td>\r\n\t\t\t\t\t</tr>";
        }
    }
    echo "\r\n\t\t\t\t</form>\r\n\t\t\t</table>";
}
コード例 #9
0
function ProsesSekarang()
{
    //$arrPot = array('U'=>'5', 'S'=>'3');
    $s = "select *\r\n    from _tagihan\r\n    where POTNGMSTAG > 0 or POTMBMSTAG > 0\r\n    order by NIMHSMSTAG";
    $r = _query($s);
    $jml = _num_rows($r);
    echo "<p>Data yg akan diproses: <font size=+1>{$jml}</font></p>";
    echo "<ol>";
    while ($w = _fetch_array($r)) {
        $pot1 = number_format($w['POTNGMSTAG']);
        $pot2 = number_format($w['POTMBMSTAG']);
        echo "<li>{$w['NIMHSMSTAG']} &raquo; {$pot1} &raquo; {$pot2}\r\n    </li>";
        // ambil detail dari TRPTG
        $sp = "select * from _potongan where NIMHSTRPTG='{$w['NIMHSMSTAG']}' ";
        $rp = _query($sp);
        echo "<ul>";
        while ($wp = _fetch_array($rp)) {
            $jmlpot = number_format($wp['NLPOTTRPTG']);
            $bn = $wp['JNPOTTRPTG'] == 'U' ? 5 : 3;
            $ada = GetaField('bipotmhsw', "TahunID='{$wp['THSMSTRPTG']}' \r\n        and MhswID='{$wp['NIMHSTRPTG']}' \r\n        and TrxID=-1\r\n        and BIPOTNamaID", $bn, "BIPOTMhswID");
            if (empty($ada)) {
                $prc = "insert into bipotmhsw\r\n          (PMBMhswID, TrxID, MhswID, TahunID, BIPOTNamaID,\r\n          Jumlah, Besar, Dibayar, Catatan,\r\n          LoginBuat, TanggalBuat)\r\n          values (1, -1, '{$wp['NIMHSTRPTG']}', '{$wp['THSMSTRPTG']}', {$bn},\r\n          1, {$wp['NLPOTTRPTG']}+0, {$wp['NLPOTTRPTG']}, '{$wp['KETR1TRPTG']} {$wp['KETR2TRPTG']}',\r\n          'IMPORT-POT-20061', now())";
                $rprc = _query($prc);
            } else {
                $prc = "(Sudah ada)";
            }
            echo "<li>{$wp['JNPOTTRPTG']} &raquo; {$jmlpot} {$prc}</li>";
        }
        echo "</ul>";
    }
    echo "</ol>";
}
コード例 #10
0
function Isinya($Tanggal, $Kampus, $p)
{
    $lbr = 290;
    $t = 6;
    JudulKolomnya($p);
    $p->SetFont('Helvetica', '', 10);
    $PilihanKompre = GetaField('prodi', "ProdiID='{$_SESSION['ProdiID']}' and KodeID", KodeID, 'PilihanKompre');
    if ($PilihanKompre == 'Y') {
        $s = "select kd.*, m.MhswID,left(m.Nama, 28) as Mhsw,m.KelasID, d.Nama as _DosenPenguji, kmu.Nama as _NamaMataUji,\r\n\t\t\tdate_format(kd.Tanggal, '%a') as _Hari, LEFT(kd.JamMulai, 5) as _JamUjian, LEFT(kd.JamSelesai, 5) as _JamSelesai, pa.Nama as _DosenPA\r\n\t\t\tfrom kompredosen kd \r\n\t\t\t\tleft outer join kompre k on kd.KompreID=k.KompreID and k.KodeID='" . KodeID . "'\r\n\t\t\t\tleft outer join mhsw m on m.MhswID = k.MhswID and m.KodeID = '" . KodeID . "'\r\n\t\t\t\tleft outer join dosen pa on pa.Login = m.PenasehatAkademik\r\n\t\t\t\tleft outer join dosen d on d.Login = kd.DosenID\r\n\t\t\t\tleft outer join komprematauji kmu on kmu.KompreMataUjiID=kd.KompreMataUjiID and kmu.KodeID='" . KodeID . "'\r\n\t\t\twhere kd.KodeID = '" . KodeID . "'\r\n\t\t  and k.Lulus = 'N'\r\n\t\t  and kd.Tanggal = '{$Tanggal}'\r\n\t\t  and kd.NA = 'N'\r\n\t\tgroup by k.MhswID\r\n\t\torder by kd.Tanggal";
    } else {
        $s = "select k.*, m.MhswID,left(m.Nama, 28) as Mhsw,m.KelasID, d.Nama as _DosenPenguji, \r\n\t\t\tdate_format(k.TanggalUjian, '%a') as _Hari, LEFT(k.JamMulai, 5) as _JamUjian, LEFT(k.JamSelesai, 5) as _JamSelesai, pa.Nama as _DosenPA\r\n\t\t\tfrom kompre k \r\n\t\t\t\tleft outer join mhsw m on m.MhswID = k.MhswID and m.KodeID = '" . KodeID . "'\r\n\t\t\t\tleft outer join dosen pa on pa.Login = m.PenasehatAkademik\r\n\t\t\t\tleft outer join dosen d on d.Login = k.DosenID\r\n\t\t\twhere k.KodeID = '" . KodeID . "'\r\n\t\t  and k.Lulus = 'N'\r\n\t\t  and k.TanggalUjian = '{$Tanggal}'\r\n\t\t  and k.NA = 'N'\r\n\t\tgroup by k.MhswID\r\n\t\torder by k.TanggalUjian";
    }
    $r = _query($s);
    $n = 0;
    $jum = _num_rows($r);
    while ($w = _fetch_array($r)) {
        $n++;
        $MataUji = $PilihanKompre == 'Y' ? ' (' . $w['_NamaMataUji'] . ')' : '';
        $p->Cell(8, $t, $n, 1, 0, 'C');
        $p->Cell(30, $t, $w['MhswID'], 1, 0, 'C');
        $p->Cell(60, $t, $w['Mhsw'], 1, 0);
        $p->Cell(50, $t, $w['_DosenPA'], 1, 0);
        $p->Cell(50, $t, $w['_DosenPenguji'] . $MataUji, 1, 0);
        $p->Cell(55, $t, $w['_JamUjian'] . ' - ' . $w['_JamSelesai'] . ' WIB', 1, 0, 'C');
        $p->Cell(20, $t, $w['RuangID'], 1, 0, 'C');
    }
}
コード例 #11
0
ファイル: golongan.php プロジェクト: anggadjava/mitra_siakad
function DaftarGolongan()
{
    $s = "select * \r\n    from golongan \r\n    where ProdiID='{$_SESSION['prodi']}' order by GolonganID, KategoriID";
    $r = _query($s);
    $n = 0;
    $count = _num_rows($r);
    if ($count == 0) {
        echo "<a href='?mnux=golongan&gos=GolImprt'>Import Default Golongan</a>";
    }
    echo "<p><table class=box cellspacing=1 cellpadding=4>\r\n    <tr><th class=ttl>No</th>\r\n    <th colspan=2 class=ttl title='Golongan'>Gol</th>\r\n    <th class=ttl title='Kategori'>Kat</th>\r\n    <th class=ttl>Pangkat</th>\r\n    <th class=ttl>Nama</th>\r\n    <th class=ttl title='Tunjangan Fungsional'>Fungsional</th>\r\n    <th class=ttl title='Tunjangan per SKS'>per SKS</th>\r\n    <th class=ttl title='Tunjangan Tranport'>Transport</th>\r\n    <th class=ttl title='Tunjangan Tetap'>Tetap</th>\r\n    <th class=ttl title='Tidak Aktif?'>NA</th>\r\n    </tr>";
    $_gol = 'qwertyuiop';
    while ($w = _fetch_array($r)) {
        $n++;
        if ($_gol != $w['GolonganID']) {
            $_gol = $w['GolonganID'];
            $_strgol = "<b>{$w['GolonganID']}</b>";
        } else {
            $_strgol = "<img src='img/brch.gif'>";
        }
        $TFun = number_format($w['TunjanganFungsional']);
        $TSKS = number_format($w['TunjanganSKS']);
        $TTra = number_format($w['TunjanganTransport']);
        $TTtp = number_format($w['TunjanganTetap']);
        $c = $w['NA'] == 'Y' ? 'class=nac' : 'class=ul';
        echo "<tr>\r\n    <td class=inp>{$n}</td>\r\n    <td class=ul><a href='?mnux=golongan&md=0&gos=GolEdt&_GID={$w['GolonganID']}&_KID={$w['KategoriID']}'><img src='img/edit.png'></a></td>\r\n    <td class=ul>{$_strgol}</td>\r\n    <td {$c}>{$w['KategoriID']}</td>\r\n    <td {$c}>{$w['Pangkat']}&nbsp;</td>\r\n    <td {$c}>{$w['Nama']}&nbsp;</td>\r\n    <td {$c} align=right>{$TFun}</td>\r\n    <td {$c} align=right>{$TSKS}</td>\r\n    <td {$c} align=right>{$TTra}</td>\r\n    <td {$c} align=right>{$TTtp}</td>\r\n    <td class=ul><img src='img/book{$w['NA']}.gif'></td>\r\n    </tr>";
    }
    echo "</table></p>";
}
コード例 #12
0
function ProsesTransferDep()
{
    $s = "select *\r\n    from _transferdeposit\r\n    order by TahunID, MhswID";
    $r = _query($s);
    $jml = _num_rows($r);
    echo "<p>Ada <font size=+2>{$jml}</font> data yg akan diproses.</p>";
    echo "<ol>";
    $bn_dep = 32;
    // transfer deposit. Lihat di BipotNama
    $bn_nm = "Transfer Deposit";
    while ($w = _fetch_array($r)) {
        $_dep = number_format($w['Jumlah']);
        $ada = GetFields('bipotmhsw', "TahunID='{$w['TahunID']}' and BIPOTNamaID={$bn_dep} and MhswID", $w['MhswID'], "*");
        if (empty($ada)) {
            $str = "Diproses ";
            $s0 = "insert into bipotmhsw\r\n        (PMBMhswID, MhswID, TahunID, \r\n        BIPOTNamaID, Nama, TrxID, Draft,\r\n        Jumlah, Besar, Dibayar,\r\n        Catatan, LoginBuat, TanggalBuat)\r\n        values (1, '{$w['MhswID']}', '{$w['TahunID']}',\r\n        {$bn_dep}, '{$bn_nm}', -1, 'N',\r\n        1, {$w['Jumlah']}, {$w['Jumlah']}, \r\n        'import-061030', 'import-061030', now())";
            //$str .= $s0;
            $r0 = _query($s0);
        } else {
            $str = "<font color=red>Sudah</font>";
        }
        echo "<li>{$w['MhswID']} - {$w['TahunID']} &raquo; {$_dep} &raquo; {$str}</li>";
    }
    echo "</ol>";
}
コード例 #13
0
function CetakPerolehanSKS()
{
    $s = "select m.MhswID, m.Nama, sm.Nama as SM\r\n    from mhsw m\r\n      left outer join statusmhsw sm on m.StatusMhswID=sm.StatusMhswID\r\n    where ('{$_SESSION['DariNPM']}' <= m.MhswID)\r\n      and (m.MhswID <= '{$_SESSION['SampaiNPM']}')\r\n      and sm.Nilai=1\r\n    order by m.MhswID";
    $r = _query($s);
    $jml = _num_rows($r);
    if ($jml == 0) {
        echo ErrorMsg("Tidak ada Data", "Tidak ada mahasiswa dalam rentang NPM: <b>{$_SESSION['DariNPM']}</b> s/d <b>{$_SESSION['SampaiNPM']}</b>.");
    } else {
        echo "<p>Akan diproses: <font size=+1>{$jml}</font> mahasiswa.\r\n    Tunggu sampai proses selesai. Setelah selesai baru akan dicetak.</p>";
        // Simpan data ke memori
        $n = 0;
        while ($w = _fetch_array($r)) {
            $n++;
            $_SESSION["PERO-MhswID-{$n}"] = $w['MhswID'];
        }
        $_SESSION["PERO-POS"] = 0;
        $_SESSION["PERO-MAX"] = $jml;
        $_SESSION["PERO-FILE"] = "tmp/{$_SESSION['_Login']}.PerolehanSKS.dwoprn";
        // init file
        $f = fopen($_SESSION["PERO-FILE"], 'w');
        fwrite($f, chr(27));
        fclose($f);
        // IFRAME
        echo "<p><IFRAME src='akd.lap.perolehansks.go.php' frameborder=0 height=100% width=100%>\r\n    </IFRAME></p>";
    }
}
コード例 #14
0
ファイル: prosesbipot.prc.php プロジェクト: anggadjava/sisfor
function Prosesnya()
{
    $max = $_SESSION['_bptMax'] + 0;
    $max = $max == 0 ? 10 : $max;
    $page = $_SESSION['_bptPage'] + 0;
    $mulai = $max * $page;
    $s = "select h.*, m.Nama as NamaMhsw\r\n    from khs h\r\n      left outer join mhsw m on m.MhswID = h.MhswID and m.KodeID = '" . KodeID . "'\r\n    where h.KodeID = '" . KodeID . "'\r\n      and h.TahunID = '{$_SESSION['TahunID']}'\r\n          and left(m.TahunID, 4) = '{$_SESSION['TahunID2']}'          \r\n    order by h.MhswID\r\n    limit {$mulai}, {$max}";
    $r = _query($s);
    $jml = _num_rows($r);
    if ($jml > 0) {
        while ($w = _fetch_array($r)) {
            $_SESSION['_bptCounter']++;
            $jml = ProsesBIPOT($w['MhswID'], $w['TahunID']) + 0;
            $_jml = number_format($jml);
            echo "\r\n      <script>\r\n      parent.fnProgress({$_SESSION['_bptCounter']}, '{$w['MhswID']}', '{$w['NamaMhsw']}', '{$_jml}');\r\n      </script>";
        }
        $_SESSION['_bptPage']++;
        $tmr = 1;
        echo <<<ESD
    <script>
    window.onload=setTimeout("window.location='../{$_SESSION['mnux']}.prc.php'", {$tmr});
    </script>
ESD;
    } else {
        echo <<<ESD
    <script>
    parent.fnSelesai('{$_SESSION['TahunID']}', {$_SESSION['_bptCounter']});
    </script>
ESD;
    }
}
コード例 #15
0
ファイル: skyudisium.php プロジェクト: anggadjava/sisfor
function TampilkanDaftarYudisium()
{
    $optprd = GetOption2('prodi', "concat(ProdiID, ' - ', Nama)", "ProdiID", $_SESSION['prodi'], '', "ProdiID");
    $bulan1 = GetMonthOption($_SESSION['bulan1']);
    $bulan2 = GetMonthOption($_SESSION['bulan2']);
    $tahun1 = GetNumberOption(date('Y') - 10, date('Y'), $_SESSION['tahun1']);
    $tahun2 = GetNumberOption(date('Y') - 10, date('Y') + 1, $_SESSION['tahun2']);
    $TglYudisium = GetDateOption($_SESSION['TglYudisium'], 'TglYudisium');
    echo "<p><table class=box cellspacing=1 cellpadding=4>\r\n  <form action='?' method=POST>\r\n  <tr><td class=ul colspan=2><font size=+1>Filter</font></td></tr>\r\n  <tr><td class=inp>Prodi :</td><td class=ul><select name='prodi'>{$optprd}</select> Kosongkan jika ingin melihat semua</td></tr>\r\n  <tr><td class=inp>Lulus bulan :</td><td class=ul>\r\n    <select name='bulan1'>{$bulan1}</select><select name='tahun1'>{$tahun1}</select> s/d\r\n    <select name='bulan2'>{$bulan2}</select><select name='tahun2'>{$tahun2}</select> <input type=submit name='Filter' value='Filter Daftar'></td></tr>\r\n  </form>\r\n  \r\n  <tr><td class=ul colspan=2><font size=+1>SK Yudisium</font></td></tr>\r\n  <tr><td colspan=2>Set mahasiswa yang bertanda centang dalam daftar di bawah ini dengan SK Yudisium berikut ini:</td></tr> \r\n  <form action='?' method=POST>\r\n  <input type=hidden name='mnux' value='skyudisium'>\r\n  <input type=hidden name='gos' value='SKYSAV'>\r\n  <tr><td class=inp>No SK Yudisium :</td><td class=ul><input type=text name='SKYudisium' value='{$_SESSION['SKYudisium']}' size=50 maxlength=100></td></tr>\r\n  <tr><td class=inp>Tanggal Yudisium :</td><td class=ul>{$TglYudisium} <input type=submit name='Simpan' value='Set SK Semua yg Dicentang'></td></tr>\r\n  </table></p>";
    if ($_SESSION['prodi'] != '10') {
        $_whr = "('{$_SESSION['tahun1']}-{$_SESSION['bulan1']}-01' <= ta.TglUjian) \r\n      and (ta.TglUjian <= '{$_SESSION['tahun2']}-{$_SESSION['bulan2']}-31') and ";
    } else {
        $_whr = "";
    }
    $s = "select ta.*, m.Nama\r\n    from ta ta\r\n      left outer join mhsw m on ta.MhswID=m.MhswID\r\n    where ta.Lulus='Y'\r\n      and m.ProdiID = '{$_SESSION['prodi']}'\r\n      \r\n    order by ta.MhswID";
    $r = _query($s);
    $n = 0;
    $TotalSKY = _num_rows($r) + 0;
    echo "<input type=hidden name='TotalSKY' value={$TotalSKY}>\r\n    <p><table class=box cellspacing=1 cellpadding=4>\r\n    <tr><th class=ttl>#</th>\r\n    <th class=ttl>N.P.M</th>\r\n    <th class=ttl>Nama Mahasiswa</th>\r\n    <th class=ttl>Tgl Ujian</th>\r\n    <th class=ttl>Judul</th>\r\n    <th class=ttl>SK Yudisium</th>\r\n    <th class=ttl>Tgl Yudisium</th>\r\n    <th class=ttl>Centang</th>\r\n    </tr>";
    while ($w = _fetch_array($r)) {
        $n++;
        $TglSKYudisium = FormatTanggal($w['TglSKYudisium']);
        echo "<tr><td class=inp>{$n}</td>\r\n    <td class=ul>{$w['MhswID']}</td>\r\n    <td class=ul>{$w['Nama']}</td>\r\n    <td class=ul>{$w['TglUjian']}</td>\r\n    <td class=ul>{$w['Judul']}</td>\r\n    <td class=ul>{$w['SKYudisium']}&nbsp;</td>\r\n    <td class=ul>{$TglSKYudisium}</td>\r\n    <td class=ul><input type=checkbox name='SKY[]' value='{$w['TAID']}'></td>\r\n    </tr>";
    }
    echo "</table></form></p>";
}
コード例 #16
0
ファイル: setara.go.php プロジェクト: anggadjava/mitra_siakad
function ExportKRSSetara()
{
    $mhswstrID = $_REQUEST['mhswstrID'];
    $prodiID = $_REQUEST['prodit'];
    $s = "select mps.*, mp.*, n.Bobot as BOBOT, mps.GradeNilai as GRADE\r\n    from mhswpindahansetara mps \r\n      left outer join nilai n on n.Nama = mps.GradeNilai\r\n      left outer join mhswpindahan mp on mp.MhswPindahanID = mps.MhswPindahanID\r\n    where mps.sudah=0 \r\n    and mps.MhswPindahanID = {$mhswstrID}\r\n    and n.ProdiID = {$prodiID}";
    $r = _query($s);
    $jml = _num_rows($r);
    echo "<p>Jumlah data: <font size=+1>{$jml}</font></p>";
    echo "<ol>";
    while ($w = _fetch_array($r)) {
        //$ada = GetaField('krs', "MhswID='$w[MhswID]' and JadwalID", $w[JadwalID], 'KRSID');
        //if (empty($ada)) {
        echo "<li>{$w['MhswID']} &raquo; {$w['MKKode']}\r\n      </li>";
        // Export
        $s1 = "insert into krs\r\n        (KHSID, MhswID, TahunID, JadwalID, \r\n        MKID, MKKode, SKS, StatusKRSID,\r\n        Harga, HargaStandar,\r\n        GradeNilai, BobotNilai, Final,\r\n        Catatan,\r\n        LoginBuat, TanggalBuat)\r\n        values ('{$w['KHSID']}', '{$w['MhswID']}', '00000', '{$w['JadwalID']}',\r\n        '{$w['MKID']}', '{$w['MKKode']}', '{$w['SKS']}', 'A',\r\n        {$w['Harga']}, '{$w['HargaStandar']}',\r\n        '{$w['GRADE']}', '{$w['BOBOT']}', 'Y',\r\n        '{$w['Catatan']}',\r\n        '{$w['LoginBuat']}', now())\r\n      ";
        //echo "<pre>$s1</pre>";
        $r1 = _query($s1);
        // Set bahwa sudah di export
        $s2 = "update mhswpindahansetara set sudah=1 where KRSID={$w['KRSID']}";
        $r2 = _query($s2);
        echo "<pre>{$s2}</pre>";
        //}
        //else echo "<li>$w[MhswID] &raquo; $w[KRSID]</li>";
    }
    $s3 = "update mhswpindahan set Sudah=1 where MhswPindahanID={$mhswstrID}";
    $r3 = _query($s3);
    $up = GetFields('mhswpindahan', "MhswPindahanID", $mhswstrID, "*");
    $s4 = "update mhsw set BatasStudi='{$up['BatasStudi']}', TotalSKSPindah='{$up['JumlahSetara']}', SKPenyetaraan='{$up['SKPenyetaraan']}',\r\n         TglSKPenyetaraan='{$up['TglSKPenyetaraan']}', ProdiAsalPT='{$up['ProdiAsalPT']}', AsalPT='{$up['AsalPT']}', IPKAsalPT='{$up['IPKAsalPT']}'\r\n         where MhswID='{$up['MhswID']}'";
    $r4 = _query($s4);
    echo "</ol>";
}
コード例 #17
0
function AmbilJadwal($query, $p)
{
    // Buat headernya dulu
    $p->SetFont('Helvetica', 'B', 12);
    $t = 7;
    $count = 0;
    $p->Cell(15, $t, 'NO', 1, 0, 'C');
    $p->Cell(110, $t, 'MATA KULIAH', 1, 0, 'C');
    $p->Cell(75, $t, 'HARI/TANGGAL', 1, 0, 'C');
    $p->Cell(40, $t, 'WAKTU', 1, 0, 'C');
    $p->Cell(30, $t, 'RUANG', 1, 0, 'C');
    $p->Ln($t);
    while ($w = _fetch_array($query)) {
        $count++;
        $s1 = "select * from presensiremedial where JadwalRemedialID='{$w['JadwalRemedialID']}' and KodeID='" . KodeID . "'";
        $r1 = _query($s1);
        $n1 = _num_rows($r1);
        $p->Cell(15, $n1 * $t, $count, 1, 0, 'C');
        $p->Cell(110, $n1 * $t, $w['Nama'], 1, 0, 'C');
        $nx = 0;
        while ($w1 = _fetch_array($r1)) {
            if ($nx > 0) {
                $p->Cell(125);
            }
            $p->Cell(75, $t, $w1['Tanggal'], 1, 0, 'C');
            $p->Cell(40, $t, substr($w1['JamMulai'], 0, 5) . ' - ' . substr($w1['JamSelesai'], 0, 5), 1, 0, 'C');
            $p->Cell(30, $t, $w1['RuangID'], 1, 1, 'C');
            $nx++;
        }
        $p->Ln($t + 1);
    }
}
コード例 #18
0
function ProsesSekarang()
{
    $s = "select * from _pembayaran where RESTAMSTAR='A' order by NIMHSMSTAR";
    $r = _query($s);
    $jml = _num_rows($r);
    echo "<p>Jumlah yg akan diproses: <font size=+1>{$jml}</font></p>";
    echo "<ol>";
    while ($w = _fetch_array($r)) {
        $byr = number_format($w['NLBPMMSTAR']);
        $jml = $w['NLBPMMSTAR'] - $w['NLLN2MSTAR'] + 0;
        $TglBank = DeFormatTanggal($w['TGBANMSTAR']);
        $TglBuat = DeFormatTanggal($w['TGBPMMSTAR']);
        // Cek apakah BPM sudah ada?
        $ada = GetFields('bayarmhsw', 'BayarMhswID', $w['NOBPMMSTAR'], '*');
        if (empty($ada)) {
            // Tampilkan
            echo "<li>{$w['NOBPMMSTAR']} &raquo; \r\n        {$w['NIMHSMSTAR']} &raquo; {$w['NOTESMSTAR']} = \r\n        <font size=+1>{$byr}</font>\r\n        </li>";
            // Insert
            $s1 = "insert into bayarmhsw\r\n        (BayarMhswID, TahunID, RekeningID, \r\n        PMBMhswID, MhswID, TrxID,\r\n        Bank, BuktiSetoran,\r\n        Tanggal, Jumlah, JumlahLain,\r\n        Proses, Keterangan,\r\n        LoginBuat, TanggalBuat)\r\n        values\r\n        ('{$w['NOBPMMSTAR']}', '{$w['THSMSMSTAR']}', 'Import-20061',\r\n        1, '{$w['NIMHSMSTAR']}', 1,\r\n        '{$w['KDBANMSTAR']}', '{$w['NOTESMSTAR']}',\r\n        '{$TglBank}', {$jml}, {$w['NLLN2MSTAR']}+0,\r\n        1, 'IMPORT-20061',\r\n        'IMPORT-20061', '{$TglBuat}')";
            //echo $s1;
            $r1 = _query($s1);
        } else {
            echo "<li>{$w['NOBPMMSTAR']} &raquo; XXX</li>";
        }
    }
    echo "</ol>";
}
コード例 #19
0
function BuatIsinya($_DosenID, $_Tahun, $_Bulan, $_id, $p)
{
    $whr_id = empty($_id) ? "" : "and p.HonorDosenID = '{$_id}'";
    $s = "select h.*, m.Nama as Mgg \r\n        from honordosen h\r\n        left outer join minggu m on h.Minggu=m.MingguID\r\n        where h.DosenID = '{$_DosenID}'\r\n\t      and h.Bulan = '{$_Bulan}'\r\n        and h.Tahun = '{$_Tahun}'";
    /*
      $s = "select DISTINCT(j.MKKode), j.SKS,
      p.SKSHonor,
      j.Nama, 
    	  sum(p.TunjanganSKS) as _TunjanganSKS,
    	  sum(p.TunjanganTetap) as _TunjanganTetap,
    	  sum(p.TunjanganTransport) as _TunjanganTransport,
    	  count(p.PresensiID) as _Pertemuan
    from presensi p
      left outer join jadwal j on j.JadwalID = p.JadwalID
      left outer join prodi prd on prd.ProdiID = j.ProdiID and prd.KodeID = '".KodeID."'
    where 
      p.DosenID = '$_DosenID'
    	  and MONTH(p.Tanggal) = '$_Bulan'
      and YEAR(p.Tanggal) = '$_Tahun'
    	  $whr_id
    	group by p.HonorDosenID
    order by p.Pertemuan, j.MKKode, p.Tanggal";
    */
    $r = _query($s);
    $n = 0;
    $t = 5;
    $ttl = 0;
    $_mhsw = ';alskdjfa;lsdhguairgsofjhjg9e8rgjpsofjg';
    $ttlsks = 0;
    $ttlhonor = 0;
    if (_num_rows($r) > 0) {
        while ($w = _fetch_array($r)) {
            $n++;
            $honor = $w['TunjanganSKS'] + $w['TunjanganTransport'] + $w['TunjanganTetap'] + 0;
            $pajak = $honor * $w['Pajak'] / 100;
            $total = $honor - $pajak;
            $ttlhonor += $honor;
            $ttlpajak += $pajak;
            $ttltotal += $total;
            $p->SetFont('Helvetica', '', 10);
            $p->Cell(10, $t, $n, 'LB', 0, 'R');
            $p->Cell(85, $t, $w['Mgg'], 'B', 0);
            $p->Cell(30, $t, number_format($honor, 0, ',', '.'), 'B', 0, 'R');
            $p->Cell(30, $t, number_format($pajak, 0, ',', '.'), 'B', 0, 'R');
            $p->Cell(35, $t, number_format($total, 0, ',', '.'), 'B', 0, 'R');
            $p->Ln($t);
        }
        $_ttl = number_format($ttl + 0);
        $p->SetFont('Helvetica', 'B', 11);
        $p->Cell($lbr, 1, ' ', 1, 1);
        $p->Cell(95, $t, 'TOTAL :', 0, 0, 'R');
        $p->Cell(30, $t, number_format($ttlhonor, 0, ',', '.'), 0, 0, 'R');
        $p->Cell(30, $t, number_format($ttlpajak, 0, ',', '.'), 0, 0, 'R');
        $p->Cell(35, $t, number_format($ttltotal, 0, ',', '.'), 0, 0, 'R');
        $p->Ln($t);
    }
}
コード例 #20
0
function Cetak()
{
    global $_lf;
    // Parameters
    $jdwlid = $_REQUEST['JadwalID'];
    $jdwl = GetFields("jadwal", 'JadwalID', $jdwlid, "*");
    if (empty($jdwl)) {
        die("Data tidak ditemukan.");
    }
    // Buat File
    $nmf = HOME_FOLDER . DS . "tmp/{$_SESSION['_Login']}.dwoprn";
    $f = fopen($nmf, 'w');
    fwrite($f, chr(27) . chr(15));
    $hal = 0;
    $n = 0;
    $brs = 0;
    $maxbaris = 20;
    $mrgisi = str_pad(' ', 11, ' ');
    //$hdr = BuatHeader($jdwl, $);
    // Daftar mhsw
    $s = "select m.Nama as NamaM,krs.Mhswid as IDM \r\n    from krstemp as krs left outer join mhsw m on m.MhswID = krs.MhswID\r\n        where \r\n\tkrs.JadwalID = '{$jdwlid}' \r\n\tand krs.NA = 'N'\r\n\torder by krs.Mhswid";
    $r = _query($s);
    $jumrec = _num_rows($r);
    $jumhal = ceil($jumrec / $maxbaris);
    $hdr = BuatHeader($jdwl, $jumhal, $hal);
    fwrite($f, $hdr);
    while ($w = _fetch_array($r)) {
        if ($brs >= $maxbaris) {
            fwrite($f, chr(12));
            fwrite($f, BuatHeader($jdwl, $jumhal, $hal));
            $brs = 0;
        }
        //$brs++; $n++;
        //fwrite($f, str_pad($n.'. ', 4) . $w['IDM'] . ' » ' . $w['NamaM']);
        //fwrite($f, $_lf);
        $brs++;
        $n++;
        $item = $mrgisi . str_pad($n . '. ', 5) . str_pad($w['IDM'], 12) . $w['NamaM'];
        //if ($brs == 2) $item2 = "                   Jumlah Tatap Muka : " . $jdwl['Kehadiran'] . 'x';
        // else $item2 = '';
        //fwrite($f, $mrgisi . str_pad($n.'. ', 5) . $w['MhswID']. '   ' . str_pad($NamaMhsw, 50));
        if (!empty($item)) {
            fwrite($f, $item . $item2 . $_lf . $_lf);
        }
    }
    //fclose($f);
    //TampilkanFileDWOPRN($nmf);
    for ($i = $brs; $i < $maxbaris; $i++) {
        fwrite($f, $mrgisi . str_pad(' ', 5) . "** Tidak diperkenankan menambah pada baris ini **" . $_lf . $_lf);
    }
    fwrite($f, $_lf . "Dicetak Oleh : " . $_SESSION['_Login'] . ', ' . Date("d-m-Y H:i"));
    fwrite($f, chr(12));
    fclose($f);
    TampilkanFileDWOPRN($nmf);
}
コード例 #21
0
ファイル: wawancara.php プロジェクト: anggadjava/mitra_siakad
function ListWawancara($gelombang)
{
    $s1 = "select * from `pmb` \r\n\t\t\twhere (PMBID like '%{$_SESSION['_wawanEntry']}%'\r\n\t\t\t\tor Nama like '%{$_SESSION['_wawanEntry']}%')\r\n\t\t\t\tand PMBPeriodID='{$gelombang}'\r\n\t\t\t\tand KodeID='" . KodeID . "'\r\n\t\t\torder by PMBID";
    $r1 = _query($s1);
    $n1 = _num_rows($r1);
    $x1 = 0;
    loadJavaScripts();
    if ($n1 == 0) {
        // Jika nama calon mahasiswa/no.PMB tidak diketemukan dalam table pmb
        if (!empty($_REQUEST['_wawanEntry'])) {
            echo "<br>Nama/No. Pmb: <b>{$_REQUEST['_wawanEntry']}</b> tidak diketemukan. Silakan mencoba lagi";
        }
    } else {
        echo "<p>\r\n\t\t\t\t\t<table class=box cellspacing=1 cellpadding=4 width=800>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th class=ttl width=80 rowspan=2 valign=center>No. PMB (Daftar)</th>\r\n\t\t\t\t\t\t<th class=ttl width=200 rowspan=2 valign=center>Nama Calon Mahasiswa</th>\r\n\t\t\t\t\t\t<th class=ttl width=20 rowspan=2 valign=center>Prodi</th>\r\n\t\t\t\t\t\t<th class=ttl width=600 colspan=7>Data Wawancara</th>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th class=ttl width=20 align=center>#</th>\r\n\t\t\t\t\t\t<th class=ttl width=80>Tgl.</th>\r\n\t\t\t\t\t\t<th class=ttl width=240>Pewawancara</th>\r\n\t\t\t\t\t\t<th class=ttl width=20>Saran</th>\r\n\t\t\t\t\t\t<th class=ttl width=100>Rekomendasi</th>\r\n\t\t\t\t\t\t<th class=ttl width=20></th>\r\n\t\t\t\t\t\t<th class=ttl width=20></th>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t";
        while ($w1 = _fetch_array($r1)) {
            // Jika nama calon mahasiswa/no.PMB ditemukan
            $s = "select * from `wawancara` \r\n\t\t\t\t\twhere PMBID = '{$w1['PMBID']}' and KodeID='" . KodeID . "' and PMBPeriodID='{$gelombang}'";
            $r = _query($s);
            $n = _num_rows($r);
            $x = 0;
            if ($n == 0) {
                echo "<tr>\r\n\t\t\t\t\t\t<td class=ul1 align=center><b>{$w1['PMBID']}</b></td>\r\n\t\t\t\t\t\t<td class=ul1 align=center><b>{$w1['Nama']}</b></td>\r\n\t\t\t\t\t\t<td class=ul1 valign=center align=center>{$w1['Pilihan1']}<br><hr color=green><br>{$w1['Pilihan2']}</td>\r\n\t\t\t\t\t<td class=ul1 colspan=4 align=center><b> - Belum ada wawancara -</b></td>\r\n\t\t\t\t\t<td colspan=3 align=right>\t\t\r\n\t\t\t\t\t\t<input type=button name='Tambah' value='Tambah Wawancara'\r\n\t\t\t\t\t\t\tonClick=\"javascript:fnEditCama('{$gelombang}', 1, '{$w1['PMBID']}')\" />\r\n\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td colspan=10>\r\n\t\t\t\t\t\t\t<hr color=green width=100%>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>";
            } else {
                if ($n < 3) {
                    $n_row = 3;
                } else {
                    $n_row = $n + 1;
                }
                //Set Variable bila Nama/No.PMB ada/tidak ada di dalam table `wawancara`
                $x1++;
                echo "<tr>\r\n\t\t\t\t\t\t<td class=ul1 rowspan={$n_row} valign=center align=center><b>{$w1['PMBID']}</b></td>\r\n\t\t\t\t\t\t<td class=ul1 rowspan={$n_row} valign=center align=center><b>{$w1['Nama']}</b></td>\r\n\t\t\t\t\t\t<td class=ul1 rowspan={$n_row} valign=center align=center>{$w1['Pilihan1']}<br><hr color=green><br>{$w1['Pilihan2']}</td>";
                while ($arr = _fetch_array($r)) {
                    $x++;
                    if ($n == 0) {
                        $n_row = 2;
                    } else {
                        if ($n == 1) {
                            $n_row = 2;
                        } else {
                            $n_row = 1;
                        }
                    }
                    $tanggalwawancara = substr($arr['TanggalWawancara'], 0, 16);
                    echo "\r\n\t\t\t\t\t\t<td class=ul1 rowspan={$n_row} valign=center align=right>{$x}.</td>\r\n\t\t\t\t\t\t<td class=ul1 rowspan={$n_row} valign=center align=center>{$tanggalwawancara}</td>\r\n\t\t\t\t\t\t<td class=ul1 rowspan={$n_row} valign=center >{$arr['Pewawancara']} , {$arr['Pewawancara2']}</td>\r\n\t\t\t\t\t\t<td class=ul1 rowspan={$n_row} valign=center align=center>{$arr['SaranProgram']}</td>\r\n\t\t\t\t\t\t<td class=ul1 rowspan={$n_row} valign=center align=center>{$arr['HasilWawancara']}</td>\r\n\t\t\t\t\t\t<td class=ul1 rowspan={$n_row} valign=center ><a href=\"javascript:fnEditCama('{$gelombang}', 0, '{$arr['WawancaraID']}')\"><img src='img/edit.png' border=0></a></td>\r\n\t\t\t\t\t\t<td class=ul1 rowspan={$n_row} valign=center ></td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t";
                    if ($n < 2) {
                        echo "</tr><tr>";
                    }
                }
                echo "\t<td colspan=7 align=right>\t\t\r\n\t\t\t\t\t\t<input type=button name='Tambah' value='Tambah Wawancara'\r\n\t\t\t\t\t\t\tonClick=\"javascript:fnEditCama('{$gelombang}', 1, '{$w1['PMBID']}')\" />\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td colspan=10>\r\n\t\t\t\t\t\t\t<hr color=green width=100%>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t";
            }
        }
        echo "</table></p>";
    }
}
コード例 #22
0
function daftar()
{
    global $_lf;
    $whr = array();
    if (!empty($_SESSION['dsnkeycr']) && !empty($_SESSION['dsncr'])) {
        $whr[] = "{$_SESSION['dsnkeycr']} like '%{$_SESSION['dsncr']}%'";
    }
    $where = implode(' and ', $whr);
    $where = empty($where) ? '' : "and {$where}";
    $hom = empty($_SESSION['prodi']) ? '' : "and Homebase = '{$_SESSION['prodi']}'";
    $s = "select * from dosen\r\n    where KodeID='{$_SESSION['KodeID']}' {$where} {$hom}\r\n    order by {$_SESSION['dsnurt']} ";
    $r = _query($s);
    $Nhom = GetaField("prodi", "ProdiID", $_SESSION['prodi'], 'Nama');
    $nmf = HOME_FOLDER . DS . "tmp/{$_SESSION['_Login']}.dwoprn";
    $maxcol = 155;
    $f = fopen($nmf, 'w');
    fwrite($f, chr(27) . chr(15) . chr(77) . chr(27) . chr(108) . chr(5));
    $div = str_pad('-', $maxcol, '-') . $_lf;
    // parameter2
    $n = 0;
    $hal = 1;
    $brs = 0;
    $maxbrs = 52;
    $_Tgl = date("d-m-Y");
    $hdr = str_pad("** LAPORAN DAFTAR DOSEN **", $maxcol, ' ', STR_PAD_BOTH) . $_lf . $_lf . $_lf;
    $hdr .= str_pad("Urut Berdasarkan : " . $_SESSION['dsnurt'], 30, ' ') . $_lf;
    $hdr .= str_pad("Homebase         : " . $_SESSION['prodi'] . " - " . $Nhom, 30, ' ') . $_lf;
    $hdr .= $div;
    $hdr .= "No.   KODE    NAMA                                GELAR              HOMEBASE   TELEPON      ALAMAT" . $_lf . $div;
    $jumlahrec = _num_rows($r);
    $jumhal = ceil($jumlahrec / $maxbrs);
    fwrite($f, $hdr);
    while ($w = _fetch_array($r)) {
        $n++;
        $brs++;
        if ($brs > $maxbrs) {
            fwrite($f, $div);
            fwrite($f, str_pad('Halaman : ' . $hal . "/" . $jumhal, 10, ' ') . $_lf);
            $hal++;
            $brs = 1;
            fwrite($f, chr(12));
            fwrite($f, $hdr . $_lf);
        }
        $isi = str_pad($n . ".", 5, ' ') . ' ' . str_pad($w['Login'], 8, ' ') . str_pad($w['Nama'], 35, ' ') . ' ' . str_pad($w['Gelar'], 22, ' ') . str_pad($w['Homebase'], 6, ' ') . str_pad($w['Telephone'], 15, ' ') . str_pad($w['Alamat'], 50, ' ') . $_lf;
        fwrite($f, $isi);
    }
    fwrite($f, $div);
    fwrite($f, str_pad('Halaman : ' . $hal . "/" . $jumhal, 10, ' ') . $_lf);
    fwrite($f, str_pad("Dicetak oleh : " . $_SESSION['_Login'], 20, ' ') . str_pad("Dicetak Tgl : " . $_Tgl, 130, ' ', STR_PAD_LEFT) . $_lf . $_lf);
    fwrite($f, str_pad("Akhir laporan", 149, ' ', STR_PAD_LEFT));
    fwrite($f, chr(12));
    fclose($f);
    TampilkanFileDWOPRN($nmf, "dosen");
}
コード例 #23
0
function AmbilJadwal($thn, $p)
{
    // Buat headernya dulu
    $p->SetFont('Helvetica', 'B', 9);
    $t = 6;
    $p->Cell(10, $t, 'Ambil', 1, 0, 'C');
    $p->Cell(8, $t, 'No', 1, 0);
    $p->Cell(20, $t, 'Kode MK', 1, 0);
    $p->Cell(90, $t, 'Matakuliah', 1, 0);
    $p->Cell(9, $t, 'SKS', 1, 0);
    $p->Cell(70, $t, 'Dosen Pengajar', 1, 0);
    $p->Cell(14, $t, 'Hari', 1, 0);
    $p->Cell(22, $t, 'Jam', 1, 0);
    $p->Cell(14, $t, 'Kelas', 1, 0, 'C');
    $p->Cell(18, $t, 'Ruangan', 1, 0, 'C');
    $p->Ln($t);
    // Parameters
    $whr_hari = $_SESSION['_jdwlHari'] == '' ? '' : "and j.HariID = '{$_SESSION['_jdwlHari']}' ";
    $whr_kelas = $_SESSION['_jdwlKelas'] == '' ? '' : "and j.NamaKelas= '{$_SESSION['_jdwlKelas']}' ";
    $whr_smt = $_SESSION['_jdwlSemester'] == '' ? '' : "and mk.Sesi = '{$_SESSION['_jdwlSemester']}' ";
    // Ambil Isinya
    $s = "select j.*,\r\n      j.Nama as MK,\r\n      h.Nama as HR, \r\n      LEFT(j.JamMulai, 5) as JM, LEFT(j.JamSelesai, 5) as JS,\r\n      if (d.Nama is NULL or d.Nama = '', 'Belum diset', concat(d.Nama, ', ', d.Gelar)) as DSN,\r\n      date_format(j.UASTanggal, '%d-%m-%Y') as _UASTanggal,\r\n      date_format(j.UASTanggal, '%w') as _UASHari,\r\n      huas.Nama as HRUAS,\r\n \t  if (j.JadwalRefID != 0,'(LAB)','') as _lab,\r\n     LEFT(j.UASJamMulai, 5) as _UASJamMulai, LEFT(j.UASJamSelesai, 5) as _UASJamSelesai,\r\n\t  k.Nama AS namaKelas\r\n    from jadwal j\r\n      left outer join hari h on h.HariID = j.HariID\r\n      left outer join dosen d on d.Login = j.DosenID and d.KodeID = '" . KodeID . "'\r\n      left outer join hari huas on huas.HariID = date_format(j.UASTanggal, '%w')\r\n      left outer join mk on mk.MKID = j.MKID \r\n\t  LEFT OUTER JOIN kelas k ON k.KelasID = j.NamaKelas\r\n    where j.KodeID = '" . KodeID . "'\r\n      and j.TahunID = '{$_SESSION['_jdwlTahun']}'\r\n      and j.ProdiID = '{$_SESSION['_jdwlProdi']}'\r\n      and j.ProgramID = '{$_SESSION['_jdwlProg']}'\r\n      {$whr_hari} {$whr_kelas} {$whr_smt}\r\n    order by j.Nama, j.HariID";
    $r = _query($s);
    //die("<pre>$s</pre>");
    $n = 0;
    $_h = 'akjsdfh';
    $_p = 'la;skdjfadshg';
    $t = 6;
    if (_num_rows($r) > 0) {
        while ($w = _fetch_array($r)) {
            $n++;
            $hr = $w['HR'];
            $p->SetFont('Helvetica', '', 8);
            $p->Cell(10, $t, '', 1, 0);
            $p->Cell(8, $t, $n, 1, 0, 'R');
            $p->Cell(20, $t, $w['MKKode'], 1);
            $p->Cell(90, $t, $w['MK'] . ' ' . $w[_lab], 1);
            $p->Cell(9, $t, $w['SKS'], 1, 0, 'C');
            $p->Cell(70, $t, $w['DSN'], 1);
            $p->Cell(14, $t, $hr, 1);
            $p->Cell(22, $t, $w['JM'] . ' - ' . $w['JS'], 1);
            $p->Cell(14, $t, $w['namaKelas'], 1, 0, 'C');
            $p->Cell(18, $t, $w['RuangID'], 1, 0, 'C');
            $p->SetXY(13, $p->GetY() + 1);
            $p->Cell(4, 4, '', 1, 0);
            $p->SetXY(10, $p->GetY() - 1);
            $p->Ln($t);
        }
    } else {
        $p->Cell(100, $t, 'TAHUN TIDAK DITEMUKAN! Harap menghubungi KaBaa untuk mensetup tahun akademik ini', 0, 1);
    }
}
コード例 #24
0
ファイル: prc.ipk.batch.x.php プロジェクト: anggadjava/sisfor
function Proses_Tutup_Keuangan()
{
    global $_lf;
    $tahun = $_REQUEST['tahun'];
    $keu = GetFields("keusetup", "NA", "N", "*");
    $prid = $_REQUEST['prid'];
    $prodi = $_REQUEST['prodi'];
    // Ambil data next semester
    $s0 = "select TahunID from tahun\r\n    where TahunID>'{$tahun}'\r\n      and ProgramID='{$prid}' and ProdiID='{$prodi}'\r\n    limit 1";
    $r0 = _query($s0);
    if (_num_rows($r0) == 0) {
        die("Tahun akademik setelah <b>{$tahun}</b> belum dibuat. <br />\r\n    Hubungi Ka BAA untuk membuat tahun akademik baru terlebih dahulu.");
    }
    $w0 = _fetch_array($r0);
    $tahun2 = $w0['TahunID'];
    echo "<p>Proses untuk <b>{$tahun}</b>, Program: <b>{$prid}</b>, Program Studi: <b>{$prodi}</b><br />\r\n    Nilai hutang/deposit akan ditransfer ke: <b>{$tahun2}</b></p><hr size=1>";
    if (!empty($tahun) && !empty($prid) && !empty($prodi)) {
        $s = "select khs.KHSID, khs.MhswID, khs.Sesi, khs.SKS, khs.BIPOTID,\r\n      khs.SaldoAwal, khs.Biaya, khs.Potongan, khs.Bayar, khs.Tarik\r\n      from khs khs\r\n      where khs.TahunID='{$tahun}'\r\n        and khs.ProgramID='{$prid}'\r\n        and khs.ProdiID='{$prodi}'\r\n        and khs.Tutup='N'\r\n        order by khs.MhswID";
        $r = _query($s);
        $btn = "<input type=button name='Tutup' value='Tutup' onClick='javascript:window.close()'>";
        echo $btn . "<pre>";
        while ($w = _fetch_array($r)) {
            $posisi = $w['Biaya'] - $w['Bayar'] - $w['Potong'] + $w['Tarik'];
            $TrxID = $posisi >= 0 ? 1 : -1;
            // Jika ada transaksi
            if ($posisi > 0) {
                // set data semester ini
                $str1 = "{$keu['HutangNext']}=>{$posisi}, {$keu['HutangPrev']}=>{$posisi}";
                $s1 = "insert into bipotmhsw (TahunID, PMBMhswID, PMBID, MhswID,\r\n          BIPOT2ID, BIPOTNamaID, TrxID, Jumlah, Besar, \r\n          Dibayar, Catatan,\r\n          LoginBuat, TanggalBuat)\r\n          values('{$tahun}', 1, '', '{$w['MhswID']}',\r\n          '0', '{$keu['HutangNext']}', -1, 1, '0', \r\n          '{$posisi}', 'Transfer ke semester berikutnya',\r\n          '{$_SESSION['_Login']}', now() )";
                $r1 = _query($s1);
                // Set balance
                $s1a = "update khs set Bayar=Bayar+{$posisi} where KHSID={$w['KHSID']}";
                $r1a = _query($s1a);
                // set data semester depan
                $s2 .= "insert into bipotmhsw (TahunID, PMBMhswID, PMBID, MhswID,\r\n          BIPOT2ID, BIPOTNamaID, TrxID, Jumlah, Besar,\r\n          Dibayar, Catatan, LoginBuat, TanggalBuat)\r\n          values('{$tahun2}', -1, '', '{$w['MhswID']}',\r\n          '0', '{$keu['HutangNext']}', 1, 1, '{$posisi}',\r\n          '0', 'Transfer dari semester sebelumnya', '{$_SESSION['_Login']}', now() )";
                $r2 = _query($s2);
                // Set balance semester berikutnya
                $s2a = "update khs set Biaya=Biaya+{$posisi} where MhswID='{$w['MhswID']}' and TahunID='{$tahun2}' ";
                $r2a = _query($s2a);
            } elseif ($posisi < 0) {
                $s1 = "{$keu['DepositNext']}=>{$posisi}, {$keu['DepositPrev']}=>{$posisi}";
            } else {
                $str1 = " >< ";
            }
            echo str_pad($w['MhswID'], 20) . str_pad(number_format($posisi), 20, ' ', STR_PAD_LEFT) . ' ' . $str1 . $_lf;
        }
        echo "</pre>" . $btn;
    } else {
        echo ErrorMsg("Gagal Proses", "Tentukan Tahun Akademik, Program, dan Program Studi terlebih dahulu.");
    }
}
コード例 #25
0
ファイル: _cek_presensi.php プロジェクト: anggadjava/sisfor
function TampilkanAD()
{
    $s = "select pm.Mhswid as MhswID, pm.Nilai as Nilai, jp.Nama\r\n    from presensimhsw pm\r\n    left outer join jadwal on jadwal.JadwalID = pm.jadwalID\r\n    left outer join jenispresensi jp on pm.JenisPresensiID = jp.JenisPresensiID\r\n    where jadwal.tahunID = '20061'\r\n    and pm.JenisPresensiID in ('I','S')";
    $r = _query($s);
    $n = 0;
    $jumlahrec = _num_rows($r);
    echo "<b><p>Jumlah Record : {$jumlahrec}</p></b>";
    echo "<table><tr><td class=ul><a href=_proses_Presensi.php>Proses Presensi</a></td></tr></table>";
    echo "<p><table class=box cellspacing=1 cellpadding=4>\r\n    <tr><th class=ttl>#</th>\r\n    <th class=ttl>NIM</th>\r\n    <th class=ttl>Kehadiran</th>\r\n    <th class=ttl>Nilai</th>\r\n    </tr>";
    while ($w = _fetch_array($r)) {
        $n++;
        echo "<tr><td class=inp>{$n}</td>\r\n\t  <td class=ul>{$w['MhswID']}</td>\r\n\t  <td class=ul>{$w['Nama']}\r\n\t  <td class=ul>{$w['Nilai']}</td>\r\n\t  </tr>";
    }
    echo "</table></p>";
}
コード例 #26
0
ファイル: carimk2prodi.php プロジェクト: anggadjava/sisfor
function TampilkanDaftar()
{
    $s = "select mk.MKID, mk.MKKode, mk.Nama, mk.SKS, k.KurikulumKode as KUR, mk.Sesi, hs.DefKehadiran as RencanaKehadiran, hs.DefMaxAbsen as MaxAbsen, mk.Responsi\r\n    from mk mk\r\n      left outer join kurikulum k on mk.KurikulumID = k.KurikulumID\r\n\t  left outer join hadirsks hs on mk.SKS = hs.SKS and mk.ProdiID = hs.ProdiID and hs.KodeID='" . KodeID . "'\r\n    where mk.KodeID = '" . KodeID . "'\r\n      and mk.Nama like '%{$_SESSION['Nama']}%'\r\n      and mk.NA = 'N'\r\n      and mk.ProdiID = '{$_SESSION['ProdiID']}'\r\n      and k.NA = 'N'\r\n    order by mk.MKKode, mk.Nama";
    $r = _query($s);
    $i = 0;
    //echo "<pre>$s</pre>";
    $jml = _num_rows($r);
    if ($jml == 0) {
        echo "<p style='background-color: red; color: white; text-align:center'>\r\n      <b>Tidak ada data matakuliah.<br />\r\n      Mungkin tidak ada kurikulum yang aktif.<br />\r\n      Hubungi BAA atau Sysadmin untuk informasi lebih detail.\r\n      </b></p>";
    }
    echo "<table class=bsc cellspacing=1 width=100%>";
    echo "<tr>\r\n    <th class=ttl>#</th>\r\n    <th class=ttl>Kode MK</th>\r\n    <th class=ttl>Nama MK</th>\r\n    <th class=ttl>SKS</th>\r\n    <th class=ttl>Sesi</th>\r\n\t<th class=ttl>Lab?</th>\r\n    <th class=ttl>Kurikulum</th>\r\n    </tr>";
    while ($w = _fetch_array($r)) {
        $i++;
        $RencanaKehadiranDariProdi = GetaField('prodi', "KodeID='" . KodeID . "' and ProdiID", $_SESSION['ProdiID'], 'DefKehadiran');
        $RencanaKehadiran = empty($w[RencanaKehadiran]) ? "{$RencanaKehadiranDariProdi}" : "{$w['RencanaKehadiran']}";
        $MaxAbsenDariProdi = GetaField('prodi', "KodeID='" . KodeID . "' and ProdiID", $_SESSION['ProdiID'], 'DefMaxAbsen');
        $MaxAbsen = empty($w[MaxAbsen]) ? "{$MaxAbsenDariProdi}" : "{$w['MaxAbsen']}";
        echo <<<SCR
      <tr>
      <td class=inp width=20>{$i}</td>
      <td class=ul1 width=100>{$w['MKKode']}</td>
      <td class=ul1>
        <a href="javascript:
\t\t\t\t{$_SESSION['frm']}.MKID.value='{$w['MKID']}';
\t\t\t\t{$_SESSION['frm']}.MKKode.value='{$w['MKKode']}';
\t\t\t\t{$_SESSION['frm']}.MKNama.value='{$w['Nama']}';
\t\t\t\t{$_SESSION['frm']}.SKS.value='{$w['SKS']}';

/* fungsi ini dihilangkan
\t\t\tif('{$w['Responsi']}'=='Y') {$_SESSION['frm']}.AdaResponsi.checked=true; 
\t\t\t\t{$_SESSION['frm']}.RencanaKehadiran.value='{$RencanaKehadiran}'; 
\t\t\t\t{$_SESSION['frm']}.MaxAbsen.value='{$MaxAbsen}'; 
*/

\t\t\t\ttoggleBox('{$_SESSION['div']}', 0)">
\t\t\t\t\t{$w['Nama']}
\t\t</a>
      </td>
      <td class=ul1 width=10 align=right>{$w['SKS']}</td>
      <td class=ul1 width=10 align=right>{$w['Sesi']}</td>
\t  <td class=ul1 width=10 align=right>{$w['Responsi']}</td>
      <td class=ul1>{$w['KUR']}</td>
      </tr>
SCR;
    }
    echo "</table></p>";
}
コード例 #27
0
function ProsesMhswCuti0()
{
    TampilkanJudul("Proses...");
    $s = "select * from _mhswcuti order by TahunID, MhswID";
    $r = _query($s);
    $n = 0;
    $_SESSION['CUTI-JML'] = _num_rows($r);
    $_SESSION['CUTI-POS'] = 0;
    while ($w = _fetch_array($r)) {
        $n++;
        $_SESSION['CUTI-MhswID-' . $n] = $w['MhswID'];
        $_SESSION['CUTI-TahunID-' . $n] = $w['TahunID'];
        $_SESSION['CUTI-StatusMhswID-' . $n] = $w['StatusMhswID'];
    }
    echo "<IFRAME src='_proses_mhsw_cuti.php?gos=ProsesMhswCuti' width=90% height=80%></IFRAME>";
}
コード例 #28
0
ファイル: koreksikelas.php プロジェクト: anggadjava/sisfor
function TampilkanDaftarMhsw($jdwl)
{
    $s = "select k.KRSID, k.MhswID, m.Nama\r\n    from krs k\r\n      left outer join mhsw m on k.MhswID=m.MhswID\r\n    where k.JadwalID='{$jdwl['JadwalID']}'\r\n    order by k.MhswID";
    $r = _query($s);
    $n = 0;
    $jml = _num_rows($r) + 0;
    echo "<input type=hidden name='JmlMhsw' value={$jml}>";
    echo "<p><table class=box cellspacing=1 cellpadding=4>";
    $hdr = "<tr><th class=ttl>#</th>\r\n    <th class=ttl>N.P.M</th>\r\n    <th class=ttl>Nama</th>\r\n    <th class=ttl>Centang</th>\r\n    </tr>";
    echo $hdr;
    while ($w = _fetch_array($r)) {
        $n++;
        echo "<tr><td class=inp>{$n}</td>\r\n      <td class=ul>{$w['MhswID']}</td>\r\n      <td class=ul>{$w['Nama']}</td>\r\n      <td class=ul align=center><input type=checkbox id='KRSID_{$n}' name='KRSID_{$n}' value='{$w['KRSID']}' checked></td>\r\n      </tr>";
    }
    echo "</table></form>";
}
コード例 #29
0
function ProsesHitung()
{
    $s = "select KHSID, MhswID\r\n    from khs\r\n    where TahunID='{$_SESSION['tahun']}'\r\n      and ProdiID='{$_SESSION['prodi']}'\r\n    order by KHSID";
    $r = _query($s);
    $jml = _num_rows($r);
    $n = 0;
    echo "<hr><p>Jumlah data: <font size=+1>{$jml}</font></p>";
    while ($w = _fetch_array($r)) {
        $n++;
        $_SESSION['HTG-MhswID-' . $_SESSION['prodi'] . $n] = $w['MhswID'];
        $_SESSION['HTG-KHSID-' . $_SESSION['prodi'] . $n] = $w['KHSID'];
    }
    $_SESSION['HTG-Max-' . $_SESSION['prodi']] = $jml;
    $_SESSION['HTG-Pos-' . $_SESSION['prodi']] = 0;
    // IFRAME
    echo "<p><IFRAME src='_proseshitungkeumhsw.go.php?gos=prckeu' frameborder=0 height=400 width=300>\r\n  </IFRAME></p>";
}
コード例 #30
0
function ProsesHitung()
{
    $s = "select KHSID, MhswID\r\n    from khs\r\n    where TahunID='{$_SESSION['tahun']}'\r\n      and ProdiID='{$_SESSION['prodi']}'\r\n    order by KHSID";
    $r = _query($s);
    $jml = _num_rows($r);
    $n = 0;
    echo "<hr><p>Jumlah data: <font size=+1>{$jml}</font></p>";
    echo "<p><table class=box cellpadding=4 cellspacing=1>\r\n        <tr><th class=ttl>MHSWID</th><th class=ttl>Balance 20061</th><th class=ttl>Balance 20062</th>";
    while ($w = _fetch_array($r)) {
        $khs = GetFields('khs', 'tahunid', 20061, "Biaya , Bayar , Tarik , Potongan");
        $balance = $khs['Bayar'] - $khs['Biaya'] + $khs['Potongan'] - $khs['Tarik'];
        $bal = GetFields('bipotmhsw bm', 'tahunID = 20062 and MhswID', $w['MhswID'], "(bm.Jumlah * bm.Besar) as TOT,\r\n      format(bm.Jumlah * bm.Besar, 0) as TOTS,\r\n      format(bm.Dibayar, 0) as BYR, format(bm.Besar, 0) as BSR");
        $balance2 = $bal['TOT'] - $bal['BSR'];
        echo "<tr><td class=ul>{$w['MhswID']}</td><td class=ul>" . number_format($balance) . "</td><td class=ul>" . number_format($balance2) . "</td></tr>";
    }
    echo "</table></p>";
}