<%
vvSite=""
qCode=""
qSiteName=""
xSite=Request.ServerVariables("HTTP_HOST")
qHomePage="Http://"&xSite
xWZ=inStr(xSite,".")
if xWZ>0 then
vvSite=mid(xSite,1,xWZ-1)
end if
sql="select * from xsysSite where xName='"&vvSite&"'"
Rs.Open sql,Conn,1,1
If Not Rs.Eof and not Rs.bof then
qCode=rs("xCode")
end if
Rs.close()
if len(qCode)=0 then
qSiteName=""
end if
if len(qCode)=2 then
sql="select * from xCountry where xValue='"&qCode&"'"
Rs.Open sql,Conn,1,1
If Not Rs.Eof and not Rs.bof then
qSiteName="---"&Rs("xName")&"--- "
end if
Rs.close()
end if
if len(qCode)=4 then
sql="select * from xProvince where xValue='"&qCode&"'"
Rs.Open sql,Conn,1,1
If Not Rs.Eof and not Rs.bof then
qSiteName="---"&Rs("xName")&"站--- "
end if
Rs.close()
end if
if len(qCode)=6 then
sql="select * from xProvince where xValue='"&mid(qCode,1,4)&"'"
Rs.Open sql,Conn,1,1
If Not Rs.Eof and not Rs.bof then
qSiteName1=Rs("xName")
end if
Rs.close()
sql="select * from xCapital where xValue='"&qCode&"'"
Rs.Open sql,Conn,1,1
If Not Rs.Eof and not Rs.bof then
qSiteName2=Rs("xName")
end if
Rs.close()
qSiteName="--"&qSiteName1&qSiteName2&"站-- "
end if
if len(qCode)=8 then
sql="select * from xProvince where xValue='"&mid(qCode,1,4)&"'"
Rs.Open sql,Conn,1,1
If Not Rs.Eof and not Rs.bof then
qSiteName1=Rs("xName")
end if
Rs.close()
sql="select * from xCity where xValue='"&qCode&"'"
Rs.Open sql,Conn,1,1
If Not Rs.Eof and not Rs.bof then
qSiteName3=Rs("xName")
end if
Rs.close()
qSiteName="--"&qSiteName1&qSiteName3&"站-- "
end if
response.Cookies("xSiteCode")=qCode
response.Cookies("xSiteCode").Domain="ccboss.com"
%>