Sindbad~EG File Manager
<?php
/**
* Force Enable All Modules - Direct SQL Update
*/
require_once 'config/config.php';
checkLogin();
if (!isSuperuser()) {
die('Access denied');
}
$db = Database::getInstance()->getConnection();
try {
// Direct SQL update - set ALL to enabled
$updated = $db->exec("
UPDATE module_access_levels
SET is_enabled = 1
");
echo "<!DOCTYPE html>
<html>
<head>
<title>Force Enable All</title>
<script src='https://cdn.tailwindcss.com'></script>
</head>
<body class='bg-gray-100 flex items-center justify-center min-h-screen'>
<div class='bg-white rounded-lg shadow-lg p-8 max-w-2xl'>
<h1 class='text-3xl font-bold text-green-600 mb-4'>
✅ All Modules Enabled!
</h1>
<p class='text-gray-700 mb-4'>
Updated <strong>$updated</strong> access level records to enabled.
</p>
<div class='bg-blue-50 border border-blue-200 rounded p-4 mb-6'>
<h3 class='font-bold text-blue-800 mb-2'>What was done:</h3>
<pre class='text-sm text-blue-700'>UPDATE module_access_levels SET is_enabled = 1</pre>
</div>
<div class='flex gap-4'>
<a href='debug_toggles.php' class='px-6 py-3 bg-blue-500 text-white rounded-lg hover:bg-blue-600'>
Check Debug Page
</a>
<a href='modules/module-management/index.php' class='px-6 py-3 bg-green-500 text-white rounded-lg hover:bg-green-600'>
Module Management
</a>
</div>
</div>
</body>
</html>";
} catch (Exception $e) {
echo "<!DOCTYPE html>
<html>
<head>
<title>Error</title>
<script src='https://cdn.tailwindcss.com'></script>
</head>
<body class='bg-gray-100 flex items-center justify-center min-h-screen'>
<div class='bg-white rounded-lg shadow-lg p-8 max-w-2xl'>
<h1 class='text-3xl font-bold text-red-600 mb-4'>
❌ Error
</h1>
<p class='text-gray-700'>
" . htmlspecialchars($e->getMessage()) . "
</p>
</div>
</body>
</html>";
}
?>
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists