Syntax highlighter activated
Well it goes like so . . . Thanks goes to Peter Ryan. Great visual enhancement.
function show_photos_main() {
$album = $_GET['album'];
$photo = $_GET['photo'];
$page = $_GET['page'];
$tags = $_GET['tags'];
$show = $_GET['show'];
$output = '';
$continue = true;
if (!is_null($show)) {
if ($show == 'tags') {
$output = $this->show_tags();
$continue = false;
}
elseif ($show == 'recent') {
$tags = '';
}
}
if ($continue) {
// Show list of albums/photosets (none have been selected yet)
if (is_null($album) && is_null($tags) && is_null($photo)) {
$output = $this->show_albums($page);
}
// Show list of photos in the selected album/photoset
elseif (!is_null($album) && is_null($photo)) {
$output = $this->show_album_thumbnails($album, $page);
}
// Show list of photos of the selected tags
elseif (!is_null($tags) && is_null($photo)) {
$output = $this->show_tags_thumbnails($tags, $page);
}
// Show the selected photo in the slected album/photoset
elseif ((!is_null($album) || !is_null($tags)) && !is_null($photo)) {
$output = $this->show_photo($album, $tags, $photo, $page);
}
}
if ($this->has_error) {
$this->template->reset('error');
$this->template->set('message', $this->error_detail);
$output = $this->template->fetch();
}
return $output;
}

