From d3bdff562a3fa76fd54faf3f4f56db5724dfe45e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Tue, 26 May 2009 12:19:49 +0000 Subject: [PATCH] --- include/organisationseinheit.class.php | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/include/organisationseinheit.class.php b/include/organisationseinheit.class.php index 8c844cb8b..5a3dc6933 100644 --- a/include/organisationseinheit.class.php +++ b/include/organisationseinheit.class.php @@ -30,6 +30,7 @@ class organisationseinheit extends basis_db { public $new; // @var boolean public $errormsg; // @var string + public $result; //Tabellenspalten public $oe_kurzbz; @@ -87,6 +88,32 @@ class organisationseinheit extends basis_db return true; } + /** + * Laedt alle Organisationseinheiten an oberster Stelle + * + * @return true wenn ok, false wenn Fehler + */ + public function getHeads() + { + $qry = "SELECT * FROM public.tbl_organisationseinheit WHERE oe_parent_kurzbz is null"; + + if($this->db_query($qry)) + { + while($row = $this->db_fetch_object()) + { + $obj = new organisationseinheit(); + + $obj->oe_kurzbz = $row->oe_kurzbz; + $obj->oe_parent_kurzbz = $row->oe_parent_kurzbz; + $obj->bezeichnung = $row->bezeichnung; + $obj->organisationseinheittyp_kurzbz = $row->organisationseinheittyp_kurzbz; + + $this->result[] = $obj; + } + return true; + } + } + /** * Liefert die ChildNodes einer Organisationseinheit *