.
require_once('../inc/forum.inc');
db_init();
function user_permissions_form() {
global $special_user_bitfield;
page_head('Manage user privileges');
start_table();
row1("Current special users", 99);
echo "
User | ";
for ($i=0; $i" . $special_user_bitfield[$i] . "\n";
}
echo " |
";
$result = _mysql_query(
"SELECT prefs.userid, prefs.special_user, user.id, user.name
FROM forum_preferences as prefs, user
WHERE CONVERT(special_user, DECIMAL) > 0 and prefs.userid=user.id"
);
$i = 0;
while ($foo = _mysql_fetch_object($result)) {
echo "
$foo->name ($foo->id) |
\n";
$i = 1 - $i;
}
echo "
";
end_table();
page_tail();
}
function user_permissions_action() {
$bitset = '';
for ($i=0; $i setting $i";
} else {
$bitset .= '0';
}
}
$userid = post_int("userid");
$query = "UPDATE forum_preferences SET special_user='$bitset' 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
?>