X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=modules%2Fpref-users.php;h=b75d5b76fb5101529cc62d4101cee2fe07a052e7;hb=8ffd20110ee28ca87ff29da193fdb63ca2e0c2ea;hp=a4531c45f196ba9c0ee40c640defe46939813492;hpb=d90c741e6faf4831262c1a43a41eb9fa7a46fdfd;p=tt-rss.git diff --git a/modules/pref-users.php b/modules/pref-users.php index a4531c45..b75d5b76 100644 --- a/modules/pref-users.php +++ b/modules/pref-users.php @@ -12,11 +12,14 @@ if ($subop == "user-details") { + header("Content-Type: text/xml"); + print ""; + $uid = sprintf("%d", $_REQUEST["id"]); - print "
".__('User details')."
"; + print "".__('User details').""; - print "
"; + print "".__("Close this window"). "
"; - print ""; + print "]]>
"; return; } if ($subop == "edit") { + header("Content-Type: text/xml"); + $id = db_escape_string($_REQUEST["id"]); - print "
".__('User Editor')."
"; - - print "
"; + print ""; + print "".__('User Editor').""; + print ""; @@ -180,7 +185,7 @@
"; - print ""; + print "]]>"; return; } @@ -198,7 +203,7 @@ if ($password) { $pwd_hash = encrypt_password($password, $login); $pass_query_part = "pwd_hash = '$pwd_hash', "; - print_notice(T_sprintf('Changed password of user %s.', $login)); + $status_msg = format_notice(T_sprintf('Changed password of user %s.', $login)); } else { $pass_query_part = ""; } @@ -246,18 +251,18 @@ $new_uid = db_fetch_result($result, 0, "id"); - print_notice(T_sprintf("Added user %s with password %s", + $status_msg = format_notice(T_sprintf("Added user %s with password %s", $login, $tmp_user_pwd)); initialize_user($link, $new_uid); } else { - print_warning(T_sprintf("Could not create user %s", $login)); + $status_msg = format_warning(T_sprintf("Could not create user %s", $login)); } } else { - print_warning(T_sprintf("User %s already exists.", $login)); + $status_msg = format_warning(T_sprintf("User %s already exists.", $login)); } } } else if ($subop == "resetPass") { @@ -277,11 +282,11 @@ db_query($link, "UPDATE ttrss_users SET pwd_hash = '$pwd_hash' WHERE id = '$uid'"); - print_notice(T_sprintf("Changed password of user %s + $status_msg = format_notice(T_sprintf("Changed password of user %s to %s", $login, $tmp_user_pwd)); if ($email) { - print_notice(T_sprintf("Notifying %s.", $email)); + $status_msg += format_notice(T_sprintf("Notifying %s.", $email)); require_once "lib/MiniTemplator.class.php"; @@ -342,7 +347,10 @@ } } - set_pref($link, "_PREFS_ACTIVE_TAB", "userConfig"); + print "
"; + print "
"; + + print "
"; $user_search = db_escape_string($_REQUEST["search"]); @@ -352,12 +360,12 @@ $user_search = $_SESSION["prefs_user_search"]; } - print "
- + -
"; @@ -367,19 +375,31 @@ $sort = "login"; } - print ""; + print "
". + "" . __('Select').""; + print "
"; + print "
".__('All')."
"; + print "
".__('None')."
"; + print "
"; - print " - - - - "; + print ""; - print "
"; + print " + + + + "; + + print "
"; #toolbar + print "
"; #pane + print "
"; + print "

$status_msg"; if ($user_search) { @@ -410,23 +430,15 @@ if (db_num_rows($result) > 0) { -// print "

PLACEHOLDER
"; - print "

"; - print " - - - - "; + + + + "; $lnum = 0; @@ -438,7 +450,7 @@ $edit_uid = $_REQUEST["id"]; if ($subop == "edit" && $uid != $edit_uid) { - $class .= "Grayed"; + $class .= " Grayed"; $this_row_id = ""; } else { $this_row_id = "id=\"UMRR-$uid\""; @@ -451,10 +463,10 @@ $line["created"] = make_local_datetime($link, $line["created"], false); $line["last_login"] = make_local_datetime($link, $line["last_login"], false); - print ""; - $onclick = "onclick='editUser($uid)' title='".__('Click to edit')."'"; + $onclick = "onclick='editUser($uid, event)' title='".__('Click to edit')."'"; print ""; @@ -482,5 +494,8 @@ } + print ""; #pane + print ""; #container + } ?>
- ".__('Select:')." - ".__('All').", - ".__('None')." - "; - print "
 ".__('Login')."".__('Access Level')."".__('Registered')."".__('Last login')."
".__('Login')."".__('Access Level')."".__('Registered')."".__('Last login')."
" . $line["login"] . "