コード例 #1
0
ファイル: commandcreator.php プロジェクト: JDevelopers/Mail
    /**
     * @param Account $account
     * @return string
     */
    function UpdateSettings(&$account)
    {
        $sql = '
UPDATE %sawm_settings SET
	msgs_per_page = %d, white_listing = %d, x_spam = %d,
	def_skin = %s, def_lang = %s, def_charset_inc = %d,
	def_charset_out = %d, def_timezone = %d, def_date_fmt = %s,
	hide_folders = %d, mailbox_limit = %d, allow_change_settings = %d,
	allow_dhtml_editor = %d, allow_direct_mode = %d, hide_contacts = %d,
	db_charset = %d, horiz_resizer = %d, vert_resizer = %d, mark = %d,
	reply = %d, contacts_per_page = %d, view_mode = %d
WHERE id_user = %d';
        return sprintf($sql, $this->_prefix, $account->MailsPerPage > 0 ? $account->MailsPerPage : 20, $account->WhiteListing, $account->XSpam, $this->_escapeString($account->DefaultSkin), $this->_escapeString($account->DefaultLanguage), ap_Utils::GetCodePageNumber($account->DefaultIncCharset), ap_Utils::GetCodePageNumber($account->DefaultOutCharset), $account->DefaultTimeZone, $this->_escapeString(CDateTime::GetDbDateFormat($account->DefaultDateFormat, $account->DefaultTimeFormat)), $account->HideFolders, $account->MailboxLimit, $account->AllowChangeSettings, $account->AllowDhtmlEditor, $account->AllowDirectMode, $account->HideContacts, ap_Utils::GetCodePageNumber($account->DbCharset), $account->HorizResizer, $account->VertResizer, $account->Mark, $account->Reply, $account->ContactsPerPage > 0 ? $account->ContactsPerPage : 20, $account->ViewMode, $account->IdUser);
    }