<?php /** * File for moving a panel-plugin. * Call: call.PluginPanel.move.php?id=&mode= */ require_once '../inc/class.Frontend.php'; $Frontend = new Frontend(); if (is_numeric($_GET['id'])) { $Factory = new PluginFactory(); $Panel = $Factory->newInstanceFor($_GET['id']); if ($Panel->type() == PluginType::Panel) { $Panel->move(filter_input(INPUT_GET, 'mode')); } }
<?php /** * File for displaying plugins. * Call: call.Plugin.display.php?id= [&sport= &jahr= &dat= ] */ require '../inc/class.Frontend.php'; $Frontend = new Frontend(); $Factory = new PluginFactory(); try { $Plugin = $Factory->newInstanceFor(filter_input(INPUT_GET, 'id')); } catch (Exception $E) { $Plugin = null; echo HTML::error(__('The plugin could not be found.')); } if ($Plugin !== null) { if ($Plugin instanceof PluginPanel) { $Plugin->setSurroundingDivVisible(false); } $Plugin->display(); }
<?php /** * File for displaying the config-window for a plugin. * Call: call.Plugin.config.php?id= */ require_once '../inc/class.Frontend.php'; $Frontend = new Frontend(true); $Factory = new PluginFactory(); if (isset($_GET['key'])) { $Factory->uninstallPlugin(filter_input(INPUT_GET, 'key')); echo Ajax::wrapJSforDocumentReady('Runalyze.Overlay.load("call/window.config.php");'); } elseif (isset($_GET['id']) && is_numeric($_GET['id'])) { $Plugin = $Factory->newInstanceFor($_GET['id']); $Plugin->displayConfigWindow(); } else { echo '<em>' . __('Something went wrong ...') . '</em>'; }
echo '<li>' . $Plugin->getLink() . '</li>'; } } echo '</ul>'; echo '</li>'; } ?> </ul> <div id="statistics-inner"> <?php if (isset($_GET['id'])) { $Context = new Context(Request::sendId(), SessionAccountHandler::getId()); $View = new TrainingView($Context); $View->display(); } elseif (isset($_GET['pluginid'])) { $Factory->newInstanceFor((int) $_GET['pluginid'])->display(); } else { if (empty($Stats)) { echo __('<em>There are no statistics available. Activate a plugin in your configuration.</em>'); } else { $Factory->newInstance($Stats[0])->display(); } } ?> </div> </div> </div> <div id="panels"> <?php