<%@ LANGUAGE = VBScript.Encode %>
<!--#include file="../Include/conn.asp" -->
<!--#include file="../Include/ConnDatabase.asp" -->
<!--#include file="Admin_htmlconfig.asp"-->
<%
'=====================================
'天天企业网站管理系统  TianTianCMS
'天天网络科技工作室版权所有
'官方客服中心 http://www.ip126.com
'微信公众号 ip126com
'QQ:530051328 mail:bbfhq@163.com
'=====================================
%>
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312" />
<TITLE>会员注册协议</TITLE>
<link rel="stylesheet" href="Images/Admin.css">
<script language="javascript" src="../Script/Admin.js"></script>

<!--kindeditor编辑器-->
		<link rel="stylesheet" href="../KindEditor/themes/default/default.css" />
		<script charset="utf-8" src="../KindEditor/kindeditor-min.js"></script>
		<script charset="utf-8" src="../KindEditor/lang/zh_CN.js"></script>
		<script>
			var editor_ch;
			var editor_en;
			KindEditor.ready(function(K) {
				editor_ch = K.create('textarea[name="agreementCH"]', {
					resizeType : 2,//0:设置kindeditor编辑器大小不可改变; 1:只能该变高度; 2:可以改变高度和宽度
					afterBlur: function(){this.sync();},//失去焦点执行this获得值
					allowPreviewEmoticons : false,
					allowImageUpload : false,					
					items : [
						'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
						'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
						'insertunorderedlist', '|', 'emoticons', 'image', 'link']
				});
				editor_en = K.create('textarea[name="agreementEN"]', {
					resizeType : 2,//0:设置kindeditor编辑器大小不可改变; 1:只能该变高度; 2:可以改变高度和宽度
					afterBlur: function(){this.sync();},//失去焦点执行this获得值
					allowPreviewEmoticons : false,
					allowImageUpload : false,					
					items : [
						'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
						'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
						'insertunorderedlist', '|', 'emoticons', 'image', 'link']
				});
			});
		</script>
<!--kindeditor编辑器END-->

<script language = "JavaScript">
function CheckForm()
{
var editor_ch=KindEditor.create('#editor_ch');
if (editor_ch.isEmpty())
	{
	  alert("请填中文内容！")	  
	  return false
	 }
	<%if chinato=1 then%>
var editor_en=KindEditor.create('#editor_en');
if (editor_en.isEmpty())
	{
	  alert("请填英文内容！")	  
	  return false
	 }
	<%end if%>  
	return true;
}
</script>
</HEAD>
<BODY>
<%
if Instr(session("AdminPurview"),"|1,")=0 then
  response.write ("<br><br><div align=""center""><font style=""color:red; font-size:9pt; "")>您没有管理该模块的权限！</font></div>")
  response.end
end if
dim Result
Result=request.QueryString("Result")
dim agreementCH,agreementEN,Action,rs,sql
  Action=request.QueryString("Action")

    set rs = server.createobject("adodb.recordset")
      sql="select * from TianTianCMS_Config"
      rs.open sql,conn,1,3
  if Action="SaveEdit" then
      rs("agreementCh")=trim(Request.Form("agreementCh"))
      if chinato=1 then rs("agreementEn")=trim(Request.Form("agreementEn"))
	  rs.update
 Call Alert ("操作成功!","agreement.asp")
  end if
%>
<br>
<form name="editForm" method="post" action="agreement.asp?Action=SaveEdit" onSubmit="return CheckForm()">
<table class="tableborder" width="95%" border="0" align="center" cellpadding="3" cellspacing="1"> 
    <tr>
      <th height="22" colspan="2">【会员注册协议】</th>
    </tr>
    <tr>
      <td align="center" height="22" colspan="2"><b>会员注册协议</b></td>
    </tr>
    <tr>
      <td align="right" class="forumRow">中文内容：</td>
      <td class="forumRowHighlight"><textarea id="editor_ch" name="agreementCH" style="width:670px;height:400px;"><%=rs("agreementCH")%></textarea></td>
    </tr>
	<%if chinato=1 then%>
	<tr>
      <td align="right" class="forumRow">英文内容：</td>
      <td class="forumRowHighlight"><textarea id="editor_en" name="agreementEN" style="width:670px;height:400px;"><%=rs("agreementEN")%></textarea></td>
    </tr>
	<%End if%>

    <tr>
      <td align="right" class="forumRow"></td>
      <td class="forumRowHighlight"><input name="submitSaveEdit" type="submit" id="submitSaveEdit" value="保存"> <input type="button" value="返回上一页" onClick="history.back(-1)"></td>
    </tr>
  </form>
</table>
</BODY>
</HTML>
<%rs.close
set rs=Nothing%>