コード例 #1
0
ファイル: albums.php プロジェクト: shifter/ospap2
}
if ($strSubAction == 'groupalbums') {
    $objTemplate->setText('PAGETITLE', "Albums in " . $objGroup->get('name'));
    $objBreadcrumbs->add('Groups', 'index.php?action=groups');
    $objBreadcrumbs->add($objGroup->get('name'), 'index.php?action=groups&subaction=view&' . $objGroup->getIDPair());
    $objBreadcrumbs->add('Albums', "index.php?action=albums&subaction=groupalbums" . $objGroup->getIDPair());
    $arrAlbums = clsGroup::getAlbumsByGroup($objUser, $objGroup);
    /* This script allows the albums to be expanded/hidden. */
    $objTemplate->setText('SCRIPT', clsAlbum::getSubAlbumScript());
    $objTemplate->setText('SCRIPT', clsAlbum::getAllAlbumScript($arrAlbums));
    /* 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($arrAlbums, $objUser);
}
if ($strSubAction == 'userpictures') {
    if (!$objMember || $objMember->isNew()) {
        $objMember = $objUser;
    }
    $objTemplate->setText('PAGETITLE', $objMember->get('username') . "'s Pictures");
    $objBreadcrumbs->add('Members', 'index.php?action=members');
    $objBreadcrumbs->add($objMember->get('username'), 'index.php?action=members&subaction=view&' . $objGroup->getIDPair());
    $objBreadcrumbs->add("Pictures", "index.php?action=albums&subaction=userpictures&" . $objMember->getIDPair());
    clsPicture::displayPictures(clsAlbum::getPicturesByUser($objUser, $objMember));
}
if ($strSubAction == 'grouppictures') {
    $objTemplate->setText('PAGETITLE', "Pictures in " . $objGroup->get('name'));
    $objBreadcrumbs->add('Groups', 'index.php?action=groups');
    $objBreadcrumbs->add($objGroup->get('name'), 'index.php?action=groups&subaction=view&' . $objGroup->getIDPair());