<?php require '../base.php'; ob_start(); require LANGS . 'ACPPluginsT.php'; ACPPluginsT::init(); function __autoload($c) { require LIB . 'plugins/' . basename($c) . '.php'; } if (!$userManager->loggedIn() || !$user->isAdmin()) { echo ErrorMessage::setText('You are not allowed to view this page.', true); } if (isset($_GET['install'])) { $packageName = basename($_GET['install']); try { $manifest = PluginManifest::fromPackageName($packageName); PluginHelper::installPlugin($manifest); header("Location: ./plugins.php"); exit; } catch (Exception $e) { echo AdminErrorMessage::setText(ACPPluginsT::getFormat('install_error', htmlspecialchars($packageName), $e->getMessage()), true); } } else { if (isset($_GET['uninstall'])) { $packageName = basename($_GET['uninstall']); if ($_GET['ok'] == 1) { PluginHelper::uninstallPlugin($packageName); header("Location: ./plugins.php"); exit; } else {