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(); } if (!$objMember || $objMember->isNew()) { header("Location: index.php?action=albums"); exit; } $objTemplate->setText('PAGETITLE', $objMember->get('username') . "'s Albums"); $objBreadcrumbs->add('Members', 'index.php?action=members'); $objBreadcrumbs->add($objMember->get('username'), 'index.php?action=members&subaction=view&' . $objGroup->getIDPair()); $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') {
<?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');