5 |
$p = $page; |
$p = $page; |
6 |
if (isparam("wb_p")) $p--; |
if (isparam("wb_p")) $p--; |
7 |
if (isparam("wb_OK")) $p++; |
if (isparam("wb_OK")) $p++; |
8 |
if (isparam("wb_h")) $p = 0; |
if (isparam("wb_h")) $p = $PG_HOME; |
9 |
if (isparam("wb_o")) $p = 15; |
if (isparam("wb_o")) $p = $PG_OVERVIEW; |
10 |
include("inc/conn.php"); |
include("inc/conn.php"); |
11 |
if ($p != $page) { |
if ($p != $page) { |
12 |
DBOpen(); |
DBOpen(); |
14 |
$ret = DBQuery("UPDATE o_meni SET opis='$omeni' WHERE (sif_radnika='$sifra')"); |
$ret = DBQuery("UPDATE o_meni SET opis='$omeni' WHERE (sif_radnika='$sifra')"); |
15 |
if ($ret[0] < 1) |
if ($ret[0] < 1) |
16 |
DBQuery("INSERT INTO o_meni (sif_radnika,opis) VALUES ('$sifra','$omeni')"); |
DBQuery("INSERT INTO o_meni (sif_radnika,opis) VALUES ('$sifra','$omeni')"); |
17 |
|
$ret = $DBH->errstr; |
18 |
DBClose(); |
DBClose(); |
19 |
Header("Location: $pages[$p]".Params($p)); |
if (!$ret) { |
20 |
exit; |
Header("Location: $pages[$p]".Params($p)); |
21 |
|
exit; |
22 |
|
} |
23 |
} |
} |
24 |
DBOpen(); |
DBOpen(); |
25 |
$row = DBQuery("SELECT opis FROM o_meni WHERE (sif_radnika='$sifra')"); |
$row = DBQuery("SELECT opis FROM o_meni WHERE (sif_radnika='$sifra')"); |
26 |
DBClose(); |
DBClose(); |
27 |
$row = $row[0]; |
$row = $row[0]; |
28 |
include("inc/Smarty.class.php"); |
$tpl = new MySmarty; |
|
$tpl = new Smarty; |
|
|
$tpl->template_dir = "./tpl"; |
|
|
$tpl->compile_dir = "./tpc"; |
|
|
$tpl->assign("action", $PHP_SELF.Params()); |
|
|
$tpl->assign("language", $language); |
|
|
$tpl->assign("sifra", $sifra); |
|
29 |
$tpl->assign("omeni", HTML_Escape(Win_ISO($row[0]))); |
$tpl->assign("omeni", HTML_Escape(Win_ISO($row[0]))); |
30 |
$pg = basename($PHP_SELF); |
$tpl->show(); |
|
$pg = eregi_replace("\.php$", "", $pg); |
|
|
$tpl->display("$pg-$language.tpl"); |
|
31 |
?> |
?> |