<?php
	!defined('MEMBER_CENTER') && exit('Access Denied!');
?>
<!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=gb2312" />
<title>会员中心 - Powered by DirCMS</title>
<base href="<?php echo $DIRCMS['site_url'];?>" />
<script src="images/js/jquery.min.js"></script>
<style type="text/css">
body,div,form{margin:0px; padding:0px; font-size:12px; line-height:2em}
input{padding:2px; font-size:12px}
a{color:#000000; text-decoration:none}
</style>
<title>产品类型</title>
</head>

<body>
<form action="member/index.php?" method="post" name="myform">
<input type="hidden" name="do_submit" value="1" />
<input type="hidden" name="parentid" value="0" id="parentid" />
<input type="hidden" name="mod" value="<?php echo $mod;?>">
<input type="hidden" name="file" value="<?php echo $file;?>"> 
<input type="hidden" name="action" value="<?php echo $action;?>">
<table width="100%" cellpadding="0" cellspacing="0">
<?php 
$r=$yp->producttype($ypid,0);
foreach($r as $_r)
{
?>
<tr>
<td><span style="float:right"> <a href="javascript:void(0);" onclick="$('#newtr').show();$('#parentid').val($('#parentid_<?php echo $_r['id'];?>').val());$('#msg').html('当前大类：'+$('#name_<?php echo $_r['id'];?>').val());">添加子分类</a> | <a href="member/index.php?mod=yp&file=yp&action=product_type_delete&id=<?php echo $_r['id'];?>">删除</a> </span><input type="hidden"  id="parentid_<?php echo $_r['id'];?>"value="<?php echo $_r['id'];?>" /><input id="name_<?php echo $_r['id'];?>" type="text" value="<?php echo $_r['name'];?>" style="border:#ccc 1px solid" name="name[<?php echo $_r['id'];?>]" /></td>
</tr>
<?php
	$r=$yp->producttype($ypid,$_r['id']);
	foreach($r as $_r)
	{
?>
	<tr>
	<td><span style="float:right"> <a href="member/index.php?mod=yp&file=yp&action=product_type_delete&id=<?php echo $_r['id'];?>">删除</a></span>|—<input type="text" style="border:#ccc 1px solid" value="<?php echo $_r['name'];?>" id="parentid_<?php echo $_r['id'];?>" name="name[<?php echo $_r['id'];?>]" /></td>
	</tr>
<?php
	}
}
?>
<tr>
<td> <a href="javascript:void(0);" onclick="$('#newtr').show();$('#msg').html('');">添加分类</a> <span id="msg"></span> <input id="newtr" style="border:#ccc 1px solid;display:none"  type="text" name="newname" /> 
<br /><input type="submit" value="更新产品分类" /></td>
</tr>
</table>
</form>
</body>
</html>
