<!--#include file="../admin_gbk.asp" -->
<!--#include file="../js/Function.asp" -->
<!--#include file="../../inc/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=gb2312" />
<link href="../js/admin.css" rel="stylesheet" type="text/css">
<title>留言管理！</title>
	<script charset="utf-8" src="<%=webpath%>bianji/kindeditor.js"></script>
	<script charset="utf-8" src="<%=webpath%>bianji/lang/zh_CN.js"></script>
	<script charset="utf-8" src="<%=webpath%>bianji/plugins/code/prettify.js"></script>

	<script>
		KindEditor.ready(function(K) {
			var editor1 = K.create('textarea[id="content1"]', {

				uploadJson : '<%=webpath%>uploadclass/upfile_flash.asp?upload_class=book',
				fileManagerJson : '<%=webpath%>uploadclass/file_manager_json.asp',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
				}
			});
			prettyPrint();
		});
	</script>
</head>
<body>
<%
'版权：世纪伟成(http://yidacms.com)
'本信息不会影响您网站的正常访问，无论免费用户或是收费用户请保留这里的信息.
'如果您删除了这里的版权信息,将追究法律责任.
if InStr(admin_aqx,"05") > 0 Then 
  response.write ""
	Else 
  response.write "<div class=""admin_qx"">对不起,您没有权限操作!</div>"
  response.end
End If 

		set rs = server.createobject("adodb.recordset")
		sql="select * from shuaiweb_book WHERE id= "&request("id")&""
		rs.open sql,dbok,1,1

		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= "&request("id")&""
		rs.open sql,dbok,1,3
			rs("booktitle")=admin_Str(trim(request.form("booktitle")))
			rs("bookname")=admin_Str(trim(request.form("bookname")))
			rs("booktel")=admin_Str(trim(request.form("booktel")))
			rs("bookemail")=admin_Str(trim(request.form("bookemail")))
			rs("bookqq")=admin_Str(trim(request.form("bookqq")))
			rs("bookcontent")=admin_Str(trim(request.form("bookcontent")))
			rs("bookaddress")=admin_Str(trim(request.form("bookaddress")))
			rs("bookunits")=admin_Str(trim(request.form("bookunits")))
			rs("bookreply")=admin_Str(trim(request.form("bookreply")))
			rs("bookAudit")=admin_Str(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
%>
<form id="form1" name="form1" method="post" action="admin_bookedit.asp?t=bookedit&id=<%=rs("id")%>">
		<table width="98%" border="0" cellpadding="10" cellspacing="0" bordercolor="#666666" style="border-collapse:collapse" align="center">
			<tr>
			  <td><div align="right">留言标题</div></td>
			  <td><input name="booktitle" type="text" id="booktitle" value="<%=rs("booktitle")%>" class="win"/></td>
			</tr>
			<tr>
			  <td><div align="right">留言人姓名</div></td>
			  <td><input name="bookname" type="text" id="bookname" value="<%=rs("bookname")%>" class="win"/></td>
			</tr>
			<tr>
			  <td><div align="right">留言人电话</div></td>
			  <td><input name="booktel" type="text" id="booktel" value="<%=rs("booktel")%>" class="win"/></td>
			</tr>
			<tr>
			  <td><div align="right">留言人QQ</div></td>
			  <td><input name="bookqq" type="text" id="bookqq" value="<%=rs("bookqq")%>" class="win"/></td>
			</tr>
			<tr>
			  <td><div align="right">留言人E-mail</div></td>
			  <td><input name="bookemail" type="text" id="bookemail" value="<%=rs("bookemail")%>" class="win"/></td>
			</tr>
			<tr>
			  <td><div align="right">留言人工作</div></td>
			  <td><input name="bookunits" type="text" id="bookunits" value="<%=rs("bookunits")%>" class="win"/></td>
			</tr>
			<tr>
			  <td><div align="right">留言人地址</div></td>
			  <td><input name="bookaddress" type="text" id="bookaddress" value="<%=rs("bookaddress")%>" class="win"/></td>
			</tr>
			<tr>
			  <td valign="top"><div align="right">留言内容</div></td>
			  <td>
				  <textarea id="content1" name="bookcontent" style="width:100%;height:300px;"><%=rs("bookcontent")%></textarea>			 </td>
			</tr>
			<tr>
			  <td>&nbsp;</td>
			  <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"/>
		</table>
</form>
</body>
</html>
