Changeset 901 for trunk/Modules/News
- Timestamp:
- Oct 2, 2024, 10:31:47 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/News/News.php
r893 r901 97 97 $Output .= '<div class="shoutbox">'; 98 98 $DbResult = $this->System->Database->query('SELECT `News`.`Time`, `News`.`Text`, `News`.`Title`, `News`.`Id`, '. 99 99 '`User`.`Name` AS `User` FROM `News` JOIN `User` ON `User`.`Id`=`News`.`User` ORDER BY `News`.`Time` DESC '.$PageList['SQLLimit']); 100 100 while ($Line = $DbResult->fetch_assoc()) 101 101 { … … 108 108 function ShowItem() 109 109 { 110 if (array_key_exists('i', $_GET)) 110 $Id = 0; 111 if (TryGetUrlParameterInt('i', $Id)) 111 112 { 112 113 $Output = '<h3>'.T('News').'</h3>'; 113 114 $DbResult = $this->System->Database->query('SELECT `News`.`Time`, `News`.`Text`, `News`.`Title`, `News`.`Id`, '. 114 '`User`.`Name` AS `User` FROM `News` JOIN `User` ON `User`.`Id`=`News`.`User` WHERE `News`.`Id` = '. ($_GET['i'] * 1));115 '`User`.`Name` AS `User` FROM `News` JOIN `User` ON `User`.`Id`=`News`.`User` WHERE `News`.`Id` = '.$Id); 115 116 if ($DbResult->num_rows == 1) 116 117 { … … 118 119 $Output .= '<h4>'.$Line['Title'].' ('.HumanDate($Line['Time']).')</h4><div>'.$Line['Text'].' ('.$Line['User'].')</div>'; 119 120 } else $Output = ShowMessage(T('Item not found'), MESSAGE_CRITICAL); 120 } else $Output = ShowMessage(T('I tem not found'), MESSAGE_CRITICAL);121 } else $Output = ShowMessage(T('Id not valid'), MESSAGE_CRITICAL); 121 122 $Output .= '<br/><a href="'.$this->System->Link('/news/').'">'.T('All news').'</a>'; 122 123 return $Output;
Note:
See TracChangeset
for help on using the changeset viewer.