<!--#include file="../utf-8.asp" -->
<!--#include file="../js/Function.asp" -->
<!--#include file="../CheckAdmin.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<META NAME="copyright" CONTENT="Copyright 2010-2012 - yidacms.com" />
<META NAME="Author" CONTENT="世纪伟成  yidacms.com" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../js/admin.css" rel="stylesheet" type="text/css">
<title>留言管理！</title>
	<script type="text/javascript" charset="utf-8" src="<%=webpath%>bianji/kindeditor.js"></script>
	<script type="text/javascript">
		KE.show({
			id : 'content_1',
			imageUploadJson : '<%=webpath%>uploadclass/upfile_flash.asp',
			fileManagerJson : '<%=webpath%>uploadclass/file_manager_json.asp',
			allowFileManager : true,
			afterCreate : function(id) {
				KE.event.ctrl(document, 13, function() {
					KE.util.setData(id);
					document.forms['example'].submit();
				});
				KE.event.ctrl(KE.g[id].iframeDoc, 13, function() {
					KE.util.setData(id);
					document.forms['example'].submit();
				});
			}
		});
	</script>
</head>
<body>
<%

		'版权：世纪伟成(http://yidacms.com)
		'本信息不会影响您网站的正常访问，无论免费用户或是收费用户请保留这里的信息.
		'如果您删除了这里的版权信息,将追究法律责任.
		yidacms_id = cint(Request("id"))


		if request("t")="bookedit" Then
			if len(trim(request.Form("booktitle")))<3 then
				response.write ("<script language=javascript> alert('留言标题必填且不能少于3个字符！');history.back(-1);</script>")
				response.end
			end if
			
			if len(trim(request.Form("bookcontent")))<3 then
				response.write ("<script language=javascript> alert('留言内容必填且不能少于3个字符！');history.back(-1);</script>")
				response.end
			end if
		
		Dim rs,sql
		Set rs = Server.CreateObject("ADODB.Recordset")
		sql = "SELECT * FROM shuaiweb_book WHERE id= "&yidacms_id&""
		rs.open sql,dbok,1,3
			rs("booktitle")=trim(request.form("booktitle"))
			rs("bookname")=trim(request.form("bookname"))
			rs("booktel")=trim(request.form("booktel"))
			rs("bookemail")=trim(request.form("bookemail"))
			rs("bookqq")=trim(request.form("bookqq"))
			rs("bookcontent")=trim(request.form("bookcontent"))
			rs("bookaddress")=trim(request.form("bookaddress"))
			rs("bookunits")=trim(request.form("bookunits"))
			rs("bookreply")=trim(request.form("bookreply"))
			rs("bookAudit")=trim(request.form("bookAudit"))
		rs.update
		rs.close
		set rs=nothing
		response.write "<script language=javascript> alert('成功修改！');location.replace('admin_book.asp');</script>"
		response.end
		End If
		
		set rs = server.createobject("adodb.recordset")
		sql="select * from shuaiweb_book WHERE id= "&yidacms_id&""
		rs.open sql,dbok,1,1
%>
		<table width="98%" border="0" cellpadding="10" cellspacing="0" bordercolor="#666666" style="border-collapse:collapse" align="center">
		  <form id="form1" name="form1" method="post" action="admin_bookedit.asp?t=bookedit&id=<%=rs("id")%>">
			<tr>			
			  <td><input type=button onclick="window.location.href('admin_book.asp')"value="返 回" class="inanniu"></td>
			</tr>
			<tr>			  
			  <td>留言标题<br /><input name="booktitle" type="text" id="booktitle" value="<%=rs("booktitle")%>" class="win"/></td>
			</tr>
			<tr>			  
			  <td>留言人姓名<br /><input name="bookname" type="text" id="bookname" value="<%=rs("bookname")%>" class="win"/></td>
			</tr>
			<tr>			  
			  <td>留言人电话<br /><input name="booktel" type="text" id="booktel" value="<%=rs("booktel")%>" class="win"/></td>
			</tr>
			<tr>			  
			  <td>留言人QQ<br /><input name="bookqq" type="text" id="bookqq" value="<%=rs("bookqq")%>" class="win"/></td>
			</tr>
			<tr>
			  <td>留言人E-mail<br /><input name="bookemail" type="text" id="bookemail" value="<%=rs("bookemail")%>" class="win"/></td>
			</tr>
			<tr>
			  <td>留言人工作<br /><input name="bookunits" type="text" id="bookunits" value="<%=rs("bookunits")%>" class="win"/></td>
			</tr>
			<tr>
			  <td>留言人地址<br /><input name="bookaddress" type="text" id="bookaddress" value="<%=rs("bookaddress")%>" class="win"/></td>
			</tr>
			<tr>
			  <td>留言内容<br />
				  <textarea id="content_1" name="bookcontent" style="width:100%;height:300px;"><%=rs("bookcontent")%></textarea>
			 </td>
			</tr>
			<tr>
			  <td><input type="submit" name="Submit" value="审核并提交" class="inanniu"/> <input type=button onclick="window.location.href('admin_book.asp')"value="返 回" class="inanniu"></td>
			</tr>
				 <input type="hidden" name="bookAudit" id="bookAudit" value="0"/>
			</form>
		</table>
</body>
</html>
