Esempio n. 1
0
 */
/**
 * @page samples
 * @section comments Comments
 */
/**
 * Please refer to the following file for custom class and SQL dump data for this example:
 * @see BxCmtsMy.php
 */
$aPathInfo = pathinfo(__FILE__);
require_once $aPathInfo['dirname'] . '/../inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . "design.inc.php";
$oTemplate = BxDolTemplate::getInstance();
$oTemplate->setPageNameIndex(BX_PAGE_DEFAULT);
$oTemplate->setPageHeader('Comments');
$oTemplate->setPageContent('page_main_code', PageCompMainCode());
$oTemplate->getPageCode();
/**
 * page code function
 */
function PageCompMainCode()
{
    $iObjectId = 1;
    bx_import('BxDolCmts');
    $oCmts = BxDolCmts::getObjectInstance('sample', $iObjectId);
    if (!$oCmts->isEnabled()) {
        return '';
    }
    return $oCmts->getCommentsBlock();
}
/** @} */
Esempio n. 2
0
<?php

/**
 * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
 * CC-BY License - http://creativecommons.org/licenses/by/3.0/
 */
require_once 'inc/header.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'profiles.inc.php';
// --------------- page variables and login
$_page['name_index'] = 17;
check_logged();
$_page['header'] = _t("_ADVICE_H");
$_page['header_text'] = _t("_ADVICE_H1");
// --------------- page components
$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = PageCompMainCode();
// --------------- [END] page components
PageCode();
// --------------- page components functions
/**
 * page code function
 */
function PageCompMainCode()
{
    $sRet = '<div class="dbContent">' . str_replace('<site_url>', $GLOBALS['site']['url'], _t("_ADVICE")) . '</div>';
    return DesignBoxContent(_t("_ADVICE_H1"), $sRet, $GLOBALS['oTemplConfig']->PageCompThird_db_num);
}
if (!$groupID) {
    Header("Location: {$site['url']}groups_home.php");
    exit;
}
$bcd = getParam('breadCrampDivider');
$_page['header_text'] = _t("_Group members");
$_page['header'] = _t("_Group members");
$_ni = $_page['name_index'];
if ($arrGroup = getGroupInfo($groupID)) {
    $arrGroup['Name_html'] = htmlspecialchars_adv($arrGroup['Name']);
    if ((int) $arrGroup['hidden_group'] and !isGroupMember($memberID, $groupID) and !$logged['admin']) {
        $_page_cont[$_ni]['page_main_code'] = _t("_You cannot view group members while not a group member");
    } else {
        if ($arrGroup['status'] == 'Active' or $arrGroup['creatorID'] == $memberID or $logged['admin']) {
            $_page['header'] = _t("_Group members");
            PageCompMainCode();
        } else {
            $_page['name_index'] = 0;
            $_page['header'] = _t("_Group is suspended");
            $_page['header_text'] = _t("_Group is suspended");
            $_page_cont[0]['page_main_code'] = _t("_Sorry, group is suspended");
        }
    }
} else {
    $_page_cont[$_ni]['page_main_code'] = _t("_Group not found_desc");
}
// --------------- page components
// --------------- [END] page components
PageCode();
// --------------- page components functions
/**