<form action="section.manage.php?action=modisave" method="POST" id="form_modi">
<table border="0" cellpadding="0" cellspacing="0" class="from_table">
	<tr>
		<th width="20%"><tpl> $langSysSecName </tpl></th>
		<td align="left" ><input name="txttitle" type="text" class="txtinput " id="txttitle" maxlength="100" value="<tpl> $section_array.section_name </tpl>" /></td>
		<td><label style="display:none" for="txttitle" class="wrong" metaDone="true" generated="true"></label></td>
	</tr>
	<tr>
		<th width="20%"><tpl> $langSysSecContent </tpl></th>
		<td align="left">
			<tpl>php</tpl>
			include("../classes/resource/fckeditor/fckeditor.php") ;
			$oFCKeditor = new FCKeditor('content') ;
			$oFCKeditor->BasePath	= '../classes/resource/fckeditor/' ;
			$oFCKeditor->ToolbarSet = 'Simple';
			$oFCKeditor->Width	= 385 ;
			$oFCKeditor->Height	= 220 ;
			$oFCKeditor->Value		= $this->_tpl_vars['section_array']['section_content'];
			$oFCKeditor->Create() ;
			<tpl>/php</tpl>
			<input type="hidden" name="txtcontent" id="txtcontent" value='<tpl> $section_array.section_content </tpl>' />
			<label style="display:none" for="txtcontent" class="wrong" metaDone="true" generated="true"></label>
      <input type="hidden"  style="border:1px solid #CCCCCC" name="txtid" value="<tpl> $section_array.section_id </tpl>">		</td>
	</tr>
	<tr>
		<th width="20%"><tpl> $langSysSecJumpLink </tpl></th>
	  <td align="left" valign="top"><input name="txturl" type="text" id="txturl"class="txtinput "  maxlength="100" value="<tpl> $section_array.section_url </tpl>" /></td>
		<td  class="vtop tips2"><tpl> $langSysSecIfLinkNoNull </tpl>http://</td>
	</tr>

</table>
<div class="table-5-bottom">

<div class="btn_marginleft_1">
<span class="btn_left">
		<input type="submit" value="<tpl> $langSysSecSubmit </tpl>" name="submit" class="btn_submit"/>
		</span>
		<span class="btn_left">
		<input type="button" value="<tpl> $langSysSecReturnToList </tpl>" id="butt_list" name="butt_list" class="btn_submit"/>
		</span>
		</div>
		</div>	
</form>

<script language="javascript" type="text/javascript">
$(document).ready(function(){
	
	hideMessage();
	//返回列表
	$("#butt_list").click(function(){
		ShowDiv = "result_content";
		getPageContent('section.manage.php?action=ajax_list');
	});
	
	var options = {
		beforeSubmit:  function(){showLoading(showSaveText);},
		success:       function(msg){
			hideLoading();
			showMessage(msg.message,msg.type);
			if(msg.type == 1){
				ShowDiv = 'result_content';
				getPageContent('section.manage.php?action=ajax_list');
			}
		},
		type:      'post',
		dataType:  'json'
	};
	//表单验证
	$("#form_modi").validate({
		errorClass: "wrong",
		rules: {
			txttitle: {required:true}
		},
		messages: {
			txttitle: {required: "<tpl> $langSysSecPleaseFillInName </tpl>"}
		},
		submitHandler: function() {
			//将FCK值写入隐藏域
			var oEditor = FCKeditorAPI.GetInstance('content');
			$('#txtcontent').val(oEditor.GetXHTML(true));
			$('#form_modi').ajaxSubmit(options);
		}
	});
});
</script>
