diff --git a/cis/private/profile/index.php b/cis/private/profile/index.php index a1334f582..28b2b22ca 100644 --- a/cis/private/profile/index.php +++ b/cis/private/profile/index.php @@ -38,6 +38,7 @@ require_once('../../../include/kontakt.class.php'); require_once('../../../include/fotostatus.class.php'); require_once('../../../include/addon.class.php'); require_once('../../../include/gruppe.class.php'); +require_once('../../../include/adresse.class.php'); $sprache = getSprache(); $p=new phrasen($sprache); @@ -225,7 +226,7 @@ if(!$ansicht) echo '
'.$p->t('profil/fotosperren').''; } -echo ''; +echo ''; echo ' '.($type=="student"?$p->t("profil/student"):$p->t('profil/mitarbeiter')).'

@@ -233,20 +234,56 @@ echo ' '.$p->t('global/titel').': '.$user->titelpre.'
'.$p->t('global/vorname').': '.$user->vorname.' '.$user->vornamen.'
'.$p->t('global/nachname').': '.$user->nachname.'
- '.$p->t('global/postnomen').': '.$user->titelpost.'
'; + '.$p->t('global/postnomen').': '.$user->titelpost.'

'; if(!$ansicht) { echo ' '.$p->t('global/geburtsdatum').': '.$datum_obj->formatDatum($user->gebdatum,'d.m.Y')."
- ".$p->t('global/geburtsort').": $user->gebort
"; + ".$p->t('global/geburtsort').": $user->gebort

"; } + +if(!$ansicht) +{ + $adresse = new adresse(); + $adresse->load_pers($user->person_id); + + function sortAdresse($a , $b) + { + if($a->typ === $b->typ) + return 0; + + return ($a->typ < $b->typ) ? -1 : 1; + } + usort($adresse->result, "sortAdresse"); + foreach($adresse->result as $a) + { + switch ($a->typ) + { + case "h": + $typ = $p->t("global/hauptwohnsitz"); + break; + case "n": + $typ = $p->t("global/nebenwohnsitz"); + break; + default: + $typ = NULL; + break; + } + if($typ !== NULL) + { + echo "".$typ.":
"; + echo $a->strasse."
".$a->plz." ".$a->ort."

"; + } + } +} + $studiengang = new studiengang(); if ($type=='student') { $studiengang->load($user->studiengang_kz); - echo "
+ echo " ".$p->t('global/studiengang').": $studiengang->bezeichnung
".$p->t('global/semester').": $user->semester ".$p->t('benotungstool/liste')."
".$p->t('global/verband').": $user->verband ".($user->verband!=' '?"".$p->t('benotungstool/liste')."":"")."
@@ -315,13 +352,48 @@ if(!$ansicht) } echo '

'; } -echo ''.$p->t('profil/email').'

+echo ''.$p->t('profil/email').'
'.$p->t('profil/intern').': '.$user->uid.'@'.DOMAIN.'
'; if($user->alias!='' && (!isset($user->studiengang_kz) || !in_array($user->studiengang_kz,$noalias))) { echo $p->t('profil/alias').": $user->alias@".DOMAIN.""; } +if(!$ansicht) +{ + function sortKontakt($a , $b) + { + if($a->kontakttyp === $b->kontakttyp) + return 0; + + return ($a->kontakttyp < $b->kontakttyp) ? -1 : 1; + } + echo '

'.$p->t('profil/kontaktPrivat').''; + $kontakt = new kontakt(); + $kontakt->load_pers($user->person_id); + usort($kontakt->result, "sortKontakt"); + + foreach($kontakt->result as $k) + { + if($k->zustellung === TRUE) + { + switch($k->kontakttyp) + { + case "email": + echo '
'.$p->t('profil/email').': '.$k->kontakt; + break; + case "mobil": + echo '
'.$p->t('profil/mobil').': '.$k->kontakt; + break; + case "telefon": + echo '
'.$p->t('profil/telefon').': '.$k->kontakt; + break; + default: + break; + } + } + } +} if($user->homepage!='') echo "

".$p->t('profil/homepage')."

$user->homepage"; diff --git a/locale/de-AT/global.php b/locale/de-AT/global.php index 5453d6ec4..dbe244382 100755 --- a/locale/de-AT/global.php +++ b/locale/de-AT/global.php @@ -72,6 +72,8 @@ $this->phrasen['global/geburtsort']='Geburtsort'; $this->phrasen['global/universität']='Universität'; $this->phrasen['global/code']='Code'; $this->phrasen['global/adresse']='Adresse'; +$this->phrasen['global/hauptwohnsitz']='Hauptwohnsitz'; +$this->phrasen['global/nebenwohnsitz']='Nebenwohnsitz'; $this->phrasen['global/emailAdresse']='E-Mail Adresse'; $this->phrasen['global/mail']='Mail'; $this->phrasen['global/telefon']='Telefon'; diff --git a/locale/de-AT/profil.php b/locale/de-AT/profil.php index 13f668f61..248fd986b 100644 --- a/locale/de-AT/profil.php +++ b/locale/de-AT/profil.php @@ -5,6 +5,9 @@ $this->phrasen['profil/home']='HOME'; $this->phrasen['profil/meinCis']='Mein CIS'; $this->phrasen['profil/bildHochladen']='Profilfoto hochladen'; $this->phrasen['profil/email']='eMail'; +$this->phrasen['profil/kontaktPrivat']='Privat'; +$this->phrasen['profil/mobil']='Mobil'; +$this->phrasen['profil/telefon']='Telefon'; $this->phrasen['profil/intern']='Intern'; $this->phrasen['profil/alias']='Alias'; $this->phrasen['profil/homepage']='Homepage';