template.php 620 B

12345678910111213141516171819202122232425
  1. <?php
  2. Core::addScript("/public/js/app-test.js");
  3. $template = Template::get($id);
  4. if(!Core::$user->hasPermission($template)) throw new Exception("You do not have permission to access this page.");
  5. $page_title = $template->name;
  6. Core::addScript("public/js/app-test.js");
  7. Core::addBreadcrumb("/account", "Account");
  8. Core::addBreadcrumb("/account/templates", "Templates");
  9. Core::addBreadcrumb("/account/templates/$template->id", $page_title);
  10. if(HTTP::isAJAX()) {
  11. JSON::success();
  12. }
  13. View::includeOnce("header", compact("page_title"));
  14. View::include("template", compact("template"));
  15. View::includeOnce("footer");
  16. ?>