<table width="100%" class="topmenu">
	<tr><td>
		<a href="banner.php" class="on"><em>Banner管理</em></a><span>|</span>
		<a href="javascript:doDialog('{?$saxue_admin_url?}/banner.php?action=add','添加Banner','400','160')"><em>添加Banner</em></a><span>|</span>
		<a href="?action=cache"><em>更新Banner缓存</em></a>
	</td></tr>
</table>
<form method="post" name="frmpost" id="frmpost">
<input name="action" type="hidden" value="update">
<table width="100%" class="grid">
	<tr>
		<th>ID</th>
		<th>名称</th>
		<th>展示方式</th>
		<th>宽(像素)</th>
		<th>高(像素)</th>
		<th>图片数</th>
		<th>预览</th>
		<th>模版调用</th>
		<th>管理</th>
	</tr>
	<tbody>
	{?section name=i loop=$rows?}
	<tr>
		<td>{?$rows[i].id?}</td>
		<td>{?$rows[i].title?}</td>
		<td>
			<select name="banners[{?$rows[i].id?}][type]" id="type{?$rows[i].id?}">
				{?section name=t loop=$type?}<option value="{?$t['key']?}"{?if $rows[i].type==$t['key']?} selected{?/if?}>{?$t['value']?}</option>{?/section?}
			</select>
		</td>
		<td><input type="text" class="text" name="banners[{?$rows[i].id?}][width]" size="5" maxlength="4" value="{?$rows[i].width?}" onkeyup="value=value.replace(/[^0-9]/g,'');" /></td>
		<td><input type="text" class="text" name="banners[{?$rows[i].id?}][height]" size="5" maxlength="4" value="{?$rows[i].height?}" onkeyup="value=value.replace(/[^0-9]/g,'');" /></td>
		<td>{?$rows[i].pics?}</td>
		<td>{?if $rows[i].pics==0?}<span class="gray">预览</span>{?else?}<a href="#" onclick="window.open('/api/banner_preview.php?id={?$rows[i].id?}&type='+$('#type{?$rows[i].id?}').val())">预览</a>{?/if?}</td>
		<td><input type="text" class="text" size="30" value="&#123;?function saxue_banner:{?$rows[i].id?}?}"></td>
		<td>
			<a href="javascript:doDialog('{?$saxue_admin_url?}/banner.php?action=add&id={?$rows[i].id?}','修改Banner——{?$rows[i].title?}','400','160')">{?function saxue_geticon:'edit':'修改Banner'?}</a>
			<a href="?action=delete&id={?$rows[i].id?}" onclick="return confirm('你确定要删除Banner『{?$rows[i].title?}』吗？')">{?function saxue_geticon:'del':'删除Banner'?}</a>
			<a href="bannerpic.php?bid={?$rows[i].id?}">{?function saxue_geticon:'set':'图片列表'?}</a>
			<a href="bannerpic.php?bid={?$rows[i].id?}&action=add">{?function saxue_geticon:'add':'添加图片'?}</a>
		</td>
	</tr>
	{?/section?}
	<tr><td colspan="9" class="foot"><input type="submit" value="更新" class="button"></td></tr>
	</tbody>
</table>
</form>