Changeset 562 for trunk/action.php
- Timestamp:
- Aug 13, 2013, 11:45:33 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/action.php
r561 r562 184 184 } 185 185 186 function ShowNewsHistory()187 {188 global $System, $User;189 190 $DbResult = $System->Database->query('SELECT COUNT(*) FROM `News`');191 $DbRow = $DbResult->fetch_row();192 $PageList = GetPageList($DbRow[0]);193 194 $Output = '<h3>Novinky</h3>'.$PageList['Output'];195 if($User->Licence(LICENCE_ADMIN)) $Output .= ' <a href="admin/?action=addnew">Vložit</a>';196 $Output .= '<div class="shoutbox">';197 $DbResult = $System->Database->query('SELECT `News`.`Time`, `News`.`Text`, `News`.`Title`, '.198 '`User`.`Name` AS `User` FROM `News` JOIN `User` ON `User`.`Id`=`News`.`User` ORDER BY `News`.`Time` DESC '.$PageList['SQLLimit']);199 while($Line = $DbResult->fetch_assoc())200 $Output .= '<div><strong>'.$Line['Title'].' ('.HumanDate($Line['Time']).')</strong><br/> '.$Line['Text'].' ('.$Line['User'].')</div>';201 $Output .= '</div>'.$PageList['Output'];202 return($Output);203 }204 186 205 187 if(array_key_exists('group', $_GET)) $GroupId = LoadGroupIdParameter(); … … 209 191 if(array_key_exists('action', $_GET)) $Action = $_GET['action']; 210 192 211 if($Action == 'news') $Output = ShowNewsHistory();212 193 else if($Action == 'search') $Output = Search(); 213 194 else if($Action == 'dbkit') $Output = DatabaseKit();
Note:
See TracChangeset
for help on using the changeset viewer.