mirror of https://github.com/BOINC/boinc.git
- admin web: "User privileges" didn't work if the project
had set forum_preferences.special_user to "0000000", as had been done in SETI@home for some reason. Also, show user ID as well as name; name is not unique. svn path=/trunk/boinc/; revision=21143
This commit is contained in:
parent
7a4edbafab
commit
2e85107ff6
|
@ -2618,3 +2618,13 @@ David 7 Apr 2010
|
|||
log_flags.cpp,h
|
||||
main.cpp
|
||||
sim.h
|
||||
|
||||
David 7 Apr 2010
|
||||
- admin web: "User privileges" didn't work if the project
|
||||
had set forum_preferences.special_user to "0000000",
|
||||
as had been done in SETI@home for some reason.
|
||||
Also, show user ID as well as name; name is not unique.
|
||||
|
||||
html/ops/
|
||||
manage_special_users.php
|
||||
profile_screen_form.php
|
||||
|
|
|
@ -27,20 +27,23 @@ start_table("align=\"center\"");
|
|||
row1("Current special users", '9');
|
||||
|
||||
echo "<tr><td>User</td>";
|
||||
for($i=0;$i<=6;$i++) {
|
||||
for ($i=0;$i<=6;$i++) {
|
||||
echo "<td width=\"15\">" . $special_user_bitfield[$i] . "</td>\n";
|
||||
}
|
||||
echo "</tr>";
|
||||
|
||||
$result = mysql_query("SELECT prefs.userid, prefs.special_user, user.name
|
||||
FROM forum_preferences as prefs, user
|
||||
WHERE special_user > '0' and prefs.userid=user.id");
|
||||
for($i=1;$i<=mysql_num_rows($result);$i++){
|
||||
$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"
|
||||
);
|
||||
for ($i=1; $i<=mysql_num_rows($result); $i++){
|
||||
$foo = mysql_fetch_object($result);
|
||||
echo "<form action=\"manage_special_users_action.php\" method=\"POST\">\n";
|
||||
echo "<input type=\"hidden\" name=\"userid\" value=\"$foo->userid\"
|
||||
<tr><td>$foo->name</td>";
|
||||
for ($j=0;$j<=6;$j++) {
|
||||
<tr><td>$foo->name ($foo->id)</td>
|
||||
";
|
||||
for ($j=0; $j<=6; $j++) {
|
||||
$bit = substr($foo->special_user, $j, 1);
|
||||
echo "<td><input type=\"checkbox\" name=\"role".$j."\" value=\"1\"";
|
||||
if ($bit == 1) {
|
||||
|
@ -56,12 +59,11 @@ echo "<tr><form action=\"manage_special_users_action.php\" method=\"POST\">\n";
|
|||
echo "<td>Add UserID:<input type=\"text\" name=\"userid\" size=\"6\"></td>";
|
||||
|
||||
for ($j=0;$j<=6;$j++) {
|
||||
echo "<td><input type=\"checkbox\" name=\"role".$j."\" value=\"1\"";
|
||||
echo "></td>\n";
|
||||
}
|
||||
echo "<td><input type=\"submit\" value=\"Update\"></form></td>";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<td><input type=\"checkbox\" name=\"role".$j."\" value=\"1\"";
|
||||
echo "></td>\n";
|
||||
}
|
||||
echo "<td><input type=\"submit\" value=\"Update\"></form></td>";
|
||||
echo "</tr>\n";
|
||||
|
||||
end_table();
|
||||
|
||||
|
|
|
@ -24,8 +24,6 @@ require_once("../project/project.inc");
|
|||
|
||||
db_init();
|
||||
|
||||
$logged_in_user = get_logged_in_user();
|
||||
|
||||
function buttons($i) {
|
||||
echo "
|
||||
<input type=\"radio\" name=\"user$i\" value=\"0\"> skip <br>
|
||||
|
|
Loading…
Reference in New Issue