/***************************************************************************** * * License: * * Copyright (c) 2003-2006 ossim.net * Copyright (c) 2007-2009 AlienVault * All rights reserved. * * This package 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; version 2 dated June, 1991. * You may not use, modify or distribute this program under any other version * of the GNU General Public License. * * This package 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 this package; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, * MA 02110-1301 USA * * * On Debian GNU/Linux systems, the complete text of the GNU General * Public License can be found in `/usr/share/common-licenses/GPL-2'. * * Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt ****************************************************************************/
require_once 'classes/Session.inc'; Session::logcheck("MenuPolicy", "5DSearch"); require_once 'classes/Host.inc'; require_once 'classes/User_config.inc'; require_once 'classes/Util.inc'; require_once 'ossim_db.inc'; require_once 'ossim_conf.inc'; include "functions.php"; // Database Object $db = new ossim_db(); $conn = $db->connect(); // Read config file with filters rules $rules = get_rulesconfig(); $config = new User_config($conn); $user = Session::get_session_user(); $data = $config->get_all($user, "inv_search"); $new = isset($_GET['new']) && !empty($_GET['new']) ? 1 : 0; $case = 1; if ($new === 1) { unset($_SESSION['inventory_search']); unset($_SESSION['inventory_last_search']); unset($_SESSION['inventory_last_descr']); unset($_SESSION['profile']); $current_profile = null; } else { $current_profile = !empty($_GET['profile']) ? $_GET['profile'] : $_SESSION['profile']; $_SESSION['profile'] = $current_profile; if (isset($_SESSION['inventory_last_search'])) { $case = 2; } else { $case = 3;