<!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" />
<script type="text/javascript" language="Javascript" src="<{$baseUrl}>/public/scripts/jquery.js"></script>
<script language="javascript" type="text/javascript">
function ChangeClass(id){
	var fid="#class"+id;
	var inner="#inner"+id;
	var pid=$(fid).val();
	if(pid!='noid'){
	$.post("<{$baseUrl}>/admin/class/ajax/",{id:pid},
  	function(data){
  		//alert(data);
  		var  strArray=new   Array();   
		strArray=data.split("||||");
		$("#sunid").val(strArray[0]);
    	$(inner).empty();
		$(inner).html(strArray[1]); 
		// var abc=$("#sunid").val();
		//alert(abc);
  	})
  }else{
  	$(inner).empty();
  	
  }	
}
	</script>
</head>
<body>
<div id="navbar">
    <p><!-- <span><select name=""><option value="0">后台首页</option></select></span> -->你的位置: <a href="main.html" title="">后台首页</a> &gt; <a href="product-categories.htm" 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="name" id="name" value="<{$name}>" size="60"/></td>
	  </tr>
	  <tr>
	    <th>上级分类</th>
		<{if $type==''}>
		<select id="class1" name="class1"  onchange="ChangeClass('1');" >
		<option  value="noid">请选择分类</option>
		<{section name=classList  loop=$classAll}>
		<option  value="<{$classAll[classList].id}>"><{$classAll[classList].name}></option>
		<{/section}>
		</select><span id="inner1"></span><input type="hidden" name="sunid" id="sunid" value="0"/>
		<{else if}>
		<{$fenleiString}><p><input type="hidden" name="sunid" id="sunid" value="<{$pid}>"/>
		<input type="hidden" name="id" id="id" value="<{$id}>"/>
		<input type="hidden" name="type" id="type" value="<{$type}>"/></p>
		<{/if}>
	  </tr>
	  <tr>
	    <th style="width:15%;">&nbsp;</th>
		<td><font color="red">注意:如您不选择分类,则是默认为编辑一级分类</font></td>
	  </tr>
	  <tr>
	    <th colspan="2"><input type="submit" value="确定修改" class="cmd" /></th>
	  </tr>
	  </tbody>
	</table>
    </form>
	
</div>
</body>
</html>