Beispiel #1
0
    protected function tableCell_from($message)
    {
        $direction_in = $message->IdReceiver == $_SESSION['IdMember'];
        $contact_username = $direction_in ? $message->senderUsername : $message->receiverUsername;
        $date_sent = $message->DateSent;
        $date_created = $message->created;
        $layoutbits = new MOD_layoutbits();
        $date_string = date("M d, Y - H:i", strtotime($date_created));
        ?>
        <table><tr>
        <td>
        <?php 
        echo MOD_layoutbits::PIC_50_50($contact_username, '');
        ?>
        </td>
        <td>
        <a class="username" href="members/<?php 
        echo $contact_username;
        ?>
"><strong><?php 
        echo $contact_username;
        ?>
</strong></a>
        <br />
        <span class="small" title="<?php 
        echo $date_created;
        ?>
"><?php 
        echo $layoutbits->ago(strtotime($date_created));
        ?>
</span>
        </td>
        </tr></table>
        <?php 
    }
Beispiel #2
0
    protected function column_col3()
    {
        $words = $this->getWords();
        $member = $this->member;
        $visitor_count = $this->member->getVisitorCount();
        $layoutbits = new MOD_layoutbits();
        $purifier = MOD_htmlpure::getBasicHtmlPurifier();
        if (!$visitor_count) {
            echo $words->get("ProfileNoVisitors");
            return;
        }
        $params = new StdClass();
        $params->strategy = new HalfPagePager('right');
        $params->items = $visitor_count;
        $params->items_per_page = 20;
        $pager = new PagerWidget($params);
        $pager->render();
        echo '<div class="myvisitors">';
        foreach ($member->getVisitorsSubset($pager) as $m) {
            $image = new MOD_images_Image('', $m->Username);
            $image = MOD_layoutbits::PIC_50_50($m->Username, '', $style = 'float_left framed');
            if ($m->HideBirthDate == "No") {
                $m->age = floor($layoutbits->fage_value($m->BirthDate));
            } else {
                $m->age = $words->get("Hidden");
            }
            echo <<<HTML
<div class="subcolumns">
    <div class="c33l">
        <div class="subcl">
            {$image}
            <div class="userinfo">
                <a class="username" href="members/{$m->Username}">{$m->Username}</a><br />
                <p class="small">{$words->getFormatted("visited")}: {$layoutbits->ago(strtotime($m->visited))}</p>
                <p class="small">{$words->getFormatted("yearsold", $m->age)}, {$m->city}</p>
            </div>
        </div>
    </div>
    <div class="c66r">
        <div class="subcr">
            <div class="profilesummary">{$purifier->purify(stripslashes($words->mInTrad($m->ProfileSummary, $language_id = 0, true)))}</div>
        </div>
    </div>
</div>
HTML;
        }
        echo "</div>";
    }
Beispiel #3
0
    protected function showListItem($item, $i_row)
    {
        $words = new MOD_words();
        $member = $this->createEntity('Member')->findById($item->IdRelMember);
        if ($item->WordCode == '' && ($text_params = unserialize($item->TranslationParams)) !== false) {
            $text = call_user_func_array(array($words, 'getSilent'), $text_params);
        } else {
            $text = $words->getSilent($item->WordCode, $member->Username);
        }
        $text_params = isset($text_params) ? $text_params : false;
        $created = MOD_layoutbits::ago(strtotime($item->created));
        echo <<<HTML
        <div class="floatbox">
            <a target="notify-{$item->id}" class="dynamic float_right" href="notify/{$item->id}/check" title="Remove">
                <img src="images/icons/box-close.png">
            </a>
            <div class="float_right small grey" title="{$item->created}">{$created}</div>
            <div class="float_left">
HTML;
        if ($item->IdRelMember != '') {
            echo "<a href='members/{$member->Username}'>";
            echo MOD_layoutbits::PIC_30_30($member->Username, '', "framed");
            echo '</a>';
        }
        echo "</div>";
        if ($item->Link != '') {
            echo "<a href='{$item->Link}'>";
        }
        echo <<<HTML
            <p class="notification_text">
                {$text}
            </p>
HTML;
        if ($item->Link != '') {
            echo '</a>';
        }
        echo "</div>";
    }
    echo $m->FullName;
    ?>
            <br /><?php 
    echo $m->age;
    ?>
        </td>
        <td><?php 
    echo $m->country;
    ?>
<br/><?php 
    echo $m->city;
    ?>
</td>
        <td>
            <?php 
    echo $words->getFormatted("MemberSinceColumn", MOD_layoutbits::ago(strtotime($m->created)));
    ?>
        </td>
        <td>
            <a href="members/<?php 
    echo $m->Username;
    ?>
/comments"><?php 
    echo $words->getFormatted("ViewComments") . "(" . $m->NbComments . ")";
    ?>
</a><br/>
            <?php 
    echo $purifier->purify(stripslashes($words->mInTrad($m->ProfileSummary, $language_id = 0, true)));
    ?>
        </td>
    </tr>
Beispiel #5
0
        echo $words->getSilent('by');
        ?>
 <a href="members/<?php 
        echo $thread->last_author;
        ?>
"><?php 
        echo $thread->last_author;
        ?>
</a>
                    <?php 
        if ($thread->IdGroup > 0 && $showGroups) {
            echo $words->getFormatted('in') . ' <a href="groups/' . $thread->IdGroup . '/" title="' . $words->getSilent('Group') . ": " . $thread->GroupName . '">' . MOD_layoutbits::truncate($thread->GroupName, 13);
        }
        ?>
                    <?php 
        echo '</a> - <span title="' . date($words->getSilent('DateHHMMShortFormat'), ServerToLocalDateTime($thread->last_create_time)) . '"><a href="' . $last_url . '" class="grey">' . $layoutbits->ago($thread->last_create_time) . '</a></span>';
        ?>
                    </span>
                    <a href="<?php 
        echo $last_url;
        ?>
"><img src="styles/css/minimal/images/iconsfam/bullet_go.png" alt="<?php 
        echo $words->getBuffered('to_last');
        ?>
" title="<?php 
        echo $words->getBuffered('to_last');
        ?>
" align="absmiddle" /></a><?php 
        echo $words->flushBuffer();
        ?>
                </td>
Beispiel #6
0
 <a href="members/<?php 
echo $comment->user_handle;
?>
"><?php 
echo $comment->user_handle;
?>
</a>
        <a href="blog/<?php 
echo $comment->user_handle;
?>
" title="Read blog by <?php 
echo $comment->user_handle;
?>
"><img src="images/icons/blog.gif" alt="" /></a>
         - <?php 
echo MOD_layoutbits::ago($comment->unix_created);
?>
 <a href="#" title="<?php 
echo date($format['short'], $comment->unix_created);
?>
">(i)</a>
    </div>
    <div class="text"><?php 
echo nl2br(htmlentities($comment->text, ENT_COMPAT, 'utf-8'));
?>
</div>
</td>
</tr>
</table>
</div>
     $prefix = ", ";
 }
 $gender = $layoutbits->getGenderTranslated($member->Gender, $member->HideGender, false);
 if (!empty($gender)) {
     echo $prefix . $gender;
 }
 echo '<br />';
 echo $member->CityName . ", " . $member->CountryName . '<br />';
 echo '<br />';
 echo $member->Occupation . '</div>';
 echo '</td>';
 echo '<td class="summary">' . $profileSummary . '</td>';
 echo '<td class="details"><div class="red"><div class="left">' . $accommodationIcon . '</div>' . '<div>' . $words->get('SearchMaxGuestInfo', '<strong>' . $member->MaxGuest . '</strong>') . '<br />' . $words->get('SearchCommentsInfo', '<strong>' . $member->CommentCount . '</strong>') . '</div></div>';
 echo '<div class="clearfix"></div>';
 echo $words->get('SearchMemberSinceInfo', '<strong>' . date('d M y', strtotime($member->created)) . '</strong>') . '<br />';
 $lastlogin = $member->LastLogin == '0000-00-00' ? 'Never' : $layoutbits->ago(strtotime($member->LastLogin));
 $class = 'red';
 if ($member->LastLogin != '0000-00-00') {
     switch ($layoutbits->ago_qualified(strtotime($member->LastLogin))) {
         case 0:
             $class = 'green';
             break;
         case 1:
             $class = 'orange';
             break;
         case 2:
             $class = 'red';
             break;
     }
 }
 echo $words->get('SearchMemberLastLoginInfo', '<span class="' . $class . '">' . $lastlogin . '</span>');
    protected function showListItem($message, $i_row)
    {
        $words = new MOD_words();
        extract(get_object_vars($message));
        $readstyle = '';
        if ($message->unixtime_WhenFirstRead == false) {
            $readstyle = 'message unread';
        }
        //print_r($message);
        ?>
        
        <div class="floatbox">
            <a class="float_right" href="messages/<?php 
        echo $id;
        ?>
/reply" >
                <img src="images/icons/email_go.png" alt="Reply" />
            </a>
            <?php 
        echo MOD_layoutbits::PIC_30_30($senderUsername, '', 'float_left framed');
        ?>
            <a href="messages/<?php 
        echo $id;
        ?>
" class="<?php 
        echo $readstyle;
        ?>
">
        
            <?php 
        /* Remove XHTML linebreak tags. */
        $Message = str_replace("<br />", " ", $Message);
        $Message = str_replace("<br/>", " ", $Message);
        /* Remove HTML 4.01 linebreak tags. */
        $Message = str_replace("<br>", " ", $Message);
        if (strlen($Message) >= 61) {
            echo substr($Message, 0, 58) . '... ';
        } else {
            echo $Message;
        }
        ?>
        
            </a><br />
            <span class="small grey" title="<?php 
        echo date('d. m. Y', $message->unixtime_created);
        ?>
"><?php 
        echo $words->get('from');
        ?>
 <a href="members/<?php 
        echo $senderUsername;
        ?>
"><?php 
        echo $senderUsername;
        ?>
: </a>
            <?php 
        echo MOD_layoutbits::ago($message->unixtime_created);
        ?>
</span>
        </div>
        
        <?php 
    }
Beispiel #9
0
 /**
  * Get all data for a member.
  *
  * This method is a huge monolith, but should be seen as sort of an
  * export filter and sanitiser.
  *
  * Each data field has a documentation comment of this format:
  *   field : <fieldName> : <fieldType> : <occurrance> : <comment>
  *
  * These comments will be used later to render the API documentation.
  *
  * fieldType: Matches the type in JavaScript, so for example "number" for
  * both integer and float.
  *
  * occurance: Can be either "always" or "optional". Fields labelled as
  * "always" will be included in each response, "optional" fields will only
  * be included if they are visible and have content.
  *
  * @param Member $member Member entity object.
  * @return object Object containing member data as properties.
  */
 public static function getMemberData(Member $member)
 {
     // TODO: avoid translation links in ago() when in translate mode
     // TODO: allow viewing of profile translations
     $baseURL = PVars::getObj('env')->baseuri;
     $languageId = 0;
     $memberData = new stdClass();
     // field : username : string : always
     $memberData->username = $member->Username;
     // field : isPublic : boolean : always
     $memberData->isPublic = $member->isPublic();
     // field : givenName : string : optional
     if ($member->firstname != '') {
         $memberData->givenName = $member->firstname;
     }
     // field : middleName : string : optional
     if ($member->secondname != '') {
         $memberData->middleName = $member->secondname;
     }
     // field : familyName : string : optional
     if ($member->lastname != '') {
         $memberData->familyName = $member->lastname;
     }
     // field : profileURL : string : always
     $memberData->profileURL = $baseURL . 'members/' . $member->Username;
     // field : signUpDate : string : always : Format: YYYY-MM-DD
     $memberData->signUpDate = date('Y-m-d', strtotime($member->created));
     // field : lastLogin : string : optional : Format: YYYY-MM-DD hh:mm:ss
     // TODO: make disclosure configurable in user prefs
     $memberData->lastLogin = $member->LastLogin;
     // field : lastLoginTimestamp : number : optional : Unix timestamp
     $memberData->lastLoginTimestamp = strtotime($member->LastLogin);
     // field : lastLoginFuzzy : string : optional : Fuzzy time like "3 hours ago"
     $memberData->lastLoginFuzzy = MOD_layoutbits::ago(strtotime($member->LastLogin));
     // field : numberOfComments : number : optional
     $commentCounts = $member->count_comments();
     $memberData->numberOfComments = intval($commentCounts['all']);
     // field : numberOfContacts : number : optional
     $memberData->numberOfContacts = count($member->relations);
     // field : numberOfImages : number : optional
     $memberData->numberOfImages = $member->getGalleryItemsCount();
     // field : numberOfForumPosts : number : optional
     $memberData->numberOfForumPosts = $member->forums_posts_count();
     // field : numberOfBlogPosts : number : optional
     $blogModel = new Blog();
     $blogPosts = $blogModel->getRecentPostIt($member->id);
     $memberData->numberOfBlogPosts = $blogPosts->numRows();
     // field : numberOfTrips : number : optional
     $tripsData = $member->getTripsArray();
     $memberData->numberOfTrips = count($tripsData[1]);
     // field : numberOfGroupMemberships : number : optional
     $memberData->numberOfGroupMemberships = count($member->getGroups());
     // field : occupation : string : optional
     $occupation = $member->get_trad('Occupation', $languageId, true);
     if ($occupation != '') {
         $memberData->occupation = $occupation;
     }
     // field : address : object : always
     $memberData->address = new stdClass();
     // field : address.street : string : optional
     if ($member->street != '') {
         $memberData->address->street = $member->street;
     }
     // field : address.house : string : optional
     if ($member->housenumber != '') {
         $memberData->address->house = $member->housenumber;
     }
     // field : address.postcode : string : optional
     if ($member->zip != '') {
         $memberData->address->postcode = $member->zip;
     }
     // field : location : object : always
     $memberData->location = new stdClass();
     // field : location.city : string : always
     $memberData->location->cityName = $member->city;
     // field : location.cityGeonamesId : number : always
     $memberData->location->cityGeonamesId = intval($member->IdCity);
     // field : location.cityLatitude : number : always
     // field : location.cityLongitude : number : always
     $city = $member->createEntity('Geo')->findById($member->IdCity);
     if (gettype($city) == 'object') {
         $memberData->location->cityLatitude = floatVal($city->latitude);
         $memberData->location->cityLongitude = floatVal($city->longitude);
     } else {
         $memberData->location->cityLatitude = 0;
         $memberData->location->cityLongitude = 0;
     }
     // field : location.regionName : string : always
     $memberData->location->regionName = $member->region;
     // field : location.countryName : string : always
     $memberData->location->countryName = $member->country;
     // field : location.countryCode : string : always : ISO 3166-1 alpha-2
     $memberData->location->countryCode = $member->countryCode;
     // field : age : number : optional
     if ($member->age != 'hidden') {
         $memberData->age = $member->age;
     }
     // field : gender : string : optional : Values can be female/male/other
     if ($member->Gender != '' && $member->HideGender == 'No') {
         if ($member->Gender == 'female') {
             $memberData->gender = 'female';
         } else {
             if ($member->Gender == 'male') {
                 $memberData->gender = 'male';
             } else {
                 $memberData->gender = 'other';
             }
         }
     }
     // field : summary : string : optional
     $summary = $member->get_trad('ProfileSummary', $languageId, true);
     if ($summary != '') {
         $memberData->summary = $summary;
     }
     // field : phones : object : always
     $memberPhone = $member->phone;
     $memberData->phones = new stdClass();
     // field : phones.mobile : string : optional
     if (isset($memberPhone['CellPhoneNumber'])) {
         $memberData->phones->mobile = $memberPhone['CellPhoneNumber'];
     }
     // field : phones.home : string : optional
     if (isset($memberPhone['HomePhoneNumber'])) {
         $memberData->phones->home = $memberPhone['HomePhoneNumber'];
     }
     // field : phones.work : string : optional
     if (isset($memberPhone['WorkPhoneNumber'])) {
         $memberData->phones->work = $memberPhone['WorkPhoneNumber'];
     }
     // field : picture : object : always
     // TODO: add image width and height (tricky for the full image)
     $avatarBase = $baseURL . 'members/avatar/' . $member->Username . '?';
     $memberData->picture = new stdClass();
     // field : picture.tiny : object : always
     $memberData->picture->tiny = new stdClass();
     // field : picture.tiny.url : string : always
     $memberData->picture->tiny->url = $avatarBase . '30_30';
     // field : picture.small : object : always
     $memberData->picture->small = new stdClass();
     // field : picture.small.url : string : always
     $memberData->picture->small->url = $avatarBase . 'xs';
     // field : picture.medium : object : always
     $memberData->picture->medium = new stdClass();
     // field : picture.medium.url : string : always
     $memberData->picture->medium->url = $avatarBase . '150';
     // field : picture.full : object : always
     $memberData->picture->full = new stdClass();
     // field : picture.full.url : string : always
     $memberData->picture->full->url = $avatarBase . '500';
     // field : languagesSpoken : array : always
     // TODO: add ISO 639-1 code (e.g. "en", needs to be added to database)
     //       and level (native/beginner/..)
     $languages = array();
     foreach ($member->languages_spoken as $language) {
         $languages[] = array('name' => $language->Name);
     }
     $memberData->languagesSpoken = $languages;
     // field : website : string : optional
     if ($member->WebSite != '') {
         $memberData->website = $member->WebSite;
     }
     // field : chatContacts : object : always
     $memberData->chatContacts = new stdClass();
     $chats = $member->get_messengers();
     // field : chatContacts.aol : string : optional
     // field : chatContacts.google : string : optional
     // field : chatContacts.icq : string : optional
     // field : chatContacts.msn : string : optional
     // field : chatContacts.other : string : optional
     // field : chatContacts.skype : string : optional
     // field : chatContacts.yahoo : string : optional
     foreach ($chats as $chat) {
         if ($chat['address'] != '') {
             $network = strtolower($chat['network_raw']);
             $memberData->chatContacts->{$network} = $chat['address'];
         }
     }
     // accommodation, using temporary short variable name
     $acc = new stdClass();
     // field : accommodation.offered : string : always : Values can be yes/no/maybe
     if ($member->Accomodation == 'anytime') {
         $acc->offered = 'yes';
     } else {
         if ($member->Accomodation == 'neverask') {
             $acc->offered = 'no';
         } else {
             if ($member->Accomodation == 'dependonrequest') {
                 $acc->offered = 'maybe';
             }
         }
     }
     // field : accommodation.numberOfGuests : number : always
     $acc->numberOfGuests = intval($member->MaxGuest);
     // field : accommodation.lengthOfStay : string : optional
     $lengthOfStay = $member->get_trad('MaxLenghtOfStay', $languageId, true);
     if ($lengthOfStay != '') {
         $acc->lengthOfStay = $lengthOfStay;
     }
     // field : accommodation.livingWith : string : optional
     $livingWith = $member->get_trad('ILiveWith', $languageId, true);
     if ($livingWith != '') {
         $acc->livingWith = $livingWith;
     }
     // field : accommodation.pleaseBring : string : optional
     $pleaseBring = $member->get_trad('PleaseBring', $languageId, true);
     if ($pleaseBring != '') {
         $acc->pleaseBring = $pleaseBring;
     }
     // field : accommodation.offerForGuests : string : optional
     $offerForGuests = $member->get_trad('OfferGuests', $languageId, true);
     if ($offerForGuests != '') {
         $acc->offerForGuests = $offerForGuests;
     }
     // field : accommodation.offerForHosts : string : optional
     $offerForHosts = $member->get_trad('OfferHosts', $languageId, true);
     if ($offerForHosts != '') {
         $acc->offerForHosts = $offerForHosts;
     }
     // field : accommodation.publicTransport : string : optional
     $publicTransport = $member->get_trad('PublicTransport', $languageId, true);
     if ($publicTransport != '') {
         $acc->publicTransport = $publicTransport;
     }
     // field : accommodation.otherRestrictions : string : optional
     $otherRestrictions = $member->get_trad('OtherRestrictions', $languageId, true);
     if ($otherRestrictions != '') {
         $acc->otherRestrictions = $otherRestrictions;
     }
     // field : accommodation.additionalInfo : string : optional
     $additionalInfo = $member->get_trad('AdditionalAccomodationInfo', $languageId, true);
     if ($additionalInfo != '') {
         $acc->additionalInfo = $additionalInfo;
     }
     // prepare offers boolean fields
     $offers = explode(',', $member->TypicOffer);
     // field : accommodation.offersGuidedTour : boolean : always
     if (in_array('guidedtour', $offers)) {
         $acc->offersGuidedTour = true;
     } else {
         $acc->offersGuidedTour = false;
     }
     // field : accommodation.offersDinner : boolean : always
     if (in_array('dinner', $offers)) {
         $acc->offersDinner = true;
     } else {
         $acc->offersDinner = false;
     }
     // field : accommodation.wheelchairAccessible : boolean : always
     if (in_array('CanHostWeelChair', $offers)) {
         $acc->wheelchairAccessible = true;
     } else {
         $acc->wheelchairAccessible = false;
     }
     // prepare restrictions boolean fields
     $restrictions = explode(',', $member->Restrictions);
     // field : accommodation.noSmoking : boolean : always
     if (in_array('NoSmoker', $restrictions)) {
         $acc->noSmoking = true;
     } else {
         $acc->noSmoking = false;
     }
     // field : accommodation.noAlcohol : boolean : always
     if (in_array('NoAlchool', $restrictions)) {
         $acc->noAlcohol = true;
     } else {
         $acc->noAlcohol = false;
     }
     // field : accommodation.noOtherDrugs : boolean : always
     if (in_array('NoDrugs', $restrictions)) {
         $acc->noOtherDrugs = true;
     } else {
         $acc->noOtherDrugs = false;
     }
     // field : accommodation : object : always
     $memberData->accommodation = $acc;
     // field : hobbies : string : optional
     $hobbies = $member->get_trad('Hobbies', $languageId, true);
     if ($hobbies != '') {
         $memberData->hobbies = $hobbies;
     }
     // field : favouriteBooks : string : optional
     $favouriteBooks = $member->get_trad('Books', $languageId, true);
     if ($favouriteBooks != '') {
         $memberData->favouriteBooks = $favouriteBooks;
     }
     // field : favouriteMusic : string : optional
     $favouriteMusic = $member->get_trad('Music', $languageId, true);
     if ($favouriteMusic != '') {
         $memberData->favouriteMusic = $favouriteMusic;
     }
     // field : favouriteFilms : string : optional
     $favouriteFilms = $member->get_trad('Movies', $languageId, true);
     if ($favouriteFilms != '') {
         $memberData->favouriteFilms = $favouriteFilms;
     }
     // field : organisations : string : optional
     $organisations = $member->get_trad('Organizations', $languageId, true);
     if ($organisations != '') {
         $memberData->organisations = $organisations;
     }
     // field : pastTrips : string : optional
     $pastTrips = $member->get_trad('PastTrips', $languageId, true);
     if ($pastTrips != '') {
         $memberData->pastTrips = $pastTrips;
     }
     // field : plannedTrips : string : optional
     $plannedTrips = $member->get_trad('PlannedTrips', $languageId, true);
     if ($plannedTrips != '') {
         $memberData->plannedTrips = $plannedTrips;
     }
     return $memberData;
 }
Beispiel #10
0
                        <a href="members/<?php 
    echo $thread->last_author;
    ?>
"><?php 
    echo $thread->last_author;
    ?>
</a>
                        <br />
                        <span class="forumsboardthreadtags" title="<?php 
    echo date($words->getSilent('DateHHMMShortFormat'), ServerToLocalDateTime($thread->last_create_time));
    ?>
"><a href="<?php 
    echo $last_url;
    ?>
"><?php 
    echo $layoutbits->ago($thread->last_create_time);
    ?>
</a></span>
                        <a href="<?php 
    echo $last_url;
    ?>
"><img src="styles/css/minimal/images/iconsfam/bullet_go.png" align="absmiddle" alt="<?php 
    echo $words->getBuffered('to_last');
    ?>
" title="<?php 
    echo $words->getBuffered('to_last');
    ?>
" /></a><?php 
    echo $words->flushBuffer();
    ?>
                    </span>
Beispiel #11
0
        }
        ?>
</a> <a href="gallery/img?id=<?php 
        echo $d->id;
        ?>
" class="lightview" rel="gallery[BestOf]"><img src="styles/css/minimal/images/icon_image_expand.gif" title="<?php 
        echo $words->getSilent('Preview image');
        ?>
" ><?php 
        echo $words->flushBuffer();
        ?>
</a></h4>
<?php 
        echo '
    <p class="small">
        ' . $layoutbits->ago(strtotime($d->created)) . ' ' . $words->getFormatted('by') . '
        <a href="members/' . $d->user_handle . '">' . $d->user_handle . '</a>. 
        <a href="gallery/show/user/' . $d->user_handle . '" title="' . $words->getSilent('galleryUserOthers', $d->user_handle) . '">
        <img src="styles/css/minimal/images/iconsfam/pictures.png" style="float: none">
        </a>' . $words->flushBuffer() . '
    </p>
    </div>';
    }
    echo '</div>';
    echo '<div class="floatbox">';
    $pages = $p[1];
    $maxPage = $p[2];
    $currentPage = $page;
    $request = $requestStr . '/=page%d';
    if (!isset($nopagination) || !$nopagination) {
        require 'pages.php';
    $GalleryRight = $R->hasRight('Gallery');
}
if (!isset($vars['errors'])) {
    $vars['errors'] = array();
}
$Previous = $this->previous;
$Next = $this->next;
$userpic = MOD_layoutbits::PIC_30_30($d->user_handle, '', $style = 'float_left');
echo <<<HTML
    <div class="floatbox" style="padding-top: 30px;">
        {$userpic}
        {$words->flushBuffer()}
        <h3><a href="gallery/show/user/{$image->user_handle}">{$words->getFormatted('galleryUserOthers', $image->user_handle)}</a></h3>
    </div>
HTML;
$UserId = 1;
$SetId = false;
require_once 'surrounditems_small.php';
if ($this->gallery) {
    echo '<div class="floatbox" style="padding-top: 30px;"><h3 class="borderless">' . $words->getFormatted('Belongs to album') . '</h3>';
    echo '<a href="gallery/show/sets/' . $this->gallery->id . '">' . htmlspecialchars($this->gallery->title) . '</a>
    </div>';
}
$d = $image;
echo '    <div class="floatbox" style="padding-top: 30px;">
<h3 class="borderless">' . $words->getFormatted('GalleryImageAdditionalInfo') . '</h3>';
echo '  
    <p class="small" title="' . $d->created . '">' . $words->get('created') . ': ' . $layoutbits->ago(strtotime($d->created)) . '</br>' . $words->getFormatted('by') . ' <a href="members/' . $d->user_handle . '">' . $d->user_handle . '</a></p>
    <p class="small"><a href="gallery/img?id=' . $d->id . '&amp;t=1" title="' . $words->getSilent('GalleryOriginal') . '" />' . $d->width . 'x' . $d->height . '</a>; ' . $d->mimetype . '</p>
    <p class="small"><a href="gallery/img?id=' . $d->id . '&amp;s=1"><img src="images/icons/disk.png" alt="' . $words->getSilent('GalleryDownload') . '" title="' . $words->getSilent('GalleryDownload') . '"/> </a>  </a>' . $words->flushBuffer() . '</p>
    </div>';
<?php 
    foreach ($this->data as $dat) {
        echo '<tr><td class="awlistcode"><p>' . htmlspecialchars($dat->EngCode) . '</p>';
        if ($dat->EngDnt == 'yes') {
            echo '<span class="awdntwarning">Do not translate</span>';
        }
        if ($this->nav['grep'] > 0) {
            echo '<a href="bw/admin/admingrep.php?action=grep&submit=find&s2=ww&s1=';
            echo htmlspecialchars($dat->EngCode) . '&scope=layout/*;*;lib/*">grep</a>';
        }
        echo '<p class="smallXtext">' . htmlspecialchars($dat->EngDesc) . '</p>';
        echo '</td>';
        if ($this->nav['shortcode'] != 'en') {
            echo '<td class="awlisteng">' . $this->purifier->purify($dat->EngSent);
            echo '<p class="awlistupdate">Last update ' . $layoutbits->ago(strtotime($dat->EngUpdated)) . ' ' . htmlspecialchars($dat->EngMember) . '</p>';
            echo '</td>';
        }
        if ($dat->missing) {
            // missing translation
            echo '<td class="awlisttrmis">';
            echo '<br /><a class="button" href="/admin/word/edit/' . htmlspecialchars($dat->EngCode) . '">ADD</a>';
        } else {
            if ($dat->update) {
                // update needed
                echo '<td class="awlisttrupd">';
                echo $this->purifier->purify($dat->Sentence);
                echo '<fieldset><legend>update needed?</legend>';
                echo '<input type="submit" value="Edit" name="Edit_' . (int) $dat->TrId . '" />';
                echo '<input type="submit" value="This is ok" onclick="" name="ThisIsOk_' . (int) $dat->TrId . '" />';
                echo '</fieldset>';
Beispiel #14
0
function ShowMembersAjaxShort($TM, $maxpos, $Accomodation, $Nr)
{
    static $ii = 0;
    $words = new MOD_words();
    $layoutbits = new MOD_layoutbits();
    $memberProfileLink = "members/" . $TM->Username;
    $ago = $TM->LastLogin == 0 ? $layoutbits->ago($TM->LastLogin) : $layoutbits->ago(strtotime(implode('/', explode('-', $TM->LastLogin))));
    if ($TM->Accomodation == '') {
        $TM->Accomodation = 'dependonrequest';
    }
    $info_styles = array(0 => "<div class=\"blank \" align=\"left\" valign=\"center\">", 1 => "<div class=\"highlight \" align=\"left\" valign=\"center\">");
    $string = $info_styles[$ii++ % 2];
    // this display the <tr>
    $string .= "<table id=\"memberDetail" . $Nr . "\" class=\"profileLinkArea full\"";
    // highlight marker on member list mouse over: $string .= " onmouseover=\"mapBuilder.highlightMarker(".$Nr.");\" onmouseout=\"mapBuilder.unhighlightMarker(".$Nr.");\"";
    $string .= " ><tr><td valign=\"top\" class=\"memberlist\">";
    $string .= "<a class=\"profileLink\" href=" . $memberProfileLink . " target=\"_blank\">";
    $string .= "<img src=\"members/avatar/" . $TM->Username . "?xs\" class=\"framed\">";
    $string .= "</a>";
    $string .= "</td>";
    $string .= "<td class=\"memberlist\" valign=\"top\">";
    $string .= '<p><a href="members/' . $TM->Username . '" target="_blank"><b>' . $TM->Username . '</b></a><br />';
    $string .= "<span class=\"small\">" . $words->getFormatted('YearsOld', $TM->Age) . ", ";
    $strGender = $layoutbits->getGenderTranslated($TM->Gender, $TM->HideGender, false);
    if (!empty($strGender)) {
        $string .= $strGender . ", ";
    }
    $string .= $TM->CityName . ", " . $TM->CountryName . "<br />";
    $string .= $words->getFormatted('LastLogin') . ": <span title=" . $TM->LastLogin . "><strong>" . $ago . "</strong></span><br />";
    $string .= $words->getFormatted('MemberSince') . ": <span title=" . $TM->created . "><strong>" . date('d M y', strtotime($TM->created)) . "</strong><br />";
    $string .= $words->getFormatted('Comments') . ": <span title=" . $TM->NbComment . "><strong>" . $TM->NbComment . "</strong><br />";
    $string .= "</span></td><td align=\"right\" class=\"accommodation\">";
    $string .= "<div class=\"markerLabelList " . $TM->Accomodation . "\"><a href=\"javascript:geosearchMapBuilder.openMarker(" . $Nr . ");\" title=\"" . $words->getBuffered('Accomodation') . ": " . $Accomodation[$TM->Accomodation] . "\">" . $Nr . "</a></div>";
    $string .= "</td></tr></table>";
    $string .= "</div>";
    return $string;
}