/** * @param Account $account * @return string */ function InsertSettings(&$account) { $sql = ' INSERT INTO %sawm_settings (id_user, msgs_per_page, white_listing, x_spam, last_login, logins_count, def_skin, def_lang, def_charset_inc, def_charset_out, def_timezone, def_date_fmt, hide_folders, mailbox_limit, allow_change_settings, allow_dhtml_editor, allow_direct_mode, hide_contacts, db_charset, horiz_resizer, vert_resizer, mark, reply, contacts_per_page, view_mode) VALUES(%d, %d, %d, %d, %s, %d, %s, %s, %d, %d, %d, %s, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d)'; $date = new CDateTime(time()); return sprintf($sql, $this->_prefix, $account->IdUser, $account->MailsPerPage, $account->WhiteListing, $account->XSpam, $this->UpdateDateFormat($date->ToANSI()), $account->LoginsCount, $this->_escapeString($account->DefaultSkin), $this->_escapeString($account->DefaultLanguage), ap_Utils::GetCodePageNumber($account->DefaultIncCharset), ap_Utils::GetCodePageNumber($account->DefaultOutCharset), $account->DefaultTimeZone, $this->_escapeString($account->DefaultDateFormat), $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, $account->ViewMode); }
/** * @param long $idAddress * @return string */ function DeleteAddressBookRecord($idAddress) { $sql = 'UPDATE %sawm_addr_book SET deleted = 1, date_modified = %s WHERE id_addr = %d'; $date = new CDateTime(time()); $date->SetTimeStampToUtc(); $now = $this->UpdateDateFormat($date->ToANSI()); return sprintf($sql, $this->_settings->DbPrefix, $now, $idAddress); }