<?php

/*  Alternate WebKit
(C) 2011-2014 by Alternate Tools
-----------------------------------------------------

File:         site_splashpage.php
Description:  Splashpage site

*/

    include "modules/mod_site.php";
    include "modules/class_textfile.php";

    // Do not show splash page, if turned off (even direct link name)
    if ($SITE_SHOWSPLASHPAGE == false)
    {
        header ("location: " . $SITE_MAIN_SITE);
        return;
    }
    if ($SITE_SHOWCONSTRUCTION == true)
    {
        header ("location: " . $SITE_CONSTRUCTION_SITE);
        return;
    }

    $cFile = new cTextFile;
    
    $contPage = build_page($SITE_THEME, false, false);
    $contPage = fill_titles($contPage, $SITE_TITLE . ' - ' . get_translation('admin_splashpage'), get_translation('admin_splashpage'));

    $contContent = "";
    if (file_exists(retrieve_absolute_path($SITE_IMAGESPLASHPAGE)) == true)
        $contContent .= echo_sr('<img class="splashpage_image" src="' . retrieve_absolute_path($SITE_IMAGESPLASHPAGE) . '" alt=""><br>');
    $contContent .= echo_sr($cFile->LoadFromFile($SPLASHPAGETITLE_CONFIG_FILE));
    $contContent .= echo_sr('<br><br>');
    if ($SITE_SHOWSURVEY == true)  // Show survey before main page?
        $contContent .= echo_sr('<a href="' . $SITE_SURVEY_SITE . '">' . get_translation('admin_continuewithmainpage') . '</a><br><br>');
    else
        $contContent .= echo_sr('<a href="' . $SITE_MAIN_SITE . '">' . get_translation('admin_continuewithmainpage') . '</a><br><br>');
    $contContent = $contContent . build_site_counter();

    $contPage = fill_content($contPage, $contContent);

    echo_r($contPage);

?>