Changeset 562 for trunk/Modules/FrontPage
- Timestamp:
- Aug 13, 2013, 11:45:33 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/FrontPage/FrontPage.php
r561 r562 11 11 $this->License = 'GNU/GPL'; 12 12 $this->Description = 'Main welcome page'; 13 $this->Dependencies = array( );13 $this->Dependencies = array('News', 'User', 'ShoutBox', 'Translation'); 14 14 } 15 15 … … 81 81 '</td></tr>'. 82 82 '<tr><td>'.$this->ShowLastTranslated().'</td>'. 83 '<td class="news-box">'.$this->S howNews().'</td>'.83 '<td class="news-box">'.$this->System->ModuleManager->Modules['News']->ShowBox().'</td>'. 84 84 '<td>'.$this->System->ModuleManager->Modules['ShoutBox']->ShowBox().'</td>'. 85 85 '</tr></table>'; 86 86 return($Output); 87 } 88 89 function ShowNews() 90 { 91 $Output = '<strong>Změny systému:</strong><div class="NewsBox">'; 92 $DbResult = $this->Database->query('SELECT `News`.`Time`, `User`.`Name`, `News`.`Text`,`News`.`Title`'. 93 ' FROM `News` JOIN `User` ON `User`.`ID` = `News`.`User` ORDER BY `Time` DESC LIMIT 10'); 94 while($DbRow = $DbResult->fetch_assoc()) 95 $Output .= '<div><strong>'.$DbRow['Title'].' ('.HumanDate($DbRow['Time']).')</strong> <br />'.$DbRow['Text'].' ('.$DbRow['Name'].')</div>'; 96 $Output .= '<a href="action.php?action=news">Všechny zprávy</a>'; 97 $Output .= '</div>'; 98 return($Output); 99 } 87 } 100 88 101 89 function ShowLastTranslated()
Note:
See TracChangeset
for help on using the changeset viewer.