<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">Banner名称：</td>
		<td><input type="text" class="text" name="title" id="title" size="30" maxlength="20" value="{?$row.title?}" /></td>
	</tr>
	<tr>
		<td class="tdleft">展示方式：</td>
		<td>
			<select name="type">
				{?section name=t loop=$type?}<option value="{?$t['key']?}"{?if $row.type==$t['key']?} selected{?/if?}>{?$t['value']?}</option>{?/section?}
			</select>
		</td>
	</tr>
	<tr>
		<td class="tdleft" width="100">宽(像素)：</td>
		<td><input type="text" class="text" name="width" size="10" maxlength="4" value="{?$row.width?}" onkeyup="value=value.replace(/[^0-9]/g,'');" /></td>
	</tr>
	<tr>
		<td class="tdleft" width="100">高(像素)：</td>
		<td><input type="text" class="text" name="height" size="10" maxlength="4" value="{?$row.height?}" onkeyup="value=value.replace(/[^0-9]/g,'');" /></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>