static function GetTranslationData($translation = "") { global $LZLANG; if (OperatorRequest::IsValidated() && Is::Defined("VALIDATED_FULL_LOGIN") && OperatorRequest::IsAdministrator(true)) { Logging::SecurityLog("ServerManager::GetTranslationData", serialize($_POST), CALLER_SYSTEM_ID); $langid = $_POST["p_int_trans_iso"]; if (strpos($langid, "..") === false && strlen($langid) <= 6) { $mobile = !empty($_POST["p_int_trans_m"]); $mobileOriginal = !empty($_POST["p_int_trans_mo"]); $path = !$mobileOriginal ? "_language/" : "mobile/php/translation/"; IOStruct::RequireDynamic(LocalizationManager::GetLocalizationFileString($langid, true, $mobile, $mobileOriginal), LIVEZILLA_PATH . $path); $translation .= "<language key=\"" . base64_encode($langid) . "\">\r\n"; foreach ($LZLANG as $key => $value) { $translation .= "<val key=\"" . base64_encode($key) . "\">" . base64_encode($value) . "</val>\r\n"; } $translation .= "</language>\r\n"; Server::$Response->SetStandardResponse(1, $translation); } else { Server::$Response->SetStandardResponse(0, $translation); } } }
static function SendEmail($_account, $_receiver, $_replyto, $_bodyText, $_bodyHTML, $_subject = "", $_test = false, $_attachments = null, $_fakeSender = "") { if ($_account == null) { $_account = Mailbox::GetDefaultOutgoing(); } if ($_account == null) { return null; } $_bodyText = correctLineBreaks($_bodyText); require_once LIVEZILLA_PATH . "_lib/objects.mail.inc.php"; Logging::SecurityLog("Communication::SendMail", $_bodyText); $mailer = new MailSystem($_account, $_receiver, $_replyto, trim($_bodyText), trim($_bodyHTML), $_subject, $_test, $_attachments); $mailer->SendEmail($_fakeSender); return $mailer->Result; }
function SetPasswordChangeNeeded() { if (OperatorRequest::IsValidated() && Is::Defined("VALIDATED_FULL_LOGIN")) { Logging::SecurityLog("Operator->SetPasswordChangeNeeded", "", Is::Defined("CALLER_SYSTEM_ID")); $this->PasswordChangeRequest = true; DBManager::Execute(true, "UPDATE `" . DB_PREFIX . DATABASE_OPERATORS . "` SET `password_change_request`=1 WHERE `system_id`='" . DBManager::RealEscape($this->SystemId) . "' LIMIT 1;"); } }