Utilitaires 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 utilitaires. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ define('GLPI_ROOT', '../../..'); include GLPI_ROOT . "/inc/includes.php"; Html::header(PluginUtilitairesUtilitaire::getTypeName(2), '', "plugins", "utilitaires"); $itemtype = ""; $actionId = ""; $util = new PluginUtilitairesUtilitaire(); if ($util->canView() || Session::haveRight("config", "w")) { if (isset($_POST["do_action"])) { if (isset($_POST['itemtype'])) { $itemtype = $_POST['itemtype']; } if (isset($_POST['actionId'])) { $actionId = $_POST['actionId']; } if (isset($_POST['entities_id'])) { $entities = $_POST['entities_id']; } $date = "NULL"; if (isset($_POST['date'])) { $date = $_POST['date']; }
This file is part of Utilitaires. Utilitaires 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. Utilitaires 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 utilitaires. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ define('GLPI_ROOT', '../../..'); include GLPI_ROOT . "/inc/includes.php"; header("Content-Type: text/html; charset=UTF-8"); Html::header_nocache(); if (!defined('GLPI_ROOT')) { die("Can not acces directly to this file"); } if (isset($_POST["action"]) && !empty($_POST["action"])) { $types = PluginUtilitairesUtilitaire::getActions($_POST["action"]); echo " "; $rand = Dropdown::showFromArray("actionId", $types); $params = array('actionId' => '__VALUE__', 'action' => $_POST["action"]); Ajax::updateItemOnSelectEvent("dropdown_actionId{$rand}", "show_Date{$rand}", $CFG_GLPI["root_doc"] . "/plugins/utilitaires/ajax/showdates.php", $params); echo "<span id='show_Date{$rand}'> </span>"; }
function showForm($ID, $options = array()) { if (!Session::haveRight("profile", "r")) { return false; } $prof = new Profile(); if ($ID) { $this->getFromDBByProfile($ID); $prof->getFromDB($ID); } $this->showFormHeader($options); echo "<tr class='tab_bg_2'>"; echo "<th colspan='2' class='center b'>" . sprintf(__('%1$s - %2$s'), __('Rights management', 'utilitaires'), $prof->fields["name"]) . "</th>"; echo "<td>" . PluginUtilitairesUtilitaire::getTypeName(2) . "</td><td>"; Profile::dropdownNoneReadWrite("utilitaires", $this->fields["utilitaires"], 1, 0, 1); echo "</td>"; echo "</tr>"; echo "<input type='hidden' name='id' value=" . $this->fields["id"] . ">"; $options['candel'] = false; $this->showFormButtons($options); }