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


PHP FileSystem::GetSkinsList方法代码示例

本文整理汇总了PHP中FileSystem::GetSkinsList方法的典型用法代码示例。如果您正苦于以下问题:PHP FileSystem::GetSkinsList方法的具体用法?PHP FileSystem::GetSkinsList怎么用?PHP FileSystem::GetSkinsList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FileSystem的用法示例。


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

示例1: header

 if ($nAcct !== null && USE_DB) {
     $dbStorage =& DbStorageCreator::CreateDatabaseStorage($null);
     if ($dbStorage->Connect() && $dbStorage->IsAccountInRing($_SESSION[ACCOUNT_ID], $nAcct)) {
         $_SESSION[ACCOUNT_ID] = $nAcct;
     } else {
         header('Location: index.php?error=2');
         exit;
     }
 }
 $account =& Account::LoadFromDb($_SESSION[ACCOUNT_ID]);
 if (!$account) {
     header('Location: index.php?error=2');
     exit;
 }
 define('defaultTitle', $settings->WindowTitle);
 $skins =& FileSystem::GetSkinsList();
 $hasDefSettingsSkin = false;
 foreach ($skins as $skinName) {
     if ($skinName == $settings->DefaultSkin) {
         $hasDefSettingsSkin = true;
     }
     if ($skinName == $account->DefaultSkin) {
         define('defaultSkin', $account->DefaultSkin);
         break;
     }
 }
 if (!defined('defaultSkin')) {
     if ($hasDefSettingsSkin) {
         define('defaultSkin', $settings->DefaultSkin);
     } else {
         define('defaultSkin', $skins[0]);
开发者ID:JDevelopers,项目名称:Mail,代码行数:31,代码来源:webmail.php

示例2: GetSettingsList

 function GetSettingsList(&$_xmlRes, &$_account, $_settings, &$_dbStorage, &$mailProcessor)
 {
     $_mailBoxesSize = $_account->MailboxSize;
     $_accountSize = $_account->MailboxSize;
     if ($_account->ImapQuota) {
         if ($mailProcessor && $mailProcessor->MailStorage->Connect(true)) {
             $usedQuota = $mailProcessor->GetUsedQuota();
             if (false !== $usedQuota) {
                 $_mailBoxesSize = $usedQuota;
                 $_accountSize = $usedQuota;
             }
         }
     } else {
         if (USE_DB && $_dbStorage && $_dbStorage->Connect()) {
             $_mailBoxesSize = $_dbStorage->SelectMailboxesSize();
         }
     }
     $_settingsListNode = new XmlDomNode('settings_list');
     $_settingsListNode->AppendAttribute('show_text_labels', (int) $_settings->ShowTextLabels);
     $_settingsListNode->AppendAttribute('allow_change_settings', (int) $_account->AllowChangeSettings);
     $_settingsListNode->AppendAttribute('allow_dhtml_editor', (int) $_account->AllowDhtmlEditor);
     $_settingsListNode->AppendAttribute('allow_add_account', (int) $_settings->AllowUsersAddNewAccounts);
     $_settingsListNode->AppendAttribute('allow_account_def', (int) $_settings->AllowUsersChangeAccountsDef);
     $_settingsListNode->AppendAttribute('msgs_per_page', (int) $_account->MailsPerPage);
     $_settingsListNode->AppendAttribute('contacts_per_page', (int) $_account->ContactsPerPage);
     $_settingsListNode->AppendAttribute('auto_checkmail_interval', (int) $_account->AutoCheckMailInterval);
     $_settingsListNode->AppendAttribute('mailbox_limit', GetGoodBigInt($_account->MailboxLimit));
     $_settingsListNode->AppendAttribute('enable_mailbox_size_limit', (int) $_settings->EnableMailboxSizeLimit);
     $_settingsListNode->AppendAttribute('mailbox_size', GetGoodBigInt($_mailBoxesSize));
     $_settingsListNode->AppendAttribute('account_size', GetGoodBigInt($_accountSize));
     $_settingsListNode->AppendAttribute('hide_folders', (int) $_account->HideFolders);
     $_settingsListNode->AppendAttribute('horiz_resizer', (int) $_account->HorizResizer);
     $_settingsListNode->AppendAttribute('vert_resizer', (int) $_account->VertResizer);
     $_settingsListNode->AppendAttribute('mark', (int) $_account->Mark);
     $_settingsListNode->AppendAttribute('reply', (int) $_account->Reply);
     $_settingsListNode->AppendAttribute('view_mode', (int) $_account->ViewMode);
     $_settingsListNode->AppendAttribute('def_timezone', $_account->DefaultTimeZone);
     $_settingsListNode->AppendAttribute('allow_direct_mode', (int) $_account->AllowDirectMode);
     $_settingsListNode->AppendAttribute('direct_mode_is_default', (int) $_settings->DirectModeIsDefault);
     $_settingsListNode->AppendAttribute('allow_contacts', (int) $_settings->AllowContacts);
     $_settingsListNode->AppendAttribute('allow_calendar', (int) $_settings->AllowCalendar);
     $_settingsListNode->AppendAttribute('imap4_delete_like_pop3', (int) $_settings->Imap4DeleteLikePop3);
     $_settingsListNode->AppendAttribute('idle_session_timeout', (int) $_settings->IdleSessionTimeout);
     $_settingsListNode->AppendAttribute('allow_insert_image', (int) $_settings->AllowInsertImage);
     $_settingsListNode->AppendAttribute('allow_body_size', (int) $_settings->AllowBodySize);
     $_settingsListNode->AppendAttribute('max_body_size', (int) $_settings->MaxBodySize);
     $_settingsListNode->AppendAttribute('max_subject_size', (int) $_settings->MaxSubjectSize);
     $_settingsListNode->AppendAttribute('mobile_sync_enable_system', (int) ($_settings->EnableMobileSync && function_exists('mcrypt_encrypt')));
     $_skin = '';
     $_skins =& FileSystem::GetSkinsList();
     $_hasDefSettingsSkin = false;
     foreach ($_skins as $_skinName) {
         if ($_skinName == $_settings->DefaultSkin) {
             $_hasDefSettingsSkin = true;
         }
         if ($_skinName == $_account->DefaultSkin) {
             $_skin = $_account->DefaultSkin;
             break;
         }
     }
     if ($_skin === '') {
         $_skin = $_hasDefSettingsSkin ? $_settings->DefaultSkin : $_skins[0];
     }
     $_settingsListNode->AppendChild(new XmlDomNode('def_skin', $_skin, true));
     $_settingsListNode->AppendChild(new XmlDomNode('def_lang', $_account->DefaultLanguage, true));
     $_settingsListNode->AppendChild(new XmlDomNode('def_date_fmt', $_account->DefaultDateFormat, true));
     $_settingsListNode->AppendAttribute('time_format', $_account->DefaultTimeFormat);
     if (is_array($_account->Columns) && count($_account->Columns) > 0) {
         $_columnsNode = new XmlDomNode('columns');
         foreach ($_account->Columns as $_id_column => $_column_value) {
             $_columnNode = new XmlDomNode('column');
             $_columnNode->AppendAttribute('id', $_id_column);
             $_columnNode->AppendAttribute('value', $_column_value);
             $_columnsNode->AppendChild($_columnNode);
             unset($_columnNode);
         }
         $_settingsListNode->AppendChild($_columnsNode);
     }
     $_xmlRes->XmlRoot->AppendChild($_settingsListNode);
 }
开发者ID:JDevelopers,项目名称:Mail,代码行数:80,代码来源:class_xmlprocessing.php

示例3: 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);
 }
开发者ID:JDevelopers,项目名称:Mail,代码行数:44,代码来源:class_processorswitch.php

示例4: BaseProcessor

 /**
  * @return BaseProcessor
  */
 function BaseProcessor()
 {
     if (!Session::has(ACCOUNT_ID)) {
         $this->SetError(1);
     }
     $accountId = Session::val(ACCOUNT_ID);
     $this->sArray = Session::val(SARRAY, array());
     $this->settings =& Settings::CreateInstance();
     if (!$this->settings || !$this->settings->isLoad) {
         $this->SetError(3);
     }
     if ($accountId) {
         if (Get::has(CHANGE_ACCID)) {
             $oldaccount =& Account::LoadFromDb(Session::val(ACCOUNT_ID, -1));
             $accountId = Get::val(CHANGE_ACCID);
             if (!isset($_SESSION['attachtempdir'])) {
                 $_SESSION['attachtempdir'] = md5(session_id());
             }
             $fs =& new FileSystem(INI_DIR . '/temp', $oldaccount->Email, $oldaccount->Id);
             $attfolder =& new Folder($oldaccount->Id, -1, $_SESSION['attachtempdir']);
             $fs->DeleteDir($attfolder);
             unset($fs, $attfolder);
             $this->sArray[ACCOUNT_ID] = $accountId;
             $this->account =& Account::LoadFromDb($accountId);
             if (!$this->account || $this->account->IdUser != $oldaccount->IdUser) {
                 $this->account = null;
             } else {
                 $_SESSION[ACCOUNT_ID] = $accountId;
                 unset($_SESSION[SARRAY]);
                 $this->sArray = array();
             }
         } else {
             $this->sArray[ACCOUNT_ID] = $accountId;
             $this->account =& Account::LoadFromDb($accountId);
         }
         if (!$this->account) {
             $this->SetError(2);
         }
     } else {
         $this->SetError(1);
     }
     if (!isset($this->sArray[ACCOUNT_ID]) || $this->sArray[ACCOUNT_ID] != $accountId) {
         $this->sArray[EDIT_ACCOUNT_ID] = $accountId;
     }
     $this->processor =& new MailProcessor($this->account);
     if (!$this->processor->DbStorage || !$this->processor->DbStorage->Connect()) {
         $this->SetError(5);
     }
     $this->db =& $this->processor->DbStorage;
     $this->accounts =& $this->GetAccounts();
     $skins =& FileSystem::GetSkinsList();
     $hasDefSettingsSkin = false;
     $normalSkin = false;
     foreach ($skins as $skinName) {
         if ($skinName == $this->settings->DefaultSkin) {
             $hasDefSettingsSkin = true;
         }
         if ($skinName == $this->account->DefaultSkin) {
             $normalSkin = true;
             break;
         }
     }
     if (!$normalSkin) {
         $this->account->DefaultSkin = $hasDefSettingsSkin ? $this->settings->DefaultSkin : ($this->account->DefaultSkin = $skins[0]);
     }
     $_SESSION[ATTACH_DIR] = Session::val(ATTACH_DIR, md5(session_id()));
     if (isset($this->sArray[SCREEN])) {
         $screen = Get::val(SCREEN, $this->sArray[SCREEN]);
         $this->sArray[SCREEN] = $screen;
         if ($this->account->AllowChangeSettings == false && ($screen == SET_ACCOUNT_PROF || $screen == SET_ACCOUNT_ADDACC)) {
             $this->sArray[SCREEN] = SCREEN_MAILBOX;
         }
         if (!$this->settings->AllowContacts && $screen == SCREEN_CONTACTS) {
             $this->sArray[SCREEN] = SCREEN_MAILBOX;
         }
     } else {
         $this->sArray[SCREEN] = Get::val(SCREEN, SCREEN_MAILBOX);
     }
     if (isset($this->sArray[FOLDER_ID])) {
         $this->sArray[FOLDER_ID] = Get::val(FOLDER_ID, $this->sArray[FOLDER_ID]);
     } else {
         $this->sArray[FOLDER_ID] = Get::val(FOLDER_ID, -1);
     }
     if (Get::has(FOLDER_ID) || Get::has(SCREEN)) {
         if (isset($this->sArray[SEARCH_ARRAY])) {
             unset($this->sArray[SEARCH_ARRAY]);
         }
     }
     if (Session::has(GOTOFOLDER)) {
         $this->sArray[GOTOFOLDER] = Session::val(GOTOFOLDER, '');
         unset($_SESSION[GOTOFOLDER]);
     }
     if (isset($this->sArray[PAGE])) {
         $this->sArray[PAGE] = Get::val(PAGE, $this->sArray[PAGE]);
     } else {
         $this->sArray[PAGE] = 1;
     }
//.........这里部分代码省略.........
开发者ID:diedsmiling,项目名称:busenika,代码行数:101,代码来源:processor.php

示例5: 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"';
//.........这里部分代码省略.........
开发者ID:diedsmiling,项目名称:busenika,代码行数:101,代码来源:class_settingspanel.php


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