diff --git a/include/wochenplan.class.php b/include/wochenplan.class.php index f5eea273a..1ff964f4e 100644 --- a/include/wochenplan.class.php +++ b/include/wochenplan.class.php @@ -36,6 +36,9 @@ require_once(dirname(__FILE__).'/studiengang.class.php'); require_once(dirname(__FILE__).'/mitarbeiter.class.php'); require_once(dirname(__FILE__).'/datum.class.php'); require_once(dirname(__FILE__).'/zeitsperre.class.php'); +require_once(dirname(__FILE__).'/phrasen.class.php'); +require_once(dirname(__FILE__).'/globals.inc.php'); +require_once(dirname(__FILE__).'/sprache.class.php'); class wochenplan extends basis_db { @@ -104,6 +107,7 @@ class wochenplan extends basis_db $this->datum=mktime(); $this->init_stdplan(); $this->crlf=crlf(); + } /** @@ -390,6 +394,9 @@ class wochenplan extends basis_db */ public function draw_header() { + $sprache = getSprache(); + $p=new phrasen($sprache); + echo ''.$this->crlf; echo ' '.$this->crlf; echo '
'.$this->crlf; @@ -398,16 +405,16 @@ 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 'Studiengang: '.$this->stg_kurzbzlang.' - '.$this->stg_bez.'
'; - echo 'Semester: '.$this->sem.'
'; + echo ''.$p->t('global/studiengang').': '.$this->stg_kurzbzlang.' - '.$this->stg_bez.'
'; + echo $p->t('global/semester').': '.$this->sem.'
'; if ($this->ver!='0' && $this->ver!='' && $this->ver!=null) - echo 'Verband: '.$this->ver.'
'; + echo $p->t('global/verband').': '.$this->ver.'
'; if ($this->grp!='0' && $this->grp!='' && $this->grp!=null) - echo 'Gruppe: '.$this->grp.'
'; + echo $p->t('global/gruppe').': '.$this->grp.'
'; $this->link.='&stg_kz='.$this->stg_kz.'&sem='.$this->sem.'&ver='.$this->ver.'&grp='.$this->grp; } if ($this->type=='ort') - echo 'Ort: '.(1==1 || is_file(RAUMINFO_PATH.trim($this->ort_kurzbz).'.html')?''.$this->ort_kurzbz.'':$this->ort_kurzbz).' - '.$this->ort_bezeichnung.' - '.($this->ort_max_person!=''?'( '.$this->ort_max_person.' Personen )':'').'
'.$this->ort_ausstattung.'
'; + echo ''.$p->t('global/raum').': '.(1==1 || is_file(RAUMINFO_PATH.trim($this->ort_kurzbz).'.html')?''.$this->ort_kurzbz.'':$this->ort_kurzbz).' - '.$this->ort_bezeichnung.' - '.($this->ort_max_person!=''?'( '.$this->ort_max_person.' Personen )':'').'
'.$this->ort_ausstattung.'
'; echo '

'.$this->crlf; echo '
'.$this->crlf; @@ -416,7 +423,7 @@ class wochenplan extends basis_db //global $kalender_begin_ws, $kalender_ende_ws, $kalender_begin_ss, $kalender_ende_ss; $kal_link_ws=$this->kal_link.'&begin='.$this->studiensemester_now->start.'&ende='.$this->studiensemester_now->ende; $kal_link_ss=$this->kal_link.'&begin='.$this->studiensemester_next->start.'&ende='.$this->studiensemester_next->ende; - echo '        Kalender:    '.$this->crlf; + echo '        '.$p->t('global/kalender').':    '.$this->crlf; echo ' '.$this->studiensemester_now->name.' '.$this->crlf; echo ' HTML'.$this->crlf; echo ' CSV'.$this->crlf; @@ -528,6 +535,12 @@ class wochenplan extends basis_db */ public function draw_week($raumres, $user_uid='') { + global $tagbez; + $sprache = getSprache(); + $spracheLoad = new sprache(); + $spracheLoad->load($sprache); + $p=new phrasen($sprache); + $o_datum=new datum(); // Stundentafel abfragen $sql_query="SELECT stunde, beginn, ende FROM lehre.tbl_stunde ORDER BY stunde"; @@ -544,7 +557,7 @@ class wochenplan extends basis_db echo ' '.$this->crlf; // Kopfzeile darstellen echo ''.$this->crlf; - echo ' '.$this->crlf; + echo ' '.$this->crlf; for ($i=0;$i<$num_rows_stunde; $i++) { $row = $this->db_fetch_object($result_stunde); @@ -565,8 +578,9 @@ class wochenplan extends basis_db $datum=$datum_mon=$this->datum; for ($i=1; $i<=TAGE_PRO_WOCHE; $i++) { - echo ''.$this->crlf; //.strftime("%A %d %B %Y",$this->datum) - for ($k=0; $k<$num_rows_stunde; $k++) + //echo ''.$this->crlf; //.strftime("%A %d %B %Y",$this->datum) + echo ''.$this->crlf; //.strftime("%A %d %B %Y",$this->datum) + for ($k=0; $k<$num_rows_stunde; $k++) { $row = $this->db_fetch_object($result_stunde, $k); $j = $row->stunde; @@ -720,8 +734,8 @@ class wochenplan extends basis_db if ($raumres && $this->type=='ort' && ($datum>=$datum_now && $datum>=$datum_res_lektor_start && $datum_mon<=$datum_res_lektor_ende)) { echo '
Stunde 
Beginn 
Ende 
'.$p->t('global/stunde').' 
'.$p->t('global/beginn').' 
'.$p->t('global/ende').' 
'.strftime("%A",$datum).'
'.strftime("%e. %b %Y",$datum).'
'.strftime("%A",$datum).'
'.strftime("%e. %b %Y",$datum).'
'.$tagbez[$spracheLoad->index][$i].'
'.strftime("%e. %b %Y",$datum).'
'; - echo ' '.$this->crlf; - echo ' '.$this->crlf; + echo ' '.$this->crlf; + echo ' '.$this->crlf; $rechte = new benutzerberechtigung(); $rechte->getBerechtigungen($user_uid); @@ -758,7 +772,7 @@ class wochenplan extends basis_db $stg->loadArray($rechte->getStgKz('lehre/reservierung'),'typ, kurzbz',true); //Studiengang - echo ''; //Semester - echo ' + echo ' + echo ''.$this->crlf; //Gruppe - echo ' + echo ''.$this->crlf; //Spezialgruppe - echo ''; echo '
Titel:Beschreibung: '.$p->t('global/titel').':'.$p->t('global/beschreibung').': Studiengang '.$p->t('global/studiengang').' Semester '.$p->t('global/semester').' Verband'.$p->t('global/verband').' Gruppe'.$p->t('global/gruppe').' Spezialgruppe'.$p->t('global/spezialgruppe').'
'; - echo ' Reservierungen löschen '; + echo ' '.$p->t('global/reservierungenLoeschen').' '; } } @@ -2172,7 +2186,31 @@ class wochenplan extends basis_db } else return false; - } + } +} + +function jahreskalenderjump($link) +{ + $sprache = getSprache(); + $p=new phrasen($sprache); + + $crlf=crlf(); + $datum=mktime(); + $woche=kalenderwoche($datum); + $datum=montag($datum); + echo '
'.$p->t('global/springeZuKw').'
'.$crlf; + for ($anz=1;$anz<26;$anz++) + { + $linknew=$link.'&datum='.$datum; + if ($woche==53) + $woche=1; + echo ' '.$woche.''.$crlf; + if ($anz%5==0) + echo '
'.$crlf; + $datum+=60*60*24*7; + $woche++; + } + echo '
'.$crlf; } ?>