Changeset 455 for trunk/index.php
- Timestamp:
- Apr 13, 2010, 10:03:12 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/index.php
r436 r455 13 13 function ShowNews() 14 14 { 15 global $ Database;15 global $System; 16 16 17 17 $Output = '<strong>Změny systému:</strong><div class="NewsBox">'; 18 $DbResult = $ Database->SQLCommand('SELECT `News`.`Time`, `User`.`Name`, `News`.`Text` FROM `News` JOIN `User` ON `User`.`ID` = `News`.`User` ORDER BY `Time` DESC LIMIT 10');19 while($DbRow = mysql_fetch_assoc($DbResult))18 $DbResult = $System->Database->query('SELECT `News`.`Time`, `User`.`Name`, `News`.`Text` FROM `News` JOIN `User` ON `User`.`ID` = `News`.`User` ORDER BY `Time` DESC LIMIT 10'); 19 while($DbRow = $DbResult->fetch_assoc()) 20 20 $Output .= '<div><strong>'.$DbRow['Name'].' ('.HumanDate($DbRow['Time']).')</strong> <br />'.$DbRow['Text'].'</div>'; 21 21 $Output .= '<a href="action.php?action=news">Všechny zprávy</a>'; … … 56 56 function ShowRSSChannel() 57 57 { 58 global $ Database, $Config, $System;58 global $System, $Config, $System; 59 59 60 60 $Items = array(); 61 61 if($_GET['rss'] == 'news') 62 62 { 63 $DbResult = $ Database->SQLCommand('SELECT UNIX_TIMESTAMP(`News`.`Time`) AS `UnixTime`, `News`.`Time`, `User`.`Name`, `News`.`Text` FROM `News` JOIN `User` ON `User`.`ID` = `News`.`User` ORDER BY `Time` DESC LIMIT 10');64 while($DbRow = mysql_fetch_assoc($DbResult))63 $DbResult = $System->Database->query('SELECT UNIX_TIMESTAMP(`News`.`Time`) AS `UnixTime`, `News`.`Time`, `User`.`Name`, `News`.`Text` FROM `News` JOIN `User` ON `User`.`ID` = `News`.`User` ORDER BY `Time` DESC LIMIT 10'); 64 while($DbRow = $DbResult->fetch_assoc()) 65 65 { 66 66 $Items[] = array … … 83 83 if($_GET['rss'] == 'translation') 84 84 { 85 $DbResult = $ Database->SQLCommand('SELECT UNIX_TIMESTAMP(`Date`) AS `Date`, `User`.`Name` AS `UserName`, `Text` FROM `Log` JOIN `User` ON `User`.`ID` = `Log`.`User` WHERE `Type` = 1 ORDER BY `Date` DESC LIMIT 100');86 while($DbRow = mysql_fetch_assoc($DbResult))85 $DbResult = $System->Database->query('SELECT UNIX_TIMESTAMP(`Date`) AS `Date`, `User`.`Name` AS `UserName`, `Text` FROM `Log` JOIN `User` ON `User`.`ID` = `Log`.`User` WHERE `Type` = 1 ORDER BY `Date` DESC LIMIT 100'); 86 while($DbRow = $DbResult->fetch_assoc()) 87 87 { 88 88 $Items[] = array … … 107 107 $TitleLength = 50; 108 108 mb_internal_encoding('utf-8'); 109 $DbResult = $ Database->SQLCommand('SELECT UNIX_TIMESTAMP(`Date`) AS `UnixDate`, `User`, `Text` FROM `ShoutBox` ORDER BY `ID` DESC LIMIT 20');110 while($DbRow = mysql_fetch_assoc($DbResult))109 $DbResult = $Sytem->Database->query('SELECT UNIX_TIMESTAMP(`Date`) AS `UnixDate`, `User`, `Text` FROM `ShoutBox` ORDER BY `ID` DESC LIMIT 20'); 110 while($DbRow = $DbResult->fetch_assoc()) 111 111 { 112 112 $Title = mb_substr($DbRow['Text'], 0, $TitleLength);
Note:
See TracChangeset
for help on using the changeset viewer.