manage.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * copyright 2011 Stephen Just <stephenjust@users.sourceforge.net>
  4. * 2014 Daniel Butum <danibutum at gmail dot com>
  5. * This file is part of stk-addons.
  6. *
  7. * stk-addons is free software: you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation, either version 3 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * stk-addons is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with stk-addons. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. require_once(__DIR__ . DIRECTORY_SEPARATOR . "config.php");
  21. AccessControl::setLevel(AccessControl::PERM_EDIT_ADDONS);
  22. $_GET['action'] = (isset($_GET['action'])) ? $_GET['action'] : null;
  23. $_GET['view'] = (isset($_GET['view'])) ? $_GET['view'] : 'overview';
  24. $tpl = StkTemplate::get("manage/index.tpl")
  25. ->assignTitle(_h("Manage"))
  26. ->addUtilLibrary()
  27. ->addDataTablesLibrary()
  28. ->addScriptInclude("manage.js")
  29. ->assign("can_edit_settings", User::hasPermission(AccessControl::PERM_EDIT_SETTINGS))
  30. ->assign("can_edit_roles", User::hasPermission(AccessControl::PERM_EDIT_PERMISSIONS));
  31. $tpl_data = ["status" => "", "body" => ""];
  32. // right panel
  33. $tpl_data["body"] = Util::ob_get_require_once(ROOT_PATH . "manage-panel.php");
  34. // output the view
  35. $tpl->assign("manage", $tpl_data);
  36. echo $tpl;