--- sections/novosti.inc 2001/06/29 12:57:06 1.1 +++ sections/novosti.inc 2001/11/07 14:24:02 1.7 @@ -2,7 +2,7 @@ include("news_sif.inc"); -$sql_where="where visible is true"; +$sql_where="where $visible_is_true"; if (file_exists(find_html_file("more",$more))) { @@ -21,6 +21,22 @@ } elseif ($type == "e") { $sql_where .= " and substr(type,1,1)='e'"; $title.=" : Dogotki"; + } elseif (strlen($type) == 3) { + $sql_where .= " and type='$type'"; + if (substr($type,0,2) == "mp" || $type=="mcx" || $type=="mix") $title.=" : Publikacije"; + if ($type=="mp_") { + $title.=" : PLIVA Magazin"; + $smarty->assign("mtext","PLIVA Magazin"); + } elseif ($type=="mpx") { + $title.=" : Pharna Info"; + $smarty->assign("mtext","Pharma Info"); + } elseif ($type=="mcx") { + $title.=" : Medicus"; + $smarty->assign("mtext","Medicus"); + } elseif ($type=="mix") { + $title.=" : Medinfo bulletin"; + $smarty->assign("mtext","Medinfo bulletin"); + } } } @@ -88,10 +104,16 @@ warning=>$warning )); - $main=$smarty->fetch("novosti.tpl"); if (isset($id) && find_html_file("more",$data[0][more])) { $main=join('',file(find_html_file("more",$data[0][more]))); + } else { + if (! isset($p)) $p="novosti"; + $logo="p/${p}_".$data[0][type].".jpg"; + if (file_exists($logo)) { + $smarty->assign("logo",$logo); + } + $main=$smarty->fetch("$p.tpl"); } @@ -99,4 +121,5 @@ $smarty->assign( array(back_url=>$back_url) ); + ?>