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

📄 typemgr.asp

📁 物业管理和办公自动化系统
💻 ASP
字号:
<%
'************************************************************************************************
' 文件名: typemgr.asp
' Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'
'  创建人 : zhouyun
'  日 期 : 2002-05-13

' 修改历史 :
'   ****年**月**日 ****** 修改内容:**************************************************

' 功能描述 : type manager
'  版 本 :
'************************************************************************************************
option explicit
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
%>

<!-- #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="typemgr.inc" -->

<%
'call Security()

'********************************************************************************************************
' 服务器端代码

'********************************************************************************************************
' 如果是提交,则调用函数TypeMaintain更新数据库

If IsRuleAdmin = false Then
				Response.Redirect  "../common/error.asp?error=对不起,该页面只有制度管理员才能访问,<br>其他员工无权访问!"
				Response.end
End If

if UCase(Request.ServerVariables("REQUEST_METHOD") = "POST") then
	TypeMaintain()
end if


'----------------------------------------------------------------------------------------------------------------------------------------
' 分页相关的变量定义
'----------------------------------------------------------------------------------------------------------------------------------------
Dim sSQL, sWhere, sOrderby
Dim sFileName			: sFileName = "typemgr.asp"
Dim sEmpId				: sEmpId = GetUserId
Dim iTotalRecords		: iTotalRecords = 0			' 分页
Dim iRecordsPerPage	: iRecordsPerPage = 15
Dim iTotalPages			: iTotalPages = 0
Dim iCols					: iCols = 1
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 pDay1  : pDay1 = GetParam("day1")
'Dim pDay2  : pDay2 = GetParam("day2")
'Dim pTaskType		: pTaskType = GetParam("task_type")
'Dim pTaskStatus	: pTaskStatus = GetParam("task_status")
'if IsEmpty(pDay1) then pDay1 = date
'if IsEmpty(pDay2) then pDay2 = date
'
'
'if IsEmpty(pTaskType) then pTaskType = 0				' 如果没有task_type参数,则认为是选择所有类型的任务
'if Not IsNumeric(pTaskType) then pTaskType = 0		' 如果task_type参数不对,也认为是选择所有类型的任务
'pTaskType = CInt(pTaskType)								' 转换成整数类型
'
'if IsEmpty(pTaskStatus) then pTaskStatus = 0			' 如果没有task_status参数,则认为是选择所有时间类型的任务
'if Not IsNumeric(pTaskStatus) then pTaskStatus = 0 ' 如果task_status参数不对,也认为是选择所有时间类型的任务
'pTaskStatus = CInt(pTaskStatus)							' 转换成整数类型
'
'sFormParams = "day1=" & pDay1 & "&day2=" & pDay2 & "&task_type=" & pTaskType & "&task_status=" & pTaskStatus & "&"
'
'
'********************************************************************************************************
' 构造分页的SQL语句
'********************************************************************************************************
sSQL = "select type from t_rule_types"

'********************************************************************************************************
' 分页SQL语句构造完毕,调用PrepareListData进行分页前的准备
'-------------------------------------------------------------------------------------------------------------------------------------------------
dim arrayFields(4), sDelimiter
sDelimiter = "*"
arrayFields(0) = "type"

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">
<script language="VBScript" src="../common/validate.vbs"></script>
<script language="VBScript">
Sub btnAdd_OnClick()
	dim sError : sError = ValidateText("document.all.frmTypeMgr.newtypename", "类别名称", true, 0)
	if sError <> "" then
		msgbox sError
		exit sub
	end if
	document.all.frmTypeMgr.formAction.value = "addtype"
	document.all.frmTypeMgr.submit()
End Sub

Sub btnCancel_OnClick()
	document.location.href = "typemgr.asp"
End Sub

Sub btnMod_OnClick()
	dim sError : sError = ValidateText("document.all.frmTypeMgr.newtypename", "类别名称", true, 0)
	if sError <> "" then
		msgbox sError
		exit sub
	end if
	document.all.frmTypeMgr.formAction.value = "updtype"
	document.all.frmTypeMgr.submit()
End Sub

Sub btnDel_OnClick()
	document.all.frmTypeMgr.formAction.value = "deltype"
	document.all.frmTypeMgr.submit()
End Sub

Sub btnRes_OnClick()
	document.all.frmTypeMgr.reset()
End Sub

Sub btnClear_OnClick()
	document.all.frmTypeMgr.reset()
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	"<table cellspacing=0 cellpadding=0 width=600 align=left border=0>" & _
						"<tr valign=top>" & _
						"		<td width=300>" & _
										TableHeader & _
										TableRecords(sSQL & sWhere & sOrderby, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages, sFileName, sFormParams, sSortParams ) & _
										"</table>" & _
						"		</td>" & _
						"		<td width=300>" & _
										TableAdd & _
						"		</td>" & _
						"</tr>" & _
						"<tr><td colspan=2>" & TableLink & "</td></tr>" & _
						"</table>"

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

</body>
</html>

⌨️ 快捷键说明

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