--- new.php 2001/04/05 11:54:08 1.13 +++ new.php 2001/06/18 07:46:33 1.16 @@ -37,14 +37,7 @@ $smarty->assign( array ( lpic=>$lpic, lext=>$lext, mpic=>$mpic, ) ); - -function find_html_file($dir,$file) { - $file="./$dir/$file"; - if (is_file("$file") && file_exists("$file")) { return "$file"; } - if (is_file("$file.htm") && file_exists("$file.htm")) { return "$file.htm"; } - if (is_file("$file.html") && file_exists("$file.html")) { return "$file.html"; } - return 0; -} +include("find_html_file.inc"); if (file_exists(find_html_file("news",$more))) { @@ -83,7 +76,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; @@ -100,15 +93,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 )); } @@ -125,15 +122,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"; }