<?php
session_start();
include("core/config.php");

?>

<html>
<head>
    <title><?=$config['appName']?> <?=$config['version']?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    
	<link rel="stylesheet" type="text/css" href="./lib/ext/resources/css/ext-all.css" />
   	<link rel="icon" href="./core/images/favicon.png" type="image/x-icon" />
   	
	<script type="text/javascript" src="./lib/jquery/jquery-min.js"></script>	
	<script type="text/javascript" src="./lib/ext/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="./lib/ext/ext-all.js"></script>

    <?php
	if(!$_SESSION['logined']||$_GET['logout']){
		$_SESSION['logined']=false;
		?>
	<script type="text/javascript" src="./core/js/Login.js"></script>
		<?
	} else {
		?>

	<script type="text/javascript" src="./lib/ext/build/locale/ext-lang-ru-min.js"></script>
	
	<script type="text/javascript" src="./core/js/App.js"></script>	
	<script type="text/javascript" src="./core/js/MainTree.js"></script>	
		
	<script language="javascript">
		var UserName='<?=$_SESSION['UserName']?>';
		var User_Name='<?=$_SESSION['User_Name']?>';
		var UserId='<?=$_SESSION['id']?>';
		var Version='<?=$config['version']?>';
	</script>
	<link rel="stylesheet" type="text/css" href="./core/css/file-upload.css" />
	<link rel="stylesheet" type="text/css" href="./core/css/styles.css" />
		<?
	include("mod_wrapper.php");	    
	}	
	?>
</head>
<body>

</body>
</html>