Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 1.3.1 #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Services
GLPI ITIL Services project
GLPI Services project

The goal of this plugin is to associate servers, devices, printers, ... to a specific service based on ITIL concepts.

Expand Down
17 changes: 8 additions & 9 deletions ajax/dropdownTypeServices.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
--------------------------------------------------------------------------
*/

if (strpos($_SERVER['PHP_SELF'],"dropdownTypeServices.php")) {
include ('../../../inc/includes.php');
if (strpos($_SERVER['PHP_SELF'], "dropdownTypeServices.php")) {
include('../../../inc/includes.php');
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
}
Session::checkLoginUser();
//Session::checkCentralAccess();
//Session::checkLoginUser();
Session::checkCentralAccess();

// Make a select box
if (isset($_POST["servicetype"])) {
Expand All @@ -43,21 +43,20 @@
if (isset($_POST['used']) && is_array($_POST['used']) && (count($_POST['used']) > 0)) {
$query = "SELECT `id`
FROM `glpi_plugin_services_services`
WHERE `id` IN (".implode(',',$_POST['used']).")
AND `plugin_services_servicetypes_id` = '".$_POST["servicetype"]."'";
WHERE `id` IN (" . implode(',', $_POST['used']) . ")
AND `plugin_services_servicetypes_id` = '" . $_POST["servicetype"] . "'";

foreach ($DB->request($query) AS $data) {
$used[$data['id']] = $data['id'];
}
}

Dropdown::show('PluginServicesService',
array('name' => $_POST['myname'],
['name' => $_POST['myname'],
'used' => $used,
'width' => '50%',
'entity' => $_POST['entity'],
'rand' => $_POST['rand'],
'condition' => "glpi_plugin_services_services.plugin_services_servicetypes_id='".$_POST["servicetype"]."'"));
'condition' => ["glpi_plugin_services_services.plugin_services_servicetypes_id"=>$_POST["servicetype"]]]);

}
?>
11 changes: 10 additions & 1 deletion front/service.form.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@

if (isset($_POST["add"])) {
$web->check(-1,CREATE,$_POST);
if (isset($_POST['plugin_services_services_id']) && $_POST['plugin_services_services_id'] != '0') {
// copy parent's value to child
$web->getFromDB($_POST['plugin_services_services_id']);
foreach ($web->fields as $key => $value) {
if ($key != 'id' && !isset($_POST[$key])) {
$_POST[$key] = $value;
}
}
}
$newID= $web->add($_POST);
if ($_SESSION['glpibackcreated']) {
Html::redirect($web->getFormURL()."?id=".$newID);
Expand Down Expand Up @@ -109,4 +118,4 @@
Html::footer();
}

?>
?>
29 changes: 13 additions & 16 deletions front/service.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,39 @@
/*
* @version $Id: HEADER 15930 2011-10-30 15:47:55Z tsmr $
-------------------------------------------------------------------------
Services plugin for GLPI
Copyright (C) 2003-2011 by the Services Development Team.
webapplications plugin for GLPI
Copyright (C) 2009-2016 by the services Development Team.

https://forge.indepnet.net/projects/services
https://github.com/InfotelGLPI/services
-------------------------------------------------------------------------

LICENSE

This file is part of Services.

Services is free software; you can redistribute it and/or modify
This file is part of services.

services is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Services is distributed in the hope that it will be useful,
services is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Services. If not, see <http://www.gnu.org/licenses/>.
along with services. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/

include ('../../../inc/includes.php');
include('../../../inc/includes.php');

//check environment meta-plugin installation for change header
$plugin = new Plugin();
if ($plugin->isActivated("environment")) {
Html::header(PluginServicesService::getTypeName(2)
,'',"plugins","pluginenvironmentdisplay","services");
}else {
Html::header(PluginServicesService::getTypeName(2), '', "plugins","pluginservicesmenu");
Html::header(PluginServicesService::getTypeName(2), '', "assets", "pluginenvironmentdisplay", "services");
} else {
Html::header(PluginServicesService::getTypeName(2), '', "plugins", "pluginservicesmenu");
}

$web = new PluginServicesService();
Expand All @@ -45,9 +44,7 @@
Search::show("PluginServicesService");

} else {

Html::displayRightError();
}
Html::footer();

?>
35 changes: 35 additions & 0 deletions front/servicedrsolutiontype.form.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
/*
* @version $Id: HEADER 15930 2011-10-30 15:47:55Z tsmr $
-------------------------------------------------------------------------
Services plugin for GLPI
Copyright (C) 2003-2011 by the Services Development Team.

https://forge.indepnet.net/projects/services
-------------------------------------------------------------------------

LICENSE

This file is part of Services.

Services is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Services is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Services. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/

include ('../../../inc/includes.php');

$dropdown = new PluginServicesServiceDrSolutionType();
include (GLPI_ROOT . "/front/dropdown.common.form.php");

?>
35 changes: 35 additions & 0 deletions front/servicedrsolutiontype.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
/*
* @version $Id: HEADER 15930 2011-10-30 15:47:55Z tsmr $
-------------------------------------------------------------------------
Services plugin for GLPI
Copyright (C) 2003-2011 by the Services Development Team.

https://forge.indepnet.net/projects/services
-------------------------------------------------------------------------

LICENSE

This file is part of Services.

Services is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Services is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Services. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/

include ('../../../inc/includes.php');

$dropdown = new PluginServicesServiceDrSolutionType();
include (GLPI_ROOT . "/front/dropdown.common.php");

?>
35 changes: 35 additions & 0 deletions front/servicedrtesttype.form.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
/*
* @version $Id: HEADER 15930 2011-10-30 15:47:55Z tsmr $
-------------------------------------------------------------------------
Services plugin for GLPI
Copyright (C) 2003-2011 by the Services Development Team.

https://forge.indepnet.net/projects/services
-------------------------------------------------------------------------

LICENSE

This file is part of Services.

Services is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Services is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Services. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/

include ('../../../inc/includes.php');

$dropdown = new PluginServicesServiceDrTestType();
include (GLPI_ROOT . "/front/dropdown.common.form.php");

?>
35 changes: 35 additions & 0 deletions front/servicedrtesttype.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
/*
* @version $Id: HEADER 15930 2011-10-30 15:47:55Z tsmr $
-------------------------------------------------------------------------
Services plugin for GLPI
Copyright (C) 2003-2011 by the Services Development Team.

https://forge.indepnet.net/projects/services
-------------------------------------------------------------------------

LICENSE

This file is part of Services.

Services is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Services is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Services. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/

include ('../../../inc/includes.php');

$dropdown = new PluginServicesServiceDrTestType();
include (GLPI_ROOT . "/front/dropdown.common.php");

?>
35 changes: 35 additions & 0 deletions front/serviceitowner.form.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
/*
* @version $Id: HEADER 15930 2011-10-30 15:47:55Z tsmr $
-------------------------------------------------------------------------
Services plugin for GLPI
Copyright (C) 2003-2011 by the Services Development Team.

https://forge.indepnet.net/projects/services
-------------------------------------------------------------------------

LICENSE

This file is part of Services.

Services is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Services is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Services. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/

include ('../../../inc/includes.php');

$dropdown = new PluginServicesServiceItowner();
include (GLPI_ROOT . "/front/dropdown.common.form.php");

?>
35 changes: 35 additions & 0 deletions front/serviceitowner.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
/*
* @version $Id: HEADER 15930 2011-10-30 15:47:55Z tsmr $
-------------------------------------------------------------------------
Services plugin for GLPI
Copyright (C) 2003-2011 by the Services Development Team.

https://forge.indepnet.net/projects/services
-------------------------------------------------------------------------

LICENSE

This file is part of Services.

Services is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Services is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Services. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/

include ('../../../inc/includes.php');

$dropdown = new PluginServicesServiceItowner();
include (GLPI_ROOT . "/front/dropdown.common.php");

?>
Loading