- Timestamp:
- Jun 3, 2014, 9:40:12 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Translation/Form.php
r806 r813 11 11 $Action = ''; 12 12 if(array_key_exists('action', $_GET)) $Action = $_GET['action']; 13 13 14 14 if($Action == 'delete') $Output = $this->Delete(); 15 15 else $Output = $this->ShowForm(); 16 16 return($Output); 17 17 } 18 18 19 19 function ShowForm() 20 20 { 21 21 global $TranslationTree; 22 22 23 23 $Output = ''; 24 24 25 25 $GroupId = LoadGroupIdParameter(); 26 26 $this->GroupId = $GroupId; … … 28 28 if(array_key_exists('action', $_GET)) $Action = $_GET['action']; 29 29 else $Action = ''; 30 30 31 31 if(array_key_exists('ID', $_GET)) 32 32 { 33 33 $TextID = $_GET['ID'] * 1; 34 34 $this->ID = $TextID; 35 35 36 36 $DbResult = $this->Database->query('SELECT * FROM `'.$Table.'` WHERE `ID` = '.$TextID); 37 37 $Line = $DbResult->fetch_assoc(); … … 40 40 $Output .= ShowMessage('Překlad nenalezen.', MESSAGE_CRITICAL); 41 41 } else 42 { 42 { 43 43 if ($this->System->Config['OriginalLanguage'] == $Line['Language']){ 44 44 $LineAJ = $Line; 45 45 46 46 if ($this->System->User->Language <> '') $Language = '`Language` = '.$this->System->User->Language; 47 47 else $Language = '`Language` != '.$this->System->Config['OriginalLanguage']; … … 49 49 foreach($TranslationTree[$GroupId]['Items'] as $Index => $TextItem) 50 50 $Columns .= ' `Orig`.`'.$TextItem['Column'].'` as `Orig_'.$TextItem['Column'].'`, `Tran`.`'.$TextItem['Column'].'` as `'.$TextItem['Column'].'`,'; 51 52 51 52 53 53 $sql = 'SELECT '.$Columns.' Tran.`Entry` FROM `'.$Table.'` as Tran'; 54 54 $join = ' JOIN `'.$Table.'` as `Orig` ON `Orig`.`Language` = 0 AND `Tran`.`Entry` = `Orig`.`Entry` AND `Tran`.`VersionEnd` = `Orig`.`VersionEnd` '; … … 58 58 foreach($TranslationTree[$GroupId]['Items'] as $Index => $TextItem) 59 59 if($TextItem['Visible'] == 1) 60 if (($LineAJ[$TextItem['Column']] <> '') and 60 if (($LineAJ[$TextItem['Column']] <> '') and 61 61 ($LineSearch[$TextItem['Column']] <> '') and 62 62 ($LineSearch['Orig_'.$TextItem['Column']] <> $LineSearch[$TextItem['Column']]) and … … 66 66 $Line[$TextItem['Column']] = $LineSearch[$TextItem['Column']]; 67 67 // echo $Line[$TextItem['Column']].'<br />'; 68 } 68 } 69 69 } 70 70 71 71 } else { 72 72 $DbResult = $this->Database->query('SELECT * FROM `'.$Table.'` WHERE '. … … 80 80 } else 81 81 { 82 82 83 83 if($Line['User'] != '') 84 84 { … … 87 87 } else 88 88 $LineUser = array('Name' => ''); 89 89 90 90 $Output .= 'Skupina: <strong>'.$TranslationTree[$GroupId]['Name'].'</strong><br />'; 91 91 92 92 if(($Line['Language'] <> 0) and ($LineUser['Name'] <> '')) 93 93 $Output .= 'Přeložil: <strong>'.$LineUser['Name'].'</strong> dne '.HumanDate($Line['ModifyTime']).'<br />'; … … 97 97 $Language = $DbResult->fetch_assoc(); 98 98 // echo $Language['Language'].' '.$Line['Take']; 99 99 100 100 $DbResult = $this->Database->query('SELECT `Name` FROM `Language` WHERE `Id` ='.$Language['Language']); 101 101 $Lang = $DbResult->fetch_assoc(); 102 102 103 103 $Output .= 'Původní text: <strong>'. 104 104 ' ID <a href="form.php?group='.$GroupId.'&ID='.$Line['Take'].'">'.$Line['Take'].'</a></strong>'. … … 112 112 else $Output .= ' <b> Uložen v rozepsaných</b> '; 113 113 } else $Output .= ' <b>Anglická, původní verze</b> '; 114 114 115 115 $Output .= '<br />'. 116 116 'Verze: <b><a href="'.$this->System->Link('/client-version/?action=item&id='.GetVersionWOWId($Line['VersionStart'])).'">'.GetVersionWOW($Line['VersionStart']). 117 117 '</a> - <a href="'.$this->System->Link('/client-version/?action=item&id='.GetVersionWOWId($Line['VersionEnd'])).'">'.GetVersionWOW($Line['VersionEnd']).'</a></b>'. 118 118 '<br />'; 119 119 120 120 $DbResult = $this->Database->query('SELECT COUNT(*) FROM `'.$Table.'` WHERE '. 121 121 '(`Entry` = '.$Line['Entry'].')'); … … 129 129 <input type="hidden" name="entry" value="'.$Line['Entry'].'" /> 130 130 <input type="hidden" name="ID2" value="'.$TextID.'" />'; 131 131 132 132 if($this->System->User->Licence(LICENCE_USER)) { //allow to compare only to user 133 133 $Output .= '<select onchange="this.form.submit();" name="ID1"> … … 155 155 $Line['Entry'].'&text=">Počet verzí: <strong>'.$Version.'</strong></a>'; 156 156 } 157 158 // Special characters: $B - New line, $N - Name, $C - profession 157 158 // Special characters: $B - New line, $N - Name, $C - profession 159 159 if($this->System->User->Licence(LICENCE_USER)) 160 160 { … … 168 168 FollowingTran($TextID, $Table, $GroupId); 169 169 } 170 170 171 171 if($TranslationTree[$GroupId]['WowheadName'] != '') 172 172 $WowheadLink = '<a href="http://www.wowhead.com/?'.$TranslationTree[$GroupId]['WowheadName'].'='.$LineAJ['Entry'].'">'.$LineAJ['Entry'].'</a>'; 173 173 else $WowheadLink = $LineAJ['Entry']; 174 174 175 175 $Output .= '<input type="hidden" name="entry" value="'.$LineAJ['Entry'].'" /> 176 176 <input type="hidden" name="user" value="'.$this->System->User->Id.'" /> … … 192 192 } else $Language = 0; 193 193 if($this->System->User->Licence(LICENCE_USER)) $Output .= WriteLanguages($Language); 194 else { 195 $DbResult3 = $this->Database->select('Language', '`Id`, `Name`', ' `Enabled` = 1');196 if($DbResult3->num_rows > 0) 197 { 194 else { 195 $DbResult3 = $this->Database->select('Language', '`Id`, `Name`', '(`Enabled` = 1) AND (`Id`='.$Language.')'); 196 if($DbResult3->num_rows > 0) 197 { 198 198 $Language = $DbResult3->fetch_assoc(); 199 199 $Output .= $Language['Name']; 200 200 } 201 201 } 202 202 203 203 $Output .= '</td></tr>'; 204 204 205 205 //todo javascript 206 206 207 207 $Output .= '<script src="http://code.jquery.com/jquery-latest.js"></script>'. 208 208 '<script>'; … … 210 210 foreach($TranslationTree[$GroupId]['Items'] as $Index => $TextItem) 211 211 $Output .= '$("#'.$TextItem['Column'].'").load("'.$this->System->Link('/LoadNames.php?ID='.$LineAJ['ID'].'&Column='.$TextItem['Column'].'&GroupId='.$GroupId).'");'; 212 212 213 213 $Output .= '});'. 214 214 '</script>'; … … 224 224 $Output .= '<td id="'.$TextItem['Column'].'">'.str_replace("\n", '<br/>', htmlspecialchars($LineAJ[$TextItem['Column']])).'</td> 225 225 <td>'; 226 if($this->System->User->Licence(LICENCE_USER)) 226 if($this->System->User->Licence(LICENCE_USER)) 227 227 $Output .= '<textarea rows="8" cols="40" onkeydown="ResizeTextArea(this)" class="textedit" id="'.$TextItem['Column'].'" name="'.$TextItem['Column'].'">'; 228 228 $Output .= htmlspecialchars($Line[$TextItem['Column']]); … … 236 236 if($this->System->User->Licence(LICENCE_USER)) { 237 237 $Output .= '</form>'; 238 238 239 239 $Output .= '<table class="BaseTable">'. 240 240 '<tr><th>Překladač:</th><th>Nepřeložené</th><th>Přeložené</th>'; … … 243 243 if ($LineAJ[$TextItem['Column']] <> '') 244 244 $Output .= '<tr><td>'.$TextItem['Column'].'</td><td>'.$LineAJ[$TextItem['Column']].'</td><td>'.GetTranslateGoogle($LineAJ[$TextItem['Column']]).'</td></tr>'; 245 246 245 246 247 247 $Output .= '</table>'; 248 248 } … … 256 256 { 257 257 global $TranslationTree; 258 258 259 259 if($this->System->User->Licence(LICENCE_MODERATOR)) 260 260 { … … 268 268 } else $Output = ShowMessage(T('Access denied'), MESSAGE_CRITICAL); 269 269 return($Output); 270 } 270 } 271 271 } -
trunk/includes/Version.php
r812 r813 6 6 // and system will need database update. 7 7 8 $Revision = 81 2; // Subversion revision8 $Revision = 813; // Subversion revision 9 9 $DatabaseRevision = 811; // Database structure revision 10 $ReleaseTime = '2014-0 5-31';10 $ReleaseTime = '2014-06-03';
Note:
See TracChangeset
for help on using the changeset viewer.