<?php

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

File:         site_construction.php
Description:  Contstruction site

*/

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

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

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

    $contContent = "";
    if (file_exists(retrieve_absolute_path($SITE_IMAGECONSTRUCTION)) == true)
        $contContent .= echo_sr('<img class="construction_image" src="' . retrieve_absolute_path($SITE_IMAGECONSTRUCTION) . '" alt=""><br>');
    $contContent .= echo_sr($cFile->LoadFromFile($CONSTRUCTIONTITLE_CONFIG_FILE));
    $contContent .= echo_sr('<br><br>');
    $contContent = $contContent . build_site_counter();

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

    echo_r($contPage);
?>