public static function permissions_page() { page::title("Permissions"); $out = page::link("admin/permissions/scan", "scan for more permissions"); $out .= "<form method='post' action='" . page::url("admin/permissions/update") . "'>"; $array = array(); $header = array("permissions"); $groups = user_access::get_all_roles(); foreach ($groups as $g) { $header[] = $g->groupname; } $perms = permission::get_all_permissions(); foreach ($perms as $p) { $t_array = array(); $t_array[] = "<b>{$p->permission}</b> <i>{$p->description}</i>"; foreach ($groups as $g) { $o = "<input type='checkbox' name='permissions[" . $p->permission . "][" . $g->gid . "]' "; if (user::has_permission($p->permission, $g->gid)) { $o .= "checked"; } $o .= "/>"; $t_array[] = $o; } $array[] = $t_array; } $out .= theme::t_table($array, $header); $out .= "<input type='submit' value='update'/>"; $out .= "</form>"; return $out; }