1
|
<?php
|
2
|
|
3
|
require_once('./inc/all.inc.php');
|
4
|
|
5
|
$tpl = & new Template(INDEX_TMPL);
|
6
|
$MAX_LINES = 200;
|
7
|
|
8
|
//prvni krok
|
9
|
if ( Empty($_REQUEST['find']) || Empty($_POST['actionButton']) || $_POST['actionButton'] == $sec_button_label_back ) {
|
10
|
$body = & new Template('./tmpl/replace.frm.tmpl.php');
|
11
|
//nazvy buttonu
|
12
|
$body->set('first_button_label', $first_button_label);
|
13
|
$body->set('POST', $_REQUEST);
|
14
|
}
|
15
|
//druhy krok
|
16
|
else if (!Empty($_POST['actionButton']) && $_POST['actionButton'] == $first_button_label) {
|
17
|
require_once('./logic/replace-find.logic.php');
|
18
|
$body = & new Template('./tmpl/replace.tmpl.php');
|
19
|
$body->set('lines', $lines);
|
20
|
$body->set('bachs', $bachs);
|
21
|
$body->set('ids', $ids);
|
22
|
$body->set('find', $_POST['find']);
|
23
|
//nazvy buttonu
|
24
|
$body->set('sec_button_label', $sec_button_label);
|
25
|
$body->set('sec_button_label_back', $sec_button_label_back);
|
26
|
//post
|
27
|
$body->set('POST', $_POST);
|
28
|
}
|
29
|
//treti krok
|
30
|
else if (!Empty($_POST['actionButton']) && $_POST['actionButton'] == $sec_button_label) {
|
31
|
|
32
|
$body = & new Template('./logic/replace.logic.php');
|
33
|
$body->set('POST', $_REQUEST);
|
34
|
}
|
35
|
else {
|
36
|
//empty
|
37
|
}
|
38
|
|
39
|
$tpl->set('obsah', $body);
|
40
|
|
41
|
echo $tpl->fetch();
|
42
|
|
43
|
//p_g($_REQUEST);
|
44
|
?>
|