Ejemplo n.º 1
0
    $objBreadcrumbs->add('Albums', "index.php?action=albums&subaction=memberalbums" . $objMember->getIDPair());
    $arrAlbums = clsAlbum::getUserAlbums($objUser, $objMember);
    /* 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>";
    /* Allow filtering by user. */
    print $objAlbum->getUserFilter("Show all albums") . "<hr>";
    /* Display any sub-albums. */
    clsAlbum::displayAlbums($arrAlbums, $objUser);
}
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') {
Ejemplo n.º 2
0
<?php

require_once 'cls/clsGroup.php';
require_once 'cls/clsTemplate.php';
require_once 'cls/clsUser.php';
$objGroup = new clsGroup();
$objGroup->getFromRequest();
$objGroup->load();
$objMember = new clsUser();
$objMember->getFromRequest();
$objMember->load();
$objBreadcrumbs->add('Groups', 'index.php?action=groups');
if (!$objGroup->isNew()) {
    $objBreadcrumbs->add($objGroup->get('name'), 'index.php?action=groups&subaction=view&' . $objGroup->getIDPair());
}
if ($strSubAction == '') {
    $objTemplate->setText('PAGETITLE', "Groups");
    if ($objUser) {
        $objMiniMenu->add('Create', 'index.php?action=groups&subaction=edit');
    }
    $arrGroups = clsGroup::getGroupList($objUser);
    print "<table class='groups'>";
    print "<tr>";
    print "<th width='300' align='left'>Name</td>";
    print "<th width='150' align='left'>Founder</td>";
    print "<th width='75'>Members</td>";
    print "<th width='75'>Albums</td>";
    print "<th width='75'>Pictures</td>";
    print "</tr>";
    foreach ($arrGroups as $objGroup) {
        $objFounder = $objGroup->getForeignObject('user');