<?php $nid = getsx('nid'); $t = mysql_query("SELECT * FROM " . DB_HRD . " WHERE nip='{$nid}' LIMIT 0,1"); $f = dbFAx($t); $member = $f['nip']; $membername = $r['fname']; ?> <div class="hl2" style="margin-bottom:6px">Member who wants to return book:</div> <?php require_once VWDIR . 'v_cir_staff_info.php'; require_once VWDIR . 'v_cir_staff_list.php'; ?> </div> <script type="text/javascript" language="javascript"> <?php if ($act == 'loan') { ?> $('document').ready(function(){ pqueue('cq',0); E('keyw').focus(); }); <?php } ?> </script>
<?php $q = getsx('q'); if ($q == "newcatalog") { $a = array('title', 'author', 'author2', 'publisher', 'class', 'classcode', 'isbn', 'release', 'series', 'language', 'cover'); $inp = array(); foreach ($a as $k => $v) { $inp[$v] = gpost($v); } if (dbInsert("catalog", $inp)) { $dcid = mysql_insert_id(); echo "T" . $dcid . "~Catalog information has been saved."; } else { echo 'F0~<span style="colo:#ff0000">Failed to save book information.</span>'; } } else { if ($q == "editcatalog") { $dcid = gpost('dcid'); $a = array('title', 'author', 'author2', 'publisher', 'class', 'classcode', 'isbn', 'release', 'series', 'language', 'cover'); $inp = array(); foreach ($a as $k => $v) { $inp[$v] = gpost($v); } if (dbUpdate("catalog", $inp, "dcid='{$dcid}'")) { echo "T" . $dcid . "~Catalog information has been saved."; } else { echo 'F0~<span style="colo:#ff0000">Failed to save book information.</span>'; } } else { if ($q == "addbook") { $a = array('catalog', 'barcode', 'nid', 'callnumber', 'shelf', 'source', 'sourceval');
<?php session_start(); require_once 'system/config.php'; require_once SYSDIR . 'db.php'; require_once LIBDIR . 'common.php'; $r['ntable'] = getsx('ntable'); ?> <html><head> <?php require_once SYDIR . 'main.php'; require_once MODDIR . 'control.php'; ?> <style type="text/css"> .box1{ color:#fff;width:76px;margin:0 2px 2px 0;float:left;background:#5595ff;text-align:center } .box0{ color:#999;width:76px;margin:0 2px 2px 0;float:left;background:#f0f0f0;text-align:center } </style> <script type="text/javascript" src="jsscript/jquery.js"></script> <script type="text/javascript"> function relod(){ location.reload(true); //alert('a'); //E('box').innerHTML=''; } </script> </head><body> <?php
<?php /* Pre Data Processing */ $loan_limit = dbFetch("val", "mstr_setting", "W/dcid=5"); require_once MODDIR . 'pagelink.php'; $nid = getsx('nid'); $t = mysql_query("SELECT * FROM " . DB_HRD . " WHERE nip='{$nid}' LIMIT 0,1"); $f = dbFAx($t); $member = dbFAx($t); // Show $show = gets('show') == 'all' ? '1' : '0'; // 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; $sf = true; } else { // Sorting fields $sfa = array('date2', 'status'); foreach ($sfa as $k => $v) { if ($sortby == $v) { $sf = true; } } if ($sf) { $sfi = $sortby; } else { $sfi = $sfa[0];
$smode = '1'; } else { $smode = '0'; } } // Queries: $t = mysql_query($sql); $ndata = mysql_num_rows($t); // Paging: $page_link = RLNK . "book.php?tab=manage"; // number per page $npp = 20; // number of page $nop = ceil($ndata / $npp); // current page $page = getsx('page'); if ($page == '') { $page = 1; } if (intval($page) > $ndata) { $page = $ndata; } if (intval($page) < 1) { $page = 1; } // number in page row start $nps = $npp * ($page - 1); // number in page row last $npl = $nps + $npp; // find item update location $l = -1;
<?php if (session_id() == "") { session_start(); } header('Content-type: image/jpeg'); require_once 'system/config.php'; require_once SYSDIR . 'db.php'; require_once LIBDIR . 'common.php'; $dcid = getsx('id'); $t = dbSel("photo", "emp_photo", "W/empid='{$dcid}'"); if (mysql_num_rows($t) > 0) { $r = dbFA($t); echo base64_decode($r['photo']); } else { echo "Error!"; }
<?php $keyw = trim(getsx('k')); $npf = 0; $ids = "ALL"; if ($keyw != '') { function src_replace($v) { global $keyw; return preg_replace("/" . $keyw . "/i", "<strong>\$0</strong>", $v); } function strBC($a) { $s = strval($a); if (strlen($s) < 5) { for ($i = strlen($s); $i < 5; $i++) { $s = '0' . $s; } } return $s; } if (preg_match("/^[0-9]+\$/", $keyw)) { // find by barcode $bcl = array(); $t = dbSel("barcode", "p_label"); while ($r = dbFA($t)) { $bcl[$r['barcode']] = '1'; } $sql = "SELECT * FROM book WHERE barcode='{$keyw}' LIMIT 0,1"; $q = mysql_query($sql); $n = mysql_num_rows($q);
"> < </a></td> <?php for ($n = 1; $n <= $nop; $n++) { ?> <td><a class="plink<?php echo $n != $page ? "\" title=\"Go to page {$n}\" href=\"" . pageLinkp($n, getsx('sortby'), getsx('mode'), getsx('q')) : "a"; ?> "><?php echo $n; ?> </a></td> <?php } ?> <td><a class="plink<?php echo $page < $nop ? "\" title=\"Go to next page\" href=\"" . pageLinkp($page + 1, getsx('sortby'), getsx('mode'), getsx('q')) : "o"; ?> "> > </a></td> </tr></table> <?php } ?> </td> </tr></table></div> <?php } else { ?> <div class="sfont" style="padding-top:30px;margin-bottom:20px">There is no stock take process finished</div> <button type="button" class="btn" value="Back" style="margin-right:6px" onclick="jumpTo('<?php echo RLNK; ?>
function getCPageLinkp() { $pg = getsx('page'); $sb = getsx('sortby'); $sm = getsx('mode'); $q = getsx('q'); return pageLinkp($pg, $sb, $sm, $q); }
<?php $r['ntable'] = getsx('lst'); $t = mysql_query("SELECT * FROM `" . $r['ntable'] . "cek`"); $i = 0; $cn = mysql_num_rows($t); $an = strval($cn); if (strlen($an) < 10) { for ($i = strlen($an); $i < 5; $i++) { echo "0"; } } echo $cn; $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