Title = 'Aktuality'; $this->Description = 'Aktualní informace'; $this->ParentClass = 'PagePortal'; } function ShowView(): string { $Output = ''; if (!ModuleUser::Cast($this->System->GetModule('User'))->User->CheckPermission('News', 'Display', 'Item')) $Output .= 'Nemáte oprávnění'; else { $Category = $this->GetCategory(); if (array_key_exists('id', $_GET) and is_numeric($_GET['id'])) $Id = $_GET['id'] * 1; else return $Output .= 'Položka nenalezena.'; $DbResult = $this->Database->query('SELECT `News`.*, `User`.`Name` FROM `News` '. 'LEFT JOIN `User` ON `User`.`Id`=`News`.`User` WHERE (`News`.`Id`='.$Id.')'. ModuleNews::Cast($this->System->GetModule('News'))->GetIntranetCondition()); if ($DbResult->num_rows > 0) { $Row = $DbResult->fetch_assoc(); if ($Row['Name'] == '') $Author = $Row['Author']; else $Author = $Row['Name']; $Output .= '