2014-08-18 16:50:07 +02:00
|
|
|
<?php
|
|
|
|
|
2021-11-04 16:28:15 +01:00
|
|
|
// Pandora FMS - http://pandorafms.com
|
2014-08-18 16:50:07 +02:00
|
|
|
// ==================================================
|
2023-06-08 11:53:13 +02:00
|
|
|
// Copyright (c) 2005-2023 Pandora FMS
|
2023-06-08 13:10:16 +02:00
|
|
|
// Please see http://pandorafms.com/community/ for full contribution list
|
2014-08-18 16:50:07 +02:00
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
|
|
|
// as published by the Free Software Foundation; version 2
|
|
|
|
// This program 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.
|
|
|
|
global $config;
|
|
|
|
|
|
|
|
if ($helps === false || !$searchHelps) {
|
2019-01-30 16:18:44 +01:00
|
|
|
echo "<br><div class='nf'>".__('Zero results found.').sprintf(
|
2021-03-11 15:40:23 +01:00
|
|
|
__('You can find more help in the <a class="underline" href="%s">wiki</a>'),
|
2021-11-04 16:28:15 +01:00
|
|
|
'https://pandorafms.com/manual/start?do=search&id=start&q='.$config['search_keywords']
|
2019-01-30 16:18:44 +01:00
|
|
|
)."</div>\n";
|
|
|
|
} else {
|
2022-02-07 13:48:25 +01:00
|
|
|
$table = new stdClass();
|
2019-01-30 16:18:44 +01:00
|
|
|
$table->width = '98%';
|
|
|
|
$table->class = 'databox';
|
|
|
|
|
|
|
|
$table->size = [];
|
|
|
|
$table->size[0] = '95%';
|
|
|
|
$table->size[1] = '5%';
|
|
|
|
|
|
|
|
$table->head = [];
|
|
|
|
$table->head[0] = __('Name');
|
|
|
|
$table->head[1] = __('Matches');
|
|
|
|
|
|
|
|
$table->align = [];
|
|
|
|
$table->align[1] = 'center';
|
|
|
|
|
|
|
|
$table->data = [];
|
|
|
|
foreach ($helps as $iterator => $help) {
|
|
|
|
if (is_numeric($iterator)) {
|
|
|
|
$name = $help['id'];
|
|
|
|
} else {
|
|
|
|
$name = $iterator;
|
|
|
|
}
|
|
|
|
|
|
|
|
$table->data[] = [
|
|
|
|
"<a href=\"javascript: open_help('".$help['id']."','');\">".$name.'</a>',
|
|
|
|
$help['count'],
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
echo '<br />';
|
|
|
|
html_print_table($table);
|
|
|
|
unset($table);
|
2014-08-18 16:50:07 +02:00
|
|
|
}
|