<?php session_start(); include '../../config/connect.php'; include '../../config/function.php'; include '../../config/config.php'; if (NULL !== cekAkses("{$modul}", "{$_SESSION['ylevel']}", "{$act}")) { $nama = anti($_POST['nm']); $hp = anti($_POST['hp']); $alamat = anti($_POST['alamat']); switch ($_POST['tipe']) { case 'add': yposSQL('ADD', 'ypos_suplier', "ids='{$_SESSION['yids']}', nama_sup='{$nama}', tlp='{$hp}', alamat='{$alamat}', date_create='{$getDate}'"); header("location:../../{$set->folder_modul}={$modul}&msg=sucessfully"); break; case 'edit': yposSQL('EDIT', 'ypos_suplier', "nama_sup='{$nama}', tlp='{$hp}', alamat='{$alamat}'", "kdsup={$id}"); header("location:../../{$set->folder_modul}={$modul}&msg=sucessfully"); break; } } else { header("location:../../{$set->folder_modul}={$modul}&msg=error&errno=1045"); }
//nilai ON untuk kepentingan development, mengetahui error - set ke OFF jika sudah di server production error_reporting(E_ALL); //^E_NOTICE^E_STRICT^E_DEPRECATED); date_default_timezone_set("Asia/Jakarta"); //setinggan untuk timezone if (isset($_SESSION['yuser'])) { $set = yposSQL('SHOW', 'ypos_settings', '*', "ids={$_SESSION['yids']} && 1=1")->fetch_object(); } @($home = $set->url_web); @($mod_url = $set->url_web . '/' . $set->folder_modul); @($getDate = date('Y-m-d')); //tanggal sekarang @($ip = $_SERVER['REMOTE_ADDR']); @($hostname = gethostbyaddr($_SERVER['REMOTE_ADDR'])); @($referrer = getenv('HTTP_REFERER')); @($url = $_SERVER['REQUEST_URI']); @($site = $_SERVER['SERVER_NAME']); @($jam = date("H:i:s")); @($now = date('Y-m-d H:i:s')); @($id = abs((int) $_GET['id'])); //nilai dari id dengan tipe int, digunakan untuk mengedit semua modul @($kode = anti($_GET['id'])); //nilai dari id dengan tipe varchar, digunakan untuk mengedit semua modul @($modul = anti($_GET[$set->folder_modul])); //untuk mengambil nilai modul @($act = $_GET['act']); //untuk mengambil nilai act (action) @($akses = '<b>Hak akses anda terbatas untuk modul ini (' . $act . '), silahkan hubungi administrator! (1045)</b>'); @($checked = 'checked="checked"'); @($disabled = 'disabled="disabled"'); @($read = 'readonly="readonly"');
?> &sub=parameter&op=edparam&id=<?php echo $r['idpm']; ?> "><img src="images/icon-edit-on.png" border="0" width="20" height="20" /></a> </td> </tr> <?php $no++; } ?> </table><?php break; case 'parameter-child': @($idpc = abs((int) $_GET['child'])); @($param = anti($_GET['param'])); if ($id != 1) { $ed = yposSQL('SHOW', 'ypos_paramchild', '*', "idpc={$idpc} && idpm={$id} && child_name='{$param}'")->fetch_array(); ?> <form method="post" action="<?php echo $set->folder_modul . '/' . $modul; ?> /aksi.php?<?php echo $set->folder_modul . '=' . $modul . '&id=' . $id . '&idpc=' . @$ed['idpc']; ?> " name="form" id="form"> <fieldset class="atas"> <table> <tr> <th>Name</th> <td><input type="text" class="inp-form" name="nm" required="required" size="30" maxlength="50" value="<?php
<?php session_start(); include '../../config/connect.php'; include '../../config/function.php'; include '../../config/config.php'; $report = anti($_GET['rpt']); $start = anti($_GET['start']); $end = anti($_GET['end']); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="../../css/report.css"> <title>Laporan <?php echo $report; ?> </title> </head> <body> <div style="float:left; padding: 5px 0 5px 5; position:fixed; background-color:#F2F2F2; width:98.5%"> <a href="../../modul=laporan"><button type="button">Back</button></a> <a href=""><button type="button" name="save">Save As</button></a> </div> <div id="lap"> <?php include '../header.php'; ?> <table width="100%" border="1" bgcolor="#000000"> <tr align="center" bgcolor="#CCCCCC"> <th>No</th>
session_start(); include '../../config/connect.php'; include '../../config/function.php'; include '../../config/config.php'; if (NULL !== cekAkses("{$modul}", "{$_SESSION['ylevel']}", "{$act}")) { $kd = anti($_POST['kode']); $nama = anti($_POST['nama']); $stok = abs((int) $_POST['stok']); $hj = anti($_POST['hrgaJual']); $hb = anti($_POST['hrgaBeli']); $cat = anti($_POST['cat']); $lok = anti($_POST['lokasi']); $jurl = anti($_POST['jURL']); $urlPIC = anti($_POST['pic']); $pic = anti(substr($urlPIC, $jurl, 18)); $tipe = $_POST['tipe']; switch ($tipe) { case 'save': yposSQL('ADD', 'ypos_barang', "kdbarang='{$kd}', nama_barang='{$nama}', harga_beli='{$hb}', harga_jual='{$hj}', stok={$stok}, lokasi='{$lok}', gambar='{$pic}', idkat={$cat}, ids={$_SESSION['yids']}"); header("location:../../{$set->folder_modul}={$modul}&msg=sucessfully"); break; case 'edit': if (!empty($urlPIC)) { yposSQL('EDIT', 'ypos_barang', "nama_barang='{$nama}', harga_beli='{$hb}', harga_jual='{$hj}', stok={$stok}, lokasi='{$lok}', gambar='{$pic}', idkat={$cat}, ids={$_SESSION['yids']}", "kdbarang='{$kd}'"); } else { yposSQL('EDIT', 'ypos_barang', "nama_barang='{$nama}', harga_beli='{$hb}', harga_jual='{$hj}', stok={$stok}, lokasi='{$lok}', idkat={$cat}, ids={$_SESSION['yids']}", "kdbarang='{$kd}'"); } header("location:../../{$set->folder_modul}={$modul}&msg=sucessfully"); break; }
$flag = "flag{evil_eval_devil}"; echo $flag; exit; } function anti() { $query = $_SERVER['QUERY_STRING']; $query = urldecode($query); $query = strtolower($query); if (preg_match('/show/', $query) or preg_match('/flag/', $query)) { return false; } else { return true; } } if (anti()) { eval('"$str=(string)' . $_GET['str'] . '";'); } else { echo 'detect the evil words'; } ?> <!-- error_reporting(0); function show_flag(){ $flag = "a f4ke flag"; echo $flag; exit(); } function anti(){ $query = $_SERVER['QUERY_STRING']; $query = urldecode($query);
<?php include 'config/connect.php'; include 'config/function.php'; @($kdbrg = anti($_POST[kdbrg])); $sql = yposSQL('SHOW', 'ypos_barang', 'harga_jual', "kdbarang='{$kdbrg}'"); $row = $sql->num_rows; if ($row > 0) { $r = $sql->fetch_array(); $brg = explode('.', $r['harga_jual']); $data['harga'] = $brg[0]; echo json_encode($data); } else { $data['harga'] = ''; echo json_encode($data); }
<?php include 'config/connect.php'; include 'config/function.php'; include 'config/config.php'; $user = anti($_POST['user']); $pass = strip_tags(stripslashes(htmlspecialchars(md5($_POST['pass'])))); if (!empty($user) and $pass) { $login = yposSQL('SHOW', 'ypos_users', 'username, online, level, ids', "username='******' && pass='******' && aktif='Y' && 1=1"); $ketemu = $login->num_rows; session_start(); //jalankan session $sid = session_id(); $token = $_POST['token']; if ($token == $sid) { if ($ketemu > 0) { $r = $login->fetch_array(); //isi session login $_SESSION['yuser'] = $r['username']; $_SESSION['ylevel'] = $r['level']; $_SESSION['ysess'] = $sid; $_SESSION['yids'] = $r['ids']; if ($r['online'] == 'Y') { header('location:redirect.php'); } else { LgnLogs($_SESSION['yuser'], $ip, $hostname, cekBrowser(), 'IN'); yposSQL('EDIT', 'ypos_users', "sessionID='{$_SESSION['ysess']}', online='Y', last_seen=NOW()", "username='******'yuser']}'"); header('location:index.php'); } //end cek online } else {
<?php session_start(); include '../../config/connect.php'; include '../../config/function.php'; include '../../config/config.php'; if (NULL !== cekAkses("{$modul}", "{$_SESSION['ylevel']}")) { $rpt = anti($_POST['rpt']); $str = anti($_POST['start']); $end = anti($_POST['end']); $rpt = yposSQL('SHOW', 'ypos_paramchild', '*', "idpc={$rpt} && 1=1")->fetch_array(); header("location:../../{$rpt['ket']}.php?rpt={$rpt['child_name']}&start={$str}&end={$end}"); } else { header("location:../../{$set->folder_modul}={$modul}&msg=error&errno=1045"); }
<?php session_start(); include '../../config/connect.php'; include '../../config/function.php'; include '../../config/config.php'; if (NULL !== cekAkses("{$modul}", "{$_SESSION['ylevel']}", "{$act}")) { $kat = anti($_POST['kat']); switch ($_POST['tipe']) { case 'save': //cek data yang sama if (NULL !== cekData('ypos_kategori', "nama_kat='{$kat}'")) { header("location:../../{$set->folder_modul}={$modul}&msg=error&errno=1000&nama={$kat}"); } else { yposSQL('ADD', 'ypos_kategori', "ids='{$_SESSION['yids']}', nama_kat='{$kat}'"); header("location:../../{$set->folder_modul}={$modul}&msg=done"); } break; case 'edit': header("location:../../{$set->folder_modul}={$modul}&msg=error&errno=1000&nama={$kat}"); yposSQL('EDIT', 'ypos_kategori', "nama_kat='{$kat}'", "idkat={$id}"); header("location:../../{$set->folder_modul}={$modul}&msg=done"); break; } } else { header("location:../../{$set->folder_modul}={$modul}&msg=error&errno=1045"); }
<td colspan="3" align="center">Grand Total</td> <td align="center"><?php echo $total['t_qty']; ?> </td> <td align="right"><?php echo idr($total['t_harga']); ?> </td> <td align="right"><?php echo idr(@$ed['ttl']); ?> </td> <td></td> </tr> <tr> <td colspan="6" align="center"></td> <td align="center"><a href="<?php echo $set->folder_modul . '=' . $modul; ?> "><button class="submit">Selesai</button></a></td> </tr> </table> <?php break; case 'delete': $kdp = anti($_GET['kdp']); $mysqli->query("CALL ypos_trxPembelianDtl_delProd({$id},'{$kdp}',@error)"); echo "<meta content='0; url={$set->folder_modul}={$modul}&act=new&id={$kdp}' http-equiv='refresh'/>"; break; }
switch ($_POST['tipe']) { case 'save': $q = $mysqli->query("CALL ypos_trxPembelianDtl('{$kdbeli}','{$nota}',{$sup},'{$_SESSION['yuser']}','{$tgl}','{$brg}', {$qty}, {$h_pcs}, {$harga}, @error)")->fetch_object(); //echo $kdbeli.' - '.$nota. '-'.$sup.' - '.$_SESSION['yuser'].'-'.$tgl.'-'.$brg.'-'. $qty.'-'. $h_pcs.'-'. $harga; $errno = $q->error; if (!empty($errno)) { header("location:../../{$set->folder_modul}={$modul}&act=new&id={$kdbeli}&msg=error&errno={$errno}"); } else { header("location:../../{$set->folder_modul}={$modul}&act=new&id={$kdbeli}"); } break; case 'edProd': $idp = abs((int) $_GET['idp']); //untuk get id penjualan produk $ttl = abs((int) $_GET['ttl']); //untuk get ttl produk $getNota = anti($_GET['nota']); yposSQL('EDIT', 'ypos_pembeliandtl', "kd_barang='{$brg}', qty_beli={$qty}, harga_beli={$harga}/{$qty}, total={$harga}", "idDtlPembelian={$idp} && kdPembelian='{$kode}'"); $t = yposSQL('SHOW', 'ypos_pembeliandtl', 'DISTINCT SUM(total) AS t_harga', "kdPembelian='{$kode}'")->fetch_array(); yposSQL('EDIT', 'ypos_pembelian', "total_pembelian={$t['t_harga']}", "kdPembelian='{$kode}'"); //update harga barang terbaru $h_brg = yposSQL('SHOW', 'ypos_barang', 'harga_beli', "kdbarang='{$brg}'")->fetch_array(); if ($h_brg != $harga / $qty) { yposSQL('EDIT', 'ypos_barang', "harga_beli={$harga}/{$qty}", "kdbarang='{$brg}'"); } header("location:../../{$set->folder_modul}={$modul}&act=new&id={$kode}&ttl={$t['t_harga']}¬a={$getNota}&msg=sucessfully"); break; } } else { header("location:../../{$set->folder_modul}={$modul}&msg=error&errno=1045"); }
<?php if (!defined('YBASE')) { exit('Now Allowed'); } include 'notification.php'; @($user = anti($_GET['user'])); switch ($act) { default: ?> <form method="post" action="<?php echo $set->folder_modul . '/' . $modul; ?> /aksi.php?<?php echo $set->folder_modul . '=' . $modul; ?> " name="form" id="form"> <fieldset class="atas"> <table> <tr> <th>Username</th> <td><input type="text" class="inp-form" name="username" placeholder="Username" required="required"/></td> <td><input type="text" class="inp-form" name="nm" required="required" placeholder="Nama Lengkap" size="40"/></td> <td><input type="text" class="inp-form" name="hp" required="required" placeholder="No HP" size="20"/></td> </tr> <tr> <th>Password</th> <td><input type="text" class="inp-form" name="pass" placeholder="Password" required="required" /></td> <td><div class="styled-select slate semi-square"><select name="level"> <?php $l = yposSQL('SHOW', 'ypos_level', '*', '1=1', 'lvl');
$item_desc = $data->val($i, 5, 8); $w_dus = $data->val($i, 17, 8); $w_roll = $data->val($i, 22, 8); $w_prod = $data->val($i, 31, 8); if (strlen($wo) != 0) { $q = msq($kon, "insert into t_waste(wo,item_code,item_desc,w_dus,w_roll,w_prod,bulan,tahun)\r\n\t\t\t\t\t\t\t\t values('{$wo}','{$item_code}','{$item_desc}','{$w_dus}','{$w_roll}','{$w_prod}','{$bln}','{$thn}')"); } //$q = msq($kon, "insert into t_waste(batch) values('$batch')"); } break; case "tambah_ik": button_cek(); $judul = anti($_POST['judul']); $tipe = $_FILES['file']['type']; $dir = "../_asset/_pdf/"; $foto = anti($_FILES['file']['name']); if ($tipe == "application/pdf") { echo $_FILES['file']['tmp_name']; move_uploaded_file($_FILES['file']['tmp_name'], $dir . $foto); $q = msq($kon, "insert into t_ik(judul,file) values('{$judul}','{$foto}')"); if ($q) { $_SESSION['suc'] = "Berhasil menambahkan ik"; } else { $_SESSION['err'] = "Gagal menambahkan ik"; } } else { $_SESSION['err'] = "Tipe file tidak valid..."; referer(); exit(1); } referer();
<?php session_start(); include '../../config/connect.php'; include '../../config/function.php'; include '../../config/config.php'; @($kd = $_POST['id']); if (@$_GET['proses'] == 'finish') { $subttl = abs((int) $_POST['subttl']); $diskon = abs((int) $_POST['diskon']); $diskon_rp = abs((int) $_POST['diskon_rp']); $bayar = abs((int) $_POST['bayar']); $grandTotal = abs((int) $_POST['grandTotal']); $ket = anti($_POST['ket']); $kembali = $bayar - $grandTotal; yposSQL('EDIT', 'ypos_penjualan', "diskon={$diskon}, diskon_rp={$diskon_rp}, grand_total={$grandTotal}, uang_bayar={$bayar}, uang_kembali={$kembali}, keterangan='{$ket}'", "kd_penjualan='{$kd}'"); if (isset($_POST['p'])) { //auto direct printing struk penjualan at here } } else { $getData = yposSQL('SHOW', 'ypos_penjualan', 'kd_penjualan, subtotal', "kd_penjualan='{$kd}'")->fetch_array(); ?> <style> .input-proses { width: 300px; height: 20px; border: 1px solid #78d0ed; font: 1.5em Arial, sans-serif; } .font-proses {
<?php session_start(); include '../../config/connect.php'; include '../../config/function.php'; include '../../config/config.php'; if (NULL !== cekAkses("{$modul}", "{$_SESSION['ylevel']}", "{$act}")) { $kdset = anti($_POST['kdset']); $nama = anti($_POST['nm']); $alamat = anti($_POST['alamat']); $limit = anti($_POST['limit']); $url = anti($_POST['url']); $keckab = anti($_POST['keckab']); $tlp = anti($_POST['tlp']); $p = anti($_POST['printer']); yposSQL('EDIT', 'ypos_settings', "kdSET='{$kdset}', nama_toko='{$nama}', alamat='{$alamat}', keckab='{$keckab}', tlp='{$tlp}', printer='{$p}', url_web='{$url}', last_update='{$_SESSION['yuser']}', limit_page='{$limit}'", "ids={$_SESSION['yids']}"); header("location:../../{$set->folder_modul}={$modul}&msg=sucessfully"); } else { header("location:../../{$set->folder_modul}={$modul}&msg=error&errno=1045"); }
<?php session_start(); include '../../config/connect.php'; include '../../config/function.php'; include '../../config/config.php'; if (NULL !== cekAkses("{$modul}", "{$_SESSION['ylevel']}", "{$act}")) { $kd = anti($_POST['kode']); $tgl = anti($_POST['tgl']); $cust = anti($_POST['cust']); $b = explode(' - ', $_POST['brg']); $brg = $b[0]; $harga = abs((int) $_POST['harga']); //harga asli dari data barang $select_diskon = anti($_POST['select_diskon']); $disc_persen = abs((int) $_POST['disc_persen']); $disc_rp = abs((int) $_POST['disc_rp']); $disc_unit = abs((int) $_POST['disc_unit']); $qty = abs((int) $_POST['qty']); $jumlah = abs((int) $_POST['jumlah']); // $diskon = abs((int)($_POST['diskon'])); // $ket = anti($_POST['ket']); // $item_disc = $harga - $harga_disc; // item_disc = nominal pemberian diskon/potongan (auto). Jika harga real ketika transaksi berbeda dengan harga dari data barang // $ttl = $harga_disc * $qty; // total harga real transaksi * dengan qty echo $kd . '<br>'; echo $tgl . '<br>'; echo $cust . '<br>'; echo $brg . '<br>'; echo $harga . '<br>';
<?php session_start(); include '../../config/connect.php'; include '../../config/function.php'; include '../../config/config.php'; if (NULL !== cekAkses("{$modul}", "{$_SESSION['ylevel']}", "{$act}")) { $nama = anti($_POST['nm']); $hp = anti($_POST['hp']); $pass = md5($_POST['pass']); $lvl = anti($_POST['level']); $user = anti($_POST['username']); @($sts = anti($_POST['aktif'])); switch (@$_POST['tipe']) { case 'add': //cek apakah ada data yang sama if (NULL !== cekData('ypos_users', "username='******'")) { header("location:../../{$set->folder_modul}={$modul}&msg=error&errno=1000"); } else { yposSQL('ADD', 'ypos_users', "username='******', nama_lengkap='{$nama}', pass='******', hp='{$hp}', level='{$lvl}', ids='{$_SESSION['yids']}'"); header("location:../../index.php?{$set->folder_modul}={$modul}&msg=done"); } break; case 'edit': if (!empty($_POST['pass'])) { yposSQL('EDIT', 'ypos_users', "nama_lengkap='{$nama}', pass='******', hp='{$hp}', aktif='{$sts}', level='{$lvl}'", "username='******' && 1=1"); } else { yposSQL('EDIT', 'ypos_users', "nama_lengkap='{$nama}', hp='{$hp}', aktif='{$sts}', level='{$lvl}'", "username='******' && 1=1"); } header("location:../../index.php?{$set->folder_modul}={$modul}&msg=done"); break;
<?php cek_err(); cek_suc(); $id = anti($_GET['id']); $q = msq($kon, "SELECT *, k.id_bagian as k_bag, b.id_bagian as b_bag, k.nama as nama_kar, b.nama as nama_bagian from t_karyawan k inner join t_bagian b on b.id_bagian=k.id_bagian where nik='{$id}'"); $d = mfa($q); $j = mnr($q); if ($j == 0) { referer(); } echo "\r\n\t<script>\r\n\t\tdocument.title = 'Edit Karyawan | DISPLAY PRD'\r\n\t</script>\r\n\t<script>\r\n\t\t\$(document).ready(function(){\r\n\t\t\t\$('.menu9').addClass('sidebar-dash-aktif');\r\n\t\t});\r\n\t</script>\r\n\t\t<div class='title-admin'>\r\n\t\t\t<div style='padding:20px; height:142px; background:rgba(0,0,0,0.4)'>\r\n\t\t\t\t<div style='font-size:70px; margin-right:15px; margin-top:10px;' class='f-putih f-symbol'>?</div>\r\n\t\t\t\t\t<div class='f-putih f24 f-segoe' style='padding:15px; margin-top:50px;'>Edit Karyawan<br><div style='margin-top:7px;' class='f-segoe f-putih f16'><i>Form untuk mengedit karyawan...</i></div></div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class='title-dash'>\r\n\t\t\t<div class='f14'><a href='#' class='link-biru'>DISPLAY PRD</a> <span class='f-none f-symbol1'>×</span> Form</div>\r\n\t\t</div>\r\n\t\t\r\n\t\t<div class='wrapper-tengah'>\r\n\t\t\t<div class='wrapper-form' style='width:500px;'>\r\n\t\t\t<div class='title-form'><span class='f-symbol mr10'>?</span>EDIT KARYAWAN</div>\r\n\t\t\t\t<div class='pd15'>\r\n\t\t\t\t\t<div class='psn'></div>\r\n\t\t\t\t\t<form method='POST' action='aksi_edit_karyawan' id='form_input' enctype='multipart/form-data'>\r\n\t\t\t\t\t\t<div class='form-grup'>\r\n\t\t\t\t\t\t\t<div class='label-form'>NIK KARYAWAN</div>\r\n\t\t\t\t\t\t\t<input type='text' readonly maxlength='12' class='form transi-3' value='{$d['nik']}' name='nik' autocomplete='off' required>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class='form-grup'>\r\n\t\t\t\t\t\t\t<div class='label-form'>NAMA KARYAWAN</div>\r\n\t\t\t\t\t\t\t<input type='text' class='form transi-3' name='nama' value='{$d['nama_kar']}' autocomplete='off' required>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class='form-grup'>\r\n\t\t\t\t\t\t\t<div class='label-form'>TGL LAHIR KARYAWAN</div>\r\n\t\t\t\t\t\t\t<input type='text' id='datepicker' class='form transi-3' value='{$d['tgl_lhr']}' name='tgl_lahir' maxlength='10' autocomplete='off' required>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<script>\r\n\t\t\t\t\t\t\t\tfunction ambil_mesin()\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tvar id_bagian = \$('#id_bagian').val();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\$.ajax({\r\n\t\t\t\t\t\t\t\t\t\ttype: 'POST',\r\n\t\t\t\t\t\t\t\t\t\turl: 'aksi_ambil_mesin',\r\n\t\t\t\t\t\t\t\t\t\tdata: {id_bagian:id_bagian},\r\n\t\t\t\t\t\t\t\t\t\tdataType: 'html',\r\n\t\t\t\t\t\t\t\t\t\tsuccess: function(msg)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\$('#wr-idmesin').fadeIn();\r\n\t\t\t\t\t\t\t\t\t\t\t\$('#id_mesin').html(msg);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tfunction ambil_tugas()\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tvar id_bagian = \$('#id_bagian').val();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\$.ajax({\r\n\t\t\t\t\t\t\t\t\t\ttype: 'POST',\r\n\t\t\t\t\t\t\t\t\t\turl: 'aksi_ambil_tugas',\r\n\t\t\t\t\t\t\t\t\t\tdata: {id_bagian:id_bagian},\r\n\t\t\t\t\t\t\t\t\t\tdataType: 'html',\r\n\t\t\t\t\t\t\t\t\t\tsuccess: function(msg)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\$('#wr-idtugas').fadeIn();\r\n\t\t\t\t\t\t\t\t\t\t\t\$('#id_tugas').html(msg);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t</script>\r\n\t\t\t\t\t\t<div class='form-grup'>\r\n\t\t\t\t\t\t\t<div class='label-form'>NAMA BAGIAN</div>\r\n\t\t\t\t\t\t\t<select class='form transi-3' id='id_bagian' name='id_bagian' onchange='ambil_mesin(); ambil_tugas();' required>\r\n\t\t\t\t\t\t\t\t"; $q_bagian = msq($kon, "SELECT * FROM t_bagian ORDER BY nama ASC"); while ($d_bagian = mfa($q_bagian)) { if ($d['id_bagian'] == $d_bagian['id_bagian']) { $slc = "selected"; } else { $slc = ""; } echo "<option value='{$d_bagian['id_bagian']}' {$slc}>{$d_bagian['nama']}</option>"; } echo "\t\t\t\t\t\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class='form-grup'>\r\n\t\t\t\t\t\t\t<div class='label-form'>NAMA MESIN</div>\r\n\t\t\t\t\t\t\t<select class='form transi-3' name='id_mesin' id='id_mesin' required>\r\n\t\t\t\t\t\t\t\t"; $q_mesin = msq($kon, "SELECT * FROM t_mesin where id_bagian='{$d['id_bagian']}' ORDER BY nama ASC"); while ($d_mesin = mfa($q_mesin)) { if ($d['id_mesin'] == $d_mesin['id_mesin']) { $slc = "selected"; } else { $slc = ""; } echo "<option value='{$d_mesin['id_mesin']}' {$slc}>{$d_mesin['nama']}</option>"; }
header("location:../../index.php?{$set->folder_modul}={$modul}&sub=parameter&msg=error&errno=1000"); } else { yposSQL('EDIT', 'ypos_parameter', "nama_param='{$prm}', ket='{$desc}', userid='{$_SESSION['yuser']}'", "idpm={$id}"); header("location:../../index.php?{$set->folder_modul}={$modul}&sub=parameter&msg=done"); } break; case 'addPrmChild': $prm = anti($_POST['nm']); $desc = anti($_POST['desc']); if (NULL !== cekData('ypos_paramchild', "child_name='{$prm}'")) { header("location:../../index.php?{$set->folder_modul}={$modul}&sub=parameter-child&id={$id}&msg=error&errno=1000"); } else { yposSQL('ADD', 'ypos_paramchild', "child_name='{$prm}', idpm={$id}, ket='{$desc}', aktif='Y'"); header("location:../../index.php?{$set->folder_modul}={$modul}&sub=parameter-child&id={$id}&msg=done"); } break; case 'edPrmChild': $idpc = abs((int) $_GET['idpc']); $prm = anti($_POST['nm']); $desc = anti($_POST['desc']); if (NULL !== cekData('ypos_paramchild', "idpc != {$idpc} && child_name='{$prm}'")) { header("location:../../index.php?{$set->folder_modul}={$modul}&sub=parameter-child&id={$id}&msg=error&errno=1000"); } else { yposSQL('EDIT', 'ypos_paramchild', "child_name='{$prm}', idpm={$id}, ket='{$desc}', aktif='{$aktif}'", "idpc={$idpc}"); header("location:../../index.php?{$set->folder_modul}={$modul}&sub=parameter-child&id={$id}&msg=done"); } break; } } else { echo $akses; }