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