/** * Show config menu */ function showMenu() { global $CFG_GLPI; if (!$this->canView()) { return false; } echo "<div align='center'>"; echo "<table class='tab_cadre' cellpadding='5' height='150'>"; echo "<tr>"; echo "<th colspan='5'>" . PluginShellcommandsShellcommand::getTypeName(2) . "</th>"; echo "</tr>"; echo "<tr class='tab_bg_1' style='background-color:white;'>"; // Add shell command echo "<td class='center shellcommands_menu_item'>"; echo "<a class='shellcommands_menu_a' href=\"./shellcommand.php\">"; echo "<img class='shellcommands_menu_img' src='" . $CFG_GLPI["root_doc"] . "/plugins/shellcommands/pics/shellcommand.png' alt=\"" . PluginShellcommandsShellcommand::getTypeName(2) . "\">"; echo "<br>" . PluginShellcommandsShellcommand::getTypeName(2) . "</a>"; echo "</td>"; // Command group echo "<td class='center shellcommands_menu_item'>"; echo "<a class='shellcommands_menu_a' href=\"./commandgroup.php\">"; echo "<img class='shellcommands_menu_img' src='" . $CFG_GLPI["root_doc"] . "/plugins/shellcommands/pics/commandgroup.png' alt=\"" . PluginShellcommandsCommandGroup::getTypeName(2) . "\">"; echo "<br>" . PluginShellcommandsCommandGroup::getTypeName(2) . "</a>"; echo "</td>"; // Advanced execution echo "<td class='center shellcommands_menu_item'>"; echo "<a class='shellcommands_menu_a' href=\"./advanced_execution.php\">"; echo "<img class='shellcommands_menu_img' src='" . $CFG_GLPI["root_doc"] . "/plugins/shellcommands/pics/advanced_execution.png' alt=\"" . PluginShellcommandsAdvanced_Execution::getTypeName(2) . "\">"; echo "<br>" . PluginShellcommandsAdvanced_Execution::getTypeName(2) . "</a>"; echo "</td>"; echo "</table></div>"; }
------------------------------------------------------------------------- LICENSE This file is part of Installations. Installations 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. Installations 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 Installations. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ //$AJAX_INCLUDE = 1; include '../../../inc/includes.php'; header("Content-Type: text/html; charset=UTF-8"); Html::header_nocache(); Session::checkLoginUser(); switch ($_POST['action']) { case 'add': PluginShellcommandsAdvanced_Execution::addNewValue($_POST['count']); break; } Html::ajaxFooter();
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. Shellcommands 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 shellcommands. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ define('GLPI_ROOT', '../../..'); include GLPI_ROOT . "/inc/includes.php"; Session::checkLoginUser(); $command = new PluginShellcommandsShellcommand(); $command_item = new PluginShellcommandsShellcommand_Item(); $command->checkGlobal(READ); header("Content-Type: text/html; charset=UTF-8"); switch ($_POST['command_type']) { case 'PluginShellcommandsShellcommand': PluginShellcommandsShellcommand_Item::lauchCommand($_POST); break; case 'PluginShellcommandsCommandGroup': PluginShellcommandsCommandGroup_Item::lauchCommand($_POST); break; case 'PluginShellcommandsAdvanced_Execution': PluginShellcommandsAdvanced_Execution::lauchCommand($_POST); break; }