Beispiel #1
0
    if ($oForm->isSubmittedAndNotValid()) {
        $oForm->_echoResultJson(array('err' => $oForm->getNotValid()), true);
        exit;
    }
    if ($oForm->isSubmittedAndValid()) {
        $sDomainKey = 'domain';
        $sDomainValue = $oForm->getCleanValue($sDomainKey);
        if (!BxDolRequest::serviceExists('bx_sites', 'is_used')) {
            $oForm->_echoResultJson(array('msg' => _t('_sys_splash_err_service_not_available')), true);
            exit;
        }
        if (BxDolService::call('bx_sites', 'is_used', array($sDomainValue))) {
            $oForm->_echoResultJson(array('err' => array($sDomainKey => _t('_sys_splash_err_domain_is_used'))), true);
            exit;
        }
        bx_import('BxDolSession');
        BxDolSession::getInstance()->setValue('bx_sites_domain', $sDomainValue);
        bx_import('BxDolPermalinks');
        $sUrl = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=create-account');
        $oForm->_echoResultJson(array('eval' => 'window.open(\'' . $sUrl . '\', \'_self\');'), true);
        exit;
    }
    return $oTemplate->parseHtmlByName('splash.html', array('form_id' => $oForm->aFormAttrs['id'], 'form' => $oForm->getCode()));
}
check_logged();
$oTemplate = BxDolStudioTemplate::getInstance();
$oTemplate->setPageNameIndex(BX_PAGE_DEFAULT);
$oTemplate->setPageContent('menu_top', BxDolSplashMenuTop::getInstance()->getCode());
$oTemplate->setPageContent('page_main_code', getPageMainCode());
$oTemplate->getPageCode();
/** @} */
$_page['name_index'] = 62;
$_page['css_name'] = 'upload_media.css';
if (!($logged['admin'] = member_auth(1, false))) {
    if (!($logged['member'] = member_auth(0, false))) {
        if (!($logged['aff'] = member_auth(2, false))) {
            $logged['moderator'] = member_auth(3, false);
        }
    }
}
$_page['header'] = _t("_MEDIA_GALLERY_H");
$_page['header_text'] = _t("_MEDIA_GALLERY_H");
// --------------- GET/POST actions
$ID = (int) $_REQUEST['ID'];
$member['ID'] = (int) $_COOKIE['memberID'];
$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = getPageMainCode();
// --------------- [END] page components
PageCode();
// --------------- page components functions
function getPageMainCode()
{
    global $oTemplConfig;
    $ret = '';
    $aPhotoConf = array();
    $aPhotoConf['profileID'] = (int) $_REQUEST['ID'];
    $aPhotoConf['visitorID'] = (int) $_COOKIE['memberID'];
    $aPhotoConf['isOwner'] = $aPhotoConf['profileID'] == $aPhotoConf['visitorID'] ? true : false;
    $check_res = checkAction($aPhotoConf['visitorID'], ACTION_ID_USE_GALLERY);
    if ($check_res[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED) {
        $ret = '
			<table width="100%" cellpadding="4" cellspacing="4" border="0">