ouders in monpas
This commit is contained in:
@@ -39,4 +39,16 @@ class Autorisatienivos_model extends MY_Model{
|
||||
if ($result) {return $result->nivo;}
|
||||
else {return null ;};
|
||||
}
|
||||
|
||||
function checknivo($userid, $orgid){
|
||||
$this->sql=" SELECT nivo
|
||||
FROM tb_autorisatienivos AN
|
||||
JOIN tb_autorisaties A ON A.nivo_id = AN.id
|
||||
JOIN tb_orgusers OU ON OU.id = A.orguser_id
|
||||
WHERE OU.user_id = {$userid}
|
||||
AND OU.organisatie_id = {$orgid} ";
|
||||
return $this->get_query_row('nivo');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -25,15 +25,15 @@ class Licenties_model extends MY_Model{
|
||||
|
||||
|
||||
function get_ongeclusterd($orgid, $clusterId){
|
||||
$this->sql = "SELECT M.id, M.sysnr, M. cluster_id, M.naam,M.naamkort,
|
||||
$this->sql = "SELECT DISTINCT(M.id), M.sysnr, M.cluster_id, M.naam,M.naamkort,
|
||||
IF (C.id, C.kleur1, '#ffffff') as kleur1,
|
||||
IF (C.id , C.kleur2, '#ebebeb' ) as kleur2
|
||||
FROM tb_organisaties O
|
||||
JOIN tb_licenties L ON L.orgid = O.id
|
||||
JOIN tb_modules M on M.sysnr = L.modulenr
|
||||
LEFT JOIN tb_cluster C ON C.id = M.cluster_id
|
||||
LEFT JOIN tb_cluster C ON C.id = M.cluster_id
|
||||
WHERE O.id = {$orgid}
|
||||
AND actief = 1
|
||||
AND O.actief = 1
|
||||
AND M.cluster_id = {$clusterId}
|
||||
ORDER BY M.naam ";
|
||||
return $this->get_query_result();
|
||||
@@ -43,7 +43,6 @@ class Licenties_model extends MY_Model{
|
||||
|
||||
$this->sql = "SELECT C.id, C.naam, count(M.id) as aantalmodules, C.kleur1, C.kleur2
|
||||
FROM tb_organisaties O
|
||||
|
||||
JOIN tb_licenties L ON L.orgid = O.id
|
||||
JOIN tb_modules M on M.sysnr = L.modulenr
|
||||
JOIN tb_cluster C on C.id = M.cluster_id
|
||||
@@ -85,14 +84,14 @@ class Licenties_model extends MY_Model{
|
||||
}
|
||||
|
||||
function get_licentie_cluster($orgid, $clusterid){
|
||||
$this->sql = "SELECT M.id, M.cluster_id, M.naam, M.naamkort, M.sysnr
|
||||
FROM tb_organisaties O
|
||||
$this->sql = "SELECT DISTINCT(M.id), M.cluster_id, M.naam, M.naamkort, M.sysnr
|
||||
FROM tb_organisaties O
|
||||
JOIN tb_licenties L ON L.orgid = O.id
|
||||
JOIN tb_modules M on M.sysnr = L.modulenr
|
||||
JOIN tb_cluster C on C.id = M.cluster_id
|
||||
WHERE O.id = {$orgid}
|
||||
AND C.id = {$clusterid}
|
||||
AND actief = 1 ";
|
||||
AND O.actief = 1 ";
|
||||
return $this->get_query_result();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user