<!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>管理中心--话题分类</title>
<link href="company_style.css" rel="stylesheet" type="text/css" />
<script 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="container">
<!-- 头部开始 -->
<?php  include(dirname(__FILE__)."/head.htm"); ?>	
<!-- 中部开始 -->
<center>
    <div id="manage_company_main">
		<!-- 中部左边开始 -->
      <?php  include(dirname(__FILE__)."/menu.php"); ?>
		<!-- 中部右边开始 -->
        <div id="myask_right">
        	<div id="myask_info">
            	<div class="menu_nav">
                <li><a href="mygroup_manage.php?id=<?php echo $id;?>">基本资料</a></li>
                <li class="current">话题分类</li>
                <li><a href="mygroup_member.php?gid=<?php echo $id;?>">成员管员</a></li>
                <li><a href="mygroup_notice.php?gid=<?php echo $id;?>">修改公告</a></li>
                </div>
                <div class="myask_form">
                    <?php if(!empty($msg)) { ?><div style="padding:6px;background:#FFCC00;color:#000;"><?php echo $msg;?></div><?php }?>
					<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#F2F2F2">
                      <tr>
                        <td width="8%" height="28" align="center" bgcolor="#EBEBEB">选择</td>
                        <td width="40%" bgcolor="#EBEBEB">话题分类</td>
                        <td width="13%" height="28" bgcolor="#EBEBEB">排序</td>
                        <td width="39%" height="28" bgcolor="#EBEBEB">操作</td>
                      </tr>                      
                      <?php if(!empty($smalltypes)){
                      foreach($smalltypes as $k=>$rs){
                      ?>
                      <tr>
                        <td height="28" align="center" bgcolor="#FFFFFF"><input name="userit" type="checkbox" id="userit-<?php echo $rs['id'];?>" <?php if(in_array($rs['id'],$smalltype)) echo "checked='checked'";?>  /></td>
                        <td height="28" bgcolor="#FFFFFF"><input name="categories" type="text" id="categories-<?php echo $rs['id'];?>" value="<?php echo $rs['smalltypes'];?>" />
                        </td>
                        <td height="28" bgcolor="#FFFFFF"><input name="orders" id="orders-<?php echo $rs['id'];?>"  type="text" value="<?php echo $rs['disorder'];?>" size="4" maxlength="4" /></td>
                        <td height="28" bgcolor="#FFFFFF"><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 }
                      }
                      ?>
                      <form name="addcategories" action="" method="post">
                      <input name="action" type="hidden" value="add" />
                      <tr>
                        <td height="28" colspan="4" align="center" bgcolor="#FFFFFF">新的话题分类：<input name="categories" type="text" /> 排序：<input name="neworders" type="text" value="0" size="4" maxlength="4" /> <input type="submit" value="添加" /></td>
                      </tr>
                      </form>
                    </table>
                    <div class="clear"></div>
                    </div>
            	</div>
                <div class="clear"></div>
            </div>
		</div>
        <div class="clear">
		</div>

<div class="clear">
</div>
</center>
</div>
</body> 
</html>