<form id="formAdd" method="post" action="?action=add">
<input type="hidden" name="dosubmit" value="1">
{?if $row.id>0?}<input type="hidden" name="id" value="{?$row.id?}">{?/if?}
<fieldset>
	<legend>基本配置</legend>
	<table width="100%" class="grid">
		<tr>
			<td class="tdleft" width="100"><span class="red">*</span> 语言名称：</td>
			<td><input type="text" class="text" name="name" id="name" size="50" maxlength="20" value="{?$row.name?}" /></td>
		</tr>
		{?if $row.id==0?}
		<tr>
			<td class="tdleft"><span class="red">*</span> 英文标识：</td>
			<td><input type="text" class="text" name="lang" id="lang" size="50" maxlength="5" value="{?$row.lang?}" onkeyup="value=value.replace(/[^a-z]/g,'');" /></td>
		</tr>
		{?/if?}
		<tr>
			<td class="tdleft"><span class="red">*</span> 网站名称：</td>
			<td><input type="text" class="text" name="sitename" id="sitename" size="50" maxlength="100" value="{?$row.sitename?}" /></td>
		</tr>
		<tr>
			<td class="tdleft">排序：</td>
			<td><input type="text" class="text" name="listorder" id="listorder" size="50" maxlength="2" value="{?$row.listorder?}" onkeyup="value=value.replace(/[^0-9]/g,'');" /></td>
		</tr>
		<tr>
			<td class="tdleft">是否显示：</td>
			<td>
				<input type="radio" name="display" value="1"{?if $row.display=='1' || $row.display==''?} checked{?/if?}> 显示&nbsp;&nbsp; 
				<input type="radio" name="display" value="0"{?if $row.display=='0'?} checked{?/if?}> 不显示
			</td>
		</tr>
	</table>
</fieldset>
<div style="height:15px;"></div>
<fieldset>
	<legend>模板风格配置</legend>
	<table width="100%" class="grid">
		<tr>
			<td class="tdleft" width="100">模版目录：</td>
			<td><input type="text" class="text" name="theme" id="theme" size="20" maxlength="20" value="{?$row.theme?}" onkeyup="value=value.replace(/[^0-9a-z_]/g,'');" />&nbsp; <span class="gray">留空默认为英文标识</span></td>
		</tr>
		<tr>
			<td class="tdleft">风格目录：</td>
			<td><input type="text" class="text" name="skin" id="skin" size="20" maxlength="20" value="{?$row.skin?}" onkeyup="value=value.replace(/[^0-9a-z_]/g,'');" />&nbsp; <span class="gray">留空默认为英文标识</span></td>
		</tr>
	</table>
</fieldset>
<div style="height:15px;"></div>
<fieldset>
	<legend>SEO配置</legend>
	<table width="100%" class="grid">
		<tr>
			<td class="tdleft" width="100">站点标题：</td>
			<td><input type="text" class="text" name="seo[meta_title]" size="60" value="{?$row['seo'].meta_title?}" /></td>
		</tr>
		<tr>
			<td class="tdleft">关键词：</td>
			<td><input type="text" class="text" name="seo[meta_keywords]" size="60" value="{?$row['seo'].meta_keywords?}" /></td>
		</tr>
		<tr>
			<td class="tdleft">描述：</td>
			<td><input type="text" class="text" name="seo[meta_description]" size="60" value="{?$row['seo'].meta_description?}" /></td>
		</tr>
	</table>
</fieldset>
<div><input type="submit" name="submit" id="submit" class="button dodialog" value="提 交"/></div>
</form>
<script type="text/javascript">
$(function(){
	$("#formAdd").ajaxForm({
        dataType: "json",
        success : function(data){
			if(data.flag == 0){
				doTip(data.msg);
			}else{
				window.top.mainframe.location.reload();
				doDialogClose();
			}
        }
    });
})
</script>