function getMediaPage()
 {
     global $dir;
     global $tmpl;
     require_once BX_DIRECTORY_PATH_INC . 'profiles.inc.php';
     $this->getMediaArray();
     $ret = '<div class="clear_both"></div>';
     $tmplBlock = file_get_contents("{$dir['root']}templates/tmpl_{$tmpl}/media_page_block.html");
     $i = 1;
     foreach ($this->aMedia as $aValue) {
         $block = $tmplBlock;
         $aReplace['media_title'] = process_line_output($aValue['med_title']);
         $aReplace['media_icon'] = '<img src="' . getTemplateIcon($this->sMediaType . '.jpg') . '" />';
         $aReplace['nickname'] = '';
         $aReplace['download'] = '<a href="' . $this->getMediaLink($aValue) . '">' . _t('_download') . '</a>';
         $aReplace['delete'] = '<a href="' . $_SERVER['PHP_SELF'] . '?show=' . $this->sMediaType . '&amp;action=delete&amp;mediaID=' . $aValue['med_id'] . '" onclick="return confirm(\'' . _t('_are you sure?') . '\');">' . _t('_delete') . '</a>';
         foreach ($aReplace as $key => $val) {
             $block = str_replace("__{$key}__", $val, $block);
         }
         $ret .= $block;
         if ($i++ >= $this->aMediaConfig['max'][$this->sMediaType]) {
             break;
         }
     }
     $ret .= '<div class="clear_both"></div>';
     return $ret;
 }
Beispiel #2
0
 function display()
 {
     $aVars = array('bx_repeat:week_names' => $this->_getWeekNames(), 'bx_repeat:calendar_row' => $this->_getCalendar(), 'month_prev_url' => $this->getBaseUri() . "&year={$this->iPrevYear}&month={$this->iPrevMonth}", 'month_prev_name' => _t('_month_prev'), 'month_prev_icon' => getTemplateIcon('sys_back.png'), 'month_next_url' => $this->getBaseUri() . "&year={$this->iNextYear}&month={$this->iNextMonth}", 'month_next_name' => _t('_month_next'), 'month_next_icon' => getTemplateIcon('sys_next.png'), 'month_current' => $this->getTitle());
     $sHtml = $GLOBALS['oSysTemplate']->parseHtmlByName('calendar.html', $aVars);
     $sHtml = preg_replace('#<bx_repeat:events>.*?</bx_repeat:events>#s', '', $sHtml);
     $GLOBALS['oSysTemplate']->addCss('calendar.css');
     return $sHtml;
 }
 function getBlockCode_ViewAll()
 {
     bx_sites_import('SearchResult');
     $oSearchResult = new BxSitesSearchResult('home');
     if ($s = $oSearchResult->displayResultBlock(true, true)) {
         return array($s, array(_t('RSS') => array('href' => $this->_oConfig->getBaseUri() . 'browse/all?rss=1', 'target' => '_blank', 'icon' => getTemplateIcon('rss.png'))));
     } else {
         return MsgBox(_t('_Empty'));
     }
 }
 function genQuickLink($sText, $sLink, $sOnclick, $iItemID, $sPictureVal)
 {
     $sOnclick = $sOnclick ? ' onclick="' . $sOnclick . '" ' : '';
     if (strpos($sLink, 'http://') === false && strpos($sLink, 'https://') === false && !$sOnclick) {
         $sLink = BX_DOL_URL_ROOT . $sLink;
     }
     $sScriptAction = !$sOnclick ? " onclick=\"window.open ('{$sLink}','_self');\" " : $sOnclick;
     $isFontIcon = false === strpos($sPictureVal, '.');
     return $GLOBALS['oSysTemplate']->parseHtmlByName('quick_link.html', array('bx_if:icon' => array('condition' => !$isFontIcon, 'content' => array('picture' => getTemplateIcon($sPictureVal), 'caption' => $sText, 'action' => $sScriptAction)), 'bx_if:texticon' => array('condition' => $isFontIcon, 'content' => array('picture' => $sPictureVal, 'caption' => $sText, 'action' => $sScriptAction)), 'action' => $sScriptAction, 'caption' => $sText));
 }
Beispiel #5
0
 function __construct($aModule)
 {
     parent::__construct($aModule);
     $this->_iAnimationSpeed = 'normal';
     $this->sSpacerPath = getTemplateIcon('spacer.gif');
     $this->sSQLPostsTable = 'bx_ads_main';
     $this->sSQLPostsMediaTable = 'bx_ads_main_media';
     $this->sSQLCatTable = 'bx_ads_category';
     $this->sSQLSubcatTable = 'bx_ads_category_subs';
     $this->_sCommentSystemName = "ads";
 }
Beispiel #6
0
 /**
  * Function will generate searched result;
  *
  * @return : (text) - Html presentation data ;
  */
 function displaySearchBox($sCode, $sPaginate = '')
 {
     // generate the init poll's part ;
     $sInitSection = $this->oPollObject->getInitPollPage(false);
     if (isset($this->aCurrent['rss']) && $this->aCurrent['rss']['link']) {
         $aCaptionMenu = '<div class="dbTopMenu"><div class="notActive notActiveIcon" style="background-image:url(' . getTemplateIcon('rss.png') . ')"><a target="_blank" class="top_members_menu" href="' . $this->aCurrent['rss']['link'] . (false === strpos($this->aCurrent['rss']['link'], '?') ? '?' : '&') . 'rss=1">' . _t('RSS') . '</a></div></div>';
     }
     $sCode = DesignBoxContent(_t($this->aCurrent['title']), $sCode . $sPaginate, 1, $aCaptionMenu);
     if (!isset($_POST['searchMode'], $_GET['searchMode'])) {
         $sCode = '<div id="page_block_' . $this->id . '">' . $sCode . '<div class="clear_both"></div></div>';
     }
     // include css file ;
     $sCssStyles = $this->oPollObject->_oTemplate->addCss('main.css', true);
     return $sCssStyles . $sInitSection . $sCode;
 }
 /**
  * constructor
  */
 function BxDolEvents($bAdmMode = FALSE)
 {
     global $site;
     $this->sSpacerPath = getTemplateIcon('spacer.gif');
     $this->sPicNotAvail = 'images/icons/group_no_pic.gif';
     $this->bAdminMode = $bAdmMode;
     // $this->sRowSpacerDiv = <<<EOF
     // <table cellspacing="0" cellpadding="0" height="10" border="0">
     // <td><img src="{$this->sSpacerPath}"></td>
     // </table>
     // EOF;
     $this->iEventsPerPage = 10;
     $this->iIconSize = 45;
     $this->iThumbSize = 110;
     $this->iImgSize = 340;
 }
function getSitesHtml($sLink, $sTitle = false)
{
    if (!$sTitle) {
        $sTitle = _t('_Share');
    }
    $aSitesPrepare = getSitesArray($sLink);
    $sIconsUrl = getTemplateIcon('digg.png');
    $sIconsUrl = str_replace('digg.png', '', $sIconsUrl);
    $aSites = array();
    foreach ($aSitesPrepare as $k => $r) {
        $aSites[] = array('icon' => $sIconsUrl . $r['icon'], 'name' => $k, 'url' => $r['url']);
    }
    $aVarsContent = array('bx_repeat:sites' => $aSites);
    $aVarsPopup = array('title' => $sTitle, 'content' => $GLOBALS['oSysTemplate']->parseHtmlByName('popup_share.html', $aVarsContent));
    return $GLOBALS['oFunctions']->transBox($GLOBALS['oSysTemplate']->parseHtmlByName('popup.html', $aVarsPopup), true);
}
 function getActionsMenuItem($sPicturePath, $sText, $sLink = '', $sPath = '', $sTarget = '', $onclick = '', $iconName = '')
 {
     if (strlen($sTarget)) {
         $sTarget = ' target="' . $sTarget . '" ';
     }
     if (strlen($sPicturePath)) {
         $sPicturePath = getTemplateIcon($sPicturePath);
     }
     if (strlen($onclick)) {
         $onclick = ' onclick="' . $onclick . '" ';
     }
     if (!strlen($sPath) && !strlen($onclick)) {
         $sPath = $this->oTemplConfig->aSite['url'];
     }
     $ret = "\n\t\t<div class=\"menuLine\">\n\t\t\t<div class=\"menuLinkBlock\" style=\"background-image: url('{$sPicturePath}')\">\n\t\t\t\t<a href=\"{$sPath}{$sLink}\" title=\"{$sText}\"{$sTarget}{$onclick} class=\"menuLink\">{$sText}</a>\n\t\t\t</div>\n\t\t\t<div class=\"clear_both\"></div>\n\t\t</div>";
     $ret .= '<div class="menuLineDivider"></div>';
     return $ret;
 }
 function displaySearchBox($sCode, $sPaginate = '', $bAdminBox = false)
 {
     $sMenu = '';
     if (isset($this->aCurrent['rss']) && $this->aCurrent['rss']['link']) {
         bx_import('BxDolPageView');
         $sMenu = BxDolPageView::getBlockCaptionItemCode(time(), array(_t('RSS') => array('href' => $this->aCurrent['rss']['link'] . (false === strpos($this->aCurrent['rss']['link'], '?') ? '?' : '&') . 'rss=1', 'icon' => getTemplateIcon('rss.png'))));
     }
     $sTitle = _t($this->aCurrent['title']);
     if (!$bAdminBox) {
         $sCode = DesignBoxContent($sTitle, $sCode . $sPaginate, 1, $sMenu);
     } else {
         $sCode = DesignBoxAdmin($sTitle, $sCode, '', $sPaginate, 1);
     }
     if (!isset($_GET['searchMode'])) {
         $sCode = '<div id="page_block_' . $this->id . '">' . $sCode . '<div class="clear_both"></div></div>';
     }
     return $sCode;
 }
Beispiel #11
0
 function unit($aData, $sTemplateName, &$oVotingView, $isShort = false)
 {
     if (null == $this->_oMain) {
         $this->_oMain = BxDolModule::getInstance('BxEventsModule');
     }
     if (!$this->_oMain->isAllowedView($aData)) {
         $aVars = array();
         return $this->parseHtmlByName('twig_unit_private', $aVars);
     }
     $sImage = '';
     if ($aData['PrimPhoto']) {
         $a = array('ID' => $aData['ResponsibleID'], 'Avatar' => $aData['PrimPhoto']);
         $aImage = BxDolService::call('photos', 'get_image', array($a, 'browse'), 'Search');
         $sImage = $aImage['no_image'] ? '' : $aImage['file'];
     }
     $aVars = array('id' => $aData['ID'], 'thumb_url' => $sImage ? $sImage : $this->getImageUrl('no-image-thumb.png'), 'event_url' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aData['EntryUri'], 'event_title' => $aData['Title'], 'event_start' => $this->_oMain->_formatDateInBrowse($aData), 'spacer' => getTemplateIcon('spacer.gif'), 'participants' => $aData['FansCount'], 'country_city' => $this->_oMain->_formatLocation($aData), 'snippet_text' => $this->_oMain->_formatSnippetText($aData), 'bx_if:full' => array('condition' => !$isShort, 'content' => array('author' => $aData['ResponsibleID'] ? getNickName($aData['ResponsibleID']) : _t('_bx_events_admin'), 'author_url' => $aData['ResponsibleID'] ? getProfileLink($aData['ResponsibleID']) : 'javascript:void(0);', 'rate' => $oVotingView ? $oVotingView->getJustVotingElement(0, $aData['ID'], $aData['Rate']) : '&#160;')));
     $aVars = array_merge($aVars, $aData);
     return $this->parseHtmlByName($sTemplateName, $aVars);
 }
 function __construct($oModule, $aParam = array())
 {
     $this->_oModule = $oModule;
     $this->_aParam = $aParam;
     if (count($aParam) && isset($aParam['photo']) && $aParam['photo'] != 0) {
         $aFile = BxDolService::call('photos', 'get_photo_array', array($aParam['photo'], 'browse'), 'Search');
         if (!$aFile['no_image']) {
             $aParam = array_merge($aParam, array('thumbnail' => $GLOBALS['oBxSitesModule']->_oTemplate->parseHtmlByName('thumb110.html', array('image' => $aFile['file'], 'spacer' => getTemplateIcon('spacer.gif')))));
         }
     }
     $this->_aCustomForm = $this->getFullForm();
     $this->_aCustomForm['form_attrs']['action'] = BX_DOL_URL_ROOT . $this->_oModule->_oConfig->getBaseUri() . 'edit/' . $aParam['id'];
     $oCategories = new BxDolCategories();
     $oCategories->getTagObjectConfig();
     $this->_aCustomForm['inputs']['categories'] = $oCategories->getGroupChooser('bx_sites', (int) $this->_oModule->iOwnerId, true, $this->_aParam['categories']);
     $aFormInputsSubmit = array('Submit' => array('type' => 'submit', 'name' => 'submit_form', 'value' => _t('_Submit'), 'colspan' => false));
     $this->_aCustomForm['inputs'] = array_merge($this->_aCustomForm['inputs'], $aFormInputsSubmit);
     parent::__construct($this->_aCustomForm);
 }
 function unit($aData, $sTemplateName, &$oVotingView)
 {
     if (null == $this->_oMain) {
         $this->_oMain = BxDolModule::getInstance('BxEventsModule');
     }
     if (!$this->_oMain->isAllowedView($aData)) {
         $aVars = array('extra_css_class' => 'bx_events_unit');
         return $this->parseHtmlByName('browse_unit_private', $aVars);
     }
     $sImage = '';
     if ($aData['PrimPhoto']) {
         $a = array('ID' => $aData['ResponsibleID'], 'Avatar' => $aData['PrimPhoto']);
         $aImage = BxDolService::call('photos', 'get_image', array($a, 'browse'), 'Search');
         $sImage = $aImage['no_image'] ? '' : $aImage['file'];
     }
     $aVars = array('id' => $aData['ID'], 'thumb_url' => $sImage ? $sImage : $this->getIconUrl('no-photo.png'), 'event_url' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aData['EntryUri'], 'event_title' => $aData['Title'], 'event_start' => defineTimeInterval($aData['EventStart']), 'author' => $aData['ResponsibleID'] ? $aData['NickName'] : _t('_bx_events_admin'), 'author_url' => $aData['ResponsibleID'] ? getProfileLink($aData['ResponsibleID']) : 'javascript:void(0);', 'author_title' => _t('_From'), 'spacer' => getTemplateIcon('spacer.gif'), 'participants' => $aData['FansCount'], 'country_city' => _t($GLOBALS['aPreValues']['Country'][$aData['Country']]['LKey']) . (trim($aData['City']) ? ', ' . $aData['City'] : ''));
     $aVars['rate'] = $oVotingView ? $oVotingView->getJustVotingElement(0, $aData['ID'], $aData['Rate']) : '&#160;';
     $aVars = array_merge($aVars, $aData);
     return $this->parseHtmlByName($sTemplateName, $aVars);
 }
 function ajaxBrowse($sMode, $iPerPage, $aMenu = array(), $sValue = '', $isDisableRss = false, $isPublicOnly = true)
 {
     bx_import('SearchResult', $this->oMain->_aModule);
     $sClassName = $this->sSearchResultClassName;
     $o = new $sClassName($sMode, $sValue);
     $o->aCurrent['paginate']['perPage'] = $iPerPage;
     $o->setPublicUnitsOnly($isPublicOnly);
     if (!$aMenu) {
         $aMenu = $isDisableRss ? '' : array(_t('RSS') => array('href' => $o->aCurrent['rss']['link'] . (false === strpos($o->aCurrent['rss']['link'], '?') ? '?' : '&') . 'rss=1', 'icon' => getTemplateIcon('rss.png')));
     }
     if ($o->isError) {
         return array(MsgBox(_t('_Error Occured')), $aMenu);
     }
     if (!($s = $o->displayResultBlock())) {
         return $isPublicOnly ? array(MsgBox(_t('_Empty')), $aMenu) : '';
     }
     $sFilter = false !== bx_get($this->sFilterName) ? $this->sFilterName . '=' . bx_get($this->sFilterName) . '&' : '';
     $oPaginate = new BxDolPaginate(array('page_url' => 'javascript:void(0);', 'count' => $o->aCurrent['paginate']['totalNum'], 'per_page' => $o->aCurrent['paginate']['perPage'], 'page' => $o->aCurrent['paginate']['page'], 'on_change_page' => 'return !loadDynamicBlock({id}, \'' . $this->sUrlStart . $sFilter . 'page={page}&per_page={per_page}\');'));
     $sAjaxPaginate = $oPaginate->getSimplePaginate($this->oConfig->getBaseUri() . $o->sBrowseUrl);
     return array($s, $aMenu, $sAjaxPaginate, '');
 }
function printNewsPanel($iLimit = 0, $iPreview = 128)
{
    global $site;
    $php_date_format = getParam('php_date_format');
    // news
    $news_limit_chars = getParam("max_news_preview");
    $bNewsFriendly = getParam('permalinks_news') == 'on' ? true : false;
    $news_res = getNewsList($iLimit);
    $news_count = db_arr("SELECT COUNT(*) FROM `News`");
    $news_counter = $news_count['0'];
    $ret = '';
    if ($news_counter > 0) {
        while ($news_arr = mysql_fetch_assoc($news_res)) {
            $ret .= '<div class="newsWrap">';
            $ret .= '<div class="newsHead">';
            $ret .= '<a href="' . getNewsUrl($news_arr['newsID'], $news_arr['NewsUri'], $bNewsFriendly) . '">';
            $ret .= process_line_output($news_arr['Header']);
            $ret .= '</a>';
            $ret .= '</div>';
            //$ret .= '<div class="newsInfo"><img src="' . getTemplateIcon( 'clock.gif' ) . '" />' . date( $php_date_format, $news_arr['Date'] ) . '</div>';
            $ret .= '<div class="newsInfo"><img src="' . getTemplateIcon('clock.gif') . '" />' . LocaledDataTime($news_arr['Date']) . '</div>';
            $ret .= '<div class="newsText">';
            //$ret .= process_text_withlinks_output( $news_arr['Snippet'] );
            $ret .= process_html_output($news_arr['Snippet']);
            $ret .= '</div>';
            $ret .= '</div>';
        }
        if ($news_counter > $max_news_on_home) {
            $sNewsLink = $bNewsFriendly ? $site['url'] . 'news/' : $site['url'] . 'news.php';
            $ret .= '<div class="newsReadMore">';
            $ret .= '<a href="' . $sNewsLink . '">' . _t("_Read news in archive") . '</a>';
            $ret .= '</div>';
        }
    } else {
        $ret .= '<div class="no_result"><div>' . _t("_No news available") . '</div></div>';
    }
    return $ret;
}
Beispiel #16
0
 /**
  * Function will generate the browse link ;
  *
  * @param  : $sName      (string) - link's name;
  * @param  : $sValue     (string) - link's extended value;
  * @param  : $sLink      (string) - link's location;
  * @param  : $sIco       (string) - link's icon;
  * @param  : $bImgDetect (boolean) - if isset this param img path will detect with "getTemplateIcon";
  * @return : Html presentation data;
  */
 function genBrowseLink($sName, $sValue, $sLink, $sIcon, $bImgDetect = true)
 {
     // try to find link's icon
     if ($bImgDetect) {
         $sIcon = getTemplateIcon($sIcon);
     }
     $sValue = $sValue ? '<span>(' . $sValue . ')</span>' : null;
     return '
         <div class="linkSection">
             <table>
                 <tr>
                     <td>
                         <img src="' . $sIcon . '" alt="' . $sName . '" />
                     </td>
                     <td>
                         <a href="' . $sLink . '">' . $sName . '</a>
                         ' . $sValue . '
                     </td>
                 </tr>
             </table>
         </div>
     ';
 }
function PageCodeOutbox()
{
    global $memberID;
    global $dir;
    global $site;
    global $tmpl;
    global $date_format;
    $query = "\r\n\t\tSELECT\r\n\t\t\t`Messages`.`ID`,\r\n\t\t\tUNIX_TIMESTAMP( `Date` ) AS `timestamp`,\r\n\t\t\tDATE_FORMAT(`Date`, '{$date_format}') AS `Date`,\r\n\t\t\t`Recipient`,\r\n\t\t\t`Profiles`.`NickName` AS `RecipientNickName`,\r\n\t\t\t`Subject`,\r\n\t\t\t`New`\r\n\t\tFROM `Messages`\r\n\t\tLEFT JOIN `Profiles` ON\r\n\t\t\t`Profiles`.`ID` = `Recipient`\r\n\t\tWHERE `Sender` = {$memberID}\r\n\t\tORDER BY `Date` DESC\r\n\t\t";
    $rMsgs = db_res($query);
    if (!mysql_num_rows($rMsgs)) {
        return '<div class="no_result"><div>' . _t("_No messages in Outbox") . '</div></div>';
    }
    // --- get template and replace headers ---
    $aReplace = array();
    $aReplace['mailbox_header_img'] = '<img src="' . getTemplateIcon('outbox.gif') . '" class="mailbox_header_img" />';
    //$aReplace['summary'] = _t(
    $aReplace['flag'] = _t('_Flag');
    $aReplace['from'] = _t('_Recipient');
    $aReplace['date'] = _t('_Date');
    $aReplace['subject'] = _t('_Subject');
    $aReplace['click_to_sort'] = _t('_Click to sort');
    $aReplace['actions_l'] = '';
    $aReplace['actions'] = '';
    $ret = file_get_contents("{$dir['root']}templates/tmpl_{$tmpl}/mail_box.html");
    foreach ($aReplace as $key => $val) {
        $ret = str_replace("__{$key}__", $val, $ret);
    }
    $aMyTmpl = preg_split("/\\{\\/?InsertRows\\}/", $ret);
    $tmplRow = $aMyTmpl[1];
    $ret = "{$aMyTmpl[0]}{InsertRows /}{$aMyTmpl[2]}";
    $InsertRows = '';
    $tr_class = 'odd';
    while ($aMsg = mysql_fetch_assoc($rMsgs)) {
        $sSubject = process_line_output(html2txt($aMsg['Subject']));
        $aReplace = array();
        $aReplace['tr_class'] = $tr_class;
        $aReplace['new_add'] = $aMsg['New'] ? 'new' : '';
        $aReplace['ID'] = $aMsg['ID'];
        $aReplace['CheckBox'] = '';
        $aReplace['Flag'] = '<img class="mailbox_flag_img" src="' . getTemplateIcon($aMsg['New'] ? 'not_readed.gif' : 'readed.gif') . '" title="' . _t($aMsg['New'] ? '_Not Readed' : '_Readed') . '" />';
        $aReplace['From'] = "<!--{$aMsg['RecipientNickName']}--> <a href=\"{$site['url']}{$aMsg['RecipientNickName']}\">{$aMsg['RecipientNickName']}</a>";
        $aReplace['Date'] = "<!--{$aMsg['timestamp']}--> {$aMsg['Date']}";
        $aReplace['Subject'] = "<!--{$sSubject}--> <a href=\"{$site['url']}messages_outbox.php?message={$aMsg['ID']}\">{$sSubject}</a>";
        $sInsertRow = $tmplRow;
        foreach ($aReplace as $key => $val) {
            $sInsertRow = str_replace("{{$key}}", $val, $sInsertRow);
        }
        $sInsertRows .= $sInsertRow;
        $tr_class = $tr_class == 'odd' ? 'even' : 'odd';
    }
    $ret = str_replace("{InsertRows /}", $sInsertRows, $ret);
    return $ret;
}
function getTemplateIcon($sFileName)
{
    global $site;
    global $dir;
    global $tmpl;
    $sBase = $dir['root'] . 'templates/base/images/icons/' . $sFileName;
    $sTemplate = $dir['root'] . 'templates/tmpl_' . $tmpl . '/images/icons/' . $sFileName;
    if (extFileExists($sTemplate)) {
        $iconUrl = $site['icons'] . $sFileName;
    } else {
        if (extFileExists($dir['base'] . 'images/icons/' . $sFileName)) {
            $iconUrl = $site['base'] . 'images/icons/' . $sFileName;
        } else {
            $iconUrl = getTemplateIcon('spacer.gif');
        }
    }
    return $iconUrl;
}
Beispiel #19
0
 function BxBlogsModule($aModule)
 {
     parent::BxDolModule($aModule);
     $this->iIconSize = (int) getParam('bx_blogs_iconsize');
     $this->iThumbSize = (int) getParam('bx_blogs_thumbsize');
     $this->iBigThumbSize = (int) getParam('bx_blogs_bigthumbsize');
     $this->iImgSize = (int) getParam('bx_blogs_imagesize');
     $this->sHomeUrl = $this->_oConfig->getHomeUrl();
     $this->sHomePath = $this->_oConfig->getHomePath();
     $this->_iVisitorID = isLogged() ? getLoggedId() : 0;
     //temple
     $this->bAdminMode = $this->isAdmin() == true;
     $this->iPostViewType = 1;
     $this->iViewingPostID = -1;
     $this->iLastPostedPostID = -1;
     $this->aViewingPostInfo = array();
     $this->sSpacerPath = getTemplateIcon('spacer.gif');
     $this->_sPageHeader = '';
     $this->oPrivacy = new BxBlogsPrivacy($this);
 }
 function getIconsList()
 {
     $ret = '';
     for ($i = 0; $i < $this->aMediaConfig['max']['photo']; $i++) {
         $sIconSrc = $this->sMediaDir . 'icon_' . $this->aMedia[$i]['med_file'];
         if (extFileExists($sIconSrc)) {
             $sIconUrl = $this->sMediaUrl . 'icon_' . $this->aMedia[$i]['med_file'];
             $ret .= '<a href="' . $this->aMediaConfig['url']['media'] . '?photoID=' . $this->aMedia[$i]['med_id'] . '">';
             $ret .= '<img src="' . getTemplateIcon('spacer.gif') . '" style="width:' . $this->aMediaConfig['size']['iconWidth'] . 'px; height:' . $this->aMediaConfig['size']['iconHeight'] . 'px; background-image:url(' . $sIconUrl . '); cursor:pointer;"  alt="" class="icons" onmouseover="this.className=\'iconsHover\'" onmouseout="this.className=\'icons\'" />';
             $ret .= '</a>';
         } else {
             $sIconUrl = getTemplateIcon($this->sSexIcon);
             $ret .= '<img src="' . getTemplateIcon('spacer.gif') . '" style="width:' . $this->aMediaConfig['size']['iconWidth'] . 'px; height:' . $this->aMediaConfig['size']['iconHeight'] . 'px; background-image:url(' . $sIconUrl . ');" alt="" class="icons" />';
         }
     }
     return $ret;
 }
 function getSiteStatBody($aVal, $sMode = '')
 {
     $sLink = strlen($aVal['link']) > 0 ? '<a href="' . BX_DOL_URL_ROOT . $aVal['link'] . '">{iNum} ' . _t('_' . $aVal['capt']) . '</a>' : '{iNum} ' . _t('_' . $aVal['capt']);
     if ($sMode != 'admin') {
         $sBlockId = '';
         $iNum = strlen($aVal['query']) > 0 ? db_value($aVal['query']) : 0;
     } else {
         $sBlockId = "id='{$aVal['name']}'";
         $iNum = strlen($aVal['adm_query']) > 0 ? db_value($aVal['adm_query']) : 0;
         if (strlen($aVal['adm_link']) > 0) {
             if (substr($aVal['adm_link'], 0, strlen('javascript:')) == 'javascript:') {
                 $sHref = 'javascript:void(0);';
                 $sOnclick = 'onclick="' . $aVal['adm_link'] . '"';
             } else {
                 $sHref = $aVal['adm_link'];
                 $sOnclick = '';
             }
             $sLink = '<a href="' . $sHref . '" ' . $sOnclick . '>{iNum} ' . _t('_' . $aVal['capt']) . '</a>';
         } else {
             $sLink = '{iNum} ' . _t('_' . $aVal['capt']);
         }
     }
     $sLink = str_replace('{iNum}', $iNum, $sLink);
     $sImg = false === strpos($aVal['icon'], '.') ? '<i class="sys-icon ' . $aVal['icon'] . '"></i>' : '<img src="' . getTemplateIcon($aVal['icon']) . '" alt="" />';
     $sCode = '
         <div class="siteStatUnit" ' . $sBlockId . '>
             ' . $sImg . $sLink . '
         </div>
     ';
     return $sCode;
 }
Beispiel #22
0
 function BxAdsModule($aModule)
 {
     global $site;
     parent::BxDolModule($aModule);
     $this->sHomeUrl = $this->_oConfig->getHomeUrl();
     $this->sHomePath = $this->_oConfig->getHomePath();
     $this->sUploadDir = 'media/images/classifieds/';
     $this->bUseFriendlyLinks = getParam('permalinks_module_ads') == 'on' ? true : false;
     $this->_oConfig->bUseFriendlyLinks = $this->bUseFriendlyLinks;
     $this->sPicNotAvail = $this->_oTemplate->getImageUrl('no-image-thumb.png');
     $this->sPicNotAvailPath = $this->_oTemplate->getImagePath('no-image-thumb.png');
     $this->sSpacerPath = getTemplateIcon('spacer.gif');
     $this->_iVisitorID = isLogged() ? getLoggedId() : 0;
     $this->bAdminMode = $this->isAdmin() == true ? true : false;
     $this->_oConfig->bAdminMode = $this->isAdmin() == true ? true : false;
     $this->sCurrBrowsedFile = $this->sHomeUrl . 'classifieds.php';
     $this->_oConfig->sCurrBrowsedFile = $this->sCurrBrowsedFile;
     bx_import('Privacy', $this->_aModule);
     $this->oPrivacy = new BxAdsPrivacy($this);
     $this->aPageTmpl['name_index'] = 71;
 }
Beispiel #23
0
 /**
  * Function will generate window with reply message or new compose message;
  *
  * @param        : $iRecipientID (integer) - recipient's ID ;
  * @param        : $iMessageID (integer) - message ID (optional parameter);
  * @return        : Html presentation data;
  */
 function genReplayMessage($iRecipientID, $iMessageID = 0)
 {
     global $oSysTemplate;
     $iMessageID = (int) $iMessageID;
     $iRecipientID = (int) $iRecipientID;
     // init some needed variables ;
     $sOutputHtml = '';
     $aMemberInfo = getProfileInfo($this->aMailBoxSettings['member_id']);
     $aRecipientInfo = getProfileInfo($iRecipientID);
     $aLanguageKeys = array('information' => $iMessageID ? _t('_Reply') : _t('_COMPOSE_H1'), 'cancel' => bx_js_string(_t('_Cancel')), 'send' => bx_js_string(_t('_Send')), 'send_copy' => _t('_Send copy to personal email', $aRecipientInfo['NickName']), 'send_copy_my' => _t('_Send copy to my personal email'), 'notify' => _t('_Notify by e-mail', $aRecipientInfo['NickName']), 'error_message' => bx_js_string(_t('_please_fill_next_fields_first')));
     if (!empty($aMemberInfo) && !empty($aRecipientInfo)) {
         // ** generate recipient's information ;
         $sMemberIcon = get_member_thumbnail($this->aMailBoxSettings['member_id'], 'none');
         $sMemberNickName = $aMemberInfo['NickName'];
         $sMemberLocation = getProfileLink($aMemberInfo['ID']);
         $sClockImgPath = getTemplateIcon('clock.png');
         $sCurrentDate = date('d.m.Y G:i');
         $sMessageSubject = $iMessageID ? $this->addReToSubject(db_value("\r\n                            SELECT \r\n                                `Subject` \r\n                            FROM \r\n                                `sys_messages` \r\n                            WHERE \r\n                                `ID` = {$iMessageID} \r\n                                    AND \r\n                                (\r\n                                `Sender` = {$this->aMailBoxSettings['member_id']} \r\n                                    OR \r\n                                `Recipient` = {$this->aMailBoxSettings['member_id']}\r\n                                )\r\n                            ")) : null;
         $aForm = array('form_attrs' => array('action' => null, 'method' => 'post'), 'params' => array('remove_form' => true, 'db' => array('submit_name' => 'do_submit')), 'inputs' => array('actions' => array('type' => 'input_set', 'colspan' => 'true', 0 => array('type' => 'button', 'value' => $aLanguageKeys['send'], 'attrs' => array('onclick' => 'if(typeof oMailBoxReplayMessage != \'undefined\') oMailBoxReplayMessage.sendMessage(' . $iRecipientID . ')')), 1 => array('type' => 'button', 'value' => $aLanguageKeys['cancel'], 'attrs' => array('onclick' => 'if(typeof oMailBoxReplayMessage != \'undefined\') oMailBoxReplayMessage.cancelReplay()')))));
         $oForm = new BxTemplFormView($aForm);
         $sMessageBoxActions = $oForm->getCode();
         $aTemplateKeys = array('error_message' => $aLanguageKeys['error_message'], 'current_page' => 'mail.php', 'information' => $aLanguageKeys['information'], 'member_thumbnail' => $sMemberIcon, 'member_nick_name' => $sMemberNickName, 'member_location' => $sMemberLocation, 'clock_img' => $sClockImgPath, 'date_create' => $sCurrentDate, 'message_subject' => $sMessageSubject, 'send_copy_my' => $aLanguageKeys['send_copy_my'], 'send_copy_to' => $aLanguageKeys['send_copy'], 'notify' => $aLanguageKeys['notify'], 'action_buttons' => $sMessageBoxActions);
         $sOutputHtml = $oSysTemplate->parseHtmlByName($this->aUsedTemplates['message_replay'], $aTemplateKeys);
     }
     return $sOutputHtml;
 }
 function getSitesArray($sLink)
 {
     $sLink = htmlentities($sLink);
     $aSites = array(array('image' => 'digg.png', 'link' => 'http://digg.com/submit?phase=2&url=' . $sLink), array('image' => 'delicious.png', 'link' => 'http://del.icio.us/post?url=' . $sLink), array('image' => 'blinklist.png', 'link' => 'http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url=' . $sLink), array('image' => 'furl.png', 'link' => 'http://www.furl.net/storeIt.jsp?u=' . $sLink), array('image' => 'netscape.gif', 'link' => 'http://www.netscape.com/submit/?U=' . $sLink), array('image' => 'newsvine.png', 'link' => 'http://www.newsvine.com/_tools/seed&save?u=' . $sLink), array('image' => 'reddit.png', 'link' => 'http://reddit.com/submit?url=' . $sLink), array('image' => 'shadows.png', 'link' => 'http://www.shadows.com/features/tcr.htm?url=' . $sLink), array('image' => 'slashdot.png', 'link' => 'http://slashdot.org/bookmark.pl?url=' . $sLink), array('image' => 'sphere.png', 'link' => 'http://www.sphere.com/search?q=sphereit:' . $sLink), array('image' => 'stumbleupon.png', 'link' => 'http://www.stumbleupon.com/url/http' . $sLink), array('image' => 'technorati.png', 'link' => 'http://technorati.com/faves?add=' . $sLink));
     $sLink = '<a href="{Link}"><div class="shareLink" style="background-image:url(\'{Image}\')"></div></a>';
     foreach ($aSites as $iKey => $aVal) {
         $sLinkCur = str_replace('{Image}', getTemplateIcon($aVal['image']), $sLink);
         $sLinkCur = str_replace('{Link}', $aVal['link'], $sLinkCur);
         $sCode .= $sLinkCur;
     }
     $sCode .= '<div class="clear_both"></div>';
     return $sCode;
 }
 /**
  * Function will return needed action result ;
  *
  * @param  : $sActionName (string)  - needed action ;
  * @param  : $iRecipientId(integer) - recipient's Id ;
  * @return : (text) Html presentation data;
  */
 function actionGetOperation($sActionName, $iRecipientId = 0)
 {
     $iRecipientId = (int) $iRecipientId;
     // ** INTERNAL FUNCTIONS;
     /**
      * Function will create new message;
      *
      * @param : $oObject (object)        - current created object;
      * @param  : $iRecipientId (integer) - recipient's Id ;
      * @param  : $sMessage (string)      - sender's message ;
      */
     function _addMessage(&$oObject, $iRecipientId, $sMessage)
     {
         $iRecipientId = (int) $iRecipientId;
         $sMessage = trim(strip_tags($sMessage));
         if ($iRecipientId && $sMessage && (getProfileInfo($iRecipientId) && $iRecipientId != $oObject->iLoggedMemberId)) {
             // write received message ;
             if (getProfileInfo($iRecipientId)) {
                 $oObject->_oDb->createMessage($oObject->iLoggedMemberId, $iRecipientId, $sMessage);
                 // check save chat history ;
                 if (!$oObject->aCoreSettings['save_chat_history']) {
                     $oObject->_oDb->deleteMessagesHistory($oObject->iLoggedMemberId, $iRecipientId, $oObject->aCoreSettings['number_visible_messages']);
                 }
             }
         }
     }
     /**
      * Function will the check active chat box;
      *
      * @param : $aChatBoxes (array)     -  registered chat boxes;
      * @param : $iMemberId  (integer)   -  recipient's Id;
      */
     function _checkAllowedAddMessage(&$aChatBoxes, $iMemberId)
     {
         $iMemberId = (int) $iMemberId;
         foreach ($aChatBoxes as $iKey => $iCurMemberId) {
             if ($iCurMemberId == $iMemberId) {
                 return true;
             }
         }
         return false;
     }
     if (!$this->iLoggedMemberId) {
         exit;
     }
     $iRecipientId = (int) $iRecipientId;
     switch ($sActionName) {
         // send message action ;
         case 'send_message':
             $sMessage = isset($_POST['message']) ? urldecode($_POST['message']) : '';
             if ($this->oPrivacy->check('contact', $iRecipientId, $this->iLoggedMemberId)) {
                 // get array with all sender's chat boxes;
                 $aActiveSenderChatBoxes = $this->_oDb->getChatBoxesCount($this->iLoggedMemberId);
                 $bSenderSendAllow = false;
                 // check the sender's  allow rulles for send message ;
                 if (is_array($aActiveSenderChatBoxes) && $aActiveSenderChatBoxes) {
                     if (count($aActiveSenderChatBoxes) < $this->aCoreSettings['number_of_allowed_chat_boxes']) {
                         $bSenderSendAllow = true;
                     } else {
                         // check if sender's id already registered in active chat boxes;
                         if (_checkAllowedAddMessage($aActiveSenderChatBoxes, $iRecipientId)) {
                             $bSenderSendAllow = true;
                         }
                     }
                 } else {
                     $bSenderSendAllow = true;
                 }
                 // get array with all recipients's chat boxes;
                 $aActiveRecipientChatBoxes = $this->_oDb->getChatBoxesCount($iRecipientId);
                 $bRecipientSendAllow = false;
                 // check the recipient's  allow rulles for reciving new message ;
                 if (is_array($aActiveRecipientChatBoxes) && $aActiveRecipientChatBoxes) {
                     if (count($aActiveRecipientChatBoxes) < $this->aCoreSettings['number_of_allowed_chat_boxes']) {
                         $bRecipientSendAllow = true;
                     } else {
                         // check if sender's id already registered in active chat boxes;
                         if (_checkAllowedAddMessage($aActiveRecipientChatBoxes, $this->iLoggedMemberId)) {
                             $bRecipientSendAllow = true;
                         }
                     }
                 } else {
                     $bRecipientSendAllow = true;
                 }
                 if ($bSenderSendAllow && $bRecipientSendAllow) {
                     // allow to add new message;
                     _addMessage($this, $iRecipientId, $sMessage);
                 } else {
                     header('Content-Type: text/html; charset=utf-8');
                     echo !$bSenderSendAllow ? _t('_simple_messenger_max_allowed_windows') : _t('_simple_messenger_recipient_max_allowed_windows');
                 }
             } else {
                 header('Content-Type: text/html; charset=utf-8');
                 echo _t('_simple_messenger_privacy_disallow');
             }
             break;
         case 'get_chat_box':
             if ($iRecipientId) {
                 // get chat box;
                 $aChatBox = $this->getChatBox($iRecipientId, false);
                 $sChatBox = $aChatBox['chat_box'];
                 $aRet = array();
                 // get some sender's info;
                 $aSenderInfo = getProfileInfo($iRecipientId);
                 $aRet['senders'][] = array('sender_id' => $iRecipientId, 'chat_box' => $sChatBox, 'messages_list' => '', 'status_update_time' => $aSenderInfo['UserStatusMessageWhen'], 'sender_status' => $aSenderInfo['UserStatus'], 'last_message' => $aChatBox['last_message'], 'count_messages' => $aChatBox['count_messages']);
                 // return result in JSON format ;
                 if ($aRet) {
                     header('Content-Type: application/json; charset=utf-8');
                     echo json_encode($aRet);
                 }
             }
             break;
         case 'new_messages':
             $aRet = array();
             // defines all registered messages box and last message's id in it ;
             $sRegisteredBoxes = false != bx_get('registered_chat_boxes') ? bx_get('registered_chat_boxes') : '';
             $aAllBoxes = $sRegisteredBoxes ? explode(',', $sRegisteredBoxes) : '';
             if ($aAllBoxes && is_array($aAllBoxes)) {
                 $aRegBoxes = array();
                 // procces registered box ;
                 foreach ($aAllBoxes as $sValue) {
                     if ($sValue) {
                         $aTemp = explode(':', $sValue);
                         if (is_numeric($aTemp[0]) && $aTemp[0]) {
                             // get some sender's info;
                             $aSenderInfo = getProfileInfo($aTemp[0]);
                             $aRegBoxes[$aTemp[0]] = array('last_message' => (int) $aTemp[1], 'registered' => 1, 'status_change' => $aSenderInfo['UserStatusMessageWhen'], 'sender_status' => get_user_online_status($aSenderInfo['ID']) ? $aSenderInfo['UserStatus'] : 'offline');
                         }
                     }
                 }
             }
             // try to define new messages except existing;
             $aNewSenders = $this->_oDb->getNewChatBoxes($this->iLoggedMemberId, $aRegBoxes);
             if ($aNewSenders) {
                 // procces new messages array ;
                 foreach ($aNewSenders as $iKey => $iSenderId) {
                     $iSenderId = (int) $iSenderId;
                     // get some sender's info;
                     $aSenderInfo = getProfileInfo($iSenderId);
                     $aRegBoxes[$iSenderId] = array('last_message' => 0, 'registered' => 0, 'status_change' => $aSenderInfo['UserStatusMessageWhen'], 'sender_status' => get_user_online_status($iSenderId) ? $aSenderInfo['UserStatus'] : 'offline');
                 }
             }
             // preparing all boxes with messages ;
             if ($aRegBoxes) {
                 foreach ($aRegBoxes as $iSenderId => $aItems) {
                     $iSenderId = (int) $iSenderId;
                     $iLastMessagesId = 0;
                     $iCountMessages = 0;
                     $sChatBox = null;
                     // check the chat box;
                     if (!$aItems['registered']) {
                         $aChatBox = $this->getChatBox($iSenderId);
                         $sChatBox = $aChatBox['chat_box'];
                         $iLastMessagesId = $aChatBox['last_message'];
                         $iCountMessages = $aChatBox['count_messages'];
                     }
                     // procces all current chat box's messages;
                     if (!$sChatBox) {
                         $aMessagesList = $this->getMessagesHistory($this->iLoggedMemberId, $iSenderId, $aItems['last_message']);
                         $iLastMessagesId = $aMessagesList['last_message'];
                         $iCountMessages = $aMessagesList['count_messages'];
                         $sMessagesList = $aMessagesList['messages_list'];
                     } else {
                         $sMessagesList = 'built-in';
                     }
                     $aRet['senders'][] = array('sender_id' => $iSenderId, 'chat_box' => !$aItems['registered'] ? $sChatBox : '', 'messages_list' => $sMessagesList, 'status_update_time' => $aItems['status_change'], 'sender_status' => $aItems['sender_status'], 'last_message' => $iLastMessagesId, 'count_messages' => $iCountMessages);
                 }
             }
             // return result in JSON format ;
             if ($aRet) {
                 header('Content-Type: application/json; charset=utf-8');
                 echo json_encode($aRet);
             }
             break;
         case 'close_window':
             if ($this->_oDb->closeChatWindow($this->iLoggedMemberId, $iRecipientId)) {
                 echo 'closed';
             }
             break;
         case 'get_status_text':
             $aSenderInfo = getProfileInfo($iRecipientId);
             header('Content-Type: text/html; charset=utf-8');
             echo $aSenderInfo['UserStatusMessage'];
             break;
         case 'get_status':
             $oUserStatus = new BxDolUserStatusView();
             echo getTemplateIcon($oUserStatus->getStatusIcon($iRecipientId));
             break;
         case 'get_sender_thumb':
             header('Content-Type: text/html; charset=utf-8');
             echo $GLOBALS['oFunctions']->getMemberThumbnail($iRecipientId, 'none');
             break;
     }
 }
function showPreviousRated($iPhotoID)
{
    global $site;
    global $oTemplConfig;
    global $max_thumb_width;
    global $max_thumb_height;
    $iBarWidth = $oTemplConfig->iRateSmallRatingBar;
    $iBarNum = $oTemplConfig->iRateSmallRatingBarNum;
    $query = "\r\n\t\tSELECT\r\n\t\t\t`media`.`med_id`,\r\n\t\t\t`med_prof_id`,\r\n\t\t\t`med_file`,\r\n\t\t\t`med_title`,\r\n\t\t\t`med_rating_count`,\r\n\t\t\t`med_rating_sum`,\r\n\t\t\t`Profiles`.`NickName`\r\n\t\tFROM `media`\r\n\t\tLEFT JOIN `media_rating` USING (`med_id`)\r\n\t\tLEFT JOIN `Profiles` ON\r\n\t\t\t(`Profiles`.`ID`=`media`.`med_prof_id`)\r\n\t\tWHERE\r\n\t\t\t`med_status` = 'active'\r\n\t\t\tAND `media`.`med_id` = {$iPhotoID}\r\n\t\t";
    $ph_arr = db_arr($query);
    if (!$ph_arr) {
        return '';
    }
    $urlImg = "{$site['profileImage']}{$ph_arr['med_prof_id']}/thumb_{$ph_arr['med_file']}";
    $urlSpacer = getTemplateIcon('spacer.gif');
    $sProfLink = getProfileLink($ph_arr['med_prof_id']);
    $sRatingBar = '';
    $oVotingView = new BxTemplVotingView('media', (int) $iPhotoID);
    if ($oVotingView->isEnabled()) {
        $sRatingBar = $oVotingView->getSmallVoting(false);
    }
    $ret .= <<<EOJ
\t<div class="rate_prev_photo_block">
\t\t<div class="thumbnail_block" style="float:none;">
\t\t\t<a href="{$site['url']}photos_gallery.php?ID={$ph_arr['med_prof_id']}&amp;photoID={$ph_arr['med_id']}" title="{$ph_arr['med_title']}">
\t\t\t\t<img style="width:{$max_thumb_width}px;height:{$max_thumb_height}px;background-image:url({$urlImg});" src="{$urlSpacer}" />
\t\t\t</a>
\t\t</div>
\t\t<div class="rate_prev_photo_nickname">
\t\t\t<a href="{$sProfLink}">{$ph_arr['NickName']}</a>
\t\t</div>
\t\t<div style="position:relative; width:50%; height:30px; overflow:visible; margin-top:10px;">
\t\t\t<div style="position:absolute; right:-94px; width:400px; height:30px;">
\t\t\t\t{$sRatingBar}
\t\t\t</div>\t\t\t
\t\t</div>

\t</div>
EOJ;
    return DesignBoxContent(_t('_Previous rated'), $ret, 1);
}
function MsgBox($text)
{
    global $site;
    global $tmpl;
    ob_start();
    ?>
                <table class="MsgBox" cellpadding="0" cellspacing="0">
                        <tr>
                                <td class="corder"><img src="<?php 
    echo "{$site['url']}templates/tmpl_{$tmpl}/images/msgbox_cor_lt.png";
    ?>
" alt="" /></td>
                                <td class="top_side"><img src="<?php 
    echo getTemplateIcon('spacer.gif');
    ?>
" alt="" /></td>
                                <td class="corder"><img src="<?php 
    echo "{$site['url']}templates/tmpl_{$tmpl}/images/msgbox_cor_rt.png";
    ?>
" alt="" /></td>
                        </tr>
                        <tr>
                                <td class="left_side"><img src="<?php 
    echo getTemplateIcon('spacer.gif');
    ?>
" alt="" /></td>
                                <td class="msgbox_content"><div class="msgbox_text"><?php 
    echo $text;
    ?>
</div></td>
                                <td class="right_side"><img src="<?php 
    echo getTemplateIcon('spacer.gif');
    ?>
" alt="" /></td>
                        </tr>
                        <tr>
                                <td class="corner"><img src="<?php 
    echo "{$site['url']}templates/tmpl_{$tmpl}/images/msgbox_cor_lb.png";
    ?>
" alt="" /></td>
                                <td class="bottom_side"><img src="<?php 
    echo getTemplateIcon('spacer.gif');
    ?>
" alt="" /></td>
                                <td class="corner"><img src="<?php 
    echo "{$site['url']}templates/tmpl_{$tmpl}/images/msgbox_cor_rb.png";
    ?>
" alt="" /></td>
                        </tr>
                </table>
        <?php 
    return ob_get_clean();
}
 function insertFieldErrorIcon($sError = '')
 {
     $this->sCode .= '<img src="' . getTemplateIcon('warn.gif') . '" class="form_warn_icon"';
     if ($sError) {
         $sError = str_replace("'", "\\'", $sError);
         $sError = str_replace("\n", "\\n", $sError);
         $sError = str_replace("\r", "", $sError);
         $this->sCode .= ' onmouseover="showFloatDesc(\'' . $this->value2html($sError) . '\')"';
     } else {
         $this->sCode .= ' style="display: none;"';
     }
     $this->sCode .= ' onmousemove="moveFloatDesc(event)" onmouseout="hideFloatDesc()" />';
 }
Beispiel #29
0
 /**
  * Function will generate the messages rows ;
  *
  * @return         : Html presentation data ;
  */
 function genMessagesRows()
 {
     global $oSysTemplate;
     global $oFunctions;
     global $site;
     // init some needed variables ;
     $sOutputHtml = null;
     $sMessageBoxActions = null;
     $sMessagesTypesList = null;
     $sPerPageBlock = null;
     $aSortToglleElements = array('date_sort_toggle', 'subject_sort_toggle', 'type_sort_toggle', 'author_sort_toggle');
     $aMessageRows = array();
     // language keys ;
     $aLanguageKeys = array('author' => _t('_Author'), 'type' => _t('_Type'), 'subject' => _t('_Subject'), 'date' => _t('_Date'), 'new' => _t('_new'), 'contact' => _t('_Contact'), 'select' => _t('_Select'), 'all' => _t('_All'), 'none' => _t('_None'), 'read' => _t('_Read'), 'unread' => _t('_Unread'), 'delete' => _t('_Delete'), 'spam' => _t('_Report'), 'more' => _t('_More actions'), 'mark_read' => _t('_Mark as old'), 'mark_unread' => _t('_Mark as New'), 'restore' => _t('_Restore'), 'click_sort' => _t('_Click to sort'), 'recipient' => _t('_Recipient'));
     // get messages array ;
     $aMessages =& $this->getMessages();
     // generate list of messages types
     if (is_array($this->aRegisteredMessageTypes) and !empty($this->aRegisteredMessageTypes)) {
         foreach ($this->aRegisteredMessageTypes as $iKey => $sRegisteredType) {
             $sChecked = null;
             if (!empty($this->aReceivedMessagesTypes) and in_array($sRegisteredType, $this->aReceivedMessagesTypes)) {
                 $sChecked = ' checked="checked" ';
             }
             $aTemplateKeys = array('letters_type' => $sRegisteredType, 'letters_type_caption' => _t('_' . $sRegisteredType), 'checked' => $sChecked);
             $sMessagesTypesList .= $oSysTemplate->parseHtmlByName($this->aUsedTemplates['messages_types_list'], $aTemplateKeys);
         }
         unset($aTemplateKeys);
     }
     // processing all messages ;
     if (is_array($aMessages) and !empty($aMessages)) {
         // need for row devide ;
         $iIndex = 1;
         foreach ($aMessages as $iKey => $aItems) {
             // generate image and keyword for type of message ;
             $sTypeIcon = getTemplateIcon($this->sMessageIconPrefix . $aItems['Type'] . $this->sMessageIconExtension);
             $sTypeLang = _t('_' . $aItems['Type']);
             // get message's subject ;
             $sSubject = mb_strlen($aItems['Subject']) > $this->iMessageSubjectLength ? mb_substr($aItems['Subject'], 0, $this->iMessageSubjectLength) . '...' : $aItems['Subject'];
             // get message's description ;
             $sDescription = strip_tags($aItems['Text']);
             mb_strlen($sDescription) > $this->iMessageDescrLength ? $sDescription = mb_substr($sDescription, 0, $this->iMessageDescrLength) . '...' : null;
             // generate the `new` message's icon ;
             $sNewMessageImg = $aItems['New'] ? getTemplateIcon('new_message.png') : getTemplateIcon(null);
             // color devider ;
             $sFiledCss = !($iIndex % 2) ? 'filled' : 'not_filled';
             $aProfileInfo = $this->aMailBoxSettings['mailbox_mode'] != 'outbox' ? getProfileInfo($aItems['Sender']) : getProfileInfo($aItems['Recipient']);
             $sMemberIcon = $this->aMailBoxSettings['mailbox_mode'] != 'outbox' ? get_member_thumbnail($aItems['Sender'], 'left') : get_member_thumbnail($aItems['Recipient'], 'left');
             $sMemberLocation = $this->aMailBoxSettings['mailbox_mode'] != 'outbox' ? getProfileLink($aItems['Sender']) : getProfileLink($aItems['Recipient']);
             $sMemberNickName = getNickName($aProfileInfo['ID']);
             $sMemberAge = $aProfileInfo['DateOfBirth'] != "0000-00-00" ? _t("_y/o", age($aProfileInfo['DateOfBirth'])) : null;
             $sMemberCountry = $aProfileInfo['Country'];
             $sMemberFlag = $site['flags'] . strtolower($sMemberCountry) . $this->sMembersFlagExtension;
             $sMemberSexImg = $oFunctions->genSexIcon($aProfileInfo['Sex']);
             if ($sMemberCountry) {
                 $sMemberCountryFlag = '<img src="' . $sMemberFlag . '" alt="' . $sMemberCountry . '" />';
             }
             // generate the message status ;
             $sMessageStatus = $aItems['New'] ? 'unread' : 'read';
             $aMessageRows[] = array('message_id' => $aItems['ID'], 'message_status' => $sMessageStatus, 'message_owner' => $aItems['Sender'], 'message_link' => $aItems['ID'], 'message_page' => 'mail.php', 'member_icon' => $sMemberIcon, 'member_location' => $sMemberLocation, 'member_nickname' => $sMemberNickName, 'member_sex_img' => $sMemberSexImg, 'member_sex' => $aProfileInfo['Sex'], 'member_age' => $sMemberAge, 'member_flag' => $sMemberCountryFlag, 'member_country' => $sMemberCountry, 'message_type' => $sTypeLang, 'message_type_icon' => $sTypeIcon, 'message_subject' => $sSubject, 'bx_if:show_new' => array('condition' => $aItems['New'], 'content' => array()), 'message_descr' => $sDescription, 'message_new_img' => $sNewMessageImg, 'message_new' => $aLanguageKeys['new'], 'message_contact_url' => BX_DOL_URL_ROOT . "mail.php?mode=compose&recipient_id=" . $aProfileInfo['ID'], 'message_contact' => $aLanguageKeys['contact'], 'message_date' => $aItems['Date'], 'message_ago' => defineTimeInterval($aItems['DateTS']), 'filled_class' => $sFiledCss);
             $iIndex++;
         }
     }
     // init sort toggle ellements ;
     switch ($this->aMailBoxSettings['sort_mode']) {
         case 'date':
             $aSortToglleElements['date_sort_toggle'] = 'toggle_up';
             break;
         case 'date_desc':
             $aSortToglleElements['date_sort_toggle'] = 'toggle_down';
             break;
         case 'subject':
             $aSortToglleElements['subject_sort_toggle'] = 'toggle_up';
             break;
         case 'subject_desc':
             $aSortToglleElements['subject_sort_toggle'] = 'toggle_down';
             break;
         case 'type':
             $aSortToglleElements['type_sort_toggle'] = 'toggle_up';
             break;
         case 'type_desc':
             $aSortToglleElements['type_sort_toggle'] = 'toggle_down';
             break;
         case 'author':
             $aSortToglleElements['author_sort_toggle'] = 'toggle_up';
             break;
         case 'author_desc':
             $aSortToglleElements['author_sort_toggle'] = 'toggle_down';
             break;
     }
     // generate the pagination ;
     $sRequest = BX_DOL_URL_ROOT . 'mail.php?';
     // need for additional parameters ;
     $aGetParams = array('mode', 'sorting', 'messages_types');
     if (is_array($aGetParams) and !empty($aGetParams)) {
         foreach ($aGetParams as $sValue) {
             if (isset($_GET[$sValue])) {
                 $sRequest .= '&amp;' . $sValue . '=' . $_GET[$sValue];
             }
         }
     }
     $sCuttedUrl = $sRequest;
     $sRequest = $sRequest . '&amp;page={page}&amp;per_page={per_page}';
     $oPaginate = new BxDolPaginate(array('page_url' => $sRequest, 'count' => $this->iTotalMessageCount, 'per_page' => $this->aMailBoxSettings['per_page'], 'sorting' => $this->aMailBoxSettings['sort_mode'], 'page' => $this->aMailBoxSettings['page'], 'on_change_page' => "oMailBoxMessages.getPaginatePage('{$sRequest}')", 'on_change_per_page' => "oMailBoxMessages.getPage(this.value, '{$sCuttedUrl}')"));
     $sPagination = $oPaginate->getPaginate();
     // generate messages section
     if (!empty($aMessageRows)) {
         $aTemplateKeys = array('per_page' => $this->aMailBoxSettings['per_page'], 'page_number' => $this->aMailBoxSettings['page'], 'page_mode' => $this->aMailBoxSettings['mailbox_mode'], 'messages_types' => $this->aMailBoxSettings['messages_types'], 'messages_types_list' => $sMessagesTypesList, 'per_page_block' => $oPaginate->getPages(), 'author' => $this->aMailBoxSettings['mailbox_mode'] != 'outbox' ? $aLanguageKeys['author'] : $aLanguageKeys['recipient'], 'type' => $aLanguageKeys['type'], 'subject' => $aLanguageKeys['subject'], 'date' => $aLanguageKeys['date'], 'click_sort' => $aLanguageKeys['click_sort'], 'bx_repeat:messages' => $aMessageRows, 'sort_date' => $this->aMailBoxSettings['sort_mode'] == 'date' ? 'date_desc' : 'date', 'sort_subject' => $this->aMailBoxSettings['sort_mode'] == 'subject' ? 'subject_desc' : 'subject', 'sort_type' => $this->aMailBoxSettings['sort_mode'] == 'type' ? 'type_desc' : 'type', 'sort_author' => $this->aMailBoxSettings['sort_mode'] == 'author' ? 'author_desc' : 'author', 'date_sort_toggle_ellement' => $aSortToglleElements['date_sort_toggle'], 'subject_sort_toggle_ellement' => $aSortToglleElements['subject_sort_toggle'], 'type_sort_toggle_ellement' => $aSortToglleElements['type_sort_toggle'], 'author_sort_toggle_ellement' => $aSortToglleElements['author_sort_toggle'], 'current_page' => 'mail.php', 'select' => $aLanguageKeys['select'], 'all_messages' => $aLanguageKeys['all'], 'none_messages' => $aLanguageKeys['none'], 'read_messages' => $aLanguageKeys['read'], 'unread_messages' => $aLanguageKeys['unread'], 'pagination_block' => $sPagination);
         // generate extended mailbox actions
         switch ($this->aMailBoxSettings['mailbox_mode']) {
             case 'inbox':
                 $aForm = array('form_attrs' => array('action' => null, 'method' => 'post'), 'params' => array('remove_form' => true, 'db' => array('submit_name' => 'do_submit')), 'inputs' => array('actions' => array('type' => 'input_set', 'colspan' => 'true', array('type' => 'button', 'value' => $aLanguageKeys['delete'], 'attrs' => array('onclick' => 'if ( typeof oMailBoxMessages != \'undefined\' ) oMailBoxMessages.deleteMessages(\'messages_container\', \'genMessagesRows\')', 'class' => 'bx-btn-small')), array('type' => 'button', 'value' => $aLanguageKeys['spam'], 'attrs' => array('onclick' => 'if (typeof oMailBoxMessages != \'undefined\') oMailBoxMessages.spamMessages(\'messages_container\')', 'class' => 'bx-btn-small')), array('type' => 'button', 'value' => $aLanguageKeys['mark_read'], 'attrs' => array('onclick' => 'if ( typeof oMailBoxMessages != \'undefined\' ) oMailBoxMessages.markMessages(\'read\', \'genMessagesRows\')', 'class' => 'bx-btn-small')), array('type' => 'button', 'value' => $aLanguageKeys['mark_unread'], 'attrs' => array('onclick' => 'if ( typeof oMailBoxMessages != \'undefined\' ) oMailBoxMessages.markMessages(\'unread\', \'genMessagesRows\')', 'class' => 'bx-btn-small')))));
                 $oForm = new BxTemplFormView($aForm);
                 $sMessageBoxActions = $oForm->getCode();
                 break;
             case 'outbox':
                 $aForm = array('form_attrs' => array('action' => null, 'method' => 'post'), 'params' => array('remove_form' => true, 'db' => array('submit_name' => 'do_submit')), 'inputs' => array('actions' => array('type' => 'input_set', 'colspan' => 'true', 0 => array('type' => 'button', 'value' => $aLanguageKeys['delete'], 'attrs' => array('onclick' => 'if ( typeof oMailBoxMessages != \'undefined\' ) oMailBoxMessages.deleteMessages(\'messages_container\', \'genMessagesRows\')', 'class' => 'bx-btn-small')))));
                 $oForm = new BxTemplFormView($aForm);
                 $sMessageBoxActions = $oForm->getCode();
                 break;
             case 'trash':
                 $aForm = array('form_attrs' => array('action' => null, 'method' => 'post'), 'params' => array('remove_form' => true, 'db' => array('submit_name' => 'do_submit')), 'inputs' => array('actions' => array('type' => 'input_set', 'colspan' => 'true', 0 => array('type' => 'button', 'value' => $aLanguageKeys['restore'], 'attrs' => array('onclick' => 'if ( typeof oMailBoxMessages != \'undefined\' ) oMailBoxMessages.restoreMessages(\'messages_container\', \'genMessagesRows\')', 'class' => 'bx-btn-small')), 1 => array('type' => 'button', 'value' => $aLanguageKeys['delete'], 'attrs' => array('onclick' => 'if ( typeof oMailBoxMessages != \'undefined\' ) oMailBoxMessages.hideDeletedMessages(\'messages_container\', \'genMessagesRows\')', 'class' => 'bx-btn-small')))));
                 $oForm = new BxTemplFormView($aForm);
                 $sMessageBoxActions = $oForm->getCode();
                 break;
         }
         $aTemplateKeys['messages_actions_block'] = $sMessageBoxActions;
         //return builded rows ;
         $sMessagesSection = $oSysTemplate->parseHtmlByName($this->aUsedTemplates['messages_box'], $aTemplateKeys);
         $sPerPageBlock = $oPaginate->getPages();
     } else {
         $sMessagesSection = MsgBox(_t('_Empty'));
     }
     // generate mailboxe's top section ;
     $sTopControls = $oSysTemplate->parseHtmlByName('mail_box_messages_list_top_controls.html', array('messages_types_list' => $sMessagesTypesList, 'per_page_block' => $sPerPageBlock));
     $aTemplateKeys = array('per_page' => $this->aMailBoxSettings['per_page'], 'page_number' => $this->aMailBoxSettings['page'], 'page_mode' => $this->aMailBoxSettings['mailbox_mode'], 'messages_types' => $this->aMailBoxSettings['messages_types'], 'messages_sort' => $this->aMailBoxSettings['sort_mode'], 'top_controls' => $sTopControls, 'messages_section' => $sMessagesSection);
     $sOutputHtml = $oSysTemplate->parseHtmlByName('mail_box_messages_list.html', $aTemplateKeys);
     // return all builded data ;
     return $sOutputHtml;
 }
 /**
  * @description : function will generate profile block (used the profile template );
  * @return 		: Html presentation data ;
  */
 function PrintSearhResult($aProfileInfo, $aCoupleInfo = '', $aExtendedKey = null, $sTemplateName = '', $oCustomTemplate = null)
 {
     global $site;
     global $aPreValues;
     $iVisitorID = getLoggedId();
     $bExtMode = !empty($_GET['mode']) && $_GET['mode'] == 'extended' || !empty($_GET['search_result_mode']) && $_GET['search_result_mode'] == 'ext';
     $enable_zodiac = $bExtMode ? getParam('zodiac') : false;
     if ($bExtMode && count($this->aAllovedAvtionsOfVisitor) == 0) {
         //like init
         $aCheckGreet = checkAction($iVisitorID, ACTION_ID_SEND_VKISS);
         $this->aAllovedAvtionsOfVisitor['GREET'] = $aCheckGreet;
         $aCheckMess = checkAction($iVisitorID, ACTION_ID_SEND_MESSAGE);
         $this->aAllovedAvtionsOfVisitor['MESS'] = $aCheckMess;
     }
     $aOnline = array();
     if (isset($aProfileInfo['is_online'])) {
         $aOnline['is_online'] = $aProfileInfo['is_online'];
     }
     $sProfileThumb = get_member_thumbnail($aProfileInfo['ID'], 'none', !$bExtMode, 'visitor', $aOnline);
     // profile Nick/Age/Sex etc.
     $sAgeStr = $aProfileInfo['DateOfBirth'] != "0000-00-00" ? _t("_y/o", age($aProfileInfo['DateOfBirth'])) . ' ' : "";
     $sAgeOnly = $aProfileInfo['DateOfBirth'] != "0000-00-00" ? age($aProfileInfo['DateOfBirth']) : "";
     $y_o_sex = $sAgeStr;
     $city = _t("_City") . ": " . process_line_output($aProfileInfo['City']);
     $country = $aProfileInfo['Country'] ? _t("_Country") . ": " . _t($aPreValues['Country'][$aProfileInfo['Country']]['LKey']) . '&nbsp;<img src="' . ($site['flags'] . strtolower($aProfileInfo['Country'])) . '.gif" alt="flag" />' : '';
     // country flag
     $sFlag = $aProfileInfo['Country'] != '' ? '&nbsp;<img src="' . ($site['flags'] . strtolower($aProfileInfo['Country'])) . '.gif" alt="flag" />' : '';
     $sCityName = $aProfileInfo['City'] ? process_line_output($aProfileInfo['City']) . ', ' : null;
     if (!empty($aProfileInfo['Country'])) {
         $city_con = $sFlag . ' ' . $sCityName . _t($aPreValues['Country'][$aProfileInfo['Country']]['LKey']);
     } else {
         $city_con = '';
     }
     $id = _t("_ID") . ": " . $aProfileInfo['ID'];
     // description
     $i_am = $i_am2 = _t("_I am");
     $i_am_desc = trim(strip_tags($aProfileInfo['DescriptionMe']));
     if (mb_strlen($i_am_desc) > 130) {
         $i_am_desc = mb_substr($i_am_desc, 0, 130) . '...';
     }
     $you_are = $you_are2 = _t("_You are");
     $sCity = $aProfileInfo['City'];
     //--- Greeting start ---//
     if ($bExtMode && $aAllovedAvtionsOfVisitor['GREET'][CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED && $iVisitorID != $aProfileInfo['ID']) {
         $iKissIcon = getTemplateIcon('action_greet_small.gif');
         $sAiKiss = "<img alt=\"" . _t("_Greet") . "\" class=\"links_image\" name=i01{$aProfileInfo['ID']} src=\"" . $iKissIcon . "\" />";
         $al_kiss = '<a target=_blank href="greet.php?sendto=' . $aProfileInfo[ID] . '"';
         $al_kiss .= ">";
         $al_kiss = "<span class=\"links_span\">" . $sAiKiss . $al_kiss . _t("_Greet") . "</a></span>";
     } else {
         $al_kiss = '';
     }
     //--- Greeting end ---//
     //--- Contact start ---//
     if ($bExtMode && $aAllovedAvtionsOfVisitor['MESS'][CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED && $iVisitorID != $aProfileInfo['ID']) {
         $sSendMsgIcon = getTemplateIcon('action_send_small.gif');
         $ai_sendmsg = "<img alt=\"" . _t("_SEND_MESSAGE") . "\" name=i02{$aProfileInfo['ID']} src=\"{$sSendMsgIcon}\" class=\"links_image\" />";
         $al_sendmsg = "<a href=\"compose.php?ID={$aProfileInfo['ID']}\"";
         $al_sendmsg .= ">";
         $al_sendmsg = "<span class=\"links_span\">" . $ai_sendmsg . $al_sendmsg . _t("_Contact") . "</a></span>";
     } else {
         $al_sendmsg = '';
     }
     //--- Contact end ---//
     $more = '<a href="' . getProfileLink($aProfileInfo['ID']) . '" target="_blank">';
     $more .= '<img src="' . $site['icons'] . 'desc_more.gif" alt="' . _t('_more') . '" />';
     $more .= '</a>';
     $sProfile2ASc1 = $sProfile2ASc2 = $sProfile2Nick = $sProfile2AgeSex = $sProfile2CityCon = $sProfile2Desc = $sProfile2Match = '';
     if ($aCoupleInfo) {
         // profile Nick/Age/Sex etc.
         $sNickName2 = '<a href="' . getProfileLink($aCoupleInfo['ID']) . '">' . $aCoupleInfo['NickName'] . '</a>';
         $sAgeStr2 = $aCoupleInfo['DateOfBirth'] != "0000-00-00" ? _t("_y/o", age($aCoupleInfo['DateOfBirth'])) . ' ' : "";
         $sAgeOnly2 = $aCoupleInfo['DateOfBirth'] != "0000-00-00" ? age($aCoupleInfo['DateOfBirth']) : "";
         $y_o_sex2 = $sAgeStr2;
         // . _t("_".$aCoupleInfo['Sex']);
         $city2 = _t("_City") . ": " . process_line_output($aCoupleInfo['City']);
         $country2 = _t("_Country") . ": " . _t($aPreValues['Country'][$aCoupleInfo['Country']]['LKey']) . '&nbsp;<img src="' . ($site['flags'] . strtolower($aCoupleInfo['Country'])) . '.gif" alt="flag" />';
         $city_con2 = '&nbsp;&nbsp;' . $sFlag . ' ' . process_line_output($aCoupleInfo['City']) . ", " . _t($aPreValues['Country'][$aCoupleInfo['Country']]['LKey']);
         $city_con2 = preg_replace("/,\$/", '', trim($city_con2));
         $id2 = _t("_ID") . ": " . $aCoupleInfo['ID'];
         // description
         $i_am = $i_am2 = _t("_I am");
         $i_am_desc2 = trim(strip_tags($aCoupleInfo['DescriptionMe']));
         if (mb_strlen($i_am_desc2) > 130) {
             $i_am_desc2 = mb_substr($i_am_desc2, 0, 130) . '...';
         }
         $sCity2 = $aCoupleInfo['City'];
         $sProfile2ASc1 = 'float:left;width:31%;margin-right:10px;';
         $sProfile2ASc2 = 'float:left;width:31%;display:block;';
         $sProfile2Nick = $sNickName2;
         $sProfile2AgeSex = $y_o_sex2;
         $sProfile2CityCon = $city_con2;
         $sProfile2Desc = $i_am_desc2;
         $sProfile2Match = $bExtMode && isLogged() && $iVisitorID != $aCoupleInfo['ID'] && getParam('view_match_percent') ? $GLOBALS['oFunctions']->getProfileMatch($iVisitorID, $aCoupleInfo['ID']) : '';
     } else {
         $sProfile2ASc2 = 'display:none;';
     }
     // match progress bar
     $sProfileMatch = $bExtMode && isLogged() && $iVisitorID != $aProfileInfo['ID'] && getParam('view_match_percent') ? $GLOBALS['oFunctions']->getProfileMatch($iVisitorID, $aProfileInfo['ID']) : '';
     $sHeadline = null;
     if ($aProfileInfo['Headline']) {
         $sHeadline = mb_strlen($aProfileInfo['Headline']) > 30 ? mb_substr($aProfileInfo['Headline'], 0, 30) . '...' : $aProfileInfo['Headline'];
     }
     $sNickName = getNickName($aProfileInfo['ID']);
     $Link = getProfileLink($aProfileInfo['ID']);
     $sProfileNickname = $sHeadline ? "<a href='{$Link}'>" . $sNickName . '</a> :' : "<a href='{$Link}'>" . $sNickName . '</a>';
     $sSexIcon = $GLOBALS['oFunctions']->genSexIcon($aProfileInfo['Sex']);
     $sProfileZodiac = $enable_zodiac ? $GLOBALS['oFunctions']->getProfileZodiac($aProfileInfo['DateOfBirth']) : '';
     $aKeys = array('thumbnail' => $sProfileThumb, 'nick' => $sProfileNickname, 'head_line' => $sHeadline, 'age' => $y_o_sex, 'city_con' => $city_con, 'i_am_desc' => $i_am_desc, 'sex_image' => $sSexIcon, 'add_style_c1' => $sProfile2ASc1, 'add_style_c2' => $sProfile2ASc2, 'nick2' => $sProfile2Nick, 'age_sex2' => $sProfile2AgeSex, 'city_con2' => $sProfile2CityCon, 'i_am_desc2' => $sProfile2Desc, 'match2' => $sProfile2Match, 'row_title' => process_line_output($aProfileInfo['Headline']), 'thumbnail' => $sProfileThumb, 'match' => $sProfileMatch, 'sex_image' => $sSexIcon, 'age' => $y_o_sex, 'city' => $city, 'just_city' => $sCity, 'just_age' => $sAgeOnly, 'city_con' => $city_con, 'country' => $country, 'id' => $id, 'zodiac_sign' => $sProfileZodiac, 'i_am' => $i_am, 'i_am_desc' => $i_am_desc, 'you_are' => $you_are, 'ai_kiss' => empty($sAiKiss) ? '' : $sAiKiss, 'al_kiss' => $al_kiss, 'ai_sendmsg' => empty($ai_sendmsg) ? '' : $ai_sendmsg, 'al_sendmsg' => $al_sendmsg, 'more' => $more, 'images' => $site['images']);
     if ($aExtendedKey and is_array($aExtendedKey) and !empty($aExtendedKey)) {
         foreach ($aExtendedKey as $sKey => $sValue) {
             $aKeys[$sKey] = $sValue;
         }
     } else {
         $aKeys['ext_css_class'] = '';
     }
     return $oCustomTemplate ? $oCustomTemplate->parseHtmlByName($sTemplateName, $aKeys) : $GLOBALS['oSysTemplate']->parseHtmlByName($sTemplateName, $aKeys);
 }