コード例 #1
0
ファイル: trx_penjualan.php プロジェクト: iddan/mhs
	</div>
	<!-- tempat untuk menampilkan form mahasiswa -->
	<div class="modal-body"></div>
	<div class="modal-footer">
	<button id="simpan-penjualan" class="submit">Finish</button>
	</div>
</div>
<!-- akhir kode modal dialog -->
<?php 
        break;
    case 'delprod':
        $kdp = anti($_GET['kdp']);
        yposSQL('DELETE', 'ypos_penjualandtl', "idDtlPenjualan={$id} && kd_penjualan='{$kdp}'");
        //mendapatkan total harga pembelian
        $t = yposSQL('SHOW', 'ypos_penjualandtl', 'DISTINCT IFNULL(SUM(total_harga),0) AS t_harga', "kd_penjualan='{$kdp}'")->fetch_array();
        yposSQL('EDIT', 'ypos_penjualan', "subtotal={$t['t_harga']}", "kd_penjualan='{$kdp}'");
        echo "<meta content='0; url={$set->folder_modul}={$modul}&act=new&id={$kdp}' http-equiv='refresh'/>";
        break;
}
?>
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/action.js"></script>
<script type="text/javascript">
    $("select, select_diskon").change(function(){
        $( "select option:selected").each(function(){
            if($(this).attr("value")==""){
                $("#disc_persen").val(0);
                $("#disc_rp").val(0);
                $("#disc_unit").val(0);
                $(".box").hide();
            }
コード例 #2
0
ファイル: config.php プロジェクト: iddan/mhs
<?php

ini_set('display_errors', 'On');
//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>');
コード例 #3
0
ファイル: aksi.php プロジェクト: iddan/mhs
<?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");
}
コード例 #4
0
ファイル: rpt_penjualan.php プロジェクト: iddan/mhs
    <th>Tanggal</th>
    <th>Produk</th>
    <th>Qty</th>
    <th>H.Beli(s)</th>
    <th>H.Jual Std(s)</th>
    <th>H.Jual Real(s)</th>
    <th>Disc Item</th>
    <th>Disc Final</th>
    <th>T.Penjualan</th>
    <th>Keuntungan</th>
    <th>Staff</th>
  </tr>
  <?php 
$no = 1;
$q = yposSQL('SHOW', 'ypos_vPenjualanDtl', '*', "tgl_jual >= '{$start}' && tgl_jual <= '{$end}'", 'kd_penjualan, tgl_jual');
$tot = yposSQL('SHOW', 'ypos_vPenjualanDtl', 'sum(qty) as t_qty, sum(th_beli) as t_beli, sum(harga_jualreal) as t_jualreal, sum(diskon_produk) as t_diskon, sum(th_jual) as t_jual, sum(pendapatan) as t_untung', "tgl_jual >= '{$start}' && tgl_jual <= '{$end}'")->fetch_array();
while ($r = $q->fetch_array()) {
    ?>
  <tr align="center" bgcolor="#F1F1F1">
    <td><?php 
    echo $no;
    ?>
</td>
    <td><?php 
    echo $r['kd_penjualan'];
    ?>
</td>
    <td><?php 
    echo $r['customer'];
    ?>
</td>
コード例 #5
0
ファイル: aksi.php プロジェクト: iddan/mhs
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;
    }
    //end case
} else {
    header("location:../../{$set->folder_modul}={$modul}&msg=error&errno=1045");
}
コード例 #6
0
ファイル: aksi.php プロジェクト: iddan/mhs
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;
    }
    //end case
} else {
    echo $akses;
}
コード例 #7
0
ファイル: laporan.php プロジェクト: iddan/mhs
?>
<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">
    <h3>Halaman Cetak Laporan</h3>
	<table>
    <tr>
	<th>Report Name</th>
    <td><div class="styled-select slate semi-square"><select name="rpt" id="rpt" onChange="changeRptParam();">
    <?php 
$l = yposSQL('SHOW', 'ypos_grouplvlmdl yg, ypos_level yl, ypos_paramchild ypc INNER JOIN ypos_rptpriv yrp2 ON ypc.idpc=yrp2.idparam', 'DISTINCT ypc.idpc AS idparam, ypc.child_name AS nama_report, yrp2.akses', "yrp2.idlevel={$_SESSION['ylevel']} && yrp2.akses='Y' && 1=1");
$cekRpt = $l->num_rows;
if ($cekRpt > 0) {
    while ($rpt = $l->fetch_array()) {
        echo "<option value='{$rpt['idparam']}'>{$rpt['nama_report']}</option>";
    }
    //end while
} else {
    echo "<option value='#'>No Report</option>";
}
$l->free_result();
?>
    </select></div></td>
    <input type="hidden" name="param" id="param" value="" />
	<td>Start Date : <input type="text" name="start" class="tgl" id="tgl1" required/></td>
    <td>End Date : <input type="text" name="end" class="tgl" id="tgl2" required/></td>
コード例 #8
0
ファイル: list-barang.php プロジェクト: iddan/mhs
<?php

include 'config/connect.php';
include 'config/function.php';
$q = strtolower($_GET["q"]);
if (!$q) {
    return;
}
$SQLbrg = yposSQL('SHOW', 'ypos_barang', '*', "nama_barang LIKE '%{$q}%'");
$cekBrg = $SQLbrg->num_rows;
if ($cekBrg > 0) {
    while ($brg = $SQLbrg->fetch_array()) {
        $resBrg = $brg['kdbarang'] . ' - ' . $brg['nama_barang'] . ' (Rp : ' . idr($brg['harga_jual']) . ')';
        echo "{$resBrg}\n";
    }
} else {
    echo "\n";
    echo '<b>Data tidak ada ..</b>';
}
コード例 #9
0
ファイル: aksi.php プロジェクト: iddan/mhs
    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']}&nota={$getNota}&msg=sucessfully");
            break;
    }
} else {
    header("location:../../{$set->folder_modul}={$modul}&msg=error&errno=1045");
}
コード例 #10
0
ファイル: user.php プロジェクト: iddan/mhs
<table id="dataTable" width="90%">
<tr id="tbl">
<th>No</th>
<th>Username</th>
<th>Nama</th>
<th>HP</th>
<th>Online</th>
<th>Aktif</th>
<th width="100"></th>
<th width="80"></th></tr>
<?php 
$no = 1;
if ($act == 'edit') {
    $q = yposSQL('SHOW', 'ypos_users', 'username, nama_lengkap, hp, online, aktif', "username != '{$user}' && ids={$_SESSION['yids']} && 1=1", 'username');
} else {
    $q = yposSQL('SHOW', 'ypos_users', 'username, nama_lengkap, hp, online, aktif', "ids={$_SESSION['yids']} && 1=1", 'username');
}
while ($r = $q->fetch_array()) {
    ?>
				<tr align="center">			
                <td align="center"><?php 
    echo $no;
    ?>
</td>
					<td><?php 
    echo $r['username'];
    ?>
</td>
					<td><?php 
    echo $r['nama_lengkap'];
    ?>
コード例 #11
0
ファイル: menu.php プロジェクト: iddan/mhs
<?php

if (!defined('YBASE')) {
    exit('Now Allowed');
}
?>
<br/>
<ul class="easyui-tree" style="text-transform:capitalize">
<?php 
//menu dinamis based on modul hak akses
$qm = yposSQL('SHOW', 'ypos_menu', 'menuID, menu', "aktif='Y' && 1=1", 'sort');
while ($menu = $qm->fetch_array()) {
    $qm2 = yposSQL('SHOW', 'ypos_modul a, ypos_grouplvlmdl b', 'a.modulID, nama_modul, modul_folder, menuID', "a.modulID=b.modulID && idlevel={$_SESSION['ylevel']} && menuID={$menu['menuID']} && aktif='Y' && r='Y' && 1=1");
    $cekqm2 = $qm2->num_rows;
    if ($cekqm2 > 0) {
        echo "<li><span>{$menu['menu']}</span>";
        echo '<ul>';
        while ($sub = $qm2->fetch_array()) {
            echo "<li><a href={$set->folder_modul}={$sub['modul_folder']}>{$sub['nama_modul']}</a></li>";
        }
        //end while
        $qm2->free_result();
        echo '</ul>';
    }
    //end if
    echo '</li>';
}
$qm->free_result();
if ($_SESSION['ylevel'] == 1) {
    echo '<li><span>Parameter System</span>
<ul>
コード例 #12
0
ファイル: rpt_pembelian.php プロジェクト: iddan/mhs
include '../header.php';
?>
<table width="100%" border="1" bgcolor="#000000">
  <tr align="center" bgcolor="#CCCCCC">
    <th>No</th>
    <th>Tanggal</th>
    <th>Kode</th>
    <th>Produk</th>
    <th>Qty</th>
    <th>Harga Beli(s)</th>
    <th>Total</th>
  </tr>
  <?php 
$no = 1;
$q = yposSQL('SHOW', 'ypos_barang a, ypos_pembeliandtl b, ypos_pembelian c', 'a.nama_barang, b.kdPembelian, qty_beli, b.harga_beli, total, tgl_beli', "kdbarang=kd_barang && b.kdPembelian=c.kdPembelian && tgl_beli >= '{$start}' && tgl_beli <= '{$end}'", 'tgl_beli');
$tot = yposSQL('SHOW', 'ypos_barang a, ypos_pembeliandtl b, ypos_pembelian c', 'sum(total) as total', "kdbarang=kd_barang && b.kdPembelian=c.kdPembelian && tgl_beli >= '{$start}' && tgl_beli <= '{$end}'", 'tgl_beli')->fetch_array();
while ($r = $q->fetch_array()) {
    ?>
  <tr align="center" bgcolor="#F1F1F1">
    <td><?php 
    echo $no;
    ?>
</td>
    <td><?php 
    echo $r['tgl_beli'];
    ?>
</td>
    <td><?php 
    echo $r['kdPembelian'];
    ?>
</td>
コード例 #13
0
ファイル: getBarang.php プロジェクト: iddan/mhs
<?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);
}
コード例 #14
0
ファイル: rpt_stok.php プロジェクト: iddan/mhs
<?php 
include '../header.php';
?>
<table width="100%" border="1" bgcolor="#000000">
  <tr align="center" bgcolor="#CCCCCC">
    <th>No</th>
    <th>Kode</th>
    <th>Produk</th>
    <th>Stok</th>
    <th>Harga Beli</th>
    <th>Harga Jual</th>
  </tr>
  <?php 
$no = 1;
$q = yposSQL('SHOW', 'ypos_barang', 'kdbarang, nama_barang, harga_beli, harga_jual, stok', "ids={$_SESSION['yids']} && 1=1");
$tot = yposSQL('SHOW', 'ypos_barang', 'sum(stok) as stok', "ids={$_SESSION['yids']} && 1=1")->fetch_array();
while ($r = $q->fetch_array()) {
    ?>
  <tr align="center" bgcolor="#F1F1F1">
    <td><?php 
    echo $no;
    ?>
</td>
    <td><?php 
    echo $r['kdbarang'];
    ?>
</td>
    <td><?php 
    echo $r['nama_barang'];
    ?>
</td>
コード例 #15
0
ファイル: function.php プロジェクト: iddan/mhs
function stdChoice($data, $name = 'aktif')
{
    global $mysqli;
    $ds = yposSQL('SHOW', 'ypos_paramchild', '*', "idpm=1 && aktif='Y' && 1=1");
    $r = '';
    $r .= '<td>';
    $r .= "<select name={$name}>";
    while ($chz = $ds->fetch_array()) {
        if ($chz['child_name'] == $data) {
            $r .= "<option value={$chz['child_name']} selected=selected>{$chz['child_name']}</option>";
        } else {
            $r .= "<option value={$chz['child_name']}>{$chz['child_name']}</option>";
        }
    }
    $r .= '</select>';
    $r .= '</td>';
    return $r;
}
コード例 #16
0
ファイル: aksi.php プロジェクト: iddan/mhs
<?php

session_start();
include '../../config/connect.php';
include '../../config/function.php';
include '../../config/config.php';
if (NULL !== cekAkses("{$modul}", "{$_SESSION['ylevel']}", "{$act}")) {
    $old = md5($_POST['old']);
    $new = md5($_POST['new']);
    $reNew = md5($_POST['reType']);
    $cekPass = yposSQL('SHOW', 'ypos_users', "'x'", "username='******'yuser']}' && pass='******'")->num_rows;
    if ($cekPass == 1) {
        if ($new == $reNew) {
            yposSQL('EDIT', 'ypos_users', "pass='******'", "username='******'yuser']}'");
            header("location:../../{$set->folder_modul}={$modul}&msg=sucessfully");
        } else {
            header("location:../../{$set->folder_modul}={$modul}&msg=error&case=password-not-same");
        }
    } else {
        header("location:../../{$set->folder_modul}={$modul}&msg=error&case=wrong-password");
    }
} else {
    header("location:../../{$set->folder_modul}={$modul}&msg=error&errno=1045");
}
コード例 #17
0
ファイル: aksi.php プロジェクト: iddan/mhs
<?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");
}
コード例 #18
0
ファイル: suplier.php プロジェクト: iddan/mhs
        echo $ed['tlp'];
        ?>
" size="20"/>
            </td>
		</tr>
                <tr>
		<th>Alamat</th>
        <td><textarea rows="5" cols="42" name="alamat"><?php 
        echo $ed['alamat'];
        ?>
</textarea></td>
        </tr>
        <tr><th></th>
        <td align="right">
        <input type="hidden" name="tipe" value="edit"/>
        <button type="submit" name="save" value="ok">Simpan</button>
        <a href="<?php 
        echo $set->folder_modul . '=' . $modul;
        ?>
"><button type="button">Back</button></a>
        </td></tr>
</table>
</fieldset>
</form>
<?php 
        break;
    case 'delete':
        yposSQL('DELETE', 'ypos_suplier', "kdsup={$id}");
        echo "<meta content='0; url={$set->folder_modul}={$modul}' http-equiv='refresh'/>";
        break;
}
コード例 #19
0
ファイル: logs.php プロジェクト: iddan/mhs
    exit('Now Allowed');
}
include 'notification.php';
?>
<table id="dataTable"  class="table" width="100%">
<tr id="tbl">
<th width="30">No</th>
<th width="300">Activities</th>
<th>Before</th>
<th>After</th>
<th width="100">Date</th>
<th width="100">User ID</th>
</tr>
<?php 
$no = 1;
$q = yposSQL('SHOW', 'ypos_logs', '*', "1=1", 'createdDate DESC');
while ($r = $q->fetch_array()) {
    ?>
				<tr align="center">			
                <td><?php 
    echo $no;
    ?>
</td>
				<td><?php 
    echo $r['Activity'];
    ?>
</td>
				<td><?php 
    echo $r['act_before'];
    ?>
</td>
コード例 #20
0
ファイル: permission.php プロジェクト: iddan/mhs
session_start();
include '../../config/connect.php';
include '../../config/function.php';
include '../../config/config.php';
//@$idlevel = $_POST['id'];
@($idLM = $_POST['id']);
if (@$_GET['act'] == 'update') {
    @($r = $_POST['r']);
    @($c = $_POST['c']);
    @($e = $_POST['e']);
    @($d = $_POST['d']);
    yposSQL('EDIT', 'ypos_grouplvlmdl', "r='{$r}', c='{$c}', e='{$e}',d='{$d}'", "idGroupLM={$idLM}");
} else {
    $q = yposSQL('SHOW', 'ypos_modul a, ypos_grouplvlmdl b', 'a.nama_modul, b.*', "a.modulID=b.modulID && idGroupLM={$idLM}");
    $getData = $q->fetch_array();
    $getLevel = yposSQL('SHOW', 'ypos_level', 'lvl', "idlevel={$getData['idlevel']}")->fetch_array();
    ?>
<form method="post">
<h3>Modul : <?php 
    echo $getData['nama_modul'];
    ?>
</h3>
<table border="0" width="100%" align="center">
  <tr>
    <th>Read</th>
    <th>Create</th>
    <th>Edit</th>
    <th>Delete</th>
  </tr>
  <tr align="center"> <?php 
    echo stdChoice($getData['r'], 'r');
コード例 #21
0
ファイル: kategori.php プロジェクト: iddan/mhs
</table>
</fieldset>
<input type="hidden" name="tipe" value="edit">
</form>
<?php 
        break;
}
?>
<table id="dataTable" width="80%">
<tr id="tbl">
<th>No</th>
<th>Kategori</th>
<th></th></tr>
<?php 
$no = 1;
$q = yposSQL('SHOW', 'ypos_kategori', 'idkat, nama_kat', "ids={$_SESSION['yids']}", 'nama_kat');
while ($r = $q->fetch_array()) {
    ?>
				<tr align="center">			
                <td align="center"><?php 
    echo $no;
    ?>
</td>
					<td><?php 
    echo $r['nama_kat'];
    ?>
</td>
					<td align="center">
					<a href="<?php 
    echo $set->folder_modul . '=' . $modul;
    ?>
コード例 #22
0
ファイル: aksi.php プロジェクト: iddan/mhs
<?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");
}
コード例 #23
0
ファイル: redirect.php プロジェクト: iddan/mhs
<?php

include 'config/connect.php';
include 'config/function.php';
include 'config/config.php';
session_start();
$user = $_SESSION['yuser'];
$LgnUsr = yposSQL('SHOW', 'ypos_lgnhistories', '*', "username='******' && 1=1", 'idLgn DESC LIMIT 1')->fetch_array();
LgnLogs($user, $ip, $hostname, cekBrowser(), 'IN');
yposSQL('EDIT', 'ypos_users', "sessionID='{$_SESSION['ysess']}', online='Y', last_seen=NOW()", "username='******'yuser']}'");
echo "<b>USER ID : {$user}, LAST LOGIN [IP ADDRESS : {$LgnUsr['ip']}  , HOST NAME : {$LgnUsr['hostname']}]\r\nTHIS USER HAS ALREADY LOGGED IN ON OTHER DEVICE, <a href='index.php'>CONTINUE</a></b>";
コード例 #24
0
ファイル: report.php プロジェクト: iddan/mhs
<?php

session_start();
include "config/connect.php";
include 'config/function.php';
include 'config/config.php';
require 'class/fpdf.php';
$query = yposSQL('SHOW', 'ypos_barang a, ypos_pembeliandtl b, ypos_pembelian c', 'a.nama_barang, b.kdPembelian, qty_beli, b.harga_beli, total, tgl_beli', 'kdbarang=kd_barang && b.kdPembelian=c.kdPembelian', 'tgl_beli');
//$db_query = mysql_query($query) or die("Query gagal");
//Variabel untuk iterasi
$i = 0;
//Mengambil nilai dari query database
while ($data = $query->fetch_row()) {
    $cell[$i][0] = $data[0];
    $cell[$i][1] = $data[1];
    $cell[$i][2] = $data[2];
    $cell[$i][3] = $data[3];
    $cell[$i][4] = $data[4];
    $i++;
}
//memulai pengaturan output PDF
class PDF extends FPDF
{
    //untuk pengaturan header halaman
    function Header()
    {
        //Pengaturan Font Header
        $this->SetFont('Times', 'B', 14);
        //jenis font : Times New Romans, Bold, ukuran 14
        //untuk warna background Header
        $this->SetFillColor(255, 255, 255);
コード例 #25
0
ファイル: load.php プロジェクト: iddan/mhs
<?php

//tampilkan konten berdasarkan hak akses pada modul
if (!defined('YBASE')) {
    exit('Now Allowed');
}
$mod = yposSQL('SHOW', 'ypos_modul', 'nama_modul, modul_folder as modDIR', "modul_folder='{$modul}' && aktif='Y' && 1=1", 'nama_modul');
if (!empty($modul)) {
    if (NULL !== cekAkses("{$modul}", "{$_SESSION['ylevel']}", "{$act}")) {
        while ($getMod = $mod->fetch_array()) {
            if ($modul == $getMod['modDIR']) {
                include "{$set->folder_modul}/{$getMod['modDIR']}/{$getMod['modDIR']}.php";
                $mtime = microtime();
                $mtime = explode(" ", $mtime);
                $mtime = $mtime[1] + $mtime[0];
                $tend = $mtime;
                // Calculate Difference
                $totaltime = $tend - $tstart;
                // Output the result
                printf("<center><i>Page loaded %f seconds.", $totaltime . '</i></center>');
            }
            //end if
        }
        //end while
    } else {
        echo "<meta content='0; url={$set->folder_modul}={$modul}&msg=error&errno=1045' http-equiv='refresh'/>";
    }
}
if (@$_GET['page'] == 'about') {
    include 'about.php';
}
コード例 #26
0
ファイル: trx_pembelian.php プロジェクト: iddan/mhs
&act=new&op=edprod&id=<?php 
            echo $getItem['kdPembelian'] . '&idp=' . $getItem['idDtlPembelian'] . '&ttl=' . $getItem['total_pembelian'] . '&nota=' . $getItem['no_nota'];
            ?>
"><img src="images/icon-edit-on.png" border="0" width="20" height="20" /></a>
    <a href="<?php 
            echo $set->folder_modul . '=' . $modul;
            ?>
&act=delete&id=<?php 
            echo $getItem['idDtlPembelian'] . '&kdp=' . $getItem['kdPembelian'];
            ?>
" onClick="return confirm('Anda yakin ingin menghapus data ini?')"><img src="images/delete-icon.png" border="0" width="20" height="20" /></a></td>
  </tr>
  <?php 
            $no++;
        }
        $total = yposSQL('SHOW', 'ypos_pembeliandtl', 'DISTINCT SUM(qty_beli) AS t_qty, SUM(harga_beli) AS t_harga', "kdPembelian='{$kode}' && 1=1")->fetch_array();
        ?>
    <tr>
    <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>
コード例 #27
0
ファイル: system.php プロジェクト: iddan/mhs
		</tr>
</table>
</fieldset>
</form><?php 
        }
        ?>
<table id="dataTable">
<tr id="tbl">
<th width="20">No</th>
<th width="200">Parameter Name</th>
<th width="500">Descriptions</th>
<th width="20">Status</th>
<th width="50"></th></tr>
<?php 
        $no = 1;
        $q = yposSQL('SHOW', 'ypos_paramchild', '*', "idpm={$id} && 1=1", 'child_name');
        while ($r = $q->fetch_array()) {
            ?>
				<tr align="center">			
                <td><?php 
            echo $no;
            ?>
</td>
					<td><?php 
            echo $r['child_name'];
            ?>
</td>
                    <td><?php 
            echo $r['ket'];
            ?>
</td>
コード例 #28
0
ファイル: aksi.php プロジェクト: iddan/mhs
<?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");
}
コード例 #29
0
ファイル: proses.php プロジェクト: iddan/mhs
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 {
    	font: 1.1em Arial, sans-serif;
    	text-align:left;
    	font-weight:bold;
    }
</style>
コード例 #30
0
ファイル: aksi.php プロジェクト: iddan/mhs
                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;
}