<!-- #include file="header.asp" -->
<!-- #include file="firewall.asp" -->
<!-- #include file="include/function.asp" -->
<script language="javascript">
<!--
function chk(){
	if (myform.content.value == ""){
		alert("回复内容不能为空");
		myform.oldpass.focus();
		return false;
	}
}
-->
</script>

<%
	if request("id")<>"" then
		rid = request("id")		
	end if
	on error resume next
	strconn = "select * from reply where frepid=" & cint(request("rid"))		
	set rs = server.createobject("adodb.recordset")
	rs.open strconn,conn,1,3
	if request("action") = "reply" then
		if request("iid") = "" then
			session("imsg") = "10"
			response.redirect ("msg.asp")
			response.end
		end if
			if rs.eof then
				rs.addnew
				rs("freply") = trim(HTMLEncode(request("content")))
				rs("ftime") = cstr(now())
				rs("frepid") = cint(request("iid"))
				rs.update
			end if
			if err.number = 0 then
				rs.close
				set rs = nothing
				conn.close
				set conn = nothing
				response.redirect ("index.asp")
				response.end
			else
				
				rs.close
				set rs = nothing
				conn.close
				set conn = nothing
				session("imsg") = "12"
				response.redirect ("msg.asp")
				response.end
			end if
	end if
%>
<table width="680" height="300" border="0" align="center" cellpadding="0" cellspacing="0" class="bodybg">
  <tr>

    <td valign="top">
		<table width="200" height="150" border="0" align="center" cellpadding="0" cellspacing="0">
		<form method="post" name="myform" action="reply.asp?action=reply" onsubmit="return chk();">
			<tr>
				<td height="20">&nbsp;</td>
			</tr>
			<tr>
			  <td  align="center">回复内容</td>
		  </tr>
		<tr>
			  <td  align="center" height="8"><input type="hidden" name="iid" value="<%=rid%>"></td>
		  </tr>
			
			<tr>
			    <td><textarea name="content" cols="60" rows="10"><%=rs("freply")%></textarea></td>
			</tr>
			<tr>
				<td height="8"></td>
		    </tr>
			<tr>
				<td align="center"><input type="submit" value="回复" class="submitinput"></input>&nbsp;&nbsp;&nbsp;<input type="reset" value="重添" class="submitinput"></input></td>
		    </tr>
			<tr>
			  <td height="20" colspan="2"></td>
		  </tr>
		  </form>
		</table>
    </td>

  </tr>
</table>
<!-- #include file="footer.asp" -->