1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- if (cfr('USERSMAP')) {
- $altercfg = $ubillingConfig->getAlter();
- if ($altercfg['SWYMAP_ENABLED']) {
- set_time_limit(0);
- //wysiwyg build map placement
- if (wf_CheckPost(array('buildplacing', 'placecoords'))) {
- if (cfr('BUILDS')) {
- zb_AddressChangeBuildGeo(ubRouting::post('buildplacing'), ubRouting::post('placecoords'));
- rcms_redirect("?module=usersmap&locfinder=true");
- } else {
- show_window(__('Error'), __('Access denied'));
- }
- }
- $ymconf = $ubillingConfig->getYmaps();
- $ym_center = $ymconf['CENTER'];
- $ym_zoom = $ymconf['ZOOM'];
- $ym_type = $ymconf['TYPE'];
- $ym_lang = $ymconf['LANG'];
- $area = '';
- //show map container
- um_ShowMapContainer();
- //collect biulds geolocation data
- $placemarks = um_MapDrawBuilds();
- //setting custom zoom and map center if need to find some build
- if (wf_CheckGet(array('findbuild'))) {
- $ym_zoom = $ymconf['FINDING_ZOOM'];
- $ym_center = vf($_GET['findbuild']);
- if ($ymconf['FINDING_CIRCLE']) {
- $radius = 30;
- $area = sm_MapAddCircle($_GET['findbuild'], $radius, __('Search area radius') . ' ' . $radius . ' ' . __('meters'), __('Search area'));
- } else {
- $area = '';
- }
- }
- if (wf_CheckGet(array('locfinder'))) {
- sm_MapInit($ym_center, $ym_zoom, $ym_type, $placemarks, um_MapLocationFinder(), $ym_lang);
- } else {
- sm_MapInit($ym_center, $ym_zoom, $ym_type, $area . $placemarks, '', $ym_lang);
- }
- } else {
- show_window(__('Error'), __('This module is disabled'));
- }
- } else {
- show_error(__('Access denied'));
- }
|