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


PHP TampilkanFileDWOPRN函数代码示例

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


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

示例1: CetakKehadiranMhsw

function CetakKehadiranMhsw($mhsw)
{
    global $_lf;
    $s = "select pm.*, j.Kehadiran, j.JadwalSer, \n    j.MKKode, LEFT(j.Nama, 30) as NamaMK, j.NamaKelas, j.JenisJadwalID, j.SKS,\n    sum(pm.Nilai) as JML\n    from presensimhsw pm\n      left outer join jadwal j on pm.JadwalID=j.JadwalID\n    where pm.MhswID='{$mhsw['MhswID']}' and j.TahunID='{$_SESSION['tahun']}' \n    group by pm.JadwalID";
    $r = _query($s);
    // buat file
    $nmf = "tmp\\{$_SESSION['_Login']}.dwoprn";
    $f = fopen($nmf, 'w');
    // parameter
    $mxc = 114;
    $mxb = 60;
    $grs = str_pad('-', $mxc, '-') . $_lf;
    $thn = GetaField('tahun', "ProgramID='{$mhsw['ProgramID']}' and ProdiID='{$mhsw['ProdiID']}' and TahunID", $_SESSION['tahun'], 'Nama');
    $hdr = str_pad('*** Rekap Kehadiran per Mahasiswa ***', $mxc, ' ', STR_PAD_BOTH) . $_lf . "Tahun Akd : {$_SESSION['tahun']} - {$thn} " . $_lf . "Mahasiswa : {$mhsw['MhswID']} - {$mhsw['Nama']} " . $_lf . $grs . str_pad('No.', 4) . str_pad('Kode', 8) . str_pad('Matakuliah', 31) . str_pad('Kls', 4) . str_pad("Dosen", 6) . str_pad('  Hadir', 10) . $_lf . $grs;
    fwrite($f, $hdr);
    $n = 0;
    while ($w = _fetch_array($r)) {
        $n++;
        $persen = $w['Kehadiran'] == 0 ? 0 : $w['JML'] / $w['Kehadiran'] * 100;
        $Jen = $w['JenisJadwalID'] == 'R' ? "(R)" : '';
        $_persen = number_format($persen, 2);
        fwrite($f, str_pad($n . '.', 4) . str_pad($w['MKKode'], 8) . str_pad($w['NamaMK'] . $Jen, 31) . str_pad($w['NamaKelas'], 4) . str_pad($w['Kehadiran'] . ' X', 5, ' ', STR_PAD_LEFT) . str_pad($_persen . '%', 9, ' ', STR_PAD_LEFT) . $_lf);
        AmbilDetail($f, $mhsw, $w);
    }
    fwrite($f, $grs);
    fwrite($f, chr(12));
    fclose($f);
    TampilkanFileDWOPRN($nmf, 'lap.hadir.permhsw');
}
开发者ID:johnxth,项目名称:sisfoapp,代码行数:29,代码来源:lap.hadir.permhsw.php

示例2: DetailBIPOT

function DetailBIPOT()
{
    global $_lf;
    $bipotid = $_REQUEST['bipotid'];
    $bpt = GetFields('bipot', 'BIPOTID', $bipotid, '*');
    $prg = GetaField('program', 'ProgramID', $bpt['ProgramID'], 'Nama');
    $prd = GetaField('prodi', 'ProdiID', $bpt['ProdiID'], 'Nama');
    $nmf = HOME_FOLDER . DS . "tmp/{$_SESSION['_Login']}.bipot.dwoprn";
    $f = fopen($nmf, 'w');
    $mxc = 114;
    $grs = str_pad('-', $mxc, '-') . $_lf;
    $hdr = str_pad("Daftar Biaya & Potongan {$bpt['TahunID']}", $mxc, ' ', STR_PAD_BOTH) . $_lf . str_pad($bpt['Nama'], $mxc, ' ', STR_PAD_BOTH) . $_lf . str_pad("Program: {$prg}, Prodi: {$prd}", $mxc, ' ', STR_PAD_BOTH) . $_lf . $grs . "No. Prio " . str_pad("Nama", 30) . str_pad("Jumlah", 12, ' ', STR_PAD_LEFT) . ' ' . str_pad("Penarikan", 12) . str_pad("Oto?", 5) . ' ' . str_pad("St.Awal", 12) . ' ' . str_pad("St.Mhsw", 12) . ' ' . str_pad("Grade", 5) . ' ' . $_lf . $grs;
    $s = "select b2.*, bn.Nama, format(b2.Jumlah, 0) as JML,\r\n      t.Nama as NMTRX, s.Nama as SAAT\r\n      from bipot2 b2\r\n      left outer join bipotnama bn on b2.BIPOTNamaID=bn.BIPOTNamaID\r\n      left outer join saat s on b2.SaatID=s.SaatID\r\n      left outer join trx t on b2.TrxID=t.TrxID\r\n      where b2.BIPOTID='{$bipotid}' and KodeID='{$_SESSION['KodeID']}'\r\n      order by b2.TrxID, b2.Prioritas, b2.GradeNilai";
    $r = _query($s);
    $n = 0;
    fwrite($f, $hdr);
    while ($w = _fetch_array($r)) {
        $n++;
        $jml = number_format($w['Jumlah']);
        $sa = TRIM($w['StatusAwalID'], '.');
        $sa = str_replace('.', ',', $sa);
        $sm = TRIM($w['StatusMhswID'], '.');
        $sm = str_replace('.', ',', $sm);
        fwrite($f, str_pad($n, 4) . str_pad($w['Prioritas'], 5) . str_pad($w['Nama'], 30) . str_pad($jml, 12, ' ', STR_PAD_LEFT) . ' ' . str_pad($w['SAAT'], 12) . str_pad($w['Otomatis'], 5, ' ', STR_PAD_BOTH) . ' ' . str_pad($sa, 12) . ' ' . str_pad($sm, 12) . ' ' . str_pad($w['GradeNilai'], 5, ' ', STR_PAD_BOTH) . $_lf);
    }
    fwrite($f, $grs);
    fclose($f);
    TampilkanFileDWOPRN($nmf);
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:29,代码来源:bipot.cetak.php

示例3: Daftar

function Daftar()
{
    global $_lf, $arrID;
    if (!empty($_SESSION['pmbid']) && !empty($_SESSION['Cari'])) {
        $s = "select p.* \r\n      from pmb p\r\n      left outer join program prg on p.ProgramID=prg.ProgramID\r\n      left outer join prodi prd on p.ProdiID=prd.ProdiID\r\n      left outer join statusawal sa on p.StatusAwalID=sa.StatusAwalID\r\n      where p.{$_SESSION['Cari']} like '%{$_SESSION['pmbid']}%'\r\n      order by p.{$_SESSION['Cari']}";
        $r = _query($s);
        $maxcol = 114;
        $nmf = HOME_FOLDER . DS . "tmp/{$_SESSION['_Login']}.dwoprn";
        $f = fopen($nmf, 'w');
        fwrite($f, chr(27) . chr(15) . chr(27) . chr(108) . chr(14));
        $namatemplate = "template/form.undurdiri.txt";
        $ft = fopen($namatemplate, 'r');
        $tpl = fread($ft, filesize($namatemplate));
        fclose($ft);
        $mhsw = _fetch_array($r);
        //if ($mhsw['LulusUjian'] == 'Y') {
        $NamaFakJur = GetFields('prodi p left outer join fakultas f on f.FakultasID = p.FakultasID', "p.ProdiID", $mhsw['ProdiID'], "f.Nama as Fnama, p.Nama as Pnama");
        // Pakai template
        $_t = $tpl . chr(12);
        $_t = str_replace('#TGL#', date('d/m/Y'), $_t);
        $_t = str_replace('#NAMA#', $mhsw['Nama'], $_t);
        $_t = str_replace('#ALAMAT#', $mhsw['Alamat'], $_t);
        $_t = str_replace('#PMBID#', $mhsw['PMBID'], $_t);
        $_t = str_replace('#FAKJUR#', $NamaFakJur['Fnama'] . '/' . $NamaFakJur['Pnama'], $_t);
        $_t = str_replace('#PERIODE#', $mhsw['PMBPeriodID'] . "/" . $mhsw['TanggalUjian'], $_t);
        $_t = str_replace('#GRADE#', $mhsw['GradeNilai'], $_t);
        $_t = str_replace('#ORTU#', $mhsw['NamaAyah'], $_t);
        $_t = str_replace('#ALORTU#', $mhsw['AlamatOrtu'], $_t);
        fwrite($f, $_t);
        fwrite($f, $_lf . $_lf . "Dicetak tanggal : " . date("d-m-Y") . " ; Jam " . Date("H:i") . " Oleh " . $_SESSION['_Login']);
        fwrite($f, chr(12));
        fclose($f);
        TampilkanFileDWOPRN($nmf, "form.undurdiri");
    }
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:35,代码来源:form.undurdiri.php

示例4: CetakPindahan

function CetakPindahan()
{
    global $_lf;
    $s = "select mps.*, mk.Nama as NamaMK\r\n    from mhswpindahansetara mps\r\n    left outer join mk mk on mps.MKID=mk.MKID\r\n    where MhswPindahanID='{$_REQUEST['pin']}'\r\n    order by mps.SetaraKode";
    $r = _query($s);
    $maxcol = 135;
    $nmf = HOME_FOLDER . DS . "tmp/p.{$_SESSION['_Login']}.dwoprn";
    $f = fopen($nmf, 'w');
    fwrite($f, chr(27) . chr(15) . chr(27) . chr(108) . chr(20));
    $div = str_pad('-', $maxcol, '-') . $_lf;
    $n = 0;
    $hal = 0;
    $brs = 56;
    $maxbrs = 49;
    $dt = GetFields('mhswpindahan', 'MhswPindahanID', $_REQUEST['pin'], "Nama");
    $prd = GetaField('prodi', 'ProdiID', $_REQUEST['prodi'], 'Nama');
    $hdr = str_pad('*** DAFTAR PENYETARAAN MATA KULIAH PINDAHAN **', $maxcol, ' ', STR_PAD_BOTH) . $_lf . $_lf . $_lf;
    $hdr .= "Tahun Akademik : " . NamaTahun($_REQUEST['tahun']) . $_lf;
    $hdr .= "Prodi          : {$prd}" . $_lf;
    $hdr .= "Mahasiswa      : {$dt['Nama']}" . $_lf;
    $hdr .= $div;
    $hdr .= str_pad("NO", 5) . str_pad("KODE", 10) . str_pad("MATA KULIAH", 35) . str_pad('SKS', 6) . str_pad('NILAI', 6) . str_pad('GRADE', 6) . str_pad('>>>', 5) . str_pad("KODE", 8) . str_pad("MATA KULIAH", 40) . str_pad('SKS', 6) . str_pad('GRADE', 4) . $_lf;
    $hdr .= $div;
    fwrite($f, $hdr);
    while ($w = _fetch_array($r)) {
        $n++;
        fwrite($f, str_pad($n, 5) . str_pad($w['SetaraKode'], 10) . str_pad($w['SetaraNama'], 37) . str_pad($w['SetaraSKS'], 5) . str_pad($w['NilaiAkhir'], 7) . str_pad($w['SetaraGrade'], 4) . str_pad('>>>>', 5) . str_pad($w['MKKode'], 8) . str_pad($w['NamaMK'], 40) . str_pad($w['SKS'], 8) . str_pad($w['GradeNilai'], 4) . $_lf);
    }
    fwrite($f, $div);
    fwrite($f, $_lf . "Dicetak Oleh : " . $_SESSION['_Login'] . ', ' . Date("d-m-Y H:i"));
    fwrite($f, chr(12));
    fclose($f);
    TampilkanFileDWOPRN($nmf);
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:34,代码来源:pindahan.setara.cetak.php

示例5: ProsesIPK

function ProsesIPK()
{
    global $_lf;
    // Ambil data mahasiswa
    $s = "select m.MhswID\r\n    from mhsw m\r\n      left outer join statusmhsw sm on m.StatusMhswID=sm.StatusMhswID\r\n    where sm.Keluar='N'\r\n      and m.ProgramID='{$_REQUEST['prid']}'\r\n      and m.ProdiID='{$_REQUEST['prodi']}'\r\n    order by m.MhswID";
    $r = _query($s);
    $div = str_pad('-', 79, '-') . $_lf;
    // Buat file
    $nmf = HOME_FOLDER . DS . "tmp/prcipkbatch.dwoprn";
    $f = fopen($nmf, 'w');
    fwrite($f, "Proses Batch IPK: " . date('d-m-Y') . $_lf);
    fwrite($f, "Program: {$_REQUEST['prid']}, Program Studi: {$_REQUEST['prodi']}" . $_lf . $div);
    // Mulai proses
    $jmlMhsw = 0;
    while ($w = _fetch_array($r)) {
        $jmlMhsw++;
        $hsl = ProsesIndividu($w['MhswID']);
        $isi = $jmlMhsw . '. ' . $w['MhswID'] . ' : ' . $hsl . $_lf;
        fwrite($f, $isi);
    }
    fwrite($f, $div);
    fwrite($f, "Selesai proses. Jumlah diproses: {$jmlMhsw} Mahasiswa");
    // Tutup file
    fclose($f);
    TampilkanFileDWOPRN($nmf);
}
开发者ID:anggadjava,项目名称:sisfor,代码行数:26,代码来源:prc.ipk.batch.x.php

示例6: Cetak

function Cetak()
{
    $_lf = chr(13) . chr(10);
    $id = $_REQUEST['id'];
    $jdwl = GetFields("jadwal j\r\n    left outer join dosen d on j.DosenID=d.Login", "j.JadwalID", $id, "j.*, concat(d.Nama, ', ', d.Gelar) as DSN");
    $_prodi = TRIM($jdwl['ProdiID'], '.');
    $_prodi = explode('.', $_prodi);
    $_prodi = $_prodi[0];
    $prodi = GetFields('prodi', 'ProdiID', $_prodi, "ProdiID, Nama, FakultasID");
    $fak = GetaField('fakultas', 'FakultasID', $prodi['FakultasID'], 'Nama');
    $nmf = "tmp/{$_SESSION['_Login']}.jdwl.php";
    $f = fopen($nmf, 'w');
    fwrite($f, chr(27) . chr(15));
    fwrite($f, chr(27) . chr(108) . chr(5));
    $mxc = 135;
    $mxb = 21;
    $grs = str_pad("-", $mxc, "-") . $_lf;
    $s = "select k.MhswID, left(m.Nama, 31) as Nama\r\n    from krs k\r\n      left outer join mhsw m on k.MhswID=m.MhswID\r\n      left outer join khs khs on k.KHSID=khs.KHSID\r\n    where k.JadwalID={$id}\r\n    order by k.MhswID";
    $r = _query($s);
    //echo "<pre>$r</pre>";
    //exit;
    $n = 0;
    $brs = 0;
    $hal = 1;
    $satu = Garis(12, '-');
    $dua = Garis(12);
    $header0 = str_pad('** Daftar Penilaian Portofolio & Performance ***', $mxc, ' ', STR_PAD_BOTH) . $_lf;
    $header = $grs . str_pad(' ', 50, ' ') . GarisHeader(12) . $_lf . str_pad(' ', 50, ' ') . $satu . $_lf . str_pad("No.  N.P.M        Nama Mahasiswa ", 50, ' ') . Kosong(12) . str_pad('=', 50, '=') . Garis(12, '=') . $_lf;
    fwrite($f, $header0);
    $header1 = BuatHeader($mxc, $jdwl, $prodi, $fak, $hal);
    fwrite($f, $header1);
    fwrite($f, $header);
    while ($w = _fetch_array($r)) {
        $n++;
        $brs++;
        if ($brs >= $mxb) {
            $hal++;
            $brs = 1;
            fwrite($f, "Dicetak oleh: {$_SESSION['_Login']}");
            fwrite($f, chr(12));
            fwrite($f, $header0);
            fwrite($f, BuatHeader($mxc, $jdwl, $prodi, $fak, $hal));
            fwrite($f, $header1);
            fwrite($f, $header);
        }
        fwrite($f, str_pad($n, 5) . str_pad($w['MhswID'], 13) . str_pad($w['Nama'], 32) . $dua . $_lf);
        fwrite($f, str_pad('-', 50, '-') . $satu . $_lf);
    }
    fwrite($f, str_pad("Akhir cetakan", $mxc, ' ', STR_PAD_LEFT) . $_lf);
    for ($i = $brs; $i <= $mxb; $i++) {
        fwrite($f, $_lf . $_lf);
    }
    fwrite($f, "Dicetak oleh: {$_SESSION['_Login']}");
    fwrite($f, chr(12));
    fclose($f);
    TampilkanFileDWOPRN($nmf);
}
开发者ID:anggadjava,项目名称:sisfor,代码行数:57,代码来源:akd.lap.portoperformance.go.php

示例7: Daftar

function Daftar()
{
    global $_lf;
    if (empty($_SESSION['prodi'])) {
        $__prodi = '';
    } else {
        $__prodi = "and prd.ProdiID = '{$_SESSION['prodi']}'";
    }
    $__prg = empty($_SESSION['prid']) ? '' : "and prg.ProgramID = '{$_SESSION['prid']}'";
    $s = "select p.PMBID, p.Nama, p.NIM, p.ProdiID, p.LulusUjian, p.NilaiUjian,\r\n      prg.Nama as PRG, prd.Nama as PRODI, sa.Nama as STT, sa.TanpaTest,\r\n      bp.Nama as BPT\r\n      from pmb p\r\n      left outer join program prg on p.ProgramID=prg.ProgramID\r\n      left outer join prodi prd on p.ProdiID=prd.ProdiID\r\n      left outer join statusawal sa on p.StatusAwalID=sa.StatusAwalID\r\n      left outer join bipot bp on p.BIPOTID=bp.BIPOTID\r\n      where p.PMBPeriodID like '%{$_SESSION['tahun']}%' and p.NIM <> 0 {$__prodi} {$__prg}\r\n      order by prd.ProdiID, p.NIM";
    $r = _query($s);
    $maxcol = 90;
    $maxbrs = 53;
    $hal = 0;
    $brs = 54;
    $first = 1;
    $nmf = HOME_FOLDER . DS . "tmp/{$_SESSION['_Login']}.dwoprn";
    $f = fopen($nmf, 'w');
    fwrite($f, chr(27) . chr(15) . chr(27) . chr(108) . chr(10));
    $div = str_pad('-', $maxcol, '-') . $_lf;
    $n = 0;
    while ($w = _fetch_array($r)) {
        $_prodi = GetaField('prodi', 'ProdiID', $w['ProdiID'], 'Nama');
        $n++;
        $brs++;
        if ($brs > $maxbrs) {
            if ($first == 0) {
                fwrite($f, $div . chr(12));
            }
            $hd = Headerxx($_SESSION['tahun'], $_prodi, $div, $maxcol, $hal);
            fwrite($f, $hd);
            $brs = 0;
            $first = 0;
            $prodi = $w['ProdiID'];
        } elseif ($prodi != $w['ProdiID']) {
            $prodi = $w['ProdiID'];
            if ($first == 0) {
                fwrite($f, $div);
            }
            fwrite($f, chr(12));
            fwrite($f, Headerxx($_SESSION['tahun'], $_prodi, $div, $maxcol, $hal));
            $brs = 0;
            $n = 1;
        }
        $isi = str_pad($n . '.', 5) . str_pad($w['PMBID'], 12) . str_pad($w['NIM'], 12) . str_pad($w['Nama'], 35) . str_pad($w['PRG'], 12) . str_pad($w['STT'], 10) . $_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 : " . date("d-m-Y H:i"), 70, ' ', STR_PAD_LEFT) . $_lf . $_lf);
    fwrite($f, str_pad("Akhir laporan", 90, ' ', STR_PAD_LEFT));
    fwrite($f, chr(12));
    fclose($f);
    TampilkanFileDWOPRN($nmf, "baa.lap");
}
开发者ID:anggadjava,项目名称:sisfor,代码行数:55,代码来源:baa.lap.jumlahmhswnim.php

示例8: Cetak

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);
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:55,代码来源:jadwal.cetak.mhsw.php

示例9: daftar

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");
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:54,代码来源:dosen.cetak.php

示例10: CetakTandaTerima

function CetakTandaTerima()
{
    global $_lf;
    $_whr = array();
    if (!empty($_SESSION['prodi'])) {
        $_whr[] = "m.ProdiID='{$_SESSION['prodi']}'";
    }
    $whr = empty($_whr) ? '' : " and " . implode(' and ', $_whr);
    $s = "select ta.MhswID, m.*\r\n    from ta ta\r\n      left outer join mhsw m on m.MhswID = ta.MhswID\r\n      left outer join prodi p on m.ProdiID=p.ProdiID \r\n      left outer join wisudawan w on w.MhswID = ta.MhswID\r\n    where m.KodeID='{$_SESSION['KodeID']}'\r\n    and m.noijazah != ' '\r\n    and m.TglSKKeluar = '{$_SESSION['TglSK']}'\r\n    and ta.Lulus = 'Y'\r\n    {$whr}\r\n    order by ta.MhswID";
    $r = _query($s);
    $maxcol = 114;
    $nmf = HOME_FOLDER . DS . "tmp/{$_SESSION['_Login']}.dwoprn";
    $f = fopen($nmf, 'w');
    $prn = $_SESSION['_Printer'] == 0 ? chr(27) . chr(15) . chr(27) . chr(108) . chr(5) : chr(27) . chr(38) . chr(107) . chr(50) . chr(83) . chr(27) . chr(38) . chr(108) . chr(54) . chr(68) . chr(27) . chr(40) . chr(115) . chr(51) . chr(66);
    fwrite($f, $prn);
    $div = str_pad('-', $maxcol, '-') . $_lf;
    // parameter2
    $n = 0;
    $hal = 1;
    $brs = 0;
    $maxbrs = 46;
    $Njur = GetFields("prodi p left outer join Fakultas f on f.FakultasID = p.FakultasID", "p.ProdiID", $_SESSION['prodi'], "p.Nama as pnama, f.Nama as fnama");
    $NamaFakJur = !empty($Njur) ? $Njur['fnama'] . '/' . $Njur['pnama'] : "Semua Prodi";
    $hdr = str_pad("** TANDA TERIMA PENGAMBILAN IJAZAH **", $maxcol, ' ', STR_PAD_BOTH) . $_lf . $_lf . $_lf . "SEMESTER       : " . NamaTahun($_SESSION['tahun']) . $_lf . "Fak/Jur        : " . $NamaFakJur . $_lf . "TGL SK REKTOR  : " . $_SESSION['TglSK'] . $_lf . $div . "No   NIM       NAMA                             NO.IJAZAH      TGL.TERIMA    TTD IJAZAH    TTD TRANSKRIP" . $_lf . $div . $_lf;
    $jump = 0;
    $jumw = 0;
    $Titik = "...........";
    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 . '.', 4, ' ') . str_pad($w['MhswID'], 11, ' ') . str_pad($w['Nama'], 33, ' ') . str_pad($w['NoIjazah'], 15, ' ') . str_pad($Titik, 14, ' ') . str_pad($Titik, 15, ' ') . str_pad($Titik, 13, ' ') . $_lf . $_lf;
        fwrite($f, $isi);
    }
    //$jumtotP = GetaField('wisudawan w left outer join mhsw m on w.MhswID = m.MhswID',"m.Kelamin = 'P' and WisudaID", $wsd['WisudaID'], "count(m.MhswID)");
    //$jumtotW = GetaField('wisudawan w left outer join mhsw m on w.MhswID = m.MhswID',"m.Kelamin = 'W' and WisudaID", $wsd['WisudaID'], "count(m.MhswID)");
    fwrite($f, $div);
    // fwrite($f, "Jumlah Seluruh Peserta/Jurusan : - Pria = $jump  - Wanita = $jumw" . $_lf);
    //fwrite($f, $div);
    //fwrite($f, "Jumlah Seluruh Peserta Seluruhnya : - Pria = $jumtotP  - Wanita = $jumtotW" . $_lf);
    //fwrite($f, $div);
    fwrite($f, str_pad("Dicetak oleh : {$_SESSION['_Login']}, " . date("d-m-Y H:i"), 50, ' ') . str_pad("Akhir Laporan", 60, ' ', STR_PAD_LEFT));
    fwrite($f, chr(12));
    fclose($f);
    TampilkanFileDWOPRN($nmf, "form.tandaterima");
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:54,代码来源:form.tandaterima2.php

示例11: TampilkanDeposit

function TampilkanDeposit()
{
    global $_lf;
    $mxb = 55;
    $mxc = 112;
    $grs = str_pad('-', $mxc, '-') . $_lf;
    $DariTanggal = FormatTanggal($_SESSION['DTGL']);
    $SampaiTanggal = FormatTanggal($_SESSION['STGL']);
    $hdr = str_pad("Daftar Deposit Mahasiswa", $mxc, ' ', STR_PAD_BOTH) . $_lf . str_pad("Periode: {$DariTanggal} sampai {$SampaiTanggal}", $mxc, ' ', STR_PAD_BOTH) . $_lf . $grs . str_pad('No.', 5) . str_pad('Tanggal', 12) . str_pad('N.P.M', 15) . str_pad('Nama Mahasiswa', 30) . str_pad('Jumlah', 15, ' ', STR_PAD_LEFT) . str_pad('Dipakai', 15, ' ', STR_PAD_LEFT) . str_pad('Sisa', 15, ' ', STR_PAD_LEFT) . $_lf . $grs;
    // Query
    $s = "select dm.DepositMhswID, dm.Tanggal, dm.MhswID,\r\n    dm.Jumlah, dm.Dipakai, (dm.Jumlah - dm.Dipakai) as Sisa, dm.Tutup,\r\n    LEFT(m.Nama, 29) as Nama, m.ProdiID\r\n    from depositmhsw dm\r\n      left outer join mhsw m on dm.MhswID=m.MhswID\r\n    where '{$_SESSION['DTGL']}' <= dm.Tanggal and dm.Tanggal <= '{$_SESSION['STGL']}'\r\n    order by dm.Tanggal";
    $r = _query($s);
    $n = 0;
    $b = 0;
    $nmf = HOME_FOLDER . DS . "tmp/{$_SESSION['_Login']}.dwoprn";
    $f = fopen($nmf, 'w');
    fwrite($f, $hdr);
    $_Jumlah = 0;
    $_Dipakai = 0;
    $_Sisa = 0;
    while ($w = _fetch_array($r)) {
        $n++;
        $b++;
        if ($b >= $mxb) {
            $mxb = 0;
            fwrite($f, $grs . chr(12));
            fwrite($f, $hdr);
        }
        $TGL = FormatTanggal($w['Tanggal']);
        // Jumlahkan
        $_Jumlah += $w['Jumlah'];
        $_Dipakai += $w['Dipakai'];
        $_Sisa += $w['Sisa'];
        // Format tampilan
        $Jumlah = number_format($w['Jumlah']);
        $Dipakai = number_format($w['Dipakai']);
        $Sisa = number_format($w['Sisa']);
        $Tutup = $w['Sisa'] == 0 ? chr(215) : '';
        fwrite($f, str_pad($n, 5) . str_pad($TGL, 12) . str_pad($w['MhswID'], 15) . str_pad($w['Nama'], 30) . str_pad($Jumlah, 15, ' ', STR_PAD_LEFT) . str_pad($Dipakai, 15, ' ', STR_PAD_LEFT) . str_pad($Sisa, 15, ' ', STR_PAD_LEFT) . str_pad($Tutup, 4, ' ', STR_PAD_LEFT) . $_lf);
    }
    $__Jumlah = number_format($_Jumlah);
    $__Dipakai = number_format($_Dipakai);
    $__Sisa = number_format($_Sisa);
    fwrite($f, $grs);
    fwrite($f, str_pad("Jumlah : ", 62, ' ', STR_PAD_LEFT) . str_pad($__Jumlah, 15, ' ', STR_PAD_LEFT) . str_pad($__Dipakai, 15, ' ', STR_PAD_LEFT) . str_pad($__Sisa, 15, ' ', STR_PAD_LEFT) . $_lf);
    fclose($f);
    TampilkanFileDWOPRN($nmf, 'klinik.lap');
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:48,代码来源:klinik.lap.deposit.php

示例12: DaftarMhswTA

function DaftarMhswTA()
{
    global $_lf;
    $whr = array();
    if (!empty($_SESSION['prodi'])) {
        $whr[] = "m.ProdiID='{$_SESSION['prodi']}' ";
    }
    if (!empty($_SESSION['DariNPM']) && !empty($_SESSION['SampaiNPM'])) {
        $whr[] = "'{$_SESSION['DariNPM']}' <= k.MhswID and k.MhswID <= '{$_SESSION['SampaiNPM']}' ";
    }
    $_whr = empty($whr) ? '' : 'and ' . implode(' and ', $whr);
    $s = "select k.MhswID, k.MKKode, LEFT(m.Nama, 30) as Nama,\r\n    khs.JumlahMK, khs.TotalSKS,\r\n    khs.Biaya, khs.Bayar, khs.Tarik, khs.Potongan, khs.JumlahLain\r\n    from krs k\r\n      left outer join mk mk on k.MKID=mk.MKID\r\n      left outer join jenispilihan jp on mk.JenisPilihanID=jp.JenisPilihanID\r\n      left outer join mhsw m on k.MhswID=m.MhswID\r\n      left outer join khs khs on k.KHSID=khs.KHSID\r\n    where jp.TA='Y' and k.TahunID='{$_SESSION['tahun']}' and khs.JumlahMK=1\r\n      {$_whr}\r\n    order by k.MhswID";
    $r = _query($s);
    $nmf = "tmp/{$_SESSION['_Login']}.dwoprn";
    $f = fopen($nmf, 'w');
    fwrite($f, chr(27) . chr(15));
    // Buat header
    $mxc = 80;
    $mxb = 50;
    $_prd = empty($_SESSION['prodi']) ? "Semua" : GetaField('prodi', "ProdiID", $_SESSION['prodi'], "concat(ProdiID, ' - ', Nama)");
    $grs = str_pad('-', $mxc, '-') . $_lf;
    $hdr = str_pad("** Daftar Mhsw Yang Hanya Ambil Skripsi/TA **", $mxc, ' ', STR_PAD_BOTH) . $_lf . str_pad("Tahun Akd : " . $_SESSION['tahun'], $mxc / 2) . $_lf . str_pad("Prodi     : " . $_prd, $mxc / 2) . $_lf;
    $hdr1 = $grs . str_pad('No', 5) . str_pad('N.P.M', 12) . str_pad('Nama Mhsw', 30) . str_pad('Kode MK', 8) . 'Jml MK' . str_pad('SKS', 4, ' ', STR_PAD_LEFT) . str_pad('Balance', 15, ' ', STR_PAD_LEFT) . $_lf . $grs;
    $n = 0;
    $b = 0;
    fwrite($f, $hdr . $hdr1);
    while ($w = _fetch_array($r)) {
        $n++;
        if ($b >= $mxb) {
            fwrite($f, $grs . chr(12));
            fwrite($f, $hdr . $hdr1);
            $b = 0;
        }
        $b++;
        $_bal = $w['Biaya'] - $w['Potongan'] + $w['Tarikan'] - $w['Bayar'];
        $bal = number_format($_bal);
        fwrite($f, str_pad($n, 5) . str_pad($w['MhswID'], 12) . str_pad($w['Nama'], 30) . str_pad($w['MKKode'], 10) . str_pad($w['JumlahMK'], 4, ' ', STR_PAD_LEFT) . str_pad($w['TotalSKS'], 4, ' ', STR_PAD_LEFT) . str_pad($bal, 15, ' ', STR_PAD_LEFT) . $_lf);
    }
    fwrite($f, $grs);
    $tgl = date('d-m-Y');
    fwrite($f, "Dicetak oleh: {$_SESSION['_Login']}, {$tgl}" . $_lf);
    fwrite($f, chr(12));
    fclose($f);
    TampilkanFileDWOPRN($nmf, 'akd.lap');
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:45,代码来源:akd.lap.mhswta.php

示例13: CetakLabelMHSW

function CetakLabelMHSW()
{
    global $_lf, $_HeaderPrn;
    $tahun = $_REQUEST['tahun'];
    $darinpm = $_REQUEST['DariNPM'];
    $sampainpm = $_REQUEST['SampaiNPM'];
    $alamat = $_REQUEST['alamat'] + 0;
    $labelmhsw = HOME_FOLDER . DS . "tmp/labelmhswt.dwoprn";
    $mrg = str_pad(' ', 5, ' ');
    $Aktif = $darinpm == $sampainpm ? "" : "and k.StatusMhswID = 'A'";
    $s = "select m.MhswID, m.Nama, m.Alamat, m.AlamatAsal, m.Kota, m.KodePos\r\n\t     from mhsw m left outer join khs k on k.MhswID = m.MhswID\r\n    where ('{$darinpm}' <= m.MhswID)\r\n      and (m.MhswID <= '{$sampainpm}') \r\n      and k.TahunID = '{$tahun}' {$aktif}";
    $r = _query($s);
    //echo "<pre>$s</pre>";
    //exit;
    $f = fopen($labelmhsw, 'w');
    $n = 0;
    fwrite($f, $_HeaderPrn);
    while ($w = _fetch_array($r)) {
        $Alamat = empty($w['Alamat']) ? $w['AlamatAsal'] : $w['Alamat'];
        $Kota = empty($w['Kota']) ? $w['KotaAsal'] : $w['Kota'];
        $KodePos = empty($w['KodePos']) ? $w['KodePosAsal'] : $w['KodePos'];
        if ($alamat == 1) {
            fwrite($f, chr(27) . chr(15));
            fwrite($f, $mrg . $w['Nama'] . ' ' . $w['MhswID'] . $_lf);
            fwrite($f, $mrg . $Alamat . $_lf);
            fwrite($f, $mrg . $Kota . ' /' . $KodePos . $_lf);
            fwrite($f, chr(27) . chr(18));
            fwrite($f, $_HeaderPrn);
            fwrite($f, $_lf . $_lf . $_lf . $_lf . $_lf . $_lf);
        } else {
            fwrite($f, chr(27) . chr(15));
            fwrite($f, $mrg . $w['Nama'] . ' ' . $w['MhswID'] . $_lf);
            fwrite($f, chr(27) . chr(18));
            fwrite($f, $_HeaderPrn);
            fwrite($f, $_lf . $_lf);
        }
    }
    fwrite($f, chr(27) . chr(18) . chr(67) . chr(66));
    fclose($f);
    TampilkanFileDWOPRN($labelmhsw, "cetak.label");
    //include_once "dwoprn.php";
    //DownloadDWOPRN($labelmhsw);
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:43,代码来源:cetak.label.mhsw.php

示例14: Daftar

function Daftar()
{
    global $_lf;
    if (!empty($_SESSION['DariNPM'])) {
        $_SESSION['SampaiNPM'] = empty($_SESSION['SampaiNPM']) ? $_SESSION['DariNPM'] : $_SESSION['SampaiNPM'];
        $_npm = "and '{$_SESSION['DariNPM']}' <= m.MhswID and m.MhswID <= '{$_SESSION['SampaiNPM']}' ";
    } else {
        $_npm = '';
    }
    $prd = empty($_SESSION['prodi']) ? '' : "and m.ProdiID = '{$_SESSION['prodi']}'";
    $s = "select m.* from mhsw m \r\n        where m.StatusMhswID = '{$_SESSION['status']}' {$prd} {$_npm} ";
    $r = _query($s);
    $nmf = "tmp/{$_SESSION['_Login']}.dwoprn";
    $f = fopen($nmf, 'w');
    fwrite($f, chr(27) . chr(15) . chr(27) . chr(77));
    // parameter
    $mxc = 160;
    $mxb = 50;
    $brs = 1;
    $grs = str_pad('-', $mxc, '-') . $_lf;
    $n = 0;
    $NamJur = GetaField('prodi', "ProdiID", $_SESSION['prodi'], "Nama");
    $NamaJudul = $_SESSION['status'] == 'D' ? "Drop Out (DO)" : "Keluar";
    $hdr = str_pad("** Daftar Mahasiswa {$NamaJudul}", $mxc, ' ', STR_PAD_BOTH) . $_lf . $_lf . "SEMESTER         : " . NamaTahun($_SESSION['tahun']) . $_lf . "JURUSAN          : " . $NamJur . $_lf . $grs . "No.   NIM         NAMA                                        NO SK                 TANGGAL SK     CATATAN" . $_lf . $grs;
    fwrite($f, $hdr);
    while ($w = _fetch_array($r)) {
        $n++;
        $brs++;
        if ($brs >= $mxb) {
            $brs = 0;
            fwrite($f, str_pad("Bersambung...", $mxc, ' ', STR_PAD_LEFT) . $_lf);
            fwrite($f, chr(12));
            fwrite($f, $hdr);
        }
        $isi = str_pad($n . '. ', 4) . str_pad($w['MhswID'], 10) . str_pad($w['Nama'], 40) . str_pad($w['SKKeluar'], 30) . str_pad($w['TglSKKeluar'], 15) . str_pad($w['CatatanKeluar'], 30) . $_lf;
        fwrite($f, $isi);
    }
    fwrite($f, $grs);
    fwrite($f, str_pad("Dicetak Oleh : {$_SESSION['_Login']}, " . date("d-m-Y H:i"), 60) . str_pad("Akhir Laporan", 100));
    fwrite($f, chr(12));
    fclose($f);
    TampilkanFileDWOPRN($nmf, 'akd.lap', 0);
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:43,代码来源:akd.lap.mhswdokeluar.php

示例15: DaftarDosenAktif

function DaftarDosenAktif()
{
    global $_lf;
    $mxc = 80;
    $hal = 1;
    $mxb = 55;
    $grs = str_pad('=', $mxc, '=') . $_lf;
    $NamaProdi = empty($_SESSION['prodi']) ? "Semua" : GetaField('prodi', 'ProdiID', $_SESSION['prodi'], 'Nama');
    $hdr = str_pad("Daftar Dosen : Tahun {$_SESSION['tahun']}", $mxc, ' ', STR_PAD_BOTH) . $_lf . str_pad("Program Studi: {$NamaProdi}", $mxc, ' ', STR_PAD_BOTH) . $_lf . $grs . str_pad('No.', 5) . str_pad('Kode', 10) . str_pad('Nama Dosen', 44) . str_pad('Status', 10) . $_lf . $grs;
    $nmf = "tmp/{$_SESSION['_Login']}.dwoprn";
    $f = fopen($nmf, 'w');
    fwrite($f, chr(27) . chr(15));
    $whrprd = empty($_SESSION['prodi']) ? '' : "and INSTR(j.ProdiID, '.{$_SESSION['prodi']}.') > 0";
    $status = empty($_SESSION['statusdosen']) ? '' : "and d.StatusDosenID = '{$_SESSION['statusdosen']}'";
    $s = "select d.Login, concat(d.Nama, ', ', d.Gelar) as DSN, sd.Nama as STTDSN\r\n    from jadwal j\r\n      left outer join dosen d on j.DosenID=d.Login\r\n      left outer join statusdosen sd on d.StatusDosenID=sd.StatusDosenID\r\n    where j.NamaKelas<>'KLINIK' {$whrprd} {$status}\r\n    group by d.Login";
    $r = _query($s);
    $n = 0;
    $brs = 0;
    fwrite($f, $hdr);
    $jumlahrec = _num_rows($r);
    $jumhal = ceil($jumlahrec / $mxb);
    while ($w = _fetch_array($r)) {
        $brs++;
        $n++;
        if ($brs > $mxb) {
            $brs = 0;
            $hal++;
            fwrite($f, $grs);
            fwrite($f, str_pad('Halaman : ' . $hal . "/" . $jumhal, 10, ' ') . $_lf);
            fwrite($f, chr(12));
            fwrite($f, $hdr);
        }
        fwrite($f, str_pad($n, 5) . str_pad($w['Login'], 10) . str_pad($w['DSN'], 44) . str_pad($w['STTDSN'], 10) . $_lf);
    }
    fwrite($f, $grs);
    $_n = number_format($n);
    fwrite($f, "Jumlah dosen: {$_n} orang" . $_lf);
    fwrite($f, str_pad('Halaman : ' . $hal . "/" . $jumhal, 10, ' ') . $_lf);
    fwrite($f, chr(12));
    fclose($f);
    TampilkanFileDWOPRN($nmf, 'akd.lap');
}
开发者ID:anggadjava,项目名称:mitra_siakad,代码行数:42,代码来源:lapakd.dosenaktif.php


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