📄 char.inc
字号:
<%
const iis3onchsys=false '是否运行于IIS3+中文NT(或pws10a+中文win95)
const pwsonchsys=true '本参数是历史遗留问题,请不要改动它的值
const ANNOUNCE_ALL=false '是否允许一贴多投
const PrevAnnounce=false '是否允许显示前贴内容(如同回复EMAIL一样回复帖子)
const PRECHAR="> " ' 回复帖子时候的前导字符串,只有当PrevAnnounce=true时有效
const ANNOUNCE_MAXBYTE=16384 '帖子内容最大的字节数
const SCRIPT_TIMEOUT=300 '服务器ASP脚本超时时间值,建议不要使用
CONST REFRESH_TIME=0 '帖子列表刷新时间,如果其值<100时无效不刷新
const TIME_ADJUST=0 'hour '如果服务器远在海外,用于调整帖子加贴时间(调整为北京时间),其值您自定
const Need_password=true '是否加贴时每次都需要输入口令
dim WINNT_CHINESE
WINNT_CHINESE=(len("是否加贴")=4)
function strLength(str)
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
end function
function htmlencode(str)
dim result
dim l
if isnull(str) then
htmlencode=""
exit function
end if
l=len(str)
result=""
dim i
for i = 1 to l
select case mid(str,i,1)
case "<"
result=result+"<"
case ">"
result=result+">"
case chr(34)
result=result+"""
case "&"
result=result+"&"
case chr(13)
result=result+"<br>"
case chr(9)
result=result+" "
case chr(32)
'result=result+" "
if i+1<=l and i-1>0 then
if mid(str,i+1,1)=chr(32) or mid(str,i+1,1)=chr(9) or mid(str,i-1,1)=chr(32) or mid(str,i-1,1)=chr(9) then
result=result+" "
else
result=result+" "
end if
else
result=result+" "
end if
case else
result=result+mid(str,i,1)
end select
next
htmlencode=result
end function
function htmlencode2(str)
dim result
dim l
if isnull(str) then
htmlencode2=""
exit function
end if
l=len(str)
result=""
dim i
for i = 1 to l
select case mid(str,i,1)
case "<"
result=result+"<"
case ">"
result=result+">"
case Chr(13) & Chr(10)
result=result+"<br>"
case chr(34)
result=result+"""
case "&"
result=result+"&"
case chr(9)
result=result+" "
case else
result=result+mid(str,i,1)
end select
next
htmlencode2=result
end function
sub ShowBody(Str)
dim result
dim l
l=len(str)
result=""
dim i
for i = 1 to l
select case mid(str,i,1)
case "<"
if mid(str,i,5)="<pic>" Then
result=result+"<div align='center'><img src='../upload/image/"
i=i+4
else
if mid(str,i,6)="</pic>" Then
result=result+"' onclick=doit(this.src) onMouseOver=this.style.cursor='hand';></div>"
i=i+5
else
if mid(str,i,6)="<file>" Then
result=result+"<a href='../upload/file/"
i=i+5
else
if mid(str,i,7)="</file>" Then
result=result+"'>点击下载</a>"
i=i+6
else
if mid(str,i,7)="<flash>" then
result=result+"<div align=center><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='550' height='400'><param name=movie value='../upload/swf/"
i=i+6
else
if mid(str,i,8)="</flash>" Then
result=result+"'><param name=quality value=high></object> </div>"
i=i+7
else
result=result+"<"
end if
end if
end if
end if
end if
end if
case ">"
result=result+">"
case "】"
If mid(str,i-1,1)=":" Then
result=result+"】<font color=#777777>"
Else
result=result+"】"
End If
case chr(34)
result=result+"""
case "&"
result=result+"&"
case Chr(13)
result=result+"<br>"
case chr(9)
result=result+" "
case chr(32)
'result=result+" "
if i+1<=l and i-1>0 then
if mid(str,i+1,1)=chr(32) or mid(str,i+1,1)=chr(9) or mid(str,i-1,1)=chr(32) or mid(str,i-1,1)=chr(9) then
result=result+" "
else
result=result+" "
end if
else
result=result+" "
end if
case else
result=result+mid(str,i,1)
end select
next
If InStr(result,"<font color=#777777>")<>0 Then
response.write result & "</font>"
Else
response.write result
End If
end sub
sub display(str)
if not isNULL(str) then
showbody str
end if
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -