function plugin_reports_rulelist($rulecollection, $title)
{
    Session::checkRight($rulecollection::$rightname, READ);
    $rulecollection->getCollectionDatas(true, true);
    echo "<div class='center'>";
    echo "<table class='tab_cadre' cellpadding='5'>\n";
    echo "<tr><th colspan='6'><a href='" . $_SERVER["PHP_SELF"] . "'>" . __('rules_report_title', 'reports') . "</a> - " . $title . "</th></tr>";
    echo "<tr><th>" . __('Name') . "</th>";
    echo "<th>" . __('Description') . "</th>";
    echo "<th colspan='2'>" . _n('Criterion', 'Criteria', 2) . "</th>";
    echo "<th>" . _n('Action', 'Actions', 2) . "</th>";
    echo "<th>" . __('Active') . "</th></tr>\n";
    foreach ($rulecollection->RuleList->list as $rule) {
        echo "<tr class='tab_bg_1'>";
        echo "<td>" . $rule->fields["name"] . "</td>";
        echo "<td>" . $rule->fields["description"] . "</td>";
        if ($rule->fields["match"] == Rule::AND_MATCHING) {
            echo "<td>" . __('and') . "</td>";
        } else {
            echo "<td>" . __('or') . "</td>";
        }
        echo "<td>";
        foreach ($rule->criterias as $criteria) {
            echo $rule->getCriteriaName($criteria->fields["criteria"]) . " " . RuleCriteria::getConditionByID($criteria->fields["condition"], get_class($rule)) . " " . $rule->getCriteriaDisplayPattern($criteria->fields["criteria"], $criteria->fields["condition"], $criteria->fields["pattern"]) . "<br>";
        }
        echo "</td>";
        echo "<td>";
        foreach ($rule->actions as $action) {
            echo $rule->getActionName($action->fields["field"]) . " " . RuleAction::getActionByID($action->fields["action_type"]) . " " . stripslashes($rule->getActionValue($action->fields["field"], $action->fields["action_type"], $action->fields["value"])) . "<br>";
        }
        echo "</td>";
        if ($rule->fields["is_active"]) {
            echo "<td>" . __('Yes') . "</td>";
        } else {
            echo "<td>" . __('No') . "</td>";
        }
        echo "</tr>\n";
    }
    echo "</table></div>\n";
}
Exemplo n.º 2
0
GLPI 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 GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
include '../inc/includes.php';
Session::checkCentralAccess();
Session::checkRight("reservation_central", "w");
if (!isset($_GET["id"])) {
    $_GET["id"] = '';
}
$ri = new ReservationItem();
if (isset($_POST["add"])) {
    $ri->check(-1, 'w', $_POST);
    if ($newID = $ri->add($_POST)) {
        Event::log($newID, "reservationitem", 4, "inventory", sprintf(__('%1$s adds the item %2$s (%3$d)'), $_SESSION["glpiname"], $_POST["itemtype"], $_POST["items_id"]));
    }
    Html::back();
} else {
    if (isset($_POST["delete"])) {
        $ri->check($_POST["id"], 'd');
        $ri->delete($_POST);
        Event::log($_POST['id'], "reservationitem", 4, "inventory", sprintf(__('%s deletes an item'), $_SESSION["glpiname"]));
Exemplo n.º 3
0
(at your option) any later version.

GLPI 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 GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
include '../inc/includes.php';
Session::checkRight("config", "w");
$config = new Config();
$config_ldap = new AuthLDAP();
if (!isset($_GET['id'])) {
    $_GET['id'] = "";
}
//LDAP Server add/update/delete
if (isset($_POST["update"])) {
    $config_ldap->update($_POST);
    Html::back();
} else {
    if (isset($_POST["add"])) {
        //If no name has been given to this configuration, then go back to the page without adding
        if ($_POST["name"] != "") {
            if ($newID = $config_ldap->add($_POST)) {
                if (AuthLdap::testLDAPConnection($newID)) {
Exemplo n.º 4
0
                        $tmp['id'] = $key;
                        $order_item->update($tmp);
                        // Update infocom
                        $ic = new Infocom();
                        $ic->getFromDBforDevice($order_item->fields['itemtype'], $order_item->fields['items_id']);
                        $config = PluginOrderConfig::getConfig();
                        if ($config->canAddBillDetails()) {
                            if ($bill->getFromDB($_POST["plugin_order_bills_id"])) {
                                $fields['id'] = $ic->fields['id'];
                                $fields['bill'] = $bill->fields['number'];
                                $fields['warranty_date'] = $bill->fields['billdate'];
                            }
                        }
                        $ic->update($fields);
                    }
                }
            }
            break;
    }
    PluginOrderOrder::updateBillState($order_item->fields['plugin_order_orders_id']);
    Html::back();
}
$dropdown = new PluginOrderBill();
Session::checkRight("plugin_order_bill", READ);
Html::header(PluginOrderBill::getTypeName(1), $_SERVER['PHP_SELF'], "management", "PluginOrderMenu", "bill");
if (isset($_REQUEST['id'])) {
    $bill->display($_REQUEST);
} else {
    $bill->show();
}
Html::footer();
Exemplo n.º 5
0
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     switch ($item->getType()) {
         case 'Preference':
             self::showForUser(Session::getLoginUserID());
             return true;
         case __CLASS__:
             switch ($tabnum) {
                 case 1:
                     $item->showFormGlobal($_GET['_target'], $_GET["displaytype"]);
                     return true;
                 case 2:
                     Session::checkRight(self::$rightname, self::PERSONAL);
                     $item->showFormPerso($_GET['_target'], $_GET["displaytype"]);
                     return true;
             }
     }
     return false;
 }
Exemplo n.º 6
0
Copyright (C) 2003-2013 by the INDEPNET Development Team.

http://indepnet.net/   http://glpi-project.org
-------------------------------------------------------------------------

LICENSE

This file is part of GLPI.

GLPI 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.

GLPI 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 GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
include '../inc/includes.php';
Session::checkRight("profile", "r");
Html::header(Profile::getTypeName(2), $_SERVER['PHP_SELF'], "admin", "profile");
Search::show('Profile');
Html::footer();
Exemplo n.º 7
0
This file is part of Webservices plugin for GLPI.

Webservices 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.

Webservices 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 Webservices. If not, see <http://www.gnu.org/licenses/>.

@package   Webservices
@author    Nelly Mahu-Lasson
@copyright Copyright (c) 2009-2015 Webservices plugin team
@license   AGPL License 3.0 or (at your option) any later version
           http://www.gnu.org/licenses/agpl-3.0-standalone.html
@link      https://forge.glpi-project.org/projects/webservices
@link      http://www.glpi-project.org/
@since     2009
--------------------------------------------------------------------------
*/
include "../../../inc/includes.php";
Plugin::load('webservices');
Session::checkRight("config", UPDATE);
Html::header(__('Web Services', 'webservices'), $_SERVER['PHP_SELF'], "config", "pluginWebservicesClient");
Search::show('PluginWebservicesClient');
Html::footer();
Exemplo n.º 8
0
This file is part of GLPI.

GLPI 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.

GLPI 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 GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
$AJAX_INCLUDE = 1;
include '../inc/includes.php';
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
Session::checkRight('ticket', UPDATE);
if ($_POST["actortype"] > 0) {
    $ticket = new Ticket();
    $rand = mt_rand();
    $ticket->showActorAddForm($_POST["actortype"], $rand, $_SESSION['glpiactive_entity'], array(), true, false, false);
    echo "&nbsp;<input type='submit' name='add_actor' class='submit' value=\"" . _sx('button', 'Add') . "\">";
}
                                             if (isset($_POST['login']) && !empty($_POST['login'])) {
                                                 AuthLdap::importUserFromServers(array('name' => $_POST['login']));
                                             }
                                             Html::back();
                                         } else {
                                             if (isset($_POST['add_ext_auth_simple'])) {
                                                 if (isset($_POST['login']) && !empty($_POST['login'])) {
                                                     Session::checkRight("user", User::IMPORTEXTAUTHUSERS);
                                                     $input = array('name' => $_POST['login'], '_extauth' => 1, 'add' => 1);
                                                     $user->check(-1, CREATE, $input);
                                                     $newID = $user->add($input);
                                                     Event::log($newID, "users", 4, "setup", sprintf(__('%1$s adds the item %2$s'), $_SESSION["glpiname"], $_POST["login"]));
                                                 }
                                                 Html::back();
                                             } else {
                                                 Session::checkRight("user", READ);
                                                 Html::header(User::getTypeName(Session::getPluralNumber()), '', "admin", "user");
                                                 $user->display(array('id' => $_GET["id"]));
                                                 Html::footer();
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
Exemplo n.º 10
0
(at your option) any later version.

GLPI 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 GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
include '../inc/includes.php';
Session::checkRight("networking", READ);
if (!isset($_GET["id"])) {
    $_GET["id"] = "";
}
if (!isset($_GET["withtemplate"])) {
    $_GET["withtemplate"] = "";
}
$netdevice = new NetworkEquipment();
if (isset($_POST["add"])) {
    $netdevice->check(-1, CREATE, $_POST);
    if ($newID = $netdevice->add($_POST)) {
        Event::log($newID, "networkequipment", 4, "inventory", sprintf(__('%1$s adds the item %2$s'), $_SESSION["glpiname"], $_POST["name"]));
        if ($_SESSION['glpibackcreated']) {
            Html::redirect($netdevice->getFormURL() . "?id=" . $newID);
        }
    }
Exemplo n.º 11
0
<?php

include "../../../inc/includes.php";
Session::checkRight("entity", UPDATE);
// Check if plugin is activated...
$plugin = new Plugin();
if ($plugin->isActivated("formcreator")) {
    $target = new PluginFormcreatorTarget();
    // Add a new target
    if (isset($_POST["add"]) && !empty($_POST['plugin_formcreator_forms_id'])) {
        Session::checkRight("entity", UPDATE);
        $target->add($_POST);
        Html::back();
        // Delete a target
    } elseif (isset($_POST["delete_target"])) {
        Session::checkRight("entity", UPDATE);
        $target->delete($_POST);
        Html::redirect($CFG_GLPI["root_doc"] . '/plugins/formcreator/front/form.form.php?id=' . $_POST['plugin_formcreator_forms_id']);
    } else {
        Html::back();
    }
    // Or display a "Not found" error
} else {
    Html::displayNotFoundError();
}
  ------------------------------------------------------------------------

  @package   Plugin Monitoring for GLPI
  @author    David Durieux
  @co-author
  @comment
  @copyright Copyright (c) 2011-2014 Plugin Monitoring for GLPI team
  @license   AGPL License 3.0 or (at your option) any later version
             http://www.gnu.org/licenses/agpl-3.0-standalone.html
  @link      https://forge.indepnet.net/projects/monitoring/
  @since     2013

  ------------------------------------------------------------------------
*/
include "../../../inc/includes.php";
Session::checkRight("plugin_monitoring_eventhandler", READ);
Html::header(__('Monitoring', 'monitoring'), $_SERVER["PHP_SELF"], "plugins", "PluginMonitoringDashboard", "eventhandler");
$pMonitoringEventhandler = new PluginMonitoringEventhandler();
if (isset($_POST["add"])) {
    $pMonitoringEventhandler->add($_POST);
    Html::back();
} else {
    if (isset($_POST["update"])) {
        $pMonitoringEventhandler->update($_POST);
        Html::back();
    } else {
        if (isset($_POST["purge"])) {
            $pMonitoringEventhandler->delete($_POST);
            $pMonitoringEventhandler->redirectToList();
        }
    }
Exemplo n.º 13
0
 You should have received a copy of the GNU General Public License
 along with Genericobject. If not, see <http://www.gnu.org/licenses/>.
 --------------------------------------------------------------------------
 @package   genericobject
 @author    the genericobject plugin team
 @copyright Copyright (c) 2010-2011 Order plugin team
 @license   GPLv2+
            http://www.gnu.org/licenses/gpl.txt
 @link      https://forge.indepnet.net/projects/genericobject
 @link      http://www.glpi-project.org/
 @since     2009
 ---------------------------------------------------------------------- */
 
include ("../../../inc/includes.php");

if (isset($_GET['itemtype'])) {
   $itemtype = $_GET['itemtype'];
   $types = PluginGenericobjectType::getTypes();
//   $type = new PluginGenericobjectType();
//   $type->getFromDBByType($_GET['itemtype']);
//   Html::redirect(Toolbox::getItemTypeFormURL('PluginGenericobjectType').'?id='.$type->getID());

   Session::checkRight(PluginGenericobjectProfile::getProfileNameForItemtype($itemtype), READ);
   Html::header(__("Type of objects", "genericobject"), $_SERVER['PHP_SELF'], "assets",
                $_GET['itemtype']);
   Search::Show($_GET['itemtype']);

}

Html::footer();
-------------------------------------------------------------------------

LICENSE

This file is part of GLPI.

GLPI 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.

GLPI 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 GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
if (strpos($_SERVER['PHP_SELF'], "dropdownNotificationTemplate.php")) {
    include '../inc/includes.php';
    header("Content-Type: text/html; charset=UTF-8");
    Html::header_nocache();
}
Session::checkRight("notification", UPDATE);
NotificationTemplate::dropdownTemplates('notificationtemplates_id', $_POST['itemtype']);
 function showForm(Printer $item, $options = array())
 {
     global $DB;
     Session::checkRight('plugin_fusioninventory_printer', READ);
     $id = $item->getID();
     if (!($data = $this->find("`printers_id`='" . $id . "'", '', 1))) {
         // Add in database if not exist
         $input = array();
         $input['printers_id'] = $id;
         $_SESSION['glpi_plugins_fusinvsnmp_table'] = 'glpi_printers';
         $ID_tn = $this->add($input);
         $this->getFromDB($ID_tn);
     } else {
         foreach ($data as $datas) {
             $this->fields = $datas;
         }
     }
     // Form printer informations
     echo "<div align='center'>";
     echo "<form method='post' name='snmp_form' id='snmp_form'\n                 action=\"" . $options['target'] . "\">";
     echo "<table class='tab_cadre' cellpadding='5' width='950'>";
     echo "<tr class='tab_bg_1'>";
     echo "<th colspan='4'>";
     echo __('SNMP information', 'fusioninventory');
     echo "</th>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td align='center'>";
     echo __('Sysdescr', 'fusioninventory');
     echo "</td>";
     echo "<td>";
     echo "<textarea name='sysdescr' cols='45' rows='5'>";
     echo $this->fields['sysdescr'];
     echo "</textarea>";
     echo "</td>";
     echo "<td align='center'>";
     echo __('Last inventory', 'fusioninventory') . "&nbsp;:";
     echo "</td>";
     echo "<td>";
     echo Html::convDateTime($this->fields['last_fusioninventory_update']);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td align='center'></td>";
     echo "<td align='center'>";
     echo "</td>";
     echo "<td align='center'>" . __('SNMP authentication', 'fusioninventory') . "&nbsp;:</td>";
     echo "<td align='center'>";
     PluginFusioninventoryConfigSecurity::auth_dropdown($this->fields["plugin_fusioninventory_configsecurities_id"]);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_2 center'>";
     echo "<td colspan='4'>";
     echo "<div align='center'>";
     echo "<input type='hidden' name='id' value='" . $id . "'>";
     echo "<input type='submit' name='update' value=\"" . __('Update') . "\" class='submit' >";
     echo "</td>";
     echo "</tr>";
     echo "</table>";
     Html::closeForm();
     echo "</div>";
 }
Exemplo n.º 16
0
Copyright (C) 2003-2013 by the INDEPNET Development Team.

http://indepnet.net/   http://glpi-project.org
-------------------------------------------------------------------------

LICENSE

This file is part of GLPI.

GLPI 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.

GLPI 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 GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
include '../inc/includes.php';
Session::checkRight("budget", "r");
Html::header(Budget::getTypeName(1), $_SERVER['PHP_SELF'], "financial", "budget");
Search::show('Budget');
Html::footer();
Exemplo n.º 17
0
  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.

  Plugin Monitoring for GLPI 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 Monitoring. If not, see <http://www.gnu.org/licenses/>.

  ------------------------------------------------------------------------

  @package   Plugin Monitoring for GLPI
  @author    David Durieux
  @co-author
  @comment
  @copyright Copyright (c) 2011-2014 Plugin Monitoring for GLPI team
  @license   AGPL License 3.0 or (at your option) any later version
             http://www.gnu.org/licenses/agpl-3.0-standalone.html
  @link      https://forge.indepnet.net/projects/monitoring/
  @since     2013

  ------------------------------------------------------------------------
*/
include "../../../inc/includes.php";
Session::checkRight("plugin_monitoring_tag", READ);
Html::header(__('Monitoring', 'monitoring'), $_SERVER["PHP_SELF"], "plugins", "PluginMonitoringDashboard", "tag");
Search::show('PluginMonitoringTag');
Html::footer();
  GNU Affero General Public License for more details.

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

  ------------------------------------------------------------------------

  @package   Plugin Monitoring for GLPI
  @author    David Durieux
  @co-author
  @comment
  @copyright Copyright (c) 2011-2014 Plugin Monitoring for GLPI team
  @license   AGPL License 3.0 or (at your option) any later version
             http://www.gnu.org/licenses/agpl-3.0-standalone.html
  @link      https://forge.indepnet.net/projects/monitoring/
  @since     2013

  ------------------------------------------------------------------------
*/
include "../../../inc/includes.php";
Session::checkRight("plugin_monitoring_unavailability", READ);
Html::header(__('Monitoring - unavailabilities', 'monitoring'), $_SERVER["PHP_SELF"], "plugins", "monitoring", "unavailability");
if (isset($_GET['id'])) {
    $pmUnavailability = new PluginMonitoringUnavailability();
    $pmUnavailability->getFromDB($_GET['id']);
    $input = array();
    $input['id'] = $_GET['id'];
    $input['scheduled'] = $_GET['scheduled'];
    $pmUnavailability->update($input);
}
Html::redirect($_SERVER['HTTP_REFERER']);
Exemplo n.º 19
0
based on GLPI - Gestionnaire Libre de Parc Informatique
Copyright (C) 2003-2014 by the INDEPNET Development Team.

-------------------------------------------------------------------------

LICENSE

This file is part of GLPI.

GLPI 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.

GLPI 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 GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
include '../inc/includes.php';
Session::checkRight("contact_enterprise", READ);
Html::header(Contact::getTypeName(Session::getPluralNumber()), $_SERVER['PHP_SELF'], "management", "contact");
Search::show('Contact');
Html::footer();
  ------------------------------------------------------------------------

  @package   Plugin Monitoring for GLPI
  @author    David Durieux
  @co-author
  @comment
  @copyright Copyright (c) 2011-2014 Plugin Monitoring for GLPI team
  @license   AGPL License 3.0 or (at your option) any later version
             http://www.gnu.org/licenses/agpl-3.0-standalone.html
  @link      https://forge.indepnet.net/projects/monitoring/
  @since     2013

  ------------------------------------------------------------------------
*/
include "../../../inc/includes.php";
Session::checkRight("plugin_monitoring_acknowledge", READ);
Html::header(__('Monitoring - acknowledges', 'monitoring'), '', "plugins", "PluginMonitoringDashboard", "acknowledge");
$pmAcknowledge = new PluginMonitoringAcknowledge();
if (isset($_POST["add"])) {
    $pmAcknowledge->add($_POST);
    $pmAcknowledge->redirectToList();
} else {
    if (isset($_POST["update"])) {
        $pmAcknowledge->update($_POST);
        $pmAcknowledge->redirectToList();
    } else {
        if (isset($_POST["purge"])) {
            $pmAcknowledge->delete($_POST);
            $pmAcknowledge->redirectToList();
        }
    }
Exemplo n.º 21
0
ocsinventoryng 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.

ocsinventoryng 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 ocsinventoryng. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
include '../../../inc/includes.php';
Session::checkRight("plugin_ocsinventoryng", UPDATE);
Html::header('OCS Inventory NG', '', "tools", "pluginocsinventoryngmenu", "sync");
$display_list = true;
if (isset($_SESSION["ocs_update"]['computers'])) {
    if ($count = count($_SESSION["ocs_update"]['computers'])) {
        $percent = min(100, round(100 * ($_SESSION["ocs_update_count"] - $count) / $_SESSION["ocs_update_count"], 0));
        $key = array_pop($_SESSION["ocs_update"]['computers']);
        $cfg_ocs = PluginOcsinventoryngOcsServer::getConfig($_SESSION["plugin_ocsinventoryng_ocsservers_id"]);
        $dohistory = isset($cfg_ocs['dohistory']) ? $cfg_ocs['dohistory'] : false;
        $action = PluginOcsinventoryngOcsServer::updateComputer($key, $_SESSION["plugin_ocsinventoryng_ocsservers_id"], $dohistory);
        PluginOcsinventoryngOcsServer::manageImportStatistics($_SESSION["ocs_update"]['statistics'], $action['status']);
        PluginOcsinventoryngOcsServer::showStatistics($_SESSION["ocs_update"]['statistics']);
        Html::displayProgressBar(400, $percent);
        Html::redirect($_SERVER['PHP_SELF']);
    } else {
        if (isset($_SESSION["ocs_update"]['statistics'])) {
  @package   FusionInventory
  @author    David Durieux
  @co-author
  @copyright Copyright (c) 2010-2015 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";
Html::header(__('FusionInventory', 'fusioninventory'), $_SERVER["PHP_SELF"], "plugins", "fusioninventory", "agentmodules");
Session::checkRight('plugin_fusioninventory_agent', READ);
$agentmodule = new PluginFusioninventoryAgentmodule();
if (isset($_POST["agent_add"])) {
    $agentmodule->getFromDB($_POST['id']);
    $a_agentList = importArrayFromDB($agentmodule->fields['exceptions']);
    $a_agentList[] = $_POST['agent_to_add'][0];
    $input = array();
    $input['exceptions'] = exportArrayToDB($a_agentList);
    $input['id'] = $_POST['id'];
    $agentmodule->update($input);
    Html::back();
} else {
    if (isset($_POST["agent_delete"])) {
        $agentmodule->getFromDB($_POST['id']);
        $a_agentList = importArrayFromDB($agentmodule->fields['exceptions']);
        foreach ($a_agentList as $key => $value) {
  ------------------------------------------------------------------------

  @package   Plugin Monitoring for GLPI
  @author    David Durieux
  @co-author
  @comment
  @copyright Copyright (c) 2011-2014 Plugin Monitoring for GLPI team
  @license   AGPL License 3.0 or (at your option) any later version
             http://www.gnu.org/licenses/agpl-3.0-standalone.html
  @link      https://forge.indepnet.net/projects/monitoring/
  @since     2011

  ------------------------------------------------------------------------
*/
include "../../../inc/includes.php";
Session::checkRight("plugin_monitoring_displayview", READ);
Html::header(__('Monitoring', 'monitoring'), $_SERVER["PHP_SELF"], "plugins", "PluginMonitoringDashboard", "displayview");
$pmDisplayview = new PluginMonitoringDisplayview();
if (isset($_POST["addvisibility"])) {
    if (isset($_POST["_type"]) && !empty($_POST["_type"]) && isset($_POST["pluginmonitoringdisplayviews_id"]) && $_POST["pluginmonitoringdisplayviews_id"]) {
        $item = NULL;
        switch ($_POST["_type"]) {
            case 'User':
                if (isset($_POST['users_id']) && $_POST['users_id']) {
                    $item = new PluginMonitoringDisplayview_User();
                }
                break;
            case 'Group':
                if (isset($_POST['groups_id']) && $_POST['groups_id']) {
                    $item = new PluginMonitoringDisplayview_Group();
                }
Exemplo n.º 24
0
based on GLPI - Gestionnaire Libre de Parc Informatique
Copyright (C) 2003-2014 by the INDEPNET Development Team.

-------------------------------------------------------------------------

LICENSE

This file is part of GLPI.

GLPI 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.

GLPI 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 GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
include '../inc/includes.php';
Session::checkRight("document", READ);
Html::header(Document::getTypeName(Session::getPluralNumber()), $_SERVER['PHP_SELF'], "management", "document");
Search::show('Document');
Html::footer();
<?php

define('GLPI_ROOT', '../../../..');
include GLPI_ROOT . "/inc/includes.php";
include GLPI_ROOT . "/config/config.php";
include "../inc/functions.php";
global $DB;
Session::checkLoginUser();
Session::checkRight("profile", READ);
if (!empty($_POST['submit'])) {
    $data_ini = $_POST['date1'];
    $data_fin = $_POST['date2'];
} else {
    $data_ini = date("Y-m-d");
    $data_fin = date("Y-m-d");
}
if (!isset($_POST["sel_date"])) {
    $id_date = $_GET["date"];
} else {
    $id_date = $_POST["sel_date"];
}
# entity
$sql_e = "SELECT value FROM glpi_plugin_dashboard_config WHERE name = 'entity' AND users_id = " . $_SESSION['glpiID'] . "";
$result_e = $DB->query($sql_e);
$sel_ent = $DB->result($result_e, 0, 'value');
if ($sel_ent == '' || $sel_ent == -1) {
    $sel_ent = 0;
    $entidade = "";
    $entidade_d = "";
    $entidade_dw = "";
} else {
Exemplo n.º 26
0
This file is part of GLPI.

GLPI 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.

GLPI 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 GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
include '../inc/includes.php';
Session::checkRight('tickettemplate', UPDATE);
$item = new TicketTemplateMandatoryField();
if (isset($_POST["add"])) {
    $item->check(-1, UPDATE, $_POST);
    if ($item->add($_POST)) {
        Event::log($_POST["tickettemplates_id"], "tickettemplate", 4, "maintain", sprintf(__('%s adds mandatory field'), $_SESSION["glpiname"]));
    }
    Html::back();
}
Html::displayErrorAndDie("lost");
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
include '../inc/includes.php';
$group = new Group();
if (!Session::haveRightsOr('group', array(CREATE, UPDATE))) {
    Session::redirectIfNotLoggedIn();
    Html::displayRightError();
}
Session::checkRight('user', User::UPDATEAUTHENT);
Html::header(__('LDAP directory link'), $_SERVER['PHP_SELF'], "admin", "group", "ldap");
if (isset($_GET['next'])) {
    AuthLdap::ldapChooseDirectory($_SERVER['PHP_SELF']);
} else {
    if (isset($_POST["change_ldap_filter"])) {
        if (isset($_POST["ldap_filter"])) {
            $_SESSION["ldap_group_filter"] = $_POST["ldap_filter"];
        }
        if (isset($_POST["ldap_filter2"])) {
            $_SESSION["ldap_group_filter2"] = $_POST["ldap_filter2"];
        }
        Html::redirect($_SERVER['PHP_SELF']);
    } else {
        if (!isset($_GET['start'])) {
            $_GET['start'] = 0;
Exemplo n.º 28
0
GLPI 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.

GLPI 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 GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief show network port by network equipment
*/
include '../inc/includes.php';
Session::checkRight("reports", READ);
// Titre
if (isset($_POST["switch"]) && $_POST["switch"]) {
    Html::header(Report::getTypeName(Session::getPluralNumber()), $_SERVER['PHP_SELF'], "tools", "report");
    Report::title();
    $name = Dropdown::getDropdownName("glpi_networkequipments", $_POST["switch"]);
    echo "<div class='center spaced'><h2>" . sprintf(__('Network report by hardware: %s'), $name) . "</h2></div>";
    Report::reportForNetworkInformations("`glpi_networkequipments` AS ITEM", "PORT_1.`itemtype` = 'NetworkEquipment'\n                                              AND PORT_1.`items_id` = ITEM.`id`", "ITEM.`id` = '" . $_POST["switch"] . "'");
    Html::footer();
} else {
    Html::redirect($CFG_GLPI['root_doc'] . "/front/report.networking.php");
}
Exemplo n.º 29
0
-------------------------------------------------------------------------

LICENSE

This file is part of GLPI.

GLPI 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.

GLPI 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 GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
* @since version 0.85
*/
define('GLPI_ROOT', '..');
include GLPI_ROOT . "/inc/includes.php";
Session::checkRight("queuedmail", READ);
Html::header(QueuedMail::getTypeName(), $_SERVER['PHP_SELF'], "admin", "queuedmail");
Search::show('QueuedMail');
Html::footer();
(at your option) any later version.

GLPI 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 GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
include '../inc/includes.php';
Session::checkRight("sla", READ);
if (empty($_GET["id"])) {
    $_GET["id"] = "";
}
$sla = new SLA();
if (isset($_POST["add"])) {
    $sla->check(-1, CREATE);
    if ($newID = $sla->add($_POST)) {
        Event::log($newID, "slas", 4, "setup", sprintf(__('%1$s adds the item %2$s'), $_SESSION["glpiname"], $_POST["name"]));
        if ($_SESSION['glpibackcreated']) {
            Html::redirect($sla->getFormURL() . "?id=" . $newID);
        }
    }
    Html::redirect($CFG_GLPI["root_doc"] . "/front/sla.php");
} else {
    if (isset($_POST["purge"])) {