--- index.php 2000/12/08 08:38:09 1.3
+++ index.php 2001/01/04 14:56:48 1.6
@@ -1,5 +1,7 @@
+set_magic_quotes_runtime(0);
+
include("inc/class.FastTemplate.pinc");
include("inc/conn.inc");
include("inc/fixsql.inc");
@@ -15,7 +17,9 @@
startnew => "startnew.html",
ttable => "topics-table.html",
theader => "topics-header.html",
+ tlheader => "topics-list-header.html",
trow => "topics-row.html",
+ tlrow => "topics-list-row.html",
reply => "reply.html",
checkboxes => "checkboxes.html"
)
@@ -147,7 +151,7 @@
//----- end of inserts/updates...
-if (($what=="reply" || $what="show") && isset($t)) {
+if (($what=="reply" || $what=="show") && isset($t)) {
$sql_where=" and topics.id=$t";
}
@@ -176,9 +180,9 @@
COMMENTS => "comments>>",
PHP_SELF => $PHP_SELF
));
- $tpl->parse(ROWS,".theader");
if (isset($t) && $t==$row[topic_id]) {
+ $tpl->parse(ROWS,".theader");
$sth2 = $dbh->prepare("
select poruke.id as id,sadrzaj as topic,level,thread_id,reply_id,full_name,poruke.datum as datum,poruke.analitical as poruka_analitical
from poruke,osobe
@@ -229,17 +233,16 @@
DATE => $row2[datum],
SADRZAJ => $topic
));
-# $tpl->parse(ROWS,".theader");
$tpl->parse(ROWS,".trow");
}
} else {
- // non-unroll topics
+ // non-unroll topics (list)
$tpl->assign( array(
SADRZAJ => $row[sadrzaj],
COMMENTS => "comments>>"
));
-# $tpl->parse(ROWS,".theader");
- $tpl->parse(ROWS,".trow");
+ $tpl->parse(ROWS,".tlheader");
+ $tpl->parse(ROWS,".tlrow");
}
}