⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mark.asp

📁 网乐下载系统SQL存储版
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
   dim WINNT_CHINESE 
   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 
   function isInteger(para)
       on error resume next
       dim str
       dim l,i
       if isNUll(para) then 
          isInteger=false
          exit function
       end if
       str=cstr(para)
       if trim(str)="" then
          isInteger=false
          exit function
       end if
       l=len(str)
       for i=1 to l
           if mid(str,i,1)>"9" or mid(str,i,1)<"0" then
              isInteger=false 
              exit function
           end if
       next
       isInteger=true
       if err.number<>0 then err.clear
   end function
   function cutStr(str,strlen)
		dim l,t,c
		l=len(str)
		t=0
		for i=1 to l
		c=Abs(Asc(Mid(str,i,1)))
		if c>255 then
		t=t+2
		else
		t=t+1
		end if
		if t>=strlen then
		cutStr=left(str,i)&"..."
		exit for
		else
		cutStr=str
		end if
		next
	end function
sub error()%><table cellpadding=3 cellspacing=0 border=0 width=95% align="center"><tr align="center"><td width="100%" height=21 style="BORDER-top: #0066cc 1px solid; BORDER-LEFT: <%=Tablebackcolor%> 1px solid; BORDER-RIGHT: <%=Tablebackcolor%> 1px solid" width="100%" valign="middle" background="<%=picurl%>topbg.gif"><font color="<%=TableFontcolor%>"><b>论坛出错信息...</b></font></td></tr><tr><td width="100%" style="background: #ffffff; BORDER-top: <%=Tablebackcolor%> 1px solid; BORDER-LEFT: <%=Tablebackcolor%> 1px solid; BORDER-RIGHT: <%=Tablebackcolor%> 1px solid"><b>非常抱歉!我发现了一个错误:</b><br><br><font color="007cd0"><b><%=errmsg%>,因此您不能进行下一步。</b></font><br><br><br>我的建议:<table cellpadding=0 cellspacing=0 border=0><tr><td height="1" width="500" bgcolor="red"></td></tr></table><li><center>请先<a href="login.asp">登陆</a>,或<a href="javascript:history.go(-1)">返回</a>重新填写</center><br><br><br>我认为对您有帮助的一些链接:<table cellpadding=0 cellspacing=0 border=0><tr><td height="1" width="300" bgcolor="red"></td></tr></table><br><li><a href=help.asp>查询系统的帮助文件</a><li><a href="mailto:<%=systememail%>">联系我们的工作人员</a></td></tr><tr align="center"><td width="100%" height=21 style="background: #E8F0FD; BORDER-top: #0066cc 1px solid; BORDER-LEFT: #0066cc 1px solid; BORDER-RIGHT: #0066cc 1px solid" width="100%"><a href="javascript:history.go(-1)"><img src="<%=picurl%>s1_ps_b_add.jpg" border="0" alt="返回上一页操作"></a></td></tr></table><% end sub
function browser(info)
    if Instr(info,"MSIE 5.5")>0 then
        browser="浏 览 器:Internet Explorer 5.5"
    elseif Instr(info,"MSIE 6.0")>0 then
        browser="浏 览 器:Internet Explorer 6.0"
    elseif Instr(info,"MSIE 5.01")>0 then
        browser="浏 览 器:Internet Explorer 5.01"
    elseif Instr(info,"MSIE 5.0")>0 then
        browser="浏 览 器:Internet Explorer 5.00"
    elseif Instr(info,"MSIE 4.0")>0 then
        browser="浏 览 器:Internet Explorer 4.01"
    else
        browser="浏 览 器:未知"
    end if
end function
function system(info)
    if Instr(info,"NT 5.1")>0 then
        system=system+"操作系统:Windows XP"
    elseif Instr(info,"NT 5")>0 then
        system=system+"操作系统:Windows 2000"
    elseif Instr(info,"NT 4")>0 then
        system=system+"操作系统:Windows NT4"
    elseif Instr(info,"98")>0 then
        system=system+"操作系统:Windows 98"
    elseif Instr(info,"95")>0 then
        system=system+"操作系统:Windows 95"
    else
        system=system+"操作系统:未知"
    end if
end function
Function chkemail(strEmailAddr)
    Dim re
    Set re = new RegExp
    re.pattern = "^[a-zA-Z][A-Za-z0-9_.-]+@[a-zA-Z0-9_]+?\.[a-zA-Z]{2,3}$"
    chkemail=re.Test(strEmailAddr)
end function

Function chkoicq(oicq)
    Dim re1
    Set re1 = new RegExp
    re1.IgnoreCase = false
    re1.global = false
    re1.Pattern = "[0-9]{4,9}$"
    chkoicq = re1.Test(oicq)
End Function
function DateToStr(dtDateTime)
    DateToStr = year(dtDateTime) & doublenum(Month(dtdateTime)) & doublenum(Day(dtdateTime)) & doublenum(Hour(dtdateTime)) & doublenum(Minute(dtdateTime)) & doublenum(Second(dtdateTime)) & ""
end function
function doublenum(fNum)
    if fNum > 9 then 
        doublenum = fNum 
    else 
        doublenum = "0" & fNum
    end if
end function
Rem 过滤字符
function ChkBadWords(fString)
    bwords = split(BadWords, "|")
    for i = 0 to ubound(bwords)
        fString = Replace(fString, bwords(i), string(len(bwords(i)),"*")) 
    next
    ChkBadWords = fString
end function
Rem 过滤HTML代码
function HTMLEncode(fString)
if not isnull(fString) then
	fString = replace(fString, ">", "&gt;")
	fString = replace(fString, "<", "&lt;")
	fString = Replace(fString, CHR(32), "&nbsp;")
	fString = Replace(fString, CHR(9), "&nbsp;")
	fString = Replace(fString, CHR(34), "&quot;")
	fString = Replace(fString, CHR(39), "&#39;")
	fString = Replace(fString, CHR(13), "")
	fString = Replace(fString, CHR(10) & CHR(10), "</p><p> ")
	fString = Replace(fString, CHR(10), "<BR> ")
	HTMLEncode = fString
end if
end function
Rem 过滤表单字符
function HTMLcode(fString)
if not isnull(fString) then
    fString = Replace(fString, CHR(13), "")
    fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
    fString = Replace(fString, CHR(10), "<BR>")
    HTMLcode = fString
end if
end function
function HTMLDecode(fString)
if not isnull(fString) then
    fString = replace(fString, "&gt;", ">")
    fString = replace(fString, "&lt;", "<")
    fString = Replace(fString, "", CHR(13))
    fString = Replace(fString, "</P><P>", CHR(10) & CHR(10))
    fString = Replace(fString, "<BR>", CHR(10))
    HTMLDecode = fString
end if
end function
Rem 过滤SQL非法字符
function checkStr(str)
	if isnull(str) then
		checkStr = ""
		exit function 
	end if
	checkStr=replace(str,"'","''")
end function
Rem UBB代码-----------------------------------
function UBBCode(strContent)
if strAllowHTML <> 1 then
	strContent = HTMLEncode(strContent)
end if
	dim re
	Set re=new RegExp
	re.IgnoreCase =true
	re.Global=True
    if strAllowjs = "0" then
	re.Pattern="(script)"
	strContent=re.Replace(strContent,"script")
    end if
    'if strAllowjs = "0" then
    	re.Pattern="(javascript)"
	strContent=re.Replace(strContent,"&#106avascript")
	re.Pattern="(jscript:)"
	strContent=re.Replace(strContent,"&#106script:")
	re.Pattern="(js:)"
	strContent=re.Replace(strContent,"&#106s:")
	re.Pattern="(value)"
	strContent=re.Replace(strContent,"&#118alue")
	re.Pattern="(about:)"
	strContent=re.Replace(strContent,"about&#58")
	re.Pattern="(file:)"
	strContent=re.Replace(strContent,"file&#58")
	re.Pattern="(document.cookie)"
	strContent=re.Replace(strContent,"documents&#46cookie")
	re.Pattern="(vbscript:)"
	strContent=re.Replace(strContent,"&#118bscript:")
	re.Pattern="(vbs:)"
	strContent=re.Replace(strContent,"&#118bs:")
	re.Pattern="(on(mouse|exit|error|click|key))"
	strContent=re.Replace(strContent,"&#111n$2")
    'end if
    if strAllowjs = "1" then
	re.Pattern="(\[html\])(.[^\]]*)(\[\/html\])"
	strContent=re.Replace(strContent,"<SPAN><IMG src=pic/code.gif align=absBottom>脚本代码片段如下:<BR><TEXTAREA style=""WIDTH: 94%; BACKGROUND-COLOR: #f7f7f7"" name=textfield rows=10>$2</TEXTAREA><BR><INPUT onclick=runEx() type=button value=运行此代码 name=Button class=pp> Ctrl+A 全部选择   提示:你可先修改部分代码,再按运行</SPAN><BR>")
	re.Pattern="(\[code\])(.[^\]]*)(\[\/code\])"
	strContent=re.Replace(strContent,"<SPAN><IMG src=pic/code.gif align=absBottom> 脚本 代码片段如下:<BR><TEXTAREA style=""WIDTH: 94%; BACKGROUND-COLOR: #f7f7f7"" name=textfield rows=10>$2</TEXTAREA><BR><INPUT onclick=runEx() type=button value=运行此代码 name=Button class=pp> Ctrl+A 全部选择   提示:你可先修改部分代码,再按运行</SPAN><BR>")
    end if
    if strIMGInPosts = "1" then
	re.Pattern="(\[IMG\])(.[^\]]*)(\[\/IMG\])"
	strContent=re.Replace(strContent,"<a href=""$2"" target=_blank><IMG SRC=""$2"" border=0 alt=如果图片显示太小,请点击图片看完整大小的图片 onload=""javascript:if(this.width>screen.width-450)this.width=screen.width-450""></a>")
    end if
    if strflash= "1" then
	re.Pattern="(\[FLASH\])(.[^\]]*)(\[\/FLASH\])"
	strContent= re.Replace(strContent,"<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=""$2""> <param name=quality value=high> <embed src=""$2"" quality=high pluginspage=""http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"" type=""application/x-shockwave-flash"" width=""550"" height=""400""></embed></object><br><br><img align=absmiddle src='pic/flash.gif'><a href=""$2"" target='blank'>开新窗浏览Flash动画</a>")
    end if
	re.Pattern="\[DIR=*([0-9]*),*([0-9]*)\](.[^\]]*)\[\/DIR]"
	strContent=re.Replace(strContent,"<object classid=clsid:166B1BCA-3F9C-11CF-8075-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=7,0,2,0 width=$1 height=$2><param name=src value=$3><embed src=$3 pluginspage=http://www.macromedia.com/shockwave/download/ width=$1 height=$2></embed></object>")
	re.Pattern="\[QT=*([0-9]*),*([0-9]*)\](.[^\]]*)\[\/QT]"
	strContent=re.Replace(strContent,"<embed src=$3 width=$1 height=$2 autoplay=true loop=false controller=true playeveryframe=false cache=false scale=TOFIT bgcolor=#000000 kioskmode=false targetcache=false pluginspage=http://www.apple.com/quicktime/>")
	re.Pattern="\[MP=*([0-9]*),*([0-9]*)\](.[^\]]*)\[\/MP]"
	strContent=re.Replace(strContent,"<object align=middle classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 class=OBJECT id=MediaPlayer width=$1 height=$2><param name=ShowStatusBar value=-1><param name=Filename value=$3><embed type=application/x-oleobject codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 flename=mp src=$3 width=$1 height=$2></embed></object>")
	re.Pattern="\[RM=*([0-9]*),*([0-9]*)\](.[^\[]*)\[\/RM]"
	strContent=re.Replace(strContent,"<OBJECT classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA class=OBJECT id=RAOCX width=$1 height=$2><PARAM NAME=SRC VALUE=$3><PARAM NAME=CONSOLE VALUE=Clip1><PARAM NAME=CONTROLS VALUE=imagewindow><PARAM NAME=AUTOSTART VALUE=true></OBJECT><br><OBJECT classid=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA height=32 id=video2 width=$1><PARAM NAME=SRC VALUE=$3><PARAM NAME=AUTOSTART VALUE=-1><PARAM NAME=CONTROLS VALUE=controlpanel><PARAM NAME=CONSOLE VALUE=Clip1></OBJECT>")
	re.Pattern="(\[ZIP\])(.[^\[]*)(\[\/ZIP\])"
	strContent=re.Replace(strContent,"<br><IMG SRC=pic/zip.gif border=0> <a href=""$2"">点击下载该文件</a>")

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -