chengkun
2025-04-18 1bb985f32f2efe0f9dd69f3cf29a1c809b1cf96d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
{yun:}include file="$comstyle/header.htm"{/yun}
<div class="w1000">
  <div class="admin_mainbody">
  {yun:}include file="$comstyle/left.htm"{/yun}
    <script src="{yun:}$config.mapurl{/yun}"></script>
    <script type="text/javascript" src="{yun:}$config.sy_weburl{/yun}/js/map.js?v={yun:}$config.cachecode{/yun}"></script>  <div class="com_tit"><span class="com_tit_span">企业资料</span><div class="com_topbth_box">
            <a  href="{yun:}url m=company c=show id='`$uid`'{/yun}" target="_blank"class="com_ylbth">预览主页</a>
        
        </div></div>
    
                <div class=right_box>
                            <div class=vip_boxshow>
                                <div class="vip_boxshow_c">
                <div class="zllist ">
                                <div class="report_uaer_list_h1">编辑公司信息</div>
                                <div class="report_uaer_list_p">能获得更多求职者的青睐</div>
                                <ul>
                                        <li><a href="index.php?c=info">基本信息</a></li>
                                        <li><a href="index.php?c=info&act=side">补充信息</a></li>
                                    
                                        <li><a href="index.php?c=show"> 公司相册</a></li>
                                        <li><a href="index.php?c=uppic"> 公司LOGO</a></li>
                    <li><a href="index.php?c=product">产品介绍</a></li>
                    <li><a href="index.php?c=news">公司资讯</a></li>
                    <li class="zlcur"><a href="index.php?c=map">公司地图</a></li>
                        <li><a href="index.php?c=comtpl">个性化模板</a></li>
                                </ul>
                            </div>
                            <div class="vip_box" style="margin-top: 0px; padding-top: 15px;;">
                                <div class="mapbox">
     <div class="com_new_tip mt20"> 
          <span class="com_new_tip_h">温馨小提示</span>搜索框内输入地址搜索,在地图区域点击公司所在的位置,点击保存地图</div>
      
          
    
     <div class="joblist_search">
        
            <div class="joblist_mapsearch_box">
        
            <input id="map_keyword" type="text" value="{yun:}$row.address{/yun}" class="joblist_mapsearch_text" placeholder="请输入地址" onclick="if(this.value=='请输入地址'){this.value='';}" onblur="if(this.value==''){this.value='请输入地址';}"/><input type="button" value="精准查找" onclick="localsearch('全国');" class="joblist_mapsearch_bth"/>
            
            </div>
        
    </div>
    
    <div class="clear"></div>
        <div class=admin_note_map style="position:relative; margin-top:20px;">
        <iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
        <form name="myform" onSubmit="return checkpost();" target="supportiframe" action="index.php?c=map&act=save" method="post">
          <table width="100%" border="0" cellspacing="0" cellpadding="0" style="font-size:12px;">
              <tr>
                <th height="30"></th>
                <td><div id="map_container" style="width:100%;height:350px;"></div><br>
                </td>
              </tr>
              <tr>
                <th>&nbsp;</th>
                <td height="40">
                <span class="com_info_text_s"> X轴:</span>
                  <input name="xvalue" id="map_x" onkeyup="this.value=this.value.replace(/[^0-9.]/g,'')" readonly="readonly" value="{yun:}$row.x{/yun}"  class="com_info_text">
                 <span class="com_info_text_s"> Y轴:</span>
                  <input name="yvalue" id="map_y" onkeyup="this.value=this.value.replace(/[^0-9.]/g,'')" readonly="readonly" value="{yun:}$row.y{/yun}"  class="com_info_text">
                
                  <input type="submit" name="savemap" class="com_info_mapbth" value="保存地图" style="">
                  <span id="by_map" class="errordisplay">请先设置地图位置</span></td>
              </tr>
            
          </table>
        </form>
          
        </div>
      </div>
    </div>
    <script>
        var map=new BMap.Map("map_container");
        setLocation('map_container',116.404,39.915,"map_x","map_y");
        $(document).ready(function() {
            {yun:}if ($row.x=="" || $row.y=="") && $row.address!=""{/yun}
                $("#map_keyword").val("{yun:}$city_name[$row.provinceid]{/yun}{yun:}$city_name[$row.cityid]{/yun}{yun:}$city_name[$row.three_cityid]{/yun}{yun:}$row.address{/yun}");
                var address = "{yun:}$row.address{/yun}";
                localsearch('{yun:}$city_name[$row.provinceid]{/yun}{yun:}$city_name[$row.cityid]{/yun}{yun:}$city_name[$row.three_cityid]{/yun}'+address.replace(/\s+/g,""));
            {yun:}elseif $row.x!="" && $row.y!=""{/yun}
                setLocation('map_container',{yun:}$row.x{/yun},{yun:}$row.y{/yun},"map_x","map_y");
            {yun:}else{/yun}
                //根据IP到城市开始
                function myFun(result){
                    var cityName = result.name;
                    map.setCenter(cityName);
                }
                var myCity = new BMap.LocalCity();
                myCity.get(myFun);
                //根据IP到城市结结束
            {yun:}/if{/yun}
        });
 
        function localsearch(city){
            if($("#map_keyword").val()=="" || $("#map_keyword").val()=="请输入地址"){
                layer.msg('请输入地址!', 2, 8);return false;
            }
            var local = new BMap.LocalSearch(map, {
                renderOptions: {
                    map: map
                }
            });
            local.clearResults();
            local.search($("#map_keyword").val().replace(/\s+/g,""));
        }
        function checkpost(){
            if($.trim($("#map_x").val())==''||$.trim($("#map_y").val())==''){
                layer.msg('请先设置地图位置!', 2, 8);return false;
            }
        }
        function setLocation(id,x,y,xid,yid){
            var data=get_map_config();
            var config=eval('('+data+')');
            var rating,map_control_type,map_control_anchor;
            if(!x && !y){x=config.map_x;y=config.map_y;}
            var point = new BMap.Point(x,y);
            var marker = new BMap.Marker(point);
            var opts = {type:BMAP_NAVIGATION_CONTROL_LARGE}
            map.enableScrollWheelZoom(true);
            map.addControl(new BMap.NavigationControl(opts));
            map.centerAndZoom(point, 15);
            map.addOverlay(marker);
            map.addEventListener("click",function(e){
               var info = new BMap.InfoWindow('', {width: 260});
                var projection = this.getMapType().getProjection();
                var lngLat = e.point;
                document.getElementById(xid).value=lngLat.lng;
                document.getElementById(yid).value=lngLat.lat;
                map.clearOverlays();
                var point = new BMap.Point(lngLat.lng,lngLat.lat);
                var marker = new BMap.Marker(point);
                map.addOverlay(marker);
            });
        }
    </script>
  </div>
</div>
</div>
{yun:}include file="$comstyle/footer.htm"{/yun}