width = '90%';
$table->data = array ();
// Current config["language"] could be set by user, not taken from global setup !
switch ($config["dbtype"]) {
case "mysql":
$current_system_lang = get_db_sql ('SELECT `value` FROM tconfig WHERE `token` = "language"');
break;
case "postgresql":
$current_system_lang = get_db_sql ('SELECT "value" FROM tconfig WHERE "token" = \'language\'');
break;
}
if ($current_system_lang == ""){
$current_system_lang = "en";
}
$table->data[0][0] = __('Language code for Pandora');
$table->data[0][1] = print_select_from_sql ('SELECT id_language, name FROM tlanguage',
'language', $current_system_lang , '', '', '', true);
$table->data[1][0] = __('Remote config directory');
$table->data[1][1] = print_input_text ('remote_config', $config["remote_config"], '', 30, 100, true);
$table->data[6][0] = __('Auto login (hash) password');
$table->data[6][1] = print_input_text ('loginhash_pwd', $config["loginhash_pwd"], '', 15, 15, true);
$table->data[8][0] = __('Timestamp or time comparation') . print_help_icon ("time_stamp-comparation", true);
$table->data[8][1] = __('Comparation in rollover').' ';
$table->data[8][1] .= print_radio_button ('prominent_time', "comparation", '', $config["prominent_time"], true);
$table->data[8][1] .= '
'.__('Timestamp in rollover').' ';
$table->data[8][1] .= print_radio_button ('prominent_time', "timestamp", '', $config["prominent_time"], true);
$table->data[9][0] = __('Time source') . print_help_icon ("timesource", true);
$sources["system"] = __('System');
$sources["sql"] = __('Database');
$table->data[9][1] = print_select ($sources, 'timesource', $config["timesource"], '', '', '', true);
$table->data[10][0] = __('Automatic update check');
$table->data[10][1] = __('Yes').' '.print_radio_button ('autoupdate', 1, '', $config["autoupdate"], true).' ';
$table->data[10][1] .= __('No').' '.print_radio_button ('autoupdate', 0, '', $config["autoupdate"], true);
$table->data[11][0] = __('Enforce https');
$table->data[11][1] = __('Yes').' '.print_radio_button_extended ('https', 1, '', $config["https"], false, "if (! confirm ('" . __('If SSL is not properly configured you will lose access to Pandora FMS Console. Do you want to continue?') . "')) return false", '', true) .' ';
$table->data[11][1] .= __('No').' '.print_radio_button ('https', 0, '', $config["https"], true);
$table->data[14][0] = __('Attachment store');
$table->data[14][1] = print_input_text ('attachment_store', $config["attachment_store"], '', 50, 255, true);
$table->data[15][0] = __('IP list with API access') .
print_help_tip (__("The list of IPs separate with carriage return."), true);
$list_ACL_IPs_for_API = get_parameter('list_ACL_IPs_for_API', implode("\n", $config['list_ACL_IPs_for_API']));
$table->data[15][1] = print_textarea('list_ACL_IPs_for_API', 2, 25, $list_ACL_IPs_for_API, 'style="height: 50px; width: 300px"', true);
$table->data[16][0] = __('API password') .
print_help_tip (__("Please be careful if you put a password put https access."), true);
$table->data[16][1] = print_input_text('api_password', $config['api_password'], '', 25, 255, true);
$table->data[17][0] = __('Enable GIS features in Pandora Console');
$table->data[17][1] = __('Yes').' '.print_radio_button ('activate_gis', 1, '', $config["activate_gis"], true).' ';
$table->data[17][1] .= __('No').' '.print_radio_button ('activate_gis', 0, '', $config["activate_gis"], true);
$table->data[20][0] = __('Timezone setup');
$table->data[20][1] = print_input_text ('timezone', $config["timezone"], '', 25, 25, true);
$sounds = get_sounds();
$table->data[21][0] = __('Sound for Alert fired');
$table->data[21][1] = print_select($sounds, 'sound_alert', $config['sound_alert'], 'replaySound(\'alert\');', '', '', true);
$table->data[21][1] .= ' ' . print_image("images/control_play.png", true, array("id" => "button_sound_alert", "style" => "vertical-align: middle;", "width" => "16")) . '';
$table->data[21][1] .= '