if (substr($_SERVER['PHP_SELF'], -12) == 'download.php') {
            $pagePrefix = 'd:';
            $page = GetPostOrGet('file_id');
        } else {
            $pagePrefix = '';
        }
    }
}
// Set the pageinformation of the user
$user->SetPage($pagePrefix . $page);
// Get a list of all installed languages
$installedLanguages = array();
$languageFolder = dir(__ROOT__ . "/lang/");
while ($file = $languageFolder->read()) {
    // check if the found file is really a language file
    if ($file != "." && $file != ".." && strpos($file, 'lang_') === 0 && substr($file, -4) == '.php') {
        // extract the pure language name
        $file = str_replace('lang_', '', $file);
        $file = str_replace('.php', '', $file);
        // Check wether the language is the actual one of the user
        if ($translation->OutputLanguage == $file) {
            $selected = true;
        } else {
            $selected = false;
        }
        // Add the found language to the lokal array
        $installedLanguages[] = array('LANGUAGE_NAME' => $file, 'LANGUAGE_TRANSLATION' => $translation->GetTranslation($file), 'LANGUAGE_SELECTED' => $selected);
    }
}
$output->SetReplacement('LANGUAGES_LIST', $installedLanguages);
$output->SetReplacement('PHP_SELF', $_SERVER['PHP_SELF']);
        $menuArray[] = array($translation->GetTranslation('create_administrator'), $extern_page == 6 ? '6' : '7');
        break;
    case 9:
        $pagename = $translation->GetTranslation('preferences');
        $menuArray[] = array($translation->GetTranslation('language'), '1');
        $menuArray[] = array($translation->GetTranslation('sitestyle'), '2');
        $menuArray[] = array($translation->GetTranslation('requirements'), '3');
        $menuArray[] = array($translation->GetTranslation('license'), '4');
        $menuArray[] = array($translation->GetTranslation('database_settings'), '5');
        $menuArray[] = array($translation->GetTranslation('create_administrator'), $extern_page == 6 ? '6' : '7');
        $menuArray[] = array($translation->GetTranslation('preferences'), $extern_page == 8 ? '8' : '9');
        break;
    default:
        $pagename = '';
        break;
}
$output->SetReplacement('PATH', "<a href=\"install.php\">" . $translation->GetTranslation('installation') . "</a> -> <a href=\"install.php?page={$extern_page}\">{$pagename}</a>");
// Generate menu and replace it in template
$menu = array();
foreach ($menuArray as $part) {
    if ($extern_page == $part[1]) {
        $linkStyle = ' class="actual"';
    } else {
        $linkStyle = '';
    }
    $menu[] = array('LINK_TEXT' => $part[0], 'LINK' => 'install.php?page=' . $part[1] . '&amp;style=' . $extern_style, 'CSS_ID' => '', 'LINK_STYLE' => $linkStyle);
}
$output->SetReplacement('MENU_DEFAULT', $menu);
$output->SetReplacement('TEXT', $installation->GetPage($extern_page, $language));
$output->GenerateOutput();
echo $output->GeneratedOutput;