} if ($tableM->getId('core_parameters') == 0) { $tableM->create('core_parameters'); } if ($tableM->getId('core_pages') == 0) { $tableM->create('core_pages'); } if ($tableM->getId('core_jobs') == 0) { $tableM->create('core_jobs'); } $init = new initialisation(); // Add default plugin echo ' - Fill plugin table<BR>'; $pluginM = new pluginManager(); if ($pluginM->getId('core') == 0) { $pluginM->create('core', $version); $plugin = new plugin($pluginM->getId('core')); $plugin->updateActivated(1); } $init = new initialisation(); // Add locale echo ' - Fill locale table<BR>'; $locM = new localeManager(); if ($locM->getId('fr_FR') == 0) { $locM->create('fr_FR', 'Français', 'icon-libflags-fr'); } if ($locM->getId('en_US') == 0) { $locM->create('en_US', 'American', 'icon-libflags-us'); } if ($locM->getId('de_DE') == 0) { $locM->create('de_DE', 'Deutsch', 'icon-libflags-de');
$name = $_GET['name']; } elseif (isset($_POST['name'])) { $name = $_POST['name']; } else { // TODO ERROR exit; } if (is_file('plugins/' . $name . '/setup.php')) { include 'plugins/' . $name . '/setup.php'; } if (!isset($pluginVersion)) { $pluginVersion = '1.0'; } $pluginM = new pluginManager(); if ($pluginM->getId($name) == 0) { $pluginM->create($name, $pluginVersion); $plugin = new plugin($pluginM->getId($name)); $plugin->updateActivated(1); } echo 'Le plugin vient d\'être ajoutée!'; echo '<script type="text/javascript">setupDataTable.ajax.reload();availableDataTable.ajax.reload();</script>'; break; case 'enableToggle': if (isset($_GET['id'])) { $id = $_GET['id']; } elseif (isset($_POST['id'])) { $id = $_POST['id']; } else { // TODO ERROR } if (isset($_GET['value'])) {