/** * Удаление топика * * @return void */ protected function EventDelete() { $this->Security_ValidateSendForm(); // * Получаем номер топика из УРЛ и проверяем существует ли он $sTopicId = $this->GetParam(0); if (!($oTopic = $this->Topic_GetTopicById($sTopicId))) { return parent::EventNotFound(); } // * проверяем есть ли право на удаление топика if (!$this->ACL_IsAllowDeleteTopic($oTopic, $this->oUserCurrent)) { return parent::EventNotFound(); } $oBlog = $oTopic->getBlog(); // * Гарантировано удаляем топик и его зависимости $this->Hook_Run('topic_delete_before', array('oTopic' => $oTopic)); $this->PluginAceadminpanel_Admin_DelTopic($oTopic->GetId()); $this->Hook_Run('topic_delete_after', array('oTopic' => $oTopic)); // * Перенаправляем на страницу со списком топиков из блога этого топика //Router::Location($oTopic->getBlog()->getUrlFull()); if ($this->sBackUrl and $this->sBackUrl != $oTopic->getUrl()) { ACE::HeaderLocation($this->sBackUrl); } else { ACE::HeaderLocation($oTopic->getBlog()->getUrlFull()); } }
public function EventPages() { if (!$this->PluginAceadminpanel_Plugin_PluginActivated('Page')) { return parent::EventNotFound(); } $this->sMenuSubItemSelect = 'list'; if ($sAdminAction = $this->_getRequestCheck('action')) { $this->EventPagesAction($sAdminAction); } // * Обработка создания новой страницы if ($this->_getRequestCheck('submit_page_save')) { if (!getRequest('page_id')) { $this->EventPagesAddSubmit(); } } if ($this->GetParam(0) == 'new') { // создание новой страницы $this->sMenuSubItemSelect = 'new'; $this->Viewer_Assign('include_tpl', Plugin::GetTemplatePath($this->sPlugin) . '/actions/ActionAdmin/pages_edit.tpl'); } elseif ($this->GetParam(0) == 'edit') { // вывод формы для редактирования $this->EventPagesEdit(); $this->Viewer_Assign('include_tpl', Plugin::GetTemplatePath($this->sPlugin) . '/actions/ActionAdmin/pages_edit.tpl'); } elseif ($this->GetParam(0) == 'delete') { // отработка команды удаления $this->EventPagesDelSubmit(); ACE::HeaderLocation(Router::GetPath('admin') . 'pages/'); return; } elseif ($this->GetParam(0) == 'sort') { // отработка команды сортировки $this->EventPagesSort(); ACE::HeaderLocation(Router::GetPath('admin') . 'pages/'); return; } elseif ($this->GetParam(0) == 'options') { // вывод опций $this->sMenuSubItemSelect = 'options'; $this->EventPagesOptions(); $this->Viewer_Assign('include_tpl', Plugin::GetTemplatePath($this->sPlugin) . '/actions/ActionAdmin/pages_options.tpl'); } // * Получаем и загружаем список всех страниц $aPages = $this->PluginPage_Page_GetPages(); if (sizeof($aPages) == 0 and $this->PluginPage_Page_GetCountPage()) { $this->PluginPage_Page_SetPagesPidToNull(); $aPages = $this->PluginPage_Page_GetPages(); } $this->Viewer_Assign('aPages', $aPages); }
protected function _EventSiteResetSubmit() { $this->Security_ValidateSendForm(); if (isPost('adm_cache_clear_data')) { $this->Cache_Clean(); } if (isPost('adm_cache_clear_headfiles')) { ACE::ClearHeadfilesCache(); } if (isPost('adm_cache_clear_smarty')) { ACE::ClearSmartyCache(); } if (isPost('adm_reset_config_data')) { $this->_ResetCustomConfig(); } $this->Message('notice', $this->Lang_Get('adm_action_ok'), null, true); ACE::HeaderLocation(Router::GetPath('admin') . 'site/reset/'); }
protected function EventUsersActivate() { $this->Security_ValidateSendForm(); $sUserLogin = $this->GetParam(1); $oUser = $this->User_GetUserByLogin($sUserLogin); $oUser->setActivate(1); $oUser->setDateActivate(date('Y-m-d H:i:s')); $this->User_Update($oUser); if ($this->sPageRef) { ACE::HeaderLocation($this->sPageRef); } }
/** * Вернуться на предыдущую страницу */ protected function _gotoBackPage() { if ($this->sPageRef) { ACE::HeaderLocation($this->sPageRef); } else { ACE::HeaderLocation(Router::GetPath('admin')); } }
protected function _banlistIpDel() { $this->Security_ValidateSendForm(); $nId = $this->GetParam(2); if ($this->PluginAceadminpanel_Admin_ClearBanIp($nId)) { $this->_messageNotice($this->Lang_Get('adm_saved_ok'), 'banip:delete'); } else { $this->_messageError($this->Lang_Get('adm_saved_err'), 'banip:delete'); } ACE::HeaderLocation(Router::GetPath('admin') . 'banlist/ips/'); }