"; echo ""; include("news/news.inc"); include_once("news/database.inc.php"); if (($show_news!="all")) { if (isset($start) && !$prev) { $start_row=$start; $start=$start+$show_news; } else if (!$start && !$prev) { $start=0; $start_row=0; } if ($prev) { $start_row=$prev; $start=$prev-$show_news; } if (!$end) { $end=$show_news; } $limit="Limit $start,$end"; } $sql="select count(*) from denver_news"; $result=mysql_query($sql,$db); $myrow=mysql_fetch_array($result); $num_rows=$myrow[0]; $data = fread(fopen($show_newslist, "r"), filesize($show_newslist)); $sql="select n_id,UNIX_TIMESTAMP(n_date) as my_date,n_title_eng, news_english, pic_link,n_pic,n_newstype from denver_news order by n_date desc,n_id desc $limit"; $result=@mysql_query($sql,$db); while ($myrow=mysql_fetch_array($result)) { $n_id=$myrow["n_id"]; $n_date=date($date_format,$myrow["my_date"]); $end_date=$myrow["end_date"]; $news_english=$myrow["news_english"]; $pic_link=$myrow["pic_link"]; $news_hold=explode("\n",$news_english); $picture=$myrow["n_pic"]; $n_newstype=$myrow["n_newstype"]; $n_title_eng=$myrow["n_title_eng"]; //---------- for ($i=0;$i".$hold_word[$n].""; } //----------------------------------- if (substr($hold_word[$n],0,4)=="www.") { $hold_word[$n]="".$hold_word[$n].""; } //----------------------------------- else if (strpos($hold_word[$n],"@")) { $hold_word[$n]="$hold_word[$n]"; } } $news_hold[$i]=implode(" ",$hold_word); } $news_english=implode("\n",$news_hold); $news_english=nl2br($news_english); //-------- $hold=$data; $hold=str_replace("{start_date}",$n_date,$hold); $hold=str_replace("{end_date}",$end_date,$hold); $hold=str_replace("{news_english}",$news_english,$hold); $hold=str_replace("{news_number}",$n_id,$hold); $hold=str_replace("{topic_eng}",$n_title_eng,$hold); if ($picture) { if ($pic_link) { $hold=str_replace("{picture}","",$hold); } else { $hold=str_replace("{picture}","",$hold); } } else { $hold=str_replace("{picture}","",$hold); } echo $hold; } echo ""; echo ""; $stop=$start+$show_news; if ($stop>$num_rows) { $stop=$num_rows; } $start_point=$start+1; $showing="# $start_point"; echo ""; // echo $showing; if ($start!=0) { echo "Latest News"; } if ($num_rows> $stop ) { echo "More news.."; } echo ""; echo "