本文整理汇总了PHP中FileSystem::GetLangList方法的典型用法代码示例。如果您正苦于以下问题:PHP FileSystem::GetLangList方法的具体用法?PHP FileSystem::GetLangList怎么用?PHP FileSystem::GetLangList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileSystem
的用法示例。
在下文中一共展示了FileSystem::GetLangList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DoGetSettings
function DoGetSettings()
{
$_dbStorage = $_settings = $_xmlObj = $_xmlRes = $_accountId = null;
$this->_initFuncArgs($_dbStorage, $_settings, $_xmlObj, $_xmlRes, $_accountId);
$_account =& CXmlProcessing::AccountCheckAndLoad($_xmlRes, $_accountId, false, false);
$_settingsNode = new XmlDomNode('settings');
$_settingsNode->AppendAttribute('msgs_per_page', (int) $_account->MailsPerPage);
$_settingsNode->AppendAttribute('contacts_per_page', (int) $_account->ContactsPerPage);
$_settingsNode->AppendAttribute('allow_dhtml_editor', (int) $_account->AllowDhtmlEditor);
$_settingsNode->AppendAttribute('auto_checkmail_interval', (int) $_account->AutoCheckMailInterval);
if ($_settings->AllowUsersChangeCharset) {
$_settingsNode->AppendAttribute('def_charset_inc', ConvertUtils::GetCodePageNumber($_account->DefaultIncCharset));
$_settingsNode->AppendAttribute('def_charset_out', ConvertUtils::GetCodePageNumber($_account->DefaultOutCharset));
}
if ($_settings->AllowUsersChangeTimeZone) {
$_settingsNode->AppendAttribute('def_timezone', (int) $_account->DefaultTimeZone);
}
$_settingsNode->AppendAttribute('view_mode', (int) $_account->ViewMode);
if ($_settings->AllowUsersChangeSkin) {
$_skinsNode = new XmlDomNode('skins');
$_skinsList =& FileSystem::GetSkinsList();
foreach ($_skinsList as $_skin) {
$_skinNode = new XmlDomNode('skin', $_skin, true);
$_skinNode->AppendAttribute('def', (int) (strtolower($_account->DefaultSkin) == strtolower($_skin)));
$_skinsNode->AppendChild($_skinNode);
unset($_skinNode);
}
$_settingsNode->AppendChild($_skinsNode);
}
if ($_settings->AllowUsersChangeLanguage) {
$_langsNode = new XmlDomNode('langs');
$_langList =& FileSystem::GetLangList();
foreach ($_langList as $_lang) {
$_langNode = new XmlDomNode('lang', $_lang, true);
$_langNode->AppendAttribute('def', (int) (strtolower($_account->DefaultLanguage) == strtolower($_lang)));
$_langsNode->AppendChild($_langNode);
unset($_langNode);
}
$_settingsNode->AppendChild($_langsNode);
}
$_settingsNode->AppendChild(new XmlDomNode('def_date_fmt', $_account->DefaultDateFormat));
$_settingsNode->AppendAttribute('time_format', $_account->DefaultTimeFormat);
$_xmlRes->XmlRoot->AppendChild($_settingsNode);
}
示例2: XmlDomNode
$settingsNode->AppendAttribute('def_timezone', (int) $account->DefaultTimeZone);
}
$settingsNode->AppendAttribute('view_mode', (int) $account->ViewMode);
if ($settings->AllowUsersChangeSkin) {
$skinsNode =& new XmlDomNode('skins');
$skinsList =& FileSystem::GetSkinsList();
foreach ($skinsList as $skin) {
$skinNode =& new XmlDomNode('skin', $skin, true);
$skinNode->AppendAttribute('def', (int) (strtolower($account->DefaultSkin) == strtolower($skin)));
$skinsNode->AppendChild($skinNode);
}
$settingsNode->AppendChild($skinsNode);
}
if ($settings->AllowUsersChangeLanguage) {
$langsNode =& new XmlDomNode('langs');
$langList =& FileSystem::GetLangList();
foreach ($langList as $lang) {
$langNode =& new XmlDomNode('lang', $lang, true);
$langNode->AppendAttribute('def', (int) (strtolower($account->DefaultLanguage) == strtolower($lang)));
$langsNode->AppendChild($langNode);
}
$settingsNode->AppendChild($langsNode);
}
$settingsNode->AppendChild(new XmlDomNode('def_date_fmt', $account->DefaultDateFormat));
$settingsNode->AppendAttribute('time_format', $account->DefaultTimeFormat);
$xmlRes->XmlRoot->AppendChild($settingsNode);
} else {
printErrorAndExit(PROC_CANT_GET_SETTINGS, $xmlRes);
}
break;
case 'contacts_settings':
示例3: SettingsCommon
/**
* @param PageBuilder $pagebuilder
* @return SettingsCommon
*/
function SettingsCommon(&$pagebuilder)
{
$this->data = array();
$this->_pagebuilder =& $pagebuilder;
$this->_proc =& $pagebuilder->_proc;
$this->_pagebuilder->_js->AddText('
function SetAdvanced()
{
var select = document.getElementById("str_date_format");
if (select) select.value = "advanced";
}
function ChangeAdvanced(objSelect)
{
var advInput = document.getElementById("strInputDateFormat");
if (advInput && objSelect && objSelect.value != "advanced")
{
advInput.value = objSelect.value;
}
}
');
$this->data['mails_per_page'] = $this->_proc->account->MailsPerPage;
$this->data['int_disable_dhtml_editor'] = $this->_proc->account->AllowDhtmlEditor ? '' : 'checked="checked"';
$this->data['int_use_preview_pane'] = $this->_proc->account->ViewMode == VIEW_MODE_PREVIEW_PANE || $this->_proc->account->ViewMode == VIEW_MODE_PREVIEW_PANE_NO_IMG ? 'checked="checked"' : '';
$this->data['int_showimg'] = $this->_proc->account->ViewMode == VIEW_MODE_PREVIEW_PANE || $this->_proc->account->ViewMode == VIEW_MODE_WITHOUT_PREVIEW_PANE ? 'checked="checked"' : '';
$this->data['skin_select'] = '';
if ($this->_proc->settings->AllowUsersChangeSkin) {
$this->data['skin_select'] = '<tr>
<td class="wm_settings_title">' . JS_LANG_Skin . ':</td>
<td colspan="2">
<select name="str_skin_path" id="skin_path">';
$skinsList =& FileSystem::GetSkinsList();
for ($i = 0, $c = count($skinsList); $i < $c; $i++) {
$temp = $this->_proc->account->DefaultSkin == $skinsList[$i] ? 'selected="selected"' : '';
$this->data['skin_select'] .= '<option value="' . ConvertUtils::AttributeQuote($skinsList[$i]) . '" ' . $temp . '> ' . $skinsList[$i] . '</option>' . "\n";
}
$this->data['skin_select'] .= '</select></td></tr>';
}
$this->data['CharsetSelect'] = '';
if ($this->_proc->settings->AllowUsersChangeCharset) {
$this->data['CharsetSelect'] = '<tr>
<td class="wm_settings_title">' . JS_LANG_DefCharsetOut . ':</td>
<td colspan="2">
<select name="str_charset" id="strCharset">';
global $CHARSETS;
for ($i = 0, $c = count($CHARSETS); $i < $c; $i++) {
$temp = $this->_proc->account->DefaultOutCharset == $CHARSETS[$i][0] ? 'selected="selected"' : '';
$this->data['CharsetSelect'] .= '<option value="' . ConvertUtils::AttributeQuote($CHARSETS[$i][0]) . '" ' . $temp . '> ' . $CHARSETS[$i][1] . '</option>' . "\n";
}
$this->data['CharsetSelect'] .= '</select></td></tr>';
}
$this->data['TimeZoneSelect'] = '';
if ($this->_proc->settings->AllowUsersChangeTimeZone) {
$this->data['TimeZoneSelect'] = '<tr>
<td class="wm_settings_title">' . JS_LANG_DefTimeOffset . ':</td>
<td colspan="2">
<select name="str_time_zone" id="strTimeZone">';
global $TIMEZONE;
for ($i = 0, $c = count($TIMEZONE); $i < $c; $i++) {
$temp = $this->_proc->account->DefaultTimeZone == $i ? 'selected="selected"' : '';
$this->data['TimeZoneSelect'] .= '<option value="' . $i . '" ' . $temp . '> ' . $TIMEZONE[$i] . '</option>' . "\n";
}
$this->data['TimeZoneSelect'] .= '</select></td></tr>';
}
$this->data['LangSelect'] = '';
if ($this->_proc->settings->AllowUsersChangeLanguage) {
$this->data['LangSelect'] = '<tr>
<td class="wm_settings_title">' . JS_LANG_DefLanguage . ':</td>
<td colspan="2">
<select name="str_def_language" id="strDefLanguage">';
$langList =& FileSystem::GetLangList();
for ($i = 0, $c = count($langList); $i < $c; $i++) {
$temp = $this->_proc->account->DefaultLanguage == $langList[$i] ? 'selected="selected"' : '';
$this->data['LangSelect'] .= '<option value="' . ConvertUtils::AttributeQuote($langList[$i]) . '" ' . $temp . '> ' . $langList[$i] . '</option>' . "\n";
}
$this->data['LangSelect'] .= '</select>
</td>
</tr>';
}
$time = time();
$day = (int) date('d', $time);
$month = (int) date('m', $time);
if ($day == $month) {
$time = $time + (21 - $day) * 3600 * 24;
}
$data_format = $this->_proc->account->DefaultDateFormat;
$time_format = $this->_proc->account->DefaultTimeFormat;
$this->data['data_format'] = array('', '', '', '', '');
$this->data['data_value'] = array(date('d/m/y', $time), date('m/d/y', $time), date('d M', $time));
$this->data['time_format'] = array('', '');
$this->data['time_format'][$time_format] = 'checked="checked"';
switch (strtolower($data_format)) {
default:
case 'default':
$this->data['data_format'][0] = 'selected="selected"';
//.........这里部分代码省略.........