mise à jour ansible glpi
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------
|
||||
FusionInventory
|
||||
Copyright (C) 2010-2011 by the FusionInventory Development Team.
|
||||
|
||||
http://www.fusioninventory.org/ http://forge.fusioninventory.org/
|
||||
------------------------------------------------------------------------
|
||||
|
||||
LICENSE
|
||||
|
||||
This file is part of FusionInventory project.
|
||||
|
||||
FusionInventory is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FusionInventory 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 Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
@package FusionInventory
|
||||
@author Walid Nouh
|
||||
@co-author
|
||||
@copyright Copyright (c) 2010-2011 FusionInventory team
|
||||
@license AGPL License 3.0 or (at your option) any later version
|
||||
http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
@link http://www.fusioninventory.org/
|
||||
@link http://forge.fusioninventory.org/projects/fusioninventory-for-glpi/
|
||||
@since 2010
|
||||
|
||||
------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
Session::checkCentralAccess();
|
||||
|
||||
header("Content-Type: text/json; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
|
||||
if (isset($_REQUEST['jobstate_id'])) {
|
||||
$jobstate = new PluginFusioninventoryTaskjobstate();
|
||||
$jobstate->getFromDB($_REQUEST['jobstate_id']);
|
||||
|
||||
$job = new PluginFusioninventoryTaskjob();
|
||||
$job->delete(['id' => $jobstate->fields['plugin_fusioninventory_taskjobs_id']], true);
|
||||
}
|
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display deploy type value.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
Session::checkCentralAccess();
|
||||
|
||||
$rand = filter_input(INPUT_POST, "rand");
|
||||
$mode = filter_input(INPUT_POST, "mode");
|
||||
$type = filter_input(INPUT_POST, "type");
|
||||
$classname = filter_input(INPUT_POST, "class");
|
||||
|
||||
if (empty($rand) && (empty($type))) {
|
||||
exit();
|
||||
}
|
||||
//Only process class that are related to software deployment
|
||||
if (!class_exists($classname)
|
||||
|| !in_array($classname,
|
||||
['PluginFusioninventoryDeployCheck',
|
||||
'PluginFusioninventoryDeployFile',
|
||||
'PluginFusioninventoryDeployAction',
|
||||
'PluginFusioninventoryDeployUserinteraction'
|
||||
])) {
|
||||
exit();
|
||||
}
|
||||
$class = new $classname();
|
||||
$request_data = [
|
||||
'packages_id' => filter_input(INPUT_POST, "packages_id"),
|
||||
'orders_id' => filter_input(INPUT_POST, "orders_id"),
|
||||
'value' => filter_input(INPUT_POST, "value")
|
||||
];
|
||||
$class->displayAjaxValues(null, $request_data, $rand, $mode);
|
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display packages server file
|
||||
* tree.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author Alexandre Delaunay
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
Session::checkCentralAccess();
|
||||
|
||||
PluginFusioninventoryDeployFile::showServerFileTree(
|
||||
filter_input(INPUT_POST, "rand"));
|
@@ -0,0 +1,121 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display deploy package form.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
Session::checkCentralAccess();
|
||||
|
||||
$fi_move_item = filter_input(INPUT_POST, "move_item");
|
||||
if (!empty($fi_move_item)) { //ajax request
|
||||
|
||||
$json_response = ["success" => true, "reason" => ''];
|
||||
|
||||
if (Session::haveRight('plugin_fusioninventory_package', UPDATE)) {
|
||||
$params = [
|
||||
'old_index' => filter_input(INPUT_POST, "old_index"),
|
||||
'new_index' => filter_input(INPUT_POST, "new_index"),
|
||||
'id' => filter_input(INPUT_POST, "id")
|
||||
];
|
||||
$itemtype = filter_input(INPUT_POST, "itemtype");
|
||||
if (class_exists($itemtype)) {
|
||||
$item = new $itemtype();
|
||||
$item->move_item($params);
|
||||
} else {
|
||||
Toolbox::logDebug("package subtype not found : " . $params['itemtype']);
|
||||
Html::displayErrorAndDie ("package subtype not found");
|
||||
}
|
||||
|
||||
} else {
|
||||
$json_response['success'] = false;
|
||||
$json_response['reason'] = __('Package modification is forbidden by your profile.');
|
||||
}
|
||||
|
||||
echo json_encode( $json_response );
|
||||
//exit;
|
||||
} else {
|
||||
$packages_id = filter_input(INPUT_POST, "packages_id");
|
||||
$rand = filter_input(INPUT_POST, "rand");
|
||||
$mode = filter_input(INPUT_POST, "mode");
|
||||
$fi_subtype = filter_input(INPUT_POST, "subtype");
|
||||
if (empty($packages_id) && empty($rand)
|
||||
&& empty($fi_subtype)) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!is_numeric($packages_id)) {
|
||||
Toolbox::logDebug("Error: orders_id in request is not an integer");
|
||||
Toolbox::logDebug(print_r($packages_id, true));
|
||||
exit;
|
||||
}
|
||||
|
||||
$pfDeployPackage = new PluginFusioninventoryDeployPackage();
|
||||
$pfDeployPackage->getFromDB($packages_id);
|
||||
|
||||
//TODO: In the displayForm function, $_REQUEST is somewhat too much for the '$datas' parameter
|
||||
// I think we could use only $order -- Kevin 'kiniou' Roy
|
||||
$input = [
|
||||
'index' => filter_input(INPUT_POST, "index"),
|
||||
'value' => filter_input(INPUT_POST, "value"),
|
||||
'packages_id' => filter_input(INPUT_POST, "packages_id"),
|
||||
'orders_id' => filter_input(INPUT_POST, "orders_id"),
|
||||
];
|
||||
$itemtype = filter_input(INPUT_POST, "subtype");
|
||||
switch (filter_input(INPUT_POST, "subtype")) {
|
||||
case 'package_json_debug':
|
||||
if (isset($order->fields['json'])) {
|
||||
$pfDeployPackage->displayJSONDebug();
|
||||
} else {
|
||||
echo "{}";
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$classname = 'PluginFusioninventoryDeploy'.ucfirst($itemtype);
|
||||
$class = new $classname();
|
||||
$class->displayForm($pfDeployPackage, $input, $rand, $mode);
|
||||
break;
|
||||
}
|
||||
}
|
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display deploy user logged.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author Kevin Roy
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
|
||||
$loggedin = [];
|
||||
$loggedin['result'] = 1;
|
||||
if (!isset($_SESSION["glpiname"])) {
|
||||
if (!getLoginUserID()) {
|
||||
$loggedin['result'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
echo json_encode($loggedin);
|
||||
|
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display dropdown credentials
|
||||
* for ESX.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author Walid Nouh
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdownCredentials.php")) {
|
||||
include ("../../../inc/includes.php");
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
}
|
||||
|
||||
Session::checkRight('plugin_fusioninventory_credential', READ);
|
||||
$params = [
|
||||
'itemtype' => filter_input(INPUT_POST, "itemtype"),
|
||||
'id' => filter_input(INPUT_POST, "id")
|
||||
];
|
||||
PluginFusioninventoryCredential::dropdownCredentialsForItemtype($params);
|
||||
|
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display dropdown task jobs.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdown_taskjob.php")) {
|
||||
include ("../../../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");
|
||||
}
|
||||
|
||||
Session::checkCentralAccess();
|
||||
$id = filter_input(INPUT_POST, "id");
|
||||
if (!empty($id) AND $id > 0) {
|
||||
Dropdown::show('PluginFusioninventoryTaskjob', [
|
||||
'name' => "taskjobs_id",
|
||||
'condition' => "`plugin_fusioninventory_tasks_id`='".$id."'"
|
||||
]);
|
||||
}
|
||||
|
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and displaydropdown task action
|
||||
* list.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author Walid Nouh
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdownactionlist.php")) {
|
||||
include ("../../../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");
|
||||
}
|
||||
|
||||
Session::checkCentralAccess();
|
||||
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||
$pfTaskjob->dropdownAction(
|
||||
"ActionList",
|
||||
filter_input(INPUT_POST, "ActionType"),
|
||||
filter_input(INPUT_POST, "method"),
|
||||
filter_input(INPUT_POST, "actiontypeid"));
|
||||
|
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display dropdown action
|
||||
* selection.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdownactionselection.php")) {
|
||||
include ("../../../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");
|
||||
}
|
||||
Session::checkCentralAccess();
|
||||
|
||||
echo "<script type='text/javascript'>
|
||||
var select = document.getElementById('actionlist');
|
||||
var obj = document.getElementById('".filter_input(INPUT_POST, "actionselectadd")."');
|
||||
var actiontype = document.getElementById('".filter_input(INPUT_POST, "actiontypeid")."');
|
||||
|
||||
var list = document.getElementById('actionselection').innerHTML;
|
||||
|
||||
var pattern1 = new RegExp(actiontype.options[actiontype.selectedIndex].value + '->' + obj.options[obj.selectedIndex].value + ',');
|
||||
var pattern2 = new RegExp(actiontype.options[actiontype.selectedIndex].value + '->' + obj.options[obj.selectedIndex].value + '$');
|
||||
if ((select.value.match(pattern1)) || (select.value.match(pattern2))) {
|
||||
|
||||
} else {
|
||||
document.getElementById('actionselection').innerHTML = list + '<br>' + actiontype.options[actiontype.selectedIndex].text + ' -> ' + obj.options[obj.selectedIndex].text +
|
||||
' <img src=\"".$CFG_GLPI['root_doc']."/pics/delete.png\" onclick=\'delaction(\"' + actiontype.options[actiontype.selectedIndex].text + '->' + obj.options[obj.selectedIndex].text + '->' + actiontype.options[actiontype.selectedIndex].value + '->' + obj.options[obj.selectedIndex].value + '\")\'>';
|
||||
if (actiontype.value !== '0') {
|
||||
document.getElementById('actionlist').value = document.getElementById('actionlist').value + ',' + actiontype.options[actiontype.selectedIndex].value + '->' + obj.options[obj.selectedIndex].value;
|
||||
} else {
|
||||
document.getElementById('actionlist').value = document.getElementById('actionlist').value + ',' + obj.options[obj.selectedIndex].value;
|
||||
}
|
||||
}
|
||||
|
||||
</script>";
|
||||
|
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display dropdown action types.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdownactiontype.php")) {
|
||||
include ("../../../inc/includes.php");
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
}
|
||||
|
||||
Session::checkCentralAccess();
|
||||
|
||||
$pfTaskjob = new PluginFusioninventoryTaskjob;
|
||||
$pfTaskjob->dropdownActionType(
|
||||
"ActionType",
|
||||
filter_input(INPUT_POST, "method"),
|
||||
filter_input(INPUT_POST, "value"),
|
||||
"");
|
||||
|
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display dropdown task
|
||||
* definition list.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdowndefinitionlist.php")) {
|
||||
include ("../../../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");
|
||||
}
|
||||
|
||||
Session::checkCentralAccess();
|
||||
$pfTaskjob = new PluginFusioninventoryTaskjob;
|
||||
$pfTaskjob->showDefinitions(filter_input(INPUT_POST, "taskjobs_id"));
|
||||
|
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display dropdown task
|
||||
* definition selection.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdowndefinitionselection.php")) {
|
||||
include ("../../../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");
|
||||
}
|
||||
Session::checkCentralAccess();
|
||||
|
||||
echo "<script type='text/javascript'>
|
||||
var select = document.getElementById('definitionlist');
|
||||
var obj = document.getElementById('".filter_input(INPUT_POST, "defselectadd")."');
|
||||
var deftype = document.getElementById('".filter_input(INPUT_POST, "definitiontypeid")."');
|
||||
|
||||
var list = document.getElementById('definitionselection').innerHTML;
|
||||
|
||||
var pattern1 = new RegExp(deftype.options[deftype.selectedIndex].value + '->' + obj.options[obj.selectedIndex].value + ',');
|
||||
var pattern2 = new RegExp(deftype.options[deftype.selectedIndex].value + '->' + obj.options[obj.selectedIndex].value + '$');
|
||||
if ((select.value.match(pattern1)) || (select.value.match(pattern2))) {
|
||||
|
||||
} else {
|
||||
document.getElementById('definitionselection').innerHTML = list + '<br>' + deftype.options[deftype.selectedIndex].text + ' -> ' + obj.options[obj.selectedIndex].text +
|
||||
' <img src=\"".$CFG_GLPI['root_doc']."/pics/delete.png\" onclick=\'deldef(\"' + deftype.options[deftype.selectedIndex].text + '->' + obj.options[obj.selectedIndex].text + '->' + deftype.options[deftype.selectedIndex].value + '->' + obj.options[obj.selectedIndex].value + '\")\'>';
|
||||
if (deftype.value !== '0') {
|
||||
document.getElementById('definitionlist').value = document.getElementById('definitionlist').value + ',' + deftype.options[deftype.selectedIndex].value + '->' + obj.options[obj.selectedIndex].value;
|
||||
} else {
|
||||
document.getElementById('definitionlist').value = document.getElementById('definitionlist').value + ',' + obj.options[obj.selectedIndex].value;
|
||||
}
|
||||
}
|
||||
|
||||
</script>";
|
||||
|
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display dropdown task
|
||||
* definition type.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdowndefinitiontype.php")) {
|
||||
include ("../../../inc/includes.php");
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
}
|
||||
|
||||
Session::checkCentralAccess();
|
||||
|
||||
$pfTaskjob = new PluginFusioninventoryTaskjob;
|
||||
$pfTaskjob->dropdownDefinitionType(
|
||||
"DefinitionType",
|
||||
filter_input(INPUT_POST, "method"),
|
||||
filter_input(INPUT_POST, "taskjobs_id"),
|
||||
"");
|
||||
|
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display dropdown task
|
||||
* definition type list.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdowndefinitiontypelist.php")) {
|
||||
include ("../../../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");
|
||||
}
|
||||
|
||||
Session::checkCentralAccess();
|
||||
$pfTaskjob = new PluginFusioninventoryTaskjob;
|
||||
$pfTaskjob->dropdownDefinition(
|
||||
"DefinitionList",
|
||||
filter_input(INPUT_POST, "DefinitionType"),
|
||||
filter_input(INPUT_POST, "method"),
|
||||
filter_input(INPUT_POST, "deftypeid"),
|
||||
filter_input(INPUT_POST, "taskjobs_id"));
|
||||
|
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display dropdown task job
|
||||
* definition.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
Session::checkCentralAccess();
|
||||
|
||||
// Make a select box
|
||||
$type = filter_input(INPUT_POST, "type");
|
||||
$actortype = filter_input(INPUT_POST, "actortype");
|
||||
|
||||
if (!empty($type) && !empty($actortype)) {
|
||||
$rand = mt_rand();
|
||||
|
||||
$entity_restrict = filter_input(INPUT_POST, "entity_restrict");
|
||||
switch ($type) {
|
||||
case "user" :
|
||||
$right = 'all';
|
||||
/// TODO : review depending of itil object
|
||||
// Only steal or own ticket whit empty assign
|
||||
if ($actortype == 'assign') {
|
||||
$right = "own_ticket";
|
||||
if (!$item->canAssign()) {
|
||||
$right = 'id';
|
||||
}
|
||||
}
|
||||
|
||||
$options = ['name' => '_itil_'.$actortype.'[users_id]',
|
||||
'entity' => $entity_restrict,
|
||||
'right' => $right,
|
||||
'ldap_import' => true];
|
||||
$withemail = false;
|
||||
if ($CFG_GLPI["use_mailing"]) {
|
||||
$allow_email = filter_input(INPUT_POST, "allow_email");
|
||||
$withemail = (!empty($allow_email) ? $allow_email : false);
|
||||
$paramscomment = ['value' => '__VALUE__',
|
||||
'allow_email' => $withemail,
|
||||
'field' => "_itil_".$actortype];
|
||||
// Fix rand value
|
||||
$options['rand'] = $rand;
|
||||
$options['toupdate'] = ['value_fieldname' => 'value',
|
||||
'to_update' => "notif_user_$rand",
|
||||
'url' => $CFG_GLPI["root_doc"]."/ajax/uemailUpdate.php",
|
||||
'moreparams' => $paramscomment];
|
||||
}
|
||||
$rand = User::dropdown($options);
|
||||
|
||||
if ($CFG_GLPI["use_mailing"]==1) {
|
||||
echo "<br><span id='notif_user_$rand'>";
|
||||
if ($withemail) {
|
||||
echo __('Email followup').' : ';
|
||||
$rand = Dropdown::showYesNo('_itil_'.$actortype.'[use_notification]', 1);
|
||||
echo '<br>'.__('Email').' : ';
|
||||
echo "<input type='text' size='25' name='_itil_".$actortype."[alternative_email]'>";
|
||||
}
|
||||
echo "</span>";
|
||||
}
|
||||
break;
|
||||
|
||||
case "group" :
|
||||
$cond = ($actortype=='assign' ? $cond = '`is_assign`' : $cond = '`is_requester`');
|
||||
Dropdown::show('Group', ['name' => '_itil_'.$actortype.'[groups_id]',
|
||||
'entity' => $entity_restrict,
|
||||
'condition' => $cond]);
|
||||
break;
|
||||
|
||||
case "supplier" :
|
||||
Dropdown::show('Supplier', ['name' => 'suppliers_id_assign',
|
||||
'entity' => $entity_restrict]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display dropdown task jobs.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdownlist.php")) {
|
||||
include ("../../../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");
|
||||
}
|
||||
|
||||
Session::checkCentralAccess();
|
||||
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||
$pfTaskjob->showList();
|
||||
|
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display dropdown location
|
||||
* related to deploy mirrors.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdownlocation.php")) {
|
||||
include ("../../../inc/includes.php");
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
}
|
||||
|
||||
Session::checkCentralAccess();
|
||||
|
||||
$pfDeployMirror= new PluginFusioninventoryDeployMirror();
|
||||
$id = filter_input(INPUT_POST, "id");
|
||||
if ($id != '') {
|
||||
$pfDeployMirror->getFromDB($id);
|
||||
} else {
|
||||
$pfDeployMirror->getEmpty();
|
||||
}
|
||||
|
||||
Location::dropdown(
|
||||
[
|
||||
'value' => $pfDeployMirror->fields["locations_id"],
|
||||
'entity' => $pfDeployMirror->fields["entities_id"],
|
||||
'entity_sons' => filter_input(INPUT_POST, "is_recursive"),
|
||||
]
|
||||
);
|
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display dropdown method types.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdowntype.php")) {
|
||||
include ("../../../inc/includes.php");
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
}
|
||||
|
||||
Session::checkCentralAccess();
|
||||
|
||||
$typename = filter_input(INPUT_POST, "typename");
|
||||
$method = filter_input(INPUT_POST, "method");
|
||||
$taskjobs_id = filter_input(INPUT_POST, "taskjobs_id");
|
||||
|
||||
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||
if (!empty($typename)
|
||||
&& !empty($method)
|
||||
&& !empty($taskjobs_id)) {
|
||||
$pfTaskjob->dropdownType($typename, $method,
|
||||
filter_input(INPUT_POST, "value"), $taskjobs_id, "");
|
||||
}
|
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display dropdown task type
|
||||
* list.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "dropdowntypelist.php")) {
|
||||
include ("../../../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");
|
||||
}
|
||||
|
||||
Session::checkCentralAccess();
|
||||
$myname = filter_input(INPUT_POST, "myname");
|
||||
$myamemore = filter_input(INPUT_POST, $myname);
|
||||
if ($myamemore != '') {
|
||||
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||
$pfTaskjob->dropdownvalue($myname, $myamemore,
|
||||
filter_input(INPUT_POST, "method"),
|
||||
filter_input(INPUT_POST, filter_input(INPUT_POST, "name").'typeid'),
|
||||
filter_input(INPUT_POST, "taskjobs_id"));
|
||||
}
|
||||
|
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and expand tasks.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author Alexandre Delaunay
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
Session::checkCentralAccess();
|
||||
|
||||
header("Content-Type: text/json; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
|
||||
$_SESSION['plugin_fusioninventory_tasks_expanded'][intval(filter_input(INPUT_GET, "task_id"))] = filter_input(INPUT_GET, "expanded");
|
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display logs of task job
|
||||
* states.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author Kevin Roy
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "jobstates_logs.php")) {
|
||||
include ("../../../inc/includes.php");
|
||||
Session::checkCentralAccess();
|
||||
}
|
||||
//unlock session since access checks have been done
|
||||
session_write_close();
|
||||
header("Content-Type: text/json; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
$pfJobstate = new PluginFusioninventoryTaskjobstate();
|
||||
|
||||
$params = [
|
||||
"id" => filter_input(INPUT_GET, "id"),
|
||||
"last_date" => filter_input(INPUT_GET, "last_date")
|
||||
];
|
||||
$pfJobstate->ajaxGetLogs($params);
|
112
Mission4/roles/glpi/files/fusioninventory/ajax/remote_status.php
Normal file
112
Mission4/roles/glpi/files/fusioninventory/ajax/remote_status.php
Normal file
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------
|
||||
FusionInventory
|
||||
Copyright (C) 2010-2011 by the FusionInventory Development Team.
|
||||
|
||||
http://www.fusioninventory.org/ http://forge.fusioninventory.org/
|
||||
------------------------------------------------------------------------
|
||||
|
||||
LICENSE
|
||||
|
||||
This file is part of FusionInventory project.
|
||||
|
||||
FusionInventory is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FusionInventory 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 Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
@package FusionInventory
|
||||
@author Walid Nouh
|
||||
@co-author
|
||||
@copyright Copyright (c) 2010-2011 FusionInventory team
|
||||
@license AGPL License 3.0 or (at your option) any later version
|
||||
http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
@link http://www.fusioninventory.org/
|
||||
@link http://forge.fusioninventory.org/projects/fusioninventory-for-glpi/
|
||||
@since 2010
|
||||
|
||||
------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
Session::checkCentralAccess();
|
||||
|
||||
header("Content-Type: text/json; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
|
||||
if (isset($_REQUEST['id'])) {
|
||||
$agent = new PluginFusioninventoryAgent;
|
||||
$agent->getFromDB((int) $_REQUEST['id']);
|
||||
|
||||
if (isset($_REQUEST['action'])) {
|
||||
|
||||
switch ($_REQUEST['action']) {
|
||||
case "get_status":
|
||||
$agentStatus = $agent->getStatus();
|
||||
$agentStatus['waiting'] = false;
|
||||
|
||||
switch ($agentStatus['message']) {
|
||||
|
||||
case 'executing scheduled tasks':
|
||||
case 'running':
|
||||
$agentStatus['message'] = __('Running');
|
||||
break;
|
||||
|
||||
case 'noanswer':
|
||||
$agentStatus['message'] = "<i class='fa fa-exclamation-triangle'></i>".
|
||||
__('cannot contact the agent', 'fusioninventory');
|
||||
break;
|
||||
|
||||
case 'waiting':
|
||||
$agentStatus['waiting'] = true;
|
||||
$agentStatus['message'] = sprintf(
|
||||
__('Available on %1$s', 'fusioninventory'),
|
||||
'<a target="_blank" href="'. $agentStatus['url_ok'] . '">' . $agentStatus['url_ok'] . '</a>'
|
||||
);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (strstr($agentStatus['message'], 'running')) {
|
||||
$agentStatus['message'] = $agentStatus['message'];
|
||||
} else {
|
||||
$agentStatus['message'] = "SELinux problem, do 'setsebool -P httpd_can_network_connect on'";
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
echo json_encode($agentStatus);
|
||||
break;
|
||||
|
||||
case "start_agent";
|
||||
if ($agent->wakeUp()) {
|
||||
Session::addMessageAfterRedirect(__('The agent is running', 'fusioninventory'));
|
||||
$response = [
|
||||
'status' => 'ok'
|
||||
];
|
||||
|
||||
} else {
|
||||
Session::addMessageAfterRedirect(__('Impossible to communicate with agent!', 'fusioninventory'));
|
||||
$response = [
|
||||
'status' => 'ko'
|
||||
];
|
||||
}
|
||||
|
||||
echo json_encode($response);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------
|
||||
FusionInventory
|
||||
Copyright (C) 2010-2011 by the FusionInventory Development Team.
|
||||
|
||||
http://www.fusioninventory.org/ http://forge.fusioninventory.org/
|
||||
------------------------------------------------------------------------
|
||||
|
||||
LICENSE
|
||||
|
||||
This file is part of FusionInventory project.
|
||||
|
||||
FusionInventory is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
FusionInventory 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 Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
@package FusionInventory
|
||||
@author Kevin Roy
|
||||
@co-author
|
||||
@copyright Copyright (c) 2010-2011 FusionInventory team
|
||||
@license AGPL License 3.0 or (at your option) any later version
|
||||
http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
@link http://www.fusioninventory.org/
|
||||
@link http://forge.fusioninventory.org/projects/fusioninventory-for-glpi/
|
||||
@since 2010
|
||||
|
||||
------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
Session::checkCentralAccess();
|
||||
|
||||
header("Content-Type: text/json; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
|
||||
if (isset($_REQUEST['params']) && is_array($_REQUEST['params'])) {
|
||||
foreach ($_REQUEST['params'] as $params) {
|
||||
PluginFusioninventoryTaskjob::restartJob($params);
|
||||
}
|
||||
} else {
|
||||
PluginFusioninventoryTaskjob::restartJob($_REQUEST);
|
||||
}
|
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display server file tree for
|
||||
* deploy package.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author Alexandre Delaunay
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
$AJAX_INCLUDE = 1;
|
||||
|
||||
include ("../../../inc/includes.php");
|
||||
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
|
||||
Session::checkLoginUser();
|
||||
|
||||
PluginFusioninventoryDeployFile::getServerFileTree(filter_input(INPUT_POST, "node"));
|
||||
|
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display task job log detail.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "showtaskjoblogdetail.php")) {
|
||||
include ("../../../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");
|
||||
}
|
||||
|
||||
Session::checkCentralAccess();
|
||||
|
||||
$pftaskjoblog = new PluginFusioninventoryTaskjoblog();
|
||||
echo $pftaskjoblog->showHistoryInDetail(
|
||||
filter_input(INPUT_POST, "agents_id"),
|
||||
filter_input(INPUT_POST, "uniqid"),
|
||||
"900")."</td>";
|
||||
|
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display task job form.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "taskjob_form.php")) {
|
||||
include ("../../../inc/includes.php");
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
}
|
||||
|
||||
Session::checkCentralAccess();
|
||||
|
||||
// $_GET['taskjobs_id'] => update taskjob
|
||||
// $_GET['tasks_id'] => add new taskjob
|
||||
|
||||
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||
|
||||
$params = [
|
||||
"id" => filter_input(INPUT_GET, "id"),
|
||||
"task_id" => filter_input(INPUT_GET, "task_id")
|
||||
];
|
||||
|
||||
$pfTaskjob->ajaxGetForm($params);
|
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display task job modules types.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "taskjob_itemtypes.php")) {
|
||||
include ("../../../inc/includes.php");
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
}
|
||||
|
||||
Session::checkCentralAccess();
|
||||
|
||||
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||
|
||||
$params = [
|
||||
"moduletype" => filter_input(INPUT_GET, "moduletype"),
|
||||
"method" => filter_input(INPUT_GET, "method"),
|
||||
];
|
||||
|
||||
$pfTaskjob->ajaxModuleTypesDropdown($params);
|
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display task job logs.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @author Kevin Roy
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (!isset($_SERVER['PHP_SELF'])
|
||||
|| strpos(filter_input(INPUT_SERVER, 'PHP_SELF'), "taskjob_logs.php")) {
|
||||
include ("../../../inc/includes.php");
|
||||
Session::checkCentralAccess();
|
||||
}
|
||||
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
|
||||
$pfTask = new PluginFusioninventoryTask();
|
||||
$pfTask->ajaxGetJobLogs($_GET);
|
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display task job module items.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "taskjob_moduleitems.php")) {
|
||||
include ("../../../inc/includes.php");
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
}
|
||||
|
||||
Session::checkCentralAccess();
|
||||
|
||||
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||
|
||||
$params = [
|
||||
"moduletype" => filter_input(INPUT_GET, "moduletype"),
|
||||
"itemtype" => filter_input(INPUT_GET, "itemtype"),
|
||||
"method" => filter_input(INPUT_GET, "method"),
|
||||
];
|
||||
|
||||
$pfTaskjob->ajaxModuleItemsDropdown($params);
|
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and display task job module types.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "taskjob_moduletypes.php")) {
|
||||
include ("../../../inc/includes.php");
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
}
|
||||
|
||||
Session::checkCentralAccess();
|
||||
|
||||
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||
|
||||
$params = [
|
||||
"moduletype" => filter_input(INPUT_GET, "moduletype"),
|
||||
"method" => filter_input(INPUT_GET, "method")
|
||||
];
|
||||
|
||||
$pfTaskjob->ajaxModuleTypesDropdown($params);
|
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and add task job type.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "taskjobaddtype.php")) {
|
||||
include ("../../../inc/includes.php");
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
}
|
||||
|
||||
Session::checkCentralAccess();
|
||||
|
||||
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||
$pfTaskjob->additemtodefatc(
|
||||
filter_input(INPUT_POST, "type"),
|
||||
filter_input(INPUT_POST, "itemtype"),
|
||||
filter_input(INPUT_POST, "items_id"),
|
||||
filter_input(INPUT_POST, "taskjobs_id"));
|
||||
|
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and delete task job type.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "taskjobdeletetype.php")) {
|
||||
include ("../../../inc/includes.php");
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
}
|
||||
|
||||
Session::checkCentralAccess();
|
||||
|
||||
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||
$pfTaskjob->deleteitemtodefatc(
|
||||
filter_input(INPUT_POST, "type"),
|
||||
filter_input(INPUT_POST, filter_input(INPUT_POST, "type").'item'),
|
||||
filter_input(INPUT_POST, "taskjobs_id"));
|
||||
|
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* FusionInventory
|
||||
*
|
||||
* Copyright (C) 2010-2016 by the FusionInventory Development Team.
|
||||
*
|
||||
* http://www.fusioninventory.org/
|
||||
* https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
* http://forge.fusioninventory.org/
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This file is part of FusionInventory project.
|
||||
*
|
||||
* FusionInventory is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* FusionInventory 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 Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with FusionInventory. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* This file is called by ajax function and update task method.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* @package FusionInventory
|
||||
* @author David Durieux
|
||||
* @copyright Copyright (c) 2010-2016 FusionInventory team
|
||||
* @license AGPL License 3.0 or (at your option) any later version
|
||||
* http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
* @link http://www.fusioninventory.org/
|
||||
* @link https://github.com/fusioninventory/fusioninventory-for-glpi
|
||||
*
|
||||
*/
|
||||
|
||||
if (strpos(filter_input(INPUT_SERVER, "PHP_SELF"), "taskmethodupdate.php")) {
|
||||
include ("../../../inc/includes.php");
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
Html::header_nocache();
|
||||
}
|
||||
|
||||
Session::checkCentralAccess();
|
||||
|
||||
if (filter_input(INPUT_POST, "method") != '') {
|
||||
$pfTaskjob = new PluginFusioninventoryTaskjob();
|
||||
$pfTaskjob->updateMethod(
|
||||
filter_input(INPUT_POST, "method"),
|
||||
filter_input(INPUT_POST, "taskjobs_id"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user