<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<title>组权限设置</title>
<link href='img/base.css' rel='stylesheet' type='text/css'>
</head>
<body background='img/allbg.gif' leftmargin='8' topmargin='8'>
<center>
<table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center">
<form name='form1' action='sys_group_edit.php' method='post'> 
<input type='hidden' name='dopost' value='save'>
  <tr>
    <td height="23" background="img/tbg.gif"><b><a href='sys_group.php'>系统用户组管理</a>&gt;&gt;更改用户组：</b></td>
</tr>
  <tr> 
    <td valign="top" bgcolor="#FFFFFF" align="center"> 
      <table width="98%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="9%" height="30">组名称：</td>
          <td width="91%"> <input name="typename" type="text" id="typename" value="<?php echo $groupSet['typename']?>"> 
          </td>
        </tr>
        <tr> 
          <td width="9%" height="30">级别值：</td>
          <td width="91%">
          	<input name="rank" type="hidden" id="rank" value="<?php echo $groupSet['rank']?>">
          	<?php echo $groupSet['rank']?>
          </td>
        </tr>
        <?php
        $start = 0;
        $k = 0;
        $gouplists = file(DEDEADMIN.'/inc/grouplist.txt');
        foreach($gouplists as $line)
        {
        	$line = trim($line);
        	if($line=="") continue;
        	if(ereg("^>>",$line))
        	{
        		if($start>0) echo "        	 </td></tr>\r\n";
        		$start++;
        		$lhead = "
        	 <tr> 
           <td height='25' colspan='2' bgcolor='#F9FAF3'>{$start}、".str_replace('>>','',$line)."</td></tr>
           <tr><td height='25' colspan='2'>
        		"; 
        		echo $lhead;
        	}
        	else if(ereg("^>",$line))
        	{
        		$ls = explode('>',$line);
        		$tag = $ls[1];
        		$tagname = str_replace('[br]','<br>',$ls[2]);
        		if(!ereg('<br />', $tagname) ) $tagname .= "<font color='#888888'>($tag)</font>";
        		else $tagname = str_replace('<br />', "<font color='#888888'>($tag)</font><br />", $tagname);
        		echo "          	<input name='purviews[]' type='checkbox' class='np' id='purviews$k' value='$tag'".CRank($tag).">$tagname\r\n";
        	  $k++;
        	}
        }
        $start++;
        ?>
        </td>
        </tr>
        <tr> 
           <td height='25' colspan='2' bgcolor='#F9FAF3'><?php echo $start?>、插件权限</td>
         </tr>
        <tr>
        <td height='25' colspan='2'>
         <?php
         $l = 0;
         $dsql->SetQuery('Select plusname From #@__plus');
         $dsql->Execute();
         while($row=$dsql->GetObject()){
         	 echo "          	<input name='purviews[]' type='checkbox' class='np' id='purviews$k' value='plus_{$row->plusname}'".CRank("plus_{$row->plusname}").">{$row->plusname}\r\n";
        	 $k++;
        	 $l++;
        	 if($l%6==0) echo "<br>";
         }
         ?>  	
        </td>
        </tr>
        <tr> 
          <td height="50" align="center">&nbsp;</td>
          <td height="50"><input  class="np" name="imageField" type="image" src="img/button_save.gif" width="60" height="22" border="0">
          </td>
        </tr>
      </table>
    </td>
</tr>
</form>
</table>
</center>
</body>
</html>