caching = true; $smarty->cache_lifetime = 0; $smarty->left_delimiter = "{"; $smarty->right_delimiter = "}"; $cy=(int)$_GET["cy"]; $sid=(int)$_GET["sid"]; $page=(int)$_GET["page"]; if ( $sid ==0 || $cy ==0){ echo ""; die(); } if ($page ==0){ $page = 1; } if(!$smarty->isCached("newslists.tpl",$sid,$page)) { require("/www/web/joy1996.com/includes_php_config/sys_function.php"); $about_newsclass_query=tep_db_query("select * from html_news_class where id=" . $sid); $date_newsclass_text = tep_db_fetch_array($about_newsclass_query); $smarty->assign("seo_title",$date_newsclass_text["seo_title"] . "【sina】"); $smarty->assign("seo_keywords",$date_newsclass_text["seo_keywords"] . "【sina】"); $smarty->assign("seo_description",''); $menu_country=''; $query_list=tep_db_query("select * from html_country where t_status=0 order by sort_order desc,id LIMIT 0 , 9"); while ($date_list = tep_db_fetch_array($query_list)) { if ( $date_list["id"]==886 ){ $menu_country.='
  • '.$date_list['t_url_seo'].'
  • '; }else{ $menu_country.='
  • '.$date_list['t_url_seo'].'
  • '; } } $smarty->assign("menu_country",$menu_country); $country_id = $date_newsclass_text["country_id"]; $country_query=tep_db_query("select * from html_country where id=" . $country_id); $date_country_text = tep_db_fetch_array($country_query); $smarty->assign("country_id",$country_id); $smarty->assign("country_name",$date_country_text["t_name"]); $smarty->assign("country_file",$date_country_text["t_inc_file"]); $banner_pics =''.$date_country_text['t_url_seo'].''; $smarty->assign("banner_pics",$banner_pics); $daohang_links = '悦洋海外 > '.$date_country_text['t_url_seo'].' > ' . $date_newsclass_text['t_name']; $smarty->assign("daohang_links",$daohang_links); $news_lists_show=''; $size = 15; $start = ($page-1) * $size; $sql_total= "select *,count(*)as c from html_news_list where publish_date <=now() and admincheck=0 and class_id='$sid' "; $query_total=tep_db_query($sql_total); $row_total = tep_db_fetch_array($query_total); $num_rows = $row_total["c"]; $totalpage = ceil( $num_rows / $size ) ; $sql_list = "select id,t_name,date(publish_date) as temp_date from html_news_list where publish_date <=now() and admincheck=0 and class_id='$sid' order by sort_order desc,id desc limit $start,$size "; $query_news_list=tep_db_query($sql_list); while ($date_news_list = tep_db_fetch_array($query_news_list)) { $news_lists_show.='
  • '.$date_news_list['temp_date'].' '.$date_news_list['t_name'].'
  • '; } $smarty->assign("news_lists_show",$news_lists_show); $news_lists_pages=''; if ($totalpage>1) { for( $i=1; $i<=$totalpage; $i++ ){ if ($i ==$page){ $news_lists_pages.=''.$i.''; }else{ $news_lists_pages.=''.$i.''; } } } $smarty->assign("news_lists_pages",$news_lists_pages); $yimin_event_show=''; $query_event_list=tep_db_query("select * from html_events where events_type=1 or (events_type =0 and date(t_events_time_out)>=now()) order by events_type,sort_order desc,id desc LIMIT 0 , 2"); while ($date_event_list = tep_db_fetch_array($query_event_list)) { if ( $date_event_list['t_huigu']!="" || $date_event_list['events_type']==1){ $yimin_event_show.=' 【'.$date_event_list['t_events_city'].'】 '.$date_event_list['t_events_date'].'
    '.$date_event_list['t_name'].'
    '.$date_event_list['t_name'].' '.$date_event_list['t_name'].'
    '; }else{ $yimin_event_show.=' 【'.$date_event_list['t_events_city'].'】 '.$date_event_list['t_events_date'].'
    '.$date_event_list['t_name'].'
    '.$date_event_list['t_name'].' '.$date_event_list['t_name'].'
    '; } } $smarty->assign("yimin_event_show",$yimin_event_show); $right_last_news=''; $query_xiangguan_class_list=tep_db_query("select a.id,a.t_name,b.country_id ,b.t_name as class_name,c.t_name as country_name,c.t_inc_file from html_news_list a,html_news_class b, html_country c where a.class_id=b.id and b.country_id=c.id and a.publish_date <=now() and a.admincheck=0 order by a.id desc LIMIT 0 , 8"); while ($date_xiangguan_class_list = tep_db_fetch_array($query_xiangguan_class_list)) { $right_last_news.= '
  • '.cutstrbylen($date_xiangguan_class_list['t_name'],20).'
  • '; } $smarty->assign("right_last_news",$right_last_news); } $smarty->display("newslists.tpl",$sid,$page); ?>