本文整理汇总了PHP中CTimeZone::GetZones方法的典型用法代码示例。如果您正苦于以下问题:PHP CTimeZone::GetZones方法的具体用法?PHP CTimeZone::GetZones怎么用?PHP CTimeZone::GetZones使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTimeZone
的用法示例。
在下文中一共展示了CTimeZone::GetZones方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTimezones
/**
* Возвращает список часовых поясов
* @return array
*/
protected static function getTimezones()
{
if (self::$_timezones === null) {
$timeZonesList = \CTimeZone::GetZones();
unset($timeZonesList['']);
self::$_timezones = $timeZonesList;
}
return self::$_timezones;
}
示例2: GetMessage
Array("use_digest_auth", GetMessage("MAIN_OPT_HTTP_DIGEST"), "N", Array("checkbox", "Y")),
Array("note"=>GetMessage("MAIN_OPT_DIGEST_NOTE")),
Array("custom_register_page", GetMessage("MAIN_OPT_REGISTER_PAGE"), "", Array("text", 40)),
GetMessage("MAIN_OPT_SECURE_AUTH"),
Array("use_encrypted_auth", GetMessage("MAIN_OPT_SECURE_PASS"), "N", Array("checkbox", "Y"), (CRsaSecurity::Possible()? "N":"Y")),
),
"controller_auth" => Array(
Array("auth_controller_prefix", GetMessage("MAIN_OPTION_CTRL_PREF"), "controller", Array("text", "30")),
Array("auth_controller_sso", GetMessage("MAIN_OPTION_CTRL_THR"), "N", Array("checkbox", "Y")),
),
);
if(CTimeZone::Possible())
{
$aZones = CTimeZone::GetZones();
$arAllOptions["main"][] = array("use_time_zones", GetMessage("MAIN_OPT_USE_TIMEZONES"), "N", array("checkbox", "Y", 'onclick="this.form.default_time_zone.disabled = this.form.auto_time_zone.disabled = !this.checked;"'));
$arAllOptions["main"][] = array("default_time_zone", GetMessage("MAIN_OPT_TIME_ZONE_DEF"), "", array("selectbox", $aZones));
$arAllOptions["main"][] = array("auto_time_zone", GetMessage("MAIN_OPT_TIME_ZONE_AUTO"), "N", array("checkbox", "Y"));
}
else
{
$arAllOptions["main"][] = array('note'=>GetMessage("MAIN_OPT_TIME_ZONE_NOTE"));
}
$arAllOptions["main"][] = GetMessage("main_options_map");
$arAllOptions["main"][] = Array("map_top_menu_type", GetMessage("MAIN_TOP_MENU_TYPE"), "top", Array("text", 30));
$arAllOptions["main"][] = Array("map_left_menu_type", GetMessage("MAIN_LEFT_MENU_TYPE"), "left", Array("text", 30));
//show public panel for users
CJSCore::Init(array('access'));
示例3: htmlspecialcharsbx
$arResult["bVarsFromForm"] = (count($arResult['ERRORS']) <= 0) ? false : true;
}
// ******************** /User properties ***************************************************
// initialize captcha
if ($arResult["USE_CAPTCHA"] == "Y")
$arResult["CAPTCHA_CODE"] = htmlspecialcharsbx($APPLICATION->CaptchaGetCode());
// set title
if ($arParams["SET_TITLE"] == "Y")
$APPLICATION->SetTitle(GetMessage("REGISTER_DEFAULT_TITLE"));
//time zones
$arResult["TIME_ZONE_ENABLED"] = CTimeZone::Enabled();
if($arResult["TIME_ZONE_ENABLED"])
$arResult["TIME_ZONE_LIST"] = CTimeZone::GetZones();
$arResult["SECURE_AUTH"] = false;
if(!CMain::IsHTTPS() && COption::GetOptionString('main', 'use_encrypted_auth', 'N') == 'Y')
{
$sec = new CRsaSecurity();
if(($arKeys = $sec->LoadKeys()))
{
$sec->SetKeys($arKeys);
$sec->AddToForm('regform', array('REGISTER[PASSWORD]', 'REGISTER[CONFIRM_PASSWORD]'));
$arResult["SECURE_AUTH"] = true;
}
}
// all done
$this->IncludeComponentTemplate();
示例4: array
<?
$tabControl->EndCustomField("LID", '<input type="hidden" name="LID" value="'.$str_LID.'">');
$params = array('id="bx_user_info_event"');
if(!$canSelfEdit || $str_EXTERNAL_AUTH_ID <> '')
{
$params[] = "disabled";
}
$tabControl->AddCheckBoxField("user_info_event", GetMessage('INFO_FOR_USER'), false, "Y", ($_REQUEST["user_info_event"]=="Y"), $params);
endif;
if(CTimeZone::Enabled())
{
$tabControl->AddSection("USER_TIME_ZONE", GetMessage("user_edit_time_zones"));
$tabControl->AddDropDownField("AUTO_TIME_ZONE", GetMessage("user_edit_time_zones_auto"), false, array(""=>GetMessage("user_edit_time_zones_auto_def"), "Y"=>GetMessage("user_edit_time_zones_auto_yes"), "N"=>GetMessage("user_edit_time_zones_auto_no")), $str_AUTO_TIME_ZONE, array('onchange="this.form.TIME_ZONE.disabled=(this.value != \'N\')"'));
$tabControl->AddDropDownField("TIME_ZONE", GetMessage("user_edit_time_zones_zones"), false, CTimeZone::GetZones(), $str_TIME_ZONE, ($str_AUTO_TIME_ZONE<>"N"? array('disabled') : array()));
}
?>
<?
if($showGroupTabs):
$tabControl->BeginNextFormTab();
$tabControl->BeginCustomField("GROUP_ID", GetMessage("user_edit_form_groups"));
?>
<tr>
<td colspan="2" align="center">
<table border="0" cellpadding="0" cellspacing="0" class="internal" style="width:80%;">
<tr class="heading">
<td colspan="2"><?echo GetMessage("TBL_GROUP")?></td>
<td><?php
echo GetMessage('TBL_GROUP_DATE');
?>