Exemplo n.º 1
0
 function profileCustomizeBlock($aTopMenu, $sPage, $aTargets, $sTarget, $aVars)
 {
     $sContent = '';
     $aMenuItems = array();
     $sBaseUrl = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri();
     $aItems = array();
     foreach ($aTopMenu as $sName => $aItem) {
         $aItems[] = array('title' => $sName, 'active' => $aItem['active'], 'href' => $aItem['href'], 'onclick' => 'oBxSctrMain.reloadCustomizeBlock(this.href, false); return false;');
     }
     $sTopMenu = BxDolPageView::getBlockCaptionMenu('site_customize', $aItems);
     // content for box
     if ($sPage != 'themes') {
         $sTopControls = $this->parsePageByName('designbox_top_controls.html', array('top_controls' => $this->parseHtmlByName('content_box_top_controls.html', array('name_box' => _t('_bx_sctr_select_target'), 'name_targets_box' => 'background_box', 'bx_repeat:targets' => $aTargets))));
         $sBoxContent = $this->parseHtmlByName('content_box.html', array('bx_if:select_target' => array('condition' => !empty($aTargets), 'content' => array('top_controls' => $sTopControls)), 'content' => call_user_func_array(array($this, '_customPage' . ucfirst($sPage)), array($sPage, $sTarget, $aVars)), 'bx_repeat:buttons' => array(array('btn_type' => 'button', 'btn_name' => 'preview', 'btn_value' => _t('_bx_sctr_btn_preview'), 'btn_action' => "oBxSctrMain.reloadCustom('" . $sPage . "', '" . $sTarget . "', 'preview');"), array('btn_type' => 'button', 'btn_name' => 'reset', 'btn_value' => _t('_bx_sctr_btn_reset'), 'btn_action' => "oBxSctrMain.resetCustom('" . $sPage . "', '" . $sTarget . "', 'reset');"), array('btn_type' => 'button', 'btn_name' => 'save', 'btn_value' => _t('_bx_sctr_btn_save'), 'btn_action' => "oBxSctrMain.reloadCustom('" . $sPage . "', '" . $sTarget . "', 'save');"), array('btn_type' => 'button', 'btn_name' => 'publish', 'btn_value' => _t('_bx_sctr_btn_publish'), 'btn_action' => "oBxSctrMain.showPublish('{$sBaseUrl}publish');"))));
     } else {
         $iUserId = $sTarget == 'my' ? $this->_oModule->iUserId : 0;
         $sPageThemes = $this->_customPageThemes($iUserId, true);
         if ($sPageThemes) {
             $aButtons = array(array('btn_type' => 'button', 'btn_name' => 'preview', 'btn_value' => _t('_bx_sctr_btn_preview'), 'btn_action' => "oBxSctrMain.previewTheme();"), array('btn_type' => 'button', 'btn_name' => 'reset', 'btn_value' => _t('_bx_sctr_btn_reset'), 'btn_action' => "oBxSctrMain.resetCustom('', '', 'reset');"), array('btn_type' => 'button', 'btn_name' => 'save', 'btn_value' => _t('_bx_sctr_btn_save'), 'btn_action' => "oBxSctrMain.saveTheme();"));
         } else {
             $aButtons = array();
         }
         if ($sPageThemes && $sTarget != 'shared') {
             $aButtons[] = array('btn_type' => 'button', 'btn_name' => 'delete', 'btn_value' => _t('_bx_sctr_btn_delete'), 'btn_action' => "oBxSctrMain.deleteTheme('" . $sBaseUrl . "deletetheme/');");
         }
         $aButtons[] = array('btn_type' => 'button', 'btn_name' => 'reset', 'btn_value' => _t('_bx_sctr_btn_reset_all'), 'btn_action' => "oBxSctrMain.resetAll('{$sBaseUrl}resetall');");
         $sTopControls = $this->parsePageByName('designbox_top_controls.html', array('top_controls' => $this->parseHtmlByName('content_box_top_controls.html', array('name_box' => _t('_bx_sctr_select_target'), 'name_targets_box' => 'background_box', 'bx_repeat:targets' => $aTargets))));
         $sBoxContent = $this->parseHtmlByName('content_box.html', array('bx_if:select_target' => array('condition' => !empty($aTargets), 'content' => array('top_controls' => $sTopControls)), 'content' => $sPageThemes ? $sPageThemes : MsgBox(_t('_Empty')), 'bx_repeat:buttons' => $aButtons));
     }
     // customize box
     $sContent = $this->parseHtmlByName('customize_block.html', array('js_code' => $this->getJsCode(true), 'content' => $GLOBALS['oFunctions']->transBox(DesignBoxContent(_t('_bx_sctr'), $sBoxContent, 1, $sTopMenu), false)));
     $this->addCss(array('main.css'));
     $this->addJs(array('colorinput.js', 'main.js'));
     return $sContent;
 }
Exemplo n.º 2
0
 function getBlockCode_SearchForm()
 {
     global $logged;
     $aProfile = $logged['member'] ? getProfileInfo(getLoggedId()) : array();
     // default params for search form
     $aDefaultParams = array('LookingFor' => isset($_GET['LookingFor']) ? $_GET['LookingFor'] : ($aProfile['Sex'] ? $aProfile['Sex'] : 'male'), 'Sex' => isset($_GET['Sex']) ? $_GET['Sex'] : ($aProfile['LookingFor'] ? $aProfile['LookingFor'] : 'female'), 'Country' => isset($_GET['Country'][0]) ? $_GET['Country'][0] : ($aProfile['Country'] ? $aProfile['Country'] : getParam('default_country')), 'DateOfBirth' => isset($_GET['DateOfBirth']) ? $_GET['DateOfBirth'] : getParam('search_start_age') . '-' . getParam('search_end_age'), 'Tags' => isset($_GET['Tags']) ? $_GET['Tags'] : '', 'online_only' => isset($_GET['online_only']) ? $_GET['online_only'] : '', 'photos_only' => isset($_GET['photos_only']) ? $_GET['photos_only'] : '');
     $sForms = $this->oPF->getFormCode(array('default_params' => $aDefaultParams));
     $bSimAct = $this->oPF->iAreaID == 9 ? true : false;
     $bAdvAct = $this->oPF->iAreaID == 11 ? true : false;
     $bQuiAct = $this->oPF->iAreaID == 10 ? true : false;
     $sUrl = BX_DOL_URL_ROOT . 'search.php';
     $sLinks = BxDolPageView::getBlockCaptionMenu(mktime(), array('simple' => array('href' => $sUrl . '?search_mode=sim', 'title' => _t('_search_tab_simple'), 'onclick' => '', 'active' => $bSimAct), 'advanced' => array('href' => $sUrl . '?search_mode=adv', 'title' => _t('_search_tab_Adv'), 'onclick' => '', 'active' => $bAdvAct), 'quick' => array('href' => $sUrl . '?search_mode=quick', 'title' => _t('_search_tab_quick'), 'onclick' => '', 'active' => $bQuiAct)));
     return DesignBoxContent(_t('_Search profiles'), $sForms, 1, $sLinks);
 }
Exemplo n.º 3
0
    function GenMyPageAdmin($sMode = '')
    {
        $this->CheckLogged();
        $sMainC = _t('_bx_blog_Manage_main');
        $sAddC = _t('_bx_blog_Add');
        $sManageC = _t('_bx_blog_Manage');
        $sPendingC = _t('_bx_blog_pending_approval');
        $sAdministrationC = _t('_bx_blog_Administration');
        $sMyBlogC = _t('_bx_blog_My_blog');
        $sPendApprC = _t('_bx_blog_pending_approval');
        $sMyPostsC = _t('_bx_blog_My_posts');
        $bUseFriendlyLinks = $this->isPermalinkEnabled();
        $sLink = $this->genBlogFormUrl();
        $sBlogMainLink = $bUseFriendlyLinks ? 'blogs/my_page/' : "{$sLink}?action=my_page";
        $sBlogAddLink = $bUseFriendlyLinks ? 'blogs/my_page/add/' : "{$sLink}?action=my_page&mode=add";
        $sBlogManageLink = $bUseFriendlyLinks ? 'blogs/my_page/manage/' : "{$sLink}?action=my_page&mode=manage";
        $sBlogPendingLink = $bUseFriendlyLinks ? 'blogs/my_page/pending/' : "{$sLink}?action=my_page&mode=pending";
        if (bx_get('action_delete') && is_array(bx_get('bposts'))) {
            foreach (bx_get('bposts') as $iBPostID) {
                $this->ActionDeletePost((int) $iBPostID);
            }
        }
        require_once $this->_oConfig->getClassPath() . 'BxBlogsSearchUnit.php';
        $oTmpBlogSearch = new BxBlogsSearchUnit();
        $oTmpBlogSearch->PerformObligatoryInit($this, 4);
        $oTmpBlogSearch->bShowCheckboxes = false;
        $oTmpBlogSearch->aCurrent['paginate']['perPage'] = $this->_oConfig->getPerPage();
        $oTmpBlogSearch->aCurrent['restriction']['owner']['value'] = $this->_iVisitorID;
        $GLOBALS['oTopMenu']->setCurrentProfileID($this->_iVisitorID);
        if (!bx_get('ajax')) {
            $sMyBlogPostsVal = $oTmpBlogSearch->displayResultBlock();
            $sMyPosts = $oTmpBlogSearch->aCurrent['paginate']['totalNum'] == 0 ? MsgBox(_t('_Empty')) : $sMyBlogPostsVal;
            $oTmpBlogSearch->aCurrent['paginate']['page_url'] = $sBlogMainLink;
            $sMyPostsPagination = $oTmpBlogSearch->showPagination3();
        }
        $sMainTabClass = $sAddTabClass = $sManageTabClass = $sPendingTabClass = 0;
        switch ($sMode) {
            case 'add':
                $sAddTabClass = 1;
                $aBlogsRes = $this->_oDb->getBlogInfo($this->_iVisitorID);
                $sNewPostForm = !$aBlogsRes ? $this->GenCreateBlogForm(false) : $this->AddNewPostForm(0, false);
                $sAdmContent = $sNewPostForm;
                break;
            case 'manage':
                $sManageTabClass = 1;
                $oTmpBlogSearch->bShowCheckboxes = true;
                $sBlogPostsVal = $oTmpBlogSearch->displayResultBlock();
                $sActivePosts = $oTmpBlogSearch->aCurrent['paginate']['totalNum'] == 0 ? MsgBox(_t('_Empty')) : $sBlogPostsVal;
                $sManagePostsPagination = $oTmpBlogSearch->showPaginationAjax('bx_blogs_user_form', $sBlogManageLink);
                $sAdmPanel = $oTmpBlogSearch->showAdminActionsPanel('bposts_box', array('action_delete' => '_Delete'), 'bposts');
                $sManagePostsUnits = <<<EOF
<div id="bposts_box" class="bx-def-bc-padding">
    {$sActivePosts}
    <div class="clear_both"></div>
</div>
{$sManagePostsPagination}
{$sAdmPanel}
EOF;
                $sAjaxContent = $sManagePostsUnits;
                $sAdmContent = '<form id="bx_blogs_user_form" method="post">' . $sManagePostsUnits . '</form>';
                break;
            case 'pending':
                $sPendingTabClass = 1;
                $oTmpBlogSearch->aCurrent['restriction']['activeStatus']['value'] = 'disapproval';
                $sDisPostsVal = $oTmpBlogSearch->displayResultBlock();
                $sDisPostsVal = $oTmpBlogSearch->aCurrent['paginate']['totalNum'] == 0 ? MsgBox(_t('_Empty')) : $sDisPostsVal;
                $sPendingPostsPagination = $oTmpBlogSearch->showPaginationAjax('bx_blogs_pending', $sBlogPendingLink);
                $sPendingPostsUnits = <<<EOF
<div id="bposts_box" class="bx-def-bc-padding">
    {$sDisPostsVal}
    <div class="clear_both"></div>
</div>
{$sPendingPostsPagination}
EOF;
                $sAjaxContent = $sPendingPostsUnits;
                $sAdmContent = '<div id="bx_blogs_pending">' . $sPendingPostsUnits . '</div>';
                break;
            case 'main':
            default:
                $sMainTabClass = 1;
                $iMyPostsCnt = $this->_oDb->getMemberPostsCnt($this->_iVisitorID);
                $sAdmContent = '<div class="bx-def-font-large" style="text-align: center;">' . _t('_bx_blog_admin_box_desc', $iMyPostsCnt, $sBlogManageLink, $sBlogAddLink) . '</div>';
                $aVars = array('content' => $sAdmContent);
                $sAdmContent = $this->_oTemplate->parseHtmlByName('default_padding.html', $aVars);
                break;
        }
        $sAdmPost = BxDolPageView::getBlockCaptionMenu(mktime(), array('blogs_main' => array('href' => $sBlogMainLink, 'title' => $sMainC, 'active' => $sMainTabClass), 'blogs_add' => array('href' => $sBlogAddLink, 'title' => $sAddC, 'active' => $sAddTabClass), 'blogs_manage' => array('href' => $sBlogManageLink, 'title' => $sManageC, 'active' => $sManageTabClass), 'blogs_pending' => array('href' => $sBlogPendingLink, 'title' => $sPendingC, 'active' => $sPendingTabClass)));
        if ($sAjaxContent && bx_get('ajax')) {
            header('Content-type:text/html;charset=utf-8');
            echo $sAjaxContent;
            exit;
        }
        $sAdministrationUnitsSect = DesignBoxContent($sAdministrationC, $sAdmContent, 1, $sAdmPost);
        $sMyPostsBox = DesignBoxContent($sMyPostsC, $sMyPosts, 11, false, $sMyPostsPagination);
        return $sAdministrationUnitsSect . $sMyPostsBox;
    }
Exemplo n.º 4
0
 function GenMyPageAdmin($sForceMode = '')
 {
     $this->CheckLogged();
     $sAdministrationC = _t('_bx_ads_Administration');
     $sMyAdsC = _t('_bx_ads_My_Ads');
     $sPendApprC = _t('_bx_ads_pending_approval');
     $sDisApprC = _t('_bx_ads_Disapproved');
     $sAddC = _t('_bx_ads_Add');
     if (bx_get('action_delete') && is_array(bx_get('ads'))) {
         foreach (bx_get('ads') as $iAdID) {
             $this->ActionDeleteAdvertisement((int) $iAdID);
         }
     }
     bx_import('SearchUnit', $this->_aModule);
     $oTmpAdsSearch = new BxAdsSearchUnit();
     $oTmpAdsSearch->bShowCheckboxes = false;
     $oTmpAdsSearch->aCurrent['paginate']['perPage'] = 10;
     $oTmpAdsSearch->aCurrent['restriction']['owner']['value'] = $this->_iVisitorID;
     $oTmpAdsSearch->aCurrent['second_restr'] = 'manage';
     $GLOBALS['oTopMenu']->setCurrentProfileID($this->_iVisitorID);
     $sMyAds = $oTmpAdsSearch->displayResultBlock();
     if ($this->bUseFriendlyLinks) {
         $sAdsMainLink = $sAdsAddLink = $sAdsManageLink = $sAdsPendingLink = $sAdsDisapprovedLink = BX_DOL_URL_ROOT;
         $sAdsMainLink .= 'ads/my_page/';
         $sAdsAddLink .= 'ads/my_page/add/';
         $sAdsManageLink .= 'ads/my_page/manage/';
         $sAdsPendingLink .= 'ads/my_page/pending/';
         $sAdsExpiredLink .= 'ads/my_page/expired/';
         $sAdsDisapprovedLink .= 'ads/my_page/disapproved/';
         $sPgnAdd = '?';
     } else {
         $sAdsMainLink = "{$this->sCurrBrowsedFile}?action=my_page";
         $sAdsAddLink = "{$this->sCurrBrowsedFile}?action=my_page&mode=add";
         $sAdsManageLink = "{$this->sCurrBrowsedFile}?action=my_page&mode=manage";
         $sAdsPendingLink = "{$this->sCurrBrowsedFile}?action=my_page&mode=pending";
         $sAdsExpiredLink = "{$this->sCurrBrowsedFile}?action=my_page&mode=expired";
         $sAdsDisapprovedLink = "{$this->sCurrBrowsedFile}?action=my_page&mode=disapproved";
         $sPgnAdd = '&';
     }
     $sPgn = '';
     $sBoxId = '';
     $sAjLink = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'get_list/';
     $sAddPages = '&page={page}&per_page={per_page}';
     bx_import('BxDolPaginate');
     if ($oTmpAdsSearch->aCurrent['paginate']['totalNum'] == 0) {
         $sMyAds = MsgBox(_t('_Empty'));
     } else {
         if ($oTmpAdsSearch->aCurrent['paginate']['perPage'] < $oTmpAdsSearch->aCurrent['paginate']['totalNum']) {
             $sBoxId = 'ads_' . $this->_iVisitorID . '_view';
             $oPgn = new BxDolPaginate(array('page_url' => $sAdsMainLink . $sAddPages, 'count' => $oTmpAdsSearch->aCurrent['paginate']['totalNum'], 'per_page' => $oTmpAdsSearch->aCurrent['paginate']['perPage'], 'page' => $oTmpAdsSearch->aCurrent['paginate']['page'], 'on_change_page' => "getHtmlData('{$sBoxId}', '{$sAjLink}view/{$this->_iVisitorID}{$sAddPages}');", 'on_change_per_page' => "getHtmlData('{$sBoxId}', '{$sAjLink}view/{$this->_iVisitorID}&page=1&per_page=' + this.value);"));
             $sPgn = '<div class="clear_both"></div>' . $oPgn->getPaginate();
         }
     }
     $sMyAdsBox = DesignBoxContent($sMyAdsC, '<div id="' . $sBoxId . '">' . $sMyAds . $sPgn . '</div>', 1);
     $sAdmContent = '';
     $sCaption = '';
     $sMainTabClass = $sAddTabClass = $sManageTabClass = $sPendingTabClass = $sDisapprovedTabClass = 0;
     $sMode = $sForceMode != '' ? $sForceMode : bx_get('mode');
     //spec block data
     $sBoxIdSpec = 'ads_' . $this->_iVisitorID . '_' . $sMode;
     $aPgn = array('on_change_page' => "getHtmlData('{$sBoxIdSpec}', '{$sAjLink}{$sMode}/{$this->_iVisitorID}{$sAddPages}');", 'on_change_per_page' => "getHtmlData('{$sBoxIdSpec}', '{$sAjLink}{$sMode}/{$this->_iVisitorID}&page=1&per_page=' + this.value);");
     $sPgn = '<div class="clear_both"></div>';
     $aButtons = array('action_delete' => '_Delete');
     $oTmpAdsSearch->aCurrent['second_restr'] = '';
     switch ($sMode) {
         case 'add':
             $sAddTabClass = 1;
             $sNewPostForm = $this->AddNewPostForm((int) bx_get('EditPostID'), false);
             $sAdmContent = $sNewPostForm;
             $sCaption = $sAddC;
             break;
         case 'expired':
             $sExpiredTabClass = 1;
             $oTmpAdsSearch->bShowCheckboxes = true;
             $oTmpAdsSearch->aCurrent['restriction']['activeStatus']['value'] = 'active';
             $oTmpAdsSearch->aCurrent['second_restr'] = 'expired';
             $sAdmContent = $this->getManageArea($oTmpAdsSearch, $sBoxIdSpec, $aButtons, $sAdsExpiredLink . $sPgnAdd . $sAddPages, $aPgn);
             $sCaption = $sMyAdsC;
             break;
         case 'manage':
             $sManageTabClass = 1;
             $oTmpAdsSearch->bShowCheckboxes = true;
             $oTmpAdsSearch->aCurrent['restriction']['activeStatus']['value'] = 'active';
             $oTmpAdsSearch->aCurrent['second_restr'] = 'manage';
             $sAdmContent = $this->getManageArea($oTmpAdsSearch, $sBoxIdSpec, $aButtons, $sAdsManageLink . $sPgnAdd . $sAddPages, $aPgn);
             $sCaption = $sMyAdsC;
             break;
         case 'pending':
             $sPendingTabClass = 1;
             $oTmpAdsSearch->aCurrent['restriction']['activeStatus']['value'] = 'new';
             $oTmpAdsSearch->aCurrent['second_restr'] = 'outtime';
             $sAdmContent = $this->getManageArea($oTmpAdsSearch, $sBoxIdSpec, $aButtons, $sAdsPendingLink . $sPgnAdd . $sAddPages, $aPgn);
             $sCaption = $sPendApprC;
             break;
         case 'disapproved':
             $sDisapprovedTabClass = 1;
             $oTmpAdsSearch->aCurrent['restriction']['activeStatus']['value'] = 'inactive';
             $oTmpAdsSearch->aCurrent['second_restr'] = 'outtime';
             $sAdmContent = $this->getManageArea($oTmpAdsSearch, $aButtons, $sBoxIdSpec, $sAdsDisapprovedLink . $sPgnAdd . $sAddPages, $aPgn);
             $sCaption = $sDisApprC;
             break;
         case 'main':
         default:
             $sMainTabClass = 1;
             $iMyAdsCnt = $this->_oDb->getMemberAdsCnt($this->_iVisitorID, 'active', TRUE);
             $sAdministrationDescC = _t('_bx_ads_admin_box_desc', $iMyAdsCnt, $sAdsManageLink, $sAdsAddLink);
             $sAdmContent = $sAdministrationDescC;
             $sCaption = $sAdministrationC;
             break;
     }
     bx_import('BxDolPageView');
     $sAdmPost = BxDolPageView::getBlockCaptionMenu(mktime(), array('ads_main' => array('href' => $sAdsMainLink, 'title' => _t('_bx_ads_Manage_main'), 'active' => $sMainTabClass), 'ads_add' => array('href' => $sAdsAddLink, 'title' => _t('_bx_ads_Add'), 'active' => $sAddTabClass), 'ads_manage' => array('href' => $sAdsManageLink, 'title' => _t('_bx_ads_Manage_ads'), 'active' => $sManageTabClass), 'ads_pending' => array('href' => $sAdsPendingLink, 'title' => _t('_bx_ads_pending_approval'), 'active' => $sPendingTabClass), 'ads_expired' => array('href' => $sAdsExpiredLink, 'title' => _t('_bx_ads_expired'), 'active' => $sExpiredTabClass), 'ads_disapproved' => array('href' => $sAdsDisapprovedLink, 'title' => _t('_bx_ads_Disapproved'), 'active' => $sDisapprovedTabClass)));
     $sAdministrationUnitsSect = DesignBoxContent($sAdministrationC, $sAdmContent, 1, $sAdmPost);
     return $sAdministrationUnitsSect . $sMyAdsBox;
 }
Exemplo n.º 5
0
 function actionIndex()
 {
     $sMenu = "";
     if (isMember()) {
         $sLink = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'post/';
         $sCaption = _t('_feedback_lcaption_post');
         $sMenu = BxDolPageView::getBlockCaptionMenu(mktime(), array('fdb_post' => array('href' => $sLink, 'title' => $sCaption)));
     }
     $sContent = $this->serviceArchiveBlock();
     $aParams = array('index' => 2, 'css' => array('view.css', 'cmts.css'), 'title' => array('page' => _t('_feedback_pcaption_all'), 'block' => _t('_feedback_bcaption_view_all')), 'content' => array('page_menu_code' => $sMenu, 'page_main_code' => $sContent));
     $this->_oTemplate->getPageCode($aParams);
 }
Exemplo n.º 6
0
    function GenCustomRssBlock($iID)
    {
        global $site;
        if (getParam('enable_crss_module') != 'on') {
            return;
        }
        $this->_iProfileID = $iID;
        $iVisitorID = getLoggedId();
        $bAjaxMode = false !== bx_get('mode') && bx_get('mode') == 'ajax';
        $bAjaxMode2 = false !== bx_get('mode') && bx_get('mode') == 'ajax2';
        $sHomeUrl = $this->_oConfig->getHomeUrl();
        $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('header1' => array('type' => 'block_header', 'caption' => _t('_crss_add_new')), '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 .= "<div class='RSSAggrCont_" . $iRssID . "' rssnum='" . $iRssQuantity . "'>" . $GLOBALS['oFunctions']->loadingBoxInline() . "</div>";
                    $sRssAggr .= "\$('div.RSSAggrCont_" . $iRssID . "').dolRSSFeed('" . $sHomeUrl . "get_rss_feed.php?ID=" . $iRssID . "');";
                }
                $sRssContent = $sActiveRSSList;
            }
        }
        $sTableExRssContent = $sRSSList;
        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);
    }
Exemplo n.º 7
0
    function GenMyPageAdmin($sForceMode = '')
    {
        $this->CheckLogged();
        $sAdministrationC = _t('_bx_ads_Administration');
        $sMyAdsC = _t('_bx_ads_My_Ads');
        $sPendApprC = _t('_bx_ads_pending_approval');
        $sDisApprC = _t('_bx_ads_Disapproved');
        $sAddC = _t('_bx_ads_Add');
        if (bx_get('action_delete') && is_array(bx_get('ads'))) {
            foreach (bx_get('ads') as $iAdID) {
                $this->ActionDeleteAdvertisement((int) $iAdID);
            }
        }
        require_once $this->_oConfig->getClassPath() . 'BxAdsSearchUnit.php';
        $oTmpAdsSearch = new BxAdsSearchUnit();
        $oTmpAdsSearch->bShowCheckboxes = false;
        $oTmpAdsSearch->aCurrent['paginate']['perPage'] = 10;
        $oTmpAdsSearch->aCurrent['restriction']['owner']['value'] = $this->_iVisitorID;
        $GLOBALS['oTopMenu']->setCurrentProfileID($this->_iVisitorID);
        $sMyAds = $oTmpAdsSearch->displayResultBlock();
        if ($oTmpAdsSearch->aCurrent['paginate']['totalNum'] == 0) {
            $sMyAds = MsgBox(_t('_Empty'));
        } else {
            //$sMyAds = $GLOBALS['oFunctions']->centerContent($sMyAds, '.ads_Unit');
        }
        $sMyAdsBox = DesignBoxContent($sMyAdsC, $sMyAds, 1);
        $sAdsMainLink = $this->bUseFriendlyLinks ? 'ads/my_page/' : "{$this->sCurrBrowsedFile}?action=my_page";
        $sAdsAddLink = $this->bUseFriendlyLinks ? 'ads/my_page/add/' : "{$this->sCurrBrowsedFile}?action=my_page&mode=add";
        $sAdsManageLink = $this->bUseFriendlyLinks ? 'ads/my_page/manage/' : "{$this->sCurrBrowsedFile}?action=my_page&mode=manage";
        $sAdsPendingLink = $this->bUseFriendlyLinks ? 'ads/my_page/pending/' : "{$this->sCurrBrowsedFile}?action=my_page&mode=pending";
        $sAdsDisapprovedLink = $this->bUseFriendlyLinks ? 'ads/my_page/disapproved/' : "{$this->sCurrBrowsedFile}?action=my_page&mode=disapproved";
        $sAdmContent = '';
        $sCaption = '';
        $sMainTabClass = $sAddTabClass = $sManageTabClass = $sPendingTabClass = $sDisapprovedTabClass = 0;
        $sMode = $sForceMode != '' ? $sForceMode : bx_get('mode');
        switch ($sMode) {
            case 'add':
                $sAddTabClass = 1;
                $sNewPostForm = $this->AddNewPostForm((int) bx_get('EditPostID'), false);
                $sAdmContent = $sNewPostForm;
                $sCaption = $sAddC;
                break;
            case 'manage':
                $sManageTabClass = 1;
                $oTmpAdsSearch->bShowCheckboxes = true;
                $oTmpAdsSearch->aCurrent['restriction']['activeStatus']['value'] = 'active';
                $oTmpAdsSearch->aCurrent['second_restr'] = 'manage';
                $sAdsActiveUnitsVal = $oTmpAdsSearch->displayResultBlock();
                if ($oTmpAdsSearch->aCurrent['paginate']['totalNum'] == 0) {
                    $sAdsActiveUnitsVal = MsgBox(_t('_Empty'));
                } else {
                    //$sAdsActiveUnitsVal = $GLOBALS['oFunctions']->centerContent($sAdsActiveUnitsVal, '.ads_Unit');
                }
                $aButtons = array('action_delete' => '_Delete');
                $sActionsPanel = $oTmpAdsSearch->showAdminActionsPanel('ads_box', $aButtons, 'ads');
                $sAdsActiveUnitsForm = <<<EOF
<form id="bx_ads_user_form" method="post">
\t<div id="ads_box">
\t\t{$sAdsActiveUnitsVal}
\t\t<div class="clear_both"></div>
\t</div>
\t{$sActionsPanel}
</form>
EOF;
                $sCaption = $sMyAdsC;
                $sAdmContent = $sAdsActiveUnitsForm;
                break;
            case 'pending':
                $oTmpAdsSearch->aCurrent['restriction']['activeStatus']['value'] = 'new';
                $sAdsNewUnitsVal = $oTmpAdsSearch->displayResultBlock();
                if ($oTmpAdsSearch->aCurrent['paginate']['totalNum'] == 0) {
                    $sAdsNewUnitsVal = MsgBox(_t('_Empty'));
                } else {
                    //$sAdsNewUnitsVal = $GLOBALS['oFunctions']->centerContent($sAdsNewUnitsVal, '.ads_Unit');
                }
                $sAdmContent = $sAdsNewUnitsVal;
                $sCaption = $sPendApprC;
                $sPendingTabClass = 1;
                break;
            case 'disapproved':
                $sDisapprovedTabClass = 1;
                $oTmpAdsSearch->aCurrent['restriction']['activeStatus']['value'] = 'inactive';
                $sAdsDisUnitsVal = $oTmpAdsSearch->displayResultBlock();
                if ($oTmpAdsSearch->aCurrent['paginate']['totalNum'] == 0) {
                    $sAdsDisUnitsVal = MsgBox(_t('_Empty'));
                } else {
                    //$sAdsDisUnitsVal = $GLOBALS['oFunctions']->centerContent($sAdsDisUnitsVal, '.ads_Unit');
                }
                $sAdmContent = $sAdsDisUnitsVal;
                $sCaption = $sDisApprC;
                break;
            case 'main':
            default:
                $sMainTabClass = 1;
                $iMyAdsCnt = $this->_oDb->getMemberAdsCnt($this->_iVisitorID);
                $sAdministrationDescC = _t('_bx_ads_admin_box_desc', $iMyAdsCnt, $sAdsManageLink, $sAdsAddLink);
                $sAdmContent = $sAdministrationDescC;
                $sCaption = $sAdministrationC;
                break;
        }
        $sAdmPost = BxDolPageView::getBlockCaptionMenu(mktime(), array('ads_main' => array('href' => $sAdsMainLink, 'title' => _t('_Main'), 'active' => $sMainTabClass), 'ads_add' => array('href' => $sAdsAddLink, 'title' => _t('_bx_ads_Add'), 'active' => $sAddTabClass), 'ads_manage' => array('href' => $sAdsManageLink, 'title' => _t('_bx_ads_Manage_ads'), 'active' => $sManageTabClass), 'ads_pending' => array('href' => $sAdsPendingLink, 'title' => _t('_bx_ads_pending_approval'), 'active' => $sPendingTabClass), 'ads_disapproved' => array('href' => $sAdsDisapprovedLink, 'title' => _t('_bx_ads_Disapproved'), 'active' => $sDisapprovedTabClass)));
        $sAdministrationUnitsSect = DesignBoxContent($sAdministrationC, $sAdmContent, 1, $sAdmPost);
        return $sAdministrationUnitsSect . $sMyAdsBox;
    }
Exemplo n.º 8
0
    function GenMyPageAdmin($sMode = '')
    {
        $this->CheckLogged();
        $sMainC = _t('_Main');
        $sAddC = _t('_bx_blog_Add');
        $sManageC = _t('_bx_blog_Manage');
        $sPendingC = _t('_bx_blog_pending_approval');
        $sAdministrationC = _t('_bx_blog_Administration');
        $sMyBlogC = _t('_bx_blog_My_blog');
        $sPendApprC = _t('_bx_blog_pending_approval');
        $sMyPostsC = _t('_bx_blog_My_posts');
        $bUseFriendlyLinks = $this->isPermalinkEnabled();
        $sLink = $this->genBlogFormUrl();
        $sBlogMainLink = $bUseFriendlyLinks ? 'blogs/my_page/' : "{$sLink}?action=my_page";
        $sBlogAddLink = $bUseFriendlyLinks ? 'blogs/my_page/add/' : "{$sLink}?action=my_page&mode=add";
        $sBlogManageLink = $bUseFriendlyLinks ? 'blogs/my_page/manage/' : "{$sLink}?action=my_page&mode=manage";
        $sBlogPendingLink = $bUseFriendlyLinks ? 'blogs/my_page/pending/' : "{$sLink}?action=my_page&mode=pending";
        if (bx_get('action_delete') && is_array(bx_get('bposts'))) {
            foreach (bx_get('bposts') as $iBPostID) {
                $this->ActionDeletePost((int) $iBPostID);
            }
        }
        require_once $this->_oConfig->getClassPath() . 'BxBlogsSearchUnit.php';
        $oTmpBlogSearch = new BxBlogsSearchUnit();
        $oTmpBlogSearch->PerformObligatoryInit($this, 4);
        $oTmpBlogSearch->bShowCheckboxes = false;
        $oTmpBlogSearch->aCurrent['paginate']['perPage'] = 10;
        $oTmpBlogSearch->aCurrent['restriction']['owner']['value'] = $this->_iVisitorID;
        $GLOBALS['oTopMenu']->setCurrentProfileID($this->_iVisitorID);
        $sMyBlogPostsVal = $oTmpBlogSearch->displayResultBlock();
        $sMyPosts = $oTmpBlogSearch->aCurrent['paginate']['totalNum'] == 0 ? MsgBox(_t('_Empty')) : $sMyBlogPostsVal;
        $sMainTabClass = $sAddTabClass = $sManageTabClass = $sPendingTabClass = 0;
        switch ($sMode) {
            case 'add':
                $sAddTabClass = 1;
                $aBlogsRes = $this->_oDb->getBlogInfo($this->_iVisitorID);
                $sNewPostForm = !$aBlogsRes ? $this->GenCreateBlogForm(false) : $this->AddNewPostForm(0, false);
                $sAdmContent = $sNewPostForm;
                break;
            case 'manage':
                $sManageTabClass = 1;
                $oTmpBlogSearch->bShowCheckboxes = true;
                $sBlogPostsVal = $oTmpBlogSearch->displayResultBlock();
                $sActivePosts = $oTmpBlogSearch->aCurrent['paginate']['totalNum'] == 0 ? MsgBox(_t('_Empty')) : $sBlogPostsVal;
                $sAdmPanel = $oTmpBlogSearch->showAdminActionsPanel('bposts_box', array('action_delete' => '_Delete'), 'bposts');
                $sBpostsActiveUnitsForm = <<<EOF
<form id="bx_blogs_user_form" method="post">
\t<div id="bposts_box" class="blog_posts_wrapper">
\t\t{$sActivePosts}
\t\t<div class="clear_both"></div>
\t</div>
\t{$sAdmPanel}
</form>
EOF;
                $sAdmContent = $sBpostsActiveUnitsForm;
                break;
            case 'pending':
                $sPendingTabClass = 1;
                $oTmpBlogSearch->aCurrent['restriction']['activeStatus']['value'] = 'disapproval';
                $sDisPostsVal = $oTmpBlogSearch->displayResultBlock();
                $sDisPostsVal = $oTmpBlogSearch->aCurrent['paginate']['totalNum'] == 0 ? MsgBox(_t('_Empty')) : $sDisPostsVal;
                $sAdmContent = <<<EOF
<div id="bposts_box" class="blog_posts_wrapper">
    {$sDisPostsVal}
    <div class="clear_both"></div>
</div>
EOF;
                break;
            case 'main':
            default:
                $sMainTabClass = 1;
                $iMyPostsCnt = $this->_oDb->getMemberPostsCnt($this->_iVisitorID);
                $sAdmContent = _t('_bx_blog_admin_box_desc', $iMyPostsCnt, $sBlogManageLink, $sBlogAddLink);
                break;
        }
        $sAdmPost = BxDolPageView::getBlockCaptionMenu(mktime(), array('blogs_main' => array('href' => $sBlogMainLink, 'title' => $sMainC, 'active' => $sMainTabClass), 'blogs_add' => array('href' => $sBlogAddLink, 'title' => $sAddC, 'active' => $sAddTabClass), 'blogs_manage' => array('href' => $sBlogManageLink, 'title' => $sManageC, 'active' => $sManageTabClass), 'blogs_pending' => array('href' => $sBlogPendingLink, 'title' => $sPendingC, 'active' => $sPendingTabClass)));
        $sAdministrationUnitsSect = DesignBoxContent($sAdministrationC, $sAdmContent, 1, $sAdmPost);
        $sMyPostsContent = <<<EOF
<div id="bposts_box" class="blog_posts_wrapper">
\t{$sMyPosts}
\t<div class="clear_both"></div>
</div>
EOF;
        $sMyPostsBox = DesignBoxContent($sMyPostsC, $sMyPostsContent, 1);
        return $sAdministrationUnitsSect . $sMyPostsBox;
    }
Exemplo n.º 9
0
    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;
    }