$var) { $GLOBALS[$name] = $var; } foreach ($HTTP_POST_VARS as $name => $var) { $GLOBALS[$name] = $var; } if($mode == "search_detail"){ //詳細検索 $disp_h1 = "

詳細検索

"; $page_title = "詳細検索"; $pankuzu = "
top詳細検索>詳細検索
"; //area03_id if($arr_area03_id != "") $area03_id = explode("<>",$arr_area03_id); //ページ送りで来たパラメーター if( count($area03_id) > 0){ for($ab=0;$ab",$area03_id); //ページパラメータ用 $page_para = "&arr_area03_id=".urlencode($tmp_para_area03_id); } //小ジャンル if($arr_wedding_genre_sid != "") $wedding_genre_sid = explode("<>",$arr_wedding_genre_sid); //ページ送りで来たパラメーター if( count($wedding_genre_sid) > 0){ for($ab=0;$ab 0){ for($mm=0;$mm<$M_ROWS;$mm++){ $tmp_search_value[] = pg_Result($M_SQL,$mm,'name'); } } } $genre02 = "(".implode(" OR ",$tmp_wedding_genre_sid).")"; $WHERE[] .= " wedding_company.sid IN ( SELECT DISTINCT(company_id) FROM wedding_genre_jyoukyou WHERE ".$genre02." ) "; $tmp_wedding_genre_sid = implode("<>",$wedding_genre_sid); //ページパラメータ用 $page_para = "&arr_wedding_genre_sid=".urlencode($tmp_wedding_genre_sid); } //kodawari_id if($arr_kodawari_id != "") $kodawari_id = explode("<>",$arr_kodawari_id); //ページ送りで来たパラメーター if( count($kodawari_id) > 0){ for($ab=0;$ab 0){ for($mm=0;$mm<$M_ROWS;$mm++){ $tmp_search_value[] = pg_Result($M_SQL,$mm,'kodawari_name'); } } } $tmp_kodawari = "(".implode(" OR ",$tmp_kodawari_id).")"; $WHERE[] .= " wedding_company.sid IN ( SELECT DISTINCT(company_id) FROM kodawari_jyoukyou WHERE ".$tmp_kodawari." ) "; $tmp_kodawari_id = implode("<>",$kodawari_id); //ページパラメータ用 $page_para = "&arr_kodawari_id=".urlencode($tmp_kodawari_id); } if($coupon_flag == "on"){ $WHERE[] .= " coupon_flag = 't' "; $page_para = "&coupon_flag=on"; $tmp_search_value[] = "クーポンあり"; } //検索条件表示用 if($tmp_search_value != "") $disp_search_value = implode(",",$tmp_search_value); //JOIN wedding_genre_jyoukyou ON ( wedding_genre_jyoukyou.company_id = wedding_company.sid ) //WHERE wedding_genre_id = '17' }elseif($mode == "keywords"){ $disp_h1 = "

フリーワード検索

"; $page_title = "フリーワード検索"; $pankuzu = "
top詳細検索>フリーワード検索
"; //検索フィールド $sql = " SELECT wedding_company.sid AS wsid,* FROM wedding_company JOIN wedding_company2 ON(wedding_company.sid = wedding_company2.company_id) LIMIT 1 "; $R = pg_Exec($sql); $fields = pg_numfields($R); $rows = pg_numrows($R); for($i=0;$i<$fields;$i++){ $fieldname = pg_fieldname($R,$i); $fieldtype = pg_fieldtype($R,$i); if($fieldtype == "varchar" OR $fieldtype == "text") $search_field[] = $fieldname; } if( count($search_field) > 0){ for($ab=0;$ab 0){ $area01_id = pg_Result($tmp_area_sql,0,'area01_id'); } /* }else{ $area03_id = ""; $tmp_area_sql = pg_Exec("SELECT * FROM area03_master WHERE area02_id IN (SELECT area02_id FROM area02_master WHERE area01_id = '$area01_id')"); if(pg_Numrows($tmp_area_sql) > 0){ for($xz=0;$xz 0){ for($ab=0;$ab\n"; $para_hidden .= "\n"; //検索条件表示用 $disp_search_value = $keywords; //プルダウンメニューを表示する $disp_pulldown = "disp"; }elseif($mode == "skl"){ //skl = search_kodawari_listの略 こだわりトップから来るやつ) $disp_h1 = "

こだわり検索

"; $page_title = "こだわり検索"; $pankuzu = "
top詳細検索>こだわり検索
"; if($kodawari_id != ""){ $WHERE[] .= " wedding_company.sid IN ( SELECT DISTINCT(company_id) FROM kodawari_jyoukyou WHERE kodawari_id = '$kodawari_id' ) "; } $page_para = "&kodawari_id=".$kodawari_id; //$before_para .= "&mode=$mode"; //←見本 //小エリア if($area03_id != ""){ $WHERE[] = " area03_id = '$area03_id' "; $page_para .= "&area03_id=".$area03_id; } //小ジャンル if($genre_small_id != ""){ $WHERE[] .= " wedding_company.sid IN ( SELECT DISTINCT(company_id) FROM wedding_genre_jyoukyou WHERE wedding_genre_id = '$genre_small_id' ) "; $page_para = "&genre_small_id=".urlencode($genre_small_id); } //プルダウンメニューを表示する $disp_pulldown = "disp"; }elseif($mode == "sa"){ $disp_h1 = "

エリア検索

"; $page_title = "エリア検索"; $pankuzu = "
top詳細検索>エリア検索
"; //プルダウン検索時 if($area03_id != ""){ $WHERE[] = " area03_id = '$area03_id' "; $tmp_area_sql = pg_Exec(" SELECT area01_id FROM area01_master join area02_master using(area01_id) WHERE area02_id IN (SELECT area02_id FROM area03_master WHERE area03_id = '$area03_id') "); if(pg_Numrows($tmp_area_sql) > 0){ $area01_id = pg_Result($tmp_area_sql,0,'area01_id'); } }else{ $area03_id = ""; $tmp_area_sql = pg_Exec("SELECT * FROM area03_master WHERE area02_id IN (SELECT area02_id FROM area02_master WHERE area01_id = '$area01_id')"); if(pg_Numrows($tmp_area_sql) > 0){ for($xz=0;$xz 0){ for($ab=0;$ab\n"; $para_hidden .= "\n"; } //プルダウン検索から来た場合の処理・・・? //ページタイトル手動設定 $CMN_PAGE_TITLE = $page_title."|THAIフリーク[thai freak]"; //body tagまで require_once($_SERVER[DOCUMENT_ROOT]."/require/header.php"); ?>
▼検索条件
".$disp_search_value."

"; } ?>

0) $WHERE = " WHERE ".implode(" AND ",$WHERE); $str_sql = " SELECT wedding_company.sid AS wsid,* FROM wedding_company INNER JOIN wedding_company2 ON(wedding_company.sid = wedding_company2.company_id) ".$WHERE; if($offset == ""){ $offset = 0; $allrows = pg_exec($str_sql); $allrows = pg_numrows($allrows); }else{ $para = "&offset=".$offset."&allrows=".$allrows; } $str_sql .= " ORDER BY sort_key ASC, wedding_company.update_day DESC LIMIT $limit OFFSET $offset "; $str_sql = pg_Exec($str_sql); if($offset > 0){ $before = $offset - $limit; $before_para = ""; $before_para .= "?allrows=$allrows"; $before_para .= "&offset=$before"; $before_para .= "&limit=$limit"; $before_para .= "&action=$action"; $before_para .= "&mode=$mode"; if($page_para != "") $before_para .= $page_para; //$before_para .= "&adv_place_id=".urlencode($adv_place_id); $mae = "
  • 前へ
  • "; } if(($allrows - $offset + $limit) > 0 && ($offset + $limit) < $allrows){ $next = $offset + $limit; $next_para = ""; $next_para .= "?allrows=$allrows"; $next_para .= "&offset=$next"; $next_para .= "&limit=$limit"; $next_para .= "&action=$action"; $next_para .= "&mode=$mode"; if($page_para != "") $next_para .= $page_para; //$next_para .= "&adv_place_id=".urlencode($adv_place_id); $ato = "
  • 次へ
  • \n"; //$ato = "次のページ\n"; }else{ $next = $allrows; } if($mae == "") $mae = "
  • 前へ
  • "; if($ato == "") $ato = "
  • 次へ
  • "; $disp_num = ($offset == 0) ? "1":$offset; $disp_rows = $disp_num."〜".$next; $disp_rows = $allrows."件中 ".$disp_num."件〜".$next."件を表示しています。 "; $rows = pg_Numrows($str_sql); if($rows <= 0){ echo "

    次の条件に一致する情報は見つかりませんでした。

    "; }else{ ?>
         


    100) $top_image_comment1 = mb_substr($top_image_comment1,0,100)."・・・"; $top_image1 = pg_Result($str_sql,$ib,"top_image1"); $top_image2 = pg_Result($str_sql,$ib,"top_image2"); $top_image3 = pg_Result($str_sql,$ib,"top_image3"); $top_image4 = pg_Result($str_sql,$ib,"top_image4"); if($top_image1 == "") $top_image1 = "noimg.jpg"; if($top_image2 == "") $top_image2 = "noimg.jpg"; if($top_image3 == "") $top_image3 = "noimg.jpg"; if($top_image4 == "") $top_image4 = "noimg.jpg"; if($keisai_plan == "b"){ ?>

    TEL  
    最寄駅   
    営業時間   
    ".$shopurl.""?> 

    クーポンあり

    TEL  
    最寄駅  
    営業時間   
       

    クーポンあり

    ".$shopname.""; if($tel != "") echo "

    TEL ".$tel."
    "; echo $adress."
    ".$traffic."

    "; ?>