<!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=<?php echo $cfg_soft_lang; ?>" />
<title>话题分类</title>
<link href="../member/templets/style/base.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="../member/templets/js/j.js"></script>
<script language="javascript" type="text/javascript" src="../member/templets/js/table_function.js"></script>
<script language="javascript" type="text/javascript">
function categories(_id){
	var f=document.createElement('form');
	f.action="";f.method="post";
	document.body.appendChild(f);
	if(true){
		var b=document.createElement('input');
		b.type='hidden';
		b.name='categories';
		b.value=document.getElementById('categories-'+_id).value;
		f.appendChild(b);
		var c=document.createElement('input');
		c.type='hidden';
		c.name='orders';
		c.value=document.getElementById('orders-'+_id).value;
		f.appendChild(c);
		var d=document.createElement('input');
		d.type='hidden';
		d.name='userit';
		d.value=document.getElementById('userit-'+_id).checked;
		f.appendChild(d);
		var e=document.createElement('input');
		e.type='hidden';
		e.name='action';
		e.value='edit';
		f.appendChild(e);
		var g=document.createElement('input');
		g.type='hidden';
		g.name='categoriesid';
		g.value=_id;
		f.appendChild(g);
	}
	f.submit();
}
</script>
</head>
<body>
<div id="main">
  <?php include(DEDEMEMBER."../templets/head.htm"); ?>
  <div id="content" class="w960 clearfix">
    <?php include(DEDEMEMBER."./templets/menu.php"); ?>
    <div id="mcpmain">
      <div id="appTab">
        <ul>
          <li class="thisTab"><a href="mygroup.php"><span>创建的圈子</span></a></li>
          <li><a href="myjoin.php"><span>我的发帖</span></a></li>
          <li><a href="index.php"><span>圈子频道</span></a></li>
          <li><a href="create.php" target="_blank"><span>创建圈子</span></a></li>
        </ul>
      </div>
      <ul class="tabSub">
        <li><a href="mygroup_manage.php?id=<?php echo $id;?>"><span>基本资料</span></a></li>
        <li class="thisTab"><a href="mygroup_cate.php?id=<?php echo $id;?>"><span>话题分类</span></a></li>
        <li><a href="mygroup_member.php?id=<?php echo $id;?>"><span>成员管理</span></a></li>
        <li><a href="mygroup_skin.php?id=<?php echo $id;?>"><span>自定义风格</span></a></li>
        <li><a href="mygroup_notice.php?id=<?php echo $id;?>"><span>修改公告</span></a></li>
      </ul>
      <div id="mainCp">
        <h3 class="meTitle"><strong>话题分类</strong></h3>   
         <form class="mTB10 fRight" name="addcategories" action="" method="post">
            <input name="action" type="hidden" value="add" />
            新的话题分类：
            <input name="categories" type="text" class="text"/>
            排序
            <input style="width:30px;" class="text" name="neworders" type="text" value="50" size="4" maxlength="4" />
            <button class="button2" type="submit">添加</button>
          </form>
          <div class="clear"></div>
           <table width="100%" border="0" cellpadding="0" cellspacing="0" class="list">
          <thead>
            <tr>
              <th width="10%">排序</th>
              <th>分类名称</th>
              <th width="10%">操作</th>
            </tr>
          </thead>
          <tbody>
          <?php
						$k = 0;
							if(!empty($smalltypes))
							{
								foreach($smalltypes as $k=>$rs)
								{
						?>
            <tr>
              <td class="tabTitle"><input style="width:30px;" class="text" name="orders" size="4" id="orders-<?php echo $rs['id'];?>"  type="text" value="<?php echo $rs['disorder'];?>" size="4" maxlength="4" /></td>
              <td align="center"><input name="userit" type="hidden" id="userit-<?php echo $rs['id'];?>" <?php if(in_array($rs['id'],$smalltype)) echo "checked='checked'";?> />
                    <input class="text" name="categories" size="30" type="text" id="categories-<?php echo $rs['id'];?>" value="<?php echo $rs['name'];?>" /></td>
              <td align="center"><a href="javascript:categories(<?php echo $rs['id'];?>);">修改</a> <a href="mygroup_cate.php?id=<?php echo $id;?>&action=del&categoriesid=<?php echo $rs['id'];?>" onclick="return(confirm('删除后无法恢复,您确定删除吗?'))">删除</a></td>
            </tr>
        <?php
								}
							}
						?>
          </tbody>
      </table>
        </div>
        <!--主操作区域 -->
      </div>
 <div class="clear"></div>
    </div>
  </div>
<?php include(DEDEMEMBER."./templets/foot.htm"); ?>
</div>
</body>
</html>
