<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>

The Software is provided to you AS IS and WITH ALL FAULTS.
OREON makes no representation and gives no warranty whatsoever,
whether express or implied, and without limitation, with regard to the quality,
safety, contents, performance, merchantability, non-infringement or suitability for
any particular or intended purpose of the Software found on the OREON web site.
In no event will OREON be liable for any direct, indirect, punitive, special,
incidental or consequential damages however they may arise and even if OREON has
been previously advised of the possibility of such damages.

For information : <EMAIL>
*/

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

	$pagination = "maxViewMonitoring";
	include("./include/common/autoNumLimit.php");

	# set limit & num
	$DBRESULT =& $pearDB->query("SELECT maxViewMonitoring FROM general_opt LIMIT 1");
	if (PEAR::isError($DBRESULT))
		print "Mysql Error : ".$DBRESULT->getMessage();
	$gopt = array_map("myDecode", $DBRESULT->fetchRow());

	!isset($_GET["sort_types"]) ? $sort_types = 0 : $sort_types = $_GET["sort_types"];
	!isset($_GET["order"]) ? $order = 'ASC' : $order = $_GET["order"];

	!isset($_GET["num"]) ? $num = 0 : $num = $_GET["num"];
//	!isset($_GET["limit"]) ? $limit = 0 : $limit = $_GET["limit"];
	!isset($_GET["search_type_host"]) ? $search_type_host = 1 : $search_type_host = $_GET["search_type_host"];
	!isset($_GET["search_type_service"]) ? $search_type_service = 1 : $search_type_service = $_GET["search_type_service"];
	!isset($_GET["sort_type"]) ? $sort_type = "host_name" : $sort_type = $_GET["sort_type"];

	# start quickSearch form
	include_once("./include/common/quickSearch.php");
	# end quickSearch form


	$tab_class = array("0" => "list_one", "1" => "list_two");
	$rows = 0;

	/* row ? */
	$rows = 10;


	include_once("makeJS_serviceGrid.php");


	# Smarty template Init
	$tpl = new Smarty();
	$tpl = initSmartyTpl($path, $tpl, "/templates/");

	$tpl->assign("p", $p);
	$tpl->assign('o', $o);
	$tpl->assign("sort_types", $sort_types);
	$tpl->assign("num", $num);
	$tpl->assign("limit", $limit);
	$tpl->assign("mon_host", _("Hosts"));
	$tpl->assign("mon_status", _("Status"));
	$tpl->assign("mon_ip", _("IP"));
	$tpl->assign("mon_last_check", _("Last Check"));
	$tpl->assign("mon_duration", _("Duration"));
	$tpl->assign("mon_status_information", _("Status information"));


	$form = new HTML_QuickForm('select_form', 'GET', "?p=".$p);


	$tpl->assign("lang", $lang);

	$tpl->assign("order", strtolower($order));
	$tab_order = array("sort_asc" => "sort_desc", "sort_desc" => "sort_asc");
	$tpl->assign("tab_order", $tab_order);


	##Toolbar select $lang["lgd_more_actions"]
	?>
	<script type="text/javascript">
	function setO(_i) {
		document.forms['form'].elements['cmd'].value = _i;
		document.forms['form'].elements['o1'].selectedIndex = 0;
		document.forms['form'].elements['o2'].selectedIndex = 0;
	}
	</SCRIPT>
	<?php

	$attrs = array(	'onchange'=>"javascript: setO(this.form.elements['o1'].value); submit();");
    $form->addElement('select', 'o1', NULL, array(	NULL	=>	_("More actions..."), 
													"3"		=>	_("Verification Check"), 
													"4"		=>	_("Verification Check (Forced)"), 
													"70" 	=> 	_("Services : Acknowledge"), 
													"71" 	=> 	_("Services : Disacknowledge"),
													"80" 	=> 	_("Services : Enable Notification"), 
													"81" 	=> 	_("Services : Disable Notification"),
													"90" 	=> 	_("Services : Enable Check"), 
													"91" 	=> 	_("Services : Disable Check"),
													"72" 	=> 	_("Hosts : Acknowledge"),
													"73" 	=> 	_("Hosts : Disacknowledge"), 
													"82" 	=> 	_("Hosts : Enable Notification"),<commit_msg>do best check for GET parameters<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>

The Software is provided to you AS IS and WITH ALL FAULTS.
OREON makes no representation and gives no warranty whatsoever,
whether express or implied, and without limitation, with regard to the quality,
safety, contents, performance, merchantability, non-infringement or suitability for
any particular or intended purpose of the Software found on the OREON web site.
In no event will OREON be liable for any direct, indirect, punitive, special,
incidental or consequential damages however they may arise and even if OREON has
been previously advised of the possibility of such damages.

For information : <EMAIL>
*/

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

	$pagination = "maxViewMonitoring";
	include("./include/common/autoNumLimit.php");

	# set limit & num
	$DBRESULT =& $pearDB->query("SELECT maxViewMonitoring FROM general_opt LIMIT 1");
	if (PEAR::isError($DBRESULT))
		print "Mysql Error : ".$DBRESULT->getMessage();
	$gopt = array_map("myDecode", $DBRESULT->fetchRow());

	!isset($_GET["sort_types"]) ? $sort_types = 0 : $sort_types = $_GET["sort_types"];
	!isset($_GET["order"]) ? $order = 'ASC' : $order = $_GET["order"];
	!isset($_GET["num"]) ? $num = 0 : $num = $_GET["num"];
	!isset($_GET["search_type_host"]) ? $search_type_host = 1 : $search_type_host = $_GET["search_type_host"];
	!isset($_GET["search_type_service"]) ? $search_type_service = 1 : $search_type_service = $_GET["search_type_service"];
	!isset($_GET["sort_type"]) ? $sort_type = "host_name" : $sort_type = $_GET["sort_type"];

	# start quickSearch form
	include_once("./include/common/quickSearch.php");

	$tab_class = array("0" => "list_one", "1" => "list_two");
	$rows = 0;

	/* row ? */
	$rows = 10;


	include_once("makeJS_serviceGrid.php");


	# Smarty template Init
	$tpl = new Smarty();
	$tpl = initSmartyTpl($path, $tpl, "/templates/");

	$tpl->assign("p", $p);
	$tpl->assign('o', $o);
	$tpl->assign("sort_types", $sort_types);
	$tpl->assign("num", $num);
	$tpl->assign("limit", $limit);
	$tpl->assign("mon_host", _("Hosts"));
	$tpl->assign("mon_status", _("Status"));
	$tpl->assign("mon_ip", _("IP"));
	$tpl->assign("mon_last_check", _("Last Check"));
	$tpl->assign("mon_duration", _("Duration"));
	$tpl->assign("mon_status_information", _("Status information"));


	$form = new HTML_QuickForm('select_form', 'GET', "?p=".$p);


	$tpl->assign("lang", $lang);

	$tpl->assign("order", strtolower($order));
	$tab_order = array("sort_asc" => "sort_desc", "sort_desc" => "sort_asc");
	$tpl->assign("tab_order", $tab_order);

	?>
	<script type="text/javascript">
	function setO(_i) {
		document.forms['form'].elements['cmd'].value = _i;
		document.forms['form'].elements['o1'].selectedIndex = 0;
		document.forms['form'].elements['o2'].selectedIndex = 0;
	}
	</SCRIPT>
	<?php

	$attrs = array(	'onchange'=>"javascript: setO(this.form.elements['o1'].value); submit();");
    $form->addElement('select', 'o1', NULL, array(	NULL	=>	_("More actions..."), 
													"3"		=>	_("Verification Check"), 
													"4"		=>	_("Verification Check (Forced)"), 
													"70" 	=> 	_("Services : Acknowledge"), 
													"71" 	=> 	_("Services : Disacknowledge"),
													"80" 	=> 	_("Services : Enable Notification"), 
													"81" 	=> 	_("Services : Disable Notification"),
													"90" 	=> 	_("Services : Enable Check"), 
													"91" 	=> 	_("Services : Disable Check"),
													"72" 	=> 	_("Hosts : Acknowledge"),
													"73" 	=> 	_("Hosts : Disacknowledge"), 
													"82" 	=> 	_("Hosts : Enable Notification"),
{'fraction_non_alphanumeric': 0.19261424017003187, 'fraction_numerical': 0.010759829968119023, 'mean_word_length': 4.362535612535613, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 83, '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': '3402408', 'n_tokens_mistral': 2932, 'n_tokens_neox': 2610, 'n_words': 591}