<%@ Language=VBScript%> <% Response.Buffer=false Response.Expires=0 %> <!-- #include file="./dsnroot.asp" --> <!-- #include file="./links.asp" --> <% set cn=Server.CreateObject("ADODB.Connection") set rs=Server.CreateObject("ADODB.Recordset") set rs1=Server.CreateObject("ADODB.Recordset") cn.Open mycnstr xx=1 menu="0000100" id=Request.QueryString ("id") if id="" then id=0 else id=cint(id) end if
if id=0 then Response.Write (" <table width=778 align=center> <tr> <td bgcolor=dddddd height=500 width=100% align=center>参数错误!您没有选择要查看的话题 </td> </tr> </table>") Response.End end if if session("userflag")=1 and session("username") <>"" then sqltext="select flag from userls where enable=1 and username='"+session("username")+"' and flag=1" rs.Open sqltext,cn,1,1 if not rs.EOF then adminqx=1 else adminqx=0 end if rs.Close elseif session("adminusername") <>"" then adminqx=1 else adminqx=0 end if sqltext="select top 1 classid,count from bbs where enable=1 and id="&id rs.Open sqltext,cn,1,2 if not rs.EOF then rs("count")=rs("count")+1 classid=rs("classid") rs.Update end if rs.Close if classid <>0 then sqltext="select id,title from bbs_class where enable=1 and id="&classid rs.Open sqltext,cn,1,1 if not rs.EOF then class_titletxt=trim(rs("title")) end if rs.Close end if if flag=1 then if session("userflag") <>1 then err=1 end if end if
sqltext="select top 1 body from classes where enable=1 and id=55" rs.Open sqltext,cn,1,1 if not rs.EOF then glstr=trim(rs("body")) end if rs.Close
function checkstr3(str,ins,n) if ins <>"" then Dim arr arr=split(ins,"|",-1,1) for i=0 to ubound(arr) str=replace(str,arr(i),"**",1,-1,1) next end if str=checkstr(str,1) checkstr3=str end function