--- new.php 2002/04/05 11:31:13 1.21 +++ new.php 2002/04/29 13:25:27 1.25 @@ -27,12 +27,13 @@ $lpic="new"; $lext=".jpg"; $mpic="new.gif"; $back_url="index.php"; - $sql_where.=" and (type='a' or type='c' or type='e' or type='i' or type='n' or type='p' or type='r')"; // don't show company profile + $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 } $smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, ) ); include("find_html_file.inc"); +include("news_type.inc"); if (file_exists(find_html_file("news",$more))) { @@ -47,14 +48,12 @@ if (isset($type)) { if ($type == "n") { $sql_where .= " and (type='n' or type='i')"; - $title.=" : News"; } elseif ($type == "e") { - $sql_where .= " and type='e'"; - $title.=" : Events"; + $sql_where .= " and (type='e' or type='f')"; } elseif ($type == "c") { $sql_where .= " and type='c'"; - $title.=" : Community"; } + $title.=" : ".$news_type[$type]; } if (! isset($show) && !isset($start)) { @@ -107,21 +106,7 @@ } if (isset($id) && $num_selected == 1) { - if ($data[0][type] == "n") { - $title.=" : News : ".$data[0][title_lc]; - } elseif ($data[0][type] == "e") { - $title.=" : Event : ".$data[0][title_lc]; - } elseif ($data[0][type] == "c") { - $title.=" : Community : ".$data[0][title_lc]; - } elseif ($data[0][type] == "r") { - $title.=" : Result : ".$data[0][title_lc]; - } elseif ($data[0][type] == "i") { - $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]; - } + $title.=" : ".$news_type[ $data[0][type] ]." : ".$data[0][title_lc]; }