0){ $pid=$pid; }else{ //default pid $m=get_db_msg("select * from ".$table_pre."path where module='news' and cate='path' and deep=1 order by ord limit 0,1"); $pid=$m[id]; } //category $content_cate=""; $q="select * from ".$table_pre."path where module='news' and cate='path' and deep=1 order by ord"; $r=$db->query($q); $i=0; while($m=$db->fetch_array($r)){ if($pid==$m[id]){ $content_cate.=" ".$m[title].""; }else{ $content_cate.=" ".$m[title].""; } //events if($i==0){ $tmp=explode("/",$_SERVER[PHP_SELF]); $file_name=$tmp[count($tmp)-1]; if($file_name=="news_events.php"){ $content_cate.=" Events"; }else{ $content_cate.=" Events"; } } $i++; } //---------------------------news // $content=""; $page_size=$page_size?$page_size:"10"; $offset=$offset?$offset:"0"; $order=$order?$order:"add_date!"; $sql_con=" top<>'z' and "; if($pid){ $tmp=get_db_msg("select * from ".$table_pre."path where id='".$pid."'"); $path=$tmp[path]."-".$pid; $sql_con.=" (path='".$path."' or path like '".$path."-%') and "; } if($s_date_d){ $s_date_start=$s_date_end=$s_date_y."-".$s_date_m."-".$s_date_d; }else{ if($s_date_y && $s_date_m){ $s_date_start=$s_date_y."-".$s_date_m."-1"; $s_date_end=$s_date_y."-".$s_date_m."-31"; } } if($keyword || $s_date_start || $s_date_end){ if($s_date_start){ $tt=explode("-",$s_date_start); $stamp=mktime(0,0,0,$tt[1],$tt[2],$tt[0]); $sql_con.="add_date>='".$stamp."' and "; } if($s_date_end){ $tt=explode("-",$s_date_end); $stamp=mktime(23,59,59,$tt[1],$tt[2],$tt[0]); $sql_con.="add_date<='".$stamp."' and "; } if($keyword) $sql_con.=" (title like '%".$keyword."%') and "; } if($sql_con) $sql_con="where ".substr($sql_con,0,-4); $sql_order=str_replace("!"," desc",$order); $query="select count(*) 'total' from ".$table_pre."news ".$sql_con; $res=$db->query($query); $msg=$db->fetch_array($res); $total=$msg[total]; //page class $p=new page; $p->offset=$offset; $p->total=$total; $p->page_size=$page_size; $p->show_page_num=11; $p->path=$_SERVER[PHP_SELF]; $p->arr_var=array("keyword"=>$keyword,"pid"=>$pid); $p->style=""; $page_state=$p->show(); $content.=""; $count_first=$offset; $query="select * from ".$table_pre."news ".$sql_con."order by add_date desc limit ".$count_first.",".$page_size; //echo $query."
"; $res=$db->query($query); $count=0; while($msg=$db->fetch_array($res)){ $list=$count+$pagesize+1; $content.=""; $count++; } if($count==0) $content.=""; $content.="
 
".date("M,d Y",$msg[add_date])."
".$msg[title]."
".substrgb1(no_html($msg[text]),200)."
View Article
 
 
No records!
"; ?> News - <? echo translate("index_title"); ?>
 
²»Ö§³Öflash
 
   
 
 Home - News
News
 
 
Contact us