function makeImageLink($id, $set_id) { // If $set_id is a machine tag, encode it (replacing ':' and '=' with dashes) $set_id = encodeMachineTagArgument($set_id); return "./?id={$id}&set={$set_id}"; }
} } // Are we far from the end? if ($page < $num_pages - 4) { $navigering_html .= ' .. '; } // End the list $navigering_html .= '</li>'; // Previous page link if ($page > 1) { $navigering_html .= '<li class="prev"><a href="?p=' . ($page - 1) . '&set=' . encodeMachineTagArgument($set_id); $navigering_html .= '">Föregående sida</a></li>'; } // Next page link if ($page < $num_pages) { $navigering_html .= '<li class="next"><a href="?p=' . ($page + 1) . '&set=' . encodeMachineTagArgument($set_id); $navigering_html .= '">Nästa sida</a></li>'; } $navigering_html .= '</ul>'; } // How we're displaying the title if (!isset($photoset_mode)) { $photoset_mode = "default"; } switch ($photoset_mode) { case "default": echo "<h1>Galleri</h1>\n"; echo "<h2>" . htmlspecialchars($title, ENT_NOQUOTES) . "</h2>\n"; if (!empty($desc)) { echo "<p>" . htmlspecialchars($desc, ENT_NOQUOTES) . "</p>\n"; }
$params[] = 'p=' . urlencode($nextpage); } $link = './?' . implode('&', $params); ?> <li class="next"> <a href="<?php echo htmlspecialchars($link); ?> " title="<?php echo htmlspecialchars($context->nextphoto["title"]); ?> ">Nästa</a> </li> <?php } else { $params = array('set=' . encodeMachineTagArgument($set_id)); $link = './?' . implode('&', $params); ?> <li class="next"> <a href="<?php echo htmlspecialchars($link); ?> " title="<?php echo htmlspecialchars("Återgå till: " . $photoset_title); ?> ">Återgå till galleriet</a> </li> <?php } ?> </ul>