} /* Check for access. */ $objAlbum = new clsAlbum($objPicture->get('album_id')); if (!$objAlbum->canView($objUser)) { throw new Exception('exception_accessdenied'); } $objAlbum->addBreadcrumbs($objBreadcrumbs); // $strMiniMenu = "<li><a href='index.php?action=picture&subaction=edit&" . $objPicture->getIDPair() . "'>Create Album</a></li>"; // $objTemplate->setText('MINIMENU', "<ul>$strMiniMenu</ul>"); if ($strSubAction == '') { $objTemplate->setText('PAGETITLE', "Viewing " . $objPicture->get('title')); $objBreadcrumbs->add($objPicture->get('title'), "index.php?action=picture&" . $objPicture->getIDPair()); if ($objPicture->canEdit($objUser)) { $objMiniMenu->add('Edit', 'index.php?action=picture&subaction=edit&' . $objPicture->getIDPair()); } if ($objAlbum->canDeletePicture($objUser)) { $objMiniMenu->add('Delete', 'index.php?action=picture&subaction=delete&' . $objPicture->getIDPair()); } $objMiniMenu->add('Link to this', 'index.php?action=picture&subaction=link&' . $objPicture->getIDPair()); /* Mark this picture as viewed. */ $objPicture->setViewed($objUser); $objPictureTemplate = new clsTemplate('picture'); if ($objPrevPicture) { $objPictureTemplate->setText('PREV', "<a href='index.php?action=picture&" . $objPrevPicture->getIDPair() . "'>Previous<br>" . $objPrevPicture->getHtmlThumbnail(64, 64) . "</a>"); } else { $objPictureTemplate->setText('PREV', "<span class='disabled'>At the start</span>"); } if ($objNextPicture) { $objPictureTemplate->setText('NEXT', "<a href='index.php?action=picture&" . $objNextPicture->getIDPair() . "'>Next<br>" . $objNextPicture->getHtmlThumbnail(64, 64) . "</a>"); } else { $objPictureTemplate->setText('NEXT', "<span class='disabled'>At the end</span>");