📄 lbbs_pic.asp
字号:
topleft.style.display="";
botleft.style.display="";
topright.style.display="none";
botright.style.display="none";
}
pltsTipLayer.style.left=MouseX+pltsoffsetX+document.body.scrollLeft+popLeftAdjust;
pltsTipLayer.style.top=MouseY+pltsoffsetY+document.body.scrollTop+popTopAdjust;
return true;
}
pltsinits();
<%end if%>
//-----------------------------------------
//-->
</script>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0" style="font-size: 9pt">
<table border="1" width="100%" style="border-collapse: collapse" bordercolor="#99CCFF" cellpadding="2" cellspacing="1" background="images/BG.gif">
<%if c_showtop="YES" then '显示LOGO等头部%>
<tr>
<td width="100%">
<%if c_logo<>"" then%>
<div style="float: left;height:71px;">
<a href="?action=admin"><img border="0" src="<%=c_logo%>" width="172" height="70"></a>
</div>
<%end If
if c_logotxt<>"" then%>
<div style="float: left;width:173px;height:71px;vertical-align:middle;margin-left: 10px;margin-top: 10px;"><%=c_logotxt%>
</div>
<%end If
if c_banner<>"" then%>
<div style="float: left;height:71px;margin-left: 10px; margin-top: 10px;"><%=c_banner%>
</div>
<%end If%>
</td>
</tr>
<%end if%>
<tr class="topbg">
<td class="style2">
<%response.write "<a href='"&c_HomeUrl&"' title='"&c_HomeName&"'><u>"&c_HomeName&"</u></a>" '首页链接%> <font color="#000000"><b><%=c_title%></b></font>
</td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" Class="border">
<%If admin_login=True Then%>
<tr class="topbg">
<td colspan=2 class="style5" style="height: 28px">
【 管理员<B><%=Session("lbbs_pic_UserName")%></B>已登录 <A HREF='?action=logout' class='style4'><U>退出</U></A> 】
<font color=#0000FF><B>|</B></font>
<a href="?action=admin">系统设置</a>
<font color=#0000FF><B>|</B></font>
<a href="?forder=<%=forder%>&action=nodelpic&page=<%=picPage%>">浏览图片</a> |
<a href="?forder=<%=forder%>&action=upload">上传文件</a> |
<a href="?forder=<%=forder%>&action=smallpic&page=<%=picPage%>">生成缩图</a> |
<a href="?forder=<%=forder%>&action=delsmallpic&page=<%=picPage%>">删除缩图</a> |
<a href="?forder=<%=forder%>&action=delpic&page=<%=picPage%>">删除文件</a>
<font color=#0000FF><B>|</B></font>
<a href="?forder=<%=forder%>&action=adddir">创建目录</a> |
<a href="?forder=<%=forder%>&action=moddir">修改目录</a> |
<a href="?forder=<%=forder%>&action=deldir">删除目录</a>
<font color=#0000FF><B>|</B></font>
</td>
</tr>
<%
End if
'==========================================
If not IsObjInstalled("Scripting.FileSystemObject") Then
Response.Write "<b><font color=red>你的服务器不支持 FSO(Scripting.FileSystemObject)! 不能显示文件</font></b>"
Else
set fso=CreateObject("Scripting.FileSystemObject")
Select Case Action
Case "admin"
'管理设置
call admin()
Case "adminsave"
'保存设置
call adminsave()
Case "login"
'管理登录
call adminlogin()
Case "logincheck"
'检查登录
call logincheck()
Case "logout"
'退出登录
call adminlogout()
Case "delpic"
'显示删除选项
Call admincheck() '登录检测
Session("lbbs_pic_show")="delpic"
response.redirect (JoinChar(c_picurl)&"page="&picPage)
Case "delsmallpic"
'显示删除选项
Call admincheck() '登录检测
Session("lbbs_pic_show")="delsmallpic"
response.redirect (JoinChar(c_picurl)&"page="&picPage)
Case "smallpic"
'显示生成缩图选项
Call admincheck() '登录检测
Session("lbbs_pic_show")="smallpic"
response.redirect (JoinChar(c_picurl)&"page="&picPage)
Case "nodelpic"
'不显示删除选项
Session("lbbs_pic_show")=""
response.redirect (JoinChar(c_picurl)&"page="&picPage)
Case "small"
'选中文件生成缩图
call smallFiles()
Case "del"
'删除选中文件
call DelFiles()
Case "delall"
'删除当前目录所有文件
call DelAll()
Case "moddir"
'修改目录
call Moddir()
Case "moddirsave"
'保存修改的目录
call Moddirsave()
Case "adddir"
'创建新目录
call adddir()
Case "adddirsave"
'保存新创建的目录
call adddirsave()
Case "deldir"
'创建新目录
call deldir()
Case "deldirsave"
'保存新创建的目录
call deldirsave()
Case "upload"
'上传文件选择
call upload()
Case "uploadsave"
'处理上传文件
call uploadsave()
Case Else
'浏览图片
call showpic()
end Select
set fso = Nothing
%>
</table>
<%
call copyright() '版本信息
end If
'========================================
'========================================
'浏览图片
Sub showpic()
%>
<%If Session("lbbs_pic_show")="smallpic" then '【生成缩略图】的标题行%>
<tr>
<td colspan="2" bgcolor="#4ACCDB" height="25">
<p><b>生成缩略图<font color="#FFFFFF">(生成缩略图的AspJpeg组件<%ShowObjectInstalled("Persits.Jpeg")%>,缩略图文件名以“</font><font color="#FFFF00">_[small]</font><font color="#FFFFFF">”结尾)</font></b></p></td>
</tr>
<%
end if
If Session("lbbs_pic_show")="delpic" then '【删除文件】的标题行
%>
<tr>
<td colspan="2" bgcolor="#FF9966" height="25">
<p align="left"><b>删除文件<font color="#FFFFFF">(请慎重使用:文件一旦删除,将不可恢复。)</font></b></p></td>
</tr>
<%end if
If Session("lbbs_pic_show")="delsmallpic" then '【删除缩略图】的标题行
%>
<tr>
<td colspan="2" bgcolor="#FFCCCC" height="25">
<p align="left"><b>删除缩略图</b></p></td>
</tr>
<%end if%>
<tr class="tdbg">
<!--左则目录栏开始-->
<td rowspan="3" valign="top" style="word-break:break-all;" style="table-layout:fixed" <%If c_search<>"YES" Then response.write("width='"&con_filelbtablew&"'") Else response.write("width='200'")%>>
<%
If c_search="YES" then
'--搜索功能开始--------------
%>
<TABLE width="200">
<form method="POST" action="<%=JoinChar(c_picurl)%>action_search=search" name="Formsearch" onSubmit="return CheckForm_search(this)">
<tr class="tdbg">
<td>
搜索:<input type="text" name="search_key" style="border: 1px solid #C0C0C0; width: 150;height:20;color:#FF0000" title="输入搜索关键字!" value="<%=search_key%>"><span class="style3">
<BR><input type="radio" value="<%=c_UploadDirg%>" name="search_path" <%If forder=LCase(c_UploadDirg) Then response.write"checked"%>>全站
<input type="radio" value="<%=forder%>" name="search_path" <%If search_path<>c_UploadDirg And search_path=forder Then response.write"checked"%>>当前目录以下
<input type="submit" value="搜索" name="search">
</td>
</tr>
</form>
</TABLE>
<hr color="#FFFFFF" size="1" width="100%">
<%
End if
'--搜索功能结束----------------
%>
<a title='返回总目录' href='<%=picurl%>'><img alt='' border='0' src='images/alllist.gif' width='16' height='16'>总目录</a><br>
<%
if forder<>c_UploadDirg Then
response.write"<a title='↑向上…上层目录' href='?forder="&upforder&"&search_path="&upforder&"&search_key="&search_key&"'><img alt='' border='0' src='images/up.gif' width='16' height='16'>上层目录"
If search_key<>"" then
response.write"<font color=#FF9900>查["&search_key&"]</font>"
End If
response.write"</a><BR>"
End If
Response.write (ShowFolderList(TruePath))'左侧目录文件列表
'以下表格用于保证左则目录栏的最小宽度
If c_search<>"YES" then
Response.write ("<TABLE width='"&con_filelbtablew&"'><tr class=tdbg><td> </td></tr></TABLE>")
End if
%>
</td>
<!--左则目录栏结束-->
<!--右则列图栏开始-->
<td height="24">
转到目录:<select size="1" name="forder" onchange="javascript:window.location='?forder='+this.options[this.selectedIndex].value;">
<option value="" style="COLOR: #808000" selected>--请选择图片目录--</option>
<option value="">·总目录--</option>
<% call bl(0,"·",c_UploadDirg) '遍历站点所有文件夹作为下拉列表 %>
</select>
当前位置:<A HREF="?forder=<%=forder%>"><font color='#0000ff'><U><%=replace(replace(forder,".",""),c_UploadDirg,"总目录")%></U></font></A>
</td>
</tr>
<%
'--自定义图片张数尺寸开始
If c_cook = "YES" Then
%>
<form method="POST" action="<%=JoinChar(c_picurl)%>action_cook=cookies">
<tr class="tdbg">
<td height="30" valign="top">
<p align="left">
自定义:<span class="style3">每页图片数</span><input type="text" name="cook_MaxPerPage" size="5" value="<%=c_MaxPerPage%>" style="border: 1px solid #808000; width: 25px;" title="输入1-100之间的数字!(在总目录,图片按目录列表时无效)"><span class="style3">
每行图片数</span><input type="text" name="cook_Page" size="12" value="<%=c_Page%>" style="border: 1px solid #808000; width: 21px;" title="输入1-20之间的数字!">
图片宽<input type="text" name="cook_picwidth" size="10" value="<%=c_picwidth%>" style="border: 1px solid #808000; width: 42px;" title="输入20-800之间的数字!">
高<input type="text" name="cook_picheight" size="10" value="<%=c_picheight%>" style="border: 1px solid #808000; width: 39px;" title="输入20-800之间的数字!"></font>
<select size="1" name="CookieTime" class="input">
<option selected value="0">是否记忆</option>
<option value="1">记忆一天</option>
<option value="2">记忆一周</option>
<option value="3">记忆一月</option>
<option value="4">记忆一年</option>
</select>
<input type="submit" value="提交" name="B1">
<input type="button" value="恢复默认值" name="B3" onClick="window.location.href='<%=JoinChar(c_picurl)%>action_cook=con'">
</p>
</td>
</tr>
</form>
<%End If
'--自定义图片张数尺寸结束
'--图片列表区开始
%>
<tr class="tdbg">
<td height="30" valign="top">
<%
If forder=c_UploadDirg And c_showallpic="ALL" And c_homeshowpic="FENLEI" And Session("lbbs_pic_show")="" Then
call mlpic(forder,"NO",c_Page)'在首页时,按目录分类列表最新图片
Else
call main(forder,"YES",c_MaxPerPage)'最新图片不分类
End if
%>
</td>
</tr>
<%
'--图片列表区结束
End Sub
'========================================
'========================================
'遍历站点所有文件夹作为下拉列表
'i全角的空格 数
'sty符号
'strpath文件夹路径
function bl(i,sty,strpath)
Dim objfolder,objfile,newstrpath,picFile,pi,pi2,picExt,objsubfolder,search_pic
set objfolder=fso.getfolder(server.mappath(strpath))
for each objsubfolder in objfolder.subfolders
pi=0
pi2=0
For Each picFile In objsubfolder.Files
picExt=LCase(Right(Trim(picFile.name),3))
If instr(LCase(c_PicType),picExt)>0 And instr(LCase(picFile.name),"_[small]")=0 Then
pi=pi+1
ElseIf instr(LCase(c_TxtType),picExt)>0 And Session("lbbs_pic_show")<>"smallpic" then
pi2=pi2+1
End If
Next
If CInt(pi)>0 Then pi=" "&pi&"P" Else pi=""
If CInt(pi2)>0 Then pi2=" "&pi2&"F" Else pi2=""
Response.write ("<option value='" & strpath & "/"& objsubfolder.name & "'")
if forder=strpath& "/"& objsubfolder.name then
Response.write (" style='COLOR: #0000ff' selected ")
end If
Response.write (">"&string(i," ")&""& sty & objsubfolder.name & pi & pi2 &"</option>")
i=i+1
call bl(i+1," ",strpath & "/"& objsubfolder.name)
i=i-1
next
End function
'========================================
'========================================
'遍历当前目录下的所有文件夹的图片
'i全角的空格 数
'path-图片当前目录
'showpage-显示上下一页的链接(YES:显示,NO:不显示)
'number-图片数
sub mlpic(path,showpage,number)
Dim objfolder,objsubfolder,path2,i
number=4
c_picwidth=170
c_picheight=150
set objfolder=fso.getfolder(server.mappath(path))
for each objsubfolder in objfolder.subfolders
path2=path&"/"&objsubfolder.name
response.write"<TABLE width='100%' cellspacing=0 cellpadding=0 border=1 style='border-collapse: collapse' bordercolor='#9393FF'><TR><TD bgcolor='#BBBBFF' height='25' >"
response.write" <a href='?forder="&path&"/"&objsubfolder.name&"'><B>"&replace(replace(path&"/"&objsubfolder.name,".",""),c_UploadDirg,"子目录")&"</B> <U>更多>></U></a>"
response.write"</TD></TR><tr><td>"
call main(path2,showpage,number)
response.write"</TD></TR>"
response.write"<table width=100% height='2'><tr><td></td></tr></table>"
Next
c_homeshowpic="ONE"
c_showallpic="NO"
response.write"<TABLE width='100%' cellspacing=0 cellpadding=0 border=1 style='border-collapse: collapse' bordercolor='#808000'><TR><TD bgcolor='#B5B564' height='25'>"
response.write" <a href='?forder="&path&"&search_scope=one'><B>当前目录</B> <U>更多>></U></a>"
response.write"</TD></TR><TR><TD>"
call main(path,showpage,number)
response.write"</TD></TR></TABLE>"
response.write"<table width=100% height='2'><tr><td></td></tr></table>"
set objfolder=Nothing
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -