<%
Set bbsinfo = Server.CreateObject("ADODB.Recordset")
sql = "SELECT *  FROM bbsinfo"
bbsinfo.open sql, conn, 1,1
bbsname=bbsinfo("bbsname")
logo=bbsinfo("logo")
logourl=bbsinfo("logourl")
ll=bbsinfo("ll")
tp=bbsinfo("tp")
online=bbsinfo("online")
advshow=bbsinfo("advshow")
smtp=bbsinfo("smtp")
MailServerUserName=bbsinfo("MailServerUserName")
MailServerPassword=bbsinfo("MailServerPassword")
upload=bbsinfo("upload")
uploadlx=bbsinfo("uploadlx")
bbsinfo.close
set bbsinfo=nothing
if upload=0 and session("manbid")<>20000 then
	response.Write(""&uploadlx&"<br><br><br><a href='javascript:history.back(1)' ><font color='red'>点击返回</font></a>")
	response.End()
end if
if session("username") <> empty then
sql="select * from [shop_user] where username='"&session("username")&"'"
Set Rs=Conn.Execute(SQL)
if rs.eof then session("username")=""
if session("userpassword") <> rs("UserPassword") then session("username")=""
if int(session("manbid"))<>rs("manbid") then session("username")=""
set rs=nothing 
end if
function HTMLEncode(fString)
fString=replace(fString,";","&#59;")
fString=replace(fString,"<","&lt;")
fString=replace(fString,">","&gt;")
fString=replace(fString,"\","&#92;")
fString=replace(fString,"--","&#45;&#45;")
fString=replace(fString,"'","&#39;")
fString=replace(fString,CHR(34),"&quot;")
fString=replace(fString,vbCrlf,"<br>")
HTMLEncode=fString
end function
''''''''''替换模块START''''''''''''
Function ReplaceText(fString,patrn, replStr)
Set regEx = New RegExp  ' 建立正则表达式。
regEx.Pattern = patrn   ' 设置模式。
regEx.IgnoreCase = True ' 设置是否区分大小写。
regEx.Global = True     ' 设置全局可用性。 
ReplaceText = regEx.Replace(fString, replStr) ' 作替换。
End Function
''''''''''替换模块END''''''''''''
function ContentEncode(fString)
fString=Replace(fString ,vbCrLf,"<br>")
fString=Replace(fString,chr(32)&chr(32), "<BR>")
fString=replace(fString,vbCrlf, "")
fString=replace(fString,"\","&#92;")
fString=replace(fString,"'","&#39;")
fString=replace(fString,"我爱你gege","<Img src=../gege.jpg>")
fString=ReplaceText(fString,"<(.[^>]*)(&#|cookie|window.|Document.|javascript:|js:|vbs:|about:|file:|on(blur|click|change|Exit|error|focus|finish|key|load|mouse))", "&lt;$1$2$3")
fString=ReplaceText(fString,"<(\/|)(iframe|object|SCRIPT|form|style|meta|TEXTAREA)", "&lt;$1$2")
ContentEncode=fString
end function
function IsValidEmail(email)
dim names, name2, i, c
IsValidEmail = true
names = Split(email, "@")
if UBound(names) <> 1 then
   IsValidEmail = false
   exit function
end if
for each name2 in names
   if Len(name2) <= 0 then
     IsValidEmail = false
     exit function
   end if
   for i = 1 to Len(name2)
     c = Lcase(Mid(name2, i, 1))
     if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then
       IsValidEmail = false
       exit function
     end if
   next
   if Left(name2, 1) = "." or Right(name2, 1) = "." then
      IsValidEmail = false
      exit function
   end if
next
if InStr(names(1), ".") <= 0 then
   IsValidEmail = false
   exit function
end if
i = Len(names(1)) - InStrRev(names(1), ".")
if i <> 2 and i <> 3 then
   IsValidEmail = false
   exit function
end if
if InStr(email, "..") > 0 then
   IsValidEmail = false
end if
end function
function strLength(str)
       ON ERROR RESUME NEXT
       dim WINNT_CHINESE
       WINNT_CHINESE    = (len("会员")=2)
       if WINNT_CHINESE then
          dim l,t,c
          dim i
          l=len(str)
          t=l
          for i=1 to l
             c=asc(mid(str,i,1))
             if c<0 then c=c+65536
             if c>255 then
                t=t+1
             end if
          next
          strLength=t
       else 
          strLength=len(str)
       end if
       if err.number<>0 then err.clear
end function
response.write" <script src=inc/bbs.js></script>"
%>
