4 |
$limit = 10; |
$limit = 10; |
5 |
include("inc/conn.php"); |
include("inc/conn.php"); |
6 |
if ($qa) { |
if ($qa) { |
7 |
function MyConv($str) { |
function MyConv($str) { return strtr($str, "šðè枊ÐÈÆŽ", "¹ðè澩ÐÈÆ®"); } |
|
return strtr($str, "šðè枊ÐÈÆŽ", "¹ðè澩ÐÈÆ®"); |
|
|
} |
|
8 |
$id2 = $qa; |
$id2 = $qa; |
9 |
$naslov = ""; |
$naslov = ""; |
10 |
while ($id2) { |
while ($id2) { |
74 |
$tema = array(); |
$tema = array(); |
75 |
while ($row = $sth->fetchrow_array()) { |
while ($row = $sth->fetchrow_array()) { |
76 |
list($id2, $naz) = $row; |
list($id2, $naz) = $row; |
77 |
$sql = "SELECT count(qa_id) FROM qa WHERE (tema = $id2)"; |
$sql = "SELECT count(qa_id) FROM qa WHERE (tema = $id2) AND (display)"; |
78 |
$sth2 = $dbh->prepare($sql); |
$sth2 = $dbh->prepare($sql); |
79 |
if (!$sth2) error("Cannot prepare query: \"$sql\""); |
if (!$sth2) error("Cannot prepare query: \"$sql\""); |
80 |
if (!$sth2->execute()) error("Cannot execute query: \"$sql\""); |
if (!$sth2->execute()) error("Cannot execute query: \"$sql\""); |
93 |
$tpl->assign("teme", $teme); |
$tpl->assign("teme", $teme); |
94 |
} |
} |
95 |
$tpl->assign("qa", $qa); |
$tpl->assign("qa", $qa); |
96 |
// ... |
$dbh->disconnect(); |
97 |
?> |
?> |