--- sections/novosti.inc 2001/11/07 12:09:58 1.6 +++ sections/novosti.inc 2001/11/21 09:16:47 1.10 @@ -4,6 +4,10 @@ $sql_where="where $visible_is_true"; +$smarty->assign("m_session","&m=o_nas&"); +$smarty->assign("m_session_urlend","&m=o_nas&"); +$smarty->assign("m_form_session",''); + if (file_exists(find_html_file("more",$more))) { $main=join('',file(find_html_file("more",$more))); @@ -23,9 +27,19 @@ $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"); } } } @@ -40,11 +54,11 @@ if (isset($days)) { if ($days != 0) { $sql_where.=" and date(now())-date(date) > 0 and date(now())-date(date) < $days"; - $title.=" : News in last $days days"; + $title.=" : Pregled novic zadnjega $days dni"; } $smarty->assign("days",$days); $smarty->assign("last_days",array(14,30,160,240,365)); - $smarty->assign("last_desc",array("two weeks","one month","four months","six months","one year")); + $smarty->assign("last_desc",array("zadnjih 14 dneh","meseca","štirih mesecev","šestih mesecev","enega leta")); } $num_selected=0; @@ -56,6 +70,7 @@ $sth = $dbh->prepare("$sql"); $sth->execute(); while ($row=$sth->fetchrow_hash()) { + if ($row[pdf]) $row[url]="blob/".$row[pdf]; $data[]=$row; $num_selected++; } @@ -84,9 +99,9 @@ if (isset($days) && $num_selected == 0) { - $warning = "There are no news for last $days days."; + $warning = "Ni novic v zadnjih $days dneh."; } elseif ($main == "" && $num_selected == 0) { - $warning = "This news item is no longer available"; + $warning = "Podatki niso već dostopni."; } $smarty->assign(array(