本文整理汇总了PHP中getLocaleFormat函数 的典型用法代码示例。如果您正苦于以下问题:PHP getLocaleFormat函数的具体用法?PHP getLocaleFormat怎么用?PHP getLocaleFormat使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getLocaleFormat函数 的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: init
function init(&$oDb)
{
parent::init($oDb);
$sUri = $this->getUri();
$sName = 'bx_' . $sUri;
$this->_bAutoapprove = $this->_oDb->getParam('news_autoapprove') == 'on';
$this->_bComments = $this->_oDb->getParam('news_comments') == 'on';
$this->_sCommentsSystemName = $sName;
$this->_bVotes = $this->_oDb->getParam('news_votes') == 'on';
$this->_sVotesSystemName = $sName;
$this->_sViewsSystemName = $sName;
$this->_sSubscriptionsSystemName = $sName;
$this->_sActionsViewSystemName = $sName;
$this->_sCategoriesSystemName = $sName;
$this->_sTagsSystemName = $sName;
$this->_sAlertsSystemName = $sName;
$this->_sSearchSystemName = $sName;
$this->_sDateFormat = getLocaleFormat(BX_DOL_LOCALE_DATE_SHORT, BX_DOL_LOCALE_DB);
$this->_sAnimationEffect = 'fade';
$this->_iAnimationSpeed = 'slow';
$this->_iIndexNumber = (int) $this->_oDb->getParam('news_index_number');
$this->_iMemberNumber = (int) $this->_oDb->getParam('news_member_number');
$this->_iSnippetLength = 1000;
$this->_iPerPage = (int) $this->_oDb->getParam('news_per_page');
$this->_sSystemPrefix = 'news';
$this->_aJsClasses = array('main' => 'BxNewsMain');
$this->_aJsObjects = array('main' => 'oNewsMain');
$this->_iRssLength = (int) $this->_oDb->getParam('news_rss_length');
}
开发者ID:Gotgot59, 项目名称:dolphin.pro, 代码行数:29, 代码来源:BxNewsConfig.php
示例2: BxSimpleMessengerConfig
/**
* Class constructor;
*/
function BxSimpleMessengerConfig($aModule)
{
parent::BxDolConfig($aModule);
// define the tables prefix ;
$this->sTablePrefix = $this->getDbPrefix();
// time (in seconds) script checks for messages ;
$this->iUpdateTime = getParam('simple_messenger_update_time');
// number of visible messages into chat box ;
$this->iVisibleMessages = getParam('simple_messenger_visible_messages');
// limit of returning messages in message box;
$this->iCountRetMessages = 10;
// flashing signals amount of the non-active window ;
$this->iBlinkCounter = getParam('simple_messenger_blink_counter');
// save messenger's chat history ;
$this->bSaveChatHistory = false;
// allow to procces some smiles code;
$this->bProccesSmiles = getParam('simple_messenger_procces_smiles');
// contains block's id where the list of messages will be generated ;
$this->sOutputBlock = 'extra_area';
// contain history block's prefix (need for defines the last message);
$this->sOutputBlockPrefix = 'messages_history_';
// number of allowed chat boxes;
$this->iCountAllowedChatBoxes = getParam('simple_messenger_allowed_chatbox');
$this->sMessageDateFormat = getLocaleFormat(BX_DOL_LOCALE_DATE, BX_DOL_LOCALE_DB);
}
开发者ID:noormcs, 项目名称:studoro, 代码行数:28, 代码来源:BxSimpleMessengerConfig.php
示例3: BxWallConfig
/**
* Constructor
*/
function BxWallConfig($aModule)
{
parent::BxDolConfig($aModule);
$this->_bFullCompilation = false;
$this->_sAlertSystemName = "bx_wall";
$this->_sCommonPostPrefix = 'wall_common_';
$this->_sCommentSystemName = "bx_wall";
$this->_sAnimationEffect = 'fade';
$this->_iAnimationSpeed = 'slow';
$this->_sDividerDateFormat = getLocaleFormat(BX_DOL_LOCALE_DATE_SHORT, BX_DOL_LOCALE_DB);
}
开发者ID:dalinhuang, 项目名称:shopexts, 代码行数:14, 代码来源:BxWallConfig.php
示例4: BxPmtConfig
/**
* Constructor
*/
function BxPmtConfig($aModule)
{
parent::BxDolConfig($aModule);
$this->_iAdminId = BX_PMT_ADMINISTRATOR_ID;
$this->_sAdminUsername = BX_PMT_ADMINISTRATOR_USERNAME;
$this->_sJsObjectCart = 'oPmtCart';
$this->_sJsObjectOrders = 'oPmtOrders';
$this->_sReturnUrl = BX_DOL_URL_ROOT . $this->getBaseUri() . 'cart/';
$this->_sDataReturnUrl = BX_DOL_URL_ROOT . $this->getBaseUri() . 'act_finalize_checkout/';
$this->_iOrdersPerPage = 10;
$this->_iHistoryPerPage = 10;
$this->_sDateFormatOrders = getLocaleFormat(BX_DOL_LOCALE_DATE_SHORT, BX_DOL_LOCALE_DB);
}
开发者ID:noormcs, 项目名称:studoro, 代码行数:16, 代码来源:BxPmtConfig.php
示例5: BxWallConfig
/**
* Constructor
*/
function BxWallConfig($aModule)
{
parent::BxDolConfig($aModule);
$this->_bJsMode = false;
$this->_sAlertSystemName = "bx_wall";
$this->_sCommonPostPrefix = 'wall_common_';
$this->_sCommentSystemName = "bx_wall";
$this->_sAnimationEffect = 'fade';
$this->_iAnimationSpeed = 'slow';
$this->_sDividerDateFormat = getLocaleFormat(BX_DOL_LOCALE_DATE_SHORT, BX_DOL_LOCALE_DB);
$this->_aHideTimeline = array();
$this->_aHideOutline = array();
$this->_aHandlers = array();
$this->_aJsObjects = array('post' => 'oWallPost', 'view' => 'oWallView', 'outline' => 'oWallOutline');
}
开发者ID:noormcs, 项目名称:studoro, 代码行数:18, 代码来源:BxWallConfig.php
示例6: __construct
/**
* Constructor
*/
function __construct($aModule)
{
parent::__construct($aModule);
$this->_iAdminId = BX_PMT_ADMINISTRATOR_ID;
$this->_sAdminUsername = BX_PMT_ADMINISTRATOR_USERNAME;
$this->_sJoinUrl = $this->getBaseUri() . 'join/';
$this->_sReturnUrl = $this->getBaseUri() . 'cart/';
$this->_sDataReturnUrl = $this->getBaseUri() . 'act_finalize_checkout/';
$this->_iOrdersPerPage = 10;
$this->_iHistoryPerPage = 10;
$this->_sDateFormatOrders = getLocaleFormat(BX_DOL_LOCALE_DATE_SHORT, BX_DOL_LOCALE_DB);
$this->_sAnimationEffect = 'fade';
$this->_iAnimationSpeed = 'slow';
$this->_aPrefixes = array('general' => 'bx_pmt_', 'langs' => '_payment_', 'options' => 'pmt_');
$this->_aJsClasses = array('cart' => 'BxPmtCart', 'orders' => 'BxPmtOrders');
$this->_aJsObjects = array('cart' => 'oPmtCart', 'orders' => 'oPmtOrders');
$this->_sOptionsCategory = 'Payment';
}
开发者ID:Prashank25, 项目名称:dolphin.pro, 代码行数:21, 代码来源:BxPmtConfig.php
示例7: init
function init(&$oDb)
{
parent::init($oDb);
$this->_bAutoapprove = $this->_oDb->getParam('feedback_autoapprove') == 'on';
$this->_bComments = $this->_oDb->getParam('feedback_comments') == 'on';
$this->_sCommentsSystemName = "bx_feedback";
$this->_bVotes = $this->_oDb->getParam('feedback_votes') == 'on';
$this->_sVotesSystemName = "bx_feedback";
$this->_sDateFormat = getLocaleFormat(BX_DOL_LOCALE_DATE_SHORT, BX_DOL_LOCALE_DB);
$this->_sAnimationEffect = 'fade';
$this->_iAnimationSpeed = 'slow';
$this->_iIndexNumber = (int) $this->_oDb->getParam('feedback_index_number');
$this->_iSnippetLength = (int) $this->_oDb->getParam('feedback_snippet_length');
$this->_iPerPage = (int) $this->_oDb->getParam('feedback_per_page');
$this->_sSystemPrefix = 'feedback';
$this->_aJsClasses = array('main' => 'BxFeedbackMain');
$this->_aJsObjects = array('main' => 'oFeedbackMain');
$this->_iRssLength = (int) $this->_oDb->getParam('feedback_rss_length');
}
开发者ID:dalinhuang, 项目名称:shopexts, 代码行数:19, 代码来源:BxFdbConfig.php
示例8: BxWallConfig
function BxWallConfig($aModule)
{
parent::BxDolConfig($aModule);
$sName = 'bx_wall';
$this->_bJsMode = false;
$this->_sAlertSystemName = $sName;
$this->_sCommentSystemName = $sName;
$this->_sVotingSystemName = $sName;
$this->_aRepostDefaults = array('show_do_repost_as_button' => false, 'show_do_repost_as_button_small' => false, 'show_do_repost_icon' => false, 'show_do_repost_label' => true, 'show_counter' => true);
$this->_sCommonPostPrefix = 'wall_common_';
$this->_aPrefixes = array('style' => 'wall', 'language' => '_wall', 'option' => 'wall_', 'common_post' => $this->_sCommonPostPrefix);
$this->_sAnimationEffect = 'fade';
$this->_iAnimationSpeed = 'slow';
$this->_sDividerDateFormat = getLocaleFormat(BX_DOL_LOCALE_DATE_SHORT, BX_DOL_LOCALE_DB);
$this->_aHideTimeline = array();
$this->_aHideOutline = array();
$this->_aHandlers = array();
$this->_aJsClasses = array('post' => 'BxWallPost', 'repost' => 'BxWallRepost', 'view' => 'BxWallView', 'outline' => 'BxWallOutline');
$this->_aJsObjects = array('post' => 'oWallPost', 'repost' => 'oWallRepost', 'view' => 'oWallView', 'outline' => 'oWallOutline', 'voting' => 'oWallVoting');
$sHtmlPrefix = str_replace('_', '-', $sName);
$this->_aHtmlIds = array('repost' => array('main' => $sHtmlPrefix . '-repost-', 'counter' => $sHtmlPrefix . '-repost-counter-', 'by_popup' => $sHtmlPrefix . '-repost-by-'));
}
开发者ID:Gotgot59, 项目名称:dolphin.pro, 代码行数:22, 代码来源:BxWallConfig.php
示例9: getLocaleDate
/**
* Convert date(timestamp) in accordance with requested format code.
*
* @param string $sTimestamp - timestamp
* @param integer $iCode - format code
* 1(4) - short date format. @see sys_options -> short_date_format_php
* 2 - time format. @see sys_options -> time_format_php
* 3(5) - long date format. @see sys_options -> date_format_php
* 6 - RFC 2822 date format.
*/
function getLocaleDate($sTimestamp = '', $iCode = BX_DOL_LOCALE_DATE_SHORT)
{
$sFormat = (int) $iCode == 6 ? 'r' : getLocaleFormat($iCode);
return date($sFormat, $sTimestamp);
}
开发者ID:blas-dmx, 项目名称:dolphin.pro, 代码行数:15, 代码来源:utils.inc.php
示例10: array
* Overwrite necessary variables or add new in this file
*
*******************************************************************************/
global $gConf;
$dir = array();
$aPathInfo = pathinfo(__FILE__);
require_once $aPathInfo['dirname'] . '/../../../../../inc/header.inc.php';
$path = BX_DIRECTORY_PATH_ROOT . 'modules/boonex/forum/';
// path to orca files
/**
* forum tweaks
*/
require_once BX_DIRECTORY_PATH_INC . 'db.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
require_once BX_DIRECTORY_PATH_INC . 'profiles.inc.php';
$gConf['date_format'] = getLocaleFormat(BX_DOL_LOCALE_DATE, BX_DOL_LOCALE_DB);
// time/date format
/**
* directories configuration
*/
$gConf['dir']['error_log'] = $path . 'log/orca.error.log';
// error log file path
$gConf['dir']['classes'] = $path . 'classes/';
// classes directiry path
$gConf['dir']['js'] = $path . 'js/';
// js directiry path
$gConf['dir']['inc'] = $path . 'inc/';
// include files path
$gConf['dir']['xmlcache'] = $path . 'xml/';
// not used
$gConf['dir']['xml'] = $path . 'integrations/' . BX_ORCA_INTEGRATION . '/';
开发者ID:dalinhuang, 项目名称:shopexts, 代码行数:31, 代码来源:config.php
示例11: filterDateUTC
function filterDateUTC($sTimestamp)
{
return gmdate(getLocaleFormat(BX_DOL_LOCALE_DATE), $sTimestamp);
}
开发者ID:gorenc, 项目名称:dolphin.pro, 代码行数:4, 代码来源:BxEventsTemplate.php
示例12: getMembers
function getMembers($aParams)
{
if (!isset($aParams['view_start']) || empty($aParams['view_start'])) {
$aParams['view_start'] = 0;
}
if (!isset($aParams['view_per_page']) || empty($aParams['view_per_page'])) {
$aParams['view_per_page'] = BX_DOL_ADM_MP_PER_PAGE;
}
$aParams['view_order_way'] = 'ASC';
if (!isset($aParams['view_order']) || empty($aParams['view_order'])) {
$aParams['view_order'] = 'ID';
} else {
$aOrder = explode(' ', $aParams['view_order']);
if (count($aOrder) > 1) {
$aParams['view_order'] = $aOrder[0];
$aParams['view_order_way'] = $aOrder[1];
}
}
$sDateFormat = getLocaleFormat(BX_DOL_LOCALE_DATE, BX_DOL_LOCALE_DB);
$sSelectClause = $sJoinClause = $sWhereClause = $sGroupClause = '';
switch ($aParams['ctl_type']) {
case 'qlinks':
switch ($aParams['ctl_params']['by']) {
case 'status':
$sWhereClause .= " AND `tp`.`Status`='" . ucfirst($aParams['ctl_params']['value']) . "'";
break;
case 'featured':
$sWhereClause .= " AND `tp`.`Featured`='1'";
break;
case 'banned':
$sWhereClause .= " AND (`tbl`.`Time`='0' OR (`tbl`.`Time`<>'0' AND DATE_ADD(`tbl`.`DateTime`, INTERVAL `tbl`.`Time` HOUR)>NOW()))";
break;
case 'type':
$sWhereClause .= $aParams['ctl_params']['value'] == 'single' ? " AND `tp`.`Couple`='0'" : " AND `tp`.`Couple`<>'0' AND `tp`.`Couple`>`tp`.`ID`";
break;
case 'role':
$iRole = BX_DOL_ROLE_MEMBER;
if ($aParams['ctl_params']['value'] == 'admins') {
$iRole = BX_DOL_ROLE_ADMIN;
}
$sWhereClause .= " AND `tp`.`Role` & " . $iRole . "";
break;
case 'sex':
$sWhereClause .= " AND LOWER(`tp`.`Sex`)='" . strtolower($aParams['ctl_params']['value']) . "'";
break;
case 'membership':
$sWhereClause .= " AND LOWER(`tl`.`Name`)='" . strtolower($aParams['ctl_params']['value']) . "'";
break;
}
break;
case 'tags':
$sWhereClause .= " AND `tp`.`Tags` LIKE '%" . $aParams['ctl_params']['value'] . "%'";
break;
case 'search':
$sWhereClause .= " AND (\r\n \t`tp`.`ID` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR\r\n `tp`.`NickName` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR \r\n `tp`.`Email` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR \r\n `tp`.`Headline` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR \r\n `tp`.`DescriptionMe` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR \r\n `tp`.`Tags` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR \r\n `tp`.`DateReg` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR \r\n `tp`.`DateLastLogin` LIKE '%" . $aParams['ctl_params']['value'] . "%'\r\n )";
break;
}
//--- Get Paginate ---//
$oPaginate = new BxDolPaginate(array('start' => $aParams['view_start'], 'count' => (int) db_value("SELECT COUNT(`tp`.`ID`) FROM `Profiles` AS `tp` LEFT JOIN `sys_admin_ban_list` AS `tbl` ON `tp`.`ID`=`tbl`.`ProfID` LEFT JOIN `sys_acl_levels_members` AS `tlm` ON `tp`.`ID`=`tlm`.`IDMember` AND `tlm`.`DateStarts` < NOW() AND (`tlm`.`DateExpires`>NOW() || ISNULL(`tlm`.`DateExpires`)) LEFT JOIN `sys_acl_levels` AS `tl` ON `tlm`.`IDLevel`=`tl`.`ID` " . $sJoinClause . " WHERE 1 AND (`tp`.`Couple`=0 OR `tp`.`Couple`>`tp`.`ID`)" . $sWhereClause), 'per_page' => $aParams['view_per_page'], 'page_url' => $GLOBALS['site']['url_admin'] . 'profiles.php?start={start}', 'on_change_page' => BX_DOL_ADM_MP_JS_NAME . '.changePage({start})'));
$sPaginate = $oPaginate->getPaginate();
//--- Get Items ---//
$sQuery = "\r\n \tSELECT\r\n \t\t`tp`.`ID` as `id`,\r\n \t\t`tp`.`NickName` AS `username`,\r\n \t\t`tp`.`Headline` AS `headline`,\r\n \t\t`tp`.`Sex` AS `sex`,\r\n \t\t`tp`.`DateOfBirth` AS `date_of_birth`,\r\n \t\t`tp`.`Country` AS `country`,\r\n \t\t`tp`.`City` AS `city`,\r\n \t\t`tp`.`DescriptionMe` AS `description`,\r\n \t\t`tp`.`Email` AS `email`,\r\n \t\tDATE_FORMAT(`tp`.`DateReg`, '" . $sDateFormat . "' ) AS `registration`,\r\n \t\tDATE_FORMAT(`tp`.`DateLastLogin`, '" . $sDateFormat . "' ) AS `last_login`,\r\n \t\t`tp`.`Status` AS `status`,\r\n \t\tIF(`tbl`.`Time`='0' OR DATE_ADD(`tbl`.`DateTime`, INTERVAL `tbl`.`Time` HOUR)>NOW(), 1, 0) AS `banned`, \r\n \t\t`tl`.`ID` AS `ml_id`, \r\n \t\tIF(ISNULL(`tl`.`Name`),'', `tl`.`Name`) AS `ml_name`\r\n \t\t" . $sSelectClause . "\r\n \tFROM `Profiles` AS `tp` \r\n LEFT JOIN `sys_admin_ban_list` AS `tbl` ON `tp`.`ID`=`tbl`.`ProfID`\r\n LEFT JOIN `sys_acl_levels_members` AS `tlm` ON `tp`.`ID`=`tlm`.`IDMember` AND `tlm`.`DateStarts` < NOW() AND (`tlm`.`DateExpires`>NOW() || ISNULL(`tlm`.`DateExpires`)) \r\n LEFT JOIN `sys_acl_levels` AS `tl` ON `tlm`.`IDLevel`=`tl`.`ID` \r\n \t" . $sJoinClause . "\r\n \tWHERE\r\n \t\t1 AND (`tp`.`Couple`=0 OR `tp`.`Couple`>`tp`.`ID`)" . $sWhereClause . "\r\n \t" . $sGroupClause . "\r\n \tORDER BY `tp`.`" . $aParams['view_order'] . "` " . $aParams['view_order_way'] . "\r\n \tLIMIT " . $aParams['view_start'] . ", " . $aParams['view_per_page'];
$aProfiles = $GLOBALS['MySQL']->getAll($sQuery);
//--- Display ---//
$sFunction = 'getMembers' . ucfirst($aParams['view_type']);
return $sFunction($aProfiles, $sPaginate);
}
开发者ID:dalinhuang, 项目名称:shopexts, 代码行数:67, 代码来源:profiles.php
示例13: getBlockCode_ViewMessage
/**
* Function will generate the view message block ;
*
* @return : Html presentation data ;
*/
function getBlockCode_ViewMessage()
{
global $oSysTemplate;
global $oFunctions;
global $site;
global $oTemplConfig;
// init some needed variables;
$sOutputHtml = null;
$sActionsList = null;
// generate page toggle ellements ;
$aToggleItems = array('inbox' => _t('_Inbox'), 'outbox' => _t('_Outbox'), 'trash' => _t('_Trash'), 'compose' => _t('_Compose'));
$sRequest = 'mail.php' . '?';
foreach ($aToggleItems as $sKey => $sValue) {
$aTopToggleEllements[$sValue] = array('href' => $sRequest . '&mode=' . $sKey, 'dynamic' => false, 'active' => false);
}
// language keys ;
$aLanguageKeys = array('back_inbox' => _t('_Back') . ' ' . _t('_to') . ' ' . _t('_Inbox'), 'back_outbox' => _t('_Back') . ' ' . _t('_to') . ' ' . _t('_Outbox'), 'back_trash' => _t('_Back') . ' ' . _t('_to') . ' ' . _t('_Trash'), 'spam_message' => _t('_Report'), 'delete_message' => _t('_Delete'), 'reply_message' => _t('_Reply'), 'restore_message' => _t('_Restore'), 'are_you_sure' => _t('_Are you sure?'), 'more' => _t('_More actions'), 'mark_read' => _t('_Mark as old'), 'mark_unread' => _t('_Mark as New'));
$sQuery = "\n SELECT\n *,\n DATE_FORMAT(`Date`, '" . getLocaleFormat(BX_DOL_LOCALE_DATE, BX_DOL_LOCALE_DB) . "') AS `Date`\n FROM\n `sys_messages`\n WHERE\n `ID` = {$this->aMailBoxSettings['messageID']}\n AND\n (\n `Sender` = {$this->aMailBoxSettings['member_id']}\n OR\n `Recipient` = {$this->aMailBoxSettings['member_id']}\n )\n ";
$rResult = db_res($sQuery);
while (true == ($aRow = mysql_fetch_assoc($rResult))) {
// ** generate member's information ;
$sMemberIcon = get_member_thumbnail($aRow['Sender'], 'none');
$aMemberInfo = getProfileInfo($aRow['Sender']);
// define the back link;
if ($aRow['Trash'] == 'recipient') {
$sBackCaption = $aLanguageKeys['back_trash'];
$sBackUrl = 'mail.php' . '?mode=trash';
} else {
if ($aRow['Sender'] == $this->aMailBoxSettings['member_id']) {
$sBackCaption = $aLanguageKeys['back_outbox'];
$sBackUrl = 'mail.php' . '?mode=outbox';
} else {
$sBackCaption = $aLanguageKeys['back_inbox'];
$sBackUrl = 'mail.php' . '?mode=inbox';
}
}
$sMemberNickName = getNickName($aMemberInfo['ID']);
$sMemberLocation = getProfileLink($aMemberInfo['ID']);
$sMemberSexImage = isset($aMemberInfo['Sex']) ? $oFunctions->genSexIcon($aMemberInfo['Sex']) : null;
$sMemberAge = isset($aMemberInfo['DateOfBirth']) && $aMemberInfo['DateOfBirth'] != "0000-00-00" ? _t("_y/o", age($aMemberInfo['DateOfBirth'])) : null;
$sMemberCountry = isset($aMemberInfo['Country']) && $aMemberInfo['Country'] ? $aMemberInfo['Country'] : null;
$sMemberFlag = $sMemberCountry ? $site['flags'] . strtolower($sMemberCountry) . $this->sMembersFlagExtension : null;
if ($sMemberCountry) {
$sMemberCountryFlag = '<img src="' . $sMemberFlag . '" alt="' . $sMemberCountry . '" />';
}
$sCity = isset($aMemberInfo['City']) && $aMemberInfo['City'] ? $aMemberInfo['City'] . ', ' : null;
// member's city and country;
$sMemberCountry = $sCity . $sMemberCountry;
// generate the member's actions list;
if ($aRow['Sender'] != $this->aMailBoxSettings['member_id']) {
// prepare all needed keywords ;
$aMemberInfo['anonym_mode'] = $oTemplConfig->bAnonymousMode;
$aMemberInfo['member_pass'] = $aMemberInfo['Password'];
$aMemberInfo['member_id'] = $aMemberInfo['ID'];
$aMemberInfo['url'] = BX_DOL_URL_ROOT;
//--- Subscription integration ---//
$oSubscription = new BxDolSubscription();
$sAddon = $oSubscription->getData();
$aButton = $oSubscription->getButton((int) $this->aMailBoxSettings['member_id'], 'profile', '', (int) $aRow['Sender']);
$aMemberInfo['sbs_profile_title'] = $aButton['title'];
$aMemberInfo['sbs_profile_script'] = $aButton['script'];
//--- Subscription integration ---//
$aMemberInfo['cpt_edit'] = '';
$aMemberInfo['cpt_send_letter'] = _t('_SendLetter');
$aMemberInfo['cpt_remove_friend'] = _t('_Remove friend');
$aMemberInfo['cpt_fave'] = _t('_Fave');
$aMemberInfo['cpt_remove_fave'] = _t('_Remove Fave');
$aMemberInfo['cpt_befriend'] = _t('_Befriend');
$aMemberInfo['cpt_greet'] = _t('_Greet');
$aMemberInfo['cpt_get_mail'] = _t('_Get E-mail');
$aMemberInfo['cpt_share'] = _t('_Share');
$aMemberInfo['cpt_report'] = _t('_Report');
$aMemberInfo['cpt_block'] = _t('_Block');
$aMemberInfo['cpt_unblock'] = _t('_Unblock');
$aMemberInfo['member_id'] = $this->aMailBoxSettings['member_id'];
$sActionsList = $sAddon . $oFunctions->genObjectsActions($aMemberInfo, 'Profile');
}
// try to define the message status ;
if ($aRow['Sender'] == $this->aMailBoxSettings['member_id']) {
if (strstr($aRow['Trash'], 'sender')) {
$this->aMailBoxSettings['mailbox_mode'] = 'trash';
} else {
$this->aMailBoxSettings['mailbox_mode'] = 'outbox';
}
$sRelocateParameter = 'outbox';
} else {
if ($aRow['Sender'] != $this->aMailBoxSettings['member_id']) {
if (strstr($aRow['Trash'], 'recipient')) {
$this->aMailBoxSettings['mailbox_mode'] = 'trash';
} else {
$this->aMailBoxSettings['mailbox_mode'] = 'inbox';
}
$sRelocateParameter = 'inbox';
}
}
//.........这里部分代码省略.........
开发者ID:noormcs, 项目名称:studoro, 代码行数:101, 代码来源:BxBaseMailBox.php
示例14: getMessages
/**
* Function will get array with messages ;
*
* @return : hash array with messages ;
*/
function getMessages()
{
// init some needed variables ;
$sWhereParameter = null;
$sTypeMessages = null;
// define the sort parameter ;
$sSortParameter = array_key_exists($this->aMailBoxSettings['sort_mode'], $this->aSortCriterias) ? $this->aSortCriterias[$this->aMailBoxSettings['sort_mode']] : $this->aSortCriterias['date_desc'];
// define mailbox mode ;
switch ($this->aMailBoxSettings['mailbox_mode']) {
case 'inbox':
$sWhereParameter = " AND `sys_messages`.`Recipient` = {$this->aMailBoxSettings['member_id']} AND NOT FIND_IN_SET('Recipient', `sys_messages`.`Trash`) ";
break;
case 'inbox_new':
$sWhereParameter = " AND `sys_messages`.`Recipient`={$this->aMailBoxSettings['member_id']} AND NOT FIND_IN_SET('Recipient', `sys_messages`.`Trash`) AND `New`='1' ";
break;
case 'outbox':
$sWhereParameter = " AND `sys_messages`.`Sender` = {$this->aMailBoxSettings['member_id']} AND NOT FIND_IN_SET('Sender', `sys_messages`.`Trash`)";
break;
case 'trash':
$sWhereParameter = "\n AND\n (\n (\n `sys_messages`.`Sender` = {$this->aMailBoxSettings['member_id']}\n AND\n FIND_IN_SET('Sender', `sys_messages`.`Trash`)\n )\n OR\n (\n `sys_messages`.`Recipient` = {$this->aMailBoxSettings['member_id']}\n AND\n FIND_IN_SET('Recipient', `sys_messages`.`Trash`)\n )\n )\n AND\n (\n (\n `sys_messages`.`Sender` = {$this->aMailBoxSettings['member_id']}\n AND\n NOT FIND_IN_SET('Sender', `sys_messages`.`TrashNotView`)\n )\n OR\n (\n `sys_messages`.`Recipient` = {$this->aMailBoxSettings['member_id']}\n AND\n NOT FIND_IN_SET('Recipient', `sys_messages`.`TrashNotView`)\n )\n )\n ";
break;
}
// define messages types
if (is_array($this->aReceivedMessagesTypes) and !empty($this->aReceivedMessagesTypes)) {
foreach ($this->aReceivedMessagesTypes as $sKey) {
if ($sKey) {
$sTypeMessages .= "`sys_messages`.`Type` = '{$sKey}' OR";
}
}
$sTypeMessages = 'AND (' . preg_replace("/OR\$/", '', $sTypeMessages) . ')';
} else {
return;
}
// if defined all needed parameters ;
if ($sWhereParameter) {
// count of all messages ;
$this->iTotalMessageCount = db_value("\n SELECT\n COUNT(`sys_messages`.`ID`)\n FROM\n `sys_messages`\n WHERE\n 1\n {$sWhereParameter}\n {$sTypeMessages}\n ");
if ($this->iTotalMessageCount) {
// define number of maximum message for per page ;
if ($this->aMailBoxSettings['page'] < 1) {
$this->aMailBoxSettings['page'] = 1;
}
$sLimitFrom = ($this->aMailBoxSettings['page'] - 1) * $this->aMailBoxSettings['per_page'];
$sSqlLimit = "LIMIT {$sLimitFrom}, {$this->aMailBoxSettings['per_page']}";
$sFieldName = $this->aMailBoxSettings['mailbox_mode'] == 'outbox' ? 'Recipient' : 'Sender';
$sQuery = "\n SELECT\n `sys_messages`.`ID`, DATE_FORMAT(`sys_messages`.`Date`, '" . getLocaleFormat(BX_DOL_LOCALE_DATE, BX_DOL_LOCALE_DB) . "') AS `Date`,\n UNIX_TIMESTAMP() - UNIX_TIMESTAMP(`sys_messages`.`Date`) AS `DateUTS`,\n UNIX_TIMESTAMP(`sys_messages`.`Date`) AS `DateTS`,\n `sys_messages`.`Sender`, `sys_messages`.`Recipient`, `sys_messages`.`Text`,\n `sys_messages`.`Subject`, `sys_messages`.`New`, `sys_messages`.`Type`\n FROM\n `sys_messages`\n INNER JOIN\n `Profiles`\n ON\n `Profiles`.`ID` = `sys_messages`.`{$sFieldName}`\n WHERE\n 1\n {$sWhereParameter}\n {$sTypeMessages}\n ORDER BY {$sSortParameter}\n {$sSqlLimit}\n ";
$aMessages = array();
$rResult = db_res($sQuery);
// generate array with messages ;
while (true == ($aRow = $rResult->fetch())) {
$aMessages[] = $aRow;
}
// return generated array ;
return $aMessages;
}
}
}
开发者ID:toxalot, 项目名称:dolphin.pro, 代码行数:62, 代码来源:BxDolMailBox.php
示例15: getRequests
/**
* Function will return array with needed requests ;
*
* @param : $sTableName (string) - DB's table name;
* @param : $aRequestTypes (array) - contain language keys for differences person's mode ;
[ from ] - needed if person mode = 'from' ;
[ to ] - needed if person mode = 'to' ;
* @param : $sAdditionalParam (string) - additional SQL query ;
* @param : $sAdditionalField (string) - additional table's field ;
* @return : (array) array with all requests ;
[ member_id ] - member's ID ;
[ date ] - request's date ;
[ type ] - type of request ;
*/
function getRequests($sTableName, &$aRequestTypes, $sAdditionalParam = null, $sAdditionalField = null)
{
$sTableName = process_db_input($sTableName);
$sAdditionalParam = process_db_input($sAdditionalParam);
$sAdditionalField = process_db_input($sAdditionalField);
// ** init some needed variables ;
$aRequests = array();
// init all sort criterias ;
$aSortCriterias = array('date' => "`{$sTableName}`.`When` ASC", 'author' => '`Profiles`.`NickName` ASC', 'date_desc' => "`{$sTableName}`.`When` DESC", 'author_desc' => '`Profiles`.`NickName` DESC');
// define the sort parameter ;
$sSortParameter = array_key_exists($this->aCommunicatorSettings['sorting'], $aSortCriterias) ? $aSortCriterias[$this->aCommunicatorSettings['sorting']] : $aSortCriterias['date_desc'];
// define the person mode ;
switch ($this->aCommunicatorSettings['person_switcher']) {
case 'from':
$sFieldName = '`ID`';
break;
case 'to':
$sFieldName = '`Profile`';
break;
default:
$sFieldName = '`ID`';
}
// count of all requests ;
$this->iTotalRequestsCount = db_value("\n SELECT\n COUNT(*)\n FROM\n `{$sTableName}`\n WHERE\n `{$sTableName}`.{$sFieldName} = {$this->aCommunicatorSettings['member_id']}\n {$sAdditionalParam}\n ");
if ($this->iTotalRequestsCount) {
// lang keys ;
$sRequestFrom = $GLOBALS['MySQL']->escape($aRequestTypes['from']);
$sRequestTo = $GLOBALS['MySQL']->escape($aRequestTypes['to']);
// define number of maximum rows for per page ;
if ($this->aCommunicatorSettings['page'] < 1) {
$this->aCommunicatorSettings['page'] = 1;
}
$sLimitFrom = ($this->aCommunicatorSettings['page'] - 1) * $this->aCommunicatorSettings['per_page'];
$sSqlLimit = "LIMIT {$sLimitFrom}, {$this->aCommunicatorSettings['per_page']}";
// define the additional table's field ;
$sExtFieldName = $sAdditionalField ? ", `{$sTableName}`.`{$sAdditionalField}`" : null;
$sQuery = "\n SELECT\n IF(`{$sTableName}`.`ID` = {$this->aCommunicatorSettings['member_id']},\n `{$sTableName}`.`Profile`, `{$sTableName}`.`ID`) AS `iMemberID`,\n\n IF(`{$sTableName}`.`ID` = {$this->aCommunicatorSettings['member_id']}, '{$sRequestFrom}', '{$sRequestTo}')\n AS `sType`,\n\n DATE_FORMAT(`{$sTableName}`.`When`, '" . getLocaleFormat(BX_DOL_LOCALE_DATE, BX_DOL_LOCALE_DB) . "') AS `sDate`\n {$sExtFieldName}\n FROM\n `{$sTableName}`\n LEFT JOIN\n `Profiles`\n ON\n `Profiles`.`ID` = IF(`{$sTableName}`.`ID` = {$this->aCommunicatorSettings['member_id']},\n `{$sTableName}`.`Profile`, `{$sTableName}`.`ID`)\n WHERE\n `{$sTableName}`.{$sFieldName} = {$this->aCommunicatorSettings['member_id']}\n {$sAdditionalParam}\n ORDER BY\n {$sSortParameter}\n {$sSqlLimit}\n ";
$rResult = db_res($sQuery);
while (true == ($aRow = mysql_fetch_assoc($rResult))) {
$sExtType = (!empty($aRequestTypes['specific_key']) and $sAdditionalField) ? ' ' . _t($aRequestTypes['specific_key'], $aRow[$sAdditionalField]) : null;
$aRequests[] = array('member_id' => $aRow['iMemberID'], 'date' => $aRow['sDate'], 'type' => $aRow['sType'] . $sExtType);
}
}
return $aRequests;
}
开发者ID:newton27, 项目名称:dolphin.pro, 代码行数:59, 代码来源:BxDolCommunicator.php
示例16: getMembers
function getMembers($aParams)
{
if (!isset($aParams['view_start']) || empty($aParams['view_start'])) {
$aParams['view_start'] = 0;
}
if (!isset($aParams['view_per_page']) || empty($aParams['view_per_page'])) {
$aParams['view_per_page'] = BX_DOL_ADM_MP_PER_PAGE;
}
$aParams['view_order_way'] = 'ASC';
if (!isset($aParams['view_order']) || empty($aParams['view_order'])) {
$aParams['view_order'] = 'ID';
} else {
$aOrder = explode(' ', $aParams['view_order']);
if (count($aOrder) > 1) {
$aParams['view_order'] = $aOrder[0];
$aParams['view_order_way'] = $aOrder[1];
}
}
$sDateFormat = getLocaleFormat(BX_DOL_LOCALE_DATE, BX_DOL_LOCALE_DB);
$sSelectClause = $sJoinClause = $sWhereClause = $sGroupClause = '';
if (isset($aParams['ctl_type'])) {
switch ($aParams['ctl_type']) {
case 'qlinks':
switch ($aParams['ctl_params']['by']) {
case 'status':
$sWhereClause .= " AND `tp`.`Status`='" . ucfirst($aParams['ctl_params']['value']) . "'";
break;
case 'featured':
$sWhereClause .= " AND `tp`.`Featured`='1'";
break;
case 'banned':
$sWhereClause .= " AND (`tbl`.`Time`='0' OR (`tbl`.`Time`<>'0' AND DATE_ADD(`tbl`.`DateTime`, INTERVAL `tbl`.`Time` HOUR)>NOW()))";
break;
case 'type':
$sWhereClause .= $aParams['ctl_params']['value'] == 'single' ? " AND `tp`.`Couple`='0'" : " AND `tp`.`Couple`<>'0' AND `tp`.`Couple`>`tp`.`ID`";
break;
case 'role':
$iRole = BX_DOL_ROLE_MEMBER;
if ($aParams['ctl_params']['value'] == 'admins') {
$iRole = BX_DOL_ROLE_ADMIN;
}
$sWhereClause .= " AND `tp`.`Role` & " . $iRole . "";
break;
case 'sex':
$sWhereClause .= " AND LOWER(`tp`.`Sex`)='" . strtolower($aParams['ctl_params']['value']) . "' AND `tp`.`Couple` = 0 ";
break;
case 'membership':
$sWhereClause .= " AND LOWER(`tl`.`Name`)='" . strtolower($aParams['ctl_params']['value']) . "'";
break;
}
break;
case 'tags':
$sWhereClause .= " AND `tp`.`Tags` LIKE '%" . $aParams['ctl_params']['value'] . "%'";
break;
case 'search':
$sWhereClause .= " AND (\n `tp`.`ID` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR\n `tp`.`NickName` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR\n `tp`.`Email` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR\n `tp`.`DescriptionMe` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR\n `tp`.`Tags` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR\n `tp`.`DateReg` LIKE '%" . $aParams['ctl_params']['value'] . "%' OR\n `tp`.`DateLastLogin` LIKE '%" . $aParams['ctl_params']['value'] . "%'\n )";
break;
}
}
//--- Get Paginate ---//
$oPaginate = new BxDolPaginate(array('start' => $aParams['view_start'], 'count' => (int) db_value("SELECT COUNT(`tp`.`ID`) FROM `Profiles` AS `tp` LEFT JOIN `sys_admin_ban_list` AS `tbl` ON `tp`.`ID`=`tbl`.`ProfID` LEFT JOIN `sys_acl_levels_members` AS `tlm` ON `tp`.`ID`=`tlm`.`IDMember` AND `tlm`.`DateStarts` < NOW() AND (`tlm`.`DateExpires`>NOW() || ISNULL(`tlm`.`DateExpires`)) LEFT JOIN `sys_acl_levels` AS `tl` ON `tlm`.`IDLevel`=`tl`.`ID` " . $sJoinClause . " WHERE 1 AND (`tp`.`Couple`=0 OR `tp`.`Couple`>`tp`.`ID`)" . $sWhereClause), 'per_page' => $aParams['view_per_page'], 'page_url' => $GLOBALS['site']['url_admin'] . 'profiles.php?start={start}', 'on_change_page' => BX_DOL_ADM_MP_JS_NAME . '.changePage({start})'));
$sPaginate = $oPaginate->getPaginate();
//--- Get Controls ---//
$GLOBALS['oAdmTemplate']->addJsTranslation(array('_adm_btn_mp_ban_duration'));
$aButtons = array('adm-mp-activate' => _t('_adm_btn_mp_activate'), 'adm-mp-deactivate' => _t('_adm_btn_mp_deactivate'), 'adm-mp-ban' => array('type' => 'submit', 'name' => 'adm-mp-ban', 'value' => _t('_adm_btn_mp_ban'), 'onclick' => 'onclick="javascript: return ' . BX_DOL_ADM_MP_JS_NAME . '.actionBan(this);"'), 'adm-mp-unban' => _t('_adm_btn_mp_unban'), 'adm-mp-confirm' => _t('_adm_btn_mp_confirm'), 'adm-mp-delete' => _t('_adm_btn_mp_delete'), 'adm-mp-delete-spammer' => _t('_adm_btn_mp_delete_spammer'));
$sControls = BxTemplSearchResult::showAdminActionsPanel('adm-mp-members-' . $aParams['view_type'], $aButtons, 'members');
//--- Get Items ---//
$sQuery = "\n SELECT\n `tp`.`ID` as `id`,\n `tp`.`NickName` AS `username`,\n `tp`.`Sex` AS `sex`,\n `tp`.`DateOfBirth` AS `date_of_birth`,\n `tp`.`Country` AS `country`,\n `tp`.`City` AS `city`,\n `tp`.`DescriptionMe` AS `description`,\n `tp`.`Email` AS `email`,\n DATE_FORMAT(`tp`.`DateReg`, '" . $sDateFormat . "' ) AS `registration`,\n DATE_FORMAT(`tp`.`DateLastLogin`, '" . $sDateFormat . "' ) AS `last_login`,\n DATE_FORMAT(`tp`.`DateLastNav`, '" . $sDateFormat . "' ) AS `last_activity`,\n `tp`.`Status` AS `status`,\n IF(`tbl`.`Time`='0' OR DATE_ADD(`tbl`.`DateTime`, INTERVAL `tbl`.`Time` HOUR)>NOW(), 1, 0) AS `banned`,\n `tl`.`ID` AS `ml_id`,\n IF(ISNULL(`tl`.`Name`),'', `tl`.`Name`) AS `ml_name`\n " . $sSelectClause . "\n FROM `Profiles` AS `tp`\n LEFT JOIN `sys_admin_ban_list` AS `tbl` ON `tp`.`ID`=`tbl`.`ProfID`\n LEFT JOIN `sys_acl_levels_members` AS `tlm` ON `tp`.`ID`=`tlm`.`IDMember` AND `tlm`.`DateStarts` < NOW() AND (`tlm`.`DateExpires`>NOW() || ISNULL(`tlm`.`DateExpires`))\n LEFT JOIN `sys_acl_levels` AS `tl` ON `tlm`.`IDLevel`=`tl`.`ID`\n " . $sJoinClause . "\n WHERE\n 1 AND (`tp`.`Couple`=0 OR `tp`.`Couple`>`tp`.`ID`)" . $sWhereClause . "\n " . $sGroupClause . "\n ORDER BY `tp`.`" . $aParams['view_order'] . "` " . $aParams['view_order_way'] . "\n LIMIT " . $aParams['view_start'] . ", " . $aParams['view_per_page'];
$aProfiles = $GLOBALS['MySQL']->getAll($sQuery);
//--- Display ---//
$sFunction = 'getMembers' . ucfirst($aParams['view_type']);
return $sFunction($aProfiles, $sPaginate, $sControls);
}
开发者ID:toxalot, 项目名称:dolphin.pro, 代码行数:73, 代码来源:profiles.php
vant的使用我开始是npm导入,然后import,使用不了。找了各种方法,最后还是下载文件
阅读:537| 2022-07-18
bradtraversy/iweather: Ionic 3 mobile weather app
阅读:1650| 2022-08-30
joaomh/curso-de-matlab
阅读:1211| 2022-08-17
魔兽世界怀旧服已经开启两个多月了,但作为一个猎人玩家,抓到“断牙”,已经成为了一
阅读:1066| 2022-11-06
rugk/mastodon-simplified-federation: Simplifies following and interacting with r
阅读:1133| 2022-08-17
写了这么长时间的代码,一直认为调试程序比写程序要重要,上次有人问俺,如何调
阅读:822| 2022-07-18
amp;amp;lt;HTMLamp;amp;gt;amp;amp;lt;HEADamp;amp;gt;amp;amp;lt;TITLEamp;amp;gt;
阅读:727| 2022-07-18
Gallagher Controller 6000 is vulnerable to a Denial of Service attack via confli
阅读:653| 2022-07-08
Tangshitao/Dense-Scene-Matching: Learning Camera Localization via Dense Scene Ma
阅读:821| 2022-08-16
相信不少果粉在对自己的设备进行某些操作时,都会碰到Respring,但这个 Respring 到底
阅读:388| 2022-11-06
请发表评论