Function prev_pic(Url,Id)
Sql="Select Top 1 * From young Where Id>"&id&" Order By Id Asc "
Call Opendb()
Set Rs0=Conn.Execute(Sql)
If Not Rs0.Eof Then
Response.Write("<a href="&url&"?Id="&Rs0(0)&" Class=tomg ><img src=pic/pre.gif border=0 /></a><div></div><a href="&url&"?Id="&Rs0(0)&" Class=tomg><img src="&Rs0(1)&" Width=110 /></a><br>"&Left(Rs0(4),5))
Else
Response.write("沒有了<br><img src=pic/pre.gif border=0 />")
End If
Rs0.close
Set Rs0=nothing
End Function
Function Next_pic(Url,id)
Sql="Select Top 1 * From young Where Id<"&id&" Order By Id Desc "
Call Opendb()
Set Rs1=Conn.Execute(Sql)
If Not Rs1.Eof Then
Response.Write("<a href="&url&"?Id="&Rs1(0)&" Class=tomg ><img src=pic/next.gif border=0 /></a><div></div><a href="&url&"?Id="&Rs1(0)&" Class=tomg><img src="&Rs1(1)&" Width=60 /></a><br>"&Left(Rs1(4),5))
Else
Response.write("沒有了<br><img src=pic/next.gif border=0 />")
End If
Rs1.close
Set Rs1=nothing
End Function