for($i=0; $map = sql_fetch_array($map_result); $i++) {
// 반응형 대응을 위한 각 위치의 좌표와 영역 크기는 % 로 처리 된다.
$pos_w = $map['ma_width'] / $map_w * 100;
$pos_h = $map['ma_height'] / $map_h * 100;
$pos_t = $map['ma_top'] / $map_w * 100;
$pos_l = $map['ma_left'] / $map_w * 100;
$map_class = "";
if($map['ma_id'] == $character['ma_id']) {
// 현재 캐릭터 위치와 동일한 좌표 영역일 경우
// my 클리스를 추가한다.
$map_class .=" my";
}
// 현재 위치에 있는 캐릭터
// main 타입의 캐릭터들만 불러온다.
$cnt = sql_fetch("select count(*) as cnt from {$g5['character_table']} where ch_type='main' and ma_id = '{$map['ma_id']}'");
$cnt = $cnt['cnt'];
if($cnt > 0) {
// 다른 위치에 존재하는 캐릭터가 있을 경구, other 클래스를 추가한다.
$map_class .=" other";
} else {
$cnt = '';
}
?>
=$cnt?>
} ?>