複製代碼代碼如下:
<%
'+-----------------------------------+
'|變量設置
'+-----------------------------------+
cTitle="所有上傳圖片(注:以下為圖片文件夾下面所有圖片,並非全部為有效圖片!)"'名字
cPicType="jpeg,jpg,gif,png,bmp"'圖片類型(使用","將圖片格式分開)
cHeight=120'縮圖高度
cWidth=120'縮圖寬度
cEachLineMax=5'每行顯示圖片數
cEachPageMax=20'每頁顯示圖片數目
pic_path="/uploadpic/"'設定圖片所在路徑
'+-----------------------------------+
'|定義函數
'+-----------------------------------+
FunctiongetExt(name)
getExt=right(name,3)
EndFunction
FunctionisPIC(fileName,picType)
ext=getExt(fileName)
isPIC=False
typeList=split(picType,",")
Forii=LBound(typeList)ToUBound(typeList)
IfUCase(ext)=UCase(typeList(ii))Then
isPIC=True
ExitFor
EndIf
Next
EndFunction
FunctionpageBar(page,pageTotal)
response.Write"[<AHREF="&Request.ServerVariables("SCRIPT_NAME")&"?page="&(page-1)&"title=上一頁>上一頁</A>]"
response.Write"<AHREF="&Request.ServerVariables("SCRIPT_NAME")&"?page=1title=首頁><<</A>"
i=pageStart
Dowhilei<page
response.Write"<AHREF="&Request.ServerVariables("SCRIPT_NAME")&"?page="&i&"title=""第"&i&"頁"">["&i&"]</A>"
i=i+1