{if $full_page}
{include file="page_header.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<form method="post" action="information.php" name="list_form" id="list_form">
<div class="list-div" id="listDiv">
{/if}
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:10px;">
<tr>
<td height="36" class="BotNavBg">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
	<td width="50" align="left" style="padding-left:10px;">
	<label><input type="checkbox" name="check_all" onclick="select_all(this);" /> 全选</label></td>
	<td style="padding-left:5px;">
		<select name="type_up" id="sel_action_up" onchange="change_action(this)">
		<option value="">请选择...</option>
		<option value="drop">删除</option>
		<option value="status">显示</option>
		<option value="not_status">隐藏</option>
		<option value="featured">推荐</option>
		<option value="not_featured">取消推荐</option>
		</select>
	</td>
	<td align="right" style="padding-right:3px;">{include file="page.htm"}</td>
	</tr>
	</table>
</td>
</tr>
</table>
{foreach from=$language item=lang name=foo}
	<table width="100%" cellspacing="0" cellpadding="0" class="list-table" {if $smarty.foreach.foo.index>0} style="display:none" {/if} id="language_{$lang.language_id}-table">
		<tr class="thead">
		<th align="left" width="2%" ><input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox" /> </th>
		<th width="37%" align="left"><font color="#FFFFFF">{if $channel_id == 16 || $channel_id == 17}姓名{else}标题{/if}</font></th>
		<th width="9%"><font color="#FFFFFF">推荐</font></th>
		<th width="9%"><font color="#FFFFFF">显示</font></th>
		<th width="10%"><a href="javascript:listTable.sort('sort_order'); "><font color="#FFFFFF">排序</font></a>{$sort_sort_order}</th>
		<th width="10%"><a href="javascript:listTable.sort('click_cnt'); "><font color="#FFFFFF">点击</font></a>{$sort_click_cnt}</th>
		<th width="13%"><a href="javascript:listTable.sort('date_added'); "><font color="#FFFFFF">日期</font></a>{$sort_date_added}</th>
		<th width="10%" align="left">操作</th>
		</tr>
		
		{foreach from=$information_list[$lang.language_id] item=information}
		<tr>
		<td><input type="checkbox" name="checkboxes[]" value="{$information.information_id}" /></td>
		<td class="first-cell">
		{if $information.thumb}
		<a href="javascript:;" title="<img src='../{$information.thumb}'>"><span class="op_pic">{$information.name|escape:html}</span></a>
		{else}
		<span>{$information.name|escape:html}</span>
		{/if}
		</td>
		<td align="center"><img src="images/{if $information.is_featured}yes{else}no{/if}.gif" onclick="listTable.toggle(this,'toggle_featured',{$information.information_id})" /></td>
		<td align="center"><img src="images/{if $information.status}yes{else}no{/if}.gif" onclick="listTable.toggle(this, 'toggle_status', {$information.information_id})" /></td>
		<td align="center"><span onclick="listTable.edit(this,'edit_sort_order', {$information.information_id})">{$information.sort_order|escape:html}</span></td>
		<td align="center"><span>{$information.viewed}</span></td>
		<td align="center"><span>{$information.date_added}</span></td>
		<td align="right" nowrap="true" class="operation">
		<a href="information.php?act=edit&id={$information.information_id}{$strpass}" title="编辑" class="op_edit"></a>
		<a href="javascript:;" onclick="listTable.remove({$information.information_id}, '您确实要删除该产品吗?')" title="删除" class="op_del"></a>
		</td>
		</tr>
		{foreachelse}
		<tr><td class="no-records" colspan="16">没有记录</td></tr>
		{/foreach}
	</table>
{/foreach}
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
	<td height="36" class="BotNavBg">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td width="50" align="left" style="padding-left:10px;">
			<label><input type="checkbox" name="check_all" onclick="select_all(this);" /> 全选</label>
			</td>
			<td style="padding-left:5px;">
				<input type="hidden" name="act" value="batch" />
				<input type="hidden" name="type" value="" id="type" />
				<input type="hidden" name="channel_id" value="{$channel_id}" />
				<select name="type_down" id="sel_action_down" onchange="change_action(this)">
				<option value="">请选择...</option>
				<option value="drop">删除</option>
				<option value="status">显示</option>
				<option value="not_status">隐藏</option>
				<option value="featured">推荐</option>
				<option value="not_featured">取消推荐</option>
				</select>
			</td>
			<td align="right" style="padding-right:3px;">{include file="page.htm"}</td>
		</tr>
		</table>
	</td>
  </tr>
</table>
{if $full_page}
</div>
<script type="text/javascript">
	listTable.recordCount = {$record_count};
	listTable.pageCount = {$page_count};
	{foreach from=$filter item=item key=key}
	listTable.filter.{$key} = '{$item}';
	{/foreach}
	{literal}

	function change_action(obj){
		var sel_val = $(obj).val();	
		$('#type').val(sel_val);

		if(sel_val == 'drop' && confirm("确认删除?")){
			$("#list_form").submit();	
		}else if(sel_val == 'not_status' && confirm("确认隐藏?")){
			$("#list_form").submit();	
		}else if(sel_val == 'status' && confirm("确认显示?")){
			$("#list_form").submit();	
		}else if(sel_val == 'featured'  && confirm("确认推荐?")){
			$("#list_form").submit();	
		}else if(sel_val == 'not_featured'  && confirm("取消推荐?")){
			$("#list_form").submit();	
		}
		return false;
	}

	function select_all(obj){
		$('.list-table :checkbox').prop("checked",$(obj).prop('checked'));
	}
{/literal}
</script>
</form>
{insert_scripts files="tab.js"}
{include file="page_footer.htm"}
{/if}