0 ) { $dep_place_cd_wk .= "&"."$dep_nm=${$dep_nm}"; } } $param = "agent=$agent&area_cd_l_1f=$area_cd_l_1f&area_cd_m_1f=$area_cd_m_1f&area_cd_s_1f=$area_cd_s_1f&dep_place_num_f=$dep_place_num_f$dep_place_cd_wk&year_f=$year_f&month_f=$month_f&day_f=$day_f&term1_f=$term1_f&term2_f=$term2_f&price1_f=$price1_f&price2_f=$price2_f&tour_cd_f=$tour_cd_f"; header("Location: ./sp/system/result.phtml?" . $param); exit; } ?> ---*/ function search_disp_tour( $sear_pt, $sear_num, $url ) { if ($sear_num == 0){ return; } $disp_search_num = 10; echo "
" ; if ($sear_pt > 1){ $w_sear_pt = $sear_pt - $disp_search_num; echo "←前".$disp_search_num." "; } $sear_end_pt = $sear_pt + $disp_search_num - 1; $end_flg = 0; if ($sear_end_pt >= $sear_num){ $sear_end_pt = $sear_num; $end_flg = 1; } echo "$sear_pt件〜$sear_end_pt件 "; if ($end_flg == 0){ $w_sear_pt = $sear_pt + $disp_search_num; echo "".$disp_search_num."件→ "; } echo "
"; } /*---< DBコネクト >---*/ $conn = db_connect($db_connect_str) ; if ( !$conn ) { exit ; } $skip_flg = 0; if ($sort_btn == "price"){ $sort = "ORDER BY TOUR.MIN_PRICE, TOUR.TERM "; } else { $sort = "ORDER BY TOUR.TERM, TOUR.MIN_PRICE " ; } /*---< TOPページ設定 >---*/ if ( strlen ( $agent ) > 0 ) { $top_page = get_agent_url ( $conn, $agent ) ; $top_page = "http://".$top_page ; } /*---< SQL作成 >---*/ // 2016/11/30 遅いのでdistinctでカラムを指定する // $sql_cmd = "SELECT DISTINCT TOUR.* "; $sql_cmd = "SELECT DISTINCT " . "TOUR.TOUR_CD, TOUR.TOUR_NAME, TOUR.TOUR_SUB, TOUR.RECOM_FLG, TOUR.NEW_FLG, TOUR.START_DATE, TOUR.END_DATE, TOUR.DEP_PLACE_CD, TOUR.AIR_COMPANY, TOUR.CLASS_CD, TOUR.TERM, TOUR.MIN_PARTNUM, TOUR.TOURCON_CD, TOUR.POINT, TOUR.MIN_PRICE, TOUR.MAX_PRICE "; $sql_cmd .= "FROM TOUR_ARR_PLACE ARR " . "INNER JOIN TOUR_TICKET TOUR ON ARR.TOUR_CD = TOUR.TOUR_CD "; // 2015/01/16 料金があるもののみ検索 $sql_cmd .= "INNER JOIN TOUR_PRICE PR ON TOUR.TOUR_CD = PR.TOUR_CD "; $sql_cmd .= "WHERE 1=1 "; if ($tour_cd_f == ""){ // 2013/02/14 year_f指定されなくなった if ($month_f != "" && $day_f != ""){ if (!$year_f){ $year_wk = date("Y"); $month_wk = date("m"); $year_f = $year_wk; if ($month_f < $month_wk){ // 今月より前なら来年 $year_f += 1; } } $year_f = sprintf ( "%04d", $year_f ) ; $month_f = sprintf ( "%02d", $month_f ) ; $day_f = sprintf ( "%02d", $day_f ) ; $dep_date = $year_f."/".$month_f."/".$day_f ; // 2015/01/16 料金があるもののみ検索 $sql_cmd .= "AND PR.DEP_DATE = '$dep_date' "; } // 2014/02/12 月のみ指定 else if($month_f != "" && $day_f == "") { if (!$year_f){ $year_wk = date("Y"); $month_wk = date("m"); $year_f = $year_wk; if ($month_f < $month_wk){ // 今月より前なら来年 $year_f += 1; } } $year_f = sprintf("%04d", $year_f); $month_f = sprintf("%02d", $month_f); $wk_day = sprintf("%02d", 1); $last_day = sprintf("%02d", date("t", mktime(0, 0, 0, (int)$month_f, 1, (int)$year_f))); // 出発日は1日とする $dep_date = $year_f."/".$month_f."/".$wk_day; // 最終日を取得する(検索用) $last_date = $year_f."/".$month_f."/".$last_day; // その月の1日〜最終日までを条件に検索する // 2015/01/16 料金があるもののみ検索 $sql_cmd .= "AND PR.DEP_DATE <= '$last_date' AND '$dep_date' <= PR.DEP_DATE "; } else { $year_wk = date("Y"); $month_wk = date("m"); $day_wk = date("d"); $year_wk = sprintf ( "%04d", $year_wk ) ; $month_wk = sprintf ( "%02d", $month_wk ) ; $day_wk = sprintf ( "%02d", $day_wk ) ; $dep_date = $year_wk."/".$month_wk."/".$day_wk ; // 2015/01/16 料金があるもののみ検索 $sql_cmd .= "AND '$dep_date' <= TOUR.END_DATE AND PR.DEP_DATE > '$dep_date' "; } if ($area_cd_l_1f != ""){ $sql_cmd .= "AND ARR.AREA_CD_L = '$area_cd_l_1f' " ; } if ($area_cd_m_1f != ""){ $sql_cmd .= "AND ARR.AREA_CD_M = '$area_cd_m_1f' " ; } if ($area_cd_s_1f != ""){ $sql_cmd .= "AND ARR.AREA_CD_S = '$area_cd_s_1f' " ; } $place_flg = 0; for ( $j=0; $j < $dep_place_num_f; $j++ ) { $dep_nm = "dep_place".$j ; if ( strlen ( ${$dep_nm} ) > 0 ) { if ( $place_flg == 0 ) { $sql_cmd = $sql_cmd."AND ( TOUR.DEP_PLACE_CD LIKE '%${$dep_nm}%' " ; $place_flg = 1 ; } else { $sql_cmd = $sql_cmd."OR TOUR.DEP_PLACE_CD LIKE '%${$dep_nm}%' " ; } } } if ( $place_flg == 1 ) { $sql_cmd .= " ) " ; } if ( $term1_f != "" ) { $sql_cmd .= "AND TOUR.TERM >= '$term1_f' " ; } if ( $term2_f != "" ) { $sql_cmd .= "AND TOUR.TERM <= '$term2_f' " ; } if ( $price1_f != ""){ $sql_cmd .= "AND '$price1_f' <= TOUR.MAX_PRICE "; } if ( $price2_f != ""){ $sql_cmd .= "AND TOUR.MIN_PRICE <= '$price2_f' "; } } else { $sql_cmd .= "AND TOUR.TOUR_CD = '$tour_cd_f' " ; } $sql_cmd .= $sort; $result = pg_Exec ( $conn, $sql_cmd ) ; if ( !$result ) { pg_FreeResult( $result ); pg_Close ( $conn ) ; exit() ; } $tour_num = pg_NumRows ( $result ) ; // 2014/04/18 リゾートの場合は戻る $top_page = "http://www.vacations21.com/"; // 2016/02/15 リゾートでデータなしの場合は見積もりへ // 2016/02/28 $mit_progの指定を直接 $mit_prog = "http://www.vacations21.com/mitsumori/1.html"; if ($area_cd_l_1f != ""){ $sql = "select * from area_large_mst " . "where area_cd_l = '$area_cd_l_1f' "; $wdt = get_column($conn, $sql, "*"); if ("1" == $wdt['resort_flag']){ $top_page .= "resort/"; $mit_prog = "http://www.vacations21.com/mitsumori/3.html"; } } ?> 海外ダイビングツアー Vacations21
" ; echo "" ; echo "" ; echo "" ; echo "" ; $dep_place_cd_wk = ""; for ( $j=0; $j < $dep_place_num_f; $j++ ) { $dep_nm = "dep_place".$j ; if ( strlen ( ${$dep_nm} ) > 0 ) { echo "" ; $dep_place_cd_wk .= "&"."$dep_nm=${$dep_nm}"; } } echo "" ; echo "" ; echo "" ; echo "" ; echo "" ; echo "" ; echo "" ; echo "" ; ?>

ツアー検索結果

0){ ?>
お客様の条件と一致したツアーは件です。
お客様の条件と一致したツアーはありませんでした。

ご希望のツアーを無料でお見積りいたします。 見積依頼はこちらから>>
トップページに戻り再検索する --*/ $i = $sear_pt - 1 ; $end_pt = $sear_pt + $disp_search_num -1; if ($end_pt > $tour_num){ $end_pt = $tour_num; } for (; $i<$end_pt; $i++){ $tour_cd = pg_Result ( $result, $i, "tour_cd" ) ; $tour_name = pg_Result ( $result, $i, "tour_name" ) ; $tour_sub = pg_Result ( $result, $i, "tour_sub" ) ; $recom_flg = pg_Result ( $result, $i, "recom_flg" ) ; $new_flg = pg_Result ( $result, $i, "new_flg" ) ; $start_date = pg_Result ( $result, $i, "start_date" ) ; $end_date = pg_Result ( $result, $i, "end_date" ) ; $dep_place_cd = pg_Result ( $result, $i, "dep_place_cd" ) ; $air_company = pg_Result ( $result, $i, "air_company" ) ; $class_cd = pg_Result ( $result, $i, "class_cd" ) ; $term = pg_Result ( $result, $i, "term" ) ; $min_partnum = pg_Result ( $result, $i, "min_partnum" ) ; $tourcon_cd = pg_Result ( $result, $i, "tourcon_cd" ) ; $tourcon_nm = get_tourcon_nm ( $conn, $tourcon_cd ) ; $point = pg_Result ( $result, $i, "point" ) ; $price_min = pg_Result ( $result, $i, "min_price" ) ; $price_max = pg_Result ( $result, $i, "max_price" ) ; $dep_place_num = str_target_num ( $dep_place_cd, "/" ) + 1 ; for ( $j=0 ; $j < $dep_place_num ; $j++ ) { $work = str_sep_target ( $dep_place_cd, "/", $j+1 ) ; $dep_place[$j] = $work ; } $air_company_num = str_target_num ( $air_company, "/" ) + 1 ; for ( $j=0 ; $j < $air_company_num ; $j++ ) { $work = str_sep_target ( $air_company, "/", $j+1 ) ; $company[$j] = $work ; } $sql_cmd = "SELECT * FROM TOUR_HOTEL WHERE TOUR_CD = '$tour_cd' ORDER BY SEQ_CD" ; $hotel_res = pg_Exec ( $conn, $sql_cmd ) ; if ( !$hotel_res ) { pg_FreeResult ( $result ) ; pg_FreeResult ( $hotel_res ) ; pg_Close ( $conn ) ; exit () ; } $hotel_num = pg_NumRows ( $hotel_res ) ; $no = $i + 1 ; ?>
ツアーコード:

日間円 〜 
設定期間
出発地
航空会社

ホテル
詳細を見る

PAGE TOP