<?php
/**
 * @package linea21.externals
 * @subpackage Class Installer
 * @author Vadim V. Gabriel <vadimg88@gmail.com> http://www.vadimg.co.il/ - modified by Simon Georget <simon@linea21.com>
 * @link http://absynthe.is.free.fr/aFiles/
 * @version 1.0.0a
 * @license GNU Lesser General Public License
 */
session_start();
$installation_process = true; // necessary for test in /config/define.php
include_once("../config/define.php");
include_once('../lib/input_helpers.php');

include_once('../class/class.culture.php');
culture::getInstance();

# Define root path
define('ROOT_PATH', dirname(__FILE__));

define('INSTALLER_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR . 'installer');

# Define templates path
if(!defined('TMPL_PATH'))
{
  define('TMPL_PATH', INSTALLER_PATH . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR);
}

# Define base url
define('BASE_URL', 'http://'. $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']);

# Default step
$_POST['step'] = isset($_POST['step']) ? $_POST['step'] : 'index';
require_once(INSTALLER_PATH . '/Installer.php');
$installer = new Installer();
$installer->display();

# Done!