<?php
	include("../init1_db.php");

$PAGE_TITLE = "Uワクイーツ";
$index_flag = 1 ;

$DEBUG = 1 ;

$wheresql	= 	" where bkn_disp_flag = 1 and ( ( bkn_flag10 = 1 ) or ( bkn_start_date is null or ( bkn_flag10=1 or ( bkn_start_date <= '$cond4' and bkn_end_date >= '$cond4' ) ) ) ) ";
$wheresql	.= 	" and bkca_id=20 ";
$wk_fieldname2	=	" bkn_no desc , bkn_rsv3 desc , bkn_id";

// パラメータ取得
$no	=	func_sanitaze( func_parm_get( 'no' ) , 2 ) ;

if( $no && is_numeric( $no ) )
{
	$stmt = "SELECT ";
	$stmt .= "bkn_id , " ;
	$stmt .= "bkn_name , " ;
	$stmt .= "bkn_img1 , " ;
	$stmt .= "bkn_img2 , " ;
	$stmt .= "bkn_img3 , " ;
	$stmt .= "bkn_img4 , " ;
	$stmt .= "bkn_img5 , " ;
	$stmt .= "bkn_img6 , " ;
	$stmt .= "bkn_img7 , " ;
	$stmt .= "bkn_img8 , " ;
	$stmt .= "bkn_img9 , " ;
	$stmt .= "bkn_img10 , " ;
	$stmt .= "bkn_memo1 , " ;
	$stmt .= "bkn_memo2 , " ;
	$stmt .= "bkn_memo8 , " ;
	$stmt .= "bkn_memo9 , " ;
	$stmt .= "bkn_memo10 , " ;
	$stmt .= "bkn_rand , " ;
	$stmt .= "bkn_rsv3  " ;
	$stmt .= "FROM t_backnumber $wheresql and " ;
	$stmt .= "bkn_id=" ;
	$stmt .= $no ;
	$sth = dbRunSql( $stmt ) ;
	$j = @mysqli_num_rows ( $sth ) ;
	if( $j > 0 )
	{
		$data	= mysqli_fetch_array( $sth , MYSQLI_ASSOC ) ;
	}
	$rinf = dbFreeResult( $sth ) ;
}

$url		=	"" ;
$wk_memo	=	"" ;
if( $data['bkn_name'] )
{
	$wk_memo			=	func_non_entity( $data['bkn_memo1'] ) ;
	$wk_memo			=	str_replace( array( "\r\n", "\n", "\r" ) , "", $wk_memo ) ;
	$CHAR_DESCRIPTION	=	mb_strimbyte( $wk_memo , 0, 200, "..." , "utf-8" );

	$url		=	$HOME_URL."eats/info.php?no=".$data['bkn_id'] ;
}
?>
<!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;?>" />
    <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" />
<?php
if( $wk_memo )
{
?>
<meta property="og:title" content="<?php print $data['bkn_name'] ; ?>" />
<meta property="og:type" content="article" />
<meta property="og:url" content="<?php print $url ; ?>" />
<meta property="og:image" content="<?php print ( $data['bkn_img1'] ? "https://www.uty.co.jp/up_img/eats/".$data['bkn_rand']."/".$data['bkn_img1'] : "" ) ; ?>" />
<meta property="og:description" content="<?php print $CHAR_DESCRIPTION ;?>" />
<meta property="og:site_name" content="<?php print $SITE_NAME ; ?>" />
<?php
}
?>
    <base href="">
    <title><?php print ( $data['bkn_name'] ? $data['bkn_name']." | " : "" ).$PAGE_TITLE." | ".$SITE_NAME; ?></title>
    <link rel="shortcut icon" href="<?php print $CHAR_FAVICON;?>" />

    <!-- ========================= 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">
    <link rel="stylesheet" href="./style.css">
    <?php
if( $DEBUG )
{
	include( "../common/accesslog.php" ) ;
}
?>

</head>

<body 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"); ?>

    <section id="home" class="hero-section">
        <div class="container-fluid">
            <div class="row">
                <div class="col-12">
                    <div class="hero-content-wrapper">
                        <img src="../images/eats/sub_main.jpg" class="img-responsive d-none d-sm-block">
                        <img src="../images/eats/sub_main_sp.jpg" class="img-responsive d-block d-sm-none">
                    </div>
                </div>
            </div>
        </div>

    </section>
    <nav aria-label="breadcrumb">
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="../">TOP</a></li>
            <li class="breadcrumb-item"><a href="./">Uワクイーツ</a></li>
<?php
if( $data['bkn_name'] )
{
?>
            <li class="breadcrumb-item active" aria-current="page"><?php print $data['bkn_name'] ; ?></li>
<?php
}
?>
        </ol>
    </nav>
    <section class="module">
	<div class="container">
		<div class="row">
			<div class="col-12 col-lg-7">
<?php
$disp_id	=	0 ;
if( $data['bkn_name'] )
{
?>
				<h2 class="h2_title"><?php print $data['bkn_name'] ; ?></h2>

				<div class="mt-5">
<?php
// 2022.08.03 start
if( 0 )
{
if( $device=="mobile" )
{
	if( 0 )
	{
?>
<!-- /9176203,22484854615/1778823 SP 店舗ページTOP/Uワクイーツ下バナー -->
<div id='div-gpt-ad-1645149377868-0' style='margin:auto;text-align:center;'>
  <script>
    googletag.cmd.push(function() { googletag.display('div-gpt-ad-1645149377868-0'); });
  </script>
</div>
<?php
	}
}
else
{
?>
<!-- /9176203,22484854615/1778825 PC 店舗ページTOP/Uワクイーツ下バナー -->
<div id='div-gpt-ad-1645149556079-0'>
  <script>
    googletag.cmd.push(function() { googletag.display('div-gpt-ad-1645149556079-0'); });
  </script>
</div>
<?php
}
}
// 2022.08.03 end
?>
				</div>


				<div class="mt-5">
<ul class="slider">
<?php
	for( $i=1 ; $i<=10 ; $i++ )
	{
		if( $data['bkn_img'.$i] )
		{
			$img	=	$UPIMG_PATH."eats/".$data['bkn_rand']."/".$data['bkn_img'.$i] ;
?>
    <li><img src="<?php print $img ; ?>" class="img-responsive"></li>
<?php
		}
	}
?>
</ul>
<ul class="thumb">
<?php
	for( $i=1 ; $i<=10 ; $i++ )
	{
		if( $data['bkn_img'.$i] )
		{
			$img	=	$UPIMG_PATH."eats/".$data['bkn_rand']."/".$data['bkn_img'.$i] ;
?>
    <li><img src="<?php print $img ; ?>" class="img-responsive"></li>
<?php
		}
	}
?>
</ul>

				</div>
<?php
	if( $data['bkn_memo1'] )
	{
?>
				<div class="shop_memo">
                   <p>
<?php 
		print nl2br( func_non_entity( $data['bkn_memo1'] ) ) ; 
?>
                   </p>
				</div>
<?php
	}
?>
				<div class="sns_share">
					<div class="sns_line">
						<div class="line-it-button" data-lang="ja" data-type="share-a" data-env="REAL" data-url="https://developers.line.biz/ja/docs/line-social-plugins/install-guide/using-line-share-buttons/" data-color="default" data-size="small" data-count="false" data-ver="3" style="display: none;"></div>
<script src="https://www.line-website.com/social-plugins/js/thirdparty/loader.min.js" async="async" defer="defer"></script>
					</div>
                  <div class="fb-like" data-href="https://www.uty.co.jp/eats/" data-width="" data-layout="button" data-action="like" data-size="small" data-share="false"></div>
                  <div class="sns_tweet">
                  <a href="https://twitter.com/share?ref_src=twsrc%5Etfw" class="twitter-share-button" data-show-count="false">Tweet</a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
                  </div>
				</div>
			</div>

<?php
// 2022.08.03 start
if( 0 )
{
if( $device=="mobile" )
{
?>
			<div class="col-12 col-lg-5">
<!-- /9176203,22484854615/1778824 SP 店舗ページインフォメーション上レクタングル -->
<div id='div-gpt-ad-1645149440187-0' style='margin:auto;text-align:center;'>
  <script>
    googletag.cmd.push(function() { googletag.display('div-gpt-ad-1645149440187-0'); });
  </script>
</div>
			</div>
<?php
}
}
// 2022.08.03 end
?>

			<div class="col-12 col-lg-5">
				<div class="shop-info">
                    <h4 class="info-title">インフォメーション</h4>
<?php
			$arr	=	array() ;
			if( $data['bkn_memo2'] )
				$arr	=	explode( "^^" , $data['bkn_memo2'] ) ;
?>
                    <table class="table table-bordered">
<?php 
			if( $arr[0] )
			{
?>
                        <tr>
                            <th class="gray-bg">住所</th>
                            <td><?php print func_non_entity( $arr[0] ) ; ?></td>
                        </tr>
<?php 
			}
			if( $arr[1] )
			{
?>
                        <tr>
                            <th class="gray-bg">電話</th>
                            <td><a href="tel:<?php print func_non_entity( $arr[1] ) ; ?>"><?php print func_non_entity( $arr[1] ) ; ?></a></td>
                        </tr>
<?php 
			}
			if( $arr[2] )
			{
?>
                        <tr>
                            <th class="gray-bg">営業時間</th>
                            <td>
<?php 
				print nl2br( func_non_entity( $arr[2] ) ) ; 
?>
                            </td>
                        </tr>
<?php 
			}
			if( $arr[3] )
			{
?>
                        <tr>
                            <th class="gray-bg">休業日</th>
                            <td>
<?php 
				print nl2br( func_non_entity( $arr[3] ) ) ; 
?>
                            </td>
                        </tr>
<?php 
			}
			if( $arr[4] )
			{
?>
                        <tr>
                            <th class="gray-bg">URL</th>
                            <td><a href="<?php print func_non_entity( $arr[4] ) ; ?>" target="_blank" class="f_break"><?php print func_non_entity( $arr[4] ) ; ?></a></td>
                        </tr>
<?php 
			}
?>
                    </table>
<?php
			unset( $arr ) ;

			$bkn_rsv3_y 	= substr( $data['bkn_rsv3'] , 0 , 4 ) ;
			$bkn_rsv3_m 	= (int)substr( $data['bkn_rsv3'] , 5 , 2 ) ;
			$bkn_rsv3_d 	= (int)substr( $data['bkn_rsv3'] , 8 , 2 ) ;
?>
                    <p class="caption text-right">情報は放送当時（<?php print $bkn_rsv3_y ; ?>年<?php print $bkn_rsv3_m ; ?>月<?php print $bkn_rsv3_d ; ?>日）のものです。</p>
					<div class="mt-4 notice">
                        <p>※営業時間・定休日が記載と異なる場合がございます。詳しくは直接店舗へお問い合わせください。</p>
					</div>
<?php
			if( $data['bkn_memo8'] )
			{
				$wk	=	func_non_entity( $data['bkn_memo8'] ) ; 
				$wk	=	str_replace( "width=\"600\"" , "width=\"100%\"" , $wk ) ; 
?>
					<div class="mt-5">
						<div class="google-map">
<?php 
				print $wk ;
?>
						</div>
					</div>
<?php
			}
?>
				</div>
<?php
		$disp_id	=	$data['bkn_id'] ;

	if( $DEBUG )
	{
		include( "./sub_backnumber_count.php" );
	}
}

$wk	=	$data['bkn_memo10'] ;

unset( $data['bkn_id'] ) ;
?>
			</div>
		</div>
	</div>
    </section>
<?php
$arr	=	array() ;
if( $data['bkn_memo10'] )
	$arr	=	explode( "^^" , $data['bkn_memo10'] ) ;

if( $disp_id && $arr[0] )
{
	$key	=	array_search( $arr[0] , $DEF_EATS_AREA2 ) ;
	if( $key )
	{
?>
    <section class="module">
        <div class="container">
            <div class="row">
                <div class="col-sm-12 mb-4">
                    <h3 class="h3_title_double"><?php print $DEF_EATS_AREA1[$key] ; ?>の飲食店</h3>
                </div>
                
<?php
		$stmt = "SELECT ";
		$stmt	.=	"bkn_id ," ;
		$stmt	.=	"bkn_name ," ;
		$stmt	.=	"bkn_memo2 ," ;
		$stmt	.=	"bkn_img1 ," ;
		$stmt	.=	"bkn_rand ," ;
		$stmt	.=	"bkn_rsv3 " ;
		$stmt .= "FROM t_backnumber $wheresql " ;
		$stmt .= " and bkn_memo10 like '%".$DEF_EATS_AREA2[$key]."%' ";
		$stmt .= " and bkn_id<> " ;
		$stmt .= $disp_id ;
		$stmt .= " order by " ;
		$stmt .= $wk_fieldname2 ;
		$stmt .= " limit 0,4 " ;
		$sth = dbRunSql( $stmt ) ;
		$j = @mysqli_num_rows ( $sth ) ;
		for( $i=0 ; $i<$j ; $i++ )
		{
			$row	=	mysqli_fetch_object( $sth ) ;
?>

                <div class="col-12 col-sm-6 col-md-3">
                    <div class="event_info">
                        <div class="event-info-inner">
<?php
			if( $row->bkn_img1 )
			{
				$img	=	$UPIMG_PATH."eats/".$row->bkn_rand."/".$row->bkn_img1 ;
?>
                            <a href="./info.php?no=<?php print $row->bkn_id ; ?>" class="imghover"><img src="<?php print $img ; ?>" class="img-responsive" alt="<?php print $row->bkn_name ; ?>"></a>
<?php
			}

			$arr	=	array() ;
			if( $row->bkn_memo2 )
				$arr	=	explode( "^^" , $row->bkn_memo2 ) ;
?>
                            <h4 class="event_title"><?php print $row->bkn_name ; ?></h4>
                            <p class="gourmet_data"><?php print func_non_entity( $arr[0] ) ; ?></p>
                        </div>
                        <div class="mt-3 text-center">
                            <a href="./info.php?no=<?php print $row->bkn_id ; ?>" class="btn  btn-primary btn-round">詳しくはこちら&nbsp;&nbsp;&nbsp;<i class="fas fa-angle-right"></i></a>
                        </div>
                    </div>
                </div>
<?php
			unset( $arr ) ;
			unset( $row ) ;
		}
		$rinf = dbFreeResult( $sth ) ;
?>
            </div>
        </div>
    </section>
<?php
	}
}
unset( $arr ) ;
?>


    <?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/3.7.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() {
            $('.event-info-inner').matchHeight();
            $('.link_list_footer').matchHeight();
            $('.slider').slick({
    arrows:false,
    asNavFor:'.thumb',
});
$('.thumb').slick({
    asNavFor:'.slider',
    focusOnSelect: true,
    slidesToShow:3,
    slidesToScroll:1
}); 
        });
        new WOW().init();
    </script>
    <div id="fb-root"></div>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/ja_JP/sdk.js#xfbml=1&version=v13.0&appId=272934951222718&autoLogAppEvents=1" nonce="ca1Bo5dt"></script>
    <?php
func_array_unset() ;
/* データベースクローズ */
mysqli_close( $dbh ) ;
?>
</body>

</html>