本文整理汇总了PHP中_num_rows函数的典型用法代码示例。如果您正苦于以下问题:PHP _num_rows函数的具体用法?PHP _num_rows怎么用?PHP _num_rows使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_num_rows函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _page
/**
*_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: BuatIsinya
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: DaftarGagal
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: BuatIsinya2
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: Proses
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: ProsesBeneran
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: ProsesHitungMundur
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: DaftarMatrikulasi
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: ProsesSekarang
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']} » {$pot1} » {$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']} » {$jmlpot} {$prc}</li>";
}
echo "</ul>";
}
echo "</ol>";
}
示例10: Isinya
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: DaftarGolongan
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']} </td>\r\n <td {$c}>{$w['Nama']} </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: ProsesTransferDep
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']} » {$_dep} » {$str}</li>";
}
echo "</ol>";
}
示例13: CetakPerolehanSKS
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: Prosesnya
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: TampilkanDaftarYudisium
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']} </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>";
}