$logFilePath = $_SESSION[$pageObject->sessionPrefix . "_tempImportLogFilePath"]; if (!myfile_exists($logFilePath)) { $data = array("success" => false); echo printJSON($data); exit; } header("Content-Type: text/plain"); header("Content-Disposition: attachment;Filename=importLog.txt"); header("Cache-Control: private"); printfile($logFilePath); exit; } if ($action == "downloadUnprocessed") { $dataFilePath = $_SESSION[$pageObject->sessionPrefix . "_tempDataFilePath"]; if (!myfile_exists($dataFilePath)) { $data = array("success" => false); echo printJSON($data); exit; } header("Content-Type: application/csv"); header("Content-Disposition: attachment;Filename=unpocessedData.csv"); printfile($dataFilePath); exit; } // add button events if exist $pageObject->addButtonHandlers(); $pageObject->addCommonJs(); $pageObject->addCommonHtml(); $hiddenBricks = array("import_rawtext_control", "import_preview", "import_process", "import_results", "error_message"); $xt->displayBricksHidden($hiddenBricks); $pageObject->display($pageObject->templatefile);