Added Network

This commit is contained in:
Frank Schubert
2021-06-24 22:34:45 +02:00
parent 1c6acca834
commit 5241cfd175
12 changed files with 475 additions and 15 deletions
+12
View File
@@ -3,6 +3,18 @@
class AddressController extends mfBaseController {
private $filter;
protected function init() {
$this->needlogin=true;
$me = new User();
$me->loadMe();
$this->me = $me;
$this->layout()->set("me",$me);
/*
if(!$me->isAdmin()) {
$this->redirect("Dashboard");
}*/
}
protected function indexAction() {
//var_dump($this->request->filter);
$default_filter = ['parents_only' => 1];
+23 -5
View File
@@ -94,8 +94,29 @@ class AddressModel {
if(is_array($filter['addresstype']) && count($filter['addresstype'])) {
$at = $filter['addresstype'];
$in = [];
if(in_array("owner", $at)) {
$in[] = "Addresstype.type = 'owner'";
if(in_array("systemowner", $at)) {
$in[] = "Addresstype.type = 'systemowner'";
}
if(in_array("netowner", $at)) {
$in[] = "Addresstype.type = 'netowner'";
}
if(in_array("salespartner", $at)) {
$in[] = "Addresstype.type = 'Addresstype'";
}
if(in_array("pipeworker", $at)) {
$in[] = "Addresstype.type = 'pipeworker'";
}
if(in_array("lineworker", $at)) {
$in[] = "Addresstype.type = 'lineworker'";
}
if(in_array("netoperator", $at)) {
$in[] = "Addresstype.type = 'netoperator'";
}
if(in_array("support", $at)) {
$in[] = "Addresstype.type = 'support'";
}
if(in_array("billing", $at)) {
$in[] = "Addresstype.type = 'billing'";
}
if(in_array("employee", $at)) {
$in[] = "Addresstype.type = 'employee'";
@@ -109,9 +130,6 @@ class AddressModel {
if(in_array("contact", $at)) {
$in[] = "Addresstype.type = 'contact'";
}
if(in_array("billing", $at)) {
$in[] = "Addresstype.type = 'billing'";
}
$or = "";
if(count($in)) {