www.gusucode.com > 易心博客[圣诞版] 3.5手动安装码程序 > Admin_Reply.asp

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Conn.asp"-->
<!--#include file="Ex_Cls/Ex_CommonCls.asp"-->
<!--#include file="Ex_Cls/Ex_FsoCls.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<link rel="stylesheet" href="Admin_Style.css">
<script src="wbTextBox/kindeditor.js"></script>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0" class="bgcolor">
<%
Dim ExComm
Set ExComm=new Ex_CommonCls
ExComm.IsAdLogin 
ExComm.IsIpAllow
dim Action
Action=Request.QueryString("action")
if Action="change" then
	call Change()'修改数据
Else
	dim id,msg_cls,thisTitle,tableName,rs,b,strsql
	id=Request.QueryString("id")
	msg_cls=Request.QueryString("mc")
	Select case msg_cls
		Case "1"
			thisTitle="评论"
			tableName="Ex_Comment"
		Case "2"
			thisTitle="留言"
			tableName="Ex_message"
	End Select
	call show()
End if
sub show()
strsql="select * from "&tableName&" where id="&id
set rs=Conn.execute(strsql)
b=Rs(2)
%>
<center>
<form name="form1" method="post" action="?action=change" onSubmit="return Check()">
  <table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="border">
    <tr>
      <th class="topbg" colspan="2"><p><a href="#u"></a><%=thisTitle%>回复</p>        </th>
      </tr>
    <tr>
       <td class="tdbg"><div align="center"><%=thisTitle%>标题</div></td>
       <td class="tdbg"><input name="title" type="text" value=<%=rs(1)%>></td>
    </tr>
    <tr>
       <td class="tdbg"><div align="center">访客昵称</div></td>
       <td class="tdbg"><input name="username" type="text" value="<%=rs(3)%>" readonly></td>
    </tr>
    <tr>
      <td width="185" class="tdbg"><div align="center"><%=thisTitle%>内容:(支持html)</div></td>
      <td class="tdbg"> 
		<textarea id="aBody" name="aBody"><%=server.htmlencode(B)%></textarea>
		<script type="text/javascript">
    KE.show({
        id : 'aBody',
        items : [
        'undo', 'redo', 'fontname', 'fontsize', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
        'removeformat', 'justifyleft', 'justifycenter', 'justifyright', 'emoticons',
        'insertorderedlist'],
		height : "150px", //编辑器的高度为100px
		width:"420px"
    });
</script>
	  </td>
      </tr>
    <tr>
       <td class="tdbg"><div align="center">回复内容:(支持html)</div></td>
       <td class="tdbg"><textarea name="Reply" cols="60" rows="10" id="Reply">博主回复:</textarea></td>
    </tr>
    <tr>
      <td class="tdbg" colspan="2"><div align="center">
        <input type="submit" name="Submit" value="保存">
        <input name="id" type="hidden" value="<%=id%>"><input name="msg_cls" type="hidden" value="<%=msg_cls%>">
        &nbsp;&nbsp;</div></td>
      </tr>
  </table>
</form></center>
提示:请注意清除网站统计代码最后的一些多余回车换行。
<br>
<a href="http://www.ex123.net/bbs" target="_blank"><font color="red">如果您对此功能还有什么疑问,点此查看易心博客使用教程</font></a>
<%end sub%>
<%
sub change()
dim id,msg_cls,title,Detail,Reply,updateMsg,tableName
id=Request.form("id")
msg_cls=Request.Form("msg_cls")
title=Request.Form("title")
Reply=Request.Form("Reply")
If Reply<>"" then
	Reply="<table width=80% border=0 cellpadding=5 cellspacing=1 bgcolor=#666666><tr><td bgcolor=#FFFFCC>"&Request.Form("Reply")&"</td></tr></table>"
End if
Detail=Request.Form("aBody")&Reply
Set updateMsg= Server.CreateObject("ADODB.recordSet")
Select case msg_cls
	Case "1"
		tableName = "Ex_Comment"
	Case "2"
		tableName = "Ex_message"
End Select
updateMsg.open "select * from "&tableName&" where id="&id,Conn,1,3
updateMsg(1)=Title
updateMsg(2)=Detail
updateMsg.update
updateMsg.Close
Set updateMsg=Nothing
ExComm.ClearCaches(sn)
ExComm.ClearCache(sn&"Config")
ExComm.GetConfigCache("*")
ExComm.ShowMsg "操作成功",request.servervariables("http_referer")
end sub
%>
</body>
</html>