public function btnTmx_Click($strFormId, $strControlId, $intLanguageId) { set_time_limit(0); $objLanguage = NarroLanguage::Load($intLanguageId); if (!$objLanguage) { return false; } header("Pragma: public"); // required header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private", false); // required for certain browsers header("Content-Type: text/xml"); header("Content-Disposition: attachment; filename=\"" . sprintf('%s %s.tmx', preg_replace('/^[a-z]/i', '_', __HTTP_URL__ . __VIRTUAL_DIRECTORY__ . __SUBDIRECTORY__), $objLanguage->LanguageName) . "\";"); ob_clean(); $strXml = NarroLanguage::GetTmx(QQ::Equal(QQN::NarroText()->NarroSuggestionAsText->LanguageId, $intLanguageId)); header("Content-Length: " . strlen($strXml)); echo $strXml; exit; }