\n\n";
}
else
echo "config->getAttributes("TableHeader", "table") . ">\n";
$i = 0;
$this->elements["TableHeadrow"]->printout();
// no data to print
if ($error_message) {
echo "config->getAttributes("TableRow", "tr") . ">\n";
echo "| config->getAttributes("TableRow", "td") . " colspan=\"$i\">\n";
echo $error_message;
echo " | \n \n";
}
else {
$data["data_fields"] = $this->data_fields;
$dateform = $this->config->getValue("Main", "dateformat");
$show_date_author = $this->config->getValue("Main", "showdateauthor");
$not_author_link = $this->config->getValue("Main", "notauthorlink");
$query = "SELECT COUNT(*)
FROM Institute AS i
LEFT JOIN user_inst AS ui USING(Institut_id)
LEFT JOIN auth_user_md5 AS aum USING(user_id)
WHERE Institut_id = ? AND user_id = ? AND ui.inst_perms IN ('autor','tutor','dozent')";
$statement = DBManager::get()->prepare($query);
foreach($news as $news_id => $news_detail){
// Mitarbeiter/in am Institut
$statement->execute([
$this->config->range_id,
$news_detail->user_id,
]);
$institute_user = $statement->fetchColumn() ?: 0;
$statement->closeCursor();
// !!! LinkInternSimple is not the type of this element,
// the type of this element is LinkIntern !!!
// this is for compatibiliy reasons only
if ($show_date_author !== 'date') {
if ($not_author_link || !$institute_user)
$author_name = htmlReady(get_fullname($news_detail->user_id, $nameformat));
else
$author_name = $this->elements["LinkInternSimple"]->toString([
'content' => htmlReady(get_fullname($news_detail->user_id, $nameformat)),
'link_args' => 'username=' . get_username($news_detail->user_id),
'module' => 'Persondetails'
]);
}
switch ($show_date_author) {
case 'date' :
$data["content"]["date"] = strftime($dateform, $news_detail->date);
break;
case 'author' :
$data["content"]["date"] = $author_name;
break;
default :
$data["content"]["date"] = strftime($dateform, $news_detail->date) . " " . $author_name;
}
$data["content"]["topic"] = $this->elements["ContentNews"]->toString([
"content" => [
"topic" => htmlReady((string) $news_detail->topic),
"body" => formatReady((string) $news_detail->body, TRUE, TRUE),
]
]);
$this->elements["TableRow"]->printout($data);
}
echo "\n ";
}
if ($this->config->getValue("Main", "studiplink")) {
if ($this->config->getValue("Main", "studiplink") == "bottom") {
$args = ["width" => "100%",
"height" => "40", "link" => $studip_link];
echo " |
\n