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


PHP defineTimeInterval函数代码示例

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


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

示例1: blockFiles

 function blockFiles(&$aData)
 {
     $iEntryId = $aData['id'];
     $aReadyMedia = array();
     if ($iEntryId) {
         $aReadyMedia = $GLOBALS['oBxStoreModule']->_oDb->getFiles($iEntryId, true);
     }
     if (!$aReadyMedia) {
         return '';
     }
     $aVars = array('bx_repeat:files' => array());
     $sCurrencySign = getParam('pmt_default_currency_sign');
     foreach ($aReadyMedia as $r) {
         $iMediaId = $r['media_id'];
         $a = BxDolService::call('files', 'get_file_array', array($iMediaId), 'Search');
         if (!$a['date']) {
             continue;
         }
         bx_import('BxTemplFormView');
         $oForm = new BxTemplFormView(array());
         $aInputBtnDownload = array('type' => 'submit', 'name' => 'bx_store_download', 'value' => _t('_bx_store_download'), 'attrs' => array('onclick' => "window.open ('" . BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . "download/{$r['id']}','_self');"));
         $aVars['bx_repeat:files'][] = array('id' => $iMediaId, 'title' => $a['title'], 'icon' => $a['file'], 'price' => $sCurrencySign . ' ' . $r['price'], 'for_group' => sprintf(_t('_bx_store_for_group'), $GLOBALS['oBxStoreModule']->getGroupName($r['allow_purchase_to'])), 'date' => defineTimeInterval($a['date']), 'bx_if:purchase' => array('condition' => $GLOBALS['oBxStoreModule']->isAllowedPurchase($r), 'content' => array('btn_purchase' => BxDolService::call('payment', 'get_add_to_cart_link', array($r['author_id'], $this->_oConfig->getId(), $r['id'], 1)))), 'bx_if:download' => array('condition' => $GLOBALS['oBxStoreModule']->isAllowedDownload($r), 'content' => array('btn_download' => $oForm->genInputButton($aInputBtnDownload))));
     }
     if (!$aVars['bx_repeat:files']) {
         return '';
     }
     return $this->parseHtmlByName('block_files', $aVars);
 }
开发者ID:noormcs,项目名称:studoro,代码行数:28,代码来源:BxStoreTemplate.php

示例2: getProcessedMessages

 /**
  * Get processed message
  *
  * @param $aMessages array
  * @param $bDeleteAllowed boolean
  * @param $bBlockAllowed boolean
  * @return text
  */
 function getProcessedMessages($aMessages = array(), $bDeleteAllowed = false, $bBlockAllowed = false)
 {
     global $oFunctions;
     if (!$aMessages) {
         return;
     }
     $sOutputCode = '';
     $aLanguageKeys = array('by' => _t('_bx_shoutbox_by'), 'visitor' => _t('_Visitor'), 'delete' => _t('_bx_shoutbox_delete_message'), 'sure' => _t('_Are_you_sure'), 'block' => _t('_bx_shoutbox_block_ip'));
     foreach ($aMessages as $iKey => $aItems) {
         $sMemberIcon = '';
         $aProfileInfo = $aItems['OwnerID'] > 0 ? getProfileInfo($aItems['OwnerID']) : array();
         // define some profile's data;
         if ($aProfileInfo) {
             $sNickName = getNickName($aProfileInfo['ID']);
             $sLink = getProfileLink($aItems['OwnerID']);
             $sMemberIcon = $oFunctions->getMemberIcon($aItems['OwnerID']);
         } else {
             $sLink = 'javascript:void(0)';
             $sNickName = $aLanguageKeys['visitor'];
         }
         $aKeys = array('owner_icon' => $sMemberIcon, 'message' => WordWrapStr($aItems['Message']), 'by' => $aLanguageKeys['by'], 'owner_nick' => $sNickName, 'date' => defineTimeInterval($aItems['DateTS'], true, true), 'owner_link' => $sLink, 'bx_if:delete_allowed' => array('condition' => $bDeleteAllowed, 'content' => array('delete_cpt' => bx_html_attribute($aLanguageKeys['delete']), 'sure_cpt' => bx_js_string($aLanguageKeys['sure']), 'message_id' => $aItems['ID'])), 'bx_if:block_allowed' => array('condition' => $bBlockAllowed, 'content' => array('block_cpt' => bx_html_attribute($aLanguageKeys['block']), 'sure_cpt' => bx_js_string($aLanguageKeys['sure']), 'message_id' => $aItems['ID'])));
         $sTemplateName = $aProfileInfo ? 'message.html' : 'visitor_message.html';
         $sOutputCode .= $this->parseHtmlByName($sTemplateName, $aKeys);
     }
     return $sOutputCode;
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:34,代码来源:BxShoutBoxTemplate.php

示例3: blockInfo

 function blockInfo(&$aEvent)
 {
     if (null == $this->_oMain) {
         $this->_oMain = BxDolModule::getInstance('BxEventsModule');
     }
     $aAuthor = getProfileInfo($aEvent['ResponsibleID']);
     $aVars = array('author_unit' => $GLOBALS['oFunctions']->getMemberThumbnail($aAuthor['ID'], 'none', true), 'date' => getLocaleDate($aEvent['Date'], BX_DOL_LOCALE_DATE_SHORT), 'date_ago' => defineTimeInterval($aEvent['Date'], false), 'cats' => $this->parseCategories($aEvent['Categories']), 'tags' => $this->parseTags($aEvent['Tags']), 'location' => $this->_oMain->_formatLocation($aEvent, true, true), 'fields' => $this->blockFields($aEvent), 'author_username' => $aAuthor ? $aAuthor['NickName'] : _t('_bx_events_admin'), 'author_url' => $aAuthor ? getProfileLink($aAuthor['ID']) : 'javascript:void(0)');
     return $this->parseHtmlByName('block_info', $aVars);
 }
开发者ID:gorenc,项目名称:dolphin.pro,代码行数:9,代码来源:BxEventsTemplate.php

示例4: displayItem

 function displayItem($aParams, &$aEntry)
 {
     $sSampleType = $aParams['sample_type'];
     $iViewerType = $aParams['viewer_type'];
     $bAdminPanel = $iViewerType == BX_TD_VIEWER_TYPE_ADMIN && (isset($aParams['admin_panel']) && $aParams['admin_panel'] || $sSampleType == 'admin');
     $sModuleUri = $this->_oConfig->getUri();
     $sLKLinkEdit = _t('_' . $sModuleUri . '_lcaption_edit');
     $aTmplVars = array('id' => $this->_oConfig->getSystemPrefix() . $aEntry['id'], 'caption' => str_replace("\$", "$", $aEntry['caption']), 'class' => !in_array($sSampleType, array('view')) ? ' ' . $this->sCssPrefix . '-text-snippet ' : '', 'date' => defineTimeInterval($aEntry['when_uts']), 'content' => str_replace("\$", "$", $aEntry['content']), 'link' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aEntry['uri'], 'bx_if:checkbox' => array('condition' => $bAdminPanel, 'content' => array('id' => $aEntry['id'])), 'bx_if:status' => array('condition' => $iViewerType == BX_TD_VIEWER_TYPE_ADMIN, 'content' => array('status' => _t('_' . $sModuleUri . '_status_' . $aEntry['status']))), 'bx_if:featured' => array('condition' => $iViewerType == BX_TD_VIEWER_TYPE_ADMIN && (int) $aEntry['featured'] == 1, 'content' => array()), 'bx_if:edit_link' => array('condition' => $iViewerType == BX_TD_VIEWER_TYPE_ADMIN, 'content' => array('edit_link_url' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'admin/' . $aEntry['uri'], 'edit_link_caption' => $sLKLinkEdit)));
     return $this->parseHtmlByName('item.html', $aTmplVars);
 }
开发者ID:toxalot,项目名称:dolphin.pro,代码行数:10,代码来源:BxDolTextTemplate.php

示例5: getBasicFileInfoForm

 function getBasicFileInfoForm(&$aInfo, $sUrlPref = '')
 {
     $aForm = array('date' => array('type' => 'value', 'value' => getLocaleDate($aInfo['medDate'], BX_DOL_LOCALE_DATE_SHORT) . ' (' . defineTimeInterval($aInfo['medDate']) . ')', 'caption' => _t('_Date')));
     if (!empty($aInfo['Categories'])) {
         $aForm['category'] = array('type' => 'value', 'value' => getLinkSet($aInfo['Categories'], $sUrlPref . 'browse/category/', CATEGORIES_DIVIDER), 'caption' => _t('_Category'));
     }
     if (!empty($aInfo['medTags'])) {
         $aForm['tags'] = array('type' => 'value', 'value' => getLinkSet($aInfo['medTags'], $sUrlPref . 'browse/tag/'), 'caption' => _t('_Tags'));
     }
     return $aForm;
 }
开发者ID:noormcs,项目名称:studoro,代码行数:11,代码来源:BxDolFilesTemplate.php

示例6: 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

示例7: getFileInfo

 function getFileInfo($aInfo)
 {
     if (empty($aInfo)) {
         return '';
     }
     $aMediaInfo = array();
     $aMediaInfo['memberPic'] = get_member_thumbnail($aInfo['medProfId'], 'none', false);
     $aMediaInfo['memberUrl'] = getProfileLink($aInfo['medProfId']);
     $aMediaInfo['memberNick'] = $aInfo['NickName'];
     $aMediaInfo['dateIcon'] = $this->getIconUrl('clock.png');
     $aMediaInfo['dateInfo'] = getLocaleDate($aInfo['medDate'], BX_DOL_LOCALE_DATE_SHORT);
     $aMediaInfo['dateInfoAgo'] = defineTimeInterval($aInfo['medDate']);
     return $this->parseHtmlByName('media_info.html', $aMediaInfo);
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:14,代码来源:BxDolFilesTemplate.php

示例8: getComment

 function getComment($iId, $iCmtId, $iAuthorId = 0)
 {
     global $sHomeUrl;
     $iTimestamp = time();
     $sFields = "'' AS `cmt_rated`,";
     $sJoin = '';
     if ($iAuthorId) {
         $sFields = '`r`.`cmt_rate` AS `cmt_rated`,';
         $sJoin = "LEFT JOIN {$this->_sTableTrack} AS `r` ON (`r`.`cmt_system_id` = " . $this->_aSystem['system_id'] . " AND `r`.`cmt_id` = `c`.`cmt_id` AND `r`.`cmt_rate_author_id` = {$iAuthorId})";
     }
     $aComment = $this->getRow("SELECT\n                {$sFields}\n                `c`.`cmt_id`,\n                `c`.`cmt_parent_id`,\n                `c`.`cmt_object_id`,\n                `c`.`cmt_author_id`,\n                `c`.`cmt_text`,\n                `c`.`cmt_mood`,\n                `c`.`cmt_rate`,\n                `c`.`cmt_rate_count`,\n                `c`.`cmt_replies`,\n                UNIX_TIMESTAMP(`c`.`cmt_time`) AS `cmt_time_ts`,\n                ({$iTimestamp} - UNIX_TIMESTAMP(`c`.`cmt_time`)) AS `cmt_secs_ago`,\n                `p`.`NickName` AS `cmt_author_name`\n            FROM {$this->_sTable} AS `c`\n            LEFT JOIN `Profiles` AS `p` ON (`p`.`ID` = `c`.`cmt_author_id`)\n            {$sJoin}\n            WHERE `c`.`cmt_object_id` = '{$iId}' AND `c`.`cmt_id` = '{$iCmtId}'\n            LIMIT 1");
     $aComment['cmt_text'] = str_replace("[ray_url]", $sHomeUrl, $aComment['cmt_text']);
     $aComment['cmt_ago'] = defineTimeInterval($aComment['cmt_time_ts']);
     return $aComment;
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:15,代码来源:BxDolCmtsQuery.php

示例9: getBlockCode_LatestFeaturedProduct

 function getBlockCode_LatestFeaturedProduct()
 {
     $aDataEntry = $this->oDb->getLatestFeaturedItem();
     if (!$aDataEntry) {
         return false;
     }
     $aAuthor = getProfileInfo($aDataEntry['author_id']);
     $sImageUrl = '';
     $sImageTitle = '';
     $a = array('ID' => $aDataEntry['author_id'], 'Avatar' => $aDataEntry['thumb']);
     $aImage = BxDolService::call('photos', 'get_image', array($a, 'file'), 'Search');
     bx_store_import('Voting');
     $oRating = new BxStoreVoting('bx_store', $aDataEntry['id']);
     $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'] : '', 'product_url' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'view/' . $aDataEntry['uri'])), 'product_url' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'view/' . $aDataEntry['uri'], 'product_title' => $aDataEntry['title'], 'author_title' => _t('_From'), 'author_username' => getNickName($aAuthor['ID']), 'author_url' => getProfileLink($aAuthor['ID']), 'rating' => $oRating->isEnabled() ? $oRating->getJustVotingElement(true, $aDataEntry['id']) : '', 'created' => defineTimeInterval($aDataEntry['created']), 'price_range' => $this->oMain->_formatPriceRange($aDataEntry));
     return $this->oTemplate->parseHtmlByName('latest_featured_product', $aVars);
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:16,代码来源:BxStorePageMain.php

示例10: unit

 function unit($aData, $sTemplateName, &$oVotingView, $isShort = false)
 {
     if (null == $this->_oMain) {
         $this->_oMain = BxDolModule::getInstance('BxGroupsModule');
     }
     if (!$this->_oMain->isAllowedView($aData)) {
         $aVars = array('extra_css_class' => 'bx_groups_unit');
         return $this->parseHtmlByName('twig_unit_private', $aVars);
     }
     $sImage = '';
     if ($aData['thumb']) {
         $a = array('ID' => $aData['author_id'], 'Avatar' => $aData['thumb']);
         $aImage = BxDolService::call('photos', 'get_image', array($a, 'browse'), 'Search');
         $sImage = $aImage['no_image'] ? '' : $aImage['file'];
     }
     $aVars = array('id' => $aData['id'], 'thumb_url' => $sImage ? $sImage : $this->getImageUrl('no-image-thumb.png'), 'group_url' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aData['uri'], 'group_title' => $aData['title'], 'created' => defineTimeInterval($aData['created']), 'fans_count' => $aData['fans_count'], 'country_city' => $this->_oMain->_formatLocation($aData), 'snippet_text' => $this->_oMain->_formatSnippetText($aData), 'bx_if:full' => array('condition' => !$isShort, 'content' => array('author' => getNickName($aData['author_id']), 'author_url' => $aData['author_id'] ? getProfileLink($aData['author_id']) : 'javascript:void(0);', 'created' => defineTimeInterval($aData['created']), 'rate' => $oVotingView ? $oVotingView->getJustVotingElement(0, $aData['id'], $aData['rate']) : '&#160;')));
     return $this->parseHtmlByName($sTemplateName, $aVars);
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:18,代码来源:BxGroupsTemplate.php

示例11: unit

 function unit($aData, $sTemplateName, &$oVotingView)
 {
     if (null == $this->_oMain) {
         $this->_oMain = BxDolModule::getInstance('BxGroupsModule');
     }
     if (!$this->_oMain->isAllowedView($aData)) {
         $aVars = array('extra_css_class' => 'bx_groups_unit');
         return $this->parseHtmlByName('browse_unit_private', $aVars);
     }
     $sImage = '';
     if ($aData['thumb']) {
         $a = array('ID' => $aData['author_id'], 'Avatar' => $aData['thumb']);
         $aImage = BxDolService::call('photos', 'get_image', array($a, 'browse'), 'Search');
         $sImage = $aImage['no_image'] ? '' : $aImage['file'];
     }
     $aVars = array('id' => $aData['id'], 'thumb_url' => $sImage ? $sImage : $this->getIconUrl('no-photo.png'), 'group_url' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aData['uri'], 'group_title' => $aData['title'], 'created' => defineTimeInterval($aData['created']), 'author' => $aData['NickName'], 'author_url' => $aData['author_id'] ? getProfileLink($aData['author_id']) : 'javascript:void(0);', 'fans_count' => $aData['fans_count'], 'country_city' => _t($GLOBALS['aPreValues']['Country'][$aData['country']]['LKey']) . (trim($aData['city']) ? ', ' . $aData['city'] : ''));
     $aVars['rate'] = $oVotingView ? $oVotingView->getJustVotingElement(0, $aData['id'], $aData['rate']) : '&#160;';
     return $this->parseHtmlByName($sTemplateName, $aVars);
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:19,代码来源:BxGroupsTemplate.php

示例12: actionGetCurrentImage

 function actionGetCurrentImage($iPicId)
 {
     $iPicId = (int) $iPicId;
     if ($iPicId > 0) {
         bx_import('Search', $this->_aModule);
         $oMedia = new BxPhotosSearch();
         $aInfo = $oMedia->serviceGetPhotoArray($iPicId, 'file');
         $aInfo['ownerUrl'] = getProfileLink($aInfo['owner']);
         $aInfo['ownerName'] = getNickName($aInfo['owner']);
         $aInfo['date'] = defineTimeInterval($aInfo['date']);
         $oMedia->getRatePart();
         $aInfo['rate'] = $oMedia->oRate->getJustVotingElement(0, 0, $aInfo['rate']);
         $aLinkAddon = $oMedia->getLinkAddByPrams();
         $oPaginate = new BxDolPaginate(array('count' => (int) $_GET['total'], 'per_page' => 1, 'page' => (int) $_GET['page'], 'on_change_page' => 'getCurrentImage({page})'));
         $aInfo['paginate'] = $oPaginate->getPaginate();
         header('Content-Type:text/javascript; charset=utf-8');
         echo json_encode($aInfo);
     }
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:19,代码来源:BxPhotosModule.php

示例13: video_getList

function video_getList($sId)
{
    global $sModule;
    global $aXmlTemplates;
    global $sFilesPath;
    $sMode = getSettingValue($sModule, "listSource");
    $iCount = (int) getSettingValue($sModule, "listCount");
    if (!is_numeric($iCount) || $iCount <= 0) {
        $iCount = 10;
    }
    $oSource = new BxVideosSearch();
    $oSource->aCurrent['sorting'] = 'top';
    $oSource->aCurrent['paginate']['perPage'] = $iCount;
    $oSource->aCurrent['restriction']['id'] = array('value' => $sId, 'field' => 'ID', 'operator' => '<>');
    switch ($sMode) {
        case "Member":
            $sOwner = getValue("SELECT `Owner` FROM `" . MODULE_DB_PREFIX . "Files` WHERE `ID` = '" . $sId . "'");
            $oSource->aCurrent['restriction']['owner'] = array('value' => $sOwner, 'field' => 'Owner', 'operator' => '=');
            break;
        case "Related":
            $aFile = getArray("SELECT * FROM `" . MODULE_DB_PREFIX . "Files` WHERE `ID` = '" . $sId . "'");
            $oSource->aCurrent['restriction']['keyword'] = array('value' => $aFile['Title'] . " " . $aFile['Tags'] . " " . $aFile['Description'], 'field' => '', 'operator' => 'against');
            break;
        case "Top":
        default:
            $oSource->aCurrent['restriction']['id'] = array('value' => $sId, 'field' => 'ID', 'operator' => '<>');
            break;
    }
    $aData = $oSource->getSearchData();
    $sResult = "";
    for ($i = 0; $i < count($aData); $i++) {
        $aData[$i]['uri'] = $oSource->getCurrentUrl('file', $aData[$i]['id'], $aData[$i]['uri']);
        $aData[$i]['date'] = defineTimeInterval($aData[$i]['date']);
        $sImageFile = $aData[$i]['id'] . IMAGE_EXTENSION;
        $sThumbFile = $aData[$i]['id'] . THUMB_FILE_NAME . IMAGE_EXTENSION;
        if (!file_exists($sFilesPath . $sThumbFile)) {
            $sThumbFile = $sImageFile;
        }
        $sResult .= parseXml($aXmlTemplates['file'], $sThumbFile, $aData[$i]['size'], $aData[$i]['ownerName'], $aData[$i]['view'], $aData[$i]['voting_rate'], $aData[$i]['date'], $aData[$i]['title'], BX_DOL_URL_ROOT . $aData[$i]['uri']);
    }
    return $sResult;
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:42,代码来源:customFunctions.inc.php

示例14: actionGetCurrentImage

 function actionGetCurrentImage($iPicId)
 {
     $iPicId = (int) $iPicId;
     if ($iPicId > 0) {
         require_once 'BxPhotosSearch.php';
         $oMedia = new BxPhotosSearch();
         $aInfo = $oMedia->serviceGetPhotoArray($iPicId, 'file');
         $aInfo['ownerUrl'] = getProfileLink($aInfo['owner']);
         $aInfo['ownerName'] = getNickName($aInfo['owner']);
         $aInfo['date'] = defineTimeInterval($aInfo['date']);
         $oMedia->getRatePart();
         $aInfo['rate'] = $oMedia->oRate->getJustVotingElement(0, 0, $aInfo['rate']);
         $aLinkAddon = $oMedia->getLinkAddByPrams();
         $oPaginate = new BxDolPaginate(array('count' => (int) $_GET['total'], 'per_page' => 1, 'page' => (int) $_GET['page'], 'info' => false, 'per_page_changer' => false, 'page_reloader' => false, 'on_change_page' => 'getCurrentImage({page})'));
         $aInfo['paginate'] = $oPaginate->getPaginate();
         header('Content-Type:text/javascript');
         $oJSON = new Services_JSON();
         echo $oJSON->encode($aInfo);
     }
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:20,代码来源:BxPhotosModule.php

示例15: getBlockCode_RateObject

 function getBlockCode_RateObject()
 {
     $sMainPrefix = $this->oConfig->getMainPrefix();
     $this->oMedia->oModule->_defineActions();
     $aCheck = checkAction($this->iViewer, $this->oMedia->oModule->_defineActionName('view'));
     if ($aCheck[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED) {
         $sCode = MsgBox(_t('_' . $sMainPrefix . '_forbidden'));
     } else {
         $aData = $this->getRateObject();
         if (count($aData) > 0) {
             $oVotingView = new BxTemplVotingView($this->sType, $aData[0]['id']);
             $aUnit = array('url' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'rate', 'fileBody' => $this->getRateFile($aData), 'ratePart' => $oVotingView->isEnabled() ? $oVotingView->getBigVoting() : '', 'fileTitle' => $aData[0]['title'], 'fileUri' => $this->oMedia->getCurrentUrl('file', $aData[0]['id'], $aData[0]['uri']), 'fileWhen' => defineTimeInterval($aData[0]['date']), 'fileFrom' => getNickName($aData[0]['ownerId']), 'fileFromLink' => getProfileLink($aData[0]['ownerId']));
             $sCode = $this->oMedia->oTemplate->parseHtmlByName('rate_object.html', $aUnit);
             checkAction($this->iViewer, $this->oMedia->oModule->_defineActionName('view'), true);
         } else {
             $sCode = MsgBox(_t('_' . $sMainPrefix . '_no_file_for_rate'));
         }
     }
     return array($sCode, array(), array(), false);
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:20,代码来源:BxDolFilesRate.php


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