<!--#include file="system_manage.asp"-->
<%
   Call DBConnBegin()
	  Set rs = server.createobject("adodb.recordset")
Select Case Request("action")
Case "del"
id=tx_common.checkstr(request.querystring("id"),1)
sql="delete from tx_guestbook where id="&id
tx_common.execute sql
 Call tx_common.message("·网站留言删除成功<br>·如果你的浏览器不支持跳转，<a href='admin_guestbook.asp'>点击这里返回</a><meta http-equiv=refresh content='3;URL=admin_guestbook.asp'>",1)
case else
content =  "<table width='100%' cellpadding=3 cellspacing=1 class=td1>"
content = content & "<tr class=td4><td colspan=4><strong>留言列表</strong></td></tr>"
Set rso=conn.execute("select *  from tx_guestbook order by id desc")
If Not rso.bof And Not rso.eof Then
Do While Not rso.bof And Not rso.eof 
content =content & "<tr class=td2><td colspan=3>标题:"&rso("title")&"</td><td align=right>审核 | <a href=?action=del&id="&rso("id")&">删除</a></td></tr>"
content = content & "<tr class=td2><td>姓名："&rso("username")&"</td><td>email:"&rso("email")&"</td><td>电话："&rso("tel")&"</td><td>传真:"&rso("fax")&"</td></tr>"
content = content & "<tr class=td2><td>qq:"&rso("qq")&"</td><td>homepage:"&rso("homepage")&"</td><td colspan=2>地址"&rso("address")&"：</td></tr>"
content = content & "<tr class=td2><td colspan=4>content:<br>"&rso("content")&"</td></tr>"
rso.movenext
Loop
Else 
content = content & "<tr class=td2><td colspan=4>暂时没有任何留言，请添加！</td></tr>"
End If 
content = content & tx_tables.tablesfoot
rso.close 
End Select
Call ClassEnd()
Call DBConnEnd()
response.write content
Call GetBottom()
%>
