Пример #1
0
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());
    $objBreadcrumbs->add("Pictures", "index.php?action=albums&subaction=userpictures&" . $objMember->getIDPair());
    clsPicture::displayPictures(clsGroup::getPicturesByGroup($objUser, $objGroup));
}
if ($strSubAction == 'newpictures') {
    if ($objUser == null) {
        throw new Exception('exception_accessdenied');
    }
    $objTemplate->setText('PAGETITLE', "New Pictures");
    $objMiniMenu->add('Mark all as seen', "index.php?action=albums&subaction=seen");
    $objBreadcrumbs->add("New pictures", "index.php?action=albums&subaction=newpictures&" . $objMember->getIDPair());
    clsPicture::displayPictures(clsPicture::getNewPictures($objUser));
}
if ($strSubAction == 'save') {
    $blnGood = true;
    if (!$objUser) {
        throw new Exception('exception_notloggedin');
    }
Пример #2
0
        }
        if ($isPotential) {
            print "<em>";
        }
        print "\t\t<a href='index.php?action=groups&subaction=view&" . $objGroup->getIDPair() . "' class='nounderline'>" . $objGroup->get('name') . "</a></td>";
        if ($isPotential) {
            print "</em>";
        }
        if ($isMember) {
            print "</strong>";
        }
        print "\t</td>";
        print "<td><a href='index.php?action=members&subaction=view&" . $objFounder->getIDPair() . "'>" . $objFounder->get('username') . "</a></td>";
        print "<td align='center'>" . sizeof($objGroup->getMembers()) . "</td>";
        print "<td align='center'><a href='index.php?action=albums&subaction=groupalbums&" . $objGroup->getIDPair() . "'>" . sizeof(clsGroup::getAlbumsByGroup($objUser, $objGroup)) . "</a></td>";
        print "<td align='center'><a href='index.php?action=albums&subaction=grouppictures&" . $objGroup->getIDPair() . "'>" . sizeof(clsGroup::getPicturesByGroup($objUser, $objGroup)) . "</a></td>";
        print "</tr>";
    }
    print "</table>";
}
if ($strSubAction == 'view') {
    if ($objGroup->get('is_hidden') && !$objGroup->isMemberOrPotential($objUser) && (!$objUser || !$objUser->get('is_admin'))) {
        throw new Exception('exception_accessdenied');
    }
    $objTemplate->setText('PAGETITLE', "Viewing Group: " . $objGroup->get('name'));
    $objMiniMenu->add('List', 'index.php?action=groups');
    /* The user is not a member of the group. */
    if (!$objGroup->isMemberOrPotential($objUser)) {
        $objMiniMenu->add('Join', 'index.php?action=groups&subaction=join&' . $objGroup->getIDPair());
    }
    /* The user has requested a join, but it hasn't happened yet. */