From eb00fffb8f66dd60d02a6a0cd6deee70303b8f8f Mon Sep 17 00:00:00 2001 From: Manfred Kindl Date: Fri, 2 Aug 2013 18:40:58 +0000 Subject: [PATCH] =?UTF-8?q?Benutzersuche=20SQL=20liefert=20nun=20auch=20Le?= =?UTF-8?q?ktor=20und=20Fixangestellte.=20Wochenplan=20schreibt=20STG-K?= =?UTF-8?q?=C3=BCrzel=20statt=20Kurzbz=20aus=20Datenbank?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/benutzer.class.php | 4 +++- include/wochenplan.class.php | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/benutzer.class.php b/include/benutzer.class.php index 4c68dada9..ba808da7c 100644 --- a/include/benutzer.class.php +++ b/include/benutzer.class.php @@ -267,7 +267,7 @@ class benutzer extends person public function search($searchItems, $limit=null) { $qry = "SELECT * FROM (SELECT - distinct on (uid) vorname, nachname, uid, mitarbeiter_uid, titelpre, titelpost,alias, + distinct on (uid) vorname, nachname, uid, mitarbeiter_uid, titelpre, titelpost, lektor, fixangestellt, alias, (SELECT UPPER(tbl_studiengang.typ || tbl_studiengang.kurzbz) FROM public.tbl_student JOIN public.tbl_studiengang USING(studiengang_kz) WHERE student_uid=tbl_benutzer.uid) as studiengang, @@ -322,6 +322,8 @@ class benutzer extends person $obj->telefonklappe = $row->klappe; $obj->raum = $row->raum; $obj->alias = $row->alias; + $obj->lektor = $row->lektor; + $obj->fixangestellt = $row->fixangestellt; $this->result[] = $obj; } diff --git a/include/wochenplan.class.php b/include/wochenplan.class.php index 8e67424cf..a5f0d330b 100644 --- a/include/wochenplan.class.php +++ b/include/wochenplan.class.php @@ -267,7 +267,7 @@ class wochenplan extends basis_db // Studiengangsdaten ermitteln if ($this->type=='student' || $this->type=='verband') { - $sql_query="SELECT bezeichnung, kurzbz, kurzbzlang, typ FROM public.tbl_studiengang WHERE studiengang_kz=".$this->db_add_param($this->stg_kz); + $sql_query="SELECT bezeichnung, kurzbz, kurzbzlang, typ, UPPER(typ||kurzbz) AS kuerzel FROM public.tbl_studiengang WHERE studiengang_kz=".$this->db_add_param($this->stg_kz); //echo $sql_query; if(!($this->db_query($sql_query))) die($this->db_last_error()); @@ -276,6 +276,7 @@ class wochenplan extends basis_db $this->stg_bez = $row->bezeichnung; $this->stg_kurzbz = $row->typ.$row->kurzbz; $this->stg_kurzbzlang = $row->kurzbzlang; + $this->stg_kuerzel = $row->kuerzel; } } @@ -417,7 +418,7 @@ class wochenplan extends basis_db echo 'Person: '.$this->pers_titelpre.' '.$this->pers_vorname.' '.$this->pers_nachname.' '.$this->pers_titelpost.' - '.$this->pers_uid.'
'; if ($this->type=='student' || $this->type=='verband') { - echo ''.$p->t('global/studiengang').': '.$this->stg_kurzbzlang.' - '.$this->stg_bez.'
'; + echo ''.$p->t('global/studiengang').': '.$this->stg_kuerzel.' - '.$this->stg_bez.'
'; echo $p->t('global/semester').': '.$this->sem.'
'; if ($this->ver!='0' && $this->ver!='' && $this->ver!=null) echo $p->t('global/verband').': '.$this->ver.'
'; @@ -2296,7 +2297,7 @@ function jahreskalenderjump_hoverbox($link) //Mit Hoverbox Effekt $woche++; $wochenmontag+=60*60*24*7; } - echo ' '.$crlf; + echo ' '.$crlf; } ?>