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

📄 formlist.asp

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

'----------------------------------------------------------
' 服务器端设置
'----------------------------------------------------------
option explicit
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
%>

<!-- include files begin -->

<!-- #include file="../include/config.inc" -->
<!-- #include file="../include/common.inc" -->
<!-- #include file="../include/debug.inc" -->
<!-- #include file="../include/db.inc" -->
<!-- #include file="../include/date.inc" -->
<!-- #include file="../include/datahandle.inc" -->
<!-- #include file="../include/recordlist.inc" -->
<!-- #include file="../include/security.inc" -->

<!-- #include file="../common/commonpage.inc" -->

<!-- #include file="formlist.inc" -->

<!-- include files end -->

<%
'call CheckSecurity()

'********************************************************************************************************
' 服务器端代码
'
'-------------------------------------------------------------------------------------------------------
' 分页相关的变量定义
'-----------------------------------------------------------------------------------------------------------
Dim sSQL, sWhere, sOrderby
Dim sFileName			: sFileName			= "formlist.asp"
Dim iEmpSerial			: iEmpSerial		= GetEmpSerial
Dim sEmpName			: sEmpName			= GetUserName
Dim iTotalRecords		: iTotalRecords		= 0			' 分页
Dim iRecordsPerPage		: iRecordsPerPage	= 10
Dim iTotalPages			: iTotalPages		= 0
Dim iCols				: iCols				= 5
Dim iCurrentPage		: iCurrentPage		= GetParam("Page")
Dim iSort				: iSort				= GetParam("Sorting")
Dim iSorted				: iSorted			= GetParam("Sorted")
Dim sSortParams			: sSortParams		= ""
Dim sFormParams			: sFormParams		= ""
Dim sDirection			: sDirection		= ""
Dim sAction				: sAction			= GetParam("action")

'-----------------------------------------------------------------------------------------------------'
' 查询参数,组,是否公开,姓名关键字,单位名称关键字
'-----------------------------------------------------------------------------------------------------
dim pUserName			: pUserName			= GetParam("user_name")
dim pApplicant			: pApplicant		= GetParam("applicant")
dim pApplyDate1			: pApplyDate1		= GetParam("apply_date1")
dim pApplyDate2			: pApplyDate2		= GetParam("apply_date2")
dim pName				: pName				= GetParam("name")

sFormParams = "action=" & sAction & "&user_name=" & pUserName & "&applicant=" & pApplicant & "&apply_date1=" & pApplyDate1 & "&apply_date2=" & pApplyDate2 & "&name=" & pName & "&"

'********************************************************************************************************
' 构造分页的SQL语句
'--------------------------------------------------------------------------------------------------------
sSQL = "select ID, FormName, UserName, Applicant, ApplyDate, Status from T_FormList" 
sWhere = " where signer = '" & sEmpName & "'" 
if IsOfficer() then 
	select case sAction
		case "passed"
			sWhere = " where ( status = '审批通过' or status = '已经领取' )" 
		case "forpass"
			sWhere = " where status = '等待审批'" 
	end select
end if
if sAction = "opt" then sWhere = " where operator = '" & sEmpName & "'" 
sOrderby = " order by ID desc"

'********************************************************************************************************

'********************************************************************************************************
' 查询条件限制
'--------------------------------------------------------------------------------------------------------
if Not IsEmpty(pUserName) then sWhere = sWhere & " and UserName like " & ToSQL("%" & pUserName & "%","Text")
if Not IsEmpty(pApplicant) then sWhere = sWhere & " and Applicant like " & ToSQL("%" & pApplicant & "%","Text")
if Not IsEmpty(pApplyDate1) then sWhere = sWhere & " and ApplyDate >= " & ToSQL(pApplyDate1,"Text")
if Not IsEmpty(pApplyDate2) then sWhere = sWhere & " and ApplyDate <= " & ToSQL(pApplyDate2,"Text")
if Not IsEmpty(pName) then sWhere = sWhere & " and ID in (select FormID from T_FormInfo where name like " & ToSQL("%" & pName & "%","Text") & ")"

'********************************************************************************************************

'********************************************************************************************************
' 分页SQL语句构造完毕,调用PrepareListData进行分页前的准备
'--------------------------------------------------------------------------------------------------------
dim arrayFields(5), sDelimiter
sDelimiter = "*"
arrayFields(0)	=	"FormName"
arrayFields(1)	=	"Applicant"
arrayFields(2)	=	"ApplyDate"
arrayFields(3)	=	"Status"
arrayFields(4)	=	"UserName"

call PrepareListData(sSQL & sWhere & sOrderby, Join(arrayFields, sDelimiter), sDelimiter)
'********************************************************************************************************
%>

<html>
<head>
<title>上海信息大楼 Shanghai Information Tower</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../common/common.css" type="text/css">

<!-- 日历 begin -->
<IFRAME style="display:none;position:absolute;width:148;height:194;z-index=100" ID="CalFrame" MarginHeight=0 MarginWidth=0 noresize frameborder=0 scrolling=no src="../common/cal/calendar.htm"></IFRAME>
<script language="javascript" src="../common/cal/calendar.js"></script>
<script for=document event="onclick()">
<!--
document.all.CalFrame.style.display="none";
//-->
</script>
<!-- 日历 end -->

<script language="VBScript">
Sub btnSearch_OnClick()
	document.all.frmSearch.submit()
End Sub
</script>
</head>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="../images/bg/bg0.jpg">
<br>

<%
Response.Write OuterTableHeader
Response.Write HeaderWithMenu
Response.Write InnerTableHeader
'********************************************************************************************************
' 主体从这里开始
'--------------------------------------------------------------------------------------------------------
Response.Write TableSearch

if IsOfficer() then
	select case sAction
		case "passed"
			Response.Write TableHeader("通过审批的申请单列表")
		case "forpass"
			Response.Write TableHeader("等待审批的申请单列表")
		case "opt"
			Response.Write TableHeader("我负责采购的申请单列表")
		case else
			Response.Write TableHeader("我的材料设备采购申请单列表")
	end select
else
	if sAction = "opt" then 
		Response.Write TableHeader("我负责采购的申请单列表")
	else
		Response.Write TableHeader("我的材料设备采购申请单列表")
	end if
end if
	
Response.Write TableRecords(sSQL & sWhere & sOrderby, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages, sFileName, sFormParams, sSortParams )


Response.Write TableLink
'--------------------------------------------------------------------------------------------------------
' 主体到这里结束
'********************************************************************************************************
Response.Write InnerTableTailer
Response.Write Footer
Response.Write OuterTableTailer
%>

</body>
</html>

⌨️ 快捷键说明

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