function loginCheck() { $user = gpost('uname'); $pass = md5(gpost('passwd')); $t = mysql_query("SELECT * FROM admin WHERE uname='{$uname}' AND passwd='{$passwd}'"); if (mysql_num_rows($t) == 1) { $r = mysql_fetch_array($t); if ($r['app'] == APID || $r['level'] == 1) { $_SESSION[ASID . 'admin_id'] = $r['replid']; $_SESSION[ASID . 'admin_name'] = $r['nama']; $_SESSION[ASID . 'admin_uname'] = $r['uname']; $_SESSION[ASID . 'admin_level'] = $r['level']; $_SESSION[ASID . 'admin_dept'] = $r['departemen']; $_SESSION[ASID . 'admin_pegawai'] = $r['pegawai']; $_SESSION[ASID . 'admin_bahasa'] = $r['bahasa']; dbUpdate("admin", array('tlogin' => date("Y-m-d H:i:s")), "replid='" . $r['replid'] . "'"); echo $r['nama']; } else { echo "0"; //echo $r['nama']; } } else { //echo $r['nama']; echo "0"; } }
function getsx($n) { if (isset($_GET[$n])) { return $_GET[$n]; } else { return gpost($n); } }
function __construct($f,$o='',$c=0){ $this->fmod=$f; $this->opt=$o==''?gpost('opt'):$o; $this->cid=$c==''?gpost('cid',0):$c; $this->set_labelw(100); $this->set_fieldw(250); $this->tb=false; $this->cb=false; $this->gb=false; $this->ng=0; $this->back_act=$this->fmod.'_get()'; $this->grupclass='flodiv'; $this->grupstyle=''; $this->tablestyle='float:left;border:1px solid rgba(0, 0, 0, .3);background:#fcfcff;margin-bottom:10px'; $this->tablewidth='100%'; $this->btn_yes=''; $this->btn_no=''; $this->showtitle=1; }
<?php require_once '../shared/config.php'; require_once 'system/config.php'; require_once DBFILE; require_once LIBDIR . 'common.php'; $filedesc = gpost('description'); /* File Upload */ $errormsg = ""; $cerr = 0; $imagedata = ""; $allowedExts = array("jpg", "jpeg", "png"); $extension = end(explode(".", $_FILES["file"]["name"])); if (($_FILES["file"]["type"] == "image/jpeg" || $_FILES["file"]["type"] == "image/png" || $_FILES["file"]["type"] == "image/pjpeg") && in_array($extension, $allowedExts)) { if ($_FILES["file"]["error"] > 0) { $cerr++; $errormsg = "Error return Code: " . $_FILES["file"]["error"] . "<br>"; } else { if ($_FILES["file"]["size"] < 2000000) { if (file_exists($filepath)) { $cerr++; $errormsg = $_FILES["file"]["name"] . " sudah ada. "; } else { if ($extension == "jpg" || $extension == "jpeg") { $uploadedfile = $_FILES['file']['tmp_name']; $src = imagecreatefromjpeg($uploadedfile); } else { if ($extension == "png") { $uploadedfile = $_FILES['file']['tmp_name']; $src = imagecreatefrompng($uploadedfile); } else {
<?php $fmod='statistik'; $xtable = new xtable($fmod,'Buku','','','sirkulasi'); //$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);
function hiddenval_gpost() { $a = func_get_args(); $n = count($a); for ($i = 0; $i < $n; $i++) { hiddenval($a[$i], gpost($a[$i])); } }
<?php require_once MODDIR . 'date.php'; $replid = gpost('id'); $cid = $replid; $t = mysql_query("SELECT * FROM psb_calonsiswa WHERE replid='{$replid}' LIMIT 0,1"); $r = mysql_fetch_array($t); $fwidth = 700; if ($r['photo'] == '') { $r['photo'] = 'nophoto.png'; } $proses = mysql_fetch_array(mysql_query("SELECT * FROM psb_proses WHERE replid='" . $r['proses'] . "' LIMIT 0,1")); $kelompok = mysql_fetch_array(mysql_query("SELECT * FROM psb_kelompok WHERE replid='" . $r['kelompok'] . "' LIMIT 0,1")); $kondisi = mysql_fetch_array(mysql_query("SELECT * FROM psb_kondisisiswa WHERE replid='" . $r['kondisi'] . "' LIMIT 0,1")); $status = mysql_fetch_array(mysql_query("SELECT * FROM psb_statussiswa WHERE replid='" . $r['status'] . "' LIMIT 0,1")); $agama = mysql_fetch_array(mysql_query("SELECT * FROM mst_agama WHERE replid='" . $r['agama'] . "' LIMIT 0,1")); $jkelamin = array('L' => 'Laki-laki', 'P' => 'Perempuan'); $a = 0; ?> <table cellspacing="0" cellpadding="0" width="100%"><tr><td id="fformt" align="center" style="padding-top:60px"> <div id="fformbox" class="fformbox" style="width:<?php echo $fwidth + 20; ?> px;overflow:hidden"> <table cellspacing="25px" cellpadding="0" width="100%" height="100%"><tr><td> <div style="cursor:default;text-align:left;color:<?php echo CDARK; ?> ;font:24px <?php echo SFONTL; ?>
<?php require_once(MODDIR.'fform/fform.php'); $opt=gpost('opt');$cid=gpost('cid');if($cid=='')$cid=0; // form Module $fmod='jenisbuku'; $dbtable='pus_jenisbuku'; $fform=new fform($fmod,$opt,$cid,'Jenis Buku'); $inp=app_form_gpost('kode','nama','keterangan'); if($opt=='a'||$opt=='u'||$opt=='d'){ $q=false; if($opt=='a'){ // add $q=dbInsert($dbtable,$inp); } else if($opt=='u') { // edit $q=dbUpdate($dbtable,$inp,"replid='$cid'"); } else if($opt=='d'){ // delete $q=dbDel($dbtable,"replid='$cid'"); } $fform->notif($q); } else { if($opt=='uf'||$opt=='df'){ // Prepocessing form $r=dbSFA("*",$dbtable,"W/replid='$cid'"); } else { } $fform->head(); if($opt=='af' || $opt=='uf'){ require_once(MODDIR.'control.php'); // Add or Edit form $fform->fi('Kode',iText('kode',$r['kode'],"width:60px"));
$fmod = "pf_info1"; // db Table $dbtable = "employee"; // Global Variables $mstr_level = MstrGet("mstr_level"); $mstr_division = MstrGet("mstr_division"); $mstr_group = MstrGet("mstr_group"); $mstr_position = MstrGet("mstr_position"); if ($opt == 'a' || $opt == 'u' || $opt == 'd' || $opt == 'up' || $opt == 'dn') { // Post Variables $inp = array(); $inp['nip'] = gpost('nip'); $inp['level'] = gpost('level'); $inp['division'] = gpost('division'); $inp['group'] = gpost('group'); $inp['position'] = gpost('position'); if ($opt == 'a') { $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}'"); } }
$mtitle = "Change " . $fname . "'s reward"; } else { $mtitle = "Delete " . $fname . "'s reward"; } } // Function Module $fmod = "pf_reward"; // db Table $dbtable = "emp_reward"; // Global Variables if ($opt == 'a' || $opt == 'u' || $opt == 'd' || $opt == 'rf') { // Post Variables $p = array('reward', 'rewardby', 'description', 'date', 'file'); $ipost = array(); foreach ($p as $k => $v) { $ipost[$v] = gpost($v); } if ($opt == 'a') { $ipost['empid'] = $dcid; $fid = 0; if ($ipost['file'] != '') { $description = "Attachment of reward - " . $ipost['description']; $filename = $ipost['file']; $extension = end(explode(".", $filename)); dbInsert("emp_files", array('empid' => $dcid, 'description' => $description, 'file' => $filename, 'type' => $extension)); $fid = mysql_insert_id(); } $ipost['file'] = $fid; dbInsert($dbtable, $ipost); $cid = mysql_insert_id(); } else {
<?php appmod_use('aka/siswa', 'aka/kelas', 'aka/pelajaran', 'aka/rapor'); $opt = gpost('opt'); $cid = gpost('cid', 0); /* Load App libraries */ require_once DBFILE; require_once LIBDIR . 'common.php'; require_once MODDIR . 'date.php'; $dept = gpost('departemen'); $departemen = departemen_r($dept); $proses = proses_r($pros, $dept); // cell($a,$w=0,$c=1,$r=1,$al='',$b=-1,$bg='',$s='',$atr='') $pros = gpost('proses'); $query = mysql_query("SELECT aka_mutasi.tanggal,aka_mutasi.departemen, aka_mutasi.keterangan, aka_siswa.nisn,aka_siswa.nama, aka_jenismutasi.nama as njenis \n\t\t\t\t\t\t\tFROM aka_mutasi\n\t\t\t\t\t\t\tJOIN aka_siswa ON aka_siswa.replid=aka_mutasi.replid\n JOIN aka_jenismutasi ON aka_jenismutasi.replid=aka_mutasi.replid\n WHERE aka_mutasi.departemen='{$dept}'"); $token = doc_decrypt($token); $doc = new doc(); $doc->dochead("Laporan Mutasi Siswa " . gets('kelompok'), 7); $doc->nl(); $doc->row_blank(7); //$t=dbQSql($token); $no = 1; $doc->head('No{C}', '@Tanggal', '@NISN', '@Angkatan', '@Nama', '@Jenis Mutasi', '@Keterangan'); while ($r = mysql_fetch_array($query)) { $doc->nl(); $doc->cell($no++, 20, 'c'); $doc->cell(fftgl($r['tanggal']), 80); $doc->cell($r['nisn'], 30); $doc->cell($r['siswa'], 80); $doc->cell($r['njenis'], 50); $doc->cell($r['keterangan'], 50);
$inp = array(); foreach ($a as $k => $v) { $inp[$v] = gpost($v); } if (dbUpdate("book", $inp, "dcid='{$dcid}'")) { echo "TBook information has been saved."; } else { echo 'F<span style="colo:#ff0000">Failed to save book information.</span>'; } //header('location:'.RLNK.'bibliographic.php?tab=catalog&act=view&nid='.$inp['catalog']); } else { if ($q == "addsyc") { $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 { header('location:' . RLNK); } } } } } }
$PSBar->end(); hiddenval('proses', $pros); hiddenval('kelompok', $kel); proses_warn(1); exit; } if (count($kelompok) > 0) { $PSBar->selection('Kelompok', iSelect('kelompok', $kelompok, $kel, $PSBar->selws, $fmod . "_get()")); } else { $PSBar->end(); hiddenval('kelompok', $kel); kelompok_warn(1); exit; } $PSBar->end(); $tampil = gpost('tampil', 'all'); $t = mysql_query("SELECT replid FROM keu_modul WHERE reftipe='" . RT_PSB . "' AND refid='{$pros}'"); if (mysql_num_rows($t) > 0) { $modul = mysql_fetch_array($t); $modid = $modul['replid']; $inp = array('modul' => $modid, 'siswa' => 0, 'nominal' => 0, 'cicilan' => 0); $t = mysql_query("SELECT psb_calonsiswa.replid,psb_kelompok.biaya FROM psb_calonsiswa LEFT JOIN psb_kelompok ON psb_kelompok.replid=psb_calonsiswa.kelompok WHERE psb_calonsiswa.proses='{$pros}'"); while ($r = mysql_fetch_array($t)) { $t1 = mysql_query("SELECT * FROM keu_pembayaran WHERE modul='{$modid}' AND siswa='" . $r['replid'] . "'"); if (mysql_num_rows($t1) == 0) { $inp['siswa'] = $r['replid']; $inp['nominal'] = $r['biaya']; $inp['cicilan'] = $r['biaya']; $q = dbInsert("keu_pembayaran", $inp); } }
<?php require_once(MODDIR.'fform/fform.php'); $opt=gpost('opt');$cid=gpost('cid');if($cid=='')$cid=0; // form Module $fmod='katalog'; $dbtable='pus_katalog'; $fform=new fform($fmod,$opt,$cid,'Katalog Buku'); $inp=app_form_gpost('klasifikasi-kode','klasifikasi','pengarang','callnumber','penerjemah','editor','penerbit','tahunterbit','kota','isbn','issn','bahasa','seri','volume','edisi','jenisbuku','photo','deskripsi','halaman','dimensi'); $inp['judul']=gpost('judul1').'`'.gpost('judul2'); if($opt=='a'||$opt=='u'||$opt=='d'){ $q=false; $ec=0; if($opt=='a'){ // add $q=dbInsert($dbtable,$inp); $cid=mysql_insert_id(); } else if($opt=='u') { // edit $q=dbUpdate($dbtable,$inp,"replid='$cid'"); } else if($opt=='d'){ // delete $q=dbDel($dbtable,"replid='$cid'"); $q=dbDel("pus_buku","katalog='$cid'"); } echo $cid; $fform->notif($q); } else { if($opt=='uf'||$opt=='df'){ // Prepocessing form $r=dbSFA("*",$dbtable,"W/replid='$cid'"); } else { $r=array(); } $fform->head();
session_start(); require_once '../shared/config.php'; require_once 'system/config.php'; $tl = 1; $t = mysql_query("SELECT * FROM appactivate WHERE app='" . APID . "' LIMIT 0,1"); $r = mysql_fetch_array($t); if ($r['aktif'] == '1') { header('location:./'); } $wrong = 0; $ukey = ''; $vkey = ''; if (gpost('accept') == 'YES') { $ukey = gpost('cuser'); $vkey = gpost('cverify'); $t = mysql_query("SELECT * FROM appactivate WHERE user='******' AND kunci='{$vkey}' AND aktif='0' LIMIT 0,1"); if (mysql_num_rows($t) > 0) { $pwd = md5($vkey); mysql_query("UPDATE appactivate SET aktif='1' WHERE user='******' AND kunci='{$vkey}'"); mysql_query("INSERT INTO admin SET nama='Admin',uname='{$ukey}',passwd='{$pwd}',app='rep',level='1'"); header('location:./'); } else { $wrong = 1; } } // APP: $APP_TITLE = 'Repository'; $APP_PAGETITLES = array('file' => 'File', 'grup' => 'Grup'); $APP_HOMETITLE = 'Home'; $APP_PLUGIN = "flot|tinymce";
<?php require_once MODDIR . 'xtable/xtable.php'; require_once MODDIR . 'control.php'; $fmod = 'peminjaman_tabelcari'; $xtable = new xtable($fmod); $keyword = gpost('keyword'); if ($keyword != '') { // Query $sql = "SELECT sar_barang.*,sar_katalog.nama FROM sar_barang LEFT JOIN sar_katalog ON sar_katalog.replid=sar_barang.katalog WHERE sar_barang.kode='{$keyword}' OR sar_katalog.nama LIKE '%{$keyword}%'"; $t = mysql_query($sql); $xtable->ndata = mysql_num_rows($t); if ($xtable->ndata > 0) { // Table head $xtable->head('kode'); while ($r = mysql_fetch_array($t)) { $xtable->row_click($r['replid'], 'v'); $xtable->row_begin(); $n = mysql_num_rows(mysql_query("SELECT replid FROM sar_barang WHERE katalog='" . $r['replid'] . "'")); $xtable->td($r['kode'], 80); $xtable->opt($r['replid']); $xtable->row_end(); } $xtable->foot(); } else { $xtable->nodata_cust('Tidak ditemukan data barang dengan kode atau nama <b>' . $keyword . '</b>.'); } }
<?php require_once MODDIR . 'control.php'; $opt = gpost('opt'); $c = gpost('c'); if ($opt == 'find') { $keyw = gpost('nama'); $c = gpost('c'); $sql = "SELECT * FROM " . DB_HRD . " WHERE nip='{$keyw}' OR nama LIKE '%{$keyw}%' ORDER BY nama"; //echo $sql; $t = mysql_query($sql); $ndata = mysql_num_rows($t); if ($ndata > 0) { ?> <div style="max-height:300px;overflow:auto"> <table class="xtable" border="0" cellspacing="1px" cellpadding="4px" width="100%"> <tr> <th>Nama</th> <th>NIP</th> <th class="alc">Pilihan</th> </tr> <?php $x = $ndata > 2 ? 0 : 2; while ($r = mysql_fetch_array($t)) { if ($ndata > 2) { $x = $x == 0 ? 2 : 0; } else { $x = 2; } ?> <tr class="xtr<?php
} else { if ($app == 'checkuser') { app_checkuser(); } else { if ($app == 'urut') { if ($act == 'up') { urut_up(gpost('table'), $cid); } else { if ($act == 'dn') { urut_dn(gpost('table'), $cid); } } require_once MODDIR . 'control.php'; require_once MODDIR . 'xtable/xtable.php'; $opt = gpost('opt'); require_once VWDIR . gpost('page') . '.php'; } else { if ($app == 'notifbox') { notifbox(); } else { if ($app == 'gpage_tab') { require_once MODDIR . 'xtable/xtable.php'; require_once MODDIR . 'control.php'; require_once MODDIR . 'gpage.php'; gpage_tab_show($page); } else { if ($app == 'setting') { require_once MODDIR . 'setting.php'; } } }
// MultiCell($w, $h, $txt, $border=0, $align='J', $fill=0, $ln=1, $x='', $y='', $reseth=true, $stretch=0, $ishtml=false, $autopadding=true, $maxh=0) // START ////////////////////////// // Queries: //$t=dbSel("*","catalog","W/`dcid`='$dcid' LIMIT 0,1"); //$ndata=mysql_num_rows($t); //$r=dbFA($t); // add a page $pdf->AddPage(); // define barcode style $style = array('position' => '', 'align' => 'C', 'stretch' => false, 'fitwidth' => false, 'cellfitalign' => '', 'border' => false, 'hpadding' => 'auto', 'vpadding' => 0, 'fgcolor' => array(0, 0, 0), 'bgcolor' => false, 'text' => true, 'font' => 'helvetica', 'fontsize' => 7, 'stretchtext' => 3); $title = gpost('title'); $desc = gpost('description'); $plhead = gpost('plhead'); $plcnum = gpost('plcnum'); $plbcode = gpost('plbcode'); $lwidth = floatval(gpost('lwidth')) * 10; $lheight = 1; /* if($plhead=='Y') $lheight+=9; if($plcnum=='Y') $lheight+=14; if($plbcode=='Y') $lheight+=10; */ $q = mysql_query("SELECT * FROM `p_label`"); $k = 0; $kol = 0; $row = 0; $i = 0; $nkol = floor($dcPageW / ($lwidth + 1)); $nrow = 99; //$nrow=floor($dcPageH/$lheight); while ($r = mysql_fetch_array($q)) {
<?php require_once MODDIR . 'control.php'; require_once MODDIR . 'apps/aka.php'; $dept = gpost('departemen'); $departemen = departemen_r($dept); // Page Selection Bar $PSBar = new PSBar_2(); $PSBar->begin(); $PSBar->selection_departemen('penempatan', $dept); $PSBar->end(); if (count($departemen) > 0) { notifbox(); ?> <table cellspacing="0" cellpadding="0" width="100%"><tr valign="top"> <td width="45%" style="padding-right:10px"> <div id="loader3" class="loader" style="display:none"></div> <div id="data_calon" style="width:100%"> <?php require_once APPDIR . 'penempatan_calon_get.php'; ?> </div> </td> <td width="55%" style="border-left:1px solid #fff;padding-left:10px"> <div id="loader2" class="loader" style="display:none"></div> <div id="data_kelas" style="width:100%"> <?php require_once APPDIR . 'penempatan_kelas_get.php'; ?> </div> </td>
$fform->notif($q); } else { if($opt=='uf'||$opt=='df'){ // Prepocessing form $r=dbSFA("*",$dbtable,"W/replid='$cid'"); $tk=mysql_query("SELECT judul,klasifikasi,pengarang FROM pus_katalog WHERE replid='".$r['katalog']."'"); $rk=mysql_fetch_array($tk); $lok=$r['lokasi']; $sat=$r['satuan']; $tingb=$r['tingkatbuku']; $lokasi=lokasi_r($lok); $satuan=satuan_r($sat); $tingkatbuku=tingkatbuku_r($tingb); } else { $lok=gpost('lokasi'); $sat='IDR'; $tingb=0; $lokasi=lokasi_r($lok); $satuan=satuan_r($sat); $tingkatbuku=tingkatbuku_r($tingb); $tk=mysql_query("SELECT judul,klasifikasi,pengarang FROM pus_katalog WHERE replid='".$inp['katalog']."'"); $rk=mysql_fetch_array($tk); $r=array(); $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'];
<?php $app = gpost('app'); if ($app == 'panel') { $tilecount = 1; panel_draw(); } else { if ($app == 'menu') { app_menu(); } else { if ($app == 'view') { app_page_view(); } else { if ($app == 'checkuser') { app_checkuser(); } } } }
<?php require_once MODDIR . 'fform/fform.php'; $opt = gpost('opt'); $cid = gpost('cid'); if ($cid == '') { $cid = 0; } // form Module $fmod = "daftarbuku"; $dbtable = "pus_buku"; $fform = new fform($fmod, $opt, $cid, 'Buku'); $inp = app_form_gpost('katalog', 'idbuku', 'barkode', 'callnumber', 'sumber', 'harga', 'satuan', 'tanggal'); $nunit = intval(gpost('nbuku')); $inp['lokasi'] = gpost('tlokasi'); $inp['tingkatbuku'] = gpost('ttingkatbuku'); $inp['tahun'] = date("Y"); if ($opt == 'a' || $opt == 'u' || $opt == 'd') { $q = false; if ($opt == 'u') { // edit $q = dbUpdate($dbtable, $inp, "replid='{$cid}'"); } else { if ($opt == 'd') { // delete $q = dbDel($dbtable, "replid='{$cid}'"); } } $fform->notif($q); } else { if ($opt == 'uf' || $opt == 'df') {
<?php $ssid=session_id(); $keyw=gpost('sbuku'); if($keyw!=''){ $t=mysql_query("SELECT pus_peminjaman.replid FROM pus_peminjaman LEFT JOIN pus_buku ON pus_buku.replid=pus_peminjaman.buku LEFT JOIN pus_katalog ON pus_katalog.replid=pus_buku.katalog WHERE pus_peminjaman.status='1' AND (pus_buku.barkode='$keyw' OR pus_katalog.judul LIKE '%".$keyw."%')"); $n=mysql_num_rows($t); if($n==1){ $r=mysql_fetch_array($t); if(mysql_query("INSERT INTO pus_tpjm SET ssid='$ssid',peminjaman='".$r['replid']."'")) echo "1"; else echo "0"; } else { echo "2"; } } else { echo "0"; } ?>
} else { // db operation for form : add $r = app_form_gpost('departemen', 'tahunajaran', 'pegawai', 'pelajaran', 'aktif', 'keterangan'); $r['pelajaran'] = gpost('spelajaran'); $r['aktif'] = '1'; } $fform->dimension(450); $fform->head(); if ($opt == 'af' || $opt == 'uf') { //$fform->fl('Departemen',departemen_name($r['departemen'])); //$fform->fl('Tahun ajaran',tahunajaran_name($r['tahunajaran'])); //$fform->fi('Status',iSelect('aktif',array('1'=>'Aktif','0'=>'Tidak aktif'),$r['aktif'])); //$fform->fa('Kode',iText('kode',$r['kode'],'width:40px')); require_once MODDIR . 'control.php'; // Add or Edit form $fform->fi('Mata Pelajaran', iSelect('pelajaran', pelajaran_opt(gpost('tahunajaran')), $r['pelajaran'])); $fform->fi('Pegawai', app_form_getpegawai('pegawai', $r)); $fform->fa('Keterangan', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 3)); hiddenval('aktif', 1); } else { if ($opt == 'df') { // Delete form if (0 > 0) { $fform->reg['dlg_del'] = 'Data <idata> masih digunakan. Apakah anda yakin untuk menghapus <idata> <data>?'; $fform->dlg_delw($r['nama'], 'Data-data kelas dan siswa yang termasuk dalam tingkat ini juga akan dihapus. Data yang sudah dihapus tidak dapat dikembalikan.'); } else { $fform->dlg_del($r['nama']); } //$fform->dlg_del($r['nilai']); } }
<?php require_once MODDIR . 'fform/fform.php'; $opt = gpost('opt'); $cid = gpost('cid'); if ($cid == '') { $cid = 0; } // form Module $fmod = "pembayaran_data"; $dbtable = "keu_pembayaran"; $fform = new fform($fmod, $opt, $cid, 'Data pembayaran'); $inp = app_form_gpost('nominal', 'cicilan', 'keterangan'); if ($opt == 'a' || $opt == 'u' || $opt == 'd') { $q = false; if ($opt == 'a') { // add $q = dbInsert($dbtable, $inp); } else { if ($opt == 'u') { // edit $inp['tanggal'] = date("Y-m-d"); $q = dbUpdate($dbtable, $inp, "replid='{$cid}'"); } else { if ($opt == 'd') { // delete $q = dbDel($dbtable, "replid='{$cid}'"); } } } $fform->notif($q);
<?php $empstatus = MstrGet("mstr_status"); $dcid = gpost('id'); $empappid = gpost('eid'); $tgl = gpost('tgl'); if ($tgl == '0') { $tgl = date("Y-m-d"); $dif = 1; $scuti = intval(gpost('scuti')) - $dif; } else { $dif = 1; $scuti = intval(gpost('scuti')) - $dif; } $fname = gpost('name'); $cyear = date("Y"); $t = mysql_query("SELECT * FROM `emp_dayoff` WHERE `empid`='{$empappid}' AND `date1y`='{$cyear}' AND `date2y`='{$cyear}'"); $hcuti = 0; while ($r = mysql_fetch_array($t)) { $hcuti += $r['count']; } $t = mysql_query("SELECT * FROM `emp_dayoff` WHERE `dcid`='{$dcid}'"); $r = mysql_fetch_array($t); $scuti = 12 - $hcuti + $r['count']; $fwidth = $r['count'] > 1 ? 550 : 420; ?> <script type="text/javascript" language="javascript"> </script> <table cellspacing="0" cellpadding="0" width="100%"><tr><td align="center" style="padding-top:120px"> <div class="fformbox" style="width:<?php
<?php $opt = gpost('opt'); $act = gpost('a'); if ($opt == 'rife') { if ($act == 'find') { require_once VWDIR . 'ri_emp.php'; } }
<?php require_once MODDIR . 'fform/fform.php'; require_once MODDIR . 'control.php'; $opt = gpost('opt'); $cid = gpost('cid'); if ($cid == '') { $cid = 0; } appmod_use('aka/tahunajaran', 'aka/tingkat', 'aka/kelas'); $mtipe = gpost('mtipe'); if ($mtipe == '') { $mtipe = "1"; } // form Module $fmod = "siswakelas"; $fform = new fform($fmod, 'af', $cid, 'Cari siswa'); $fform->reg['title_af'] = '<idata>'; //$fform->reg['btnlabel_a_y']='Pilih yg ditandai'; $fform->reg['btnlabel_a_n'] = 'Tutup'; $fform->dimension(500); $fform->ptop = 50; $fform->head('Pilih Siswa', 0); echo '<tr><td><div id="data_member" style="height:350px;overflow:auto">'; if ($mtipe == "0" || $mtipe == "1") { require_once APPDIR . 'sirkulasi_member_get_siswa.php'; } echo '</div></td></tr>'; $fform->foot(0);
if ($opt == 'd') { // delete $q = dbDel($dbtable, "replid='{$cid}'"); $q &= dbDel("aka_kelas", "tingkat='{$cid}'"); $q &= dbDel("aka_siswa", "tingkat='{$cid}'"); } } } $fform->notif($q); } else { if ($opt == 'uf' || $opt == 'df') { // Prepocessing form $r = dbSFA("*", $dbtable, "W/replid='{$cid}'"); } else { $r['departemen'] = gpost('departemen'); $r['tahunajaran'] = gpost('tahunajaran'); } $fform->head(); if ($opt == 'af' || $opt == 'uf') { require_once MODDIR . 'control.php'; // Add or Edit form $fform->fl('Departemen', departemen_name($r['departemen'])); $fform->fl('Departemen', tahunajaran_name($r['tahunajaran'])); $fform->fi('Semester', iText('nama', $r['nama'], 'width:100px')); $fform->fa('Keterangan', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 3)); } else { if ($opt == 'df') { // Delete form if (intval($r['aktif']) == 1) { $fform->reg['dlg_del'] = 'Semester ini masih aktif.<br/ >Apakah anda yakin untuk menghapus <idata> <data>?'; $fform->dlg_delw($r['nama']);