Beispiel #1
0
function displayPtOwnerList(\lib\Objects\PowerTrail\PowerTrail $powerTrail)
{
    $ptOwners = $powerTrail->getOwners();
    $ownerList = '';
    isset($_SESSION['user_id']) ? $userLogged = $_SESSION['user_id'] : ($userLogged = -1);
    /* @var $owner lib\Objects\PowerTrail\Owner*/
    foreach ($ptOwners as $owner) {
        $ownerList .= '<a href="viewprofile.php?userid=' . $owner->getUserId() . '">' . $owner->getUserName() . '</a>';
        if ($owner->getUserId() != $userLogged) {
            $ownerList .= '<span style="display: none" class="removeUserIcon"><img onclick="ajaxRemoveUserFromPt(' . $owner->getUserId() . ');" src="tpl/stdstyle/images/free_icons/cross.png" width=10 title="' . tr('pt029') . '" /></span>, ';
        } else {
            $ownerList .= ', ';
        }
    }
    $ownerList = substr($ownerList, 0, -2);
    return $ownerList;
}