ÿØÿà JFIF ` ` ÿþ
Server : Apache System : Linux ruga7-004.fmcity.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : tkt_travelbus ( 1137) PHP Version : 7.0.0p1 Disable Function : mysql_pconnect Directory : /tkt_travelbus/www/toadmin/hotel_tw/ |
Upload File : |
<? include "../include/top.html"; include "_common.php"; // 호텔정보 $hotel_data = hotel_list(" and hseq='{$hseq}' "); $row_hotel = hotel_list_replace($hotel_data[0]); if($mode=='inform'){ $map_x = $_REQUEST['map_x']; $map_y = $_REQUEST['map_y']; }else{ $data = hotel_list(" and hseq='{$hseq}' "); $rows = $data[0]; if($rows['map_x']){ $map_x=$rows['map_x']; $map_y=$rows['map_y']; } } if(!$map_x){ $map_x="37.564263";//서울시청 $map_y="126.97467600000004";//서울시청 } ?> <!-- 구글맴 --> <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script> <script language="javascript"> var map; var marker; function initialize(lat,lng,zoom_level) { var myLatlng = new google.maps.LatLng(lat,lng); var mapOptions = { zoom: zoom_level, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions); marker = new google.maps.Marker({ map:map, draggable:true, animation: google.maps.Animation.DROP, position: myLatlng }); //자동위치확인. google.maps.event.addListener(marker, "dragend", function(){ map_center(); }); } function map_center() { var pos = ""; var zoom_level = ""; map.setCenter(marker.getPosition()); pos = map.getCenter(); zoom_level = map.getZoom(); document.getElementsByName("map_xy")[0].value=pos; document.getElementsByName("map_zoom")[0].value=zoom_level; document.getElementsByName("map_x")[0].value=pos.lat(); document.getElementsByName("map_y")[0].value=pos.lng(); } function map_search(place_nm,zoom_level) { if(!place_nm)return false; var geocoder = new google.maps.Geocoder(); var lat = ""; var lng = ""; var zoom_lvl=15; if(zoom_level) zoom_lvl = parseInt(zoom_level); geocoder.geocode({'address':place_nm}, function(results, status){ if (status == google.maps.GeocoderStatus.OK){ var location = results[0].geometry.location; lat = location.lat(); lng = location.lng(); initialize(lat,lng,zoom_lvl); map_center(); }else alert('위도와 경도를 찾을 수 없습니다.'); }) } window.onload=function(){ initialize('<?=$map_x?>', '<?=$map_y?>',14); map_center(); } </script> <!-- /구글맵 --> <div class="contents_wrap"> <div class="contents_wrap_in"> <div class="title"><?=$row_hotel['hotel_nm']?><span class="arrow">></span><strong>지도정보</strong></div> <div class="contents_detail"> <div id="Content_box"> <? include "_menu.html"; ?> <!-- 본문 --> <!-- 폼 --> <form name="frm_hotel_map_edit" id="frm_hotel_map_edit" method="post"> <input type="hidden" name="SqlType" value="hotel_map_edit"> <input type="hidden" name="tmp_layer_id" value="<?=$tmp_layer_id?>"><!-- 레이어ID --> <input type="hidden" name="hseq" value="<?=$hseq?>"> <input type="hidden" name="map_xy" id="map_xy" value=""> <input type="hidden" name="map_zoom" value="" size="10"><!-- 지도 줌level --> <table width="100%" border="0" cellpadding="0" cellspacing="0" id="tbl_member_view" class="mt25"> <tr height="25"> <td colspan="3" align="center"> <div id="map_canvas" style="width:95%; height:500px;"></div> </td> </tr> <tr height="30"> <th width="150">위도/경도</th> <td> <input name="map_x" id="map_x" type="text" size="20" class="input_text" value="<?=$map_x?>" readonly /> / <input name="map_y" id="map_y" type="text" size="20" class="input_text" value="<?=$map_y?>" readonly /> </td> <td><input type="button" value="위치확인" class="Table_btn" onClick="map_center();" /></td> </tr> <tr height="30"> <th>주소검색</th> <td><input name="place_nm" id="place_nm" type="text" size="45" class="input_text" value="" /></td> <td><input type="button" value="주소검색" class="Table_btn" onClick="map_search(place_nm.value,map_zoom.value);" /></td> </tr> </table> </form> <!-- /폼 --> <div class="btn_wrap_C mt30"> <?if($mode=='inform'){?> <a class="Bbtn red" href="javascript:;" onClick="hotel_map_check();">입력</a> <?}else{?> <a class="Bbtn red" href="javascript:;" onClick="hotel_map_edit();">저장</a> <?}?> </div> <!-- /본문 --> <style type="text/css"> #tbl_member_view {border:1px solid #CFCFD1;} #tbl_member_view th{border:1px solid #CFCFD1; background-color:#F9F9F9} #tbl_member_view td{border:1px solid #CFCFD1; padding:5px 5px 5px 5px;} </style> <script type="text/javascript"> //리스트용 function hotel_map_edit() { var f=document.frm_hotel_map_edit; if(!confirm('저장하시겠습니까?'))return; //f.action = "hotel_proc.php"; //f.submit(); ajax_post("","hotel_proc.php","frm_hotel_map_edit"); } //상품상세용 function hotel_map_check(){ $('#map_x',parent.document).val($('#map_x').val()); $('#map_y',parent.document).val($('#map_y').val()); parent.to_dialog.close('<?=$tmp_layer_id?>'); } </script> <? include "../include/footer.html" ?>