diff -r 000000000000 -r f9ffdbd96607 punbb/admin_permissions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/punbb/admin_permissions.php Wed Jul 11 21:01:48 2007 -0400 @@ -0,0 +1,226 @@ + PUN_ADMIN) + message($lang_common['No permission']); + + +if (isset($_POST['form_sent'])) +{ + confirm_referrer('admin_permissions.php'); + + $form = array_map('intval', $_POST['form']); + + while (list($key, $input) = @each($form)) + { + // Only update values that have changed + if (array_key_exists('p_'.$key, $pun_config) && $pun_config['p_'.$key] != $input) + $db->query('UPDATE '.$db->prefix.'config SET conf_value='.$input.' WHERE conf_name=\'p_'.$db->escape($key).'\'') or error('Unable to update board config', __FILE__, __LINE__, $db->error()); + } + + // Regenerate the config cache + require_once PUN_ROOT.'include/cache.php'; + generate_config_cache(); + + redirect('admin_permissions.php', 'Permissions updated. Redirecting …'); +} + + +$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Permissions'; +require PUN_ROOT.'header.php'; +generate_admin_menu('permissions'); + +?> +