<?php
session_name("AUTHENUSER");
session_start();
$USERNAME = $_SESSION['SES_USERNAME'];
if(!session_name("AUTHENUSER"))
	{
?>
						<script language="javascript">
						 alert("Waktu Login telah habis.Silahkan Login Kembali");
						document.location="index.php";
						</script>
<?php
	}
if(!$USERNAME)
	{
?>
						<script language="javascript">
						 alert("Harap Login Dahulu.");
						document.location="index.php";
						</script>
<?php
	}
	?>
	<?php include "common/config.php";?>
<body>
<?php

		$inventory  = $_REQUEST['type'];
		$kode_stock  = $_REQUEST['kode_stock'];
		if($inventory == "Diamond")
		{
		 $sql4 = "select * from inventory_diamond where status_stock=1 and kode_stock = '$kode_stock' order by barcodeno";
		}
		elseif($inventory == "Gold")
		{
		 $sql4 = "select * from inventory_gold where status_stock=1 and kode_stock = '$kode_stock' order by barcodeno";
		}
		elseif($inventory == "LogamMulia")
		{
		 $sql4 = "select * from  inventory_logam where status_stock=1 and kode_stock = '$kode_stock' order by barcodeno";
		}
		elseif($inventory == "ReadyItem")
		{
		 $sql4 = "select * from inventory_readyitem where status_stock=1 and kode_stock = '$kode_stock' order by barcodeno";
		}
		elseif($inventory == "Cincin")
		{
		 $sql4 = "select * from inventory_cincin where status_stock=1 and kode_stock = '$kode_stock' order by barcodeno";
		}
		elseif($inventory == "Mastura")
		{
		 $sql4 = "select * from inventory_mastura where status_stock=1 and kode_stock = '$kode_stock' order by barcodeno";
		}
		elseif($inventory == "Liontin")
		{
		 $sql4 = "select * from inventory_liontin where status_stock=1 and kode_stock = '$kode_stock' order by barcodeno";
		}
		elseif($inventory == "Kerabu")
		{
		 $sql4 = "select * from inventory_kerabu where status_stock=1 and kode_stock = '$kode_stock' order by barcodeno";
		}
		elseif($inventory == "GKGR")
		{
		 $sql4 = "select * from inventory_gkgr where status_stock=1 and kode_stock = '$kode_stock' order by barcodeno";
		}
		elseif($inventory == "Rangka")
		{
		 $sql4 = "select * from inventory_rangka where status_stock=1 and kode_stock = '$kode_stock' order by barcodeno";
		}
	  	$rs4 = mysql_query($sql4);
		$fetch4 = mysql_fetch_array($rs4);
		$weight  = $fetch4['weight'];
		$kode_stock  = $fetch4['kode_stock'];
		$lbprice  = $fetch4['lbprice'];
		$description  = $fetch4['description'];
        ?>
        <table width="200" border="0">
  <tr>
    <td>Kode Stock</td>
    <td>&nbsp;</td>
    <td><?php echo $kode_stock; ?></td>
  </tr>
  <tr>
    <td>Print Description</td>
    <td>&nbsp;</td>
    <td><?php echo $description; ?></td>
  </tr>
  <tr>
    <td>Weight</td>
    <td>&nbsp;</td>
    <td><?php echo $weight; ?></td>
  </tr>
  <tr>
    <td>LB Price</td>
    <td>&nbsp;</td>
    <td><?php echo $lbprice; ?></td>
  </tr>
</table>

</body>
</html>
