X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=install.php;h=fb26cff9eb067c8f1472d91e43011ba898c20b3f;hp=75638936e493b07f504ba0211c230a9ee6957e33;hb=08a9a052ddd67568fa7bcc98c4300ce0cc6bfdc0;hpb=4ccc02299e123d24c043c917fb16208d0338f300 diff --git a/install.php b/install.php index 75638936e4..fb26cff9eb 100644 --- a/install.php +++ b/install.php @@ -1,34 +1,23 @@ 0) { - // Output fatal messages - loadInclude('inc/fatal_errors.php'); + addFatalMessage(__FILE__, __LINE__, '{--ALREADY_INSTALLED--}'); } // END - if // Load header here loadIncludeOnce('inc/header.php'); -// Add main installation table -LOAD_TEMPLATE('install_header'); +// Handle fatal errors +runFilterChain('handle_fatal_errors'); + +// Do we have plain or AJAX-enabled installation? +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'); + + // 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'); -// +// [EOF] ?>