2 <form name=
"adminform" id=
"adminform" method=
"post" action=
"admin.php">
3 <input type=
"hidden" name=
"previoussearch" value=
"<?php echo $previoussearch ?>">
4 <input type
="hidden" name
="sesskey" value
="<?php echo $USER->sesskey ?>">
5 <table align
="center" border
="0" cellpadding
="5" cellspacing
="0">
9 $a->count
= count($admins);
10 $a->items
= $strexistingadmins;
11 print_string('counteditems', '', $a);
17 $a->count
= $usercount;
18 $a->items
= $strpotentialadmins;
19 print_string('counteditems', '', $a);
25 <select name=
"removeselect[]" size=
"20" id=
"removeselect" multiple
26 onFocus=
"document.adminform.add.disabled=true;
27 document.adminform.remove.disabled=false;
28 document.adminform.addselect.selectedIndex=-1;">
30 if (count($admins) == 1) {
31 $disabled = 'disabled';
32 $removebuttontype = 'hidden';
35 $removebuttontype = 'submit';
38 foreach ($admins as $admin) {
39 $fullname = fullname($admin, true);
40 echo "<option value=\"$admin->id\" $disabled>".$fullname.", ".$admin->email
."</option>\n";
47 <input name=
"add" type=
"submit" id=
"add" value=
"←" />
49 <input name=
"remove" type=
"<?php echo $removebuttontype ?>" id
="remove" value
="→" />
53 <select name
="addselect[]" size
="20" id
="addselect" multiple
54 onFocus
="document.adminform.add.disabled=false;
55 document.adminform.remove.disabled=true;
56 document.adminform.removeselect.selectedIndex=-1;">
58 if (!empty($searchusers)) {
59 echo "<optgroup label=\"$strsearchresults (" . count($searchusers) . ")\">\n";
60 foreach ($searchusers as $user) {
61 $fullname = fullname($user, true);
62 echo "<option value=\"$user->id\">".$fullname.", ".$user->email
."</option>\n";
66 if ($usercount > MAX_USERS_PER_PAGE
) {
67 echo '<optgroup label="'.get_string('toomanytoshow').'"><option></option></optgroup>'."\n"
68 .'<optgroup label="'.get_string('trysearching').'"><option></option></optgroup>'."\n";
71 foreach ($users as $user) {
72 $fullname = fullname($user, true);
73 echo "<option value=\"$user->id\">".$fullname.", ".$user->email
."</option>\n";
81 <input type=
"text" name=
"searchtext" size=
"30" value=
"<?php p($searchtext, true) ?>"
82 onFocus
="document.adminform.add.disabled=true;
83 document.adminform.remove.disabled=true;
84 document.adminform.removeselect.selectedIndex=-1;
85 document.adminform.addselect.selectedIndex=-1;"
86 onkeydown
= "var keyCode = event.which ? event.which : event.keyCode;
88 document.adminform.previoussearch.value=1;
89 document.adminform.submit();
92 <input name
="search" id
="search" type
="submit" value
="<?php p($strsearch) ?>" />
94 if (!empty($searchusers)) {
95 echo '<input name="showall" id="showall" type="submit" value="'.$strshowall.'" />'."\n";