Pages on last page
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@434 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
ce75d75b80
commit
1456283e01
|
@ -201,6 +201,10 @@ function remove_from_uri($param = "") {
|
||||||
return preg_replace("~\\?$param=[^&]*&~", '?', preg_replace("~\\?$param=[^&]*\$|&$param=[^&]*~", '', $_SERVER["REQUEST_URI"]));
|
return preg_replace("~\\?$param=[^&]*&~", '?', preg_replace("~\\?$param=[^&]*\$|&$param=[^&]*~", '', $_SERVER["REQUEST_URI"]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function print_page($page) {
|
||||||
|
echo " " . ($page == $_GET["page"] ? $page + 1 : '<a href="' . htmlspecialchars(remove_from_uri("page") . ($page ? "&page=$page" : "")) . '">' . ($page + 1) . "</a>");
|
||||||
|
}
|
||||||
|
|
||||||
function get_file($key) {
|
function get_file($key) {
|
||||||
if (isset($_POST["files"][$key])) {
|
if (isset($_POST["files"][$key])) {
|
||||||
$length = strlen($_POST["files"][$key]);
|
$length = strlen($_POST["files"][$key]);
|
||||||
|
|
|
@ -236,11 +236,8 @@ function add_row(field) {
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
echo "<p><input type='hidden' name='token' value='$token' /><input type='submit' value='" . lang('Delete selected') . "' /> <input type='submit' name='truncate' value='" . lang('Truncate table') . "' onclick=\"return confirm('" . lang('Are you sure?') . "');\" /></p>\n";
|
echo "<p><input type='hidden' name='token' value='$token' /><input type='submit' value='" . lang('Delete selected') . "' /> <input type='submit' name='truncate' value='" . lang('Truncate table') . "' onclick=\"return confirm('" . lang('Are you sure?') . "');\" /></p>\n";
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
if (intval($limit) && $result->num_rows >= $limit && ($found_rows = $mysql->result($mysql->query("SELECT COUNT(*) FROM " . idf_escape($_GET["select"]) . ($where ? " WHERE " . implode(" AND ", $where) : "")))) > $limit) {
|
if (intval($limit) && ($found_rows = $mysql->result($mysql->query("SELECT COUNT(*) FROM " . idf_escape($_GET["select"]) . ($where ? " WHERE " . implode(" AND ", $where) : "")))) > $limit) {
|
||||||
$max_page = floor(($found_rows - 1) / $limit);
|
$max_page = floor(($found_rows - 1) / $limit);
|
||||||
function print_page($page) {
|
|
||||||
echo " " . ($page == $_GET["page"] ? $page + 1 : '<a href="' . htmlspecialchars(remove_from_uri("page") . ($page ? "&page=$page" : "")) . '">' . ($page + 1) . "</a>");
|
|
||||||
}
|
|
||||||
echo "<p>" . lang('Page') . ":";
|
echo "<p>" . lang('Page') . ":";
|
||||||
print_page(0);
|
print_page(0);
|
||||||
if ($_GET["page"] > 3) {
|
if ($_GET["page"] > 3) {
|
||||||
|
|
Loading…
Reference in a new issue