function getBlockCode_ForumFeed() { if (!$this->_oMain->isAllowedReadForum($this->aDataEntry)) { return ''; } $sRssId = 'forum|' . $this->_oConfig->getUri() . '|' . rawurlencode($this->aDataEntry[$this->_oDb->_sFieldUri]); return ' <div class="RSSAggrCont" rssid="' . $sRssId . '" rssnum="8" member="' . getLoggedId() . '"> <div class="loading_rss"> <img src="' . getTemplateImage('loading.gif') . '" alt="Loading..." /> </div> </div>'; }
function login_form($text = "", $member = 0, $bbAjaxMode = false) { global $site; global $_page_cont; global $_page; global $admin_dir; if ($member == 1) { LoginFormAdmin(); exit; } $sFormCode = getMemberLoginFormCode('login_box_form'); $sCloseImg = getTemplateImage('close.gif'); $sCaptionItem = <<<BLAH <div class="dbTopMenu"> <img src="{$sCloseImg}" class="login_ajx_close" /> </div> BLAH; if ($bbAjaxMode) { $sMemberLoginFormAjx = $GLOBALS['oFunctions']->transBox(DesignBoxContent(_t('_Member Login'), $sFormCode, 1, $sCaptionItem), true); echo $sMemberLoginFormAjx; exit; } $sMemberLoginForm = <<<EOF <div class="controlsDiv"> {$sFormCode} </div> EOF; $_page['header'] = $site['title'] . ' ' . _t("_Member Login"); $_page['header_text'] = _t("_Member Login"); if ($bbAjaxMode && $member == 1) { $template = BX_DIRECTORY_PATH_ROOT . "templates/base/login_form_ajax_a.html"; } if ($bbAjaxMode == false && $member == 0) { $_page_cont[0]['page_main_code'] = $sMemberLoginForm; } else { $_page_cont[0]['page_main_code'] = PageCompLoginForm($text, $member, $mem, $login_page, $join_page, $forgot_page, $template); } if ($bbAjaxMode) { echo <<<EOF <div class="login_ajax_wrap"> \t{$_page_cont[0]['page_main_code']} </div> EOF; exit; } $_page['name_index'] = 0; PageCode(); exit; }
function PageCodeTemplates($sResult) { $a = get_templates_array(true); $aTemplates = array(); foreach ($a as $k => $r) { $aTemplates[] = array('key' => $k, 'name' => htmlspecialchars_adv($r['name']), 'ver' => htmlspecialchars_adv($r['ver']), 'vendor' => htmlspecialchars_adv($r['vendor']), 'desc' => $r['desc'], 'bx_if:preview' => array('condition' => (bool) $r['preview'], 'content' => array('img' => $r['preview'])), 'bx_if:no_preview' => array('condition' => !$r['preview'], 'content' => array()), 'bx_if:default' => array('condition' => $k == getParam('template'), 'content' => array()), 'bx_if:make_default' => array('condition' => $k != getParam('template'), 'content' => array('key' => $k)), 'bx_if:delete' => array('condition' => $k != getParam('template') && $k != 'uni' && $k != 'alt', 'content' => array('key' => $k))); } $s = $sResult ? MsgBox($sResult, 10) : ''; $s .= $GLOBALS['oAdmTemplate']->parseHtmlByName('templates.html', array('bx_repeat:templates' => $aTemplates)); $sCode = DesignBoxAdmin($GLOBALS['sPageTitle'], $s, $GLOBALS['aTopItems'], '', 11); if ('on' == getParam('feeds_enable')) { $sCode = $sCode . DesignBoxAdmin(_t('_adm_box_cpt_design_templates'), ' <div class="RSSAggrCont" rssid="boonex_unity_market_templates" rssnum="5" member="0"> <div class="loading_rss"> <img src="' . getTemplateImage('loading.gif') . '" alt="' . _t('_loading ...') . '" /> </div> </div>'); } $GLOBALS['oAdmTemplate']->addJsTranslation(array('_Are you sure?')); return $sCode; }
$sResult = $oInstallerUi->actionRecompile($_POST['pathes']); } } } } if (isset($_POST['updates-install']) && is_array($_POST['pathes']) && !empty($_POST['pathes']) && isset($aEnabledModuleAction['update_install'])) { $sResult = $oInstallerUi->actionUpdate($_POST['pathes']); } if (isset($_POST['updates-delete']) && is_array($_POST['pathes']) && !empty($_POST['pathes']) && isset($aEnabledModuleAction['update_delete'])) { $sResultDeleteUpdate = $oInstallerUi->actionDelete($_POST['pathes']); } else { if (isset($_POST['submit_upload']) && isset($_FILES['module']) && !empty($_FILES['module']['tmp_name']) && isset($aEnabledModuleAction['upload_module'])) { $sResultUpload = $oInstallerUi->actionUpload('module', $_FILES['module'], $_POST); } else { if (isset($_POST['submit_upload']) && isset($_FILES['update']) && !empty($_FILES['update']['tmp_name']) && isset($aEnabledModuleAction['upload_update'])) { $sResultUpload = $oInstallerUi->actionUpload('update', $_FILES['update'], $_POST); } } } //--- Display cotent ---// $iNameIndex = 7; $_page = array('name_index' => $iNameIndex, 'css_name' => array('forms_adv.css', 'modules.css'), 'js_name' => array('modules.js'), 'header' => _t('_adm_page_cpt_manage_modules')); $_page_cont[$iNameIndex] = array('page_code_results' => !empty($sResult) ? DesignBoxAdmin(_t('_adm_box_cpt_operation_results'), $sResult, '', '', 11) : '', 'page_code_installed' => $oInstallerUi->getInstalled(), 'page_code_not_installed' => DesignBoxAdmin(_t('_adm_box_cpt_not_installed_modules'), $oInstallerUi->getNotInstalled($sResultDeleteModule)), 'page_code_updates' => DesignBoxAdmin(_t('_adm_box_cpt_available_updates'), $oInstallerUi->getUpdates($sResultDeleteUpdate)), 'page_code_uploader' => DesignBoxAdmin(_t('_adm_box_cpt_upload'), $oInstallerUi->getUploader($sResultUpload), array(array('title' => _t('_adm_txt_get_new_modules'), 'href' => "http://www.boonex.com/market")), '', 11), 'page_code_market_feed' => 'on' == getParam('feeds_enable') ? DesignBoxAdmin(_t('_adm_box_cpt_featured_modules'), ' <div class="RSSAggrCont" rssid="boonex_unity_market_featured" rssnum="5" member="0"> <div class="loading_rss"> <img src="' . getTemplateImage('loading.gif') . '" alt="' . _t('_loading ...') . '" /> </div> </div>') : '', 'obj_name' => BX_DOL_ADM_MM_JS_NAME, 'actions_url' => $GLOBALS['site']['url_admin'] . 'modules.php'); $oZ = new BxDolAlerts('system', 'admin_modules_page', 0, 0, array('page_vars' => &$_page, 'page_cont' => &$_page_cont)); $oZ->alert(); PageCodeAdmin();
header('Content-Type: text/html; charset=utf-8'); echo BxDolUserStatusView::getStatusPageLight($iLoggedID); } exit; } $sAction = bx_get('action'); if ($sAction !== false && $sAction == 'get_prof_comment_block') { $iProfileID = (int) bx_get('id'); if ($iProfileID) { $sCloseC = _t('_Close'); bx_import('BxTemplCmtsView'); $oCmtsView = new BxTemplCmtsView('profile', $iProfileID); if (!$oCmtsView->isEnabled()) { exit; } $sCloseImg = getTemplateImage('close.gif'); $sCaptionItem = <<<BLAH <div class="dbTopMenu"> <i class="login_ajx_close sys-icon times"></i> </div> BLAH; $sCommentsBlock = $GLOBALS['oFunctions']->transBox(DesignBoxContent(_t('_Comments'), $oCmtsView->_getPostReplyBox(), 1, $sCaptionItem), false); echo <<<EOF <style> div.cmt-post-reply { position: relative; } </style> {$sCommentsBlock} EOF; }
function PageMainCode() { $sResult = BxDolAdminDashboard::getCode(); $iNameIndex = 1; $GLOBALS['_page'] = array('name_index' => $iNameIndex, 'css_name' => array('index.css'), 'header' => _t('_adm_page_cpt_dashboard')); $GLOBALS['_page_cont'][$iNameIndex]['page_main_code'] = DesignBoxAdmin(_t('_adm_box_cpt_overview'), $sResult) . ('on' == getParam('news_enable') ? DesignBoxAdmin(_t('_adm_box_cpt_boonex_news'), ' <div class="RSSAggrCont" rssid="boonex_news" rssnum="5" member="0"> <div class="loading_rss"> <img src="' . getTemplateImage('loading.gif') . '" alt="' . _t('_loading ...') . '" /> </div> </div>') : '') . ('on' == getParam('feeds_enable') ? DesignBoxAdmin(_t('_adm_box_cpt_featured_modules'), ' <div class="RSSAggrCont" rssid="boonex_unity_market_featured" rssnum="5" member="0"> <div class="loading_rss"> <img src="' . getTemplateImage('loading.gif') . '" alt="' . _t('_loading ...') . '" /> </div> </div>') : ''); }
function GenCustomRssBlock($iID) { global $site; if (getParam('enable_crss_module') != 'on') { return; } $this->_iProfileID = $iID; $iVisitorID = (int) $_COOKIE['memberID']; $bAjaxMode = false !== bx_get('mode') && bx_get('mode') == 'ajax'; $bAjaxMode2 = false !== bx_get('mode') && bx_get('mode') == 'ajax2'; $sHomeUrl = $this->_oConfig->getHomeUrl(); $sLoadingIcon = getTemplateImage('loading.gif'); $sManagingForm = $sRssContent = ''; //Generation of managing form if ($iVisitorID > 0 && $iVisitorID == $this->_iProfileID) { $sAddC = _t('_Submit'); $sEditC = _t('_Edit'); $sAddNewURLC = _t('_Enter new URL'); $sURLC = _t('_URL'); $sDescriptionC = _t('_Description'); $sQuantityC = _t('_crss_Quantity'); $sAction = bx_get('action'); if (0 == strcasecmp($_SERVER['REQUEST_METHOD'], 'POST') && isset($sAction) && $sAction != '') { $sNewUrl = process_db_input(bx_get('rss_url'), BX_TAGS_STRIP); $sNewDesc = process_db_input(bx_get('rss_desc'), BX_TAGS_STRIP); $iOldID = (int) bx_get('rss_id'); $iQuantity = (int) bx_get('rss_quantity'); switch ($sAction) { case 'add_rss': $this->_oDb->insertProfileRSS($this->_iProfileID, $sNewUrl, $sNewDesc, $iQuantity); break; case 'ren_rss': $this->_oDb->updateProfileRSS($this->_iProfileID, $sNewUrl, $iOldID); break; case 'del_rss': $this->_oDb->deleteProfileRSS($this->_iProfileID, $iOldID); break; } } $sRSSList = ''; $aMemberRSS = $this->_oDb->getProfileRSS($this->_iProfileID); if (count($aMemberRSS) == 0) { $sRSSList = '<tr><td>' . MsgBox(_t('_Empty')) . '</td></tr>'; } else { foreach ($aMemberRSS as $sKey => $aRSSInfo) { $iRssID = (int) $aRSSInfo['ID']; $sRssUrl = process_line_output($aRSSInfo['RSSUrl']); $sRssDesc = process_line_output($aRSSInfo['Description']); $sRssStatus = process_line_output($aRSSInfo['Status']); $iRssQuantity = (int) $aRSSInfo['Quantity']; $aFormVariables = array('rss_url' => $sRssUrl, 'rss_description' => $sRssDesc, 'rss_status' => $sRssStatus, 'enter_new_url' => $sAddNewURLC, 'rss_url_js' => $sRssUrl, 'php_self' => bx_html_attribute($_SERVER['PHP_SELF']), 'rss_id' => $iRssID, 'owner_id' => $this->_iProfileID, 'rss_quantity' => $iRssQuantity); $sRSSList .= $this->_oTemplate->parseHtmlByTemplateName('crss_unit', $aFormVariables); } } $sFormOnsubmitCode = <<<EOF sLink1 = '{$sHomeUrl}crss.php?ID={$this->_iProfileID}&action=add_rss&rss_url=' + encodeUriComponent(\$('form#adding_custom_rss_form input[name=rss_url]').val()) + '&rss_desc=' + encodeUriComponent(\$('form#adding_custom_rss_form input[name=rss_desc]').val()) + '&rss_quantity=' + encodeUriComponent(\$('form#adding_custom_rss_form input[name=rss_quantity]').val()) + '&mode=ajax'; getHtmlData('custom_rss_lists_div', sLink1, '', 'post'); return false; EOF; //adding form $aForm = array('form_attrs' => array('name' => 'adding_custom_rss_form', 'action' => getProfileLink($iVisitorID), 'method' => 'post', 'onsubmit' => $sFormOnsubmitCode), 'inputs' => array('rss_url' => array('type' => 'text', 'name' => 'rss_url', 'maxlength' => 255, 'caption' => $sURLC), 'rss_quantity' => array('type' => 'text', 'name' => 'rss_quantity', 'maxlength' => 4, 'caption' => $sQuantityC), 'rss_desc' => array('type' => 'text', 'name' => 'rss_desc', 'maxlength' => 255, 'caption' => $sDescriptionC), 'hidden_id' => array('type' => 'hidden', 'name' => 'ID', 'value' => $this->_iProfileID), 'hidden_action' => array('type' => 'hidden', 'name' => 'action', 'value' => 'add_rss'), 'add_button' => array('type' => 'submit', 'name' => 'submit', 'caption' => '', 'value' => $sAddC))); $oForm = new BxTemplFormView($aForm); $sAddingForm = $oForm->getCode(); } $sLoadingC = _t('_loading ...'); //Generation of Active RSS`s unset($aMemberRSS); $sActiveRSSList = $sRssAggr = ''; if ($this->_iProfileID > 0) { //view RSS of current member $aMemberRSS = $this->_oDb->getActiveProfileRSS($this->_iProfileID); if (count($aMemberRSS) == 0) { $sRssContent = MsgBox(_t('_Empty')); } else { foreach ($aMemberRSS as $sKey => $aRSSInfo) { $iRssID = (int) $aRSSInfo['ID']; $iRssQuantity = (int) $aRSSInfo['Quantity']; $sRssUrl = process_line_output($aRSSInfo['RSSUrl']); $sActiveRSSList .= <<<EOF <div class="RSSAggrCont_{$iRssID}" rssnum="{$iRssQuantity}"> \t<div class="loading_ajax" style="margin-left:185px; position:relative;"> \t\t<img style="margin-top: 16px;" alt="{$sLoadingC}" src="{$sLoadingIcon}" /> \t</div> </div> EOF; $sRssAggr .= <<<EOF \$('div.RSSAggrCont_{$iRssID}').dolRSSFeed('{$sHomeUrl}get_rss_feed.php?ID={$iRssID}'); EOF; } $sRssContent = $sActiveRSSList; } } $sTableExRssContent = <<<EOF <table class="form_advanced_tableX" id="custom_rss_lists" style="width:100%;" cellspacing="0" cellpadding="0"> \t{$sRSSList} </table> EOF; if ($bAjaxMode) { echo $sTableExRssContent; exit; } $aFormVariables = array('member_rss_list' => $sRssContent, 'member_rss_js_aggr' => $sRssAggr); $sReadyRssContent = $this->_oTemplate->parseHtmlByTemplateName('member_rss_list_loaded', $aFormVariables); if ($bAjaxMode2) { echo $sReadyRssContent; exit; } $aFormVariables = array('view_css' => $this->_oTemplate->getCssUrl('view.css'), 'main_js_url' => $sHomeUrl . 'js/main.js', 'table_existed_rss_list' => $sTableExRssContent, 'form_adding' => $sAddingForm, 'member_rss_list_loaded' => $sReadyRssContent); $sBlockContent = $this->_oTemplate->parseHtmlByTemplateName('view', $aFormVariables); //Action to showing managing form $sPreferSpeed = $this->_oConfig->getAnimationSpeed(); $sActions = BxDolPageView::getBlockCaptionMenu(mktime(), array('crss_t1' => array('href' => bx_html_attribute($_SERVER['PHP_SELF']), 'title' => $sEditC, 'onclick' => "ShowHideEditCRSSForm('{$sPreferSpeed}'); return false;"))); return DesignBoxContent(_t('_crss_Custom_Feeds'), $sBlockContent, 1, $sActions); }
function getCategoryManager() { $sCatID = (int) bx_get('id'); if ($sCatID && false !== bx_get('sa')) { switch (bx_get('sa')) { case 'editcat': $sResult = $this->getManageClassifiedsForm($sCatID, true); break; case 'editscat': $sResult = $this->getAddSubcatForm($sCatID, true); break; case 'delcat': $sResult = MsgBox(_t('_bx_ads_Main_category_failed_delete'), 1); if ($this->_oDb->deleteCat($sCatID)) { $sResult = MsgBox(_t('_bx_ads_Main_category_successfully_deleted'), 1); } $vSubCats = $this->_oDb->getAllSubCatsInfo($sCategory); while ($aSubCat = mysql_fetch_assoc($vSubCats)) { $iSubcat = (int) $aSubCat['ID']; $this->_oDb->deleteSubCat($iSubcat); } break; case 'delscat': $sResult = MsgBox(_t('_bx_ads_Sub_category_failed_deleted'), 1); if ($this->_oDb->deleteSubCat($sCatID)) { $sResult = MsgBox(_t('_bx_ads_Sub_category_successfully_delete'), 1); } break; } } $sJS = $this->_oTemplate->addJs('main.js', true); $sRootCaptionC = _t('_bx_ads_root'); $sViewC = _t('_View'); $sEditC = _t('_Edit'); $sDeleteC = _t('_Delete'); $sFolder2Icon = $this->_oTemplate->getImageUrl('folder_s.gif'); $vSqlRes = $this->_oDb->getAllCatsInfo(); if (db_affected_rows() == -1) { return _t('_Error Occured'); } $sTreeRows = ''; while ($aSqlResCls = mysql_fetch_assoc($vSqlRes)) { $iID = (int) $aSqlResCls['ID']; $sName = $aSqlResCls['Name']; $sCUri = $aSqlResCls['CEntryUri']; // $iCnt = $this->_oDb->getCountOfAdsInCat($iID); // $sCnt = ($iCnt > 0) ? "({$iCnt})" : "(0)"; $sCategLink = $this->genUrl($iID, $sCUri, 'cat'); $sCategDelLink = $this->sCurrBrowsedFile . '?action=category_manager&sa=delcat&id=' . $iID; $sCategEditLink = $this->sCurrBrowsedFile . '?action=category_manager&sa=editcat&id=' . $iID; $vSubs = $this->_oDb->getSubsNameIDCountAdsByAdID($iID); $sSubsRows = ''; while ($aSub = mysql_fetch_assoc($vSubs)) { $iSubID = (int) $aSub['ID']; //$iSubAdsCnt = (int)$aSub['Count']; $iSubName = $aSub['Name']; $sSUri = $aSub['SEntryUri']; $sSubCategLink = $this->genUrl($iSubID, $sSUri, 'subcat'); $sSubCategDelLink = $this->sCurrBrowsedFile . '?action=category_manager&sa=delscat&id=' . $iSubID; $sSubCategEditLink = $this->sCurrBrowsedFile . '?action=category_manager&sa=editscat&id=' . $iSubID; $sSubsRows .= <<<EOF <li id='{$iSubID}'><span>{$iSubName} </span><a href="{$sSubCategLink}">({$sViewC})</a><a href="javascript: void(0)" onclick="AdmAction2Category('{$this->sCurrBrowsedFile}?action=category_manager', 'editscat', {$iSubID}); return false;">({$sEditC})</a><a href="javascript: void(0)" onclick="AdmAction2Category('{$this->sCurrBrowsedFile}?action=category_manager', 'delscat', {$iSubID}); return false;">({$sDeleteC})</a></li> EOF; } $sTreeRows .= <<<EOF <li id='{$iID}'><span>{$sName}</span><a href="{$sCategLink}">({$sViewC})</a><a href="javascript: void(0)" onclick="AdmAction2Category('{$this->sCurrBrowsedFile}?action=category_manager', 'editcat', {$iID}); return false;">({$sEditC})</a><a href="javascript: void(0)" onclick="AdmAction2Category('{$this->sCurrBrowsedFile}?action=category_manager', 'delcat', {$iID}); return false;">({$sDeleteC})</a> \t<ul> \t\t{$sSubsRows} \t</ul> </li> EOF; } $sResult .= <<<EOF <script type="text/javascript"> var simpleTreeCollection; \$(document).ready(function(){ \tsimpleTreeCollection = \$('.simpleTree').simpleTree({ \t\tautoclose: true, \t\tafterClick:function(node){ \t\t\t//alert("text-"+\$('span:first',node).text()); \t\t}, \t\tafterDblClick:function(node){ \t\t\t//alert("text-"+\$('span:first',node).text()); \t\t}, \t\tafterMove:function(destination, source, pos){ \t\t\t//alert("destination-"+destination.attr('id')+" source-"+source.attr('id')+" pos-"+pos); \t\t}, \t\tafterAjax:function() \t\t{ \t\t\t//alert('Loaded'); \t\t}, \t\tanimate:true, \t\tdrag:false \t\t//,docToFolderConvert:true \t}); }); </script> <ul class="simpleTree"> \t<li class="root" id='1'><span>{$sRootCaptionC}</span> \t\t<ul> \t\t\t{$sTreeRows} \t\t</ul> \t</li> </ul> <div class="clear_both"></div> <!-- <div id="cat_manage_div"></div> <div class="clear_both"></div> --> EOF; if (bx_get('mode') == 'json') { require_once BX_DIRECTORY_PATH_PLUGINS . 'Services_JSON.php'; $oJson = new Services_JSON(); return $oJson->encode($sResult); } // display as popup $aVars = array('title' => _t('_bx_ads_category_manager'), 'icon_close_url' => getTemplateImage('close.gif'), 'ads_form' => $sJS . $sResult); return $GLOBALS['oFunctions']->transBox($this->_oTemplate->parseHtmlByName('add_manage_popup.html', $aVars), true); }
function actionSharePopup($iSiteId) { $iSiteId = (int) $iSiteId; if (!($aSite = $this->_oDb->getSiteById($iSiteId, 0, true))) { echo '<div class="bx_sites_share_popup">' . MsgBox(_t('_Empty')) . '</div>'; return; } require_once BX_DIRECTORY_PATH_INC . "shared_sites.inc.php"; $aSitesPrepare = getSitesArray(BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aSite['entryUri']); $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']); } $aVars = array('title' => _t('_bx_sites_caption_share_site'), 'icon_close_url' => getTemplateImage('close.gif'), 'bx_repeat:sites' => $aSites); echo $GLOBALS['oFunctions']->transBox($this->_oTemplate->parseHtmlByName('share_popup.html', $aVars), true); exit; }
/** * Function will generate chat block for current member ; * * @param : $iSender (integer) - sender member's Id; * @return : (array); */ function getChatBox($iSender) { global $oFunctions; $iSender = (int) $iSender; $oModuleDb = new BxDolModuleDb(); $oUserStatus = new BxDolUserStatusView(); $sMemberThumb = $oFunctions->getMemberThumbnail($iSender, 'none'); $aSenderInfo = getProfileInfo($iSender); $sSenderLink = getProfileLink($iSender); $sStatusIcon = getTemplateIcon($oUserStatus->getStatusIcon($iSender)); $sDeviderIcon = getTemplateIcon('member_menu_devider.png'); $sReduceImage = getTemplateIcon('reduce.png'); $sCloseImage = getTemplateIcon('close.png'); $sBackgroundImage = getTemplateImage('top_menu_popup_bg.png'); $sFieldImgPath = $this->_oTemplate->getIconUrl('message.png'); $sVideoMessengerImgPath = $this->_oTemplate->getIconUrl('video_messenger.png'); // language keys; $aLanguageKeys = array('minimize' => _t('_simple_messenger_minimize_button'), 'close' => _t('_simple_messenger_close_button'), 'video_mess' => _t('_simple_messenger_switch_to_video')); // contain data for sender block; $aSenderBlock = array('sender_thumb' => $sMemberThumb, 'sender_link' => $sSenderLink, 'status_text' => $aSenderInfo['UserStatusMessage'], 'sender_nick' => $aSenderInfo['NickName'], 'reduce_img' => $sReduceImage, 'reduce_title' => $aLanguageKeys['minimize'], 'close_img' => $sCloseImage, 'close_title' => $aLanguageKeys['close'], 'history_window_id' => $this->aCoreSettings['history_block_prefix'] . $iSender, 'sender_id' => $iSender, 'bx_if:video_messenger' => array('condition' => $oModuleDb->isModule('messenger'), 'content' => array('sender_id' => $this->iLoggedMemberId, 'sender_passw' => getPassword($this->iLoggedMemberId), 'recipient_id' => $iSender, 'video_messenger' => $aLanguageKeys['video_mess'], 'video_img_src' => $sVideoMessengerImgPath))); $aMessagesList = $this->getMessagesHistory($this->iLoggedMemberId, $iSender, 0, false); // process nick name; $sNickName = mb_strlen($aSenderInfo['NickName']) > $this->iMaxNickLength ? mb_substr($aSenderInfo['NickName'], 0, $this->iMaxNickLength) . '...' : $aSenderInfo['NickName']; $aTemplateKeys = array('block_indent' => $this->sMemberMenuPosition == 'bottom' ? 'bottom_indent' : 'top_indent', 'chat_block_position' => $this->sMemberMenuPosition == 'bottom' ? 'chat_block_bottom_position' : 'chat_block_top_position', 'sender_nick' => $sNickName, 'member_status' => $sStatusIcon, 'devider_img_path' => $sDeviderIcon, 'history_window_id' => $this->aCoreSettings['history_block_prefix'] . $iSender, 'history_back_img' => $sBackgroundImage, 'history_block_position' => $this->sMemberMenuPosition == 'bottom' ? 'history_bottom_position' : 'history_top_position', 'field_img' => $sFieldImgPath, 'recipient_id' => $iSender, 'bx_if:menu_pos_top' => array('condition' => $this->sMemberMenuPosition == 'bottom', 'content' => $aSenderBlock), 'bx_if:menu_pos_bottom' => array('condition' => $this->sMemberMenuPosition != 'bottom', 'content' => $aSenderBlock), 'messages' => $aMessagesList['messages_list']); // generate the chat box's content; $sOutputCode = $this->_oTemplate->parseHtmlByName('chat_block.html', $aTemplateKeys); $aRetArray = array('chat_box' => $sOutputCode, 'last_message' => $aMessagesList['last_message'], 'count_messages' => $aMessagesList['count_messages']); return $aRetArray; }
function genLeaderPack($aMTypes, $sSex = 'male') { $sSLeaders = ''; if (is_array($aMTypes) and count($aMTypes) > 0) { $sVacantC = _t('_Vacant'); $sOfflineC = _t('_Offline'); $sMaleIcon = getTemplateIcon('male.png'); $sFemaleIcon = getTemplateIcon('female.png'); $sSpacerIcon = getTemplateImage('spacer.gif'); $sOfflineIcon = getTemplateIcon('sys_status_offline.png'); $sSexIcon = $sThumbType = ''; switch ($sSex) { case 'male': $sSexIcon = $sMaleIcon; $sThumbType = 'man'; break; case 'female': $sSexIcon = $sFemaleIcon; $sThumbType = 'woman'; break; } $sSexThumbIcon = getTemplateIcon($sThumbType . '_medium.gif'); foreach ($aMTypes as $sTopType => $iMembID) { $sTypeName = $sTopType; $sTypeNameUcf = ucfirst($sTopType); $sLabel = _t('_' . $sTypeNameUcf); $oMembVoting = new BxTemplVotingView('profile', $iMembID); $sVotingVal = '<div class="rate_block_position">' . $oMembVoting->getJustVotingElement(0) . '</div>'; $iVotesCnt = $oMembVoting->getVoteCount(); $sMembThumb = $sProfileLink = ''; if ($iMembID > 0) { $sMembThumb = get_member_thumbnail($iMembID, 'none', false); $sMemberName = getNickname($iMembID); $sMemberLink = getProfileLink($iMembID); $sProfileLink = <<<EOF <a href="{$sMemberLink}">{$sMemberName}</a> EOF; } else { $sMembThumb = <<<EOF <div class="thumbnail_image" style="width: 68px; height: 68px;"> <a href="javascript:void(0)"> <img title="{$sVacantC}" alt="{$sVacantC}" style="background-image: url({$sSexThumbIcon}); width: 64px; height: 64px;" src="{$sSpacerIcon}" /> <img class="sys-online-offline" title="{$sOfflineC}" alt="{$sOfflineC}" src="{$sOfflineIcon}" /> </a> </div> EOF; $sProfileLink = <<<EOF <a class="vacant" href="javascript: void(0);">{$sVacantC}</a> EOF; } $sVotes = _t('_{0} votes', $iVotesCnt); $sSLeaders .= <<<EOF <div id="prof_of_{$sTypeName}" class="featured_block_1"> \t<div class="top_rated_head"> \t\t<div class="sex_icon" style="background:url({$sSexIcon}) center 2px no-repeat;"> </div> \t\t<div class="type_vote"> \t\t\t{$sLabel}<br /> \t\t\t<font style="font-size:9px;color:#999;">{$sVotes}</font> \t\t</div> \t\t<div class="clear_both"></div> \t</div> \t{$sMembThumb} \t{$sVotingVal} \t<div class="thumb_username">{$sProfileLink}</div> \t<div class="clear_both"></div> </div> EOF; } return $sSLeaders; } }
function genBreadcrumb($aPath = array()) { $sRootItem = '<a href="' . $this->sSiteUrl . '">' . _t('_Home') . '</a>'; if (!empty($this->aCustomBreadcrumbs)) { $a = array(); foreach ($this->aCustomBreadcrumbs as $sTitle => $sLink) { if ($sTitle) { $a[] = $sLink ? '<a href="' . $sLink . '">' . $sTitle . '</a>' : $sTitle; } } $aPath = array_merge(array($sRootItem), $a); } elseif (!is_array($aPath) || empty($aPath)) { $aPath = array($sRootItem); } else { $aPath = array_merge(array($sRootItem), $aPath); } //define current url for single page (not contain any child pages) if ($this->aMenuInfo['currentTop'] != -1 && count($aPath) == 1) { $aPath[] = _t($this->aTopMenu[$this->aMenuInfo['currentTop']]['Caption']); } //--- Get breadcrumb path(left side) ---// $sDivider = '<img class="bc_divider" src="' . getTemplateImage('bc_divider.png') . '" />'; $aPathLinks = array(); foreach ($aPath as $sLink) { $aPathLinks[] = '<div class="bc_unit">' . $sLink . '</div>'; } $sPathLinks = implode($sDivider, $aPathLinks); //--- Get additional links(right side) ---// $sAddons = ""; if (isMember()) { $aProfile = getProfileInfo(); $sAddons = _t('_Hello member', $aProfile['NickName']); $sAddons .= ' <a href="' . $this->sSiteUrl . 'member.php">' . _t('_sys_breadcrumb_account') . '</a>'; $sAddons .= ' <a href="' . $this->sSiteUrl . 'logout.php">' . _t('_sys_breadcrumb_logout') . '</a>'; } else { $sAddons = _t('_Hello member', _t('_sys_breadcrumb_guest')); $sAddons .= ' <a href="' . $this->sSiteUrl . 'join.php">' . _t('_sys_breadcrumb_join') . '</a>'; $sAddons .= ' <a href="javascript:void(0)" onclick="showPopupLoginForm(); return false;">' . _t('_sys_breadcrumb_login') . '</a>'; } return '<div class="breadcrumb"><div class="bc_open"> </div>' . $sPathLinks . '<div class="bc_addons">' . $sAddons . '</div><div class="bc_close"> </div></div>'; }
function getBlockCode_RSS($iBlockID, $sContent) { list($sUrl, $iNum) = explode('#', $sContent); $iNum = (int) $iNum; $iAddID = 0; if (isset($this->oProfileGen->_iProfileID)) { $iAddID = $this->oProfileGen->_iProfileID; } elseif (isMember()) { $iAddID = (int) $_COOKIE['memberID']; } return ' <div class="RSSAggrCont" rssid="' . $iBlockID . '" rssnum="' . $iNum . '" member="' . $iAddID . '"> <div class="loading_rss"> <img src="' . getTemplateImage('loading.gif') . '" alt="Loading..." /> </div> </div>'; }
function GenCustomOSiBlock($iID) { if ($iID < 1) { return; } $this->_iProfileID = $iID; $iVisitorID = (int) $_COOKIE['memberID']; $bAjaxMode = false !== bx_get('mode') && bx_get('mode') == 'ajax' ? true : false; $bAjaxMode2 = false !== bx_get('mode') && bx_get('mode') == 'ajax2' ? true : false; $sLoadingC = _t('_loading ...'); $sHomeUrl = $this->_oConfig->getHomeUrl(); $sLoadingIcon = getTemplateImage('loading.gif'); $sManagingForm = $sApplsContent = $sAddingForm = $sCopyForm = $sAddingApplicationsBox = ''; $sActiveApplList = $sApplAggr = ''; //Generation of managing form if ($iVisitorID > 0 && $iVisitorID == $this->_iProfileID) { // is owner $sAddC = _t('_Submit'); $sEditC = _t('_Edit'); $sAddNewURLC = _t('_Enter new URL'); $sURLC = _t('_URL'); $sDescriptionC = _t('_Description'); $sAction = bx_get('action'); if (isset($sAction) && $sAction != '') { $sNewUrl = process_db_input(bx_get('application_url'), 1); $iOldID = (int) bx_get('application_id'); switch ($sAction) { case 'add_application': $sSubAction = $this->_bAdminMode && !defined('BX_PROFILE_PAGE') ? 'adminaddapp' : 'addapp'; bx_file_get_contents(BX_DOL_URL_ROOT . "modules/boonex/open_social/integration/html/profile/{$sSubAction}/{$iVisitorID}?appUrl={$sNewUrl}"); if ($this->_bAdminMode && !defined('BX_PROFILE_PAGE')) { header("Location: " . BX_DOL_URL_ROOT . 'modules/boonex/open_social/post_mod_os.php'); } else { $sProfileLink = getProfileLink($iVisitorID); header("Location: " . $sProfileLink); } break; case 'copy_admin_application': $sOSiSQL = "\r\n\t\t\t\t\t\t\t\tINSERT INTO `bx_osi_main` (`person_id`, `url`, `description`, `status`, `title`, `directory_title`, `author`, `author_email`, `settings`, `views`, `version`, `height`, `scrolling`, `modified`, `screenshot`, `thumbnail`)\r\n\t\t\t\t\t\t\t\tSELECT '{$iVisitorID}', `url`, `description`, `status`, `title`, `directory_title`, `author`, `author_email`, `settings`, `views`, `version`, `height`, `scrolling`, `modified`, `screenshot`, `thumbnail`\r\n\t\t\t\t\t\t\t\tFROM `bx_osi_main` WHERE `ID` ='{$iOldID}'\r\n\t\t\t\t\t\t\t"; db_res($sOSiSQL); $sProfileLink = getProfileLink($iVisitorID); header("Location: " . $sProfileLink); break; } } $sWorkingFile = $this->_bAdminMode ? 'post_mod_os' : 'os'; if ($this->_bAdminMode || getParam('users_can_upload_bx_open_social') == 'on') { $sFormOnsubmitCode = <<<EOF sApplUrl = \$('form#adding_custom_appl_form input[name=application_url]').val(); sAddAppLink = '{$sHomeUrl}{$sWorkingFile}.php?ID={$this->_iProfileID}&action=add_application&application_url=' + sApplUrl + '&mode=ajax'; getHtmlData('custom_appl_lists_div', sAddAppLink, '', 'post'); return false; EOF; //adding form $aForm = array('form_attrs' => array('name' => 'adding_custom_appl_form', 'action' => bx_html_attribute($_SERVER['PHP_SELF']), 'method' => 'post'), 'inputs' => array('application_url' => array('type' => 'text', 'name' => 'application_url', 'maxlength' => 255, 'caption' => $sURLC, 'info' => _t('_osi_applucation_url_desc')), 'hidden_action' => array('type' => 'hidden', 'name' => 'action', 'value' => 'add_application'), 'hidden_visitor' => array('type' => 'hidden', 'name' => 'ID', 'value' => $iVisitorID), 'add_button' => array('type' => 'submit', 'name' => 'submit', 'caption' => '', 'value' => $sAddC))); $oForm = new BxTemplFormView($aForm); $sAddingForm = $oForm->getCode(); } if (defined('BX_PROFILE_PAGE')) { $aExistingApplications = $this->_oDb->getAdminsApplications(); //adding admin applications form $aExForm = array('form_attrs' => array('name' => 'adding_custom_appl_form', 'action' => bx_html_attribute($_SERVER['PHP_SELF']), 'method' => 'post'), 'inputs' => array('header' => array('type' => 'block_header', 'caption' => _t('_osi_Existed_applications')), 'application_id' => array('type' => 'select', 'name' => 'application_id', 'caption' => _t('_osi_Existed_applications'), 'values' => $aExistingApplications), 'hidden_action' => array('type' => 'hidden', 'name' => 'action', 'value' => 'copy_admin_application'), 'hidden_action2' => array('type' => 'hidden', 'name' => 'ID', 'value' => $iVisitorID), 'add_ex_button' => array('type' => 'submit', 'name' => 'submit', 'caption' => '', 'value' => $sAddC))); $oExForm = new BxTemplFormView($aExForm); $sCopyForm = $oExForm->getCode(); } // adding applications form $sEmptySettingsDiv = <<<EOF <div class="dbContent"> <script language="javascript" type="text/javascript" src="{$sHomeUrl}js/main.js"></script> <div id="manage_applications_block" class="OsApplCont_0" > \t{$sAddingForm} \t{$sCopyForm} </div> </div> EOF; if (defined('BX_OS_ADMIN')) { $sAddingApplicationsBox = DesignBoxAdmin(_t('_osi_Settings'), $sEmptySettingsDiv); } else { $sAddingApplicationsBox = DesignBoxContent(_t('_osi_Settings'), $sEmptySettingsDiv, 1); } } $sPreferSpeed = $this->_oConfig->getAnimationSpeed(); //if ($this->_bAdminMode == false) { // Collect all applications with settings in designbox modes $aMemberApplications = $iVisitorID == $this->_iProfileID ? $this->_oDb->getProfileApplications($this->_iProfileID) : $this->_oDb->getActiveProfileApplications($this->_iProfileID); foreach ($aMemberApplications as $sKey => $aApplInfo) { $iAppliID = (int) $aApplInfo['ID']; $iPersonID = (int) $aApplInfo['person_id']; if ($iAppliID > 0 && $iPersonID > 0) { $sOSiUrl = $aApplInfo['url']; $sOSiTitle = $aApplInfo['title']; $sApplFormDiv = $sAction = ''; if ($iVisitorID > 0 && $iVisitorID == $this->_iProfileID) { $sAction = BxDolPageView::getBlockCaptionMenu(mktime(), array('crss_t1' => array('href' => bx_html_attribute($_SERVER['PHP_SELF']), 'title' => $sEditC, 'onclick' => "ToggleAppSettings('{$sPreferSpeed}', {$iAppliID}); return false;"))); $sApplForm = bx_file_get_contents(BX_DOL_URL_ROOT . "modules/boonex/open_social/integration/html/profile/member_app_sett_by_id/{$iVisitorID}/{$iAppliID}"); $sApplFormDiv = <<<EOF <div id="manage_applications_block" class="OsApplSettCont_{$iAppliID}" style="display:none;" > \t{$sApplForm} </div> EOF; } $sOSiUrlValue = bx_file_get_contents(BX_DOL_URL_ROOT . "modules/boonex/open_social/integration/html/appl/show/{$this->_iProfileID}/{$iAppliID}/1"); $sOSiUrlDiv = <<<EOF <div class="OsApplCont_{$iAppliID}" style="" > \t{$sOSiUrlValue} </div> EOF; $sOSiUrlValue = DesignBoxContent($sOSiTitle, $sOSiUrlDiv . $sApplFormDiv, 1, $sAction); $sActiveApplList .= <<<EOF <div class="OsApplAggrCont_{$iAppliID}" > \t<div class="clear_both"></div> \t{$sOSiUrlValue} \t<div class="clear_both"></div> </div> EOF; } } $sApplsContent = $sActiveApplList; $aFormVariables = array('member_appl_list' => $sApplsContent, 'member_appl_js_aggr' => $sApplAggr); $sReadyApplContent = $this->_oTemplate->parseHtmlByTemplateName('member_osi_list_loaded', $aFormVariables); if ($bAjaxMode2) { echo $sReadyApplContent; exit; } //} // get common style-js header $sOSiHeaderOnce = bx_file_get_contents(BX_DOL_URL_ROOT . "modules/boonex/open_social/integration/html/appl/header_once/{$this->_iProfileID}"); $aFormVariables = array('view_css' => $this->_oTemplate->getCssUrl('view.css'), 'main_js_url' => $sHomeUrl . 'js/main.js', 'member_osi_list_loaded' => $sReadyApplContent); $sBlockContent = $this->_oTemplate->parseHtmlByTemplateName('view', $aFormVariables); return $sAddingApplicationsBox . $sOSiHeaderOnce . $sBlockContent; }