2009-03-04 06:53:59 +00:00
|
|
|
=head1 WebminCore.pm
|
|
|
|
|
|
|
|
Perl module that exports Webmin API functions. Example code :
|
|
|
|
|
|
|
|
use WebminCore;
|
|
|
|
init_config();
|
|
|
|
ui_print_header(undef, 'My Module', '');
|
|
|
|
print 'This is Webmin version ',get_webmin_version(),'<p>\n';
|
|
|
|
ui_print_footer();
|
|
|
|
|
|
|
|
Full function documentation is in web-lib-funcs.pl.
|
|
|
|
|
|
|
|
=cut
|
2009-02-25 06:48:25 +00:00
|
|
|
|
|
|
|
package WebminCore;
|
2022-12-05 19:03:10 +02:00
|
|
|
use lib ("$ENV{'LIBROOT'}/vendor_perl");
|
2009-02-25 06:48:25 +00:00
|
|
|
require Exporter;
|
|
|
|
@ISA = qw(Exporter);
|
|
|
|
|
2022-11-16 23:29:22 +02:00
|
|
|
# Export global variables to caller
|
|
|
|
$main::export_to_caller = 1;
|
|
|
|
|
2009-02-25 06:48:25 +00:00
|
|
|
# Add functions in web-lib-funcs.pl
|
|
|
|
# Generated with :
|
2021-01-29 17:40:38 +03:00
|
|
|
# grep -h "^sub " web-lib-funcs.pl ui-lib.pl | sed -e 's/sub //' | xargs echo
|
2025-06-03 02:01:07 +03:00
|
|
|
@EXPORT = qw(read_file read_file_cached read_file_cached_with_stat write_file html_escape html_unescape html_strip quote_escape quote_javascript tempname_dir tempname transname transname_timestamped trunc indexof indexoflc sysprint check_ipaddress check_ip6address generate_icon urlize un_urlize include copydata ReadParseMime ReadParse read_fully read_parse_mime_callback read_parse_mime_javascript PrintHeader header get_html_title get_html_framed_title get_html_status_line popup_header footer popup_footer load_module_preferences load_theme_library redirect kill_byname kill_byname_logged find_byname error error_stderr popup_error register_error_handler call_error_handlers error_setup wait_for fast_wait_for has_command make_date file_chooser_button popup_window_button popup_window_link read_acl acl_filename acl_check get_miniserv_config_file get_miniserv_config put_miniserv_config restart_miniserv reload_miniserv check_os_support http_download complete_http_download http_post ftp_download ftp_upload no_proxy open_socket download_timeout ftp_command to_ipaddress to_ip6address to_hostname icons_table replace_meta replace_file_line read_file_lines flush_file_lines unflush_file_lines unix_user_input unix_group_input hlink user_chooser_button group_chooser_button foreign_check foreign_exists foreign_available foreign_require foreign_call foreign_config foreign_installed foreign_defined get_system_hostname get_webmin_version get_webmin_version_release get_webmin_full_version get_module_acl get_group_module_acl save_module_acl save_group_module_acl init_config load_language_auto load_language text_subs text encode_base64 decode_base64 encode_base32 decode_base32 get_module_info get_all_module_infos list_themes get_theme_info list_locales list_languages safe_language read_env_file write_env_file lock_file unlock_file test_lock unlock_all_files can_lock_file webmin_log additional_log var_dump webmin_debug_log system_logged backquote_logged backquote_with_timeout backquote_command kill_logged rename_logged rename_file symlink_logged symlink_file link_file make_dir make_dir_recursive set_ownership_permissions unlink_logged unlink_file copy_permissions_source_dest copy_source_dest move_source_dest remote_session_name verify_session_id remote_foreign_require remote_foreign_call remote_foreign_check remote_foreign_config remote_eval remote_write remote_read remote_finished remote_error_setup remote_rpc_call remote_multi_callback remote_multi_callback_error serialise_variable unserialise_variable other_groups date_chooser_button help_file read_help_file seed_random disk_usage_kb recursive_disk_usage help_search_link make_http_connection validate_ssl_connection read_http_connection write_http_connection close_http_connection clean_environment reset_environment clean_language progress_callback switch_to_remote_user switch_to_unix_user eval_as_unix_user create_user_config_dirs create_missing_homedir filter_javascript resolve_links simplify_path same_file flush_webmin_caches list_usermods available_usermods get_available_module_infos get_visible_module_infos get_visible_modules_categories is_under_directory parse_http_url check_clicks_function load_entities_map entities_to_ascii get_product_name get_charset get_display_hostname save_module_config save_user_module_config nice_size get_perl_path get_goto_module select_all_link select_invert_link select_rows_link check_pid_file get_mod_lib module_root_directory list_mime_types guess_mime_type open_tempfile close_tempfile print_tempfile is_selinux_enabled get_clear_file_attributes reset_file_attributes cleanup_tempnames open_lock_tempfile END month_to_number number_to_month get_rbac_module_acl supports_rbac supports_ipv6 use_rbac_module_acl execute_command open_readfile open_execute_command translate_filename translate_command register_filename_callback register_command_callback capture_function_output capture_function_output_tempfile modules_chooser_button substitute_template substitute_pattern running_in_zone running_in_vserver running_in_xen running_in_openvz list_categories is_readonly_mode
|
2009-02-25 06:48:25 +00:00
|
|
|
|
|
|
|
# Add global variables in web-lib.pl
|
|
|
|
push(@EXPORT, qw(&unique));
|
2022-01-23 16:52:31 +03:00
|
|
|
push(@EXPORT, qw($config_directory $var_directory $remote_error_handler %month_to_number_map %number_to_month_map $webmin_feedback_address $default_lang $default_charset $module_index_name $module_index_link %in $in @in $progress_callback_prefix $progress_callback_url $wait_for_debug $wait_for_input @matches $theme_no_table $webmin_logfile $pragma_no_cache));
|
2009-02-25 06:48:25 +00:00
|
|
|
|
2009-03-04 06:53:59 +00:00
|
|
|
# Functions defined in themes
|
2025-04-25 20:01:30 +03:00
|
|
|
push(@EXPORT, qw(&theme_post_save_domain &theme_post_save_domains &theme_post_save_server &theme_select_server &theme_select_domain &theme_post_save_folder &theme_post_change_modules &theme_address_button &theme_virtualmin_ui_rating_selector &theme_virtualmin_ui_show_cron_time &theme_virtualmin_ui_parse_cron_time &theme_virtualmin_ui_html_editor_bodytags &theme_virtualmin_ui_show_html_editor &theme_post_change_theme &theme_pre_change_theme &theme_fonts &theme_css_inline &theme_forgot_url &theme_forgot_handler));
|
2009-03-04 06:53:59 +00:00
|
|
|
|
2009-03-05 21:36:04 +00:00
|
|
|
$called_from_webmin_core = 1;
|
2014-04-26 10:21:18 -07:00
|
|
|
do "web-lib.pl";
|
|
|
|
do "ui-lib.pl";
|
2009-02-25 06:48:25 +00:00
|
|
|
|
|
|
|
1;
|