<%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer=true	
Const PurviewLevel=2
Const CheckChannelID=4
Const PurviewLevel_Photo=1
%>
<!--#include file="inc/conn1.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="Admin_ChkPurview.asp"-->
<!--#include file="inc/Conn_User.asp"-->
<!--#include file="inc/function.asp"-->
<!--#include file="inc/ubbcode.asp"-->
<%
dim strFileName
strFileName="Admin_PhotoComment.asp"
const MaxPerPage=20
dim totalPut,CurrentPage,TotalPages,i,j
dim SearchContent,ShowPhotoID
dim Action,FoundErr,Errmsg
ShowPhotoID=Trim(request("ShowPhotoID"))
Action=Trim(request("Action"))
SearchContent=Trim(request("SearchContent"))
if request("page")<>"" then
    currentPage=cint(request("page"))
else
	currentPage=1
end if
dim sql,rs
%>
<html>
<head>
<title>图片评论管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="Admin_Style.css">
<SCRIPT language=javascript>
function unselectall()
{
    if(document.del.chkAll.checked){
	document.del.chkAll.checked = document.del.chkAll.checked&0;
    } 	
}

function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.Name != "chkAll")
       e.checked = form.chkAll.checked;
    }
  }
function ConfirmDel()
{
   if(confirm("确定要删除选中的评论吗？一旦删除将不能恢复！"))
     return true;
   else
     return false;
	 
}

</SCRIPT>
<style type="text/css">
<!--
body {	background-color: #FFFFFF;
	margin-right: 8px;
	margin-bottom: 8px;
	margin-left: 8px;
	margin-top: 0px;
}
-->
</style>
</head>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="1" bgcolor="#D6D5D9"></td>
    <td width="86" height="34" align=center bgcolor="#F8F8F9"><strong>&nbsp;&nbsp;管理导航：</strong></td>
    <td align=left bgcolor="#F8F8F9"><table width="100%">
      <tr>
        <form name="searchPhoto" method="get" action="Admin_PhotoComment.asp">
          <td><input name="SearchContent" type="text" class=smallInput id="SearchContent" size="28">
              <input name="Query" type="submit" id="Query" value="查 询">
            &nbsp;&nbsp;请输入查询的内容。如果为空，则查找所有评论。</td>
        </form>
      </tr>
    </table></td>
    <td width="1" bgcolor="#D6D5D9"></td>
  </tr>
  <tr>
    <td width="1" bgcolor="#F8F8F9"></td>
    <td height="1" colspan="2" bgcolor="#D6D5D9" ></td>
    <td width="1" bgcolor="#F8F8F9"></td>
  </tr>
</table>
<table width="100%" height="8" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<%
if Action="Modify" then
	call Modify()
elseif Action="SaveModify" then
	call SaveModify()
elseif Action="Del" then
	call DelComment()
elseif Action="Del2" then
	call DelComment2()
elseif Action="Reply" then
	call Reply()
elseif Action="SaveReply" then
	call SaveReply()
else
	call main()
end if
if FoundErr=True then
	call WriteErrMsg()
end if
call CloseConn()

sub main()
	sql="select P.PhotoID,P.ClassID,P.PhotoName,C.CommentID,C.UserName,C.IP, C.Content,C.WriteTime,C.ReplyName,C.ReplyContent,C.ReplyTime,C.Email,C.Oicq,C.Homepage,C.Icq,C.Msn,C.UserType,C.Score from PhotoComment C Left Join Photo P On C.PhotoID=P.PhotoID where 1 "
	if SearchContent<>"" then
		sql=sql & " and C.Content like '%" & SearchContent & "%' "
	end if
	if ShowPhotoID<>"" then
		sql=sql & " and C.PhotoID=" & ShowPhotoID & " "
	end if
	sql=sql & " order by P.PhotoID desc"
	Set rs= Server.CreateObject("ADODB.Recordset")
	rs.open sql,conn,1,1
%>

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="del" method="Post" action="Admin_PhotoComment.asp" onSubmit="return ConfirmDel();">
  <tr>
    <td align="center">
<table width="100%" height="40" border="0" cellpadding="2" cellspacing="0">
  <tr>
            <td>您现在的位置：<a href="Admin_PhotoComment.asp">图片评论管理</a>&nbsp;&gt;&gt;&nbsp; 
              <%
if request.querystring="" then
	response.write "所有评论"
else
	if SearchContent<>"" then
		response.write "评论内容中含有“<font color=blue>" & SearchContent & "</font>”的评论"
	else
		response.Write("所有评论")
	end if
end if
%>
	</td>
	<td width="150" align="right">
<%
  	if rs.eof and rs.bof then
		response.write "共找到 0 篇评论</td></tr></table>"
	else
    	totalPut=rs.recordcount
    	if currentpage<1 then
       		currentpage=1
    	end if
    	if (currentpage-1)*MaxPerPage>totalput then
	   		if (totalPut mod MaxPerPage)=0 then
	     		currentpage= totalPut \ MaxPerPage
		  	else
		      	currentpage= totalPut \ MaxPerPage + 1
	   		end if

    	end if
		response.Write "共找到 " & totalPut & " 篇评论"
%>
	</td>
  </tr>
</table>
<%		
	    if currentPage=1 then
        	showContent
        	showpage strFileName,totalput,MaxPerPage,true,false,"篇评论"
   	 	else
   	     	if (currentPage-1)*MaxPerPage<totalPut then
         	   	rs.move  (currentPage-1)*MaxPerPage
         		dim bookmark
           		bookmark=rs.bookmark
            	showContent
            	showpage strFileName,totalput,MaxPerPage,true,false,"篇评论"
        	else
	        	currentPage=1
           		showContent
           		showpage strFileName,totalput,MaxPerPage,true,false,"篇评论"
	    	end if
		end if
	end if
%>
  </form>
	</td>
  </tr>
</table>
<%  
   	rs.close
   	set rs=nothing  
end sub

sub showContent
   	dim i,rsCommentUser
    i=0
	dim PrevID
	PrevID=rs("PhotoID")
	do while not rs.eof
		if rs("PhotoID")<>PrevID then response.write "</table></td></tr></table><br>"
		if i=0 or rs("PhotoID")<>PrevID then
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="1" bgcolor="#F8F8F9"></td>
            <td height="1" bgcolor="#D6D5D9" ></td>
            <td width="1" bgcolor="#F8F8F9"></td>
          </tr>
          <tr>
            <td width="1" bgcolor="#D6D5D9"></td>
            <td height="30" align=left bgcolor="#F8F8F9"><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                  <td><%
			response.write "<a href='Admin_PhotoShow.asp?PhotoID=" & rs("PhotoID") & "'>" & rs("PhotoName") & "</a>"
			%></td>
                  <td align="right"><a href="Admin_PhotoComment.asp?PhotoID=<%=rs("PhotoID")%>&Action=Del2">删除此图片下的所有评论</a></td>
                </tr>
            </table></td>
            <td width="1" bgcolor="#D6D5D9"></td>
          </tr>
        </table>
        <table width="100%" border="0" cellpadding="6" cellspacing="1" bgcolor="#CCCCCC" style="word-break:break-all">
        <%end if%>
        <tr> 
          <td width="30" align="center" bgcolor="#FFFFFF">
		  <input name='CommentID' type='checkbox' onClick="unselectall()" id="CommentID" value='<%=cstr(rs("CommentID"))%>'>		  </td>
          <td bgcolor="#FFFFFF"><a href="#" Title="<%=left(rs("Content"),200)%>"><%=left(rs("Content"),25)%></a></td>
          <td width="70" align="center" bgcolor="#FFFFFF">评分：<%=rs("Score")%></td>
          <td width="50" align="center" bgcolor="#FFFFFF"><%if rs("UserType")=1 then response.write "会员" else response.write "游客" end if%> </td>
          <td width="100" align="center" bgcolor="#FFFFFF"> 
          <%
			if rs("UserType")=1 then
				set rsCommentUser=Conn_User.execute("select " & db_User_ID & "," & db_User_Name & "," & db_User_Email & "," & db_User_QQ & "," & db_User_ICQ & "," & db_User_Msn & "," & db_User_Homepage & " from " & db_User_Table & " where " & db_User_Name & "='" & rs("UserName") & "'")
				if rsCommentUser.bof and rsCommentUser.eof then
					response.write rs("UserName")
				else
					response.write "<a href='UserInfo.asp?UserID=" & rsCommentUser(0) & "' title='姓名：" & rsCommentUser(1) & vbcrlf & "信箱：" & rsCommentUser(2) & vbcrlf & "Oicq：" & rsCommentUser(3) & vbcrlf & " Icq：" &  rsCommentUser(4) & vbcrlf & " Msn：" &  rsCommentUser(5) & vbcrlf & " I P：" & rs("IP") & vbcrlf & "主页：" &  rsCommentUser(6)&"' target='_blank'>" & rs("UserName") & "</a>"
				end if
			else
				response.write "<span title='姓名：" & rs("UserName") & vbcrlf & "信箱：" & rs("Email") & vbcrlf & "Oicq：" & rs("Oicq") & vbcrlf & " Icq：" & rs("Icq") & vbcrlf & " Msn：" & rs("Msn") & vbcrlf & " I P：" & rs("IP") & vbcrlf & "主页：" &  rs("Homepage")&"' style='cursor:hand'>" & rs("UserName") & "</span>"
			end if
		  %>          </td>
          <td width="120" align="center" bgcolor="#FFFFFF"><%= rs("WriteTime") %></td>
          <td width="100" align="center" bgcolor="#FFFFFF">
          <%
		  		  response.write "<a href='Admin_PhotoComment.asp?Action=Modify&CommentID=" & rs("Commentid") & "'>修改</a>&nbsp;&nbsp;" 
          response.write "<a href='Admin_PhotoComment.asp?Action=Del&CommentID=" & rs("CommentID") & "' onclick='return ConfirmDel();'>删除</a>"
		  %>          </td>
        </tr>
        
        
        <%
		i=i+1
	    if i>=MaxPerPage then exit do
	    PrevID=rs("PhotoID")
		rs.movenext
	loop
%>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="250" height="30"><input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">
              选中本页显示的所有评论 </td>
    <td><input name="submit" type='submit' value='删除选定的评论'>
              <input name="Action" type="hidden" id="Action" value="Del"></td>
  </tr>
</table>
<%
end sub 

sub Modify()
	dim CommentID
	CommentID=trim(Request("CommentID"))
	if CommentID="" then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>请指定评论ID</li>"
		Exit sub
	else
		CommentID=Clng(CommentID)
	end if
	sql="Select * from PhotoComment where CommentID=" & CommentID
	Set rs=Server.CreateObject("Adodb.RecordSet")
	rs.Open sql,conn,1,1
	if rs.Bof or rs.EOF then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>找不到指定的评论！</li>"
	else
	
%>
<form method="post" action="Admin_PhotoComment.asp" name="form1">
    
  <table width="100%" border="0" align="center" cellpadding="6" cellspacing="1" bgcolor="#CCCCCC" >
    <tr align="center" > 
      <td height="22" colspan="4" bgcolor="#F2f2f2"><strong>修改图片评论</strong></td>
    </tr>
    <% if rs("UserType")=0 then%>
    <tr> 
      <td width="200" align="right" bgcolor="#FFFFFF">评论人姓名：</td>
      <td width="200" bgcolor="#FFFFFF"> 
        <input name="UserName" type="text" id="UserName" maxlength="16" value="<%=rs("UserName")%>">      </td>
      <td width="101" align="right" bgcolor="#FFFFFF">评论人Oicq：</td>
      <td width="475" bgcolor="#FFFFFF"> 
        <input name="Oicq" type="text" id="UserName" maxlength="15" value="<%=rs("Oicq")%>">      </td>
    </tr>
    <tr> 
      <td width="200" align="right" bgcolor="#FFFFFF">评论人性别：</td>
      <td width="200" bgcolor="#FFFFFF"> 
        <input type="radio" name="Sex" value="1" checked style="BORDER:0px;">
        男&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        <input type="radio" name="Sex" value="0" style="BORDER:0px;">
      女 </td>
      <td width="101" align="right" bgcolor="#FFFFFF">评论人 Icq：</td>
      <td width="475" bgcolor="#FFFFFF"> 
        <input name="Icq" type="text" id="UserName"  maxlength="15" value="<%=rs("Icq")%>">      </td>
    </tr>
    <tr> 
      <td width="200" align="right" bgcolor="#FFFFFF">评论人Email：</td>
      <td width="200" bgcolor="#FFFFFF"> 
        <input name="Email" type="text" id="UserName" maxlength="40" value="<%=rs("Email")%>">      </td>
      <td width="101" align="right" bgcolor="#FFFFFF">评论人 Msn：</td>
      <td width="475" bgcolor="#FFFFFF"> 
        <input name="Msn" type="text" id="UserName" maxlength="40" value="<%=rs("Msn")%>">      </td>
    </tr>
    <tr> 
      <td width="200" align="right" bgcolor="#FFFFFF">评论时间：</td>
      <td colspan="3" bgcolor="#FFFFFF"> 
        <input name="WriteTime" type="text" id="WriteTime" value="<%=rs("WriteTime")%>">
        <input name="IP" type="hidden" id="IP"  maxlength="15" value="127.0.0.1"></td>
    </tr>
    <tr> 
      <td width="200" align="right" bgcolor="#FFFFFF">评论人主页：</td>
      <td colspan="3" bgcolor="#FFFFFF"> 
        <input name="Homepage" type="text" id="UserName" maxlength="60" value="<%if rs("Homepage")="" then response.write "http://" else response.write rs("Homepage") end if%>" size="66">      </td>
    </tr>
    <%else%>
    <tr> 
      <td width="200" align="right" bgcolor="#FFFFFF">评论人姓名：</td>
      <td colspan="3" bgcolor="#FFFFFF">
        <input name="ShowUserName" type="text" id="UserName" value="<%=rs("UserName")%>" disabled>
        <input name="UserName" type="hidden" id="UserName" value="<%=rs("UserName")%>">      </td>
    </tr>
    <tr> 
      <td width="200" align="right" bgcolor="#FFFFFF">评论时间：</td>
      <td colspan="3" bgcolor="#FFFFFF"> 
        <input name="WriteTime" type="text" id="WriteTime" value="<%=rs("WriteTime")%>">
        <input name="IP2" type="hidden" id="IP2" maxlength="15" value="127.0.0.1">      </td>
    </tr>
    <% end if %>
    <tr> 
      <td width="200" align="right" bgcolor="#FFFFFF">评 分：</td>
      <td colspan="3" bgcolor="#FFFFFF"> 
        <input type="radio" name="Score" value="1" <%if rs("Score")=1 then response.write "checked"%>>
        1分&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        <input type="radio" name="Score" value="2" <%if rs("Score")=2 then response.write "checked"%>>
        2分&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        <input type="radio" name="Score" value="3" <%if rs("Score")=3 then response.write "checked"%>>
        3分&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        <input type="radio" name="Score" value="4" <%if rs("Score")=4 then response.write "checked"%>>
        4分&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
        <input type="radio" name="Score" value="5" <%if rs("Score")=5 then response.write "checked"%>>
      5分 </td>
    </tr>
    <tr> 
      <td width="200" align="right" bgcolor="#FFFFFF">评论内容：</td>
      <td colspan="3" bgcolor="#FFFFFF"> 
        <textarea name="Content" cols="56" rows="8" id="Content"><%=rs("Content")%></textarea>      </td>
    </tr>
    <tr align="center"> 
      <td height="30" colspan="4" bgcolor="#FFFFFF"> 
        <input name="ComeUrl" type="hidden" id="ComeUrl" value="<%=ComeUrl%>">
        <input name="Action" type="hidden" id="Action" value="SaveModify">
        <input name="CommentID" type="hidden" id="CommentID" value="<%=rs("CommentID")%>">
        <input name="UserType" type="hidden" id="UserType" value="<%=rs("UserType")%>">
        <input  type="submit" name="Submit" value=" 保存修改结果 ">      </td>
    </tr>
  </table>
</form>
<%
	end if
	rs.close
	set rs=nothing
end sub

sub Reply()
	dim CommentID
	CommentID=trim(Request("CommentID"))
	if CommentID="" then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>请指定评论ID</li>"
		Exit sub
	else
		CommentID=Clng(CommentID)
	end if
	sql="select P.PhotoID, P.ClassID, P.PhotoName,C.CommentID,C.UserName,C.IP, C.Content,C.WriteTime,C.ReplyContent from PhotoComment C Left Join Photo P On C.PhotoID=P.PhotoID where C.CommentID=" & CommentID
	Set rs=Server.CreateObject("Adodb.RecordSet")
	rs.Open sql,conn,1,1
	if rs.Bof or rs.EOF then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>找不到指定的评论！</li>"
	else
	
%>
<form method="post" action="Admin_PhotoComment.asp" name="form1">
    
  <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border" >
    <tr align="center" class="title"> 
      <td height="22" colspan="2"> <strong>回 复 评 论</strong></td>
    </tr>
    <tr> 
      <td width="200" align="right">评论图片名称：</td>
      <td><%=rs("PhotoName")%></td>
    </tr>
    <tr> 
      <td width="200" align="right">评论人用户名：</td>
      <td><%=rs("UserName")%></td>
    </tr>
    <tr> 
      <td width="200" align="right">评论内容：</td>
      <td><%=rs("Content")%></td>
    </tr>
    <tr>
      <td align="right">回复内容：</td>
      <td><textarea name="ReplyContent" cols="50" rows="6" id="ReplyContent"><%=rs("ReplyContent")%></textarea></td>
    </tr>
    <tr align="center"> 
      <td height="30" colspan="2"><input name="ComeUrl" type="hidden" id="ComeUrl" value="<%=ComeUrl%>">
	  <input name="Action" type="hidden" id="Action" value="SaveReply"> 
        <input name="CommentID" type="hidden" id="CommentID" value="<%=rs("CommentID")%>"> 
        <input  type="submit" name="Submit" value=" 回 复 "> </td>
    </tr>
  </table>
</form>
<%
	end if
	rs.close
	set rs=nothing
end sub
%>
</body>
</html>
<%
sub DelComment()
	dim CommentID,i
	CommentID=trim(Request("CommentID"))
	if CommentID="" then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>请指定评论ID</li>"
		Exit sub
	end if

	if instr(CommentID,",")>0 then
		dim idarr
		idArr=split(CommentID)
		for i = 0 to ubound(idArr)
		    conn.execute "delete from PhotoComment where Commentid=" & Clng(idArr(i))
		next
	else
		conn.execute "delete from PhotoComment where Commentid=" & Clng(CommentID)
	end if
	call CloseConn()
	response.redirect ComeUrl
End sub

sub DelComment2()
    dim PhotoID
	PhotoID=trim(request("PhotoID"))
	if PhotoID="" then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>请指定评论ID</li>"
		Exit sub
	else
		PhotoID=Clng(PhotoID)
	end if
	
    conn.execute "delete from PhotoComment where PhotoID=" & PhotoID
	call CloseConn()
	response.redirect ComeUrl
End sub

sub SaveModify()
	dim rsComment,ClassID,tClass,CommentID
	dim CommentUserType,CommentUserName,CommentUserSex,CommentUserEmail,CommentUserOicq
	dim CommentUserIcq,CommentUserMsn,CommentUserHomepage,CommentUserScore,CommentUserContent
	dim CommentUserIP,CommentWritetime
	CommentID=trim(Request("CommentID"))
	if CommentID="" then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>请指定评论ID</li>"
		Exit sub
	end if
	CommentUserName=trim(request("UserName"))
	if CommentUserName="" then
		founderr=true
		errmsg=errmsg & "<br><li>请输入姓名</li>"
		Exit sub
	end if
	CommentUserType=Clng(request("UserType"))
	if CommentUserType=0 then
		CommentUserSex=trim(request("Sex"))
		CommentUserOicq=trim(request("Oicq"))
		CommentUserIcq=trim(request("Icq"))
		CommentUserMsn=trim(request("Msn"))
		CommentUserEmail=trim(request("Email"))
		CommentUserHomepage=trim(request("Homepage"))
		if CommentUserHomepage="http://" or isnull(CommentUserHomepage) then CommentUserHomepage=""
	end if
	CommentUserIP=trim(request.form("IP"))
	CommentWriteTime=trim(request.form("WriteTime"))
	CommentUserScore=Clng(request.Form("Score"))
	CommentUserContent=trim(request.Form("Content"))
	if CommentUserContent="" or CommentUserIP="" or CommentUserScore="" then
		founderr=true
		errmsg=errmsg & "<br><li>请完整输入评论内容、评论时间、评论人IP等信息</li>"
	end if
	CommentUserContent=DvHtmlEncode(CommentUserContent)
	if CommentWriteTime="" then
		CommentWriteTime=now()
	else
		CommentWriteTime=Cdate(CommentWriteTime)
	end if

	if FoundErr=True then
		exit sub
	end if

	sql="Select * from PhotoComment where CommentID=" & CommentID
	Set rsComment=Server.CreateObject("Adodb.RecordSet")
	rsComment.Open sql,conn,1,3
	if rsComment.Bof or rsComment.EOF then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>找不到指定的评论！</li>"
	else
		rsComment("UserType")=CommentUserType
		rsComment("UserName")=CommentUserName
		rsComment("Sex")=CommentUserSex
		rsComment("Oicq")=CommentUserOicq
		rsComment("Icq")=CommentUserIcq
		rsComment("Msn")=CommentUserMsn
		rsComment("Email")=CommentUserEmail
		rsComment("Homepage")=CommentUserHomepage
		rsComment("IP")=CommentUserIP
		rsComment("WriteTime")=CommentWriteTime
		rsComment("Score")=CommentUserScore
		rsComment("Content")=CommentUserContent
		rsComment.update
	end if
	rsComment.Close
   	set rsComment=Nothing
	call CloseConn()
	response.redirect ComeUrl
end sub

sub SaveReply()
	dim CommentID,ReplyName,ReplyContent,ReplyTime
	CommentID=trim(Request("CommentID"))
	ReplyContent=trim(request("ReplyContent"))
	if CommentID="" then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>请指定评论ID</li>"
		Exit sub
	else
		CommentID=Clng(CommentID)
	end if
	if ReplyContent="" then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>请输入回复内容</li>"
	end if
	
	if FoundErr=True then
		exit sub
	end if
	
	sql="Select * from PhotoComment where CommentID=" & CommentID
	Set rs=Server.CreateObject("Adodb.RecordSet")
	rs.Open sql,conn,1,3
	if rs.Bof or rs.EOF then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>找不到指定的评论！</li>"
	else
		rs("ReplyName")=AdminName
		rs("ReplyTime")=now()
     	rs("ReplyContent")=dvhtmlencode(ReplyContent)
     	rs.update
	end if
	rs.Close
   	set rs=Nothing
	call CloseConn()
	response.redirect ComeUrl
end sub

%>