<?php
include($_SERVER['DOCUMENT_ROOT'] .'/script/HeaderInc.php');
if('XMLHttpRequest' == $_SERVER['HTTP_X_REQUESTED_WITH']) {
  if(true === isset($_GET['UrlId']) && true === is_numeric($_GET['UrlId'])){
    $ObjStructureOrganizationMod = new StructureOrganizationMod($MS_SP);
    $ArrStructureOrganization = $ObjStructureOrganizationMod->GetFromDb('SqlAll', 'GetRow', "a.structureorganization_id = '". $_GET['UrlId'] ."'");
    $smarty->assign('ArrStructureOrganization', $ArrStructureOrganization);
    $VarReturn = $smarty->fetch('Demands/DemandsUsersStep2.tpl');
  }
  else{
    $VarReturn = $MS_SP->Sp_LangMessage['error']['ErrSettingWrong'];
  }
}
else{
  $VarReturn = $MS_SP->Sp_LangMessage['error']['ErrFuncAccessDenied'];
}
echo $VarReturn;
include($_SERVER['DOCUMENT_ROOT'] .'/script/FooterInc.php');
?>