<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
fpath="pic/"
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
set objfolder=objFSO.getfolder(server.mappath(fpath))
picArr=""
picbegin=""
pageSize=20
page=request("page")
If page="" Then page=1
picbegin=(page-1)*pageSize
for each objfile in objfolder.files
If picArr="" then
picArr=objfile.name&"$"&objfile.DateLastModified
Else
picArr=picArr&"|"&objfile.name&"$"&objfile.DateLastModified
End If
next
set objfolder=nothing
picArr=Split(picArr,"|")
picnum=UBound(picArr)+1
Dim short
for i=0 To UBound(picArr)
For m=i To UBound(picArr)
If CDate(Split(picArr(i),"$")(1))<CDate(Split(picArr(m),"$")(1)) Then
short=picArr(i)
picArr(i)=picArr(m)
picArr(m)=short
End if
next
next
If picnum<pageSize Then
pageCount=1
Else
pageCount=Int(picnum/pageSize)
If picnum Mod pageSize >0 Then pageCount=pageCount+1
End If
thispageend=picbegin+pageSize -1
If thispageend>=picnum Then thispageend=picnum-1
img_html = ""
For i=picbegin To thispageend
img_html = img_html + "<li><a href='pic/"&Split(picArr(i),"$")(0)&"' target=_blank><img src='pic/"&Split(picArr(i),"$")(0)&"' /></a><br><span class=title>"&Split(Split(picArr(i),"$")(0),".")(0)&"</span><br><span class=date>"&Split(picArr(i),"$")(1)&"</span></li>"
Next
page_html = "当前:第<font color=red><b>"&page&"</b></font>页 第"
For i=1 To pageCount
page_html = page_html + " <a href='?page="&i&"'>"&i&"</a> "
Next
page_html = page_html + "页 共计<font color=red><b>"&pageCount&"</b></font>页"
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Img</title>
<style>
body,td,th {
/*文字大小*/
font-size: 16px;
/*文字颜色*/
color: #2E2E2E;
/*文字行距*/
line-height: 20px;
}
a:link {
text-decoration: none;
color: #000000;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
color: #FF6600;
}
ul {margin:0; padding:0; list-style:none;}
li {float:left; width:180px; overflow:hidden; text-align:center; margin:10px 6px 6px 6px}
.title{ line-height:28px}
.date {color:#666}
li img{border:#999 1px solid; width:178px; height:133px; }
div.page {padding:0 6px}
div.page a{ border:1px #F90 solid; padding:0 2px}
</style>
</head>
<body>
<ul><%=img_html%></ul>
<div style="clear: both; text-align:center; padding:0 20px"><hr /></div>
<div class="page"><%=page_html%></div>
</body>
</html> 热门文章更多>>
标签更多>>
专题更多>>
最新文章更多>>
- 团队城市未满足要求:MSBuildTools12.0_x86_Path 存在
- 使用 MSBuild.exe 在发布模式下构建 C# 解决方案
- 当我发布 Web 应用程序时,AfterPublish 脚本不运行
- 构建时 T4 转换的产品仅在下一个构建中使用
- ASP.NET Core Application (.NET Framework) for Windows x64 only error in project.assets.json
- 新的 .csproj 格式 - 如何将整个目录指定为“链接文件"到子目录?
- 如何将条件编译符号(DefineConstants)传递给 msbuild
- MSBuild 支持 Visual Studio 2017 RTM 中的 T4 模板
- NuGet 包还原找不到包,没有源
- 使用 C# 6.0 功能运行 TFS 构建
风清花香