1 | <?php
|
---|
2 |
|
---|
3 | include('includes/global.php');
|
---|
4 |
|
---|
5 | ShowPage();
|
---|
6 |
|
---|
7 | $GroupId = LoadGroupIdParameter();
|
---|
8 | $Table = $TranslationTree[$GroupId]['TablePrefix'];
|
---|
9 | if(array_key_exists('action', $_GET)) $Action = $_GET['action']; else $Action = '';
|
---|
10 |
|
---|
11 | if(array_key_exists('ID', $_GET))
|
---|
12 | {
|
---|
13 | $TextID = $_GET['ID'] * 1;
|
---|
14 |
|
---|
15 | $Line = mysql_fetch_assoc($Database->SQLCommand('SELECT * FROM '.$Table.' Where ID = '.$TextID));
|
---|
16 | if(!$Line) die('Překlad nenalezen.');
|
---|
17 |
|
---|
18 | $LineAJ = mysql_fetch_assoc($Database->SQLCommand('SELECT * FROM '.$Table.' WHERE Language = 0 AND entry = '.$Line['entry'].' AND VersionEnd = '.$Line['VersionEnd'].' LIMIT 1'));
|
---|
19 | if(!$Line) die('Anglický originál k překladu nenalezen.');
|
---|
20 |
|
---|
21 | $User = @$_SESSION['User'];
|
---|
22 | $IDUser = $Database->SQLCommand('SELECT * FROM user WHERE id = '.$Line['User']);
|
---|
23 | $LineUser = mysql_fetch_array($IDUser);
|
---|
24 |
|
---|
25 | echo('Skupina: <strong>'.$TranslationTree[$GroupId]['Name'].'</strong><br />');
|
---|
26 |
|
---|
27 | if(($Line['Language'] <> 0) and ($LineUser['user'] <> '')) echo('Přeložil: <strong>'.$LineUser['user'].'</strong> <br />');
|
---|
28 | if(($Line['Take'] <> 0) and ($Line['Take'] <> $Line['ID']))
|
---|
29 | {
|
---|
30 | $Language = mysql_fetch_assoc($Database->SQLCommand('SELECT Language,VersionStart,VersionEnd FROM '.$Table.' Where ID = '.$Line['Take']));
|
---|
31 | // echo $Language['Language'].' '.$Line['Take'];
|
---|
32 | if($Language['Language'] <> 0)
|
---|
33 | echo('Převzato z: <a href="form.php?group='.$GroupId.'&ID='.$Line['Take'].'">'.$Line['Take'].'</a> <br />');
|
---|
34 | }
|
---|
35 | echo('Text: ');
|
---|
36 | if($Line['Language'] <> 0)
|
---|
37 | {
|
---|
38 | if($Line['Complete'] == 1) echo(' <b>Hotov</b>');
|
---|
39 | else echo(' <b> Uložen v rozepsaných</b> ');
|
---|
40 | } else
|
---|
41 | {
|
---|
42 | echo(' <b>Anglická, původní verze</b> ');
|
---|
43 | }
|
---|
44 | echo('<br />');
|
---|
45 | echo ('Verze: <b>'.GetVersionWOW($Line['VersionStart']).' - '.GetVersionWOW($Line['VersionEnd'].'</b>'));
|
---|
46 | echo('<br />');
|
---|
47 |
|
---|
48 | $version = mysql_fetch_array($Database->SQLCommand('SELECT count(*) FROM '.$Table.' Where entry = '.$Line['entry'].' AND Language <> 0'));
|
---|
49 | if ($version['count(*)'] > 0)
|
---|
50 | {
|
---|
51 | echo('<form action="comparison.php" method="get"><a href="TranslationList.php?group='.$GroupId.'&action=searchentry&ID='.$Line['entry'].'">Počet verzí: <strong>'.$version['count(*)'].'</strong></a>
|
---|
52 | <input type="hidden" name="group" value="'.$GroupId.'" />
|
---|
53 | <input type="hidden" name="entry" value="'.$Line['entry'].'" />
|
---|
54 | <input type="hidden" name="ID2" value="'.$TextID.'" />
|
---|
55 | <select onchange="this.form.submit();" name="ID1">
|
---|
56 | <option value="-1">Vyberte text k porovnání</option>
|
---|
57 | <option value="-1">Zobrazit/porovnat všechny</option>');
|
---|
58 | $DataID = $Database->SQLCommand('SELECT *, (SELECT user.user FROM user WHERE user.id = '.$Table.'.user) as User FROM '.$Table.' WHERE (entry = '.$Line['entry'].') AND (ID <> '.$Line['ID'].')');
|
---|
59 | while($version = mysql_fetch_array($DataID))
|
---|
60 | {
|
---|
61 | if ($version['ID'] == $Line['Take']) echo('<option value="'.$version['ID'].'">'.$version['ID'].' - '.$version['User'].' (převzato)</option>');
|
---|
62 | else {
|
---|
63 | if (0 == $version['Language']) $version['User'] = 'Předloha';
|
---|
64 | echo('<option value="'.$version['ID'].'">'.$version['ID'].' - '.$version['User'].' ('.GetVersionWOW($version['VersionStart']).' - '.GetVersionWOW($version['VersionEnd']).')</option>');
|
---|
65 | }
|
---|
66 | }
|
---|
67 | echo('</select></form>');
|
---|
68 | } else
|
---|
69 | {
|
---|
70 | echo('<a href="TranslationList.php?group='.$GroupId.'&action=searchentry&ID='.$Line['entry'].'">Počet verzí: <strong>'.$version['count(*)'].'</strong></a>');
|
---|
71 | }
|
---|
72 |
|
---|
73 | // Speciální znaky: $B - Odřádkování, $N - Jméno, $C - povolání
|
---|
74 | echo('<form action="save.php?group='.$GroupId.'" method="post"><div>');
|
---|
75 | if(Licence(LICENCE_USER))
|
---|
76 | {
|
---|
77 | if(($GroupId < 4) or ($GroupId == 10) or ($GroupId == 11)) echo ('<a href="dictionary.php?group='.$GroupId.'&ID='.$LineAJ['ID'].'" target="_blank" title="Zobrazit přeložené názvy věci, postav, a herních objektů k tomuto překladu">Vyhledat v názvech</a>');
|
---|
78 | echo(' <input type="submit" value="Uložit do rozepsaných" name="save" title="Klikněte na uložit pro pozdější dokončení překladu" />
|
---|
79 | <input type="submit" value="Dokončeno" name="End" title="Klikněte na Dokončeno jesli jsou všechny texty hotové a chcete již publikovat" /> ');
|
---|
80 | FollowingTran($TextID,$Table,$GroupId, True); FollowingTran($TextID,$Table,$GroupId);
|
---|
81 | }
|
---|
82 |
|
---|
83 | if($TranslationTree[$GroupId]['WowheadName'] != '')
|
---|
84 | $WowheadLink = '<a href="http://www.wowhead.com/?'.$TranslationTree[$GroupId]['WowheadName'].
|
---|
85 | '='.$LineAJ['entry'].'">'.$LineAJ['entry'].'</a>';
|
---|
86 | else $WowheadLink = $LineAJ['entry'];
|
---|
87 |
|
---|
88 | echo('<input type="hidden" name="entry" value="'.$LineAJ['entry'].'" />
|
---|
89 | <input type="hidden" name="user" value="'.$User.'" />
|
---|
90 | <input type="hidden" name="ID" value="'.$TextID.'" />
|
---|
91 | <table class="BaseTable">
|
---|
92 | <tr>
|
---|
93 | <th>Číslo textu: '.$WowheadLink.'</th>
|
---|
94 | <th>Nepřeložené</th>
|
---|
95 | <th>Přeložené</th>
|
---|
96 | </tr>
|
---|
97 | <tr>
|
---|
98 | <th>Jazyk</th>
|
---|
99 | <td>Anglický</td>
|
---|
100 | <td>
|
---|
101 | Přeloženo do:');
|
---|
102 | if($Line['Language'] <> 0) $Language = $Line['Language'];
|
---|
103 | else if($_SESSION['UserID'] != '')
|
---|
104 | {
|
---|
105 | $IDUser = $Database->SQLCommand('SELECT * FROM user WHERE id = '.$_SESSION['UserID']);
|
---|
106 | $LineUser = mysql_fetch_array($IDUser);
|
---|
107 | $Language = $LineUser['Language']; //jiný user vyčítám
|
---|
108 | } else $Language = 0;
|
---|
109 | WriteLanguages($Language);
|
---|
110 | echo('</td></tr>');
|
---|
111 | foreach($TranslationTree[$GroupId]['Items'] as $Index => $TextItem)
|
---|
112 | if($TextItem['Visible'] == 1)
|
---|
113 | {
|
---|
114 | if(($LineAJ[$TextItem['Column']] <> '') or ($Line[$TextItem['Column']] <> '')) {
|
---|
115 | if ($TextItem['Name'] == 'Text' AND (($Table == 'global_strings') OR ($Table == 'glue_strings')))
|
---|
116 | echo('<tr><th>'.$LineAJ['ShortCut'].'</th>');
|
---|
117 | else
|
---|
118 | echo('<tr><th>'.$TextItem['Name'].'</th>');
|
---|
119 | echo ('<td>'.str_replace("\n", '<br/>', htmlspecialchars($LineAJ[$TextItem['Column']])).'</td>
|
---|
120 | <td><textarea rows="8" cols="40" onkeydown="ResizeTextArea(this)" class="textedit" id="'.$TextItem['Column'].'" name="'.$TextItem['Column'].'">'.htmlspecialchars($Line[$TextItem['Column']]).'</textarea></td></tr>');
|
---|
121 | }
|
---|
122 | } else
|
---|
123 | {
|
---|
124 | echo('<input id="'.$TextItem['Column'].'" name="'.$TextItem['Column'].'" type="hidden" value="'.htmlspecialchars($Line[$TextItem['Column']]).'" />');
|
---|
125 | }
|
---|
126 | echo('</table></div></form>');
|
---|
127 | } else
|
---|
128 | {
|
---|
129 | // include 'ListQuests.php';
|
---|
130 | echo('Nebylo zadáno ID <a href="index.php">zpět</a>');
|
---|
131 | }
|
---|
132 |
|
---|
133 | ShowFooter();
|
---|
134 |
|
---|
135 | ?>
|
---|
136 |
|
---|