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

📄 fun.asp

📁 1、本网吧多媒体系统采用B/S结构
💻 ASP
📖 第 1 页 / 共 2 页
字号:

	private sub class_terminate()
		if l1ll("p",2)<>"" then p=l1ll("p",2)
		Il"</div><script language=""javascript1.2"">j="&k-1&";slip("&p&");</script>"
	end sub

	public sub menu(l1)'menu("添加|删除;del.asp")
		dim i,I1,I2:I1=split(l1,"|")
		Il"<div id=""slipmenu"">"
		for i=0 to ubound(I1)
			I2=split(I1(i),":")
			if ubound(I2)=0 then
				Il"<a href=""javascript:slip('"&k&"');"" id=""t"&k&"""><q>"&II11I(I1(i))&"</q></a>"
				k=k+1
			else
				Il"<a href="""&II11I(I2(1))&""">"&II11I(I2(0))&"</a>"
			end if
		next
		Il"</div>"
	end sub
end class

'lIII  *** ***  www.KingCMS.com  *** ***
function lIII()
	dim l0,l1,l2,l3,I1,I2,I3,i
	l0=request.ServerVariables("http_user_agent")
	l0=replace(l0,"(",")")
	I1=split(l0,")")
	I3=ubound(I1)
	if I3>=2 then
		l1=trim(I1(0))'左侧
		l2=mid(l0,len(I1(0))+2,len(l0)-len(I1(0))-len(I1(I3))-2)
		l3=trim(I1(I3))
		if l3<>"" then
			lIII=l3
		elseif instr(l2,"MSIE")>0 then
			I2=split(l2,";")
			for i=0 to ubound(I2)
				if instr(I2(i),"MSIE")>0 then
					lIII=Trim(I2(i))
					exit function
				end if
			next
		else
			lIII=l1
		end if
	else
		lIII=l0
	end if 
end function


'I111  *** ***  www.KingCMS.com  *** ***
function I111(l1)
	I111="<img src=""theme/"&king.theme&"/images/os/file/"&l111(l1)&".gif""/>"
end function


'I11I  *** ***  www.KingCMS.com  *** ***
function I11I(l1)
	dim I2
	if instr((l1),":")>0 then
		I2=split(l1,":")
		I11I="<img src=""theme/"&king.theme&"/images/os/"&I2(0)&".gif"" alt="""&king.lang(I2(1))&""" />"
	else
		I11I="<img src=""theme/"&king.theme&"/images/os/"&l1&".gif"" />"
	end if
end function






'formatdate  *** ***  www.KingCMS.com  *** ***
function formatdate(l1)
	formatdate=year(l1)&"-"&month(l1)&"-"&day(l1)&" "&hour(l1)&":"&minute(l1)&":"&second(l1)
end function

'l1ll  *** ***  www.KingCMS.com  *** ***
function l1ll(l1,l2)
	dim l5
	if cstr(l2)="8" then
		l5=l11(trim(request.servervariables("query_string")),"/",king.ext)
		'当l2=8的时候,l1=0代表 值可以为空 反之 l1=1
		if cstr(l1)<>"0" and len(l5)=0 then king.error("system/not")
	else
		l5=killjapan(trim(request.querystring(l1)))
	end if
	if len(l5)=0 then exit function
	select case cstr(l2)
	case"0"
	case"1","2","3"
		if II11(l5,l2)=false then king.error("system/checkstr")
	case"8"'?/ Value king.ext
		if II11(l5,2)=false then king.error("system/checkstr")
	case else king.error("system/checkstr")
	end select
	l1ll=l5
end function



'killjapan  *** ***  www.KingCMS.com  *** ***
function killjapan(l1)
	on error resume next
	if cstr(king.isdb)="0" then
		dim I1,I2,i,l2:l2=l1
		I1=array("ガ","ギ","グ","ア","ゲ","ゴ","ザ","ジ","ズ","ゼ","ゾ","ダ","ヂ","ヅ","デ","ド","バ","パ","ビ","ピ","ブ","プ","ベ","ペ","ボ","ポ","ヴ")
		I2=array("460","462","463","450","466","468","470","472","474","476","478","480","482","485","487","489","496","497","499","500","502","503","505","506","508","509","532")
		for i=0 to 26
			l2=replace(l2,I1(i),"&#12"&I2(i)&";")
		next
		killjapan=l2
	else
		killjapan=l1
	end if
end function

'III11  *** ***  www.KingCMS.com  *** ***
function III11(l1)
	dim I1
	if isdate(l1) then
		I1=year(l1)&"-"&month(l1)&"-"&day(l1)
	end if
	III11=I1
end function


'Ill  *** ***  www.KingCMS.com  *** ***
sub Ill(l1)
	on error resume next
	dim fs,l2,l3,l4,l5,I1,i
	set fs=Server.CreateObject(king_fso)
	I1=split(l1,"/")
	l4=ubound(I1)
	for i=0 to l4
		if I1(i)=".." then
			l3=l3&"../"
		else
			if l3&I1(i)<>"" then
				l5=server.mappath(l3&I1(i))
				if fs.folderexists(l5)=false then fs.createfolder(l5)'如果文件夹不存在就创建
				l3=l3&I1(i)&"/"
			else
				l3="/"
			end if
		end if
	next
	set fs=nothing
	if err.number<>0 then
		err.clear
		king.error("system/create/folder")
	end if
end sub


'lllll  *** ***  www.KingCMS.com  *** ***
function lllll(l1)
  on error resume next
	dim fs,l2,l3,l4
	set fs=createObject(king_fso)
		l2=server.mappath(l1)
		l4=replace(l2,"\","/")
		l3=right(l4,len(l4)-instrrev(l4,"/"))
		lllll=fs.folderexists(l2)
		if lllll=false then lllll=fs.fileexists(l2)
	set fs=nothing
	if err.number<>0 then err.clear
end function

'lll1  *** ***  www.KingCMS.com  *** ***
function lll1(l1)
	if len(l1)>0 then
		lll1=replace(killjapan(trim(cstr(l1))),"'", "''")
	end if
end function


sub Il(l1)
	response.write ltrim(l1)
end sub




'llll  *** ***  www.KingCMS.com  *** ***
function llll(l1)
	on error resume next
	if isobject(upload)=false then
		set upload=new UpLoadClass
		upload.open
	end if
	llll=upload.form(trim(l1))
	if err.number<>0 then err.clear
end function


'll11  *** ***  www.KingCMS.com  *** ***
function ll11(l1,l2)
	dim l3,l
	ll11=false
	if len(l1)>0 and len(l2)>0 then
		l3=split(l1,",")
		for l=0 to ubound(l3)
			if Cstr(lcase(Trim(l2)))=Cstr(lcase(Trim(l3(l)))) then
				ll11=true
				exit function
			end if
		next
	end if
end function


'II11  *** ***  www.KingCMS.com  *** ***
function II11(l1,l2)'l1:str;l2:类型
	dim l3,l4
	set l4=New regexp
	select case cstr(l2)
		case"0" l3="^[a-zA-Z0-9\,\/\-\_\[\]]+$"
		case"1" l3="^[A-Za-z]+$"
		case"2" l3="^\d+$"
		case"3" l3="^[A-Za-z0-9\_\-]+$"
		case"4" l3="^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"
		case"5" l3="^(http|https|ftp):(\/\/|\\\\)(([\w\/\\\+\-~`@:%])+\.)+([\w\/\\\.\=\?\+\-~`@\':!%#]|(&amp;)|&)+"
		case"6" l3="^[0-9\,]+$"
		case"7" l3="^((http|https|ftp):(\/\/|\\\\)(([\w\/\\\+\-~`@:%])+\.)+([\w\/\\\.\=\?\+\-~`@\':!%#]|(&amp;)|&)+|\/([\w\/\\\.\=\?\+\-~`@\':!%#]|(&amp;)|&)+)\.(jpeg|jpg|gif|png|bmp)$"
		case"8" l3="^\w+\.(\w){1,10}$"
		case"9" l3="^((((1[6-9]|[2-9]\d)\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\d|3[01]))|(((1[6-9]|[2-9]\d)\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\d|30))|(((1[6-9]|[2-9]\d)\d{2})-0?2-(0?[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-)) (20|21|22|23|[0-1]?\d):[0-5]?\d:[0-5]?\d$"
		case"10"
		l3="^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$"
		case else l3=l2
	end select
	l4.pattern=l3
	II11=l4.Test(trim(l1))
	set l4=nothing
end function

'II11I  *** ***  www.KingCMS.com  *** ***
function II11I(l1)
	dim l2
	if len(l1)>0 then
		l2=replace(l1,chr(3)&"$king58"&chr(2),chr(58))
		l2=replace(l2,chr(3)&"$king59"&chr(2),chr(59))
'		l2=replace(l2,chr(3)&"$king123"&chr(2),chr(123))
		l2=replace(l2,chr(3)&"$king124"&chr(2),chr(124))
'		l2=replace(l2,chr(3)&"$king125"&chr(2),chr(125))
	else
		l2=l1
	end if
	II11I=l2
end function

'l11  *** ***  www.KingCMS.com  *** ***
function l11(l1,l2,l3)
	dim I1,I2,I3
	dim l4,l5,l6,l7,l8
	if left(l2,1)=chr(40) and right(l2,1)=chr(41) and left(l3,1)=chr(40) and right(l3,1)=chr(41) then'正则截取
		set I1=new regexp
		I1.ignorecase=true
		I1.global=false
		I1.pattern=l2&"((.|\n)+?)"&l3
		set I2=I1.execute(l1)
			if I2.count>0 then l4=I2.item(0).value
		set I2=nothing
		I1.pattern=l2
		set I2=I1.execute(l4)
			if I2.count>0 then l5=I2.item(0).value
		set I2=nothing
		I1.pattern=l3
		set I2=I1.execute(l4)
			if I2.count>0 then l6=I2.item(0).value
		set I2=nothing
	else
		l4=l1:l5=l2:l6=l3
	end if
	l7=instr(lcase(l4),lcase(l5))
	if l7=0 then exit function
	l8=instr(lcase(right(l4,len(l4)-l7-len(l5)+1)),lcase(l6))
	if l7>0 and l8>0 then
		l11=trim(mid(l4,l7+len(l5),l8-1))
	end if
end function

'IlI  *** ***  www.KingCMS.com  *** ***
function IlI(l1,l2,l3)'url,pid当前页数,
	dim l4,k
	l4=("<a href="""&replace(l1,"$","")&""">第一页</a>")
	if l2>2 then
		l4=l4&("<a href="""&replace(l1,"$",l2-1)&""">上一页</a>")
	elseif l2=2 then
		l4=l4&("<a href="""&replace(l1,"$","")&""">上一页</a>")
	end if
	for k=l2-6 to l2+6
		if k>=1 and k<=l3 then
			if cstr(k)=cstr(l2) then
				l4=l4&("<strong>"&k&"</strong>")
			else
				if k=1 then
					l4=l4&("<a href="""&replace(l1,"$","")&""">"&k&"</a>")
				else
					l4=l4&("<a href="""&replace(l1,"$",k)&""">"&k&"</a>")
				end if
			end if
		end if
	next
	if l2+1<=l3 then
	l4=l4&("<a href="""&replace(l1,"$",l2+1)&""">下一页</a>")
	end if
	if cstr(l3)="1" then
		l4=l4&("<a href="""&replace(l1,"$","")&""">尾页</a>")
	else
		l4=l4&("<a href="""&replace(l1,"$",l3)&""">尾页</a>")
	end if
	IlI="<div class=""k_pagelist"">"&l4&"<span>共"&l3&"页</span> <span>总计"& king.count &"条(每页 "& king.rn &" 条)</span></div>"
end function


'  
function I1II(l1,l2,l3,l4)
	dim l5:if l4=True then l5=" target=""_blank"""
		I1II="<a href="""&l3&""" title="""&(l2)&""""&l5&"><img src=""theme/"&king.theme&"/images/"&l1&".gif"" /></a>"
end function



sub out(l1)
	response.clear
		Il"<meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"">"
		if len(l1)>0 then
			Il"<textarea name="""" rows=""30"" cols=""120"">"&server.htmlencode(l1)&"</textarea>"
		else
			Il"<textarea name="""" rows=""30"" cols=""120"">Not DATA!</textarea>"
		end if
	response.end()
end sub

%>

⌨️ 快捷键说明

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