2 |
include("inc/conn.php"); |
include("inc/conn.php"); |
3 |
function myComp($a, $b) { return MyCompare($a["name"], $b["name"]); } |
function myComp($a, $b) { return MyCompare($a["name"], $b["name"]); } |
4 |
function escape_quote($str) { return str_replace('"', """, $str); } |
function escape_quote($str) { return str_replace('"', """, $str); } |
5 |
if ($id) { |
$tpl->assign("ID", $gid); |
6 |
|
if ($gid) { |
7 |
$grupe = array(); |
$grupe = array(); |
8 |
$sql = "SELECT naziv FROM grupe_bolesti WHERE (grupa_b_id = $id)"; |
$sql = "SELECT naziv FROM grupe_bolesti WHERE (grupa_b_id = $gid)"; |
9 |
$sth = $dbh->prepare($sql); |
$sth = $dbh->prepare($sql); |
10 |
if (!$sth) error("Cannot prepare query: \"$sql\""); |
if (!$sth) error("Cannot prepare query: \"$sql\""); |
11 |
if (!$sth->execute()) error("Cannot execute query: \"$sql\""); |
if (!$sth->execute()) error("Cannot execute query: \"$sql\""); |
12 |
$grupa = $sth->fetchrow_array(); |
$grupa = $sth->fetchrow_array(); |
13 |
$sth->finish(); |
$sth->finish(); |
14 |
if ($grupa) $grupa = array_shift($grupa); |
if ($grupa) $grupa = array_shift($grupa); |
15 |
|
array_push($PATH, MyUpper($grupa)); |
16 |
$tpl->assign("naslov", $grupa); |
$tpl->assign("naslov", $grupa); |
17 |
$grupe = array(); |
$grupe = array(); |
18 |
$sql = "SELECT bolest_id, naziv FROM bolesti WHERE (grupa_bolesti_id = $id) AND (is_bolest)"; |
$sql = "SELECT bolest_id, naziv FROM bolesti WHERE (grupa_bolesti_id = $gid) AND (is_bolest)"; |
19 |
$sth = $dbh->prepare($sql); |
$sth = $dbh->prepare($sql); |
20 |
if (!$sth) error("Cannot prepare query: \"$sql\""); |
if (!$sth) error("Cannot prepare query: \"$sql\""); |
21 |
if (!$sth->execute()) error("Cannot execute query: \"$sql\""); |
if (!$sth->execute()) error("Cannot execute query: \"$sql\""); |
59 |
} |
} |
60 |
$tpl->assign("slova", $slova); |
$tpl->assign("slova", $slova); |
61 |
} |
} |
|
$tpl->assign("ID", $id); |
|
62 |
$dbh->disconnect(); |
$dbh->disconnect(); |
63 |
?> |
?> |