<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?}
<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="20" maxlength="20" value="{?$row.name?}" /></td>
	</tr>
	<tr>
		<td class="tdleft"><span class="red">*</span> 模块目录：</td>
		<td><input type="text" class="text" name="moddir" id="moddir" size="20" maxlength="20" value="{?$row.moddir?}" onkeyup="value=value.replace(/[^a-z0-9]/g,'');" /></td>
	</tr>
	<tr>
		<td class="tdleft"><span class="red">*</span> 数据表名：</td>
		<td><input type="text" class="text" name="tablename" id="tablename" size="20" maxlength="20" value="{?$row.tablename?}" onkeyup="value=value.replace(/[^a-z0-9_]/g,'');" /></td>
	</tr>
	<tr>
		<td class="tdleft">显示模式：</td>
		<td><select name="type">{?section name=i loop=$modtype?}<option value="{?$i['key']?}"{?if $i['key']==$row.type?} selected{?/if?}>{?$i['value']?}</option>{?/section?}</select></td>
	</tr>
	<tr>
		<td class="tdleft">状态：</td>
		<td>
			<input type="radio" name="status" value="1"{?if $row.status=='1' || $row.status==''?} checked{?/if?}> 启用&nbsp;&nbsp; 
			<input type="radio" name="status" value="0"{?if $row.status=='0'?} checked{?/if?}> 禁用
		</td>
	</tr>
	<tr>
		<td class="tdleft">允许搜索：</td>
		<td>
			<input type="radio" name="issearch" value="1"{?if $row.issearch=='1' || $row.issearch==''?} checked{?/if?}> 是&nbsp;&nbsp; 
			<input type="radio" name="issearch" value="0"{?if $row.issearch=='0'?} checked{?/if?}> 否
		</td>
	</tr>
	<tr>
		<td class="tdleft">搜索字段：</td>
		<td><input type="text" class="text" name="searchfield" size="20" maxlength="20" value="{?$row.searchfield?}" /><br>默认title，多子段用逗号分割</td>
	</tr>
</table>
<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>