Search = GET and fixed the dead end when no results to search
This commit is contained in:
+15
-13
@@ -280,6 +280,8 @@
|
||||
$matchstring = implode(", ", $match);
|
||||
print_heading(get_string("nousersmatching", "", $matchstring));
|
||||
|
||||
$table = NULL;
|
||||
|
||||
} else {
|
||||
|
||||
$countries = get_list_of_countries();
|
||||
@@ -329,27 +331,27 @@
|
||||
$deletebutton,
|
||||
$confirmbutton);
|
||||
}
|
||||
}
|
||||
|
||||
echo "<table align=\"center\" cellpadding=\"10\"><tr><td>";
|
||||
echo "<form action=\"user.php\" method=\"post\">";
|
||||
echo "<input type=\"text\" name=\"search\" value=\"$search\" size=\"20\">";
|
||||
echo "<input type=\"submit\" value=\"$strsearch\">";
|
||||
if ($search) {
|
||||
echo "<input type=\"button\" onclick=\"document.location='user.php';\" value=\"$strshowallusers\">";
|
||||
}
|
||||
echo "</form>";
|
||||
echo "</td></tr></table>";
|
||||
print_heading("<a href=\"user.php?newuser=true&sesskey=$USER->sesskey\">".get_string("addnewuser")."</a>");
|
||||
echo "<table class=\"searchbox\" align=\"center\" cellpadding=\"10\"><tr><td>";
|
||||
echo "<form action=\"user.php\" method=\"get\">";
|
||||
echo "<input type=\"text\" name=\"search\" value=\"$search\" size=\"20\">";
|
||||
echo "<input type=\"submit\" value=\"$strsearch\">";
|
||||
if ($search) {
|
||||
echo "<input type=\"button\" onclick=\"document.location='user.php';\" value=\"$strshowallusers\">";
|
||||
}
|
||||
echo "</form>";
|
||||
echo "</td></tr></table>";
|
||||
print_heading("<a href=\"user.php?newuser=true&sesskey=$USER->sesskey\">".get_string("addnewuser")."</a>");
|
||||
|
||||
if (!empty($table)) {
|
||||
print_table($table);
|
||||
|
||||
print_paging_bar($usercount, $page, $perpage,
|
||||
"user.php?sort=$sort&dir=$dir&perpage=$perpage".
|
||||
"&firstinitial=$firstinitial&lastinitial=$lastinitial&search=$search&");
|
||||
|
||||
print_heading("<a href=\"user.php?newuser=true&sesskey=$USER->sesskey\">".get_string("addnewuser")."</a>");
|
||||
}
|
||||
|
||||
print_heading("<a href=\"user.php?newuser=true&sesskey=$USER->sesskey\">".get_string("addnewuser")."</a>");
|
||||
|
||||
print_footer();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user