====== Переключатель панели администрирования ====== _cAllowPanel = Core_Entity::factory('constant')->getByName('ALLOW_PANEL'); if ($this->_cAllowPanel->value != 'false') { $this->_cAllowPanel->value = 'false'; $this->_cAllowPanel->save(); } } public function execute() { if (isset($_SESSION['current_users_id']) && $_SESSION['current_users_id'] != 0) { $panelActive = !(Core_Array::getGet('control_panels', $this->_cAllowPanel->active)); $oldActive = $this->_cAllowPanel->active; ?>
off?> _cAllowPanel->active = false; } else { ?> on?> _cAllowPanel->active = true; } ?>
_cAllowPanel->save(); if ($this->_cAllowPanel->active != $oldActive) { ?>