📄 complain.asp
字号:
<!--#include file="../conndb.asp"-->
<!--#include file="isAdmin.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>客户投诉管理</title>
<link href="../style.css" rel="stylesheet">
<script language="javascript">
function newwin(url) {
var oth="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left=200,top=200";
oth = oth+",width=400,height=400" ;
var newwin=window.open(url,"newwin",oth);
newwin.focus();
return false;
}
function SelectChk()
{
var s=false;
var deptid,n=0;
var strid,strurl;
var nn = self.document.all.item("dept")
for (j=0;j<nn.length;j++)
{
if (self.document.all.item("dept",j).checked)
{
n = n + 1;
s=true;
deptid = self.document.all.item("dept",j).id+"";
if(n==1)
{
strid = deptid;
}
else
{
strid = strid + "," + deptid;
}
}
}
strurl = "ComplainDelt.asp?id=" + strid;
if(!s) {
alert("请选择要删除的投诉!");
return false;
}
if ( confirm("你确定要删除这些投诉吗?")) {
form1.action = strurl;
form1.submit();
}
}
function sltAll()
{
var nn = self.document.all.item("dept");
for(j=0;j<nn.length;j++)
{
self.document.all.item("dept",j).checked = true;
}
}
function sltNull()
{
var nn = self.document.all.item("dept");
for(j=0;j<nn.length;j++)
{
self.document.all.item("dept",j).checked = false;
}
}
</script>
</head>
<body link="#000080" vlink="#080080">
<form id="form1" name="form1" method="POST">
<%
Dim rs,iflag,n
iflag = Request.QueryString("flag")
n = 0
Set rs=Server.CreateObject("ADODB.RecordSet")
%><p align=center><font style='FONT-SIZE:12pt' color="#000080"><b>投 诉 管 理</b></font></p>
<table align=center border="1" cellspacing="0" width="100%" bordercolorlight="#E0D3E4" bordercolordark="#ECF5FF">
<tr>
<td width="10%" align="center" bgcolor="#E0D3E4"><strong>编号</strong></td>
<td width="30%" align="center" bgcolor="#E0D3E4"><strong>投诉时间</strong></td>
<td width="25%" align="center" bgcolor="#E0D3E4"><strong>投诉用户</strong></td>
<td width="25%" align="center" bgcolor="#E0D3E4"><strong>订单号</strong></td>
<%If iflag="0" Then%>
<td width="10%" align="center" bgcolor="#E0D3E4"><strong>投诉处理</strong></td>
<%Else%>
<td width="10%" align="center" bgcolor="#E0D3E4"><strong>选择</strong></td>
<%End If%>
</tr>
<%
'投诉信息
sql = "Select * From Complain Where flag="&iflag&" Order by Posttime desc"
'Response.Write sql
rs.Open sql,conn,1,1
If rs.Bof OR rs.Eof Then
Response.Write "<tr><td colspan=5 align=center>目前还没有客户投诉记录。</td></tr></table>"
Else
'三天内没有解决则加注图标用来提示
Dim ndate,strTime,FlagShow
'ndate表示3天前此时
ndate=DateAdd("d",-3,Date())
rs.PageSize=15
rs.AbsolutePage =1
If Request("page")<>"" Then rs.AbsolutePage =Request("page")
RowCount =rs.PageSize
Do While Not rs.Eof And RowCount>0
n = n + 1
'处理日期格式
strTime = rs("PostTime")
If Left(strTime,2)<>"20" Then
strTime = "20" & strTime
End If
If DateDiff("d",rs("PostTime"),ndate+time())>=0 And iflag=0 Then
FlagShow = "<img SRC='../images/attention.gif' ALT='此投诉急需解决!' border=0>"
Else
FlagShow = ""
End If
%>
<tr>
<td align="center" rowspan="2"><%=n%></td>
<td><%=strTime%><%=FlagShow%></td>
<td align="center"><a href="../admin/UserView.asp?userid=<%=rs("UserId")%>" onClick="return newwin(this.href)"><%=rs("UserId")%></a></td>
<td align="center"><%=rs("OrderNumber")%></td>
<td align="center">
<%If iflag="0" Then%>
<a href="ComplainDeal.asp?id=<%=rs("id")%>" onClick="return newwin(this.href)">解决</a>
<%Else%>
<input type="checkbox" name="dept" id="<%=rs("id")%>">
<%End If%>
</td>
</tr>
<tr>
<td align="left" colspan="4">
<table><tr><td>
<%If iflag="0" Then%>
投诉内容:<%=rs("content")%>
<%Else%>
投诉内容:<%=rs("content")%><br>
解决方案:<%=rs("result")%>
<%End If%>
</td></tr>
</table>
</td>
</tr>
<%
rs.MoveNext()
RowCount = RowCount-1
loop
%>
</table>
<%
If rs.PageCount>1 then
Response.Write "<table border='0'>"
Response.Write "<tr>"
Response.Write "<td><b>分页:</b></td>"
For i=1 to rs.PageCount
Response.Write "<td><a href='BoardList.asp?page=" & i & "'>"
Response.Write "[<b>" & i & "</b>]</a>"
Response.Write "</td>"
Next
Response.Write "</tr></table>"
End if
end if
%>
<p align="center">
<%if iflag="1" then%>
<input type="button" value="全 选" onclick="sltAll()" name=button1>
<input type="button" value="清 空" onclick="sltNull()" name=button2>
<input type="button" value="删 除" name="delete" onclick="SelectChk()">
<%end if%></p>
<br>
<input type=hidden name="dept">
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -