<?php
	session_start();
	ini_set('session.gc_maxlifetime', 99999999); //设置时间 永不过期
	
	require_once("db/db.php");	
	require_once("common/common.php");
				
	$strItemBar=trim($_REQUEST["barcode"]);
	$strChainNo=trim($_SESSION["ChainNofw"]);
	
	//设置统一语言格式
	header("Content-type: text/html; charset=gb2312"); 
	
	$strRetID="";
	
	if(strlen($strItemBar)>0)
	{
		$sql=sprintf("SELECT a.Item_No,a.Item_Name,Item_Price FROM TR_Item_List a,TR_Item_Type b WHERE a.TypeListNo=b.ListNo And b.Chain_No='%s' And a.Item_BarCode='%s'",$strChainNo,$strItemBar);
		$result = querySql($sql);		
		if($row = fetch_array($result))
		{
			$strItemNo=$row['Item_No'];		
			$strItemName=$row['Item_Name'];
			$fltItemPrice=$row['Item_Price'];
			
			$strRetID= str_pad($strItemNo, 15).$strItemName;
		}
		freeResult($result);
	}
	
	closeDb();
	echo $strRetID;
	
?>


