<form id="formAdd" method="post" action="?action=add">
<input type="hidden" name="dosubmit" value="1">
{?if $row.tid>0?}<input type="hidden" name="tid" value="{?$row.tid?}">{?/if?}
<table width="100%" class="grid">
	<tr>
		<td class="tdleft" width="100"><span class="red">*</span> 方案标识：</td>
		<td><input type="text" class="text" name="tname" id="tname" size="25" maxlength="20" value="{?$row.tname?}" onkeyup="value=value.replace(/[^a-z]/g,'');" />&nbsp;<span class="gray">英文字母，同时作为缩略图保存目录</span></td>
	</tr>
	<tr>
		<td class="tdleft">方案描述：</td>
		<td><input type="text" class="text" name="intro" id="intro" size="50" maxlength="100" value="{?$row.intro?}" />&nbsp;<span class="gray">说明性文字</span></td>
	</tr>
	<tr>
		<td class="tdleft">缩略图大小：</td>
		<td>
			宽&nbsp;<input type="text" class="text" name="width" id="width" size="5" maxlength="4" value="{?$row.width?}" onkeyup="value=value.replace(/[^0-9]/g,'');" />&nbsp;X&nbsp;
			高&nbsp;<input type="text" class="text" name="height" id="height" size="5" maxlength="4" value="{?$row.height?}" onkeyup="value=value.replace(/[^0-9]/g,'');" />&nbsp;PX
			&nbsp;<span class="gray">如果只设置一个值，另一个按原图等比设置大小</span>
		</td>
	</tr>
	<tr>
		<td class="tdleft">裁剪模式：</td>
		<td>
			<select name="zoomcrop" id="zoomcrop">
				<option value="0"{?if $row.zoomcrop=='0'?} selected{?/if?}>模式0</option>
				<option value="1"{?if $row.zoomcrop=='1' || $row.zoomcrop==''?} selected{?/if?}>模式1</option>
				<option value="2"{?if $row.zoomcrop=='2'?} selected{?/if?}>模式2</option>
				<option value="3"{?if $row.zoomcrop=='3'?} selected{?/if?}>模式3</option>
			</select>&nbsp;<span class="gray"></span>
		</td>
	</tr>
	<tr>
		<td class="tdleft">裁剪位置：</td>
		<td>
			<table width="100%">
				<tr>
					<td><input name="cutpos" value="tl" type="radio"{?if $row.cutpos=='tl'?} checked{?/if?}> 顶部居左</td>
					<td><input name="cutpos" value="tc" type="radio"{?if $row.cutpos=='tc'?} checked{?/if?}> 顶部居中</td>
					<td><input name="cutpos" value="tr" type="radio"{?if $row.cutpos=='tr'?} checked{?/if?}> 顶部居右</td>
				</tr>
				<tr>
					<td><input name="cutpos" value="cl" type="radio"{?if $row.cutpos=='cl'?} checked{?/if?}> 中部居左</td>
					<td><input name="cutpos" value="c" type="radio"{?if $row.cutpos=='c' || $row.cutpos==''?} checked{?/if?}> 中部居中</td>
					<td><input name="cutpos" value="cr" type="radio"{?if $row.cutpos=='cr'?} checked{?/if?}> 中部居右</td>
				</tr>
				<tr>
					<td><input name="cutpos" value="bl" type="radio"{?if $row.cutpos=='bl'?} checked{?/if?}> 底部居左</td>
					<td><input name="cutpos" value="bc" type="radio"{?if $row.cutpos=='bc'?} checked{?/if?}> 底部居中</td>
					<td><input name="cutpos" value="br" type="radio"{?if $row.cutpos=='br'?} checked{?/if?}> 底部居右</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td class="tdleft">图片质量：</td>
		<td><input type="text" class="text" name="quality" id="quality" size="5" maxlength="3" value="{?$row.quality?}" onkeyup="value=value.replace(/[^0-9]/g,'');" />&nbsp;<span class="gray">请设置为0-100之间的数字,决定 jpg 格式图片的质量</span></td>
	</tr>
	<tr>
		<td class="tdleft">图片背景色：</td>
		<td>
			{?function saxue_getcolor:'bgcolor':$row.bgcolor?}
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PNG背景：
			<select name="pngtrans" id="pngtrans">
				<option value="0"{?if $row.pngtrans=='0'?} selected{?/if?}>不透明</option>
				<option value="1"{?if $row.pngtrans=='1' || $row.pngtrans==''?} selected{?/if?}>透明</option>
			</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>
</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>