1 |
6daefa8c
|
Petr Lukašík
|
<?php
|
2 |
|
|
|
3 |
|
|
require_once('./inc/all.inc.php');
|
4 |
|
|
|
5 |
|
|
//p_g($_REQUEST);
|
6 |
|
|
|
7 |
|
|
//aplikacni logika - ziskani dat k editaci
|
8 |
|
|
if ( !empty($_REQUEST['id_transliteration']) && Empty($_REQUEST['actionButton']) ) {
|
9 |
|
|
require_once('./logic/show-transliteration.logic.php');
|
10 |
|
|
}
|
11 |
|
|
//konec aplikacni logiky
|
12 |
|
|
|
13 |
|
|
//zobrazeni
|
14 |
|
|
$tpl = & new Template(INDEX_TMPL);
|
15 |
|
|
|
16 |
|
|
if (Empty($_REQUEST['actionButton'])) {
|
17 |
|
|
$body = & new Template('./tmpl/edit-transliteration.tmpl.php');
|
18 |
|
|
//
|
19 |
|
|
$body->set('object_type_array', utils_get_object_types());
|
20 |
|
|
$body->set('surface_type_array', utils_get_surface_types());
|
21 |
|
|
|
22 |
|
|
$body->set('button_label', $sec_button_label);
|
23 |
|
|
|
24 |
|
|
$body->set('id_transliteration', $_REQUEST['id_transliteration']);
|
25 |
|
|
//znovu zobrazene promenne
|
26 |
|
|
$body->set('POST', $Transliteration->getResult());
|
27 |
|
|
}
|
28 |
|
|
//
|
29 |
|
|
else {
|
30 |
|
|
///p_g($_REQUEST);
|
31 |
|
|
$body = & new Template('./logic/edit-transliteration.logic.php');
|
32 |
|
|
$body->set('POST', $_REQUEST);
|
33 |
|
|
|
34 |
|
|
$body->set('object_type_array', utils_get_object_types());
|
35 |
|
|
$body->set('surface_type_array', utils_get_surface_types());
|
36 |
|
|
}
|
37 |
|
|
|
38 |
|
|
$tpl->set('obsah', $body);
|
39 |
|
|
|
40 |
|
|
echo $tpl->fetch(INDEX_TMPL);
|
41 |
|
|
|
42 |
|
|
//p_g($_POST);
|
43 |
|
|
//p_g($Transliteration->getResult());
|
44 |
|
|
|