<!--#include file="inc/conn.asp"-->
<!--#include file="config.asp"-->
<!--#include file="topcnmai2.asp"-->
<center><%
if request("cnmai")="ok" then
dim rs,sql,reg1,ses
reg1=request.cookies("cnmai")("reg1")
ses=DateDiff("s",reg1,now())
if ses<120 then
response.write "<li>你的留言间隔是120秒，请等会再次发布！"
response.end
end if
if len(request("memo"))>100 then
response.write "<li>留言内容太多，请简单填写！"
response.end
end if
if request("memo")="有什么问题可以直接在此发布留言信息！" then
response.write "<li>请填写留言内容！"
response.end
end if
if len(request("memo"))<1 then
response.write "<li>你没有填写留言内容！"
response.end
end if
set rs=server.createobject("adodb.recordset")
sql = "select * from gbook order by fbsj desc"
rs.open sql,conn,1,3
rs.addnew
rs("username")=request.cookies("cnmai")("username")
rs("lx")=trim(request("gbook"))
rs("gbook1")=trim(request("memo"))
rs("fbsj")=now()
rs.update
Response.cookies("cnmai")("reg1")=now()
rs.close
set rs=nothing
closedb
response.write "<li>留言成功，需要管理员回复后才可以显示在网站上！"
response.write "<meta http-equiv=refresh content=""2;URL=gbook.asp"">"
else
%>
</center>
<%
dim ts
dim ThisPage,Pagesize,Allrecord,Allpage,tj
username=request.cookies("cnmai")("username")
ts=trim(request("ts"))
if request("page")="" then
  ThisPage=1		
else
  ThisPage=request("page")
end if
%>
<title>客户留言-<%=title%></title>
<link href="inc_style.css" rel="stylesheet" type="text/css">
<body topmargin="0">
<div align="center">
<center>
<TABLE cellPadding=0 width=760 style="border-left:1px solid #999999; border-right:1px solid #999999; padding:0; border-collapse: collapse; border-top-width:1px; border-bottom-width:1px" bgcolor="#FFFFFF">
<TBODY>
<TR>
<TD height="30" class=td5_muen>
<font color="#008080">&nbsp; 位置导航：</font><a href="index.asp">首页</a><font color="#008080">→</font>&nbsp;<span class="font2">客户留言</span>
</TD></tr>

<TR>
<TD>
<div align="center">
<table border="0" width="70%" cellspacing="1" id="table1" style="border:1px dotted #CC9900; ">
<tr>
<td bgcolor="#FFF3E8" height="25" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom: 1px dotted #CC9900">
<p style="line-height: 150%; margin: 0 15px"><span class="font2">客户留言</span></td>
</tr>
<tr>
<td>
<table bgcolor="#FFFFFF" cellspacing="0" cellpadding="0">
<tr>      
<td valign="top">
<table class="font_10_e_black" cellSpacing="0" cellPadding="3" width="367" align="center" border="0">
<!---------------------->
<form method="POST" action="gbook.asp?cnmai=ok" style="line-height: 100%; margin-top: 0; margin-bottom: 0">
<tr>
<td width="32">
<p align="left">类型</td>
<td width="323">
<select size="1" name="gbook">
<option value="0">普通问题</option>
<option  <%if ts="1" then%> selected <%end if%> value="1">投诉留言</option>
</select></td>
</tr>
<tr>
<td width="32">
<p align="left">内容</td>
<td width="323">
<font color="#FF0000">字数限制为100个</font></td>
</tr>
<tr>
<td colspan="2" width="361">
<textarea rows="5" name="memo" cols="48" onFocus="this.select()" onBlur="if (value ==''){value='有什么问题可以直接在此发布留言信息！'}" onClick="if(this.value=='有什么问题可以直接在此发布留言信息！')this.value=''"onMouseOver="this.focus()">有什么问题可以直接在此发布留言信息！谢谢您对我们的支持[晋城二手网]</textarea></td>
</tr>
<tr>
<td width="361" colspan="2">
<p align="center">
<input type="submit" value="提交留言" name="B2"></td>
</tr>
</form>
<!---------------------->
</table>
</td>           
</tr>
<tr>
<td valign="top">
<div align="center">
<table border="0" cellpadding="0" style="border-collapse: collapse" width="100%">
<%
tj=1
set rs=server.createobject("adodb.recordset")
if ts="1" then
sql="select username,gbook1,gbook2,hfsj from gbook where lx=1 and hf=1 order by fbsj desc"
else
sql="select username,gbook1,gbook2,hfsj from gbook where lx=0 and hf=1 order by fbsj desc"
end if
rs.open sql,conn,1,1
if rs.eof then
response.write "还没有留言！"
end if
rs.Pagesize=10
Pagesize=rs.Pagesize
Allrecord=rs.Recordcount
Allpage=rs.Pagecount
if ThisPage<1 then                           
ThisPage=1                           
end if
On Error Resume Next
rs.move (ThisPage-1)*Pagesize
%>
<tr>
<td colspan="2" height="25" style="border-top:1px solid #C0C0C0; padding:0; " bgcolor="#FFFFEC">
<p align="center" style="margin-top: 1; margin-bottom: 1"><b>留言信息反馈区</b></td>
</tr>
<%do while not rs.eof%>
<tr>
<td colspan="2" height="21" bgcolor="#EEEEEE" style="border-bottom: 1px solid #C0C0C0">
<strong style="font-weight: 400"><font color="#cc0000">
&nbsp;管理员</font><font color="#000000">答复</font><font color="#009933"><b><%=rs("username")%></b></font>提出的问题</strong>&nbsp;&nbsp;回复时间：<font color="#666666"><%=rs("hfsj")%></font></td>
</tr>
<tr>
<td>
<p style="margin-top: 0; margin-bottom: 0">
<font color="#FF0000">
<strong>
&nbsp;问：</strong></font></td>
<td><font color="#800000"><b><%=rs("gbook1")%></b></font></td>
</tr>
<tr>
<td valign="middle">
<p style="margin-top: 0; margin-bottom: 0"><strong><font color="#009900">
&nbsp;答：</font></strong></td>
<td><font color="#808080"><%=rs("gbook2")%></font></td>
</tr>
<%
        tj=tj+1
        if tj>=Pagesize then exit do
        rs.movenext
        loop
        %>
<tr>
<td colspan="2" height="25">
<table border="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr> 
<td height="25" width="151">
<p align="center">
共有&nbsp;<font color="#CC5200"><%=Allrecord%></font>&nbsp;条记录</td>
<td height="25" width="126">
<p align="center">共 <font color="#CC5200"><%=Allpage%></font> 页</td>
<td height="25" width="118">
<p align="center">现在是第 
<font color="#CC5200"><%=ThisPage%></font> 页</td>
<td height="25" width="157">
<p align="center">
<%
if ThisPage<2 then     
response.write "<font color=""#808080"">首页</font>&nbsp;"
response.write "<font color=""#808080"">上一页</font>&nbsp;"     
else     
response.write "<a href=?page=1&ts="&ts&">首页</a>&nbsp;"
response.write "<a href=?page="&ThisPage-1&"&ts="&ts&">上一页</a>&nbsp;"     
end if
if Allpage-ThisPage<1 then     
response.write "<font color=""#808080"">下一页</font>&nbsp;"
response.write "<font color=""#808080"">尾页</font>&nbsp;"  
else     
response.write "<a href=?page="&(ThisPage+1)&"&ts="&ts&">下一页</a>&nbsp;"   
response.write "<a href=?page="&Allpage&"&ts="&ts&">尾页</a>&nbsp;"     
end if
%></td>
</tr>
</table>
</td>
</tr>
</table></div>
</td>           
</tr>
</table></td>
</tr>
</table>
</div>
</TD></tr>
<TR>
<TD>
　</TD></tr>
</TBODY></TABLE></center>
</div><%
rs.close
set rs=nothing
closedb
end if
%><!--#include file="endcnmai.asp"-->