2005-03-03 17:48:16 +00:00
|
|
|
<?php
|
2008-08-05 22:43:14 +00:00
|
|
|
// This file is part of BOINC.
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2008 University of California
|
|
|
|
//
|
|
|
|
// BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
// under the terms of the GNU Lesser General Public License
|
|
|
|
// as published by the Free Software Foundation,
|
|
|
|
// either version 3 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// BOINC is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public License
|
|
|
|
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
2005-03-03 17:48:16 +00:00
|
|
|
|
|
|
|
require_once('../inc/forum.inc');
|
|
|
|
require_once('../inc/util_ops.inc');
|
|
|
|
|
|
|
|
db_init();
|
|
|
|
|
2014-03-28 21:52:37 +00:00
|
|
|
admin_page_head('Manage user privileges');
|
2005-03-03 17:48:16 +00:00
|
|
|
|
|
|
|
start_table("align=\"center\"");
|
|
|
|
row1("Current special users", '9');
|
|
|
|
|
|
|
|
echo "<tr><td>User</td>";
|
2015-04-04 21:35:18 +00:00
|
|
|
for ($i=0; $i<S_NFLAGS; $i++) {
|
2005-03-03 17:48:16 +00:00
|
|
|
echo "<td width=\"15\">" . $special_user_bitfield[$i] . "</td>\n";
|
|
|
|
}
|
|
|
|
echo "</tr>";
|
|
|
|
|
2014-09-04 19:00:09 +00:00
|
|
|
$result = _mysql_query(
|
2023-05-05 18:05:20 +00:00
|
|
|
"SELECT prefs.userid, prefs.special_user, user.id, user.name
|
|
|
|
FROM forum_preferences as prefs, user
|
2010-04-07 22:21:44 +00:00
|
|
|
WHERE CONVERT(special_user, DECIMAL) > 0 and prefs.userid=user.id"
|
|
|
|
);
|
2014-09-04 19:00:09 +00:00
|
|
|
for ($i=1; $i<=_mysql_num_rows($result); $i++){
|
|
|
|
$foo = _mysql_fetch_object($result);
|
2006-02-09 20:37:13 +00:00
|
|
|
echo "<form action=\"manage_special_users_action.php\" method=\"POST\">\n";
|
2005-03-03 17:48:16 +00:00
|
|
|
echo "<input type=\"hidden\" name=\"userid\" value=\"$foo->userid\"
|
2010-04-07 22:21:44 +00:00
|
|
|
<tr><td>$foo->name ($foo->id)</td>
|
|
|
|
";
|
2015-04-04 21:35:18 +00:00
|
|
|
for ($j=0; $j<S_NFLAGS; $j++) {
|
2005-03-03 17:48:16 +00:00
|
|
|
$bit = substr($foo->special_user, $j, 1);
|
2008-10-05 12:45:33 +00:00
|
|
|
echo "<td><input type=\"checkbox\" name=\"role".$j."\" value=\"1\"";
|
2005-03-03 17:48:16 +00:00
|
|
|
if ($bit == 1) {
|
|
|
|
echo " checked=\"checked\"";
|
|
|
|
}
|
|
|
|
echo "></td>\n";
|
|
|
|
}
|
2014-10-02 19:15:54 +00:00
|
|
|
echo "<td><input class=\"btn btn-default\" type=\"submit\" value=\"Update\"></form></td>";
|
2005-03-03 17:48:16 +00:00
|
|
|
echo "</tr>\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "<tr><form action=\"manage_special_users_action.php\" method=\"POST\">\n";
|
|
|
|
echo "<td>Add UserID:<input type=\"text\" name=\"userid\" size=\"6\"></td>";
|
|
|
|
|
2015-04-04 21:35:18 +00:00
|
|
|
for ($j=0; $j<S_NFLAGS; $j++) {
|
2010-04-07 22:21:44 +00:00
|
|
|
echo "<td><input type=\"checkbox\" name=\"role".$j."\" value=\"1\"";
|
|
|
|
echo "></td>\n";
|
|
|
|
}
|
2014-10-02 19:15:54 +00:00
|
|
|
echo "<td><input class=\"btn btn-default\" type=\"submit\" value=\"Update\"></form></td>";
|
2010-04-07 22:21:44 +00:00
|
|
|
echo "</tr>\n";
|
2005-03-03 17:48:16 +00:00
|
|
|
|
|
|
|
end_table();
|
|
|
|
|
|
|
|
admin_page_tail();
|
|
|
|
|
2008-08-05 22:43:14 +00:00
|
|
|
$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit
|
2005-03-03 17:48:16 +00:00
|
|
|
?>
|