You should have received a copy of the GNU General Public License along with GLPI. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ /** @file * @brief */ if (!defined('GLPI_ROOT')) { include '../inc/includes.php'; } Html::popHeader(__('Setup'), $_SERVER['PHP_SELF']); Session::haveRightsOr('serach_config', array(DisplayPreference::PERSONAL, DisplayPreference::GENERAL)); $setupdisplay = new DisplayPreference(); if (isset($_POST["activate"])) { $setupdisplay->activatePerso($_POST); } else { if (isset($_POST["disable"])) { if ($_POST['users_id'] == Session::getLoginUserID()) { $setupdisplay->deleteByCriteria(array('users_id' => $_POST['users_id'], 'itemtype' => $_POST['itemtype'])); } } else { if (isset($_POST["add"])) { $setupdisplay->add($_POST); } else { if (isset($_POST["purge"]) || isset($_POST["purge_x"])) { $setupdisplay->delete($_POST, 1); } else { if (isset($_POST["up"]) || isset($_POST["up_x"])) { $setupdisplay->orderItem($_POST, 'up'); } else {
define('GLPI_ROOT', '../../..'); include GLPI_ROOT . "/inc/includes.php"; if (!isset($_GET["itemtype"])) { exit; } else { $itemtype = $_GET["itemtype"]; } if (!isset($_GET["type"])) { exit; } else { $type = $_GET["type"]; } Session::checkSeveralRightsOr(array("search_config_global" => "w", "search_config" => "w")); $setupdisplay = new DisplayPreference(); if (isset($_GET["activate"])) { $setupdisplay->activatePerso($_GET); } else { if (isset($_POST["add"])) { $setupdisplay->add($_REQUEST); } else { if (isset($_GET["delete"]) || isset($_GET["delete_x"])) { $setupdisplay->delete($_GET); } else { if (isset($_GET["up"]) || isset($_GET["up_x"])) { $setupdisplay->orderItem($_GET, 'up'); } else { if (isset($_GET["down"]) || isset($_GET["down_x"])) { $setupdisplay->orderItem($_GET, 'down'); } } }