]>
Commit | Line | Data |
---|---|---|
ef8be8ea AD |
1 | <?php |
2 | function module_pref_users($link) { | |
3 | ||
d20f3544 AD |
4 | global $access_level_names; |
5 | ||
85ef2118 AD |
6 | if (!SINGLE_USER_MODE && $_SESSION["access_level"] < 10) { |
7 | print __("Your access level is insufficient to open this tab."); | |
8 | return; | |
9 | } | |
10 | ||
fbf7d545 | 11 | $subop = $_REQUEST["subop"]; |
ef8be8ea | 12 | |
5a437c88 AD |
13 | if ($subop == "user-details") { |
14 | ||
b4e75b2a | 15 | $uid = sprintf("%d", $_REQUEST["id"]); |
5a437c88 | 16 | |
2a52d96f | 17 | print "<div id=\"infoBoxTitle\">".__('User details')."</div>"; |
5a437c88 AD |
18 | |
19 | print "<div class='infoBoxContents'>"; | |
20 | ||
21 | $result = db_query($link, "SELECT login, | |
22 | ".SUBSTRING_FOR_DATE."(last_login,1,16) AS last_login, | |
23 | access_level, | |
24 | (SELECT COUNT(int_id) FROM ttrss_user_entries | |
25 | WHERE owner_uid = id) AS stored_articles, | |
26 | ".SUBSTRING_FOR_DATE."(created,1,16) AS created | |
27 | FROM ttrss_users | |
28 | WHERE id = '$uid'"); | |
29 | ||
30 | if (db_num_rows($result) == 0) { | |
2a52d96f | 31 | print "<h1>".__('User not found')."</h1>"; |
5a437c88 AD |
32 | return; |
33 | } | |
34 | ||
35 | // print "<h1>User Details</h1>"; | |
36 | ||
37 | $login = db_fetch_result($result, 0, "login"); | |
38 | ||
5a437c88 AD |
39 | print "<table width='100%'>"; |
40 | ||
41 | $last_login = date(get_pref($link, 'LONG_DATE_FORMAT'), | |
42 | strtotime(db_fetch_result($result, 0, "last_login"))); | |
43 | ||
44 | $created = date(get_pref($link, 'LONG_DATE_FORMAT'), | |
45 | strtotime(db_fetch_result($result, 0, "created"))); | |
46 | ||
47 | $access_level = db_fetch_result($result, 0, "access_level"); | |
48 | $stored_articles = db_fetch_result($result, 0, "stored_articles"); | |
49 | ||
5a437c88 AD |
50 | print "<tr><td>".__('Registered')."</td><td>$created</td></tr>"; |
51 | print "<tr><td>".__('Last logged in')."</td><td>$last_login</td></tr>"; | |
5a437c88 | 52 | |
fad8506f AD |
53 | $result = db_query($link, "SELECT COUNT(id) as num_feeds FROM ttrss_feeds |
54 | WHERE owner_uid = '$uid'"); | |
55 | ||
56 | $num_feeds = db_fetch_result($result, 0, "num_feeds"); | |
57 | ||
58 | print "<tr><td>".__('Subscribed feeds count')."</td><td>$num_feeds</td></tr>"; | |
59 | ||
5a437c88 AD |
60 | print "</table>"; |
61 | ||
62 | print "<h1>".__('Subscribed feeds')."</h1>"; | |
63 | ||
64 | $result = db_query($link, "SELECT id,title,site_url FROM ttrss_feeds | |
65 | WHERE owner_uid = '$uid' ORDER BY title"); | |
66 | ||
67 | print "<ul class=\"userFeedList\">"; | |
68 | ||
69 | $row_class = "odd"; | |
70 | ||
71 | while ($line = db_fetch_assoc($result)) { | |
72 | ||
73 | $icon_file = ICONS_URL."/".$line["id"].".ico"; | |
74 | ||
75 | if (file_exists($icon_file) && filesize($icon_file) > 0) { | |
76 | $feed_icon = "<img class=\"tinyFeedIcon\" src=\"$icon_file\">"; | |
77 | } else { | |
78 | $feed_icon = "<img class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\">"; | |
79 | } | |
80 | ||
81 | print "<li class=\"$row_class\">$feed_icon <a href=\"".$line["site_url"]."\">".$line["title"]."</a></li>"; | |
82 | ||
83 | $row_class = toggleEvenOdd($row_class); | |
84 | ||
85 | } | |
86 | ||
87 | if (db_num_rows($result) < $num_feeds) { | |
88 | // FIXME - add link to show ALL subscribed feeds here somewhere | |
89 | print "<li><img | |
90 | class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\"> ...</li>"; | |
91 | } | |
92 | ||
93 | print "</ul>"; | |
94 | ||
95 | print "<div align='center'> | |
96 | <input type='submit' class='button' | |
97 | onclick=\"closeInfoBox()\" value=\"Close this window\"></div>"; | |
98 | ||
99 | print "</div>"; | |
100 | ||
101 | return; | |
102 | } | |
103 | ||
ef8be8ea AD |
104 | if ($subop == "edit") { |
105 | ||
b4e75b2a | 106 | $id = db_escape_string($_REQUEST["id"]); |
ef8be8ea | 107 | |
41ed2d38 | 108 | print "<div id=\"infoBoxTitle\">".__('User Editor')."</div>"; |
ef8be8ea AD |
109 | |
110 | print "<div class=\"infoBoxContents\">"; | |
111 | ||
e6312f6c | 112 | print "<form id=\"user_edit_form\" onsubmit='return false'>"; |
ef8be8ea AD |
113 | |
114 | print "<input type=\"hidden\" name=\"id\" value=\"$id\">"; | |
115 | print "<input type=\"hidden\" name=\"op\" value=\"pref-users\">"; | |
116 | print "<input type=\"hidden\" name=\"subop\" value=\"editSave\">"; | |
117 | ||
118 | $result = db_query($link, "SELECT * FROM ttrss_users WHERE id = '$id'"); | |
119 | ||
120 | $login = db_fetch_result($result, 0, "login"); | |
121 | $access_level = db_fetch_result($result, 0, "access_level"); | |
122 | $email = db_fetch_result($result, 0, "email"); | |
123 | ||
41ed2d38 | 124 | $sel_disabled = ($id == $_SESSION["uid"]) ? "disabled" : ""; |
ef8be8ea | 125 | |
41ed2d38 AD |
126 | print "<div class=\"dlgSec\">".__("User")."</div>"; |
127 | print "<div class=\"dlgSecCont\">"; | |
ef8be8ea | 128 | |
34cd59a4 AD |
129 | if ($sel_disabled) { |
130 | print "<input type=\"hidden\" name=\"login\" value=\"$login\">"; | |
8f4e59ec AD |
131 | print "<input size=\"30\" style=\"font-size : 16px\" |
132 | onkeypress=\"return filterCR(event, userEditSave)\" $sel_disabled | |
133 | value=\"$login\">"; | |
134 | } else { | |
135 | print "<input size=\"30\" style=\"font-size : 16px\" | |
136 | onkeypress=\"return filterCR(event, userEditSave)\" $sel_disabled | |
137 | name=\"login\" value=\"$login\">"; | |
34cd59a4 | 138 | } |
41ed2d38 AD |
139 | |
140 | print "</div>"; | |
141 | ||
142 | print "<div class=\"dlgSec\">".__("Authentication")."</div>"; | |
143 | print "<div class=\"dlgSecCont\">"; | |
144 | ||
145 | print __('Access level: ') . " "; | |
ef8be8ea | 146 | |
014accd1 AD |
147 | if (!$sel_disabled) { |
148 | print_select_hash("access_level", $access_level, $access_level_names, | |
149 | $sel_disabled); | |
150 | } else { | |
151 | print_select_hash("", $access_level, $access_level_names, | |
152 | $sel_disabled); | |
153 | print "<input type=\"hidden\" name=\"access_level\" value=\"$access_level\">"; | |
154 | } | |
41ed2d38 AD |
155 | |
156 | print "<br/>"; | |
157 | ||
158 | print __('Change password to') . | |
8df90057 | 159 | " <input size=\"20\" onkeypress=\"return filterCR(event, userEditSave)\" |
41ed2d38 AD |
160 | name=\"password\">"; |
161 | ||
162 | print "</div>"; | |
163 | ||
164 | print "<div class=\"dlgSec\">".__("Options")."</div>"; | |
165 | print "<div class=\"dlgSecCont\">"; | |
166 | ||
167 | print __('E-mail: '). | |
8df90057 | 168 | " <input size=\"30\" name=\"email\" onkeypress=\"return filterCR(event, userEditSave)\" |
41ed2d38 AD |
169 | value=\"$email\">"; |
170 | ||
171 | print "</div>"; | |
ef8be8ea AD |
172 | |
173 | print "</table>"; | |
174 | ||
175 | print "</form>"; | |
8f4e59ec | 176 | |
41ed2d38 | 177 | print "<div class=\"dlgButtons\"> |
ef8be8ea AD |
178 | <input class=\"button\" |
179 | type=\"submit\" onclick=\"return userEditSave()\" | |
11ffbec3 | 180 | value=\"".__('Save')."\"> |
ef8be8ea AD |
181 | <input class=\"button\" |
182 | type=\"submit\" onclick=\"return userEditCancel()\" | |
11ffbec3 | 183 | value=\"".__('Cancel')."\"></div>"; |
ef8be8ea AD |
184 | |
185 | print "</div>"; | |
186 | ||
187 | return; | |
188 | } | |
189 | ||
190 | if ($subop == "editSave") { | |
191 | ||
192 | if (!WEB_DEMO_MODE && $_SESSION["access_level"] >= 10) { | |
193 | ||
fbf7d545 AD |
194 | $login = db_escape_string(trim($_REQUEST["login"])); |
195 | $uid = db_escape_string($_REQUEST["id"]); | |
196 | $access_level = (int) $_REQUEST["access_level"]; | |
197 | $email = db_escape_string(trim($_REQUEST["email"])); | |
198 | $password = db_escape_string(trim($_REQUEST["password"])); | |
ef8be8ea AD |
199 | |
200 | if ($password) { | |
c3a005ad | 201 | $pwd_hash = encrypt_password($password, $login); |
ef8be8ea | 202 | $pass_query_part = "pwd_hash = '$pwd_hash', "; |
4dccf1ed | 203 | print_notice(T_sprintf('Changed password of user <b>%s</b>.', $login)); |
ef8be8ea AD |
204 | } else { |
205 | $pass_query_part = ""; | |
206 | } | |
207 | ||
208 | db_query($link, "UPDATE ttrss_users SET $pass_query_part login = '$login', | |
209 | access_level = '$access_level', email = '$email' WHERE id = '$uid'"); | |
210 | ||
211 | } | |
212 | } else if ($subop == "remove") { | |
213 | ||
ec800fe1 | 214 | if ($_SESSION["access_level"] >= 10) { |
ef8be8ea | 215 | |
b4e75b2a | 216 | $ids = split(",", db_escape_string($_REQUEST["ids"])); |
ef8be8ea AD |
217 | |
218 | foreach ($ids as $id) { | |
ec800fe1 AD |
219 | if ($id != $_SESSION["uid"]) { |
220 | db_query($link, "DELETE FROM ttrss_tags WHERE owner_uid = '$id'"); | |
221 | db_query($link, "DELETE FROM ttrss_feeds WHERE owner_uid = '$id'"); | |
222 | db_query($link, "DELETE FROM ttrss_users WHERE id = '$id'"); | |
223 | } | |
ef8be8ea AD |
224 | } |
225 | } | |
226 | } else if ($subop == "add") { | |
227 | ||
ec800fe1 | 228 | if ($_SESSION["access_level"] >= 10) { |
ef8be8ea | 229 | |
b4e75b2a | 230 | $login = db_escape_string(trim($_REQUEST["login"])); |
ef8be8ea | 231 | $tmp_user_pwd = make_password(8); |
c3a005ad | 232 | $pwd_hash = encrypt_password($tmp_user_pwd, $login); |
ef8be8ea AD |
233 | |
234 | $result = db_query($link, "SELECT id FROM ttrss_users WHERE | |
235 | login = '$login'"); | |
236 | ||
237 | if (db_num_rows($result) == 0) { | |
238 | ||
239 | db_query($link, "INSERT INTO ttrss_users | |
54a3d3cf AD |
240 | (login,pwd_hash,access_level,last_login,created) |
241 | VALUES ('$login', '$pwd_hash', 0, null, NOW())"); | |
ef8be8ea AD |
242 | |
243 | ||
244 | $result = db_query($link, "SELECT id FROM ttrss_users WHERE | |
245 | login = '$login' AND pwd_hash = '$pwd_hash'"); | |
246 | ||
247 | if (db_num_rows($result) == 1) { | |
248 | ||
249 | $new_uid = db_fetch_result($result, 0, "id"); | |
250 | ||
4dccf1ed AD |
251 | print_notice(T_sprintf("Added user <b>%s</b> with password <b>%s</b>", |
252 | $login, $tmp_user_pwd)); | |
ef8be8ea AD |
253 | |
254 | initialize_user($link, $new_uid); | |
255 | ||
256 | } else { | |
257 | ||
4dccf1ed | 258 | print_warning(T_sprintf("Could not create user <b>%s</b>", $login)); |
ef8be8ea AD |
259 | |
260 | } | |
261 | } else { | |
4dccf1ed | 262 | print_warning(T_sprintf("User <b>%s</b> already exists.", $login)); |
ef8be8ea AD |
263 | } |
264 | } | |
265 | } else if ($subop == "resetPass") { | |
266 | ||
267 | if (!WEB_DEMO_MODE && $_SESSION["access_level"] >= 10) { | |
268 | ||
b4e75b2a | 269 | $uid = db_escape_string($_REQUEST["id"]); |
ef8be8ea AD |
270 | |
271 | $result = db_query($link, "SELECT login,email | |
272 | FROM ttrss_users WHERE id = '$uid'"); | |
273 | ||
274 | $login = db_fetch_result($result, 0, "login"); | |
275 | $email = db_fetch_result($result, 0, "email"); | |
276 | $tmp_user_pwd = make_password(8); | |
c3a005ad | 277 | $pwd_hash = encrypt_password($tmp_user_pwd, $login); |
ef8be8ea AD |
278 | |
279 | db_query($link, "UPDATE ttrss_users SET pwd_hash = '$pwd_hash' | |
280 | WHERE id = '$uid'"); | |
281 | ||
4dccf1ed AD |
282 | print_notice(T_sprintf("Changed password of user <b>%s</b> |
283 | to <b>%s</b>", $login, $tmp_user_pwd)); | |
ef8be8ea | 284 | |
d134e3a3 | 285 | if ($email) { |
f1d9632e | 286 | print_notice(T_sprintf("Notifying <b>%s</b>.", $email)); |
ef8be8ea | 287 | |
fe7537b5 | 288 | require_once "lib/MiniTemplator.class.php"; |
eb0b4ee8 AD |
289 | |
290 | $tpl = new MiniTemplator; | |
291 | ||
292 | $tpl->readTemplateFromFile("templates/resetpass_template.txt"); | |
293 | ||
294 | $tpl->setVariable('LOGIN', $login); | |
295 | $tpl->setVariable('NEWPASS', $tmp_user_pwd); | |
296 | ||
297 | $tpl->addBlock('message'); | |
298 | ||
299 | $message = ""; | |
300 | ||
301 | $tpl->generateOutputToString($message); | |
302 | ||
303 | $mail = new PHPMailer(); | |
304 | ||
d134e3a3 AD |
305 | $mail->PluginDir = "lib/phpmailer/"; |
306 | $mail->SetLanguage("en", "lib/phpmailer/language/"); | |
eb0b4ee8 AD |
307 | |
308 | $mail->CharSet = "UTF-8"; | |
309 | ||
310 | $mail->From = DIGEST_FROM_ADDRESS; | |
311 | $mail->FromName = DIGEST_FROM_NAME; | |
312 | $mail->AddAddress($email, $login); | |
313 | ||
314 | if (DIGEST_SMTP_HOST) { | |
315 | $mail->Host = DIGEST_SMTP_HOST; | |
316 | $mail->Mailer = "smtp"; | |
19a1da0d | 317 | $mail->SMTPAuth = DIGEST_SMTP_LOGIN != ''; |
eb0b4ee8 AD |
318 | $mail->Username = DIGEST_SMTP_LOGIN; |
319 | $mail->Password = DIGEST_SMTP_PASSWORD; | |
320 | } | |
321 | ||
322 | $mail->IsHTML(false); | |
ebb41333 | 323 | $mail->Subject = __("[tt-rss] Password change notification"); |
eb0b4ee8 AD |
324 | $mail->Body = $message; |
325 | ||
326 | $rc = $mail->Send(); | |
327 | ||
328 | if (!$rc) print_error($mail->ErrorInfo); | |
329 | ||
330 | /* mail("$login <$email>", "Password reset notification", | |
ef8be8ea AD |
331 | "Hi, $login.\n". |
332 | "\n". | |
333 | "Your password for this TT-RSS installation was reset by". | |
334 | " an administrator.\n". | |
335 | "\n". | |
336 | "Your new password is $tmp_user_pwd, please remember". | |
337 | " it for later reference.\n". | |
338 | "\n". | |
eb0b4ee8 | 339 | "Sincerely, TT-RSS Mail Daemon.", "From: " . MAIL_FROM); */ |
ef8be8ea AD |
340 | } |
341 | ||
342 | print "</div>"; | |
343 | ||
344 | } | |
345 | } | |
346 | ||
fe8d2059 AD |
347 | set_pref($link, "_PREFS_ACTIVE_TAB", "userConfig"); |
348 | ||
b4e75b2a | 349 | $user_search = db_escape_string($_REQUEST["search"]); |
a5bd7bf0 | 350 | |
b4e75b2a | 351 | if (array_key_exists("search", $_REQUEST)) { |
a5bd7bf0 AD |
352 | $_SESSION["prefs_user_search"] = $user_search; |
353 | } else { | |
354 | $user_search = $_SESSION["prefs_user_search"]; | |
355 | } | |
356 | ||
357 | print "<div class=\"feedEditSearch\"> | |
358 | <input id=\"user_search\" size=\"20\" type=\"search\" | |
359 | onfocus=\"javascript:disableHotkeys();\" | |
360 | onblur=\"javascript:enableHotkeys();\" | |
361 | onchange=\"javascript:updateUsersList()\" value=\"$user_search\"> | |
362 | <input type=\"submit\" class=\"button\" | |
363 | onclick=\"javascript:updateUsersList()\" value=\"".__('Search')."\"> | |
364 | </div>"; | |
365 | ||
b4e75b2a | 366 | $sort = db_escape_string($_REQUEST["sort"]); |
ef8be8ea AD |
367 | |
368 | if (!$sort || $sort == "undefined") { | |
369 | $sort = "login"; | |
370 | } | |
371 | ||
ef8be8ea | 372 | print "<input type=\"submit\" class=\"button\" |
eb70b777 | 373 | id=\"user_add_btn\" |
807fd4d6 | 374 | onclick=\"javascript:addUser()\" value=\"".__('Create user')."\"></div>"; |
ef8be8ea | 375 | |
a5bd7bf0 | 376 | if ($user_search) { |
1638fc4e AD |
377 | |
378 | $user_search = split(" ", $user_search); | |
379 | $tokens = array(); | |
380 | ||
381 | foreach ($user_search as $token) { | |
382 | $token = trim($token); | |
383 | array_push($tokens, "(UPPER(login) LIKE UPPER('%$token%'))"); | |
384 | } | |
385 | ||
386 | $user_search_query = "(" . join($tokens, " AND ") . ") AND "; | |
387 | ||
a5bd7bf0 AD |
388 | } else { |
389 | $user_search_query = ""; | |
390 | } | |
391 | ||
ef8be8ea AD |
392 | $result = db_query($link, "SELECT |
393 | id,login,access_level,email, | |
f52fb64d AD |
394 | ".SUBSTRING_FOR_DATE."(last_login,1,16) as last_login, |
395 | ".SUBSTRING_FOR_DATE."(created,1,16) as created | |
ef8be8ea AD |
396 | FROM |
397 | ttrss_users | |
a5bd7bf0 AD |
398 | WHERE |
399 | $user_search_query | |
400 | id > 0 | |
ef8be8ea AD |
401 | ORDER BY $sort"); |
402 | ||
a5bd7bf0 AD |
403 | if (db_num_rows($result) > 0) { |
404 | ||
ef8be8ea AD |
405 | // print "<div id=\"infoBoxShadow\"><div id=\"infoBox\">PLACEHOLDER</div></div>"; |
406 | ||
407 | print "<p><table width=\"100%\" cellspacing=\"0\" | |
408 | class=\"prefUserList\" id=\"prefUserList\">"; | |
409 | ||
410 | print "<tr><td class=\"selectPrompt\" colspan=\"8\"> | |
e8d0177d AD |
411 | ".__('Select:')." |
412 | <a href=\"javascript:selectPrefRows('user', true)\">".__('All')."</a>, | |
413 | <a href=\"javascript:selectPrefRows('user', false)\">".__('None')."</a> | |
ef8be8ea AD |
414 | </td</tr>"; |
415 | ||
416 | print "<tr class=\"title\"> | |
417 | <td align='center' width=\"5%\"> </td> | |
5ede560f AD |
418 | <td width=''><a href=\"javascript:updateUsersList('login')\">".__('Login')."</a></td> |
419 | <td width='20%'><a href=\"javascript:updateUsersList('access_level')\">".__('Access Level')."</a></td> | |
f52fb64d | 420 | <td width='20%'><a href=\"javascript:updateUsersList('created')\">".__('Registered')."</a></td> |
5ede560f | 421 | <td width='20%'><a href=\"javascript:updateUsersList('last_login')\">".__('Last login')."</a></td></tr>"; |
ef8be8ea AD |
422 | |
423 | $lnum = 0; | |
424 | ||
425 | while ($line = db_fetch_assoc($result)) { | |
426 | ||
427 | $class = ($lnum % 2) ? "even" : "odd"; | |
428 | ||
429 | $uid = $line["id"]; | |
b4e75b2a | 430 | $edit_uid = $_REQUEST["id"]; |
ef8be8ea AD |
431 | |
432 | if ($subop == "edit" && $uid != $edit_uid) { | |
433 | $class .= "Grayed"; | |
434 | $this_row_id = ""; | |
435 | } else { | |
436 | $this_row_id = "id=\"UMRR-$uid\""; | |
437 | } | |
438 | ||
439 | print "<tr class=\"$class\" $this_row_id>"; | |
440 | ||
441 | $line["login"] = htmlspecialchars($line["login"]); | |
442 | ||
0b6f179e AD |
443 | # $line["last_login"] = date(get_pref($link, 'SHORT_DATE_FORMAT'), |
444 | # strtotime($line["last_login"])); | |
445 | ||
446 | if (get_pref($link, 'HEADLINES_SMART_DATE')) { | |
447 | $line["last_login"] = smart_date_time(strtotime($line["last_login"])); | |
f52fb64d | 448 | $line["created"] = smart_date_time(strtotime($line["created"])); |
0b6f179e AD |
449 | } else { |
450 | $line["last_login"] = date(get_pref($link, 'SHORT_DATE_FORMAT'), | |
451 | strtotime($line["last_login"])); | |
f52fb64d AD |
452 | $line["created"] = date(get_pref($link, 'SHORT_DATE_FORMAT'), |
453 | strtotime($line["created"])); | |
0b6f179e | 454 | } |
ef8be8ea | 455 | |
a95da136 | 456 | print "<td align='center'><input onclick='toggleSelectPrefRow(this, \"user\");' |
ef8be8ea AD |
457 | type=\"checkbox\" id=\"UMCHK-$uid\"></td>"; |
458 | ||
a0eb61b2 | 459 | $onclick = "onclick='editUser($uid)' title='".__('Click to edit')."'"; |
ef8be8ea | 460 | |
a95da136 | 461 | print "<td $onclick>" . $line["login"] . "</td>"; |
ef8be8ea | 462 | |
a95da136 | 463 | if (!$line["email"]) $line["email"] = " "; |
ef8be8ea | 464 | |
a95da136 AD |
465 | print "<td $onclick>" . $access_level_names[$line["access_level"]] . "</td>"; |
466 | print "<td $onclick>" . $line["created"] . "</td>"; | |
467 | print "<td $onclick>" . $line["last_login"] . "</td>"; | |
ef8be8ea AD |
468 | |
469 | print "</tr>"; | |
470 | ||
471 | ++$lnum; | |
472 | } | |
473 | ||
474 | print "</table>"; | |
475 | ||
476 | print "<p id='userOpToolbar'>"; | |
477 | ||
a3c159c4 | 478 | print " |
ef8be8ea | 479 | <input type=\"submit\" class=\"button\" disabled=\"true\" |
a3c159c4 | 480 | onclick=\"javascript:selectedUserDetails()\" value=\"".__('User details')."\"> |
ef8be8ea | 481 | <input type=\"submit\" class=\"button\" disabled=\"true\" |
a3c159c4 | 482 | onclick=\"javascript:editSelectedUser()\" value=\"".__('Edit')."\"> |
ef8be8ea | 483 | <input type=\"submit\" class=\"button\" disabled=\"true\" |
a3c159c4 | 484 | onclick=\"javascript:removeSelectedUsers()\" value=\"".__('Remove')."\"> |
ef8be8ea | 485 | <input type=\"submit\" class=\"button\" disabled=\"true\" |
a3c159c4 | 486 | onclick=\"javascript:resetSelectedUserPass()\" value=\"".__('Reset password')."\">"; |
ef8be8ea | 487 | |
a5bd7bf0 AD |
488 | } else { |
489 | print "<p>"; | |
490 | if (!$user_search) { | |
cea04d61 | 491 | print_warning(__('No users defined.')); |
a5bd7bf0 | 492 | } else { |
cea04d61 | 493 | print_warning(__('No matching users found.')); |
a5bd7bf0 AD |
494 | } |
495 | print "</p>"; | |
496 | ||
497 | } | |
498 | ||
ef8be8ea AD |
499 | } |
500 | ?> |