| 123456789101112131415161718192021222324252627282930313233343536 |
- <?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.");
- $page_title = $location->name;
- Core::addBreadcrumb("/account", "Account");
- Core::addBreadcrumb("/account/locations", "Locations");
- Core::addBreadcrumb("/account/locations/$location->id", $page_title);
- $status_constraint = new Constraint("BETWEEN");
- $status_constraint->setValues(Test::STATUS_ASSIGNED, Test::STATUS_PENDING_VERIFICATION);
- $pending_tests = Test::query([
- "location_id" => $location->id,
- "status" => $status_constraint,
- ], [
- "sort" => "id",
- "order" => "desc",
- ]);
- $completed_tests = Test::query([
- "location_id" => $location->id,
- "status" => Test::STATUS_COMPLETED,
- ], [
- "sort" => "dts_end",
- "order" => "desc",
- ]);
- View::includeOnce("header", compact("page_title"));
- View::include("location", compact("location"));
- View::includeOnce("footer");
- ?>
|