diff --git a/cis/private/info/organisationseinheiten.php b/cis/private/info/organisationseinheiten.php deleted file mode 100644 index 409c824b7..000000000 --- a/cis/private/info/organisationseinheiten.php +++ /dev/null @@ -1,606 +0,0 @@ -, - * Andreas Oesterreicher , - * Rudolf Hangl and - * Gerald Simane-Sequens - */ - -// ------------------------------------------------------------------------------- -// Include Daten -// ------------------------------------------------------------------------------- - require_once('../../../config/cis.config.inc.php'); - require_once('../../../include/organisationseinheit.class.php'); - require_once('../../../include/mitarbeiter.class.php'); - require_once('../../../include/benutzerfunktion.class.php'); - require_once('../../../include/studiengang.class.php'); - require_once('../../../include/fachbereich.class.php'); -// ------------------------------------------------------------------------------- -// Parameterdaten -// ------------------------------------------------------------------------------- - $oe_kurzbz = (isset($_GET['oe_kurzbz'])?$_GET['oe_kurzbz']:null); - $debug = (isset($_GET['debug'])?$_GET['debug']:(isset($_POST['debug'])?$_POST['debug']:false)); - $debug = true; - #$oe_kurzbz='bif'; - -// ------------------------------------------------------------------------------- -// Html Header output -// ------------------------------------------------------------------------------- -echo ' - - - - - - - - - -'; - -echo ' - - - - -'; - -// ------------------------------------------------------------------------------- -// Html Daten output -// ------------------------------------------------------------------------------- - - - // ------------------------------------------------------------------------------- - // Detailanzeige Organisation - Ajax Container - echo ' -
-
-
-
-
-
- - - - -
-
drucken
- - -
-
schliessen  
- - -
-
-
 
-
-
-
-
- '; - echo ' - - - - - -
  - - - - '; - echo ''; - echo '
 Organisation der '.CAMPUS_NAME.' 
'; - // ----------- Anzeige Organisation - if (!$outarray=getOrganisationen($oe_kurzbz,$debug)) - echo 'Fehler beim Daten lesen'; - else if (!displayOrganisationen($oe_kurzbz,$outarray)) - echo 'Fehler bei der Ausgabe der Daten'; - echo '
-
'; -echo ''; - -// --------------------------------------------------------------------------------------------------------------- -// Zeigt das Array in einer Verschachtelten Tabelle an -// --------------------------------------------------------------------------------------------------------------- -function displayOrganisationen($oe_kurzbz=null,$outarray=array()) -{ -/* --- ALLE ARRA Varianten --- - $outarray['ersteebene']=array(); - $outarray['child']=array(); - $outarray['studienzentren']=array(); - $outarray['fachhochschule']=array(); - $outarray['uebergreifende']=array(); - $outarray['nochnichtzugeordnet']=array(); -*/ - -// --------------------------------------------------------------------------------------------------------------- -// wird nur eine Organisatzionsdatensatz gefunden die Personen anzeigen - if(!is_null($oe_kurzbz)) - { - $qry = "SELECT distinct titelpre, vorname, nachname, titelpost, funktion_kurzbz, uid FROM public.tbl_benutzerfunktion JOIN campus.vw_mitarbeiter USING(uid) WHERE - aktiv and (funktion_kurzbz='oezuordnung' OR funktion_kurzbz='Leitung') AND - oe_kurzbz IN( - WITH RECURSIVE oes(oe_kurzbz, oe_parent_kurzbz) as - ( - SELECT oe_kurzbz, oe_parent_kurzbz FROM public.tbl_organisationseinheit - WHERE oe_kurzbz='".addslashes($oe_kurzbz)."' - UNION ALL - SELECT o.oe_kurzbz, o.oe_parent_kurzbz FROM public.tbl_organisationseinheit o, oes - WHERE o.oe_parent_kurzbz=oes.oe_kurzbz - ) - SELECT oe_kurzbz - FROM oes - GROUP BY oe_kurzbz) - ORDER BY funktion_kurzbz, nachname, vorname "; - $db = new basis_db(); - if(!$result=$db->db_query($qry)) - echo '

'.$db->errormsg.'

'; - else - { - if($anz=$db->db_num_rows($result)) - { - $oe_obj = new organisationseinheit($oe_kurzbz); - $oe_obj->oe_parent_kurzbz=$oe_kurzbz; - echo ''; - echo ''; - echo ''; - echo '

 '.$oe_obj->organisationseinheittyp_kurzbz.' - '.$oe_obj->bezeichnung.' 

 Mitarbeiter '; - if ($anz>1) - echo '

 Anzahl: '.$anz.' 

'; - echo ''; - echo '
'; - } - } - return true; - - }// Ende wenn nur eine Organisation gefunden wurde - - echo ''; - echo ''; - if (is_array($outarray['fachhochschule']) && count($outarray['fachhochschule'])>0 ) - { - echo ''; - } - $i=count($outarray['studienzentren']); - - foreach ($outarray['ersteebene'] as $key=>$val) - { - echo ''; - } - echo ''; -//--- STUDIENZENTRUM - echo ''; -// --- UEBERGREIFEND - if (count($outarray['uebergreifende'])>0) - { - echo ''; - } - - echo '
FACHHOCHSCHULE
'; - echo $val->bezeichnung.'
'.$val->organisationseinheittyp_kurzbz; - echo '
\'info\'
'; - reset($outarray['studienzentren']); - - foreach ($outarray['studienzentren'] as $key=>$val) - { - if (!isset($val) || !isset($val['dat']) || !is_object($val['dat']) || !isset($val['dat']->organisationseinheittyp_kurzbz)) - continue; - - echo ''; - } - echo '
- '; - - // Pfeil nach Unten - echo ''; - - echo '
\'info\'
'; - -// ---- STUDIENGANG - echo ''; - $first_organisationseinheittyp_kurzbz=null; - $last_organisationseinheittyp_kurzbz=null; - echo ''; -// ---- INSTITUTE - if ($last_organisationseinheittyp_kurzbz!=$first_organisationseinheittyp_kurzbz) - { - echo ''; - } - else - { - echo ''; - } - echo '
'; - echo ''.$val['dat']->organisationseinheittyp_kurzbz.''.'
'.$val['dat']->bezeichnung; - echo '
    '; - reset($val['child']); - foreach ($val['child'] as $keys=>$vals) - { - if (is_null($first_organisationseinheittyp_kurzbz)) - $first_organisationseinheittyp_kurzbz=$vals['dat']->organisationseinheittyp_kurzbz; - if (!is_null($last_organisationseinheittyp_kurzbz) && $vals['dat']->organisationseinheittyp_kurzbz!=$last_organisationseinheittyp_kurzbz) - { - $last_organisationseinheittyp_kurzbz=$vals['dat']->organisationseinheittyp_kurzbz; - break; - } - $last_organisationseinheittyp_kurzbz=$vals['dat']->organisationseinheittyp_kurzbz; - - echo '
  • '; - echo $vals['dat']->bezeichnung; - echo '
  • '; - } - echo '
'; - echo '
'.$last_organisationseinheittyp_kurzbz.'
    '; - reset($val['child']); - foreach ($val['child'] as $keys=>$vals) - { - if ($vals['dat']->organisationseinheittyp_kurzbz!=$last_organisationseinheittyp_kurzbz) - continue; - $last_organisationseinheittyp_kurzbz=$vals['dat']->organisationseinheittyp_kurzbz; - echo '
  • '; - echo $vals['dat']->bezeichnung; - echo '
  • '; - } - echo '
'; - echo '
 
- -
Übergreifende Institute
'; - -# var_dump($outarray['studienzentren']); - return true; -} - -// --------------------------------------------------------------------------------------------------------------- -// Zeigt das Array in einer Verschachtelten Tabelle an -// --------------------------------------------------------------------------------------------------------------- -function getOrganisationen($oe_kurzbz=null,$debug=false) -{ -// ------------------------------------------------------------------------------- -// Organisationen - - //Alle obersten Organisationseinheiten holen - $oe = new organisationseinheit(); - if(!is_null($oe_kurzbz) && !empty($oe_kurzbz)) - { - //wenn eine Organisationseinheit uebergeben wurde, dann laden - $oe->load($oe_kurzbz); - $oe_obj = new organisationseinheit(); - $oe_obj->oe_parent_kurzbz=$oe->oe_kurzbz; - - #var_dump( $oe); - - $oe->result[] = $oe; - $breadcrumbs=''; - do - { - $oe_obj->load($oe_obj->oe_parent_kurzbz); - $breadcrumbs = ''.$oe_obj->organisationseinheittyp_kurzbz.' - '.$oe_obj->bezeichnung.' > '.$breadcrumbs; - } while($oe_obj->oe_parent_kurzbz!=''); - $breadcrumbs='Organisation > '.$breadcrumbs; - echo '

'.$breadcrumbs.'

'; - } - else - { - //Wenn keine Organisationseinheite uebergeben wurde, die obersten laden - $oe->getHeads(); - } - - // Initialisierung - $outarray['ersteebene']=array(); - $outarray['child']=array(); - $outarray['studienzentren']=array(); - $outarray['fachhochschule']=array(); - $outarray['uebergreifende']=array(); - $outarray['nochnichtzugeordnet']=array(); - - // Spezielle Zuordnungen zu den Anzeige-Array - $check_fachhochschule=array('abteilung','institut'); - $check_uebergreifende=array('studiengang'); - $check_noch_nicht_zugeordnet=array(); - - // Erste Ebene lesen (wenn parameter oe_kurzbz uebergeben wird ist das die erste Ebene) - $ersteebene = array(); - foreach ($oe->result as $result) - $outarray['ersteebene'][$result->oe_kurzbz]=$result; - if (!is_array($outarray['ersteebene']) || count($outarray['ersteebene'])<1) - return false; - - // Alle Eintraege zur Hauptebene suchen - reset($outarray['ersteebene']); - foreach ($outarray['ersteebene'] as $key=>$val) - $outarray['child'] = getChilds($key); - - // Aufteilen auf die verschidenen Teile - if (is_array($outarray['child'])) - reset($outarray['child']); - else - return $outarray; - foreach ($outarray['child'] as $key=>$val) - { - - if (!isset($val) - || !is_array($val) - || count($val)<1) - continue; - - if ($key=='Dummy') - continue; - if (!isset($val['child']) || is_null($val['child']) || !is_array($val['child']) || count($val['child'])<1) - { - $check=strtolower($val['dat']->organisationseinheittyp_kurzbz); - if (in_array($check,$check_fachhochschule)) - $outarray['fachhochschule'][$key]=$val['dat']; - else if (in_array($check,$check_uebergreifende)) - $outarray['uebergreifende'][$key]=$val['dat']; - else - $outarray['nochnichtzugeordnet'][$key]=$val['dat']; - continue; - } - $outarray['studienzentren'][$key]=$val; - } - #var_dump($outarray['studienzentren']); - return $outarray; -} - -// --------------------------------------------------------------------------------------------------------------- -//Liefert die Kindelemente einer Organisationseinheit in -//einem verschachteltem Array zurueck -// --------------------------------------------------------------------------------------------------------------- -function getChilds($foo) -{ - $obj = new organisationseinheit(); - $arr = array(); - $arr1 = $obj->getDirectChilds($foo); - foreach ($arr1 as $value) - { - if ($daten=getDaten($value)) - $arr[$value]['dat']=$daten; - } - if ((!is_array($arr) && !is_object($arr)) || count($arr)<1) - return null; - - reset($arr); - foreach ($arr as $key =>$val) - $arr[$key]['child'] = getChilds($key); - - return $arr; -} -// --------------------------------------------------------------------------------------------------------------- -//Liefert zur oe_kurzbz die Kpl. Daten zureuck -// -- Nur Aktive Datensaetze -// --------------------------------------------------------------------------------------------------------------- -function getDaten($oe_kurzbz='') -{ - if (is_null($oe_kurzbz) || empty($oe_kurzbz)) - return array(); - $obj = new organisationseinheit($oe_kurzbz); - $obj->load($oe_kurzbz); - if(!isset($obj->aktiv) || empty($obj->aktiv)) - return null; - - if ($stg = new studiengang()) - { - $qry = "SELECT * FROM public.tbl_studiengang WHERE aktiv and upper(trim(kurzbzlang))=upper(trim('".$oe_kurzbz."'))"; - if ($result = $stg->db_query($qry)) - { - while($row = $stg->db_fetch_object($result)) - { - foreach ($row as $key=>$val) - $obj->$key=str_replace('/',' / ',$val); - } - } - } - - return $obj; -} -?> diff --git a/content/student/studentenoverlay.xul.php b/content/student/studentenoverlay.xul.php index 56075cdbd..0ef95958e 100644 --- a/content/student/studentenoverlay.xul.php +++ b/content/student/studentenoverlay.xul.php @@ -168,20 +168,30 @@ else } ?> - + + + + + + + + + + +