<!--{template 'head'}-->
<script type="text/javascript">
function removeItem(id){
	var o = $('item-'+id);
	if(o == null) return ;
	$('mytable').deleteRow(o.rowIndex);
}
setSubject("图集缩略图配置");
</script>
<form method="post" name="myform" action="module.php?mod=pic&channelid={$channelid}&action=set">
<input type='hidden' name='myFormAc' value='update'>
<table cellpadding="0" cellspacing="0" class="tableborder mt5" id="mytable" style="width:100%">
	<tr align=center>
		<td width="80" class="tablerowhighlight">编号</td>
		<td width="150" class="tablerowhighlight">宽度</td>
		<td width="150" class="tablerowhighlight">高度</td>
		<td width="120" class="tablerowhighlight">类型</td>
		<td width="150" class="tablerowhighlight">扩展名</td>
		<td class="tablerowhighlight">操作</td>
	</tr>
	<!--{loop $data $val}-->
	<tr class="item">
		<td class="tablerowl">{$val[id]}</td>
		<td align="center"><input name="data[{$val['id']}][w]" type="text" value="{$val['w']}" class="f-text" size="10" style="text-align:center;" /></td>
		<td align="center"><input name="data[{$val['id']}][h]" type="text" class="f-text" size="10" style="text-align:center;" value="{$val['h']}" /></td>
		<td align="center">
			<select name="data[{$val['id']}][type]">
				<option value="0"<!--{if $val['type'] == 0}--> selected<!--{/if}-->>不裁图</option>
				<option value="1"<!--{if $val['type'] == 1}--> selected<!--{/if}-->>裁图</option>
			</select>		
		</td>
		<td align="center">
			<!--{if $val['name'] == '_s'}-->
			_s<input name="data[{$val['id']}][name]" type="hidden" class="f-text"  size="10" value="_s" style="text-align:center;background-color:#ccc" readonly />
			<!--{else}-->
			<input name="data[{$val['id']}][name]" type="text" class="f-text" size="10" value="{$val['name']}" style="text-align:center;" />
			<!--{/if}-->
		</td>
		<td align="center">
			<!--{if $val['name'] != '_s'}--><a href="javascript:void(0);" onclick="removeItem({$val['id']})">删除</a><!--{/if}-->
		</td>
	</tr>
	<!--{/loop}-->
	<tr class="item">
		<td class="tablerowl">添加</td>
		<td align="center"><input name="data[0][w]" type="text" value="0" class="f-text" size="10" style="text-align:center;" /></td>
		<td align="center"><input name="data[0][h]" type="text"  class="f-text" size="10" value="0" style="text-align:center;" /></td>
		<td align="center">
			<select name="data[0][type]">
				<option value="0">不裁图</option>
				<option value="1">裁图</option>
			</select>
		</td>
		<td align="center"><input name="data[0][name]" type="text" class="f-text" size="10" value="" style="text-align:center;" /></td>
		<td align="center">
			
		</td>
	</tr>	
	<tr>
		<td align=center class="tablerow">
			
		</td>
		<td colspan=5 class="tablerow">
			<input type="submit" value=" 保存 " class="f-button" />
		</td>
	</tr>
	</table>
</form>

<!--{template 'foot'}-->
