<?php
/**
 * @package iCMS
 * @copyright 2007-2010, iDreamSoft
 * @license http://www.idreamsoft.cn iDreamSoft
 * @author coolmoo <idreamsoft@qq.com>
 */
!defined('iPATH') && exit('What are you doing?'); 
iCMS_admincp_head();
?>
<script type="text/javascript">admincpnav('首页&nbsp;&raquo;&nbsp;管理员管理');</script>
<div class="container" id="cpcontainer">
<h3>分配栏目管理权限</h3>
  <form action="<?=__SELF__?>?do=account&operation=post" method="post">
    <input type="hidden" name="action" value="cpower" />
    <input type="hidden" name="uid" value="<?=$rs->uid?>" />
    <table class="tb tb2 ">
      <tr>
        <td colspan="2" class="td27">设置[<?=$rs->username?>]栏目管理权限</td>
      </tr>
      <tr>
        <td class="vtop rowform" colspan="2" style="width:auto;"><ul>
    <?php if($catalog->Carray)foreach($catalog->Carray AS $key=>$C){?>
		  <li style="width:100%;"><?=str_repeat("│　", $C['level'])."├"?><input name="cpower[]" type="checkbox" class="checkbox" value="<?=$C['id']?>" parent="<?=$C['rootid']?>"/> <?=$C['name']?></li>
	      <?php }?>
      </ul>
      </td>
      </tr>
     <tr class="nobg">
        <td colspan="2"><div class="fixsel"> <input type="submit" class="btn" name="forumlinksubmit" value="提交"  /> </div></td>
      </tr>
    </table>
  </form>
</div>
<script type="text/javascript">
$(function(){ 
	var powerText	= '<?=$rs->cpower?>';
	var powerArray	= powerText.split(',');
	for (i=0;i<powerArray.length;i++){
		$("input[name^=cpower][value="+powerArray[i]+"]").attr('checked',true);
	}
});
</script>
</body></html>