-
Notifications
You must be signed in to change notification settings - Fork 9
/
users.php
59 lines (44 loc) · 1.31 KB
/
users.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
require_once "functions.php";
function format_users($link) {
$result = db_query($link, "SELECT * FROM ttirc_users ORDER BY login");
$lnum = 1;
$tmp = "";
while ($line = db_fetch_assoc($result)) {
$row_class = ($lnum % 2) ? "odd" : "even";
$id = $line['id'];
$tmp .= "<li id='U-$id' class='$row_class' user_id='$id'>";
$tmp .= "<input type='checkbox' onchange='select_row(this)'
row_id='U-$id'>";
$tmp .= " <a href=\"#\" title=\"".__('Click to edit user')."\"
onclick=\"edit_user($id)\">".
$line['login']."</a>";
$tmp .= "</li>";
++$lnum;
}
return $tmp;
}
function show_users($link) {
?>
<div id="infoBoxTitle"><?php echo __("Edit Users") ?></div>
<div class="infoBoxContents">
<div id="mini-notice" style='display : none'> </div>
<ul class="container" id="users-list">
<?php echo format_users($link); ?>
</ul>
<div class="dlgButtons">
<div style='float : left'>
<button onclick="create_user()">
<?php echo __('Add user') ?></button>
<button onclick="reset_user()">
<?php echo __('Reset password') ?></button>
<button onclick="delete_user()">
<?php echo __('Delete') ?></button>
</div>
<button type="submit" onclick="close_infobox()">
<?php echo __('Close') ?></button></div>
</div>
</div>
<?php
}
?>