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

📄 file_l.inc

📁 物业管理和办公自动化系统
💻 INC
📖 第 1 页 / 共 2 页
字号:
<%
Function TableSearch()
	'' 任务分类,0为所有任务,1为普通任务,2为会议相关的任务,3为审批相关的任务
	'' 任务完成状况,0全部,1所有已完成任务,2所有未完成任务,3所有正常的未完成任务,4所有过时的未完成任务
	'' 开始日期的日历
	'' 结束日期的日历
	TableSearch = _
		TableTitle("设置查询条件", 600, "", "") & _
		"<table cellspacing=0 cellpadding=0 width=600 align=center border=0>" & _
		"<form name=""frmSearchTask"" method=post action=""news.asp"">"  & _
		"<tr height=30>" & _
		"	<td width=200>任务分类:<select name=""task_type"" style=""width:86px"">" & _
		"			<option value=0>全部</option>" & _
		"			<option value=1>普通任务</option>" & _
		"			<option value=2>会议相关</option>" & _
		"			<option value=3>审批相关</option>" & _
		"		</select>" & _
		"		<script language=""javascript"">document.all.task_type.selectedIndex=" & pTaskType & "</script>" & _
		"	</td>" & _
		"	<td width=200>时效状态:<select name=""task_status"" style=""width:86px"">" & _
		"			<option value=0>全部</option>" & _
		"			<option value=1>已完成</option>" & _
		"			<option value=2>未完成</option>" & _
		"			<option value=3>正常未完成</option>" & _
		"			<option value=4>过时未完成</option>" & _	
		"		</select>" & _
		"		<script language=""javascript"">document.all.task_status.selectedIndex=" & pTaskStatus & "</script>" & _
		"	</td>" & _
		"	<td width=200>&nbsp;</td></tr>" & _
		"<tr height=20>" & _
		"	<td width=200>" & DrawCal("开始日期", pDay1, "day1", "dateimg1") & "	</td>" & _	
		"	<td width=200>" & DrawCal("结束日期", pDay2, "day2", "dateimg2") & "</td>" & _
		"	<td width=200><span id=btnSearch style=""cursor:hand"" title=""选择开始日期和结束日期,点击查询按钮进行查询""><img border=0 src=""../images/search1.gif"" style=""vertical-align:middle"">查询</span></td></tr>" & _
		"<tr height=10><td colspan=3 width=600>&nbsp;</td></tr>" & _
		"</form>" & _
		"</table>"
End Function

Function TableHeaderField(sFileName, sField, sFieldName, sFormParams, sSorting, sSorted)
	dim text_align
	if sField = "filesize" then text_align = "right" else text_align = "left"

	Dim sSortImage
	if sSorting = sField and sSorted = sField then
		sSortImage = "<img border=0 src='../images/sort_asc.gif'>"		' 升序图标
	elseif sSorting = sField then
		sSortImage = "<img border=0 src='../images/sort_desc.gif'>"		' 降序图标
	else
		sSortImage = "<img border=0 src='../images/sort_blank.gif'>"		' 空白图标
	end if	
	sSortImage = "<img border=0 height=0 width=3>" & sSortImage 

	TableHeaderField = "<a href='" & sFileName & "?" & sFormParams & "Sorting=" & sField & "&Sorted=" & sSorted & "&'><button style=""border-width:1px;text-align:" & text_align & ";width:100%;font-size:9pt"" onclick=""location.href='" & sFileName & "?" & sFormParams & "Sorting=" & sField & "&Sorted=" & sSorted & "&';"">" & sFieldName & sSortImage & "</button></a>"
End Function

Function TableHeader()
	TableHeader = _
		"<table cellspacing=0 cellpadding=0 width=""100%"" align=center style=""table-layout:fixed;"" bgcolor=white>" & vbLF & _
		"<tr style=""display:none"" bgcolor=silver>" & vbLF & _
		"	<td width=6 nowrap>共享</td>" & vbLF & _
		"	<td width=20 nowrap>图标</td>" & vbLF & _
		"	<td widtd=""*"" nowrap>文件名称</td>" & vbLF & _
		"	<td width=70 nowrap>文件大小</td>" & vbLF & _
		"	<td width=80 nowrap>文件类型</td>" & vbLF & _
		"	<td width=120 nowrap>上载时间</td></tr>" & vbLF & _
		"<tr height=20>" & vbLF & _
		"	<td colspan=3>" & TableHeaderField(sFileName, "filename", "&nbsp;名称", sFormParams, iSort, iSorted) & "</td>" & vbLF & _
		"	<td align=right>" & TableHeaderField(sFileName, "filesize", "大小", sFormParams, iSort, iSorted) & "&nbsp;</td>" & vbLF & _
		"	<td>" & TableHeaderField(sFileName, "filetype", "&nbsp;类型", sFormParams, iSort, iSorted) & "</td>" & vbLF & _
		"	<td>" & TableHeaderField(sFileName, "upload_time", "&nbsp;上载时间", sFormParams, iSort, iSorted) & "</td>" & vbLF & _
		"</tr></table>" & vbLF
End Function


Function TableRecords(sSQL, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages, sFileName, sFormParams, sSortParams)
'	response.write sSQL: response.end
	dim sTemp	: sTemp = ""	' 临时字符串变量
	dim j					' 临时循环变量

	'------------------------------------
	' 分页所需的变量定义
	'------------------------------------
	Dim iCounter		: iCounter = 1
	Dim iPrevPage, iNextPage
	
	'------------------------------------
	' 获取数据库连接
	'------------------------------------
	dim crs	: set crs = New CRecordset
	dim rs	: set rs = crs.open(dbLocal,sSQL)
	dim iSerial, sFileSize, sFileType, sUploadTime
	dim sFile, sFileImg, sShareEmpSerial, sShareEmpName, sShareImg, sFileTitle

	' 如果未到记录尾,将记录定位到你翻到的页面的第一个记录,否则显示空行
	if Not rs.EOF then	
		rs.Move (iCurrentPage - 1) * iRecordsPerPage
	end if
	while not rs.EOF and iCounter <= iRecordsPerPage
		iSerial			= crs.GetValue("Serial")
		sFile				= crs.GetValue("filename")
		sFileType		= crs.GetValue("filetype")
		sUploadTime	= crs.GetValue("upload_time")
		sFileSize	= rs("filesize")
		sShareEmpSerial	= crs.GetValue("opento")
	
		sFileImg = "<img border=0 src=""" & GetFileImg(sFileType) & """ align=absmiddle width=16 height=16>"
		sFileType = TransFileType(sFileType)
		sUploadTime = FormatDT(sUploadTime, "yyyy-mm-dd hh:mm")
		'sFileSize = sFileSize & " 字节"

		if sShareEmpSerial <> "" then
			sShareImg = "<img border=0 src=""../images/shared.gif"" width=5 height=13 align=absmiddle>"
			sShareEmpName = vbLF & "共享: " & TransEmpSerial(dbLocal, sShareEmpSerial)
		else
			sShareImg = ""
			sShareEmpName = ""
		end if

		sFileTitle = "名称: " & sFile & vbLF & _
						"类型: " & sFileType & vbLF & _
						"大小: " & TransFileSize(sFileSize) & " ( " & FormatNumber(sFileSize,0) & " 字节 ) " & sShareEmpName

		sTemp = sTemp & "<tr bgcolor=white onmouseover=""this.style.backgroundColor='#B0E0E6';this.style.color='black';"" onmouseout=""this.style.backgroundColor='white';this.style.color='black';"">" & vbLF & _
				"	<td nowrap align=center>" & sShareImg & "</td>" & vbLF & _
				"	<td nowrap align=center>" & sFileImg & "</td>" & vbLF & _
				"	<td nowrap align=left title=""" & sFileTitle & """><a style=""cursor:hand;font-family:MS Sans Serif"" onclick=""window.open('file_p.asp?serial=" & iSerial & "&');"">" & sFile & "</a>&nbsp;</td>" & vbLF & _
				"	<td nowrap align=left><a href=""downfile.asp?serial=" & iSerial & "&""><img border=0 title=""点击这里下载文件"" src=""images/download.gif"" width=16 height=16></td>" & vbLF & _
				"	<td align=right nowrap title=""" & sFileSize & " 字节"">&nbsp;" & TransFileSize(sFileSize) & "&nbsp;</td>" & vbLF & _
				"	<td nowrap title=""" & sFileType & """ style=""font-family:MS Sans Serif"">&nbsp;" & sFileType & "&nbsp;</td>" & vbLF & _
				"	<td nowrap title=""" & sUploadTime & """>" & sUploadTime & "&nbsp;</td>" & vbLF & _
				"</tr>" & vbLF
		iCounter = iCounter + 1
		rs.movenext
	wend
	crs.Close()

	' 填补空白行
	'sTemp = sTemp & WhiteRows(iCols, iCounter, iRecordsPerPage)

	' 首页、前页、后页、尾页等分页信息
	'sTemp = sTemp & "<tr><td class=tdlist colspan=" & iCols & " align=right>" & _
	'			Paginate(sFileName, sFormParams, sSortParams, iCurrentPage, iTotalPages) & _
	'			"&nbsp;</td></tr>"
	TableRecords = _
		"<table cellspacing=0 cellpadding=2 width=""100%"" align=center style=""table-layout:fixed;"" bgcolor=green>" & vbLF & _
		"<tr style=""display:none"">" & vbLF & _
		"	<td width=6 nowrap>是否共享</td>" & vbLF & _
		"	<td width=20 nowrap>文件类型图标</td>" & vbLF & _
		"	<td width=""*"" nowrap>文件名称</td>" & vbLF & _
		"	<td width=20 nowrap>文件下载图标</td>" & vbLF & _
		"	<td width=70 nowrap>文件大小</td>" & vbLF & _
		"	<td width=80 nowrap>文件类型</td>" & vbLF & _
		"	<td width=120 nowrap>上载时间</td>" & vbLF & _
		"</tr>" & vbLF & _
		sTemp & vbLF & _
		"</table>" & vbLF
'		"<tr height=""*""><td></td></tr>" & vbLF & _
End Function



'' ****************************************************************************************************
'' 构造文件夹,次序如下:
'' +我的文档
''    -----------/根目录						'' 文件夹前导图标midnodeline.gif
''    ----------- 自定义目录1				'' 

⌨️ 快捷键说明

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