} if (!empty($datas)) { foreach ($datas as $data) { if ($_GET["name"] != "type") { $used[] = $data["items_id"]; } else { $used[] = $data["type"]; } } } if (count($used)) { $where .= ",'" . implode("','", $used) . "'"; } $where .= ")"; $multi = false; $config = new PluginPositionsConfig(); $config->getFromDB(1); if (isset($_GET["name"]) && $_GET["name"] != "type") { if (!$config->fields['use_view_all_object']) { if ($_GET['locations_id'] != -1) { $where .= " AND `locations_id` = '" . $_GET['locations_id'] . "'"; } } else { $locations = getSonsOf('glpi_locations', $_GET['locations_id']); $where .= " AND `locations_id` IN (" . implode(',', $locations) . ")"; } if ($item->maybeDeleted()) { $where .= " AND `is_deleted` = '0' "; } if ($item->maybeTemplate()) { $where .= " AND `is_template` = '0' ";
the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Positions 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 Positions. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ include '../../../inc/includes.php'; $plugin = new Plugin(); if ($plugin->isActivated("positions")) { $config = new PluginPositionsConfig(); if (isset($_POST["update_config"])) { Session::checkRight("config", UPDATE); $config->update($_POST); Html::back(); } else { Html::header(PluginPositionsPosition::getTypeName(), '', "tools", "pluginpositionsmenu", "config"); $config->showForm(); Html::footer(); } } else { Html::header(__('Setup'), '', "config", "plugins"); echo "<div align='center'><br><br>"; echo "<img src=\"" . $CFG_GLPI["root_doc"] . "/pics/warning.png\" alt='warning'><br><br>"; echo "<b>" . __('Please activate the plugin', 'positions') . "</b></div>"; Html::footer();