2011-03-28 14:21:28 +00:00
|
|
|
<?
|
2013-10-01 08:00:53 +00:00
|
|
|
function display_perm($Key, $Title) {
|
2011-03-28 14:21:28 +00:00
|
|
|
global $Values;
|
2013-10-01 08:00:53 +00:00
|
|
|
$Perm = "<input type=\"checkbox\" name=\"perm_$Key\" id=\"$Key\" value=\"1\"";
|
|
|
|
if (!empty($Values[$Key])) {
|
|
|
|
$Perm .= ' checked="checked"';
|
|
|
|
}
|
|
|
|
$Perm .= " /> <label for=\"$Key\">$Title</label><br />";
|
|
|
|
echo "$Perm\n";
|
2011-03-28 14:21:28 +00:00
|
|
|
}
|
|
|
|
|
2013-10-13 08:01:01 +00:00
|
|
|
View::show_header('Manage Permissions', 'validate');
|
2011-03-28 14:21:28 +00:00
|
|
|
|
2012-09-15 08:00:25 +00:00
|
|
|
echo $Val->GenerateJS('permissionsform');
|
2011-03-28 14:21:28 +00:00
|
|
|
?>
|
2012-09-15 08:00:25 +00:00
|
|
|
<form class="manage_form" name="permissions" id="permissionsform" method="post" action="" onsubmit="return formVal();">
|
2011-03-28 14:21:28 +00:00
|
|
|
<input type="hidden" name="action" value="permissions" />
|
|
|
|
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
|
|
|
<input type="hidden" name="id" value="<?=display_str($_REQUEST['id']); ?>" />
|
|
|
|
<div class="linkbox">
|
2013-02-09 08:01:01 +00:00
|
|
|
<a href="tools.php?action=permissions" class="brackets">Back to permission list</a>
|
|
|
|
<a href="tools.php" class="brackets">Back to tools</a>
|
2011-03-28 14:21:28 +00:00
|
|
|
</div>
|
2012-09-01 08:00:24 +00:00
|
|
|
<table class="permission_head layout">
|
2011-03-28 14:21:28 +00:00
|
|
|
<tr>
|
2013-02-09 08:01:01 +00:00
|
|
|
<td class="label">Permission name</td>
|
2013-10-13 08:01:01 +00:00
|
|
|
<td><input type="text" name="name" id="name" value="<?=!empty($Name) ? display_str($Name) : ''?>" /></td>
|
2011-03-28 14:21:28 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2013-02-09 08:01:01 +00:00
|
|
|
<td class="label">Class level</td>
|
2013-10-13 08:01:01 +00:00
|
|
|
<td><input type="text" name="level" id="level" value="<?=!empty($Level) ? display_str($Level) : ''?>" /></td>
|
2011-03-28 14:21:28 +00:00
|
|
|
</tr>
|
2012-03-28 08:00:20 +00:00
|
|
|
<tr>
|
2013-02-09 08:01:01 +00:00
|
|
|
<td class="label">Secondary class</td>
|
2013-10-13 08:01:01 +00:00
|
|
|
<td><input type="checkbox" name="secondary" value="1"<?=!empty($Secondary) ? ' checked="checked"' : ''?> /></td>
|
2012-03-28 08:00:20 +00:00
|
|
|
</tr>
|
2011-03-28 14:21:28 +00:00
|
|
|
<tr>
|
2013-02-09 08:01:01 +00:00
|
|
|
<td class="label">Show on staff page</td>
|
2013-10-13 08:01:01 +00:00
|
|
|
<td><input type="checkbox" name="displaystaff" value="1"<?=!empty($DisplayStaff) ? ' checked="checked"' : ''?> /></td>
|
2011-03-28 14:21:28 +00:00
|
|
|
</tr>
|
2011-10-17 08:00:16 +00:00
|
|
|
<tr>
|
|
|
|
<td class="label">Maximum number of personal collages</td>
|
|
|
|
<td><input type="text" name="maxcollages" size="5" value="<?=$Values['MaxCollages']?>" /></td>
|
|
|
|
</tr>
|
2012-03-28 08:00:20 +00:00
|
|
|
<tr>
|
2013-02-09 08:01:01 +00:00
|
|
|
<td class="label">Additional forums</td>
|
2012-03-28 08:00:20 +00:00
|
|
|
<td><input type="text" size="30" name="forums" value="<?=display_str($Forums)?>" /></td>
|
|
|
|
</tr>
|
2011-03-28 14:21:28 +00:00
|
|
|
<? if (is_numeric($_REQUEST['id'])) { ?>
|
|
|
|
<tr>
|
|
|
|
<td class="label">Current users in this class</td>
|
|
|
|
<td><?=number_format($UserCount)?></td>
|
|
|
|
</tr>
|
|
|
|
<? } ?>
|
|
|
|
</table>
|
|
|
|
<?
|
|
|
|
include(SERVER_ROOT."/classes/permissions_form.php");
|
|
|
|
permissions_form();
|
|
|
|
?>
|
|
|
|
</form>
|
2013-02-09 08:01:01 +00:00
|
|
|
<? View::show_footer(); ?>
|