Basic.Asp
上传用户:btntkt
上传日期:2021-04-16
资源大小:5296k
文件大小:47k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

DOS

  1. <!--#include file="check.asp"-->
  2. <%
  3. dim action,id
  4. id=request.querystring("id")
  5. if id="" then id=0
  6. response.write("<body>")
  7. select case request("action")
  8. case "config"
  9. config
  10. case "configsave"
  11.         configsave
  12. case "link"
  13.        link
  14. case "edit"
  15.        edit
  16. case "updatelink"
  17.        updatelink
  18. case "saveadd"
  19.        saveadd
  20. case "saveedit"
  21.        saveedit
  22. case "dellink"
  23.        dellink
  24. case "lockip"
  25.        lockip
  26. case "editip"
  27.        editip
  28. case "delip"
  29.        delip
  30. case "saveaddip"
  31.        saveaddip
  32. case "saveeditip"
  33.        saveeditip
  34. case "setad"
  35.        setad
  36. case "savead"
  37.        savead
  38. case "updatebbs"
  39.        updatebbs
  40. case "execlean"
  41. execlean
  42. case"updatebbsdate"
  43. updatebbsdate
  44. case"updatetopic"
  45. updatetopic
  46. case"updatealluser"
  47. updatealluser
  48. case"delwuiong"
  49. delwuiong
  50. case"boardupdate"
  51. boardupdate
  52. case else
  53.       main
  54. end select
  55. adminfooter()
  56. sub main%>
  57. <div class="ta"> 
  58. <div class="th jz">论坛系统信息</div> 
  59. <div class="td1" >总帖数:<span class="blue"><%=yxbbs.allessaynum%></span></div> 
  60. <div class="td2" >主题数:<span class="blue"><%=yxbbs.topicnum%></span></div> 
  61. <div class="td1" >注册人数:<span class="blue"><%=yxbbs.usernum%></span></div> 
  62. <div class="td2" >最新加入:<span class="blue"><%=yxbbs.newuser%></span></div> 
  63. <div class="td1" >创建时间:<span class="blue"><%=yxbbs.builddate%></span></div> 
  64. <div class="td2" >今日新帖:<span class="blue"><%=yxbbs.todaynum%></span></div> 
  65. <div class="td1" >目前在线人数:<span class="blue"><%=yxbbs.execute("select count(id) from[yx_online]")(0)%></span></div> 
  66. <div class="td2" >最大在线人数:<span class="blue"><%=yxbbs.maxonlinenum%> (<%=yxbbs.maxonlinetime%>)</span></div>
  67. <div style="clear: both;"></div>
  68. </div>
  69. <br />
  70. <%if object_install("scripting.filesystemobject")=true then%>
  71. <div class="ta"> 
  72. <div class="th jz">论坛空间占用情况</div> 
  73. <div class="td1" >数 据 库占用空间</div> 
  74. <div class="td2" >&nbsp;<%=getsize(0,"../data")%></div> 
  75. <div class="td1" >管理目录占用空间</div> 
  76. <div class="td2" >&nbsp;<%=getsize(0,"../"&yxbbs.bbssetting(2)&"")%></div>
  77. <div class="td1" >图片目录占用空间</div> 
  78. <div class="td2" >&nbsp;<%=getsize(0,"../images")%></div>  
  79. <div class="td1" >皮肤目录占用空间</div> 
  80. <div class="td2" >&nbsp;<%=getsize(0,"../skins")%></div> 
  81. <div class="td1" >上传文件占用空间</div> 
  82. <div class="td2" >&nbsp;<%=getsize(0,"../uploadfile")%></div> 
  83. <div class="td1" >函数目录占用空间</div> 
  84. <div class="td2" >&nbsp;<%=getsize(0,"../inc")%></div>
  85. <div class="td1" >论坛占用空间总计</div> 
  86. <div class="td2" >&nbsp;<%=getsize(0,"../")%></div> 
  87. <div style="clear: both;"></div> 
  88. </div>  
  89. <% end if %>
  90. <br />
  91. <div class="ta"> 
  92. <div class="th jz">服务器的有关参数</div> 
  93. <div class="td1" >服务器</div> 
  94. <div class="td2 w449" >&nbsp;<%response.write request.servervariables("local_addr")%></div> 
  95. <div class="td1" >服务器时间:</div> 
  96. <div class="td2 w449" >&nbsp;<%response.write now%></div>
  97. <div class="td1" >服务器版本:</div> 
  98. <div class="td2 w449" >&nbsp;<%response.write request.servervariables("server_software")%></div>  
  99. <div class="td1" >服务器操作系统:</div> 
  100. <div class="td2 w449" >&nbsp;<%if request.servervariables("os")="" then
  101. response.write "windows 2003"
  102. else
  103. response.write request.servervariables("os")
  104. end if%></div> 
  105. <div class="td1" >脚本超时时间:</div> 
  106. <div class="td2 w449" >&nbsp; <%response.write server.scripttimeout%></div> 
  107. <div class="td1" >服务器解译引擎:</div> 
  108. <div class="td2 w449" >&nbsp; <%response.write scriptengine & "/"& scriptenginemajorversion &"."&scriptengineminorversion&"."& scriptenginebuildversion %></div>
  109. <div class="td1" >fso文本读写</div> 
  110. <div class="td2 w449" >&nbsp;<%if object_install("scripting.filesystemobject")=false then
  111. session(yxbbs.cachename&"fso")="no"%>
  112.         <span class="b1 red">×</span> (可能导致部分功能不能使用)
  113.         <% else
  114. session(yxbbs.cachename&"fso")="" %>
  115.         <span class="b1">√</span> (支持)
  116.     <% end if %></div> 
  117. <div class="td1" >stream文件流:</div> 
  118. <div class="td2 w449" >&nbsp;<%if object_install("adodb.stream")=false then%>
  119.         <span class="b1 red">×</span> (不支持)
  120.         <% else %>
  121.         <span class="b1">√</span> (支持)
  122.     <% end if %></div> 
  123. <div class="td1" >aspjpeg组件支持:</div> 
  124. <div class="td2 w449" >&nbsp;<%if object_install("persits.jpeg")=false then%>
  125.         <span class="b1 red">×</span> (可能导致不能使用上传水印的功能)
  126.         <% else %>
  127.        <span class="b1">√</span> (支持)
  128.     <% end if %></div> 
  129. <div class="td1" >JMail组件支持:</div> 
  130. <div class="td2 w449" >&nbsp;<%if object_install("JMail.SMTPMail")=false then%>
  131.         <span class="b1 red">×</span> (可能导致不能使用邮件发送的功能)
  132.         <% else %>
  133.        <span class="b1">√</span> (支持)
  134.     <% end if %></div> 
  135. <div style="clear: both;"></div> 
  136. </div> 
  137. <%
  138. end sub
  139. '空间占用
  140. function getsize(f,drvpath)
  141. dim fso,d,size,showsize
  142. set fso=server.createobject("scripting.filesystemobject")
  143. drvpath=server.mappath(drvpath)
  144. if f=1 then
  145. set d=fso.getfile(drvpath)
  146. else
  147. set d=fso.getfolder(drvpath)
  148. end if
  149. size=d.size
  150. showsize=size & "&nbsp;byte"
  151. if size>1024 then
  152.    size=(size/1024)
  153.    showsize=formatnumber(size,2) & "&nbsp;KB"
  154. end if
  155. if size>1024 then
  156.    size=(size/1024)
  157.    showsize=formatnumber(size,2) & "&nbsp;MB"
  158. end if
  159. if size>1024 then
  160.    size=(size/1024)
  161.    showsize=formatnumber(size,2) & "&nbsp;GB"    
  162. end if
  163. getsize=showsize
  164. end function
  165. '组件检测
  166. function object_install(strclassstring)
  167.   on error resume next
  168.   object_install=false
  169.   dim xtestobj
  170.   err=0
  171.   set xtestobj=server.createobject(strclassstring)
  172.   if err=0 then object_install=true
  173.   set xtestobj=nothing
  174.   err=0
  175. end function
  176. '信息设置
  177. sub config
  178. dim info,rs
  179. set rs=yxbbs.execute("select * from [yx_config]")
  180. info=split(rs("info"),"|")
  181. %>
  182. <a name="inc"></a>
  183. <%call showtable("论坛参数设置","<center><a href=""#inc1"">上传设置</a> | <a href=""#inc2"">金钱参数设置</a> | <a href=""#inc3"">论坛显示设置</a> | <a href=""#inc4"">论坛用户设置</a> | <a href=""#inc5"">论坛系统设置</a></center>")%>
  184. <form method=post name=form style="margin:0" action="?action=configsave">
  185. <br />
  186. <div class="ta">
  187. <div class="th jz">论坛基本设置</div>
  188. <div class="td1 h22">论坛名称:</div>
  189. <div class="td2 h22"><input type="text" name="bbsname"  value="<%=rs("bbsname")%>"></div>
  190. <div class="td1 h22">论坛地址:</div>
  191. <div class="td2 h22"><input type="text" name="bbsurl" size="50" value="<%=rs("bbsurl")%>"></div>
  192. <div class="td1 h22">论坛管理目录:</div>
  193. <div class="td2 h22"><input type="text" name="info2" size="10" value="<%=info(2)%>">  <span class="red">*此处填写管理目录名称.</span></div>
  194. <div class="td1 h22">建站日期:</div>
  195. <div class="td2 h22"><input type="text" name="builddate" size="10"  value="<%=rs("builddate")%>"> (格式:yyyy-m-d)</td></div>
  196. <div class="td1 h22">关闭论坛:</div>
  197. <div class="td2 h22"><input type="radio" name="bbsclose" value="0" <%if not rs("bbsclose") then%>checked="true"<%end if%>> 开启  <input type="radio" name="bbsclose" value="1" <%if rs("bbsclose") then%>checked="true"<%end if%>> 关闭</div>
  198. <div class="td1 h65">关闭论坛显示信息:<br />支持html语法</div>
  199. <div class="td2 h65 w446"><textarea rows="3" name="closeinfo"><%=rs("closeinfo")%></textarea></div>
  200. <div class="td1 h65">论坛首页公告:<br />支持html语法</div>
  201. <div class="td2 h65 w446"><textarea rows="3" name="srule"><%=rs("srule")%></textarea></div>
  202. <div class="td1 h65">论坛版权信息:<br />支持html语法</div>
  203. <div class="td2 h65 w446"><textarea rows="3" name="copyright" ><%=rs("copyright")%></textarea></div>
  204. <div class="td1 h65">贴间广告信息:<br />支持html语法</div>
  205. <div class="td2 h65 w446"><textarea rows="3" name="google" ><%=rs("google")%></textarea></div>
  206. <div style="clear: both;"></div> 
  207. </div>
  208. <br />
  209. <a name="inc1"></a>
  210. <div class="ta">
  211. <div class="th jz">上传设置 <a href="#inc">top</a></div>
  212. <div class="td1 h22">是否允许上传头像:</div>
  213. <div class="td2 h22"><input type="radio" name="info18" value="0" <%if info(18)="0" then%>checked="true"<%end if%>> 是 <input type="radio" name="info18" value="1" <%if info(18)="1" then%>checked="true"<%end if%>> 否 </div>
  214. <div class="td1 h22">上传头像类型(用@@分隔):</div>
  215. <div class="td2 h22"><input type="text" name="uploadtype" size="50" value="<%=rs("uploadtype")%>"></div>
  216. <div class="td1 h22">头像上传大小限制:</div>
  217. <div class="td2 h22"><input type="text" name="info19" size="5" value="<%=info(19)%>"> kb</div>
  218. <div class="td1 h22">是否开启上传水印:</div>
  219. <div class="td2 h22"><input type="radio" name="info56" value="0" <%if info(56)="0" then%>checked="true"<%end if%>> 是 <input type="radio" name="info56" value="1" <%if info(56)="1" then%>checked="true"<%end if%>> 否 </div>
  220. <div class="td1 h22">文字样式水印显示:</div>
  221. <div class="td2 h22"><input type="text" name="info57" size="20" value="<%=info(57)%>"></div>
  222. <div class="td1 h22">水印加盖模式:</div>
  223. <div class="td2 h22"><input type="radio" name="info58" value="0" <%if info(58)="0" then%>checked="true"<%end if%>> 文字 <input type="radio" name="info58" value="1" <%if info(58)="1" then%>checked="true"<%end if%>> 图片   *如选图片,请在images下放名为logobox.gif标志.</div>
  224. <div style="clear: both;"></div> 
  225. </div>
  226. <br />
  227. <a name="inc2"></a>
  228. <div class="ta">
  229. <div class="th jz">金钱参数设置 <a href="#inc">top</a></div>
  230. <div class="td1 h22">y币在您论坛的名称:</div>
  231. <div class="td2 h22"><input type="text" name="info23" size="4" value="<%=info(23)%>"></div>
  232. <div class="td1 h22">醒目标题需要金钱:</div>
  233. <div class="td2 h22 blue">加 <input type="text" name="info13" size="2" value="<%=info(13)%>"> 元</div>
  234. <div class="td1 h22">发送短信息需要金钱:</div>
  235. <div class="td2 h22 blue">加 <input type="text" name="info3" size="2" value="<%=info(3)%>"> 元</div>
  236. <div class="td1 h22">论坛发贴:</div>
  237. <div class="td2 h22 blue">加 <input type="text" name="info37" size="2" value="<%=info(37)%>"> 元</div>
  238. <div class="td1 h22">论坛回帖:</div>
  239. <div class="td2 h22 blue">加 <input type="text" name="info38" size="2" value="<%=info(38)%>"> 元</div>
  240. <div class="td1 h22">删除帖子:</div>
  241. <div class="td2 h22 red">减 <input type="text" name="info59" size="2" value="<%=info(59)%>"> 元  减 <input type="text" name="info60" size="2" value="<%=info(60)%>"> YB</div>
  242. <div class="td1 h22">论坛精华:</div>
  243. <div class="td2 h22 blue">加 <input type="text" name="info39" size="2" value="<%=info(39)%>"> 元&nbsp;&nbsp; 加 <input type="text" name="info40" size="2" value="<%=info(40)%>"> YB &nbsp;&nbsp;<span class="red">减 <input type="text" name="info41" size="2" value="<%=info(41)%>"> 元&nbsp;&nbsp;减 <input type="text" name="info42" size="2" value="<%=info(42)%>"> YB</span></div>
  244. <div class="td1 h22">论坛置顶:</div>
  245. <div class="td2 h22 blue">加 <input type="text" name="info43" size="2" value="<%=info(43)%>"> 元&nbsp;&nbsp; 加 <input type="text" name="info44" size="2" value="<%=info(44)%>"> YB &nbsp;&nbsp;<span class="red">减 <input type="text" name="info45" size="2" value="<%=info(45)%>"> 元&nbsp;&nbsp;减 <input type="text" name="info46" size="2" value="<%=info(46)%>"> YB</span></div>
  246. <div class="td1 h22">论坛区置顶:</div>
  247. <div class="td2 h22 blue">加 <input type="text" name="info47" size="2" value="<%=info(47)%>"> 元&nbsp;&nbsp; 加 <input type="text" name="info48" size="2" value="<%=info(48)%>"> YB &nbsp;&nbsp;<span class="red">减 <input type="text" name="info49" size="2" value="<%=info(49)%>"> 元&nbsp;&nbsp;减 <input type="text" name="info50" size="2" value="<%=info(50)%>"> YB</span></div>
  248. <div class="td1 h22">论坛总置顶:</div>
  249. <div class="td2 h22 blue">加 <input type="text" name="info51" size="2" value="<%=info(51)%>"> 元&nbsp;&nbsp; 加 <input type="text" name="info52" size="2" value="<%=info(52)%>"> YB &nbsp;&nbsp;<span class="red">减 <input type="text" name="info53" size="2" value="<%=info(53)%>"> 元&nbsp;&nbsp;减 <input type="text" name="info54" size="2" value="<%=info(54)%>"> YB</span></div>
  250. <div style="clear: both;"></div> 
  251. </div>
  252. <br />
  253. <a name="inc3"></a>
  254. <div class="ta">
  255. <div class="th jz">论坛显示设置 <a href="#inc">top</a></div>
  256. <div class="td1 h22">显示系统信息:</div>
  257. <div class="td2 h22"><input type="radio" name="info7" value="0" <%if info(7)="0" then%>checked="true"<%end if%>> 是 <input type="radio" name="info7" value="1" <%if info(7)="1" then%>checked="true"<%end if%>> 否 *包括首页公告、快速登陆</div>
  258. <div class="td1 h22">显示在线信息:</div>
  259. <div class="td2 h22"><input type="radio" name="info10" value="0" <%if info(10)="0" then%>checked="true"<%end if%>> 是  <input type="radio" name="info10" value="1" <%if info(10)="1" then%>checked="true"<%end if%>> 否 </div>
  260. <div class="td1 h22">显示会员生日:</div>
  261. <div class="td2 h22"><input type="radio" name="info32" value="0" <%if info(32)="0" then%>checked="true"<%end if%>> 是  <input type="radio" name="info32" value="1" <%if info(32)="1" then%>checked="true"<%end if%>> 否 </div>
  262. <div class="td1 h22">显示论坛联盟:</div>
  263. <div class="td2 h22"><input type="radio" name="info8" value="0" <%if info(8)="0" then%>checked="true"<%end if%>> 是 <input type="radio" name="info8" value="1" <%if info(8)="1" then%>checked="true"<%end if%>> 否 </div>
  264. <div class="td1 h22">显示执行时间:</div>
  265. <div class="td2 h22"><input type="radio" name="info33" value="1" <%if info(33)="1" then%>checked="true"<%end if%>> 以毫秒显示 <input type="radio" name="info33" value="2" <%if info(33)="2" then%>checked="true"<%end if%>> 以秒显示 <input type="radio" name="info33" value="0" <%if info(33)="0" then%>checked="true"<%end if%>> 不显示</div>
  266. <div style="clear: both;"></div> 
  267. </div>
  268. <br />
  269.   <a name="inc4"></a>
  270. <div class="ta">
  271. <div class="th jz">用户信息设置 <a href="#inc">top</a></div>
  272. <div class="td1 h22">是否审核注册用户:</div>
  273. <div class="td2 h22"><input type="radio" name="info34" value="0" <%if info(34)="0" then%>checked="true"<%end if%>> 是 <input type="radio" name="info34" value="1" <%if info(34)="1" then%>checked="true"<%end if%>> 否 </div>
  274. <div class="td1 h22">自定义头衔级别 :</div>
  275. <div class="td2 h22"><input type="text" name="info25" size="4" value="<%=info(25)%>"> 级</div>
  276. <div class="td1 h22">头像上传等级限制:</div>
  277. <div class="td2 h22"><input type="text" name="info35" size="4" value="<%=info(35)%>"> 级</div>
  278. <div class="td1 h22">文件上传等级限制:</div>
  279. <div class="td2 h22"><input type="text" name="info36" size="4" value="<%=info(36)%>"> 级 *如果想禁止上传,就设置21级</div>
  280. <div class="td1 h22">允许个人签名:</div>
  281. <div class="td2 h22"><input type="radio" name="info12" value="0" <%if info(12)="0" then%>checked="true"<%end if%>> 是 <input type="radio" name="info12" value="1" <%if info(12)="1" then%>checked="true"<%end if%>> 否</div>
  282. <div class="td1 h22">游客查看上传资源 :</div>
  283. <div class="td2 h22"><input type="radio" name="info55" value="1" <%if info(55)="1" then%>checked="true"<%end if%>> 是 <input type="radio" name="info55" value="0" <%if info(55)="0" then%>checked="true"<%end if%>> 否</div>
  284. <div class="td1 h22">允许新用户注册:</div>
  285. <div class="td2 h22"><input type="radio" name="info0" value="0" <%if info(0)="0" then%>checked="true"<%end if%>> 是 <input type="radio" name="info0" value="1" <%if info(0)="1" then%>checked="true"<%end if%>> 否</div>
  286. <div class="td1 h22">注册发送留言:</div>
  287. <div class="td2 h22"><input type="radio" name="info5" value="0" <%if info(5)="0" then%>checked="true"<%end if%>> 是 <input type="radio" name="info5" value="1" <%if info(5)="1" then%>checked="true"<%end if%>> 否</div>
  288. <div class="td1 h65">注册发送留言内容</div>
  289. <div class="td2 h65 w446"><textarea rows="3" name="regautosms"><%=rs("regautosms")%></textarea> </div>
  290. <div class="td1 h22">同一来源2次注册间隔:</div>
  291. <div class="td2 h22"><input type="text" name="info28" size="4" value="<%=info(28)%>" onkeypress='event.returnvalue=(event.keycode >= 48) && (event.keycode <= 57);'> 分钟 <span class="red">*如果不想使用这项功能, 请设置为0</span></div>
  292. <div class="td1 h22">同一来源2次登陆间隔:</div>
  293. <div class="td2 h22"><input type="text" name="info29" size="4" value="<%=info(29)%>"> 分钟 <span class="red">*同上</span></div>
  294. <div class="td1 h22">发贴时限:</div>
  295. <div class="td2 h22"><input type="text" name="info30" size="4" value="<%=info(30)%>"> 秒&nbsp;&nbsp; <span class="red">&nbsp;*同上</span></div>
  296. <div class="td1 h22">用户编辑帖子时间:</div>
  297. <div class="td2 h22"><input type="text" name="info31" size="4" value="<%=info(31)%>"> 分钟  <span class="red">*同上</span></div>
  298. <div style="clear: both;"></div> 
  299. </div>
  300. <br />
  301. <a name="inc5"></a>
  302. <div class="ta">
  303. <div class="th jz">论坛系统设置 <a href="#inc">top</a></div>
  304. <div class="td1 h22">Smtp服务器:</div>
  305. <div class="td2 h22"><input type="text" name="info9"  value="<%=info(9)%>"></div>
  306. <div class="td1 h22">Smtp用户名:</div>
  307. <div class="td2 h22"><input type="text" name="info20"  value="<%=info(20)%>"></div>
  308. <div class="td1 h22">Smtp密码:</div>
  309. <div class="td2 h22"><input type="text" name="info21"  value="<%=info(21)%>"></div>
  310. <div class="td1 h22">是否开启防盗链 :</div>
  311. <div class="td2 h22"><input type="radio" name="info61" value="0" <%if info(61)="0" then%>checked="true"<%end if%>> 是 <input type="radio" name="info61" value="1" <%if info(61)="1" then%>checked="true"<%end if%>> 否</div>
  312. <div class="td1 h22">是否开启附件显示 :</div>
  313. <div class="td2 h22"><input type="radio" name="info22" value="0" <%if info(22)="0" then%>checked="true"<%end if%>> 是 <input type="radio" name="info22" value="1" <%if info(22)="1" then%>checked="true"<%end if%>> 否</div>
  314. <div class="td1 h22">版主继承:</div>
  315. <div class="td2 h22"><input type="radio" name="info1" value="0" <%if info(1)="0" then%>checked="true"<%end if%>> 是 <input type="radio" name="info1" value="1" <%if info(1)="1" then%>checked="true"<%end if%>> 否</div>
  316. <div class="td1 h22">登录验证码:</div>
  317. <div class="td2 h22"><input type="radio" name="info6" value="0" <%if info(6)="0" then%>checked="true"<%end if%>> 是 <input type="radio" name="info6" value="1" <%if info(6)="1" then%>checked="true"<%end if%>> 否</div>
  318. <div class="td1 h22">论坛在线人数统计超时:</div>
  319. <div class="td2 h22"><input type="text" name="info27" size="5" value="<%=info(27)%>"> 分钟 </div>
  320. <div class="td1 h22">帖子列表显New标志取消:</div>
  321. <div class="td2 h22"><input type="text" name="info4" size="5" value="<%=info(4)%>"> 分钟</div>
  322. <div class="td1 h22">论坛分页显示条数:</div>
  323. <div class="td2 h22"><input type="text" name="info26" size="5" value="<%=info(26)%>"> 条</div>
  324. <div class="td1 h22">成为热帖的最低人气值:</div>
  325. <div class="td2 h22"><input type="text" name="info24" size="5" value="<%=info(24)%>"> 条</div>
  326. <div class="td1 h22">论坛头像个数:</div>
  327. <div class="td2 h22"><input type="text" name="info14" size="5" value="<%=info(14)%>"> 个</div>
  328. <div class="td1 h22">头像最大寸尺:</div>
  329. <div class="td2 h22"><input type="text" name="info15" size="5" value="<%=info(15)%>"> 像素</div>
  330. <div class="td1 h22">头像默认寸尺:</div>
  331. <div class="td2 h22"><input type="text" name="info17" size="5" value="<%=info(17)%>">×<input type="text" name="info16" size="5" value="<%=info(16)%>"> 高×宽(像素)</div>
  332. <div class="td1 h22">禁止注册的用户名(用@@分隔):</div>
  333. <div class="td2 h22"><input type="text" size="70" name="badname" value="<%=rs("badname")%>"></div>
  334. <div class="td1 h22">帖子过滤脏字(用@@分隔):</div>
  335. <div class="td2 h22"><input type="text" size="70" name="badessay" value="<%=rs("badessay")%>"></div>
  336. <div style="clear: both;"></div> 
  337. <div class="tf jz w770"><input type="submit" value="确定修改"></div>
  338. </div>
  339. </form>
  340. <%
  341. rs.close 
  342. end sub
  343. sub configsave
  344. dim bbsname,bbsurl,bbsclose,closeinfo,srule,copyright,i,temp,uploadtype,builddate,badname,badessay,regautosms,google
  345. temp=""
  346. for i=0 to 61
  347. if i=0 or i=1 then
  348. if yxbbs.fun.getstr("info"&i)="" then
  349. call goback("","")
  350. exit sub
  351. end if
  352. if not yxbbs.fun.isinteger(yxbbs.fun.getstr("info"&i)) then
  353. call goback("","一些参数必须填为正整数,否则论坛不能正常运行。")
  354. exit sub
  355. end if
  356. end if
  357. temp=temp&yxbbs.fun.getstr("info"&i)&"|"
  358. next
  359. bbsname=yxbbs.fun.getstr("bbsname")
  360. bbsurl=yxbbs.fun.getstr("bbsurl")
  361. bbsclose=yxbbs.fun.getstr("bbsclose")
  362. closeinfo=yxbbs.fun.getstr("closeinfo")
  363. copyright=yxbbs.fun.getstr("copyright")
  364. builddate=yxbbs.fun.getstr("builddate")
  365. uploadtype=yxbbs.fun.getstr("uploadtype")
  366. badname=yxbbs.fun.getstr("badname")
  367. badessay=yxbbs.fun.getstr("badessay")
  368. regautosms=yxbbs.fun.getstr("regautosms")
  369.         srule=yxbbs.fun.getstr("srule")
  370. google=yxbbs.fun.getstr("google")
  371.     yxbbs.execute("update [yx_config] set bbsname='"&bbsname&"',bbsurl='"&bbsurl&"',bbsclose="&bbsclose&",closeinfo='"&closeinfo&"',copyright='"&copyright&"',info='"&temp&"',uploadtype='"&uploadtype&"',builddate='"&builddate&"',badname='"&badname&"',badessay='"&badessay&"',regautosms='"&regautosms&"',srule='"&srule&"',google='"&google&"'")
  372. call suc("修改成功","论坛名称以及其他参数修改成功","basic.asp?action=config")
  373. cache.name="config"
  374. cache.clean()
  375. end sub
  376. '联盟
  377. sub link
  378. dim rs,i%>
  379. <form method=post name=form style='margin:0' action=?action=saveadd>
  380. <div class="ta">
  381. <div class="th jz">添加论坛联盟</div>
  382. <div class="td1 h22">论坛名称:</div>
  383. <div class="td2 h22"><input type="text" name="bbsname" size="20"></div>
  384. <div class="td1 h22">论坛地址:</div>
  385. <div class="td2 h22"><input type="text" name="url" size="38"></div>
  386. <div class="td1 h22">论坛图片:</div>
  387. <div class="td2 h22"><input type="text" name="pic" size="38">(可留空)</div>
  388. <div class="td1 h22">论坛说明:</div>
  389. <div class="td2 h22"><input type="text" name="readme" size="38">(可留空)</div>
  390. <div class="td1 h22">图片显示:</div>
  391. <div class="td2 h22"><input type="radio" name="ispic" value="yes"  checked="true">  是 <input type="radio" name="ispic" value="no" > 否</div>
  392. <div style="clear: both;"></div><div class="tf jz w770"><input type="submit" value=" 提 交 ">&nbsp;&nbsp;<input type="reset" value=" 重 置 "></div>
  393. </div></form>
  394. <br />
  395. <form method=post name=form  action=?action=updatelink>
  396. <div class="ta">
  397. <div class="th1 jz w231">论坛联盟信息</div>
  398. <div class="th1 jz w87">排序</div>
  399. <div class="th1 jz w231">显示图片</div>
  400. <div class="th1 jz w231">操作</div>
  401. <%
  402. i=0
  403. set rs=yxbbs.execute("select id,ispic,orders,bbsname,url,readme from[yx_link] order by orders")
  404. do while not rs.eof
  405. i=i+1
  406. %>
  407. <div class="td3 w219 jz"><a href="<%=rs("url")%>" target="_blank" title="<%=rs("readme")%>"><%=rs("bbsname")%></a></div>
  408.         <div class="td3 w87  jz"><input name="id" value="<%=rs("id")%>" type="hidden"><input type="text" name="orders" value="<%=rs("orders")%>" size="2"></div>
  409.         <div class="td3 w219 jz"><input type="radio" name="ispic<%=i%>" value="yes" <%if rs("ispic") then%> checked="true" <%end if%>> 是 <input type="radio" name="ispic<%=i%>" value="no" <%if not rs("ispic") then%> checked="true" <%end if%>> 否</div>
  410. <div class="td3 w219 jz"><a href="?action=edit&id=<%=rs("id")%>"><img src="../images/edit.gif" border="0" align="absmiddle" /> 编辑</a> <a onclick=checkclick('删除后将不能恢复!您确定要删除吗?') href="?action=dellink&id=<%=rs("id")%>"><img src="../images/del.gif" width="18" height="18" border="0" align="absmiddle"  /> 删除</a></div>
  411. <%rs.movenext
  412. loop
  413. rs.close
  414. %>
  415. <div style="clear: both;"></div><div class="tf w770 jz" ><input type="submit" value=" 更 新 ">&nbsp;&nbsp;<input type="reset" value=" 重 置 "></div></div></form>
  416. <%
  417. end sub
  418. sub edit
  419. set rs=yxbbs.execute("select id,orders,ispic,pic,bbsname,url,readme from[yx_link]where id="&id&"")
  420. if rs.eof then
  421. call goback("这条论坛联盟不存在!")
  422. exit sub
  423. end if
  424. %>
  425. <form method=post name=form style='margin:0' action=?action=saveedit>
  426. <div class="ta">
  427. <div class="th jz">修改论坛联盟</div>
  428. <div class="td1 h22">论坛名称:</div>
  429. <div class="td2 h22"><input name="id" value="<%=rs("id")%>" type="hidden"><input type="text" name="bbsname" size="20" value="<%=rs("bbsname")%>"></div>
  430. <div class="td1 h22">论坛地址:</div>
  431. <div class="td2 h22"><input type="text" name="url" size="38" value="<%=rs("url")%>"></div>
  432. <div class="td1 h22">论坛图片:</div>
  433. <div class="td2 h22"><input type="text" name="pic" size="38" value="<%=rs("pic")%>"></div>
  434. <div class="td1 h22">论坛说明:</div>
  435. <div class="td2 h22"><input type="text" name="readme" size="38" value="<%=rs("readme")%>"></div>
  436. <div class="td1 h22">图片显示:</div>
  437. <div class="td2 h22"><input type="radio" name="ispic" value="yes" <%if rs("ispic") then%> checked="true" <%end if%>>  是 <input type="radio" name="ispic" value="no" <%if not rs("ispic") then%> checked="true" <%end if%>> 否</div>
  438. <div style="clear: both;"></div><div class="tf jz w770"><input type="submit" value=" 提 交 ">&nbsp;&nbsp;<input type="reset" value=" 重 置 "></div>
  439. </div> </form>
  440. <%rs.close
  441. end sub
  442. sub updatelink
  443. dim id,i,orders,ispic
  444. for i=1 to request.form("id").count
  445. id = replace(request.form("id")(i),"'","")
  446. orders = replace(request.form("orders")(i),"'","")
  447. ispic= replace(request.form("ispic"&i&""),"'","")
  448. if not isnumeric(id) or not isnumeric(orders) then
  449. call goback("","请用数字填写!")
  450. exit sub
  451. end if
  452. yxbbs.execute("update [yx_link]set orders="&orders&",ispic="&ispic&" where id="&id&"")
  453. next
  454. cache.name="link_list":cache.clean()
  455. call suc("","更新联盟信息成功!","basic.asp?action=link")
  456. end sub
  457. sub saveadd
  458. dim bbsname,url,pic,readme,orders,ispic
  459. bbsname=yxbbs.fun.getstr("bbsname")
  460. url=yxbbs.fun.ubbg(yxbbs.fun.getstr("url"))
  461. pic=yxbbs.fun.getstr("pic")
  462. readme=yxbbs.fun.getstr("readme")
  463. ispic=yxbbs.fun.getstr("ispic")
  464. if bbsname=""  or url=""  then
  465. call goback("","")
  466. exit sub
  467. elseif not yxbbs.fun.checkname(bbsname) then
  468. call goback("","请不要使用了非法字符")
  469. exit sub
  470. end if
  471. orders=yxbbs.execute("select count(id) from[yx_link]")(0)
  472. orders=int(orders+1)
  473. yxbbs.execute("insert into[yx_link](bbsname,url,pic,readme,orders,ispic)values('"&bbsname&"','"&url&"','"&pic&"','"&readme&"',"&orders&","&ispic&")")
  474. cache.name="link_list":cache.clean()
  475. call suc("","添加论坛联盟成功!","basic.asp?action=link")
  476. end sub
  477. sub saveedit
  478. dim bbsname,url,pic,readme,id,ispic
  479. id=yxbbs.fun.getstr("id")
  480. bbsname=yxbbs.fun.getstr("bbsname")
  481. url=yxbbs.fun.ubbg(yxbbs.fun.getstr("url"))
  482. pic=yxbbs.fun.getstr("pic")
  483. readme=yxbbs.fun.getstr("readme")
  484. ispic=yxbbs.fun.getstr("ispic")
  485. if bbsname=""  or url=""  then
  486. call goback("","")
  487. exit sub
  488. elseif not yxbbs.fun.checkname(bbsname) then
  489. call goback("","请不要使用了非法字符")
  490. exit sub
  491. end if
  492. yxbbs.execute("update [yx_link]set url='"&url&"',pic='"&pic&"',bbsname='"&bbsname&"',readme='"&readme&"',ispic="&ispic&" where id="&id&"")
  493. cache.name="link_list":cache.clean()
  494. call suc("","修改论坛联盟成功!","basic.asp?action=link")
  495. end sub
  496. sub dellink
  497. dim id
  498. id=request.querystring("id")
  499. if  not isnumeric(id) then
  500. call goback("","提交的参数不正确!")
  501. else
  502. yxbbs.execute("delete from [yx_link] where id="&id&"")
  503. cache.name="link_list":cache.clean()
  504. call suc("","删除论坛联盟成功!","basic.asp?action=link")
  505. end if
  506. end sub
  507. sub lockip%>
  508. <form method=post name=form style='margin:0' action=?action=saveaddip>
  509. <div class="ta"> 
  510. <div class="th jz">ip封锁</div> 
  511. <div class="td1 h22">起始ip:</div> 
  512. <div class="td2 h22">&nbsp;<input name='startip' type='text'></div> 
  513. <div class="td1 h22">结束ip:</div> 
  514. <div class="td2 h22">&nbsp;<input name='endip' type='text'> *封锁单个ip时不必填写</div> 
  515. <div class="td1 h22">封禁说明:</div> 
  516. <div class="td2 h22">&nbsp;<input name='readme' type='text' style="width:90%"></div> 
  517. <div style="clear: both;"></div><div class="tf w770 jz"><input type="submit" value=" 提 交 ">&nbsp;&nbsp;<input type="reset" value=" 重 置 "></div>
  518. </div></form><br />
  519. <div class="ta">
  520. <div class="th jz">已经被封的ip记录</div>
  521. <div class="td3 jz w231">网段</div><div class="td3 jz w231">说明</div><div class="td3 jz w291">操作</div>
  522. <% 
  523. set rs=yxbbs.execute("select startip,endip,readme,id from [yx_lockip]")
  524. if rs.eof then
  525. response.write"<div style=""clear: both;""></div><div class=""tf jz w770"" >没有记录</div>"
  526. else
  527. do while not rs.eof
  528.                response.write"<div class=""td3 jz w231"">"&yxbbs.fun.ipdecode(rs("startip"))&" - "&yxbbs.fun.ipdecode(rs("endip"))&"</div><div class=""td3 jz w231"">&nbsp;"&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 />"
  529. rs.movenext
  530. loop
  531. end if
  532. rs.close
  533. %>
  534. <div style="clear: both;"></div></div>
  535. <%end sub
  536. sub editip
  537. set rs=yxbbs.execute("select startip,endip,readme,id from[yx_lockip] where id="&id&"")
  538. if rs.eof then
  539. call goback("","记录不存在"):exit sub
  540. end if
  541. %>
  542. <form method=post name=form style='margin:0' action=?action=saveeditip>
  543. <div class="ta"> 
  544. <div class="th jz">ip封锁</div> 
  545. <div class="td1 h22" >起始ip:</div> 
  546. <div class="td2 h22" >&nbsp;<input name="id" value="<%=rs("id")%>" type="hidden"><input name='startip' type='text' value="<%=yxbbs.fun.ipdecode(rs("startip"))%>"></div> 
  547. <div class="td1 h22" >结束ip:</div> 
  548. <div class="td2 h22" >&nbsp;<input name='endip' type='text' value="<%=yxbbs.fun.ipdecode(rs("endip"))%>"> *封锁单个ip时不必填写</div> 
  549. <div class="td1 h22" >封禁说明:</div> 
  550. <div class="td2 h22" >&nbsp;<input name='readme' type='text' style="width:90%" value="<%=rs("readme")%>"></div> 
  551. <div style="clear: both;"></div><div class="tf w770 jz" ><input type="submit" value=" 提 交 ">&nbsp;&nbsp;<input type="reset" value=" 重 置 "></div>
  552. </div></form>
  553. <%
  554. rs.close
  555. end sub
  556. sub delip
  557. dim id
  558. id=int(request("id"))
  559. yxbbs.execute("delete from[yx_lockip] where id="&id&"")
  560. cache.name="ipdata"
  561. cache.clean()
  562. response.redirect "?action=lockip"
  563. end sub
  564. sub saveaddip
  565. dim startip,endip,readme
  566. startip=yxbbs.fun.getstr("startip")
  567. endip=yxbbs.fun.getstr("endip")
  568. readme=yxbbs.fun.getstr("readme")
  569. if startip="" then
  570. call goback("","")
  571. exit sub
  572. end if
  573. if endip="" then endip=startip
  574. yxbbs.execute("insert into [yx_lockip](startip,endip,readme)values("&yxbbs.fun.ipencode(startip)&","&yxbbs.fun.ipencode(endip)&",'"&readme&"')")
  575. call suc("操作成功","成功添加封锁ip纪录!","?action=lockip")
  576. cache.name="ipdata"
  577. cache.clean()
  578. end sub
  579. sub saveeditip
  580. dim id,startip,endip,readme
  581. id=yxbbs.fun.getstr("id")
  582. startip=yxbbs.fun.getstr("startip")
  583. endip=yxbbs.fun.getstr("endip")
  584. readme=yxbbs.fun.getstr("readme")
  585. if startip="" then
  586. call goback("",""):exit sub
  587. end if
  588. if endip="" then endip=startip
  589. yxbbs.execute("update [yx_lockip]set startip="&yxbbs.fun.ipencode(startip)&",endip="&yxbbs.fun.ipencode(endip)&",readme='"&readme&"' where id="&id&"")
  590. call suc("","修改封锁ip成功!","?action=lockip")
  591. cache.name="ipdata"
  592. cache.clean()
  593. end sub
  594. sub setad
  595. %>
  596. <form method=post action=?action=savead>
  597. <div class="ta"> 
  598. <div class="th jz">广告管理</div> 
  599. <div class="td1 jz h70" style="float: left;text-align: left;">论坛已有广告的显示效果:</div> 
  600. <div class="td2 jz h70" style="float: left;text-align: left;">论坛已有广告的代码:<br />清空代码即删除广告。<br /><font color=red>注意:此处仅支持简单的文字图片连接,不支持google adsense等广告!</div> 
  601. <%
  602. dim fso1,openfile,tmpstr,tmp,ad_num,ad_i,ad_tmp
  603. set fso1 = server.createobject("scripting.filesystemobject")
  604. Set openfile=fso1.OpenTextFile(Server.MapPath("../inc/ads.js"))
  605. tmpstr=openfile.readall
  606. tmp=split(tmpstr,chr(13)&chr(10))
  607. ad_num=replace(tmp(1),"a = ","")
  608. ad_num=int(replace(ad_num,";if(a==0){a=1}",""))
  609. for ad_i=1 to ad_num
  610. ad_tmp=replace(tmp(ad_i+8),"b["&ad_i&"].under =","")
  611. ad_tmp=replace(ad_tmp,"'","")
  612. 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>"
  613. next
  614. openfile.close
  615. set fso1=nothing
  616. %>  
  617. <div class="td1 h75">增加广告:</div> 
  618. <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> 
  619. <div style="clear: both;"></div><div class="tf jz"> <input type="submit" value="     确  认  修  改     " name="b1"></div>
  620. </div></form>
  621. <%
  622. end sub
  623. sub savead
  624. dim adv_num,ad_msg,fso1,OpenFile,tmpstr,tmp,ad_num,ad_i,ad_tmp
  625. set fso1 = server.createobject("scripting.filesystemobject")
  626. Set openfile=fso1.OpenTextFile(Server.MapPath("../inc/ads.js"))
  627. tmpstr=openfile.readall
  628. tmp=split(tmpstr,chr(13)&chr(10))
  629. ad_num=replace(tmp(1),"a = ","")
  630. ad_num=int(replace(ad_num,";if(a==0){a=1}",""))
  631. openfile.close
  632. set fso1=nothing
  633. adv_num=0
  634. for ad_i=1 to ad_num+1
  635. ad_tmp=replace(request.form("ad_v"&ad_i&""),"'","")
  636. if trim(ad_tmp)<>"" or isnull(ad_tmp)then
  637. adv_num=adv_num+1
  638. ad_msg=ad_msg&"b["&adv_num&"].under ='"&ad_tmp&"'"&vbcrlf
  639. end if
  640. next
  641. dim objFSO,objname
  642. Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
  643. Set objname=objFSO.CreateTextFile(Server.MapPath("../inc/ads.js"),True)
  644. 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&"//-->"
  645. objname.close
  646. set objfso=nothing
  647. response.redirect"?action=setad"
  648. end sub
  649. sub updatebbs
  650. %>
  651. <div class="ta">
  652. <div class="th jz">论坛整理修复</div>
  653. <div class="tf h30"><b>注意事项:</b>论坛整理中的各项运行都需要消耗比较多的资源<br />所以请你选择论坛访问人数较少的时候进行整理,或者在整理过程中可以先暂时关闭论坛</div>
  654. <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>
  655. <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>
  656. <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>
  657. <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>
  658. <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>
  659. <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>
  660. <div style="clear: both;"></div></div>
  661. <%
  662. end sub
  663. sub execlean
  664. application.contents.removeall
  665. call suc("","更新缓存成功","?action=updatebbs")
  666. end sub
  667. sub updatebbsdate
  668. dim essaynum,topicnum,newuser,todaynum,usernum,alltable,i
  669. usernum=yxbbs.execute("select count(id) from[yx_user]")(0)
  670. newuser=yxbbs.execute("select top 1 name from [yx_user] order by id desc")(0)
  671. alltable=split(yxbbs.bbstable(0),",")
  672. for i=0 to ubound(alltable)
  673. essaynum=essaynum+yxbbs.execute("select count(bbsid) from[yx_bbs"&alltable(i)&"] where isdel=false")(0)
  674. todaynum=todaynum+yxbbs.execute("select count(bbsid) from[yx_bbs"&alltable(i)&"] where isdel=false and datediff('d',lasttime,'"&yxbbs.nowbbstime&"')<1")(0)
  675. next
  676. topicnum=yxbbs.execute("select count(topicid) from[yx_topic]")(0)
  677. yxbbs.execute("update [yx_config] set usernum="&usernum&",allessaynum="&essaynum&",topicnum="&topicnum&",todaynum="&todaynum&",newuser='"&newuser&"'")
  678. call suc("论坛系统整理成功","论坛系统整理成功,整理后:<li>总帖数:"&essaynum&" | 主题数:"&topicnum&" | 今日帖数:"&todaynum&" | 注册用户数:"&usernum&" | 最新注册用户:"&newuser&"","?action=updatebbs")
  679. cache.name="config"
  680. cache.clean()
  681. end sub
  682. sub updatetopic
  683. dim caption,content,id1,id2,lastreply,go,replynum,alltable,i,temp,maxid
  684. id1=yxbbs.fun.getstr("id1")
  685. id2=yxbbs.fun.getstr("id2")
  686. maxid=yxbbs.execute("select max(topicid)from [yx_topic]")(0)
  687. if id1="" then
  688. id1=1:id2=100
  689. go= " 开始整理 "
  690. else
  691. if not isnumeric(id1) or not isnumeric(id2) then call goback("","<li>请用数字填写!"):exit sub
  692. set rs=yxbbs.execute("select topicid,sqltableid from [yx_topic] where topicid>="&id1&" and topicid<="&id2&"")
  693. if rs.eof then
  694. if int(id2) < int(maxid) then
  695. call goback("数据据中没有数据","在id:<font color=red>"&id1&"</font> 至 <font color=red>"&id2&"</font> 之间不存在帖子,请把结束id的数字填大一些。")
  696. else
  697. call suc("整理结束","全部整理成功!","?action=updatebbs")
  698. end if
  699. exit sub
  700. end if
  701. alltable=split(yxbbs.bbstable(0),",")
  702. do while not rs.eof
  703. for i=0 to ubound(alltable)
  704. if int(rs(1))=int(alltable(i)) then
  705. replynum=yxbbs.execute("select count(bbsid) from [yx_bbs"&rs(1)&"] where isdel=false and replytopicid="&rs(0)&"")(0)
  706. yxbbs.execute("update [yx_topic] set replynum="&replynum&" where topicid="&rs(0)&"")
  707. exit for
  708. end if
  709. next
  710. rs.movenext
  711. loop
  712. rs.close
  713. temp=id1
  714. id1=int(id2)+1
  715. id2=int(id2)+int(id2)-int(temp)+1
  716. go=" 继续整理 "
  717. end if
  718. caption="主题帖子整理"
  719. content="<div style=""height:109px;text-align: left;""><form method=post action='?action=updatetopic' onsubmit='ok.disabled=true;ok.value=""正在整理-请稍等...""'>请填写你要整理的帖子的开始id和结束id:(两者之间不要相差太大)<br />你的论坛帖子最大的 id 为:"&maxid&"<br />初始id:<input type=text name='id1' size=20 value="&id1&"><br />结束id:<input type=text name='id2' size=20 value="&id2&"><br /><input type=submit name='ok' value="&go&"><input type=reset value=' 重 置 '> </p></form></div>"
  720. call showtable(caption,content)
  721. end sub
  722. sub updatealluser
  723. dim caption,content,id1,id2,gradenum,goodnum,essaynum,ug,go,alltable,i,temp,maxid
  724. id1=yxbbs.fun.getstr("id1"):id2=yxbbs.fun.getstr("id2")
  725. maxid=yxbbs.execute("select max(id)from [yx_user]")(0)
  726. if id1="" then
  727. id1=1:id2=100
  728. go= " 开始整理 "
  729. else
  730. if not isnumeric(id1) or not isnumeric(id2) then call goback("","<li>请用数字填写!"):exit sub
  731. set rs=yxbbs.execute("select name,classid from [yx_user] where id>="&id1&" and id<="&id2&"")
  732. if rs.eof then
  733. if int(id2) < int(maxid) then
  734. call goback("数据据中没有数据","在id:<font color=red>"&id1&"</font> 至 <font color=red>"&id2&"</font> 之间不存在用户,请把结束id的数字填大一些。")
  735. else
  736. call suc("整理结束","全部整理成功!","?action=updatebbs")
  737. end if
  738. exit sub
  739. end if
  740. alltable=split(yxbbs.bbstable(0),",")
  741. do while not rs.eof
  742. essaynum=0
  743. goodnum=0
  744. for i=0 to ubound(alltable)
  745. essaynum=essaynum+yxbbs.execute("select count(bbsid) from [yx_bbs"&alltable(i)&"] where name='"&rs(0)&"'")(0)
  746. next
  747. goodnum=yxbbs.execute("select count(topicid) from [yx_topic] where name='"&rs(0)&"' and isgood=true")(0)
  748. set ug=yxbbs.execute("select top 1 gradenum from yx_usergrade where classid="&rs(1)&" and userminpostnum<="&essaynum&" order by userminpostnum desc")
  749. if not ug.eof then
  750. gradenum=ug(0)
  751. end if
  752. ug.close
  753. set ug=nothing
  754. yxbbs.execute("update [yx_user] set essaynum="&essaynum&",goodnum="&goodnum&",gradenum="&gradenum&" where name='"&rs(0)&"'")
  755. rs.movenext
  756. loop
  757. rs.close
  758. temp=id1
  759. id1=int(id2)+1
  760. id2=int(id2)+int(id2)-int(temp)+1
  761. go=" 继续整理 "
  762. end if
  763. caption="用户整理修复"
  764. content="<form method=post action='?action=updatealluser' onsubmit='ok.disabled=true;ok.value=""正在整理-请稍等...""'><div style=""height:109px;text-align: left;"">请填写你要整理用户的开始id和结束id:(两者之间不要相差太大)<br />论坛注册用户最大的 id 为:"&maxid&"<br />初始id:<input type=text name='id1' size=20 value="&id1&"><br />结束id:<input type=text name='id2' size=20 value="&id2&"><br /><input name='ok'  type=submit value="&go&" ><input type=reset value=' 重 置 '> </p></div></form>"
  765. call showtable(caption,content)
  766. end sub
  767. sub delwuiong
  768. dim ii,i,alltable%>
  769. <div class="ta">
  770. <div class="th jz">论坛垃圾清理</div>
  771. <div class="tf jz h75" style="text-align: left;"><b><span id=YxBBsT name=YxBBsT>正在清理无效主题!请稍等...</span></b><br /><img src="../images/hr.gif" width=0 height=16 id=YxBBsimg name=YxBBsimg align=absmiddle /><br /><span id=YxBBstxt name=YxBBstxt style="font-size:9pt">0</span><span style="font-size:9pt">%</span></div>
  772. </div>
  773. <%response.flush
  774. alltable=split(yxbbs.bbstable(0),",")
  775. for i=0 to ubound(alltable)
  776. yxbbs.execute("delete * from [yx_bbs"&alltable(i)&"] where topicid<>0 and not exists (select name from [yx_topic] where [yx_bbs"&alltable(i)&"].topicid=[yx_topic].topicid)")
  777. yxbbs.execute("delete * from [yx_topic] where sqltableid="&alltable(i)&" and not exists (select name from [yx_bbs"&alltable(i)&"] where [yx_topic].topicid=[yx_bbs"&alltable(i)&"].topicid)")
  778. next
  779. call table("无效主题清理完毕!","")
  780. call picpro(1,6,"正在清理无效投票!请稍等...")
  781. yxbbs.execute("delete * from [yx_topicvote] where  not exists (select name from [yx_topic] where [yx_topicvote].topicid=[yx_topic].topicid)")
  782. yxbbs.execute("delete * from [yx_topicvoteuser] where  not exists (select name from [yx_topic] where [yx_topicvoteuser].topicid=[yx_topic].topicid)")
  783. call table("无效投票清理完毕!","")
  784. call picpro(2,6,"正在清理无效留言!请稍等...")
  785. yxbbs.execute("delete * from [yx_sms] where not exists (select name from [yx_user] where [yx_sms].myname=[yx_user].name)")
  786. call table("无效留言清理完毕!","")
  787. call picpro(3,6,"正在清理删除用户的帖子!请稍等...")
  788. for i=0 to ubound(alltable)
  789. yxbbs.execute("delete * from [yx_bbs"&alltable(i)&"] where not exists (select name from [yx_user] where [yx_bbs"&alltable(i)&"].name=[yx_user].name)")
  790. next
  791. yxbbs.execute("delete * from [yx_topic] where not exists (select name from [yx_user] where [yx_topic].name=[yx_user].name)")
  792. call table("无效用户的帖子清理完毕!","")
  793. call picpro(4,6,"正在清理无效回复帖子!请稍等...;")
  794. for i=0 to ubound(alltable)
  795. set rs=yxbbs.execute("select replytopicid from [yx_bbs"&alltable(i)&"] where replytopicid<>0")
  796. do while not rs.eof
  797. if yxbbs.execute("select topicid from [yx_bbs"&alltable(i)&"] where topicid="&rs(0)&"").eof then
  798. yxbbs.execute("delete from [yx_bbs"&alltable(i)&"] where replytopicid="&rs(0)&"")
  799. end if
  800. rs.movenext
  801. loop
  802. rs.close
  803. next
  804. call table("无效回复清理完毕!","")
  805. Response.Write "<script>YxBBsimg.width=400;YxBBstxt.innerHTML=""100"";YxBBsT.innerHTML=""<font color=red>成功完成整理!</font>"";</script>"
  806. end sub
  807. '进度条
  808. Sub PicPro(i,sum,strtxt)
  809. Response.Write "<script>YxBBsimg.width=" & Fix((i/sum) * 400) & ";" & VbCrLf
  810. Response.Write "YxBBstxt.innerHTML=""" & FormatNumber(i/sum*100,4,-1) & """;" & VbCrLf
  811. Response.Write "YxBBsT.innerHTML="""& StrTxt & """;"& VbCrLf
  812. Response.Write "</script>" & VbCrLf
  813. Response.Flush
  814. End Sub
  815. sub boardupdate
  816. %>
  817. <div class="ta">
  818. <div class="th jz">论坛版面整理</div>
  819. <div class="tf jz h75" style="text-align: left;"><b><span id=YxBBsT name=YxBBsT>数据版面正在整理,请稍等</span></b><br /><img src="../images/hr.gif" width=0 height=16 id=YxBBsimg name=YxBBsimg align=absmiddle><br /><span id=YxBBstxt name=YxBBstxt style="font-size:9pt">0</span><span style="font-size:9pt">%</span></div>
  820. </div>
  821. <%response.flush
  822. dim boardnum,essaynum,topicnum,todaynum,parentstr,lastreply,lastcaption
  823. dim alltable,i,ii,iii,sql
  824. boardnum=yxbbs.execute("select count(boardid) from[yx_board] where parentid<>0")(0)
  825. ii=0
  826. set rs=yxbbs.execute("select boardid,boardname,child,parentstr,rootid from[yx_board] where parentid<>0  order by child,rootid,orders desc")
  827. if not rs.eof then 
  828. sql=rs.getrows()
  829. rs.close
  830. for i=0 to ubound(sql,2)
  831. essaynum=0
  832. topicnum=0
  833. todaynum=0
  834. lastreply=""
  835. lastcaption="无"
  836. alltable=split(yxbbs.bbstable(0),",")
  837. for iii=0 to ubound(alltable)
  838. essaynum=essaynum+yxbbs.execute("select count(*) from[yx_bbs"&alltable(iii)&"] where boardid="&sql(0,i)&" and isdel=false")(0)
  839. todaynum=todaynum+yxbbs.execute("select count(*) from[yx_bbs"&alltable(iii)&"] where boardid="&sql(0,i)&" and isdel=false and datediff('d',[lasttime],'"&yxbbs.nowbbstime&"')<1")(0)
  840. next
  841. topicnum=yxbbs.execute("select count(topicid) from[yx_topic] where boardid="&sql(0,i)&" and isdel=false")(0)
  842. set rs=yxbbs.execute("select top 1 topicid,name,caption,addtime,face,sqltableid,boardid from [yx_topic] where isdel=false and boardid="&sql(0,i)&" order by topicid desc")
  843. if not rs.eof then
  844. lastcaption=replace(yxbbs.fun.strleft(rs("caption"),20),"'","&#39;")
  845. lastreply=rs("name")&"|"&lastcaption&"|"&rs("addtime")&"|"&rs("face")&"|"&rs("topicid")&"|"&rs("boardid")&"|"&rs("sqltableid")&""
  846. end if
  847. rs.close
  848. yxbbs.execute("update [yx_board] set essaynum="&essaynum&",todaynum="&todaynum&",topicnum="&topicnum&",lastreply='"&lastreply&"' where boardid="&sql(0,i)&"")
  849. '如果有上级论坛,那么更新上级论坛
  850. if sql(2,i)>0 then
  851. parentstr=sql(3,i) & "," & sql(0,i)
  852. set rs=yxbbs.execute("select sum(essaynum),sum(topicnum),sum(todaynum) from [yx_board] where parentstr = '"&parentstr&"'")
  853. if not isnull(rs(0)) then essaynum = rs(0) + essaynum
  854. if not isnull(rs(1)) then topicnum = rs(1) + topicnum
  855. if not isnull(rs(2)) then todaynum = rs(2) + todaynum
  856. rs.close
  857. set rs=yxbbs.execute("select top 1 topicid,name,caption,addtime,face,sqltableid,boardid from [yx_topic] where isdel=false and boardid in ("&parentstr&") order by lasttime desc")
  858. if not rs.eof then
  859. lastcaption=replace(yxbbs.fun.strleft(rs("caption"),20),"'","&#39;")
  860. lastreply=rs("name")&"|"&lastcaption&"|"&rs("addtime")&"|"&rs("face")&"|"&rs("topicid")&"|"&rs("boardid")&"|"&rs("sqltableid")&""
  861. end if
  862. rs.close
  863. yxbbs.execute("update [yx_board] set essaynum="&essaynum&",todaynum="&todaynum&",topicnum="&topicnum&",lastreply='"&lastreply&"' where boardid="&sql(0,i)&"")
  864. end if
  865. call table("论坛 <font color=blue>"&sql(1,i)&"</font> 整理成功","总帖数"&essaynum&" | 主题数:"&topicnum&" | 今日帖:"&todaynum&" | 最新主题:"&lastcaption&"")
  866. ii=ii+1
  867. Response.Write "<script>YxBBsimg.width=" & Fix((ii/BoardNum) * 400) & ";" & VbCrLf
  868. Response.Write "YxBBstxt.innerHTML=""" & FormatNumber(ii/BoardNum*100,4,-1) & """;" & VbCrLf
  869. Response.Write "</script>" & VbCrLf
  870. response.flush
  871. next
  872. end if
  873. Response.Write "<script>YxBBsimg.width=400;YxBBstxt.innerHTML=""100"";YxBBsT.innerHTML=""<font color=red>成功完成整理!</font>"";</script>"
  874. end sub
  875. %>