<%
'程序制作：广州网域高科
%>
<%
'广告管理

Function AD(id)
Dim AD_Rs,AD_Pic,AD_Date
AD_Date=date()
IF id<>0 then
Set AD_Rs = oConn.execute ("select * from ad where (AD_date - "&AD_date&" > 0) and ad_id="&id)
Else
Set AD_Rs = oConn.execute ("select * from ad where (AD_date - "&AD_date&" > 0) order by AD_id")
end if

if Not AD_Rs.Eof then
IF AD_Rs("AD_Date") - AD_Date > 0 then
Response.Write "<a target=""_blank"" href="&AD_Rs("AD_link")&"><img alt="&AD_Rs("AD_Title")&" border=0 src="&ESCMS_ADMIN_DIR&"\"&AD_Rs("AD_pic")&" /></a>"
End if
End if
AD_Rs.Close
Set AD_Rs=nothing 

End Function


'显示单页文本内容 
'参数: name:单页栏目名 n:字数,0为全部
Function About(name,n)
	Dim About1
	Set About1 = oConn.execute ("select * from wyAbout where about_Name='"&name&"'")
	if Not About1.eof then
		if n <> 0 then
		 Response.Write GotTopic(About1("about_content"),n) & "..."
		else
		 Response.Write About1("about_content")
		end if
	else
	Response.Write "暂无内容"
	end if
	About1.close
End function

Function Wenhua(name,n)
	Dim About1
	Set About1 = oConn.execute ("select * from wenhua where about_Name='"&name&"'")
	if Not About1.eof then
		if n <> 0 then
		 Response.Write GotTopic(About1("about_content"),n) & "..."
		else
		 Response.Write About1("about_content")
		end if
	else
	Response.Write "暂无内容"
	end if
	About1.close
End function

'显示单页导航图片
'参数: name:栏目名 wid:图片宽度  hei:图片高度  ali:图片对齐方式
Function AboutPic(name,wid,hei,ali)
	Dim About2
	Set About2 = oConn.execute ("select * from wyAbout where about_pic <> '' and about_Name='"&name&"'")
	if Not About2.eof then
		 Response.Write ("<img style=""border-color:#FFFFFF"" border=""5"" align="""&ali&""" width=""" & wid & """ height=""" & hei & """ src=""" & ESCMS_ADMIN_DIR & "/" & About2("about_pic") & """ />" & VbStr)
	'else
	'Response.Write "暂无图片"
	end if
	About2.close
End Function



Function WenhuaPic(name,wid,hei,ali)
	Dim About2
	Set About2 = oConn.execute ("select * from wenhua where about_pic <> '' and about_Name='"&name&"'")
	if Not About2.eof then
		 Response.Write ("<img style=""border-color:#FFFFFF"" border=""5"" align="""&ali&""" width=""" & wid & """ height=""" & hei & """ src=""" & ESCMS_ADMIN_DIR & "/" & About2("about_pic") & """ />" & VbStr)
	'else
	'Response.Write "暂无图片"
	end if
	About2.close
End Function




'显示新闻导航图片
'参数: name:栏目名 wid:图片宽度  hei:图片高度 
'调用新闻导航图片列表2
'参数,ts条数,zs标题字数,ls 列数,pic_w图片宽,pic_h图片高,ynpage 是否调用分页 1调用
'prolist1(12,20,3,120,100,0,protype)
Function NewsPic(ts,zs,ls,pic_w,pic_h,ynpage)
		Dim j
		Response.Write "<table width=""100%"" border=""0"" class=""tableborder1"">"
		Dim Newstype,Pic,NewsSql
		if Newstype = 0 then
		NewsSql = "select * From wyNews where News_pic <> '' order by News_ID desc"
		else
		NewsSql = "select * From wyNews where News_pic <> '' News_type = "&Newstype&" order by News_ID desc"
		end if
		oRs.PageSize = ts
		oRs.CursorLocation = 3
		oRs.open NewsSql,oConn,1,1

		call page1()
		for i=1 to int(oRs.PageSize / ls)

		if oRs.Eof then exit for
		Response.Write "<tr>"
			for j=1 to ls

			IF Not oRs.Eof then

			if oRs("News_Pic") <> "" then 

			if instr(oRs("News_Pic"),"http")>0 then
			Pic=oRs("News_Pic")
			else
			Pic=ESCMS_ADMIN_DIR &"/"& oRs("News_Pic")
			end if

			'Pic=ESCMS_ADMIN_DIR &"/"& oRs("News_Pic")
			else
			Pic="sys_images/nopic.gif"
			end if

			Response.Write "<td class=""tdtext"" align=center><a href=""News_show.asp?Newsid="&oRs("News_ID")&"""><img height="""&pic_h&""" width="""&pic_w&""" src="""&pic&""" border=""0"" /></a><br />"
			Response.Write "<a href=""News_show.asp?Newsid="&oRs("News_ID")&""">"&GotTopic(oRs("News_Title"),zs)&"</a>"
			Response.Write "</td>"
			oRs.movenext
			else
			Response.Write "<td>&nbsp;</td>"
			end if
			next
		Response.Write "</tr>"
		if oRs.Eof then exit for
		'oRs.movenext
		next
		Response.Write "</table>"
		if ynpage=1 then Call Page()
		oRs.Close
End function


'新闻内容页函数


Function News_content()
Dim ShowID,ShowRs
ShowID=safeRequest("NewsID",1)
oConn.execute ("update wynews set News_count = News_count+1 where News_ID="&ShowID)
Set ShowRs = oConn.execute ("select * From wyNews where News_ID="&ShowID)
%>
<table width="98%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="24" align="center" style="font-size: 24px;padding-top:10px;"><%=ShowRs("News_Title")%>
              <hr color="#CCCCCC" size="1" /></td>
          </tr>
          <tr>
            <td height="10" align="center">&nbsp;</td>
          </tr>
          <tr>
            <td height="24" class="tdtext"><%=ShowRs("News_Content")%></td>
          </tr>
          <tr>
            <td height="24">&nbsp;</td>
          </tr>
</table>
<%
ShowRs.Close
End Function


'荣誉内容页函数


Function Rongyu_content()
Dim ShowID,ShowRs
ShowID=safeRequest("NewsID",1)
oConn.execute ("update rongyu set News_count = News_count+1 where News_ID="&ShowID)
Set ShowRs = oConn.execute ("select * from rongyu where News_ID="&ShowID)
%>
<table width="98%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="24" align="center" style="font-size: 24px;padding-top:10px;"><%=ShowRs("News_Title")%>
              <hr color="#CCCCCC" size="1" /></td>
          </tr>
          <tr>
            <td height="10" align="center">&nbsp;</td>
          </tr>
          <tr>
            <td height="24" class="tdtext"><%=ShowRs("News_Content")%></td>
          </tr>
          <tr>
            <td height="24">&nbsp;</td>
          </tr>
</table>
<%
ShowRs.Close
End Function




'调用栏目导航
'参数:type:0 总导航 1 单页,2 新闻 3 产品 4 外部
'参数:n:0为横向,1为竖向
Function dh(type1,n)
Dim dhRs
IF type1=0 then
Set dhRs = oConn.execute ("select * from Type where Type_ynView="&true&" order by Type_id asc")
else
Set dhRs = oConn.execute ("select * from Type where Type_type="&type1&" order by Type_id asc")
end if
IF n = 0 then
	if type1=0 then
	Response.Write("<a href=""index.asp"">首 页</a> | ")
	end if
	do while Not dhRs.eof
	if dhRs("Type_type") = 1 then
	Response.Write("<a href=about.asp?name="&dhRs("Type_Name")&">"&dhRs("Type_Name") & "</a> | ")
	elseif dhRs("Type_type") = 2 then
	Response.Write("<a href=News.asp?Type="&dhRs("Type_ID")&">"&dhRs("Type_Name") & "</a> | ")
	elseif dhRs("Type_type") = 3 then
	Response.Write("<a href=Pro.asp?Type="&dhRs("Type_ID")&">"&dhRs("Type_Name") & "</a> | ")
	elseif dhRs("Type_type") = 4 then
	Response.Write("<a href="&dhRs("Type_url")&">"&dhRs("Type_Name") & "</a> | ")
	elseif dhRs("Type_type") = 5 then
	Response.Write("<a href=down.asp?Type="&dhRs("Type_ID")&">"&dhRs("Type_Name") & "</a> | ")
	end if
	dhRs.movenext
	loop
	if type1=0 then
	Response.Write("<a href=""book.asp"">留言本</a>")
	end if
Else
	if type1=0 then
	Response.Write("<a href=""index.asp"">首 页</a><br />" & VbStr)
	end if
	do while Not dhRs.eof
	if dhRs("Type_type") = 1 then
	Response.Write("<a href=about.asp?name="&dhRs("Type_Name")&">"&dhRs("Type_Name") & "</a><br />" & VbStr)
	elseif dhRs("Type_type") = 2 then
	Response.Write("<a href=News.asp?Type="&dhRs("Type_ID")&">"&dhRs("Type_Name") & "</a><br />" & VbStr)
	elseif dhRs("Type_type") = 3 then
	Response.Write("<a href=Pro.asp?Type="&dhRs("Type_ID")&">"&dhRs("Type_Name") & "</a><br />" & VbStr)
	elseif dhRs("Type_type") = 4 then
	Response.Write("<a href="&dhRs("Type_url")&">"&dhRs("Type_Name") & "</a><br />" & VbStr)
	elseif dhRs("Type_type") = 5 then
	Response.Write("<a href=down.asp?Type="&dhRs("Type_ID")&">"&dhRs("Type_Name") & "</a><br />" & VbStr)
	end if
	dhRs.movenext
	loop
	if type1=0 then
	Response.Write("<a href=""book.asp"">留言本</a>" & VbStr)
	end if
End if
dhRs.close
End Function


'调用最新新闻文本列表
'参数：type_news栏目ID，ts条数,zs字数
Function News_New(type_news,ts,zs)
		Dim Rs1
		if type_news=0 then
		set Rs1 = oConn.execute ("select Top "&ts&" * From wyNews order by News_id desc")
		else
		set Rs1 = oConn.execute ("select Top "&ts&" * From wyNews where news_type="&type_pro&" order by news_id desc")
		end if
		do while Not rs1.eof
		Response.Write("· <a href=""News_show.asp?NewsID="&Rs1("News_ID")&""">"&GotTopic(Rs1("News_title"),zs)&"</a><br />" & VbStr)
 		Rs1.movenext
		loop
		Rs1.Close
End Function

'调用最新留言文本列表
'参数：ts条数,zs字数
Function Book_New(ts,zs)
		Dim Rs1

		set Rs1 = oConn.execute ("select Top "&ts&" * from book order by book_id desc")

		do while Not rs1.eof
		Response.Write("· <a href=""book.asp"">"&GotTopic(outhtml(rs1("book_title")),zs)&"</a><br />" & VbStr)
 		Rs1.movenext
		loop
		Rs1.Close
End Function

'调用新闻列表1
'参数:lm新闻栏目id,ts条数 ynpage是否分页 0不分 1分 datetype,日期样式 0 不显示
Function Newslist(lm,ts,zs,ynpage,datetype)

Response.Write "<table class=""tableborder1"" width=""100%"" border=""0"" align=""center"" cellpadding=""2"" cellspacing=""0"">"&VbStr

		Dim Newstype,NewsSql
		Newstype = saferequest("type",1)
		if Newstype = "" and lm = 0 then
		NewsSql = "select top "&ts&" * From wyNews order by News_ID desc"
		elseif lm <> 0 then
		NewsSql = "select top "&ts&" * From wyNews where News_type = "&lm&" order by News_ID desc"
		else
		NewsSql = "select top "&ts&" * From wyNews where News_type = "&Newstype&" order by News_ID desc"
		end if
'Response.Write NewsSql
'Response.End
		oRs.PageSize = ts
		oRs.CursorLocation = 3
		oRs.open NewsSql,oConn,1,1
		call page1()

		if oRs.bof and oRs.eof then
		 Response.Write "<tr><td>暂无内容</td></tr>"
		else

		for i=1 to oRs.PageSize
		if oRs.eof then exit for
		Response.Write "<tr><td class=""tddotted"" height=""20"" align=""left"" valign=""middle"">· <a href=""News_show.asp?Newsid="&oRs("News_ID")&""">"&GotTopic(oRs("News_Title"),zs)&"</a></td>"
		IF datetype <> 0 then
		Response.Write "<td class=""tddotted"" width=""20%"">"&Format_Time(oRs("News_Date"),datetype)&"</td>"
		end if
		Response.Write "</tr>"
		oRs.movenext
		next
		end if
Response.Write "</table>"
		if ynpage=1 then Call Page()
		oRs.close
End Function





'调用宾馆荣誉列表
'参数:lm新闻栏目id,ts条数 ynpage是否分页 0不分 1分 datetype,日期样式 0 不显示
Function Rongyulist(lm,ts,zs,ynpage,datetype)

Response.Write "<table class=""tableborder1"" width=""100%"" border=""0"" align=""center"" cellpadding=""2"" cellspacing=""0"">"&VbStr

		Dim Newstype,NewsSql
		Newstype = saferequest("type",1)
		if Newstype = "" and lm = 0 then
		NewsSql = "select top "&ts&" * from rongyu order by News_ID desc"
		elseif lm <> 0 then
		NewsSql = "select top "&ts&" * from rongyu where News_type = "&lm&" order by News_ID desc"
		else
		NewsSql = "select top "&ts&" * from rongyu where News_type = "&Newstype&" order by News_ID desc"
		end if
'Response.Write NewsSql
'Response.End
		oRs.PageSize = ts
		oRs.CursorLocation = 3
		oRs.open NewsSql,oConn,1,1
		call page1()

		if oRs.bof and oRs.eof then
		 Response.Write "<tr><td>暂无内容</td></tr>"
		else

		for i=1 to oRs.PageSize
		if oRs.eof then exit for
		Response.Write "<tr><td class=""tddotted"" height=""20"" align=""left"" valign=""middle"">· <a href=""Rongyu_show.asp?Newsid="&oRs("News_ID")&""">"&GotTopic(oRs("News_Title"),zs)&"</a></td>"
		IF datetype <> 0 then
		Response.Write "<td class=""tddotted"" width=""20%"">"&Format_Time(oRs("News_Date"),datetype)&"</td>"
		end if
		Response.Write "</tr>"
		oRs.movenext
		next
		end if
Response.Write "</table>"
		if ynpage=1 then Call Page()
		oRs.close
End Function




'调用最新产品文本列表
'参数：type_pro栏目ID,ts条数,zs字数
Function Pro_New(type_pro,ts,zs)
		Dim Rs1
		if type_pro=0 then
		set Rs1 = oConn.execute ("select Top "&ts&" * from pro order by pro_id desc")
		else
		set Rs1 = oConn.execute ("select Top "&ts&" * from pro where Pro_type="&type_pro&" order by pro_id desc")
		end if
		do while Not rs1.eof
		Response.Write("· <a href=""pro_show.asp?ProID="&Rs1("Pro_ID")&""">"&GotTopic(Rs1("Pro_Name"),zs)&"</a><br />" & VbStr)
 		Rs1.movenext
		loop
		Rs1.Close
End Function

'调用产品内容页子函数

Function Pro_content()
Dim ShowID,ShowRs,Pic
ShowID=safeRequest("ProID",1)
Set ShowRs = oConn.execute ("select * from Pro where Pro_ID="&ShowID)
%>
		<table class="tableborder1" width="100%" border="1" align="center" cellpadding="4" cellspacing="0">
          <tr>
            <td width="44%" rowspan="4" align="center" valign="middle">
			<%

			if ShowRs("Pro_Pic") <> "" then 
			if instr(ShowRs("Pro_Pic"),"http")>0 then
			Pic=ShowRs("Pro_Pic")
			else
			Pic=ESCMS_ADMIN_DIR &"/"& ShowRs("Pro_Pic")
			end if

			'Pic=ESCMS_ADMIN_DIR &"/"& ShowRs("Pro_Pic")
			else
			Pic="sys_images/nopic.gif"
			end if
			'Response.Write(pic)
			'Response.End()
			%>
			<a href="<%=pic%>" target="_blank"><img border="0" src="<%=pic%>" width="175" height="116" /></a> <br />点击查看大图			</td>
            <td width="56%" height="25" align="left" valign="middle">房间名称：<%=ShowRs("Pro_Name")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">房间大小：<%=ShowRs("Pro_xh")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">房间规格：<%=ShowRs("Pro_gg")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">房间价格：<%=ShowRs("Pro_jg")%></td>
          </tr>
       <form id="form2" name="form2" method="post" action="pro_yd.asp">
          <tr>
            <td colspan="2" align="center" valign="Top">
              <input name="pro_name" type="hidden" value="<%=ShowRs("Pro_Name")%>" />
              <input type="submit" name="Submit" value=" 预  定  房  间 " height="15" width="30" />
                          
            </td>
          </tr></form>
          <tr>
            <td height="50" colspan="2" align="left" valign="Top"><%=ShowRs("Pro_content")%></td>
            </tr>
        </table>
<%
ShowRs.Close
End Function


'调用洗浴中心列表
Function Xyzx_content()
Dim ShowID,ShowRs,Pic
ShowID=safeRequest("ProID",1)
Set ShowRs = oConn.execute ("select * from xyzx where Pro_ID="&ShowID)
%>
		<table class="tableborder1" width="100%" border="1" align="center" cellpadding="4" cellspacing="0">
          <tr>
            <td width="44%" rowspan="4" align="center" valign="middle">
			<%

			if ShowRs("Pro_Pic") <> "" then 
			if instr(ShowRs("Pro_Pic"),"http")>0 then
			Pic=ShowRs("Pro_Pic")
			else
			Pic=ESCMS_ADMIN_DIR &"/"& ShowRs("Pro_Pic")
			end if

			'Pic=ESCMS_ADMIN_DIR &"/"& ShowRs("Pro_Pic")
			else
			Pic="sys_images/nopic.gif"
			end if
			'Response.Write(pic)
			'Response.End()
			%>
			<a href="<%=pic%>" target="_blank"><img border="0" src="<%=pic%>" width="175" height="116" /></a> <br />点击查看大图			</td>
            <td width="56%" height="25" align="left" valign="middle">服务名称：<%=ShowRs("Pro_Name")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">房间大小：<%=ShowRs("Pro_xh")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">服务内容：<%=ShowRs("Pro_gg")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">服务价格：<%=ShowRs("Pro_jg")%></td>
          </tr>
       <form id="form2" name="form2" method="post" action="pro_yd.asp">
          <tr>
            <td colspan="2" align="center" valign="Top">
              <input name="pro_name" type="hidden" value="<%=ShowRs("Pro_Name")%>" />
              <input type="submit" name="Submit" value=" 预  定  服  务 " height="15" width="30" />
                          
            </td>
          </tr></form>
          <tr>
            <td height="50" colspan="2" align="left" valign="Top"><%=ShowRs("Pro_content")%></td>
            </tr>
        </table>
<%
ShowRs.Close
End Function



'调用餐饮服务列表
Function Cyfw_content()
Dim ShowID,ShowRs,Pic
ShowID=safeRequest("ProID",1)
Set ShowRs = oConn.execute ("select * from cyfw where Pro_ID="&ShowID)
%>
		<table class="tableborder1" width="100%" border="1" align="center" cellpadding="4" cellspacing="0">
          <tr>
            <td width="44%" rowspan="4" align="center" valign="middle">
			<%

			if ShowRs("Pro_Pic") <> "" then 
			if instr(ShowRs("Pro_Pic"),"http")>0 then
			Pic=ShowRs("Pro_Pic")
			else
			Pic=ESCMS_ADMIN_DIR &"/"& ShowRs("Pro_Pic")
			end if

			'Pic=ESCMS_ADMIN_DIR &"/"& ShowRs("Pro_Pic")
			else
			Pic="sys_images/nopic.gif"
			end if
			'Response.Write(pic)
			'Response.End()
			%>
			<a href="<%=pic%>" target="_blank"><img border="0" src="<%=pic%>" width="175" height="116" /></a> <br />点击查看大图			</td>
            <td width="56%" height="25" align="left" valign="middle">服务名称：<%=ShowRs("Pro_Name")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">房间大小：<%=ShowRs("Pro_xh")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">服务内容：<%=ShowRs("Pro_gg")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">服务价格：<%=ShowRs("Pro_jg")%></td>
          </tr>
       <form id="form2" name="form2" method="post" action="pro_yd.asp">
          <tr>
            <td colspan="2" align="center" valign="Top">
              <input name="pro_name" type="hidden" value="<%=ShowRs("Pro_Name")%>" />
              <input type="submit" name="Submit" value=" 预  定  服  务 " height="15" width="30" />
                          
            </td>
          </tr></form>
          <tr>
            <td height="50" colspan="2" align="left" valign="Top"><%=ShowRs("Pro_content")%></td>
            </tr>
        </table>
<%
ShowRs.Close
End Function



'调用会议服务列表
Function Hyfw_content()
Dim ShowID,ShowRs,Pic
ShowID=safeRequest("ProID",1)
Set ShowRs = oConn.execute ("select * from hyfw where Pro_ID="&ShowID)
%>
		<table class="tableborder1" width="100%" border="1" align="center" cellpadding="4" cellspacing="0">
          <tr>
            <td width="44%" rowspan="4" align="center" valign="middle">
			<%

			if ShowRs("Pro_Pic") <> "" then 
			if instr(ShowRs("Pro_Pic"),"http")>0 then
			Pic=ShowRs("Pro_Pic")
			else
			Pic=ESCMS_ADMIN_DIR &"/"& ShowRs("Pro_Pic")
			end if

			'Pic=ESCMS_ADMIN_DIR &"/"& ShowRs("Pro_Pic")
			else
			Pic="sys_images/nopic.gif"
			end if
			'Response.Write(pic)
			'Response.End()
			%>
			<a href="<%=pic%>" target="_blank"><img border="0" src="<%=pic%>" width="175" height="116" /></a> <br />点击查看大图			</td>
            <td width="56%" height="25" align="left" valign="middle">服务名称：<%=ShowRs("Pro_Name")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">房间大小：<%=ShowRs("Pro_xh")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">服务内容：<%=ShowRs("Pro_gg")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">服务价格：<%=ShowRs("Pro_jg")%></td>
          </tr>
       <form id="form2" name="form2" method="post" action="pro_yd.asp">
          <tr>
            <td colspan="2" align="center" valign="Top">
              <input name="pro_name" type="hidden" value="<%=ShowRs("Pro_Name")%>" />
              <input type="submit" name="Submit" value=" 预  定  服  务 " height="15" width="30" />
                          
            </td>
          </tr></form>
          <tr>
            <td height="50" colspan="2" align="left" valign="Top"><%=ShowRs("Pro_content")%></td>
            </tr>
        </table>
<%
ShowRs.Close
End Function


'调用产品列表1
'参数:ts条数 ynpage是否分页 0不分 1分
Function Prolist(ts,ynpage)
'		oRs.Close
		Dim Protype,Pic,ProSql
		Protype = saferequest("type",1)
		if Protype = "" then
		ProSql = "select * from Pro order by Pro_ID desc"
		else
		ProSql = "select * from Pro where Pro_type = "&Protype&" order by Pro_ID desc"
		end if

		oRs.PageSize = ts
		oRs.CursorLocation = 3
		oRs.open ProSql,oConn,1,1
		call page1()
		for i=1 to oRs.PageSize
		if oRs.Eof then exit for
%>

		<table class="tableborder1" width="100%" border="1" align="center" cellpadding="4" cellspacing="0">
          <tr>
            <td width="44%" rowspan="5" align="center" valign="middle">
			<%

			if oRs("Pro_Pic") <> "" then 

			if instr(oRs("Pro_Pic"),"http")>0 then
			Pic=oRs("Pro_Pic")
			else
			Pic=ESCMS_ADMIN_DIR &"/"& oRs("Pro_Pic")
			end if

			'Pic=ESCMS_ADMIN_DIR &"/"& oRs("Pro_Pic")
			else
			Pic="sys_images/nopic.gif"
			end if
			'Response.Write(pic)
			'Response.End()
			%>
			<a href="Pro_show.asp?Proid=<%=oRs("Pro_ID")%>"><img border="0" src="<%=pic%>" width="175" height="116" /></a>
			</td>
            <td width="56%" height="25" align="left" valign="middle">房间名称：<%=oRs("Pro_Name")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">房间大小：<%=oRs("Pro_xh")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">房间规格：<%=oRs("Pro_gg")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">房间价格：<%=oRs("Pro_jg")%></td>
          </tr>
          <tr>
            <td height="25" align="right" valign="middle"><a href="Pro_show.asp?Proid=<%=oRs("Pro_ID")%>">点击查看详情</td>
          </tr>
          <tr>
            <td height="20" colspan="2" align="center" valign="middle">&nbsp;</td>
          </tr>
        </table><br />

<%
		oRs.movenext
		next
		if ynpage=1 then Call Page()
		oRs.close
End Function


'调用产品列表2
'参数,ts条数,zs标题字数,ls 列数,pic_w图片宽,pic_h图片高,ynpage 是否调用分页 1调用
'prolist1(lm,12,20,3,120,100,1)
Function Prolist1(lm,ts,zs,ls,pic_w,pic_h,ynpage)
		Dim j
		Response.Write "<table width=""100%"" border=""0"" class=""tableborder1"">"
		Dim Protype,Pic,ProSql
		Protype = saferequest("type",1)
		if Protype = "" and lm = 0 then
		ProSql = "select * from Pro order by Pro_ID desc"
		elseif lm <> 0 then
		ProSql = "select * from Pro where Pro_type = "&lm&" order by Pro_ID desc"
		else
		ProSql = "select * from Pro where Pro_type = "&Protype&" order by Pro_ID desc"
		end if
		oRs.PageSize = ts
		oRs.CursorLocation = 3
		oRs.open ProSql,oConn,1,1

		call page1()
		for i=1 to int(oRs.PageSize / ls)

		if oRs.Eof then exit for
		Response.Write "<tr>"
			for j=1 to ls

			IF Not oRs.Eof then
			if oRs("Pro_Pic") <> "" then 

			if instr(oRs("Pro_Pic"),"http")>0 then
			Pic=oRs("Pro_Pic")
			else
			Pic=ESCMS_ADMIN_DIR &"/"& oRs("Pro_Pic")
			end if

			'Pic=ESCMS_ADMIN_DIR &"/"& oRs("Pro_Pic")
			else
			Pic="sys_images/nopic.gif"
			end if



			Response.Write "<td class=""tdtext"" align=center><a href=""Pro_show.asp?proid="&oRs("Pro_ID")&"""><img height="""&pic_h&""" width="""&pic_w&""" src="""&pic&""" border=""0"" /></a><br />"
			Response.Write "<a href=""Pro_show.asp?proid="&oRs("Pro_ID")&""">"&oRs("Pro_Name")&"</a>"
			Response.Write "</td>"
			oRs.movenext
			else
			Response.Write "<td>&nbsp;</td>"
			end if
			next
		Response.Write "</tr>"
		if oRs.Eof then exit for
		'oRs.movenext
		next
		Response.Write "</table>"
		if ynpage=1 then Call Page()
		oRs.Close
End function


'洗浴中心模块

Function Xyzx(ts,ynpage)
'		oRs.Close
		Dim Protype,Pic,ProSql
		Protype = saferequest("type",1)
		if Protype = "" then
		ProSql = "select * from xyzx order by Pro_ID desc"
		else
		ProSql = "select * from xyzx where Pro_type = "&Protype&" order by Pro_ID desc"
		end if

		oRs.PageSize = ts
		oRs.CursorLocation = 3
		oRs.open ProSql,oConn,1,1
		call page1()
		for i=1 to oRs.PageSize
		if oRs.Eof then exit for
%>

		<table class="tableborder1" width="100%" border="1" align="center" cellpadding="4" cellspacing="0">
          <tr>
            <td width="44%" rowspan="5" align="center" valign="middle">
			<%

			if oRs("Pro_Pic") <> "" then 

			if instr(oRs("Pro_Pic"),"http")>0 then
			Pic=oRs("Pro_Pic")
			else
			Pic=ESCMS_ADMIN_DIR &"/"& oRs("Pro_Pic")
			end if

			'Pic=ESCMS_ADMIN_DIR &"/"& oRs("Pro_Pic")
			else
			Pic="sys_images/nopic.gif"
			end if
			'Response.Write(pic)
			'Response.End()
			%>
			<a href="Xyzx_show.asp?Proid=<%=oRs("Pro_ID")%>"><img border="0" src="<%=pic%>" width="175" height="116" /></a>
			</td>
            <td width="56%" height="25" align="left" valign="middle">服务名称：<%=oRs("Pro_Name")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">房间大小：<%=oRs("Pro_xh")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">服务内容：<%=oRs("Pro_gg")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">服务价格：<%=oRs("Pro_jg")%></td>
          </tr>
          <tr>
            <td height="25" align="right" valign="middle"><a href="Xyzx_show.asp?Proid=<%=oRs("Pro_ID")%>">点击查看详情</td>
          </tr>
          <tr>
            <td height="20" colspan="2" align="center" valign="middle">&nbsp;</td>
          </tr>
        </table><br />

<%
		oRs.movenext
		next
		if ynpage=1 then Call Page()
		oRs.close
End Function


'餐饮服务模块

Function Cyfw(ts,ynpage)
'		oRs.Close
		Dim Protype,Pic,ProSql
		Protype = saferequest("type",1)
		if Protype = "" then
		ProSql = "select * from cyfw order by Pro_ID desc"
		else
		ProSql = "select * from cyfw where Pro_type = "&Protype&" order by Pro_ID desc"
		end if

		oRs.PageSize = ts
		oRs.CursorLocation = 3
		oRs.open ProSql,oConn,1,1
		call page1()
		for i=1 to oRs.PageSize
		if oRs.Eof then exit for
%>

		<table class="tableborder1" width="100%" border="1" align="center" cellpadding="4" cellspacing="0">
          <tr>
            <td width="44%" rowspan="5" align="center" valign="middle">
			<%

			if oRs("Pro_Pic") <> "" then 

			if instr(oRs("Pro_Pic"),"http")>0 then
			Pic=oRs("Pro_Pic")
			else
			Pic=ESCMS_ADMIN_DIR &"/"& oRs("Pro_Pic")
			end if

			'Pic=ESCMS_ADMIN_DIR &"/"& oRs("Pro_Pic")
			else
			Pic="sys_images/nopic.gif"
			end if
			'Response.Write(pic)
			'Response.End()
			%>
			<a href="Pro_show.asp?Proid=<%=oRs("Pro_ID")%>"><img border="0" src="<%=pic%>" width="175" height="116" /></a>
			</td>
            <td width="56%" height="25" align="left" valign="middle">服务名称：<%=oRs("Pro_Name")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">房间大小：<%=oRs("Pro_xh")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">服务内容：<%=oRs("Pro_gg")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">服务价格：<%=oRs("Pro_jg")%></td>
          </tr>
          <tr>
            <td height="25" align="right" valign="middle"><a href="Cyfw_show.asp?Proid=<%=oRs("Pro_ID")%>">点击查看详情</td>
          </tr>
          <tr>
            <td height="20" colspan="2" align="center" valign="middle">&nbsp;</td>
          </tr>
        </table><br />

<%
		oRs.movenext
		next
		if ynpage=1 then Call Page()
		oRs.close
End Function


'会议服务模块

Function Hyfw(ts,ynpage)
'		oRs.Close
		Dim Protype,Pic,ProSql
		Protype = saferequest("type",1)
		if Protype = "" then
		ProSql = "select * from hyfw order by Pro_ID desc"
		else
		ProSql = "select * from hyfw where Pro_type = "&Protype&" order by Pro_ID desc"
		end if

		oRs.PageSize = ts
		oRs.CursorLocation = 3
		oRs.open ProSql,oConn,1,1
		call page1()
		for i=1 to oRs.PageSize
		if oRs.Eof then exit for
%>

		<table class="tableborder1" width="100%" border="1" align="center" cellpadding="4" cellspacing="0">
          <tr>
            <td width="44%" rowspan="5" align="center" valign="middle">
			<%

			if oRs("Pro_Pic") <> "" then 

			if instr(oRs("Pro_Pic"),"http")>0 then
			Pic=oRs("Pro_Pic")
			else
			Pic=ESCMS_ADMIN_DIR &"/"& oRs("Pro_Pic")
			end if

			'Pic=ESCMS_ADMIN_DIR &"/"& oRs("Pro_Pic")
			else
			Pic="sys_images/nopic.gif"
			end if
			'Response.Write(pic)
			'Response.End()
			%>
			<a href="Pro_show.asp?Proid=<%=oRs("Pro_ID")%>"><img border="0" src="<%=pic%>" width="175" height="116" /></a>
			</td>
            <td width="56%" height="25" align="left" valign="middle">服务名称：<%=oRs("Pro_Name")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">房间大小：<%=oRs("Pro_xh")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">服务内容：<%=oRs("Pro_gg")%></td>
          </tr>
          <tr>
            <td height="25" align="left" valign="middle">服务价格：<%=oRs("Pro_jg")%></td>
          </tr>
          <tr>
            <td height="25" align="right" valign="middle"><a href="Hyfw_show.asp?Proid=<%=oRs("Pro_ID")%>">点击查看详情</td>
          </tr>
          <tr>
            <td height="20" colspan="2" align="center" valign="middle">&nbsp;</td>
          </tr>
        </table><br />

<%
		oRs.movenext
		next
		if ynpage=1 then Call Page()
		oRs.close
End Function


'下载模块
function Down(ts,ynpage)
Dim Downsql,Downtype,Down_type,Downyy,Downurl,pic
		DownSql = "select * from Down order by Down_ID desc"
		oRs.PageSize = ts
		oRs.CursorLocation = 3
		oRs.open DownSql,oConn,1,1
		call page1()
		for i=1 to oRs.PageSize
		if oRs.Eof then exit for

		Set Downtype = oConn.execute ("select * from Type where type_id="&oRs("Down_type"))
		if not Downtype.eof then
		Down_type=Downtype("type_name")
		else
		Downtype.close
		end if
		set Downtype=nothing
		select case oRs("Down_yy")
		case 1
		Downyy = "简体中文"
		case 2
		downyy = "English"
		case 3
		Downyy = "其它"
		end select
		DownUrl = oRs("Down_Url")
		if DownUrl="" then
		DownUrl = "暂无下载"
		elseif instr(DownUrl,"http")>0 then
		DownUrl = "<a href="&DownUrl&">远程下载</a>"
		else
		DownUrl = "<a href="&ESCMS_ADMIN_DIR&"/"&DownUrl&">本地下载</a>"
		end if
		
		if oRs("Down_Pic") <> "" then 
			if instr(oRs("Down_Pic"),"http")>0 then
			Pic=oRs("Down_Pic")
			else
			Pic=ESCMS_ADMIN_DIR &"/"& oRs("Down_Pic")
			end if
		else
			Pic="sys_images/nopic.gif"
		end if
		%>
		<table class="tableborder1" width="100%" border="1" cellspacing="0" cellpadding="0">
          <tr>
            <td height="20" colspan="2" align="center" bgcolor="#F0F0F0"><b><%=oRs("Down_name")%><b></td>
          </tr>
          <tr>
            <td width="58%" height="20" class="tdtext">软件类别：<%=Down_type%></td>
            <td width="42%" rowspan="5" align="center"><img border="0" src="<%=pic%>" width="175" height="116" /></td>
          </tr>
          <tr>
            <td height="20" class="tdtext">软件大小：<%=oRs("Down_size")%>KB</td>
          </tr>
          <tr>
            <td height="20" class="tdtext">软件语言：<%=Downyy%></td>
          </tr>
          <tr>
            <td height="20" class="tdtext">软件作者：<%=oRs("Down_zz")%></td>
          </tr>
          <tr>
            <td height="20" align="left" class="tdtext"><%=DownUrl%></td>
          </tr>
          <tr>
            <td height="33" colspan="2" align="left" valign="top" class="tdtext">软件说明：<%=oRs("Down_content")%></td>
          </tr>
        </table><br />
		<%		oRs.movenext
		next
		if ynpage=1 then Call Page()
		'call page()
		oRs.close
End Function

'留言本(最垃圾的子函数模块...连我自己都想骂..)
'无参数,直接book()就OK!

sub book()
if Request("act")="Add" then
call book1()
else
call booklist()
end if
end sub
sub book1()
%>

<div align="center">		  
<form name="form1" method="post" action="Inc/savebook.asp">
  		  <table class="tableborder1" width="100%" border="1" cellspacing="0" cellpadding="0">
  		   <tr>
				  <td height="22" colspan="3" style="padding-left: 5px">
					<p align="center">签写留言</td>
		    </tr>
			  <tr>
				  <th colSpan="3">　</th>
			  </tr>

      <tr>
        <td width="24%" height="24" align="right">选择头像：          </td>
        <td width="38%" align="left"><select name="book_face" id="book_face" onChange="changeface(this)">
          <option value="a1" selected>1</option>
          <option value="a2">2</option>
          <option value="a3">3</option>
          <option value="a4">4</option>
          <option value="a5">5</option>
          <option value="a6">6</option>
          <option value="a7">7</option>
          <option value="a8">8</option>
          <option value="a9">9</option>
          <option value="a10">10</option>
          <option value="a11">11</option>
          <option value="a12">12</option>
          <option value="a13">13</option>
          <option value="a14">14</option>
          <option value="a15">15</option>
          <option value="a16">16</option>
          <option value="a17">17</option>
          <option value="a18">18</option>
          <option value="a19">19</option>
          <option value="a20">20</option>
        </select></td>
        <td width="38%" rowspan="7" align="center">
		<img src="sys_images/face/a1.gif" width="91" height="94" name="face1" align='absmiddle'><script>

		function changeface(obj){
      document.all.face1.src="sys_images/face/" + obj.value + ".gif"
	}
  </script></td>
      </tr>
      <tr>
        <td height="24" align="right">你的昵称：          </td>
        <td height="24" align="left"><input name="book_name" type="text" id="book_name">
        *</td>
        </tr>
      <tr>
        <td height="24" align="right">你的网页地址：          </td>
        <td height="24" align="left"><input name="book_web" type="text" id="book_web"></td>
        </tr>
      <tr>
        <td height="24" align="right">你的QQ：          </td>
        <td height="24" align="left"><input name="book_qq" type="text" id="book_qq"></td>
        </tr>
      <tr>
        <td height="24" align="right">你的EMAIL：          </td>
        <td height="24" align="left"><input name="book_mail" type="text" id="book_mail">
        *</td>
        </tr>
      <tr>
        <td height="24" align="right">留言主题： </td>
        <td height="24" align="left"><input name="book_title" type="text" id="book_title">
  *</td>
        </tr>
      <tr>
        <td height="24" align="right">验证码：</td>
        <td height="24" align="left"><input name="book_code" type="text" id="book_code" size="10">
        <img src="inc/getcode.asp" /></td>
        </tr>
      <tr>
        <td height="158" align="right">
		<p>留言内容：</td>
        <td height="158" align="right" colspan="2">
        <p align="center">
        <textarea name="book_bz" cols="53" rows="8" id="book_bz"></textarea></td>
        </tr>
      <tr>
        <td height="32" align="right" colspan="3">
		<p align="center">
      <input type="submit" class="submit" value="点击提交留言">
&nbsp;&nbsp;&nbsp;      
<input type="reset" class="submit" value="重置">
    </td>
        </tr>
    </table>
</form></div>
<%
end sub
Sub booklist()
%>
		<div align="center">
		  <%set rs1 = server.CreateObject("adodb.recordset")
Dim rs1,sql,pre,last,page3,intpage,i
sql="[book] order by book_id desc"
rs1.PageSize = 5 '这里设定每页显示的记录数
rs1.CursorLocation = 3
rs1.Open sql,oconn,1,1 '这里执行你查询SQL并获得结果记录集
pre = true
last = true
page3 = Request("page")

if len(page3) = 0 then
intpage = 1
pre = false
else
if cint(page3) =< 1 then
intpage = 1
pre = false
else
if cint(page3) >= rs1.PageCount then
intpage = rs1.PageCount
last = false
else
intpage = cint(page3)
end if
end if
end if
if not rs1.eof then
rs1.AbsolutePage = intpage
end if

for i=1 to rs1.PageSize
if rs1.EOF or rs1.BOF then exit for
%>
		  <table class="tableborder1" cellSpacing="0" cellPadding="0" width="100%" border="1">
			  <tr>
				  <td height="22" colspan="2" align="left" style="padding-left: 5px; padding-right:5px"><font face="宋体">No:<%=rs1("book_id")%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b><%=outhtml(rs1("book_title"))%></b></font></td>
			  </tr>
			  <tr>
				  <th colSpan="2" style="padding-left: 5px; padding-right: 5px">　</th>
			  </tr>
			  <tr>
				  <td width="72%" height="22" align="left" style="padding-left: 5px; padding-right: 5px"><font color="#000000">[<a href="mailto:<%=outhtml(rs1("book_mail"))%>">mail</a>] [<a title=<%=rs1("book_qq")%>>QQ</a>] [<a target="_blank" href="<%=outhtml(rs1("book_web"))%>">web</a>] [<%=month(rs1("book_date"))%>-<%=day(rs1("book_date"))%>] </font></td>
				  <td width="28%" height="116" rowspan="3" align="center" style="padding-left: 5px; padding-right: 5px">
					<img border="0" src="sys_images/face/<%=outhtml(rs1("book_face"))%>.gif" width="77" height="77"><br>
					<%=outhtml(rs1("book_name"))%></td>
			  </tr>
			  <tr align="left" class onmouseover="javascript:this.className='trOnMOver';" onmouseout="javascript:this.className='';">
			    <td height="76" style="LEFT: 0px; WIDTH: 390; WORD-WRAP: break-word;padding-left: 5px; padding-right: 5px"><%=outhtml(rs1("book_bz"))%></td>
		    </tr>
			  <tr align="left" class onmouseover="javascript:this.className='trOnMOver';" onmouseout="javascript:this.className='';">
			    <td height="22" style="padding-left: 5px; padding-right: 5px">
				<b>管理员回复</b>：
	<%
	dim rrs
	if isnull(rs1("book_rs")) then 
		rrs="暂无回复"
	  else
		rrs=outhtml(rs1("book_rs"))
	  end if
	%><%=rrs%>
</td>
		    </tr>
			  
		  </table>
		  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="4"></td>
            </tr>
          </table>
  		  <% 
rs1.movenext
next
%><table width="100%" height="22" border="1" cellspacing="0" class="tableborder1">
			<tr>
				<th colSpan="3">　</th>
			</tr>
<tr>
<%if rs1.pagecount > 0 then%>
<td width="13%" align="left" border="1" style="padding-left:15px; padding-right:15px" height="22">当前页<%=intpage%>/<%=rs1.PageCount%></td>
<%else%>
<td width="17%" align="left" style="padding-left:15px; padding-right:15px" height="24">当前页0/0</td><%end if%>
<td width="50%" align="right" style="padding-left:15px; padding-right:15px" height="24"> <a href="book.asp?page=1">首页</a>| 
<%if pre then%>
<a href="book.asp?page=<%=intpage -1%>">上页</a>| <%end if%>
<%if last then%>
<a href="book.asp?page=<%=intpage +1%>">下页</a> |<%end if%>
<a href="book.asp?page=<%=rs1.PageCount%>">尾页</a>|转到第
<select class=select name="sel_page" onchange="javascript:location=this.options[this.selectedIndex].value;">
<%
for i = 1 to rs1.PageCount
if i = intpage then%>
<option value="book.asp?page=<%=i%>" selected><%=i%></option>
<%else%>
<option value="book.asp?page=<%=i%>"><%=i%></option>
<%
end if
next
%>
</select>页</font> 
</td>
</tr>
</table></div>
<%
rs1.close
End sub

'在线订购表单
Sub Online()
%>
<div align="center">		  
<form name="form1" method="post" action="Inc/SaveShop.asp">
  		  <table class="tableborder1" width="100%" border="1" cellspacing="0" cellpadding="0">
  		   <tr>
				  <td height="22" colspan="2" style="padding-left: 5px">
					<p align="center" style="font-weight: bold">在线预定</td>
		    </tr>
			  <tr>
				  <th height="4" colSpan="2"></th>
			  </tr>
              
              <tr>
                <td height="20" align="right">房间名称：</td>
                <td align="left"><input name="Shop_Pro" type="text" id="Shop_Pro" value="<%if Request("Pro_Name")<>"" then Response.Write(Request("Pro_Name"))%>" /></td>
              </tr>
              <tr>
                <td height="20" align="right">预定数量：</td>
                <td align="left"><input name="Shop_Number" type="text" id="Shop_Number" value="1" /></td>
              </tr>
              <tr>
                <td height="20" align="right">支付方式：</td>
                <td align="left"><input name="Shop_Pay" type="text" id="Shop_Pay" value="上门支付/银行支付" /></td>
              </tr>
              <tr>
                <td height="20" align="right">您的姓名：</td>
                <td align="left"><input name="Shop_User" type="text" id="Shop_User" /></td>
              </tr>
              <tr>
                <td height="20" align="right">联系电话：</td>
                <td align="left"><input name="Shop_photo" type="text" id="Shop_photo" /></td>
              </tr>
              <tr>
                <td height="20" align="right">联系信箱：</td>
                <td align="left"><input name="Shop_mail" type="text" id="Shop_mail" /></td>
              </tr>
              <tr>
        <td height="20" align="right">联系地址：</td>
        <td align="left"><input name="Shop_Add" type="text" id="Shop_Add" /></td>
              </tr>
              <tr>
                <td height="20" align="right">验 证 码：</td>
                <td align="left"><input name="Shop_code" type="text" id="Shop_code" />                  
                  &nbsp;<img src="inc/getcode.asp" /></td>
              </tr>
      
      
      <tr>
        <td width="18%" height="158" align="right">
		<p>其它要求：</td>
        <td height="158" align="right">
        <p align="center">
        <textarea name="Shop_content" cols="53" rows="8" id="Shop_content"></textarea></td>
        </tr>
      <tr>
        <td height="32" align="right" colspan="2">
		<p align="center">
      <input type="submit" class="submit" value="点击提交订单">
&nbsp;&nbsp;&nbsp;      
<input type="reset" class="submit" value="重置">
    </td>
        </tr>
    </table>
</form></div>
<%End Sub%>