account.php 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. <?php require_once __DIR__.DIRECTORY_SEPARATOR.'header.php';
  2. if(!$myUser->connected()) throw new Exception("Vous devez être connecté pour accéder à cette fonctionnalité",401);
  3. $accountMenu = array();
  4. Plugin::callHook("menu_account", array(&$accountMenu));
  5. usort($accountMenu, function($a,$b){
  6. if($a['sort'] > $b['sort']) return 1;
  7. if($a['sort'] < $b['sort']) return -1;
  8. if($a['sort'] == $b['sort']) return 0;
  9. });
  10. $_['section'] = !isset($_['section']) ? 'global': $_['section'];
  11. $page = basename($_SERVER['PHP_SELF']);
  12. ?>
  13. <div class="row">
  14. <div class="col-md-3">
  15. <div class="list-group">
  16. <h5 class="list-group-item">Préférences</h5>
  17. <?php foreach($accountMenu as $item): ?>
  18. <a href="<?php echo $item['url']; ?>" class="list-group-item <?php echo $item['url'] == $page.'?section='.$_['section']?'active':'' ?> "><i class="<?php echo $item['icon']; ?>"></i> <?php echo $item['label']; ?></a>
  19. <?php endforeach; ?>
  20. </div>
  21. </div>
  22. <div class="col-md-9">
  23. <?php Plugin::callHook("content_account"); ?>
  24. </div>
  25. </div>
  26. <?php require_once __ROOT__.'footer.php' ?>