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

📄 file.inc

📁 物业管理和办公自动化系统
💻 INC
字号:
<%
Function TransFileType(ext)
	select case LCase(CStr(ext))
	case ""
		TransFileType = "文件"
	case "bat"
		TransFileType = "MS-DOS 批处理文件"
	case "bmp"
		TransFileType = "位图图像"
	case "dll"
		TransFileType = "应用程序扩展"
	case "doc"
		''TransFileType = "Microsoft Word 文档"
		TransFileType = "Word 文档"
	case "dot"
		''TransFileType = "Microsoft Word 模板"
		TransFileType = "Word 模板"
	case "exe"
		TransFileType = "应用程序"
	case "gif"
		TransFileType = "GIF 图像"
	case "htm", "html"
		''TransFileType = "HTML Document"
		TransFileType = "HTML 文档"
	case "log"
		TransFileType = "文本文档"
	case "jpg"
		TransFileType = "JPEG 图像"
	case "ini"
		TransFileType = "配置设置"
	case "sql"
		TransFileType = "SQL Script File"
	case "sys"
		TransFileType = "系统文件"
	case "txt"
		TransFileType = "文本文档"
	case "xls"
		''TransFileType = "Microsoft Excel 工作表"
		TransFileType = "Excel 工作表"
	case "xlt"
		''TransFileType = "Microsoft Excel 模板"
		TransFileType = "Excel 模板"
	case else
		TransFileType = UCase(ext) & " 文件"
	end select
End Function

Function GetFileImg(ext)
	select case LCase(CStr(ext))
	case ""
		GetFileImg = "images/file.gif"
	case "bmp", "dll", "doc", "dot", "exe", "gif", "htm", "jpg", "ini", "sys", "txt", "xls", "xlt"
		GetFileImg = "images/" & LCase(CStr(ext)) & ".gif"
	case "log"
		GetFileImg = "images/txt.gif"
	case else
		GetFileImg = "images/file.gif"
	end select
End Function

Function TransFileSize(size)
	dim intKB, intBytes
	intBytes = CStr(size)
	TransFileSize = "0 KB"
	intKB = intBytes / 1024	 				'' 除以1024得到KB数
	if intKB > int(intKB) then			'' 其实就是将小数点后的值变成1加到整数部分,当然如果小数部分为0就不加
		intKB = int(intKB) + 1
	else
		intKB = int(intKB)
	end if
	intKB = FormatNumber(intKB, 0)
	TransFileSize = intKB & " KB"
End Function


'String to binary string conversion 
Function getByteString(StringStr)
	dim i, char
	For i = 1 to Len(StringStr) 
		char = Mid(StringStr,i,1) 
		getByteString = getByteString & chrB(AscB(char)) 
	Next 
End Function 

'Binary string to string conversion 
Function getString(StringBin) 
	dim intCount
	getString ="" 
	For intCount = 1 to LenB(StringBin) 
		if AscB(MidB(StringBin,intCount,1)) > 127 then
			getString = getString & chr(AscB(MidB(StringBin,intCount,1))*256+AscB(MidB(StringBin, intCount+1, intCount)))
			intCount = intCount + 1
		else
			getString = getString & chr(AscB(MidB(StringBin,intCount,1))) 
		end if
	Next 
End Function
%>

⌨️ 快捷键说明

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