<?php
	session_start();
	header("Content-type:text/html;charset=gb2312");
	//获取客户的微信ID号
	$strwxid=trim($_REQUEST['wxudid']);
	if(strlen($strwxid)>10)
	{
		$_SESSION["main_wxudid"]=$strwxid;
	}
	
	//判断是否登录系统，散客固定为会员号"00000"
	if($_SESSION["main_viploginedsk"]!="1" |$_SESSION["main_vipnosk"]=="")
	{
		//没有登录开始启动登录
		require_once("logina.php");	
	}
	
	
	//判断是否有默认分店,如果有则直接进入默认分店界面
	$strlocalchainno=trim($_REQUEST['chidno']);
	if(strlen($strlocalchainno)>0)
	{
		$_SESSION["main_defhotelcode"]=$strlocalchainno;
		$_SESSION["main_defhotelsel"]="1";
	}
	
	$_SESSION["main_nowpageishd"]="1";		//当前位优惠活动
?>

<!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>
	//alert('<?php echo $url;?>');
	
	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(){
		//alert(1);
		wx.showMenuItems({
		  menuList: [
			
			'menuItem:share:timeline', // 分享到朋友圈
			'menuItem:share:appMessage'
		  ],
		  success: function (res) {
			//alert('已显示“阅读模式”，“分享到朋友圈”，“复制链接”等按钮');
		  },
		  fail: function (res) {
			alert(JSON.stringify(res));
		  }
		});

		initShare();
	});

	
</script>

<script>	

	//传播类
    //发送给朋友: "menuItem:share:appMessage"
    //分享到朋友圈: "menuItem:share:timeline"
    //分享到QQ: "menuItem:share:qq"
    //分享到Weibo: "menuItem:share:weiboApp"
    //收藏: "menuItem:favorite"
    //分享到FB: "menuItem:share:facebook"
    //分享到 QQ 空间/menuItem:share:QZone 
	//隐藏维信右上角菜单
	function onBridgeReady(){
		//WeixinJSBridge.call('hideOptionMenu');
	}
	
	if (typeof WeixinJSBridge == "undefined")
	{
		if( document.addEventListener )
		{
			document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
		}
		else if (document.attachEvent)
		{
			document.attachEvent('WeixinJSBridgeReady', onBridgeReady); 
			document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
		}
	}
	else
	{
		onBridgeReady();
	}
</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'];
	$strclistno=$_REQUEST['acid'];		//活动项目流水号
	$_SESSION["main_strhdlistno"]=$strclistno;
	
	$_SESSION["main_selhotelcode"]=$strchainno;
	
	$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;
		
		/* 2016-04-20 取消
		//将图片显示为第一个名称，如：112.jpg,113.jpg,114.jpg只去第一个图
		$intpos=stripos($strhotelimg,',');
		if($intpos>0)
			$strhotelimg =substr($strhotelimg,0,$intpos);
			
		$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);
	
	
	//得到优惠活动信息
	$sql=sprintf("SELECT News_Title,News_Text,News_Img FROM TR_AppNews_List WHERE ListNo=%s",$strclistno);				
	$result = querySql($sql);
	$row = fetch_array($result);
	$strhdtitle = $row['News_Title'];
	$strhdtext = $row['News_Text'];
	$strhdimg = $row['News_Img'];
					
	$strhdselimg="images/hotel_images/".$strchainno."/".$strhdimg;
	freeResult($result);
		
	//关闭数据库
	closeDb();
	
?>

<body leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
<!--第一个页面的内容实现---------------------------->
<section data-role="page" id="pageh1">
		
	<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 $strhdselimg; ?>" 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="8" width="15" bgcolor="#66FFFF"></td>
				<td height="8" align="left" bgcolor="#66FFFF"></td>
				<td height="8" 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;?>&acid=<?php echo $strclistno;?>';">
									<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;?>&acid=<?php echo $strclistno;?>';">
									<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,x.RoomPrice AS VIPPrice,b.RoomCount,a.Bed_Count,a.Remarks,a.Room_Img,x.ItemState
					FROM TR_Room_Type a,dbo.TRF_RoomTypeFreeCountVIP('%s','%s','%s 23:59','%s 12:30') b,
					(SELECT m.Room_Type,m.RoomPrice,m.ItemState FROM TR_AppNews_RoomType m,TR_AppNews_List n 
					WHERE m.AListNo=n.ListNo AND n.Chain_No='%s' And n.ListNo=%s And m.ItemState<2) x
					WHERE a.Chain_No='%s'AND a.Room_Type=b.Room_Type and b.RoomCount>0 And a.Room_Type=x.Room_Type",$strchainno,
						$_SESSION["main_vipnosk"],$_SESSION["main_order_checkinday"],$_SESSION["main_order_checkoutday"],$strchainno,$strclistno,$strchainno);

				$result = querySql($sql);
											
				while($row = fetch_array($result))
				{
					$lngroomtypeid=$row['ListNo'];
					$strroomtype=$row['Room_Type'];
					$fltroomprice=$row['RoomPriceS'];
					$fltvipprice=$row['VIPPrice'];
					$introomcount=$row['ItemState'];
					$intbedcount=$row['Bed_Count'];
					$strremarks=$row['Remarks'];
					$strtypeimg=$row['Room_Img'];
					
					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>
								<!--<a data-transition="slide" href="roomtype.php?romtype=<?php echo $lngroomtypeid;?>&rompric=<?php echo $fltvipprice;?>&hdf=1">-->
								<div id="roomtype_id1">
									<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">
														<?php if($introomcount==1) {?>
															<span style="color: #FF3535;font: 12px/1.5 '微软雅黑',tahoma, Srial, helvetica, sans-serif; font-size:12px;">满房</span>
														<?php } ?>
													</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><!--</a>-->
							</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" href="index2.php" data-direction="reverse" style="width:100%;height:10px;margin:0px auto 0px auto;color:#666666">主页</a>
				</td>
				<td width="25%">					
					<a class="ui-btn ui-icon-shop ui-btn-icon-top" data-transition="slide" target="_blank" href="indexhd.php" data-direction="reverse" 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>
			</tr>
		</table>						
	</footer>
</section>

</body>
<script>
function initShare()
{
	//alert(111);
	//alert('<?php echo $_url;?>');
	//var ss = "login.php?vipno=" + $_SESSION["main_vipnosk"];
	//alert(ss);
	//获取“分享到朋友圈”按钮点击状态及自定义分享内容接口
	wx.onMenuShareTimeline({
		title: '<?php echo $strchainname;?>', // 分享标题
		link: '<?php echo $_url;?>'+"login.php?vipno=" + '<?php echo $_SESSION["main_vipnosk"];?>', // 分享链接
		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_vipnosk"];?>', // 分享链接
		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>