Changeset 901 for trunk/Modules
- Timestamp:
- Oct 2, 2024, 10:31:47 PM (7 weeks ago)
- Location:
- trunk/Modules
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/ClientVersion/ClientVersion.php
r888 r901 39 39 } 40 40 41 function ShowItem() 41 function ShowItem(): string 42 42 { 43 if (array_key_exists('id', $_GET)) 43 $Id = 0; 44 if (TryGetUrlParameterInt('id', $Id)) 44 45 { 45 46 $YesNo = array('Ne', 'Ano'); 46 $DbResult = $this->System->Database->query('SELECT * FROM `ClientVersion` WHERE `Id`='. ($_GET['id']*1));47 $DbResult = $this->System->Database->query('SELECT * FROM `ClientVersion` WHERE `Id`='.$Id); 47 48 if ($DbResult->num_rows > 0) 48 49 { 49 50 $Version = $DbResult->fetch_assoc(); 50 51 51 $Output = '<h3>'.T('Client version').'</h3>';52 $Output .= '<table class="BaseTable">'.53 '<tr><td>'.T('Version').'</td><td>'.$Version['Version'].'</td></tr>'.54 '<tr><td>'.T('More information').'</td><td><a href="http://www.wowwiki.com/Patch_'.$Version['Version'].'">wowwiki.com'.55 '</a></td></tr>'.56 '<tr><td>'.T('Build number').'</td><td>'.$Version['BuildNumber'].'</td></tr>'.57 '<tr><td>'.T('Release date').'</td><td>'.HumanDate($Version['ReleaseDate']).'</td></tr>'.58 '<tr><td>'.T('Title').'</td><td>'.$Version['Title'].'</td></tr>'.59 '<tr><td>'.T('Imported').'</td><td>'.$YesNo[$Version['Imported']].'</td></tr>'.60 '</table>';52 $Output = '<h3>'.T('Client version').'</h3>'; 53 $Output .= '<table class="BaseTable">'. 54 '<tr><td>'.T('Version').'</td><td>'.$Version['Version'].'</td></tr>'. 55 '<tr><td>'.T('More information').'</td><td><a href="http://www.wowwiki.com/Patch_'.$Version['Version'].'">wowwiki.com'. 56 '</a></td></tr>'. 57 '<tr><td>'.T('Build number').'</td><td>'.$Version['BuildNumber'].'</td></tr>'. 58 '<tr><td>'.T('Release date').'</td><td>'.HumanDate($Version['ReleaseDate']).'</td></tr>'. 59 '<tr><td>'.T('Title').'</td><td>'.$Version['Title'].'</td></tr>'. 60 '<tr><td>'.T('Imported').'</td><td>'.$YesNo[$Version['Imported']].'</td></tr>'. 61 '</table>'; 61 62 $Output .= '<div><a href="?">'.T('All versions list').'</a></div>'; 62 63 if ($Version['Imported']) 64 { 63 65 $Output .= '<div><a href="'.$this->System->Link('/progress/?Version='. 64 66 $Version['Version']).'">'.T('Progress').'</a></div>'; 67 } 65 68 } else $Output = ShowMessage(T('Item not found'), MESSAGE_CRITICAL); 66 } else $Output = ShowMessage(T('I tem not found'), MESSAGE_CRITICAL);69 } else $Output = ShowMessage(T('Id not valid'), MESSAGE_CRITICAL); 67 70 return $Output; 68 71 } 69 72 70 function ShowList() 73 function ShowList(): string 71 74 { 72 75 $this->Title = T('Game version'); -
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; -
trunk/Modules/Translation/Form.php
r900 r901 30 30 else $Action = ''; 31 31 32 if (array_key_exists('ID', $_GET)) 32 $TextID = 0; 33 if (TryGetUrlParameterInt('ID', $TextID)) 33 34 { 34 $TextID = $_GET['ID'] * 1;35 35 $this->ID = $TextID; 36 36
Note:
See TracChangeset
for help on using the changeset viewer.