<table width="100%" cellpadding="0" cellspacing="0" border="0">
	<tr><td class="nav"><a href="index.php?section=home">Home</a>&nbsp;&gt;&nbsp;<a href="index.php?section=moderators">Moderators</a>&nbsp;&gt;&nbsp;Add Moderator</td></tr>
	<tr><td>&nbsp;</td></tr>
	<tr><td><table cellpadding="2" cellspacing="2" border="0" width="400" align="center">
	<form action="index.php" method="post">
	<input type="hidden" name="section" value="moderators">
	<input type="hidden" name="action" value="save">
	<input type="hidden" name="mem_id" value="<?php echo $data["mem_id"]; ?>">
		<tr><td align="center" class="lined blue_bcg white_body padded">Setup Moderator Access</td></tr>
		<tr><td class="form_cell" align="center"><a href="<?php echo $data["moderator"]["link"]; ?>" target="_blank"><?php echo $data["moderator"][name]; ?></a></td></tr>
		<tr><td class="form_cell"><table cellpadding="0" cellspacing="3" border="0" align="center">
		<?php
		
			while(list($key,$val) = each($data["access"][sections])){
				?><tr><td><?php
				admin_form_element( array ("type" => "checkbox", "name" => "sections[".$key."]", "ovalue" => "1", "javascript" => "onClick=\"HS_TickAllAdvanced('subsections[".$key."]',this.form,this.form.elements['sections[".$key."]'])\"") );
				?></td><td colspan="2" class="highlight"><?php echo $val; ?></td></tr><?php
				while(list($k,$v) = each($data["access"][subsections][$key])){
					?><tr><td>&nbsp;</td><td><?php
					admin_form_element( array ("type" => "checkbox", "name" => "subsections[".$key."][".$k."]", "ovalue" => "1", "value" => $data["values"][$key][$k]) );
					?></td><td class="highlight"><?php echo $v; ?></td></tr><?php
				}//while
			}//while
		
		?>
		<tr><td colspan="3" align="center"><?php
		admin_form_element( array ("type" => "button", "value" => "Back", "link" => $data["link"]) );
		echo "&nbsp;";
		admin_form_element( array ("type" => "button", "value" => "Save") );
		?></td></tr>
		</table></td></tr>
	</form>
	</table></td></tr>
</table>