account.php 1.0 KB

123456789101112131415161718192021222324252627282930
  1. <?php require_once __DIR__.DIRECTORY_SEPARATOR.'header.php';
  2. User::check_access('account','read');
  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. <span class="list-group-item"><h5 class="mb-0">Préférences</h5></span>
  17. <?php foreach($accountMenu as $item): ?>
  18. <a href="<?php echo $item['url']; ?>" class="list-group-item list-group-item-action <?php echo $item['url'] == $page.'?section='.$_['section']?'active':'text-primary'; ?>"><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' ?>