Ejemplo n.º 1
0
 $ym_center = $ymconf['CENTER'];
 $ym_zoom = $ymconf['ZOOM'];
 $ym_type = $ymconf['TYPE'];
 $ym_lang = $ymconf['LANG'];
 $area = '';
 //show map container
 sm_ShowMapContainer();
 //collect switches geolocation data
 if (!wf_CheckGet(array('coverage'))) {
     $placemarks = sm_MapDrawSwitches();
     //uplinks display mode
     if (wf_CheckGet(array('showuplinks')) and !wf_CheckGet(array('traceid'))) {
         $placemarks .= sm_MapDrawSwitchUplinks();
     }
 } else {
     $placemarks = sm_MapDrawSwitchesCoverage();
 }
 //setting custom zoom and map center if need to find device
 if (wf_CheckGet(array('finddevice'))) {
     $ym_zoom = $ymconf['FINDING_ZOOM'];
     $ym_center = vf($_GET['finddevice']);
     if ($ymconf['FINDING_CIRCLE']) {
         $radius = 30;
         $area = sm_MapAddCircle($_GET['finddevice'], $radius, __('Search area radius') . ' ' . $radius . ' ' . __('meters'), __('Search area'));
     } else {
         $area = '';
     }
     //uplinks display mode
     if (wf_CheckGet(array('showuplinks'))) {
         $traceLinks = wf_CheckGet(array('traceid')) ? $_GET['traceid'] : '';
         $placemarks .= sm_MapDrawSwitchUplinks($traceLinks);
Ejemplo n.º 2
0
  * Switches coverage map
  */
 if ($_GET['action'] == 'switchescoverage') {
     $ymconf = rcms_parse_ini_file(CONFIG_PATH . "ymaps.ini");
     $ym_center = $ymconf['CENTER'];
     $ym_zoom = $ymconf['ZOOM'];
     $ym_type = $ymconf['TYPE'];
     $ym_lang = $ymconf['LANG'];
     $area = '';
     if (wf_CheckGet(array('param'))) {
         $mapDimensions = explode('x', $_GET['param']);
     } else {
         $mapDimensions[0] = '1000';
         $mapDimensions[1] = '800';
     }
     $switchesCoverage = sm_MapDrawSwitchesCoverage();
     $coverageSwMap = wf_tag('div', false, '', 'id="swmap" style="width: ' . $mapDimensions[0] . 'px; height:' . $mapDimensions[1] . 'px;"');
     $coverageSwMap .= wf_tag('div', true);
     $coverageSwMap .= sm_MapInitBasic($ym_center, $ym_zoom, $ym_type, $area . $switchesCoverage, '', $ym_lang);
     die($coverageSwMap);
 }
 /*
  * GlobalSearch cache rebuild
  */
 if ($_GET['action'] == 'rebuildglscache') {
     $globalSearch = new GlobalSearch();
     $globalSearch->ajaxCallback(true);
     die('OK:REBUILDGLSCACHE');
 }
 /*
  * send sms queue to remind users about payments