📄 basic.asp
字号:
orders = replace(request.form("orders")(i),"'","")
ispic= replace(request.form("ispic"&i&""),"'","")
if not isnumeric(id) or not isnumeric(orders) then
call goback("","请用数字填写!")
exit sub
end if
yxbbs.execute("update [yx_link]set orders="&orders&",ispic="&ispic&" where id="&id&"")
next
cache.name="link_list":cache.clean()
call suc("","更新联盟信息成功!","basic.asp?action=link")
end sub
sub saveadd
dim bbsname,url,pic,readme,orders,ispic
bbsname=yxbbs.fun.getstr("bbsname")
url=yxbbs.fun.ubbg(yxbbs.fun.getstr("url"))
pic=yxbbs.fun.getstr("pic")
readme=yxbbs.fun.getstr("readme")
ispic=yxbbs.fun.getstr("ispic")
if bbsname="" or url="" then
call goback("","")
exit sub
elseif not yxbbs.fun.checkname(bbsname) then
call goback("","请不要使用了非法字符")
exit sub
end if
orders=yxbbs.execute("select count(id) from[yx_link]")(0)
orders=int(orders+1)
yxbbs.execute("insert into[yx_link](bbsname,url,pic,readme,orders,ispic)values('"&bbsname&"','"&url&"','"&pic&"','"&readme&"',"&orders&","&ispic&")")
cache.name="link_list":cache.clean()
call suc("","添加论坛联盟成功!","basic.asp?action=link")
end sub
sub saveedit
dim bbsname,url,pic,readme,id,ispic
id=yxbbs.fun.getstr("id")
bbsname=yxbbs.fun.getstr("bbsname")
url=yxbbs.fun.ubbg(yxbbs.fun.getstr("url"))
pic=yxbbs.fun.getstr("pic")
readme=yxbbs.fun.getstr("readme")
ispic=yxbbs.fun.getstr("ispic")
if bbsname="" or url="" then
call goback("","")
exit sub
elseif not yxbbs.fun.checkname(bbsname) then
call goback("","请不要使用了非法字符")
exit sub
end if
yxbbs.execute("update [yx_link]set url='"&url&"',pic='"&pic&"',bbsname='"&bbsname&"',readme='"&readme&"',ispic="&ispic&" where id="&id&"")
cache.name="link_list":cache.clean()
call suc("","修改论坛联盟成功!","basic.asp?action=link")
end sub
sub dellink
dim id
id=request.querystring("id")
if not isnumeric(id) then
call goback("","提交的参数不正确!")
else
yxbbs.execute("delete from [yx_link] where id="&id&"")
cache.name="link_list":cache.clean()
call suc("","删除论坛联盟成功!","basic.asp?action=link")
end if
end sub
sub lockip%>
<form method=post name=form style='margin:0' action=?action=saveaddip>
<div class="ta">
<div class="th jz">ip封锁</div>
<div class="td1 h22">起始ip:</div>
<div class="td2 h22"> <input name='startip' type='text'></div>
<div class="td1 h22">结束ip:</div>
<div class="td2 h22"> <input name='endip' type='text'> *封锁单个ip时不必填写</div>
<div class="td1 h22">封禁说明:</div>
<div class="td2 h22"> <input name='readme' type='text' style="width:90%"></div>
<div style="clear: both;"></div><div class="tf w770 jz"><input type="submit" value=" 提 交 "> <input type="reset" value=" 重 置 "></div>
</div></form><br />
<div class="ta">
<div class="th jz">已经被封的ip记录</div>
<div class="td3 jz w231">网段</div><div class="td3 jz w231">说明</div><div class="td3 jz w291">操作</div>
<%
set rs=yxbbs.execute("select startip,endip,readme,id from [yx_lockip]")
if rs.eof then
response.write"<div style=""clear: both;""></div><div class=""tf jz w770"" >没有记录</div>"
else
do while not rs.eof
response.write"<div class=""td3 jz w231"">"&yxbbs.fun.ipdecode(rs("startip"))&" - "&yxbbs.fun.ipdecode(rs("endip"))&"</div><div class=""td3 jz w231""> "&rs("readme")&"</div><div class=""td3 jz w291""><a href=?action=editip&id="&rs("id")&"><img src=../images/edit.gif border=0 align='absmiddle' /> 修改</a> <a href=?action=delip&id="&rs("id")&"><img src=../images/del.gif border='0' align='absmiddle' /> 删除</a></div><br />"
rs.movenext
loop
end if
rs.close
%>
<div style="clear: both;"></div></div>
<%end sub
sub editip
set rs=yxbbs.execute("select startip,endip,readme,id from[yx_lockip] where id="&id&"")
if rs.eof then
call goback("","记录不存在"):exit sub
end if
%>
<form method=post name=form style='margin:0' action=?action=saveeditip>
<div class="ta">
<div class="th jz">ip封锁</div>
<div class="td1 h22" >起始ip:</div>
<div class="td2 h22" > <input name="id" value="<%=rs("id")%>" type="hidden"><input name='startip' type='text' value="<%=yxbbs.fun.ipdecode(rs("startip"))%>"></div>
<div class="td1 h22" >结束ip:</div>
<div class="td2 h22" > <input name='endip' type='text' value="<%=yxbbs.fun.ipdecode(rs("endip"))%>"> *封锁单个ip时不必填写</div>
<div class="td1 h22" >封禁说明:</div>
<div class="td2 h22" > <input name='readme' type='text' style="width:90%" value="<%=rs("readme")%>"></div>
<div style="clear: both;"></div><div class="tf w770 jz" ><input type="submit" value=" 提 交 "> <input type="reset" value=" 重 置 "></div>
</div></form>
<%
rs.close
end sub
sub delip
dim id
id=int(request("id"))
yxbbs.execute("delete from[yx_lockip] where id="&id&"")
cache.name="ipdata"
cache.clean()
response.redirect "?action=lockip"
end sub
sub saveaddip
dim startip,endip,readme
startip=yxbbs.fun.getstr("startip")
endip=yxbbs.fun.getstr("endip")
readme=yxbbs.fun.getstr("readme")
if startip="" then
call goback("","")
exit sub
end if
if endip="" then endip=startip
yxbbs.execute("insert into [yx_lockip](startip,endip,readme)values("&yxbbs.fun.ipencode(startip)&","&yxbbs.fun.ipencode(endip)&",'"&readme&"')")
call suc("操作成功","成功添加封锁ip纪录!","?action=lockip")
cache.name="ipdata"
cache.clean()
end sub
sub saveeditip
dim id,startip,endip,readme
id=yxbbs.fun.getstr("id")
startip=yxbbs.fun.getstr("startip")
endip=yxbbs.fun.getstr("endip")
readme=yxbbs.fun.getstr("readme")
if startip="" then
call goback("",""):exit sub
end if
if endip="" then endip=startip
yxbbs.execute("update [yx_lockip]set startip="&yxbbs.fun.ipencode(startip)&",endip="&yxbbs.fun.ipencode(endip)&",readme='"&readme&"' where id="&id&"")
call suc("","修改封锁ip成功!","?action=lockip")
cache.name="ipdata"
cache.clean()
end sub
sub setad
%>
<form method=post action=?action=savead>
<div class="ta">
<div class="th jz">广告管理</div>
<div class="td1 jz h70" style="float: left;text-align: left;">论坛已有广告的显示效果:</div>
<div class="td2 jz h70" style="float: left;text-align: left;">论坛已有广告的代码:<br />清空代码即删除广告。<br /><font color=red>注意:此处仅支持简单的文字图片连接,不支持google adsense等广告!</div>
<%
dim fso1,openfile,tmpstr,tmp,ad_num,ad_i,ad_tmp
set fso1 = server.createobject("scripting.filesystemobject")
Set openfile=fso1.OpenTextFile(Server.MapPath("../inc/ads.js"))
tmpstr=openfile.readall
tmp=split(tmpstr,chr(13)&chr(10))
ad_num=replace(tmp(1),"a = ","")
ad_num=int(replace(ad_num,";if(a==0){a=1}",""))
for ad_i=1 to ad_num
ad_tmp=replace(tmp(ad_i+8),"b["&ad_i&"].under =","")
ad_tmp=replace(ad_tmp,"'","")
response.write"<div class=""td1 h75"">"&ad_tmp&"</div><div class=""td2 jz h75""><textarea rows=5 cols=60 name=ad_v"&ad_i&" style='font-family: 宋体; font-size: 9pt'>"&ad_tmp&"</textarea></div>"
next
openfile.close
set fso1=nothing
%>
<div class="td1 h75">增加广告:</div>
<div class="td2 jz h75"><textarea row=3 cols=60 name=ad_v<%=ad_num+1%> rows="5" style="font-family: 宋体; font-size: 9pt"></textarea></div>
<div style="clear: both;"></div><div class="tf jz"> <input type="submit" value=" 确 认 修 改 " name="b1"></div>
</div></form>
<%
end sub
sub savead
dim adv_num,ad_msg,fso1,OpenFile,tmpstr,tmp,ad_num,ad_i,ad_tmp
set fso1 = server.createobject("scripting.filesystemobject")
Set openfile=fso1.OpenTextFile(Server.MapPath("../inc/ads.js"))
tmpstr=openfile.readall
tmp=split(tmpstr,chr(13)&chr(10))
ad_num=replace(tmp(1),"a = ","")
ad_num=int(replace(ad_num,";if(a==0){a=1}",""))
openfile.close
set fso1=nothing
adv_num=0
for ad_i=1 to ad_num+1
ad_tmp=replace(request.form("ad_v"&ad_i&""),"'","")
if trim(ad_tmp)<>"" or isnull(ad_tmp)then
adv_num=adv_num+1
ad_msg=ad_msg&"b["&adv_num&"].under ='"&ad_tmp&"'"&vbcrlf
end if
next
dim objFSO,objname
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objname=objFSO.CreateTextFile(Server.MapPath("../inc/ads.js"),True)
objname.Write"<!--"&vbcrlf&"a = "&adv_num&";if(a==0){a=1}"&vbcrlf&"var slump = Math.random();"&vbcrlf&"var talet = Math.round(slump * (a-1))+1;"&vbcrlf&"function create() { "&vbcrlf&"this.under = '' "&vbcrlf&"}"&vbcrlf&"b = new Array() "&vbcrlf&"for(var i=1; i<=a; i++) { b[i] = new create() } "&vbcrlf&ad_msg&"var visa = """";"&vbcrlf&"document.write(b[talet].under); "&vbcrlf&"//-->"
objname.close
set objfso=nothing
response.redirect"?action=setad"
end sub
sub updatebbs
%>
<div class="ta">
<div class="th jz">论坛整理修复</div>
<div class="tf h30"><b>注意事项:</b>论坛整理中的各项运行都需要消耗比较多的资源<br />所以请你选择论坛访问人数较少的时候进行整理,或者在整理过程中可以先暂时关闭论坛</div>
<div class="td3 w152 h40">更新空间缓存</div><div class="td3 w470 h40" style="text-align: left;">论坛采用了服务器缓存技术,一些改动有时不会马上生效,所以您需要更新空间的缓存才能看到效果!本站现使用缓存<font color=red><%=application.contents.count%></font>个</div><div class="td3 w131 h40 jz"><input value="开始更新" type="button" onclick=window.location.href='?action=execlean'></div>
<div class="td3 w152 h40">论坛系统整理</div><div class="td3 w470 h40" style="text-align: left;">重新计算总主题数、总帖数、今日帖数、用户数、新注册用户等<br /> 建议每隔一段时间运行一次。</div><div class="td3 w131 h40 jz"><input value="开始整理" type="button" onclick=window.location.href='?action=updatebbsdate'></div>
<div class="td3 w152 h40">论坛版面整理</div><div class="td3 w470 h40" style="text-align: left;">各版面总帖数、主题数、今日帖数、各版版主、最后回复等.建议每隔一段时间运行一次。清理的过程中请不要刷新和关闭!</div><div class="td3 w131 h40 jz"><input value="开始整理" type="button" onclick=window.location.href='?action=boardupdate'></div>
<div class="td3 w152 h40">论坛垃圾清理</div><div class="td3 w470 h40" style="text-align: left;">清理无效版主、无效帖子、无效主题、无效帖子、无效投票、元效留言、无效用户帖等.清理的过程中请不要刷新和关闭!</div><div class="td3 w131 h40 jz"><input value="开始清理" type="button" onclick=window.location.href='?action=delwuiong'></div>
<div class="td3 w152 h40">修复主题帖数</div><div class="td3 w470 h40" style="text-align: left;">重新整理计算每个主题帖的回复帖数、最后回复信息等<br />如果论坛帖子非常多,整理过程可能将消耗大量资源。</div><div class="td3 w131 h40 jz"><input value="开始整理" type="button" onclick=window.location.href='?action=updatetopic'></div>
<div class="td3 w152 h40">修复用户信息</div><div class="td3 w470 h40" style="text-align: left;">各版面总帖数、主题数、今日帖数、各版版主、最后回复等.建议每隔一段时间运行一次。清理的过程中请不要刷新和关闭!</div><div class="td3 w131 h40 jz"><input value="开始整理" type="button" onclick=window.location.href='?action=updatealluser'></div>
<div style="clear: both;"></div></div>
<%
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -