Sindbad~EG File Manager

Current Path : /home/copmadinaarea/thecopmadinaarea.org/portal/
Upload File :
Current File : /home/copmadinaarea/thecopmadinaarea.org/portal/fix_administration_order.php

<?php
/**
 * Quick Fix: Update Administration Module Display Order
 * This ensures Administration appears BEFORE Membership in the sidebar and dashboard
 */

require_once 'config/config.php';
checkLogin();

if (!isSuperuser()) {
    die('Access Denied: Superuser access required');
}

$db = Database::getInstance()->getConnection();

try {
    // Update Administration display_order to 0 (before Membership which is 1)
    $stmt = $db->prepare("UPDATE module_management SET display_order = 0 WHERE module_name = 'Administration'");
    $stmt->execute();
    
    $affectedRows = $stmt->rowCount();
    
    if ($affectedRows > 0) {
        echo "✅ Success! Administration module display order updated.<br>";
        echo "📋 Administration will now appear BEFORE Membership in the sidebar and dashboard.<br><br>";
        echo "<a href='" . BASE_URL . "dashboard.php' style='background: linear-gradient(135deg, #1E40AF 0%, #9333EA 100%); color: white; padding: 12px 24px; border-radius: 8px; text-decoration: none; display: inline-block;'>Go to Dashboard</a>";
    } else {
        echo "â„šī¸ No changes made. Administration module may not be installed yet.<br>";
        echo "<a href='" . BASE_URL . "install_administration.php'>Install Administration Module</a>";
    }
    
} catch (Exception $e) {
    echo "❌ Error: " . $e->getMessage();
}
?>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists