⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin-gl1.asp

📁 一个小巧的论坛程序 本程序基本功能:  可开设任意数目的讨论区类别和版块 使用Cookies
💻 ASP
📖 第 1 页 / 共 2 页
字号:
set sb=myconn.execute("select bn,bdname from bdinfo where key<>'0' order by bn")
do while not sb.eof
snum=sb("bn")
bdname=kbbs(sb("bdname"))
allnum=0
for i=0 to tnum
bbsnum=myconn.execute("select count(bbsid) from bbs"&atb(i)&" where bd="&snum&"")(0)
allnum=int(allnum)+int(bbsnum)
next
myconn.execute("update bdinfo set bbsnum="&allnum&" where bn="&snum&" and key<>'0'")
response.write"整理版面 <b>"&bdname&"</b> 总帖数成功<br>"
sb.movenext
loop
sb.close
set sb=nothing
response.write"<br><br><a href=?menu=bbszl>>>>返回</a>"
%>
</blockquote>
<%case"bbs2"%>
<blockquote>
<hr color="<%=c1%>" size="1">正在进行整理………………<br><br>
<%
set rs=myconn.execute("select bn,bdname from bdinfo where key<>'0' order by bn")
do while not rs.eof
snum=rs("bn")
bdname=kbbs(rs("bdname"))

set newb=myconn.execute("select top 1 * from bbstl where bd="&snum&" order by id desc")
if newb.eof then
lastbbs=""
else
lastbbs=""&newb("name")&"|?|"&replace(left(newb("zhuti"),20),"'","''")&"|?|"&newb("riqi")&"|?|"&newb("id")&"|?|"&newb("face")&"|?|"&newb("totable")&""
end if
newb.close
set newb=nothing

myconn.execute("update bdinfo set lastbbs='"&lastbbs&"' where bn="&snum&" and key<>'0'")
response.write"整理版面 "&bdname&" 最新帖成功<br>"
rs.movenext
loop
rs.close
set rs=nothing
response.write"<br><br><a href=?menu=bbszl>>>>返回</a>"
%>
</blockquote>

<%case"user1"
cha=int(request.querystring("cha"))
lbid=int(request.querystring("lbid"))
if cha=0 then cha=99
if lbid=0 then lbid=1%>
<form method="POST" action="?menu=user11&lbid=<%=lbid%>&cha=<%=cha%>" ><%=t1%>用户帖数整理<%=t2&d1%>
请填写你要整理的用户的开始ID和结束ID:(两者之间不要相差太大)<br>你的论坛用户最大的 ID 为:<%=myconn.execute("select max(userid)from [user]")(0)%><br>初始ID:<input type="text" name="bid" size="20" value="<%=lbid%>"><BR>结束ID:<input type="text" name="eid" size="20" value="<%=lbid+cha%>"><BR>
  <input type="submit" value=" 提 交 " name="B1">
  <input type="reset" value=" 重 置 " name="B2"><%=d2%> </p>
</form>
<%case"user11"
bid=request.form("bid")
eid=request.form("eid")
lbid=int(eid)+1
cha=int(eid)-int(bid)
canzl=true
if bid="" or eid="" or not isnumeric(bid) or not isnumeric(eid) then 
canzl=false
elseif int(bid)=0 or int(eid)=0 or int(eid)<=int(bid) then
canzl=false
end if
if canzl=false then%><%=t1%>信息错误<%=t2&d1%>你填写的信息错误 ·<a href="javascript:history.go(-1)">返回</a>·<%=d2%>
<%response.end
end if%>
<blockquote>
<hr color="<%=c1%>" size="1">正在进行整理………………<br><br>
<%set rs=myconn.execute("select name from [user] where userid>="&int(bid)&" and userid<="&int(eid)&"")
if rs.eof then
response.write"在用户ID:"&bid&" 至 "&eid&" 之间没有用户,或者你已经全部整理成功<br>"
else
do while not rs.eof
name=rs("name")

allnum=0
for i=0 to tnum
bbsnum=myconn.execute("select count(bbsid) from bbs"&atb(i)&" where name='"&name&"'")(0)
allnum=int(allnum)+int(bbsnum)
next

myconn.execute("update user set bbsnum="&allnum&" where name='"&name&"'")
response.write""&kbbs(name)&" 有帖子 "&allnum&" 张,整理成功<br>"
rs.movenext
loop
end if
rs.close
set rs=nothing
response.write"<br><br>·<a href=?menu=user1&lbid="&lbid&"&cha="&cha&">>>>继续</a>·<a href=?menu=bbszl>>>>返回</a>·"
%>
</blockquote>
<%case"user2"%>
<blockquote>
<hr color="<%=c1%>" size="1">正在进行整理………………<br><br>
<%
myconn.execute("delete*from admin where not isnumeric(bd)")
myconn.execute("delete*from admin where bd<>'70767766' and int(bd) not in(select bn from bdinfo where key<>'0')")
response.write"整理成功<br><br>·<a href=?menu=bbszl>>>>返回</a>·"
%>
<%case"topic1"
cha=int(request.querystring("cha"))
lbid=int(request.querystring("lbid"))
if cha=0 then cha=99
if lbid=0 then lbid=1%>
<form method="POST" action="?menu=topic11&lbid=<%=lbid%>&cha=<%=cha%>" ><%=t1%>帖子回复数整理<%=t2&d1%>
请填写你要整理的帖子的开始ID和结束ID:(两者之间不要相差太大)<br>你的论坛帖子最大的 ID 为:<%=myconn.execute("select max(id)from bbstl")(0)%><br>初始ID:<input type="text" name="bid" size="20" value="<%=lbid%>"><BR>结束ID:<input type="text" name="eid" size="20" value="<%=lbid+cha%>"><BR>
  <input type="submit" value=" 提 交 " name="B1">
  <input type="reset" value=" 重 置 " name="B2"><%=d2%> </p>
</form>
<%case"topic2"
cha=int(request.querystring("cha"))
lbid=int(request.querystring("lbid"))
if cha=0 then cha=99
if lbid=0 then lbid=1%>
<form method="POST" action="?menu=topic22&lbid=<%=lbid%>&cha=<%=cha%>" ><%=t1%>帖子回复整理<%=t2&d1%>
请填写你要整理的帖子的开始ID和结束ID:(两者之间不要相差太大)<br>你的论坛帖子最大的 ID 为:<%=myconn.execute("select max(id)from bbstl")(0)%><br>初始ID:<input type="text" name="bid" size="20" value="<%=lbid%>"><BR>结束ID:<input type="text" name="eid" size="20" value="<%=lbid+cha%>"><BR>
  <input type="submit" value=" 提 交 " name="B1">
  <input type="reset" value=" 重 置 " name="B2"><%=d2%> </p>
</form>

<%case"topic11"
bid=request.form("bid")
eid=request.form("eid")
lbid=int(eid)+1
cha=int(eid)-int(bid)
canzl=true
if bid="" or eid="" or not isnumeric(bid) or not isnumeric(eid) then 
canzl=false
elseif int(bid)=0 or int(eid)=0 or int(eid)<=int(bid) then
canzl=false
end if
if canzl=false then%><%=t1%>信息错误<%=t2&d1%>你填写的信息错误 ·<a href="javascript:history.go(-1)">返回</a>·<%=d2%>
<%response.end
end if%>
<blockquote>
<hr color="<%=c1%>" size="1">正在进行整理………………<br><br>
<%set rs=myconn.execute("select id,totable from bbstl where id>="&int(bid)&" and id<="&int(eid)&"")
if rs.eof then
response.write"在ID:"&bid&" 至 "&eid&" 之间不存在帖子,或者你已经全部整理成功<br>"
else
do while not rs.eof
id=rs("id")
totab=int(rs("totable"))


allnum=myconn.execute("select count(bbsid) from bbs"&totab&" where bid="&id&"")(0)

myconn.execute("update bbs"&totab&" set bnum="&allnum&" where id="&id&"")
myconn.execute("update bbstl set bnum="&allnum&" where id="&id&"")
response.write"ID为"&id&" 的帖子 "&allnum&" 张回帖,整理成功<br>"
rs.movenext
loop
end if
rs.close
set rs=nothing
response.write"<br><br>·<a href=?menu=topic1&lbid="&lbid&"&cha="&cha&">>>>继续</a>·<a href=?menu=bbszl>>>>返回</a>·<p>&nbsp;</p>"
%>
<%case"topic22"
bid=request.form("bid")
eid=request.form("eid")
lbid=int(eid)+1
cha=int(eid)-int(bid)
canzl=true
if bid="" or eid="" or not isnumeric(bid) or not isnumeric(eid) then 
canzl=false
elseif int(bid)=0 or int(eid)=0 or int(eid)<=int(bid) then
canzl=false
end if
if canzl=false then%><%=t1%>信息错误<%=t2&d1%>你填写的信息错误 ·<a href="javascript:history.go(-1)">返回</a>·<%=d2%>
<%response.end
end if%>
<blockquote>
<hr color="<%=c1%>" size="1">正在进行整理………………<br><br>
<%
set rs=myconn.execute("select id,totable from bbstl where id>="&int(bid)&" and id<="&int(eid)&"")
if rs.eof then
response.write"在ID:"&bid&" 至 "&eid&" 之间不存在帖子,或者你已经全部整理成功<br>"
else
do while not rs.eof
id=rs("id")
totab=int(rs("totable"))

set lare=myconn.execute("select top 1 name,body from bbs"&totab&" where bid="&id&" order by bbsid desc")
if lare.eof then
set rs1=myconn.execute("select body from bbs"&totab&" where id="&id&"")
body1=left(rs1("body"),20)
name="——"
set rs1=nothing
else
name=lare("name")
body1=left(lare("body"),20)
end if
set lare=nothing
body1=replace(body1,"'","")
lastbbs1=""&name&"|?|"&body1&""
myconn.execute("update bbstl set lastre='"&lastbbs1&"' where id="&id&"")
response.write"ID为"&id&" 的帖子最后回帖,整理成功<br>"
rs.movenext
loop
end if
rs.close
set rs=nothing
response.write"<br><br>·<a href=?menu=topic2&lbid="&lbid&"&cha="&cha&">>>>继续</a>·<a href=?menu=bbszl>>>>返回</a>·<p>&nbsp;</p>"
%><%end select%><br><table onclick=javascript:window.open('http://www.6kbbs.net/') width=* border=0 style='border-collapse: collapse;CURSOR: hand;' cellspacing=0 align=center><tr><td align=center><p style='margin:5px;line-height:150%'><font color=<%=c2%>>欢迎您使用 6Kbbs 论坛系统 ...<br>官方支持站点:http;//www.6kbbs.net/ </font> </p></td></tr></table>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -