<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% Const NumPerPage=6 '20 Const footer=5 id=CheckNum(Request.QueryString("id")) ConnectionDatabase if id>0 then set rs_dir=conn.execute("select dir_name,path_name from photo_dir where dir_id="&id) if not rs_dir.eof then path_name=rs_dir("path_name") dir_name=rs_dir("dir_name") end if set rs_dir=nothing title=dir_name else title="Gallery" end if %> <%=title%> - Liming Video
<%=title%>
<% dim where_dir,rs,rs_dir where_dir="dir_id="&id num=conn.execute("select count(post_id) from photo where "&where_dir)(0) pagenum=(num-1)\NumPerPage+1 if pagenum<1 then pagenum=1 page=Request.QueryString("page") if page-1<=0 then page=1 if page-pagenum>0 then page=pagenum num_now=NumPerPage if page-pagenum=0 then num_now=num-NumPerPage*(pagenum-1) if num>0 then 'begin set rs=conn.execute("select * from (select top "&num_now&" * from photo where (post_id <= (select max(post_id) from (select top "&NumPerPage*Page&" post_id from photo where "&where_dir&" order by post_id) as temp)) and "&where_dir&" order by post_id desc) order by post_id") while not rs.eof Response.Write("
    "&vbcrlf) for i=1 to 3 alt_text=trim(rs("post_text")) if len(alt_text)=0 then alt_text=rs("post_title") alt_text=replace(alt_text,"""","'") Response.Write("
  • "&vbcrlf) Response.Write("
    "&vbcrlf) Response.Write("

    "&rs("post_title")&"

    "&vbcrlf) Response.Write("
  • "&vbcrlf) rs.movenext if rs.eof then exit for next Response.Write("
"&vbcrlf) wend set rs=nothing 'end end if %>
<%if page=1 then Response.Write("First") else Response.Write("First ") end if%>   <% for i=page-footer to page+footer if i<1 then i=1 if i-page=0 then Response.Write("["&i&"] ") else Response.Write("["&i&"] ") end if if i=pagenum then i=page+footer+1 next %>   <%if page=pagenum then Response.Write("Last") else Response.Write("Last") end if%>   Page <%=page%>/<%=pagenum%>   <%=num%> Photos in Total
Tel:   0086-371-67992899        Fax:   0086-371-67992699
Email:  info@limingco.com