3 ) { header("location: http://tsusaga.org/err.htm"); exit(); } $cate_search = mb_convert_encoding( $cateid_var[1] , "euc-jp" , "sjis" ); $id_search = mb_convert_encoding( $cateid_var[2] , "euc-jp" , "sjis" ); $gif_url = "http://tsusaga.org/gif/"; $return_url = "http://tsusaga.org/cate/".$cate_search; $return_top_url = "http://tsusaga.org/"; $select_code = ""; $ken_mei = "津市"; //データベースを開いて準備 // // $link_login = mysql_connect('ns.jfx.jp', 'b5_user', 'user1192'); //文字コードをセット mysql_query( "set names euc-jp"); //データベース接続 $selectdb2 = mysql_select_db("d_service"); if (!$link_login) { die('data base error' . mysql_error()); } //ここまで $kate = "SELECT * from d_matsusakaorg where ( siteck not like 'no' ) and ( siteck not like 'out' ) and ( shop_cate like '".$cate_search."' ) and ( p_code like '" . $id_search. "')"; $kate_s = mysql_query($kate); if ( $kate_s ) { $cn = mysql_num_rows($kate_s); if ( $cn == 1 ) { $kate_s_array = mysql_fetch_array($kate_s); print_head( ck_moji(mb_convert_encoding($kate_s_array[shop_name] , "sjis" , "euc-jp" )) , ck_moji(mb_convert_encoding($kate_s_array[nagaremoji] , "sjis" , "euc-jp" ) ) ); if ( $kate_s_array[open_site] == "no" ) { print "サイトデータが見つかりませんでした。
"; print '
TOPページへ戻る
'; print_foot( $cpr ); exit(); } if ( is_file( '/var/www/html-maorg/public_html/jpg/' . $id_search . '_1.jpg' ) ) { print '

'; } print '
'; print "【名称】
" . ck_moji(mb_convert_encoding($kate_s_array[shop_name] , "sjis" , "euc-jp" )); print "
【所在地】
"; print ck_moji(mb_convert_encoding($kate_s_array[shop_add] , "sjis" , "euc-jp" )); //電話 if ( $kate_s_array[shop_tel] != "" ) { $tel1_n = mb_convert_encoding($kate_s_array[shop_tel] , "sjis" , "euc-jp" ); if ( preg_match( "/^[0-9\-]{9,15}$/" , $tel1_n ) ) { print "
"; print "【電話番号】
" . "".$tel1_n.""; } else { print "
"; print "【電話番号】
" . ck_moji($tel1_n); } } //FAX if ( $kate_s_array[shop_fax] != "" ) { $fax1_n = mb_convert_encoding($kate_s_array[shop_fax] , "sjis" , "euc-jp" ); if ( preg_match( "/^[0-9\-]{9,15}$/" , $fax1_n ) ) { print "
"; print "【FAX】
" . $fax1_n; } } if ( $kate_s_array[shop_yasumi] != "" ) { print "
"; print "【定休日】
" . ck_moji(mb_convert_encoding($kate_s_array[shop_yasumi] , "sjis" , "euc-jp" )); } if ( $kate_s_array[shop_zikan] != "" ) { print "
"; print "【営業時間】
" . ck_moji(mb_convert_encoding($kate_s_array[shop_zikan] , "sjis" , "euc-jp" )); } if ( $kate_s_array[shop_yosan] != "" ) { print "
"; print "【平均予算】
" . ck_moji(mb_convert_encoding($kate_s_array[shop_yosan] , "sjis" , "euc-jp" )); } if ( $kate_s_array[shop_park] != "" ) { print "
"; print "【駐車場】
" . ck_moji(mb_convert_encoding($kate_s_array[shop_park] , "sjis" , "euc-jp" )); } if ( $kate_s_array[shop_card] != "" ) { print "
"; print "【カード】
" . ck_moji(mb_convert_encoding($kate_s_array[shop_card] , "sjis" , "euc-jp" )); } if ( $kate_s_array[shop_url_pc] != "" ) { print "
"; print "【PCサイト】
" . ck_moji(mb_convert_encoding($kate_s_array[shop_url_pc] , "sjis" , "euc-jp" )); } if ( $kate_s_array[shop_url_moba] != "" ) { print "
"; print "【携帯サイト】
" . ck_moji(mb_convert_encoding($kate_s_array[shop_url_moba] , "sjis" , "euc-jp" )) .""; } if ( $kate_s_array[shop_desc] != "" ) { $shop_desc_n = ck_moji(mb_convert_encoding( $kate_s_array[shop_desc] , "sjis" , "euc-jp" )); $shop_desc_n = henkan_moji($shop_desc_n); print "
【コメント】
" . $shop_desc_n; } if ( $kate_s_array[shop_rekishi] != "" ) { $shop_rekishi_n = ck_moji(mb_convert_encoding( $kate_s_array[shop_rekishi] , "sjis" , "euc-jp" )); print "
【歴史・歩み】
" . $shop_rekishi_n; } //地図 if ( is_file( '/var/www/html-maorg/public_html/map/' . $id_search . '_map.gif' ) ) { print "
【地図】

"; print '
'; } //サブメニュー print '
このページを友達に紹介'; print '
同じ町で情報をチェック
'; //$kate_s_array[syoukai] //繋がりサイトを表示する。 $syoukai_pr = "SELECT * from d_matsusakaorg where ( user_id like '" . $kate_s_array[syoukai]. "')"; $syoukai_pr_s = mysql_query($syoukai_pr); if ( $syoukai_pr_s ) { $cn = mysql_num_rows($syoukai_pr_s); print "


"; if ( $cn == 1 ) { $kate_syoukai = mysql_fetch_array($syoukai_pr_s); print ''; print mb_convert_encoding($kate_syoukai[shop_name] , "sjis" , "euc-jp" ); print ""; } elseif ( $kate_s_array[syoukai] == "none" ) { print "津市"; } elseif ( $kate_s_array[syoukai] == "vip" ) { print "−"; } else { print "株式会社B5"; } print "

"; } //カウンターを挿入する。 $kate_cn = "SELECT * from count_matsusakaorg where ( user_code like '".$kate_s_array[p_code]."')"; $kate_cn_s = mysql_query($kate_cn); if ( $kate_cn_s ) { $cn = mysql_num_rows($kate_cn_s); if ( $cn == 1 ) { $kate_cn_array = mysql_fetch_array($kate_cn_s); $count_data = $kate_cn_array[count_num]; $ip_ad_ck = $kate_cn_array[ip_ck]; if ( $REMOTE_ADDR != $ip_ad_ck ) { $count_data++; } unset($kate_cn_array); print '
( ' . $count_data . ' )


'; $upd = "update count_matsusakaorg set count_num=".$count_data." , ip_ck='".$REMOTE_ADDR."' where user_code = '".$kate_s_array[p_code]."';"; mysql_query($upd); } else { } } else { print "
カントエラー

"; } //ここまで if ( $textfield != "" ) { $textfield_deco = urlencode($textfield); print '
つサガTOPページへ戻る
'; } else { print '

つサガTOPページへ戻る
'; } print_foot( $cpr ); } else { mysql_close($link_login); header( "Location: http://tsusaga.org/err.htm" ); } } else { print "データベースエラーです。"; mysql_close($link_login); exit(); } mysql_close($link_login); function print_head( $name , $name2) { echo ' 【つサガ】!'.$name.'の情報 '; if ( $name2 != "" ){ print ''.$name2.''; } else { print '津がわかるサイト・街情報の登録無料♪もちろん検索も無料♪'; } print '
'; print '

つサガ-'.$name.'

'; print '

【'.$name.'】の詳細情報

'; } function print_foot( $cpr ) { print '

'.$cpr.'
'; echo ' '; } function ck_moji( $name ) { $name = htmlspecialchars( $name , ENT_QUOTES); //$name = stripslashes ( $name ); //両端の空白を削除する。 $name = trim($name); //改行を
に変換 $name = nl2br ( $name ); return $name; } function henkan_moji( $name ) { $name = str_replace ( "/*線*/" , "
" , $name ); $name = str_replace ( "/*中始*/" , "
" , $name ); $name = str_replace ( "/*中終*/" , "
" , $name ); $name = str_replace ( "/*改行*/" , "
" , $name ); $name = str_replace ( "/*空白*/" , " " , $name ); $name = str_replace ( "/*赤始*/" , "" , $name ); $name = str_replace ( "/*赤終*/" , "" , $name ); $name = str_replace ( "/*青始*/" , "" , $name ); $name = str_replace ( "/*青終*/" , "" , $name ); $name = str_replace ( "/*緑始*/" , "" , $name ); $name = str_replace ( "/*緑終*/" , "" , $name ); $name = str_replace ( "/*ETC*/" , "\"ETC\"" , $name ); $name = str_replace ( "/*ETC*/" , "\"ETC\"" , $name ); $name = str_replace ( "/*!*/" , "\"びっくり\"" , $name ); $name = str_replace ( "/*!*/" , "\"びっくり\"" , $name ); $name = str_replace ( "/*!?*/" , "\"すごい?\"" , $name ); $name = str_replace ( "/*!?*/" , "\"すごい?\"" , $name ); $name = str_replace ( "/*円*/" , "\"円\"" , $name ); $name = str_replace ( "/*得*/" , "\"得\"" , $name ); $name = str_replace ( "/*丸秘*/" , "\"丸秘\"" , $name ); $name = str_replace ( "/*ご飯*/" , "\"ご飯\"" , $name ); $name = str_replace ( "/*オイルジョッキ*/" , "\"オイルジョッキ\"" , $name ); $name = str_replace ( "/*カーナビ*/" , "\"カーナビ\"" , $name ); $name = str_replace ( "/*カクテル*/" , "\"カクテル\"" , $name ); $name = str_replace ( "/*グ*/" , "\"ぐー!\"" , $name ); $name = str_replace ( "/*サラダ*/" , "\"サラダ\"" , $name ); $name = str_replace ( "/*スパナ*/" , "\"スパナ\"" , $name ); $name = str_replace ( "/*食事*/" , "\"食事\"" , $name ); $name = str_replace ( "/*タイヤ*/" , "\"タイヤ\"" , $name ); $name = str_replace ( "/*チャンジャ*/" , "\"チャンジャ\"" , $name ); $name = str_replace ( "/*ドラム缶*/" , "\"ドラム缶\"" , $name ); $name = str_replace ( "/*どんぶり*/" , "\"どんぶり\"" , $name ); $name = str_replace ( "/*ナルト*/" , "\"ナルト\"" , $name ); $name = str_replace ( "/*ハンドル*/" , "\"ハンドル\"" , $name ); $name = str_replace ( "/*バッテリー*/" , "\"バッテリー\"" , $name ); $name = str_replace ( "/*パスタ*/" , "\"パスタ\"" , $name ); $name = str_replace ( "/*ビール*/" , "\"ビール\"" , $name ); $name = str_replace ( "/*下がる*/" , "\"下がる\"" , $name ); $name = str_replace ( "/*携帯*/" , "\"携帯\"" , $name ); $name = str_replace ( "/*時計*/" , "\"時計\"" , $name ); $name = str_replace ( "/*車*/" , "\"車\"" , $name ); $name = str_replace ( "/*上がる*/" , "\"上がる\"" , $name ); $name = str_replace ( "/*駐車場*/" , "\"駐車場\"" , $name ); $name = str_replace ( "/*鳥料理*/" , "\"鳥料理\"" , $name ); $name = str_replace ( "/*揚げ物*/" , "\"揚げ物\"" , $name ); $name = str_replace ( "/*餃子*/" , "\"餃子\"" , $name ); $name = str_replace ( "/*昼*/" , "\"昼\"" , $name ); $name = str_replace ( "/*夜*/" , "\"夜\"" , $name ); $name = str_replace ( "/*青い車*/" , "\"青い車\"" , $name ); $name = str_replace ( "/*バス*/" , "\"バス\"" , $name ); $name = str_replace ( "/*トラック*/" , "\"トラック\"" , $name ); $name = str_replace ( "/*電車*/" , "\"電車\"" , $name ); $name = str_replace ( "/*手紙*/" , "\"手紙\"" , $name ); $name = str_replace ( "/*電話*/" , "\"FAX付き電話\"" , $name ); $name = str_replace ( "/*ラブ*/" , "\"ラブラブ\"" , $name ); $name = str_replace ( "/*神社*/" , "\"神社\"" , $name ); $name = str_replace ( "/*高台寺*/" , "\"高台寺\"" , $name ); $name = str_replace ( "/*清水寺*/" , "\"清水寺\"" , $name ); $name = str_replace ( "/*新1*/" , "\"新情報\"" , $name ); $name = str_replace ( "/*新1*/" , "\"新情報\"" , $name ); $name = str_replace ( "/*新2*/" , "\"新情報\"" , $name ); $name = str_replace ( "/*新2*/" , "\"新情報\"" , $name ); $name = str_replace ( "/*ピカピカ*/" , "\"注目\"" , $name ); $name = str_replace ( "/*顔1*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔1*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔2*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔2*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔3*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔3*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔4*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔4*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔5*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔5*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔6*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔6*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔7*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔7*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔8*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔8*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔9*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔9*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔10*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔10*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔11*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔11*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔12*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔12*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔13*/" , "\"顔絵文字\"" , $name ); $name = str_replace ( "/*顔13*/" , "\"顔絵文字\"" , $name ); return $name; } ?>