トップ >  お知らせ一覧 > お知らせ一覧

検索結果

お知らせ一覧

お知らせrss

$t) return false; if(!empty($endDatetime)&&$endDatetime<$t) return false; return true; } }if(!function_exists('getA')){ function getA($text,$href,$target){ if(!empty($text)){ $h=$t=''; if(!empty($href)&&$href!='') $h=' href="'.$href.'"'; if(!empty($target)) $t=' target="'.$target.'"'; if(!empty($h)) { return ''.$text.''; }else{ return $text; } } return ''; } }if(!function_exists('getImg')){ function getImg($src,$width=null,$height=null){ $w=(!empty($width)?' width="'.$width.'"':''); $h=(!empty($height)?' height="'.$height.'"':''); if(!empty($src)&&$src!='') return ''; return ''; } }if(!function_exists('isExistNewsType')){ function isExistNewsType($newsItem,$type){ if(isset($newsItem->type)&&$type==$newsItem->type) return true; return false; } }if(!function_exists('isExistNewsCategory')){ function isExistNewsCategory($newsItem,$categoryId){ if(isset($newsItem->category_id)&&$categoryId==$newsItem->category_id) return true; return false; } }if(!function_exists('isExistEventCategory')){ function isExistEventCategory($eventItem,$categoryId){ if(isset($eventItem->categories)&&isset($eventItem->categories->category)){ foreach($eventItem->categories->category as $k=>$v){ if(isset($v->category)&&isset($v->category->id)&&$categoryId==$v->category->id) return true; } } return false; } }if(!function_exists('isExistEventCategory2')){ function isExistEventCategory2($eventItem,$category2Id){ if(isset($eventItem->categories)&&isset($eventItem->categories->category)){ foreach($eventItem->categories->category as $k=>$v){ if(isset($v->category2)&&isset($v->category2->id)&&$category2Id==$v->category2->id) return true; } } return false; } }if(!function_exists('getEventUrl')){ function getEventUrl($eventItem, $isFormPriority){ if($isFormPriority&&!empty($eventItem->form)&&(strlen($eventItem->form)>0)||(empty($eventItem->link)||(strlen($eventItem->link)<=0))){return $eventItem->form;}else{return $eventItem->link;} } } $ymd=''; $c=''; $q=''; $sort='2'; $PAGING=false; $TP=array(); $CT=array(); $DST=0; $DED=0; $VTN=false; $VICON=false; $evs=array(); if(!isset($nXml)) $nXml = @simplexml_load_file('/var/www/htdocs/east.jikei.asia/rss/news.xml','SimpleXMLElement',LIBXML_NOCDATA); if($nXml!==false){ $_evs=array(); foreach($nXml->item as $item){ $e=true; if(!empty($c)){ if(!isExistNewsCategory($item,$c)) $e=false; }elseif($e&&!empty($CT)){ $e=false; foreach($CT as $k=>$v) if(isExistNewsCategory($item,$v)){$e=true; break;} } if($e&&!empty($TP)){ $e=false; foreach($TP as $k=>$v) if(isExistNewsType($item,$v)){$e=true; break;} } if($e){ if(!empty($ymd)){ $_stm=1; $_std=1; $_edm=12; $_edd=31; if(strlen($ymd)>=4){$_sty=$_edy=substr($ymd,0,4);} if(strlen($ymd)>=6){$_stm=$_edm=substr($ymd,4,2); $_edd=date('t', mktime(0,0,0,$_edm,1,$_edy));} if(strlen($ymd)>=8){$_std=$_edd=substr($ymd,6,2);} if(!isset($item->view_date)||!isBetweenDatetime($item->view_date,mktime(0,0,0,$_stm,$_std,$_sty),mktime(23,59,59,$_edm,$_edd,$_edy))) $e=false; }elseif(!empty($DST)||!empty($DED)){ if(!isset($item->view_date)||!isBetweenDatetime($item->view_date,$DST,$DED)) $e=false; } } if($e) $_evs[$item->view_date.$item->id]=$item; } if($sort=='1') ksort($_evs); else krsort($_evs); if(!empty($q)&&!$PAGING){ $i=0; if(!empty($start)) $i=$start*-1+1; foreach($_evs as $k=>$v){ if($i>=0) $evs[$k]=$v; if((int)$q<=++$i) break; } }else{ $evs=$_evs; } }foreach($evs as $k=>$v){ echo '
'.date('Y',strtotime($v->view_date)).'.'.date('n',strtotime($v->view_date)).'.'.date('n',strtotime($v->view_date)).'
'.getA(''.mb_convert_encoding($v->title,'UTF-8','UTF-8').''.'',''.$v->link.'',''.$v->target.'').''.''.($VICON?getImg($v->icon,null,null):'').''.($VICON&&!empty($v->link_icon)&&(empty($v->icon_view_day)||strlen($v->icon_view_day)<=0||time()<(strtotime($v->icon_view_day)+86400))?getImg($v->link_icon,null,null):'').'
'; } ?>