<%
'商易仿淘宝4.0(多用户)
'ACCESS版演示网站：http://www.ftaobao.com(商易仿淘宝商城)
'SQL版演示网站：http://sql.ftaobao.com
'电话：0571-56907100
'QQ：1147100
%>
<%qx=3%>
<!--#include file="top.asp"-->
<!--#include file="../leaguer/check.asp"-->
<!--#include file="../../include/conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../include/css.css" rel="stylesheet" type="text/css">
</head><body>


<%
if Request("y")="del" then
conn.execute("Delete * from user_kefu where id="&shopnet("id")&"")
Response.redirect "adminsupport.asp?keywords="&request("keywords")&"&xs="&request("xs")&"&page="&Request("page")&""
end if
keywords=shopnet("keywords")
Set rs=Server.CreateObject("ADODB.Recordset")
if request("xs")<>""then
sql="select * from user_kefu where datediff('d',sj,now())<"&clng(shopnet("xs"))&" order by id desc"
elseif keywords<>"" then
sql="select * from user_kefu where (bt like '%"&keywords&"%' or nr like '%"&keywords&"%') order by id desc "
else
sql="select * from user_kefu order by id desc"
end if
rs.open sql,conn,3,1 

 rs.pagesize = 15
if request("page")=""  or isempty(request("page")) then
page = 1
else
page=int(request("page"))
end if
if page>rs.pagecount then
page=rs.pagecount
end if
if not rs.BOF then
Rs.Move Rs.PageSize*(page-1)
end if%>
<br>
<table cellspacing="1" cellpadding="4" class="tableborder" align="center">
  <tr align="center" valign="middle">
    <td height="25" colspan="3" background="../images/admin_bg_4.gif" bgcolor="#FFFFFF"><span style="color: #FFFFFF; font-weight: bold">客户支持管理</span></td>
  </tr>
  <tr align="center" valign="middle"> 
    <td width="430" height="21" bgcolor="#FFFFFF">客户标题</td>
    <td width="125" height="21" bgcolor="#FFFFFF">加入日期</td>
    <td width="50" height="21" bgcolor="#FFFFFF">删除</td>
  </tr>
  <%
if rs.eof then
response.Write("<tr><td colspan=3 bgcolor=#ffffff align=center height=25>当前没有任何客服服务信息！</td></tr>")
else
i=1
do while not rs.eof and i<=rs.pagesize
%>
  <tr valign="middle"> 
    <td width="430" height="25" bgcolor="#FFFFFF">[<%=rs("userid")%>]<a href="wtxiangxi.asp?id=<%= rs("id")%>" target="_blank"><%=replace(rs("bt"),"<","〈")%></a></td>
    <td width="125" height="25" align="center" bgcolor="#FFFFFF"><%= rs("sj") %></td>
    <td width="50" height="25" align="center" bgcolor="#FFFFFF"><a href=adminsupport.asp?y=del&keywords=<%=request("keywords")%>&xs=<%=request("xs")%>&id=<%=rs("id")%>&page=<%=page%>>删除</a></td>
  </tr>
  <%
i=i+1
 rs.MoveNext                                              
 loop 
%>
  <tr align="center" valign="middle"> 
    <form name=form method=post action=?keywords=<%=request("keywords")%>&xs=<%=request("xs")%>>
      <td colspan="3" bgcolor="#FFFFFF"> <%
if rs.recordcount<>0 then
if page-1 mod 10=0 then
		p=(page-1) \ 10
	else
		p=(page-1) \ 10
	end if

	response.write "页次："& page &"/"& rs.pagecount &"页 每页"& rs.pagesize &" 共"& rs.recordcount &"条记录"&_
					" 分页："
    if rs.pagecount>1 and page<>1 then response.write "<a href=?keywords="&request("keywords")&"&xs="&request("xs")&"&page=1 title='首页'>[|<]</a> "
	if p*10>0 then response.write "<a href='?keywords="&request("keywords")&"&xs="&request("xs")&"&page="&p*10&"' title=上十页>[&lt;&lt;]</a>   "
    uming_i=1
	for ii=p*10+1 to P*10+10
		   if ii=page then
	          response.write "<font color=#ff0000>["+Cstr(ii)+"]</font> "
		   else
		      response.write "<a href='?keywords="&request("keywords")&"&xs="&request("xs")&"&page="&ii&"'>["+Cstr(ii)+"]</a>   "
		   end if
		if ii=rs.pagecount then exit for
		 uming_i=uming_i+1
	next
	if ii<=rs.pagecount and uming_i=11 then response.write "<a href='?keywords="&request("keywords")&"&xs="&request("xs")&"&page="&ii&"' title=下十页>[&gt;&gt;]</a>   "
	if rs.pagecount>1 and page<>rs.pagecount then response.write "<a href=?keywords="&request("keywords")&"&xs="&request("xs")&"&page="& rs.pagecount &" title='尾页'>[>|]</a>"
response.write(" 　跳页：<input type=text name=page size=2 maxlength=3 class=wenbenkuang> <input type=submit name=Submit value=Go class=go-wenbenkuang>")
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%></td>
    </form>
  </tr><%end if%>
</table>

<table width="652" align="right" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <form name="form1" method="post" action="adminsupport.asp">
      <td width="183" height="25" align="center" bgcolor="#FFFFFF"> 关键字
<input name="keywords" type="text" class="wenbenkuang" id="keywords" size="10"> 
        <input name="Submit" type="submit" class="go-wenbenkuang" value="搜索">
      </td>
    </form><form name="form3" method="post" action="adminsupport.asp">
      <td width="467" align="center" bgcolor="#FFFFFF">&gt;&gt;显示近 
        <input name="xs" type="text" class="wenbenkuang" id="xs" size="10">
        天以来所有客户服务信息 
      <input name="Submit2" type="submit" class="go-wenbenkuang" value="显示"></td></form>
  </tr>
</table>
</body>
</html>
