Example #1
0
if ($keyw != '') {
    if ($ndata > 0) {
        $info = 'Hasil pencarian koleksi dengan judul  "<b>' . $keyw . '</b>". Ditemukan ' . $ndata . ' item.';
    } else {
        $info = 'Tidak ditemukan koleksi dengan judul  "<b>' . $keyw . '</b>".';
    }
    echo '<div class="infobox" style="border-radius:4px;background-color:#fff;box-shadow:0px 1px 4px rgba(0,0,0,0.5);color:#">';
    echo $info;
    echo ' <a href="index.php" class="linkb" style="color:">Tampilkan semua...</a></div>';
}
?>
		</div>
		<form id="search_form" action="index.php" method="get">
		<?php 
$ffun = 'opac_cari()';
echo iTextSrc('keyword', gets('keyword'), 'float:right~width:200px', 'Cari judul koleksi...', $ffun, 'onkeyup="gpage_cari(event,function(){' . $ffun . '})"');
?>
		</form>
	</div>
	<div id="pagebox" style="box-shadow:0px 4px 10px rgba(0,0,0,0.5)">
		<table width="100%" cellspacing="0px" cellpadding="0"><tbody><tr><td>
			<div id="loader" style="position: relative; width: 1246px; text-align: center; background-image: url(<?php 
echo IMGR;
?>
loader8.gif); height: 450px; display: none; background-position: 0% 0%; background-repeat: no-repeat no-repeat;"></div>
			<div id="page" style="overflow: visible;">
			<?php 
function photof($d = 0, $f = '$', $t = '')
{
    $photodir = '../photo/';
    if (empty($d)) {
$lokasi = lokasi_r($lok);
$PSBar = new PSBar_2(100);
$PSBar->begin();
if (count($lokasi) > 0) {
    $PSBar->selection('Lokasi', iSelect('pslokasi', $lokasi, $lok, $PSBar->selws, "peminjaman_buku_get_cari(1)"));
} else {
    $PSBar->end();
    hiddenval('pslokasi', $lok);
    lokasi_warn(0, 'float:left');
    $PSBar->pass = false;
}
//$PSBar->selection('Cari item',iTextSrc('pskeyword',$keyw,'float:left~width:250px','barkode atau judul item...',"peminjaman_buku_get_cari(1)"));
$PSBar->end();
if ($PSBar->pass) {
    $xtable->btnbar_begin();
    echo iTextSrc('pskeyword', $keyw, 'float:left~width:250px', 'cari barkode atau judul item...', "peminjaman_buku_get_cari(1)", 'onkeyup="peminjaman_buku_get_cari_do(event)"');
    $xtable->btnbar_end();
    if ($keyw != '') {
        $t = mysql_query("SELECT pus_buku.*,pus_katalog.judul FROM pus_buku LEFT JOIN pus_katalog ON pus_katalog.replid=pus_buku.katalog WHERE pus_buku.lokasi='{$lok}' AND pus_buku.status='1' " . ($keyw == "" ? "" : " AND (pus_katalog.judul LIKE '%{$keyw}%' OR pus_buku.barkode='{$keyw}') ") . " ORDER BY pus_buku.barkode,pus_katalog.judul");
        $xtable->ndata = mysql_num_rows($t);
        $xtable->search_info($keyw, 'Hasil pencarian item dengan barkode atau judul  "<b>' . $keyw . '</b>".', "E('pskeyword').value='';siswakelas_get_cari(1)");
        if ($xtable->ndata > 0) {
            //$xtable->optw='50px';
            $xtable->head('<input id="pscekt" type="checkbox" onclick="peminjaman_buku_get_cekall(this.checked)" />~C', 'Barkode', 'Callnumber', 'Judul');
            $n = 0;
            while ($r = mysql_fetch_array($t)) {
                $xtable->row_begin();
                $s = '<input id="pscek' . $n . '" value="' . $r['replid'] . '" type="checkbox" onclick="peminjaman_buku_get_cek(' . $n . ',this.checked)" />';
                $xtable->td($s, 20, 'c');
                $xtable->td(srcrep($keyw, $r['barkode']), 100);
                //$xtable->td($r['idbuku'],120);
Example #3
0
 function search_box($f = '', $c = "")
 {
     $this->usesearch = '1';
     $obtnbar = false;
     if (!$this->btnbar_isbegin) {
         $this->btnbar_begin();
         $obtnbar = true;
     }
     $nkey = count($this->keyons);
     //echo " search_box count this->keyon:".$nkey."; ";
     if ($c == "") {
         $c = "E('xtable" . $this->xtableid . "_page_search').value=1;" . $this->fmod . "_get(1)";
     }
     $this->keyph = $f == '' ? $this->keyph : $f;
     if ($this->search_box_pos == 'r') {
         echo '<div style="' . $this->search_box_style . '">';
         $kw = $this->cari == 0 ? "" : $this->keyw;
         echo iTextSrc('xtable' . $this->xtableid . '_keyword', $kw, $this->search_box_style . '~width:' . $this->search_box_w, $this->keyph . '...', $c, 'onkeyup="xtable' . $this->xtableid . '_cari(event,function(){' . $c . '})"');
         if ($nkey > 1) {
             if ($this->lang == 'en') {
                 $label = 'Find by';
             } else {
                 $label = 'Cari berdasarkan';
             }
             echo iSelect('xtable' . $this->xtableid . '_keyon', $this->keyons, $this->keyn, $this->search_box_style);
             echo '<div class="sfont" style="margin-top:4px;' . $this->search_box_style . '"><b>' . $label . ':</b></div>';
         } else {
             hiddenval('xtable' . $this->xtableid . '_keyon', $this->keyons[$this->keyn]);
         }
         echo '</div>';
     } else {
         echo '<div style="' . $this->search_box_style . '">';
         $kw = $this->cari == 0 ? "" : $this->keyw;
         if (count($this->keyons) > 1) {
             if ($this->lang == 'en') {
                 $label = 'Find by';
             } else {
                 $label = 'Cari berdasarkan';
             }
             echo '<div class="sfont" style="margin-top:4px;' . $this->search_box_style . '"><b>' . $label . ':</b></div>';
             echo iSelect('xtable' . $this->xtableid . '_keyon', $this->keyons, $this->keyn, $this->search_box_style);
         } else {
             //print_r($this->keyons);
             hiddenval('xtable' . $this->xtableid . '_keyon', $this->keyons[$this->keyn]);
         }
         echo iTextSrc('xtable' . $this->xtableid . '_keyword', $kw, $this->search_box_style . '~width:' . $this->search_box_w, $this->keyph . '...', $c, 'onkeyup="xtable' . $this->xtableid . '_cari(event,function(){' . $c . '})"');
         echo '</div>';
     }
     if ($obtnbar) {
         $this->btnbar_end();
     }
 }