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> <br>"; echo __('Rights management by report', 'reports') . "</th></tr>\n"; echo "<tr class='tab_bg_1'><td>" . __('Report', 'Reports', 1) . " "; $query = "SELECT `id`, `name`\n FROM `glpi_profiles`\n ORDER BY `name`"; $result = $DB->query($query); echo "<select name='report'>";