Patching readonly
This commit is contained in:
34
application/Patching/PatchingController.php
Normal file
34
application/Patching/PatchingController.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user