| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <?php
- // Αρχείο: /var/www/html/hockey-cms/admin/sidebar.php
- if (isset($_GET['lang']) && in_array($_GET['lang'], ['el', 'en'])) {
- $_SESSION['lang'] = $_GET['lang'];
- }
- $current_lang = $_SESSION['lang'] ?? 'el';
- $sidebar_t = [
- 'el' => [
- 'panel_title' => 'Admin Panel',
- 'dashboard' => 'Dashboard',
- 'categories' => 'Κατηγορίες',
- 'attributes' => 'Χαρακτηριστικά',
- 'products' => 'Προϊόντα',
- 'orders' => 'Παραγγελίες',
- 'users' => 'Χρήστες & Sellers',
- 'texts' => 'Κείμενα (Δίγλωσσα)',
- 'email_settings' => 'Ρυθμίσεις Email',
- 'whatsapp_settings' => 'Ρυθμίσεις WhatsApp',
- 'sms_settings' => 'Ρυθμίσεις SMS (Brevo)',
- 'email_templates' => 'Πρότυπα Email',
- 'themes' => 'Εμφάνιση (Themes)',
- 'back_eshop' => 'Επιστροφή E-shop',
- 'logout' => 'Αποσύνδεση'
- ],
- 'en' => [
- 'panel_title' => 'Admin Panel',
- 'dashboard' => 'Dashboard',
- 'categories' => 'Categories',
- 'attributes' => 'Attributes',
- 'products' => 'Products',
- 'orders' => 'Orders',
- 'users' => 'Users & Sellers',
- 'texts' => 'Texts (Bilingual)',
- 'email_settings' => 'Email Settings',
- 'whatsapp_settings' => 'WhatsApp Settings',
- 'sms_settings' => 'SMS Settings (Brevo)',
- 'email_templates' => 'Email Templates',
- 'themes' => 'Appearance (Themes)',
- 'back_eshop' => 'Back to E-shop',
- 'logout' => 'Logout'
- ]
- ];
- $sb_t = $sidebar_t[$current_lang];
- $current_page = basename($_SERVER['PHP_SELF']);
- ?>
- <div class="sidebar">
- <h3 style="text-align: center; color: var(--primary); margin-bottom: 25px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;">⚙️ <?php echo $sb_t['panel_title']; ?></h3>
-
- <a href="index.php" class="<?php echo $current_page == 'index.php' ? 'active' : ''; ?>">📊 <?php echo $sb_t['dashboard']; ?></a>
- <a href="categories.php" class="<?php echo $current_page == 'categories.php' ? 'active' : ''; ?>">📁 <?php echo $sb_t['categories']; ?></a>
- <a href="attributes.php" class="<?php echo $current_page == 'attributes.php' ? 'active' : ''; ?>">⚡ <?php echo $sb_t['attributes']; ?></a>
- <a href="products.php" class="<?php echo $current_page == 'products.php' ? 'active' : ''; ?>">🏒 <?php echo $sb_t['products']; ?></a>
- <a href="orders.php" class="<?php echo $current_page == 'orders.php' ? 'active' : ''; ?>">🛒 <?php echo $sb_t['orders']; ?></a>
- <a href="users.php" class="<?php echo $current_page == 'users.php' ? 'active' : ''; ?>">👥 <?php echo $sb_t['users']; ?></a>
- <a href="texts.php" class="<?php echo $current_page == 'texts.php' ? 'active' : ''; ?>">📝 <?php echo $sb_t['texts']; ?></a>
- <a href="mail_settings.php" class="<?php echo $current_page == 'mail_settings.php' ? 'active' : ''; ?>">📧 <?php echo $sb_t['email_settings']; ?></a>
- <a href="whatsapp_settings.php" class="<?php echo $current_page == 'whatsapp_settings.php' ? 'active' : ''; ?>">📱 <?php echo $sb_t['whatsapp_settings']; ?></a>
- <a href="sms_settings.php" class="<?php echo $current_page == 'sms_settings.php' ? 'active' : ''; ?>">💬 <?php echo $sb_t['sms_settings']; ?></a>
- <a href="email_templates.php" class="<?php echo $current_page == 'email_templates.php' ? 'active' : ''; ?>">✉️ <?php echo $sb_t['email_templates']; ?></a>
- <a href="themes.php" class="<?php echo $current_page == 'themes.php' ? 'active' : ''; ?>">🎨 <?php echo $sb_t['themes']; ?></a>
-
- <div style="position: absolute; bottom: 20px; width: 100%;">
- <div style="display: flex; justify-content: center; gap: 10px; margin-bottom: 15px;">
- <a href="?lang=el" style="padding: 2px 8px; border-radius: 12px; font-size: 12px; margin:0; border: none; background: <?php echo $current_lang == 'el' ? 'var(--primary)' : 'rgba(255,255,255,0.1)'; ?>; color: #fff;">GR</a>
- <a href="?lang=en" style="padding: 2px 8px; border-radius: 12px; font-size: 12px; margin:0; border: none; background: <?php echo $current_lang == 'en' ? 'var(--primary)' : 'rgba(255,255,255,0.1)'; ?>; color: #fff;">EN</a>
- </div>
- <a href="../index.php" style="background: rgba(59, 130, 246, 0.1); color: #3b82f6; text-align: center; margin: 0 15px; border-radius: 6px; border: 1px solid rgba(59, 130, 246, 0.2);"><?php echo $sb_t['back_eshop']; ?></a>
- <a href="../logout.php" style="color: #ef4444; text-align: center; margin-top: 10px; background: transparent; border:none;"><?php echo $sb_t['logout']; ?></a>
- </div>
- </div>
- <style>
- .sidebar { width: 250px; background: var(--panel-bg); color: var(--text-main); position: fixed; height: 100vh; padding-top: 20px; box-shadow: 2px 0 10px rgba(0,0,0,0.5); border-right: 1px solid var(--border-color); z-index: 100;}
- .sidebar a { display: block; color: var(--text-muted); padding: 12px 20px; text-decoration: none; font-size: 14px; font-weight: 600; transition: 0.2s; border-left: 4px solid transparent; text-transform: uppercase; letter-spacing: 0.5px;}
- .sidebar a:hover { background: rgba(255,255,255,0.02); color: var(--text-main); }
- .sidebar a.active { background: rgba(249, 115, 22, 0.05); color: var(--primary); border-left: 4px solid var(--primary); }
- </style>
|