inc.asp

来自「房地产管理系统 vb写的,很不错!!!!!!!!!!!」· ASP 代码 · 共 152 行

ASP
152
字号
<%
'##################################
' 作用:	
'			创值ID值
' 返回:
'			Year+Month+Day+H+M+S
function Create_id(cTime)
	cYear=Cstr(Year(cTime))
	cMonth=Cstr(Month(cTime))
	cDay=Cstr(Day(cTime))
	cHour=Cstr(Hour(cTime))
	cMinute=Cstr(Minute(cTime))
	cSecond=Cstr(Second(cTime))

	if Len(cMonth)=1 then
		cMonth="0"&cMonth
	end if
	if Len(cDay)=1 then
		cDay="0"&cDay
	end if
	if Len(cHour)=1 then
		cHour="0"&cHour
	end if	
	if Len(cMinute)=1 then
		cMinute="0"&cMinute
	end if
	if Len(cSecond)=1 then
		cSecond="0"&cSecond
	end if
	Create_id=cYear+cMonth+cDay+cHour+cMinute+cSecond
end function

'########取得文件扩展名所对应的图标
Function FileIco(f_name)
	Dim ex,ico
	ex=LCase(GetEx(f_name))
	Select Case ex
		Case ".doc"
			ico="f_Doc.gif"
		Case ".txt"
			ico="f_txt.gif"
		Case ".mp3"
			ico="f_mp3.gif"
		Case ".gif"
			ico="FileGif.gif"
		Case ".bmp"
			ico="FileBmp.gif"
		Case ".jpg"
			ico="FileJpg.gif"
		Case ".ico"
			ico="f_pic.gif"
		Case ".rar"
			ico="f_rar.gif"
		Case ".zip"
			ico="f_rar.gif"
		Case ".htm"
			ico="f_htm.gif"
		Case ".html"
			ico="f_htm.gif"
		Case ".shtml"
			ico="f_htm.gif"
		Case ".asp"
			ico="f_asp.gif"
		Case ".xml"
			ico="f_asp.gif"
		Case ".jsp"
			ico="f_asp.gif"
		Case ".php"
			ico="f_asp.gif"
		Case ".css"
			ico="f_asp.gif"
		Case ".js"
			ico="f_asp.gif"
		Case ".asf"
			ico="f_media.gif"
		Case ".wmv"
			ico="f_media.gif"
		Case ".mdb"
			ico="f_mdb.gif"
		Case ".exe"
			ico="f_exe.gif"
		Case ".com"
			ico="f_exe.gif"
		Case ".bat"
			ico="f_exe.gif"
		Case ".swf"
			ico="f_swf.gif"
		Case ".fla"
			ico="f_swf.gif"
		Case ".rm"
			ico="f_rm.gif"
		Case ".dll"
			ico="f_dll.gif"
		Case ".sys"
			ico="f_dll.gif"
		Case ".ocx"
			ico="f_ocx.gif"
		Case ".ini"
			ico="f_ini.gif"
		Case ".dbx"
			ico="f_dbx.gif"
		Case ".cat"
			ico="f_cat.gif"
		Case ".pdf"
			ico="f_pdf.gif"
		Case ".hlp"
			ico="f_hlp.gif"
		Case ".htt"
			ico="f_htt.gif"
		Case ".png"
			ico="f_png.gif"
		Case ".chm"
			ico="f_chm.gif"
		Case ".nfo"
			ico="f_nfo.gif"
		Case ".reg"
			ico="f_reg.gif"
		Case ".key"
			ico="f_reg.gif"
		Case ".cpp"
			ico="f_cpp.gif"
		Case ".h"
			ico="f_h.gif"
		Case ".frm"
			ico="f_frm.gif"
		Case ".bas"
			ico="f_bas.gif"
		Case ".ctl"
			ico="f_ctl.gif"
		Case ".vbg"
			ico="f_vbg.gif"
		Case ".vbp"
			ico="f_vbp.gif"
		Case else:
			ico="UnKnow.gif"
	End Select
	Response.Write "<IMG SRC='images/"&ico&"' border='0'>"

End Function


'########取得文件扩展名
'返回值如:".exe"、".gif"
Function GetEx(fileName)
	For I=Len(fileName) To 1 Step -1
		If Mid(fileName,I,1)="." Then
			GetEx=Right(fileName,Len(fileName)-I+1)
			Exit Function
		End If
	Next
End Function
%>

⌨️ 快捷键说明

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