0 ){ while( $row_sel = mysqli_fetch_array( $res_sel ) ){ $tmp_kind = $row_sel['c_list']; $lst_ncate = explode(",", $tmp_kind); } } $count_cate = count($lst_ncate); $onepage = 10; if($num == ""){ //---------------------- 一覧表示 -------------------------------------------------------------- $into_type = ""; if($type){ $count_type = count($check_cate); for($i=0;$i<=$count_type;$i++){ $into_type .= " AND (n_cate like '%".$check_cate[$i]."%') "; } } $tmp = 0; $list = array(); $dsp_nocount = ""; $sql_sel = "SELECT * FROM newstbl WHERE flg_del='0' AND n_stat='2'".$into_type; $sql_sel .= "AND (n_open ='1' OR '$now' >= n_opend) ORDER BY CASE WHEN n_open='1' THEN n_date WHEN n_open='2' THEN n_opend END DESC"; $res_sel = mysqli_query( $DBID_sel,"$sql_sel" ); $num_sel = mysqli_num_rows( $res_sel ); if( $num_sel > 0 ){ while( $row_sel = mysqli_fetch_array( $res_sel ) ){ $n_num = $row_sel[ 'n_num' ]; $n_date = $row_sel[ 'n_date' ]; $n_open = $row_sel[ 'n_open' ]; $n_opend = $row_sel[ 'n_opend' ]; $n_title = $row_sel[ 'n_title' ]; $tmp_cate = $row_sel['n_cate']; $tlist = array( $n_num,$n_date,$n_open,$n_opend,$n_title,$tmp_cate ); $list[$tmp] = implode( '|=boundary=|', $tlist ); $tmp++; } }else{ $dsp_nocount = '

条件に当てはまるお知らせはありません。

'; } $tmp_array = array(); $end = count( $list ); $num = array(); $title = array(); $dsp_date = array(); $dsp_cate = array(); for( $i=0; $i<$end; $i++ ){ list( $n_num,$n_date,$n_open,$n_opend,$n_title,$tmp_cate ) = explode( '|=boundary=|', $list[$i] ); if($n_open == '2'){ $n_date = $n_opend; } $n_date = substr( $n_date, 0, 16 ); list( $date, $time ) = explode( ' ', $n_date ); list( $year, $month, $day ) = explode( '-', $date ); $youbi = date('w',mktime(0,0,0,$month,$day,$year)); $month = abs( $month ); $day = abs( $day ); $youbi = date('w',mktime(0,0,0,$month,$day,$year)); $dsp_date[$i] = $year.'.'.$month.'.'.$day.'('.$lst_week[$youbi].')'; $n_cate = explode(",",$tmp_cate); $dsp_cate[$i] = ""; for($j=0;$j<$count_cate;$j++){ if($lst_ncate[$j] != ""){ if(in_array($lst_ncate[$j],$n_cate)){ $dsp_cate[$i] .= ''.$lst_ncate[$j].''; } } } $num[$i] = $n_num; $title[$i] = $n_title; $n_title = str_replace('
',' ',$n_title); $n_title = strip_tags($n_title); $title_in[$i] = $n_title; } head(""); ?>

お知らせ

News

札幌大同のイベントや情報をお知らせします!

>#すべて 0){ for($i=0;$i<$count_cate; $i++ ){ $tmp_chk = ""; if(in_array($lst_ncate[$i],$check_cate)){ $tmp_chk = ' class="on"'; } echo '#'.$lst_ncate[$i].''; } } ?>
  • = $end){ break; } } ?>
0 ){ $row_sel = mysqli_fetch_array( $res_sel ); $n_num = $row_sel[ 'n_num' ]; $n_date = $row_sel[ 'n_date' ]; $n_open = $row_sel[ 'n_open' ]; $n_opend = $row_sel[ 'n_opend' ]; $n_title = $row_sel[ 'n_title' ]; $n_text = $row_sel[ 'n_text' ]; //$n_text = str_replace(' ','',$n_text); $title = str_replace('
',' ',$n_title); $title = strip_tags($title); $tmp_cate = $row_sel['n_cate']; $n_cate = explode(",",$tmp_cate); $dsp_cate = ""; $c_num = count($n_cate); for($i=0;$i<$c_num;$i++){ if($n_cate[$i] != ""){ $dsp_cate .= ''.$n_cate[$i].''; } } if($n_open == '2'){ $n_date = $n_opend; } $n_date = substr( $n_date, 0, 16 ); list( $date, $time ) = explode( ' ', $n_date ); list( $year, $month, $day ) = explode( '-', $date ); $youbi = date('w',mktime(0,0,0,$month,$day,$year)); $month = abs( $month ); $day = abs( $day ); $youbi = date('w',mktime(0,0,0,$month,$day,$year)); $dsp_date = $year.'.'.$month.'.'.$day.'('.$lst_week[$youbi].')'; }else{ $n_coment = "このお知らせは存在しないか削除・非公開となりました。"; $title = ""; } head($title." | "); ?>

= n_opend) ORDER BY CASE WHEN n_open='1' THEN n_date WHEN n_open='2' THEN n_opend END DESC"; $res_sel = mysqli_query( $DBID_sel,"$sql_sel" ); $num_sel = mysqli_num_rows( $res_sel ); if( $num_sel > 0 ){ while( $row_sel = mysqli_fetch_array( $res_sel ) ){ $num_set[] = $row_sel[ 'n_num' ]; $title_set[] = $row_sel[ 'n_title' ]; } $news_sum = count($num_set); $key = array_search($num, $num_set); $back_link = '次の記事へ'; $next_link = ''; if($key != 0){ //次(新しい)の記事があれば $back_link = '次の記事へ'; } if(($key+1) != $news_sum){ //前(古い)の記事があれば $next_link = ''; } ?>
<?php echo $title; ?>お知らせ | 札幌大同印刷株式会社

本文へスキップします。

ここから本文です。