1 | <?php
|
---|
2 |
|
---|
3 | include('includes/global.php');
|
---|
4 |
|
---|
5 | ShowPage();
|
---|
6 |
|
---|
7 | if(array_key_exists('group', $_GET)) $GroupId = $_GET['group']; else $GroupId = 1;
|
---|
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'];
|
---|
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']));
|
---|
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 |
|
---|
26 | if(($Line['Language'] <> 0) and ($LineUser['user'] <> '')) echo('Přeložil: <strong>'.$LineUser['user'].'</strong> <br />');
|
---|
27 | if(($Line['Take'] <> 0) and ($Line['Take'] <> $Line['ID']))
|
---|
28 | {
|
---|
29 | $Language = mysql_fetch_assoc($Database->SQLCommand('SELECT Language FROM '.$Table.' Where ID = '.$Line['Take']));
|
---|
30 | // echo $Language['Language'].' '.$Line['Take'];
|
---|
31 | if($Language['Language'] <> 0)
|
---|
32 | echo('Převzato z: <a href="form.php?group='.$GroupId.'&ID='.$Line['Take'].'">'.$Line['Take'].'</a> <br />');
|
---|
33 | }
|
---|
34 | echo('Text: ');
|
---|
35 | if($Line['Language'] <> 0)
|
---|
36 | {
|
---|
37 | if($Line['Complete'] == 1) echo(' <b>Hotov</b><br />');
|
---|
38 | else echo(' <b> Uložen v rozepsaných</b><br />');
|
---|
39 | } else
|
---|
40 | {
|
---|
41 | echo(' <b>Anglická, původní verze</b><br />');
|
---|
42 | }
|
---|
43 |
|
---|
44 | // kontrolování textů
|
---|
45 | $ID_translation = $TextID;
|
---|
46 | $type_translation = 1;
|
---|
47 | $check = mysql_fetch_array($Database->SQLCommand('SELECT * FROM tag WHERE ID_user = '.$_SESSION['UserID'].' AND ID_translation = '.$ID_translation.' AND type_translation = '.$type_translation));
|
---|
48 | echo('<form action="action.php?group='.$GroupId.'" method="post" name="check">');
|
---|
49 | if($check['tag'] == 1)
|
---|
50 | echo('<input name="0" type="submit" value="Odebrat z vlastního výběru" />');
|
---|
51 | else
|
---|
52 | echo('<input name="1" type="submit" value="Přidat do vlastního výběru" />');
|
---|
53 | echo(' <input type="hidden" name="ID_translation" value="'.$ID_translation.'" />
|
---|
54 | <input type="hidden" name="type_translation" value="'.$type_translation.'" />
|
---|
55 | </form>');
|
---|
56 | if($Line['admin_check'] <> 0)
|
---|
57 | {
|
---|
58 | echo('<b>Překlad byl zkontrolován adminem</b><br />');
|
---|
59 | }
|
---|
60 | if(Licence(LICENCE_ADMIN))
|
---|
61 | {
|
---|
62 | $admin_check = mysql_fetch_array($Database->SQLCommand('SELECT ID FROM '.$Table.' Where entry = '.$Line['entry'].' AND admin_check = 1 AND ID <> '.$TextID));
|
---|
63 | if(isset($admin_check['ID']))
|
---|
64 | echo('Již byla zkontrolována adminem jiná verze překladu: <a href="form.php?group='.$GroupId.'&ID='.$admin_check['ID'].'">'.$admin_check['ID'].'</a><br />');
|
---|
65 | }
|
---|
66 | $number_version = mysql_fetch_array($Database->SQLCommand('SELECT count(*) FROM '.$Table.' Where entry = '.$Line['entry'].' AND Language <> 0'));
|
---|
67 | echo('Počet verzí: <b>'.$number_version['count(*)'].'</b> ');
|
---|
68 | echo('<a href="TranslationList.php?group='.$GroupId.'&action=searchentry&ID='.$Line['entry'].'">Zobrazit všechny verze tohoto překladu</a>');
|
---|
69 |
|
---|
70 | // Speciální znaky: $B - Odřádkování, $N - Jméno, $C - povolání
|
---|
71 | echo('<form action="save.php?group='.$GroupId.'" method="post">');
|
---|
72 | if(Licence(LICENCE_USER))
|
---|
73 | {
|
---|
74 | 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" />
|
---|
75 | <input type="submit" value="Dokončeno" name="End" Title="Klikněte na Dokončeno jesli jsou všechny texty hotové a chcete již publikovat" />');
|
---|
76 | }
|
---|
77 |
|
---|
78 | if (Licence(LICENCE_MODERATOR) and ($Line['Language'] <> 0))
|
---|
79 | {
|
---|
80 | echo('<input type="submit" value="Opravit" name="Repair" Title="Opravit po uživateli chyby (pouze moderátor)" />');
|
---|
81 | }
|
---|
82 | if(Licence(LICENCE_MODERATOR) and ($Line['Language'] <> 0))
|
---|
83 | {
|
---|
84 | // echo '<input type="submit" value="Opravit Q" name="Repair"> Klikněte Jestli si přejete opravit chyby v Questu<br>';
|
---|
85 |
|
---|
86 | echo(' <input type="hidden" name="UserRepair" value="'.$Line['User'].'" />');
|
---|
87 | echo(' <a style="color: Red" title="smazat (pouze moderátor)" href="action.php?group='.$GroupId.'&action=delete&delete=1&ID='.$TextID.'">x</a>
|
---|
88 | <a style="color: Red" title="Není hotovo (pouze moderátor)" href="action.php?group='.$GroupId.'&action=NotComplete&NotComplete=1&ID='.$TextID.'"><-</a>');
|
---|
89 | if(Licence(LICENCE_ADMIN))
|
---|
90 | {
|
---|
91 | if($Line['admin_check'] <> '1')
|
---|
92 | {
|
---|
93 | echo(' <a style="color: Green" title="Zkontrolováno (pouze admin)" href="action.php?group='.$GroupId.'&action=admin_check&admin_check=1&ID='.$TextID.'"><b>+</b></a>');
|
---|
94 | } else
|
---|
95 | {
|
---|
96 | echo(' <a style="color: Green" title="Zrušit zkontrolování (pouze admin)" href="action.php?group='.$GroupId.'&action=admin_check&admin_check=0&ID='.$TextID.'"><b>-</b></a>');
|
---|
97 | }
|
---|
98 | }
|
---|
99 | }
|
---|
100 |
|
---|
101 | echo('<input type="hidden" name="entry" value="'.$LineAJ['entry'].'" />
|
---|
102 | <input type="hidden" name="user" value="'.$User.'" />
|
---|
103 | <input type="hidden" name="ID" value="'.$TextID.'" />
|
---|
104 | <table border="1" cellpadding="1" cellspacing="0">
|
---|
105 | <tr>
|
---|
106 | <th>Číslo textu: <a Title="Zobrazit text na wowhead.com" href="http://www.wowhead.com/?quest='.$LineAJ['entry'].'">'.$LineAJ['entry'].'</a></th>
|
---|
107 | <th>Nepřeložené</th>
|
---|
108 | <th>Přeložené</th>
|
---|
109 | </tr>
|
---|
110 | <tr>
|
---|
111 | <th>Jazyk</th>
|
---|
112 | <td width="300">Anglický</td>
|
---|
113 | <td>
|
---|
114 | Přeloženo do:');
|
---|
115 | if($Line['Language'] <> 0) $Language = $Line['Language'];
|
---|
116 | else
|
---|
117 | {
|
---|
118 | $IDUser = $Database->SQLCommand('SELECT * FROM user Where id = '.@$_SESSION['UserID']);
|
---|
119 | $LineUser = mysql_fetch_array($IDUser);
|
---|
120 | $Language = $LineUser['Language']; //jiný user vyčítám
|
---|
121 | }
|
---|
122 | WriteLanguages($Language);
|
---|
123 | echo('</td></tr><tr>');
|
---|
124 | foreach($TranslationTree[$GroupId]['Items'] as $Index => $TextItem)
|
---|
125 | {
|
---|
126 | if(($LineAJ[$TextItem['Column']] <> '') or ($Line[$TextItem['Column']] <> ''))
|
---|
127 | echo('<tr>
|
---|
128 | <th>'.$TextItem['Name'].'</th>
|
---|
129 | <td width="300">'.htmlspecialchars($LineAJ[$TextItem['Column']]).'</td>
|
---|
130 | <td><textarea rows="8" style="width: 300px; height=100%;" name="'.$TextItem['Column'].'">'.htmlspecialchars($Line[$TextItem['Column']]).'</textarea></td></tr>');
|
---|
131 | }
|
---|
132 | echo('</table>
|
---|
133 | </form>');
|
---|
134 | } else
|
---|
135 | {
|
---|
136 | // include 'ListQuests.php';
|
---|
137 | echo('Nebylo zadáno ID <a href="index.php">zpět</a>');
|
---|
138 | }
|
---|
139 |
|
---|
140 | ShowFooter();
|
---|
141 |
|
---|
142 | ?>
|
---|
143 |
|
---|