function getBlockCode_Info() { bx_map_import('FormPrivacy'); $oForm = new BxMapFormPrivacy($this->oMain); $oForm->initChecker($this->aLocation); $sMsg = ''; if ($oForm->isSubmittedAndValid()) { if ($oForm->update($this->oMain->_iProfileId)) { $sMsg = MsgBox(_t('_bx_map_privacy_update_ok')); } else { $sMsg = MsgBox(_t('_bx_map_privacy_update_fail')); } } return $sMsg . $oForm->getCode(); }
function actionEdit() { $aLocation = $this->_iProfileId ? $this->_oDb->getProfileById($this->_iProfileId) : false; if (!$this->_iProfileId || !$this->isAllowedEditOwnLocation($aLocation)) { $this->_oTemplate->displayAccessDenied(); return; } $this->_oTemplate->pageStart(); bx_map_import('PageEdit'); $oPage = new BxMapPageEdit($this, $aLocation); echo $oPage->getCode(); $this->_oTemplate->addJs('http://www.google.com/jsapi?key=' . getParam('bx_map_key')); $this->_oTemplate->addJs('BxMap.js'); $this->_oTemplate->addCss('main.css'); $this->_oTemplate->addCss('search.css'); $this->_oTemplate->pageCode(_t('_bx_map_edit'), false, false); }