. * --------------------------------------------------------------------- */ if (strpos($_SERVER['PHP_SELF'], "private_public.php")) { include ('../inc/includes.php'); header("Content-Type: text/html; charset=UTF-8"); Html::header_nocache(); } else if (!defined('GLPI_ROOT')) { die("Sorry. You can't access this file directly"); } if (isset($_POST['is_private'])) { Session::checkLoginUser(); switch ($_POST['is_private']) { case true : echo "\n"; echo "\n"; echo "\n"; $private = __('Personal'); $link = "".__('Set public').""; printf(__('%1$s - %2$s'), $private, $link); break; case false : if (isset($_POST['entities_id']) && in_array($_POST['entities_id'], $_SESSION['glpiactiveentities'])) { $val = $_POST['entities_id']; } else { $val = $_SESSION['glpiactive_entity']; } echo ""; echo "
"; echo "\n"; echo __('Public'); echo ""; Entity::dropdown(['value' => $val]); echo "". __('Child entities').""; Dropdown::showYesNo('is_recursive', $_POST["is_recursive"]); echo ""; echo "".__('Set personal').""; echo "
"; break; } }