<!-- #include file="../inc/301.asp" -->
<!-- #include file="../inc/conn.asp" -->
<!-- #include file="../inc/other.asp" -->
<%
ida=Request.ServerVariables("QUERY_STRING")
pd=instr(ida,"+")
if pd>0 then
ida=Request.ServerVariables("QUERY_STRING")
id1=replace(ida,".html","")
if instr(id1,"+")>0 then
id2=split(id1,"+")
id=id2(0)
pa=id2(1)
else
id=id1
end if
set rs=server.createobject("adodb.recordset")
sql="select top 1 al_name,al_id,al_description,al_keywords from web_Album where al_id="&id&""
rs.open(sql),conn,1,1
xc_id=rs("al_id")
xc_name=rs("al_name")
xc_description=rs("al_description")
xc_keywords=rs("al_keywords")
rs.close
set rs=nothing
%>

<% 
else
ida=Request.ServerVariables("QUERY_STRING")
if ida="" then
ida=4
end if
id1=replace(ida,".html","")
if instr(id1,"-")>0 then
id2=split(id1,"-")
id=id2(0)
pa=id2(1)
else
id=id1
end if

set rs=server.createobject("adodb.recordset")
sql="select n_name,n_description,n_keywords from Web_Navigation where n_id="&id&""
rs.open(sql),conn,1,1
xc_name=rs("n_name")
xc_description=rs("n_description")
xc_keywords=rs("n_keywords")
rs.close
set rs=nothing
end if
%>
<%
if ( xc_name="关于" or xc_name="链接" or xc_name="分类" or xc_name="留言" ) then
Response.Status = "404 Not Found" 
Response.End 
end if
%>

<%
if pa="" then
yema=""
else
yema=" - 第"&Pa&"页"
end if
idss=4
%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<title><%=xc_name%><%=yema%> - <%=web_name%></title>
<meta name="keywords" content="<%=xc_keywords%>" />
<meta name="description" content="<%=xc_description%>" />
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- #include file="../Config/css.asp" -->
</head>

<body>
 <!-- #include file="../Config/head.asp" -->

     
    <!-- Page Content
    ================================================== --> 
    <div class="row">

        <!-- Gallery Items
        ================================================== --> 
        <div class="span12 gallery">

            <ul class="gallery-cats clearfix">
<li><a href="/Album" class="all">所有相片</a></li>	        	 
<% 
set rs=server.createobject("adodb.recordset")
sql="select al_id,al_name from web_Album "
rs.open(sql),conn,1,1
If rs.bof And rs.eof Then
response.write "暂时没有任何相册。"
response.end
end if
do while not rs.eof
al_id=rs("al_id")
al_name=rs("al_name")
%> 
<li><a href="/Album/?<%=al_id%>+1.html" class="all"><%=al_name%></a> </li>

 
<%
rs.movenext
loop
rs.close
set rs=nothing
%>	
            </ul>

            <div class="row clearfix">
                <ul class="gallery-post-grid holder">
<%
if pd>0 then
al_cha="and al_id="&xc_id&""

else
al_cha=""
end if
set rs=server.createobject("adodb.recordset")
sql="select im_id,im_name,im_image,im_description,im_time from web_images where view_yes=1 "&al_cha&" order by im_id desc"
rs.open(sql),conn,1,1
If rs.bof And rs.eof Then
response.write "本相册暂时没有任何图片。"
response.end
end if
rs.pagesize=12 '每页记录条数
Page=""&pa&"" '将URL参数curpage传给curpage变量
if Page="" then Page=1
rs.absolutepage=Page '将本页设为curpage设置的页数
for t= 1 to rs.pagesize
if rs.eof then
exit for
end if
im_id=rs("im_id")
im_name=rs("im_name")
im_image=rs("im_image")
im_description=rs("im_description")
im_time=rs("im_time")
a=a+1
%> 
<%
TimeDifference = DateDiff("s", im_time, Now)
if datediff("d",im_time,date)=0 then
ti="今天 " &formatdatetime(im_time,4)
elseif datediff("d",im_time,date)=1 then
ti="昨天 "&formatdatetime(im_time,4)
elseif datediff("d",im_time,date)=2 then
ti="前天 "&formatdatetime(im_time,4)
elseif datediff("d",im_time,date)< 8 then
ti=datediff("d",im_time,date)&"天前 "&formatdatetime(im_time,4)
else
ti=formatdatetime(im_time,2)
end if
%>
                    <!-- Gallery Item 1 -->
                    <li class="span3 gallery-item" data-id="id-<%=a%>" data-type="all">
                        <span class="gallery-hover-4col hidden-phone hidden-tablet">
                            <span class="gallery-icons">
							
                                <a href="../photos/<%=im_image%>" class="item-zoom-link lightbox" title="<%=im_description%>" data-rel="prettyPhoto"></a>
                                <a href="/Picture/?<%=im_id%>.html" class="item-details-link"></a>                            </span>                        </span>
                        <a href="/Picture/?<%=im_id%>.html">
                        <%if web_simg=1 then %>
                        <img src="../img.asp?path=<%=replace(im_image,"..", "")%>&Width=270&Height=220" alt="<%=im_name%>" title="<%=im_name%>" />
                        <%else%>
                        <img src="../photos/<%=im_image%>" alt="<%=im_name%>" title="<%=im_name%>" style="width:270px;height:220px;" />
                        <%end if%>
                        </a>
						
                        <span class="project-details"><a href="/Picture/?<%=im_id%>.html"><%=im_name%></a><%=left(im_description,10)%>... &nbsp;&nbsp;&nbsp;<%=ti%>&nbsp;<%=formatdatetime(im_time,4)%></span>                    </li>
<%
rs.movenext
next
%>
<%
if pd>0 then
fenye="?"&id&"+"
else
fenye="?"&id&"-"
end if
%>

                </ul>
            </div>
<div class="pagination">
<div class="post-summary-footer">
<ul class="post-data">
<li ><a>第 <%=Page%> - <%=rs.pagecount%> 页</a> <a>共 <%=rs.recordcount%> 条</a></li>
</ul>
</div>
<ul>
                
<%if Page=1 then%>
<li class="active">
<a>首页</a>
</li>
<%else%>
<li >
<a href="<%=fenye%>1.html">首页</a>
</li>
<%end if%>
                
<%if Page=1 then%>
<li class="active">
<a>上一页</a>
</li>
<%else%>
<li >
<a href="<%=fenye%><%=Page-1%>.html">上一页</a>
</li>
<%end if%>

<%if rs.pagecount<Page+1 then%>
<li class="active">
<a>下一页</a>
</li>
<%else%>
<li >
<a href="<%=fenye%><%=Page+1%>.html">下一页</a>
</li>
<%end if%>
 
<%if rs.pagecount<Page+1 then%>
<li class="active">
<a>尾页</a>
</li>
<%else%>
<li >
<a href="<%=fenye%><%=rs.pagecount%>.html">尾页</a>
</li>
<%end if%>
</ul>
<%
rs.close
set rs=nothing
 %>
</div>



        </div><!-- End gallery list-->

    </div><!-- End container row -->
    
    </div> <!-- End Container -->

    <!-- Footer Area
        ================================================== -->
<!-- #include file="../Config/foot.asp" -->
    
</body>
</html>
<!-- #include file="../inc/close.asp" -->