<?php // vim: ts=4 sw=4 sts=4 fdm=marker ai noet:
// $Id: admin.skin.php,v 1.5 2003/11/24 13:36:04 ishii Exp $	

if(!defined('XOOPS_ROOT_PATH')){ exit; }
?>
<!-- {{{ basic settings. -->
<form method='post' action='index.php'>
	<table width='100%' class='outer' cellspacing='1'>
		<th colspan='2'><?php echo _AM_WIKI_TITLE1; ?></th>
		<tr><td class='head'>
			<?php echo _AM_WIKI_DEFAULTPAGE; ?>
		</td><td class='even'>
			<input type='text' size='<?php echo _WIKI_AM_TEXT_SIZE; ?>' name='wiki_defaultpage' value='<?php echo $defaultpage; ?>'>
		</td></tr>
		<tr><td class='head'>
			<?php echo _AM_WIKI_MODIFIER; ?>
		</td><td class='even'>
			<input type='text' size='<?php echo _WIKI_AM_TEXT_SIZE; ?>' name='wiki_modifier' value='<?php echo $modifier; ?>'>
		</td></tr>
		<tr><td class='head'>
			<?php echo _AM_WIKI_MODIFIERLINK; ?>
		</td><td class='even'>
			<input type='text' size='<?php echo _WIKI_AM_TEXT_SIZE; ?>' name='wiki_modifierlink' value='<?php echo $modifierlink; ?>'>
		</td></tr>

		<tr><td class='head'>
			<?php echo _AM_WIKI_ADMINPASS; ?>
		</td><td class='even'>
			<input type='text' size='<?php echo _WIKI_AM_TEXT_SIZE; ?>' name='wiki_adminpass' value=''>
		</td></tr>
		<tr><td valign='top' class='head'>
			<?php echo _AM_WIKI_CSS; ?>
		</td><td class='even'>
			<textarea name='wiki_css' cols='30' rows='10'><?php echo $wiki_css; ?></textarea>
		</td></tr>

		<tr><td class='head'>
			<?php echo _AM_WIKI_FUNCTION_FREEZE; ?>
		</td><td class='even'>
			<input type='radio' name='wiki_function_freeze' value='1'<?php echo $_function_freeze_enable; ?>><?php echo _AM_WIKI_ENABLE; ?>
			<input type='radio' name='wiki_function_freeze' value='0'<?php echo $_function_freeze_disable; ?>><?php echo _AM_WIKI_DISABLE; ?>
		</td></tr>

		<tr><td class='head'>
			<?php echo _AM_WIKI_ENABLE_TRACKBACK; ?>
		</td><td class='even'>
			<input type='radio' name='wiki_trackback' value='1'<?php echo $_trackback_enable; ?>><?php echo _AM_WIKI_ENABLE; ?>
			<input type='radio' name='wiki_trackback' value='0'<?php echo $_trackback_disable; ?>><?php echo _AM_WIKI_DISABLE; ?>
		</td></tr>

		<tr><td class='head'>
			<?php echo _AM_WIKI_ENABLE_REFERER; ?>
		</td><td class='even'>
			<input type='radio' name='wiki_referer' value='1'<?php echo $_referer_enable; ?>><?php echo _AM_WIKI_ENABLE; ?>
			<input type='radio' name='wiki_referer' value='0'<?php echo $_referer_disable; ?>><?php echo _AM_WIKI_DISABLE; ?>
		</td></tr>

		<tr><td class='head'>
			<?php echo _AM_WIKI_ENABLE_WIKINAME; ?>
		</td><td class='even'>
			<input type='radio' name='wiki_nowikiname' value='0'<?php echo $_nowikiname_disable; ?>><?php echo _AM_WIKI_ENABLE; ?>
			<input type='radio' name='wiki_nowikiname' value='1'<?php echo $_nowikiname_enable; ?>><?php echo _AM_WIKI_DISABLE; ?>
		</td></tr>

		<tr><td class='head'>
			<?php echo _AM_WIKI_ENABLE_UPDATE_NOTIFY; ?>
		</td><td class='even'>
			<input type='radio' name='wiki_notify' value='1'<?php echo $_notify_enable; ?>><?php echo _AM_WIKI_ENABLE_NOTIFY; ?>
			<input type='radio' name='wiki_notify' value='0'<?php echo $_notify_disable; ?>><?php echo _AM_WIKI_DONT_NOTIFY; ?>
		</td></tr>

		<tr><td class='head'>
			<?php echo _AM_WIKI_NOTIFY_TO; ?>
		</td><td class='even'>
			<input type='text' size='<?php echo _WIKI_AM_TEXT_SIZE; ?>' name='wiki_notify_to' value='<?php echo $_notify_to; ?>'>
		</td></tr>

		<tr><td class='head'>
			<?php echo _AM_WIKI_NOTIFY_FROM; ?>
		</td><td class='even'>
			<input type='text' size='<?php echo _WIKI_AM_TEXT_SIZE; ?>' name='wiki_notify_from' value='<?php echo $_notify_from; ?>'>
		</td></tr>

		<tr><td valign='top' class='head'>
			<?php echo _AM_WIKI_PERMITS_WHOLE_EDIT; ?>
		</td><td class='even'>
			<?php echo $editable_group_html; ?>
		</td></tr>

		<tr><td class='head' align='center' colspan='2'>
			<?php echo _AM_WIKI_INDIVIDUAL_RESTRICTION; ?>
		</td></tr>

		<tr><td class='head'>
			<?php echo _AM_WIKI_ENABLE_INDIVIDUAL_PERUSAL_RESTRICTIONS; ?>
		</td><td class='even'>
			<input type='radio' name='wiki_read_auth' value='1'<?php echo $_read_auth_enable; ?>><?php echo _AM_WIKI_ENABLE; ?>
			<input type='radio' name='wiki_read_auth' value='0'<?php echo $_read_auth_disable; ?>><?php echo _AM_WIKI_DISABLE; ?>
		</td></tr>

		<tr><td class='head'>
			<?php echo _AM_WIKI_ENABLE_INDIVIDUAL_EDIT_RESTRICTIONS; ?>
		</td><td class='even'>
			<input type='radio' name='wiki_edit_auth' value='1'<?php echo $_edit_auth_enable; ?>><?php echo _AM_WIKI_ENABLE; ?>
			<input type='radio' name='wiki_edit_auth' value='0'<?php echo $_edit_auth_disable; ?>><?php echo _AM_WIKI_DISABLE; ?>
		</td></tr>

		<tr><td class='head'>
			<?php echo _AM_WIKI_AUTH_METHOD_TYPE; ?>
		</td><td class='even'>
			<select name='wiki_auth_method_type'>
				<option value='pagename'<?php echo $_amt_page; ?>><?php echo _AM_WIKI_PAGENAME; ?></option>
				<option value='contents'<?php echo $_amt_contents; ?>><?php echo _AM_WIKI_CONTENTS; ?></option>
			</select>
		</td></tr>

		<tr><td class='head'><br /></td>
		<td class='even'>
			<input type='hidden' name='wiki_admin_mode' value='change_config'>
			<input type='submit' value='<?php echo _AM_WIKI_SUBMIT; ?>'>
		</td></tr>
	</table>
</form>
<p />
<!-- }}} -->
<!-- {{{ read auth -->
<?php if($read_auth) { ?>
<form method='post' action='index.php'>
	<table width='100%' class='outer' cellspacing='1'>
		<th colspan='2'>
			<?php echo _AM_WIKI_READ_AUTH_CAP; ?>
		</th>
		<tr>
			<td colspan='2' class='head'>
				<?php echo _AM_WIKI_READ_AUTH_DESC; ?>
			</td>
		</tr>
		<?php
		$i = 0; $row_style = 'odd';
		foreach($read_auth_pages as $page => $groups){
			$group = explode(",", $groups);
		?>
		<tr>
			<td class='<?php echo $row_style; ?>' valign='top'>
				<input type='text' name='ra[<?php echo $i; ?>][page]' value='<?php echo htmlspecialchars($page, ENT_QUOTES); ?>'>
			</td>
			<td class='<?php echo $row_style; ?>'>
				<select name='ra[<?php echo $i; ?>][group][]' size='3' multiple='multiple'>
					<?php
					foreach($gids as $dbgid){
						$ckd = '';
						foreach($group as $gid){
							if($dbgid['groupid'] == $gid){
								$ckd = ' selected';
							}
						}
					?>
					<option value='<?php echo $dbgid['groupid']; ?>'<?php echo $ckd; ?>><?php echo $dbgid['name']; ?></option>
					<?php
					} ?>
				</select>
			</td>
		</tr>
		<?php
		$i++; $row_style = ($row_style == 'odd') ? 'even' : 'odd';
		} ?>
		<tr>
			<td class='<?php echo $row_style; ?>' valign='top' width='40%'>
				<input type='text' name='ra[<?php echo $i; ?>][page]' value=''>
			</td>
			<td class='<?php echo $row_style; ?>'>
				<select name='ra[<?php echo $i; ?>][group][]' size='3' multiple='multiple'>
					<?php
					foreach($gids as $dbgid){
					?>
					<option value='<?php echo $dbgid['groupid']; ?>'><?php echo $dbgid['name']; ?></option>
					<?php
					} ?>
				</select>
			</td>
		</tr>

		<tr>
			<td class='foot' colspan='2' align='center'>
				<input type='hidden' name='wiki_admin_mode' value='read_auth'>
				<input type='submit' value='<?php echo _AM_WIKI_SUBMIT; ?>'>
			</td>
		</tr>
	</table>
</form>
<?php } ?>
<!-- }}} -->
<!-- {{{ edit auth -->
<?php if($edit_auth) { ?>
<form method='post' action='index.php'>
	<table width='100%' class='outer' cellspacing='1'>
		<th colspan='2'>
			<?php echo _AM_WIKI_EDIT_AUTH_CAP; ?>
		</th>
		<tr>
			<td colspan='2' class='head'>
				<?php echo _AM_WIKI_EDIT_AUTH_DESC; ?>
			</td>
		</tr>
		<?php
		$i = 0; $row_style = 'odd';
		foreach($edit_auth_pages as $page => $groups){
			$group = explode(",", $groups);
		?>
		<tr>
			<td class='<?php echo $row_style; ?>' valign='top'>
				<input type='text' name='ea[<?php echo $i; ?>][page]' value='<?php echo htmlspecialchars($page, ENT_QUOTES); ?>'>
			</td>
			<td class='<?php echo $row_style; ?>'>
				<select name='ea[<?php echo $i; ?>][group][]' size='3' multiple='multiple'>
					<?php
					foreach($gids as $dbgid){
						$ckd = '';
						foreach($group as $gid){
							if($dbgid['groupid'] == $gid){
								$ckd = ' selected';
							}
						}
					?>
					<option value='<?php echo $dbgid['groupid']; ?>'<?php echo $ckd; ?>><?php echo $dbgid['name']; ?></option>
					<?php
					} ?>
				</select>
			</td>
		</tr>
		<?php
		$i++; $row_style = ($row_style == 'odd') ? 'even' : 'odd';
		} ?>
		<tr>
			<td class='<?php echo $row_style; ?>' valign='top' width='40%'>
				<input type='text' name='ea[<?php echo $i; ?>][page]' value=''>
			</td>
			<td class='<?php echo $row_style; ?>'>
				<select name='ea[<?php echo $i; ?>][group][]' size='3' multiple='multiple'>
					<?php
					foreach($gids as $dbgid){
					?>
					<option value='<?php echo $dbgid['groupid']; ?>'><?php echo $dbgid['name']; ?></option>
					<?php
					} ?>
				</select>
			</td>
		</tr>

		<tr>
			<td class='foot' colspan='2' align='center'>
				<input type='hidden' name='wiki_admin_mode' value='edit_auth'>
				<input type='submit' value='<?php echo _AM_WIKI_SUBMIT; ?>'>
			</td>
		</tr>
	</table>
</form>
<?php } ?>
<!-- }}} -->
<!-- {{{ change permission -->
<p />
<form method='post' action='index.php'>
	<table width='100%' class='outer' cellspacing='1'>
		<th colspan='2'><?php echo _AM_WIKI_TITLE2; ?></th>
		<tr><td class='even' width='70%' valign='top'>
			<?php echo _AM_WIKI_PERMIT_CHANGE; ?>
		</td><td class='odd'>
			<input type='checkbox' name='attach'    value='1'>attach<br />
			<input type='checkbox' name='backup'    value='1'>backup<br />
			<input type='checkbox' name='cache'     value='1'>cache<br />
			<input type='checkbox' name='counter'   value='1'>counter<br />
			<input type='checkbox' name='diff'      value='1'>diff<br />
			<input type='checkbox' name='wiki'      value='1'>wiki<br />
			<input type='checkbox' name='wiki.en'   value='1'>wiki.en<br />
			<input type='checkbox' name='trackback' value='1'>trackback<br />
		</td></tr>

		<tr><td class='foot' colspan='2' align='center'>
			<input type='hidden' name='wiki_admin_mode' value='change_permit'>
			<input type='submit' value='<?php echo _AM_WIKI_SUBMIT; ?>'>
		</td></tr>
	</table>
</form>
<!-- }}} -->
