1<?php 2 3/* 4 ------------------------------------------------------------------------ 5 FusionInventory 6 Copyright (C) 2010-2016 by the FusionInventory Development Team. 7 8 http://www.fusioninventory.org/ http://forge.fusioninventory.org/ 9 ------------------------------------------------------------------------ 10 11 LICENSE 12 13 This file is part of FusionInventory project. 14 15 FusionInventory is free software: you can redistribute it and/or modify 16 it under the terms of the GNU Affero General Public License as published by 17 the Free Software Foundation, either version 3 of the License, or 18 (at your option) any later version. 19 20 FusionInventory is distributed in the hope that it will be useful, 21 but WITHOUT ANY WARRANTY; without even the implied warranty of 22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 GNU Affero General Public License for more details. 24 25 You should have received a copy of the GNU Affero General Public License 26 along with FusionInventory. If not, see <http://www.gnu.org/licenses/>. 27 28 ------------------------------------------------------------------------ 29 30 @package FusionInventory 31 @author Alexandre Delaunay 32 @co-author 33 @copyright Copyright (c) 2010-2016 FusionInventory team 34 @license AGPL License 3.0 or (at your option) any later version 35 http://www.gnu.org/licenses/agpl-3.0-standalone.html 36 @link http://www.fusioninventory.org/ 37 @link http://forge.fusioninventory.org/projects/fusioninventory-for-glpi/ 38 @since 2010 39 40 ------------------------------------------------------------------------ 41 */ 42 43include ("../../../inc/includes.php"); 44Session::checkLoginUser(); 45 46Html::header(__('Mirror servers'), $_SERVER["PHP_SELF"], "plugins", 47 "pluginfusioninventorymenu", "deploymirror"); 48 49//PluginFusioninventoryProfile::checkRight("Fusioninventory", "agents", "r"); 50 51PluginFusioninventoryMenu::displayMenu("mini"); 52 53$mirror = new PluginFusioninventoryDeployMirror(); 54 55if (isset ($_POST["add"])) { 56// PluginFusioninventoryProfile::checkRight("Fusinvdeloy", "package", "w"); 57 $newID = $mirror->add($_POST); 58 Html::back(); 59} else if (isset ($_POST["update"])) { 60// PluginFusioninventoryProfile::checkRight("Fusinvdeloy", "package", "w"); 61 $mirror->update($_POST); 62 Html::back(); 63} else if (isset ($_POST["delete"])) { 64// PluginFusioninventoryProfile::checkRight("Fusinvdeloy", "package", "w"); 65 $mirror->delete($_POST); 66 Html::redirect(Toolbox::getItemTypeFormURL('PluginFusioninventoryDeployMirror')); 67} 68 69$id = ""; 70if (isset($_GET["id"])) { 71 $id = $_GET["id"]; 72} 73$mirror->display(array('id' => $id)); 74//$mirror->showForm($id); 75Html::footer(); 76 77?> 78