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

📄 infomgr1_a.asp

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

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

' 功能描述 : 公文附件信息管理文件
'  版 本 :
'************************************************************************************************
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="infomgr1_a.inc" -->

<%
'call Security()

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

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


'If IsDocAdmin = false And CStr(GetOfficer) <> CStr(GetEmpSerial) Then
'				Response.Redirect  "../common/error.asp?error=对不起,该页面只有公文管理员才能访问,其他员工无权访问!"
'				Response.end
'End If
'
Dim did
did=GetParam("did")

'sSQL = "select sn,name,dept,starttime from t_rule_info" 

if UCase(Request.ServerVariables("REQUEST_METHOD") = "POST") then
	if Not IsEmpty(GetParam("formAction")) Then
		InfoMaintain()
	else
		sWhere=InfoSearch()
	'sSQL = sSQL & " WHERE starttime>='2002-6-24' and endtime<='2002-6-24'"
	end if
end if


'----------------------------------------------------------------------------------------------------------------------------------------
' 分页相关的变量定义
'----------------------------------------------------------------------------------------------------------------------------------------
Dim sFileName			: sFileName = "infomgr1_a.asp"
Dim sEmpId				: sEmpId = GetUserId
Dim iTotalRecords		: iTotalRecords = 0			' 分页
Dim iRecordsPerPage	: iRecordsPerPage = 7
Dim iTotalPages			: iTotalPages = 0
Dim iCols					: iCols = 2
Dim iCurrentPage		: iCurrentPage = GetParam("Page")
Dim iSort					: iSort = GetParam("Sorting")
Dim iSorted				: iSorted = GetParam("Sorted")
Dim sSortParams		: sSortParams = ""
Dim sFormParams		: sFormParams = "did=" & did & "&"
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 * from t_doc_attachment where doc_id=" & did 

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

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">
<!-- 日历 -->
<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>
<!-- 日历 -->

<script language="VBScript" src="../common/validate.vbs"></script>
<script language="VBScript">
Sub btnAdd_OnClick()
	dim sError 
	sError = ValidateText("document.all.frmInfoMgr.newsubject", "附件主题", true, 0)
	if sError <> "" then
		msgbox sError
		exit sub
	end if

	sError = ValidateNumber("document.all.frmInfoMgr.newpages", "附件页数", false, 0)
	if sError <> "" then
		msgbox sError
		exit sub
	end if

	document.all.frmInfoMgr.formAction.value = "addtype"
	document.all.frmInfoMgr.submit()
End Sub

Sub btnCancel_OnClick()
	dim a
	document.location.href = "infomgr1_a.asp?did=" & frmInfoMgr.did.value
End Sub

Sub btnMod_OnClick()
'	dim sError : sError = ValidateText("document.all.frmInfoMgr.newname", "制度名称", true, 0)
'	sError = sError  & ValidateText("document.all.frmInfoMgr.newdept", "制定部门", true, 0)
'	
'	if sError <> "" then
'		msgbox sError
'		exit sub
'	end if
'
	document.all.frmInfoMgr.formAction.value = "updtype"
	document.all.frmInfoMgr.submit()
End Sub

Sub btnDel_OnClick()
	If Confirm("确实要删除吗?") Then

	document.all.frmInfoMgr.formAction.value = "deltype"
	document.all.frmInfoMgr.submit()
	 End If
End Sub

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

Sub btnClear_OnClick()
	document.all.frmInfoMgr.reset()
End Sub

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	"<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>"

'						"<tr><td colspan=2>" & TableSearch & "</td></tr>" & _
'-------------------------------------------------------------------------------------------------------------------------------------------------
' 主体到这里结束
'********************************************************************************************************
Response.Write InnerTableTailer
'Response.Write Footer
Response.Write OuterTableTailer
%>

</body>
</html>

⌨️ 快捷键说明

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