当前位置: 首页>>代码示例>>PHP>>正文


PHP bx_events_import函数代码示例

本文整理汇总了PHP中bx_events_import函数的典型用法代码示例。如果您正苦于以下问题:PHP bx_events_import函数的具体用法?PHP bx_events_import怎么用?PHP bx_events_import使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了bx_events_import函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getBlockCode_Comments

 function getBlockCode_Comments()
 {
     bx_events_import('Cmts');
     $o = new BxEventsCmts('bx_events', (int) $this->aDataEntry['ID']);
     if (!$o->isEnabled()) {
         return '';
     }
     return $o->getCommentsFirst();
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:9,代码来源:BxEventsPageView.php

示例2: getBlockCode_UpcomingPhoto

 function getBlockCode_UpcomingPhoto()
 {
     $aEvent = $this->oDb->getUpcomingEvent(getParam('bx_events_main_upcoming_event_from_featured_only') ? true : false);
     if (!$aEvent) {
         return MsgBox(_t('_Empty'));
     }
     $aAuthor = getProfileInfo($aEvent['ResponsibleID']);
     $a = array('ID' => $aEvent['ResponsibleID'], 'Avatar' => $aEvent['PrimPhoto']);
     $aImage = BxDolService::call('photos', 'get_image', array($a, 'file'), 'Search');
     bx_events_import('Voting');
     $oRating = new BxEventsVoting('bx_events', (int) $aEvent['ID']);
     $aVars = array('image_url' => !$aImage['no_image'] && $aImage['file'] ? $aImage['file'] : $this->oTemplate->getIconUrl('no-photo-110.png'), 'image_title' => !$aImage['no_image'] && $aImage['title'] ? $aImage['title'] : '', 'event_url' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'view/' . $aEvent['EntryUri'], 'event_title' => $aEvent['Title'], 'event_start' => getLocaleDate($aEvent['EventStart']), 'event_start_in' => defineTimeInterval($aEvent['EventStart']), 'author_title' => _t('_From'), 'author_username' => $aAuthor['NickName'], 'author_url' => getProfileLink($aAuthor['ID']), 'rating' => $oRating->isEnabled() ? $oRating->getJustVotingElement(true, $aEvent['ID']) : '', 'participants' => $aEvent['FansCount'], 'country_city' => '<a href="' . $this->oConfig->getBaseUri() . 'browse/country/' . strtolower($aEvent['Country']) . '">' . _t($GLOBALS['aPreValues']['Country'][$aEvent['Country']]['LKey']) . '</a>' . (trim($aEvent['City']) ? ', ' . $aEvent['City'] : ''), 'place' => $aEvent['Place'], 'flag_image' => genFlag($aEvent['Country']));
     return $this->oTemplate->parseHtmlByName('main_event', $aVars);
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:14,代码来源:BxEventsPageMain.php

示例3: getBlockCode_UpcomingPhoto

 function getBlockCode_UpcomingPhoto()
 {
     $aEvent = $this->oDb->getUpcomingEvent(getParam('bx_events_main_upcoming_event_from_featured_only') ? true : false);
     if (!$aEvent) {
         return false;
     }
     $aAuthor = getProfileInfo($aEvent['ResponsibleID']);
     $a = array('ID' => $aEvent['ResponsibleID'], 'Avatar' => $aEvent['PrimPhoto']);
     $aImage = BxDolService::call('photos', 'get_image', array($a, 'file'), 'Search');
     bx_events_import('Voting');
     $oRating = new BxEventsVoting('bx_events', (int) $aEvent['ID']);
     $sEventUrl = BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'view/' . $aEvent['EntryUri'];
     $aVars = array('bx_if:image' => array('condition' => !$aImage['no_image'] && $aImage['file'], 'content' => array('image_url' => !$aImage['no_image'] && $aImage['file'] ? $aImage['file'] : '', 'image_title' => !$aImage['no_image'] && $aImage['title'] ? $aImage['title'] : '', 'event_url' => $sEventUrl)), 'event_url' => $sEventUrl, 'event_title' => $aEvent['Title'], 'event_start_in' => $this->oMain->_formatDateInBrowse($aEvent), 'author_title' => _t('_From'), 'author_username' => getNickName($aAuthor['ID']), 'author_url' => getProfileLink($aAuthor['ID']), 'rating' => $oRating->isEnabled() ? $oRating->getJustVotingElement(true, $aEvent['ID']) : '', 'participants' => $aEvent['FansCount'], 'country_city' => $this->oMain->_formatLocation($aEvent, true, true), 'place' => $aEvent['Place']);
     return $this->oTemplate->parseHtmlByName('main_event', $aVars);
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:15,代码来源:BxEventsPageMain.php

示例4: getBlockCode_Browse

 function getBlockCode_Browse()
 {
     bx_events_import('SearchResult');
     $o = new BxEventsSearchResult('user', process_db_input($this->_aProfile['NickName'], BX_TAGS_NO_ACTION, BX_SLASHES_NO_ACTION));
     $o->aCurrent['rss'] = 0;
     $o->sBrowseUrl = "browse/my";
     $o->aCurrent['title'] = _t('_bx_events_block_my_events');
     if ($o->isError) {
         return MsgBox(_t('_Empty'));
     }
     if ($s = $o->processing()) {
         $this->_oTemplate->addCss(array('unit.css', 'main.css', 'twig.css'));
         return $s;
     } else {
         return DesignBoxContent(_t('_bx_events_block_user_events'), MsgBox(_t('_Empty')), 1);
     }
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:17,代码来源:BxEventsPageMy.php

示例5: blockFields

 function blockFields(&$aEvent)
 {
     $sRet = '<table class="bx_events_fields">';
     bx_events_import('FormAdd');
     $oForm = new BxEventsFormAdd($GLOBALS['oBxEventsModule'], $this->_iProfileId);
     foreach ($oForm->aInputs as $k => $a) {
         if (!isset($a['display'])) {
             continue;
         }
         $sRet .= '<tr><td class="bx_events_field_name bx-def-font-grayed bx-def-padding-sec-right" valign="top">' . $a['caption'] . '</td><td class="bx_events_field_value">';
         if (is_string($a['display']) && is_callable(array($this, $a['display']))) {
             $sRet .= call_user_func_array(array($this, $a['display']), array($aEvent[$k]));
         } else {
             $sRet .= $aEvent[$k];
         }
         $sRet .= '</td></tr>';
     }
     $sRet .= '</table>';
     return $sRet;
 }
开发者ID:gorenc,项目名称:dolphin.pro,代码行数:20,代码来源:BxEventsTemplate.php

示例6: BxEventsSearchResult


//.........这里部分代码省略.........
             $sValue = $GLOBALS['MySQL']->unescape($sValue);
             $this->sBrowseUrl = "browse/joined/{$sValue}";
             $this->aCurrent['title'] = _t('_bx_events_caption_browse_by_author_joined_events') . ' ' . $sValue;
             if (bx_get('rss')) {
                 $aData = getProfileInfo($iProfileId);
                 if ($aData['Avatar']) {
                     $a = array('ID' => $aData['author_id'], 'Avatar' => $aData['thumb']);
                     $aImage = BxDolService::call('photos', 'get_image', array($a, 'browse'), 'Search');
                     if (!$aImage['no_image']) {
                         $this->aCurrent['rss']['image'] = $aImage['file'];
                     }
                 }
             }
             break;
         case 'admin':
             if (bx_get('bx_events_filter')) {
                 $this->aCurrent['restriction']['keyword'] = array('value' => process_db_input(bx_get('bx_events_filter'), BX_TAGS_STRIP), 'field' => '', 'operator' => 'against');
             }
             $this->aCurrent['restriction']['owner']['value'] = $oMain->_iProfileId;
             $this->sBrowseUrl = "browse/admin";
             $this->aCurrent['title'] = _t('_bx_events_admin_events');
             break;
         case 'category':
             $this->aCurrent['join']['category'] = array('type' => 'inner', 'table' => 'sys_categories', 'mainField' => 'ID', 'onField' => 'ID', 'joinFields' => '');
             $this->aCurrent['restriction']['category_type']['value'] = $this->aCurrent['name'];
             $this->aCurrent['restriction']['category']['value'] = $sValue;
             $sValue = $GLOBALS['MySQL']->unescape($sValue);
             $this->sBrowseUrl = "browse/category/" . title2uri($sValue);
             $this->aCurrent['title'] = _t('_bx_events_caption_browse_by_category') . ' ' . $sValue;
             break;
         case 'tag':
             $this->aCurrent['restriction'][$sMode]['value'] = $sValue;
             $sValue = $GLOBALS['MySQL']->unescape($sValue);
             $this->sBrowseUrl = "browse/{$sMode}/" . title2uri($sValue);
             $this->aCurrent['title'] = _t('_bx_events_caption_browse_by_' . $sMode) . ' ' . $sValue;
             break;
         case 'country':
             $this->aCurrent['restriction'][$sMode]['value'] = $sValue;
             $this->sBrowseUrl = "browse/{$sMode}/{$sValue}";
             $this->aCurrent['title'] = _t('_bx_events_caption_browse_by_' . $sMode) . ' ' . $sValue;
             break;
         case 'upcoming':
             $this->aCurrent['restriction']['upcoming'] = array('value' => time(), 'field' => 'EventEnd', 'operator' => '>');
             $this->aCurrent['sorting'] = 'upcoming';
             $this->sBrowseUrl = 'browse/upcoming';
             $this->aCurrent['title'] = _t('_bx_events_caption_browse_upcoming');
             break;
         case 'past':
             $this->aCurrent['restriction']['past'] = array('value' => time(), 'field' => 'EventEnd', 'operator' => '<');
             $this->aCurrent['sorting'] = 'past';
             $this->sBrowseUrl = 'browse/past';
             $this->aCurrent['title'] = _t('_bx_events_caption_browse_past');
             break;
         case 'recent':
             $this->sBrowseUrl = 'browse/recent';
             $this->aCurrent['title'] = _t('_bx_events_caption_browse_recently_added');
             break;
         case 'top':
             $this->sBrowseUrl = 'browse/top';
             $this->aCurrent['sorting'] = 'top';
             $this->aCurrent['title'] = _t('_bx_events_caption_browse_top_rated');
             break;
         case 'popular':
             $this->sBrowseUrl = 'browse/popular';
             $this->aCurrent['sorting'] = 'popular';
             $this->aCurrent['title'] = _t('_bx_events_caption_browse_popular');
             break;
         case 'featured':
             $this->aCurrent['restriction']['featured'] = array('value' => 1, 'field' => 'Featured', 'operator' => '=');
             $this->sBrowseUrl = 'browse/featured';
             $this->aCurrent['title'] = _t('_bx_events_caption_browse_featured');
             break;
         case 'calendar':
             $this->aCurrent['restriction']['calendar-min'] = array('value' => "UNIX_TIMESTAMP('{$sValue}-{$sValue2}-{$sValue3} 00:00:00')", 'field' => 'EventEnd', 'operator' => '>=', 'no_quote_value' => true);
             $this->aCurrent['restriction']['calendar-max'] = array('value' => "UNIX_TIMESTAMP('{$sValue}-{$sValue2}-{$sValue3} 23:59:59')", 'field' => 'EventStart', 'operator' => '<=', 'no_quote_value' => true);
             $this->sBrowseUrl = "browse/calendar/{$sValue}/{$sValue2}/{$sValue3}";
             $this->aCurrent['title'] = _t('_bx_events_caption_browse_by_day') . getLocaleDate(strtotime("{$sValue}-{$sValue2}-{$sValue3}"), BX_DOL_LOCALE_DATE_SHORT);
             break;
         case '':
             $this->sBrowseUrl = 'browse/';
             $this->aCurrent['title'] = _t('_bx_events');
             unset($this->aCurrent['rss']);
             break;
         default:
             $this->isError = true;
     }
     $this->aCurrent['paginate']['perPage'] = $oMain->_oDb->getParam('bx_events_perpage_browse');
     if (isset($this->aCurrent['rss'])) {
         $this->aCurrent['rss']['link'] = BX_DOL_URL_ROOT . $oMain->_oConfig->getBaseUri() . $this->sBrowseUrl;
     }
     if (bx_get('rss')) {
         $this->aCurrent['ownFields'][] = 'Description';
         $this->aCurrent['ownFields'][] = 'Date';
         $this->aCurrent['paginate']['perPage'] = $oMain->_oDb->getParam('bx_events_max_rss_num');
     }
     bx_events_import('Voting', $this->getModuleArray());
     $oVotingView = new BxEventsVoting('bx_events', 0);
     $this->oVotingView = $oVotingView->isEnabled() ? $oVotingView : null;
     parent::BxDolTwigSearchResult();
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:101,代码来源:BxEventsSearchResult.php

示例7: bx_events_import

<?php

/**
 * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
 * CC-BY License - http://creativecommons.org/licenses/by/3.0/
 */
bx_events_import('FormAdd');
class BxEventsFormEdit extends BxEventsFormAdd
{
    function BxEventsFormEdit($oMain, $iProfileId, $iEventId, &$aEvent)
    {
        parent::BxEventsFormAdd($oMain, $iProfileId, $iEventId, $aEvent['PrimPhoto']);
        $aFormInputsId = array('ID' => array('type' => 'hidden', 'name' => 'ID', 'value' => $iEventId));
        bx_import('BxDolCategories');
        $oCategories = new BxDolCategories();
        $oCategories->getTagObjectConfig();
        $this->aInputs['Categories'] = $oCategories->getGroupChooser('bx_events', (int) $iProfileId, true, $aEvent['Categories']);
        $this->aInputs = array_merge($this->aInputs, $aFormInputsId);
    }
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:20,代码来源:BxEventsFormEdit.php

示例8: actionParticipants

 function actionParticipants($iEventId)
 {
     header('Content-type:text/html;charset=utf-8');
     $iEventId = (int) $iEventId;
     if (!($aEvent = $this->_oDb->getEntryByIdAndOwner($iEventId, 0, true))) {
         echo MsgBox(_t('_Empty'));
         return;
     }
     bx_events_import('PageView');
     $oPage = new BxEventsPageView($this, $aEvent);
     $a = $oPage->getBlockCode_Participants();
     echo $a[0];
     exit;
 }
开发者ID:newton27,项目名称:dolphin.pro,代码行数:14,代码来源:BxEventsModule.php

示例9: bx_events_import

<?php

/**
 * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
 * CC-BY License - http://creativecommons.org/licenses/by/3.0/
 */
bx_events_import('FormEdit');
class BxEventsFormUploadMedia extends BxEventsFormEdit
{
    function __construct($oMain, $iProfileId, $iEntryId, &$aDataEntry, $sMedia, $aMediaFields)
    {
        parent::__construct($oMain, $iProfileId, $iEntryId, $aDataEntry);
        foreach ($this->_aMedia as $k => $a) {
            if ($k == $sMedia) {
                continue;
            }
            unset($this->_aMedia[$k]);
        }
        array_push($aMediaFields, 'Submit', 'id');
        foreach ($this->aInputs as $k => $a) {
            if (in_array($k, $aMediaFields)) {
                continue;
            }
            unset($this->aInputs[$k]);
        }
    }
}
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:27,代码来源:BxEventsFormUploadMedia.php


注:本文中的bx_events_import函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。