全不选则默认为开放版块
<br/>
<?php
$allowvisit = !empty($forum->allowvisit) ? explode(',', trim($forum->allowvisit,',')) : array();
$allowread = !empty($forum->allowread) ? explode(',', trim($forum->allowread,',')) : array();
$allowpost = !empty($forum->allowpost) ? explode(',', trim($forum->allowpost,',')) : array();
$allowrp = !empty($forum->allowrp) ? explode(',', trim($forum->allowrp,',')) : array();
$allowdownload = !empty($forum->allowdownload) ? explode(',', trim($forum->allowdownload,',')) : array();
$allowupload = !empty($forum->allowupload) ? explode(',', trim($forum->allowupload,',')) : array();
?>

<table class="tab">
	<tr>
		<th>允许浏览版块</th>
		<td>
			<?php $i = 0;?>
			<table>
			<tr>
			<?php foreach ($groups as $group):?>
				<?php $i++;?>
				    <td><?php echo CHtml::checkBox('forum[allowvisit][]', (in_array($group->groupid, $allowvisit) ? true : false), array('value' => $group->groupid));?><?php echo $group->grouptitle;?></td>
				    <?php if ($i % 4 == 0):?></tr><?php endif;?>
			<?php endforeach;?>
			</table>
		</td>
	</tr>
	<tr>
		<th>允许浏览帖子</th>
		<td>
			<?php $i = 0;?>
			<table>
			<tr>
			<?php foreach ($groups as $group):?>
				<?php $i++;?>
				    <td><?php echo CHtml::checkBox('forum[allowread][]', (in_array($group->groupid, $allowread) ? true : false), array('value' => $group->groupid));?><?php echo $group->grouptitle;?></td>
				    <?php if ($i % 4 == 0):?></tr><?php endif;?>
			<?php endforeach;?>
			</table>
		</td>
	</tr>
	<tr>
		<th>发表主题</th>
		<td>
			<?php $i = 0;?>
			<table>
			<tr>
			<?php foreach ($groups as $group):?>
				<?php $i++;?>
				    <td><?php echo CHtml::checkBox('forum[allowpost][]', (in_array($group->groupid, $allowpost) ? true : false), array('value' => $group->groupid));?><?php echo $group->grouptitle;?></td>
				    <?php if ($i % 4 == 0):?></tr><?php endif;?>
			<?php endforeach;?>
			</table>
		</td>
	</tr>
	<tr>
		<th>发表回复</th>
		<td>
			<?php $i = 0;?>
			<table>
			<tr>
			<?php foreach ($groups as $group):?>
				<?php $i++;?>
				    <td><?php echo CHtml::checkBox('forum[allowrp][]', (in_array($group->groupid, $allowrp) ? true : false), array('value' => $group->groupid));?><?php echo $group->grouptitle;?></td>
				    <?php if ($i % 4 == 0):?></tr><?php endif;?>
			<?php endforeach;?>
			</table>
		</td>
	</tr>
	<tr>
		<th>允许上传附件</th>
		<td>
			<?php $i = 0;?>
			<table>
			<tr>
			<?php foreach ($groups as $group):?>
				<?php $i++;?>
				    <td><?php echo CHtml::checkBox('forum[allowupload][]', (in_array($group->groupid, $allowupload) ? true : false), array('value' => $group->groupid));?><?php echo $group->grouptitle;?></td>
				    <?php if ($i % 4 == 0):?></tr><?php endif;?>
			<?php endforeach;?>
			</table>
		</td>
	</tr>
	<tr>
		<th>允许下载附件</th>
		<td>
			<?php $i = 0;?>
			<table>
			<tr>
			<?php foreach ($groups as $group):?>
				<?php $i++;?>
				    <td><?php echo CHtml::checkBox('forum[allowdownload][]', (in_array($group->groupid, $allowdownload) ? true : false), array('value' => $group->groupid));?><?php echo $group->grouptitle;?></td>
				    <?php if ($i % 4 == 0):?></tr><?php endif;?>
			<?php endforeach;?>
			</table>
		</td>
	</tr>
</table>