$actionsPath[] = $actionId; $actions = count($actionsPath); // Se eliminan las acciones ya realizadas if ($actions > 2 && $actionsPath[$actions - 3] == $actionId) { unset($actionsPath[$actions - 3]); unset($actionsPath[$actions - 2]); $actionsPath = array_values($actionsPath); $actions = count($actionsPath); } $tpl->assign('lastAction', $actionsPath[$actions - 2]); } switch ($actionId) { case \SP\Controller\ActionsInterface::ACTION_ACC_SEARCH: $_SESSION['actionsPath'] = array(\SP\Controller\ActionsInterface::ACTION_ACC_SEARCH); $tpl->assign('lastAction', $lastAction); $controller = new SP\Controller\SearchC($tpl); $controller->getSearchBox(); $controller->getSearch(); break; case \SP\Controller\ActionsInterface::ACTION_ACC_NEW: $controller = new SP\Controller\AccountC($tpl, null, $itemId); $controller->getNewAccount(); break; case \SP\Controller\ActionsInterface::ACTION_ACC_COPY: $controller = new SP\Controller\AccountC($tpl, null, $itemId); $controller->getCopyAccount(); break; case \SP\Controller\ActionsInterface::ACTION_ACC_EDIT: $controller = new SP\Controller\AccountC($tpl, null, $itemId); $controller->getEditAccount(); break;
* This file is part of sysPass. * * sysPass is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * sysPass is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with sysPass. If not, see <http://www.gnu.org/licenses/>. * */ use SP\Request; use SP\SessionUtil; define('APP_ROOT', '..'); require_once APP_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Base.php'; Request::checkReferer('POST'); if (!SP\Init::isLoggedIn()) { SP\Util::logout(); } $sk = SP\Request::analyze('sk', false); if (!$sk || !SessionUtil::checkSessionKey($sk)) { die('<div class="error round">' . _('CONSULTA INVĂLIDA') . '</div>'); } $controller = new SP\Controller\SearchC(); $controller->getSearch(); $controller->view();