addons-panel.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Copyright 2009 Lucas Baudin <xapantu@gmail.com>
  4. * 2011-2014 Stephen Just <stephenjust@gmail.com>
  5. * 2014-2016 Daniel Butum <danibutum at gmail dot com>
  6. * This file is part of stk-addons.
  7. *
  8. * stk-addons is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * stk-addons is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with stk-addons. If not, see <http://www.gnu.org/licenses/>.
  20. */
  21. require_once(__DIR__ . DIRECTORY_SEPARATOR . "config.php");
  22. $id = isset($_GET['name']) ? $_GET['name'] : "";
  23. $a_tpl = StkTemplate::get('addons/panel.tpl');
  24. try
  25. {
  26. $viewer = new AddonViewer($id);
  27. $viewer->fillTemplate($a_tpl);
  28. echo $a_tpl;
  29. }
  30. catch(Exception $e)
  31. {
  32. echo $e->getMessage();
  33. }