| Server IP : 173.209.174.21 / Your IP : 216.73.216.89 Web Server : Apache/2.4.58 (Ubuntu) System : Linux wcfs-server 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64 User : nodor ( 1000) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/share/webmin/webmin/ |
Upload File : |
#!/usr/bin/perl
# Change the current webmin theme overlay
require './webmin-lib.pl';
&ReadParse();
&error_setup($text{'themes_err4'});
# Get the overlay and make sure it is compatible
($gtheme) = split(/\s+/, $gconfig{'theme'});
if ($in{'overlay'}) {
%oinfo = &get_theme_info($in{'overlay'});
if ($oinfo{'overlays'} &&
&indexof($gtheme, split(/\s+/, $oinfo{'overlays'})) < 0) {
&error($text{'themes_eoverlay'});
}
}
&lock_file("$config_directory/config");
if ($in{'overlay'}) {
$gconfig{'theme'} = join(" ", $gtheme, $in{'overlay'});
}
else {
$gconfig{'theme'} = $gtheme;
}
&write_file("$config_directory/config", \%gconfig);
&unlock_file("$config_directory/config");
&lock_file($ENV{'MINISERV_CONFIG'});
&get_miniserv_config(\%miniserv);
if ($in{'overlay'}) {
$miniserv{'preroot'} = join(" ", $gtheme, $in{'overlay'});
}
else {
$miniserv{'preroot'} = $gtheme;
}
&put_miniserv_config(\%miniserv);
&unlock_file($ENV{'MINISERV_CONFIG'});
&reload_miniserv();
&webmin_log('theme', undef, undef, \%in);
&ui_print_header(undef, $text{'themes_title'}, "");
print "$text{'themes_ok2'}<p>\n";
print &js_redirect("/", "top", 1500);
&ui_print_footer("", $text{'index_return'});