本文整理匯總了PHP中NamaTahun函數的典型用法代碼示例。如果您正苦於以下問題:PHP NamaTahun函數的具體用法?PHP NamaTahun怎麽用?PHP NamaTahun使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了NamaTahun函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: BuatHeader
function BuatHeader($TahunID, $ProdiID, $p)
{
global $lbr;
$NamaTahun = NamaTahun($TahunID);
$NamaProdi = GetaField('prodi', "KodeID = '" . KodeID . "' and ProdiID", $ProdiID, 'Nama');
$p->SetFont('Helvetica', 'B', 12);
$p->Cell($lbr, 6, "Rekap Kehadiran Kuliah - {$NamaTahun}", 0, 1, 'C');
$p->SetFont('Helvetica', 'I', 10);
$p->Cell($lbr, 6, "Program Studi {$NamaProdi}", 0, 1, 'C');
}
示例2: 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");
}
示例3: HeaderKrs
function HeaderKrs($tahun, $_prid, $_prodi, $div, $maxcol, &$hal, $RentangNPM = '')
{
global $_lf;
$hdr = str_pad("*** Daftar KRS Mahasiswa Dispensasi ***", $maxcol, ' ', STR_PAD_BOTH) . $_lf;
$hdr .= str_pad("Program : {$_prid}", $maxcol, ' ') . $_lf;
$hdr .= str_pad("Program Studi : {$_prodi}", $maxcol, ' ') . $_lf;
$hdr .= str_pad("Semester : " . NamaTahun($_SESSION['tahun']), 50, ' ') . $_lf . $RentangNPM . $_lf . $div;
$hdr .= "No. NPM NAMA Kode Nama Matakuliah SKS TGL DISPEN CATATAN DISPEN " . $_lf;
$hdr .= $div;
return $hdr;
}
示例4: Headerxx
function Headerxx($tahun, $prodi, $div, $maxcol, &$hal)
{
global $_lf;
$hal++;
$hdr = str_pad('*** REKAPITULASI TAGIHAN KRS - AUTODEBET **', $maxcol, ' ', STR_PAD_BOTH) . $_lf . $_lf . $_lf;
$hdr .= "Tahun Akademik : " . NamaTahun($tahun) . $_lf;
$hdr .= "Prodi : {$prodi}" . str_pad('Halaman : ' . $hal, 42, ' ', STR_PAD_LEFT) . $_lf;
$hdr .= $div;
$hdr .= str_pad("NO", 6) . str_pad("NIM", 12) . str_pad("NAMA", 35) . str_pad('PRG ', 3) . str_pad(" TAGIH", 12) . $_lf;
$hdr .= $div;
return $hdr;
}
示例5: HeaderKRS
function HeaderKRS($tahun, $_prid, $_prodi, $div, $maxcol, &$hal, $RentangNPM = '')
{
global $_lf;
$RentangNPM = !empty($RentangNPM) ? $RentangNPM . $_lf : '';
$hdr = str_pad("** Daftar Mahasiswa Terdaftar KRS " . NamaTahun($_SESSION['tahun']) . " Tidak Cetak KSS **", $maxcol, ' ', STR_PAD_BOTH) . $_lf . $_lf;
$hdr .= "Program : {$_prid}" . $_lf;
$hdr .= "Prodi : {$_prodi}" . $_lf;
$hdr .= $RentangNPM;
$hdr .= $div;
$hdr .= "No. NPM Nama Ambil SKS IPK Batas Studi" . $_lf . $div;
return $hdr;
}
示例6: HeaderKrs
function HeaderKrs($tahun, $_prid, $_prodi, $div, $maxcol, &$hal, $RentangNPM = '')
{
global $_lf;
$hal++;
$hdr = str_pad("*** Daftar KRS Mahasiswa ***", $maxcol, ' ', STR_PAD_BOTH) . $_lf;
$hdr .= str_pad("Program : {$_prid}", $maxcol, ' ') . $_lf;
$hdr .= str_pad("Program Studi : {$_prodi}", 40, ' ') . str_pad("Halaman : {$hal}", 50, ' ', STR_PAD_LEFT) . $_lf;
$hdr .= str_pad("Semester : " . NamaTahun($_SESSION['tahun']), 50, ' ') . $_lf . $RentangNPM . $_lf . $div;
$hdr .= "No. NPM NAMA T.SKS SKS IPS Kode Nama Matakuliah SKS" . $_lf;
$hdr .= $div;
return $hdr;
}
示例7: HeaderPindahan
function HeaderPindahan($tahun, $prodi, $div, $maxcol, &$hal)
{
global $_lf;
$hal++;
$hdr = str_pad('*** DAFTAR PENYETARAAN MATA KULIAH PINDAHAN **', $maxcol, ' ', STR_PAD_BOTH) . $_lf . $_lf . $_lf;
$hdr .= "Tahun Akademik : " . NamaTahun($tahun) . $_lf;
$hdr .= "Prodi : {$prodi}" . str_pad('Halaman : ' . $hal, 42, ' ', STR_PAD_LEFT) . $_lf;
$hdr .= $div;
$hdr .= str_pad("NO", 6) . str_pad("KODE", 8) . str_pad("MATA KULIAH", 35) . str_pad('SKS', 6) . str_pad('NILAI', 6) . str_pad('GRADE', 4) . str_pad('>>>', 5) . str_pad("KODE", 8) . str_pad("MATA KULIAH", 35) . str_pad('SKS', 6) . str_pad('NILAI', 6) . str_pad('GRADE', 4) . $_lf;
$hdr .= $div;
return $hdr;
}
示例8: Cetak
function Cetak()
{
global $_lf;
echo "<body bgcolor=#EEFFFF>";
// Parameters
$pos = $_SESSION['KHS-POS'];
$max = $_SESSION['KHS-MAX'];
$nmf = $_SESSION['KHS-FILE'];
$_khsid = $_SESSION['khsid'];
$khsid = $_khsid[$pos];
if ($pos < $max) {
// Buat file
$f = fopen($nmf, 'a');
// Buat KHS
$khs = GetFields("khs khs\r\n left outer join mhsw m on khs.MhswID=m.MhswID\r\n left outer join program prg on khs.ProgramID=prg.ProgramID\r\n left outer join prodi prd on khs.ProdiID=prd.ProdiID", "khs.JumlahMK <> 0 and khs.KHSID", $khsid, "khs.*, m.Nama as NamaMhsw, m.BatasStudi, prg.Nama as PRG, prd.Nama as PRD");
$thn = GetFields("tahun", "ProgramID='{$khs['ProgramID']}' and ProdiID='{$khs['ProdiID']}' and TahunID", $khs['TahunID'], "*");
$bal = $khs['Biaya'] - $khs['Potongan'] - ($khs['Bayar'] + $khs['Tarik']);
$prsBal = $bal + $bal * 5 / 100;
$_bal = number_format($prsBal);
$peringatan = " Anda masih memiliki utang sebesar Rp.{$_bal}. {$_lf} \r\n Anda tidak akan mendapat KHS dan juga tidak dapat mendaftar KRS {$_lf}\r\n sebelum utang ini anda lunasi. {$_lf}\r\n Lakukan pembayaran di Bank sesuai dengan prosedur yang berlaku.";
fwrite($f, chr(27) . chr(64) . chr(27) . chr(18) . chr(27) . chr(67) . chr(33));
// chr67+chr33 -> membuat menjadi 33 baris
// Buat header
$mrghdr = str_pad(' ', 18, ' ');
$_BatasStudi = NamaTahun($khs['BatasStudi']);
$hdr = $_lf . $_lf . $_lf . $_lf . $mrghdr . $thn['Nama'] . $_lf . $mrghdr . $khs['PRG'] . '/' . $khs['PRD'] . $_lf . $mrghdr . $khs['MhswID'] . $_lf . $mrghdr . $khs['NamaMhsw'] . $_lf . $mrghdr . $_BatasStudi . $_lf . $_lf . $_lf . $_lf . $_lf;
fwrite($f, $hdr);
/*if ($bal <= 0) {
$isi = $_lf . GetIsiKHS($khsid, $khs);
} else {
$isi = $_lf . "$peringatan" . $_lf.$_lf.$_lf.$_lf.$_lf.$_lf.$_lf;
}*/
if ($bal <= 0) {
$isi = $_lf . GetIsiKHS($khsid, $khs);
} else {
$isi = $_lf . "{$peringatan}" . $_lf . $_lf . $_lf . $_lf . $_lf . $_lf . $_lf;
}
fwrite($f, $isi);
$tgl = date('d-m-Y');
fwrite($f, str_pad(' ', 67) . $tgl . $_lf);
fwrite($f, chr(12));
// Tutup file
fclose($f);
// refresh page
echo "<p>Proses KHS: <font size=+2>{$pos}/{$max}</font><br />\r\n\t{$khsid} » {$khs['NamaMhsw']}</p>";
echo "<script type='text/javascript'>window.onload=setTimeout('window.location.reload()', 2);</script>";
} else {
echo "<p>Pembuatan file Cetak KHS telah selesai.<br />\r\n\tUntuk memulai mencetak klik: <a href='{$nmf}'><img src='img/printer.gif' border=0></a></p>";
//echo "<p>Untuk Preview Hasil Cetak klik di <a href=blanko.preview.php?nmf=$nmf target=_blank>sini</a></p>";
echo "<p>Untuk melihat preview klik <a href=blanko.preview.php?nmf={$nmf} target=_blank><img src='img/view.png' border=0></a></p>";
}
$_SESSION['KHS-POS']++;
}
示例9: Headerxx
function Headerxx($tahun, $prodi, $div, $maxcol, &$hal)
{
global $_lf;
$hal++;
$hdr = str_pad('*** DAFTAR MAHASISWA BARU **', $maxcol, ' ', STR_PAD_BOTH) . $_lf . $_lf . $_lf;
$hdr .= "Tahun Akademik :" . NamaTahun($tahun) . $_lf;
$hdr .= "Prodi : {$prodi}" . str_pad('Halaman : ' . $hal, 42, ' ', STR_PAD_LEFT) . $_lf;
$hdr .= $div;
$hdr .= str_pad("NO", 5) . str_pad("PMBID", 12) . str_pad("NIM/NPM", 12) . str_pad('NAMA', 35) . str_pad("PROGRAM", 12) . str_pad("STATUS", 10) . $_lf;
$hdr .= $div;
return $hdr;
}
示例10: Headerxx
function Headerxx($tahun, $prodi, $jenis, $div, $maxcol, &$hal)
{
global $_lf;
$hal++;
$NamaJenis = $jenis == 'K' ? "" : '(RESPONSI)';
$hdr = str_pad("*** TANDA TERIMA DISKET NILAI {$NamaJenis} ***", $maxcol, ' ', STR_PAD_BOTH) . $_lf . $_lf . $_lf;
$hdr .= "Tahun Akademik : " . NamaTahun($tahun) . $_lf;
$hdr .= "Prodi : {$prodi}" . str_pad('Halaman : ' . $hal, 85, ' ', STR_PAD_LEFT) . $_lf;
$hdr .= $div;
$hdr .= str_pad("NO", 4) . str_pad("KODE MK", 8) . str_pad("NAMA MK", 35) . str_pad('KELAS', 6) . str_pad("JML MHSW", 9) . str_pad("NMR", 5) . str_pad("NAMA DOSEN", 35) . str_pad("| DISKET", 10) . str_pad("| FINAL", 10) . $_lf;
$hdr .= $div;
return $hdr;
}
示例11: Cetak
function Cetak($t = 'UTS')
{
global $_lf;
$jdwl = GetFields('jadwal', 'JadwalID', $_REQUEST['jdwlid'], "*");
$dsn = TRIM($jdwl['DosenID'], '.');
$arrdsn = explode('.', $dsn);
$strdsn = empty($arrdsn) ? "GaAdaNih" : implode(',', $arrdsn);
$nmdsn = GetArrayTable("select concat(Nama, ', ', Gelar) as DSN from dosen where Login in ({$strdsn}) order by Nama", "Login", "DSN");
// Buat file
//$nmf = HOME_FOLDER . DS . "tmp/uts.$_REQUEST[jdwlid].dwoprn";
$nmf = HOME_FOLDER . DS . "tmp/{$_SESSION['_Login']}.dwoprn";
$f = fopen($nmf, 'w');
$maxkol = 80;
$maxbrs = 40;
fwrite($f, chr(27) . chr(77));
// Buat header
$div = str_pad('-', $maxkol, '-') . $_lf;
$NamaTahun = NamaTahun($jdwl['TahunID']);
$adagrade = $t == 'FINAL' ? 'Grade' : '';
$adanilai = $t == 'FINAL' ? ' ' : "Nilai ";
$hdr = $_lf . $_lf . str_pad("*** Hasil Nilai {$t} ***", $maxkol, ' ', STR_PAD_BOTH) . $_lf . $_lf . "Semester : " . $NamaTahun . $_lf . "Matakuliah : " . str_pad($jdwl['MKKode'] . ' - ' . $jdwl['Nama'], 30) . $_lf . "Kelas : " . $jdwl['NamaKelas'] . $_lf . "Dosen Pengampu : " . $nmdsn . $_lf . $div . "No. NPM Nama Mahasiswa {$adanilai}{$adagrade}" . $_lf . $div;
fwrite($f, $hdr);
// Tuliskan isinya
$s = "select krs.*, LEFT(m.Nama, 30) as NamaMhsw\r\n from krs krs\r\n left outer join mhsw m on krs.MhswID=m.MhswID\r\n where krs.JadwalID='{$jdwl['JadwalID']}'\r\n order by krs.MhswID";
$r = _query($s);
$n = 0;
$brs = 0;
while ($w = _fetch_array($r)) {
$n++;
$brs++;
$grd = $t == 'FINAL' ? $w['GradeNilai'] : '';
fwrite($f, str_pad($n . '.', 4) . str_pad($w['MhswID'], 15) . ' ' . str_pad($w['NamaMhsw'], 30) . ' ' . str_pad($w[$t], 3, ' ', STR_PAD_LEFT) . ' ' . str_pad($grd, 3) . $_lf);
if ($brs > $maxbrs) {
$hal++;
fwrite($f, $div);
$brs = 1;
fwrite($f, "Hal. " . $hal . $_lf);
fwrite($f, chr(12));
fwrite($f, $hdr);
}
}
fwrite($f, $div);
fwrite($f, str_pad(' ', 50) . "Paraf Dosen" . $_lf . $_lf . $_lf . $lf);
fwrite($f, str_pad(' ', 50) . $nmdsn);
// Tutup file
fwrite($f, chr(12));
fclose($f);
// Cetak
include_once "dwoprn.php";
DownloadDWOPRN($nmf);
}
示例12: PerolehanSKS
function PerolehanSKS($mhsw)
{
$_lf = chr(13) . chr(10);
$nmf = $_SESSION["PERO-FILE"];
$f = fopen($nmf, 'a');
fwrite($f, chr(27) . chr(18));
// Tampilkan Header
$div = str_pad('-', 79, '-') . $_lf;
$hdr = str_pad("*** DAFTAR PEROLEHAN SKS ***", 79, ' ', STR_PAD_BOTH) . $_lf . $_lf . "NPM / NAMA : " . $mhsw['MhswID'] . ' ' . $mhsw['Nama'] . $_lf . "FAK / JUR : " . $mhsw['FAK'] . ' / ' . $mhsw['PRD'] . $_lf . "Masa Studi : " . NamaTahun($mhsw['BatasStudi']) . $_lf . "Penasehat Akd. : " . $mhsw['PA'] . $_lf . $div . "No. Kode Matakuliah SKS Nilai" . $_lf . $div;
fwrite($f, $hdr);
// matakuliah yg diambil
$s = "select concat(LEFT(krs.MKKode, 3), ' ', SUBSTRING(krs.MKKode, 4, 3)) as MKKode, \r\n LEFT(mk.Nama, 45) as NamaMK, LEFT(mk.Nama_en, 40) as NamaMK1,\r\n krs.BobotNilai, krs.GradeNilai, krs.SKS\r\n from krsprc krs\r\n left outer join mk mk on krs.MKID=mk.MKID\r\n where \r\n\tkrs.MhswID='{$mhsw['MhswID']}' and krs.BobotNilai > 0\r\n\t\r\n\tand (GradeNilai <> '-' and GradeNilai <> '' and not GradeNilai is NULL)\r\n\t\r\n order by krs.MKKode asc, krs.BobotNilai desc";
$r = _query($s);
$n = 0;
$brs = 0;
$maxbrs = 42;
$hal = 0;
$mk = '';
$_sks = 0;
$_bbt = 0;
while ($w = _fetch_array($r)) {
if ($mk != $w['MKKode']) {
$mk = $w['MKKode'];
$n++;
$brs++;
$NamaMK = $_SESSION['bhs'] == 'id' ? $w['NamaMK'] : $w['NamaMK1'];
$_sks += $w['SKS'];
$_bbt += $w['SKS'] * $w['BobotNilai'];
fwrite($f, str_pad($n . '.', 4) . ' ' . str_pad($w['MKKode'], 10) . ' ' . str_pad($NamaMK, 45) . ' ' . str_pad($w['SKS'], 4, ' ', STR_PAD_LEFT) . ' ' . str_pad($w['GradeNilai'], 3, ' ') . $_lf);
if ($brs >= $maxbrs) {
$brs = 0;
$hal++;
fwrite($f, $div . str_pad("Hal. " . $hal, 79, ' ', STR_PAD_LEFT) . $_lf);
fwrite($f, chr(12));
fwrite($f, $hdr);
}
}
}
$_ipk = $_sks > 0 ? $_bbt / $_sks : 0;
fwrite($f, $div);
fwrite($f, "Jumlah Kredit yang Telah Diambil: {$_sks} SKS, IPK: " . number_format($_ipk, 2) . $_lf . $div);
fwrite($f, str_pad("Dicetak Oleh : " . $_SESSION['_Login'] . ', ' . Date("d-m-Y H:i"), 30, ' ') . $_lf);
fwrite($f, chr(12));
fclose($f);
}
示例13: 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);
}
示例14: CetakLabelDisket
function CetakLabelDisket()
{
global $_lf, $_HeaderPrn;
$tahun = $_REQUEST['tahun'];
$prodi = $_REQUEST['prodi'];
$prid = $_REQUEST['prid'];
$jadwalid = $_REQUEST['JadwalID'];
$asal = $_REQUEST['asal'] + 0;
$labeldskt = HOME_FOLDER . DS . "tmp/labeldisket.dwoprn";
$mrg = str_pad(' ', 5, ' ');
$jenisctk = $asal > 0 ? "and j.JadwalID = {$jadwalid}" : "";
$s = "select j.MKKode, j.Nama, j.NamaKelas, j.SKS, j.SKSAsli, mk.Sesi, j.JenisJadwalID, j.DosenID,\r\n concat(d.Nama, ', ', d.Gelar) as DSN,\r\n time_format(j.JamMulai, '%H:%i') as JM, time_format(j.JamSelesai, '%H:%i') as JS\r\n from jadwal j\r\n left outer join dosen d on j.DosenID=d.Login\r\n left outer join mk mk on j.MKID=mk.MKID\r\n where j.TahunID='{$tahun}'\r\n and INSTR(j.ProgramID, '.{$prid}.') > 0\r\n and INSTR(j.ProdiID, '.{$prodi}.') > 0\r\n\t\t\t{$jenisctk}\r\n\t\tgroup by j.MKKode, j.NamaKelas, j.JenisJadwalID\r\n order by j.MKKode, j.NamaKelas, j.JenisJadwalID";
$r = _query($s);
//echo "<pre>$s</pre>";
//exit;
$f = fopen($labeldskt, 'w');
$n = 0;
fwrite($f, $_HeaderPrn);
while ($w = _fetch_array($r)) {
$rps = $w['JenisJadwalID'] == 'K' ? '' : "(R)";
$n++;
fwrite($f, chr(27) . chr(15));
fwrite($f, $mrg . NamaTahun($tahun) . $_lf);
fwrite($f, chr(27) . chr(119) . '0' . $_lf);
fwrite($f, chr(27) . chr(15));
fwrite($f, $mrg . $w['MKKode'] . ' ' . $w['Nama'] . ' ' . $rps . $_lf);
fwrite($f, $mrg . "KELAS : " . $w['NamaKelas'] . $_lf);
fwrite($f, $mrg . $w['DosenID'] . ' ' . $w['DSN'] . $_lf);
//fwrite($f, $mrg . $w['HR'].', '.$w['JM'].' - '.$w['JS'].$_lf);
fwrite($f, chr(27) . chr(18));
fwrite($f, $_HeaderPrn);
fwrite($f, $_lf . $_lf . $_lf);
}
fwrite($f, chr(27) . chr(18) . chr(67) . chr(66));
fclose($f);
include_once "dwoprn.php";
DownloadDWOPRN($labeldskt);
}
示例15: Daftar
function Daftar()
{
global $_lf, $pilstatus;
$whr = array();
if (!empty($_SESSION['prodi'])) {
$whr[] = "m.ProdiID='{$_SESSION['prodi']}'";
}
if (!empty($_SESSION['prid'])) {
$whr[] = "m.ProgramID='{$_SESSION['prid']}'";
}
if (!empty($_SESSION['angkat'])) {
$whr[] = "m.TahunID='{$_SESSION['angkat']}'";
}
$_whr = implode(" and ", $whr);
if (!empty($_whr)) {
$_whr = " and " . $_whr;
}
$_u = explode('~', $pilstatus[$_SESSION['_pilstatus']]);
$_key = $_u[1];
// Query
$pilta = GetArrayTable("select TahunID from khs where TahunID <= '{$_SESSION['tahun']}' and right(TahunID, 1) <> 3 group by TahunID order by TahunID DESC limit 0,{$_SESSION['banyak']}", 'TahunID', 'TahunID');
$s = "select m.MhswID, LEFT(m.Nama, 25) as Nama, count(khs.MhswID) as tot, KHSID\r\n from khs \r\n left outer join mhsw m on khs.MhswID=m.MhswID\r\n where khs.TahunID in ({$pilta}) {$_whr}\r\n\t and khs.StatusMhswID = '{$_key}' \r\n\tgroup by khs.MhswID\r\n order by khs.MhswID ";
//echo "<pre>$s</pre>";
$r = _query($s);
// Buat file
$MaxCol = 114;
$nmf = "tmp/{$_SESSION['_Login']}.dwoprn";
$f = fopen($nmf, 'w');
fwrite($f, chr(27) . chr(15) . chr(27) . chr(77));
$div = str_pad('-', $MaxCol, '-') . $_lf;
// parameter2
$_prodi = GetaField('prodi', 'ProdiID', $_SESSION['prodi'], 'Nama');
$_prid = GetaField('program', 'ProgramID', $_SESSION['prid'], 'Nama');
$n = 0;
$hal = 1;
$brs = 0;
$maxbrs = 50;
$_Tgl = Date("d-m-Y H:i");
$Head = $_key == 'C' ? "*** Daftar Mahasiswa Cuti {$_SESSION['banyak']} Semester Berturut-turut ***" : "*** Daftar Mahasiswa Bolos {$_SESSION['banyak']} Semester Berturut-turut ***";
// Buat header
$hdr = str_pad($Head, $MaxCol, ' ', STR_PAD_BOTH) . $_lf . $_lf;
$hdr .= "Priode : " . NamaTahun($_SESSION['tahun']) . $_lf;
$hdr .= "Prodi \t: {$_prodi}" . $_lf;
$hdr .= "Program : {$_prid}" . $_lf;
$hdr .= $div;
$hdr .= "No. NPM Nama SEMESTER" . $_lf . $div;
fwrite($f, $hdr);
// Tampilkan
while ($w = _fetch_array($r)) {
//if($w['tot'] >= $_SESSION['banyak']){
//$n++; $brs++;
//if ($brs > $maxbrs) {
// $hal++; $brs =1;
// fwrite($f, $div);
// fwrite($f, chr(12));
// fwrite($f, $hdr);
//}
$MH = CariBerurutan($_key, $pilta, $w, $hdr, $brs, $maxbrs, $div, $n);
//$DET = GetFields("mhsw", "MhswID", $MH, "Nama, MhswID");
//$isi = str_pad($n.'.', 4, ' ') . ' ' .
//str_pad($DET['MhswID'], 12) . ' '.
//str_pad($DET['Nama'], 29) . ' '.
//$pilta.
//$_lf;
fwrite($f, $MH);
//}
}
fwrite($f, $div);
fwrite($f, str_pad("Akhir laporan", 0, ' ', STR_PAD_LEFT) . $_lf);
fwrite($f, str_pad("Dicetak oleh : " . $_SESSION['_Login'], 20, ' ') . str_pad("Dicetak Tgl : " . $_Tgl, 90, ' ', STR_PAD_LEFT) . $_lf . $_lf);
fwrite($f, chr(12));
fclose($f);
TampilkanFileDWOPRN($nmf, "akd.lap");
}