/** * Действие удаление ссылки из ротатора: */ public function removeOnlineLinkAjaxAction(Application $application) { if (!Session::getInstance()->isAdminSession()) { return false; } $link = Blog_BlogOnlineModel::GetLink($_GET['id']); if ($link) { Blog_BlogOnlineModel::RemoveLink($_GET['id']); ControlModel::logModEvent(date("d-m-Y H:i:s") . ' ' . $_SESSION['auth']['name'] . '<br /> удалил ссылку ' . $link['link'] . '<br /><em>' . strip_tags($link['description']) . '</em>'); JabberBot::send('-=$ /me (модлог) ' . $_SESSION['auth']['name'] . ' удалил ссылку ' . $link['link'] . ': ' . strip_tags($link['description'])); } return true; }
/** * Удаление поста (ajax): */ public function removeAjaxAction(Application $application) { $board = new Board_BoardModel($_GET['board']); $session = Session::getInstance(); if ($board->existsPost($_GET['id'])) { $post = $board->getPost($_GET['id']); if (!empty($post['password']) && $post['password'] == $_GET['password']) { if ($board->existsThread($_GET['id'])) { $board->removeThread($_GET['id']); } else { $board->removePost($_GET['id']); } return true; } if ($session->isAdminSession()) { if (@$_GET['delall'] == true) { $board->removePostsByAuthor($_GET['id']); return true; } else { if ($board->existsThread($_GET['id'])) { $board->removeThread($_GET['id']); } else { $board->removePost($_GET['id']); } if ($board->getId() != 'alone') { ControlModel::logModEvent(date("d-m-Y H:i:s") . ' ' . $_SESSION['auth']['name'] . '<br /> удалил пост №' . $_GET['id'] . ' в разделе ' . $_GET['board']); } } } return false; } return true; }