Пример #1
0
function plugin_reports_uninstall()
{
    global $DB;
    // No autoload when plugin is not activated (if dessactivation before uninstall)
    include_once GLPI_ROOT . "/plugins/reports/inc/profile.class.php";
    return PluginReportsProfile::uninstall();
}
Пример #2
0
function plugin_reports_uninstall()
{
    global $DB;
    // No autoload when plugin is not activated
    require 'inc/profile.class.php';
    return PluginReportsProfile::uninstall();
}
Пример #3
0
reports - Additional reports plugin for GLPI
Copyright (C) 2003-2013 by the reports Development Team.

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

LICENSE

This file is part of reports.

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

reports 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 reports. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
include_once "../../../inc/includes.php";
Session::checkRight('profile', 'w');
//Save profile
if (isset($_POST['update_user_profile'])) {
    PluginReportsProfile::updateForProfile($_POST);
}
Html::back();
Пример #4
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with reports. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
include_once "../../../inc/includes.php";
Session::checkRight('profile', 'r');
Plugin::load('reports', true);
Html::header(__('Reports plugin configuration', 'reports'), $_SERVER['PHP_SELF'], 'config', 'plugins');
require_once "../inc/profile.class.php";
$report = '';
if (isset($_POST['report'])) {
    $report = $_POST['report'];
}
$prof = new PluginReportsProfile();
if (isset($_POST['delete']) && $report) {
    Session::checkRight('profile', 'w');
    $prof->deleteByCriteria(array('report' => $report));
} else {
    if (isset($_POST['update']) && $report) {
        Session::checkRight('profile', 'w');
        PluginReportsProfile::updateForReport($_POST);
    }
}
$tab = $prof->updatePluginRights();
echo "<form method='post' action=\"" . $_SERVER["PHP_SELF"] . "\">";
echo "<table class='tab_cadre'><tr><th colspan='2'>";
echo "<a href='config.form.php'>" . __('Reports plugin configuration', 'reports') . "</a><br>&nbsp;<br>";
echo __('Rights management by report', 'reports') . "</th></tr>\n";
echo "<tr class='tab_bg_1'><td>" . __('Report', 'Reports', 1) . "&nbsp; ";
           http://www.gnu.org/licenses/agpl-3.0-standalone.html
@link      https://forge.indepnet.net/projects/reports
@link      http://www.glpi-project.org/
@since     2009
--------------------------------------------------------------------------
*/
include_once "../../../inc/includes.php";
Session::checkRight('profile', READ);
Plugin::load('reports', true);
Html::header(__('Reports plugin configuration', 'reports'), $_SERVER['PHP_SELF'], 'config', 'plugins');
require_once "../inc/profile.class.php";
$report = '';
if (isset($_POST['report'])) {
    $report = $_POST['report'];
}
$prof = new PluginReportsProfile();
if (isset($_POST['delete']) && $report) {
    $profile_right = new ProfileRight();
    $profile_right->deleteByCriteria(array('name' => "plugin_reports_{$report}"));
    ProfileRight::addProfileRights(array("plugin_reports_{$report}"));
} else {
    if (isset($_POST['update']) && $report) {
        Session::checkRight('profile', UPDATE);
        PluginReportsProfile::updateForReport($_POST);
    }
}
$tab = $prof->updatePluginRights();
echo "<form method='post' action=\"" . $_SERVER["PHP_SELF"] . "\">";
echo "<table class='tab_cadre'><tr><th colspan='2'>";
echo "<a href='config.form.php'>" . __('Reports plugin configuration', 'reports') . "</a><br>&nbsp;<br>";
echo __('Rights management by report', 'reports') . "</th></tr>\n";