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

//echo $_GET['site'];exit();



$store_sql ="SELECT * FROM tpl_breakdown_mgmt JOIN tpl_breakdown_mgmt_machine ON (tpl_breakdown_mgmt.id=tpl_breakdown_mgmt_machine.master_id) WHERE asset_id='".$_GET['asset']."' AND site= '".$_GET['sd']."' AND tpl_breakdown_mgmt.CompanyId='".$_SESSION['ACGCompanyId']."'";
	$data1='';
	
		$data1.="<select name='job_card_no' id='job_card_no'>
              <option value=''>---Select---</option>
			   <option value='0'".($_REQUEST['job_card_no']=='0'?'selected':'').">All</option>";
								
 			$store_result = DB_query($store_sql,$db);
			while($store_row = DB_fetch_array($store_result))
			{
				$p='';
				if($store_row['asset_id'] == $_GET['asset'])
				$p="selected";
			
			
		$data1.="<option value=".$store_row['tt_no']." ".$p.">".$store_row['tt_no']."</option>";
			 }
			
			$data1.="</select>";
	
	
	
	
	
	
	echo $data1;


?>
