<table width="100%" >
<tr><td class="label" >区块名称</td><td><input name='soft_box[block_name]' value='<%{$out.block_data.block_name}%>'></td>
<tr>
<td class="label" >对应分类</td><td>
	<select name="soft_box[cat_id]" >
	 	<option value="0">所有分类</option>
	 	<option value="this_cat"  <%{if $out.block_data.block_setting.soft_box.cat_id=='this_cat' }%> selected=true <%{/if}%> >当前分类</option>
		<%{foreach from=$out.soft_category_res item=c_v key=c_k}%>
			<option value="<%{$c_v.parent.cat_id}%>" <%{if $out.block_data.block_setting.soft_box.cat_id==$c_v.parent.cat_id}%> selected=true<%{/if}%>  ><%{$c_v.parent.cat_name|escape:html}%></option>
			<%{foreach from=$c_v.children item=c_v_c key=c_k_c}%>			
				<option value="<%{$c_v_c.cat_id}%>"  <%{if $out.block_data.block_setting.soft_box.cat_id==$c_v_c.cat_id}%> selected=true<%{/if}%>>&nbsp;&nbsp;&nbsp;&nbsp;<%{$c_v_c.cat_name|escape:html}%></option>
			<%{/foreach}%>
		<%{/foreach}%>
		</select>&nbsp;&nbsp; 是否显示当前分类名称 <input type='checkbox' value=1 name='soft_box[is_catname]' <%{if $out.block_data.block_setting.soft_box.is_catname }%> checked=true <%{/if}%>  >	
</td>
</tr>

<tr>
<td class="label" >提取顺序</td><td><select name='soft_box[order_type]'>
<option value='click_count' <%{if $out.block_data.block_setting.soft_box.order_type=='click_count'}%> selected=true<%{/if}%>  > 按访问量 </option>
<option value='download_num' <%{if $out.block_data.block_setting.soft_box.order_type=='download_num'}%> selected=true<%{/if}%> > 按下载量 </option>
<option value='add_time' <%{if $out.block_data.block_setting.soft_box.order_type=='add_time'}%> selected=true<%{/if}%>  > 按发布日期 </option>
<option value='last_update' <%{if $out.block_data.block_setting.soft_box.order_type=='last_update'}%> selected=true<%{/if}%> > 按更新时间 </option>
</select>&nbsp;&nbsp;<select name='soft_box[order_time]'>
<option value='all'>所有时间段</option>
<option value='month' <%{if $out.block_data.block_setting.soft_box.order_time=='month'}%> selected=true<%{/if}%>>当月</option>
<option value='week' <%{if $out.block_data.block_setting.soft_box.order_time=='week'}%> selected=true<%{/if}%>>当周</option>
<option value='day' <%{if $out.block_data.block_setting.soft_box.order_time=='day'}%> selected=true<%{/if}%>>当日</option>
</select>
&nbsp;&nbsp;
<select name='soft_box[order_sort]'>
<option value='DESC' <%{if $out.block_data.block_setting.soft_box.order_sort=='DESC'}%> selected=true<%{/if}%>>倒序</option>
<option value='ASC'  <%{if $out.block_data.block_setting.soft_box.order_sort=='ASC'}%> selected=true<%{/if}%> >顺序</option>
</select>
</td>
</tr>

<tr>
<td class="label" >类型过滤</td><td><input type='checkbox' value='is_index_commend'   name='soft_box[type][]' <%{if $smarty.get.block_id&& 'is_index_commend'|in_array:$out.block_data.block_setting.soft_box.type}%> checked=true <%{/if}%>>首页推荐  &nbsp;&nbsp; 
<input type='checkbox' value='is_channel_commend' name='soft_box[type][]'  <%{if  $smarty.get.block_id&& 'is_channel_commend'|in_array:$out.block_data.block_setting.soft_box.type}%> checked=true <%{/if}%> >频道页推荐&nbsp;&nbsp;
<input type='checkbox' value='is_cat_commend' name='soft_box[type][]' <%{if $smarty.get.block_id&& 'is_cat_commend'|in_array:$out.block_data.block_setting.soft_box.type}%> checked=true <%{/if}%> >分类页推荐&nbsp;&nbsp;
<input type='checkbox'  value='is_elite_commend' name='soft_box[type][]'  <%{if $smarty.get.block_id&& 'is_elite_commend'|in_array:$out.block_data.block_setting.soft_box.type}%> checked=true <%{/if}%>>精品推荐 &nbsp;&nbsp;
<input type='checkbox' value='is_common' name='soft_box[type][]' <%{if $smarty.get.block_id&&'is_common'|in_array:$out.block_data.block_setting.soft_box.type}%> checked=true <%{/if}%> >普通软件</td>
</tr>

<tr>
<td class="label" >是否显示版本</td><td><input type='radio' value='yes' name='soft_box[is_version]' <%{if  $out.block_data.block_setting.soft_box.is_version=='yes'}%> checked=true <%{/if}%> >是 &nbsp; <input type='radio' value='no' name='soft_box[is_version]'  <%{if $out.block_data.block_setting.soft_box.is_version=='no'}%> checked=true <%{/if}%>> 否 &nbsp; <input type='radio' value='auto' name='soft_box[is_version]'  <%{if $out.block_data.block_setting.soft_box.is_version=='auto'||!$out.block_data.block_setting.soft_box.is_version}%> checked=true <%{/if}%>  > 自动 </td>
</tr>

<tr>
<td class="label" >显示数量</td><td><input name='soft_box[num]' size=4 value='<%{if $out.block_data.block_setting.soft_box.num}%><%{$out.block_data.block_setting.soft_box.num}%><%{else}%>10<%{/if}%>'></td>
</tr>

<tr>
<td class="label" >软件名最大字节数</td><td> <input name='soft_box[name_length]' size=4   value='<%{ if $out.block_data.block_setting.soft_box.name_length}%><%{$out.block_data.block_setting.soft_box.name_length}%><%{else}%>50<%{/if}%>'></td>
</tr>

<script>
$(document).ready(function(){
	$("#block_form_id").submit(function(){
		if(!$("input[name='soft_box[block_name]']").val()){
			alert('请填写区块名称');
			$("input[name='soft_box[block_name]']")[0].focus();
			return false;
		}
	});			
		
});
</script>
