<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$charset?>">
<link href="images/style.css" rel=stylesheet type=text/css>
</head>
<body>
<h3><span><a href="area.php?act=add">添加地区</a></span></h3>
<table width=100% border=0 align=center cellpadding=0 cellspacing=1 class=tableborder>
	<tr class="bgs">
	  <td width="174">编号</td>
	  <td width="458">名称</td>
	  <?php if($parentid == 0){?>
	  <?}?>
	  <td width="385">操作</td>
	</tr>

<?php 
if($area)
{
	foreach($area AS $area)
	{
?>
	<tr>
	  <td><label><?=$area[areaid]?></label></td>
	  <td><?=$area[areaname]?></td>
	  <?php if($parentid == 0){?>
	  <?}?>
	  <td class="tda"><a href="area.php?act=edit&areaid=<?=$area[areaid]?>">编辑</a><a href="area.php?act=delete&areaid=<?=$area[areaid]?>" onClick="if(!confirm('确定要删除吗？\n\n此操作不可以恢复！'))return false;"   >删除</a></td>
	</tr>
<?
	if(!empty($area[children])) 
	{
		foreach($area[children] AS $child)
		{
?>    	
			<tr>
			  <td><label><?=$child[id]?></label></td>
			  <td width="458" align="left">&nbsp;&nbsp;&nbsp;&nbsp;|——&gt;			    <?=$child[name]?></td>
			  <?php if($parentid == 0){?>
			  <?}?>
			  <td class="tda"><a href="area.php?act=edit&areaid=<?=$child[id]?>">编辑</a><a href="area.php?act=delete&areaid=<?=$child[id]?>" onClick="if(!confirm('确定要删除吗？\n\n此操作不可以恢复！'))return false;"   >删除</a></td>
			</tr>


<?php
		}
	} 
}
} 
?>
    </table>
	
   
</body>
</html>