Changeset 900 for trunk/Modules
- Timestamp:
- Apr 10, 2024, 11:49:39 PM (9 months ago)
- Location:
- trunk/Modules
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Export/ExportOutput.php
r894 r900 300 300 if ($DbResult->num_rows == 0) 301 301 { 302 $System->Database->query('INSERT INTO ExportTask (`Export` ,`TimeStart` ) VALUES ('.$ExportId.', NOW())');302 $System->Database->query('INSERT INTO `ExportTask` (`Export`, `TimeStart` ) VALUES ('.$ExportId.', NOW())'); 303 303 $System->ModuleManager->Modules['Log']->WriteLog('Zadání úlohy pro vygenerování DBC souboru', LOG_TYPE_DOWNLOAD); 304 304 } -
trunk/Modules/Export/ProcessTask.php
r899 r900 156 156 $this->DeleteOldFiles($Export->TempDir.'CzWoW'); 157 157 158 // copy need files158 // copy needed files 159 159 $this->SetProgress(5); 160 160 echo('Copy files...'."\n"); -
trunk/Modules/Forum/Forum.php
r893 r900 167 167 $DbResult = $this->System->Database->query('SELECT * FROM `ForumThread` WHERE 1 ORDER BY `ID` DESC '.$PageList['SQLLimit']); 168 168 while ($Line = $DbResult->fetch_assoc()) 169 { 169 170 $Output .= '<div><span style="float:right;"><strong>'.$Line['UserName']. 170 '</strong> - ('.HumanDate($Line['Date']).')</span> <a href="?Thread='.$Line['ID'].'">'. 171 str_replace("\n", '', htmlspecialchars($Line['Text'])).'</a></div>'; 171 '</strong> - ('.HumanDate($Line['Date']).')</span> <a href="?Thread='.$Line['ID'].'">'. 172 str_replace("\n", '', htmlspecialchars($Line['Text'])).'</a></div>'; 173 } 172 174 $Output .= '</div>'.$PageList['Output']; 173 175 return $Output; -
trunk/Modules/Referrer/Referrer.php
r893 r900 93 93 $Output .= $BannerSmall.' <textarea rows="2" cols="30">'.htmlspecialchars($BannerSmall).'</textarea><br />'; 94 94 95 if ($User->Licence(LICENCE_ADMIN)) {96 97 $MonthAge = 3;98 $YesNo = array('Ne', 'Ano');99 $Output .= '<br/><strong>'.T('Servers referring to us').':</strong> <br />100 <div style="font-size: 10px;">Seznam je automaticky aktualizován a zobrazeny jsou servery, ze kterých přišli uživatelé během posledních třech měsíců řazený sestupně dle nejnovějších.</div><br />';101 102 if (!$User->Licence(LICENCE_ADMIN)) $Where = ' WHERE (`Visible`=1) AND (`Parent` IS NULL)';103 else $Where = '';104 $Query = 'SELECT *, (SELECT Web FROM `Referrer` AS T4 WHERE T4.Id = T3.Parent) AS ParentName '.95 if ($User->Licence(LICENCE_ADMIN)) 96 { 97 $MonthAge = 3; 98 $YesNo = array('Ne', 'Ano'); 99 $Output .= '<br/><strong>'.T('Servers referring to us').':</strong> <br />'. 100 '<div style="font-size: 10px;">Seznam je automaticky aktualizován a zobrazeny jsou servery, ze kterých přišli uživatelé během posledních třech měsíců řazený sestupně dle nejnovějších.</div><br />'; 101 102 if (!$User->Licence(LICENCE_ADMIN)) $Where = ' WHERE (`Visible`=1) AND (`Parent` IS NULL)'; 103 else $Where = ''; 104 $Query = 'SELECT *, (SELECT Web FROM `Referrer` AS T4 WHERE T4.Id = T3.Parent) AS ParentName '. 105 105 'FROM (SELECT *, '. 106 106 '(`Hits` + COALESCE((SELECT SUM(`Hits`) FROM '. … … 111 111 'WHERE (`T3`.`MaxDateLast` > (NOW() - INTERVAL '.$MonthAge.' MONTH))'; 112 112 113 114 $DbResult = $this->Database->query('SELECT COUNT(*) FROM ('.$Query.') AS T'); 115 $DbRow = $DbResult->fetch_row(); 116 $PageList = GetPageList($DbRow[0]); 117 118 $Output .= $PageList['Output']. 119 '<table class="BaseTable">'; 120 121 $TableColumns = array( 113 $DbResult = $this->Database->query('SELECT COUNT(*) FROM ('.$Query.') AS T'); 114 $DbRow = $DbResult->fetch_row(); 115 $PageList = GetPageList($DbRow[0]); 116 117 $Output .= $PageList['Output']. 118 '<table class="BaseTable">'; 119 120 $TableColumns = array( 122 121 array('Name' => 'Web', 'Title' => T('Address')), 123 122 array('Name' => 'MaxDateLast', 'Title' => T('Last visit')), 124 123 array('Name' => 'TotalHits', 'Title' => T('Hits')), 125 );126 if ($User->Licence(LICENCE_ADMIN))127 {128 $TableColumns[] = array('Name' => 'Visible', 'Title' => T('Visible'));129 $TableColumns[] = array('Name' => 'Parent', 'Title' => T('Parent'));130 $TableColumns[] = array('Name' => 'Description', 'Title' => T('Comment'));131 $TableColumns[] = array('Name' => 'LastIP', 'Title' => T('Last IP address'));132 $TableColumns[] = array('Name' => 'Action', 'Title' => T('Actions'));133 }134 $Order = GetOrderTableHeader($TableColumns, 'MaxDateLast', 1);135 $Output .= $Order['Output'];136 137 $Query .= $Order['SQL'].$PageList['SQLLimit'];138 139 $DbResult = $this->Database->query($Query);140 while ($Line = $DbResult->fetch_assoc())141 {142 $Output .= '<tr><td><a href="'.$Line['LastURL'].'">'.$Line['Web'].'</a></td>'.124 ); 125 if ($User->Licence(LICENCE_ADMIN)) 126 { 127 $TableColumns[] = array('Name' => 'Visible', 'Title' => T('Visible')); 128 $TableColumns[] = array('Name' => 'Parent', 'Title' => T('Parent')); 129 $TableColumns[] = array('Name' => 'Description', 'Title' => T('Comment')); 130 $TableColumns[] = array('Name' => 'LastIP', 'Title' => T('Last IP address')); 131 $TableColumns[] = array('Name' => 'Action', 'Title' => T('Actions')); 132 } 133 $Order = GetOrderTableHeader($TableColumns, 'MaxDateLast', 1); 134 $Output .= $Order['Output']; 135 136 $Query .= $Order['SQL'].$PageList['SQLLimit']; 137 138 $DbResult = $this->Database->query($Query); 139 while ($Line = $DbResult->fetch_assoc()) 140 { 141 $Output .= '<tr><td><a href="'.$Line['LastURL'].'">'.$Line['Web'].'</a></td>'. 143 142 '<td>'.HumanDate($Line['MaxDateLast']).'</td>'. 144 143 '<td>'.$Line['TotalHits'].'</td>'; 145 if ($User->Licence(LICENCE_ADMIN)) 146 { 147 $Output .= 148 '<td>'.$YesNo[$Line['Visible']].'</td>'. 149 '<td>'.$Line['ParentName'].'</td>'. 150 '<td>'.$Line['Description'].'</td>'. 151 '<td>'.$Line['LastIP'].'</td>'. 152 '<td><a href="?action=edit&id='.$Line['Id'].'">'.T('Modify').'</a> '. 153 '<a href="?action=spam&id='.$Line['Id'].'">'.T('Spam').'</a></td>'; 144 if ($User->Licence(LICENCE_ADMIN)) 145 { 146 $Output .= 147 '<td>'.$YesNo[$Line['Visible']].'</td>'. 148 '<td>'.$Line['ParentName'].'</td>'. 149 '<td>'.$Line['Description'].'</td>'. 150 '<td>'.$Line['LastIP'].'</td>'. 151 '<td><a href="?action=edit&id='.$Line['Id'].'">'.T('Modify').'</a> '. 152 '<a href="?action=spam&id='.$Line['Id'].'">'.T('Spam').'</a></td>'; 153 } 154 $Output .= '</tr>'; 154 155 } 155 $Output .= '</tr>'; 156 } 157 $Output .= '</table>'; 158 $Output .= $PageList['Output']; 159 156 $Output .= '</table>'; 157 $Output .= $PageList['Output']; 160 158 } 161 159 return $Output; … … 263 261 } 264 262 } 265 -
trunk/Modules/Translation/Comparison.php
r893 r900 47 47 if ($User->Licence(LICENCE_USER)) 48 48 { 49 $Output = 'Text je porovnáván vždy ku předešlému (vlevo). Změny jsou zvýrazněny <span class="edit">barvou.</span><br /><br />'; 49 $Output = 'Text je porovnáván vždy ku předešlému (vlevo). Změny jsou zvýrazněny <span class="edit">barvou.</span><br /><br />'; 50 51 $GroupId = LoadGroupIdParameter(); 52 $Table = $TranslationTree[$GroupId]['TablePrefix']; 50 53 51 $GroupId = LoadGroupIdParameter(); 52 $Table = $TranslationTree[$GroupId]['TablePrefix']; 54 if (array_key_exists('entry', $_GET)) 55 { 56 $Textentry = $_GET['entry']; 57 if ((array_key_exists('ID1', $_GET)) and ($_GET['ID1'] <> -1)) //porovnání pouze 2 textů 58 { 59 $TextID1 = $_GET['ID1']; 60 $TextID2 = $_GET['ID2']; 61 $WhereID = ' AND ((`'.$Table.'`.`ID` = '.$TextID1.') OR (`'.$Table.'`.`ID` = '.$TextID2.'))'; 62 } else $WhereID = ''; 53 63 54 if (array_key_exists('entry', $_GET)) 55 { 56 $Textentry = $_GET['entry']; 57 if ((array_key_exists('ID1', $_GET)) and ($_GET['ID1'] <> -1)) //porovnání pouze 2 textů 58 { 59 $TextID1 = $_GET['ID1']; 60 $TextID2 = $_GET['ID2']; 61 $WhereID = ' AND ((`'.$Table.'`.`ID` = '.$TextID1.') OR (`'.$Table.'`.`ID` = '.$TextID2.'))'; 62 } else $WhereID = ''; 63 64 $DataID = $this->Database->query('SELECT `'.$Table.'`.*, `User`.`Name` AS `UserName`, '. 64 $DataID = $this->Database->query('SELECT `'.$Table.'`.*, `User`.`Name` AS `UserName`, '. 65 65 '`Language`.`Name` AS `LanguageName` '. 66 66 'FROM '.$Table.' LEFT JOIN `User` ON `User`.`Id` = `'.$Table.'`.`User` '. 67 67 ' LEFT JOIN `Language` ON `Language`.`Id` = `'.$Table.'`.`Language` '. 68 68 'WHERE `Entry` = '.$Textentry.' '.$WhereID.' ORDER BY `Language`'); 69 while ($Line[] = $DataID->fetch_assoc());70 array_pop($Line);69 while ($Line[] = $DataID->fetch_assoc()); 70 array_pop($Line); 71 71 72 $Output .= 'Počet porovnávaných textů: <strong>'.count($Line).'</strong><br /> ';72 $Output .= 'Počet porovnávaných textů: <strong>'.count($Line).'</strong><br /> '; 73 73 74 $Output .= '<strong>Číslo textu: <a href="http://www.wowhead.com/?quest='.$Textentry.'">'.$Textentry.'</a></strong>'.74 $Output .= '<strong>Číslo textu: <a href="http://www.wowhead.com/?quest='.$Textentry.'">'.$Textentry.'</a></strong>'. 75 75 '<table class="BaseTable">'. 76 76 '<tr><th>Přeložil</th>'; 77 foreach ($Line as $Index => $LineItem)78 $Output .= '<th>'.$LineItem['UserName'].'</th>';79 $Output .= '</tr>'.77 foreach ($Line as $Index => $LineItem) 78 $Output .= '<th>'.$LineItem['UserName'].'</th>'; 79 $Output .= '</tr>'. 80 80 '<tr>'. 81 81 '<th>ID textu</th>'; 82 foreach ($Line as $Index => $LineItem)83 $Output .= '<td><a href="form.php?group='.$GroupId.'&ID='.$LineItem['ID'].'">'.$LineItem['ID'].'</a></td>';84 $Output .= '</tr>'.82 foreach ($Line as $Index => $LineItem) 83 $Output .= '<td><a href="form.php?group='.$GroupId.'&ID='.$LineItem['ID'].'">'.$LineItem['ID'].'</a></td>'; 84 $Output .= '</tr>'. 85 85 '<tr><th>Převzato</th>'; 86 foreach ($Line as $Index => $LineItem)87 $Output .= '<td><a href="form.php?group='.$GroupId.'&ID='.$LineItem['Take'].'">'.$LineItem['Take'].'</a></td>';88 $Output .= '</tr>'.86 foreach ($Line as $Index => $LineItem) 87 $Output .= '<td><a href="form.php?group='.$GroupId.'&ID='.$LineItem['Take'].'">'.$LineItem['Take'].'</a></td>'; 88 $Output .= '</tr>'. 89 89 '<tr><th>'.T('Language').'</th>'; 90 foreach ($Line as $Index => $LineItem)91 $Output .= '<td>'.T($LineItem['LanguageName']).'</td>';92 $Output .= '</tr>'.90 foreach ($Line as $Index => $LineItem) 91 $Output .= '<td>'.T($LineItem['LanguageName']).'</td>'; 92 $Output .= '</tr>'. 93 93 '<tr><th>'.T('Version').'</th>'; 94 foreach ($Line as $Index => $LineItem) 95 $Output .= '<td>'.GetVersionWOW($LineItem['VersionStart']).' - '.GetVersionWOW($LineItem['VersionEnd']).'</td>'; 96 $Output .= '</tr>'; 97 foreach ($TranslationTree[$GroupId]['Items'] as $Index => $TextItem) 98 { 99 $writethis = false; 100 for ($i = 0; $i < count($Line); $i++) 94 foreach ($Line as $Index => $LineItem) 95 $Output .= '<td>'.GetVersionWOW($LineItem['VersionStart']).' - '.GetVersionWOW($LineItem['VersionEnd']).'</td>'; 96 $Output .= '</tr>'; 97 foreach ($TranslationTree[$GroupId]['Items'] as $Index => $TextItem) 101 98 { 102 if ($Line[$i][$TextItem['Column']] <> '') $writethis = true; 103 } 104 if ($writethis) 105 { 106 $Output .= '<tr><th>'.$TextItem['Name'].'</th>'; 99 $writethis = false; 107 100 for ($i = 0; $i < count($Line); $i++) 108 101 { 109 if ($i > 0) 102 if ($Line[$i][$TextItem['Column']] <> '') $writethis = true; 103 } 104 if ($writethis) 105 { 106 $Output .= '<tr><th>'.$TextItem['Name'].'</th>'; 107 for ($i = 0; $i < count($Line); $i++) 110 108 { 111 $Output .= '<td>'; 112 $Output .= str_replace("\n", '<br/>', $this->CompareString(htmlspecialchars($Line[$i][$TextItem['Column']]),htmlspecialchars($Line[$i - 1][$TextItem['Column']]))); 113 $Output .= '</td>'; 114 } else $Output .= '<td>'.htmlspecialchars($Line[$i][$TextItem['Column']]).'</td>'; 109 if ($i > 0) 110 { 111 $Output .= '<td>'; 112 $Output .= str_replace("\n", '<br/>', $this->CompareString(htmlspecialchars($Line[$i][$TextItem['Column']]),htmlspecialchars($Line[$i - 1][$TextItem['Column']]))); 113 $Output .= '</td>'; 114 } else $Output .= '<td>'.htmlspecialchars($Line[$i][$TextItem['Column']]).'</td>'; 115 } 116 $Output .= '</tr>'; 115 117 } 116 $Output .= '</tr>';117 118 } 118 } 119 $Output .= '</table>'; 120 } else $Output .= ShowMessage('Nebylo zadáno ID.', MESSAGE_CRITICAL); 121 } else $Output .= ShowMessage('Porovnávat můžou pouze překladatelé!', MESSAGE_CRITICAL); 119 $Output .= '</table>'; 120 } else $Output .= ShowMessage('Nebylo zadáno ID.', MESSAGE_CRITICAL); 121 } else $Output .= ShowMessage('Porovnávat můžou pouze překladatelé!', MESSAGE_CRITICAL); 122 122 123 123 return $Output; -
trunk/Modules/Translation/Form.php
r893 r900 28 28 $Table = $TranslationTree[$GroupId]['TablePrefix']; 29 29 if (array_key_exists('action', $_GET)) $Action = $_GET['action']; 30 else $Action = '';30 else $Action = ''; 31 31 32 32 if (array_key_exists('ID', $_GET)) … … 50 50 foreach ($TranslationTree[$GroupId]['Items'] as $Index => $TextItem) 51 51 $Columns .= ' `Orig`.`'.$TextItem['Column'].'` as `Orig_'.$TextItem['Column'].'`, `Tran`.`'.$TextItem['Column'].'` as `'.$TextItem['Column'].'`,'; 52 53 52 54 53 $sql = 'SELECT '.$Columns.' Tran.`Entry` FROM `'.$Table.'` as Tran'; … … 175 174 176 175 if ($TranslationTree[$GroupId]['WowheadName'] != '') 177 $WowheadLink = '<a href="http ://www.wowhead.com/?'.$TranslationTree[$GroupId]['WowheadName'].176 $WowheadLink = '<a href="https://www.wowhead.com/?'.$TranslationTree[$GroupId]['WowheadName']. 178 177 '='.$LineAJ['Entry'].'">'.$LineAJ['Entry'].'</a>'; 179 178 else $WowheadLink = $LineAJ['Entry']; 180 179 181 $Output .= '<input type="hidden" name="entry" value="'.$LineAJ['Entry'].'" /> 182 <input type="hidden" name="user" value="'.$User->Id.'" />183 <input type="hidden" name="ID" value="'.$TextID.'" />184 <table class="BaseTable">185 <tr>186 <th>'.T('Text number').': '.$WowheadLink.'</th>187 <th>'.T('Not translated').'</th>188 <th>'.T('Translated').'</th>189 </tr>190 <tr>191 <th>'.T('Language').'</th>192 <td>'.T('Original').'</td>193 <td>';180 $Output .= '<input type="hidden" name="entry" value="'.$LineAJ['Entry'].'" />'. 181 '<input type="hidden" name="user" value="'.$User->Id.'" />'. 182 '<input type="hidden" name="ID" value="'.$TextID.'" />'. 183 '<table class="BaseTable">'. 184 '<tr>'. 185 '<th>'.T('Text number').': '.$WowheadLink.'</th>'. 186 '<th>'.T('Not translated').'</th>'. 187 '<th>'.T('Translated').'</th>'. 188 '</tr>'. 189 '<tr>'. 190 '<th>'.T('Language').'</th>'. 191 '<td>'.T('Original').'</td>'. 192 '<td>'; 194 193 if ($Line['Language'] <> 0) $Language = $Line['Language']; 195 194 else if ($User->Id != 0) … … 239 238 if ($User->Licence(LICENCE_USER)) 240 239 $Output .= '<textarea rows="8" cols="40" onkeydown="ResizeTextArea(this)" class="textedit" id="'.$TextItem['Column'].'" name="'.$TextItem['Column'].'">'; 241 $Output .= 240 $Output .= htmlspecialchars($Line[$TextItem['Column']]); 242 241 if ($User->Licence(LICENCE_USER)) $Output .= '</textarea></td></tr>'; 243 242 } -
trunk/Modules/Translation/LoadNames.php
r893 r900 3 3 class PageLoadNames extends Page 4 4 { 5 function ReplaceTranslated($orig, $tran,$Text,$ID,$Group)5 function ReplaceTranslated($orig, $tran, $Text, $ID, $Group) 6 6 { 7 7 $tran_replace = str_replace(' ',' ',htmlspecialchars($tran)); … … 21 21 } 22 22 23 function ReplaceNotTranslated($orig, $tran,$Text,$ID,$Group)23 function ReplaceNotTranslated($orig, $tran, $Text, $ID, $Group) 24 24 { 25 25 $orig_replace = str_replace(' ',' ',htmlspecialchars($orig)); … … 96 96 } 97 97 //$LineAJ[$Column] 98 return $this->ColorNames(htmlspecialchars($Text), $names);98 return $this->ColorNames(htmlspecialchars($Text), $names); 99 99 } 100 100 -
trunk/Modules/Translation/Save.php
r893 r900 18 18 // Get data for english original 19 19 $DbResult = $this->Database->query('SELECT * FROM `'.$Table.'` WHERE (`Entry`='.$SourceText['Entry'].') '. 20 21 20 'AND (`Language` = '.Core::Cast($this->System)->Config['OriginalLanguage'].') AND (`VersionStart` = '.$SourceText['VersionStart'].') '. 21 'AND (`VersionEnd` = '.$SourceText['VersionEnd'].')'); 22 22 if ($DbResult->num_rows > 0) 23 23 { -
trunk/Modules/Translation/TranslationList.php
r893 r900 257 257 258 258 $Query = 'SELECT `T`.`ModifyTime`, `T`.`ID`, `T`.`Entry`, `T`.`VersionStart`, `T`.`VersionEnd`, '. 259 260 261 262 263 264 265 266 267 259 '`T`.`'.$TranslationTree[$Filter['Group']]['Items'][0]['Column'].'`, '. 260 '`User`.`Name` AS `UserName`, `User`.`ID` AS `UserId`, '. 261 '`Language`.`Name` AS `LanguageName`, `TS`.`Version` AS `VersionStartText`, `TE`.`Version` AS `VersionEndText` '. 262 'FROM `'.$Table.'` AS `T` '. 263 'LEFT JOIN `User` ON `User`.`ID` = `T`.`User` '. 264 'LEFT JOIN `Language` ON `Language`.`ID` = `T`.`Language` '. 265 'LEFT JOIN `ClientVersion` AS `TS` ON `TS`.`BuildNumber` = `T`.`VersionStart` '. 266 'LEFT JOIN `ClientVersion` AS `TE` ON `TE`.`BuildNumber` = `T`.`VersionEnd` '. 267 'WHERE 1 '.$Filter['SQL']; 268 268 269 269 // Get total item count 270 $DbResult = $this->Database->query('SELECT COUNT(*) FROM ('.$Query.') AS `TT`'); 270 $DbResult = $this->Database->query('SELECT COUNT(*) FROM ('.$Query.') AS `TT`'); 271 271 $DbRow = $DbResult->fetch_row(); 272 272 $PageList = GetPageList($DbRow[0]); … … 274 274 $Output .= $PageList['Output']; 275 275 $TableColumns = array( 276 277 278 279 280 281 282 283 276 array('Name' => 'ID', 'Title' => T('Number')), 277 array('Name' => 'Entry', 'Title' => T('Item')), 278 array('Name' => $TranslationTree[$Filter['Group']]['Items'][0]['Column'], 'Title' => T('Name')), 279 array('Name' => 'VersionStart', 'Title' => T('From version')), 280 array('Name' => 'VersionEnd', 'Title' => T('To version')), 281 array('Name' => 'LanguageName', 'Title' => T('Language')), 282 array('Name' => 'UserName', 'Title' => T('Translator')), 283 array('Name' => 'ModifyTime', 'Title' => T('Date')), 284 284 ); 285 285 286 286 $Order = GetOrderTableHeader($TableColumns, 'VersionStart', 1); 287 287 $Output .= '<table class="BaseTable">'. 288 288 $Order['Output']; 289 289 290 290 $DbResult = $this->Database->query($Query.' '.$Order['SQL'].' '.$PageList['SQLLimit']); 291 291 while ($Line = $DbResult->fetch_assoc()) 292 292 { 293 $Text = $Line[$TranslationTree[$Filter['Group']]['Items'][0]['Column']]; 294 if ($Text != null) $Text = htmlspecialchars($Text); 295 293 296 $Output .= '<tr><td><a href="'.$this->System->Link('/form.php?group='.$Filter['Group'].'&ID='.$Line['ID']).'">'.$Line['ID'].'</a></td>'. 294 297 '<td>'.$Line['Entry'].'</td>'. 295 '<td>'. htmlspecialchars($Line[$TranslationTree[$Filter['Group']]['Items'][0]['Column']]).'</td>'.298 '<td>'.$Text.'</td>'. 296 299 '<td><a href="'.$this->System->Link('/client-version/?action=item&id='. 297 300 GetVersionWOWId($Line['VersionStart'])).'">'.GetVersionWOW($Line['VersionStart']).'</a></td>'. … … 317 320 $Total = 0; 318 321 foreach ($TranslationTree as $Group) 322 { 319 323 if ($Group['TablePrefix'] != '') 320 324 { … … 326 330 $Total += $Line[0]; 327 331 } 328 $Output .= '<tr><td><strong>'.T('Total').'</strong></td><td><strong>'.$Total.'</strong></td></tr>'. 329 '</table>'; 330 return $Output; 332 } 333 $Output .= '<tr><td><strong>'.T('Total').'</strong></td><td><strong>'.$Total.'</strong></td></tr>'. 334 '</table>'; 335 return $Output; 331 336 } 332 337 … … 338 343 $GroupId = GetParameter('group', 0, true); 339 344 if ($GroupId == 0) $Output = ShowMessage('Skupina nenalezena', MESSAGE_CRITICAL); 340 else { 345 else 346 { 341 347 $Table = $TranslationTree[$GroupId]['TablePrefix']; 342 348 343 349 $Output = '<h3>'.T('Basic text filtering').'</h3><br/>'. 344 345 346 347 348 349 350 351 352 350 '<table class="BaseTable"><tr><th>'.T('Link').'</th><th>'.T('Description').'</th></tr>'. 351 '<tr><td><a title="'.T('All texts available in group').'" href="?group='.$GroupId.'&state=4">'.T('All').'</a></td>'. 352 '<td>'.T('Show all available original texts in group').'</td></tr>'. 353 '<tr><td><a title="'.T('Translated texts, you can modify them here').'" href="?group='.$GroupId.'&state=2">'.T('Translated').'</a></td>'. 354 '<td>'.T('Show only translated texts').'</td></tr>'. 355 '<tr><td><a title="'.T('Untranslated texts').'" href="?group='.$GroupId.'&state=1">'.T('Untranslated').'</a></td>'. 356 '<td>'.T('Not yet translated texts which need to be translated').'</td></tr>'. 357 '<tr><td><a title="'.T('Unfinished texts').'" href="?group='.$GroupId.'&state=3">'.T('Unfinished').'</a></td>'. 358 '<td>'.T('Texts marked as unfinished').'</td></tr>'; 353 359 354 360 if ($User->Licence(LICENCE_USER)) … … 361 367 362 368 $Output .= '<tr><td><form action="?group='.$GroupId.'&entry=" method="post"><div>'. 363 364 365 366 369 '<input type="text" name="text" size="8" />'. 370 '<input type="submit" value="'.T('Search').'" />'. 371 '</div></form>'. 372 '</td><td>'.T('Search using text').'</td></tr>'; 367 373 368 374 $Output .= '<tr><td><form action="?group='.$GroupId.'&text=" method="post"><div>'. 369 370 371 372 375 '<input type="text" name="entry" size="8" />'. 376 '<input type="submit" value="'.T('Search').'" />'. 377 '</div></form>'. 378 '</td><td>'.T('Show by datbase text ID').'</td></tr>'; 373 379 374 380 $Output .= '</table>'; … … 396 402 function ShowList() 397 403 { 398 $User = ModuleUser::Cast($this->System->GetModule('User'))->User; 404 $User = ModuleUser::Cast($this->System->GetModule('User'))->User; 399 405 $DbResult = $this->Database->query('SELECT COUNT(*) FROM `Group`'); 400 406 $DbRow = $DbResult->fetch_row(); … … 448 454 { 449 455 $Output = '<h3>Vložení nové překladové skupiny</h3>'. 450 451 452 453 454 455 456 '<form action="?action=groupaddfinish" method="post">'. 457 '<table>'. 458 '<tr><td>Název:</td><td><input type="text" name="Name"/></td></tr>'. 459 '<tr><td>Název tabulky v databázi:</td><td>Text<input type="text" name="TablePrefix"/></td></tr>'. 460 '<tr><td colspan="2"><input type="submit" name="add" value="Přidat"/></td></tr>'. 461 '</table></form>'; 456 462 } else $Output = ShowMessage(T('Access denied'), MESSAGE_CRITICAL); 457 463 return $Output; -
trunk/Modules/User/Profile.php
r893 r900 37 37 38 38 $Output .= '<h3>'.T('Exports').'</h3>'. 39 39 $PageList['Output']; 40 40 41 41 $TableColumns = array( 42 43 44 45 46 47 48 49 42 array('Name' => 'TimeCreate', 'Title' => T('Creation time')), 43 array('Name' => 'Title', 'Title' => T('Name')), 44 // array('Name' => 'UserCount', 'Title' => 'Vybraných překladatelů'), 45 // array('Name' => 'GroupCount', 'Title' => 'Překladových skupin'), 46 array('Name' => 'OutputType', 'Title' => T('Output type')), 47 array('Name' => 'ClientVersion', 'Title' => T('Client version')), 48 array('Name' => 'UsedCount', 'Title' => T('Output inspections')), 49 array('Name' => '', 'Title' => T('Actions')), 50 50 ); 51 51 $Order = GetOrderTableHeader($TableColumns, 'TimeCreate', 1); … … 73 73 } 74 74 $Output .= '</table>'. 75 75 $PageList['Output']; 76 76 77 77 $Output .= '<div style="text-align: center;"><a href="'.$this->System->Link('/export/').'">'.T('Export page').'</a></div>'; … … 141 141 { 142 142 $Output = ''; 143 if (!is_numeric($_GET['user'])) 144 { 145 $Output .= ShowMessage('Uživatel nenalezen', MESSAGE_CRITICAL); 146 return $Output; 147 } 143 148 $User = ModuleUser::Cast($this->System->GetModule('User'))->User; 144 149 $Query = 'SELECT `User`.`Name`, `UserTrace`.`LastLogin`, `UserTrace`.`LastIP`, '. … … 177 182 $Output .= T('Translator is using this rules:').'<br />'; 178 183 $Output .= '<ul>'; 179 while ($UserTag = $DbResult->fetch_array()) { 184 while ($UserTag = $DbResult->fetch_array()) 185 { 180 186 $Output .= ' <li>'.$UserTag['Text'].'</li>'; 181 187 } -
trunk/Modules/User/UserList.php
r888 r900 26 26 $Output .= '<h3>'.sprintf(T('Users in team %s'), htmlspecialchars($Team['Name'])).'</h3>'; 27 27 $TeamFilter = ' AND (`Team`='.$_GET['team'].')'; 28 } else { 28 } else 29 { 29 30 $Output .= ShowMessage(sprintf(T('Team %d not found'), $TeamId), MESSAGE_CRITICAL); 30 31 } … … 69 70 } 70 71 $Output .= '</table>'. 71 72 $PageList['Output']; 72 73 73 74 return $Output;
Note:
See TracChangeset
for help on using the changeset viewer.