<!--#include file="../inc.asp"-->
<!--#include file="../ydzq.asp"-->
<!--#include file="saypz.asp"-->
<%Call head()
dim IP,lbmsg

TP=request("TP")
lbmsg=trim(request.form("bbslbtxt"))


if TP="ok" then



if lbmsg="做爱" or Instr(lbmsg,"鸡巴")>0 or Instr(lbmsg,"打飞机")>0 or Instr(lbmsg,"打炮")>0 Then
Call saycarda("出错")
Call Error("你的发言极其淫荡，请注意文明讲话！系统已记录！")
  end if

if lbmsg="\" or Instr(lbmsg,"sex")>0 or Instr(lbmsg,"$")>0 or Instr(lbmsg,"=")>0 or Instr(lbmsg,"*")>0 or Instr(lbmsg,"#")>0 or Instr(lbmsg,"+")>0 or Instr(lbmsg,"gkggk")>0 or Instr(lbmsg,"@")>0 or Instr(lbmsg,"%")>0 or Instr(lbmsg,"/")>0 or Instr(lbmsg,chr(32))>0 or Instr(lbmsg,"?")>0 or Instr(lbmsg,"")>0 or Instr(name,";")>0 or Instr(name,",")>0 or Instr(name,"'")>0 or Instr(name,"dfgjfdj")>0 or Instr(lbmsg,chr(34))>0 or Instr(lbmsg,chr(9))>0 or Instr(lbmsg,"fgkgfk")>0 or Instr(lbmsg,"$")>0 or Instr(name,"dfgjfdj")>0 Then
Call saycarda("出错")
Call Error("你的发言不能含有字符，说话请使用中文和英文字母，谢谢！")
  end if
if Instr(lbmsg,".com")>0 or Instr(lbmsg,".cOm")>0 or Instr(lbmsg,".Com")>0 Then
Call saycarda("出错")
Call Error("你的发言不能含有“.com”字眼，有广告成份！")
  end If
  
  if Instr(lbmsg,".info")>0 or Instr(lbmsg,".info")>0 or Instr(lbmsg,".info")>0 Then
  Call saycarda("出错")
Call Error("你的发言不能含有“.info”字眼，有广告成份！")
  end If

  if Instr(lbmsg,".INFO")>0 or Instr(lbmsg,".INFO")>0 or Instr(lbmsg,".INFO")>0 Then
  Call saycarda("出错")
Call Error("你的发言不能含有“.INFO”字眼，有广告成份！")
  end If
  if Instr(lbmsg,"wap.")>0 or Instr(lbmsg,"wap.")>0 or Instr(lbmsg,"wap.")>0 Then
  Call saycarda("出错")
Call Error("你的发言不能含有“wap.”字眼，有广告成份！")
  end If
  if Instr(lbmsg,"www.")>0 or Instr(lbmsg,"www.")>0 or Instr(lbmsg,"www.")>0 Then
  Call saycarda("出错")
Call Error("你的发言不能含有“www.”字眼，有广告成份！")
  end If

if Instr(lbmsg,".cn")>0 or Instr(lbmsg,".Cn")>0 or Instr(lbmsg,".cN")>0 Then
Call saycarda("出错")
Call Error("你的发言不能含有“.cn”字眼，有广告成份！<br/>系统已记录了你本次作！")
  end if
if Instr(lbmsg,".cc")>0 or Instr(lbmsg,".cC")>0 or Instr(lbmsg,".Cc")>0 Then
Call saycarda("出错")
Call Error("你的发言不能含有“.cc”字眼，有广告成份！<br/>系统已记录了你本次作！")
  end if

if Instr(lbmsg,".net")>0 or Instr(lbmsg,".Net")>0 or Instr(lbmsg,".neT")>0 Then
Call saycarda("出错")
Call Error("你的发言不能含有“.net”字眼，有广告成份！<br/>系统已记录了你本次作！")
  end if
if myjb<cint(bbslbsaytk) Then
Call saycarda("出错")
Call Error(""&getcent&"不足,每发表一次广播需"&bbslbsaytk&""&getcent&"")
  end if
if lbmsg="" Then
Call saycarda("出错")
  Call Error("广播不能为空！")
  end if
if len(lbmsg)>abs(gbnrzs) Then
Call saycarda("出错")
  Call Error("广播内容最多"&gbnrzs&"字！")
  end if

set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from lb where usid="&myid,conn,1,3
'if not rs.eof then
  'Call Error("两分钟内只能发表一次广播")
  'end if
  
rs.addnew
rs("bbslbtxt")=lbmsg
rs("writename")=myni
rs("usid")=myid
rs("writetime")=now()
rs.update
rs.close
set rs=Nothing
Dim bbslbsaytk1

bbslbsaytk1=-bbslbsaytk

If myjb < bbslbsaytk1 Then
Call Error(""&getcent&"不足,每次发布广播需"&bbslbsaytk&""&getcent&"!!")
else
conn.execute("update users set myjb=myjb-"&bbslbsaytk&" where id="&myid)
end if

Call cardz("广播成功！","index.asp?ID="&ID&"&amp;sid="&sid&"&amp;saytk="&saytk&"")

response.write"广播成功！<br/>正在返回....<br/>"
response.write"<a href=""index.asp?ID="&ID&"&amp;sid="&sid&"&amp;saytk="&saytk&""">继续广播</a><br/>"
Call headsay()
response.end
end If


Call saycarda("广播站")



response.write"<input type=""text"" name=""bbslbtxt"" maxlength=""100""/><br/>"
response.write"<anchor>我要发布广播"
response.write"<go method=""post"" href=""say.asp?sid="&sid&""">"
response.write"<postfield name=""bbslbtxt"" value=""$(bbslbtxt)""/>"
response.write"<postfield name=""TP"" value=""ok""/>"
response.write"</go></anchor><br/>"

set rs=Server.CreateObject("ADODB.Recordset")
  rs.open"select bbslbtxt,usid,writetime from lb order by id desc",conn,1,1
If Not rs.eof Then
	Dim PageSize,i
	PageSize=10						
	Dim Count,page,pagecount,gopage			
	gopage="winbbs.asp?sid="&sid&"&amp;"
	Count=rs.recordcount	
	page=int(request.QueryString ("page"))
	if page<=0 or page="" then page=1		
	pagecount=(count+pagesize-1)\pagesize	
        if page>pagecount then page=pagecount
	rs.move(pagesize*(page-1))
	For i=1 To PageSize     						
	If rs.eof Then Exit For

Response.write ""&i+(page-1)*PageSize&"."
  if rs("usid")<>0 then
  response.write"<a href=""../uinfo.asp?ID="&rs("usid")&"&amp;sid="&sid&""">"&uname(rs("usid"))&"</a>说:"&ubb(rs("bbslbtxt"))&"("&fordate2(rs("writeTime"))&")<br/>"
  else
  response.write"(匿名)"&ubb(rs("bbslbtxt"))&"("&fordate2(rs("writeTime"))&")<br/>"
  end if
	rs.moveNext
 	Next
	if page-pagecount<0 then response.write "<a href="""&gopage&"page="&page+1&""">下页</a>"
	if page>1 then response.write "<a href="""&gopage&"page="&page-1&""">上页</a>"
	if pagecount>1 then response.write "<br/><b>"&page&"</b>/"&pagecount&"页<input name=""page"" format=""*N"" value="""&page&""" type=""text"" maxlength=""5"" emptyok=""true"" size=""3""/><a href="""&gopage&"page=$(page)"">跳转</a><br/>"
Else
   Response.write "暂无相关记录！<br/>"
end if
rs.close
set rs=nothing
  function uname(fid)
 dim ru
 Set ru = Server.CreateObject("ADODB.Recordset")
 ru.Source ="SELECT name from users Where ID="&fid
 ru.open ru.Source,Conn,1,1
 if not ru.eof then
  uname=ru("name")
 else
 uname="用户不存在"
 end if
 ru.close
 set ru=nothing
 end function

conn.close
set conn=nothing
conn.close
set conn=nothing


Response.write "<br/><a href=""/bbs/index.asp?sid="&sid&"&amp;saytk="&saytk&""">[-社区首页-]</a><br/>"
Response.write "<a href=""/index.asp?sid="&sid&"&amp;saytk="&saytk&""">[-网站首页-]</a><br/>"
Call headsay()
%>
