get_exception(); } } /* 出力準備 */ $smarty = new SmartyEx(); $smarty->prepare(); /* マイプロフィール */ include('common/myprofile.inc'); /* Spotクラスインスタンス生成 */ if ($err_str === "") { try { $spot = new Spot($locomill->get_db3()); } catch (SpotError $e) { $err_str .= $e->get_exception(); } } /* Areaクラスインスタンス生成 */ if ($err_str === "") { try { $area = new Area($locomill->get_db3()); $area_top = $area->get_area_top(); } catch (AreaError $e) { $err_str .= $e->get_exception(); } } /* Featureクラスインスタンス生成 */ if ($err_str === "") { try { $feature = new Feature($locomill->get_db3()); } catch (FeatureError $e) { $err_str .= $e->get_exception(); } } /* Entryクラスインスタンス生成 */ if ($err_str === "") { try { $entry = new Entry($locomill->get_db3()); } catch (EntryError $e) { $err_str .= $e->get_exception(); } } /* AreaGroupクラスインスタンス生成 */ if ($err_str === "") { try { $area_group = new AreaGroup($locomill->get_db3()); } catch (AreaGroupError $e) { $err_str .= $e->get_exception(); } } /* Themeクラスインスタンス生成 */ if ($err_str === "") { try { $theme = new Theme($locomill->get_db3()); } catch (ThemeError $e) { $err_str .= $e->get_exception(); } } /* Flowerクラスインスタンス生成 */ if ($err_str === "") { try { $flower = new Flower($locomill->get_db3()); } catch (FlowerError $e) { $err_str .= $e->get_exception(); } } /* FlowerSpotクラスインスタンス生成 */ if ($err_str === "") { try { $flower_spot = new FlowerSpot($locomill->get_db3()); } catch (FlowerSpotError $e) { $err_str .= $e->get_exception(); } } /* Lunchクラスインスタンス生成 */ if ($err_str === "") { try { $lunch = new Lunch($locomill->get_db3()); } catch (LunchError $e) { $err_str .= $e->get_exception(); } } /* Partyクラスインスタンス生成 */ if ($err_str === "") { try { $party = new Party($locomill->get_db3()); } catch (PartyError $e) { $err_str .= $e->get_exception(); } } /* Pagerクラスインスタンス生成 */ if ($err_str === "") { try { $pager = new Pager(); } catch (PagerError $e) { $err_str .= $e->get_exception(); } } /* Request値の検証 */ if ($err_str === "") { if (isset($_POST) === true && empty($_POST) === false) { $rq = $_POST; } elseif (isset($_GET) === true && empty($_GET) === false) { $rq = $_GET; } if (!empty($rq['p']) && empty($rq['page'])) { $rq['page'] = $rq['p']; } $page = (isset($rq['page']) && preg_match("/^[0-9]+$/", $rq['page']))? $rq['page']: $page; $mode = (isset($rq['mode']) && ($rq['mode'] == 's' || $rq['mode'] == 'a' || $rq['mode'] == 't' || $rq['mode'] == 'fl' || $rq['mode'] == 'm'))? $rq['mode']: 'f'; } /* スポットデータ取得 */ if ($err_str === "") { try { if ($spot->check_id($rq['id'])) { $spot_id = $rq['id']; } else { throw new SpotError('・正しい手続きでアクセスしていません。
'); } $spot_data = $spot->get_data($spot_id); if ($preview != 1) { // 表示判定 if ($spot_data['enable'] != 1 || $now <= $spot_data['start_stamp'] || (0 < $spot_data['end_stamp'] && $spot_data['end_stamp'] <= $now)) { $the_corner_id = 6; $adver_param = array("terminal_type" => 1, "corner_id" => $the_corner_id); $adver_b_type = array(1); include('common/banners.inc'); header("HTTP/1.0 404 Not Found"); $smarty->display('parts/spot/disabled.tpl'); exit; } if ($spot_data['is_closed'] == 1) { // 閉店 $the_corner_id = 6; $adver_param = array("terminal_type" => 1, "corner_id" => $the_corner_id); $adver_b_type = array(1); include('common/banners.inc'); header("HTTP/1.0 404 Not Found"); $smarty->display('parts/spot/closed.tpl'); exit; } } $spot_data = $spot->adjust($spot_data); } catch (SpotError $e) { ErrorRedirect(404); } } /* コンテンツメニュー */ if ($err_str === "") { $feature_type = 'pc'; $page_type = 'feature'; include('common/spotmenu.inc'); // メニューが無効の場合 if ($preview != 1 && $is_feature != 1 && $is_lunch != 1 && $is_party != 1) { $err_str .= '・ページを表示できません。
'; } } // 特集情報 if ($err_str === "") { $_feature_array = array(); $wlist = array(); $wlist2 = array(); $wlist2[] = sprintf('`shop_id` = %d', $spot_id); $wlist2[] = sprintf('`id` IN (SELECT `document_id` FROM `feature_document_block_tbl` WHERE `enable` = 1 AND `spot_id` = %d)', $spot_id); $wlist2[] = sprintf('`id` IN (SELECT `document_id` FROM `feature_document_block_tbl` WHERE `enable` = 1 AND FIND_IN_SET(%d, `kuchikomi_spot_id`))', $spot_id); $wlist[] = sprintf('(%s)', implode(' OR ', $wlist2)); $wlist[] = '`enable` = 1'; $wlist[] = '`enable_pc` = 1'; if ($preview != 1) { $wlist[] = sprintf("open_stamp <= '%s'", date('Y-m-d H:i:s', $now)); } $wlist[] = sprintf("'%s' <= close_stamp", date('Y-m-d H:i:s', $now)); $wlist2 = array(); $wlist2[] = '`enable` = 1'; $wlist2[] = '`enable_pc` = 1'; if ($preview != 1) { $wlist2[] = sprintf("open_stamp <= '%s'", date('Y-m-d H:i:s', $now)); } $wlist2[] = sprintf("'%s' <= close_stamp", date('Y-m-d H:i:s', $now)); $wlist[] = sprintf('`feature_id` IN (SELECT `id` FROM `feature_tbl` WHERE %s)', implode(' AND ', $wlist2)); $sql = sprintf('SELECT `id` FROM `feature_document_tbl` WHERE %s ORDER BY `open_stamp` DESC, `id` DESC', implode(' AND ', $wlist)); $result = $locomill->get_db3()->query($sql); if ($result !== false) { $feature_num = $locomill->get_db3()->num($result); if (0 < $feature_num && $mode == 'f') { $page = $pager->exec($feature_num, $page, $item_line, 10); if ($pager->get_err_str() === "") { if ($locomill->get_db3()->seek($result, $pager->get_start_row()) == true) { for ($i = $pager->get_start_row(); $i < $pager->get_end_row(); $i++) { $_feature_array[] = $locomill->get_db3()->fetch_array($result); } } else { $err_str = "・データの参照に失敗しました。
" . mysqli_error($locomill->get_db3()->get_db_connect()); } } else { $err_str = "・ページ情報の処理に失敗しました。
"; } } } else { $err_str .= "・データの参照に失敗しました。
" . mysqli_error($locomill->get_db3()->get_db_connect()); } if (!empty($_feature_array)) { foreach ($_feature_array AS $v) { try { $document_data = $feature->get_document($v['id']); $document_data = $feature->document_smarty_format($document_data); } catch (FeatureError $e) { continue; } try { $feature_data = $feature->get_data($document_data['feature_id']); $feature_data = $feature->feature_smarty_format($feature_data); } catch (FeatureError $e) { continue; } $temp = array(); $temp['id'] = $document_data['id']; $temp['title_01'] = strip_tags($document_data['title_01']); $temp['report_date'] = $document_data['report_date']; $temp['description'] = $document_data['description']; $temp['image_01_src'] = (!empty($document_data['image_01_src']))? $document_data['image_01_src']: $feature_data['image_17_src']; $temp['is_new'] = 0; if ($now - strtotime($document_data['public_date']) < (60 * 60 * 24)) { $temp['is_new'] = 1; } $temp['feature_id'] = $feature_data['id']; $temp['feature_title'] = strip_tags($feature_data['title_01']); $temp['type_id'] = $feature_data['type_id']; $feature_array[] = $temp; unset($document_data, $feature_data); } } unset($_feature_array); } // セレクト情報 if ($err_str === "") { $_entry_array = array(); $wlist = array(); $wlist[] = "`theme_key` != ''"; $wlist[] = '`enable` = 1'; $wlist[] = sprintf('(%d BETWEEN `start_stamp` AND `end_stamp`)', $now); $wlist[] = sprintf('FIND_IN_SET(%d, `spot_ids`)', $spot_id); $sql = sprintf('SELECT `id` FROM `entry_tbl` WHERE %s ORDER BY `update_stamp` DESC', implode(' AND ', $wlist)); $result = $locomill->get_db3()->query($sql); if ($result !== false) { $entry_num = $locomill->get_db3()->num($result); if (0 < $entry_num && $mode == 's') { $page = $pager->exec($entry_num, $page, $item_line, 10); if ($pager->get_err_str() === "") { if ($locomill->get_db3()->seek($result, $pager->get_start_row()) == true) { for ($i = $pager->get_start_row(); $i < $pager->get_end_row(); $i++) { $_entry_array[] = $locomill->get_db3()->fetch_array($result); } } else { $err_str = "・データの参照に失敗しました。
" . mysqli_error($locomill->get_db3()->get_db_connect()); } } else { $err_str = "・ページ情報の処理に失敗しました。
"; } } } else { $err_str .= "・データの参照に失敗しました。
" . mysqli_error($locomill->get_db3()->get_db_connect()); } if (!empty($_entry_array)) { $upimg_path_01 = $entry->get_upimg_path(); foreach ($_entry_array AS $v) { try { $entry_data = $entry->get_data($v['id']); } catch (EntryError $e) { continue; } $entry_data['update_date'] = date('Y/m/d', $entry_data['update_stamp']); if (!empty($entry_data['image_01']['up_name']) && file_exists($upimg_path_01 . '/' . $entry_data['image_01']['up_name'])) { $entry_data['image_01_src'] = '/img/entry/' . $entry_data['image_01']['up_name']; } else { $entry_data['image_01_src'] = ''; } $entry_data['is_new'] = $entry_data['is_up'] = 0; if ($now - $entry_data['start_stamp'] < (60 * 60 * 24)) { $entry_data['is_new'] = 1; } elseif ($now - $entry_data['update_stamp'] < (60 * 60 * 24)) { $entry_data['is_up'] = 1; } $entry_array[] = $entry_data; unset($entry_data); } } unset($_entry_array); } // エリアグループ情報 if ($err_str === "") { $_area_group_array = array(); $wlist = array(); $wlist[] = '`enable` = 1'; $wlist[] = sprintf('(%d BETWEEN `start_stamp` AND `end_stamp`)', $now); $wlist[] = sprintf('FIND_IN_SET(%d, `spot_ids`)', $spot_id); $sql = sprintf('SELECT `id` FROM `area_group_tbl` WHERE %s ORDER BY `update_stamp` DESC', implode(' AND ', $wlist)); $result = $locomill->get_db3()->query($sql); if ($result !== false) { $area_group_num = $locomill->get_db3()->num($result); if (0 < $area_group_num && $mode == 'a') { $page = $pager->exec($area_group_num, $page, $item_line, 10); if ($pager->get_err_str() === "") { if ($locomill->get_db3()->seek($result, $pager->get_start_row()) == true) { for ($i = $pager->get_start_row(); $i < $pager->get_end_row(); $i++) { $_area_group_array[] = $locomill->get_db3()->fetch_array($result); } } else { $err_str = "・データの参照に失敗しました。
" . mysqli_error($locomill->get_db3()->get_db_connect()); } } else { $err_str = "・ページ情報の処理に失敗しました。
"; } } } else { $err_str .= "・データの参照に失敗しました。
" . mysqli_error($locomill->get_db3()->get_db_connect()); } if (!empty($_area_group_array)) { $upimg_path_01 = $area_group->get_upimg_path(); foreach ($_area_group_array AS $v) { try { $area_group_data = $area_group->get_data($v['id']); } catch (area_groupError $e) { continue; } if (array_key_exists($area_group_data['area_03_id'], $area_top)) { $area_group_data['link'] = sprintf('/%s/group.shtml?id=%d', $area_top[$area_group_data['area_03_id']], $area_group_data['id']); } else { $area_group_data['link'] = sprintf('/area/group/?id=%d', $area_group_data['id']); } $area_group_data['update_date'] = date('Y/m/d', $area_group_data['update_stamp']); $area_group_data['caption_01'] = strip_tags($area_group_data['caption_01']); if (!empty($area_group_data['image_02']['up_name']) && file_exists($upimg_path_01 . '/' . $area_group_data['image_02']['up_name'])) { $area_group_data['image_02_src'] = str_replace(WEB_ROOT_DIR, '', $upimg_path_01) . '/' . $area_group_data['image_02']['up_name']; } else { $area_group_data['image_02_src'] = '/spot/home/images/areaguide.png'; } $area_group_data['is_new'] = $area_group_data['is_up'] = 0; if ($now - $area_group_data['start_stamp'] < (60 * 60 * 24)) { $area_group_data['is_new'] = 1; } elseif ($now - $area_group_data['update_stamp'] < (60 * 60 * 24)) { $area_group_data['is_up'] = 1; } $area_group_array[] = $area_group_data; unset($area_group_data); } } unset($_area_group_array); } // テーマ情報 if ($err_str === "" && !empty($spot_data['theme_id'])) { $_theme_array = array(); $wlist = array(); $wlist[] = "`theme_key` != ''"; $wlist[] = '`enable` = 1'; $wlist[] = sprintf('(%d BETWEEN `start_stamp` AND `end_stamp`)', $now); $wlist[] = sprintf('`id` IN (%s)', $spot_data['theme_id']); $sql = sprintf('SELECT `id` FROM `theme_tbl` WHERE %s ORDER BY `update_stamp` DESC', implode(' AND ', $wlist)); $result = $locomill->get_db3()->query($sql); if ($result !== false) { $theme_num = $locomill->get_db3()->num($result); if (0 < $theme_num && $mode == 't') { $page = $pager->exec($theme_num, $page, $item_line, 10); if ($pager->get_err_str() === "") { if ($locomill->get_db3()->seek($result, $pager->get_start_row()) == true) { for ($i = $pager->get_start_row(); $i < $pager->get_end_row(); $i++) { $_theme_array[] = $locomill->get_db3()->fetch_array($result); } } else { $err_str = "・データの参照に失敗しました。
" . mysqli_error($locomill->get_db3()->get_db_connect()); } } else { $err_str = "・ページ情報の処理に失敗しました。
"; } } } else { $err_str .= "・データの参照に失敗しました。
" . mysqli_error($locomill->get_db3()->get_db_connect()); } if (!empty($_theme_array)) { $upimg_path_01 = $theme->get_upimg_path(); foreach ($_theme_array AS $v) { try { $theme_data = $theme->get_data($v['id']); } catch (ThemeError $e) { continue; } $theme_data['update_date'] = date('Y/m/d', $theme_data['update_stamp']); if (!empty($theme_data['image_02']['up_name']) && file_exists($upimg_path_01 . '/' . $theme_data['image_02']['up_name'])) { $theme_data['image_02_src'] = '/img/theme/' . $theme_data['image_02']['up_name']; } else { $theme_data['image_02_src'] = ''; } $theme_data['is_new'] = $theme_data['is_up'] = 0; if ($now - $theme_data['start_stamp'] < (60 * 60 * 24)) { $theme_data['is_new'] = 1; } elseif ($now - $theme_data['update_stamp'] < (60 * 60 * 24)) { $theme_data['is_up'] = 1; } $theme_array[] = $theme_data; unset($theme_data); } } unset($_theme_array); } // 花特集データ取得 if ($err_str === "") { $_flower_array = array(); $wlist = array(); $wlist[] = sprintf('s.`spot_id` = %d', $spot_id); $wlist[] = 's.`enable` = 1'; $wlist[] = 'f.`enable` = 1'; $sql = sprintf('SELECT s.`id` FROM `flower_spot_tbl` s LEFT JOIN `flower_tbl` f ON s.`flower_id` = f.`id` WHERE %s ORDER BY f.`update_stamp` DESC', implode(' AND ', $wlist)); $result = $locomill->get_db3()->query($sql); if ($result !== false) { $flower_num = $locomill->get_db3()->num($result); if (0 < $flower_num && $mode == 'fl') { $page = $pager->exec($flower_num, $page, $item_line, 10); if ($pager->get_err_str() === "") { if ($locomill->get_db3()->seek($result, $pager->get_start_row()) == true) { for ($i = $pager->get_start_row(); $i < $pager->get_end_row(); $i++) { $_flower_array[] = $locomill->get_db3()->fetch_array($result); } } else { $err_str = "・データの参照に失敗しました。
" . mysqli_error($locomill->get_db3()->get_db_connect()); } } else { $err_str = "・ページ情報の処理に失敗しました。
"; } } } else { $err_str .= "・データの参照に失敗しました。
" . mysqli_error($locomill->get_db3()->get_db_connect()); } if (!empty($_flower_array)) { $upimg_path = $flower->get_upimg_path(); $upimg_src = str_replace(WEB_ROOT_DIR, '', $upimg_path); foreach ($_flower_array AS $v) { try { $v = $flower_spot->get_data($v['id']); } catch (FlowerSpotError $e) { continue; } try { $flower_data = $flower->get_data($v['flower_id']); } catch (FlowerError $e) { continue; } $temp = array(); $temp['flower_id'] = $flower_data['id']; $temp['name_01'] = $flower_data['name_01']; if (!empty($flower_data['image_01']['up_name']) && file_exists($upimg_path . '/' . $flower_data['image_01']['up_name'])) { $temp['image_src'] = $upimg_src . '/' . $flower_data['image_01']['up_name']; } else { $temp['image_src'] = LOCOMILL_UPIMG_NOIMAGE_PATH; } $temp['comment_01'] = strip_tags($flower_data['comment_01']); $flower_array[] = $temp; unset($v, $flower_data); } } unset($_flower_array); } // ランチマニアデータ取得 if ($err_str === "") { try { $lunch_data = $lunch->get_spot_lunch($spot_id, 1); if (!empty($lunch_data)) { $mania_num++; if ($mode == 'm') { foreach ($lunch_data AS $v) { $t = sprintf('menu_%02d', $lunch_main_menu); $temp = array(); $temp['id'] = $v['id']; $temp['menu'] = $lunch_main_menu; $temp['type'] = 'lunch'; $temp['update_date'] = date('Y/m/d', strtotime($v['update_date'])); $temp['menu_title'] = strip_tags($v[$t . '_title']); $temp['menu_description'] = $lunch->omit_str($v[$t . '_caption_02'], 20, '…'); if (!empty($v[$t . '_image_01']['up_name'])) { $temp['menu_image_src'] = '/img' . LOCOMILL_UPIMG_LUNCH_PATH . '/' . $v[$t . '_image_01']['up_name']; } elseif (!empty($v[$t . '_rsv_txt_01'])) { $temp['menu_image_src'] = '/old_images/' . $v[$t . '_rsv_txt_01']; } else { $temp['menu_image_src'] = LOCOMILL_UPIMG_NOIMAGE_SMALL_PATH; } $temp['status'] = ''; if (time() - $v['public_stamp'] < (60 * 60 * 24)) { $temp['status'] = 'NEW'; } elseif (time() - $v['update_stamp'] < (60 * 60 * 24)) { $temp['status'] = 'UP'; } $mania_array[] = $temp; break; } } } unset($lunch_data); } catch (LunchError $e) { $err_str .= $e->get_exception(); } } // 宴会マニアデータ取得 if ($err_str === "") { try { $party_data = $party->get_spot_party($spot_id, 1); if (!empty($party_data)) { $mania_num++; if ($mode == 'm') { foreach ($party_data AS $v) { $t = sprintf('menu_%02d', $party_main_menu); $temp = array(); $temp['id'] = $v['id']; $temp['menu'] = $party_main_menu; $temp['type'] = 'party'; $temp['update_date'] = date('Y/m/d', strtotime($v['update_date'])); $temp['menu_title'] = strip_tags($v[$t . '_title']); $temp['menu_description'] = $party->omit_str($v[$t . '_caption_02'], 20, '…'); if (!empty($v[$t . '_image_01']['up_name'])) { $temp['menu_image_src'] = '/img' . LOCOMILL_UPIMG_PARTY_PATH . '/' . $v[$t . '_image_01']['up_name']; } elseif (!empty($v[$t . '_rsv_txt_01'])) { $temp['menu_image_src'] = '/old_images/' . $v[$t . '_rsv_txt_01']; } else { $temp['menu_image_src'] = LOCOMILL_UPIMG_NOIMAGE_SMALL_PATH; } $temp['status'] = ''; if (time() - $v['public_stamp'] < (60 * 60 * 24)) { $temp['status'] = 'NEW'; } elseif (time() - $v['update_stamp'] < (60 * 60 * 24)) { $temp['status'] = 'UP'; } $mania_array[] = $temp; break; } } } unset($party_data); } catch (PartyError $e) { $err_str .= $e->get_exception(); } } /* 変数の準備 */ // ページタイプ $smarty->assign("PAGE_TYPE", $page_type); // スポットデータ $smarty->assign("SPOT_ID", $spot_id); $smarty->assign("SPOT_DATA", $spot_data); // プレビュー $smarty->assign("PREVIEW", $preview); $smarty->assign("PV_MODE", $pv_mode); $smarty->assign("PV_URL", $pv_url); $smarty->assign("FEATURE_NUM", $feature_num); $smarty->assign("FEATURE_ARRAY", escapeHTML($feature_array)); $smarty->assign("ENTRY_NUM", $entry_num); $smarty->assign("ENTRY_ARRAY", escapeHTML($entry_array)); $smarty->assign("AREA_GROUP_NUM", $area_group_num); $smarty->assign("AREA_GROUP_ARRAY", escapeHTML($area_group_array)); $smarty->assign("THEME_NUM", $theme_num); $smarty->assign("THEME_ARRAY", escapeHTML($theme_array)); $smarty->assign("FLOWER_NUM", $flower_num); $smarty->assign("FLOWER_ARRAY", escapeHTML($flower_array)); $smarty->assign("MANIA_NUM", $mania_num); $smarty->assign("MANIA_ARRAY", escapeHTML($mania_array)); $smarty->assign("MODE", $mode); // <<前へ $smarty->assign_ex("BEFORE_LINK", $pager->get_left_info_public(), ""); // 次へ>> $smarty->assign_ex("NEXT_LINK", $pager->get_right_info_public(), ""); // ページインフォ $smarty->assign_ex("PAGE_INFO_LINK", $pager->get_page_info_public(), ""); // イマココ $imakoko = getTopicsPath('spot'); if ($err_str === "") { $imakoko[] = array(sprintf('/search_result/?type=spot&C1=%d', $spot_data['category_01_01_id']), $spot_data['category_01_01_name']); $imakoko[] = array(sprintf('/search_result/?type=spot&C2=%d', $spot_data['category_01_02_id']), $spot_data['category_01_02_name']); $imakoko[] = array(sprintf('/search_result/?type=spot&C3=%d', $spot_data['category_01_03_id']), $spot_data['category_01_03_name']); $imakoko[] = array(sprintf('/spot/home/?id=%d', $spot_id), $spot_data['name_01']); $imakoko[] = array(sprintf('/spot/feature/?id=%d', $spot_id), '特集'); } $smarty->assign("IMAKOKO_ARRAY", $imakoko); // 最新情報 include('common/whatsnew.inc'); /* AccessDailyクラスインスタンス生成 */ if ($err_str === "" && $preview != 1) { try { $access = new AccessDaily($locomill->get_db()); $params = array("corner_type" => 1, "terminal" => 1, "corner_id" => $spot_data['id'], "page" => $_SERVER['PHP_SELF'], "title" => '特集・セレクト', "refer_url" => (isset($_SERVER['HTTP_REFERER'])? $_SERVER['HTTP_REFERER']: ''), "refer_name" => "", "keyword" => "", "file_name" => $_SERVER['REQUEST_URI'], "member_data" => (isset($locomill->session->sess_data['member_data'])? $locomill->session->sess_data['member_data']: array())); $access->do_logging($params); } catch (AccessDailyError $e) { $access->output_error($e->get_exception()); } } /* 広告系 */ $the_corner_id = 6; $adver_param = array("terminal_type" => 1, "corner_id" => $the_corner_id, "category_03_id" => $spot_data['category_01_03_id']); $adver_b_type = ($spot_data['adver_block_flg'] == 1)? array(7): array(1, 7); include('common/banners.inc'); // バナー広告 if ($spot_data['adver_block_flg'] == 1) { if (!empty($spot_data['orig_billboard'])) { $billboard_out = htmlspecialchars_decode($spot_data['orig_billboard']); } else { // 代替ビルボード $billboard_out = ''; } $smarty->assign("ADVER_01", $billboard_out); } // エラー文字列 $smarty->assign("ERR_STR", $err_str); if (!empty($err_str) || $preview == 1) { header("HTTP/1.0 404 Not Found"); } // ブラウザキャッシュ対策 if ($err_str === "") { header('Etag: ' . md5($spot_data['id'] . '-' . time())); } /* 出 力 */ $smarty->display('spot/feature/index.tpl');