config->getAttributes("TableParagraphSubHeadline", "td"), $this->config->getValue("TableParagraph", "margin")); $aliases_content = $this->config->getValue("Main", "aliases"); $visible_content = $this->config->getValue("Main", "visible"); if ($margin = $this->config->getValue("TableParagraphText", "margin")) { $text_div = "
"; $text_div_end = "
"; } else { $text_div = ""; $text_div_end = ""; } $first_loop = TRUE; $order = $this->config->getValue("Main", "order"); foreach ($order as $position) { $data_field = $this->data_fields["content"][$position]; if ($visible_content[$position]) { $data = NULL; switch ($data_field) { case "lebenslauf" : $data["content"] = str_repeat(_("Das ist mein Lebenslauf.") . "  ", 15); break; case "schwerp" : $data["content"] = str_repeat(_("Das sind meine Arbeitsschwerpunkte.") . "  ", 15); break; case "publi" : $data["content"] = str_repeat(_("Das sind meine Publikationen.") . "  ", 15); break; case "news" : $data[0]["topic"] = sprintf(_('Das ist News Nr. %u'), 1); $data[0]["body"] = str_repeat(sprintf(_('News Nr. %u'), 1) . "  ", 10); $data[1]["topic"] = sprintf(_('Das ist News Nr. %u'), 2); $data[1]["body"] = str_repeat(sprintf(_('News Nr. %u'), 2) . "  ", 10); $data[2]["topic"] = sprintf(_('Das ist News Nr. %u'), 3); $data[2]["body"] = str_repeat(sprintf(_('News Nr. %u'), 3) . "  ", 10); break; case "termine" : $now = time(); for ($i = 0; $i < 3; $i++) { $data[$i]["start"] = $now + 19710329 * ($i + 1); $data[$i]["end"] = $data[$i]["start"] + 1000 * ($i + 1); } $data[0]["title"] = _("Das ist der erste Termin"); $data[1]["title"] = _("Das ist der zweite Termin"); $data[2]["title"] = _("Das ist der dritte Termin"); $data[0]["content"] = str_repeat(_("Erster Termin") . "  ", 10); $data[1]["content"] = str_repeat(_("Zweiter Termin") . "  ", 10); $data[2]["content"] = str_repeat(_("dritter Termin ") . "  ", 10); break; case "kategorien" : $data["headline"] = _("Eigene Kategorie"); $data["content"] = str_repeat(_("Eigene Kategorie") . "  ", 10); break; case "lehre" : $now = time(); $data[0]["start_time"] = $now - 164160000; $data[1]["start_time"] = $now; $data[2]["start_time"] = $now + 164160000; $data[0]["name"] = sprintf(_('Veranstaltung %u'), 1); $data[1]["name"] = sprintf(_('Veranstaltung %u'), 2); $data[2]["name"] = sprintf(_('Veranstaltung %u'), 3); $data[0]["untertitel"] = sprintf(_('Untertitel der Veranstaltung %u'), 1); $data[1]["untertitel"] = sprintf(_('Untertitel der Veranstaltung %u'), 2); $data[2]["untertitel"] = sprintf(_('Untertitel der Veranstaltung %u'), 3); break; case "head" : $nameformat = $this->config->getValue("Main", "nameformat"); $user = User::build([ 'vorname' => 'Peter', 'nachname' => 'Meyer', 'title_front' => 'Dr.', ]); $data['fullname'] = $user->getFullName($nameformat); $data['instfunction'] = _("HochschullehrerIn"); $data["Name"] = _("Mustereinrichtung"); $data["Strasse"] = _("Musterstraße 23"); $data["Plz"] = _("12345 Musterstadt"); $data["raum"] = "A 123"; $data["Telefon"] = "213 - 237 192"; $data["Fax"] = "213 - 237 191"; $data["Email"] = "email@email.org"; $data["Home"] = "http://www.studip.de"; $data["sprechzeiten"] = _("Mo. und Do. 12.00 - 13.00"); break; } if ($first_loop) { echo "config->getAttributes("TableHeader", "table") . ">\n"; if ($this->config->getValue("Main", "studiplink") == "top") { $args = ["width" => "100%", "height" => "40", "link" => ""]; echo "\n"; $this->elements["StudipLink"]->printout($args); echo ""; } $first_loop = FALSE; } switch ($data_field) { case "lebenslauf" : case "schwerp" : case "publi" : echo "\n\n"; echo "config->getAttributes("TableParagraph", "table") . ">\n"; echo "config->getAttributes("TableParagraphHeadline", "tr"); echo ">config->getAttributes("TableParagraphHeadline", "td"); echo ">config->getAttributes("TableParagraphHeadline", "font") . ">\n"; echo $aliases_content[$position] . "\n"; echo "config->getAttributes("TableParagraphText", "tr") . ">"; echo "config->getAttributes("TableParagraphText", "td") . ">"; echo "$text_divconfig->getAttributes("TableParagraphText", "font") . ">\n"; echo $data["content"]; echo "$text_div_end\n\n\n"; break; case "news" : case "termine" : case "kategorien" : case "lehre" : case "head" : $data_field($this, $data, $aliases_content[$position], $text_div, $text_div_end); } } } // fit size of image if ($pic_max_width && $pic_max_height) { $pic_size = @getimagesize($GLOBALS['CANONICAL_RELATIVE_PATH_STUDIP'] . "user/" . $db->f("user_id") . ".jpg"); if ($pic_size[0] > $pic_max_width || $pic_size[1] > $pic_max_height) { $fak_width = $pic_size[0] / $pic_max_width; $fak_height = $pic_size[1] / $pic_max_height; if ($fak_width > $fak_height) { $pic_width = (int) ($pic_size[0] / $fak_width); $pic_height = (int) ($pic_size[1] / $fak_width); } else { $pic_height = (int) ($pic_size[1] / $fak_height); $pic_width = (int) ($pic_size[0] / $fak_height); } } else { $pic_width = $pic_size[0]; $pic_height = $pic_size[1]; } $pic_max_width = $pic_width; $pic_max_height = $pic_height; } else { $pic_max_width = ""; $pic_max_height = ""; } if ($this->config->getValue("Main", "studiplink") == "bottom") { $args = ["width" => "100%", "height" => "40", "link" => ""]; echo "\n"; $this->elements["StudipLink"]->printout($args); echo ""; } echo "\n"; function news (&$module, $data, $alias_content, $text_div, $text_div_end) { if ($margin = $module->config->getValue("TableParagraphSubHeadline", "margin")) { $subheadline_div = "
"; $subheadline_div_end = "
"; } else { $subheadline_div = ""; $subheadline_div_end = ""; } echo "\n"; echo "config->getAttributes("TableParagraph", "table") . ">\n"; echo "config->getAttributes("TableParagraphHeadline", "tr") . ">"; echo "config->getAttributes("TableParagraphHeadline", "td") . ">"; echo "config->getAttributes("TableParagraphHeadline", "font") . ">"; echo "$alias_content\n"; foreach ($data as $dat) { echo "config->getAttributes("TableParagraphSubHeadline", "tr") . ">"; echo "config->getAttributes("TableParagraphSubHeadline", "td") . ">"; echo $subheadline_div; echo "config->getAttributes("TableParagraphSubHeadline", "font") . ">"; echo $dat["topic"]; echo "$subheadline_div_end\n"; echo "config->getAttributes("TableParagraphText", "tr") . ">"; list ($content, $admin_msg) = explode("", $dat["body"]); echo "config->getAttributes("TableParagraphText", "td") . ">"; echo "$text_divconfig->getAttributes("TableParagraphText", "font") . ">"; echo $content; echo "$text_div_end\n"; } echo "\n\n"; } function termine (&$module, $data, $alias_content, $text_div, $text_div_end) { if (Config::get()->CALENDAR_ENABLE) { if ($margin = $module->config->getValue("TableParagraphSubHeadline", "margin")) { $subheadline_div = "
"; $subheadline_div_end = "
"; } else { $subheadline_div = ""; $subheadline_div_end = ""; } echo "\n"; echo "config->getAttributes("TableParagraph", "table") . ">\n"; echo "config->getAttributes("TableParagraphHeadline", "tr") . ">"; echo "config->getAttributes("TableParagraphHeadline", "td") . ">"; echo "config->getAttributes("TableParagraphHeadline", "font") . ">"; echo "$alias_content\n"; foreach ($data as $dat) { echo "config->getAttributes("TableParagraphSubHeadline", "tr") . ">"; echo "config->getAttributes("TableParagraphSubHeadline", "td") . ">"; echo $subheadline_div; echo "config->getAttributes("TableParagraphSubHeadline", "font") . ">"; echo strftime($module->config->getValue("Main", "dateformat") . " %H.%m", $dat["start"]); if (date("dmY", $dat["start"]) == date("dmY", $dat["end"])) echo strftime(" - %H.%m", $dat["end"]); else echo strftime(" - " . $module->config->getValue("Main", "dateformat") . " %H.%m", $dat["end"]); echo "  " . $dat["title"]; echo "$subheadline_div_end\n"; echo "config->getAttributes("TableParagraphText", "tr") . ">"; echo "config->getAttributes("TableParagraphText", "td") . ">"; echo "$text_divconfig->getAttributes("TableParagraphText", "font") . ">"; echo $dat["content"]; echo "$text_div_end\n"; } echo "\n\n"; } } function kategorien (&$module, $data, $alias_content, $text_div, $text_div_end) { echo "\n"; echo "config->getAttributes("TableParagraph", "table") . ">\n"; echo "config->getAttributes("TableParagraphHeadline", "tr") . ">"; echo "config->getAttributes("TableParagraphHeadline", "td") . ">"; echo "config->getAttributes("TableParagraphHeadline", "font") . ">"; echo $data["headline"]; echo "\n"; echo "config->getAttributes("TableParagraphText", "tr") . ">"; echo "config->getAttributes("TableParagraphText", "td") . ">"; echo "$text_divconfig->getAttributes("TableParagraphText", "font") . ">"; echo $data["content"]; echo "$text_div_end\n\n\n"; } function lehre (&$module, $data, $alias_content, $text_div, $text_div_end) { global $attr_text_td; $all_semester = Semester::findAllVisible(false); // old hard coded $SEMESTER-array starts with index 1 array_unshift($all_semester, 0); if ($margin = $module->config->getValue("TableParagraphSubHeadline", "margin")) { $subheadline_div = "
"; $subheadline_div_end = "
"; } else { $subheadline_div = ""; $subheadline_div_end = ""; } if ($margin = $module->config->getValue("List", "margin")) { $list_div = "
"; $list_div_end = "
"; } else { $list_div = ""; $list_div_end = ""; } // sem-types in class 1 (Lehre) foreach ($GLOBALS["SEM_TYPE"] as $key => $type) { if ($type["class"] == 1) $types[] = $key; } $types = implode("','", $types); $switch_time = mktime(0, 0, 0, date("m"), date("d") + 7 * $module->config->getValue("PersondetailsLectures", "semswitch"), date("Y")); // get current semester $current_sem = get_sem_num($switch_time) + 1; switch ($module->config->getValue("PersondetailsLectures", "semstart")) { case "previous" : if (isset($all_semester[$current_sem - 1])) $current_sem--; break; case "next" : if (isset($all_semester[$current_sem + 1])) $current_sem++; break; case "current" : break; default : if (isset($all_semester[$module->config->getValue("PersondetailsLectures", "semstart")])) $current_sem = $module->config->getValue("PersondetailsLectures", "semstart"); } $last_sem = $current_sem + $module->config->getValue("PersondetailsLectures", "semrange") - 1; if ($last_sem < $current_sem) $last_sem = $current_sem; if (!isset($all_semester[$last_sem])) $last_sem = sizeof($all_semester) - 1; $out = ""; for (;$current_sem <= $last_sem; $last_sem--) { if (!($module->config->getValue("PersondetailsLectures", "semstart") == "current" && $module->config->getValue("PersondetailsLectures", "semrange") == 1)) { $out .= "config->getAttributes("TableParagraphSubHeadline", "tr") . ">"; $out .= "config->getAttributes("TableParagraphSubHeadline", "td") . ">"; $out .= $subheadline_div; $out .= "config->getAttributes("TableParagraphSubHeadline", "font") . ">"; $month = date("n", $all_semester[$last_sem]["beginn"]); if($month > 9) { $out .= $module->config->getValue("PersondetailsLectures", "aliaswise"); $out .= date(" Y/", $all_semester[$last_sem]["beginn"]) . date("y", $all_semester[$last_sem]["ende"]); } else if($month > 3 && $month < 10) { $out .= $module->config->getValue("PersondetailsLectures", "aliassose"); $out .= date(" Y", $all_semester[$last_sem]["beginn"]); } $out .= "$subheadline_div_end\n"; } $out .= "config->getAttributes("TableParagraphText", "tr") . ">"; $out .= "config->getAttributes("TableParagraphText", "td") . ">"; if ($module->config->getValue("PersondetailsLectures", "aslist")) { $out .= "$list_divconfig->getAttributes("List", "ul") . ">\n"; foreach ($data as $dat) { $out .= "config->getAttributes("List", "li") . ">"; $out .= "config->getAttributes("LinkIntern", "font") . ">"; $out .= "config->getAttributes("LinkIntern", "a") . ">"; $out .= $dat["name"] . "\n"; $out .= "config->getAttributes("TableParagraphText", "font") . ">
"; $out .= $dat["untertitel"] . "\n"; } $out .= "$list_div_end"; } else { $out .= $text_div; $j = 0; foreach ($data as $dat) { if ($j) $out .= "

"; $out .= "config->getAttributes("LinkIntern", "font") . ">"; $out .= "config->getAttributes("LinkIntern", "a") . ">"; $out .= $dat["name"] . "\n"; $out .= "config->getAttributes("TableParagraphText", "font") . ">"; $out .= "
" . $dat["untertitel"] . "\n"; $j = 1; } $out .= $text_div_end; } $out .= "\n"; } if ($out) { $out_title = "\n"; $out_title .= "config->getAttributes("TableParagraph", "table") . ">\n"; $out_title .= "config->getAttributes("TableParagraphHeadline", "tr") . ">"; $out_title .= "config->getAttributes("TableParagraphHeadline", "td") . ">"; $out_title .= "config->getAttributes("TableParagraphHeadline", "font") . ">"; $out_title .= $alias_content . "\n"; echo $out_title . $out . "\n\n"; } } function head (&$module, $data, $a) { if ($module->config->getValue("Main", "showcontact") && $module->config->getValue("Main", "showimage")) $colspan = " colspan=\"2\""; else $colspan = ""; echo "\n"; echo "config->getAttributes("PersondetailsHeader", "table") . ">\n"; if (!$module->config->getValue('PersondetailsHeader', 'hidename')) { echo "config->getAttributes("PersondetailsHeader", "tr") . ">"; echo "config->getAttributes("PersondetailsHeader", "headlinetd") . ">"; echo "config->getAttributes("PersondetailsHeader", "font") . ">"; echo $data["fullname"]; echo "\n"; } if ($module->config->getValue("Main", "showimage") || $module->config->getValue("Main", "showcontact")) { echo ""; if ($module->config->getValue("Main", "showcontact") && ($module->config->getValue("Main", "showimage") == "right" || !$module->config->getValue("Main", "showimage"))) { echo "config->getAttributes("PersondetailsHeader", "contacttd") . ">"; echo kontakt($module, $data) . "\n"; } if ($module->config->getValue("Main", "showimage")) { echo "config->getAttributes("PersondetailsHeader", "picturetd") . ">"; echo "getUrl(Avatar::NORMAL)."\" alt=\"Foto " . $data["fullname"] . "\""; echo $module->config->getAttributes("PersondetailsHeader", "img") . ">"; } if ($module->config->getValue("Main", "showcontact") && $module->config->getValue("Main", "showimage") == "left") { echo "config->getAttributes("PersondetailsHeader", "contacttd") . ">"; echo kontakt($module, $data) . "\n"; } echo "\n"; if ($module->config->getValue('Main', 'showcontact') && $module->config->getValue('Contact', 'separatelinks')) { echo "config->getValue('Main', 'showimage')) echo ' colspan="2"'; echo $module->config->getAttributes('PersondetailsHeader', 'contacttd') . ">\n"; echo kontakt($module, $data, TRUE); echo "\n"; } } echo "\n\n"; } function kontakt (&$module, $data, $separate = FALSE) { $attr_table = $module->config->getAttributes("Contact", "table"); $attr_tr = $module->config->getAttributes("Contact", "table"); $attr_td = $module->config->getAttributes("Contact", "td"); $attr_fonttitle = $module->config->getAttributes("Contact", "fonttitle"); $attr_fontcontent = $module->config->getAttributes("Contact", "fontcontent"); $out = "\n"; if (!$separate) { $out .= ""; $out .= ""; $out .= ""; if ($headline = $module->config->getValue("Contact", "headline")) $out .= "$headline\n"; else $out .= "\n"; $out .= ""; if (!$module->config->getValue("Contact", "hidepersname")) $out .= "

" . $data["fullname"] . "\n"; if ($module->config->getValue('Contact', 'showinstgroup')) $out .= "
{$data['instfunction']}\n"; if ($module->config->getValue("Contact", "hideinstname") != '1') { if ($module->config->getValue("Contact", "hideinstname") == 'link') $out .= "

" . $data["Name"] . "
"; else $out .= "

" . $data["Name"] . "
"; } if ($module->config->getValue("Contact", "adradd")) $out .= "
" . $module->config->getValue("Contact", "adradd"); $out .= "

" . $data["Strasse"]; $out .= "
" . $data["Plz"]; $out .= "

\n"; } $order = $module->config->getValue("Contact", "order"); $visible = $module->config->getValue("Contact", "visible"); $alias_contact = $module->config->getValue("Contact", "aliases"); foreach ($order as $position) { if (!$visible[$position]) continue; $data_field = $module->data_fields["contact"][$position]; switch ($data_field) { case 'Email' : if ($separate || !$module->config->getValue('Contact', 'separatelinks')) { $out .= ""; $out .= ""; $out .= ""; $out .= $alias_contact[$position] . ""; $out .= ""; $out .= ""; $out .= "{$data['Email']}"; } break; case 'Home' : if ($separate || !$module->config->getValue('Contact', 'separatelinks')) { $out .= ""; $out .= ""; $out .= ""; $out .= $alias_contact[$position] . ""; $out .= ""; $out .= "{$data['Home']}"; } break; default: if (!$separate) { $out .= ""; $out .= ""; $out .= ""; $out .= $alias_contact[$position] . ""; $out .= ""; $out .= "{$data[$data_field]}"; } } $out .= "\n"; } $out .= "\n"; return $out; } ?>