Example #1
0
$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');
        $isMember = $objGroup->isMember($objUser);
        $isPotential = $objGroup->isRequestedMember($objUser) || $objGroup->isInvitedMember($objUser);
        print "<tr>";
        print "\t<td>";
        if ($isMember) {