Changeset 501 for trunk/aktuality/news.php
- Timestamp:
- Mar 10, 2013, 8:15:46 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/aktuality/news.php
r500 r501 44 44 function ShowNews($Category, $ItemCount, $DaysAgo) 45 45 { 46 global $ Database, $NewsCategoryNames, $NewsCountPerCategory, $UploadedFilesFolder;46 global $NewsCategoryNames, $NewsCountPerCategory, $UploadedFilesFolder; 47 47 48 48 $ItemCount = abs($ItemCount); 49 49 $DaysAgo = abs($DaysAgo); 50 $DbResult = $ Database->select('NewsCategory', '*', 'Id='.$Category);50 $DbResult = $this->Database->select('NewsCategory', '*', 'Id='.$Category); 51 51 $Row = $DbResult->fetch_array(); 52 52 $Output = '<div class="NewsPanel"><div class="Title">'.$Row['Caption']; … … 55 55 $Output .= ' <a href="aktuality/index.php?action=add&category='.$Category.'">Přidat</a>'; 56 56 $Output .= '</div></div><div class="Content">'; 57 $DbResult = $Database->query('SELECT `News`.*, `User`.`Name` FROM `News` LEFT JOIN `User` ON `User`.`Id`=`News`.`User` WHERE (`News`.`Category`='.$Category.') AND (DATE_SUB(NOW(), INTERVAL '.$DaysAgo.' DAY) < `News`.`Date`) ORDER BY `News`.`Date` DESC LIMIT 0,'.$ItemCount); 58 //echo('<table cellpadding="0" cellspacing="0" width="100%"><tr><td>'); 57 $DbResult = $this->Database->query('SELECT `News`.*, `User`.`Name` FROM `News` LEFT JOIN `User` ON `User`.`Id`=`News`.`User` WHERE (`News`.`Category`='.$Category.') AND (DATE_SUB(NOW(), INTERVAL '.$DaysAgo.' DAY) < `News`.`Date`) ORDER BY `News`.`Date` DESC LIMIT 0,'.$ItemCount); 59 58 $Index = 0; 60 59 $FontSize = 12;
Note:
See TracChangeset
for help on using the changeset viewer.