<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>OOPHP博客系统后台</title>
	<link rel="stylesheet" type="text/css" media="screen" href="<{$baseUrl}>/public/styles/layout.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="<{$baseUrl}>/public/styles/ThickBox.css" />
	<script type="text/javascript" language="Javascript" src="<{$baseUrl}>/public/scripts/jquery.js"></script>
	<script type="text/javascript" language="Javascript" src="<{$baseUrl}>/public/scripts/thickbox.js"></script>
	
<script language="javascript" type="text/javascript">
function FetchClass(id){
	var divID="#classhidden"+id;
	var spanID=".classhidden"+id;
	var shows=$(divID).css("display");
	if(shows=='none'){
			$(divID).show("slow");
		}else{
			$(divID).hide("slow");
	}
	$.post("<{$baseUrl}>/admin/class/classone/",{id:id},
  	function(data){
		$(spanID).html(data); 
  	})
  
}

function shouldDelItem(){
	if(confirm("确定删除吗?此分类下的子分类也会被删除!")){
		return true;	
	}	
	else{
		return false;	
	}
}

</script>
</head>

<body>
<div id="navbar">
    <p><!-- <span><select name=""><option value="0">后台首页</option></select></span> -->你的位置: <a href="main.html" title="">后台首页</a> &gt; 分类管理</p>
</div>
<div class="table-div">
    <form method="post" action="<{$baseUrl}>/admin/class/add/">
    <table>
	<thead>
	  <tr>
	    <th class="title" colspan="2">分类搜索</th>
	  </tr>
	</thead>	
	<tbody>
      <tr>
	    <th style="width:15%;">分类搜索</th>
		<td><input type="text" name="" /><input type="submit" value="查询" class="cmd" /></td>
	  </tr>
	  <tr>
	    <th style="width:15%;">常见分类</th>
		<td><a href="#" title="">PHP技术</a> <a href="#" title="">心情日志</a></td>
	  </tr>
	</tbody>	
    </table>
	</form>

	<table cellspacing="0">
	  <thead>
	    <tr>
	      <th class="title" colspan="5">文章分类目录</th>
	    </tr>
	  </thead>
	  <tbody>
	   <{section name=classList  loop=$classArray}>
	  <tr>
	    <th style="width:7%;">分类名</th>
		<td><{$classArray[classList].name}></td>
		<td style="width:30%;"><a href="<{$baseUrl}>/admin/class/add/height/100/width/320/type/edit/id/<{$classArray[classList].id}>/pid/<{$classArray[classList].pid}>/name/<{$classArray[classList].name|urlencode}>/" class="thickbox" title="编辑分类">编辑分类</a>&nbsp;&nbsp;&nbsp;&nbsp;
		<a href="<{$baseUrl}>/admin/class/add/height/100/width/320/type/add/id/<{$classArray[classList].id}>/" class="thickbox"" title="创建子类">创建子类</a>&nbsp;&nbsp;&nbsp;&nbsp;
		<a href="#" onclick="FetchClass('<{$classArray[classList].id}>');"  title="查看子分类">查看子分类</a>&nbsp;&nbsp;&nbsp;&nbsp;
		<a href="<{$baseUrl}>/admin/class/del/id/<{$classArray[classList].id}>/" onclick="return shouldDelItem();" title="删除分类">删除分类</a></td></tr>
		<tr><td colspan="4">
		<div style="display:none;width:100%;" id="classhidden<{$classArray[classList].id}>">
		<span class="classhidden<{$classArray[classList].id}>"></span>
	  	</div>
		</td></tr>
		
	<{/section}>
	 </tbody>
	</table>
	
	
	<table cellspacing="0">
	  <thead>
	    <tr>
	      <th class="title" colspan="3">相册分类目录</th>
	    </tr>
	  </thead>
	  <tbody>
	  <tr>
	    <th style="width:15%;">一级分类目录</th>
		<td><a href="#" title="">分类</a> &raquo; <a href="#" title="">电子消费类</a></td>
		<td style="width:26%;"><a href="product-categories-modif.htm" title="">编辑分类</a> <a href="#" title="">删除分类</a> <a href="#" title="">创建子类</a></td>
	  </tr>
	  <tr>
	    <th>子类</th>
		<td colspan="2"><a href="#" title="">MP3/MP4</a> <a href="#" title="">DV</a> <a href="#" title="">电脑配件</a></td>
	  </tr>
	  </tbody>
	</table>
</div>
</body>
</html>