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

📄 ixs_char.asp

📁 网络教学平台由教师教学系统、学生学习系统和教学管理系统三大模块组成
💻 ASP
📖 第 1 页 / 共 3 页
字号:
			'-----------------------------------------------------
			System_Settings(33) = 419430400 ' 文章系统附件 总大小
			System_Settings(34) = 41943040 ' 文章系统附件 单文件大小 建议单个文件不要超过 4M
			System_Settings(35) = "avi/bmp/doc/gif/jpg/jpeg/wma/wmv/mid/mp3/mpg/mpeg/dat/png/ram/rar/rm/swf/torrent/txt/zip" ' 文章系统附件 文件类型
			System_Settings(36) = "UploadFile/" ' 文章系统附件 保存路径
			'-----------------------------------------------------
			System_Settings(37) = 409600 ' 友情链接系统附件 总大小
			System_Settings(38) = 409600 ' 友情链接系统附件 单文件大小
			System_Settings(39) = "gif/jpg/jpeg" ' 友情链接系统附件 文件类型
			System_Settings(40) = "UploadFile/" ' 友情链接系统附件 保存路径
			'-----------------------------------------------------
			System_Settings(41) = "asa|asp|audio|avi|bat|bmp|cmd|code|com|db|dll|doc|exe|fla|ftp|gif|h|hlp|htm|html|inc|info|ini|jpg|js|log|mdb|mid|mp|mp3|pdf|php|pic|png|ppt|ram|rar|real|rm|swf|torrent|txt|wav|wma|wmv|xls|xml|zip" ' 所有存在图标的文件类型
			System_Settings(42) = "jpg|jpeg|gif|bmp|png" ' 图像类文件类型
			System_Settings(43) = "swf" ' 动画文件类型
			System_Settings(44) = "mp3|m3u|wav|wma|wax|asx|asf|mp2|au|aif|aiff|mid|midi|rmi" ' 音频文件类型 全部采用Windows Media Player播放
			System_Settings(45) = "rm|rmvb|ram|ra|mov" ' RealPlayer 文件类型
			System_Settings(46) = "asa|asp|bat|cmd|code|com|db|dll|doc|exe|fla|ftp|h|hlp|htm|html|inc|info|ini|js|log|mdb|pdf|php|pic|ppt|rar|real|torrent|txt|xls|xml|zip" ' 其他文件类型
			System_Settings(47) = "UnKnow.gif" ' 没有图标的文件显示的图标
			'-----------------------------------------------------
			System_Settings(48) = 50 ' 文章系统允许同时上传的最大数目
			System_Settings(49) = 1 ' 友情链接系统允许同时上传的最大数目
			'-----------------------------------------------------
			System_Settings(51) = "mpg|mpeg|mpv|mps|m2v|m1v|mpe|mpa|avi|wmv|wm|wmx|wvx" ' Windows Media 视频文件类型
			System_Settings(52) = "gif/jpg/jpeg/bmp/png" ' 文章系统远程自动获取的文件类型
			'-----------------------------------------------------
			System_Settings(59) = 1 ' 用户自定义头像允许同时上传的最大数目
			System_Settings(60) = 409600 ' 用户自定义头像 总大小
			System_Settings(61) = 409600 ' 用户自定义头像 单文件大小
			System_Settings(62) = "gif/jpg/jpeg" ' 用户自定义头像 文件类型
			System_Settings(63) = "UploadFile/" ' 用户自定义头像 保存路径
			System_Settings(64) = 90 ' 用户自定义头像 宽度限制
			System_Settings(65) = 180 ' 用户自定义头像 高度限制
			'-----------------------------------------------------
			System_Settings(67) = 8 ' 获取数字型变量时,允许多最大数字位数,例如银行帐号需要19位
			'-----------------------------------------------------
			System_Settings(75) = 1 ' 随机字符串是否包含大写字母 1:是,0:否;下同
			System_Settings(76) = 1 ' 随机字符串是否包含小写字母
			System_Settings(77) = 1 ' 随机字符串是否包含数字
			System_Settings(78) = 0 ' 随机字符串是否包含特殊字符
			System_Settings(79) = 0 ' 随机字符串是否包含自定义字符
			System_Settings(80) = "" ' 随机字符串的自定义字符集
			'-----------------------------------------------------
			System_Settings(89) = 1024 ' 从客户端获取字符串的最大长度 默认1024字节
			'-----------------------------------------------------
			System_Settings(97) = "html|head|title|object|script|frame|data|iframe|meta|link" ' 要过滤的HTML标签 默认,可以根据具体条件进行设置
			'-----------------------------------------------------
			System_Settings(98) = "UploadFile/" ' 上传目录
			'-----------------------------------------------------
			System_Settings(99) = "'  &<>?%,;:()`~!@#$^*{}[]|+-=" & Chr(34) & Chr(9) & Chr(32) ' 用户名和密码中不允许出现的字符
			'-----------------------------------------------------
			System_Settings(100) = "爱雪儿图文管理系统 Version 1.0.0" ' 系统版本信息
			'-----------------------------------------------------
			
			' 修复网站访问地址,此错误发生在后台更新缓存之后,修复方法就是删除路径最后的管理文件夹
			System_Settings(0) = Replace(LCase(System_Settings(0)), LCase(System_Settings(66)), "")
			Value = System_Settings
		End If
		Sys_Info = Value
	End Sub
	' ============================================
	' 执行SQL命令
	' ============================================
	Public Function Execute(Command)
		If Not IsObject(Conn) Then ConnectionDatabase()
		On Error Resume Next
		'Response.Write(Command & "<br>")
		Set Execute = Conn.Execute(Command)
		If Err Then
			If IsDeBug = 0 Then
				Response.Write("刚才执行的查询出现错误,请认真检查您的语句。")
			Else
				Response.Write("查询语句为:" & Command & "<br>")
				Response.Write("错误信息为:" & Err.Description & "<br>")
			End If
			Err.Clear
			Set Execute = Nothing
			Response.End()
		End If
		Sql_Use = Sql_Use + 1
	End Function
	' ============================================
	' 获取 Recordset 对象
	' ============================================
	Public Function GetRs(Command, Num1, Num2)
		On Error Resume Next
		If Not IsObject(Conn) Then ConnectionDatabase()
		Set GetRs = Server.CreateObject("ADODB.Recordset")
		'Response.Write(Command & "<br>")
		GetRs.Open Command, Conn, Num1, Num2
		If Err Then
			If IsDeBug = 0 Then
				Response.Write("创建 Recordset 对象失败,请认真检查您的语句。")
			Else
				Response.Write("查询语句为:" & Command & "<br>")
				Response.Write("错误信息为:" & Err.Description & "<br>")
			End If
			Err.Clear
			Response.End
		End If	
		Sql_Use = Sql_Use + 1
	End Function
	' ============================================
	' 检测获取的字符是否为数字
	' ============================================
	Public Function ReqNum(StrName)
		ReqNum = Trim(Request(StrName))
		If ReqNum <> "" And Not IsNull(ReqNum) Then
			If Not IsNumeric(ReqNum) Then
				Call Alert("参数  " & StrName & "  必须为数字!\n\n请重新输入!", 0, 0)
			End If
		Else
			ReqNum = ""
		End If
		' 限制输入长度!
		If Len(ReqNum) > ReqNumLen Then Call Alert("您需要输入超过 " & ReqNumLen & " 位的数字吗?\n\n请重新输入!", 0, 0)
		ReqNumLen = Sys_Info(67)
	End Function
	' ============================================
	' 检测获取的字符串并过滤 ' 为 ''
	' ============================================
	Public Function ReqStr(StrName)
		Dim Str, i
		For i = 1 To Request(StrName).Count
			Str = Str & Request(StrName)(i)
		Next
		Str = Replace(Trim(Request(StrName)), "'", "''")
		If Str = "" Or IsNull(Str) Then
			Str = ""
		Else
			If AllowHTML = False Then
				' 不允许存在任何HTML标签字串
				If RegExpSearch("<(.[^>]*)>", Str, 0, "HTML") <> "" Then
					Response.Write("<script language=""javascript1.2"">alert(""参数  " & StrName & "  不能包含HTML格式的标签!\n\n正确的格式不应该包含 <***> 格式的字串!\n\n请重新输入!"");self.history.go(-1);</script>")
					Response.End
				End If
			Else
				' 使用正则表达式过滤指定的HTML标签
				Str = RegExpFilter("</?(" & DeCode & ")[^>]*>", Str, 1, "")
				AllowHTML = False
			End If
		End If
		' 限制输入的字符长度
		If Len(Str) > ReqStrLen Then
			Response.Write("<script language=""javascript1.2"">alert(""参数  " & StrName & "  超过了允许的最大长度!\n\n请重新输入!"");self.history.go(-1);</script>")
			Response.End()
		End If
		ReqStrLen = Sys_Info(89)
		ReqStr = Str
	End Function 
	' ============================================
	' 获取随机验证码
	' ============================================
	Public Function GetCode(Col)
		' 如果服务器不支持 Adodb.Stream 组件,则直接输出文本
		Dim Ads
		On Error Resume Next
		Set Ads = Server.CreateObject("Adodb.Stream")
		' 这里不需要执行任何操作,直接关闭对象即可,如果服务器不支持该对象会出错
		Set Ads = Nothing
		If Err Then
			Dim zNum
			Randomize timer()
			zNum = Cint(8999 * Rnd + 1000)
			Session(CacheName & "iXuEr_GetCode") = zNum '设置验证码的会话变量
			GetCode = zNum
		Else
			GetCode = "<img src=""" & MyDbPath & "Get_Rnd_Num.asp?Cor=" & Col & """ width=""40"" height=""10"" hspace=""0"" vspace=""0"" border=""0"" align=""absmiddle"" title=""请将这个图片中显示的数字填入前面框中"">"
		End If
	End Function
	' ============================================
	' 获取真实的IP地址 并整形为15位
	' ============================================
	Public Function ReqIP()
		ReqIP = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
		If ReqIP = "" Or IsNull(ReqIP) Then ReqIP = Request.ServerVariables("REMOTE_ADDR")
		ReqIP = Format_Ip(ReqIP)
	End Function
	' ============================================
	' 检测上页是否从本站提交
	' 返回:True, False
	' ============================================
	Public Function IsSelfRefer()
		Dim sHttp_Referer, sServer_Name
		sHttp_Referer = CStr(Request.ServerVariables("HTTP_REFERER"))
		sServer_Name = CStr(Request.ServerVariables("SERVER_NAME"))
		If Mid(sHttp_Referer, 8, Len(sServer_Name)) = sServer_Name Then
			IsSelfRefer = True
		Else
			IsSelfRefer = False
		End If
	End Function
	' ============================================
	' 复制N个字符串Str 
	' ============================================
	Public Function Clone(ByVal Str, n)
		Dim Value
		For i = 1 To n
			Value = Value & Str
		Next
		Clone = Value
	End Function
	' ============================================
	' 删除源字符串Str的前N个字符
	' ============================================
	Public Function TrimStart(ByVal Str, n)
		Dim Value
		Value = Mid(Str, n + 1)
		TrimStart = Value
	End Function
	' ============================================
	' 删除源字符串Str的最后N个字符串
	' ============================================
	Public Function TrimEnd(ByVal Str, n)
		Dim Value
		Value = Left(Str, Len(Str) - n)
		TrimEnd = Value
	End Function
	' ============================================
	' 返回一个字符串在一个数组中的位置
	' ============================================
	Public Function InArray(Str, Arr)
		Dim i
		For i = 0 To UBound(Arr)
			If Arr(i) = Str Then InArray = i : Exit Function
		Next
	End Function
	' ============================================
	' 按照指定的正则表达式替换字符
	' ============================================
	Public Function RegExpFilter(Patrn, Str, sType, ReplaceWith)
		Dim RegEx
		Set RegEx = New RegExp
		If sType = 1 Then
			RegEx.Global = True
		Else
			RegEx.Global = False
		End If
		RegEx.Pattern = Patrn
		RegEx.IgnoreCase = True
		RegExpFilter = RegEx.Replace(Str, ReplaceWith)
	End Function
	' ============================================
	' 按照指定的正则表达式返回字符
	' ============================================
	Public Function RegExpSearch(Patrn, Str, sType, Spacer)
		Dim RegEx, Match, Matches , RetStr, i
		i = 0
		Set RegEx = New RegExp
		RegEx.Pattern = Patrn
		RegEx.IgnoreCase = True
		RegEx.Global = True
		Set Matches = RegEx.Execute(Str)
		For Each Match In Matches
			i = i + 1
			If sType = 0 Then
				RetStr = RetStr & Match.Value
				If i < Matches.Count Then RetStr = RetStr & Spacer
			Else
				RetStr = RetStr & Match.Value
				If i < Matches.Count Then RetStr = RetStr & Spacer
				If sType = i Then Exit For
			End If
		Next
		RegExpSearch = RetStr
	End Function
	' ============================================
	' 将文本中的HTML标记清理掉
	' ============================================
	Public Function RemoveHTML(StrHTML, sType)
		Dim ObjRegExp, Match, Matches
		Set ObjRegExp = New Regexp
		ObjRegExp.IgnoreCase = True
		ObjRegExp.Global = True
		' 取闭合的<>
		ObjRegExp.Pattern = "<.+?>"
		' 进行匹配
		Set Matches = ObjRegExp.Execute(StrHTML)
		' 遍历匹配集合,并替换掉匹配的项目
		For Each Match In Matches
			StrHtml = Replace(StrHTML, Match.Value, "")
		Next
		If sType = 1 And StrHtml = "" Then StrHtml = "……"
		RemoveHTML = StrHTML
		Set ObjRegExp = Nothing
	End Function
	' ============================================
	' 将字符串中的Str中的HTML代码进行过滤 
	' ============================================
	Public Function HTMLencode(Str)
		If Trim(Str) = "" Or IsNull(Str) Then
			HTMLencode = ""
		Else
			Str = Replace(Str, ">", "&gt;")
			Str = Replace(Str, "<", "&lt;")
			Str = Replace(Str, "''", "'")

⌨️ 快捷键说明

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