Exemplo n.º 1
0
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 '';
	}
}
Exemplo n.º 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;
}
Exemplo n.º 3
0
function rapor_pelajaran_nilai($pel,$kls,$siswa){
	$nilai=0; $bobot=0;
	$t1=dbSel("*","aka_penilaian","W/pelajaran='$pel' AND kelas='$kls'");
	while($r1=dbFA($t1)){
		$t2=dbSel("nilai","aka_daftarnilai","W/siswa='$siswa' AND penilaian='".$r1['replid']."'");
		//echo $_SESSION['libdb_dbQsql'];
		while($r2=dbFA($t2)){
			$nilai+=$r2['nilai']*$r1['bobot'];
		}
		$bobot+=$r1['bobot'];
	}
	if($bobot>0){
		$nilai=$nilai/$bobot;
	} else {
		$nilai=0;
	}
	return $nilai;
}
Exemplo n.º 4
0
$cview = "employee";
// current view
$ct_bg = "folderico.png";
$ct_title = "Edit Profile";
function tdLabel($a, $s = "", $w = "150px", $cs = 0)
{
    $s = $s == "L" ? "text-align:left" : $s;
    return "<td width=\"" . $w . "\"" . ($cs == 0 ? "" : " colspan=\"" . $cs . "\"") . " align=\"right\" style=\"padding-right:6px;" . $s . "\">{$a}:</td>";
}
// Global Variables
$mstr_marital = MstrGet("mstr_marital");
$mstr_religion = MstrGet("mstr_religion");
$mstr_family = MstrGet("mstr_family");
// Preprocessing Variables
$dcid = gets('nid');
$t = dbSel("*", "employee", "W/ dcid='{$dcid}'");
$empp = dbFAx($t);
?>
<html><head>
<?php 
require_once VWDIR . 'style.php';
require_once SYDIR . 'preferences.php';
?>
<style type="text/css">.preftbl{border-radius:2px;padding:1px;border-collapse:collapse}.preftbl tr{border:1px solid #d0d0d0; height:16px;background:#ffffff}.preftbl td{font:11px 'Segoe UI', Tahoma, sans-serif;color:#303942}.preftbl tr:hover{background:#e4ecf7}.prefdel{border:none;width:15px;height:15px;background:url('<?php 
echo IMGR;
?>
pfr_del0.png')center no-repeat;cursor:pointer}.prefdel:hover{background:url('<?php 
echo IMGR;
?>
pfr_del1.png')center no-repeat}.prefopt{visibility:hidden;width:100px}.preftbl tr:hover .prefopt{visibility:visible}</style>
Exemplo n.º 5
0
 to <?php 
        echo ftgl($rpf['date2']);
        ?>
</td>
							<td width="90px"><?php 
        echo $rpf['speaker'];
        ?>
</td>
							<td width="100px"><?php 
        echo $rpf['participant'];
        ?>
</td>
							<td width="60px" align="center"><table style="border:none;background:none" cellspacing="0" cellpadding="0"><tr>
							<?php 
        if ($rpf['file'] != 0) {
            $tfile = dbSel("file", "emp_files", "W/dcid='" . $rpf['file'] . "'");
            if (mysql_num_rows($tfile) > 0) {
                $rfile = mysql_fetch_array($tfile);
                ?>
<td style="border:none;background:none">
								<a class="filebtn" href="<?php 
                echo FLNK . $rfile['file'];
                ?>
" target="_blank" title="Open attachment file">
									<div style="background:url('<?php 
                echo IMGR;
                ?>
bi_file.png') no-repeat;width:24px;height:24px"></div>
								</a></td>
							<?php 
            } else {
Exemplo n.º 6
0
<?php

$mstr_author = array();
$t = dbSel("*", "mstr_author", "O/ prefix LIMIT 0,20");
while ($r = dbFA($t)) {
    $mstr_author[$r['dcid']] = $r['name'] . " (" . $r['prefix'] . ")";
}
$mstr_publisher = array();
$t = dbSel("*", "mstr_publisher", "O/ name LIMIT 0,20");
while ($r = dbFA($t)) {
    $mstr_publisher[$r['dcid']] = $r['name'];
}
$mstr_class = MstrGetx("mstr_class", "code");
$mstr_language = MstrGet("mstr_language");
$txtWidth = "width:344px";
?>
<script type="text/javascript" language="javascript">
function getBarcode(a){
	var b=a.split("/");
	E('barcode').value=b[0];
}
function getCallNumber(){
	var classcode=E('class').value;
	var author=getSelectedText('author');
	var sa=author.indexOf("(")+1;
	var sb=author.indexOf(")",sa);
	auth=author.substring(sa,sb);
	var title=E('title').value.substr(0,1);
	title=title.toUpperCase();
	var callnum=classcode+" "+auth+" "+title;
	E('tcallnumber').value=callnum;
Exemplo n.º 7
0
// Master Publisher
$mstr_publisher = array();
$fm = gets('act') == 'edit' ? " WHERE dcid='" . $r['publisher'] . "'" : "";
$t = dbSel("*", "mstr_publisher", $fm . "O/ name LIMIT 0,1");
while ($f = dbFA($t)) {
    $mstr_publisher[$f['dcid']] = $f['name'];
}
// Master Class
$mstr_class = array();
$t = dbSel("*", "mstr_class", "O/ code");
while ($f = dbFA($t)) {
    $mstr_class[$f['dcid']] = "(" . $f['code'] . ") " . $f['name'];
}
// Master Language
$mstr_language = array();
$t = dbSel("*", "mstr_language", "O/ code");
while ($f = dbFA($t)) {
    $mstr_language[$f['dcid']] = $f['name'];
}
$txtWidth = "width:344px";
?>
<div class="hl1">New catalog:</div>
<table cellspacing="0" cellpadding="0" border="0"><tr valign="top"><td>
<div class="hl2" style="margin-top:10px;margin-bottom:10px">Bibliographic Informations</div>
<table class="stable" cellspacing="0" cellpadding="4px" border="0">
	<tr><td width="100px" align="left">Title:</td><td width="370px"><?php 
echo iText('title', $r['title'], $txtWidth, '', 'onkeyup="sendTitle();vTitle(1);checkBookTitle()"');
?>
</td></tr>
	<tr id="retitle" style="display:none"><td></td><td><div id="etitle" class="espan">You can't leave this empty.</div></td></tr>
	<tr><td  align="left">Author:</td><td>
Exemplo n.º 8
0
<?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!";
}
Exemplo n.º 9
0
    } else {
        ?>
					<tr id="reb_reference<?php 
        echo $b;
        ?>
" style="display:none"></tr>
				<?php 
    }
}
?>
				</table><input type="hidden" id="ceb_reference" value="0"/>
				<div id="aeb_reference" style="margin:9px 0 15px 0"><a class="linkl11" href="javascript:addEntry('reference',0)">Add reference...</a></div>
			</td></tr>
		</table>
		<?php 
$tia = dbSel("*", "emp_ainfo", "W/empid='{$dcid}'");
$empai = dbFAx($tia);
?>
		<table class="stable" cellspacing="0" cellpadding="2px" width="875px">
			<tr><td>&nbsp;</td><td colspan="2"></td></tr> <!-- Separator -->
			<tr height="30px" valign="top"><td width="20px"><b>I.</b></td><td colspan="2"><strong>Additional Information</strong></td></tr><?php 
$rwidth = "width:838px";
$ailbl = array('', 'Are you born again Christian? (If yes mention the approximate date):', 'Please give us the details of your rebirth and its effects upon your life:', 'Write your statement of faith:', 'Write your concepts and opinions regarding the Holy Trinity:', 'What is your philosophy regarding Christian Education:');
for ($i = 1; $i < count($ailbl); $i++) {
    ?>
			<tr><td>&nbsp;</td><td colspan="2"><?php 
    echo $ailbl[$i];
    ?>
</td></tr>
				<tr><td>&nbsp;</td><td colspan="2"><?php 
    echo iText('ainfo' . $i, $empai['info' . $i], $rwidth);
Exemplo n.º 10
0
<?php

require_once SYDIR . 'ptrack.php';
$txtWidth = "width:344px";
$t = dbSel("*", "so_history", "W/status='3' ORDER BY dcid DESC LIMIT 0,1");
if (mysql_num_rows($t) > 0) {
    $r = mysql_fetch_array($t);
    $btot = mysql_num_rows(mysql_query("SELECT * FROM `book`"));
    $bdue = mysql_num_rows(mysql_query("SELECT * FROM `" . $r['ntable'] . "`"));
    //$bcek=mysql_num_rows(mysql_query("SELECT * FROM `".$r['ntable']."cek`"));
    $bcekY = mysql_num_rows(mysql_query("SELECT * FROM `" . $r['ntable'] . "cek`"));
    $bcekN = mysql_num_rows(mysql_query("SELECT * FROM `" . $r['ntable'] . "` WHERE cek='N'"));
    $bcekNY = mysql_num_rows(mysql_query("SELECT * FROM `" . $r['ntable'] . "` WHERE cek='N' AND note!=''"));
    $bcekNN = mysql_num_rows(mysql_query("SELECT * FROM `" . $r['ntable'] . "` WHERE cek='N' AND note=''"));
    $bcek = $bcekY + $bcekN;
    $bcekYp = round($bcekY * 100 / $bcek, 2);
    $bcekNp = round($bcekN * 100 / $bcek, 2);
    $buli = mysql_num_rows(mysql_query("SELECT * FROM `" . $r['ntable'] . "new`"));
    ?>
<script type="text/javascript" language="javascript">
function doneChecking(){
	//if(confirm('Are you sure book cheking is done and proceed to next step?')){
		E('donecekform').submit();
	//}
}
</script>
<div style="padding:10px 0 10px 0">
<table id="prog_track" cellspacing="5px" cellpadding="0"><tr>
<td>
	<div class="ptrackbox">
	<table cellspacing="0" cellpadding="0"><tr>
Exemplo n.º 11
0
    if ($y != -1) {
        $w[$y] = $x - $cw;
    }
    for ($i = 0; $i < count($h); $i++) {
        $pdf->MultiCell($w[$i], 0, $h[$i], 1, $al[$i], 1, 0, '', '', true);
    }
    $pdf->Ln();
    $pdf->SetTextColor(0);
}
/* Pre Data Processing */
if (gets('ids') != ALL) {
    $ids = explode("-", gets('ids'));
} else {
    $ids = array();
    $ids[0] = 0;
    $t = dbSel("dcid", "catalog", "O/ title");
    $i = 1;
    while ($r = dbFA($t)) {
        $ids[$i++] = $r['dcid'];
    }
}
define('dp_Title', 1);
define('dp_Callnumber', 2);
define('dp_Idnumber', 3);
define('dp_Author', 4);
define('dp_Publisher', 5);
define('dp_Classification', 6);
define('dp_Isbn', 7);
define('dp_Releasedate', 8);
define('dp_Available', 9);
$dps = explode("-", gets('dps'));
Exemplo n.º 12
0
<?php

$t = dbSel("*", "mstr_document", "O/ urut");
$k = 1;
$n = dbNRow($t);
while ($r = dbFA($t)) {
    ?>
<tr><td width="380px"><?php 
    echo $r['name'];
    ?>
</td><td align="right">
	<div class="prefopt">
	<?php 
    if ($k != 1) {
        ?>
<input type="button" title="Move up" class="prefup" onclick="m_document('up',<?php 
        echo $r['dcid'];
        ?>
)"/> &nbsp;<?php 
    }
    ?>
	<?php 
    if ($k != $n) {
        ?>
<input type="button" title="Move down" class="prefdn" onclick="m_document('dn',<?php 
        echo $r['dcid'];
        ?>
)"/><?php 
    } else {
        ?>
<button style="width:15px;height:15px;border:none;background:none"></button><?php 
Exemplo n.º 13
0
    $t = mysql_query("SELECT aka_siswa.replid,aka_siswa.nama,aka_siswa.nis FROM aka_siswa_kelas LEFT JOIN aka_siswa ON aka_siswa.replid=aka_siswa_kelas.siswa WHERE aka_siswa.nama LIKE '%{$keyw}%' GROUP BY aka_siswa_kelas.siswa");
    //dbSel("replid,nama","aka_siswa","W/nama LIKE '%$keyw%'");
    $n = mysql_num_rows($t);
    if ($n > 0) {
        //log_print('peminjaman_member_cari: get siswa by nama '.$n);
        if ($n == 1) {
            $r = mysql_fetch_array($t);
            //log_print('peminjaman_member_cari: get siswa by nama='.$r['replid']);
            $mid = $r['replid'];
            $mnama = $r['nama'];
        }
        $mtipe = 1;
    }
    //log_print('after siswa nama mid='.$mid);
    if ($mid == 0 && $mtipe == 0) {
        $t = dbSel("replid,nama", "hrd_pegawai", "W/nama LIKE '%{$keyw}%'");
        $n = mysql_num_rows($t);
        if ($n > 0) {
            //log_print('peminjaman_member_cari: get pegawai by nama '.$n);
            if ($n == 1) {
                $r = mysql_fetch_array($t);
                //log_print('peminjaman_member_cari: get pegawai by nama='.$r['replid']);
                $mid = $r['replid'];
                $mnama = $r['nama'];
            }
            $mtipe = 2;
        }
    }
    //log_print('after pegawai nama mid='.$mid);
}
echo $mid == 0 ? $mtipe : $mid . "-" . $mtipe . "-" . $mnama;
Exemplo n.º 14
0
<?php

$t = dbSel("*", "mstr_language", "O/ urut");
$k = 1;
$n = dbNRow($t);
while ($r = dbFA($t)) {
    ?>
<tr><td width="380px"><?php 
    echo $r['name'];
    ?>
 (<?php 
    echo $r['code'];
    ?>
)</td><td align="right">
	<div class="prefopt">
	<?php 
    if ($k != 1) {
        ?>
<input type="button" title="Move up" class="prefup" onclick="b_language('up',<?php 
        echo $r['dcid'];
        ?>
)"/> &nbsp;<?php 
    }
    ?>
	<?php 
    if ($k != $n) {
        ?>
<input type="button" title="Move down" class="prefdn" onclick="b_language('dn',<?php 
        echo $r['dcid'];
        ?>
)"/><?php 
Exemplo n.º 15
0
<?php

$t = dbSel("*", "mstr_traintype", "O/ urut");
$k = 1;
$n = dbNRow($t);
while ($r = dbFA($t)) {
    ?>
<tr><td width="380px"><?php 
    echo $r['name'];
    ?>
</td><td align="right">
	<div class="prefopt">
	<?php 
    if ($k != 1) {
        ?>
<input type="button" title="Move up" class="prefup" onclick="m_traintype('up',<?php 
        echo $r['dcid'];
        ?>
)"/> &nbsp;<?php 
    }
    ?>
	<?php 
    if ($k != $n) {
        ?>
<input type="button" title="Move down" class="prefdn" onclick="m_traintype('dn',<?php 
        echo $r['dcid'];
        ?>
)"/><?php 
    } else {
        ?>
<button style="width:15px;height:15px;border:none;background:none"></button><?php 
Exemplo n.º 16
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'];
Exemplo n.º 17
0
<?php

$t = dbSel("*", "mstr_position", "O/ urut");
$k = 1;
$n = dbNRow($t);
while ($r = dbFA($t)) {
    ?>
<tr><td width="380px"><?php 
    echo $r['name'];
    ?>
</td><td align="right">
	<div class="prefopt">
	<?php 
    if ($k != 1) {
        ?>
<input type="button" title="Move up" class="prefup" onclick="m_position('up',<?php 
        echo $r['dcid'];
        ?>
)"/> &nbsp;<?php 
    }
    ?>
	<?php 
    if ($k != $n) {
        ?>
<input type="button" title="Move down" class="prefdn" onclick="m_position('dn',<?php 
        echo $r['dcid'];
        ?>
)"/><?php 
    } else {
        ?>
<button style="width:15px;height:15px;border:none;background:none"></button><?php 
Exemplo n.º 18
0
<?php

$t = dbSel("*", "mstr_marital", "O/ urut");
$k = 1;
$n = dbNRow($t);
while ($r = dbFA($t)) {
    ?>
<tr><td width="380px"><?php 
    echo $r['name'];
    ?>
</td><td align="right">
	<div class="prefopt">
	<?php 
    if ($k != 1) {
        ?>
<input type="button" title="Move up" class="prefup" onclick="m_marital('up',<?php 
        echo $r['dcid'];
        ?>
)"/> &nbsp;<?php 
    }
    ?>
	<?php 
    if ($k != $n) {
        ?>
<input type="button" title="Move down" class="prefdn" onclick="m_marital('dn',<?php 
        echo $r['dcid'];
        ?>
)"/><?php 
    } else {
        ?>
<button style="width:15px;height:15px;border:none;background:none"></button><?php 
Exemplo n.º 19
0
<?php

$t = dbSel("*", "mstr_level", "O/ urut");
$k = 1;
$n = dbNRow($t);
while ($r = dbFA($t)) {
    ?>
<tr><td width="380px"><?php 
    echo $r['name'];
    ?>
</td><td align="right">
	<div class="prefopt">
	<?php 
    if ($k != 1) {
        ?>
<input type="button" title="Move up" class="prefup" onclick="m_level('up',<?php 
        echo $r['dcid'];
        ?>
)"/> &nbsp;<?php 
    }
    ?>
	<?php 
    if ($k != $n) {
        ?>
<input type="button" title="Move down" class="prefdn" onclick="m_level('dn',<?php 
        echo $r['dcid'];
        ?>
)"/><?php 
    } else {
        ?>
<button style="width:15px;height:15px;border:none;background:none"></button><?php 
Exemplo n.º 20
0
<?php

$f = mysql_fetch_array($t);
$lbc = $f['barcode'];
$t = dbSel("*", "catalog", "W/dcid='" . $f['catalog'] . "' LIMIT 0,1");
$r = dbFA($t);
$blink = "&act=view&nid=" . $f['catalog'];
?>
<div class="hl1">Edit book:</div>
<form id="bform" action="<?php 
echo RLNK;
?>
request.php?q=revbook" method="post" enctype="multipart/form-data" style="padding:0;margin:0">
<?php 
require_once VWDIR . 'p_book_form2.php';
?>
</form>
Exemplo n.º 21
0
<?php

require_once SYDIR . 'ptrack.php';
$txtWidth = "width:344px";
$t = dbSel("*", "so_history", "W/status='4' LIMIT 0,1");
if (mysql_num_rows($t) > 0) {
    $r = mysql_fetch_array($t);
    $ntable = $r['ntable'];
    $tblid = $r['dcid'];
    $btot = mysql_num_rows(mysql_query("SELECT * FROM `book`"));
    $bdue = mysql_num_rows(mysql_query("SELECT * FROM `" . $r['ntable'] . "`"));
    //$bcek=mysql_num_rows(mysql_query("SELECT * FROM `".$r['ntable']."cek`"));
    $bcekY = mysql_num_rows(mysql_query("SELECT * FROM `" . $r['ntable'] . "cek`"));
    $bcekN = mysql_num_rows(mysql_query("SELECT * FROM `" . $r['ntable'] . "` WHERE cek='N'"));
    $bcek = $bcekY + $bcekN;
    $bcekYp = round($bcekY * 100 / $bcek, 2);
    $bcekNp = round($bcekN * 100 / $bcek, 2);
    $buli = mysql_num_rows(mysql_query("SELECT * FROM `" . $r['ntable'] . "new`"));
    ?>
<div style="padding:10px 0 10px 0">
<table id="prog_track" cellspacing="5px" cellpadding="0"><tr>
<td>
	<div class="ptrackbox">
	<table cellspacing="0" cellpadding="0"><tr>
		<td id="ps1a" class="ptracknumber0" align="center">1</td>
		<td id="ps1b" class="ptracktext0">Initialize<br/>stock take</td>
	</tr></table>
	</div>
</td>
<td>
	<div class="ptrackbox">
Exemplo n.º 22
0
<?php

$t = dbSel("*", "mstr_religion", "O/ urut");
$k = 1;
$n = dbNRow($t);
while ($r = dbFA($t)) {
    ?>
<tr><td width="380px"><?php 
    echo $r['name'];
    ?>
</td><td align="right">
	<div class="prefopt">
	<?php 
    if ($k != 1) {
        ?>
<input type="button" title="Move up" class="prefup" onclick="m_religion('up',<?php 
        echo $r['dcid'];
        ?>
)"/> &nbsp;<?php 
    }
    ?>
	<?php 
    if ($k != $n) {
        ?>
<input type="button" title="Move down" class="prefdn" onclick="m_religion('dn',<?php 
        echo $r['dcid'];
        ?>
)"/><?php 
    } else {
        ?>
<button style="width:15px;height:15px;border:none;background:none"></button><?php 
Exemplo n.º 23
0
<?php

$t = dbSel("*", "catalog", "O/ `title`");
?>
	<table class="xtable" border="0" cellspacing="1px" width="850px">
	<tr>
		<td class="xtdh" style="text-align:center">Cover</td>
		<?php 
echo iThxp("Title", 'title', $page, $sortby, $smode, $keyw);
?>
		<?php 
echo iThxp("Author", 'author', $page, $sortby, $smode, $keyw);
?>
		<?php 
echo iThxp("Publisher", 'publisher', $page, $sortby, $smode, $keyw);
?>
		<td class="xtdh" style="text-align:center">Availability</td>
		<td class="xtdh" style="text-align:center">Options</td>
	</tr>
	<?php 
$n = 0;
$rc = 1;
//$p=Array('title','type','host','place','date1','date2','speaker','participant');
while ($r = dbFAx($t)) {
    if ($n >= $nps && $n < $npl) {
        if ($rc == 0) {
            $rc = 1;
        } else {
            $rc = 0;
        }
        $date1 = ftgl($r['date1']);
Exemplo n.º 24
0
    $cid = 0;
}
appmod_use('aka/tahunajaran', 'aka/pelajaran', 'aka/kelas');
// form Module
$fmod = 'sks';
$dbtable = 'aka_sks';
$fform = new fform($fmod, $opt, $cid, 'Kontrak Pelajaran');
$inp = app_form_gpost('tahunajaran', 'pelajaran', 'guru');
$inp['kelas'] = gpost('sks_kelas');
if ($opt == 'a' || $opt == 'u' || $opt == 'd') {
    $q = false;
    if ($opt == 'a') {
        // add
        $njam = intval(gpost('njam', 1));
        if (gpost('salin') == '1') {
            $t = dbSel("*", "aka_kelas", "W/tahunajaran='" . $inp['tahunajaran'] . "'");
            while ($r = dbFA($t)) {
                $inp['kelas'] = $r['replid'];
                for ($i = 0; $i < $njam; $i++) {
                    $q = dbInsert($dbtable, $inp);
                }
            }
        } else {
            for ($i = 0; $i < $njam; $i++) {
                $q = dbInsert($dbtable, $inp);
            }
        }
    } else {
        if ($opt == 'u') {
            // edit
            $q = dbUpdate($dbtable, $inp, "replid='{$cid}'");
Exemplo n.º 25
0
<?php

$t = dbSel("*", "so_history", "W/status='1' OR status='2' LIMIT 0,1");
$nso = dbNRow($t);
?>
<div class="hl2" style="font-size:16px;margin-bottom:10px;padding-top:20px;">Initialize stock take</div>
<?php 
if ($nso == 0) {
    ?>
<div class="sfont" style="line-height:200%;width:600px;margin-bottom:10px">This application wil guide you through stock take process. Once you initialize a stock take process you may not to initialize another process until current process are finished.</div>
<input type="button" class="btnx" value="Start new stock take" onclick="jumpTo('<?php 
    echo RLNK;
    ?>
stockopname.php?tab=init')"/>
<?php 
} else {
    $r = dbFA($t);
    $tt = array('1' => 'cek', '2' => 'note', '3' => 'finish');
    ?>
<div class="sfont" style="line-height:200%;width:600px;margin-bottom:10px">Current stock take process <b>"<?php 
    echo $r['name'];
    ?>
"</b> is not finish yet.</div>
<input type="button" class="btnz" value="Continue current stock take" onclick="jumpTo('<?php 
    echo RLNK;
    ?>
stockopname.php?tab=<?php 
    echo $tt[$r['status']];
    ?>
')"/>
<?php 
Exemplo n.º 26
0
<?php

$opt = gpost('opt');
$val = gpost('v');
if ($opt == 'author') {
    $t = dbSel("*", "mstr_author", "O/ prefix");
    echo '<option value="0" >any author</option>';
    while ($r = dbFA($t)) {
        echo '<option value="' . $r['dcid'] . '" >' . $r['name'] . ' (' . $r['prefix'] . ')</option>';
    }
} else {
    if ($opt == 'publisher') {
        $t = dbSel("*", "mstr_publisher", "O/ name");
        echo '<option value="0" >any publisher</option>';
        while ($r = dbFA($t)) {
            echo '<option value="' . $r['dcid'] . '" >' . $r['name'] . '</option>';
        }
    }
}
Exemplo n.º 27
0
<?php

require_once SYDIR . 'ptrack.php';
$txtWidth = "width:344px";
$nid = getsx('nid');
$t = dbSel("*", "so_history", "W/dcid='{$nid}' LIMIT 0,1");
if (mysql_num_rows($t) > 0) {
    $r = mysql_fetch_array($t);
    $ntable = $r['ntable'];
    $tblid = $r['dcid'];
    $btot = mysql_num_rows(mysql_query("SELECT * FROM `book`"));
    $bdue = mysql_num_rows(mysql_query("SELECT * FROM `" . $r['ntable'] . "`"));
    //$bcek=mysql_num_rows(mysql_query("SELECT * FROM `".$r['ntable']."cek`"));
    $bcekY = mysql_num_rows(mysql_query("SELECT * FROM `" . $r['ntable'] . "cek`"));
    $bcekN = mysql_num_rows(mysql_query("SELECT * FROM `" . $r['ntable'] . "` WHERE cek='N'"));
    $bcek = $bcekY + $bcekN;
    $bcekYp = round($bcekY * 100 / $bcek, 2);
    $bcekNp = round($bcekN * 100 / $bcek, 2);
    $buli = mysql_num_rows(mysql_query("SELECT * FROM `" . $r['ntable'] . "new`"));
    ?>
<div style="padding:10px 0 10px 0">
<table id="prog_track" cellspacing="5px" cellpadding="0"><tr>
<td>
	<div class="ptrackbox">
	<table cellspacing="0" cellpadding="0"><tr>
		<td id="ps1a" class="ptracknumber0" align="center">1</td>
		<td id="ps1b" class="ptracktext0">Initialize<br/>stock take</td>
	</tr></table>
	</div>
</td>
<td>
Exemplo n.º 28
0
	<?php 
                }
            }
            if ($nn == 0) {
                ?>
	<div class="sfont" style="color:#008ee8;padding-top:20px;width:430px">There is no book which barcode within range <b><?php 
                echo $keyw;
                ?>
</b>.</div>
	<?php 
            }
        } else {
            // find by title
            if ($keyw != '') {
                $bcl = array();
                $t = dbSel("barcode", "p_label");
                while ($r = dbFA($t)) {
                    $bcl[$r['barcode']] = '1';
                }
                $sql = "SELECT dcid,title FROM catalog WHERE title LIKE '{$keyw} %' OR title LIKE '% {$keyw}' OR title LIKE '% {$keyw} %' OR title='{$keyw}' ORDER BY title";
                $q = mysql_query($sql);
                $n = mysql_num_rows($q);
                if ($n > 0) {
                    $l = 1;
                    ?>
		<div class="pfsub">Select book to add to print queue:</div>
		<div style="width:430px;height:240px;overflow:auto;margin-top:10px">
			<table class="stable" border="0" cellspacing="0" width="410px">
			<?php 
                    $i = 0;
                    while ($f = mysql_fetch_array($q)) {
Exemplo n.º 29
0
        $t = dbUpdate($dbtable, array('active' => 'N'), "empid='{$dcid}'");
        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 {
Exemplo n.º 30
0
<?php

$t = dbSel("*", "mstr_user", "O/ dcid");
$k = 1;
$n = dbNRow($t);
while ($r = dbFA($t)) {
    ?>
<tr><td width="26px">
	<?php 
    if ($r['level'] != 'admin') {
        ?>
<img src="<?php 
        echo IMGR;
        ?>
staff.png" title="Staff"/><?php 
    } else {
        ?>
<img src="<?php 
        echo IMGR;
        ?>
admin.png" title="Admin"/><?php 
    }
    ?>
	</td><td width="400px"><b><?php 
    echo $r['alias'];
    echo $r['level'] == 'admin' ? " (Admin)" : "";
    ?>
</b>
		<?php 
    if ($_SESSION['joshr'] == $r['name']) {
        echo " (current user)";