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

📄 list_complaint.asp

📁 物业管理和办公自动化系统
💻 ASP
字号:
<%
'************************************************************************************************
' 文件名: list_complaint.asp
' Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'
'  创建人 : 魏霖
'  日 期 : 2002-10-31
' 修改历史 :
'   ****年**月**日 ****** 修改内容:**************************************************
' 功能描述 : 
'  版 本 :
'************************************************************************************************
option explicit
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1

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

<%
call CheckSecurity()

dim iRight:iRight=HasRight(ID_CUSTOMER)
if iRight=1 or iRight=2 then
else
	Response.Clear
	Response.Redirect "../include/error.asp?error=只有客户意见管理员或具有客户意见查询权限的人员才能访问该网页&"
	Response.End
end if

dim conn:set conn=DBConnection


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

'-------------------------------------------------------------------------------------------------------------------------------------------------
' 分页相关的变量定义
'-------------------------------------------------------------------------------------------------------------------------------------------------
Dim sSQL, sWhere, sOrderby
Dim sFileName			: sFileName = "list_complaint.asp"
Dim iTotalRecords		: iTotalRecords = 0			' 分页
Dim iRecordsPerPage	: iRecordsPerPage = 12
Dim iTotalPages			: iTotalPages = 0
Dim iCols					: iCols = 5
Dim iCurrentPage		: iCurrentPage = GetParam("Page")
Dim sSorting					: sSorting = GetParam("Sorting")
Dim sSorted				: sSorted = GetParam("Sorted")
Dim sSortParams		: sSortParams = ""
Dim sFormParams		: sFormParams = ""
Dim sDirection			: sDirection = ""

'-----------------------------------------------------------------------------------------------------'
' 查询参数
'-----------------------------------------------------------------------------------------------------

dim pCustomername		: pCustomername = GetParam("customername")
dim pComplaint		: pComplaint = GetParam("complaint")
dim pChief       :pChief=GetParam("chief")
dim pIfworksheet :pIfworksheet=GetParam("ifworksheet")


'sFormParams = "customer=" & pCustomername & "complaint="&pComplaint&"chief="&pChief&"Ifworksheet="&pIfworksheet&"&"
''********************************************************************************************************
'' 构造分页的SQL语句
''********************************************************************************************************
sSQL = "select * from t_customer_complaints"
		

sOrderby = " order by complaint_ID"

''response.write sSQL & sWhere & sOrderby & "<br>" : response.end
''********************************************************************************************************
'' 查询条件限制
''********************************************************************************************************
if pIfworksheet=1 then
    sWhere = " where worksheet_id is null"
elseif pIfworksheet=2 then   
    sWhere = " where worksheet_id is not null"    
end if


if pCustomername <> "" then     
    if sWhere="" then
         sWhere=" where customer_name like"& ToSQL("%" & pCustomername & "%","Text")    
    else
         sWhere = sWhere & " and customer_name like"& ToSQL("%" & pCustomername & "%","Text") 
    end if
end if

if pComplaint <> "" then 
    if sWhere="" then
         sWhere=" where complaint like"& ToSQL("%" & pComplaint & "%","Text")
    else
         sWhere = sWhere & " and complaint like"& ToSQL("%" & pComplaint & "%","Text") 
    end if
end if
if pChief <> "" then 
    if sWhere="" then
         sWhere=" where chief like"& ToSQL("%" & pChief & "%","Text")
    else
         sWhere = sWhere & " and chief like"& ToSQL("%" & pChief & "%","Text") 
    end if
end if

   
'response.write sSQL & sWhere & sOrderby & "<br>" : response.end
'********************************************************************************************************
' 分页SQL语句构造完毕,调用PrepareListData进行分页前的准备
'-------------------------------------------------------------------------------------------------------------------------------------------------
dim arrayFields(3), sDelimiter
sDelimiter = "*"
arrayFields(0) = "customer_name"
arrayFields(1) = "complaint"
arrayFields(2) = "chief"



call PrepareListData(conn,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="../include/common.css" type="text/css">
<style type="text/css">
.tdlist		{border-width:0px}
.tdHead	{border-width:0px}
</style>

<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

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

Disconnect(conn)
%>

</body>
</html>

⌨️ 快捷键说明

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