<?php
include('../../sys/phpcore.inc');
include('../../sys/session.inc');
include('../../sys/master.php');

$autoid = $_GET['id'];

$sql = "SELECT * FROM mst_product WHERE pm_autoid = '$autoid'";
$dcon = $conn->query($sql) or die($sql);
$row = $dcon->fetch_array();
$status = $row['active'];

$pm_size 		= explode(',',$row['pm_size']);
$pm_color 		= $row['pm_color'];
$pm_disc 		= $row['pm_disc'];
$pm_disc_type 	= $row['pm_disc_type'];
$pm_disc_status = $row['pm_disc_status'];


$img_1 = $row['image_url_1'];
$img_2 = $row['image_url_2'];
$img_3 = $row['image_url_3'];
$img_4 = $row['image_url_4'];


if(!file_exists("../../../".$img_1) || $img_1 == ""){$img_1 = "image/no_photo.jpg";}
if(!file_exists("../../../".$img_2) || $img_2 == ""){$img_2 = "image/no_photo.jpg";}
if(!file_exists("../../../".$img_3) || $img_3 == ""){$img_3 = "image/no_photo.jpg";}
if(!file_exists("../../../".$img_4) || $img_4 == ""){$img_4 = "image/no_photo.jpg";}


$min_stok = $row['pm_min_stok'];
$pc_autoid = $row['pc_autoid'];
$pm_ums  = strtolower($row['pm_ums']);
$pm_umb  = strtolower($row['pm_umb']);

$pageid = "product";
$navid 	= "masterdata";

?>