<?php
include($_SERVER['DOCUMENT_ROOT'] .'/script/HeaderInc.php');
if ((true === isset($_SESSION['SessionAuth']['SvtAdmin']['reg']) && 1 == $_SESSION['SessionAuth']['SvtAdmin']['reg'])){
  $smarty->assign('VarMenuMain', $VarMenu);
  $VarPagesTxt .= $smarty->fetch('ReIndex/Form.tpl');
}
else{
  $smarty->assign('VarError', $MS_SP->Sp_LangMessage['error']['ErrAuthAccessDenied']);
  $VarPagesTxt .= $smarty->fetch('AccessDenied.tpl');
}

$smarty->assign('VarPagesTxt', @$VarPagesTxt);
if (true === isset($MS_SP->SP_CurrPage['template_file']) && '' != $MS_SP->SP_CurrPage['template_file']){
	$smarty->display($MS_SP->SP_CurrPage['template_file']);
}
else {
	$smarty->display('Page.tpl');
}
include($_SERVER['DOCUMENT_ROOT'] .'/script/FooterInc.php');
?>