/** * Page hook. Adds member module content to a page before it is rendered. * * @param &$page_data Reference to data about the page being rendered. * @param $page_name The name of the page being rendered. * @param $options The array of options passed to theme('page'). */ function core_page(&$page_data, $page_name, $options) { switch ($page_name) { case '<front>': page_add_content_top($page_data, '<p>Welcome to SeltzerCRM!</p>'); break; case 'install': page_add_content_top($page_data, theme('form', module_install_form())); break; case 'login': page_add_content_top($page_data, theme('login_form')); break; case 'reset': page_add_content_top($page_data, theme('user_reset_password_form')); break; case 'reset-confirm': page_add_content_top($page_data, theme('user_reset_password_confirm_form', $_GET['v'])); break; case 'delete': page_add_content_top($page_data, theme('delete_form', $_GET['type'], $_GET['id'])); break; case 'reports': if (user_access('report_view')) { page_set_title($page_data, 'Reports'); } break; case 'permissions': if (user_access('user_permissions_edit')) { page_set_title($page_data, 'Permissions'); page_add_content_top($page_data, theme('form', user_permissions_form())); } break; case 'upgrade': if (user_access('module_upgrade')) { page_set_title($page_data, 'Upgrade Modules'); $content = theme('table', 'module_upgrade'); $content .= theme('form', module_upgrade_form()); page_add_content_top($page_data, $content); } } }
end_table(); page_tail(); } function user_permissions_action() { $bitset = ''; for ($i = 0; $i < S_NFLAGS; $i++) { if (post_int("role" . $i, TRUE) == 1) { $bitset .= '1'; echo "<br> setting {$i}"; } else { $bitset .= '0'; } } $userid = post_int("userid"); $query = "UPDATE forum_preferences SET special_user='******' WHERE userid={$userid}"; _mysql_query($query); Header("Location: user_permissions.php"); } $user = get_logged_in_user(); BoincForumPrefs::lookup($user); if (!is_moderator($user, null)) { error_page("no access"); } if (post_int("userid", true)) { user_permissions_action(); } else { user_permissions_form(); } $cvs_version_tracker[] = "\$Id\$"; //Generated automatically - do not edit