'; //サロンエリア表示 /* $tmp = NULL; $tmp = amu_db_all("id, area, count(id) as num","v_shop_num","`lid`='".$prefid."' AND `flg`='1' GROUP BY id","num","",""); */ $tmp = NULL; $fld = "v_area as a LEFT JOIN (SELECT id, area, count(id) as num FROM v_shop_num WHERE `lid`='".$prefid."' AND `flg`='1' GROUP BY id )as b ON(a.area_id = b.id)"; $tmp = amu_db_all("a.area_id as id, a.area, a.area_roma, b.num",$fld,"a.marea_id = '".$prefid."'","a.lnum, a.mnum, a.num","",""); $shopmax = 0; if(is_array($tmp)){ $shop_area_html .= '

ネイルサロン

'; } //スクールエリア表示 /* $tmp = NULL; $tmp = amu_db_all("id, area, count(id) as num","v_shop_num","`lid`='".$prefid."' AND `flg`='2' GROUP BY id","num","",""); */ $tmp = NULL; $fld = "v_area as a LEFT JOIN (SELECT id, area, count(id) as num FROM v_shop_num WHERE `lid`='".$prefid."' AND `flg`='2' GROUP BY id )as b ON(a.area_id = b.id)"; $tmp = amu_db_all("a.area_id as id, a.area, a.area_roma, b.num",$fld,"a.marea_id = '".$prefid."' AND a.`area`!='出張ネイル'","a.lnum, a.mnum, a.num","",""); $schoolmax = 0; if(is_array($tmp)){ $school_area_html .= '

ネイルスクール

'; } //パンクズ作成 $tmp = NULL; $tmp["0"] = '全国ネイルサロン&スクール'; $tmpt["0"] = "全国ネイルサロン&スクール|NAILY"; $ptmp["3"] = str_replace(".html","",$ptmp["3"]); $ptmp3 = $ptmp["3"]; $area_tmp = NULL; $area_tmp = amu_db_all("area_id","v_area","`roma`='".$ptmp["1"]."' AND `area_roma`='".$ptmp["3"]."'","","",""); if($area_tmp["0"]["area_id"]){ $ptmp["3"] = $area_tmp["0"]["area_id"]; } if($ptmp["3"]){ $stmp = NULL; //$stmp = amu_db_all("id, area, count(id) as num","v_shop_num","`id`='".$ptmp["3"]."' GROUP BY id","num","",""); $area_tmp = NULL; $area_tmp = amu_db_all("area_id","v_area","`roma`='".$ptmp["1"]."' AND `area_roma`='".$ptmp["3"]."'","","",""); if($area_tmp["0"]["area_id"]){ $ptmp["3"] = $area_tmp["0"]["area_id"]; } if($ptmp["2"] == "shop"){ $flg = "`flg`='1' AND "; }else{ $flg = "`flg`='2' AND "; } $fld = "v_area as a LEFT JOIN (SELECT id, area, count(id) as num FROM v_shop_num WHERE ".$flg." `id`='".$ptmp["3"]."' GROUP BY id )as b ON(a.area_id = b.id)"; $stmp = amu_db_all("a.area_id as id, a.area, b.num",$fld,"a.area_id = '".$ptmp["3"]."'","","",""); if(!$stmp["0"][num]){ $stmp["0"][num] = 0; } $tmp["3"] = '>'.$stmp["0"]["area"].'エリア('.$stmp["0"][num].')'; $tmpt["3"] = $stmp["0"]["area"].'エリア|'; if(stristr($stmp["0"]["area"], "出張")){ $tmp["3"] = str_replace("エリア","",$tmp["3"]); $tmpt["3"] = str_replace("エリア","",$tmpt["3"]); } $wh[] = "`area_id`='".$ptmp["3"]."'"; } if($ptmp["2"] == "shop"){ if($tmp["3"]){ $tmp["2"] = '>ネイルサロン'; $wh[] = "`flg`='1'"; }else{ $tmp["2"] = '>ネイルサロン'; $wh[] = "`flg`='1'"; } $tmpt["2"] = 'ネイルサロン|'; }elseif($ptmp["2"] == "school"){ if($tmp["3"]){ $tmp["2"] = '>ネイルスクール'; $wh[] = "`flg`='2'"; }else{ $tmp["2"] = '>ネイルスクール'; $wh[] = "`flg`='2'"; } $tmpt["2"] = 'ネイルスクール|'; } if($ptmp["1"]){ if($tmp["2"]){ $tmp["1"] = '>'.$prefname.''; $wh[] = "`larea_id`='".$prefid."'"; if($ptmp["3"]){ $tget = $_this.$prefroma."_".$ptmp["2"]."_".$ptmp3; }else{ $tget = $_this.$prefroma."_".$ptmp["2"]; } }else{ $tmp["1"] = '>'.$prefname.''; $wh[] = "`larea_id`='".$prefid."'"; $tget = $_this.$prefroma; } $tmpt["1"] = $prefname.'|'; } ksort($tmp); krsort($tmpt); $breadcrumbs = implode($tmp); $title = implode($tmpt); // $wh[] = "`name`!=''"; $wh = @implode(" AND ", $wh); $tmp = NULL; //$tmp = amu_db_all("*","v_shop",$wh,"edit_date DESC","9",""); $tmp = amu_db_nav("a.*, if(b.simg!='','1','0') as img, if(CHARACTER_LENGTH(a.kiji) > '30','1','0') as kijinum","v_shop as a LEFT JOIN shop_img as b on(a.id = b.shop_id)",$wh,"a.stage DESC, img DESC, kijinum DESC, a.edit_date DESC",$group,$page, PAGEMAX,"10",'NEXT','NEXT',$tget); $data = $tmp["data"]; $nav = $tmp["html"]; if(is_array($data)){ $data = array_pad($data, PAGEMAX, NULL); $c = 0; $cc = 0; $html ='
'; foreach($data as $key => $val){ $cc++; $name = ""; $img = ""; $kiji = ""; $date = ""; $area = ""; if($val["name"]){ $name = ''.$val["name"].''; $img = ''; if($val["flg"] == 1){ $date = 'ネイルサロン'.date("m.d", strtotime($val["edit_date"])).'更新

'; }elseif($val["flg"] == 2){ $date = 'ネイルスクール'.date("m.d", strtotime($val["edit_date"])).'更新

'; } if(mb_strlen($val["name"]) < 12){ $kiji = mb_strimwidth($val["kiji"], 0, 88, '...'); }else{ $kiji = mb_strimwidth($val["kiji"], 0, 56, '...'); } $area = $val["area"]; if(!stristr($val["area"], "出張")){ $area .= "エリア"; } } $html .= ' '; $c++; if($c == 3){ if($cc < PAGEMAX - 3){ $html .=''; }else{ $html .=''; } $c=0; } } $html .= '

'.$date.'

'.$area.'

'.$img.'

'.$name.$kiji.'

'; }else{ $html ='

掲載されているネイルサロン&ネイルスクールはありません

'; } //area_roma roma $wh = NULL; if($ptmp["1"]){ $wh[0] ="`roma`='".str_replace(".html","",$ptmp["1"])."'"; } if($ptmp["3"]){ $wh[1] ="`area_id`='".$ptmp["3"]."'"; } $wh = @implode(" AND ", $wh); $tmp = NULL; $tmp = amu_db_all("marea,area","v_area",$wh,"","1",""); if($ptmp["1"]){ $description = $tmp["0"]["marea"]."のネイルサロン、ネイルスクール紹介。"; $keywords = $tmp["0"]["marea"].",ネイルサロン,ネイルスクール"; } if($ptmp["3"]){ $description = $tmp["0"]["marea"].$tmp["0"]["area"]."のネイルサロン、ネイルスクール紹介。"; $keywords = $tmp["0"]["marea"].",".$tmp["0"]["area"].",ネイルサロン,ネイルスクール"; } ?> <?=$title?>

PAGE TOP