{* <?php die('duotaopu');?> *}
{include file="common/header.php"}
<body class="body-main">
<div class="admin_notice"><span>管理操作：</span><a href="?m=shop&a=edit&id=0">添加店铺</a>　┊　<a href="?m=shop">店铺管理</a></div>
<br>
<ul id="admin_sub_title">
	<li class="sub"><a>店铺管理</a></li>
	<li class="unsub"><a class="hand" id="search">搜索店铺</a></li>
	<li style="float:right"><select onchange="location.href='?m=shop{if isset($smarty.get.isshow)}&isshow={$smarty.get.isshow}{/if}&id='+this.options[this.options.selectedIndex].value">
						<option value="0">所有分类</option>
						{$class_option}
						</select></li>
</ul>
<script>
$(function() {
	$("#search").click(function(){
		art.dialog({
			id:'s',
			title:'搜索',
			content:'关键词：<input name="keyword" type="text" class="input" id="keyword" value="" />',
			ok: function(){
				if($('#keyword').val()!='') location.href="?m=shop&q="+$('#keyword').val();
			}
		});
	});
});
</script>
<div id="admin_right_b">

  <table border="0" align="center" cellpadding="3" cellspacing="1" class="table_b">
   <form action="?m=shop&a=do&id=check" method="post" onSubmit="return confirm('确定要执行选定的操作吗？');"> 
	<tr>
	  <td align='center' width="30" class="title_bg">选择</td>
	  <td width="50" align='center' class="title_bg">id</td>
      <td class="title_bg">店铺名称</td>
	  <td width="90" align='center' class="title_bg">店铺类型</td>
	  <td width="90" align='center' class="title_bg">分类</td>
	  <td width="90" align='center' class="title_bg">状态</td>
	  <td width="140" align='center' class="title_bg">更新时间</td>
      <td width="100" align='center' class="title_bg">管理</td>
    </tr>
{foreach $list as $vo}
    <tr onmouseover=this.bgColor='#EDF8FE'; onmouseout=this.bgColor='#ffffff'; bgcolor='#ffffff'>
	  <td height="25" align="center"><input name="ids[]" type="checkbox" value="{$vo.id}"></td>
	  <td align="center">{$vo.id}</td>
      <td><a href="?m=shop&a=edit&id={$vo.id}&p={$p}" style="{$vo.style}">{$vo.title}</a></td>
	  <td align="center">{if $vo.ismall==1}<a href="?m=shop&ismall=1">天猫</a>{else}<a href="?m=shop&ismall=0">集市</a>{/if}</td>
	  <td align="center"><a href="?m=shop&id={$vo.cid}">{$vo.cname}</a></td>
	  <td align="center">{if $vo.isshow==1}<a href="?m=shop&isshow=1"><font color='#999999'>已审核</font></a>{else}<a href="?m=shop&isshow=0"><font color='red'>未审核</font></a>{/if}</td>
	  <td align="center">{$vo.addtime}</td>
      <td align="center"><a href="?m=shop&a=edit&id={$vo.id}&p={$p}">编辑</a> <a href="?m=shop&a=do&do=del&id={$vo.id}" onclick='return confirm("确定删除?删除后不可恢复!");'>删除</a></td>
    </tr>
{foreachelse}
	<tr bgcolor='#ffffff'>
		<td colspan='8' height="25" align="center">暂无店铺！</td>
	</tr>
{/foreach}
	<tr>
      <td colspan="8" height='30' class="tdbg">
	  <span class="right"></span>&nbsp;&nbsp;<input name="chkall" type="checkbox" id="chkall" onclick=checkall(this.form) value="checkbox">&nbsp;<label for="chkall">全选</label>  
              <select name="action" onchange="if(this.value=='move'){ $('#cid').attr('disabled',''); }else{ $('#cid').attr('disabled','disabled');}">
			  <option value="">→操作</option>
			  <option value="move">批量移动</option>
			  <option value="show">批量审核</option>
			  <option value="del">批量删除</option>
			  </select>  <select name='cid' id="cid" disabled="disabled"><option value="0">请选择分类</option>{$class_option}</select>

		<div class="aui_buttons"  style="text-align:left;display: inline;"><button type="submit" class="aui_state_highlight">执行</button></div>
		</td>
    </tr>
	
	<tr>
      <td colspan="9" class="tdbg content_page" align="center"><a>共 {$total} 条</a>&nbsp;{$pages}</td>
	</tr>
	
	</form>
  </table>

<div class="runtime"></div>  
</div>
</body>
</html>