📄 config.asp
字号:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--
========================================================================
/////popcorn3.0/////
copyright (c) 2004,by 521lu.com
all rights reserved
script written by h.q.
web site : http://www.521lu.com
mail : support@521lu.com
========================================================================
pls don't skip the copyright annoucement
========================================================================
-->
<%
'请设置以下参数
'---------------------------------------------------------------//
'首页(必须写在引号中)
url = "http://www.521lu.com/"
'管理员(在留言或回复时特殊显示,必须写在引号中)
master = "admin"
'管理密码(删除留言时使用,必须写在引号中)
password = "admin"
'设置留言本标题(必须写在引号中)
boardtitle="{popcorn3.0}"
'运行模式(其它模式暂时无法使用)
model="board"
'是否允许回复留言 (0=no 1=yes) (禁止后所有人都无法回复)
allowreply = 1
'每页显示数
pagesize = 10
'是否允许最新回复置顶 (0=no 1=yes)
top = 1
'---------------------------------------------------------------//
%>
<script language="JavaScript1.2">
<!--
function confirm_delete()
{
if (confirm("你确定真的要这么做吗?")){
return ture;
}
return false;
}
function CheckAll(form) {
for (var i=0;i<form.elements.length;i++) {
var e = form.elements[i];
if (e.name != 'chkall') e.checked = form.chkall.checked;
}
}
function add_validator(theform)
{
if (theform.name.value == "")
{
alert("please fill the blank!");
theform.name.focus();
return (false);
}
if (theform.content.value == "")
{
alert("please fill the blank!");
theform.content.focus();
return (false);
}
if (theform.email.value !== "")
{
var i=theform.email.value.length;
var temp = theform.email.value.indexOf('@');
var tempd = theform.email.value.indexOf('.');
if (temp > 1) {
if ((i-temp) > 3){
if ((i-tempd)>0){
return
}
}
}
alert("invalued email!");
theform.email.focus();
return (false);
}
return (true);
}
//-->
</script>
<%
dim db,conn
if db="" then db=server.mappath("data.asp")
set conn = server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq=" & db
function connclose
conn.close
set conn = nothing
end function
skin="."
function ubb_url(strtext)
dim strcontent
dim re,test
set re=new regexp
re.ignorecase =true
re.global=true
strcontent=strtext
re.pattern="\[url\]"
test=re.test(strcontent)
if test then
strcontent=re.replace(strcontent, chr(1) & "url" & chr(2))
re.pattern="\[\/url\]"
test=re.test(strcontent)
if test then
strcontent=re.replace(strcontent, chr(1) & "/url" & chr(2))
re.pattern="\x01url\x02(.[^\x01]*)\x01\/url\x02"
strcontent=re.replace(strcontent,"<a href=""$1"" target=_blank>$1</a>")
re.pattern="\x02"
strcontent=re.replace(strcontent, "]")
end if
re.pattern="\x01"
strcontent=re.replace(strcontent, "[")
end if
re.pattern="\[url=(.[^\[]*)\]"
test=re.test(strcontent)
if test then
strcontent=re.replace(strcontent, chr(1) & "url=$1" & chr(2))
re.pattern="\[\/url\]"
test=re.test(strcontent)
if test then
strcontent=re.replace(strcontent, chr(1) & "/url" & chr(2))
re.pattern="\x01url=(.[^\x01]*)\x02(.[^\x01]*)\x01\/url\x02"
strcontent=re.replace(strcontent,"<a href=""$1"" target=_blank>$2</a>")
re.pattern="\x02"
strcontent=re.replace(strcontent, "]")
end if
re.pattern="\x01"
strcontent=re.replace(strcontent, "[")
end if
set re=nothing
ubb_url=strcontent
end function
function ubb_email(strtext)
dim strcontent
dim re,test
set re=new regexp
re.ignorecase =true
re.global=true
strcontent=strtext
re.pattern="\[email\]"
test=re.test(strcontent)
if test then
strcontent=re.replace(strcontent, chr(1) & "email" & chr(2))
re.pattern="\[\/email\]"
test=re.test(strcontent)
if test then
strcontent=re.replace(strcontent, chr(1) & "/email" & chr(2))
re.pattern="\x01email\x02(\s+\@.[^\x01]*)\x01\/email\x02"
strcontent=re.replace(strcontent,"<img align=absmiddle src=images/email.gif><a href=""mailto:$1"">$1</a>")
re.pattern="\x02"
strcontent=re.replace(strcontent, "]")
end if
re.pattern="\x01"
strcontent=re.replace(strcontent, "[")
end if
re.pattern="\[email=(\s+\@.[^\[]*)\]"
test=re.test(strcontent)
if test then
strcontent=re.replace(strcontent, chr(1) & "email=$1" & chr(2))
re.pattern="\[\/email\]"
test=re.test(strcontent)
if test then
strcontent=re.replace(strcontent, chr(1) & "/email" & chr(2))
re.pattern="\x01email=(\s+\@.[^\x01]*)\x02(.[^\x01]*)\x01\/email\x02"
strcontent=re.replace(strcontent,"<img align=absmiddle src=images/email.gif><a href=""mailto:$1"" target=_blank>$2</a>")
re.pattern="\x02"
strcontent=re.replace(strcontent, "]")
end if
re.pattern="\x01"
strcontent=re.replace(strcontent, "[")
end if
set re=nothing
ubb_email=strcontent
end function
function ubb_color(strtext)
dim strcontent
dim re,test
set re=new regexp
re.ignorecase =true
re.global=true
strcontent=strtext
re.pattern="\[color=(.[^\[]*)\]"
test=re.test(strcontent)
if test then
strcontent=re.replace(strcontent, chr(1) & "color=$1" & chr(2))
re.pattern="\[\/color\]"
test=re.test(strcontent)
if test then
strcontent=re.replace(strcontent, chr(1) & "/color" & chr(2))
re.pattern="\x01color=(.[^\x01]*)\x02(.[^\x01]*)\x01\/color\x02"
strcontent=re.replace(strcontent,"<font color=$1>$2</font>")
re.pattern="\x02"
strcontent=re.replace(strcontent, "]")
end if
re.pattern="\x01"
strcontent=re.replace(strcontent, "[")
end if
set re=nothing
ubb_color=strcontent
end function
'参数:strcontent内容
function ubbcode(strcontent)
'html code
strcontent = htmlcode(strcontent)
strcontent = jscode(strcontent)
'ubbcode
dim re,ii,po
dim recontent,test
set re=new regexp
re.ignorecase =true
re.global=true
'url code
strcontent=ubb_url(strcontent)
'color code
strcontent=ubb_color(strcontent)
'email code
strcontent=ubb_email(strcontent)
'自动识别网址
re.pattern = "^((http|https|ftp|rtsp|mms):(\/\/|\\\\)[a-za-z0-9\./=\?%\-&_~`@[\]\':+!]+)"
strcontent = re.replace(strcontent,"<a target=_blank href=$1>$1</a>")
re.pattern = "((http|https|ftp|rtsp|mms):(\/\/|\\\\)[a-za-z0-9\./=\?%\-&_~`@[\]\':+!]+)$"
strcontent = re.replace(strcontent,"<a target=_blank href=$1>$1</a>")
re.pattern = "([^>=""])((http|https|ftp|rtsp|mms):(\/\/|\\\\)[a-za-z0-9\./=\?%\-&_~`@[\]\':+!]+)"
strcontent = re.replace(strcontent,"$1<a target=_blank href=$2>$2</a>")
'自动识别 www 网址
re.pattern = "([^(http://|http:\\)])((www|cn)[.](\w)+[.]{1,}(net|com|cn|org|cc)(((\/[\~]*|\\[\~]*)(\w)+)|[.](\w)+)*(((([?](\w)+){1}[=]*))*((\w)+){1}([\&](\w)+[\=](\w)+)*)*)"
strcontent = re.replace(strcontent,"<a target=_blank href=http://$2>$2</a>")
'em code
if instr(lcase(strcontent),"[em")>0 then
for i=1 to 60
strcontent=replace(lcase(strcontent),"[em"&i&"]","<img src=emot/"&i&".gif border=0 align=middle>")
next
else
re.pattern="\[em(.[^\[]*)\]"
strcontent=re.replace(strcontent,"")
end if
set objregexp=nothing
ubbcode=strcontent
set re=nothing
ubbcode=strcontent
end function
function htmlcode(htmlstr)
if not isnull(htmlstr) then
htmlstr = replace(htmlstr, ">", ">")
htmlstr = replace(htmlstr, "<", "<")
htmlstr = replace(htmlstr, chr(32), "<i></i> ")
htmlstr = replace(htmlstr, chr(9), " ")
htmlstr = replace(htmlstr, chr(34), """)
htmlstr = replace(htmlstr, chr(39), "'")
htmlstr = replace(htmlstr, chr(13), "")
htmlstr = replace(htmlstr, chr(10) & chr(10), "</p><p> ")
htmlstr = replace(htmlstr, chr(10), "<br> ")
htmlcode = htmlstr
end if
end function
'——脚本字符处理
function jscode(jsstr)
if not isnull(jsstr) then
dim ts
dim re
dim recontent
set re=new regexp
re.ignorecase =true
re.global=true
re.pattern="(javascript)"
ts=re.replace(jsstr,"javascript")
re.pattern="(jscript:)"
ts=re.replace(ts,"jscript:")
re.pattern="(js:)"
ts=re.replace(ts,"js:")
re.pattern="(value)"
ts=re.replace(ts,"value")
re.pattern="(about:)"
ts=re.replace(ts,"about:")
re.pattern="(file:)"
ts=re.replace(ts,"file:")
re.pattern="(document.cookie)"
ts=re.replace(ts,"documents.cookie")
re.pattern="(vbscript:)"
ts=re.replace(ts,"vbscript:")
re.pattern="(vbs:)"
ts=re.replace(ts,"vbs:")
re.pattern="(on(mouse|exit|error|click|key))"
ts=re.replace(ts,"on$2")
re.pattern="(&#)"
ts=re.replace(ts,"??#")
jscode=ts
set re=nothing
end if
end function
function checkstr(str)
dim tstr,l,i,ch
l=len(str)
for i=1 to l
ch=mid(str,i,1)
if ch="'" then
tstr=tstr+"'"
end if
tstr=tstr+ch
next
checkstr=tstr
end function
function formatlayout(strcontent)
formatlayout = strcontent
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -