Changeset 189 for trunk/aktuality/news.php
- Timestamp:
- Apr 12, 2009, 5:40:08 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/aktuality/news.php
r183 r189 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 ick` 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`.`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); 30 30 //echo($Database->error.'<br />'); 31 31 //echo($Database->LastQuery.'<br />'); … … 38 38 while($Row = $DbResult->fetch_array()) 39 39 { 40 if($Row['N ick'] == '') $Author = $Row['author'];41 else $Author = $Row['N ick'];40 if($Row['Name'] == '') $Author = $Row['author']; 41 else $Author = $Row['Name']; 42 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>'; 43 43 $Output .= '<div id="new'.$Category.$Index.'" class="NewsTableItem">'.$Row['content'];
Note:
See TracChangeset
for help on using the changeset viewer.