<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/conn.asp"-->
<%
'''''''''''''''''''''''''''''''''''''''''''''''
Response.buffer=true
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
'''''''''''''''''''''''''''''''''''''''''''''''
response.Charset="gb2312"
response.ContentType="text/xml"
dim rs,id
if(request.QueryString("id")<>"") then
	id=Clng(request.QueryString("id"))
else
	id=0
end if

Set rs = Conn.Execute("select Title,Photo,MinPrice,Address,Tel from t_hotel where id="&id)
response.Write("<?xml version=""1.0"" encoding =""utf-8""?>"&Chr(13))
response.Write("<root>"&Chr(13))
if not rs.Eof then
	response.Write("<hotel Title="""&rs(0)&""" Photo="""&replaceBadChar(rs(1))&""" MinPrice="""&rs(2)&""" Address="""&rs(3)&""" Tel="""&rs(4)&""" />"&Chr(13))	
	rs.movenext
end if
response.Write("</root>"&Chr(13))
rs.close
set rs=nothing
call connclose()
function replaceBadChar(str)
	dim returnStr
	returnStr=str
	if(returnStr<>"") then
		returnStr=replace(returnStr,"'","")
		returnStr= Replace(returnStr,"&","&amp;")
		returnStr= Replace(returnStr,"<","&lt;")
		returnStr= Replace(returnStr,">","&gt;")
	end if
	replaceBadChar=returnStr
end function
%>