123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php require_once __DIR__.DIRECTORY_SEPARATOR.'header.php'; ?>
- <?php if (!$myUser->connected()) throw new Exception('Vous devez être connecté pour accéder à cette fonctionnalité', 401);
- $settingMenu = array();
- $administrationMenu = false;
- Plugin::callHook("menu_setting", array(&$settingMenu));
- // usort($settingMenu, function($a,$b){
- // if($a['sort'] > $b['sort']) return 1;
- // if($a['sort'] < $b['sort']) return -1;
- // if($a['sort'] == $b['sort']) return 0;
- // });
- $_['section'] = !isset($_['section']) ? 'global': $_['section'];
- $page = basename($_SERVER['PHP_SELF']);
- ?>
- <div class="row">
- <div class="col-md-3">
- <div class="list-group">
- <span class="list-group-item"><h5 class="mb-0">Configuration</h5></span>
- <?php foreach($settingMenu as $item):
- if(isset($item['category']) && $item['category']!='configuration') {
- $administrationMenu = true;
- continue;
- }
- ?>
- <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>
- <?php endforeach; ?>
- </div>
- <br/>
- <?php if($administrationMenu): ?>
- <div class="list-group">
- <span class="list-group-item"><h5 class="mb-0">Administration</h5></span>
- <?php foreach($settingMenu as $item):
- if(!isset($item['category']) || $item['category']!='administration') continue;
- ?>
- <a href="<?php echo isset($item['url'])?$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>
- <?php endforeach; ?>
- </div>
- <?php endif; ?>
- </div>
- <div class="col-md-9"><?php Plugin::callHook("content_setting"); ?></div>
- </div>
- <br>
- <?php require_once __ROOT__.'footer.php' ?>
|