Revize b8dc69e2
Přidáno uživatelem Filip Jani před téměř 6 roky(ů)
old/html/multidic/app/webroot/administration/edit_translation.php | ||
---|---|---|
3 | 3 |
|
4 | 4 |
$vypis_edit = true; |
5 | 5 |
|
6 |
if (!Empty($action) && $action == "edit_translation") {
|
|
6 |
if (!Empty($_POST)) {
|
|
7 | 7 |
|
8 |
if (Empty($translation)) {
|
|
8 |
if (Empty($_POST['translation'])) {
|
|
9 | 9 |
print_hlasku("Položku musíte vyplnit"); |
10 | 10 |
} |
11 | 11 |
else { |
12 |
update_translation($translation, $translation_id);
|
|
12 |
update_translation($_POST['translation'], $_POST['translation_id']);
|
|
13 | 13 |
$vypis_edit = false; |
14 | 14 |
} |
15 | 15 |
} |
16 | 16 |
if($vypis_edit){ |
17 | 17 |
|
18 |
$Record = get_translation($translation_id);
|
|
18 |
$Record = get_translation($_REQUEST['translation_id']);
|
|
19 | 19 |
$translation = $Record["translation"]; |
20 | 20 |
$idf = $Record["idf"]; |
21 | 21 |
?> |
old/html/multidic/app/webroot/administration/list_translation.php | ||
---|---|---|
2 | 2 |
|
3 | 3 |
require_once("./administration/translation.php"); |
4 | 4 |
|
5 |
if (!IsSet($translation_lang_id)) {
|
|
5 |
if (!IsSet($_REQUEST['translation_lang_id'])) {
|
|
6 | 6 |
echo "<p>Vyberte jazyk:</p>\n <p>"; |
7 | 7 |
echo "<form method=\"post\">"; |
8 | 8 |
echo get_translation_chooser(); |
9 | 9 |
echo "<input type=\"submit\" value=\"Dál\" />\n </form>"; |
10 | 10 |
} |
11 | 11 |
else { |
12 |
if (!Empty($serad)) {
|
|
13 |
print_table_of_translation($translation_lang_id, $order, $od, $limit);
|
|
12 |
if (!Empty($_REQUEST['serad'])) {
|
|
13 |
print_table_of_translation($_REQUEST['translation_lang_id'], $_REQUEST['order'], $_REQUEST['od'], $_REQUEST['limit']);
|
|
14 | 14 |
} |
15 | 15 |
else { |
16 |
print_table_of_translation($translation_lang_id);
|
|
16 |
print_table_of_translation($_REQUEST['translation_lang_id']);
|
|
17 | 17 |
} |
18 | 18 |
} |
19 | 19 |
?> |
old/html/multidic/app/webroot/administration/list_translation_lang.php | ||
---|---|---|
2 | 2 |
|
3 | 3 |
require_once("./administration/translation_lang.php"); |
4 | 4 |
|
5 |
if (!Empty($action) && $action == "delete_translation_lang") { |
|
6 |
|
|
7 |
|
|
5 |
if (!Empty($_POST) && $_REQUEST['action'] == 'delete_translation_lang') { |
|
8 | 6 |
$coun_true = 0; |
9 | 7 |
$coun_false = 0; |
10 |
if (Is_Array($smaz)) {
|
|
11 |
for (Reset($smaz); Current($smaz); Next($smaz)) {
|
|
12 |
if (delete_translation_lang(Key($smaz))) $coun_true++;
|
|
8 |
if (Is_Array($_POST['smaz'])) {
|
|
9 |
for (Reset($_POST['smaz']); Current($_POST['smaz']); Next($_POST['smaz'])) {
|
|
10 |
if (delete_translation_lang(Key($_POST['smaz']))) $coun_true++;
|
|
13 | 11 |
else $coun_false++; |
14 | 12 |
} |
15 | 13 |
} |
... | ... | |
19 | 17 |
print_hlasku("Bohužel,$coun_false jazyků se nepodařilo smazat ($coun_true se podařilo smazat)"); |
20 | 18 |
} |
21 | 19 |
|
22 |
if (!Empty($serad)) {
|
|
23 |
print_table_of_translation_lang($order, $od, $limit);
|
|
20 |
if (!Empty($_REQUEST['serad'])) {
|
|
21 |
print_table_of_translation_lang($_REQUEST['order'], $_REQUEST['od'], $_REQUEST['limit']);
|
|
24 | 22 |
} |
25 | 23 |
else { |
26 | 24 |
print_table_of_translation_lang(); |
old/html/multidic/app/webroot/administration/translation.php | ||
---|---|---|
106 | 106 |
$spojeni = new DB_Sql(); |
107 | 107 |
$dotaz = "SELECT * FROM translation |
108 | 108 |
WHERE language = '$translation_lang_id' |
109 |
ORDER BY \"$order\"
|
|
110 |
OFFSET $od LIMIT $limit";
|
|
111 |
$radky = $spojeni->query($dotaz);
|
|
109 |
ORDER BY $order
|
|
110 |
LIMIT $limit OFFSET $od";
|
|
111 |
$result = $spojeni->query($dotaz);
|
|
112 | 112 |
$navrat = "<h3 class=\"nadpis2\">Výpis překladu prostředí jazyk - $translation_lang_id</h3>"; |
113 | 113 |
$navrat .= get_razeni($translation_lang_id, $order, $od, $limit); |
114 | 114 |
$navrat .= "<table>"; |
115 | 115 |
$navrat .= get_header_of_table(); |
116 |
while ($spojeni->next_record()) { |
|
117 |
$navrat .= get_row_of_table($spojeni->Record, $translation_lang_id); |
|
116 |
|
|
117 |
foreach ($result as $radka) { |
|
118 |
$navrat .= get_row_of_table($radka, $translation_lang_id); |
|
118 | 119 |
} |
119 | 120 |
$navrat .= get_foot_of_table(); |
120 | 121 |
$navrat .= "</table>"; |
... | ... | |
142 | 143 |
function get_translation($translation_id) { |
143 | 144 |
require_once("./classes/db.php"); |
144 | 145 |
$spojeni = new DB_Sql(); |
145 |
$dotaz = "SELECT * FROM translation WHERE \"IDtranslation\" LIKE '$translation_id'";
|
|
146 |
$dotaz = "SELECT * FROM translation WHERE IDtranslation LIKE '$translation_id'";
|
|
146 | 147 |
$radky = $spojeni->query($dotaz); |
147 | 148 |
|
148 |
$spojeni->next_record(); |
|
149 |
|
|
150 |
return $spojeni->Record; |
|
149 |
return mysqli_fetch_assoc($radky); |
|
151 | 150 |
} |
152 | 151 |
?> |
old/html/multidic/app/webroot/administration/translation_lang.php | ||
---|---|---|
10 | 10 |
function get_row_of_table($Record, $od = 1, $do = 2) { |
11 | 11 |
$navrat .= "<tr class=\"akt\">\n "; |
12 | 12 |
$navrat .= '<td>'; |
13 |
if ($Record["code"] != "cz" && $Record["code"] != "en") {
|
|
13 |
if ($Record[1] != "cz" && $Record[1] != "en") {
|
|
14 | 14 |
$navrat .= '<input type="checkbox" name="smaz['.$Record[0].']" /></td>'. |
15 | 15 |
'<td><a href="?nav_id=edit_translation_lang&translation_lang_id='.$Record[0].'">uprav</a>'; |
16 | 16 |
} |
... | ... | |
98 | 98 |
function print_table_of_translation_lang($order = "IDtranslation_lang", $od = 0, $limit = 30) { |
99 | 99 |
require_once("./classes/db.php"); |
100 | 100 |
$spojeni = new DB_Sql(); |
101 |
$dotaz = "SELECT * FROM \"translation_lang\" ORDER BY \"$order\" OFFSET $od LIMIT $limit";
|
|
102 |
$radky = $spojeni->query($dotaz);
|
|
101 |
$dotaz = "SELECT * FROM translation_lang ORDER BY $order LIMIT $limit OFFSET $od";
|
|
102 |
$result = $spojeni->query($dotaz);
|
|
103 | 103 |
$navrat .= "<h3 class=\"nadpis2\">Výpis jazyků</h3>"; |
104 | 104 |
$navrat .= get_razeni($order, $od, $limit); |
105 | 105 |
$navrat .= "<table><form action=\"\" method=\"post\">"; |
106 | 106 |
$navrat .= get_header_of_table(); |
107 |
while ($spojeni->next_record()) { |
|
108 |
$navrat .= get_row_of_table($spojeni->Record, 1, 4); |
|
107 |
$radky = mysqli_fetch_all($result); |
|
108 |
foreach ($radky as $radka) { |
|
109 |
$navrat .= get_row_of_table($radka, 1, 4); |
|
109 | 110 |
} |
110 | 111 |
$navrat .= get_foot_of_table(); |
111 | 112 |
$navrat .= '<input type="hidden" name="action" value="delete_translation_lang">'; |
old/html/multidic/app/webroot/functions/dictionary.php | ||
---|---|---|
281 | 281 |
require_once("./classes/db.php"); |
282 | 282 |
$spojeni = new DB_Sql(); |
283 | 283 |
$dotaz = "SELECT * FROM translation_lang"; |
284 |
$spojeni->query($dotaz); |
|
285 |
$navrat = "<select name=\"translation_lang_id\" size=\"4\">";
|
|
286 |
while ($spojeni->next_record()) {
|
|
287 |
$navrat .= " <option value=\"" . $spojeni->Record["code"] . "\"> " . $spojeni->Record["name"] . " </option>";
|
|
284 |
$result = $spojeni->query($dotaz);
|
|
285 |
$navrat .= '<select name="translation_lang_id" size="4">';
|
|
286 |
foreach ($result as $radka) {
|
|
287 |
$navrat .= " <option value=\"" . $radka["code"] . "\"> " . $radka["name"] . " </option>";
|
|
288 | 288 |
} |
289 | 289 |
$navrat .= '</select>'; |
290 | 290 |
return $navrat; |
Také k dispozici: Unified diff
Re #7580 překlady prostředí