jilo-web/app/templates/page-menu.php

118 lines
6.5 KiB
PHP
Raw Normal View History

2024-07-01 09:45:07 +00:00
<div class="container-fluid">
2025-11-19 17:10:23 +00:00
<!-- Modern Menu -->
2024-08-02 13:07:50 +00:00
<div class="menu-container">
2025-11-19 17:10:23 +00:00
<div class="modern-header-content">
<div class="logo-section">
<a href="<?= htmlspecialchars($app_root) ?>?platform=<?= htmlspecialchars($platform_id) ?>" class="modern-logo-link">
<div class="modern-logo">
<img src="<?= htmlspecialchars($app_root) ?>static/jilo-logo.png" alt="<?= htmlspecialchars($config['site_name']); ?>"/>
</div>
<div class="brand-info">
<h1 class="brand-name"><?= htmlspecialchars($config['site_name']); ?></h1>
<?php if (!empty($config['site_slogan'])): ?>
<div class="brand-slogan"><?= htmlspecialchars($config['site_slogan']); ?></div>
<?php endif; ?>
</div>
</a>
2024-08-05 17:21:34 +00:00
</div>
2024-08-05 16:53:24 +00:00
2025-04-13 16:12:28 +00:00
<?php if (Session::isValidSession()) { ?>
2024-08-07 08:13:55 +00:00
2024-09-24 06:39:30 +00:00
<?php foreach ($platformsAll as $platform) {
2024-10-05 15:12:15 +00:00
$platform_switch_url = switchPlatform($platform['id']);
2024-09-24 06:39:30 +00:00
?>
2025-11-19 17:10:23 +00:00
<div>
2024-10-05 15:12:15 +00:00
<?php if ((isset($_REQUEST['platform']) || empty($_SERVER['QUERY_STRING'])) && $platform['id'] == $platform_id) { ?>
2025-11-19 17:10:23 +00:00
Jitsi platforms:
<button class="btn modern-header-btn" type="button" aria-expanded="false">
2024-10-04 11:18:28 +00:00
<?= htmlspecialchars($platform['name']) ?>
2025-11-19 17:10:23 +00:00
</button>
2024-10-05 15:12:15 +00:00
<?php } else { ?>
<a href="<?= htmlspecialchars($platform_switch_url) ?>">
<?= htmlspecialchars($platform['name']) ?>
</a>
<?php } ?>
2025-11-19 17:10:23 +00:00
</div>
2024-10-05 15:12:15 +00:00
<?php } ?>
2024-08-07 08:13:55 +00:00
2024-07-01 09:45:07 +00:00
<?php } ?>
2025-11-19 17:10:23 +00:00
<div class="header-actions">
2025-04-13 16:12:28 +00:00
<?php if (Session::isValidSession()) { ?>
2025-11-19 17:10:23 +00:00
<div class="dropdown">
<button class="btn modern-header-btn dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false">
<i class="fas fa-user-circle me-2"></i><?= htmlspecialchars($currentUser) ?>
</button>
<div class="dropdown-menu dropdown-menu-right modern-dropdown">
<h6 class="dropdown-header modern-dropdown-header"><?= htmlspecialchars($currentUser) ?></h6>
<a class="dropdown-item modern-dropdown-item" href="<?= htmlspecialchars($app_root) ?>?page=theme">
<i class="fas fa-paint-brush"></i>Change theme
</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item modern-dropdown-item" href="<?= htmlspecialchars($app_root) ?>?page=profile">
<i class="fas fa-id-card"></i>Profile details
</a>
<a class="dropdown-item modern-dropdown-item" href="<?= htmlspecialchars($app_root) ?>?page=credentials">
<i class="fas fa-shield-alt"></i>Login credentials
</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item modern-dropdown-item" href="<?= htmlspecialchars($app_root) ?>?page=logout">
<i class="fas fa-sign-out-alt"></i>Logout
</a>
</div>
2025-04-07 13:35:05 +00:00
</div>
2025-11-19 17:10:23 +00:00
<div class="dropdown">
<button class="btn modern-header-btn dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false">
<i class="fas fa-cog"></i>
</button>
<div class="dropdown-menu dropdown-menu-right modern-dropdown">
<h6 class="dropdown-header modern-dropdown-header">settings</h6>
<?php if ($userObject->hasRight($userId, 'superuser')) {?>
<a class="dropdown-item modern-dropdown-item" href="<?= htmlspecialchars($app_root) ?>?page=admin-tools">
<i class="fas fa-toolbox"></i>Admin tools
</a>
<?php } ?>
<?php if ($userObject->hasRight($userId, 'superuser') ||
$userObject->hasRight($userId, 'view config file')) {?>
<a class="dropdown-item modern-dropdown-item" href="<?= htmlspecialchars($app_root) ?>?page=config">
<i class="fas fa-wrench"></i>Configuration
</a>
<?php } ?>
<?php if ($userObject->hasRight($userId, 'superuser') ||
2025-04-27 12:48:07 +00:00
$userObject->hasRight($userId, 'view config file') ||
$userObject->hasRight($userId, 'edit config file') ||
2025-04-15 19:40:29 +00:00
$userObject->hasRight($userId, 'edit whitelist') ||
$userObject->hasRight($userId, 'edit blacklist') ||
$userObject->hasRight($userId, 'edit ratelimiting')) { ?>
2025-11-19 17:10:23 +00:00
<a class="dropdown-item modern-dropdown-item" href="<?= htmlspecialchars($app_root) ?>?page=security">
<i class="fas fa-shield-alt"></i>Security
</a>
2025-04-25 07:14:21 +00:00
<?php do_hook('main_menu', ['app_root' => $app_root, 'section' => 'main', 'position' => 100]); ?>
2025-11-19 17:10:23 +00:00
</div>
2025-04-15 19:37:49 +00:00
</div>
2025-11-19 17:10:23 +00:00
<?php } ?>
2024-07-01 09:45:07 +00:00
<?php } else { ?>
2025-11-19 17:10:23 +00:00
<button class="btn modern-header-btn" onclick="window.location.href='<?= htmlspecialchars($app_root) ?>?page=login'">
<i class="fas fa-sign-in-alt me-2"></i>Login
</button>
<?php do_hook('main_public_menu', ['app_root' => $app_root, 'section' => 'main', 'position' => 100]); ?>
2024-07-01 09:45:07 +00:00
<?php } ?>
2025-04-15 19:29:55 +00:00
2025-11-19 17:10:23 +00:00
<div class="dropdown">
<button class="btn modern-header-btn dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false">
<i class="fas fa-info-circle"></i>
</button>
<div class="dropdown-menu dropdown-menu-right modern-dropdown">
<h6 class="dropdown-header modern-dropdown-header">resources</h6>
<a class="dropdown-item modern-dropdown-item" href="<?= htmlspecialchars($app_root) ?>?page=help">
<i class="fas fa-question-circle"></i>Help
</a>
</div>
</div>
</div>
</div>
2024-08-02 13:07:50 +00:00
</div>
2025-11-19 17:10:23 +00:00
<!-- /Modern Menu -->