diff --git a/pandora_console/godmode/setup/performance.php b/pandora_console/godmode/setup/performance.php index e51f6ff7a9..0bbf28001f 100644 --- a/pandora_console/godmode/setup/performance.php +++ b/pandora_console/godmode/setup/performance.php @@ -582,7 +582,7 @@ $table_other->data[3][1] = html_print_input_text( ); $table_other->data[5][0] = __('Use realtime statistics'); -$table_other->data[5][1] = html_print_checkbox_toogle_switch( +$table_other->data[5][1] = html_print_checkbox_switch( 'realtimestats', 1, $config['realtimestats'], @@ -604,7 +604,7 @@ $table_other->data[6][1] = html_print_input_text( ); $table_other->data[7][0] = __('Use agent access graph').ui_print_help_icon('agent_access', true); -$table_other->data[7][1] = html_print_checkbox_toogle_switch('agentaccess', 1, $config['agentaccess'], true); +$table_other->data[7][1] = html_print_checkbox_switch('agentaccess', 1, $config['agentaccess'], true); $table_other->data[8][0] = __('Max. recommended number of files in attachment directory'); $table_other->data[8][0] .= ui_print_help_tip( @@ -621,7 +621,7 @@ $table_other->data[8][1] = html_print_input_text( ); $table_other->data[9][0] = __('Delete not init modules'); -$table_other->data[9][1] = html_print_checkbox_toogle_switch('delete_notinit', 1, $config['delete_notinit'], true); +$table_other->data[9][1] = html_print_checkbox_switch('delete_notinit', 1, $config['delete_notinit'], true); $table_other->data[10][0] = __('Big Operation Step to purge old data'); $table_other->data[10][0] .= ui_print_help_tip( diff --git a/pandora_console/godmode/setup/setup_auth.php b/pandora_console/godmode/setup/setup_auth.php index 3ff5cb305b..cdb75816cc 100644 --- a/pandora_console/godmode/setup/setup_auth.php +++ b/pandora_console/godmode/setup/setup_auth.php @@ -44,14 +44,14 @@ if (is_ajax()) { // Fallback to local authentication $row = []; $row['name'] = __('Fallback to local authentication').ui_print_help_tip(__('Enable this option if you want to fallback to local authentication when remote (ldap etc...) authentication failed.'), true); - $row['control'] = html_print_checkbox_toogle_switch('fallback_local_auth', 1, $config['fallback_local_auth'], true); + $row['control'] = html_print_checkbox_switch('fallback_local_auth', 1, $config['fallback_local_auth'], true); $table->data['fallback_local_auth'] = $row; if (enterprise_installed()) { // Autocreate remote users $row = []; $row['name'] = __('Autocreate remote users'); - $row['control'] = html_print_checkbox_toogle_switch_extended('autocreate_remote_users', 1, $config['autocreate_remote_users'], false, '', '', true).' '; + $row['control'] = html_print_checkbox_switch_extended('autocreate_remote_users', 1, $config['autocreate_remote_users'], false, '', '', true).' '; $table->data['autocreate_remote_users'] = $row; add_enterprise_auth_autocreate_profiles($table, $type_auth); @@ -89,7 +89,7 @@ if (is_ajax()) { // Start TLS $row = []; $row['name'] = __('Start TLS'); - $row['control'] = html_print_checkbox_toogle_switch('ldap_start_tls', 1, $config['ldap_start_tls'], true); + $row['control'] = html_print_checkbox_switch('ldap_start_tls', 1, $config['ldap_start_tls'], true); $table->data['ldap_start_tls'] = $row; // Base DN @@ -135,7 +135,7 @@ if (is_ajax()) { $row = []; $row['name'] = __('Double authentication').ui_print_help_tip(__('If this option is enabled, the users can use double authentication with their accounts'), true); $row['control'] = html_print_input_hidden('double_auth_enabled', 0); - $row['control'] .= html_print_checkbox_toogle_switch('double_auth_enabled', 1, $config['double_auth_enabled'], true); + $row['control'] .= html_print_checkbox_switch('double_auth_enabled', 1, $config['double_auth_enabled'], true); $table->data['double_auth_enabled'] = $row; // Session timeout diff --git a/pandora_console/godmode/setup/setup_general.php b/pandora_console/godmode/setup/setup_general.php index 82899cde6b..8f07d3d88d 100644 --- a/pandora_console/godmode/setup/setup_general.php +++ b/pandora_console/godmode/setup/setup_general.php @@ -82,17 +82,17 @@ $sources['sql'] = __('Database'); $table->data[9][1] = html_print_select($sources, 'timesource', $config['timesource'], '', '', '', true); $table->data[10][0] = __('Automatic check for updates'); -$table->data[10][1] = html_print_checkbox_toogle_switch('autoupdate', 1, $config['autoupdate'], true); +$table->data[10][1] = html_print_checkbox_switch('autoupdate', 1, $config['autoupdate'], true); echo "
'; $table->data[11][0] = __('Enforce https'); -$table->data[11][1] = html_print_checkbox_toogle_switch_extended('https', 1, $config['https'], false, '', '', true); +$table->data[11][1] = html_print_checkbox_switch_extended('https', 1, $config['https'], false, '', '', true); $table->data[12][0] = __('Use cert of SSL'); -$table->data[12][1] = html_print_checkbox_toogle_switch_extended('use_cert', 1, $config['use_cert'], false, '', '', true); +$table->data[12][1] = html_print_checkbox_switch_extended('use_cert', 1, $config['use_cert'], false, '', '', true); $table->rowstyle[13] = 'display: none;'; $table->data[13][0] = __('Path of SSL Cert.').ui_print_help_tip(__('Path where you put your cert and name of this cert. Remember your cert only in .pem extension.'), true); @@ -114,7 +114,7 @@ $table->data[16][0] = __('API password').ui_print_help_tip(__('Please be careful $table->data[16][1] = html_print_input_password('api_password', io_output_password($config['api_password']), '', 25, 255, true); $table->data[17][0] = __('Enable GIS features'); -$table->data[17][1] = html_print_checkbox_toogle_switch('activate_gis', 1, $config['activate_gis'], true); +$table->data[17][1] = html_print_checkbox_switch('activate_gis', 1, $config['activate_gis'], true); $table->data[19][0] = __('Enable Netflow'); $rbt_disabled = false; @@ -123,7 +123,7 @@ if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') { $table->data[19][0] .= ui_print_help_tip(__('Not supported in Windows systems'), true); } -$table->data[19][1] = html_print_checkbox_toogle_switch_extended('activate_netflow', 1, $config['activate_netflow'], $rbt_disabled, '', '', true); +$table->data[19][1] = html_print_checkbox_switch_extended('activate_netflow', 1, $config['activate_netflow'], $rbt_disabled, '', '', true); $zone_name = [ @@ -202,15 +202,15 @@ $table->data[28][1] = html_print_input_text('public_url', $config['public_url'], $table->data[29][0] = __('Referer security'); $table->data[29][0] .= ui_print_help_tip(__("If enabled, actively checks if the user comes from %s's URL", get_product_name()), true); -$table->data[29][1] = html_print_checkbox_toogle_switch('referer_security', 1, $config['referer_security'], true); +$table->data[29][1] = html_print_checkbox_switch('referer_security', 1, $config['referer_security'], true); $table->data[30][0] = __('Event storm protection'); $table->data[30][0] .= ui_print_help_tip(__('If set to yes no events or alerts will be generated, but agents will continue receiving data.'), true); -$table->data[30][1] = html_print_checkbox_toogle_switch('event_storm_protection', 1, $config['event_storm_protection'], true); +$table->data[30][1] = html_print_checkbox_switch('event_storm_protection', 1, $config['event_storm_protection'], true); $table->data[31][0] = __('Command Snapshot').ui_print_help_tip(__('The string modules with several lines show as command output'), true); -$table->data[31][1] = html_print_checkbox_toogle_switch('command_snapshot', 1, $config['command_snapshot'], true); +$table->data[31][1] = html_print_checkbox_switch('command_snapshot', 1, $config['command_snapshot'], true); $table->data[32][0] = __('Server logs directory').ui_print_help_tip(__('Directory where the server logs are stored.'), true); $table->data[32][1] = html_print_input_text( @@ -250,7 +250,7 @@ $table->data['tutorial_mode'][1] = html_print_select( $config['past_planned_downtimes'] = isset($config['past_planned_downtimes']) ? $config['past_planned_downtimes'] : 1; $table->data[34][0] = __('Allow create planned downtimes in the past').ui_print_help_tip(__('The planned downtimes created in the past will affect the SLA reports'), true); -$table->data[34][1] = html_print_checkbox_toogle_switch('past_planned_downtimes', 1, $config['past_planned_downtimes'], true); +$table->data[34][1] = html_print_checkbox_switch('past_planned_downtimes', 1, $config['past_planned_downtimes'], true); $table->data[35][0] = __('Limit for bulk operations').ui_print_help_tip(__('Your PHP environment is set to 1000 max_input_vars. This parameter should have the same value or lower.', ini_get('max_input_vars')), true); $table->data[35][1] = html_print_input_text( @@ -263,7 +263,7 @@ $table->data[35][1] = html_print_input_text( ); $table->data[36][0] = __('Include agents manually disabled'); -$table->data[36][1] = html_print_checkbox_toogle_switch('include_agents', 1, $config['include_agents'], true); +$table->data[36][1] = html_print_checkbox_switch('include_agents', 1, $config['include_agents'], true); $table->data[37][0] = __('Audit log directory').ui_print_help_tip(__('Directory where audit log is stored.'), true); $table->data[37][1] = html_print_input_text('auditdir', io_safe_output($config['auditdir']), '', 30, 100, true); @@ -339,9 +339,9 @@ $(document).ready (function () { $("#timezone").attr("hidden", false); }); - if ($("input[name=use_cert]").is(':checked')) { - $('#setup_general-13').show(); - } + if ($("input[name=use_cert]").is(':checked')) { + $('#setup_general-13').show(); + } $("input[name=use_cert]").change(function () { if( $(this).is(":checked") ) diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index 8d18cf40d7..85047cd488 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -75,7 +75,7 @@ $table_behaviour->data[$row][1] = html_print_select($values, 'vc_refr', $config[ $row++; $table_behaviour->data[$row][0] = __('Paginated module view'); -$table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch( +$table_behaviour->data[$row][1] = html_print_checkbox_switch( 'paginate_module', 1, $config['paginate_module'], @@ -84,7 +84,7 @@ $table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch( $row++; $table_behaviour->data[$row][0] = __('Display data of proc modules in other format'); -$table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch( +$table_behaviour->data[$row][1] = html_print_checkbox_switch( 'render_proc', 1, $config['render_proc'], @@ -102,7 +102,7 @@ $row++; // Daniel maya 02/06/2016 Display menu with click --INI $table_behaviour->data[$row][0] = __('Click to display lateral menus').ui_print_help_tip(__('When enabled, the lateral menus are shown when left clicking them, instead of hovering over them'), true); -$table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch( +$table_behaviour->data[$row][1] = html_print_checkbox_switch( 'click_display', 1, $config['click_display'], @@ -121,7 +121,7 @@ if (enterprise_installed()) { } $table_behaviour->data[$row][0] = __('Classic menu mode').ui_print_help_tip(__('Text menu options always visible, don\'t hide'), true); -$table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch( +$table_behaviour->data[$row][1] = html_print_checkbox_switch( 'classic_menu', 1, $config['classic_menu'], @@ -491,7 +491,7 @@ if (enterprise_installed()) { if (enterprise_installed()) { $table_styles->data[$row][0] = __('Disable logo in graphs'); - $table_styles->data[$row][1] = html_print_checkbox_toogle_switch( + $table_styles->data[$row][1] = html_print_checkbox_switch( 'fixed_graph', 1, $config['fixed_graph'], @@ -507,7 +507,7 @@ if (enterprise_installed()) { */ $table_styles->data[$row][0] = __('Disable helps'); -$table_styles->data[$row][1] = html_print_checkbox_toogle_switch( +$table_styles->data[$row][1] = html_print_checkbox_switch( 'disable_help', 1, $config['disable_help'], @@ -516,7 +516,7 @@ $table_styles->data[$row][1] = html_print_checkbox_toogle_switch( $row++; $table_styles->data[$row][0] = __('Fixed header'); -$table_styles->data[$row][1] = html_print_checkbox_toogle_switch( +$table_styles->data[$row][1] = html_print_checkbox_switch( 'fixed_header', 1, $config['fixed_header'], @@ -525,7 +525,7 @@ $table_styles->data[$row][1] = html_print_checkbox_toogle_switch( $row++; $table_styles->data[$row][0] = __('Fixed menu'); -$table_styles->data[$row][1] = html_print_checkbox_toogle_switch( +$table_styles->data[$row][1] = html_print_checkbox_switch( 'fixed_menu', 1, $config['fixed_menu'], @@ -535,7 +535,7 @@ $row++; // For 5.1 Autohidden menu feature $table_styles->data['autohidden'][0] = __('Autohidden menu'); -$table_styles->data['autohidden'][1] = html_print_checkbox_toogle_switch( +$table_styles->data['autohidden'][1] = html_print_checkbox_switch( 'autohidden_menu', 1, $config['autohidden_menu'], @@ -543,7 +543,7 @@ $table_styles->data['autohidden'][1] = html_print_checkbox_toogle_switch( ); $table_styles->data[$row][0] = __('Visual effects and animation'); -$table_styles->data[$row][1] = html_print_checkbox_toogle_switch( +$table_styles->data[$row][1] = html_print_checkbox_switch( 'visual_animation', 1, $config['visual_animation'], @@ -567,7 +567,7 @@ $table_gis->size[0] = '50%'; $table_gis->data = []; $table_gis->data[$row][0] = __('GIS Labels').ui_print_help_tip(__('This enabling this, you get a label with agent name in GIS maps. If you have lots of agents in the map, will be unreadable. Disabled by default.'), true); -$table_gis->data[$row][1] = html_print_checkbox_toogle_switch( +$table_gis->data[$row][1] = html_print_checkbox_switch( 'gis_label', 1, $config['gis_label'], @@ -680,7 +680,7 @@ $table_font->data[$row][1] = html_print_input_text( $row++; $table_font->data[$row][0] = __('Show unit along with value in reports').ui_print_help_tip(__('This enabling this, max, min and avg values will be shown with units.'), true); -$table_font->data[$row][1] = html_print_checkbox_toogle_switch( +$table_font->data[$row][1] = html_print_checkbox_switch( 'simple_module_value', 1, $config['simple_module_value'], @@ -778,7 +778,7 @@ $table_chars->data[$row][1] = html_print_input_text( $row++; $table_chars->data[$row][0] = __('Use round corners'); -$table_chars->data[$row][1] = html_print_checkbox_toogle_switch( +$table_chars->data[$row][1] = html_print_checkbox_switch( 'round_corner', 1, $config['round_corner'], @@ -947,7 +947,7 @@ $table_other->data[$row][0] = __('Show report info with description').ui_print_h __('Custom report description info. It will be applied to all reports and templates by default.'), true ); -$table_other->data[$row][1] = html_print_checkbox_toogle_switch( +$table_other->data[$row][1] = html_print_checkbox_switch( 'custom_report_info', 1, $config['custom_report_info'], @@ -1061,7 +1061,7 @@ $table_other->data['custom_report_front-footer'][1] = html_print_textarea( $table_other->data[$row][0] = __('Show QR Code icon in the header'); -$table_other->data[$row][1] = html_print_checkbox_toogle_switch( +$table_other->data[$row][1] = html_print_checkbox_switch( 'show_qr_code_header', 1, $config['show_qr_code_header'], @@ -1099,7 +1099,7 @@ $table_other->data[$row][0] .= ui_print_help_tip( __('Show the group name instead the group icon.'), true ); -$table_other->data[$row][1] = html_print_checkbox_toogle_switch( +$table_other->data[$row][1] = html_print_checkbox_switch( 'show_group_name', 1, $config['show_group_name'], diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 701042448f..cb100db256 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -20,19 +20,19 @@ if (!isset($config)) { $working_dir = getcwd(); $working_dir = str_replace('\\', '/', $working_dir); - // Windows compatibility + // Windows compatibility. $levels = substr_count($working_dir, '/'); for ($i = 0; $i < $levels; $i++) { if (file_exists(str_repeat('../', $i).'config.php')) { include_once str_repeat('../', $i).'config.php'; break; - // Skip config.php loading after load the first one + // Skip config.php loading after load the first one. } else if (file_exists(str_repeat('../', $i).'include/config.php')) { // For path from the enterprise structure dirs. include_once str_repeat('../', $i).'include/config.php'; break; - // Skip config.php loading after load the first one + // Skip config.php loading after load the first one. } } } else { @@ -2307,7 +2307,7 @@ function html_print_checkbox($name, $value, $checked=false, $return=false, $disa /** - * Render a checkbox button input toogle switch type. Extended version, use html_print_checkbox_toogle_switch() to simplify. + * Render a checkbox button input switch type. Extended version, use html_print_checkbox_switch() to simplify. * * @param string Input name. * @param string Input value. @@ -2321,7 +2321,7 @@ function html_print_checkbox($name, $value, $checked=false, $return=false, $disa */ -function html_print_checkbox_toogle_switch_extended($name, $value, $checked, $disabled, $script, $attributes, $return=false, $id='') +function html_print_checkbox_switch_extended($name, $value, $checked, $disabled, $script, $attributes, $return=false, $id='') { static $idcounter = []; @@ -2334,7 +2334,7 @@ function html_print_checkbox_toogle_switch_extended($name, $value, $checked, $di $id_aux = preg_replace('/[^a-z0-9\:\;\-\_]/i', '', $name.($idcounter[$name] ? $idcounter[$name] : '')); - $output = '"; +} diff --git a/pandora_console/install.php b/pandora_console/install.php deleted file mode 100644 index fa60433a98..0000000000 --- a/pandora_console/install.php +++ /dev/null @@ -1,1105 +0,0 @@ - - - - -This means that if you do not have a backup you will irremissibly LOSE ALL THE STORED DATA, the configuration and everything relevant to your installation.
Are you sure of what you are going to do?
'; - echo "This wizard helps you to quick install Pandora FMS console and main database in your system.
-In four steps, this installer will check all dependencies and will create your configuration, ready to use.
-For more information, please refer to documentation.
- Pandora FMS Development Team
Pandora FMS is an OpenSource software project licensed under the GPL2 licence. Pandora FMS includes, as well, another software also licensed under LGPL and BSD licenses. Before continue, you must accept the licence terms.. -
For more information, please refer to our website at http://pandorafms.org and contact us if you have any kind of question about the usage of Pandora FMS
-If you dont accept the licence terms, please, close your browser and delete Pandora FMS files.
- "; - - if (!file_exists('COPYING')) { - echo "'; - echo "DB Engines"; - echo ' | '; - echo ' |
- This wizard will create your Pandora FMS database, - and populate it with all the data needed to run for the first time. -
-- You need a privileged user to create database schema, this is usually root user. - Information about root user will not be used or stored anymore. -
-- You can also deploy the scheme into an existing Database. - In this case you need a privileged Database user and password of that instance. -
-- Now, please, complete all details to configure your database and environment setup. -
-Please correct failures before trying again. - All database "; - if ($engine == 'oracle') { - $info .= 'objects '; - } else { - $info .= 'schemes '; - } - - $info .= 'created in this step have been dropped.
-For security, you now must manually delete this installer - ('install.php') file before trying to access to your Pandora FMS console. -
You should also install Pandora FMS Servers before trying to monitor anything; - please read documentation on how to install it.
-Default user is 'admin' with password 'pandora', - please change it both as soon as possible.
-Don't forget to check http://pandorafms.com - for updates. -
Select if you want to rename 'install.php'.
- - -