<?php
	session_start();
	
	require_once("db/db.php");	
	require_once("common/common.php");
	
	ini_set('session.gc_maxlifetime', 99999999); //设置时间 永不过期
	
	//设置统一语言格式
	header("Content-type: text/html; charset=gb2312"); 
	
	$strBListNo=trim($_REQUEST["rblistno"]);
	$strPayForType1=trim($_REQUEST["paytype"]);
	$fltPayForVal=trim($_REQUEST["payval"]);
	$strPayForText1=trim($_REQUEST["paytxt"]);
	
	$strPayForType= iconv('utf-8','gb2312',$strPayForType1);
	$strPayForText= iconv('utf-8','gb2312',$strPayForText1);

	if(strlen($strBListNo)<1)
	{
		$strBListNo='0';
	}
	if(strlen($fltPayForVal)<1)
	{
		$fltPayForVal='0';
	}
	
	$strUserName=trim($_SESSION['username']);
	$strChainNo=trim($_SESSION["ChainNo"]);
	
	$strRetID="*0*";

	//收款入账
	if($strBListNo>0 && strlen($strPayForType)>0 && $fltPayForVal<>0)
	{
		$sql=sprintf("EXECUTE TRS_SELF_SaveItemPay %s,'%s',%s,0,'','%s','%s'",$strBListNo,$strPayForType,$fltPayForVal,$strPayForText,$strUserName);
		$result = querySql($sql);
		
		$strRetID="*1*";
	}
	
	closeDb();
	echo $strRetID;	//成功

?>


