$templates.shared.doctype {= include "templates.shared.util.encode_html"; string profile_name = internal.profile_name; =} {= expand(templates.shared.content_type); =}
$lang_options.profile.log.source.label $lang_options.profile.log.source.new_button | $lang_options.profile.log.source.show_matching_files_button
{= node log_source_node = "profiles." . profile_name . ".log.source"; node log_source; string log_source_name; string log_source_type; string log_source_label; string local_pathname; bool local_process_subdir = false; bool local_pattern_is_reg_expr = false; string ftp_username; string ftp_password; string ftp_hostname; string ftp_pathname; bool ftp_pattern_is_reg_expr = false; bool ftp_use_passive = false; string http_hostname; string http_pathname; string command; int local_number = 0; int ftp_number = 0; int http_number = 0; int command_number = 0; # debug_message("log source:\n" . node_as_string(log_source_node) . "\n"); # sort the log source node by type sort(log_source_node, "field:type,alphabetical,ascending"); # ---------------------------------------------- # Display log sources (temporary sorted by type) # ---------------------------------------------- foreach log_source log_source_node ( log_source_name = node_name(log_source); log_source_type = node_value(subnode_by_name(log_source, "type")); # ----------------- # log source header # ----------------- '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; print(`\n'); expand(`\n`); '\n'; '
`); if (log_source_type eq "local") then ( local_number++; log_source_label = 'Local Disk ' . local_number; ); if (log_source_type eq "ftp") then ( ftp_number++; log_source_label = 'FTP ' . ftp_number; ); if (log_source_type eq "http") then ( http_number++; log_source_label = 'HTTP ' . http_number; ); if (log_source_type eq "command") then ( command_number++; log_source_label = 'Command Line ' . command_number; ); expand('$log_source_label$lang_admin.general.edit_button | $lang_admin.general.delete_button
\n'; # --------------- # log source data # --------------- '\n'; if (log_source_type eq "local") then ( local_pathname = node_value(subnode_by_name(log_source, "pathname")); local_pathname = convert_local_code_page_to_utf8(local_pathname); if (subnode_exists(log_source, "process_subdirectories")) then ( local_process_subdir = node_value(subnode_by_name(log_source, "process_subdirectories")); ); if (subnode_exists(log_source, "pattern_is_regular_expression")) then ( local_pattern_is_reg_expr = node_value(subnode_by_name(log_source, "pattern_is_regular_expression")); ); '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; ); # local if (log_source_type eq "ftp") then ( ftp_username = node_value(subnode_by_name(log_source, "username")); ftp_password = node_value(subnode_by_name(log_source, "password")); ftp_hostname = node_value(subnode_by_name(log_source, "hostname")); ftp_pathname = node_value(subnode_by_name(log_source, "pathname")); int password_char_length = length(ftp_password); int count = 0; ftp_password = ""; while (count < password_char_length) ( ftp_password .= "*"; count++; ); if (subnode_exists(log_source, "pattern_is_regular_expression")) then ( ftp_pattern_is_reg_expr = node_value(subnode_by_name(log_source, "pattern_is_regular_expression")); ); if (subnode_exists(log_source, "use_passive")) then ( ftp_use_passive = node_value(subnode_by_name(log_source, "use_passive")); ); '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; ); # ftp if (log_source_type eq "http") then ( http_hostname = node_value(subnode_by_name(log_source, "hostname")); http_pathname = node_value(subnode_by_name(log_source, "pathname")); '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; '\n'; ); # http if (log_source_type eq "command") then ( command = node_value(subnode_by_name(log_source, "command")); '\n'; '\n'; '\n'; '\n'; ); # command '
' . lang_options.profile.log.source.type.local.pathname.label . ':' . encode_html(local_pathname) . '
\n'; ' '; lang_options.profile.log.source.process_log_source_subdirectories.label; '
\n'; ' '; lang_options.profile.log.source.use_regular_expressions_for_log_source.label; '
' . lang_options.profile.log.source.type.ftp.hostname.label . ':' . encode_html(ftp_hostname) . '
' . lang_options.profile.log.source.type.ftp.username.label . ':' . encode_html(ftp_username) . '
' . lang_options.profile.log.source.type.ftp.password.label . ':' . ftp_password . '
' . lang_options.profile.log.source.type.ftp.pathname.label . ':' . encode_html(ftp_pathname) . '
'; ' '; lang_options.profile.log.source.use_regular_expressions_for_log_source.label; '
'; ' '; lang_options.profile.log.source.type.ftp.use_passive.label; '\n'; '
' . lang_options.profile.log.source.type.http.hostname.label . ':' . encode_html(http_hostname) . '
' . lang_options.profile.log.source.type.http.pathname.label . ':' . encode_html(http_pathname) . '
' . lang_options.profile.log.source.type.command.command.label . ':' . encode_html(command) . '
\n'; ); # foreach log source expand(templates.shared.copyright); =}