📄 conn.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
'option explicit
response.buffer=true
dim conn,connstr
Set Conn=Server.CreateObject("ADODB.Connection")
connstr ="Provider=Microsoft.jet.OLEDB.4.0; Data Source =" & chr(34) &Server.MapPath("gbook.mdb")& chr(34)
Conn.Open connstr
function encodestr(str)
dim i
str=trim(str)
if IsNull(str) then exit function
str=replace(str,"<","<")
str=replace(str,">",">")
str=replace(str,"'","""")
'str=replace(str,vbCrLf&vbCrlf,"</p><p>")
str=replace(str,vbCrLf,"<br/>")
encodestr=replace(str," "," ")
end function
dim killword
killword=split("fuck,他妈的",",")
function UBBCode(strContent)
if IsNull(strContent) then exit function
strContent=encodestr(strContent)
dim re,i
for i=0 to ubound(killword)
strContent=replace(lcase(strContent),killword(i),string(len(killword(i)),"*"))
next
Set re=new RegExp
re.IgnoreCase =true
re.Global=True
re.Pattern="(\[URL\])(.[^\[]*)(\[\/URL\])"
strContent= re.Replace(strContent,"<a href=""$2"" >$2</a>")
re.Pattern="(\[URL=(.[^\]]*)\])(.[^\[]*)(\[\/URL\])"
strContent= re.Replace(strContent,"<a href=""$2"" >$3</a>")
re.Pattern = "^(http://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)"
strContent = re.Replace(strContent,"<img src=""url.gif"" alt=""url""/><a href=""$1"">$1</a>")
re.Pattern = "(http://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)$"
strContent = re.Replace(strContent,"<img src=""url.gif"" alt=""url""/><a href=""$1"">$1</a>")
re.Pattern = "([^>=""])(http://[A-Za-z0-9\./=\?%\-&_~`@':+!]+)"
strContent = re.Replace(strContent,"$1<img src=""url.gif"" alt=""url""/><a href=""$2"">$2</a>")
set re=Nothing
UBBCode=strContent
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -