<%
'定义一个类应用
Dim w, o
'输出信息
Class clsResponse
	Sub w(s)'输入文字
		Response.Write s
	End Sub
	Sub a(s)'弹出提示
		Response.Write "<script language=javascript>alert('" & s & "');history.go(-1)</script>"
	End Sub
	Sub r(s)'转向某页
		Response.Redirect s
	End Sub
	Sub e'结束输入
		Response.End
	End Sub
End Class
'参数信息
Class clsRequest
	Function f(s)
		f = Request.Form(s)
	End Function
	Function q(s)
		q = Request.QueryString(s)
	End Function
	Function s(a)
		s = Request.ServerVariables(a)
	End Function
	Function t(s)
		t = Trim(Request(s))
	End Function
End Class
'创建新类
Set w = New clsResponse
Set o = New clsRequest
'-------------------------------------------------
'描述: 读取当前IP地址
'-------------------------------------------------
Function GetIP()			
	GetIp = Request.ServerVariables("HTTP_X_FORWARDED_FOR") 
	If GetIp = "" Then GetIp = Request.ServerVariables("REMOTE_ADDR") 
End Function
Dim MYIP : MYIP = GetIP()
'-------------------------------------------------
'描述: IP地址只读取前三位
'-------------------------------------------------
Function HideIp(s)
	Dim HIP
	HIP = Split(s, ".")
	HideIp = HIP(0) & "." & HIP(1) & "." & HIP(2) & ".***"
End Function
'-------------------------------------------------
'描述: 0为否，1为是
'-------------------------------------------------
Function YESORNO(lev) 
	select case lev
	case "0"
	YESORNO="<b class=fred>否</b>"
	case "1"
	YESORNO="<b class=fblue>是</b>"
	case Else
end select
End Function
'-------------------------------------------------
'描述: 货币形式展示
'-------------------------------------------------
Function GZMONEY(s)
   Response.Write FormatCurrency(s,2)
End Function
'-------------------------------------------------
'描述: 错误信息提示
'-------------------------------------------------
Function Alert(message,gourl) 
    message = replace(message,"'","\'")
    If gourl="-1" then
        Response.Write ("<script language=javascript>alert('" & message & "');history.go(-1)</script>")
    ElseIf gourl="-2" then
        Response.Write ("<script language=javascript>alert('" & message & "');history.go(-2)</script>")
    ElseIf gourl="-3" then
        Response.Write ("<script language=javascript>alert('" & message & "');window.close();</script>")
    Else
        Response.Write ("<script language=javascript>alert('" & message & "');location='" & gourl &"'</script>")
    End If
    Response.End()
End Function
'-------------------------------------------------
Function backurl(goourl) 
    If goourl="-1" then
        Response.Write ("<script language=javascript>history.go(-1)</script>")
    ElseIf goourl="-2" then
        Response.Write ("<script language=javascript>history.go(-2)</script>")
    Else
        Response.Write ("<script language=javascript>location='" & goourl &"'</script>")
    End If
    Response.End()
End Function
'-------------------------------------------------
'描述: 关闭数据库连接
'语法: ConnClose()
'-------------------------------------------------
Sub ConnClose()
	On Error Resume Next
	oConn.Close
	Set oConn = Nothing
	If Err Then Exit Sub
End Sub
'-----------------------------------------
'描述: 时间格式转换
'-----------------------------------------
Function GetCount2(i)
   GetCount2 = Replace(Space(2-Len(i)), " ", "0") & i
End Function
Function FormatTime(DateTime,Format) 
  select case Format
	case "1"
    FormatTime=""&year(DateTime)&"年"&month(DateTime)&"月"&day(DateTime)&"日"
	case "2"
    FormatTime=""&month(DateTime)&"月"&day(DateTime)&"日"
	case "3" 
    FormatTime=""&year(DateTime)&"-"&GetCount2(month(DateTime))&"-"&GetCount2(day(DateTime))&""
	case "4"
    FormatTime=""&GetCount2(month(DateTime))&"-"&GetCount2(day(DateTime))&""
case Else
FormatTime=DateTime
end select
End Function
'=================================================
'搜索带红色
'=================================================
Function ADDRED(AAA,BBB)
	ADDRED = replace(AAA, BBB, "<font color=red>"&BBB&"</font>")
End Function
'=================================================
'今日时间红色
'=================================================
Function REDTIME(AAA)
If FormatTime(AAA,3)=FormatTime(Now(),3) Then
response.write "<font color=red>"&FormatTime(AAA,3)&"</font>"
Else
response.write "<font color=#4B628C>"&FormatTime(AAA,3)&"</font>"
End If
End Function
'=================================================
'大类菜单名称
'=================================================
Function MENUNAME(aaa)
If aaa ="" Then
Response.Write "所有分类"
else
	Dim oRsme,sqlme
	sqlme= "Select TOP 1 Id,MenuTitle FROM [LstMenuBig] where Id= "&aaa
	Set oRsme= Server.CreateObject("ADODB.Recordset")
	oRsme.open sqlme,oconn,1,1
	if oRsme.eof and oRsme.bof Then
		Response.Write "无此分类"
	Else
		Response.write ""&oRsme(1)&""
	End if
	oRsme.close
	set oRsme=Nothing
End If
end Function
'=================================================
'小类菜单名称
'=================================================
Function MENUNAMESS(aaa)
If aaa ="" Then
Response.Write "所有分类"
else
	Dim oRsme,sqlme
	sqlme= "Select TOP 1 Id,MenuTitle FROM [LstMenuSmall] where Id= "&aaa
	Set oRsme= Server.CreateObject("ADODB.Recordset")
	oRsme.open sqlme,oconn,1,1
	if oRsme.eof and oRsme.bof Then
		Response.Write "无此分类"
	Else
		Response.write ""&oRsme(1)&""
	End if
	oRsme.close
	set oRsme=Nothing
End If
end Function
'=================================================
'小类循环地图
'=================================================
Function MENUMAP(aaa)
	If aaa ="" Then
else
	Dim oRsme,sqlme
	sqlme= "Select Id,MenuTitle,MenuId FROM [LstMenuSmall] where MenuId= "&aaa&" order  by MenuIndex asc,  id asc"
	Set oRsme= Server.CreateObject("ADODB.Recordset")
	oRsme.open sqlme,oconn,1,1
	if oRsme.eof and oRsme.bof Then
	Else
		do while not oRsme.eof
		If ishtml=1 Then
			Response.write "<a href=/Html/category/"&oRsme(2)&"_"&oRsme(0)&".html>"&oRsme(1)&"</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "
		Else 
			Response.write "<a href=/Lstalone.asp?TT="&oRsme(2)&"&SS="&oRsme(0)&">"&oRsme(1)&"</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "
		End If
		oRsme.movenext
		loop
	End if
	oRsme.close
	set oRsme=Nothing
End If
end Function
'=================================================
'广告位置
'=================================================
Function BANNERSS(aaa)
If aaa ="" Then
	Response.Write "--"
else
	Dim oRsme,sqlme
	sqlme= "Select TOP 1 Id,Bimg,Burl,Bwidth,Bheight FROM [Lstbanner] where Id= "&aaa
	Set oRsme= Server.CreateObject("ADODB.Recordset")
	oRsme.open sqlme,oconn,1,1
	if oRsme.eof and oRsme.bof Then
		Response.Write "--"
	Else
		Response.write "<a target=_blank href="&oRsme(2)&"><img src="&oRsme(1)&" width="&oRsme(3)&" height="&oRsme(4)&" border=""0""></a>"
	End if
	oRsme.close
	set oRsme=Nothing
End If
end Function
'=================================================
'首页小类循环
'=================================================
Function IndexSmall(aaa)
	If aaa ="" Then
else
	Dim oRsme,sqlme
	sqlme= "Select top 8 Id,MenuTitle,MenuId FROM [LstMenuSmall] where MenuId= "&aaa&" order  by MenuIndex asc,  id asc"
	Set oRsme= Server.CreateObject("ADODB.Recordset")
	oRsme.open sqlme,oconn,1,1
	if oRsme.eof and oRsme.bof Then
	Else
		do while not oRsme.eof
		If ishtml=1 Then
			Response.write "<a href=/Html/category/"&oRsme(2)&"_"&oRsme(0)&".html>"&Left(oRsme(1),4)&"</a>&ensp;&ensp;"
		Else 
			Response.write "<a href=/Lstalone.asp?TT="&oRsme(2)&"&SS="&oRsme(0)&">"&Left(oRsme(1),4)&"</a>&ensp;&ensp;"
		End If
		oRsme.movenext
		loop
	End if
	oRsme.close
	set oRsme=Nothing
End If
end Function
'=================================================
'新闻调用
'=================================================
Function LstNewslst(aaa,ccc)
If ccc ="" Then
	Response.Write "<li>·参数调用错误,没有合适的参数.</li>"
ElseIf ccc < 1 Or ccc > 20 Then
	Response.Write "<li>·最多读取1-20条该类信息.</li>"
else
	Dim oRsli
	Set oRsli= Server.CreateObject("ADODB.Recordset")
	sSql= "Select TOP "&ccc&" Id,PTitle,PBID,PSID,Phymoney,Phits FROM [LstNewsInfo] where PBId ="&aaa&" order by Pindex desc,Id desc"
	oRsli.open sSql,oconn,1,1
	if oRsli.eof and oRsli.bof Then
			Response.Write "<li>·暂无任何信息.</li>"
	Else
			Do While Not oRsli.eof
					If ishtml=1 Then
					Response.write "<li>·<a title="""&oRsli(1)&""" href='/Html/Info/"&oRsli(2)&"_"&oRsli(3)&"/"&oRsli(0)&".html'>"&Left(oRsli(1),18)&"..</a></li>"
					Else 
					Response.write "<li>·<a title="""&oRsli(1)&""" href='/LstInfo.asp?TT="&oRsli(2)&"&SS="&oRsli(3)&"&Id="&oRsli(0)&"'>"&Left(oRsli(1),18)&"..</a></li>"
					End If
			oRsli.movenext 
			loop
	End if
	oRsli.close
	Set oRsli=Nothing
End If
End Function
'=================================================
'上一篇 下一篇
'=================================================
'定义一个nextrs函数来找出下一篇的ID   
function nextrss(beId)
Dim nextrs 
Set nextrs=server.CreateObject("adodb.recordset") 
sSql="select top 1 Id,PBId,PSId,PTitle from [LstNewsInfo] where Id>"&beId&" order by Id asc" 
nextrs.open sSql,oconn,1,1
if nextrs.eof then 
response.Write "<span class=f12>没了...</span> " 
else 
If ishtml=1 Then
response.Write "<a href='/Html/Info/"&nextrs(1)&"_"&nextrs(2)&"/"&nextrs(0)&".html'>"&nextrs(3)&"</a> " 
Else
response.Write "<a href='/LstInfo.asp?TT="&nextrs(1)&"&SS="&nextrs(2)&"&Id="&nextrs(0)&"'>"&nextrs(3)&"</a> " 
End If
end If 
nextrs.close 
end function  

'定义一个backrs函数来找出上一篇的ID 
Function backrss(beId2) 
dim backrs
Set backrs=server.CreateObject("adodb.recordset") 
sSql="select top 1 Id,PBId,PSId,PTitle from [LstNewsInfo] where Id < "&beId2&" order by Id desc" 
backrs.open sSql,oconn,1,1
if backrs.eof then 
response.Write "<span class=f12>没了...</span> "
else 
If ishtml=1 Then
response.Write "<a href='/Html/Info/"&backrs(1)&"_"&backrs(2)&"/"&backrs(0)&".html'>"&backrs(3)&"</a> "  
Else
response.Write "<a href='/LstInfo.asp?TT="&backrs(1)&"&SS="&backrs(2)&"&Id="&backrs(0)&"'>"&backrs(3)&"</a> " 
End If
end If 
backrs.close 
end Function
'=================================================
'生成订单号
'=================================================
function getOrdernum()
        dim yyear,mmonth,dday,min,hou,miao,ordernum
        yyear=year(now())
        mmonth=month(now())
        dday=day(now())
		hou=hour(now())
		min=minute(now())
		miao=second(now())
        if mmonth<10 then
            mmonth="0" & mmonth
        end if 
        if dday<10 then
            dday="0" & dday
        end if 
        ordernum= yyear & mmonth & dday & hou & min & miao
        getOrdernum=ordernum        '返回订单编号
end Function
Dim OrderNumber
OrderNumber = getOrdernum()
'=================================================
'用户名称
'=================================================
Function USERNAME(aaa)
If aaa ="" Then
	Response.Write "--"
else
	Dim oRsme,sqlme
	sqlme= "Select TOP 1 Id,UsrName FROM [LstUser] where Id= "&aaa
	Set oRsme= Server.CreateObject("ADODB.Recordset")
	oRsme.open sqlme,oconn,1,1
	if oRsme.eof and oRsme.bof Then
		Response.Write "--"
	Else
		Response.write ""&oRsme(1)&""
	End if
	oRsme.close
	set oRsme=Nothing
End If
end Function
'=================================================
'处理结果
'=================================================
Function CHULINNN(lev) 
	select case lev
	case "0"
	CHULINNN="<b class=fred>暂未处理</b>"
	case "1"
	CHULINNN="<b class=fblue>已经处理</b>"
	case "2"
	CHULINNN="<del><b>无效订单</b></del>"
	case "3"
	CHULINNN="<b class=fhui>缺货中..</b>"
	case Else
end select
End Function
'=================================================
'菜单类型
'=================================================
Function MENUTYPE(aaa)
If aaa ="" Then
	MENUTYPE = -1
else
	Dim oRsme,sqlme
	sqlme= "Select TOP 1 Id,MenuType FROM [LstMenuSmall] where Id= "&aaa
	Set oRsme= Server.CreateObject("ADODB.Recordset")
	oRsme.open sqlme,oconn,1,1
	if oRsme.eof and oRsme.bof Then
		MENUTYPE = -1
	Else
		MENUTYPE = oRsme(1)
	End if
	oRsme.close
	set oRsme=Nothing
End If
end Function
'=================================================
'线路详情
'=================================================
Function ROADXXQQ(aaa,bbb)
If aaa ="" Then
	Response.Write "--"
else
	Dim oRsme,sqlme
	sqlme= "Select TOP 1 Id,lvXianlu,lvXingch,lvYuding,lvFuwu,lvYouqing,lvYouQT FROM [LstRoad] where NewsId= "&aaa
	Set oRsme= Server.CreateObject("ADODB.Recordset")
	oRsme.open sqlme,oconn,1,1
	if oRsme.eof and oRsme.bof Then
		Response.Write "--"
	ElseIf bbb=1 Then 
		Response.write ""&oRsme(1)&""
	ElseIf bbb=2 Then 
		Response.write ""&oRsme(2)&""
	ElseIf bbb=3 Then 
		Response.write ""&oRsme(3)&""
	ElseIf bbb=4 Then 
		Response.write ""&oRsme(4)&""
	ElseIf bbb=5 Then 
		Response.write ""&oRsme(5)&""
	ElseIf bbb=6 Then 
		Response.write ""&oRsme(6)&""
	End if
	oRsme.close
	set oRsme=Nothing
End If
end Function
'=================================================
'线路或标题名称
'=================================================
Function NEWSNAME(aaa)
If aaa ="" Then
Response.Write "所有分类"
else
	Dim oRsme,sqlme
	sqlme= "Select TOP 1 Id,PBId,PSId,PTitle FROM [LstNewsInfo] where Id= "&aaa
	Set oRsme= Server.CreateObject("ADODB.Recordset")
	oRsme.open sqlme,oconn,1,1
	if oRsme.eof and oRsme.bof Then
		Response.Write "无此分类"
	Else
		Response.write "<a target=_blank href=LstInfo.asp?TT="&oRsme(1)&"&SS="&oRsme(2)&"&Id="&oRsme(0)&">"&Left(oRsme(3),10)&"..</a>"
	End if
	oRsme.close
	set oRsme=Nothing
End If
end Function
'=================================================
'房间名称
'=================================================
Function FANGNAME(aaa)
If aaa ="" Then
	Response.Write ""
else
	Dim oRsme,sqlme
	sqlme= "Select TOP 1 Id,roomTitle FROM [LstRoom] where Id= "&aaa
	Set oRsme= Server.CreateObject("ADODB.Recordset")
	oRsme.open sqlme,oconn,1,1
	if oRsme.eof and oRsme.bof Then
		Response.Write "..."
	Else
		Response.write ""&Left(oRsme(1),10)&".."
	End if
	oRsme.close
	set oRsme=Nothing
End If
end Function
'=================================================
'线路星级
'=================================================
Function XLSTAR(lev) 
	XLSTAR = "<img src=/images/Star"&lev&".gif>"
End Function
'=========================2015年重新修复=============
'=================================================
'首页线路调用PIC
'=================================================
Function Lstroad6pic(aaa)
If aaa ="" Then
	Response.Write "<li>·参数调用错误,没有合适的参数.</li>"
else
	Dim oRsli
	Set oRsli= Server.CreateObject("ADODB.Recordset")
	sSql= "Select TOP 8 Id,PTitle,PBID,PSID,Phymoney,Pscmoney,PSmallPic FROM [LstNewsInfo] where PBId ="&aaa&" and instr(Plabel,'首页')>0 order by Pindex desc,Id desc"
	oRsli.open sSql,oconn,1,1
	if oRsli.eof and oRsli.bof Then
			Response.Write "<li>·暂无任何信息.</li>"
	Else
			Do While Not oRsli.eof

			If sLoad=1 Then 

					If ishtml=1 Then
					Response.write "<li class=""animate"">"
					Response.write "	<div class=""fl img""><a href='/Html/Info/"&oRsli(2)&"_"&oRsli(3)&"/"&oRsli(0)&".html'><img src=""images/loading.gif"" class=""lazy"" data-original='"&oRsli(6)&"' class=""img""></a></div>"
					Response.write "	<div class=""fl end"">"
					Response.write "		<div class=""fr htxt"">"&oRsli(1)&"..</div>"
					Response.write "		<div class=""fl money"">"&IndexMoneyInfo(oRsli(4))&"<div class=""fr sheng"">"&IndexMoneysheng(oRsli(5)-oRsli(4))&"</div></div>"
					Response.write "	</div>"
					Response.write "</li>"
					Else
					Response.write "<li class=""animate"">"
					Response.write "	<div class=""fl img""><a href='/LstInfo.asp?TT="&oRsli(2)&"&SS="&oRsli(3)&"&Id="&oRsli(0)&"'><img src=""images/loading.gif"" class=""lazy"" data-original='"&oRsli(6)&"' class=""img""></a></div>"
					Response.write "	<div class=""fl end"">"
					Response.write "		<div class=""fr htxt"">"&oRsli(1)&"..</div>"
					Response.write "		<div class=""fl money"">"&IndexMoneyInfo(oRsli(4))&"<div class=""fr sheng"">"&IndexMoneysheng(oRsli(5)-oRsli(4))&"</div></div>"
					Response.write "	</div>"
					Response.write "</li>"
					End If
			Else 
				
					If ishtml=1 Then
					Response.write "<li class=""animate"">"
					Response.write "	<div class=""fl img""><a href='/Html/Info/"&oRsli(2)&"_"&oRsli(3)&"/"&oRsli(0)&".html'><img class=""lazy"" src='"&oRsli(6)&"' class=""img""></a></div>"
					Response.write "	<div class=""fl end"">"
					Response.write "		<div class=""fr htxt"">"&oRsli(1)&"..</div>"
					Response.write "		<div class=""fl money"">"&IndexMoneyInfo(oRsli(4))&"<div class=""fr sheng"">"&IndexMoneysheng(oRsli(5)-oRsli(4))&"</div></div>"
					Response.write "	</div>"
					Response.write "</li>"
					Else
					Response.write "<li class=""animate"">"
					Response.write "	<div class=""fl img""><a href='/LstInfo.asp?TT="&oRsli(2)&"&SS="&oRsli(3)&"&Id="&oRsli(0)&"'><img class=""lazy"" src='"&oRsli(6)&"' class=""img""></a></div>"
					Response.write "	<div class=""fl end"">"
					Response.write "		<div class=""fr htxt"">"&oRsli(1)&"..</div>"
					Response.write "		<div class=""fl money"">"&IndexMoneyInfo(oRsli(4))&"<div class=""fr sheng"">"&IndexMoneysheng(oRsli(5)-oRsli(4))&"</div></div>"
					Response.write "	</div>"
					Response.write "</li>"
					End If

			End If
			oRsli.movenext 
			loop
	End if
	oRsli.close
	Set oRsli=Nothing
End If
End Function
'=================================================
'首页热门线路
'=================================================
Function Lstroad7hot(aaa)
If aaa ="" Then
	Response.Write "<li>·参数调用错误,没有合适的参数.</li>"
else
	Dim oRsli
	Set oRsli= Server.CreateObject("ADODB.Recordset")
	sSql= "Select TOP 7 Id,PTitle,PBID,PSID,Phymoney,Pscmoney FROM [LstNewsInfo] where PBId = "&aaa&" order by phits desc,Pindex desc,Id desc"
	oRsli.open sSql,oconn,1,1
	if oRsli.eof and oRsli.bof Then
			Response.Write "<li>·暂无任何信息.</li>"
	Else
			Do While Not oRsli.eof
					If ishtml=1 Then
					Response.write "<li>"
					Response.write "<div class=""stitle""><a title="""&oRsli(1)&""" href='/Html/Info/"&oRsli(2)&"_"&oRsli(3)&"/"&oRsli(0)&".html'>"&oRsli(1)&"</a></div>"
					Response.write "<div class=""fl money"">"&IndexMoneyInfo12(oRsli(4))&"</div>"
					Response.write "</li>"
					Else
					Response.write "<li>"
					Response.write "<div class=""stitle""><a title="""&oRsli(1)&""" href='/LstInfo.asp?TT="&oRsli(2)&"&SS="&oRsli(3)&"&Id="&oRsli(0)&"'>"&oRsli(1)&"</a></div>"
					Response.write "<div class=""fl money"">"&IndexMoneyInfo12(oRsli(4))&"</div>"
					Response.write "</li>"
					End If
			oRsli.movenext 
			loop
	End if
	oRsli.close
	Set oRsli=Nothing
End If
End Function

Function IndexMoneyInfo(s)
If s<1 Then
	IndexMoneyInfo = "<b class=""f14"">￥</b>0"&s&"<b class=""f14""> 元起</b>"
Else 
	IndexMoneyInfo = "<b class=""f14"">￥</b>"&s&"<b class=""f14"">.00 元起</b>"
End If
End Function

Function IndexMoneyInfo12(s)
If s<1 Then
	IndexMoneyInfo12 = "<b class=""f12"">￥</b>0"&s&"<b class=""f14""> 元起</b>"
Else 
	IndexMoneyInfo12 = "<b class=""f12"">￥</b>"&s&"<b class=""f14"">.00 元起</b>"
End If
End Function

Function IndexMoneysheng(s)
If s<1 Then
	IndexMoneysheng = "<b class=""f14"">￥</b>0"&s&""
Else 
	IndexMoneysheng = "<b class=""f14"">￥</b>"&s&""
End If
End Function
'=================================================
'内页小类
'=================================================
Function MENU2LST(aaa)
	If aaa ="" Then
else
	Dim oRsme,sqlme
	sqlme= "Select Id,MenuTitle,MenuId,MenuType,MenuUrl FROM [LstMenuSmall] where MenuId= "&aaa&" order by MenuIndex asc, id asc"
	Set oRsme= Server.CreateObject("ADODB.Recordset")
	oRsme.open sqlme,oconn,1,1
	if oRsme.eof and oRsme.bof Then
	Else
		do while not oRsme.eof
		If oRsme(3)=6 Then
			Response.write "<a target=_blank href="&oRsme(4)&">"&oRsme(1)&"</a>&ensp;&ensp;"
		Else
			If ishtml=1 Then
			Response.write "<a href=/Html/category/"&oRsme(2)&"_"&oRsme(0)&".html>"&oRsme(1)&"</a>&ensp;&ensp;"
			Else 
			Response.write "<a href=/Lstalone.asp?TT="&oRsme(2)&"&SS="&oRsme(0)&">"&oRsme(1)&"</a>&ensp;&ensp;"
			End If
		End If
		oRsme.movenext
		loop
	End if
	oRsme.close
	set oRsme=Nothing
End If
end Function
'=================================================
'内页列表页循环
'=================================================
Function LstNewsClass(aaa)
If aaa ="" Then
else
	Dim oRsli
	Set oRsli= Server.CreateObject("ADODB.Recordset")
	sSql= "Select TOP 10 Id,PTitle,PBID,PSID,Phymoney,Pscmoney,PAddtime FROM [LstNewsInfo] where PSId ="&aaa&" order by PTop desc,Pindex desc,Id desc"
	oRsli.open sSql,oconn,1,1
	if oRsli.eof and oRsli.bof Then
	Else
			k=1
			Do While Not oRsli.eof
				If ishtml=1 Then
					If k Mod 2=0 Then 
					Response.write "<li class='hover'>"
					Else
					Response.write "<li>"
					End If
				Response.write "	<div class=""fl"">·<a href='/Html/Info/"&oRsli(2)&"_"&oRsli(3)&"/"&oRsli(0)&".html'>"&oRsli(1)&"</a></div>"
				Response.write "	<div class=""fr"">"&FormatTime(oRsli("PAddtime"),4)&"&nbsp;&nbsp;</div>"
				Response.write "</li>"
				Else
					If k Mod 2=0 Then 
					Response.write "<li class='hover'>"
					Else
					Response.write "<li>"
					End If
				Response.write "	<div class=""fl"">·<a href='/LstInfo.asp?TT="&oRsli(2)&"&SS="&oRsli(3)&"&Id="&oRsli(0)&"'>"&oRsli(1)&"</a></div>"
				Response.write "	<div class=""fr"">"&FormatTime(oRsli("PAddtime"),4)&"&nbsp;&nbsp;</div>"
				Response.write "</li>"
				End If
			oRsli.movenext 
			k=k+1
			loop
	End if
	oRsli.close
	Set oRsli=Nothing
End If
End Function
'=================================================
'内页列表页循环
'=================================================
Function LstRaodPic(aaa)
If aaa ="" Then
else
	Dim oRsli
	Set oRsli= Server.CreateObject("ADODB.Recordset")
	sSql= "Select TOP 8 Id,PTitle,PBID,PSID,Phymoney,Pscmoney,PSmallPic FROM [LstNewsInfo] where PSId ="&aaa&" order by PTop desc,Pindex desc,Id desc"
	oRsli.open sSql,oconn,1,1
	if oRsli.eof and oRsli.bof Then
	Else
			Do While Not oRsli.eof
				If sLoad=1 Then
					If ishtml=1 Then
					Response.write "<li class=""animate"">"
					Response.write "	<div class=""fl img""><a href='/Html/Info/"&oRsli(2)&"_"&oRsli(3)&"/"&oRsli(0)&".html'><img src=""images/loading.gif"" class=""lazy"" data-original='"&oRsli(6)&"' class=""img""></a></div>"
					Response.write "	<div class=""fl end"">"
					Response.write "		<div class=""fr htxt"">"&oRsli(1)&"..</div>"
					Response.write "		<div class=""fl money"">"&IndexMoneyInfo(oRsli(4))&"<div class=""fr sheng"">"&IndexMoneysheng(oRsli(5)-oRsli(4))&"</div></div>"
					Response.write "	</div>"
					Response.write "</li>"
					Else
					Response.write "<li class=""animate"">"
					Response.write "	<div class=""fl img""><a href='/LstInfo.asp?TT="&oRsli(2)&"&SS="&oRsli(3)&"&Id="&oRsli(0)&"'><img src=""images/loading.gif"" class=""lazy"" data-original='"&oRsli(6)&"' class=""img""></a></div>"
					Response.write "	<div class=""fl end"">"
					Response.write "		<div class=""fr htxt"">"&oRsli(1)&"..</div>"
					Response.write "		<div class=""fl money"">"&IndexMoneyInfo(oRsli(4))&"<div class=""fr sheng"">"&IndexMoneysheng(oRsli(5)-oRsli(4))&"</div></div>"
					Response.write "	</div>"
					Response.write "</li>"
					End If
				Else 

					If ishtml=1 Then
					Response.write "<li class=""animate"">"
					Response.write "	<div class=""fl img""><a href='/Html/Info/"&oRsli(2)&"_"&oRsli(3)&"/"&oRsli(0)&".html'><img class=""lazy"" src='"&oRsli(6)&"' class=""img""></a></div>"
					Response.write "	<div class=""fl end"">"
					Response.write "		<div class=""fr htxt"">"&oRsli(1)&"..</div>"
					Response.write "		<div class=""fl money"">"&IndexMoneyInfo(oRsli(4))&"<div class=""fr sheng"">"&IndexMoneysheng(oRsli(5)-oRsli(4))&"</div></div>"
					Response.write "	</div>"
					Response.write "</li>"
					Else
					Response.write "<li class=""animate"">"
					Response.write "	<div class=""fl img""><a href='/LstInfo.asp?TT="&oRsli(2)&"&SS="&oRsli(3)&"&Id="&oRsli(0)&"'><img class=""lazy"" src='"&oRsli(6)&"' class=""img""></a></div>"
					Response.write "	<div class=""fl end"">"
					Response.write "		<div class=""fr htxt"">"&oRsli(1)&"..</div>"
					Response.write "		<div class=""fl money"">"&IndexMoneyInfo(oRsli(4))&"<div class=""fr sheng"">"&IndexMoneysheng(oRsli(5)-oRsli(4))&"</div></div>"
					Response.write "	</div>"
					Response.write "</li>"
					End If

				End If 

			oRsli.movenext 
			loop
	End if
	oRsli.close
	Set oRsli=Nothing
End If
End Function
'=================================================
'新闻调用
'=================================================
Function LstNewslstsmall(aaa,ccc)
If ccc ="" Then
	Response.Write "参数调用错误"
ElseIf ccc < 1 Or ccc > 20 Then
	Response.Write "最多读取1-20条该类信息"
else
	Dim oRsli
	Set oRsli= Server.CreateObject("ADODB.Recordset")
	sSql= "Select TOP "&ccc&" Id,PTitle,PBID,PSID,Phymoney,Phits FROM [LstNewsInfo] where PSId ="&aaa&" order by Pindex desc,Id desc"
	oRsli.open sSql,oconn,1,1
	if oRsli.eof and oRsli.bof Then
			Response.Write "·暂无任何信息"
	Else
			Do While Not oRsli.eof
					If ishtml=1 Then
					Response.write "<a title="""&oRsli(1)&""" href='/Html/Info/"&oRsli(2)&"_"&oRsli(3)&"/"&oRsli(0)&".html'>"&Left(oRsli(1),18)&"</a>"
					Else 
					Response.write "<a title="""&oRsli(1)&""" href='/LstInfo.asp?TT="&oRsli(2)&"&SS="&oRsli(3)&"&Id="&oRsli(0)&"'>"&Left(oRsli(1),18)&"</a>"
					End If
			oRsli.movenext 
			loop
	End if
	oRsli.close
	Set oRsli=Nothing
End If
End Function
'=================================================
'分页函数PageNum(每页显示条数),PageClose(关闭数据),PageUrl(翻页)
'=================================================
Sub PageNum(nber)
	page = request("page")						'page的传递参数
	total=oRs.recordcount 						'读取信息数目
	oRs.PageSize=nber							'设置页码 
	pagecount=oRs.PageCount 					'获取总页码 
	page=int(page)								'接收页码 
	if page<=0 then page=1						'判断页码
	oRs.AbsolutePage=page 						'本页页码
	mypage = total-(page-1)*oRs.PageSize
	If mypage > oRs.PageSize Then
	mypage = oRs.PageSize
	Else
	mypage = total-(page-1)*oRs.PageSize
	End If
End Sub
'=================================================
Sub PageUrl(purl,nber)
	If page<=0 Then page=1
	response.write "<form action='' method=get><input name='TT' value='"&TT&"' type='hidden'><input name='SS' value='"&SS&"' type='hidden'><input name='a' value='"&a&"' type='hidden'>"
	response.write "<div class=""fl GzPagel m10"">"
	response.write "<span>共<b>"&total&"</b>条</span><span>分<b>"&pagecount&"</b>页</span><span>每页<b>"&nber&"</b>条</span><span>第<b>"&page&"</b>页</span>"
	response.write "<span>关键字：<input class=""key"" type=""text"" value="""" name=""keyword"" size=""8""></span><span><input class=""key"" type=""submit"" value=""搜索"" size=""3""></span></div>"
	response.write "</form><div class=""fr GzPage m10"">"
	response.write"<span><a href='"&purl&"&page="&page-1&"'><</a></span>"
	If pagecount<=3 Then 
		response.write"<span><a href='"&purl&"&page=1'>1</a></span><span><a href='"&purl&"&page=2'>2</a></span><span><a href='"&purl&"&page=3'>3</a></span>"
	Else
		If page=1 Or page=2 Then 
			response.write"<span><a href='"&purl&"&page=1'>1</a></span><span><a href='"&purl&"&page=2'>2</a></span><span><a href='"&purl&"&page=3'>3</a></span>"	
		Else
			If page>=pagecount Then
				For i=pagecount-2 To pagecount 
					response.write"<span><a href='"&purl&"&page="&i&"'>"&i&"</a></span>"
				Next
			Else
				For i=page-2 To page 
					response.write"<span><a href='"&purl&"&page="&i&"'>"&i&"</a></span>"
				Next
			End If
		End If
		response.write"<span>...</span>"
		If page=1 Or page=2 Then
			For i=pagecount-2 To pagecount 
					response.write"<span><a href='"&purl&"&page="&i&"'>"&i&"</a></span>"
			Next
		Else
			If page>=pagecount Then
				response.write"<span><a href='"&purl&"&page="&pagecount&"'>"&pagecount&"</a></span>"
			Else
				For i=page To page+2 
					response.write"<span><a href='"&purl&"&page="&i&"'>"&i&"</a></span>"
				Next
			End If
		End If
	End If
	response.write"<span><a href='"&purl&"&page="&page+1&"'>></a></span>"
	response.write"</div>"
End Sub
'=================================================
'分页函数Showpage
'=================================================
Sub ShowHtml(purl,nber)
	response.write "<div class='showpage'>"
	response.write "共:<span class='bred'>"&total&"</span> 条,分:<span class='bred'>"&pagecount&"</span> 页,每页:<span class='bred'>"&nber&"</span> 条,当前页:第 <span class='bred'>"&page&"</span> 页 ,"
	if page=1 and not page=pagecount then
	response.write "首页,上页,<a href='"&purl&"_"&page+1&".html'>下页</a>,<a href='"&purl&"_"&pagecount&".html'>末页</a>,"
	elseif page<>1 and not page=pagcount then
	response.write"<a href='"&purl&"_1.html'>首页</a>,<a href='"&purl&"_"&page-1&".html'>上页</a>,"
	If page=pagecount Then
	response.write"下页,末页,"
	Else
	response.write"<a href='"&purl&"_"&page+1&".html'>下页</a>,<a href='"&purl&"_"&pagecount&".html'>末页</a>,"
	End If
	End If
	response.write"<select name='sel_page' class='select' onchange='javascript:location=this.options[this.selectedIndex].value;'>"
	for j=1 to pagecount
	If page=j Then
	response.write"<option selected value='"&purl&"_"&j&".html'>"&j&"</option>"
	else
	response.write"<option value='"&purl&"_"&j&".html'>"&j&"</option>"
	end if
	next
	response.write"</select>"
	response.write"</div>"

	If page<=0 Then page=1
	response.write "<form action='' method=get><input name='TT' value='"&TT&"' type='hidden'><input name='SS' value='"&SS&"' type='hidden'><input name='a' value='"&a&"' type='hidden'>"
	response.write "<div class=""fl GzPagel m10"">"
	response.write "<span>共<b>"&total&"</b>条</span><span>分<b>"&pagecount&"</b>页</span><span>每页<b>"&nber&"</b>条</span><span>第<b>"&page&"</b>页</span>"
	response.write "<span>关键字：<input class=""key"" type=""text"" value="""" name=""keyword"" size=""8""></span><span><input class=""key"" type=""submit"" value=""搜索"" size=""3""></span></div>"
	response.write "</form><div class=""fr GzPage m10"">"
	response.write"<span><a href='"&purl&"_"&page-1&".html'><</a></span>"
	If pagecount<=3 Then 
		response.write"<span><a href='"&purl&"_1.html'>1</a></span><span><a href='"&purl&"_2.html'>2</a></span><span><a href='"&purl&"_3.html'>3</a></span>"
	Else
		If page=1 Or page=2 Then 
			response.write"<span><a href='"&purl&"_1.html'>1</a></span><span><a href='"&purl&"_2.html'>2</a></span><span><a href='"&purl&"_3.html'>3</a></span>"	
		Else
			If page>=pagecount Then
				For i=pagecount-2 To pagecount 
					response.write"<span><a href='"&purl&"_"&i&".html'>"&i&"</a></span>"
				Next
			Else
				For i=page-2 To page 
					response.write"<span><a href='"&purl&"_"&i&".html'>"&i&"</a></span>"
				Next
			End If
		End If
		response.write"<span>...</span>"
		If page=1 Or page=2 Then
			For i=pagecount-2 To pagecount 
					response.write"<span><a href='"&purl&"_"&i&".html'>"&i&"</a></span>"
			Next
		Else
			If page>=pagecount Then
				response.write"<span><a href='"&purl&"_"&pagecount&".html'>"&pagecount&"</a></span>"
			Else
				For i=page To page+2 
					response.write"<span><a href='"&purl&"_"&i&".html'>"&i&"</a></span>"
				Next
			End If
		End If
	End If
	response.write"<span><a href='"&purl&"_"&page+1&".html'>></a></span>"
	response.write"</div>"
End Sub
'=================================================
'是否登陆
'=================================================
Function MYUSERINFO(AAA,BBB)
	If AAA="" Then 
		MYUSERINFO="" 
	Else 
		If BBB=1 Then 
			MYUSERINFO=Uid("UserTel")
		ElseIf BBB=2 Then 
			MYUSERINFO=Uid("UserName")
		ElseIf BBB=3 Then 
			MYUSERINFO=Uid("UserAddress")
		ElseIf BBB=4 Then 
			MYUSERINFO=Uid("UserQQ")
		Else 
			MYUSERINFO="没有赋值"
		End If
	End If
End Function
Function FAHUO(xxx) 
	select case xxx
		case "0"
		FAHUO="暂未处理"
		case "1"
		FAHUO="正在服务"
		case "2"
		FAHUO="无效订单"
		case "3"
		FAHUO="退款订单"
		case "9"
		FAHUO="完成订单"
		case Else
	end select
End Function
%>
