<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?=$charset?>">

<link href="images/style.css" rel=stylesheet type=text/css>

</head>

<body>

<p class="add"><a href="comcat.php?act=add">添加商家类型</a></p>

<table width=100% border=0 align=center cellpadding=0 cellspacing=1 class=tableborder>

	<tr class="bgs tc">

	  <td>编号</td>

	  <td>名称</td>

	  <?php if($parentid == 0){?>

	  <?}?>

	  <td>操作</td>

	</tr>



<?php 

foreach($cat AS $cat)

{

?>

	<tr>

	  <td><label><?=$cat[catid]?></label></td>

	  <td><?=$cat[catname]?></td>

	  <td class="tda"><a href="comcat.php?act=edit&catid=<?=$cat[catid]?>">编辑</a><a href="comcat.php?act=delete&catid=<?=$cat[catid]?>" onClick="if(!confirm('确定要删除吗？\n\n此操作不可以恢复！'))return false;">删除</a><a href="com.php?act=list&cat=<?=$cat[catid]?>">管理商家</a>

	  </td>

	</tr>

	

<?php

	if(!empty($cat[children])) 

	{

		foreach($cat[children] AS $child)

		{

?>    	

			<tr>

			  <td><label><?=$child[id]?></label></td>

			  <td width="212" align="left">&nbsp;&nbsp;&nbsp;&nbsp;——&gt;			    <?=$child[name]?></td>

			  <?php if($parentid == 0){?>

			  <?}?>

			  <td class="tda"><a href="comcat.php?act=edit&catid=<?=$child[id]?>">编辑</a><a href="comcat.php?act=delete&catid=<?=$child[id]?>" onClick="if(!confirm('确定要删除吗？\n\n此操作不可以恢复！'))return false;">删除</a><a href="com.php?act=list&cat=<?=$child[id]?>">管理商家</a>

			  </td>

			</tr>

<?php

		}

	} 

}

?>

    </table>

</body>

</html>