<?php
session_start();
@ob_start();
include "../../config/koneksi.php";

$module=$_GET[module];
$act=$_GET[act];
$act=$_GET[act];
 
// Input YM
if ($module=='cat' AND $act=='add'){
	$kasir = $_SESSION['nama'];
	$dt1 = date("Y-m-d");
	mysql_query("INSERT INTO mutasi(billdate,produk,qty,ket,kasir,gudang,gudang2) VALUES('$dt1','$_POST[produk]','$_POST[qty]','$_POST[ket]','$kasir','$_POST[xfrom]','$_POST[xto]')");
	
	header('location:data.php');

}

elseif ($module=='cat' AND $act=='edit'){
	mysql_query("update mutasi set ket = '$_POST[ket]' where id = $_GET[id]");
	header('location:data.php');

}
elseif ($module=='cat' AND $act=='delete'){
	mysql_query("delete from mutasi  where id= $_GET[id]");
	header('location:data.php');

}

?>
