<!--#include file="conn.asp"-->
<!--#include file="inc/cook2.asp"-->
<!--#include file="inc/dimflag.asp"-->
<!--#include file="inc/page.asp"-->
<!--#include file="top.asp"-->
<%
id=request("id")
select case action
case "edit"
'set rs=server.CreateObject("adodb.recordset")
'sql="select * from com_order where id="&id
'rs.open sql,conn,1,3
'rs("hf_text")=request("hf_text")
'rs("hf_date")=date()
'rs.update
'rs.close
'set rs=nothing
response.Write "<script>location='?'</script>"

case "del" 
id=replace(request("id")," ","")
id=split(id,",")
for i=0 to UBound(id)
conn.execute("delete from com_order where id="&id(i))
next
response.Write "<script>location='?'</script>"

case "tj" 
id=request("id")
conn.execute("update com_order set sh=1 where id="&id)
response.Write "<script>location='?"&canshu2&"'</script>"

case "pt" 
id=request("id")
conn.execute("update com_order set sh=0 where id="&id)
response.Write "<script>location='?"&canshu2&"'</script>"
case "" 
%>
<div id="container">
<div class="top_but">
 <li class="left">&nbsp;</li>
 <li><img src="images/but_3.gif" alt="删除"  onclick="form1.action='?action=del'; ConfirmDel() "></li>
 <li><a href="?ck=yes"><img src="images/but_12.gif" alt="未查看" ></a></li>
 <li><a href="?"><img src="images/but_7.gif" alt="全部" ></a></li>
 <li><img src="images/but_8.gif" alt="刷新" onClick="window.location.reload(true);"></li>
 <li><img src="images/but_9.gif" alt="打印" onClick="window.print() "/></li>
</div>
<%
set rs=server.CreateObject("adodb.recordset")
if request("ck")<>"" then
rs.open "select * from com_order where ck=0 order by id desc",conn,1,1
else
rs.open "select * from com_order order by id desc",conn,1,1
end if
if rs.eof and rs.bof then                     
response.write conn_eof
else
page1("20")
i=1
%>
<form name="form1" id="form1" method="post" action="?">
<div class="tableAll titlebgcolor">
<ul>
 <li style="width:30px"><input name="chkall" type="checkbox" id="chkall" value="select" onClick="CheckAll(this.form)" ></li>
 <li style="width:50px;">操作</li>
 <li style="width:100px;">查看状态</li>
 <li style="width:80px;">名称</li>
  <li style="width:120px;">产品名称</li>
 <li style="width:80px;">审核</li>

 <li style="width:100px;">下单时间</li>
 </ul>
</div>
<%while not rs.eof and i<=rs.pagesize%>
<div class="tableAll trbgcolor">
<ul>
 <li style="width:30px"><input type="checkbox" name="id"  value="<%=rs("id")%>"></li>
 <li style="width:50px;"><a href="?id=<%=rs("id")%>&action=modify&page=<%=request("page")%>&ck=<%=request("ck")%>">查看</a></li>
 <li style="width:100px;"><%if rs("ck")="0"  then Response.Write("<font color=red>未查看</font>") else Response.Write("已查看"&rs("ck")&"次")  end if%></li>
 <li style="width:80px;"><%=rs("feed_2")%></li>
 <li style="width:120px;"> <%
sql = "SELECT top 1 * FROM com_books where id="&rs("productid")&"" 
Set rss = Server.CreateObject("ADODB.Recordset")
rss.OPEN sql,Conn,1,3
if not rss.bof or not rss.eof then
subCenterTitle=rss("titlecn")
%>
<%=subCenterTitle%>
<%
else
response.Write(rs("feed_0"))
end if
rss.close
set rss=nothing
%></li>
 

 

 <li style="width:80px;"><%if rs("sh")=1 then%><a href="?action=pt&id=<%=rs("id")%>" title="点击更改显示状态"><font color=green>√</font></a><%else%><a href="?action=tj&id=<%=rs("id")%>" title="点击更改显示状态"><font color=#999999>×</font></a><%end if%></li>

 

 <li style="width:100px;"><%=rs("date")%></li>
 </ul>
</div>
<%i=i+1
rs.movenext
wend
%>
</form>
<div id="divStayTop" class="bottom titlebgcolor">
<%call page2(5,""&canshu3&"&")%>
</div>
<%
end if
rs.close
set rs=nothing
%>
</div>

<%
case "modify" 

page=request("page")
sql="select * from com_order where id="&id
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,3
rs("ck")=rs("ck")+1 	
%>
<div id="container">
<div class="top_but">
 <li class="left">&nbsp;</li>
 <li><a href="feedback_manage.asp"><img src="images/but_11.gif" alt="管理"></a></li>
 <li><img src="images/but_8.gif" alt="刷新" onClick="window.location.reload(true);"></li>
 <li><img src="images/but_9.gif" alt="打印" onClick="window.print() "/></li>
</div>

<div class="tableAll titlebgcolor">
 <li style="width:30px;">&nbsp;</li>
 <li style="width:700px;">查看留言内容</li>
</div>
<div class="tableAll trbgcolor">
 <li style="width:30px;">&nbsp;</li>
 <li style="width:100px;">下单产品</li>
 <li>
 <%
 if rs("productid")=0 then
%>
<%=rs("feed_0")%>
<%
 else
sql = "SELECT top 1 * FROM com_books where id="&rs("productid")&"" 
Set rss = Server.CreateObject("ADODB.Recordset")
rss.OPEN sql,Conn,1,3
subCenterTitle=rss("titlecn")
%>
<%=subCenterTitle%>
<%
rss.close
set rss=nothing
end if
%>
</li>
</div> 
<div class="tableAll trbgcolor">
 <li style="width:30px;">&nbsp;</li>
 <li style="width:100px;">订购数量</li>
 <li><%=rs("feed_1")%></li>
</div>
<div class="tableAll trbgcolor">
 <li style="width:30px;">&nbsp;</li>
 <li style="width:100px;">姓名</li>
 <li><%=rs("feed_2")%></li>
</div>
<div class="tableAll trbgcolor">
 <li style="width:30px;">&nbsp;</li>
 <li style="width:100px;">联系电话</li>
 <li><%=rs("feed_3")%></li>
</div> 
<div class="tableAll trbgcolor">
 <li style="width:30px;">&nbsp;</li>
 <li style="width:100px;">电子邮箱</li>
 <li><%=rs("feed_4")%></li>
</div> 

<div class="tableAll trbgcolor">
 <li style="width:30px;">&nbsp;</li>
 <li style="width:100px;">详细内容</li>
 <li><%=rs("feed_center")%></li>
</div> 
<div class="tableAll trbgcolor">
 <li style="width:30px;">&nbsp;</li>
 <li style="width:100px;">留言时间</li>
 <li><%=rs("date")%></li>
</div> 
<form name="myform" method="post" action="?action=edit&id=<%=request("id")%>">

<div class="tableAll trbgcolor">
 <li style="width:30px;">&nbsp;</li>
 <li style="width:100px;">&nbsp;</li>
 <li><input type="submit" name="Submit" value=" 确定，修改 " class="button"  ></li>
</div> 
</form>
</div>

<%
rs.update
rs.close
Set rs=Nothing

end select
%>
<!--#include file="footer.asp"-->