<commit_before><?php
/*
 * Centreon is developped with GPL Licence 2.0 :
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
 * Developped by : <NAME> - <NAME> 
 * 
 * The Software is provided to you AS IS and WITH ALL FAULTS.
 * Centreon makes no representation and gives no warranty whatsoever,
 * whether express or implied, and without limitation, with regard to the quality,
 * any particular or intended purpose of the Software found on the Centreon web site.
 * In no event will Centreon be liable for any direct, indirect, punitive, special,
 * incidental or consequential damages however they may arise and even if Centreon has
 * been previously advised of the possibility of such damages.
 * 
 * For information : <EMAIL>
 */

	if (!isset($oreon))
		exit();

	require_once './class/other.class.php';
	include_once("./include/monitoring/external_cmd/cmd.php");

	#Pear library
	require_once "HTML/QuickForm.php";
	require_once 'HTML/QuickForm/advmultiselect.php';
	require_once 'HTML/QuickForm/Renderer/ArraySmarty.php';

	$DBRESULT =& $pearDB->query("SELECT ndo_activate FROM general_opt LIMIT 1");
	# Set base value
	$gopt = array_map("myDecode", $DBRESULT->fetchRow());

	$ndo = $gopt["ndo_activate"];

	if ($ndo)
		$path = "./include/monitoring/status/status-ndo/";
	else
		$path = "./include/monitoring/status/status-log/";

	$pathRoot = "./include/monitoring/";
	$pathDetails = "./include/monitoring/objectDetails/";
	$pathTools = "./include/tools/";

	if(isset($_GET["cmd"]) && $_GET["cmd"] == 14 && isset($_GET["author"]) && isset($_GET["en"]) && $_GET["en"] == 1){
		if (!isset($_GET["notify"]))
			$_GET["notify"] = 0;
		if (!isset($_GET["persistent"]))
			$_GET["persistent"] = 0;
		acknowledgeHost();
	} else if(isset($_GET["cmd"]) && $_GET["cmd"] == 14 && isset($_GET["author"]) && isset($_GET["en"]) && $_GET["en"] == 0){
		acknowledgeHostDisable($lang);
	}

	if ($min){
		switch ($o)	{
			default : require_once($pathTools."tools.php"); break;
		}
	} else {
		if (!$ndo){
			include("./include/monitoring/status/resume.php");
			switch ($o)	{
				case "h" 	: require_once($path."host.php"); 					break;
				case "hpb" 	: require_once($path."host.php");		 			break;
				case "hd" 	: require_once($pathDetails."hostDetails.php"); 	break;
				case "hak" 	: require_once($pathRoot."acknowlegement/hostAcknowledge.php"); 	break;
				default 	: require_once($path."host.php"); 					break;
			}
		} else {
			include_once("./DBNDOConnect.php");
			if (preg_match("/connect\ failed/", $pearDBndo->toString(), $str)) 
				print "<div class='msg'>"._("Connection Error to NDO DataBase ! \n")."</div>";
			else {
				switch ($o)	{
					case "h" 	: require_once($path."host.php"); 					break;
					case "hpb" 	: require_once($path."host.php"); 					break;
					case "hd" 	: require_once($pathDetails."hostDetails.php"); 	break;
					case "hak" 	: require_once($pathRoot."acknowlegement/hostAcknowledge.php"); 	break;<commit_msg>remove use of $lang -> generate PHP warning <commit_after><?php
/*
 * Centreon is developped with GPL Licence 2.0 :
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
 * Developped by : <NAME> - <NAME> 
 * 
 * The Software is provided to you AS IS and WITH ALL FAULTS.
 * Centreon makes no representation and gives no warranty whatsoever,
 * whether express or implied, and without limitation, with regard to the quality,
 * any particular or intended purpose of the Software found on the Centreon web site.
 * In no event will Centreon be liable for any direct, indirect, punitive, special,
 * incidental or consequential damages however they may arise and even if Centreon has
 * been previously advised of the possibility of such damages.
 * 
 * For information : <EMAIL>
 */

	if (!isset($oreon))
		exit();

	require_once './class/other.class.php';
	include_once("./include/monitoring/external_cmd/cmd.php");

	#Pear library
	require_once "HTML/QuickForm.php";
	require_once 'HTML/QuickForm/advmultiselect.php';
	require_once 'HTML/QuickForm/Renderer/ArraySmarty.php';

	$DBRESULT =& $pearDB->query("SELECT ndo_activate FROM general_opt LIMIT 1");
	# Set base value
	$gopt = array_map("myDecode", $DBRESULT->fetchRow());

	$ndo = $gopt["ndo_activate"];

	if ($ndo)
		$path = "./include/monitoring/status/status-ndo/";
	else
		$path = "./include/monitoring/status/status-log/";

	$pathRoot = "./include/monitoring/";
	$pathDetails = "./include/monitoring/objectDetails/";
	$pathTools = "./include/tools/";

	if(isset($_GET["cmd"]) && $_GET["cmd"] == 14 && isset($_GET["author"]) && isset($_GET["en"]) && $_GET["en"] == 1){
		if (!isset($_GET["notify"]))
			$_GET["notify"] = 0;
		if (!isset($_GET["persistent"]))
			$_GET["persistent"] = 0;
		acknowledgeHost();
	} else if(isset($_GET["cmd"]) && $_GET["cmd"] == 14 && isset($_GET["author"]) && isset($_GET["en"]) && $_GET["en"] == 0){
		acknowledgeHostDisable();
	}

	if ($min){
		switch ($o)	{
			default : require_once($pathTools."tools.php"); break;
		}
	} else {
		if (!$ndo){
			include("./include/monitoring/status/resume.php");
			switch ($o)	{
				case "h" 	: require_once($path."host.php"); 					break;
				case "hpb" 	: require_once($path."host.php");		 			break;
				case "hd" 	: require_once($pathDetails."hostDetails.php"); 	break;
				case "hak" 	: require_once($pathRoot."acknowlegement/hostAcknowledge.php"); 	break;
				default 	: require_once($path."host.php"); 					break;
			}
		} else {
			include_once("./DBNDOConnect.php");
			if (preg_match("/connect\ failed/", $pearDBndo->toString(), $str)) 
				print "<div class='msg'>"._("Connection Error to NDO DataBase ! \n")."</div>";
			else {
				switch ($o)	{
					case "h" 	: require_once($path."host.php"); 					break;
					case "hpb" 	: require_once($path."host.php"); 					break;
					case "hd" 	: require_once($pathDetails."hostDetails.php"); 	break;
					case "hak" 	: require_once($pathRoot."acknowlegement/hostAcknowledge.php"); 	break;
{'fraction_non_alphanumeric': 0.17917511832319136, 'fraction_numerical': 0.004394861392832995, 'mean_word_length': 4.022920203735144, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4936877', 'n_tokens_mistral': 2211, 'n_tokens_neox': 2003, 'n_words': 468}