--- new.php 2002/04/29 13:01:49 1.23 +++ new.php 2002/05/07 14:02:33 1.28 @@ -14,6 +14,7 @@ $sql_where="where $visible_is_true"; +unset($menu_item); // don't modify title in section.inc include("section.inc"); if ($section == "investor") { @@ -21,11 +22,7 @@ if (! isset($type)) { $sql_where .= " and type='i'"; } - $title.=" : Investors News"; } else { - $title="What's New"; - $lpic="new"; $lext=".jpg"; - $mpic="new.gif"; $back_url="index.php"; $sql_where.=" and (type='a' or type='c' or type='e' or type='f' or type='i' or type='n' or type='p' or type='r')"; // don't show company profile } @@ -48,10 +45,13 @@ if (isset($type)) { if ($type == "n") { $sql_where .= " and (type='n' or type='i')"; - } elseif ($type == "e" || $type == "c") { - $sql_where .= " and type='".$type."'"; + } elseif ($type == "e") { + $sql_where .= " and (type='e' or type='f')"; + } elseif ($type == "f") { + $sql_where .= " and type='f'"; + } elseif ($type == "c") { + $sql_where .= " and type='c'"; } - $title.=" : ".$news_type[$type]; } if (! isset($show) && !isset($start)) { @@ -88,6 +88,7 @@ $tmp="$PHP_SELF?start=".($start+10); if ($days) $tmp.="&days=$days"; if ($from) $tmp.="&from=$from"; + if ($type) $tmp.="&type=$type"; $smarty->assign(array( "multi_page_show" => 1, "multi_page_next" => $tmp @@ -97,6 +98,7 @@ $tmp="$PHP_SELF?start=".($start-10); if ($days) $tmp.="&days=$days"; if ($from) $tmp.="&from=$from"; + if ($type) $tmp.="&type=$type"; $smarty->assign(array( "multi_page_show" => 1, "multi_page_prev" => $tmp @@ -105,9 +107,10 @@ if (isset($id) && $num_selected == 1) { $title.=" : ".$news_type[ $data[0][type] ]." : ".$data[0][title_lc]; + } else { + $title.=" : ".$news_type[ $data[0][type] ]; } - if (isset($days) && $num_selected == 0) { $warning = "There are no news for last $days days."; } elseif ($main == "" && $num_selected == 0) { @@ -132,7 +135,5 @@ $smarty->assign( array(back_url=>$back_url, MAIN=>$main, Section_title=>$title ) ); -include("inc/newsletter.php"); - $smarty->display("index.tpl"); ?>