<?php
	session_start();
	ini_set('session.gc_maxlifetime', 99999999); //设置时间 永不过期
	$myselcount=0;
//	header("Content-type: text/html; charset=gb2312"); 
	
	require_once("db/db.php");	
	require_once("common/common.php");

	$sql=sprintf("SELECT COUNT(a.ListNo)AS MyCount FROM TR_RoomCancelList a,TR_Order_Inform b,TR_Order_Room_List c 
				WHERE a.BListNo=c.ListNo AND a.ViewFlag=0 AND b.Order_No=c.Order_No 
				AND (b.Order_State=0 OR b.Order_State=1) AND c.Room_BillState=2 
				AND b.Chain_No='%s' AND a.SendTime>DATEADD(minute,-2,GETDATE())",$_SESSION["ChainNofw"]); 
	$result = querySql($sql);
											
	if($row = fetch_array($result))
	{
		$myselcount=$row['MyCount'];
	}
	freeResult($result);
	closeDb();		
	
	echo $myselcount;
?>



