// "Previous" and/or "Next" links? $prev_next_links = ''; if ($browseUtility->isPreviousBrowseAvailable()) { $prev_next_links = "<a href='listing.php?{$query}" . $browseUtility->getPreviousBrowseQueryString() . "'><- " . _('Previous') . '</a> '; } if ($browseUtility->isNextBrowseAvailable()) { $prev_next_links .= "<a href='listing.php?{$query}" . $browseUtility->getNextBrowseQueryString() . "'>" . _('Next') . ' -></a>'; } if ($prev_next_links != '') { echo "<p align='center'>{$prev_next_links}</p>"; } // table of search results echo '<table align="center" border="1"><tr>'; // print headers // links to allow (asc/desc) sorting echo "<th><a href='listing.php?{$query}" . $sortUtility->getQueryStringForSortableValue($sort_author_id) . "'>" . _("ID") . "</a></th>\n"; echo "<th><a href='listing.php?{$query}" . $sortUtility->getQueryStringForSortableValue($sort_last_name) . "'>" . _("Last name") . "</a></th>\n"; echo "<th><a href='listing.php?{$query}" . $sortUtility->getQueryStringForSortableValue($sort_other_names) . "'>" . _("Other name(s)") . "</a></th>\n"; echo "<th><a href='listing.php?{$query}" . $sortUtility->getQueryStringForSortableValue($sort_born) . "'>" . _("Born") . "</a></th>\n"; echo "<th><a href='listing.php?{$query}" . $sortUtility->getQueryStringForSortableValue($sort_dead) . "'>" . _("Deceased") . "</a></th>\n"; if ($can_edit) { echo "<th>" . _("Edit") . "</th>\n"; } echo "\n"; $count = $browseUtility->getRowCountToList(); $i = 0; while ($i++ < $count && ($row = @mysql_fetch_array($result))) { $id = $row['author_id']; echo "<tr><td>{$id}</td><td><a href=\"author.php?author_id={$id}\">" . html_safe($row['last_name']) . "</a></td><td>" . html_safe($row['other_names']) . "</td><td>" . format_date_from_array($row, 'b') . '</td><td>' . format_date_from_array($row, 'd') . '</td>' . ($can_edit ? "<td><a href='add.php?author_id={$id}'>" . _('Edit') . '</a></td>' : '') . "</tr>\n"; } echo '</table>';
$links_and_buttons .= "<a href='?{$query_without_view}{$sortby}&view=all#results'>" . _('All') . '</a>'; } $links_and_buttons .= ' <input type="submit" value="Process">'; echo $links_and_buttons; ?> <br /><br /> <table align="center" border="1"> <tr> <?php // print headers // links to allow sorting (asc/desc) echo "<th rowspan='2'>Enabled</th><th rowspan='2'>Delete</th><th rowspan='2'>" . _('Move to here'); echo "<br />[<input type='radio' name='move_to_author' value='0' onClick='moveToHere(this, 0);'>" . _('Reset') . "]</th>\n"; echo "<th rowspan='2'><a href='manage.php?{$query}" . $sortUtility->getQueryStringForSortableValue($sort_author_id) . "'>Id</a></th>\n"; echo "<th rowspan='2'><a href='manage.php?{$query}" . $sortUtility->getQueryStringForSortableValue($sort_last_name) . "'>Last name</a></th>\n"; echo "<th rowspan='2'><a href='manage.php?{$query}" . $sortUtility->getQueryStringForSortableValue($sort_other_names) . "'>Other name(s)</a></th>\n"; echo "<th rowspan='2'><a href='manage.php?{$query}" . $sortUtility->getQueryStringForSortableValue($sort_born) . "'>Born</a></th>\n"; echo "<th rowspan='2'><a href='manage.php?{$query}" . $sortUtility->getQueryStringForSortableValue($sort_dead) . "'>Deceased</a></th>\n"; echo "<th rowspan='2'>" . _('Edit') . "</th>\n<th rowspan='2'</th>\n"; echo "<th colspan='3'>" . _('Biographies') . "</th>\n</tr>\n"; echo "<tr><th>" . _('View') . "</th><th>" . _('Move') . "</th><th>" . _('Delete') . "</th></tr>\n"; $result = search(); $browseUtility = new BrowseUtility($result); // "Previous" and/or "Next" links? $prev_next_links = ''; if ($browseUtility->isPreviousBrowseAvailable()) { $prev_next_links = "<a href='manage.php?{$query}" . $browseUtility->getPreviousBrowseQueryString() . "'><- " . _('Previous') . '</a> '; } if ($browseUtility->isNextBrowseAvailable()) {