<?php 
$siteTitle = ConfigCMS::SITE_TITLE;
if(!$this->user)
	$siteTitle .= " - Login";
	
?>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="valiano">

        <title><?php echo $siteTitle ?> </title>

        <link href="<?php echo ConfigCMS::$urlTemplate ?>css/style.css" rel="stylesheet">
		
		<?php HelperAdmin::printStyles()?>
		<?php HelperAdmin::printScripts()?>
		
    </head>

    <body <?php
    if (!$this->user)
        echo 'class="login-body"';
    else
        echo 'class="full-width"';
    ?>>

        <?php
        
        	if($this->user)
            	require_once HelperAdmin::getPathView("menu");
            
        	$sectionID = "main-content";
        	$sectionClass = "wrapper";
        	
        	if(!$this->user){
        		$sectionID = "";
        		$sectionClass = "";
        	}
        	
            ?>
            
            <script type="text/javascript">
				var g_urlFront = "<?php echo ConfigCMS::$pathFront ?>";
				var g_pathFront = "<?php echo ConfigCMS::$pathFront ?>";
            </script>
            
            <section id="<?php echo $sectionID?>">
                <section class="<?php echo $sectionClass?>">
                    	<div style="min-height:300px;">
	                        <?php
	                        	
	                        	$pathView = HelperAdmin::getPathView($this->view, null, false);
								if(file_exists($pathView))
									require $pathView;
								else{
									$pathCustomView = HelperAdmin::getPathView("custom");
									require $pathCustomView;
								}
									
	                        ?>
                    	</div>
                </section>
            </section>
		
		<?php HelperAdmin::printStyles()?>
		<?php HelperAdmin::printScripts()?>
    </body>
</html>