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(); } } /* Request値の検証 */ if ($err_str === "") { if (isset($_POST) === true && empty($_POST) === false) { $rq = $_POST; } elseif (isset($_GET) === true && empty($_GET) === false) { $rq = $_GET; } } /* スポットデータ取得 */ 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); } } /* googlemapへリダイレクト */ if ($err_str === "") { if (!empty($spot_data['google_map_url'])) { header('Location: ' . $spot_data['google_map_url']); } else { header('Location: ../home/?id=' . $spot_data['id']); } exit; } // イマココ $imakoko = getTopicsPath('spot'); $smarty->assign("IMAKOKO_ARRAY", $imakoko); // 最新情報 include('common/whatsnew.inc'); /* 広告系 */ $the_corner_id = 6; $adver_param = array("terminal_type" => 1, "corner_id" => $the_corner_id); $adver_b_type = array(1, 7); include('common/banners.inc'); // エラー文字列 $smarty->assign("ERR_STR", $err_str); if (!empty($err_str) || $preview == 1) { header("HTTP/1.0 404 Not Found"); } /* 出 力 */ $smarty->display('spot/home/index.tpl');