--- new.php 2001/04/05 12:04:12 1.14 +++ new.php 2001/10/01 14:05:16 1.18 @@ -6,28 +6,22 @@ $smarty->assign( array ( Title=>"Pliva d.d." ) ); - if (isset($from)) { $section=$from; } else { $section="new"; } -$sql_where="where visible is true"; +$sql_where="where $visible_is_true"; + +include("section.inc"); if ($section == "investor") { - $title="INVESTOR'S PAGE"; - $lpic="investor"; $lext=".jpg"; - $mpic="investors.gif"; $back_url="investor.php"; if (! isset($type)) { $sql_where .= " and type='i'"; } $title.=" : Investors News"; -} elseif ($section == "about") { - $title="ABOUT US"; - $lpic="about"; $lext=".gif"; - $mpic="about.gif"; } else { $title="What's New"; $lpic="new"; $lext=".jpg"; @@ -76,7 +70,7 @@ } $smarty->assign("days",$days); $smarty->assign("last_days",array(14,30,160,240,365)); - $smarty->assign("last_desc",array("two week","one month","four months","six months","one year")); + $smarty->assign("last_desc",array("two weeks","one month","four months","six months","one year")); } $num_selected=0; @@ -93,15 +87,19 @@ } if ($num_selected == 10) { + $tmp="$PHP_SELF?start=".($start+10); + if ($days) $tmp.="&days=$days"; $smarty->assign(array( "multi_page_show" => 1, - "multi_page_next" => "$PHP_SELF?start=".($start+10), + "multi_page_next" => $tmp )); } if ($start && $start >= 10) { + $tmp="$PHP_SELF?start=".($start-10); + if ($days) $tmp.="&days=$days"; $smarty->assign(array( "multi_page_show" => 1, - "multi_page_prev" => "$PHP_SELF?start=".($start-10), + "multi_page_prev" => $tmp )); } @@ -118,15 +116,15 @@ $title.=" : Investors News : ".$data[0][title_lc]; } elseif ($data[0][type] == "a") { $title.=" : Annual Report : ".$data[0][title_lc]; + } elseif ($data[0][type] == "p") { + $title.=" : Presentations : ".$data[0][title_lc]; } } if (isset($days) && $num_selected == 0) { $warning = "There are no news for last $days days."; - } - - if ($main == "" && $num_selected == 0) { + } elseif ($main == "" && $num_selected == 0) { $warning = "This news item is no longer available"; }