ÿØÿà 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/good/ |
Upload File : |
<? /** * 지도좌표입력 * * 작성일 : 20130614.허종 * 수정 :20150316 박건호 상품상세, 리스트 둘다 가능하도록 수정.mode로 구분 inform일때 패어런트 인풋박스에 쓰고 닫음 */ include "../include/top_proc.html"; if(!$mode) $mode="good"; ## 여행상품 지도 if($mode=="good" or $mode=="goood_date_view") { // 상품정보 if($g_uid){ $arr = good_list(" and g_uid='{$g_uid}' "); $row = $arr[0]; } // 행사정보 if($d_uid){ $data_date = date_list($g_uid,"none"," and d_uid='{$d_uid}' "); $row_date = date_list_replace($data_date[0]); $row['map_x'] = $row_date['d_good_map_x']; $row['map_y'] = $row_date['d_good_map_y']; } if($_REQUEST['map_x'] && $_REQUEST['map_y']) { $map_x=$_REQUEST['map_x']; $map_y=$_REQUEST['map_y']; } else if($row['map_x']) { $map_x=$row['map_x']; $map_y=$row['map_y']; } } ## 기초설정 > 회사정보 else if($mode=="site_setting") { $map_x = $TO_CF['shop_map_x']; $map_y = $TO_CF['shop_map_y']; } //서울시청 if(!$map_x){ $map_x="37.564263"; $map_y="126.97467600000004"; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?=$cf['charset']?>" /> <link type="text/css" rel="stylesheet" href="../css/all.css?ver=2022_10_20_0" /> <!-- jquery --> <script src="/js/jquery-1.9.1.js"></script> <!-- 공통 js --> <script type="text/javascript" src="/js/common.js"></script> <script type="text/javascript" src="/js/common.lib.js"></script> <script type="text/javascript" src="/js/Validator.js"></script> <!-- admin js --> <script type="text/javascript" src="../js/admin.lib.js"></script> <!-- 구글맴 --> <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&language=ko®ion=KR&key=<?=$google_api_key?>"></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> <!-- /구글맵 --> </head> <body> <div class="iframe"> <!-- 본문 --> <!-- 폼 --> <form name="frm_hotel_map_edit" id="frm_hotel_map_edit" method="post"> <input type="hidden" name="SqlType" value="good_map_edit"> <input type="hidden" name="tmp_layer_id" value="<?=$tmp_layer_id?>"><!-- 레이어ID --> <input type="hidden" name="g_uid" value="<?=$g_uid?>"> <input type="hidden" name="map_xy" id="map_xy" value=""> <input type="hidden" name="map_zoom" value="" size="10"><!-- 지도 줌level --> <table width="600" border="0" cellpadding="0" cellspacing="0" id="tbl_member_view"> <tr height="25"> <td colspan="3" align="center"> <div id="map_canvas" style="width:600px;height:400px;"></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 gray" 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 gray" onClick="map_search(place_nm.value,map_zoom.value);" /></td> </tr> </table> </form> <!-- /폼 --> <div class="btn_wrap_C mt10"> <?if($mode=='goood_date_view' or $mode=='site_setting'){?> <a class="Bbtn red" href="javascript:;" onClick="goood_date_view();">입력</a> <?} else{?> <a class="Bbtn red" href="javascript:;" onClick="hotel_map_edit();">저장</a> <?}?> </div> <!-- /본문 --> </div> </body> </html> <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 = "good_proc.php"; f.submit(); } //상품상세용 function goood_date_view(){ $('#d_good_map_x',parent.document).val($('#map_x').val()); $('#d_good_map_y',parent.document).val($('#map_y').val()); parent.to_dialog.close('<?=$tmp_layer_id?>'); } </script>