<?php
	session_start();
	
	//获取客户的微信ID号
	$strwxid=trim($_REQUEST['wxudid']);
	if(strlen($strwxid)>10)
	{
		$_SESSION["main_wxudid"]=$strwxid;
	}
	
	//判断是否登录系统		
	if($_SESSION["main_viplogined"]!="1" |$_SESSION["main_vipno"]=="")
	{
		//没有登录开始启动登录
		header('location:login.php?stext=');
		exit;
	}
?>

<?php
	include "wechat.class.php";
	include 'errCode.php';
	require_once("../Wx.Config.php");	//只加载一次
	
	$strMyTitle1=WxMainConfig::wxShareTitle;
	$strMyDesctxt1=WxMainConfig::wxShareDesc;
	
	$strMyTitle=iconv("UTF-8","GB2312",$strMyTitle1);
	$strMyDesctxt=iconv("UTF-8","GB2312",$strMyDesctxt);
	
	$opt = array(
		'appsecret'=>WxMainConfig::APPSECRET,//填写高级调用功能的密钥
		'appid'=>WxMainConfig::APPID	//填写高级调用功能的appid
	);
	$we = new Wechat($opt);
	$auth = $we->checkAuth();
	//var_dump($auth);
	$js_ticket = $we->getJsTicket();
	if (!$js_ticket) {
		echo "获取js_ticket失败！<br>";
		echo '错误码：'.$we->errCode;
		echo ' 错误原因：'.ErrCode::getErrText($we->errCode);
		//echo "dddddddddddddddd";
		exit;
	}
	$url = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
	//echo $url;
	$js_sign = $we->getJsSign($url);
	//var_dump($js_sign);
	//exit();
	$_url = "http://".$_SERVER['HTTP_HOST']."/wxbook/";
?>

<!DOCTYPE html>
<html>
<head>
	<meta charset="gb2312">	
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
	<meta name="apple-mobile-web-app-capable" content="1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="format-detection" content="telephone=0">
	<meta name="apple-touch-fullscreen" content="1">

	<title>酒店预订</title>

	<script src="jsp4/jquery.js"></script>
	<link rel="stylesheet" href="css/mycss.css"> 

	<!--<link rel="stylesheet" href="jsp5/jquery.mobile-1.4.5.min.css">-->
	<!--<script src="jsp4/jquery.mobile-1.4.3.min.js"></script>-->
	<script src="jsp5/jquery.mobile-1.4.5.min.js"></script>
	<link rel="stylesheet" href="jsp5/jquery.mobile-1.4.5.min.css">
	<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	
	<script language="JavaScript"> 
		//不允许进行后退
		javascript:window.history.forward(0); 
	</script>
</head>

<script>
	wx.config({
		  debug: false,
		  appId: '<?php echo $js_sign['appid']; ?>', // 必填，公众号的唯一标识
		  timestamp: <?php echo $js_sign['timestamp']; ?>, // 必填，生成签名的时间戳，切记时间戳是整数型，别加引号
		  nonceStr: '<?php echo $js_sign['noncestr']; ?>', // 必填，生成签名的随机串
		  signature: '<?php echo $js_sign['signature']; ?>', // 必填，签名，见附录1
		  
		  jsApiList: [
			'checkJsApi',
			'onMenuShareTimeline',
			'onMenuShareAppMessage',
			'onMenuShareQQ',
			'onMenuShareWeibo',
			'hideMenuItems',
			'showMenuItems',
			'hideAllNonBaseMenuItem',
			'showAllNonBaseMenuItem',
			'translateVoice',
			'startRecord',
			'stopRecord',
			'onRecordEnd',
			'playVoice',
			'pauseVoice',
			'stopVoice',
			'uploadVoice',
			'downloadVoice',
			'chooseImage',
			'previewImage',
			'uploadImage',
			'downloadImage',
			'getNetworkType',
			'openLocation',
			'getLocation',
			'hideOptionMenu',
			'showOptionMenu',
			'closeWindow',
			'scanQRCode',
			'chooseWXPay',
			'openProductSpecificView',
			'addCard',
			'chooseCard',
			'openCard'
		  ]
	});
		
	wx.ready(function()
	{
		var mytitle = '<?php echo $strMyTitle;?>';
		var mydesctxt = '<?php echo $strMyDesctxt;?>';
		var surl='<?php echo WxMainConfig::ServerHttpPath;?>' + 'wxbook/login.php?wxvipno=' + '<?php echo $_SESSION["main_vipno"];?>';
		var imgUrl = '<?php echo WxMainConfig::ServerHttpPath;?>' + 'logo.jpg';
		
		//alert(surl);
		
		var sdata = {
			  title: mytitle,
			  desc: mydesctxt,
			  link: surl, // 分享链接
			  imgUrl: imgUrl,	//分享图标
			  success: function () {
			  //alert('用户确认分享后执行的回调函数');
			  },
			  cancel: function () {
			  //alert('用户取消分享后执行的回调函数');
			  }
		  };
		  wx.onMenuShareTimeline(sdata);
		  wx.onMenuShareAppMessage(sdata);
	});
	
</script>


<?php		
	require_once("db/db.php");	
	require_once("common/common.php");
	require_once("../Wx.Config.php");	//只加载一次
	//得到默认日期
	$strDayTemp1=$_REQUEST['stday1'];	//入住日期
	$strDayTemp2=$_REQUEST['stday2'];	//预离日期
	
	$strchainno=$_REQUEST['chidno'];
	$strchainname="";
	$strchainaddress="";
	$strchaintelno="";
	$strremarks="";
	$strNowDay="";	//当前服务器日期
	$selchainimg="images/hotel_images/".$strchainno."/".$strchainno."_02.jpg";
	$strAddresUrl="#";
	
	if(strlen($strchainno)>0)
	{
		//重新获得新分店信息
		$sql=sprintf("SELECT Chain_Name,Chain_Address,Chain_Tel,Chain_Remarks,Chain_Img,Convert(varchar(10),getdate(),120)as ServerDay,AddressUrl FROM Chain_Infor WHERE Chain_No='%s';",$strchainno);

		$result = querySql($sql);
		$row = fetch_array($result);
		$strchainname = $row['Chain_Name'];
		$strchainaddress = $row['Chain_Address'];
		$strchaintelno = $row['Chain_Tel'];
		$strremarks = $row['Chain_Remarks'];
		$strNowDay = $row['ServerDay'];
		$strhotelimg = $row['Chain_Img'];
		
		$strAddresUrl = $row['AddressUrl'];
		
		$strAddresUrl=trim($strAddresUrl);
		if($strAddresUrl=="")
		{
			$strAddresUrl="#";
		}
		
		$_SESSION["main_order_chainno"]=$strchainno;
		$_SESSION["main_order_chainname"]=$strchainname;
		$_SESSION["main_order_chaintel"]=$strchaintelno;
		$_SESSION["main_order_chainaddress"]=$strchainaddress;
		
		//将图片显示为第一个名称，如：112.jpg,113.jpg,114.jpg只去第一个图
		$intpos=stripos($strhotelimg,',');
		if($intpos>0)
			$strhotelimg =substr($strhotelimg,0,$intpos);
		
		//$selchainimg='http://'.$_SERVER['HTTP_HOST']."/images/hotel_images/".$strchainno."/".$strhotelimg;
		//echo 'http://'.$_SERVER['HTTP_HOST']."/wxbook/images/hotel_images/".$strchainno."/".$strhotelimg;
		//exit;
		$selchainimg=$_SERVER['HTTP_HOST']."/wxbook/images/hotel_images/".$strchainno."/".$strchainno."_01.jpg";
		$selurl=$_SERVER['HTTP_HOST']."/wxbook/login.php";
		
		$_SESSION["main_order_hotelimg"]=$selchainimg;
		$_SESSION["selurl"]=$selurl;
		

		$selchainimg="images/hotel_images/".$strchainno."/".$strchainno."_01.jpg";
	}	
	//echo "111".$_SESSION["main_order_hotelimg"];
	//	exit;
	//echo 1111;
	//exit;
	//释放数据库
	freeResult($result);

	if(strlen($strNowDay)<1)
		$strNowDay='2001-01-01';
		
	//默认日期处理部分
	$strDayTemp1=trim($strDayTemp1);
	$strDayTemp2=trim($strDayTemp2);
	
	if(strlen($strDayTemp1)>8 and strlen($strDayTemp2)>8)
	{
		//开始设置新的日期
		if($strNowDay>$strDayTemp1)
			$strDayTemp1=$strNowDay;
			
		//判断入住日期是否小于当天
		$_SESSION["main_order_checkinday"]=$strDayTemp1;
		$_SESSION["main_order_checkoutday"]=$strDayTemp2;
	}
	else
	{
		//本页面没有传入日期数据
		$strDayTemp1=trim($_SESSION["main_order_checkinday"]);
		$strDayTemp2=trim($_SESSION["main_order_checkoutday"]);
		
		if(strlen($strDayTemp1)<8 or strlen($strDayTemp2)<8)
		{
			//服务器里获取日期信息
			$sql=sprintf("SELECT Convert(varchar(10),getdate(),120)as checkintime,Convert(varchar(10),dateadd(day,1,getdate()),120)as checkouttime");

			$result = querySql($sql);
			$row = fetch_array($result);
			$strDayTemp1 = $row['checkintime'];
			$strDayTemp2 = $row['checkouttime'];		
			$strNowDay = $strDayTemp1;
		
			$_SESSION["main_order_checkinday"]=$strDayTemp1;
			$_SESSION["main_order_checkoutday"]=$strDayTemp2;
			
			//释放数据库
			freeResult($result);
		}
	}
	
	//2.显示日期部分,和日期天数
	$strcheckinday=$_SESSION["main_order_checkinday"];
	$strcheckoutday=$_SESSION["main_order_checkoutday"];
	//得到天数
	$intsiteddays=1;
	$datetime0 = strtotime($strNowDay);
	$datetime1 = strtotime($strcheckinday);
	$datetime2 = strtotime($strcheckoutday);
	$intsiteddays=round(($datetime2-$datetime1)/86400);
	$intfristdays=round(($datetime1-$datetime0)/86400);
		
	if($intfristdays<0)
	{	//入住日期不合法,入住日期小于服务器日期
		$sql=sprintf("SELECT Convert(varchar(10),getdate(),120)as checkintime,Convert(varchar(10),dateadd(day,1,getdate()),120)as checkouttime");
		$result = querySql($sql);
		$row = fetch_array($result);
		$strcheckinday = $row['checkintime'];
		$strcheckoutday = $row['checkouttime'];		
		
		$_SESSION["main_order_checkinday"]=$strcheckinday;
		$_SESSION["main_order_checkoutday"]=$strcheckoutday;
		$_SESSION["main_order_siteddays"]=$intsiteddays;
		
		//释放数据库
		freeResult($result);
	}
	else
	{
		if($intsiteddays<1)
		{	//如果结束时间大于开始时间，则自动设置为开始日期的+1天
			$intsiteddays=1;
			
			$sql=sprintf("SELECT Convert(varchar(10),dateadd(day,1,'%s'),120)as checkouttime",$strcheckinday);
			$result = querySql($sql);
			$row = fetch_array($result);
				//$strDayTemp1 = $row['checkintime'];
				$strcheckoutday = $row['checkouttime'];		
				
				$_SESSION["main_order_checkinday"]=$strcheckinday;
				$_SESSION["main_order_checkoutday"]=$strcheckoutday;
				$_SESSION["main_order_siteddays"]=$intsiteddays;

			//释放数据库
			freeResult($result);
		}
		else
		{
			$_SESSION["main_order_checkinday"]=$strcheckinday;
			$_SESSION["main_order_checkoutday"]=$strcheckoutday;
			$_SESSION["main_order_siteddays"]=$intsiteddays;
		}
	}
	
	//生成显示的日期
	$strcheckindayall=$strcheckinday;
	$strcheckoutdayall=$strcheckoutday;
	
	$strcheckinday=substr($strcheckinday,5);
	$strcheckoutday=substr($strcheckoutday,5);
	
	//关闭数据库
	closeDb();
	
?>

<body leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
<!--第一个页面的内容实现---------------------------->
<section data-role="page" id="pageh1">
	<header data-role="header" data-position="fixed" data-tap-toggle="false" style="border-top-width:0px;border-bottom-width:0px;">
        <table width="100%" height="50" border="0" cellpadding="0" cellspacing="0" bgcolor="<?php echo WxMainConfig::colHeadBkColorBook;?>">
		   	<tr>
				<td height="50" width="30" align="center"></td>
				<td height="50" align="center" valign="middle">
	                <span id="MsgTxt" style="color:<?php echo WxMainConfig::colHeadTextColorBook;?>;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:19px;text-shadow:none;"><?php echo $strchainname; ?></span>
               	</td>
				<td height="50" width="30" valign="middle"></td>
		  	</tr>
		</table>
	</header>
	<article data-role="none">
		<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
			<tr><td width="100%" height="180"><IMG src="<?php echo $selchainimg; ?>" width="100%" height="180" border="0"></td></tr>
		</table>
			
		<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
			<tr>
				<td height="3" width="15"></td>
				<td height="3" align="left"></td>
				<td height="3" width="15"></td>
			</tr>
			
			<tr>
				<td height="30" width="15"></td>
				<td height="30" align="left">
					<table width="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td width="30"><IMG src="images/tel.png" border=0></td>
							<td><span style="color: #999999;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;">电话:&nbsp;<?php echo $strchaintelno; ?></span></td>
							<td width="30">
								<span style="color: #999999;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;" onclick="alert('请点击右上角选择分享给微信好友或朋友圈')">
									分享
								</span>
							</td>
						</tr>
					</table>
				</td>
				<td height="30" width="15"></td>
			</tr>
			
			<tr>
				<td height="1" width="15"></td>
				<td height="1" align="left" bgcolor="#F2E2E2"></td>
				<td height="1" width="15"></td>
			</tr>
			
			<tr>
				<td height="3" width="15"></td>
				<td height="3" align="left"></td>
				<td height="3" width="15"></td>
			</tr>
			
			<tr>
				<td height="30" width="15"></td>
				<td height="30" align="left">
					<table width="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td width="30"><IMG src="images/address.png" border=0></td>
							<td>
								<div onClick="window.location = '<?php echo $strAddresUrl;?>';">
									<span style="color: #928E80;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;">地址:&nbsp;<?php echo $strchainaddress; ?></span>
								</div>
							</td>
						</tr>
					</table>
				</td>
				<td height="30" width="15"></td>
			</tr>
			
			<tr>
				<td height="1" width="15"></td>
				<td height="1" align="left" bgcolor="#F2E2E2"></td>
				<td height="1" width="15"></td>
			</tr>
			
			<tr>
				<td height="8" width="15"></td>
				<td height="8" align="left"></td>
				<td height="8" width="15"></td>
			</tr>			
			
			<?php
				if(strlen($strremarks)<3)
				{
			?>				
				<tr>
					<td height="8" width="15"></td>
					<td height="8" align="left"></td>
					<td height="8" width="15"></td>
				</tr>
			<?php
				}
				else
				{
			?>
				<tr>
					<td height="30" width="15"></td>
					<td height="30" align="left">
						<IMG src="images/room.png" width="18" height="19" border=0>&nbsp;&nbsp;&nbsp;<span style="color: #999999;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:14px;"><?php echo $strremarks; ?></span>
					</td>
					<td height="30" width="15"></td>
				</tr>
				
				<tr>
					<td height="8" width="15"></td>
					<td height="8" align="left"></td>
					<td height="8" width="15"></td>
				</tr>
			<?php
				}
			?>
			
			<tr>
				<td height="1" width="15" bgcolor="#F2E2E2"></td>
				<td height="1" align="left" bgcolor="#F2E2E2"></td>
				<td height="1" width="15" bgcolor="#F2E2E2"></td>
			</tr>
				
			<tr>
				<td height="5" width="15" bgcolor="#66FFFF"></td>
				<td height="5" align="left" bgcolor="#66FFFF"></td>
				<td height="5" width="15" bgcolor="#66FFFF"></td>
			</tr>
			
			<tr>
				<td height="1" width="15" bgcolor="#F2E2E2"></td>
				<td height="1" align="left" bgcolor="#F2E2E2"></td>
				<td height="1" width="15" bgcolor="#F2E2E2"></td>
			</tr>
			
			<tr>
				<td height="50" align="left" colspan="3">
					<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td width="42%" align="center" style="border-right:1px solid #F2E2E2;">
								<div onClick="window.location = 'getday.php?stid=1&stday1=<?php echo $strcheckindayall;?>&stday2=<?php echo $strcheckoutdayall;?>';">
									<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
										<tr>
											<td align="center" valign="middle">
												<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:16px;">入住&nbsp;&nbsp;<?php echo $strcheckinday;?></span>
											</td>
											<td width="25" align="left" valign="middle"><div style="padding-top: 5px;"><IMG src="images/arrow.png" border=0></div></td>
										</tr>
									</table>
								</div>
							</td>
							<td width="16%" align="center" style="border-right:1px solid #F2E2E2;"><span style="color: #999999;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:16px;"><?php echo $intsiteddays;?>天</span></td>
							<td width="42%" align="center" style="border-right:1px solid #F2E2E2;">
								<div onClick="window.location = 'getday.php?stid=2&stday1=<?php echo $strcheckindayall;?>&stday2=<?php echo $strcheckoutdayall;?>';">
									<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
										<tr>
											<td align="center" valign="middle">
												<span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:16px;">离店&nbsp;&nbsp;<?php echo $strcheckoutday;?></span>
											</td>
											<td width="25" align="left" valign="middle"><div style="padding-top: 5px;"><IMG src="images/arrow.png" border=0></div></td>
										</tr>
									</table>
								</div>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			
			<tr>
				<td height="1" width="15" bgcolor="#F2E2E2"></td>
				<td height="1" align="left" bgcolor="#F2E2E2"></td>
				<td height="1" width="15" bgcolor="#F2E2E2"></td>
			</tr>
			
			
			<?php 
				$sql=sprintf("SELECT a.ListNo,b.Room_Type,b.RoomPriceS,b.VIPPrice,b.RoomCount,a.Bed_Count,a.Remarks,a.Room_Img,a.WXKeepCount FROM TR_Room_Type a,dbo.TRF_RoomTypeFreeCountVIP('%s','%s','%s 23:59','%s 12:30') b 
					WHERE a.Chain_No='%s'AND a.Room_Type=b.Room_Type and b.RoomCount>0",$strchainno,$_SESSION["main_vipno"],$_SESSION["main_order_checkinday"],$_SESSION["main_order_checkoutday"],$strchainno);

				$result = querySql($sql);
											
				while($row = fetch_array($result))
				{
					$lngroomtypeid=$row['ListNo'];
					$strroomtype=$row['Room_Type'];
					$fltroomprice=$row['RoomPriceS'];
					$fltvipprice=$row['VIPPrice'];
					$introomcount=$row['RoomCount'];
					$intbedcount=$row['Bed_Count'];
					$strremarks=$row['Remarks'];
					$strtypeimg=$row['Room_Img'];
					$intwxkeepcount=$row['WXKeepCount'];
					
					//减去保留房间数
					$introomcount=$introomcount - $intwxkeepcount;
					if(strlen($strtypeimg)>0)
						$strroomimage="images/hotel_images/".$strchainno."/".$strtypeimg;
					else
						$strroomimage="images/hotel_images/".$strchainno."/".$strroomtype.".jpg";
					
					if($fltvipprice==0)
						$fltvipprice=$fltroomprice;
			?>
			
			<tr>
				<td height="40" align="left" colspan="3">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						
						<tr> <td height="5" colspan="3"></td></tr>
						
						<tr>
							<td width="8"></td>
							<td>
								<div id="roomtype_id1" onClick="window.location = 'roomtype.php?romtype=<?php echo $lngroomtypeid;?>&rompric=<?php echo $fltvipprice;?>';">
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="130" height="90"><IMG style="border-radius:3px;" src="<?php echo $strroomimage; ?>" width="130" height="90" border="0"></td>
											<td width="10" height="90"></td>
											<td height="90">
												<!---显示分店资料 地址：电话：说明等-->
												<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
													<tr><td height="25" background-color="#55566"> <span style="color: #000;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:15px;"><?php echo $strroomtype;?></span> </td></tr>
													<tr><td height="65" valign="top"> <span style="color: #999999;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;"><?php echo $strremarks;?></span> </td></tr>
												</table>
											</td>
											<td height="90" width="75">
												<!---显示分店资料 地址：电话：说明等-->
												<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
													<tr><td height="25" align="center" background-color="#55566"><span style="color: #FF3535;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:17px;"><?php echo "￥".number_format($fltvipprice,0);?></span> </td></tr>
													<tr><td height="15" align="center" background-color="#999999"><span style="color: #FF3535;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;">
														<?php 
															if($introomcount>0)
															{
																echo "剩余".number_format($introomcount,0)."间";
															}
															else
															{
																echo "满房";
															}
														?>
													</span> </td></tr>
													<tr><td height="50" align="center">
														<?php if($introomcount>0) {?>
																<div onClick="window.location = 'ordernew.php?romtype=<?php echo $lngroomtypeid;?>';" style="border-radius:3px;width:50px; height:30px; background-color:#D7AA28;">
																	<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
																		<tr><td width="100%" height="100%" align="center">
																			<span style="color:#fff ;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:15px;text-shadow:none;">预订</span>                            	
																		</td></tr>
																	</table>
																</div>				
														<?php } ?>
													</td></tr>
												</table>
											</td>
										</tr>
									</table>
								</div>
							</td>
							<td width="8"></td>
						</tr>
						
						<tr><td height="3" colspan="3"></td></tr>
						<tr>
							<td height="1" width="8"></td>
							<td height="1" bgcolor="#F2E2E2"></td>
							<td height="1" width="8"></td>
						</tr>
						
						<tr><td height="3" colspan="3"></td></tr>
						
					</table>
				</td>
			</tr>
			
			<?php
				}
				//释放数据库
				freeResult($result);
				//关闭数据库
				closeDb();
			?>
			
			<tr>
				<td height="1" width="15" bgcolor="#F2E2E2"></td>
				<td height="1" align="left" bgcolor="#F2E2E2"></td>
				<td height="1" width="15" bgcolor="#F2E2E2"></td>
			</tr>			
		</table>
	</article>
	
	<footer data-role="footer" data-position="fixed" data-tap-toggle="false" style="border-top:0px solid #F2E2E2;border-bottom:1px solid #F2E2E2;border-left:1px solid #F2E2E2;border-right:1px solid #F2E2E2;">
		<table width="100%" height="10" border="0" cellpadding="0" cellspacing="0">
			<tr height="100%" valign="top">
				<td width="25%">					
					<a class="ui-btn ui-icon-home ui-btn-icon-top" data-transition="slide" target="_blank" href="index.php" style="width:100%;height:10px;margin:0px auto 0px auto;color:#666666">主页</a>
				</td>
				<td width="25%">					
					<a class="ui-btn ui-icon-bullets ui-btn-icon-top" data-transition="slide" target="_blank" href="orderlist.php" style="width:100%;height:10px;margin:0px auto 0px auto;color:#666666">我的订单</a>
				</td>
				<td width="25%">
					<a class="ui-btn ui-icon-tag ui-btn-icon-top" data-transition="slide" target="_blank" href="roomlist.php" style="width:100%;height:10px;margin:0px auto 0px auto;color:#666666">我的住房</a>
				</td>
				<td width="25%">
					<a class="ui-btn ui-icon-user ui-btn-icon-top" data-transition="slide" target="_blank" href="vipmain.php" style="width:100%;height:10px;margin:0px auto 0px auto;color:#666666">会员账户</a>
				</td>
			</tr>
		</table>						
	</footer>
</section>

</body>
<script>
function initShare()
{
	//alert(111);
	//alert('<?php echo $_url;?>');
	//var ss = "login.php?vipno=" + $_SESSION["main_vipno"];
	//alert(ss);
	//获取“分享到朋友圈”按钮点击状态及自定义分享内容接口
	wx.onMenuShareTimeline({
		title: '<?php echo $strchainname;?>', // 分享标题
		link: '<?php echo $_url;?>'+"login.php?vipno=" + '<?php echo $_SESSION["main_vipno"];?>', // 分享链接
		imgUrl: '<?php echo $_url;?>'+"" + '<?php echo $selchainimg;?>', // 分享图标  main_order_hotelimg
		success: function () { 
			// 用户确认分享后执行的回调函数
			//alert(11221);
		},
		cancel: function () { 
			// 用户取消分享后执行的回调函数
			//alert(hotel_name)
		}
	});

	//获取“分享给朋友”按钮点击状态及自定义分享内容接口
	wx.onMenuShareAppMessage({
		title: '<?php echo $strchainname;?>', // 分享标题
		desc: '<?php echo $strchainname;?>', // 分享描述
		link: '<?php echo $_url;?>'+"login.php?vipno=" + '<?php echo $_SESSION["main_vipno"];?>', // 分享链接
		imgUrl: '<?php echo $_url;?>'+"" + '<?php echo $selchainimg;?>', // 分享图标  main_order_hotelimg
		type: '', // 分享类型,music、video或link，不填默认为link
		dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
		success: function () { 
			// 用户确认分享后执行的回调函数
			//alert(12211);
		},
		cancel: function () { 
			// 用户取消分享后执行的回调函数
		}
	});
}


</script>


</html>