| @@ 22-26 (lines=5) @@ | ||
| 19 | ||
| 20 | //on récupere le lvl de l'admin |
|
| 21 | $query = $dbc->query("SELECT acces_admin FROM identite WHERE ID_identite=".$id_identite); |
|
| 22 | if ((is_array($query)) && (count($query) > 0)) { |
|
| 23 | foreach ($query as $obj) { |
|
| 24 | $this->acces_admin = $obj->acces_admin; |
|
| 25 | } |
|
| 26 | } |
|
| 27 | ||
| 28 | //si on ne passe pas dans le foreach -> on est pas admin donc on deco le compte |
|
| 29 | if ((!isset($this->acces_admin)) || ($this->acces_admin != 1)) { |
|
| @@ 24-28 (lines=5) @@ | ||
| 21 | ||
| 22 | $query = $dbc->query("SELECT mettre_jour FROM module WHERE nom_module = ".$dbc->quote($nom_module)); |
|
| 23 | ||
| 24 | if ((is_array($query)) && (count($query) > 0)) { |
|
| 25 | foreach ($query as $obj) { |
|
| 26 | return $obj->mettre_jour; |
|
| 27 | } |
|
| 28 | } |
|
| 29 | } |
|
| 30 | ||
| 31 | public function getListeModuleMettreJour() { |
|
| @@ 51-55 (lines=5) @@ | ||
| 48 | ->where("page.affiche", "=", 1) |
|
| 49 | ->get(); |
|
| 50 | ||
| 51 | if (is_array($query) && (count($query) > 0)) { |
|
| 52 | foreach ($query as $obj) { |
|
| 53 | return [$obj->titre,$obj->url]; |
|
| 54 | } |
|
| 55 | } |
|
| 56 | } |
|
| 57 | ||
| 58 | private function getLienNavigationModule($id_module) { |
|
| @@ 70-74 (lines=5) @@ | ||
| 67 | ->where("module.activer", "=", 1) |
|
| 68 | ->get(); |
|
| 69 | ||
| 70 | if (is_array($query) && (count($query) > 0)) { |
|
| 71 | foreach ($query as $obj) { |
|
| 72 | return [$obj->nom_module,$obj->url]; |
|
| 73 | } |
|
| 74 | } |
|
| 75 | } |
|
| 76 | //-------------------------- END GETTER ----------------------------------------------------------------------------// |
|
| 77 | ||