| Server IP : 173.209.174.21 / Your IP : 216.73.216.79 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 : /proc/self/root/usr/share/webmin/apache/ |
Upload File : |
#!/usr/bin/perl
# edit_gmime_type.cgi
# Display a form for editing a MIME type from the global list
require './apache-lib.pl';
&ReadParse();
$access{'global'}==1 || &error($text{'mime_ecannot'});
if (defined($in{'line'})) {
&ui_print_header(undef, $text{'mime_edit'}, "");
open(MIME, "<$in{'file'}");
for($i=0; $i<=$in{'line'}; $i++) {
$line = <MIME>;
}
close(MIME);
$line =~ s/#.*$//;
$line =~ /^\s*(\S+)\s*(.*)$/;
$type = $1; @exts = split(/\s+/, $2);
}
else {
&ui_print_header(undef, $text{'mime_add'}, "");
}
print &ui_form_start("save_gmime_type.cgi");
print &ui_hidden("file", $in{'file'});
if ($type) {
print &ui_hidden("line", $in{'line'});
}
print &ui_table_start($text{'mime_header'}, undef, 2);
print &ui_table_row($text{'mime_type'},
&ui_textbox("type", $type, 40));
print &ui_table_row($text{'mime_ext'},
&ui_textarea("exts", join("\n", @exts), 5, 15));
print &ui_table_end();
print &ui_form_end([ [ "", $text{'save'} ] ]);
&ui_print_footer("edit_global.cgi?type=6", $text{'global_return'});