Changeset 850 for trunk/Modules/Translation/Translation.php
- Timestamp:
- Jan 17, 2016, 8:15:03 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Translation/Translation.php
r846 r850 49 49 'Icon' => '', 50 50 )); 51 /*52 51 if(array_key_exists('Search', $this->System->ModuleManager->Modules)) 53 52 { … … 68 67 } 69 68 } 70 */71 69 } 72 70 … … 96 94 return($Output); 97 95 } 96 97 function ShowBox() 98 { 99 $Count = 40; 100 $Output = '<strong>'.T('Last translated').':</strong>'; 101 102 $GroupListQuery = 'SELECT `Group`.* FROM `Group`'; 103 $Query = ''; 104 $UnionItems = array(); 105 $DbResult = $this->Database->query($GroupListQuery); 106 if($DbResult->num_rows > 0) 107 { 108 while($DbRow = $DbResult->fetch_assoc()) 109 { 110 $UnionItems[] = 'SELECT `T`.`ID`, `T`.`Take`, `T`.`User`, `T`.`ModifyTime`, `T`.`Group`, `T`.`GroupName` '. 111 'FROM (SELECT `T`.`User`, `T`.`ID`, `T`.`ModifyTime`, '. 112 $DbRow['Id'].' AS `Group`, "'.addslashes($DbRow['Name']).'" AS `GroupName`, `T`.`Take` FROM `'. 113 $DbRow['TablePrefix'].'` AS `T`'. 114 ' WHERE (`T`.`Complete` = 1) AND (`T`.`Language` != '.$this->System->Config['OriginalLanguage'].') ORDER BY `T`.`ModifyTime` DESC LIMIT '. 115 $Count.') AS `T`'; 116 } 117 $Query = 'SELECT `TT`.*, `User`.`Name` AS `UserName`, `User`.`Id` AS `UserId` '. 118 ' FROM ('.implode(' UNION ', $UnionItems).') AS `TT`'. 119 ' JOIN `User` ON `User`.`Id` = `TT`.`User`'. 120 ' ORDER BY `ModifyTime` DESC LIMIT '.$Count; 121 $DbResult = $this->Database->query($Query); 122 $Output .= '<table class="MiniTable"><tr><th>'.T('Date').'</th><th>'.T('Who').'</th><th>'.T('New').'</th><th>'.T('Source').'</th><th>'.T('Group').'</th></tr>'; 123 while($DbRow = $DbResult->fetch_assoc()) 124 { 125 $Output .= '<tr><td>'.HumanDate($DbRow['ModifyTime']).'</td>'. 126 '<td><a href="'.$this->System->Link('/user/?user='.$DbRow['UserId']).'">'.$DbRow['UserName'].'</a></td>'. 127 '<td><a href="'.$this->System->Link('/form.php?group='.$DbRow['Group'].'&ID='.$DbRow['ID']).'">'.$DbRow['ID'].'</a></td>'. 128 '<td><a href="'.$this->System->Link('/form.php?group='.$DbRow['Group'].'&ID='.$DbRow['Take']).'">'.$DbRow['Take'].'</a></td>'. 129 '<td><a href="'.$this->System->Link('/TranslationList.php?group='.$DbRow['Group'].'&action=filter').'">'.T($DbRow['GroupName']).'</a></td></tr>'; 130 } 131 $Output .= '</table>'; 132 } 133 return($Output); 134 } 98 135 }
Note:
See TracChangeset
for help on using the changeset viewer.