Changeset 183 for trunk/aktuality/news.php
- Timestamp:
- Mar 26, 2009, 8:51:40 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/aktuality/news.php
r155 r183 27 27 $Output .= '<a href="aktuality/index.php?action=add&category='.$Category.'">Přidat aktualitu</a> '; 28 28 $Output .= '</td></tr><tr><td colspan="2">'; 29 $DbResult = $Database->query('SELECT `news`.*, `User`.`N ame` 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);29 $DbResult = $Database->query('SELECT `news`.*, `User`.`Nick` 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); 30 30 //echo($Database->error.'<br />'); 31 31 //echo($Database->LastQuery.'<br />'); … … 38 38 while($Row = $DbResult->fetch_array()) 39 39 { 40 $Output .= '<tr><td onclick="window.location=\'aktuality/index.php?action=view&id='.$Row['id'].'\'" onmouseover="zobraz('."'new".$Category.$Index."'".')" style="cursor: pointer; margin: 0px;"><table cellspacing="0" cellpadding="0" style="padding: 0px; margin: 0px; font-size: small; color: red;" width="100%"><tr><td style="font-size: '.$FontSize.'pt"><strong>'.$Row['title'].'</strong></td><td align="right" style="font-size: '.$FontSize.'pt">'.$Row['Name'].$Row['author'].' ('.HumanDate($Row['date']).')</td></tr></table>'; 40 if($Row['Nick'] == '') $Author = $Row['author']; 41 else $Author = $Row['Nick']; 42 $Output .= '<tr><td onclick="window.location=\'aktuality/index.php?action=view&id='.$Row['id'].'\'" onmouseover="zobraz('."'new".$Category.$Index."'".')" style="cursor: pointer; margin: 0px;"><table cellspacing="0" cellpadding="0" style="padding: 0px; margin: 0px; font-size: small; color: red;" width="100%"><tr><td style="font-size: '.$FontSize.'pt"><strong>'.$Row['title'].'</strong></td><td align="right" style="font-size: '.$FontSize.'pt">'.$Author.' ('.HumanDate($Row['date']).')</td></tr></table>'; 41 43 $Output .= '<div id="new'.$Category.$Index.'" class="NewsTableItem">'.$Row['content']; 42 44 … … 45 47 $Output .= '<br />Přílohy: '; 46 48 $Enclosures = explode(';', $Row['enclosure']); 47 foreach($Enclosures as $Enclosure)48 {49 if(file_exists($UploadedFilesFolder.$Enclosure)) $Output .= ' <a href="'.$UploadedFilesFolder.$Enclosure.'">'.$Enclosure.'</a>';50 }49 foreach($Enclosures as $Enclosure) 50 { 51 if(file_exists($UploadedFilesFolder.$Enclosure)) $Output .= ' <a href="'.$UploadedFilesFolder.$Enclosure.'">'.$Enclosure.'</a>'; 52 } 51 53 } 52 53 $Output .= '</div></td></tr>'; 54 $Index = $Index + 1; 55 $FontSize = $FontSize - 1; 56 } 57 $Output .= '</table>'; 54 $Output .= '</div></td></tr>'; 55 $Index = $Index + 1; 56 $FontSize = $FontSize - 1; 57 } 58 $Output .= '</table>'; 58 59 } 59 60 $Output .= '</td></tr></table>'."\n\n";
Note:
See TracChangeset
for help on using the changeset viewer.