Files
thetool/application/Patching/PatchingController.php
Frank Schubert 3cc3f3f50c Patching readonly
2021-09-21 23:12:53 +02:00

34 lines
763 B
PHP

<?php
class PatchingController extends mfBaseController {
protected function init() {
$this->needlogin=true;
$me = new User();
$me->loadMe();
$this->me = $me;
$this->layout()->set("me",$me);
if(!$me->is(["Admin", "netowner", "netoperator", "lineworker"])) {
$this->redirect("Dashboard");
}
}
protected function indexAction() {
$this->layout()->setTemplate("Patching/Index");
$terminations = PatchingModel::searchByTermination();
$terms = [];
foreach($terminations as $term) {
$term->order = OrderModel::getFirst(["termination_id" => $term->id]);
$terms[] = $term;
//var_dump($term);
}
//exit;
$this->layout()->set("terminations", $terms);
}
}