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

📄 formlist.inc

📁 物业管理和办公自动化系统
💻 INC
字号:
<%
'#############################################################################################
'#
'#	文件名	 : formlist.inc
'#	Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'#
'#	创建人	 : BinZha
'#  日 期	 : 2002-07-19
'#
'#	修改历史  : ****年**月**日 ****** 修改内容:**********************************************
'#
'#	功能描述	 : 材料设备采购申请单列表函数文件
'#  版   本	 :
'#
'#############################################################################################

Function TableSearch()
	'' 申请日期的日历,DrawCal函数定义在../common/commonpage.inc

	TableSearch = _
		TableTitle("设 置 查 询 条 件", 600, "", "") & _
		"<table cellspacing=0 cellpadding=0 width=600 align=center border=0>" & _
		"<form name=""frmSearch"" method=post action=""formlist.asp?action=" & sAction & """>" & _
		"<tr height=30>" & _
		"	<td width=220>申请部门:&nbsp;&nbsp;&nbsp;&nbsp;<input type='text' name='applicant' value='" & pApplicant & "'>" & "</td>" & _
		"	<td width=200>" & DrawCal("起始日期", pApplyDate1, "apply_date1", "dateimg11") & "</td>" & _
		"	<td width=180>" & DrawCal("截至日期", pApplyDate2, "apply_date2", "dateimg12") & "</td>" & _
		"</tr>" & _
		"<tr height=30>" & _
		"	<td width=220>材料设备名称:<input type=text name='name' value='" & pName & "'>" & "</td>" & _
		"	<td width=200>领 用 人:<input type=text name='user_name' value='" & pUserName & "'>" & "</td>" & _	
		"	<td width=180>&nbsp;&nbsp;&nbsp;&nbsp;<span id=btnSearch style=""cursor:hand"" title=""设置查询条件,然后点击查询按钮进行查询""><img border=0 src=""../images/search.gif"" style=""vertical-align:middle"">查询</span></td>" & _
		"</tr>" & _
		"<tr height=10><td colspan=3</td></tr>" & _
		"</form>" & _
		"</table>"
End Function

Function TableHeader(sHeader)
	TableHeader = _
		"<table cellspacing=0 cellpadding=0 width=600 align=center class=tablelist>" & _
		"<tr>" & _
		"<td colspan=" & iCols & " bgcolor=""#0040a0"" align=center style=""color:white;font-weight:600"" height=20 >" & sHeader & "</td></tr>" & _
		"<tr>" & _
		"<td class=tdHead width=150>&nbsp;<img src=""../images/bg/ar-y.gif"" width=8 height=8>&nbsp;" & TableHeaderField(sFileName, "FormName", "申请单名称", sFormParams, iSort, iSorted) & "</td>" & _
		"<td class=tdHead width=150>&nbsp;" & TableHeaderField(sFileName, "Applicant", "申请部门", sFormParams, iSort, iSorted) & 	"</td>" & _
		"<td class=tdHead width=100>&nbsp;" & TableHeaderField(sFileName, "ApplyDate", "申请日期", sFormParams, iSort, iSorted) & "</td>" & _
		"<td class=tdHead width=100>&nbsp;" & TableHeaderField(sFileName, "Status", "状态", sFormParams, iSort, iSorted) & "</td>" & _
		"<td class=tdHead width=100>&nbsp;" & TableHeaderField(sFileName, "UserName", "领用人", sFormParams, iSort, iSorted) & "</td>" & _
		"</tr>"
End Function

Function TableRecords(sSQL, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages, sFileName, sFormParams, sSortParams)
	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 ID, sFormName, sApplicant, sApplyDate, sStatus, sUserName

	' 如果未到记录尾,将记录定位到你翻到的页面的第一个记录,否则显示空行
	if Not rs.EOF then	
		rs.Move (iCurrentPage - 1) * iRecordsPerPage
	end if
	while not rs.EOF and iCounter <= iRecordsPerPage
		ID					= crs.GetValue("ID")
		sFormName			= crs.GetValue("FormName")
		sApplicant			= crs.GetValue("Applicant")
		sApplyDate			= crs.GetValue("ApplyDate")
		sStatus				= crs.GetValue("Status")
		sUserName			= crs.GetValue("UserName")

		sTemp = sTemp & _
				"<tr bgcolor=white>" & _
				"	<td class=tdlist title=""" & sFormName & """ style=""cursor:hand"" onclick=""javascript:location.href='forminfo.asp?id=" & ID & "';"">&nbsp;<img src=""../images/bg/ar-g.gif"" width=8 height=8>&nbsp;" & Bref(sFormName,18) & "&nbsp;</td>" & _
				"	<td class=tdlist title=""" & sApplicant & """ align=left>&nbsp;" & Bref(sApplicant,10) & "&nbsp;</td>" & _
				"	<td class=tdlist title=""" & sApplyDate & """ align=left>&nbsp;" & sApplyDate & "&nbsp;</td>" & _
				"	<td class=tdlist title=""" & sStatus & """ align=left>&nbsp;" & Bref(sStatus, 8) & "&nbsp;</td>" & _
				"	<td class=tdlist title=""" & sUserName & """>&nbsp;" & Bref(sUserName, 10) & "&nbsp;</td>" & _
				"</tr>"
		iCounter = iCounter + 1
		rs.movenext
	wend
	crs.Close()

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

	' 首页、前页、后页、尾页等分页信息
	sTemp = sTemp & "<tr bgcolor=white><td class=tdlist colspan=" & iCols & " align=right>" & _
				Paginate(sFileName, sFormParams, sSortParams, iCurrentPage, iTotalPages) & _
				"&nbsp;</td></tr></table>"
	TableRecords = sTemp
End Function


Function TableLink()
	TableLink = _
		"<table width=600 cellspacing=0 cellpadding=0 border=0 align=center>" & _
		"<tr height=10>" & _ 
		"	<td width=600><img src=""../images/bg/line.gif"" width=600 height=3></td>" & _
		"</tr>" & _
		"<tr height=20>" & _
		"	<td width=600>&nbsp;" & _
		"		<img src=""../images/goto.gif"">&nbsp;<a href=""forminfo.asp"">新建申请单</a>&nbsp;&nbsp;&nbsp;"

	if IsOfficer() then
		if not IsEmpty(sAction) then TableLink = TableLink & _
			"	<img src=""../images/goto.gif"">&nbsp;<a href=""formlist.asp"">我的申请单</a>&nbsp;&nbsp;&nbsp;"

		if sAction <> "forpass" then TableLink = TableLink & _
			"	<img src=""../images/goto.gif"">&nbsp;<a href=""formlist.asp?action=forpass&"">等待审批的申请单</a>&nbsp;&nbsp;&nbsp;" 

		if sAction <> "passed" then TableLink = TableLink & _
			"	<img src=""../images/goto.gif"">&nbsp;<a href=""formlist.asp?action=passed&"">通过审批的申请单</a>&nbsp;&nbsp;&nbsp;"
	end if
	
	if sAction <> "opt" then TableLink = TableLink & _
		"		<img src=""../images/goto.gif"">&nbsp;<a href=""formlist.asp?action=opt"">我负责采购的申请单</a>&nbsp;&nbsp;&nbsp;" 

	TableLink = TableLink & _
		"	</td>" & _
		"</tr>" & _
		"</table>"
End Function
%>

⌨️ 快捷键说明

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