<% id = Left(Trim(Request.QueryString("id")),5) If id = "" or isNumeric(id) = False Then Response.Write("

对不起,没有相关内容

") Response.end() End If pid = Left(Trim(Request.QueryString("pid")),6) If pid = "" or isNumeric(pid) = False Then pid = 0 End If ku = Left(Trim(Request.QueryString("ku")),3) If ku = "" or isNumeric(ku) = False Then ku = 1 End If startingPage = Left(Trim(Request.QueryString("p")),5) If startingPage = "" or isNumeric(startingPage) = False Then startingPage = 0 End If Call opendb() set rs = server.createobject("adodb.recordset") sql = "select * from [zhfc] where id="& id rs.open sql,conn,1,1 If not rs.eof Then tit = rs("tit") content = rs("content") adddate = formarDate(rs("adddate")) Else Response.Write("

对不起,没有相关内容

") Response.End() End If rs.close '获取当前图片 If pid > 0 Then sql = "select * from [zhfc_pho] where id="& pid Else sql = "select top 1 * from [zhfc_pho] where zid="& id &" order by px asc,id asc" End If rs.open sql,conn,1,1 If not rs.eof Then thdId = rs("id") thdPic = rs("pic") thdTit = rs("tit") thdPx = rs("px") Else Response.Write("

对不起,没有相关内容

") rs.close set rs = nothing Call closedb() Response.End() End If rs.close '获取位次 tmp = "" sql = "select id from [zhfc_pho] where zid="& id &" order by px asc,id asc" rs.open sql,conn,1,1 If not rs.eof Then zs = rs.recordCount Do while not rs.eof tmp = tmp & rs("id") & "," rs.MoveNext Loop If right(tmp,1) = "," Then tmp = Left(tmp,Len(tmp)-1) End If tmp1 = split(tmp,",") For i = 0 to Ubound(tmp1) If cstr(thdId) = tmp1(i) Then thidSe = i + 1 End If Next Else Response.Write("

对不起,没有相关内容

") rs.close set rs = nothing Call closedb() Response.End() End If rs.close '获取"上一条"id If thidSe = 1 Then sytid = tmp1(Ubound(tmp1)) Else sql = "select top 1 * from [zhfc_pho] where zid="& id &" and px < "& thdPx &" order by px desc,id asc" rs.open sql,conn,1,1 If not rs.eof Then sytid = rs("id") Else sytid = 0 ku = 1 End If rs.close End If '获取"下一条"id sql = "select top 1 * from [zhfc_pho] where zid="& id &" and px > "& thdPx &" order by px asc,id asc" rs.open sql,conn,1,1 If not rs.eof Then xytid = rs("id") Else xytid = 0 ku = 1 End If rs.close '获取列表 sql = "select top 6 id,pic,tit from [zhfc_pho] where zid="& id &" order by px asc,id asc" rs.open sql,conn,1,1 If not rs.eof Then Else Response.Write("

对不起,没有相关内容

") rs.close set rs = nothing Call closedb() Response.End() End If %>
<% Response.Write thidSe %> / <% Response.Write zs %>

<% Response.Write tit %>

日期:<% Response.Write adddate %>    查看原图   
<% response.write thdTit %>









 
内容简介

<% Response.Write content %>
<% rs.close set rs = nothing conn.execute("Update [zhfc] set click=click+1 where id="& id) Call closedb() %>