3
$Id: lists.inc 5244 2014-02-09 14:47:35Z gruberroland $
3
$Id: lists.inc 5519 2015-02-16 19:54:21Z gruberroland $
5
5
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
6
Copyright (C) 2003 - 2013 Roland Gruber
6
Copyright (C) 2003 - 2015 Roland Gruber
8
8
This program is free software; you can redistribute it and/or modify
9
9
it under the terms of the GNU General Public License as published by
293
293
"&sort=" . $this->sortColumn . "&sortdirection=" . $this->sortDirection . $filter . "\">" .
294
294
"<img height=16 width=16 class=\"align-middle\" alt=\"\" src=\"../../graphics/go-first.png\"></a>\n");
296
if ($this->page > 10) {
296
if ($this->page > 11) {
297
297
echo("<a title=\"" . _('Jump 10 pages backward') . "\" href=\"list.php?type=" . $this->type . "&norefresh=true&page=" . ($this->page - 10) .
298
298
"&sort=" . $this->sortColumn . "&sortdirection=" . $this->sortDirection . $filter . "\">" .
299
299
"<img height=16 width=16 class=\"align-middle\" alt=\"\" src=\"../../graphics/go-previous.png\"></a>\n");
301
$pageCount = ceil($count / $this->maxPageEntries);
301
302
for ($i = $this->page - 6; $i < ($this->page + 5); $i++) {
302
if ($i >= ($count / $this->maxPageEntries)) {
303
if ($i >= $pageCount) {
305
306
elseif ($i < 0) {
308
309
if ($i == $this->page - 1) {
309
echo ' ' . ($i + 1) . ' ';
310
$url = "list.php?type=" . $this->type . "&norefresh=true" .
311
"&sort=" . $this->sortColumn . "&sortdirection=" . $this->sortDirection . $filter;
312
echo '<input type="number" class="listPageInput" id="listNavPage" name="listNavPage"'
313
. ' value="' . ($i + 1) . '" min="1" max="' . $pageCount . '"'
314
. ' onkeypress="listPageNumberKeyPress(\'' . $url . '\', event);">';
312
317
echo " <a href=\"list.php?type=" . $this->type . "&norefresh=true&page=" . ($i + 1) .
313
318
"&sort=" . $this->sortColumn . "&sortdirection=" . $this->sortDirection . $filter . "\">" . ($i + 1) . "</a>\n";
316
if ($this->page < (($count / $this->maxPageEntries) - 10)) {
321
if ($this->page < ($pageCount - 10)) {
317
322
echo("<a title=\"" . _('Jump 10 pages forward') . "\" href=\"list.php?type=" . $this->type . "&norefresh=true&page=" . ($this->page + 10) .
318
323
"&sort=" . $this->sortColumn . "&sortdirection=" . $this->sortDirection . $filter . "\">" .
319
324
"<img height=16 width=16 class=\"align-middle\" alt=\"\" src=\"../../graphics/go-next.png\"></a>\n");
321
if ($this->page < ($count / $this->maxPageEntries)) {
322
echo("<a title=\"" . _('Jump to last page') . "\" href=\"list.php?type=" . $this->type . "&norefresh=true&page=" . ceil(($count / $this->maxPageEntries)) .
326
if ($this->page < $pageCount) {
327
echo("<a title=\"" . _('Jump to last page') . "\" href=\"list.php?type=" . $this->type . "&norefresh=true&page=" . $pageCount .
323
328
"&sort=" . $this->sortColumn . "&sortdirection=" . $this->sortDirection . $filter . "\">" .
324
329
"<img height=16 width=16 class=\"align-middle\" alt=\"\" src=\"../../graphics/go-last.png\"></a>\n");
889
894
// get current page
890
if (isset($_GET["page"])) $this->page = $_GET["page"];
895
if (!empty($_GET["page"])) $this->page = $_GET["page"];
891
896
else $this->page = 1;
892
897
// generate attribute-description table
893
898
$temp_array = $this->listGetAttributeDescriptionList();
1073
1078
StatusMessage('INFO', sprintf(_('You can download your PDF files {link=%s}{color=#d2131a}here{endcolor}{endlink}.'), '../' . $_SESSION['mass_pdf']['file']));
1081
elseif (isset($_GET['accountEditInvalidID'])) {
1082
StatusMessage('WARN', _('Please do not edit multiple accounts in parallel in multiple browser tabs.'));
1076
1084
if (isset($_SESSION['listRedirectMessages'])) {
1077
1085
for ($i = 0; $i < sizeof($_SESSION['listRedirectMessages']); $i++) {
1078
1086
call_user_func_array('StatusMessage', $_SESSION['listRedirectMessages'][$i]);