<h3><{$mod_name}></h3>

<!-- category selection -->
<form name="selectcategory" action="<{$mod_url}>/admin/index.php" method="get" style="margin: 20px 0px">
	<input type="hidden" name="page" value="category_access" />
	<label for="select_topic_id"><{$smarty.const._MD_A_BULLETIN_LABEL_SELECTCATEGORY}></label>:
	<select name="topic_id" id="select_topic_id">
		<{html_options options=$topic_options selected=$topic_id}>
	</select>
	<input type="submit" value="<{$smarty.const._SUBMIT}>" />
</form>

<!-- category title -->
<p>
	<{$smarty.const._MD_BULLETIN_CATEGORY}>:<{$topic_title}>
	[<a href="<{$mod_url}>/index.php?page=categorymanager&amp;topic_id=<{$topic_id}>"><{$smarty.const._EDIT}></a>]
<{*
	[<a href="<{$mod_url}>/index.php?page=makecategory&amp;topic_id=<{$topic_id}>"><{$smarty.const._MD_BULLETIN_LINK_MAKESUBCATEGORY}></a>]
*}>
</p>

<!-- group form -->
<h2 class="head"><{$smarty.const._MD_A_BULLETIN_H2_GROUPPERMS}></h2>
<form name="groupperms" action="<{$mod_url}>/admin/index.php?page=category_access&amp;topic_id=<{$topic_id}>" method="post" style="margin:20px 0px">
	<{$gticket_hidden}>
	<table class="outer">
		<tr>
			<th>
				<{$smarty.const._MD_A_BULLETIN_TH_GROUPNAME}>
			</th>
			<th>
				<{$smarty.const._MD_A_BULLETIN_TH_CAN_READ}>
				<input type="checkbox" onclick="with(document.groupperms){for(i=0;i<length;i++){if(elements[i].type=='checkbox'&&elements[i].id.indexOf('gcol_1_')>=0){elements[i].checked=this.checked;}}}">
			</th>
			<th>
				<{$smarty.const._MD_A_BULLETIN_TH_CAN_POST}>
				<input type="checkbox" onclick="with(document.groupperms){for(i=0;i<length;i++){if(elements[i].type=='checkbox'&&elements[i].id.indexOf('gcol_2_')>=0){elements[i].checked=this.checked;}}}">
			</th>
			<th>
				<{$smarty.const._MD_A_BULLETIN_TH_CAN_EDIT}>
				<input type="checkbox" onclick="with(document.groupperms){for(i=0;i<length;i++){if(elements[i].type=='checkbox'&&elements[i].id.indexOf('gcol_3_')>=0){elements[i].checked=this.checked;}}}">
			</th>
			<th>
				<{$smarty.const._MD_A_BULLETIN_TH_CAN_DELETE}>
				<input type="checkbox" onclick="with(document.groupperms){for(i=0;i<length;i++){if(elements[i].type=='checkbox'&&elements[i].id.indexOf('gcol_4_')>=0){elements[i].checked=this.checked;}}}">
			</th>
			<th>
				<{$smarty.const._MD_A_BULLETIN_TH_POST_AUTO_APPROVED}>
				<input type="checkbox" onclick="with(document.groupperms){for(i=0;i<length;i++){if(elements[i].type=='checkbox'&&elements[i].id.indexOf('gcol_5_')>=0){elements[i].checked=this.checked;}}}">
			</th>
		</tr>
		<{$group_trs}>
	</table>
	<input type="submit" name="group_update" value="<{$smarty.const._SUBMIT}>" />
</form>


<!-- user form -->
<h2 class="head"><{$smarty.const._MD_A_BULLETIN_H2_USERPERMS}></h2>
<form name="userperms" action="<{$mod_url}>/admin/index.php?page=category_access&amp;topic_id=<{$topic_id}>" method="post" style="margin:20px 0px">
	<{$gticket_hidden}>
	<table class="outer">
		<tr>
			<th><{$smarty.const._MD_A_BULLETIN_TH_UID}></th>
			<th><{$smarty.const._MD_A_BULLETIN_TH_UNAME}></th>
			<th><{$smarty.const._MD_A_BULLETIN_TH_CAN_READ}></th>
			<th>
				<{$smarty.const._MD_A_BULLETIN_TH_CAN_POST}>
				<input type="checkbox" onclick="with(document.userperms){for(i=0;i<length;i++){if(elements[i].type=='checkbox'&&(elements[i].id.indexOf('ucol_2_')>=0||elements[i].id.indexOf('ncol_2_')>=0)){elements[i].checked=this.checked;}}}">
			</th>
			<th>
				<{$smarty.const._MD_A_BULLETIN_TH_CAN_EDIT}>
				<input type="checkbox" onclick="with(document.userperms){for(i=0;i<length;i++){if(elements[i].type=='checkbox'&&(elements[i].id.indexOf('ucol_3_')>=0||elements[i].id.indexOf('ncol_3_')>=0)){elements[i].checked=this.checked;}}}">
			</th>
			<th>
				<{$smarty.const._MD_A_BULLETIN_TH_CAN_DELETE}>
				<input type="checkbox" onclick="with(document.userperms){for(i=0;i<length;i++){if(elements[i].type=='checkbox'&&(elements[i].id.indexOf('ucol_4_')>=0||elements[i].id.indexOf('ncol_4_')>=0)){elements[i].checked=this.checked;}}}">
			</th>
			<th>
				<{$smarty.const._MD_A_BULLETIN_TH_POST_AUTO_APPROVED}>
				<input type="checkbox" onclick="with(document.userperms){for(i=0;i<length;i++){if(elements[i].type=='checkbox'&&(elements[i].id.indexOf('ucol_5_')>=0||elements[i].id.indexOf('ncol_5_')>=0)){elements[i].checked=this.checked;}}}">
			</th>
		</tr>
		<{$user_trs}>
		<{$newuser_trs}>
	</table>
	<input type="submit" name="user_update" value="<{$smarty.const._SUBMIT}>" />
	<br />
	<{$smarty.const._MD_A_BULLETIN_NOTICE_ADDUSERS}>
</form>
