{$open_label}{$s->getValue("shop_name")}
|
{$ad}{$map_link}
{$tel}
|
{$s->getValue("open_hour")}
|
{$s->getValue("close_day")}
|
EOM;
}else{
$close_str = "";
if($s->getValue("close_day")){
$close_str = get_closed_day_str($lang).":";
}
$html .= <<
{$open_label}{$s->getValue("shop_name")}
|
{$ad}{$map_link}
{$tel}
|
{$s->getValue("open_hour")}
{$close_str}{$s->getValue("close_day")}
|
EOM;
}
}
return $html;
}
function get_area_list($company_cd,$shop_cate_cd){
global $lang;
//店舗が存在するエリアだけ抽出する
$db = ITSDB::getInstance();
$sql = "
select
a.area_cd
,a.area_name
from m_area as a
inner join d_shop as s
on s.area_cd = a.area_cd
where s.company_cd = ?
and s.shop_cate_cd = ?
and s.language_cd = ?
group by a.area_cd
order by a.view_no asc
";
$result = $db->getRows($sql,$company_cd,$shop_cate_cd,$lang);
$ret = [];
while($row = $result->fetchRow()){
$ret[$row['area_cd']] = $row['area_name'];
}
return $ret;
}
//店舗が存在する県だけ抽出する
function get_prefecture_list($company_cd,$shop_cate_cd,$area_cd){
global $lang;
$db = ITSDB::getInstance();
$sql = "
select
s.prefecture_cd
from d_shop as s
where s.company_cd = ?
and s.shop_cate_cd = ?
and s.area_cd = ?
and s.language_cd = ?
and s.del_flg = 0
group by s.prefecture_cd
order by s.prefecture_cd asc
";
$result = $db->getRows($sql,$company_cd,$shop_cate_cd,$area_cd,$lang);
$ret = [];
while($row = $result->fetchRow()){
array_push($ret,$row['prefecture_cd']);
}
return $ret;
}
function get_country_list($company_cd,$shop_cate_cd,$area_cd){
$db = ITSDB::getInstance();
$sql = "
select
s.country_cd
from d_shop as s
where s.company_cd = ?
and s.shop_cate_cd = ?
and s.area_cd = ?
group by s.country_cd
order by s.country_cd asc
";
$result = $db->getRows($sql,$company_cd,$shop_cate_cd,$area_cd);
$ret = [];
while($row = $result->fetchRow()){
array_push($ret,$row['country_cd']);
}
return $ret;
}
function get_closed_day_str($lang){
if($lang == "en"){
return "Closed Days";
}
if($lang == "ko"){
return "정기휴무일";
}
if($lang == "zh-cn" || $lang == "zh-tw"){
return "定休日";
}
return "Closed Days";
}