<?php 
$PageSecurity = 4;
include('includes/session.inc');
include('includes/DefineSuppTransClass.php');

    $store_sql = "SELECT * FROM stockcategory where stockmaincategory = '".$_GET['site']."'";
	
	$data2="";
	$data1='';
		$data1.="<select name='subcat'  style='width:98%;' id='subcat' onchange='showdata(this.value)'>";
			$data1.="<option value='0'>Select</option>";
 			$store_result = DB_query($store_sql,$db);
			while($store_row = DB_fetch_array($store_result))
			{
				;
				$p='';
				if($store_row['id'] == $_REQUEST['subcat'])
				$p="selected";
			
			
		$data1.="<option value=".$store_row['id']." ".$p.">".$store_row['categorydescription']."</option>";
			 }
			
			$data1.="</select>";
	
	
	      $data2.="<div style='overflow:auto; height:100px; width:auto; border:1px solid #808080; background:#fff; padding:2px 3px;' >";
    $query="Select id,StockID,item_name from item_master where CategoryID='".$_REQUEST['site']."'";
	$item_sql=DB_query($query,$db);
	$c3=0;
	while($row3=DB_fetch_array($item_sql))
	{ 	
		// $c='';
		// if($_REQUEST['item'][$c3]==$row3['StockID'])
		// {$c="checked";}
	
	$data2.="<input type='checkbox' name='item[".$c3."]' id='item_".$c3."' value='".$row3['id']."' ".$c."/> ".$row3['StockID']." - ".$row3['item_name']."<br>";
	
	$c3++;
	}
	
	$data2.="</div>";
	      
	
	
	
	
	echo $data=$data1."__".$data2;


?>
