subvisibility.php
Go to the documentation of this file.
00001 <?php
00002 /*
00003  * @version $Id: subvisibility.php 20129 2013-02-04 16:53:59Z moyo $
00004  -------------------------------------------------------------------------
00005  GLPI - Gestionnaire Libre de Parc Informatique
00006  Copyright (C) 2003-2013 by the INDEPNET Development Team.
00007 
00008  http://indepnet.net/   http://glpi-project.org
00009  -------------------------------------------------------------------------
00010 
00011  LICENSE
00012 
00013  This file is part of GLPI.
00014 
00015  GLPI is free software; you can redistribute it and/or modify
00016  it under the terms of the GNU General Public License as published by
00017  the Free Software Foundation; either version 2 of the License, or
00018  (at your option) any later version.
00019 
00020  GLPI is distributed in the hope that it will be useful,
00021  but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023  GNU General Public License for more details.
00024 
00025  You should have received a copy of the GNU General Public License
00026  along with GLPI. If not, see <http://www.gnu.org/licenses/>.
00027  --------------------------------------------------------------------------
00028  */
00029 
00030 /** @file
00031 * @brief
00032 */
00033 
00034 // Direct access to file
00035 if (strpos($_SERVER['PHP_SELF'],"subvisibility.php")) {
00036    $AJAX_INCLUDE = 1;
00037    include ('../inc/includes.php');
00038    header("Content-Type: text/html; charset=UTF-8");
00039    Html::header_nocache();
00040 }
00041 
00042 Session::checkLoginUser();
00043 
00044 if (isset($_POST['type']) && !empty($_POST['type'])
00045     && isset($_POST['items_id']) && ($_POST['items_id'] > 0)) {
00046 
00047    switch ($_POST['type']) {
00048       case 'Group' :
00049       case 'Profile' :
00050          $params = array('value' => $_SESSION['glpiactive_entity']);
00051          if (Session::isViewAllEntities()) {
00052             $params['toadd'] = array(-1 => __('No restriction'));
00053          }
00054          _e('Entity');
00055          echo "&nbsp;";
00056          Entity::dropdown($params);
00057          echo "&nbsp;";
00058          _e('Child entities');
00059          echo "&nbsp;";
00060          Dropdown::showYesNo('is_recursive');
00061          break;
00062    }
00063 }
00064 ?>