Ejemplo n.º 1
0
    if ($objUser) {
        $objMiniMenu->add('Mark All as Seen', 'index.php?action=albums&subaction=seen&' . $objAlbum->getIDPair());
    }
    $objTemplate->setText('PAGETITLE', 'Albums' . ($objAlbum->get('id') == 0 ? '' : " -- " . $objAlbum->get('name')));
    /* Get the array of sub albums. */
    $arrSubAlbums = $objAlbum->getSubAlbums($objUser);
    /* This script allows the albums to be expanded/hidden. */
    $objTemplate->setText('SCRIPT', clsAlbum::getSubAlbumScript());
    $objTemplate->setText('SCRIPT', clsAlbum::getAllAlbumScript($arrSubAlbums));
    /* Display the caption  */
    if (strlen($objAlbum->get('caption'))) {
        print "<span class='albumcaption'>" . bbcode_format($objAlbum->get('caption')) . "</span><hr>";
    }
    /* If it's the base album, allow filtering by user. */
    if ($objAlbum->isNew()) {
        print $objAlbum->getUserFilter("Filter by user") . "<hr>";
    }
    /* Display the expand/contract all buttons. */
    print "<a href='#' onClick='expand_all()' class='nounderline'><img src='images/expand.png'> Expand All</a><br>";
    print "<a href='#' onClick='contract_all()' class='nounderline'><img src='images/contract.png'> Hide All</a><br>";
    print "<br>";
    /* Display any sub-albums. */
    clsAlbum::displayAlbums($arrSubAlbums, $objUser);
    /* Display any pictures. */
    clsPicture::displayPictures($objAlbum->getPictures(), $objAlbum->get('id') ? true : false);
}
if ($strSubAction == 'useralbums') {
    if ($objUser && $objUser->get('remember_filter')) {
        $objUser->set('filter_user', $objMember->get('id'));
        $objUser->save();
    }