function DoUpdateAutoresponder() { $_dbStorage = $_settings = $_xmlObj = $_xmlRes = $_accountId = null; $this->_initFuncArgs($_dbStorage, $_settings, $_xmlObj, $_xmlRes, $_accountId); $_idAcct = $_xmlObj->GetParamValueByName('id_acct'); $_autoresponderNode = $_xmlObj->XmlRoot->GetChildNodeByTagName('autoresponder'); $_isEnable = (bool) $_autoresponderNode->GetAttribute('enable', 0); $_subject = $_autoresponderNode->GetChildValueByTagName('subject'); $_message = $_autoresponderNode->GetChildValueByTagName('message'); CXmlProcessing::CheckAccountAccess($_idAcct, $_xmlRes); $_editAccount =& CXmlProcessing::AccountCheckAndLoad($_xmlRes, $_idAcct); if (!$_editAccount->AllowChangeSettings) { CXmlProcessing::PrintErrorAndExit(PROC_CANT_UPDATE_ACCT, $_xmlRes); } $_editProcessor = new MailProcessor($_editAccount); if ($_isEnable) { $_editProcessor->SetAutoresponder($_subject, $_message); } else { $_editProcessor->DisableAutoresponder(); } $_updateNode = new XmlDomNode('update'); $_updateNode->AppendAttribute('value', 'autoresponder'); $_xmlRes->XmlRoot->AppendChild($_updateNode); }