} $plugin = PluginHelper::getPluginByPackage($_GET['package']); if (!$plugin instanceof Plugin) { echo AdminErrorMessage::setText('Plugin does not exist.', true); } include 'template/header.php'; echo ' <h1>' . $plugin->getTitle() . ' Settings</h1> '; $pluginSettings = $plugin->__onCreateSettings(); if (!$pluginSettings instanceof SettingsContainer) { echo InfoMessage::setText('This plugin does not have any settings.'); } else { $pluginSettingsPreferences = $pluginSettings->__onCreate($plugin, $db); if (!is_array($pluginSettingsPreferences) || count($pluginSettingsPreferences) < 1) { echo InfoMessage::setText('This plugin does not have any settings.'); } else { if (isset($_POST['submit'])) { if ($pluginSettings->__onSave()) { echo SuccessMessage::setText('Settings saved.'); } else { echo ErrorMessage::setText('Could not save settings.'); } } echo ' <div class="preferences"> <form method="post" action=""> <ul> '; foreach ($pluginSettingsPreferences as $pref) { if (!$pref instanceof Preference) {
<h1>' . ACPPluginsT::get('available_plugins') . '</h1> <div class="plugins"> '; $availablePlugins = PluginHelper::getAvailablePlugins(); foreach ($availablePlugins as $plugin) { $parsedURL = parse_url($plugin->getURL()); $url = is_array($parsedURL) ? $plugin->getURL() : '#'; echo ' <div class="item"> <div class="meta"> <h2>' . htmlspecialchars($plugin->getTitle()) . ' <small>' . GeneralT::getFormat('by', '<a href="' . $url . '" target="_blank">' . htmlspecialchars($plugin->getAuthor()) . '</a>') . '</small></h2> <p> ' . htmlspecialchars($plugin->getDescription()) . ' </p> </div> <div class="actions"> <a href="./plugins.php?install=' . htmlspecialchars($plugin->getPackageName()) . '" class="button greenB">' . ACPPluginsT::get('install') . '</a> </div> </div> '; } if (count($availablePlugins) < 1) { echo InfoMessage::setText(ACPPluginsT::get('no_new_plugins')); } echo ' </div> '; include 'template/footer.php';