<?php $cid = gpost('cid', 0); $lok = gpost('lokasi'); $tingb = gpost('tingkatbuku'); $sumber = gpost('sumber'); $nbuku = intval(gpost('nbuku')); if ($cid == 0) { $data = array('kodelokasi' => $lok, 'kodetingkat' => $tingb, 'sumber' => $sumber, 'nomorauto' => $nbuku > 1 ? "[auto]" : 0); } else { $t = mysql_query("SELECT pus_buku.* FROM pus_buku WHERE pus_buku.replid='{$cid}' LIMIT 0,1"); $r = mysql_fetch_array($t); $data = array('kodelokasi' => $lok, 'kodetingkat' => $tingb, 'sumber' => $sumber, 'nomorauto' => $r['urut']); } $barkode = buku_makebarkode($data); $idbuku = buku_makeid($data); echo $barkode . '~' . $idbuku . '~' . $cid;
$r['sumber']=0; $t1=mysql_query("SELECT kode FROM pus_klasifikasi WHERE replid='".$rk['klasifikasi']."' LIMIT 0,1"); $r1=mysql_fetch_array($t1); $r['callnumber']=$r1['kode']; $t1=mysql_query("SELECT nama,nama2 FROM pus_pengarang WHERE replid='".$rk['pengarang']."' LIMIT 0,1"); $r1=mysql_fetch_array($t1); $r1=substr($r1['nama2'],0,3); $r['callnumber'].=" ".$r1; $jud=strtolower(substr($rk['judul'],0,1)); $r['callnumber'].=" ".$jud; $r['idbuku']=buku_makeid(); $r['barkode']=buku_makebarkode(); $r['urut']=buku_getlasturut()+1;; $r['tanggal']=date("Y-m-d"); $r['harga']=0; } $fform->dimension(450,120); $fform->ptop=20; $fform->head(); if($opt=='af' || $opt=='uf'){ require_once(MODDIR.'control.php'); // Add or Edit form $fform->fg('Data Koleksi'); $fform->fl('Judul','<b>'.buku_judul($rk['judul']).'</b>'); if($opt=='af'){
<div class="sfont" style="float:left;width:100%;font-size:15px;border-bottom: 1px solid #eaeaea;padding-bottom: 5px;margin-bottom:20px;margin-top:0px;">Pengaturan Nomor Item</div> <div style="float:left;width:100%;margin-bottom:30px;padding-left:10px"> <div class="sfont" style="float:left;width:100%;margin-bottom:10px">Format nomor ID (identitas):</div> <div style="float:left;width:100%;margin-bottom:10px"> <?=iText('idfmt',setting_getnilai('idfmt'),'float:left;margin-right:4px;width:400px','','readonly')?> <button class="btn" style="float:left" onclick="tools_idbuku_form('uf',<?=setting_getid('idfmt')?>)"><div class="bi_edit">Edit</div></button> </div> <div class="sfont" style="float:left;width:100%;margin-bottom:20px">Contoh: <?=buku_makeid(array('nomorauto'=>1,'kodelokasi'=>'*','kodetingkat'=>'*'))?></div> <div class="sfont" style="float:left;width:100%;margin-bottom:10px">Format barkode:</div> <div style="float:left;width:100%;margin-bottom:10px"> <?=iText('bkfmt',setting_getnilai('bkfmt'),'float:left;margin-right:4px;width:400px','','readonly')?> <button class="btn" style="float:left" onclick="tools_barkode_form('uf',<?=setting_getid('bkfmt')?>)"><div class="bi_edit">Edit</div></button> </div> <div class="sfont" style="float:left;width:100%;margin-bottom:20px">Contoh: <?=buku_makebarkode(array('nomorauto'=>1,'kodelokasi'=>'*','kodetingkat'=>'*'))?></div> </div> <div class="sfont" style="float:left;width:100%;font-size:15px;border-bottom: 1px solid #eaeaea;padding-bottom: 5px;margin-bottom:20px;margin-top:0px;">Cetak Label Buku</div> <div style="float:left;width:100%;margin-bottom:30px;padding-left:10px"> <div id="box_tools_label_form" class="sfont" style="float:left;width:100%;margin-bottom:10px"> <?php require_once(APPDIR.'tools_label_form_get.php'); ?> </div> <div id="box_tools_label" class="sfont" style="display:none;float:left;width:100%"> </div> <div id="box_btn_cetaklabel" class="sfont" style="float:left;width:100%;margin-bottom:10px"> <button class="btn" style="float:left" onclick="tools_label_get()">Cetak label</button> </div> </div>