本文整理汇总了PHP中getLocaleDate函数的典型用法代码示例。如果您正苦于以下问题:PHP getLocaleDate函数的具体用法?PHP getLocaleDate怎么用?PHP getLocaleDate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getLocaleDate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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' => $aItems['Message'], 'by' => $aLanguageKeys['by'], 'owner_nick' => $sNickName, 'date' => getLocaleDate(strtotime($aItems['Date']), BX_DOL_LOCALE_DATE), '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;
}
示例2: blockInformation
function blockInformation($aSite)
{
$this->addCss(array('block_info.css'));
$aResult = array('author_unit' => get_member_thumbnail($aSite['ownerid'], 'none', true), 'date' => getLocaleDate($aSite['date'], BX_DOL_LOCALE_DATE_SHORT), 'date_ago' => defineTimeInterval($aSite['date'], false), 'cats' => $this->parseCategories($aSite['categories']), 'tags' => $this->parseTags($aSite['tags']), 'fields' => '');
$this->_checkOwner($aSite, $aResult);
return $this->parseHtmlByName('entry_view_block_info.html', $aResult);
}
示例3: blockInformation
function blockInformation($aSite)
{
$this->addCss(array('block_info.css'));
$aResult = array('owner_thumb' => get_member_thumbnail($aSite['ownerid'], 'none'), 'date_icon' => $this->getIconUrl('clock.png'), 'date' => getLocaleDate($aSite['date'], BX_DOL_LOCALE_DATE_SHORT), 'date_ago' => defineTimeInterval($aSite['date']), 'cats_icon' => $this->getIconUrl('folder.png'), 'cats' => $this->parseCategories($aSite['categories']), 'tags' => $this->parseTags($aSite['tags']), 'tags_icon' => $this->getIconUrl('tgs.gif'));
$this->_checkOwner($aSite, $aResult);
return $this->parseHtmlByName('block_info.html', $aResult);
}
示例4: 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);
}
示例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;
}
示例6: 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);
}
示例7: 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);
}
示例8: __construct
function __construct($sParamName = '', $sParamValue = '', $sParamValue1 = '', $sParamValue2 = '')
{
parent::__construct();
$this->iRate = 0;
switch ($sParamName) {
case 'calendar':
$GLOBALS['_page']['header'] = _t('_sys_profiles_caption_browse_by_day') . ': ' . getLocaleDate(strtotime("{$sParamValue}-{$sParamValue1}-{$sParamValue2}"), BX_DOL_LOCALE_DATE_SHORT);
$sParamValue = (int) $sParamValue;
$sParamValue1 = (int) $sParamValue1;
$sParamValue2 = (int) $sParamValue2;
$this->aCurrent['restriction']['calendar-min'] = array('value' => "'{$sParamValue}-{$sParamValue1}-{$sParamValue2} 00:00:00'", 'field' => 'DateReg', 'operator' => '>=', 'no_quote_value' => true);
$this->aCurrent['restriction']['calendar-max'] = array('value' => "'{$sParamValue}-{$sParamValue1}-{$sParamValue2} 23:59:59'", 'field' => 'DateReg', 'operator' => '<=', 'no_quote_value' => true);
$this->aCurrent['title'] = $GLOBALS['_page']['header'];
break;
}
}
示例9: displayList
function displayList($aParams)
{
$sSampleType = $aParams['sample_type'];
$iViewerId = isset($aParams['viewer_id']) ? (int) $aParams['viewer_id'] : 0;
$iViewerType = $aParams['viewer_type'];
$iStart = isset($aParams['start']) ? (int) $aParams['start'] : -1;
$iPerPage = isset($aParams['count']) ? (int) $aParams['count'] : -1;
$bShowEmpty = isset($aParams['show_empty']) ? $aParams['show_empty'] : true;
$bAdminPanel = $iViewerType == BX_TD_VIEWER_TYPE_ADMIN && (isset($aParams['admin_panel']) && $aParams['admin_panel'] || $sSampleType == 'admin');
$sModuleUri = $this->_oConfig->getUri();
$aEntries = $this->_oDb->getEntries($aParams);
if (empty($aEntries)) {
return $bShowEmpty ? MsgBox(_t('_' . $sModuleUri . '_msg_no_results')) : "";
}
$oTags = new BxDolTags();
$oCategories = new BxDolCategories();
//--- Language translations ---//
$sLKLinkApprove = _t('_' . $sModuleUri . '_lcaption_approve');
$sLKLinkReject = _t('_' . $sModuleUri . '_lcaption_reject');
$sLKLinkEdit = _t('_' . $sModuleUri . '_lcaption_edit');
$sLKLinkDelete = _t('_' . $sModuleUri . '_lcaption_delete');
$sBaseUri = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri();
$sJsMainObject = $this->_oConfig->getJsObject();
$aResult['sample'] = $sSampleType;
$aResult['bx_repeat:entries'] = array();
foreach ($aEntries as $aEntry) {
$sVotes = "";
if ($this->_oConfig->isVotesEnabled() && $aEntry['is_vote'] == 1) {
$oVotes = $this->_oModule->_createObjectVoting($aEntry['id']);
$sVotes = $oVotes->getJustVotingElement(0, $aEntry['id']);
}
$aResult['bx_repeat:entries'][] = array('id' => $this->_oConfig->getSystemPrefix() . $aEntry['id'], 'author_icon' => get_member_icon($aEntry['author_id'], 'left'), 'caption' => str_replace("\$", "$", $aEntry['caption']), 'class' => !in_array($sSampleType, array('view')) ? ' ' . $this->sCssPrefix . '-text-snippet' : '', 'date' => getLocaleDate($aEntry['date']), 'content' => str_replace("\$", "$", $aEntry['content']), 'link' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aEntry['uri'], 'voting' => $sVotes, 'bx_if:checkbox' => array('condition' => $bAdminPanel, 'content' => array('id' => $aEntry['id'])), 'bx_if:status' => array('condition' => $iViewerType == BX_TD_VIEWER_TYPE_MEMBER && $iViewerId == $aEntry['author_id'] || $iViewerType == BX_TD_VIEWER_TYPE_ADMIN, 'content' => array('status' => _t('_' . $sModuleUri . '_status_' . $aEntry['status']))), 'bx_if:edit_link' => array('condition' => $iViewerType == BX_TD_VIEWER_TYPE_MEMBER && $iViewerId == $aEntry['author_id'] || $iViewerType == BX_TD_VIEWER_TYPE_ADMIN, 'content' => array('edit_link_url' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'post/' . $aEntry['uri'], 'edit_link_caption' => $sLKLinkEdit)));
}
$aResult['paginate'] = '';
if (!in_array($sSampleType, array('id', 'uri', 'view', 'search_unit'))) {
if (!empty($sSampleType)) {
$this->_updatePaginate($aParams);
}
$aResult['paginate'] = $this->oPaginate->getPaginate($iStart, $iPerPage);
}
$aResult['loading'] = LoadingBox($sModuleUri . '-' . $sSampleType . '-loading');
return $this->parseHtmlByName('list.html', $aResult);
}
示例10: GenRssByCustomData
/**
* generate rss feed using any custom data fields
* but you need to describe fields in $aFields array
*
* Required fileds:
* Link
* Title
* DateTimeUTS
* Desc
*
* Optional fields:
* Photo
*/
function GenRssByCustomData($aRssData, $sUnitTitleC, $sMainLink, $aFields, $sImage = '', $iPID = 0)
{
global $site;
$sUnits = '';
$sRSSLast = '';
if (isset($aRssData[0])) {
$sRSSLast = getLocaleDate($aRssData[0][$aFields['DateTimeUTS']], 6);
}
if ($iPID > 0) {
$aPIDOwnerInfo = getProfileInfo($iPID);
}
$iUnitLimitChars = 2000;
//(int)getParam('max_blog_preview');
if ($aRssData) {
foreach ($aRssData as $iUnitID => $aUnitInfo) {
$sUnitUrl = $aUnitInfo[$aFields['Link']];
$sUnitGuid = $aUnitInfo[$aFields['Guid']];
$sUnitTitle = strmaxwordlen(strip_tags($aUnitInfo[$aFields['Title']]), 100);
$sUnitDate = getLocaleDate($aUnitInfo[$aFields['DateTimeUTS']], 6);
$sLinkMore = '';
if (strlen($aUnitInfo[$aFields['Desc']]) > $iUnitLimitChars) {
$sLinkMore = "... <a href=\"" . $sUnitUrl . "\">" . _t('_Read more') . "</a>";
}
$sUnitDescVal = mb_substr(strip_tags($aUnitInfo[$aFields['Desc']]), 0, $iUnitLimitChars) . $sLinkMore;
$sUnitDesc = $sUnitDescVal;
$sUnitRSSFeed .= "<item><title><![CDATA[{$sUnitTitle}]]></title><link><![CDATA[{$sUnitUrl}]]></link><guid><![CDATA[{$sUnitGuid}]]></guid><description><![CDATA[{$sUnitDesc}]]></description><pubDate>{$sUnitDate}</pubDate></item>";
}
}
$sRSSTitle = _t('_RSS_Feed_Title_Common', $sUnitTitleC);
if ($iPID > 0) {
$sRSSTitle = _t('_RSS_Feed_Title_Profile', $aPIDOwnerInfo['NickName'], $sUnitTitleC);
}
if (substr($sMainLink, 0, 7) != 'http://') {
$sMainLink = BX_DOL_URL_ROOT . $sMainLink;
}
$sRSSImage = '';
if ($sImage) {
$sRSSImage = "<image><url>{$sImage}</url><title>{$sRSSTitle}</title><link>{$sMainLink}</link></image>";
}
return "<?xml version=\"1.0\" encoding=\"UTF-8\"?><rss version=\"2.0\"><channel><title>{$sRSSTitle}</title><link>{$sMainLink}</link><description>{$sRSSTitle}</description><lastBuildDate>{$sRSSLast}</lastBuildDate>{$sRSSImage}{$sUnitRSSFeed}</channel></rss>";
}
示例11: GenIPBlackListTable
function GenIPBlackListTable()
{
$sSQL = "SELECT *, FROM_UNIXTIME(`LastDT`) AS `LastDT_U` FROM `sys_ip_list` ORDER BY `From` ASC";
$rIPList = db_res($sSQL);
$aTmplVarsItems = array();
while ($aIPList = mysql_fetch_assoc($rIPList)) {
$iID = (int) $aIPList['ID'];
$sFrom = long2ip($aIPList['From']);
$sTo = $aIPList['To'] == 0 ? '' : long2ip($aIPList['To']);
$sType = process_html_output($aIPList['Type']);
$sLastDT_Formatted = getLocaleDate($aIPList['LastDT'], BX_DOL_LOCALE_DATE);
$sLastDT = preg_replace('/([\\d]{2}):([\\d]{2}):([\\d]{2})/', '$1:$2', $aIPList['LastDT_U']);
$sDesc = process_html_output($aIPList['Desc']);
$sDescAttr = bx_html_attribute(bx_js_string($aIPList['Desc'], BX_ESCAPE_STR_APOS));
$aTmplVarsItems[] = array('id' => $iID, 'from' => $sFrom, 'to' => $sTo, 'type' => $sType, 'date' => $sLastDT, 'date_uf' => $sLastDT_Formatted, 'description' => $sDesc, 'description_attr' => $sDescAttr, 'delete_action_url' => bx_append_url_params($this->_sActionUrl, array('action' => 'apply_delete', 'id' => $iID)));
}
if (empty($aTmplVarsItems)) {
return MsgBox(_t('_Empty'));
}
return $GLOBALS['oAdmTemplate']->parseHtmlByName('ip_blacklist_list_filters.html', array('bx_repeat:items' => $aTmplVarsItems));
}
示例12: GenPostCalendarDay
/**
* Generate List of Posts for calendar
*
* @return HTML presentation of data
*/
function GenPostCalendarDay()
{
// date=2009/3/18
$sCode = MsgBox(_t('_Empty'));
$sDate = bx_get('date');
$aDate = explode('/', $sDate);
$iValue1 = (int) $aDate[0];
$iValue2 = (int) $aDate[1];
$iValue3 = (int) $aDate[2];
if ($iValue1 > 0 && $iValue2 > 0 && $iValue3 > 0) {
$this->iPostViewType = 4;
$sCaption = _t('_bx_blog_caption_browse_by_day') . getLocaleDate(strtotime("{$iValue1}-{$iValue2}-{$iValue3}"), BX_DOL_LOCALE_DATE_SHORT);
if (!$this->isAllowedBlogsPostsBrowse()) {
return DesignBoxContent($sCaption, $this->_oTemplate->displayAccessDenied(), 1);
}
require_once $this->_oConfig->getClassPath() . 'BxBlogsSearchUnit.php';
$oTmpBlogSearch = new BxBlogsSearchUnit($this);
$oTmpBlogSearch->PerformObligatoryInit($this, $this->iPostViewType);
$oTmpBlogSearch->aCurrent['paginate']['perPage'] = $this->_oConfig->getPerPage();
$oTmpBlogSearch->aCurrent['sorting'] = 'last';
$oTmpBlogSearch->aCurrent['restriction']['calendar-min'] = array('value' => "UNIX_TIMESTAMP('{$iValue1}-{$iValue2}-{$iValue3} 00:00:00')", 'field' => 'PostDate', 'operator' => '>=', 'no_quote_value' => true);
$oTmpBlogSearch->aCurrent['restriction']['calendar-max'] = array('value' => "UNIX_TIMESTAMP('{$iValue1}-{$iValue2}-{$iValue3} 23:59:59')", 'field' => 'PostDate', 'operator' => '<=', 'no_quote_value' => true);
$sCode = $oTmpBlogSearch->displayResultBlock();
$sCode = $oTmpBlogSearch->aCurrent['paginate']['totalNum'] == 0 ? MsgBox(_t('_Empty')) : $sCode;
$sRequest = BX_DOL_URL_ROOT . 'modules/boonex/blogs/blogs.php?action=show_calendar_day&date=' . "{$iValue1}/{$iValue2}/{$iValue3}" . '&page={page}&per_page={per_page}';
$oTmpBlogSearch->aCurrent['paginate']['page_url'] = $sRequest;
$sPagination = $oTmpBlogSearch->showPagination3();
}
$sRetHtmlVal = <<<EOF
<div class="bx-def-bc-padding">
{$sCode}
</div>
{$sPagination}
EOF;
return DesignBoxContent($sCaption, $sRetHtmlVal, 1);
}
示例13: BxSitesSearchResult
//.........这里部分代码省略.........
$this->aCurrent['sorting'] = 'top';
$this->aCurrent['title'] = _t('_bx_sites_caption_browse_top_rated');
$this->sSitesBrowseUrl = 'browse/top';
break;
case 'popular':
$this->aCurrent['sorting'] = 'popular';
$this->aCurrent['title'] = _t('_bx_sites_caption_browse_popular');
$this->sSitesBrowseUrl = 'browse/popular';
break;
case 'search':
if ($sValue) {
$this->aCurrent['restriction']['keyword'] = array('value' => $sValue, 'field' => '', 'operator' => 'against');
}
$this->aCurrent['title'] = _t('_bx_sites_caption_search_results') . ' ' . $sValue;
$this->sSitesBrowseUrl = 'browse/search/' . $sValue;
unset($this->aCurrent['rss']);
break;
case 'admin':
$this->aCurrent['join'] = array('profile' => array('type' => 'left', 'table' => 'Profiles', 'mainField' => 'ownerid', 'onField' => 'ID', 'joinFields' => array('Role')));
$this->aCurrent['restriction'] = array('admin' => array('value' => '3', 'field' => 'Role', 'operator' => '=', 'table' => 'Profiles'));
$this->aCurrent['title'] = _t('_bx_sites_caption_browse_admin');
$this->sSitesBrowseUrl = 'browse/admin';
break;
case 'users':
$this->aCurrent['join'] = array('profile' => array('type' => 'left', 'table' => 'Profiles', 'mainField' => 'ownerid', 'onField' => 'ID', 'joinFields' => array('Role')));
$this->aCurrent['restriction']['role'] = array('value' => '3', 'field' => 'Role', 'operator' => '<>', 'table' => 'Profiles');
$this->aCurrent['title'] = _t('_bx_sites_caption_browse_profile');
$this->sSitesBrowseUrl = 'browse/profile';
break;
case 'calendar':
$this->aCurrent['restriction']['calendar-min'] = array('value' => "UNIX_TIMESTAMP('{$sValue}-{$sValue2}-{$sValue3} 00:00:00')", 'field' => 'date', 'operator' => '>=', 'no_quote_value' => true);
$this->aCurrent['restriction']['calendar-max'] = array('value' => "UNIX_TIMESTAMP('{$sValue}-{$sValue2}-{$sValue3} 23:59:59')", 'field' => 'date', 'operator' => '<=', 'no_quote_value' => true);
$this->sSitesBrowseUrl = "browse/calendar/{$sValue}/{$sValue2}/{$sValue3}";
$this->aCurrent['title'] = _t('_bx_sites_caption_browse_by_day') . getLocaleDate(strtotime("{$sValue}-{$sValue2}-{$sValue3}"), BX_DOL_LOCALE_DATE_SHORT);
$GLOBALS['oTopMenu']->setCustomSubHeader($this->aCurrent['title']);
break;
case 'hon_rate':
$ip = getVisitorIP();
$aVotedItems = $oVotingView->getVotedItems($ip);
$aList = array();
$sPrefix = $oVotingView->_aSystem['row_prefix'] . 'id';
foreach ($aVotedItems as $iKey => $aVal) {
$aList[$iKey] = $aVal[$sPrefix];
}
$this->aCurrent['restriction']['public']['value'] = BX_DOL_PG_ALL;
$this->aCurrent['paginate']['perPage'] = 1;
$this->aCurrent['sorting'] = 'rand';
$this->aCurrent['restriction']['id'] = array('value' => $aList, 'field' => 'id', 'operator' => 'not in');
break;
case 'hon_prev_rate':
$this->aCurrent['join']['rateTrack'] = array('type' => 'inner', 'table' => 'bx_sites_rating_track', 'mainField' => 'id', 'onField' => 'sites_id', 'joinFields' => array('sites_ip', 'sites_date'));
$this->aCurrent['paginate']['perPage'] = 1;
$this->aCurrent['sorting'] = 'sites_date';
$sIp = getVisitorIP();
$this->aCurrent['restriction']['ip'] = array('value' => $sIp, 'field' => 'sites_ip', 'table' => 'bx_sites_rating_track', 'operator' => '=');
break;
case 'index':
$this->sSitesBrowseUrl = 'index';
$this->sSitesBrowseAll = 'browse/all';
$this->aCurrent['paginate']['perPage'] = 3;
$this->aCurrent['restriction']['public']['value'] = BX_DOL_PG_ALL;
break;
case 'profile':
if ($sValue) {
$iProfileId = $this->_oMain->_oDb->getProfileIdByNickName(process_db_input($sValue));
if ($iProfileId) {
示例14: getInstanceUploadAlbumTempName
function getInstanceUploadAlbumTempName($aAlbums, $iAttempt = 1)
{
$sTemp = getLocaleDate(time());
$sNewName = $iAttempt > 1 ? _t('_sys_album_caption_new', $sTemp, $iAttempt) : $sTemp;
if (in_array($sNewName, $aAlbums)) {
$iAttempt++;
$sNewName = $this->getInstanceUploadAlbumTempName($aAlbums, $iAttempt);
}
return $sNewName;
}
示例15: actionViewCalendar
/**
* Function will generate page with nedded polls by date;
*/
function actionViewCalendar($iYear = 0, $iMonth = 0, $iDay = 0)
{
global $_page;
global $_page_cont;
$sCaption = _t('_bx_poll_browse_by_day') . ': ' . getLocaleDate(strtotime("{$iYear}-{$iMonth}-{$iDay}"), BX_DOL_LOCALE_DATE_SHORT);
$iIndex = 57;
$_page['name_index'] = $iIndex;
$_page['css_name'] = 'main.css';
$_page['header'] = $sCaption;
$_page['header_text'] = $sCaption;
$sSearchResult = $this->searchByDate($sCaption, $iYear, $iMonth, $iDay);
$_page_cont[$iIndex]['page_main_code'] = $sSearchResult;
PageCode($this->_oTemplate);
}