X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=install.php;h=948cbd9af6e328dc84e59150d7671c93ac154a6a;hp=9e28d9c2aab4ddc765940dada10044a2e5f79460;hb=48affba7561e342c1f5691793dd96edadf4085d4;hpb=2ec9007220186d54f84846871ed1f7638c29baf7 diff --git a/install.php b/install.php index 9e28d9c2aa..948cbd9af6 100644 --- a/install.php +++ b/install.php @@ -1,34 +1,18 @@ 0) { - // Output fatal messages - loadInclude('inc/fatal_errors.php'); + addFatalMessage(__FILE__, __LINE__, '{--MAILER_ALREADY_INSTALLED--}'); } // END - if // Load header here -loadIncludeOnce('inc/header.php'); +loadPageHeader(); + +// Handle fatal errors +runFilterChain('handle_fatal_errors'); + +// Is plain or AJAX-enabled installation used? +if (isGetRequestElementSet('installer')) { + // Set installer type + setSession('installer', getRequestElement('installer')); + + // Redirect to install.php again + redirectToUrl('install.php'); +} elseif (isAjaxInstaller()) { + // AJAX-enabled installer: + // Load 'init' page + addTemplateToInstallContent('install_page_init'); -// Add main installation table -LOAD_TEMPLATE('install_header'); + // Prepare content + $content = array( + 'install_page' => getRequestElement('install_page') + ); -// Here start's our installtion stuff -loadIncludeOnce('inc/install-inc.php'); + // Load main installation table + loadTemplate('install_main_ajax', FALSE, $content); +} elseif (isPlainInstaller()) { + // Plain installer: + // Load include file + loadIncludeOnce('inc/install-inc.php'); -// Close main installation table -LOAD_TEMPLATE('install_footer'); + // Load main template + loadTemplate('install_main_plain'); +} else { + // What do you want, red or blue pill? AJAX or plain installer? ;-) + loadTemplate('install_selector'); +} // Footer -loadIncludeOnce('inc/footer.php'); +loadPageFooter(); -// +// [EOF] ?>