- Timestamp:
- Feb 2, 2014, 6:39:24 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Translation/TranslationList.php
r772 r775 19 19 { 20 20 global $TranslationTree; 21 21 22 22 $Filter = array('SQL' => ''); 23 23 24 24 $Output = '<form action="?" method="post">'. 25 25 '<table class="BaseTable"><tr>'. … … 32 32 '<th>Položka</th>'. 33 33 '<th></th></tr><tr>'; 34 34 35 35 // State 36 36 $Filter['State'] = GetParameter('state', 0, true, true); 37 37 $Output .= '<td><select name="state">'; 38 38 $StateTypes = array( 39 CompletionState::All => 'Všechny', 39 CompletionState::All => 'Všechny', 40 40 CompletionState::NotTranslated => 'Nepřeložené', 41 41 CompletionState::Translated => 'Přeložené', … … 52 52 } 53 53 $Output .= '</select></td>'; 54 54 55 55 // Translation group 56 56 if($GroupId == 0) … … 67 67 $Table = $TranslationTree[$Filter['Group']]['TablePrefix']; 68 68 } 69 69 70 70 $Output .= '<td><select name="group" style="width: 80px">'; 71 71 if($Filter['Group'] == 0) $Selected = ' selected="selected"'; … … 80 80 } 81 81 $Output .= '</select></td>'; 82 82 83 83 // Version 84 84 $Filter['Version'] = GetParameter('version', 0, true, true); … … 107 107 else $VersionFilter = ''; 108 108 //else $Filter['SQL'] .= ' AND '; DISTINCT(Entry) 109 109 110 110 // Language 111 111 $Filter['Language'] = GetParameter('lang', 0, true, true); … … 127 127 $LanguageFilter = ' AND (`T`.`Language` = '.$Filter['Language'].')'; 128 128 $LanguageFilterSub = ' AND (`Sub`.`Language` = '.$Filter['Language'].')'; 129 } 130 129 } 130 131 131 // User 132 132 $Filter['User'] = GetParameter('user', 0, true, true); … … 145 145 if($Filter['User'] != 0) $UserFilter = ' AND (`User` = '.$Filter['User'].')'; 146 146 else $UserFilter = ''; 147 147 148 148 // Words 149 149 $Filter['Text'] = GetParameter('text', '', false, true); … … 158 158 $Filter['SQL'] .= ' AND ('.implode(' OR ', $Items).')'; 159 159 } 160 160 161 161 // Entry 162 162 $Filter['Entry'] = GetParameter('entry', '', false, true); … … 166 166 $Filter['SQL'] .= ' AND (`Entry` = "'.$Filter['Entry'].'")'; 167 167 } 168 168 169 169 if($Filter['Group'] != 0) 170 170 { … … 196 196 ') AND (`T`.`Complete` = 0)'. 197 197 ''; 198 else if($Filter['State'] == CompletionState::Missing1) { 198 else if($Filter['State'] == CompletionState::Missing1) { 199 199 $Filter['SQL'] .= $UserFilter.$VersionFilter.' AND (`T`.`Complete` = 1) AND `T`.`Language` != '.$this->System->Config['OriginalLanguage']; 200 $Filter['SQL'] .= ' AND ('.implode(' OR ', $ItemsVar).') '; 200 $Filter['SQL'] .= ' AND ('.implode(' OR ', $ItemsVar).') '; 201 201 } 202 else if($Filter['State'] == CompletionState::Missing2) { 202 else if($Filter['State'] == CompletionState::Missing2) { 203 203 $Filter['SQL'] .= $UserFilter.$VersionFilter.' AND (`T`.`Complete` = 1) AND `T`.`Language` != '.$this->System->Config['OriginalLanguage']; 204 204 $Filter['SQL'] .= ' '. $WithoutAlter; 205 $Filter['SQL'] .= ' AND ('.implode(' OR ', $ItemsVar).') '; 205 $Filter['SQL'] .= ' AND ('.implode(' OR ', $ItemsVar).') '; 206 206 } 207 207 } 208 208 209 209 /* 210 210 // Ownership … … 224 224 if(($Filter['Owner'] == 2) AND ($Filter['User'] != 0)) $Filter['SQL'] .= ' AND (`User` = '.$Filter['User'].')'; 225 225 */ 226 226 227 227 $Output .= '<td><input type="submit" value="Filtrovat"/></td>'; 228 228 $Output .= '</tr></table>'; … … 231 231 return($Filter); 232 232 } 233 233 234 234 function ShowTranslationList($Filter) 235 235 { 236 236 global $TranslationTree; 237 237 238 238 $Output = $Filter['Output']; 239 239 $Table = $TranslationTree[$Filter['Group']]['TablePrefix']; 240 240 241 241 $Query = 'SELECT `T`.`ModifyTime`, `T`.`ID`, `T`.`Entry`, `T`.`VersionStart`, `T`.`VersionEnd`, '. 242 242 '`T`.`'.$TranslationTree[$Filter['Group']]['Items'][0]['Column'].'`, '. … … 249 249 'LEFT JOIN `ClientVersion` AS `TE` ON `TE`.`BuildNumber` = `T`.`VersionEnd` '. 250 250 'WHERE 1 '.$Filter['SQL']; 251 251 252 252 // Get total item count 253 253 $DbResult = $this->Database->query('SELECT COUNT(*) FROM ('.$Query.') AS `TT`'); 254 254 $DbRow = $DbResult->fetch_row(); 255 255 $PageList = GetPageList($DbRow[0]); 256 256 257 257 $Output .= $PageList['Output']; 258 258 $TableColumns = array( … … 265 265 array('Name' => 'ModifyTime', 'Title' => 'Datum'), 266 266 ); 267 267 268 268 $Order = GetOrderTableHeader($TableColumns, 'VersionStart', 1); 269 269 $Output .= '<table class="BaseTable">'. 270 270 $Order['Output']; 271 271 272 272 $DbResult = $this->Database->query($Query.' '.$Order['SQL'].' '.$PageList['SQLLimit']); 273 273 while($Line = $DbResult->fetch_assoc()) … … 286 286 return($Output); 287 287 } 288 288 289 289 function ShowGroupList($Filter) 290 290 { 291 291 global $TranslationTree; 292 292 293 293 $Output = $Filter['Output']; 294 294 295 295 $Output .= '<table class="BaseTable"><tr><th>Skupina</th><th>Počet</th></tr>'; 296 296 $Total = 0; … … 309 309 return($Output); 310 310 } 311 311 312 312 function ShowGroupTypeList() 313 313 { … … 317 317 $Output = '<h3>Seznam překladových skupin</h3>'. 318 318 $PageList['Output']; 319 319 320 320 $Output .= '<table class="BaseTable">'; 321 321 $TableColumns = array( … … 324 324 array('Name' => '', 'Title' => 'Zdroje'), 325 325 array('Name' => 'LastImport', 'Title' => 'Datum posledního importu'), 326 array('Name' => 'LastVersion', 'Title' => 'Verze posledního importu'), 326 array('Name' => 'LastVersion', 'Title' => 'Verze posledního importu'), 327 327 ); 328 328 if($this->System->User->Licence(LICENCE_ADMIN)) 329 $TableColumns[] = array('Name' => '', 'Title' => 'Akce'); 330 329 $TableColumns[] = array('Name' => '', 'Title' => 'Akce'); 330 331 331 $Order = GetOrderTableHeader($TableColumns, 'Name', 0); 332 332 $Output .= $Order['Output']; 333 333 334 334 $DbResult = $this->Database->query('SELECT * FROM `Group`'.$Order['SQL'].$PageList['SQLLimit']); 335 335 while($Group = $DbResult->fetch_assoc()) … … 339 339 if($Group['DBCFileName'] != '') $Output .= $Group['DBCFileName'].'.dbc '; 340 340 if($Group['LuaFileName'] != '') $Output .= $Group['LuaFileName'].'.lua '; 341 $Output .= '</td><td><a title="Změny po posledním importu u vybrané překladové skupiny" href="log.php?group='. 342 $Group['Id'].'&type=11">'.HumanDate($Group['LastImport']).'</a></td><td><a href="'.$this->System->Link('/client-version/?action=item&id='.GetVersionWOWId($Group['LastVersion'])).'">'.GetVersionWOW($Group['LastVersion']).'</a></td>'; 341 $Output .= '</td>'; 342 if($this->System->User->Licence(LICENCE_ADMIN)) 343 $Output .= '<td><a title="Změny po posledním importu u vybrané překladové skupiny" href="log.php?group='. 344 $Group['Id'].'&type=11">'.HumanDate($Group['LastImport']).'</a></td>'; 345 else $Output .= '<td>'.HumanDate($Group['LastImport']).'</td>'; 346 $Output .= '<td><a href="'.$this->System->Link('/client-version/?action=item&id='. 347 GetVersionWOWId($Group['LastVersion'])).'">'.GetVersionWOW($Group['LastVersion']).'</a></td>'; 343 348 if($this->System->User->Licence(LICENCE_ADMIN)) 344 349 $Output .= '<td><a href="?action=groupdelete&id='.$Group['Id'].'">Smazat</a></td>'; 345 $Output .= '</tr>'; 346 350 $Output .= '</tr>'; 351 347 352 } 348 353 $Output .= '</table>'. … … 351 356 return($Output); 352 357 } 353 358 354 359 function ShowMenu() 355 360 { 356 361 global $TranslationTree; 357 362 358 363 $GroupId = GetParameter('group', 0, true); 359 364 if($GroupId == 0) $Output = ShowMessage('Skupina nenalezena', MESSAGE_CRITICAL); 360 365 else { 361 366 $Table = $TranslationTree[$GroupId]['TablePrefix']; 362 367 363 368 $Output = '<h3>Základní filtrování textů</h3><br/>'. 364 369 '<table class="BaseTable"><tr><th>Odkaz</th><th>Popis</th></tr>'. … … 371 376 '<tr><td><a title="Nedokončené texty" href="?group='.$GroupId.'&state=3">Nedokončené</a></td>'. 372 377 '<td>Texty označené jako rozpracované.</td></tr>'; 373 378 374 379 if($this->System->User->Licence(LICENCE_USER)) 375 380 { … … 379 384 <td>Přeložené texty přihlášeného uživatele</td></tr>'; 380 385 } 381 386 382 387 $Output .= '<tr><td><form action="?group='.$GroupId.'&entry=" method="post"><div>'. 383 388 '<input type="text" name="text" size="8" />'. … … 385 390 '</div></form>'. 386 391 '</td><td>Vyhledat pomocí textu</td></tr>'; 387 392 388 393 $Output .= '<tr><td><form action="?group='.$GroupId.'&text=" method="post"><div>'. 389 394 '<input type="text" name="entry" size="8" />'. … … 391 396 '</div></form>'. 392 397 '</td><td>Zobrazit podle ID textu v databázi MaNGOSu</td></tr>'; 393 398 394 399 $Output .= '</table>'; 395 400 } 396 401 return($Output); 397 402 } 398 403 399 404 function ShowGroupAdd() 400 405 { … … 411 416 return($Output); 412 417 } 413 418 414 419 function ShowGroupAddFinish() 415 420 { … … 420 425 if($DbResult->num_rows == 0) 421 426 { 422 427 423 428 $this->System->Database->query('CREATE TABLE IF NOT EXISTS `'.$TableName.'` ( 424 429 `ID` int(11) NOT NULL AUTO_INCREMENT, … … 458 463 } else $Output = ShowMessage(T('Access denied'), MESSAGE_CRITICAL); 459 464 return($Output); 460 } 461 465 } 466 462 467 function ShowGroupDelete() 463 468 { … … 471 476 $this->Database->query('DELETE FROM `GroupItem` WHERE `Group`='.$Group['Id']); 472 477 $this->Database->query('DELETE FROM `Group` WHERE `Id`='.$Group['Id']); 473 $Output = ShowMessage('Překladová skupina '.$Group['Name'].' smazána', MESSAGE_INFORMATION); 478 $Output = ShowMessage('Překladová skupina '.$Group['Name'].' smazána', MESSAGE_INFORMATION); 474 479 } else $Output = ShowMessage('Překladová skupina nenalezena', MESSAGE_CRITICAL); 475 480 } else $Output = ShowMessage(T('Access denied'), MESSAGE_CRITICAL); -
trunk/includes/Version.php
r774 r775 1 1 <?php 2 2 3 // Subversion revision have to be updated always to next revision number 4 // before commiting new changes. 5 // Database revision have to be updated if database structure is changed 6 // and system will need database update. 3 // Subversion revision have to be updated always to next revision number 4 // before commiting new changes. 5 // Database revision have to be updated if database structure is changed 6 // and system will need database update. 7 7 8 $Revision = 77 4; // Subversion revision9 $DatabaseRevision = 748; // Database structure revision 8 $Revision = 775; // Subversion revision 9 $DatabaseRevision = 748; // Database structure revision 10 10 $ReleaseTime = '2014-02-02';
Note:
See TracChangeset
for help on using the changeset viewer.