<?php
	include("../init1_db.php");

$PAGE_TITLE = "山梨県内ニュース";
$index_flag = 1 ;

$DEBUG = 1;	// 0:デバック
$speee_flag	=	1 ; // speee（uzou）本番フラグ 1:本番

$wheresql		= 	" where news_disp_flag = 1 and ( ( news_flag10 = 1 ) or ( news_start_date is null or ( news_flag10=1 or ( news_start_date <= '$cond4' and news_end_date >= '$cond4' ) ) ) ) ";
$wheresql		.= 	" and news_flag5=0 " ;
//$wk_fieldname2	=	" news_rsv3 desc , news_no desc , news_id";
$wk_fieldname2	=	" news_rsv3 desc , news_rsv4 , news_img1 desc , news_id";

$target_date	=	"" ;

// パラメータ取得
$no	=	func_sanitaze( func_parm_get( 'no' ) , 2 ) ;
$d	=	func_sanitaze( func_parm_get( 'd' ) , 2 ) ;
if( is_numeric( $d ) && $d && strlen( $d )==8 )
	$target_date	=	substr( $d , 0 , 4 )."/".substr( $d , 4 , 2 )."/".substr( $d , 6 , 2 ) ;

$tab_no			=	99 ;
$wk_news_name	=	"" ;
if( $no && is_numeric( $no ) )
{
	$stmt = "SELECT ";
	$stmt .= "news_id , " ;
	$stmt .= "news_name , " ;
	$stmt .= "news_memo2 , " ;
	$stmt .= "news_memo3 , " ;
	$stmt .= "news_memo4 , " ;
	$stmt .= "news_memo6 , " ;
	$stmt .= "news_img1 , " ;
	$stmt .= "news_img2 , " ;
	$stmt .= "news_pdf1 , " ;
	$stmt .= "news_pdf2 , " ;
	$stmt .= "news_pdf_title1 , " ;
	$stmt .= "news_pdf_title2 , " ;
	$stmt .= "news_flag1 , " ;
	$stmt .= "news_rand , " ;
	$stmt .= "news_date1 , ";
	$stmt .= "news_rsv3 , " ;
	$stmt .= "news_rsv4 " ;
	$stmt .= "FROM t_news $wheresql and " ;
	$stmt .= "news_id=" ;
	$stmt .= $no ;
	$sth = dbRunSql( $stmt ) ;
	$j = @mysqli_num_rows ( $sth ) ;
	if( $j > 0 )
	{
		$data	= mysqli_fetch_array( $sth , MYSQLI_ASSOC ) ;
		$wk_news_name	=	( $data['news_memo6'] ? $data['news_memo6'] : $data['news_name'] ) ;
		$target_date	=	$data['news_date1'] ;
	}
	else
		$no		=	0 ;
	$rinf = dbFreeResult( $sth ) ;
}

if( !$wk_news_name )
{
	mysqli_close( $dbh ) ;
	header("Location: /news/");
	exit();
}

// 今日
$now_y	=	substr( $cond , 0 , 4 ) ;
$now_m	=	(int)substr( $cond , 5 , 2 ) ;
$now_d	=	(int)substr( $cond , 8 , 2 ) ;
$wk		=	date( "w" , mktime( 0 , 0 , 0 , $now_m , $now_d, $now_y ) ) ;
$now_w	=	$DEF_YOUBI[$wk] ;

// 最新日付取得
$wk	=	"" ;
$stmt = "SELECT ";
$stmt .= "news_rsv3 ";
$stmt .= "FROM t_news $wheresql order by $wk_fieldname2 " ;
$stmt .= "limit 1" ;
$sth = dbRunSql( $stmt ) ;
$j = @mysqli_num_rows ( $sth ) ;
if( $j > 0 )
{
	$row	=	mysqli_fetch_object( $sth ) ;
	$wk	=	$row->news_rsv3 ;
	unset( $row ) ;
}
$rinf = dbFreeResult( $sth ) ;
if( $wk )
{
	$wk_y	=	substr( $wk , 0 , 4 ) ;
	$wk_m	=	substr( $wk , 5 , 2 ) ;
	$wk_d	=	substr( $wk , 8 , 2 ) ;
}
else
{
	$wk_y	=	$now_y ;
	$wk_m	=	$now_m ;
	$wk_d	=	$now_d ;
}
$before7	=	date( "Y/m/d" , mktime( 0 , 0 , 0 , $wk_m , $wk_d - 6 , $wk_y ) ) ;


// 日付配列
$arr_date	=	array() ;

if( $target_date && $before7 > $target_date )
{
	$wk_y	=	substr( $target_date , 0 , 4 ) ;
	$wk_m	=	substr( $target_date , 5 , 2 ) ;
	$wk_d	=	substr( $target_date , 8 , 2 ) ;
	$wk	=	date( "Y/m/d" , mktime( 0 , 0 , 0 , $wk_m , $wk_d + 6 , $wk_y ) ) ;
	$wk_y	=	substr( $wk , 0 , 4 ) ;
	$wk_m	=	substr( $wk , 5 , 2 ) ;
	$wk_d	=	substr( $wk , 8 , 2 ) ;
}
for( $i=0 ; $i<7 ; $i++ )
{
	$arr_date[$i]['date']	=	date( "Y/m/d" , mktime( 0 , 0 , 0 , $wk_m , $wk_d - $i , $wk_y ) ) ;
	$arr_date[$i]['year']	=	date( "Y" , mktime( 0 , 0 , 0 , $wk_m , $wk_d - $i , $wk_y ) ) ;
	$arr_date[$i]['mon']	=	date( "m" , mktime( 0 , 0 , 0 , $wk_m , $wk_d - $i , $wk_y ) ) ;
	$arr_date[$i]['day']	=	date( "d" , mktime( 0 , 0 , 0 , $wk_m , $wk_d - $i , $wk_y ) ) ;
	$wk	=	date( "w" , mktime( 0 , 0 , 0 , $wk_m , $wk_d - $i , $wk_y ) ) ;
	$arr_date[$i]['week']	=	$DEF_YOUBI[$wk] ;
	if( $target_date==$arr_date[$i]['date'] )
		$tab_no		=	$i ;
}
if( $tab_no==99 )
{
	$no			=	0 ;
	$tab_no		=	0 ;
}
$target_date	=	$arr_date[$tab_no]['date'] ;
$target_date_y	=	$arr_date[$tab_no]['year']  ;
$target_date_m	=	$arr_date[$tab_no]['mon']  ;
$target_date_d	=	$arr_date[$tab_no]['day']  ;
$target_date_w	=	$arr_date[$tab_no]['week']  ;


$CHAR_KEYWORD		=	"山梨県,ニュース,速報,報道" ;

$url		=	"" ;
$wk_memo	=	"" ;
if( $wk_news_name )
{
	$PAGE_TITLE			=	$wk_news_name ;
//	$wk_memo			=	strip_tags( func_non_entity( $wk_news_memo2 ) ) ;
	$wk_memo			=	strip_tags( func_non_entity( $data['news_memo2'] ) ) ;
	$wk_memo			=	str_replace( array( "\r\n", "\n", "\r" ) , "", $wk_memo ) ;
	$CHAR_DESCRIPTION	=	mb_strimbyte( $wk_memo , 0, 200, "..." , "utf-8" );

	$url		=	$HOME_URL."news/".str_replace( "/" , "" , $target_date )."/".$no."/" ;
}
else
{
//	$CHAR_DESCRIPTION	=	"山梨県内のニュース速報を毎日配信しております。スゴろくニュースの送時間の告知。また皆様からの投稿も受付ております。" ;
	$CHAR_DESCRIPTION	=	"山梨県内の最新ニュースを毎日配信しております。また皆様からのニュースの投稿も受付けております。" ;
}
?>

<!doctype html>
<html class="no-js" lang="ja">
    <head>
        <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="format-detection" content="telephone=no" />
<meta name="robots" content="INDEX,FOLLOW" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="Keywords" content="<?php print $CHAR_KEYWORD;?>" />
<meta name="Description" content="<?php print $CHAR_DESCRIPTION ;?>" />
<?php
if( $wk_memo )
{
?>
<meta property="og:title" content="<?php print $wk_news_name ; ?>" />
<meta property="og:type" content="article" />
<meta property="og:url" content="<?php print $url ; ?>" />
<meta property="og:image" content="<?php print ( $data['news_img1'] ? "https://www.uty.co.jp/up_img/news/".$data['news_rand']."/".$data['news_img1'] : "https://www.uty.co.jp/common/images/news.jpg" ) ; ?>" />
<meta property="og:description" content="<?php print $CHAR_DESCRIPTION ;?>" />
<meta property="og:site_name" content="<?php print $SITE_NAME ; ?>" />
<?php
}
?>
<meta http-equiv="expires" content="sat, 1 Jan 2000 00:00:00 GMT" />
<meta http-equiv="cache-control" content="no-store, no-cache, must-revalidate, max-age=0" />
<meta http-equiv="cache-control" content="post-check=0, pre-check=0" />
<meta http-equiv="pragma" content="no-cache" />
<title><?php print $PAGE_TITLE." | ".$SITE_NAME; ?></title>
<link rel="shortcut icon" href="<?php print $CHAR_FAVICON;?>" />
<base href="<?php print $HOME_URL ; ?>news/">

		<!-- ========================= CSS here ========================= -->
		<link rel="stylesheet" href="../css/bootstrap-5.0.0-alpha-1.min.css">
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
        <link rel="stylesheet" href="../css/LineIcons.2.0.css">
		<link rel="stylesheet" href="../css/animate.css">
		<link rel="stylesheet" href="../css/slider-pro.css">
		<link rel="stylesheet" href="../assets/js/slick/slick-theme.css">
		<link rel="stylesheet" href="../assets/js/slick/slick.css">
		<link rel="stylesheet" href="../css/main.css">
<?php
if( $DEBUG )
{
	include("../common/accesslog.php");
}
?>
    </head>
    <body class="subbody" oncontextmenu="return false;">
        <!--[if lte IE 9]>
            <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience and security.</p>
        <![endif]-->
<?php include("../common/header.php"); ?>

        <div class="sub_main">
        <nav aria-label="breadcrumb">
          <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="../">TOP</a></li>
            <li class="breadcrumb-item"><a href="./">山梨県内ニュース</a></li>
            <li class="breadcrumb-item active" aria-current="page"><?php print $PAGE_TITLE ; ?></li>
          </ol>
        </nav>
        <section class="module">
            <div class="container">
<?php
if( $device=="mobile" )
{
?>
                <div class="mb-3">
<?php
	$DEF_SWITCH_LIMIT_S	=	"2022-02-01 00:00:00" ;
//	$DEF_SWITCH_LIMIT_E	=	"2022-03-04 00:00:00" ;
	$DEF_SWITCH_LIMIT_E	=	"2022-02-24 12:00:00" ;
	$now_time			=	date( "Y-m-d H:i:s" ) ;
	if( $now_time >= $DEF_SWITCH_LIMIT_S && $now_time < $DEF_SWITCH_LIMIT_E )
	{
?>
<p class="visible-xs text-center">
<a href="https://www.wine.or.jp/gi-yamanashi/store/" target="_blank" onclick="ga( 'send', 'event', 'banner', 'click', 'GI山梨ワインオンラインショップ_スマホ_ニュース上') ;"><img src="/common/images/banner/giyamanashi202202sp.jpg" alt="GI山梨ワインオンラインショップ" class="img-responsive img-responsive-center" style="width:320px" /></a>
</p>
<?php
	}
	else
	{
		$DEF_SWITCH_LIMIT_S2	=	"2022-02-26 00:00:00" ;
		$DEF_SWITCH_LIMIT_E2	=	"2022-03-26 00:00:00" ;
		$now_time			=	date( "Y-m-d H:i:s" ) ;
		if( $now_time >= $DEF_SWITCH_LIMIT_S2 && $now_time < $DEF_SWITCH_LIMIT_E2 )
			$img	=	"chairsm2.jpg" ;
		else
			$img	=	"chairsm.jpg" ;
?>
<p class="visible-xs text-center">
<a href="<?php print $HOME_URL;?>shopping/chair.php" onclick="ga( 'send', 'event', 'banner', 'click', 'ポイスチャーサポートチェア_スマホ_ニュース上') ;"><img src="/common/images/banner/<?php print $img ; ?>" alt="ポイスチャーサポートチェア" class="img-responsive img-responsive-center" style="width:320px" /></a>
</p>
<?php
	}
?>
<?php
if( 0 )
{
?>
<p class="visible-xs text-center">
<a href="<?php print $HOME_URL;?>shopping/" onclick="ga( 'send', 'event', 'banner', 'click', '山梨の旬のフルーツをお届け_スマホ_ニュース上') ;"><img src="/common/images/banner/ja_320_100.jpg" alt="山梨の旬のフルーツをお届け！" /></a>
</p>
<?php
}
?>
                </div>
<?php
}
?>

                <div class="row">
                    <div class="col-lg-8 col-xl-9">
                    <div class="h2_title"><img src="../images/news/main.jpg" alt="<?php print $PAGE_TITLE ; ?>" class="img-responsive"></div>

<?php
if( $data['news_id'] )
{
				$class	=	"" ;
				if( $data['news_flag1'] )
					$class	=	( $data['news_flag1']==5 ? "flag13" : "flag".sprintf( "%02d" , $data['news_flag1'] ) ) ;
				else
					$class	=	"flag04" ;
?>
                    <div class="news_detail">
                        <h3 class="news_title"><img src="../images/sub/icon2.svg" width="25"><?php print ( $data['news_memo6'] ? $data['news_memo6'] : $data['news_name'] ) ; ?></h3>
                        <p class="date <?php print $class ; ?>"><?php print str_replace( "/" , "." , substr( $data['news_rsv3'] , 0 , 10 ) ) ; ?><span class="time"><?php print substr( $data['news_rsv3'] , 11 , 5 ) ; ?></span></p>
<?php
							if( $data['news_img1'] )
							{
								$img	=	"/up_img/news/".$data['news_rand']."/".$data['news_img1'] ;
?>
                        <div class="news_img">
                        <img src="<?php print $img ; ?>" alt="<?php print ( $data['news_memo6'] ? $data['news_memo6'] : $data['news_name'] ) ; ?>" class="img-responsive">
                        </div>
<?php
							}
							if( $data['news_img2'] )
							{
								$img	=	"/up_img/news/".$data['news_rand']."/".$data['news_img2'] ;
?>
                        <div class="news_img mt-3">
                        <img src="<?php print $img ; ?>" alt="<?php print ( $data['news_memo6'] ? $data['news_memo6'] : $data['news_name'] ) ; ?>" class="img-responsive">
                        </div>
<?php
							}
?>

<?php
// 2022.01.31 start i-mobile
if( $device=="mobile" )
{
?>
<?php
	// 1:i-mobile
//	if( 1 )
	if( $sm_ad_mode==1 )
	{
?>
<!-- /9176203,22484854615/1776045 SP 記事画像下レクタングル -->
<div id='div-gpt-ad-1643012819402-0' style='margin:auto;text-align:center;' class="mt-3">
  <script>
    googletag.cmd.push(function() { googletag.display('div-gpt-ad-1643012819402-0'); });
  </script>
</div>

<?php
	// 2:fluct
	}
	else
	{
?>
<!-- /62532913,22525286053/s_uty_300x250_kijigazoshita-rectangle_27630 -->
<div id='div-gpt-ad-1645152658191-0' style='min-width: 300px; min-height: 250px;' class="mt-3">
<script>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1645152658191-0'); });
</script>
</div>
<?php
	}
?>
<?php
}
// 2022.01.31 end i-mobile
?>


                        <p class="news_text">
<?php
							print nl2br( func_non_entity( $data['news_memo2'] ) ) ;
?>
                        </p>
<?php
							if( $data['news_memo3'] )
							{
?>
                        <div class="links">
                            <a href="/news/video/<?php print str_replace( "/" , "" , $target_date )."/".$no."/" ; ?>" class="underline">このニュースの動画を見る</a>
                        </div>
<?php
							}
?>

<?php
// 2022.02.04 start speee
// テキスト
if( $device=="mobile" )
{
	// 1:i-mobile
	if( $sm_ad_mode==1 )
	{
?>
<div class="uz-2-uty_sp uz-ny" data-uz-url="%%PATTERN:url%%"></div>
<script async type="text/javascript" src="https://speee-ad.akamaized.net/tag/2-uty_sp/js/outer-frame.min.js" charset="utf-8"></script>
<?php
	}
}
// 2022.02.04 end speee
?>

<?php
// 2022.01.31 start i-mobile
if( $device=="mobile" )
//if( 1 )
{
	// 1:i-mobile
//	if( 1 )
	if( $sm_ad_mode==1 )
	{
?>
<!-- /9176203,22484854615/1776046 SP 記事下レクタングル -->
<div id='div-gpt-ad-1643012890884-0' style='margin:auto;text-align:center;'>
  <script>
    googletag.cmd.push(function() { googletag.display('div-gpt-ad-1643012890884-0'); });
  </script>
</div>
<?php
	// 2:fluct
	}
	else
	{
?>
<!-- /62532913,22525286053/s_uty_300x250_kijishita-rectangle_27630 -->
<div id='div-gpt-ad-1645152676784-0' style='min-width: 300px; min-height: 250px;'>
<script>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1645152676784-0'); });
</script>
</div>
<?php
	}
}
// PC
else
{
?>
<div class="row">
<div class="col-6 text-center">
<!-- /9176203,22484854615/1777078 PC 記事下レクタングル左 -->
<div id='div-gpt-ad-1643797869300-0'>
  <script>
    googletag.cmd.push(function() { googletag.display('div-gpt-ad-1643797869300-0'); });
  </script>
</div>
</div>
<div class="col-6 text-center">
<!-- /9176203,22484854615/1777079 PC 記事下レクタングル右 -->
<div id='div-gpt-ad-1643797965901-0'>
  <script>
    googletag.cmd.push(function() { googletag.display('div-gpt-ad-1643797965901-0'); });
  </script>
</div>
</div>
</div>
<?php
}
// 2022.01.31 end i-mobile
?>

                       <div class="arrow">
<?php
							$wk_fieldname3	=	" news_rsv3 desc , news_rsv4 desc , news_img1 , news_id desc";
							$stmt = "SELECT ";
							$stmt .= "news_id , ";
							$stmt .= "news_date1 ";
							$stmt .= "FROM t_news $wheresql and news_jump_url like '' and news_date1 like '" ;
							$stmt .= $target_date ;
							$stmt .= "' and news_rsv4 < '" ;
							$stmt .= $data['news_rsv4'] ;
							$stmt .= "' " ;
							$stmt .= "order by $wk_fieldname3 limit 1 " ;
							$sth = dbRunSql( $stmt ) ;
							$jj = @mysqli_num_rows ( $sth ) ;
							if( $jj > 0 )
							{
								$row	=	mysqli_fetch_object( $sth ) ;
								$link	=	"/news/".str_replace( "/" , "" , $row->news_date1 )."/".$row->news_id."/" ;
?>

                            <a href="<?php print $link ; ?>" class="btn btn-primary btn-sm"><i class="fas fa-angle-left"></i>&nbsp;&nbsp;&nbsp;前のニュース</a>&nbsp;&nbsp;
<?php
								unset( $row ) ;
							}
?>
<?php
							$rinf = dbFreeResult( $sth ) ;

							$stmt = "SELECT ";
							$stmt .= "news_id , ";
							$stmt .= "news_date1 ";
							$stmt .= "FROM t_news $wheresql and news_jump_url like '' and news_date1 like '" ;
							$stmt .= $target_date ;
							$stmt .= "' and news_rsv4 > '" ;
							$stmt .= $data['news_rsv4'] ;
							$stmt .= "' " ;
							$stmt .= "order by $wk_fieldname2 limit 1 " ;
							$sth = dbRunSql( $stmt ) ;
							$jj = @mysqli_num_rows ( $sth ) ;
							if( $jj > 0 )
							{
								$row	=	mysqli_fetch_object( $sth ) ;
								$link	=	"/news/".str_replace( "/" , "" , $row->news_date1 )."/".$row->news_id."/" ;
?>
                            <a href="<?php print $link ; ?>" class="btn btn-primary btn-sm">次のニュース&nbsp;&nbsp;&nbsp;<i class="fas fa-angle-right"></i></a>
<?php
								unset( $row ) ;
							}
							$rinf = dbFreeResult( $sth ) ;
?>
                        </div>
                    </div>
<?php
	if( $DEBUG )
	{
							include( "./sub_news_count.php" );
	}
}
unset( $data ) ;
?>




<?php
if( 0 )
{
?>
                    <div class="news_detail">
                        <h3 class="news_title"><img src="../images/sub/icon_list.svg" width="25">あなたにおすすめの記事</h3>
                        <div class="row">
                            <div class="col-sm-6 col-md-4 col-lg-3">
                                <div class="hights mt-3">
                                   <a href="#">
                                       <img src="../images/news/exp.jpg" class="img-responsive">
                                       <p class="news_text_s">新型コロナ感染拡大　飲食店対象の休業要請や大規模集客施設の休業や入場制限も　山梨</p>
                                   </a>
                                    
                                </div>
                            </div>
                            <div class="col-sm-6 col-md-4 col-lg-3">
                                <div class="hights mt-3">
                                   <a href="#">
                                       <img src="../images/news/exp.jpg" class="img-responsive">
                                       <p class="news_text_s">新型コロナ感染拡大　飲食店対象の休業要請や大規模集客施設の休業や入場制限も　山梨</p>
                                   </a>
                                    
                                </div>
                            </div>
                            <div class="col-sm-6 col-md-4 col-lg-3">
                                <div class="hights mt-3">
                                   <a href="#">
                                       <img src="../images/news/exp.jpg" class="img-responsive">
                                       <p class="news_text_s">新型コロナ感染拡大　飲食店対象の休業要請や大規模集客施設の休業や入場制限も　山梨</p>
                                   </a>
                                    
                                </div>
                            </div>
                            <div class="col-sm-6 col-md-4 col-lg-3">
                                <div class="hights mt-3">
                                   <a href="#">
                                       <img src="../images/news/exp.jpg" class="img-responsive">
                                       <p class="news_text_s">新型コロナ感染拡大　飲食店対象の休業要請や大規模集客施設の休業や入場制限も　山梨</p>
                                   </a>
                                    
                                </div>
                            </div>
                            <div class="col-sm-6 col-md-4 col-lg-3">
                                <div class="hights mt-3">
                                   <a href="#">
                                       <img src="../images/news/exp.jpg" class="img-responsive">
                                       <p class="news_text_s">新型コロナ感染拡大　飲食店対象の休業要請や大規模集客施設の休業や入場制限も　山梨</p>
                                   </a>
                                    
                                </div>
                            </div>
                            <div class="col-sm-6 col-md-4 col-lg-3">
                                <div class="hights mt-3">
                                   <a href="#">
                                       <img src="../images/news/exp.jpg" class="img-responsive">
                                       <p class="news_text_s">新型コロナ感染拡大　飲食店対象の休業要請や大規模集客施設の休業や入場制限も　山梨</p>
                                   </a>
                                    
                                </div>
                            </div>
                            <div class="col-sm-6 col-md-4 col-lg-3">
                                <div class="hights mt-3">
                                   <a href="#">
                                       <img src="../images/news/exp.jpg" class="img-responsive">
                                       <p class="news_text_s">新型コロナ感染拡大　飲食店対象の休業要請や大規模集客施設の休業や入場制限も　山梨</p>
                                   </a>
                                    
                                </div>
                            </div>
                            
                        </div>
                        </div>
<?php
}
?>

<?php
// 2022.02.04 start speee
// あなたにおすすめ
if( $speee_flag )
{
if( $device=="mobile" )
{
?>
<div class="uz-uty_sp uz-ny" data-uz-url="%%PATTERN:url%%"></div>
<script async type="text/javascript" src="https://speee-ad.akamaized.net/tag/uty_sp/js/outer-frame.min.js" charset="utf-8"></script>
<?php
}
else
{
?>
<div class="uz-uty_pc uz-ny" data-uz-url="%%PATTERN:url%%"></div>
<script async type="text/javascript" src="https://speee-ad.akamaized.net/tag/uty_pc/js/outer-frame.min.js" charset="utf-8"></script>
<?php
}
}
else
{
if( $device=="mobile" )
{
?>
<div class="uz-uty_sp uz-ny" data-uz-url="%%PATTERN:url%%"></div>
<script async type="text/javascript" src="https://staging-speee-ad.akamaized.net/tag/uty_sp/js/outer-frame.min.js" charset="utf-8"></script>
<?php
}
else
{
?>
<div class="uz-uty_pc uz-ny" data-uz-url="%%PATTERN:url%%"></div>
<script async type="text/javascript" src="https://staging-speee-ad.akamaized.net/tag/uty_pc/js/outer-frame.min.js" charset="utf-8"></script>
<?php
}
}
// 2022.02.04 end speee
?>

<?php
// 2022.01.31 start i-mobile
if( $device=="mobile" )
//if( 1 )
{
	// 1:i-mobile
//	if( 1 )
	if( $sm_ad_mode==1 )
	{
	// 2:fluct
	}
	else
	{
?>
<!-- /62532913,22525286053/s_uty_300x250_kijiuzoushita-rectangle_27630 -->
<div id='div-gpt-ad-1645152695544-0' style='min-width: 300px; min-height: 250px;'  class="mb-3">
<script>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1645152695544-0'); });
</script>
</div>
<?php
	}
?>
<?php
}
// PC
else
{
?>
<div class="row mb-5">
<div class="col-6 text-center">
<!-- /9176203,22484854615/1777080 PC 記事UZOU下レクタングル左 -->
<div id='div-gpt-ad-1643798063813-0'>
  <script>
    googletag.cmd.push(function() { googletag.display('div-gpt-ad-1643798063813-0'); });
  </script>
</div>
</div>
<div class="col-6 text-center">
<!-- /9176203,22484854615/1777081 PC 記事UZOU下レクタングル右 -->
<div id='div-gpt-ad-1643798171163-0'>
  <script>
    googletag.cmd.push(function() { googletag.display('div-gpt-ad-1643798171163-0'); });
  </script>
</div>
</div>
</div>
<?php
}
// 2022.01.31 end i-mobile
?>

                    <div class="news_detail">
                        <h3 class="news_title"><img src="../images/sub/icon_calendar.svg" width="25"><?php print (int)$target_date_m ; ?>月<?php print (int)$target_date_d ; ?>日（<?php print $target_date_w ; ?>）</h3>
                        <ul class="news_detail_list">
<?php
			$stmt = "SELECT ";
			$stmt .= "news_id , ";
			$stmt .= "news_name , ";
			$stmt .= "news_memo3 , ";
			$stmt .= "news_memo4 , ";
			$stmt .= "news_memo6 , ";
			$stmt .= "news_img1 , ";
			$stmt .= "news_jump_url , ";
			$stmt .= "news_flag1 , ";
			$stmt .= "news_flag9 , ";
			$stmt .= "news_rand , ";
			$stmt .= "news_date1 , ";
			$stmt .= "news_rsv3 ";
			$stmt .= "FROM t_news $wheresql " ;
			$stmt .= " and news_date1 like '" ;
			$stmt .= $target_date ;
			$stmt .= "' " ;
			$stmt .= "order by $wk_fieldname2 " ;
			$sth = dbRunSql( $stmt ) ;
			$j = @mysqli_num_rows ( $sth ) ;
			for( $i=0 ; $i<$j ; $i++ )
			{
				$row	=	mysqli_fetch_object( $sth ) ;
				$mark	=	"" ;
				if( $row->news_memo3 || $row->news_memo4 )
					$mark	=	" class=\"video\"" ;
				else if( $row->news_img1 )
					$mark	=	" class=\"picture\"" ;

				$news_name	=	( $row->news_memo6 ?  $row->news_memo6 : $row->news_name ) ;
				$news_name	=	mb_convert_kana( $news_name , "Ka" ) ;
				$news_rsv3	=	str_replace( "/" , "." , substr( $row->news_rsv3 , 0 , 10 ) ) ;

				$link	=	"" ;
				$target	=	"" ;
				if( $row->news_jump_url )
				{
					$link	=	$row->news_jump_url ;
					$target	=	( $row->news_flag9==1 ? " target=\"_blank\"" : "" ) ;
				}
				else
					$link	=	"/news/".str_replace( "/" , "" , $row->news_date1 )."/".$row->news_id."/" ;

?>
                            <li<?php print $mark ; ?>><a href="<?php print $link ; ?>"<?php print $target ; ?>><?php print $news_name ; ?></a></li>
<?php
				unset( $row ) ;
			}
			$rinf = dbFreeResult( $sth ) ;
?>
                        </ul>
<?php
// 2022.02.04 start speee
// テキスト
if( $device!="mobile" )
{
?>
<div class="uz-2-uty_pc uz-ny" data-uz-url="%%PATTERN:url%%"></div>
<script async type="text/javascript" src="https://speee-ad.akamaized.net/tag/2-uty_pc/js/outer-frame.min.js" charset="utf-8"></script>
<?php
}
// 2022.02.04 end speee
?>
                     </div>




<?php
if( 0 )
{
?>
                        <div class="news_detail">
                        <h3 class="news_title"><img src="../images/sub/icon_recommend.svg" width="25">アクセスランキング</h3>
                        
                    <ul class="slider1">
                    <li><a href="#" class="latest_img group1">
                    <img src="../images/news/exp.jpg" class="img-responsive">
                    <p class="news_text_s">富士山の麓の西湖の水位が上昇　キャンプ場のテントサイトが水没　山梨</p>
                    </a></li>
                    <li><a href="#" class="latest_img group1">
                    <img src="../images/news/exp.jpg" class="img-responsive">
                    <p class="news_text_s">富士山 夏山シーズンの終わり告げる「吉田の火祭り」開催　観覧は自粛呼びかけ</p>
                    </a></li>
                    <li><a href="#" class="latest_img group1">
                    <img src="../images/news/exp.jpg" class="img-responsive">
                    <p class="news_text_s">学習機会を確保　山梨県甲府市の私立学校　オンラインで授業</p>
                    </a></li>
                    <li><a href="#" class="latest_img group1">
                    <img src="../images/news/exp.jpg" class="img-responsive">
                    <p class="news_text_s">富士山 夏山シーズンの終わり告げる「吉田の火祭り」開催　観覧は自粛呼びかけ</p>
                    </a></li>
                    <li><a href="#" class="latest_img group1">
                    <img src="../images/news/exp.jpg" class="img-responsive">
                    <p class="news_text_s">学習機会を確保　山梨県甲府市の私立学校　オンラインで授業</p>
                    </a></li>
                    <li><a href="#" class="latest_img group1">
                    <img src="../images/news/exp.jpg" class="img-responsive">
                    <p class="news_text_s">富士山の麓の西湖の水位が上昇　キャンプ場のテントサイトが水没　山梨</p>
                    </a></li>
                    
                    </ul>
                        </div>
<?php
}
?>
<?php
// 2022.02.04 start speee
if( $speee_flag )
{
if( $device=="mobile" )
{
?>
<div class="uz-rank-uty_sp uz-ny" data-uz-url="%%PATTERN:url%%"></div>
<script async type="text/javascript" src="https://speee-ad.akamaized.net/tag/rank-uty_sp/js/outer-frame.min.js" charset="utf-8"></script>
<?php
}
}
else
{
if( $device=="mobile" )
{
?>
<div class="uz-rank-uty_sp uz-ny" data-uz-url="%%PATTERN:url%%"></div>
<script async type="text/javascript" src="https://staging-speee-ad.akamaized.net/tag/rank-uty_sp/js/outer-frame.min.js" charset="utf-8"></script>
<?php
}
}
// 2022.02.04 end speee
?>


<?php
	if( $device!="mobile" )
	{
?>
<div class="row">
	<div class="col-xs-12 col-sm-6">
<p class="text-center">
<script type="text/javascript" language="JavaScript">
yads_ad_ds = '98877_249585';
</script>
<script type="text/javascript" language="JavaScript" src="//yads.c.yimg.jp/js/yads.js"></script>
</p>
	</div>
	<div class="col-xs-12 col-sm-6">
<p class="text-center">
<script type="text/javascript" language="JavaScript">
yads_ad_ds = '98877_249587';
</script>
<script type="text/javascript" language="JavaScript" src="//yads.c.yimg.jp/js/yads.js"></script>
</p>
	</div>
</div>
<?php
	}
?>





 
 
 
                    </div>
                    <div class="col-lg-4 col-xl-3">
<?php
//	include( "./sub_side.php" ) ;
	include( "./sub_side_info.php" ) ;
?>
                              
                       </div>
                       </div>
                    </div>
        </section>
        </div>

<?php include("../common/footer.php"); ?>

        <!-- ========================= scroll-top ========================= -->
        <a href="#" class="scroll-top">
            <i class="fas fa-level-up-alt"></i>
        </a>

		<!-- ========================= JS here ========================= -->
		<script src="../assets/js/bootstrap.bundle-5.0.0.alpha-1-min.js"></script>
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
		<script src="../assets/js/wow.min.js"></script>
		<script src="../assets/js/main.js"></script>
   <script src="../assets/js/jquery.matchHeight.js"></script>
   <script src="../assets/js/jquery.sliderPro.min.js"></script>
   <script src="../assets/js/slick/slick.js"></script>
   <script>
      $(function() {
    $('.hights').matchHeight();
    $('.link_list_footer').matchHeight();
          $('.slider1').slick({
            autoplay:true,
            arrows:true,
            autoplaySpeed:5000,
            dots:false,
            slidesToShow:3,
            slidesToScroll:1,
            responsive:[
        {
            breakpoint: 768,
            settings:{
                slidesToShow:2,
            }
        },
        {
            breakpoint: 480,
            settings:{
                slidesToShow:1,
            }
        },
    ]
});
  });
    </script>
<?php
unset( $arr_date ) ;
func_array_unset() ;
/* データベースクローズ */
mysqli_close( $dbh ) ;
?>
    </body>
</html>
