예제 #1
0
파일: db.php 프로젝트: nickohappy7/sister
function dbFetch($s,$t,$f=""){
	$t=dbSel($s,$t,$f." LIMIT 0,1");
	if(dbNRow($t)==1){
		$r=dbFA($t);
		return $r[$s];
	}else{
		return '';
	}
}
예제 #2
0
function MstrGetNextUrut($t, $a, $o = "")
{
    $ts = dbSel("dcid,urut", $t, "O/ urut " . $o);
    $lid = array(-1, 0, 0);
    while ($rs = dbFA($ts)) {
        if ($rs['dcid'] == $a) {
            $lid[2] = $rs['urut'];
            return $lid;
        }
        $lid[0] = $rs['dcid'];
        $lid[1] = $rs['urut'];
    }
    return $lid;
}
예제 #3
0
						<?php 
$tpf = mysql_query("SELECT * FROM emp_training WHERE empid='" . $r['dcid'] . "' ORDER BY dcid");
$npf = mysql_num_rows($tpf);
if ($npf > 0) {
    $rpf = mysql_fetch_array($t);
    $filelist = array();
    $tf = dbSel("dcid,file", "emp_files", "W/empid='" . $r['dcid'] . "'");
    while ($rf = dbFA($tf)) {
        $filelist[$rpf['dcid']] = $rf['file'];
    }
    ?>
						<div class="sfont" style="padding:5px 0 5px 0;background:#ededff;">
							<b><?php 
    echo $r['fname'];
    ?>
's Training record<?php 
    echo $npf > 1 ? "s" : "";
    ?>
:</b>
						</div><br/>
						<table class="tablex" border="0" cellspacing="1px" width="885px">
						<tr class="tablexhead">
							<th>Title</th>
							<th>Type</th>
							<th>Host</th>
							<th>Place</th>
							<th>Date</th>
							<th>Speaker</th>
							<th>Participant</th>
							<th style="text-align:center">Certified</th>
							<th style="text-align:center">Option</th>
예제 #4
0
px;margin-right:4px;margin-top:10px;margin-bottom:4px">
<?php 
$t1 = mysql_query("SELECT * FROM psb_kelompok WHERE proses='{$pros}'");
$k = 0;
while ($r1 = mysql_fetch_array($t1)) {
    $n = mysql_num_rows(mysql_query("SELECT * FROM psb_calonsiswa WHERE kelompok='" . $r1['replid'] . "' AND status<>0"));
    $w = intval($n * $barw / $kapasitas);
    echo '<div style="float:left;background:' . $bcolor[$k++] . ';height:4px;width:' . $w . 'px"></div>';
}
?>
</div>
<?php 
//$t=dbQSql($token);
$no = 1;
$doc->head('No{C}', '@Kelompok', '@Tanggal Pendaftaran', '@Biaya Pendaftaran', '@calon Siswa', '@Siswa diterima', 'Keterangan');
while ($r = dbFA($query)) {
    $q = mysql_query("SELECT replid FROM psb_calonsiswa WHERE kelompok='" . $r['replid'] . "'");
    $n1 = mysql_num_rows($q);
    $q = mysql_query("SELECT replid FROM psb_calonsiswa WHERE kelompok='" . $r['replid'] . "' AND status<>0");
    $n2 = mysql_num_rows($q);
    $doc->nl();
    $doc->cell($no++, 20, 'c');
    $doc->cell($r['kelompok'], 80);
    $doc->cell(fftgl($r['tglmulai']) . (fftgl($r['tglselesai']) != '-' ? '<br/>s/d ' . fftgl($r['tglselesai']) : ''), 50);
    $doc->cell(fRp($r['biaya']), 50);
    //$doc->cell($r['biaya'],50);
    $doc->cell($n1, 50);
    $doc->cell($n2, 50);
}
$doc->cell($r['keterangan'], 50);
$doc->end();
예제 #5
0
<?php

appmod_use('aka/siswa', 'aka/kelas', 'aka/pelajaran', 'aka/rapor');
// cell($a,$w=0,$al='',$c=1,$r=1,$b=-1,$bg='',$s='',$atr='')
$token = gets('token');
$db = siswa_db_byID($token, 'nisn,kelamin,tmplahir,tgllahir,alamat,telpon');
$db->field("mst_agama.agama as nagama");
$db->joinother("aka_siswa", "agama", "mst_agama");
$t = $db->query();
$siswa = dbFA($t);
$doc = new doc(1);
$doc->dochead("DATA SISWA", 4);
$doc->nl();
$doc->cell('<b>' . strtoupper($siswa['nama']) . '</b>', 0, '', 4, 1, 'b');
$doc->nl(5);
$doc->cell('', 0, '', 3);
$lw = 120;
$doc->nl();
$doc->cell('Departemen', $lw, '');
$doc->cell(': ' . $siswa['ndepartemen'], 0, '', 2);
$img = '<img src="photo/siswa.php?id=' . $siswa['replid'] . '" width="120px" />';
$doc->cell($img, 200, 'r', 1, 10);
$doc->nl();
$doc->cell('NIS', $lw, '');
$doc->cell(': ' . $siswa['nis'], 0, '', 2);
$doc->nl();
$doc->cell('NISN', $lw, '');
$doc->cell(': ' . $siswa['nisn'], 0, '', 2);
$doc->nl();
$doc->cell('', 0, '', 3);
$doc->nl();
예제 #6
0
// Table body formatting
$pdf->SetFont(mydeffont, '', 8, '', true);
$pdf->setCellPaddings(1, 1, 1, 1);

$row=1;

function cetak_kolom($ik){
	global $pdf,$twx,$tax,$my,$i;
	$pdf->MultiCell($twx[$i], 0, $ik, 0, $tax[$i++], 0, 0, '', '', true);
	if($pdf->getLastH()>$my)$my=$pdf->getLastH();
}

$fst=true; $LCEK='';

while($r=dbFA($t)){ $i=0;
	if($pdf->GetY()>180) {
		$pdf->AddPage();
		page_header();
		
		$pdf->SetTextColor(255);
		$pdf->SetFillColor(0);
		for($i=0;$i<$thx_n;$i++){
			$pdf->MultiCell($twx[$i], 0, $thx[$i], 1, $tax[$i], 1, 0, '', '', true);
		}
		$pdf->Ln();
		$pdf->SetTextColor(0);
	}
	
	if($LCEK!=''){
		if($r['cek']!=$LCEK){
예제 #7
0
$doc->cell('<b>: ' . $siswa['nkelas'] . '</b>', 0, '', 4);
$doc->nl();
$doc->cell('', 40);
$doc->cell('', 60);
$doc->cell('', 0, '', 4);
$doc->cell_format('border:1,align:c');
$doc->nl(30);
$doc->cell('<b>NO</b>', 40);
$doc->cell('<b>MATA PELAJARAN</b>', 0, '', 2);
$doc->cell('<b>NILAI</b>', 80);
$doc->cell('<b>KKM</b>', 80);
$doc->cell('<b>KETUNTASAN</b>', 120);
$no = 1;
$jmlnilai = 0;
$tpel = dbQSql("SELECT aka_pelajaran.replid,aka_pelajaran.nama FROM aka_sks LEFT JOIN aka_pelajaran ON aka_pelajaran.replid=aka_sks.pelajaran WHERE aka_sks.kelas='" . $siswa['idkelas'] . "' GROUP BY aka_sks.pelajaran ORDER BY aka_pelajaran.nama");
while ($rpel = dbFA($tpel)) {
    $doc->nl();
    // cell($a,$w=0,$al='',$c=1,$r=1,$b=-1,$bg='',$s='',$atr='')
    $nilai = rapor_pelajaran_nilai($rpel['replid'], $kls, $siswa['replid']);
    $skm = pelajaran_skm($rpel['replid']);
    $doc->cell($no++, 40);
    $doc->cell($rpel['nama'], '244#', 'l', 2, 1);
    $doc->cell(number_format($nilai, 2), 80);
    $doc->cell(number_format($skm, 2), 80);
    $doc->cell($nilai < $skm ? 'Tidak tuntas' : 'Tuntas', 120);
    $jmlnilai += $nilai;
}
$rata = $jmlnilai / ($no - 1);
$doc->nl();
$doc->cell('<b>Jumlah Nilai</b>', 0, '', 3);
$doc->cell('<b>' . $jmlnilai . '</b>' . '[x:fmla="=SUM(D8:D10)" x:num]', 'c');
예제 #8
0
     // Reference** name	address	phone	job	know	relation
     $q = dbSel("*", "emp_reference", "W/empid='{$dcid}'");
     if (dbNRow($q) == 0) {
         $pdf->SetFont('dejavusans', 'B', 9, '', true);
         $pdf->MultiCell($dcPageW, 0, "References: N/A", 0, 'L', 0, 1, '', '', true);
         $pdf->Ln();
     } else {
         $pdf->SetFont('dejavusans', 'B', 9, '', true);
         $pdf->MultiCell($dcPageW, 0, "References", 0, 'L', 0, 1, '', '', true);
         $pdf->SetFont('dejavusans', '', 9, '', true);
         dc_YDown(1);
         $th = array('Name', 'Address', 'Phone', 'Job', 'Since', 'Relation');
         $tw = array(0, 60, 20, 30, 20, 20);
         $pdf->setCellPaddings(0.5, 0.5, 0.5, 0.5);
         dc_tableHead($th, $tw);
         while ($f = dbFA($q)) {
             $i = 0;
             $pdf->MultiCell($tw[$i++], 0, $f['name'], 0, 'L', 0, 0, '', '', true);
             $pdf->MultiCell($tw[$i++], 0, $f['address'], 0, 'L', 0, 0, '', '', true);
             $pdf->MultiCell($tw[$i++], 0, $f['phone'], 0, 'L', 0, 0, '', '', true);
             $pdf->MultiCell($tw[$i++], 0, $f['job'], 0, 'L', 0, 0, '', '', true);
             $pdf->MultiCell($tw[$i++], 0, $f['know'], 0, 'L', 0, 0, '', '', true);
             $pdf->MultiCell($tw[$i++], 0, $f['relation'], 0, 'L', 0, 0, '', '', true);
             $pdf->Ln();
         }
         $pdf->setCellPaddings(0, 0, 0, 0);
         $pdf->Ln();
     }
 }
 if ($dps[dp_Generalinformation]) {
     // General Info
예제 #9
0
$k = 0;
while ($f = dbFA($t)) {
    $k++;
    ?>
	<div id="box<?php 
    echo $k;
    ?>
" class="box1"><?php 
    echo $f['barcode'];
    ?>
</div>
<?php 
}
$t = mysql_query("SELECT * FROM `" . $r['ntable'] . "` WHERE cek='N'");
$i = 0;
while ($f = dbFA($t)) {
    ?>
	<div class="box0"><?php 
    echo $f['barcode'];
    ?>
</div>
<?php 
}
?>
</div>
<script type="text/javascript" language="javascript">
var bk=<?php 
echo $k;
?>
;
if(bk > 50) {
예제 #10
0
 if ($xtable->ndata > 0) {
     // Table head
     $heads = array('@!NIS', '@Nama');
     $t1 = dbQSql("SELECT * FROM aka_penilaian WHERE guru='{$gid}' AND pelajaran='{$pel}' AND kelas='{$kls}'");
     while ($r1 = dbFA($t1)) {
         array_push($heads, '!' . $r1['kode'] . '{C}');
     }
     $heads = array_merge($heads, array('!JML Nilai{C}', 'Nilai akhir{C}', '@Ketuntasan', 'Keterangan'));
     //array_push($heads,'Keterangan');
     $xtable->head($heads);
     while ($r = mysql_fetch_array($t)) {
         $xtable->row_begin($r['replid']);
         $xtable->td($r['nis'], 60);
         $xtable->td($r['nama'], 250);
         $t1 = dbQSql("SELECT * FROM aka_penilaian WHERE guru='{$gid}' AND pelajaran='{$pel}' AND kelas='{$kls}'");
         while ($r1 = dbFA($t1)) {
             //$db->field("IF(aka_daftarnilai.penilaian = '".$r1['replid']."', aka_daftarnilai.nilai, 0) as ".$r1['kode']);
             //$db->join_cust("aka_daftarnilai ON aka_daftarnilai.penilaian='".$r1['replid']."'");
             //array_push($heads,$r1['kode']);
             $nil = $r["T" . $r1['kode']];
             if ($nil < $SKM) {
                 $nil = '<span style="color:#ff0000">' . $nil . '</span>';
             }
             $xtable->td($nil, 50, 'c', $r['B' . $r1['kode']] == 0 ? 'style="color:#aaa;background:#eee"' : '');
         }
         $xtable->td($r["JMLNILAI"], 70, 'c');
         $xtable->td(number_format($r["TNILAI"], 2), 70, 'c');
         $xtable->td($r['TLULUS'] == 1 ? 'Tuntas ' : '<span style="color:#ff0000">Belum tuntas</span>', 80);
         $xtable->td($r['komen'], '', '', 'id="ket_' . $r['replid'] . '"');
         $s = '<button class="btn" title="Edit keterangan" onclick="nilairapor_komen_form(\'uf\',' . $r['replid'] . ')"><div class="bi_editb">&nbsp;</div></button>';
         $xtable->td($s, 50, 'c');
예제 #11
0
    }
    $t = dbSel("*", "employee", "W/dcid='{$dcid}' LIMIT 0,1");
    $r = dbFA($t);
    require_once VWDIR . $fmod . '.php';
} else {
    $sx = str_replace('f', '', $opt);
    $nobtn = "Cancel";
    // Preprocessing form
    $doctype = $mstr_document;
    if ($opt == 'uf' || $opt == 'df') {
        $r = dbSFA("*", $dbtable, "W/dcid='{$cid}'");
    } else {
        $r['date1'] = date("Y-m-d");
        $r['date2'] = date("Y-m-d");
        $td = dbSel("*", "emp_document");
        while ($rd = dbFA($td)) {
            unset($doctype[$rd['docid']]);
        }
    }
    // Form dimension
    $fwidth = $opt == 'df' ? 500 : 400;
    $lwidth = 100;
    $iTextFw = "width:" . ($fwidth - $lwidth - 16) . "px";
    ?>
	<table cellspacing="0" cellpadding="0" width="100%"><tr><td align="center" style="padding-top:120px">
	<div class="fformbox" style="width:<?php 
    echo $fwidth + 30;
    ?>
px;overflow:hidden">
		<div class="sfont" style="color:#ffffff;border-radius:5px 5px 0 0;background:#6a92e5;padding:6px 0 6px 0;">
			<b><?php 
예제 #12
0
파일: db.php 프로젝트: epiii/siadu-epiii
function dbFetch($sel, $tbl, $filter = "")
{
    $t = dbSel($sel, $tbl, $filter . " LIMIT 0,1");
    if (dbNRow($t) == 1) {
        $res = dbFA($t);
        return $res[$sel];
    } else {
        return '';
    }
}
예제 #13
0
 $heads = array_merge($heads, array('@!JML Nilai{C,2}', '@Rata-rata{C,2}', '@Peringkat{C,2}', 'Keterangan{2}'));
 //array_push($heads,'Keterangan');
 $xtable->head_addrow($heads);
 $heads2 = array();
 $n = count($SSKM);
 foreach ($SSKM as $k => $v) {
     array_push($heads2, '!SKM: ' . $v . '{C}');
 }
 $xtable->head_addrow($heads2);
 $xtable->head_multi();
 while ($r = mysql_fetch_array($t)) {
     $xtable->row_begin($r['replid']);
     $xtable->td($r['nis'], 60);
     $xtable->td($r['nama'], 200);
     $t0 = dbQSql("SELECT aka_sks.*,aka_pelajaran.kode as kodepel FROM aka_sks LEFT JOIN aka_pelajaran ON aka_pelajaran.replid=aka_sks.pelajaran WHERE kelas='{$kls}' GROUP BY aka_sks.pelajaran ORDER BY aka_pelajaran.nama");
     while ($r0 = dbFA($t0)) {
         $pelid = $r0['pelajaran'];
         if (isset($r["TNILAI_" . $pelid])) {
             $nil = number_format($r["TNILAI_" . $pelid], 2);
             if ($r['TLULUS_' . $pelid] != 1) {
                 $nil = '<span style="color:#ff0000">' . $nil . '</span>';
             }
         } else {
             $nil = '';
         }
         $xtable->td($nil, 50, 'c');
     }
     $xtable->td(number_format($r["TNRAPOR"], 2), 70, 'c');
     $xtable->td(number_format($r["AVGRAPOR"], 2), 70, 'c');
     $xtable->td($rank[$r['replid']], 60, 'c');
     $xtable->td(nl2br($r['komen']), '', '', 'id="ket_' . $r['replid'] . '"');
예제 #14
0
파일: db.php 프로젝트: epiii/siadu-epiii
function dbFetch($sel, $tbl, $filter = "")
{
    $res = dbFA(dbSel($sel, $tbl, $filter));
    return $res[$sel];
}
예제 #15
0
<?php

/* Pre Data Processing */
require_once MODDIR . 'masterdb.php';
require_once MODDIR . 'pagelink.php';
require_once MODDIR . 'control.php';
require_once SYDIR . 'xtable.php';
$t = mysql_query("SELECT * FROM so_history WHERE status='1'");
if (mysql_num_rows($t) > 0) {
    $stocktaking = true;
} else {
    $stocktaking = false;
}
$mstr_shelf = array();
$ts = dbSel("dcid,name", "mstr_shelf", "O/ dcid");
while ($f = dbFA($ts)) {
    $mstr_shelf[$f['dcid']] = $f['name'];
}
$nid = getsx('nid');
$t = mysql_query("SELECT * FROM catalog WHERE dcid='{$nid}' LIMIT 0,1");
$f = dbFAx($t);
$author = dbFetch("name", "mstr_author", "W/`dcid`='" . $f['author'] . "'");
$publisher = dbFetch("name", "mstr_publisher", "W/`dcid`='" . $f['publisher'] . "'");
$cla = dbSFA("name,code", "mstr_class", "W/dcid='" . $f['class'] . "'");
// Sorting:
$sortby = getsx('sortby');
$sortmode = getsx('mode');
$sf = false;
$sm = $sortmode == '1' ? " DESC" : "";
if ($sortby == 'shelf') {
    $sql = "SELECT t1.* FROM book t1 JOIN mstr_shelf t2 ON t1.shelf = t2.dcid WHERE catalog='{$nid}' ORDER BY t2.name" . $sm;
예제 #16
0
 $pdf->setCellPaddings(1, 1, 1, 1);
 // Table head
 $pdf->setCellPaddings(1, 1, 1, 1);
 $pdf->SetTextColor(255);
 $pdf->SetFillColor(0);
 for ($i = 0; $i < count($thx); $i++) {
     $pdf->MultiCell($twx[$i], 0, $thx[$i], 1, $tax[$i], 1, 0, '', '', true);
 }
 $pdf->Ln();
 $pdf->SetTextColor(0);
 // End of table head
 // Table body formatting
 $pdf->SetFont('dejavusans', '', 8, '', true);
 $pdf->setCellPaddings(1, 1, 1, 1);
 $row = 1;
 while ($r = dbFA($t)) {
     $i = 0;
     if ($pdf->GetY() > 180) {
         $pdf->AddPage();
         page_header();
         // Table head
         $pdf->SetTextColor(255);
         $pdf->SetFillColor(0);
         for ($i = 0; $i < count($thx); $i++) {
             $pdf->MultiCell($twx[$i], 0, $thx[$i], 1, $tax[$i], 1, 0, '', '', true);
         }
         $pdf->Ln();
         $pdf->SetTextColor(0);
         // End of table head
         //dc_YDown(2);
     }
예제 #17
0
function rapor_peringkatkelas_siswa($kls,$siswa){
	$db=siswa_db_bykelas($kls);
	
	$db->field("aka_komenrapor:komen");
	$db->join_cust("aka_komenrapor ON aka_komenrapor.siswa=aka_siswa.replid AND aka_komenrapor.tahunajaran=aka_tahunajaran.replid");
	
	$sna=""; $phn=array(); $SSKM=array(); $npeni=0;
	$t0=dbQSql("SELECT * FROM aka_sks WHERE kelas='$kls' GROUP BY pelajaran");
	while($r0=dbFA($t0)){
		$pelid=$r0['pelajaran'];
		$pel=$r0['pelajaran']; $gid=$r0['guru'];
		$SKM=pelajaran_skm($pel);
		$SSKM[$pelid]=$SKM;
		
		$db->field($SKM." as SKM_".$pelid);
		
		$t1=dbQSql("SELECT * FROM aka_penilaian WHERE guru='$gid' AND pelajaran='$pel' AND kelas='$kls'");
		//echo '<span style="color:red">'."SELECT * FROM aka_penilaian WHERE guru='$gid' AND pelajaran='$pel' AND kelas='$kls'".'</span>';
		if(dbNRow($t1)>0){
			$phn[$pelid]='@';
			$sk=""; $tbobot=0; $sb="";
			while($r1=dbFA($t1)){
				$db->field("@".$r1['kode']."_".$pelid." := IFNULL((SELECT aka_daftarnilai.nilai FROM aka_daftarnilai WHERE aka_daftarnilai.siswa=aka_siswa.replid AND aka_daftarnilai.penilaian='".$r1['replid']."'),0) as T".$r1['kode']."_".$pelid);
				
				$db->field($r1['bobot']." as B".$r1['kode']."_".$pelid);
				
				$tbobot+=$r1['bobot'];
				
				if($r1['bobot']>0){
					if($sk!="")$sk.=" + ";
					$sk.="@".$r1['kode']."_".$pelid;
					
					if($sb!="")$sb.=" + ";
					$sb.="@".$r1['kode']."_".$pelid." * ".$r1['bobot'];
				}
				
			}
			
			if($sk!="") $db->field("(".$sk.") as JMLNILAI_".$pelid);
			else $db->field("0 as JMLNILAI_".$pelid);
			if($tbobot>0){
				if($sb!="") $db->field("@TN_".$pelid." := ((".$sb.")/ ".$tbobot.") as TNILAI_".$pelid);
				else $db->field("@TN_".$pelid." := 0 as TNILAI_".$pelid);
			} else {
				$db->field("@TN_".$pelid." := 0 as TNILAI_".$pelid);
			}
			$db->field("IF( @TN_".$pelid." < ".$SKM.",0,1) as TLULUS_".$pelid);
			
			if($sna!="")$sna.=" + ";
			$sna.="@TN_".$pelid;
			
			$npeni++;
		} else {
			$phn[$pelid]='';
		}
	}
	
	if($sna!="") $db->field("(".$sna.") as TNRAPOR");
	else $db->field("0 as TNRAPOR");
	if($npeni>0) $db->field("((".$sna.")/".$npeni.") as AVGRAPOR");
	else $db->field("0 as AVGRAPOR");
	
	$db->order("TNRAPOR DESC");
	$s=$db->query();
	$rank=array(); $rk=1;
	while($v=dbFA($s)){
		$rank[$v['replid']]=$rk++;
	}
	
	return $rank[$siswa];
}
예제 #18
0
<?php

require_once MODDIR . 'masterdb.php';
require_once MODDIR . 'control.php';
$lbc = dbFetch("barcode", "book", "O/barcode DESC");
if ($lbc == '') {
    $lbc = 1;
} else {
    $lbc = intval($lbc) + 1;
}
$mstr_shelf = array();
$ts = dbSel("dcid,name", "mstr_shelf", "O/ dcid");
while ($l = dbFA($ts)) {
    $mstr_shelf[$l['dcid']] = $l['name'];
}
$cla = dbSFA("name,code", "mstr_class", "W/dcid='" . $r['class'] . "'");
$txtWidth = "width:200px";
if (!empty($f['callnumber'])) {
    $callnum = $f['callnumber'];
} else {
    $callnum = $r['classcode'] . " " . dbFetch("prefix", "mstr_author", "W/dcid='" . $r['author'] . "'") . " " . strtolower(substr(preg_replace("/(\"|\\')/", "", $r['title']), 0, 1));
}
$f['nid'] = "0/" . dbFetch("val", "mstr_setting", "W/dcid='4'");
?>
<div class="hl1" style="margin-top:20px">Add book to new catalog:</div>
<input type="hidden" id="dcid" name="dcid" value="<?php 
echo $f['dcid'];
?>
" />
<input type="hidden" id="catalog" name="catalog" value="<?php 
echo $r['dcid'];
예제 #19
0
        dbInsert($dbtable, array('empid' => $dcid, 'status' => $status, 'date1' => $date1, 'date2' => $date2, 'position' => $position));
        dbUpdate("employee", array('status' => $status), "dcid='{$dcid}'");
    } else {
        if ($opt == 'u') {
            dbUpdate($dbtable, $inp, "dcid='{$cid}'");
        } else {
            if ($opt == 'd') {
                if ($active == 'Y') {
                    dbUpdate("employee", array('status' => 0), "dcid='{$dcid}'");
                }
                dbDel($dbtable, "dcid='{$cid}'");
            }
        }
    }
    $t = dbSel("*", "employee", "W/dcid='{$dcid}' LIMIT 0,1");
    $r = dbFA($t);
    require_once VWDIR . $fmod . '.php';
} else {
    $sx = str_replace('f', '', $opt);
    $nobtn = "Cancel";
    // Form dimension
    $fwidth = 330;
    $lwidth = 100;
    $iTextFw = "width:" . ($fwidth - $lwidth - 30) . "px";
    // Preprocessing form
    if ($opt == 'uf' || $opt == 'df') {
        $r = dbSFA("*", $dbtable, "W/dcid='{$cid}'");
        $date1 = $r['date1'];
        $date2 = $r['date2'];
    } else {
        $date1 = date("Y-m-d");
예제 #20
0
$t = $db->query();
$xtable->ndata = mysql_num_rows($t);
$xtable->search_box('nis atau nama siswa');
$xtable->search_info('data siswa dengan nis atau nama "<b>{keyw}</b>"' . ($angk == 0 ? '' : ' pada tahun ajaran ' . $tahunajaran[$tajar]) . '.');
$fid = 0;
if ($xtable->ndata > 0) {
    // $xtable->head('NIS','Nama','Tunggakan{R}','{40px}');
    $xtable->head('NIS', 'Nama', 'Uang Sekolah{R}', '{40px}');
    while ($r = mysql_fetch_array($t)) {
        // $xtable->row_begin();
        $xtable->row_begin($r['replid']);
        $t2 = dbQSql("SELECT * FROM keu_pembayaran WHERE modul='{$modid}' AND siswa='" . $r['replid'] . "'");
        $r2 = dbFA($t2);
        $dibayar = 0;
        $t3 = dbQSql("SELECT * FROM keu_transaksi WHERE pembayaran='" . $r2['replid'] . "'");
        while ($r3 = dbFA($t3)) {
            $dibayar += $r3['nominal'];
            // print_r($r3);exit();
        }
        if ($fid == 0) {
            $fid = $r['replid'];
        }
        $xtable->td($r['nis'], 40);
        $xtable->td($r['nama']);
        $xtable->td(fRp($r2['nominal'] - $dibayar), 80, 'r');
        if (admin_isoperator()) {
            $s = '<button class="btn" title="Proses" onclick="E(\'siswa\').value=' . $r['replid'] . ';pembayaran_proses_get()"><div class="bi_arrow2b">&nbsp;</div></button>~36px';
        } else {
            $s = '<div style="height:23px;width:36px"></div>';
        }
        $xtable->opt($r['replid'], $s);