<?php
  
/*
------------------
Настройки аккаунта
------------------
*/
  
ACCESS('users');

//Вызов страниц
$dir = ROOT.'/users/profile/'.DIRECT::F_GET('path').'/content/';
$get = DIRECT::F_GET('section').'.php';

IF (DIRECT::E_FILE($dir.$get) == TRUE){
  
  REQUIRE ($dir.$get);
  
}ELSE{
  
  ECHO "<div class='navigation'>";
  ECHO "<a href='/'>".ICONS('home', 25, 'fa-fw')."</a>";
  ECHO "".ICONS('angle-right', 22, 'fa-fw')."";
  ECHO "<a href='/id".$user['ID']."'>".TEXT_ABSOLUTE($user['LOGIN'])."</a>";
  ECHO "".ICONS('angle-right', 22, 'fa-fw')."";
  ECHO "".LG('Настройки аккаунта')."";
  ECHO "</div>";
  
  $result = SCANDIR(ROOT.'/users/profile/settings/components/', SCANDIR_SORT_ASCENDING);
  
  ECHO "<div class='list-body'>";
  
  FOR ($i = 0; $i < COUNT($result); $i++){
    
    IF (PREG_MATCH('#\.php$#i',$result[$i]))
    {       
      
      REQUIRE (ROOT.'/users/profile/settings/components/'.$result[$i]);
      
    }
    
  }
  
  ECHO "</div>";
  
  ECHO "<div class='navigation'>";
  ECHO "<a href='/'>".ICONS('home', 25, 'fa-fw')."</a>";
  ECHO "".ICONS('angle-right', 22, 'fa-fw')."";
  ECHO "<a href='/id".$user['ID']."'>".TEXT_ABSOLUTE($user['LOGIN'])."</a>";
  ECHO "".ICONS('angle-right', 22, 'fa-fw')."";
  ECHO "".LG('Настройки аккаунта')."";
  ECHO "</div>";
   
}  
  
?>