www.gusucode.com > 中网景企业网站管理系统 2008源码程序 > admin/userguestbook.asp

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="opendb.asp" -->
<%
'Call CheckUserLogin(username)
Call CheckAdmin()
Call CnkAdminRight(23)

thispage=request("page_code")
if thispage="" then
	thispage=1
else
	thispage=clng(thispage)
end if
if thispage<1 then thispage=1
PagePara="?tmp="


dim id,a,action
id=Request("id")
action=request("action")

if action="saverep" then
   conn.execute("update cnk_feedback set reply='"&Trim(Request.Form("reply"))&"',retime='"&now&"',reusername='"&session("admin")&"' where id="&id)
end if

If Request.QueryString("del")<>"" Then
conn.execute("delete from cnk_feedback where id="&Request.QueryString("del"))
End If
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="admin.css" rel="stylesheet" type="text/css">
</head>
<body>
<form method="post" action="" name="form1" onSubmit="return validata_form();">
</form>
<div class="cnkbox">
  <div class="title">首页推荐产品图片</div>
  <div class="content" align="center">
	<% Dim ipage,yuyan
      rs.open "select * from cnk_feedback order by id desc",conn,1,3
	  if rs.recordcount=0 then
	  Response.Write "未有内容"
	  Response.end
	  else
		rs.pagesize=20
		if thispage>rs.pagecount then thispage=rs.pagecount
		rs.AbsolutePage = thispage
		for ipage=1 to rs.pagesize
	%>
    <div class="starbox" align="left">用户:<%= rs("username") %><br>
I P :<%= rs("ip") %><br>
时间:<%= rs("initime") %><br>
      标题:<%= rs("title") %><br>
      内容:<% a=trim(rs("content"))
			if a<>"" then Response.Write(CnkUBBContent(a))%><br />
      <a href="?del=<%= rs("id") %>" onClick="return cfdel();">[删除]</a> <br>
      <form name="form2" method="post" action="userguestbook.asp">
        <textarea name="reply" cols="30" rows="3" class="input"><%= rs("reply") %></textarea>
        <input name="Submit" type="submit" class="button" value="提交">
        <input name="id" type="hidden" id="id" value="<%= rs("id") %>">
        <input name="action" type="hidden" id="action" value="saverep">
      </form>
      <br />
    </div>
    <%rs.movenext
      if rs.eof then exit for
      next%>
    <div class="clearboth"></div>
	<table width="96%" height="21" border="0" background="images/bg-xg.gif" bgcolor="#EFEFEF">
    <tr>
	<td width="50%"><% = GetPageList(rs.pagecount,thispage,PagePara,0) %></td>
    <td width="50%" align="right"> 共<strong><%=rs.recordcount%></strong> 条
      <% = GetPage(rs.pagecount,thispage,PagePara,0) %></td>
    </tr>
  </table>
  <% end if %>
  </div>
</div>
</body>
</html>
<% rs.close
set rs=nothing
call closedb()
%>