<!DOCTYPE HTML>
<?php 
include('config.php');
$pageid = "product";
$pagename = "Product";
$navid 	= "masterdata";
$tabid 	= "2";

$penerbit = $_GET['penerbit'];
?>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title><?php echo $pagename?></title>
    <?php include('../../common/script_css.php');?>
	<script>
    function get_data(){
		query = {penerbit : $('#penerbit').val()}
		$.post('get_product_cat',query,function(e){
			$('#output').html(e);
			})
		}
	$().ready(function(e) {
        get_data();
    });
    </script>
</head>
<body>

<form id="iform">
    <div class="wrapper">
        <!-- Sidebar  -->
		<?php include('../../sys/sidenav.php');?>

        <!-- Page Content  -->
        <div id="content_wrapper" class="mt-0">
			<?php include('../../sys/top_menu.php')?>
            <div class="px-3">
				<div id="tabheader">
				<?php include('tabheader.php')?>
                </div>
                
			    <div class=" tl div_button py-2">
                <table class="table my-0">
                	<tr>
                    	<td style="width:180px">Vendor</td>
                        <td>
            				<select class="input w-80"  id="penerbit" name="penerbit" onchange="get_data()">
			                <option value="">All Vendor</option>
            		        <?php 
								$sql_gol = "select * from oc_manufacturer WHERE active = 1 ORDER BY name";
								$gol_conn = $conn->query($sql_gol) or die($sql_gol);
								while($gol = $gol_conn->fetch_array()){
								?>
            			        	<option <?php if($penerbit==$gol['manufacturer_id']){ echo 'selected="selected"';}?>
                        			value="<?php echo $gol['manufacturer_id']?>"><?php echo $gol['name']?></option>
		                        <?php } ?>
							</select>
                            <input type="button" class="btn btn-sm btn-primary" value="Display Listing" onclick="get_data()">
                        </td>
                        <td class="tr">

                        	<input type="button" class="btn btn-sm btn-success" value="Save Update Product" onclick="dosubmit('save_update_kategori')">

                        </td>
                    </tr>
                </table>
                </div>
                
     
                  
                  <div id="output" class="bg_white pb-2">

                </div>
            </div>
	 
    	</div>

  
            </div>
        </div>
        
    </div><!-- end wrapper -->
</form>
</body>

</html>