$t=$db->query(); $xtable->ndata=mysql_num_rows($t); $t=$db->query($xtable->pageorder_sql('nis,nip,nid','nsiswa,npegawai,nmember','mtipe','cnt')); // Page Selection Bar $PSBar = new PSBar_2(100,450); $PSBar->begin(); $PSBar->selection('Statistik',iSelect('statistik',$statistik,$stat,$PSBar->selws,$fmod."_get()")); if(count($lokasi)>0){ $PSBar->selection('Lokasi',iSelect('lokasi',$lokasi,$lok,$PSBar->selws,$fmod."_get()")); } else { $PSBar->end(); hiddenval('lokasi',$lok); lokasi_warn(0,'float:left'); $PSBar->pass=false; } $s='<button style="float:left;margin:0px 4px 0px 4px" class="btn" title="Tampilkan" onclick="'.$fmod.'_get()"><div class="bi_srcb"> </div></button>'; $PSBar->selection('Periode',inputTanggal('tanggal1',$tanggal1).'<div style="float:left;margin:4px 12px 0px 8px">sampai</div> '.inputTanggal('tanggal2',$tanggal2).$s); $PSBar->end(); if($PSBar->pass){ $xtable->btnbar_begin(); //echo '<button style="float:left;margin-right:4px" class="btn" title="Reload" onclick="'.$fmod.'_get()"><div class="bi_relb"> </div></button>'; $xtable->search_box(); //$xtable->btnbar_print(); $xtable->btnbar_end();
// Query $sql = "SELECT sar_pengembalian.*,sar_peminjaman.peminjam,sar_peminjaman.tempat,sar_peminjaman.tanggal1,sar_peminjaman.tanggal2,sar_peminjaman.barang,sar_barang.kode,sar_barang.katalog,sar_katalog.nama FROM sar_pengembalian LEFT JOIN sar_peminjaman ON sar_peminjaman.replid=sar_pengembalian.peminjaman LEFT JOIN sar_barang ON sar_barang.replid=sar_peminjaman.barang LEFT JOIN sar_katalog ON sar_katalog.replid=sar_barang.katalog WHERE sar_peminjaman.lokasi='{$lok}'"; //echo $sql; $t = mysql_query($sql); $xtable->ndata = mysql_num_rows($t); $xtable->btnbar_f('add'); $xtable->noopt = true; if ($xtable->ndata > 0) { // Table head $xtable->optw = '50px'; $xtable->head('Peminjam', 'Barang', 'Tanggal Peminjaman', 'Jadwal pengembalian', 'Tanggal dikembalikan', 'Tempat Peminjaman', 'Keterangan'); while ($r = mysql_fetch_array($t)) { $xtable->row_begin(); $xtable->td($r['peminjam'], 120); $xtable->td('Kode: <b>' . $r['kode'] . '</b><br/ >Nama barang: ' . $r['nama'], 250); $xtable->td(fftgl($r['tanggal1']), 140); $xtable->td(fftgl($r['tanggal2']), 140); $xtable->td(fftgl($r['tanggal']), 140); $xtable->td($r['tempat'], 200); $xtable->td(nl2br($r['keterangan'])); //$xtable->opt($r['replid'],'<button class="btn" title="Kembalikan barang ini." onclick="peminjaman_kembalikan(<id>)"><div class="bi_inb"> </div></button>~30'); $xtable->row_end(); } $xtable->foot(); } else { $xtable->nodata(); } } } else { lokasi_warn(); }