‘;
$html .=’‘;
$html .=’‘;

$mysql = mysql_connect(‘120.136.14.227′,’machikyo_suiuser’,’sui123machi456′);
mysql_select_db(‘machikyo_suitowndb’);
mysql_query(‘SET NAMES utf8’, $mysql );

$img_dir = ‘http://sui-town.com/shopGraph/’;

$id = $_GET[“id”];
$SQL =’SELECT * ‘;
$SQL .=’FROM suita_store ‘;
$SQL .=’ JOIN suita_category ON suita_store.category=suita_category.no ‘;
$SQL .=’ JOIN suita_shotengai ON suita_store.shotengai=suita_shotengai.nom ‘;
$SQL .=”WHERE suita_store.id = binary ‘$id’ “;
$SQL .=’AND hide = 0′;
$SQL .=’;’;
$data = mysql_query($SQL);

//echo $SQL;

while($str = mysql_fetch_array($data)){
$id = $str[‘id’];
$photo01 = $str[‘photo01’];
$photo02 = $str[‘photo02’];
$photo03 = $str[‘photo03’];
$name = $str[‘name’];
$kana = $str[‘kana’];
$post = $str[‘post’];
$address01 = $str[‘address01’];
$address02 = $str[‘address02’];
$tel = $str[‘tel’];
$fax = $str[‘fax’];
$times = $str[‘times’];
$holiday = $str[‘holiday’];
$category = $str[‘category’];
$hp = $str[‘hp’];
$fb = $str[‘fb’];
$tw = $str[‘tw’];
$mail = $str[‘mail’];
$genre = $str[‘genre’];
$reco = $str[‘reco’];
$pr = $str[‘pr’];
$bikou = $str[‘bikou’];
$youtube = $str[‘youtube’];
$hide = $str[‘hide’];
$category_l = $str[‘category_l’];
$category_m = $str[‘category_m’];
$shoten = $str[‘shoten’];

//URL作成
if($hp==”−” or $hp==”-”){
$htmlHp = $hp;
}else{
$htmlHp = ‘ホームページはこちら‘;
}
if($tw==”−” or $tw==”-”){
$htmlTw = $tw;
}else{
$htmlTw = ‘Twitterはこちら‘;
}
if($fb==”−” or $fb==”-”){
$htmlFb = $fb;
}else{
$htmlFb = ‘Facebookはこちら‘;
}
$html .=’

‘.$name.’

‘;

//ギャラリー
$html .=’

‘;
$html .=’

‘;
$html .=’

‘;
$imgCnt = 1;
$imgTotal = 3;
$imgTotal = $imgTotal+1;
$path = $_SERVER[‘DOCUMENT_ROOT’].”/shopGraph/”;
while($imgCnt < $imgTotal){ switch ($imgCnt) { case 1: $imgname = $str['id'].".jpg"; if($photo01!=$imgname){ $imgname = "987654321.jpg"; } break; case 2: $imgname = $str['id']." (2).jpg"; if($photo02!=$imgname){ $imgname = "987654321.jpg"; } break; case 3: $imgname = $str['id']." (3).jpg"; if($photo03!=$imgname){ $imgname = "987654321.jpg"; } break; } if (file_exists($path.$imgname)) { $imgPass[$imgCnt] = $img_dir.$imgname; $filePass[$imgCnt] = '‘;
}
$imgCnt++;
}
$html .=’

‘;
$html .=’

‘;
$html .=’ ‘.$filePass[1].’‘;
$html .=’ ‘.$filePass[2].’‘;
$html .=’ ‘.$filePass[3].’‘;
$html .=’

‘;
$html .=’

‘;
$html .=’

‘;

//店舗情報(ページ右側)
$html .=’

‘;
$html .=’

商店街 ‘.$shoten.’
業種情報 ‘.$category_l.’:’.$category_m.’
住所 〒’.$post.’
‘.$address01.$address02.’
TEL ‘.$tel.’
FAX ‘.$fax.’
Mail ‘.$mail.’
Webサイト ‘.$htmlHp.’
Twitter ‘.$htmlTw.’
Facebook ‘.$htmlFb.’
営業時間 ‘.$times.’
休業日 ‘.$holiday.’
取扱品 ‘.$genre.’
おすすめ ‘.$reco.’

‘;
$html .=’

‘;
$html .=’

‘;

}

//お店からのお知らせ
if($pr!=”−”){
$html .=’

~お店からのお知らせ~

‘;
$html .=’

‘.$pr.’

‘;
}
//動画(ページ下部)
if((boolean)($youtube)){
$urlframe =substr($youtube,16);
$html .=’‘;
$html .=’
動画リンク‘;
}
/*//備考
if($bikou!=”−”){
$html .=’

備考

‘;
$html .=’

‘.$bikou.’

‘;
}*/

echo $html;
?>