コード例 #1
0
        }
        if ($nmmk != $w['Nama']) {
            $nmmk = $w['Nama'];
            $_nmmk = $nmmk;
        } else {
            $_nmmk = '';
        }
        if ($n_ != $n2) {
            $n_ = $n2;
            $_n_ = $n_ . ".";
        } else {
            $_n_ = '';
        }
        $isi .= str_pad($_n_, 4) . str_pad($_kdmk, 8) . str_pad($_nmmk, 40) . str_pad($w['NamaKelas'], 6) . str_pad($w['Jumlah'], 22, ' ', STR_PAD_LEFT) . str_pad($w['JumlahMhsw'], 26, ' ', STR_PAD_LEFT) . $_lf;
    }
    fwrite($f, $isi);
    fwrite($f, $div);
    fwrite($f, str_pad("Hal. : " . $hal . '/' . $jumhal, $maxcol, ' ', STR_PAD_LEFT) . $_lf);
    fwrite($f, str_pad('Dicetak oleh : ' . $_SESSION['_Login'], 85, ' ') . str_pad('Dibuat : ' . date("d-m-Y H:i"), 29, ' '));
    fwrite($f, chr(12));
    fclose($f);
    echo "</table></p>";
}
$prodi = GetSetVar('prodi');
$prid = GetSetVar('prid');
$tahun = GetSetVar('tahun');
TampilkanJudul("Rekapitulasi Jumlah Mahasiswa Terdaftar KRS");
TampilkanTahunProdiProgram('akd.lap.rekapmhswkrs', 'daftar');
if (!empty($tahun) and !empty($prodi)) {
    daftar();
}
コード例 #2
0
function BuatTotal()
{
    $u = "select ProdiID, Nama from prodi where ProdiID not in ('11','99') order by prodiid desc";
    $ru = _query($u);
    $gab = array();
    $pec4 = array();
    BuatArrayHeader($hdr, $hdrid);
    for ($i = 0; $i < sizeof($hdr); $i++) {
        $gab[$i] = "<th class=ttl title='{$hdrid[$i]}'>{$hdr[$i]}</th>";
    }
    $_hdr = implode('', $gab);
    $idnya = Getafield('bipotnama', 'trxid', 1, 'Bipotnamaid');
    echo "<p><table class=box cellspacing=1 cellpadding=4><tr><th class=ttl width=150>Fakultas</th>{$_hdr}<th class=ttl>Total</th></tr>";
    while ($wu = _fetch_array($ru)) {
        daftar($wu['ProdiID'], $wu['Nama'], $hdrid, &$totl, &$totl_, &$gtot);
    }
    for ($k = 0; $k < sizeof($totl); $k++) {
        $pec4[$k] = "<td class=ttl tittle='{$n}' align=right>" . number_format($totl[$k] + $totl_[$k]) . "</td>";
    }
    $htot = implode('', $pec4);
    echo "<tr><td class=ttl>Jumlah Total</td>{$htot}<td class=ttl align=right>" . number_format($gtot) . "</td></tr>";
    echo "</table></p>";
}