📄 adminbd2.asp
字号:
iii=PageCount+5
if ii < 1 then
ii=1
end if
if iii > TotalPage then
iii=TotalPage
end if
if PageCount > 6 then
Response.Write " <a href=?topage=1&bd="&bd&"&totable="&totable&"&action=recycle><font color=yellow>1</font></a> ... "
end if
for i=ii to iii
If i<>PageCount then
Response.Write " <a href=?topage="& i &"&bd="&bd&"&totable="&totable&"&action=recycle><font color=yellow>" & i & "</font></a> "
else
Response.Write " <font color=red><b>"&i&"</b></font> "
end if
next
if TotalPage > PageCount+5 then
Response.Write " ... <a href=?topage="&TotalPage&"&bd="&bd&"&totable="&totable&"&action=recycle><font color=yellow>"&TotalPage&"</font></a>"
end if
response.write" ]</font></b></TD><form name=form method='POST' action=javascript:Check()><TD height=2 align='right'><font color="&c3&">页码:<input style=FONT-SIZE:9pt maxLength='6' size='6' name='topage' value='"&PageCount&"'><input style=FONT-SIZE:9pt value='GO!' type='submit'></font></TD></form></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>"&tbottom&""
case"delbbsgg"
dim delidsql,delbidsql
delbbsid=replace(","&request.form("delbbsid"),"'","")
delbbsid=split(delbbsid,",")
baction=replace(request.form("action"),"'","")
'============================================================================================
if baction=" 删除所选 " then
''''''''''''''''''''''''''''''''''''''''''''''''''''''''
if topictype=1 or topictype="" then
for i=1 to ubound(delbbsid)-1
delidsql=delidsql&"id="&delbbsid(i)&" or "
delbidsql=delbidsql&"bid="&delbbsid(i)&" or "
next
delidsql=delidsql&"id="&delbbsid(ubound(delbbsid))
delbidsql=delbidsql&"bid="&delbbsid(ubound(delbbsid))
if delidsql="id=" then delidsql="id=-1"
if delbidsql="bid=" then delbidsql="bid=-1"
sql1="delete*from topic where type=3 and bd="&bd&" and ("&delidsql&")"
sql2="delete*from bbs"&totable&" where (type=3 and bd="&bd&" and ("&delidsql&")) or ("&delbidsql&")"
conn.execute(sql1)
conn.execute(sql2)
end if
'''''''''''''''''''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''
if topictype=2 then
for i=1 to ubound(delbbsid)-1
delidsql=delidsql&"bbsid="&delbbsid(i)&" or "
next
delidsql=delidsql&"bbsid="&delbbsid(ubound(delbbsid))
if delidsql="bbsid=" then delidsql="bbsid=-1"
sql1="delete*from bbs"&totable&" where type=3 and bd="&bd&" and ("&delidsql&")"
conn.execute(sql1)
end if
''''''''''''''''''''''''''''''''''''
response.redirect "adminbd2.asp?bd="&bd&"&totable="&totable&"&action=recycle&topictype="&topictype&""
end if
'=================================================================================================
'=================================================================================================
if baction=" 还原所选 " then
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
if topictype=1 or topictype="" then
for i=1 to ubound(delbbsid)-1
delidsql=delidsql&"id="&delbbsid(i)&" or "
next
delidsql=delidsql&"id="&delbbsid(ubound(delbbsid))
if delidsql="id=" then delidsql="id=-1"
sql1="update topic set type=0 where bd="&bd&" and ("&delidsql&")"
sql2="update bbs"&totable&" set type=0 where bd="&bd&" and ("&delidsql&")"
conn.execute(sql1)
conn.execute(sql2)
end if
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
if topictype=2 then
for i=1 to ubound(delbbsid)-1
delidsql=delidsql&"bbsid="&delbbsid(i)&" or "
next
delidsql=delidsql&"bbsid="&delbbsid(ubound(delbbsid))
if delidsql="bbsid=" then delidsql="bbsid=-1"
sql1="update bbs"&totable&" set type=0 where bd="&bd&" and ("&delidsql&")"
conn.execute(sql1)
end if
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
response.redirect "adminbd2.asp?bd="&bd&"&totable="&totable&"&action=recycle&topictype="&topictype&""
end if
'=================================================================================================
%>
<%'空间函数
Sub ShowSpaceInfo(drvpath)
dim fso,d,size,showsize
set fso=server.createobject("scripting.filesystemobject")
drvpath=server.mappath(drvpath)
set d=fso.getfolder(drvpath)
size=d.size
showsize=size & " Byte"
if size>1024 then
size=(size\1024)
showsize=size & " KB"
end if
if size>1024 then
size=(size/1024)
showsize=formatnumber(size,2) & " MB"
end if
if size>1024 then
size=(size/1024)
showsize=formatnumber(size,2) & " GB"
end if
response.write "<font face=verdana>" & showsize & "</font>"
End Sub
Sub Showspecialspaceinfo(method)
dim fso,d,fc,f1,size,showsize,drvpath
set fso=server.createobject("scripting.filesystemobject")
drvpath=server.mappath("pic")
drvpath=left(drvpath,(instrrev(drvpath,"\")-1))
set d=fso.getfolder(drvpath)
if method="All" then
size=d.size
elseif method="Program" then
set fc=d.Files
for each f1 in fc
size=size+f1.size
next
end if
showsize=size & " Byte"
if size>1024 then
size=(size\1024)
showsize=size & " KB"
end if
if size>1024 then
size=(size/1024)
showsize=formatnumber(size,2) & " MB"
end if
if size>1024 then
size=(size/1024)
showsize=formatnumber(size,2) & " GB"
end if
response.write "<font face=verdana>" & showsize & "</font>"
end sub
Function Drawbar(drvpath)
dim fso,drvpathroot,d,size,totalsize,barsize
set fso=server.createobject("scripting.filesystemobject")
drvpathroot=server.mappath("pic")
drvpathroot=left(drvpathroot,(instrrev(drvpathroot,"\")-1))
set d=fso.getfolder(drvpathroot)
totalsize=d.size
drvpath=server.mappath(drvpath)
set d=fso.getfolder(drvpath)
size=d.size
barsize=cint((size/totalsize)*400)
Drawbar=barsize
End Function
Function Drawspecialbar()
dim fso,drvpathroot,d,fc,f1,size,totalsize,barsize
set fso=server.createobject("scripting.filesystemobject")
drvpathroot=server.mappath("pic")
drvpathroot=left(drvpathroot,(instrrev(drvpathroot,"\")-1))
set d=fso.getfolder(drvpathroot)
totalsize=d.size
set fc=d.files
for each f1 in fc
size=size+f1.size
next
barsize=cint((size/totalsize)*400)
Drawspecialbar=barsize
End Function%>
<%case"spacesize"
on error resume next%>
<div align="center">
<table border="1" cellspacing="1" cellpadding="5" height="1" width="<%=tbw%>" bordercolor="#cad6eb"><tr><td><blockquote><br>
数据库总占用空间:<img src="pic/bar.gif" width=<%=drawbar("data")%> height=10> <%showSpaceinfo("data")%><br><br>
程序文件占用空间:<img src="pic/bar.gif" width=<%=drawspecialbar%> height=10> <%showSpecialSpaceinfo("Program")%><br><br>
头像目录占用空间:<img src="pic/bar.gif" width=<%=drawbar("headpic")%> height=10> <%showSpaceinfo("headpic")%><br><br>
images总占用空间:<img src="pic/bar.gif" width=<%=drawbar("images")%> height=10> <%showSpaceinfo("images")%><br><br>
图片目录占用空间:<img src="pic/bar.gif" width=<%=drawbar("pic")%> height=10> <%showSpaceinfo("pic")%><br><br>
插件目录占用空间:<img src="pic/bar.gif" width=<%=drawbar("plus")%> height=10> <%showSpaceinfo("plus")%><br><br>
上传文件占用空间:<img src="pic/bar.gif" width=<%=drawbar("upload")%> height=10> <%showSpaceinfo("upload")%><br><br>
inc 目录占用空间:<img src="pic/bar.gif" width=<%=drawbar("inc")%> height=10> <%showSpaceinfo("inc")%><br><br>
论坛占用空间总计:<img src="pic/voteline.gif" width=250 height=10> <%showspecialspaceinfo("All")%>
</blockquote></td></tr></table></div>
<%end select
call down%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -