Example #1
0
<?php

include 'header.php';
$barangs = getBarang();
?>

<script type="text/javascript">
	function showEditExpired()
	{
		document.getElementById("txtHintExpired").innerHTML+= "<form action='edit_expired.php' method='post'><span>Lama expired yang baru (hitungan hari) = <input type='text' name='expired_days' id='expired_days'/></span><div><input type='submit' name='submit' value='Ubah'/></div></form>";
		document.getElementById("editExpiredButton").innerHTML= "";
		document.getElementById("expiredDateMsg").innerHTML= "";
	}
</script>

<div class="container">
  
  <div class="text-center">

	<div class="table">
		<table border="1" cellpadding="10" cellspacing="0" >
		  <tr>
		  	<th>No</th>
		    <th>Nomor Seri</th>
		    <th>Nomor Ketok</th>
		    <th>Harga Dasar</th>
		    <th>Harga Jual</th>
		    <th>Status</th>
			<th>Kategori</th>
		    <th>Action</th>
		  </tr>
Example #2
0
session_start();
if (empty($_SESSION['namauser'])) {
    ?>
    <link href='../../css/style.css' rel='stylesheet' type='text/css'>
    <center>Untuk mengakses tools ini, Anda harus login <br>
        <a href="../../index.php"><b>LOGIN</b></a></center>  
    <?php 
    die;
}
$link = mysqli_connect($server, $username, $password) or die("Koneksi gagal");
mysqli_select_db($link, $database) or die("Database tidak bisa dibuka");
$act = $_GET['act'];
switch ($act) {
    case 'getbarang':
        if (isset($_GET['po_id'])) {
            getBarang($link, $_GET['po_id'], $_GET['rak_id']);
        }
        break;
    case 'getbarangorder':
        if (isset($_GET['po_id'])) {
            getBarangOrder($link, $_GET['po_id']);
        }
        break;
    case 'getinterval':
        if (isset($_POST['supplierId'])) {
            echo json_encode(getInterval($link, $_POST['supplierId']));
        }
        break;
    case 'tambahrpo':
        $rpoId = tambahRpo($link, $_POST['param']);
        tambahRpoDetail($link, $rpoId, $_POST['param']['supplier_id']);