<?php
include_once("source/class/class.PRINT.php");
include_once("source/class/class.SYSTEM.php");
include_once("source/class/class.FILE.php");
include_once("source/class/class.ZIP.php");
session_start();
include_once("source/var/configuration.php");
include_once("source/class/class.INCLUDE.php");
include_once("source/class/class.MENU.php");
include_once("source/class/class.API.php");
include_once("source/class/class.COLOR.php");

include_once("language/".$GLOBALS['_language'].".php");

$inc_system=new include_steps();
//---------------------------------------------------
//Inicializar Clases
//---------------------------------------------------
if($_GET['new']==1){
	session_destroy();
	echo "<script>location.href='index.php'</script>";
}
if(!isset($_SESSION['system'])){
	$sistema=new SYSTEM();
	$_SESSION['system']=$sistema;	
}else{
	$_SESSION['system']->buffer();
}
$menu=new menu($GLOBALS['_arrayMenus']);
if(($_GET['step']=='less')&&($_SESSION['npaso']>1)){
		$_SESSION['npaso']=$_SESSION['npaso']-2;
		$n=$_SESSION['npaso'];
		$_SESSION['paso']=$arrayStep[$n];	
}

if(!isset($_SESSION['npaso'])){

	$_SESSION['npaso']=1;
}else{
	if($_SESSION['npaso']<count($GLOBALS['arrayStep'])){
		$_SESSION['paso']=$arrayStep[$_SESSION['npaso']++];
	}
}
if(!isset($_SESSION['imp'])){
	$imp=new imprimir($GLOBALS['_url_template_web'],$GLOBALS['_template_web']);
	$_SESSION['imp']=$imp;
}

if(!isset($_SESSION['classfile'])){
	$class=new FILE();
	$_SESSION['classfile']=$class;
}

if(!isset($_SESSION['classzip'])){
	$class=new zip();
	$_SESSION['classzip']=$class;
}

//---------------------------------------------------
//Menu
//---------------------------------------------------
if($_SESSION['npaso']==1){
	echo showstruct();
}
$menu->imprimir();
//---------------------------------------------------
?>