Exemplo n.º 1
0
function guru_db_byID($id,$f=""){
	$db=new xdb("aka_guru");
	$db->field("aka_guru:replid","aka_pelajaran:nama as npelajaran","hrd_pegawai:nip,nama as npegawai".($f==""?"":", ".$f));
	$db->join("pegawai","hrd_pegawai");
	$db->join("pelajaran","aka_pelajaran");
	$db->where_and("aka_guru.replid='$id'");
	return $db;
}
Exemplo n.º 2
0
function calonsiswa_db_byID($id=0,$f=""){
	$db=new xdb("psb_calonsiswa");
	$db->field("psb_calonsiswa:replid,nopendaftaran,nama,proses,kelompok".($f==""?"":",".$f),"psb_proses:proses as nproses","psb_kelompok:kelompok as nkelompok");
	$db->join("proses","psb_proses");
	$db->join("kelompok","psb_kelompok");
	//$db->joinother("aka_kelas","tingkat","aka_tingkat");
	//$db->joinother("aka_tingkat","tahunajaran","aka_tahunajaran");
	//$db->joinother("aka_tahunajaran","departemen","departemen");
	$db->where("psb_calonsiswa.replid='$id'");
	return $db;
}
Exemplo n.º 3
0
function siswa_db_byID($id=0,$f=""){
	$db=new xdb("aka_siswa_kelas");
	$db->field("aka_siswa:replid,nis,nama".($f==""?"":",".$f),"aka_kelas:replid as idkelas,kelas as nkelas","departemen:nama as ndepartemen","aka_angkatan.angkatan as nangkatan");
	$db->join("siswa","aka_siswa");
	$db->join("kelas","aka_kelas");
	$db->joinother("aka_siswa","angkatan","aka_angkatan");
	$db->joinother("aka_kelas","tingkat","aka_tingkat");
	$db->joinother("aka_tingkat","tahunajaran","aka_tahunajaran");
	$db->joinother("aka_tahunajaran","departemen","departemen");
	$db->where("aka_siswa.replid='$id'");
	return $db;
}
Exemplo n.º 4
0
function pegawai_db_byID($id=0,$f=""){
	$db=new xdb("hrd_pegawai");
	$db->field("hrd_pegawai:replid,nip,nama".($f==""?"":",".$f));
	$db->where("hrd_pegawai.replid='$id'");
	return $db;
}
<?php require_once(MODDIR.'xtable/xtable.php'); require_once(MODDIR.'control.php');
$SOUF=stocktake_unfinished();
$fmod='katalog_buku_daftar';
$xtable=new xtable($fmod,'koleksi');
if($SOUF==0)$xtable->use_select();
$xtable->search_keyon('barkode=>pus_buku.barkode:EQ-1');
$xtable->pageorder="pus_buku.barkode";
if($SOUF!=0)$xtable->noopt=true;

$kat=gpost('katalog',0);
$lok=gpost('lokasi');
$lokasi=lokasi_r($lokasi,1);

$db=new xdb("pus_buku");
$db->field("pus_buku.*","pus_lokasi:nama as nlokasi","pus_tingkatbuku:nama as ntingkat");
$db->join("lokasi","pus_lokasi");
$db->join("tingkatbuku","pus_tingkatbuku");
$db->where("pus_buku.katalog='$kat'");
$db->where_and($xtable->search_sql_get());
if($lok!=0) $db->where_and("pus_buku.lokasi='$lok'");

$t=$db->query();
$xtable->ndata=mysql_num_rows($t);
$t=$db->query($xtable->pageorder_sql('pus_buku.barkode','pus_buku.idbuku','pus_buku.callnumber','pus_buku.sumber','pus_buku.harga','pus_buku.tanggal','pus_buku.status','nlokasi','ntingkat'));

// Page Selection Bar
$PSBar = new PSBar_2(100);
$PSBar->begin();
	if(count($lokasi)>0){
		$PSBar->selection('Lokasi',iSelect('lokasi',$lokasi,$lok,$PSBar->selws,$fmod."_get()"));
	} else {
Exemplo n.º 6
0
require_once MODDIR . 'control.php';
$opt = gpost('opt');
$cid = gpost('cid');
if ($cid == '') {
    $cid = 0;
}
$mtipe = gpost('mtipe');
if ($mtipe == '') {
    $mtipe = 0;
}
$fmod = 'peminjaman_buku';
$xtable = new xtable($fmod, 'Item');
$xtable->optw = '50px';
// Query
$db = new xdb("pus_peminjaman");
$db->field('pus_peminjaman:*', 'pus_buku:callnumber,barkode', 'pus_katalog:judul');
$db->join('buku', 'pus_buku');
$db->joinother('pus_buku', 'katalog', 'pus_katalog', 'replid');
$db->where("pus_peminjaman.member='{$cid}' AND pus_peminjaman.mtipe='{$mtipe}'");
$db->order("pus_peminjaman.status DESC");
//echo $db->getsql();
$t = $db->query();
$xtable->ndata = mysql_num_rows($t);
//$xtable->btnbar_begin();
//	echo '<button class="btn" title="Tambah item" onclick="'.$fmod.'_form(\'af\')"><div class="bi_add">Item</div></button>';
//$xtable->btnbar_end();
echo '<div style="float:none !important">';
if ($xtable->ndata > 0) {
    // Table head
    $xtable->head('barkode', 'Callnumber', 'Judul', 'status', 'Dikembalikan Tgl');
    while ($r = mysql_fetch_array($t)) {
Exemplo n.º 7
0
$fmod = 'statistik';
$xtable = new xtable($fmod, 'Buku');
//$xtable->use_select();
$xtable->noopt = true;
$xtable->pageorder = "cnt DESC,barkode,judul";
$lok = gpost('lokasi');
$lokasi = lokasi_r($lok);
$tgl1 = date("Y-m-") . "1";
$tgl2 = date("Y-m-") . cal_days_in_month(CAL_GREGORIAN, intval(date("m")), intval(date("Y")));
$tanggal1 = gpost('tanggal1', $tgl1);
$tanggal2 = gpost('tanggal2', $tgl2);
// Query
$xtable->search_keyon('barkode=>pus_buku.barkode:EQ-0', 'judul=>pus_katalog.judul-1', 'callnumber=>pus_buku.callnumber-2', 'kode(kode klasifikasi)=>pus_klasifikasi.kode:EQ-3', 'pengarang(nama pengarang)=>pus_pengarang.nama-4', 'penerbit(nama penerbit)=>pus_penerbit.nama-5');
$db = new xdb('pus_peminjaman');
$db->field('pus_peminjaman:replid', 'pus_buku:callnumber', 'pus_katalog:judul,klasifikasi,pengarang,penerbit', 'pus_klasifikasi:kode as n1,kode', 'pus_pengarang:nama as n2', 'pus_penerbit:nama as n3', 'COUNT(pus_peminjaman.buku) as cnt');
$db->join('buku', 'pus_buku');
$db->joinother('pus_buku', 'katalog', 'pus_katalog');
$db->joinother('pus_katalog', 'klasifikasi', 'pus_klasifikasi');
$db->joinother('pus_katalog', 'pengarang', 'pus_pengarang');
$db->joinother('pus_katalog', 'penerbit', 'pus_penerbit');
$db->where($lok == 0 ? "" : "pus_buku.lokasi='{$lok}'");
$db->where_and("pus_peminjaman.tanggal1 >= '{$tanggal1}'");
$db->where_and("pus_peminjaman.tanggal1 <= '{$tanggal2}'");
$db->where_and($xtable->search_sql_get());
$db->group("pus_buku.katalog");
$t = $db->query();
$xtable->ndata = mysql_num_rows($t);
$t = $db->query($xtable->pageorder_sql('judul', 'callnumber', 'n1', 'n2', 'n3', 'cnt'));
// Page Selection Bar
$PSBar = new PSBar_2(100, 450);
$PSBar->begin();
	if(count($lokasi)>0){
		$PSBar->selection('Lokasi',iSelect('ff2_lokasi',$lokasi,$lok,$PSBar->selws,"pengembalian_buku_get_cari(1)"));
	} else {
		$PSBar->end();
		hiddenval('pslokasi',$lok);
		lokasi_warn(0,'float:left');
		$PSBar->pass=false;
	}
$PSBar->end();
if($PSBar->pass){

$xtable->search_box('barkode atau judul item');
			  
$db=new xdb("pus_peminjaman");
$db->field("pus_peminjaman:replid,tanggal1,tanggal2","pus_buku:replid as ibuku,barkode","pus_katalog:judul");
$db->join("buku","pus_buku");
$db->joinother("pus_buku","katalog","pus_katalog");
$db->where_and("pus_buku.lokasi='$lok'");
$db->where_and("pus_peminjaman.status='1'");
$db->where_and("!( NOT EXISTS (SELECT pus_tpjm.replid FROM pus_tpjm WHERE pus_tpjm.peminjaman=pus_peminjaman.replid) )");
$db->where_and($xtable->search_sql_get());
$t=$db->query();
$xtable->ndata=mysql_num_rows($t);
$t=$db->query($xtable->pageorder_sql('pus_buku.barkode','pus_katalog.judul'));

if($xtable->ndata>0){
	echo '<div style="width:100%;height:300px;max-height:300px;overflow:auto;float:left">';
	$xtable->head('@Barkode','@Judul','{44px}');
	$n=0;
	while($r=mysql_fetch_array($t)){$xtable->row_begin($r['replid']);
Exemplo n.º 9
0
    require_once VWDIR . 'pengembalian_form.php';
} else {
    hiddenval('member_id', 0);
    hiddenval('member_tipe', 0);
    $tgl1 = date("Y-m-") . "1";
    $tgl2 = date("Y-m-") . cal_days_in_month(CAL_GREGORIAN, intval(date("m")), intval(date("Y")));
    $tanggal1 = gpost('tanggal1', $tgl1);
    $tanggal2 = gpost('tanggal2', $tgl2);
    $PSBar = new PSBar_2(100, 450);
    $PSBar->begin();
    $s = '<button style="float:left;margin:0px 4px 0px 4px" class="btn" title="Tampilkan" onclick="' . $fmod . '_get()"><div class="bi_srcb">&nbsp;</div></button>';
    $PSBar->selection('Periode', inputTanggal('tanggal1', $tanggal1) . ' <div style="float:left;margin:4px 8px 0px 8px">sampai</div> ' . inputTanggal('tanggal2', $tanggal2) . $s);
    $PSBar->end();
    // Query
    $db = new xdb("pus_peminjaman");
    $db->field("pus_peminjaman:*", "pus_buku:barkode", "pus_katalog:judul", "DATEDIFF(pus_peminjaman.tanggal3,pus_peminjaman.tanggal2) as telat", "aka_siswa:nis,nama as nsiswa", "hrd_pegawai:nip,nama as npegawai");
    $db->join("buku", "pus_buku");
    $db->join("member", "aka_siswa");
    $db->join("member", "hrd_pegawai");
    $db->joinother("pus_buku", "katalog", "pus_katalog");
    $db->where("pus_peminjaman.status = '0'");
    $db->where_and("pus_peminjaman.tanggal3 >= '{$tanggal1}'");
    $db->where_and("pus_peminjaman.tanggal3 <= '{$tanggal2}'");
    $db->where_and($xtable->search_sql_get());
    $t = $db->query();
    $xtable->ndata = mysql_num_rows($t);
    $t = $db->query($xtable->pageorder_sql('barkode', 'judul', 'nsiswa,npegawai', 'tanggal1', 'tanggal2', 'tanggal3', 'telat'));
    $xtable->btnbar_begin();
    if ($SOUF == 0) {
        $xtable->btnbar_add();
    } else {
Exemplo n.º 10
0
$xtable = new xtable($fmod, 'Buku');
if ($SOUF == 0) {
    $xtable->use_select();
}
$xtable->pageorder = "barkode,judul";
if ($SOUF != 0) {
    $xtable->noopt = true;
}
$lok = gpost('lokasi');
$lokasi = lokasi_r($lok, 1);
$jen = gpost('jenisbuku');
$jenisbuku = jenisbuku_r($jen, 1);
// Query
$xtable->search_keyon('barkode=>pus_buku.barkode:EQ-0', 'judul=>pus_katalog.judul-1', 'callnumber=>pus_buku.callnumber-2', 'kode(kode klasifikasi)=>pus_klasifikasi.kode:EQ-3', 'pengarang(nama pengarang)=>pus_pengarang.nama-4', 'penerbit(nama penerbit)=>pus_penerbit.nama-5');
$db = new xdb('pus_buku');
$db->field('pus_buku:replid,katalog,lokasi,barkode,idbuku,callnumber,status', 'pus_katalog:judul,klasifikasi,pengarang,penerbit', 'pus_klasifikasi:kode as n1,kode', 'pus_pengarang:nama as n2', 'pus_penerbit:nama as n3');
$db->join('katalog', 'pus_katalog');
$db->joinother('pus_katalog', 'klasifikasi', 'pus_klasifikasi');
$db->joinother('pus_katalog', 'pengarang', 'pus_pengarang');
$db->joinother('pus_katalog', 'penerbit', 'pus_penerbit');
$db->where($lok == 0 ? "" : "pus_buku.lokasi='{$lok}'");
$db->where_and($jen == 0 ? "" : "pus_katalog.jenisbuku='{$jen}'");
$db->where_and($xtable->search_sql_get());
$t = $db->query();
$xtable->ndata = mysql_num_rows($t);
$t = $db->query($xtable->pageorder_sql('barkode', 'judul', 'callnumber', 'n1', 'n2', 'n3', 'status'));
// Page Selection Bar
$PSBar = new PSBar_2(100);
$PSBar->begin();
if (count($lokasi) > 0) {
    $PSBar->selection('Lokasi', iSelect('lokasi', $lokasi, $lok, $PSBar->selws, $fmod . "_get()"));
Exemplo n.º 11
0
    $sel++;
}
$fct = $w;
if ($sel > 0) {
    $t0 = mysql_query("SELECT keu_jurnal.rek,keu_rekening.kode as koderek,keu_rekening.nama as nrek,keu_rekening.kategorirek FROM keu_jurnal LEFT JOIN keu_rekening ON keu_rekening.replid=keu_jurnal.rek LEFT JOIN keu_transaksi ON keu_transaksi.replid=keu_jurnal.transaksi WHERE keu_transaksi.tahunbuku='{$tahunbuku}' AND keu_transaksi.tanggal >= '{$tanggal1}' AND keu_transaksi.tanggal <= '{$tanggal2}' " . ($fct == "" ? "" : " AND (" . $fct . ")") . " GROUP BY keu_jurnal.rek ORDER BY keu_rekening.kode");
    $neracasaldo = array();
    $labarugi = array();
    $rekaktiva = array();
    $rekpasiva = array();
    if (mysql_num_rows($t0) > 0) {
        while ($jd = mysql_fetch_array($t0)) {
            $rek = $jd['rek'];
            $kategorirek = $jd['kategorirek'];
            $neracasaldo[$rek] = array('debet' => 0, 'kredit' => 0, 'kode' => $jd['koderek'], 'nama' => $jd['nrek'], 'kategorirek' => $kategorirek);
            $db = new xdb("keu_jurnal");
            $db->field("keu_jurnal:*", "keu_rekening:kode as koderek,nama as nrek", "keu_transaksi:tanggal");
            $db->join("transaksi", "keu_transaksi");
            $db->join("rek", "keu_rekening");
            $db->where_and("keu_transaksi.tahunbuku='{$tahunbuku}'");
            $db->where_and("keu_jurnal.rek='{$rek}'");
            $db->where_and("keu_transaksi.tanggal >= '{$tanggal1}'");
            $db->where_and("keu_transaksi.tanggal <= '{$tanggal2}'");
            $db->where_and($fct == "" ? "" : "(" . $fct . ")");
            $db->order("keu_transaksi.tanggal,keu_transaksi.nomer");
            $t = $db->query();
            if ($xtable->ndata > 0) {
                $debet = 0;
                $kredit = 0;
                while ($r = mysql_fetch_array($t)) {
                    $debet += $r['debet'];
                    $kredit += $r['kredit'];
Exemplo n.º 12
0
if($opt=='af'||$opt=='uf') require_once(VWDIR.'peminjaman_form.php');
else{
$tgl1=date("Y-m-")."1";
$tgl2=date("Y-m-").cal_days_in_month(CAL_GREGORIAN,intval(date("m")),intval(date("Y")));
$tanggal1=gpost('tanggal1',$tgl1);
$tanggal2=gpost('tanggal2',$tgl2);

$PSBar = new PSBar_2(100,450);
$PSBar->begin();
	$s='<button style="float:left;margin:0px 4px 0px 4px" class="btn" title="Tampilkan" onclick="'.$fmod.'_get()"><div class="bi_srcb">&nbsp;</div></button>';
	$PSBar->selection('Tanggal',inputTanggal('tanggal1',$tanggal1).'<div style="float:left;margin:4px 12px 0px 8px">sampai</div>'.inputTanggal('tanggal2',$tanggal2).$s);
$PSBar->end();

// Query
$db=new xdb("pus_peminjaman");
$db->field("pus_peminjaman:*","pus_buku:barkode","pus_katalog:judul","aka_siswa:nis,nama as nsiswa","hrd_pegawai:nip,nama as npegawai");
$db->join("buku","pus_buku");
$db->join("member","aka_siswa");
$db->join("member","hrd_pegawai");
$db->joinother("pus_buku","katalog","pus_katalog");
$db->where_and("pus_peminjaman.tanggal1 >= '$tanggal1'");
$db->where_and("pus_peminjaman.tanggal1 <= '$tanggal2'");
$db->where_and($xtable->search_sql_get());

$t=$db->query();
$xtable->ndata=mysql_num_rows($t);
$t=$db->query($xtable->pageorder_sql('pus_buku.barkode','pus_katalog.judul','nsiswa,npegawai','pus_peminjaman.tanggal1','pus_peminjaman.tanggal2','pus_peminjaman.status'));

$xtable->btnbar_begin();
	if($SOUF==0) $xtable->btnbar_add();
	else echo '<div class="warnbox">Peminjaman tidak dapat dilakukan selama proses stock opname berlangsung.</div>';
Exemplo n.º 13
0
<?php

$ssid = session_id();
require_once MODDIR . 'xtable/xtable.php';
require_once MODDIR . 'control.php';
$fmod = 'peminjaman_buku';
$xtable = new xtable($fmod, 'Item');
$xtable->optw = '50px';
// Query
$db = new xdb("pus_tpjm");
$db->field('pus_tpjm:*', 'pus_buku:callnumber,idbuku', 'pus_katalog:judul');
$db->join('buku', 'pus_buku');
$db->joinother('pus_buku', 'katalog', 'pus_katalog', 'replid');
$db->where("ssid='{$ssid}'");
$t = $db->query();
$xtable->ndata = mysql_num_rows($t);
$xtable->btnbar_begin();
echo '<button class="btn" title="Tambah item" onclick="' . $fmod . '_form(\'af\')"><div class="bi_add">Item</div></button>';
$xtable->btnbar_end();
echo '<div style="float:none !important">';
if ($xtable->ndata > 0) {
    // Table head
    $xtable->head('!ID Buku', 'Callnumber', 'Judul');
    while ($r = mysql_fetch_array($t)) {
        $xtable->row_begin();
        //$xtable->td('<button class="btn" onclick="peminjaman_baliktabelpinjam('.$r['barang'].')" title="Hapus dari daftar barang yang dipinjam."><div class="bi_canb">&nbsp</div></button>',30,'c');
        $xtable->td($r['idbuku'], 100);
        $xtable->td($r['callnumber'], 120);
        $xtable->td(buku_judul($r['judul']));
        $s = '<button class="btn" onclick="peminjaman_buku_form(\'d\',' . $r['replid'] . ')" title="Keluarkan dari daftar"><div class="bi_canb">&nbsp;</div></button>~30';
        $xtable->opt($r['replid'], $s);
Exemplo n.º 14
0
                echo $nophoto;
            }
        } else {
            echo $nophoto;
        }
    } else {
        echo $nophoto;
    }
    echo '</div></div>';
}
$keyw = gets('keyword');
$keysel = gets('keysel');
$keyon = gets('keyon', 'judul');
$urut = gets('urut', 'az');
$db = new xdb("pus_katalog");
$db->field("pus_katalog:replid,judul,tahunterbit,klasifikasi", "pus_pengarang:nama as npengarang", "pus_klasifikasi:kode,nama as nklas");
$db->join("pengarang", "pus_pengarang");
$db->join("klasifikasi", "pus_klasifikasi");
if (!(empty($keyw) && empty($keysel))) {
    if ($keyon == 'judul') {
        $db->where_and("pus_katalog.judul LIKE '%" . $keyw . "%'");
        $keysel = 0;
    } else {
        if ($keyon == 'pengarang') {
            $db->where_and("pus_pengarang.nama LIKE '%" . $keyw . "%'");
            $keysel = 0;
        } else {
            if ($keyon == 'klasifikasi') {
                if ($keysel != 0) {
                    $db->where_and("pus_klasifikasi.replid='" . $keysel . "'");
                }
Exemplo n.º 15
0
			}
			else {
				echo $nophoto;
			}
		} else {
			echo $nophoto;
		}		
	} else {
		echo $nophoto;
	}
	echo '</div></div>';
}

$keyw=gets('keyword');
$db=new xdb("pus_katalog");
$db->field("pus_katalog:replid,judul","pus_pengarang:nama as npengarang");
$db->join("pengarang","pus_pengarang");
$db->order("pus_katalog.judul");

if($keyw!='') $db->where_and("pus_katalog.judul LIKE '%".$keyw."%'");
$t=$db->query();
$ndata=mysql_num_rows($t);

?>
<div style="margin-right: 20px; margin-left: 20px;">	
	<table width="100%" cellspacing="0px" cellpadding="0" style="margin:auto"><tbody><tr><td align="center">
	<table width="100%" cellspacing="0px" cellpadding="0" style="width:840px;margin-top:10px;margin-bottom:20px"><tr valign="top">
		<td style="" width="100px"><div style="height: 32px;width: 85px;background: url('<?=IMGR?>siadu_32.png') no-repeat;"></div></td>
		<td><div style="color: #fff;font: 18px <?=SFONT?>;cursor: default;">Perpustakaan</div></td>
	</tr></table>
	<div style="width:840px;height:30px;">
Exemplo n.º 16
0
<?php
$fmod='member_lain';
$xtable=new xtable($fmod,'member','',0,'member');
$xtable->search_keyon('kunci=>pus_member.nid:EQ|pus_member.nama:LIKE-0,1');

/*
SELECT aka_siswa.replid, aka_siswa.nis, aka_siswa.nama, COUNT( pus_peminjaman.buku ) AS cnt
FROM aka_siswa
LEFT JOIN pus_peminjaman ON ( pus_peminjaman.member = aka_siswa.replid
AND pus_peminjaman.mtipe =  '1' ) 
GROUP BY aka_siswa.replid
*/

// Query
$db=new xdb('pus_member');
$db->field('pus_member:*',"COUNT(pus_peminjaman.buku) as cnt","SUM(CASE pus_peminjaman.status WHEN '1' THEN 1 ELSE 0 END) as cntpjm");
$db->join_cust("pus_peminjaman ON (pus_peminjaman.member = pus_member.replid AND pus_peminjaman.mtipe = '3')");
$db->where_and($xtable->search_sql_get());
$db->group("pus_member.replid");

$t=$db->query();
$xtable->ndata=mysql_num_rows($t);
$t=$db->query($xtable->pageorder_sql('pus_member.nid','pus_member.nama','','','cntpjm','cnt'));

$xtable->btnbar_begin();
	$xtable->btnbar_add();
	$xtable->search_box('nomor ID atau nama member');
$xtable->btnbar_end();

if($xtable->ndata>0){
	// Table head
<?php $ssid=session_id(); require_once(MODDIR.'xtable/xtable.php'); require_once(MODDIR.'control.php');
$fmod='sirkulasi_pengembalian_form_buku';
$xtable = new xtable($fmod,'Item','',2);
$xtable->pageorder='pus_tpjm.replid DESC';

// Query
$db=new xdb("pus_tpjm");
$db->field('pus_tpjm:replid','pus_peminjaman:tanggal1,tanggal2','pus_buku:barkode,idbuku','pus_katalog:judul');
$db->join('peminjaman','pus_peminjaman');
$db->joinother('pus_peminjaman','buku','pus_buku');
$db->joinother('pus_buku','katalog','pus_katalog','replid');
$db->where("ssid='$ssid'");
$t=$db->query();
$xtable->ndata=mysql_num_rows($t);

echo '<div style="float:none !important">';
if($xtable->ndata>0){
	// Table head
	$xtable->head('Barkode','Judul','Tgl pengembalian','Terlambat','{44px}');
	while($r=mysql_fetch_array($t)){$xtable->row_begin();
				
		//$xtable->td('<button class="btn" onclick="pengembalian_baliktabelpinjam('.$r['barang'].')" title="Hapus dari daftar barang yang dipinjam."><div class="bi_canb">&nbsp</div></button>',30,'c');
		$xtable->td($r['barkode'],100);
		$xtable->td(buku_judul($r['judul']));
		$xtable->td(fftgl($r['tanggal2']),110);
		$telat=diffDay($r['tanggal2']);
		$xtable->td(($telat<0?(-$telat).' hari':'-'),80);
		$s='<button class="btn" onclick="'.$fmod.'_form(\'d\','.$r['replid'].')" title="Keluarkan dari daftar"><div class="bi_canb">&nbsp;</div></button>~40';
		$xtable->opt($r['replid'],$s);
		
	$xtable->row_end();}$xtable->foot();
Exemplo n.º 18
0
$fform->head('Daftar Pengecekan Item');
echo '<tr><td><div id="data_member" style="height:350px;overflow:auto">';

$tbl=stocktake_ctable();

$fmod='stocktake_daftar';
$xtable=new xtable($fmod,'item');
$xtable->noopt=true;
$xtable->pageorder="cek,ts";
$xtable->search_box_pos('l');
$xtable->search_keyon('barkode=>'.$tbl.'.barkode:EQ-0');

// Query
//$sql="SELECT * FROM ".$tbl." ORDER BY cek,ts";
$db=new xdb($tbl);
$db->field($tbl.":*","josh.pus_katalog:judul");
$db->join("buku","josh.pus_buku");
$db->joinother("josh.pus_buku","katalog","josh.pus_katalog");
$db->where($xtable->search_sql_get());
$t=$db->query();
$xtable->ndata=mysql_num_rows($t);
$t=$db->query($xtable->pageorder_sql($tbl.".barkode","josh.pus_katalog.judul",$tbl.".cek,@".$tbl.".barkode",$tbl.".ts"));

$ncek_y=mysql_num_rows(mysql_query("SELECT * FROM ".$tbl." WHERE cek='Y'"));
$ncek=mysql_num_rows(mysql_query("SELECT * FROM ".$tbl));

if($ncek_y<$ncek){
echo '<div class="infobox">Item yang sudah di cek : <b>'.$ncek_y.'</b> dari <b>'.$ncek.'</b> item.</div>';
} else {
echo '<div class="infobox">Semua item sebanyak <b>'.$ncek.'</b> item sudah dicek.</div>';
}
Exemplo n.º 19
0
$stanggal2=gpost('stanggal2',$tgl_l);
hiddenval('tanggal_f',$tgl_f);
hiddenval('tanggal_c',$tgl_c);
hiddenval('tanggal_l',$tgl_l);

$xtable = new xtable($fmod,'peminjaman');
$xtable->pageorder="pus_peminjaman.tanggal1 DESC,pus_peminjaman.replid DESC";
$xtable->search_keyon('barkode=>pus_buku.barkode:EQ-2',
					  'judul=>pus_katalog.judul:LIKE-3',
					  'memberid(ID member)=>aka_siswa.nis:EQ|hrd_pegawai.nip:EQ|pus_member.nid:EQ-1',
					  'nama(nama member)=>aka_siswa.nama:LIKE|hrd_pegawai.nama:LIKE|pus_member.nama:LIKE-1');

					  
// Query
$db=new xdb("pus_peminjaman");
$db->field("pus_peminjaman:*","pus_buku:barkode","pus_katalog:judul","aka_siswa:nis,nama as nsiswa","hrd_pegawai:nip,nama as npegawai","pus_member:nid,nama as nmember");//,"(CASE pus_peminjaman.mtipe WHEN '1' THEN aka_siswa.nis WHEN '2' THEN hrd_pegawai.nip ELSE pus_member.nid END) as id_member");//,"@id_member:= as idmmbr");//,"(CASE pus_peminjaman.status='1' AND '".date("Y-m-d")."' > pus_peminjaman.tanggal2 WHEN TRUE THEN '1' ELSE '0' END) as telat1","(CASE pus_peminjaman.status='0' AND pus_peminjaman.tanggal3 > pus_peminjaman.tanggal2 WHEN TRUE THEN '1' ELSE '0' END) as telat2");
$db->join("buku","pus_buku");
$db->join("member","aka_siswa");
$db->join("member","hrd_pegawai");
$db->join("member","pus_member");
$db->joinother("pus_buku","katalog","pus_katalog");
$db->where_and("pus_peminjaman.tanggal".$ct_periode." >= '$stanggal1'");
$db->where_and("pus_peminjaman.tanggal".$ct_periode." <= '$stanggal2'");
$db->where_and($w1);
$db->where_and($w2);
$db->where_and($w3);
if($xtable->keyn=='memberid' && $xtable->page_search==1){
	$db->where_and("!((CASE pus_peminjaman.mtipe WHEN '1' THEN aka_siswa.nis WHEN '2' THEN hrd_pegawai.nip ELSE pus_member.nid END) = '".$xtable->keyw."')");
} else if($xtable->keyn=='nama' && $xtable->page_search==1){
	if($xtable->keyw=='') $keywo=" = '' ";
	else $keywo=" LIKE '%".$xtable->keyw."%' ";
Exemplo n.º 20
0
            // edit
            $q = dbUpdate($dbtable, $inp, "siswa='{$cid}'");
        } else {
            if ($opt == 'd') {
                // delete
                $q = dbDel($dbtable, "siswa='{$cid}'");
                $q = dbQSql("UPDATE aka_siswa SET aktif='1' WHERE replid='{$cid}'");
            }
        }
    }
    $fform->notif($q);
} else {
    if ($opt == 'uf' || $opt == 'df') {
        // Prepocessing form
        $db = new xdb("aka_mutasi");
        $db->field("aka_mutasi:replid,jenismutasi,siswa,tanggal,keterangan", "aka_siswa:nis as snis,nama as ssiswa");
        $db->join("siswa", "aka_siswa");
        $db->where("aka_mutasi.siswa='{$cid}'");
        $r = $db->gofetch();
    } else {
        $r = array();
        $r['tanggal'] = date("Y-m-d");
    }
    $fform->dimension(500);
    $fform->head();
    if ($opt == 'af' || $opt == 'uf') {
        require_once MODDIR . 'control.php';
        // Add or Edit form
        $jenismutasi = jenismutasi_opt();
        //$fform->fl('Departemen',departemen_name($r['departemen']));
        $s = '<button id="mutasi_siswa_btn" title="Cari" class="btn" style="float:left" onclick="mutasi_siswa_formlist()"><div class="bi_srcb">&nbsp;</div></button>';
$PSBar->begin();
	if(count($lokasi)>0){
		$PSBar->selection('Lokasi',iSelect('ff2_lokasi',$lokasi,$lok,$PSBar->selws,"peminjaman_buku_get_cari(1)"));
	} else {
		$PSBar->end();
		hiddenval('pslokasi',$lok);
		lokasi_warn(0,'float:left');
		$PSBar->pass=false;
	}
$PSBar->end();
if($PSBar->pass){

$xtable->search_box('barkode atau judul item');
			  
$db=new xdb("pus_buku");
$db->field("pus_buku:replid","pus_buku:barkode","pus_katalog:judul");
$db->join("katalog","pus_katalog");
$db->where_and("pus_buku.lokasi='$lok'");
$db->where_and("pus_buku.status='1'");
$db->where_and("!( NOT EXISTS (SELECT pus_tpjm.replid FROM pus_tpjm WHERE pus_tpjm.buku=pus_buku.replid ) )");
$db->where_and($xtable->search_sql_get());
$t=$db->query();
$xtable->ndata=mysql_num_rows($t);
$t=$db->query($xtable->pageorder_sql('pus_buku.barkode','pus_katalog.judul'));

if($xtable->ndata>0){
	echo '<div style="width:100%;height:300px;max-height:300px;overflow:auto;float:left">';
	$xtable->head('@Barkode','@Judul','{44px}');
	$n=0;
	while($r=mysql_fetch_array($t)){$xtable->row_begin($r['replid']);
Exemplo n.º 22
0
$mtipe = gpost('mtipe');
if ($mtipe == '') {
    $mtipe = 0;
}
$fmod = 'peminjaman';
$xform = new xform($fmod, $opt, $cid);
if ($mtipe != 0) {
    $lbls = 'float:left;width:120px;margin-right:4px';
    $fs = 'float:left;width:200px;margin-right:4px';
    echo '<div style="float:left;margin-right:6px;width:62px;height:92px">';
    $xform->photof($cid . '-' . $mtipe, 'member', 60, 90, 'h');
    echo '</div>';
    echo '<div style="float:left;width:328px">';
    if ($mtipe == 1) {
        $db = new xdb("aka_siswa", "*", "aka_siswa.replid='{$cid}'");
        $db->field('aka_siswa:replid,nis,nama', 'aka_kelas:kelas');
        $db->join('replid', 'aka_siswa_kelas', 'siswa');
        $db->joinother('aka_siswa_kelas', 'kelas', 'aka_kelas');
        $t = $db->query();
        $r = mysql_fetch_array($t);
        echo '<div class="xrowl">';
        echo '<div class="sfont" style="font-size:14px;float:left:margin-right:4px;width:324px"><b>' . $r['nama'] . '</b></div>';
        echo '</div>';
        echo '<div class="xrowl">';
        echo '<div class="sfont" style="' . $lbls . '">ID member:</div>';
        echo '<div class="sfont" style="' . $fs . '">' . $r['nis'] . '</div>';
        echo '</div>';
        echo '<div class="xrowl">';
        echo '<div class="sfont" style="' . $lbls . '">Tipe member:</div>';
        echo '<div class="sfont" style="' . $fs . '">Siswa</div>';
        echo '</div>';
<?php $ssid=session_id(); require_once(MODDIR.'xtable/xtable.php'); require_once(MODDIR.'control.php');
$fmod='sirkulasi_peminjaman_form_buku';
$xtable = new xtable($fmod,'Item','',2);
$xtable->pageorder='pus_tpjm.replid DESC';

// Query
$db=new xdb("pus_tpjm");
$db->field('pus_tpjm:*','pus_buku:barkode,idbuku','pus_katalog:judul');
$db->join('buku','pus_buku');
$db->joinother('pus_buku','katalog','pus_katalog','replid');
$db->where("ssid='$ssid'");
$t=$db->query();
$xtable->ndata=mysql_num_rows($t);

echo '<div style="float:none !important">';
if($xtable->ndata>0){
	// Table head
	$xtable->head('Barkode','Judul','{44px}');
	while($r=mysql_fetch_array($t)){$xtable->row_begin();
				
		//$xtable->td('<button class="btn" onclick="peminjaman_baliktabelpinjam('.$r['barang'].')" title="Hapus dari daftar barang yang dipinjam."><div class="bi_canb">&nbsp</div></button>',30,'c');
		$xtable->td($r['barkode'],100);
		$xtable->td(buku_judul($r['judul']));
		$s='<button class="btn" onclick="'.$fmod.'_form(\'d\','.$r['replid'].')" title="Keluarkan dari daftar"><div class="bi_canb">&nbsp;</div></button>~40';
		$xtable->opt($r['replid'],$s);
		
	$xtable->row_end();}$xtable->foot();
}else{
	$xtable->nodata_cust('<span style="color:'.CLGREY.'"><i>Belum ada item yang dipilih.</i></span>');
}
echo '</div>';
Exemplo n.º 24
0
 $xtable->td('' . ($debet > 0 ? fRp($debet, 0) : 0) . '', 100, 'r', $s);
 $xtable->row_end();
 $xtable->foot();
 // Pengeluaran
 echo '<div class="sfont" style="font-size:13px;float:left;width:800px;text-align:left;margin-bottom:4px">';
 echo '<div style="float:left">Pengeluaran:</div>';
 echo '</div>';
 $xtable = new xtable($fmod);
 $xtable->noopt = true;
 $xtable->tbl_width = '800px';
 $xtable->tbl_style = 'float:left;margin-bottom:30px';
 $xtable->row_strip = false;
 $xtable->usepaggging = false;
 $xtable->cari = 0;
 $db_out = new xdb("keu_jurnal");
 $db_out->field("keu_jurnal:*", "keu_rekening:kode as koderek,nama as nrek", "keu_transaksi:tanggal,nomer,uraian");
 $db_out->join("transaksi", "keu_transaksi");
 $db_out->join("rek", "keu_rekening");
 $db_out->where_and("keu_transaksi.tahunbuku='{$tahunbuku}'");
 $db_out->where_and("keu_jurnal.rek='{$rek}'");
 $db_out->where_and("keu_transaksi.tanggal >= '{$tanggal1}'");
 $db_out->where_and("keu_transaksi.tanggal <= '{$tanggal2}'");
 $db_out->where_and("keu_jurnal.debet = '0'");
 $db_out->where_and($fct == "" ? "" : "(" . $fct . ")");
 $db_out->order("keu_transaksi.tanggal,keu_transaksi.nomer");
 $t = $db_out->query();
 $xtable->ndata = mysql_num_rows($t);
 // Table head
 $xtable->head('Tanggal', 'Nomor Transaksi{120px}', 'Uraian', 'Nominal{R}');
 if ($xtable->ndata > 0) {
     while ($r = mysql_fetch_array($t)) {
Exemplo n.º 25
0
         $inp['siswa'] = $r['replid'];
         $inp['nominal'] = $r['biaya'];
         $inp['cicilan'] = $r['biaya'];
         $q = dbInsert("keu_pembayaran", $inp);
     }
 }
 // Tabel transaksi
 $fmod = 'modul_psb';
 $xtable = new xtable($fmod, 'Pembayan pendaftaran');
 $xtable->pageorder = "psb_calonsiswa.nopendaftaran";
 $xtable->search_keyon('nopendaftaran(nomor pendaftaran)=>psb_calonsiswa.nopendaftaran:EQ-0', 'nama=>psb_calonsiswa.nama-1');
 $xtable->noopt = true;
 $xtable->cari = $xtable->keyw == '' ? 0 : 1;
 // Query
 $db = new xdb("keu_pembayaran");
 $db->field("keu_pembayaran:*", "psb_calonsiswa:nama,nopendaftaran", "keu_transaksi:tanggal as tglbayar,nominal as jmlbayar");
 $db->join("siswa", "psb_calonsiswa");
 $db->join("modul", "keu_modul");
 $db->join("replid", "keu_transaksi", "pembayaran");
 $db->where("keu_modul.refid='{$pros}'");
 $db->where_and($kel == 0 ? "" : "psb_calonsiswa.kelompok='{$kel}'");
 if ($tampil == 'Y') {
     $db->where_and("keu_pembayaran.lunas='1'");
 }
 if ($tampil == 'N') {
     $db->where_and("keu_pembayaran.lunas='0'");
 }
 $db->where_and($xtable->search_sql_get());
 $t = $db->query();
 $xtable->ndata = mysql_num_rows($t);
 $t = $db->query($xtable->pageorder_sql("psb_calonsiswa.nopendaftaran", "psb_calonsiswa.nama", "", "", "keu_transaksi.tanggal", "keu_pembayaran.lunas"));
     hiddenval('angkatan', $angk);
     angkatan_warn(0, 'float:left');
     $PSBar->pass = false;
 }
 $PSBar->end();
 if ($PSBar->pass) {
     if ($opt == 'af' || $opt == 'uf') {
         require_once VWDIR . 'siswa_form.php';
     } else {
         $xtable = new xtable($fmod, 'siswa');
         $xtable->search_keyon('nis=>aka_siswa.nis:EQ', 'nama=>aka_siswa.nama:LIKE');
         $xtable->docname = "Data Siswa Angkatan " . angkatan_name($angk);
         $xtable->printparams = array('angkatan' => angkatan_name($angk));
         // Query
         $db = new xdb("aka_siswa");
         $db->field("aka_siswa:replid,nis,nisn,nama,tmplahir,tgllahir");
         $db->where_and("aka_siswa.angkatan='{$angk}'");
         $db->where_and($xtable->search_sql_get());
         $t = $xtable->use_db($db, $xtable->pageorder_sql('nis', 'nisn', 'nama'));
         $xtable->btnbar_f('print', 'srcbox');
         if ($xtable->ndata > 0) {
             // Table head
             $xtable->head('@!NIS', '@!NISN', '@nama', 'Tempat Tanggal lahir', '{50px}');
             while ($r = mysql_fetch_array($t)) {
                 $xtable->row_begin();
                 $xtable->td($r['nis'], 80);
                 $xtable->td($r['nisn'], 120);
                 $xtable->td($r['nama']);
                 $xtable->td($r['tmplahir'] . ', ' . fftgl($r['tgllahir']), 100);
                 //$s='<button class="btn" title="Keluarkan siswa dari kelas ini." onclick="siswa_form(\'df\',\''.$r['replid'].'\')"><div class="bi_canb">&nbsp;</div></button>';
                 $xtable->opt($r['replid'], 'v');
Exemplo n.º 27
0
<?php require_once(MODDIR.'fform/fform.php'); require_once(MODDIR.'xform/xform.php'); $opt=gpost('opt');$cid=gpost('cid');if($cid=='')$cid=0; require_once(MODDIR.'control.php');

// form Module
$fmod='bahasa';
$dbtable='pus_katalog';
$fform=new fform($fmod,$opt,$cid);
$xform=new xform($fmod);

	$db=new xdb("pus_katalog");
	$db->field("pus_katalog:replid,judul,callnumber,penerjemah,editor,tahunterbit,kota,isbn,issn,seri,volume,edisi,photo","pus_pengarang:nama as npengarang","pus_klasifikasi:kode,nama as nklas","pus_bahasa:nama as nbahasa","pus_jenisbuku:nama as njenis");
	$db->join("pengarang","pus_pengarang");
	$db->join("klasifikasi","pus_klasifikasi");
	$db->join("bahasa","pus_bahasa");
	$db->join("jenisbuku","pus_jenisbuku");
	$db->where_and("pus_katalog.replid='$cid'");
	$t=$db->query();
	$r=mysql_fetch_array($t);
	
	$terbitan='';
	if($r['penerbit']!=0)$terbitan=penerbit_name($r['penerbit']);
	if($r['kota']!=''){
		if($terbitan!='')$terbitan.=', ';
		$terbitan.=$r['kota'];
	}
	if($r['tahunterbit']!=''){
		if($terbitan!='')$terbitan.=', ';
		$terbitan.=$r['tahunterbit'];
	}

	$tersedia=mysql_num_rows(mysql_query("SELECT * FROM pus_buku WHERE katalog='$cid' AND status='1'"));
	
$PSBar->begin();
	if(count($lokasi)>0){
		$PSBar->selection('Lokasi',iSelect('ff_lokasi',$lokasi,$lok,$PSBar->selws,"pengembalian_buku_get_cari(1)"));
	} else {
		$PSBar->end();
		hiddenval('pslokasi',$lok);
		lokasi_warn(0,'float:left');
		$PSBar->pass=false;
	}
$PSBar->end();
if($PSBar->pass){

$xtable->search_box('barkode atau judul item');
			  
$db=new xdb("pus_buku");
$db->field("pus_buku:replid,barkode,idbuku","pus_katalog:judul,callnumber");
$db->join("katalog","pus_katalog");
$db->where_and("pus_buku.lokasi='$lok'");
$db->where_and("!( NOT EXISTS (SELECT pus_tpjm.replid FROM pus_tpjm WHERE pus_tpjm.buku=pus_buku.replid ) )");
$db->where_and($xtable->search_sql_get());
$t=$db->query();
$xtable->ndata=mysql_num_rows($t);
$t=$db->query($xtable->pageorder_sql('pus_buku.barkode','pus_buku.callnumber','pus_katalog.judul'));

if($xtable->ndata>0){
	echo '<div style="width:100%;height:300px;max-height:300px;overflow:auto;float:left">';
	$xtable->head('@Barkode','@Callnumber','@Judul','{44px}');
	$n=0;
	while($r=mysql_fetch_array($t)){$xtable->row_begin($r['replid']);

		$xtable->td($r['barkode'],100);
Exemplo n.º 29
0
//$xtable->use_select();
$xtable->noopt=true;
$xtable->pageorder="cnt DESC,mtipe";

$lok=gpost('lokasi');
$lokasi=lokasi_r($lok);
$tgl1=date("Y-m-")."1";
$tgl2=date("Y-m-").cal_days_in_month(CAL_GREGORIAN,intval(date("m")),intval(date("Y")));
$tanggal1=gpost('tanggal1',$tgl1);
$tanggal2=gpost('tanggal2',$tgl2);

// Query
$xtable->search_keyon('memberid(ID member)=>aka_siswa.nis:EQ|hrd_pegawai.nip:EQ|pus_member.nid:EQ-0','nama(nama member)=>aka_siswa.nama:LIKE|hrd_pegawai.nama:LIKE|pus_member.nama:LIKE-1');
				
$db=new xdb("pus_peminjaman");
$db->field("pus_peminjaman:replid,member,mtipe","COUNT(pus_peminjaman.member) as cnt","aka_siswa:nis,nama as nsiswa","hrd_pegawai:nip,nama as npegawai","pus_member:nid,nama as nmember");
$db->join("buku","pus_buku");
$db->join("member","aka_siswa");
$db->join("member","hrd_pegawai");
$db->join("member","pus_member");
$db->where($lok==0?"":"pus_buku.lokasi='$lok'");
$db->where_and("pus_peminjaman.tanggal1 >= '$tanggal1'");
$db->where_and("pus_peminjaman.tanggal1 <= '$tanggal2'");
$db->where_and($xtable->search_sql_get());
$db->group("pus_peminjaman.mtipe,pus_peminjaman.member");

$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
Exemplo n.º 30
0
LEFT JOIN blogger_posts ON katalog.blogger_id = blogger_posts.blogger_id
    WHERE katalog.AUX = 3
 GROUP BY katalog.blogger_id
 ORDER BY post_count
*/
$xtable = new xtable($fmod,'katalog');
$xtable->search_keyon('judul=>pus_katalog.judul-0',
			  'isbn(barcode)=>pus_buku.barkode-1',
			  'kode(kode klasifikasi)=>pus_klasifikasi.kode:EQ-2',
			  'pengarang(nama pengarang)=>pus_pengarang.nama:LIKE-3',
			  'penerbit(nama penerbit)=>pus_penerbit.nama:LIKE-4');
$xtable->pageorder="pus_katalog.judul";
$xtable->rpp=$katalog_view=='list'?$xtable->rpp:21;
// Query			  
$db=new xdb("pus_katalog");
$db->field("pus_katalog:replid,judul,klasifikasi,pengarang,penerbit,kota,tahunterbit,halaman,isbn,deskripsi,callnumber","pus_klasifikasi:kode as n1,kode","pus_pengarang:nama as n2,nama2 as nkutip","pus_penerbit:nama as n3","COUNT(pus_buku.replid) as buku_count");
$db->join("replid","pus_buku","katalog");
$db->join("klasifikasi","pus_klasifikasi");
$db->join("pengarang","pus_pengarang");
$db->join("penerbit","pus_penerbit");
$db->where($xtable->search_sql_get());
$db->group("pus_katalog.replid");

$t=$db->query();
$xtable->ndata=mysql_num_rows($t);
$t=$db->query($xtable->pageorder_sql('judul','n1','n2','n3','callnumber','buku_count'));

$SOUF=stocktake_unfinished();

$xtable->btnbar_begin();
	if($SOUF==0) $xtable->btnbar_add();