https://forge.indepnet.net/projects/pdf ------------------------------------------------------------------------- LICENSE This file is part of pdf. pdf 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 2 of the License, or (at your option) any later version. pdf 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 pdf. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ include_once "../../../inc/includes.php"; Session::checkRight("profile", "r"); // Mainly usefull if not actived Plugin::load('pdf', true); $prof = new PluginPdfProfile(); if (isset($_POST["update_user_profile"])) { Session::checkRight("profile", "w"); $prof->update($_POST); Html::back(); }
function plugin_pdf_MassiveActionsProcess($data) { switch ($data["action"]) { case "plugin_pdf_DoIt": foreach ($data['item'] as $key => $val) { if ($val) { $tab_id[] = $key; } } $_SESSION["plugin_pdf"]["type"] = $data["itemtype"]; $_SESSION["plugin_pdf"]["tab_id"] = serialize($tab_id); echo "<script type='text/javascript'>\n location.href='../plugins/pdf/front/export.massive.php'</script>"; break; case "plugin_pdf_allow": $profglpi = new Profile(); $prof = new PluginPdfProfile(); foreach ($data['item'] as $key => $val) { if ($profglpi->getFromDB($key) && $profglpi->fields['interface'] != 'helpdesk') { if ($prof->getFromDB($key)) { $prof->update(array('id' => $key, 'use' => $data['use'])); } else { if ($data['use']) { $prof->add(array('id' => $key, 'use' => $data['use'])); } } } } break; } }