📄 taskhistory.asp
字号:
<%
'************************************************************************************************
' 文件名: taskhistory.asp
' Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'
' 创建人 : 周秋舫
' 日 期 : 2002-05-30
' 修改历史 :
' ****年**月**日 ****** 修改内容:******************************************************************
' 功能描述 : 任务各相关人员执行任务的过程
' 版 本 :
'************************************************************************************************
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="taskinfor.inc" -->
<!-- #include file="taskhistory.inc" -->
<%
call CheckSecurity()
'********************************************************************************************************
' 服务器端代码
'-------------------------------------------------------------------------------------------------------------------------------------------------
' 分页相关的变量定义
'-------------------------------------------------------------------------------------------------------------------------------------------------
Dim sSQL, sWhere, sOrderby ' SQL语句
Dim pTaskSerial : pTaskSerial = GetParam("serial")
Dim sFileName : sFileName = "taskhistory.asp"
Dim sEmpId : sEmpId = GetUserId
Dim iEmpSerial : iEmpSerial = GetEmpSerial
Dim iTotalRecords : iTotalRecords = 0 ' 分页
Dim iRecordsPerPage : iRecordsPerPage = 10
Dim iTotalPages : iTotalPages = 0
Dim iCols : iCols = 4
Dim iCurrentPage : iCurrentPage = GetParam("Page")
Dim iSort : iSort = GetParam("Sorting")
Dim iSorted : iSorted = GetParam("Sorted")
Dim sSortParams : sSortParams = ""
Dim sDirection : sDirection = ""
Dim sFormParams : sFormParams = "serial=" & pTaskSerial & "&"
'********************************************************************************************************
' 查询参数Serial,如果参数不存在,跳转到出错页面
'-------------------------------------------------------------------------------------------------------------------------------------------------
if IsEmpty(pTaskSerial) then
Server.Transfer("../common/error.asp")
Response.end
end if
'********************************************************************************************************
' 根据Serial参数查询表T_Task,如果我不是任务创建者,则不能察看
'-------------------------------------------------------------------------------------------------------------------------------------------------
if GetEmpSerial <> DLookUp(dbLocal, "T_Task", "creator", "task_serial = " & ToSQL(pTaskSerial,"Number")) then
Response.Redirect("../common/error.asp?error=" & ToURL("不能偷看其它人的任务信息噢!"))
Response.end
end if
'********************************************************************************************************
'********************************************************************************************************
' 构造SQL语句
'-------------------------------------------------------------------------------------------------------------------------------------------------
sSQL = "select t1.record_time, t1.progress_percent, t1.memo, t2.name" & _
" from T_TaskHistory t1" & _
" left join T_Employee t2 on t2.serial = t1.emp_serial"
sWhere = " where ptask_serial in (select serial from t_personaltask where task_serial = " & pTaskSerial & ")"
sOrderby = " order by record_time desc"
'response.write sSQL & sWhere & sOrderby & "<br>" : response.end
'********************************************************************************************************
' 分页SQL语句构造完毕,调用PrepareListData进行分页前的准备
'-------------------------------------------------------------------------------------------------------------------------------------------------
dim arrayFields(3), sDelimiter
sDelimiter = "*"
arrayFields(0) = "record_time"
arrayFields(1) = "progress_percent"
arrayFields(2) = "memo"
arrayFields(3) = "name"
'' PrepareListData函数定义在../include/recordlist.inc
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>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="../images/bg/bg0.jpg">
<br>
<%
Response.Write OuterTableHeader '' OuterTableHeader函数定义在../common/commonpage.inc
Response.Write HeaderWithMenu '' HeaderWithMenu函数定义在../common/commonpage.inc
Response.Write InnerTableHeader '' InnerTableHeader函数定义在../common/commonpage.inc
'********************************************************************************************************
' 主体从这里开始
'-------------------------------------------------------------------------------------------------------------------------------------------------
'********************************************************************************************************
' 从这里开始显示任务本身的信息
'-------------------------------------------------------------------------------------------------------------------------------------------------
Response.Write TaskInfor(pTaskSerial) '' TaskInfor函数定义在task_common.inc
'********************************************************************************************************
' 从这里开始显示任务执行历史过程
'-------------------------------------------------------------------------------------------------------------------------------------------------
Response.Write TaskHistoryTableHeader
Response.Write TaskHistoryTableRecords(sSQL & sWhere & sOrderby, iCols, iRecordsPerPage, iTotalRecords, iCurrentPage, iTotalPages, sFileName, sFormParams, sSortParams )
Response.Write TaskHistoryTableTailer(iCols)
'********************************************************************************************************
' 从这里开始显示链接信息
'-------------------------------------------------------------------------------------------------------------------------------------------------
Response.Write TableLink '' TableLink函数定义在taskhistory.inc
'-------------------------------------------------------------------------------------------------------------------------------------------------
' 主体到这里结束
'********************************************************************************************************
Response.Write InnerTableTailer '' InnerTableTailer函数定义在../common/commonpage.inc
Response.Write Footer '' Footer函数定义在../common/commonpage.inc
Response.Write OuterTableTailer '' OuterTableTailer函数定义在../common/commonpage.inc
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -