| 123456789101112131415161718 |
- <?php
- $location = Location::get($id);
- if(!$location) throw new Exception("Location not found.");
- if(!Core::$user->hasPermission($location)) throw new Exception("You do not have permission to access this page.");
- $customer = $location->getCustomer();
- $page_title = $location->name;
- Core::addBreadcrumb("/account", "Account");
- Core::addBreadcrumb("/account/locations", "Locations");
- Core::addBreadcrumb("/account/locations?customer_id=$customer->id", "$customer->name Locations");
- Core::addBreadcrumb("/account/locations/$location->id", $page_title);
- View::includeOnce("header", compact("page_title"));
- View::include("location", compact("location"));
- View::includeOnce("footer");
|