📄 diaryquery.asp
字号:
<%
'************************************************************************************************
' 文件名: diaryquery.asp
' Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'
' 创建人 : 蔡晓燕
' 日 期 : 2002-06-06
' 修改历史 :
' ****年**月**日 ****** 修改内容:**************************************************
' 功能描述 : 个人工作日志的查询,输入查询条件(指定开始时间和结束时间),列出查询结果
' 版 本 :
'************************************************************************************************
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/emp.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="diaryquery.inc" -->
<%
call CheckSecurity()
'********************************************************************************************************
' 服务器端代码
'-------------------------------------------------------------------------------------------------------------------------------------------------
' 分页相关的变量定义
'-------------------------------------------------------------------------------------------------------------------------------------------------
Dim sSQL, sWhere, sOrderby
Dim sFileName : sFileName = "diaryquery.asp"
Dim sEmpId : sEmpId = GetEmpSerial
Dim iTotalRecords : iTotalRecords = 0 ' 分页
Dim iRecordsPerPage : iRecordsPerPage = 15
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 sFormParams : sFormParams = ""
Dim sDirection : sDirection = ""
'-------------------------------------------------------------------------------------------------------------------------------------------------
' 查询参数,开始时间,结束时间
'-------------------------------------------------------------------------------------------------------------------------------------------------
Dim pDay1 : pDay1 = GetParam("day1")
Dim pDay2 : pDay2 = GetParam("day2")
if IsEmpty(pDay1) then pDay1 = date
if IsEmpty(pDay2) then pDay2 = date
sFormParams = "day1=" & pDay1 & "&day2=" & pDay2 & "&"
'********************************************************************************************************
' 构造分页的SQL语句
'********************************************************************************************************
sSQL = "select * from T_Diary "
sWhere = " where emp_serial=" & ToSQL(sEmpId, "Number")& " and (record_time >='" & pDay1 & "' and record_time <'" & DateAdd("d", 1, pDay2) & "')"
sOrderby = " order by record_time"
'********************************************************************************************************
' 分页SQL语句构造完毕,调用PrepareListData进行分页前的准备
'-------------------------------------------------------------------------------------------------------------------------------------------------
dim arrayFields(3), sDelimiter
sDelimiter = "*"
arrayFields(0) = "record_time"
arrayFields(1) = "subject"
arrayFields(2) = "content"
arrayFields(3) = "emp_serial"
call PrepareListData(sSQL & sWhere & sOrderBy, Join(arrayFields, sDelimiter), sDelimiter)
''response.write sSQL & sWhere & sOrderBy & "<br>"
'********************************************************************************************************
%>
<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">
Sub btnSearch_OnClick()
document.all.frmSearchNote.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
Response.Write TableHeader
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 + -