<!--<?php
require($this->getSegmentFile('dianpu.nav'));
print <<<EOT
-->
<script type="text/javascript">
var group = {
	doDel : function (url) {
	   if(confirm("您确认要删除该店铺组么?")) {
		   setTimeout(function(){
				window.location.href = url;
			},100);
	   }
	   return false;
	}
};
</script>
<h2 class="h1"><span class="mr10 fl">店铺组设置</span><a class="btn_add fl"  href="{$_viewer->baseUrl}&action=addgroups" hidefocus="true"><i>添加店铺组</i></a></h2>
<!--
EOT;
if(!$_viewer->groups){
print <<<EOT
-->
	<div class="admin_tips">啊哦，没有你要的信息！</div>
<!--
EOT;
}else{
print <<<EOT
-->
<div class="admin_table mb10">
	<table width="100%">
		<tr class="tr2">
			<td width="50">编号</td>
			<td width="200">店铺组</td>
			<td>操作</td>
		</tr>
<!--
EOT;
$_index = $_viewer->start;
foreach($_viewer->groups as $key => $group){
$_index++;
print <<<EOT
-->
	<tr class="tr1">
		<td class="td2">{$_index}</td>
		<td class="td2">{$group[title]}</td>
		<td class="td2">
			<a href="{$_viewer->baseUrl}&action=editgroups&gid={$group[groupid]}" class="mr10">[编辑]</a>
<!--
EOT;
if(!in_array($group['groupid'],array('1','2'))){
print <<<EOT
-->
			<a href="javascript:;"  onClick="group.doDel('{$_viewer->baseUrl}&action=delgroups&gid={$group[groupid]}')">[删除]</a>
<!--
EOT;
}print <<<EOT
-->
		</td>
	</tr>
<!--
EOT;
}}print <<<EOT
-->
	</table>
</div>
<div class="cc">{$_viewer->pages}</div> 
<!--
EOT;
?>