setting.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php require_once __DIR__.DIRECTORY_SEPARATOR.'header.php'; ?>
  2. <?php if(!$myUser->connected()) throw new Exception('Vous devez être connecté pour accéder à cette fonctionnalité', 401);
  3. $settingMenu = array();
  4. $administrationMenu = false;
  5. Plugin::callHook("menu_setting", array(&$settingMenu));
  6. $_['section'] = !isset($_['section']) ? 'global': $_['section'];
  7. $page = basename($_SERVER['PHP_SELF']);
  8. ?>
  9. <div class="row">
  10. <div class="col-md-3">
  11. <div class="list-group">
  12. <span class="list-group-item"><h5 class="mb-0">Configuration</h5></span>
  13. <?php foreach($settingMenu as $item):
  14. if(isset($item['category']) && $item['category']!='configuration') {
  15. $administrationMenu = true;
  16. continue;
  17. } ?>
  18. <a href="<?php echo isset($item['url'])?$item['url']:''; ?>" class="setting-menu-item list-group-item list-group-item-action <?php echo $item['url'] == $page.'?section='.$_['section']?'active':'text-primary'; ?>">
  19. <i class="<?php echo $item['icon']; ?>"></i> <span class="d-inline-block"><?php echo $item['label']; ?></span>
  20. </a>
  21. <?php endforeach; ?>
  22. </div>
  23. <br>
  24. <?php if($administrationMenu): ?>
  25. <div class="list-group">
  26. <span class="list-group-item"><h5 class="mb-0">Administration</h5></span>
  27. <?php foreach($settingMenu as $item):
  28. if(!isset($item['category']) || $item['category']!='administration') continue;
  29. ?>
  30. <a href="<?php echo isset($item['url'])?$item['url']:''; ?>" class="setting-menu-item list-group-item list-group-item-action <?php echo $item['url'] == $page.'?section='.$_['section']?'active':'text-primary'; ?> ">
  31. <i class="<?php echo $item['icon']; ?>"></i> <span class="d-inline-block"><?php echo $item['label']; ?></span>
  32. </a>
  33. <?php endforeach; ?>
  34. </div>
  35. <?php endif; ?>
  36. </div>
  37. <div class="col-md-9"><?php Plugin::callHook("content_setting"); ?></div>
  38. </div>
  39. <br>
  40. <?php require_once __ROOT__.'footer.php' ?>