mirror of
https://github.com/webmin/webmin.git
synced 2026-02-16 19:52:16 +00:00
@@ -156,47 +156,47 @@ $rv .= "<table id='show_backup_destination' cellpadding=1 cellspacing=0>";
|
||||
|
||||
# Local file field
|
||||
$rv .= "<tr><td>".&ui_oneradio("$_[0]_mode", 0, undef, $mode == 0)."</td>\n";
|
||||
$rv .= "<td colspan=2>$text{'backup_mode0'} ".
|
||||
&ui_textbox("$_[0]_file", $mode == 0 ? $path : "", 40).
|
||||
$rv .= "<td>$text{'backup_mode0'} </td><td colspan='3'>".
|
||||
&ui_textbox("$_[0]_file", $mode == 0 ? $path : "", 60).
|
||||
" ".&file_chooser_button("$_[0]_file")."</td> </tr>\n";
|
||||
|
||||
# FTP file fields
|
||||
$rv .= "<tr><td>".&ui_oneradio("$_[0]_mode", 1, undef, $mode == 1)."</td>\n";
|
||||
$rv .= "<td>$text{'backup_mode1'} ".
|
||||
$rv .= "<td>$text{'backup_mode1'} </td><td>".
|
||||
&ui_textbox("$_[0]_server", $mode == 1 ? $server : undef, 20).
|
||||
"</td>\n";
|
||||
$rv .= "<td>$text{'backup_path'} ".
|
||||
&ui_textbox("$_[0]_path", $mode == 1 ? $path : undef, 40).
|
||||
$rv .= "<td> $text{'backup_path'} </td><td> ".
|
||||
&ui_textbox("$_[0]_path", $mode == 1 ? $path : undef, 20).
|
||||
"</td> </tr>\n";
|
||||
$rv .= "<tr> <td></td>\n";
|
||||
$rv .= "<td>$text{'backup_login'} ".
|
||||
&ui_textbox("$_[0]_user", $mode == 1 ? $user : undef, 15).
|
||||
$rv .= "<td>$text{'backup_login'} </td><td> ".
|
||||
&ui_textbox("$_[0]_user", $mode == 1 ? $user : undef, 20).
|
||||
"</td>\n";
|
||||
$rv .= "<td>$text{'backup_pass'} ".
|
||||
&ui_password("$_[0]_pass", $mode == 1 ? $pass : undef, 15).
|
||||
$rv .= "<td> $text{'backup_pass'} </td><td> ".
|
||||
&ui_password("$_[0]_pass", $mode == 1 ? $pass : undef, 20).
|
||||
"</td> </tr>\n";
|
||||
$rv .= "<tr> <td></td>\n";
|
||||
$rv .= "<td>$text{'backup_port'} ".
|
||||
$rv .= "<td colspan='3'>$text{'backup_port'} ".
|
||||
&ui_opt_textbox("$_[0]_port", $mode == 1 ? $port : undef, 5,
|
||||
$text{'default'})."</td> </tr>\n";
|
||||
|
||||
# SCP file fields
|
||||
$rv .= "<tr><td>".&ui_oneradio("$_[0]_mode", 2, undef, $mode == 2)."</td>\n";
|
||||
$rv .= "<td>$text{'backup_mode2'} ".
|
||||
$rv .= "<td>$text{'backup_mode2'} </td><td>".
|
||||
&ui_textbox("$_[0]_sserver", $mode == 2 ? $server : undef, 20).
|
||||
"</td>\n";
|
||||
$rv .= "<td>$text{'backup_path'} ".
|
||||
&ui_textbox("$_[0]_spath", $mode == 2 ? $path : undef, 40).
|
||||
$rv .= "<td> $text{'backup_path'} </td><td> ".
|
||||
&ui_textbox("$_[0]_spath", $mode == 2 ? $path : undef, 20).
|
||||
"</td> </tr>\n";
|
||||
$rv .= "<tr> <td></td>\n";
|
||||
$rv .= "<td>$text{'backup_login'} ".
|
||||
&ui_textbox("$_[0]_suser", $mode == 2 ? $user : undef, 15).
|
||||
$rv .= "<td>$text{'backup_login'} </td><td> ".
|
||||
&ui_textbox("$_[0]_suser", $mode == 2 ? $user : undef, 20).
|
||||
"</td>\n";
|
||||
$rv .= "<td>$text{'backup_pass'} ".
|
||||
&ui_password("$_[0]_spass", $mode == 2 ? $pass : undef, 15).
|
||||
$rv .= "<td> $text{'backup_pass'} </td><td> ".
|
||||
&ui_password("$_[0]_spass", $mode == 2 ? $pass : undef, 20).
|
||||
"</td> </tr>\n";
|
||||
$rv .= "<tr> <td></td>\n";
|
||||
$rv .= "<td>$text{'backup_port'} ".
|
||||
$rv .= "<td colspan='3'>$text{'backup_port'} ".
|
||||
&ui_opt_textbox("$_[0]_sport", $mode == 2 ? $port : undef, 5,
|
||||
$text{'default'})."</td> </tr>\n";
|
||||
|
||||
@@ -204,7 +204,7 @@ if ($_[2] == 1) {
|
||||
# Uploaded file field
|
||||
$rv .= "<tr><td>".&ui_oneradio("$_[0]_mode", 3, undef, $mode == 3).
|
||||
"</td>\n";
|
||||
$rv .= "<td colspan=2>$text{'backup_mode3'} ".
|
||||
$rv .= "<td colspan=3>$text{'backup_mode3'} ".
|
||||
&ui_upload("$_[0]_upload", 40).
|
||||
"</td> </tr>\n";
|
||||
}
|
||||
@@ -212,7 +212,7 @@ elsif ($_[2] == 2) {
|
||||
# Output to browser option
|
||||
$rv .= "<tr><td>".&ui_oneradio("$_[0]_mode", 4, undef, $mode == 4).
|
||||
"</td>\n";
|
||||
$rv .= "<td colspan=2>$text{'backup_mode4'}</td> </tr>\n";
|
||||
$rv .= "<td colspan=3>$text{'backup_mode4'}</td> </tr>\n";
|
||||
}
|
||||
|
||||
$rv .= "</table>\n";
|
||||
|
||||
@@ -27,7 +27,7 @@ print &ui_form_start("save.cgi", "post");
|
||||
print &ui_hidden("new", $in{'new'});
|
||||
print &ui_hidden("id", $in{'id'});
|
||||
|
||||
my @tds = ( "width=30%" );
|
||||
my @tds = ( "width=20% nowrap" );
|
||||
print &ui_hidden_table_start($text{'edit_header'}, "width=100%", 2,
|
||||
"main", 1, \@tds);
|
||||
|
||||
|
||||
@@ -14,80 +14,59 @@ sub my_urlize{
|
||||
}
|
||||
|
||||
sub print_cert_form{
|
||||
my $form=$_[0];
|
||||
my $certfield;
|
||||
if ($form=~/^gen(.*)$/) {$certfield=$1."file";}
|
||||
print <<EOF;
|
||||
$text{'gencert_password_notice'}
|
||||
<hr>
|
||||
<form action=$form.cgi method=post>
|
||||
<input type=hidden name=submitted value=generate>
|
||||
<table border>
|
||||
<tr $tb> <td align=center><b>$text{$form.'_header'}</b></td> </tr>
|
||||
<tr $cb> <td><table>
|
||||
<tr><td>$text{$form.'_'.$certfield}</td><td><input name=$certfield size=40 value="$in{$certfield}"></td></tr>
|
||||
<tr><td>$text{'keyfile'}</td><td><input name=keyfile size=40 value="$in{'keyfile'}"></td></tr>
|
||||
EOF
|
||||
if ($form eq "gencert"){
|
||||
print "<tr><td>$text{'keycertfile'}</td><td><input name=keycertfile size=40 value=\"$in{'keycertfile'}\"></td></tr>";
|
||||
}
|
||||
print <<EOF;
|
||||
<tr><td>$text{'password'}</td><td><input name=password size=40 type=password value="$in{'password'}"></td></tr>
|
||||
<tr><td>$text{'confirm_password'}</td><td><input name=confirm_password size=40 type=password value="$in{'confirm_password'}"></td></tr>
|
||||
<tr><td>$text{'keysize'}</td><td>
|
||||
<table width=100%><tr>
|
||||
<td width=33%><input name=keysize type=radio value=512$checked[0]> 512</td>
|
||||
<td width=33%><input name=keysize type=radio value=1024$checked[1]> 1024</td>
|
||||
<td width=33%><input name=keysize type=radio value=2048$checked[2]> 2048</td>
|
||||
</tr></table>
|
||||
</td></tr>
|
||||
EOF
|
||||
if ($form eq "gencert"){
|
||||
print <<EOF;
|
||||
<tr><td>$text{$form.'_days'}</td><td><input name=days size=40 value="$in{'days'}"></td></tr>
|
||||
EOF
|
||||
}
|
||||
print <<EOF;
|
||||
<tr><td>$text{'cn'}</td><td><input name=cn size=40 value="$in{'cn'}"></td></tr>
|
||||
<tr><td>$text{'o'}</td><td><input name=o size=40 value="$in{'o'}"></td></tr>
|
||||
<tr><td>$text{'ou'}</td><td><input name=ou size=40 value="$in{'ou'}"></td></tr>
|
||||
<tr><td>$text{'l'}</td><td><input name=l size=40 value="$in{'l'}"></td></tr>
|
||||
<tr><td>$text{'st'}</td><td><input name=st size=40 value="$in{'st'}"></td></tr>
|
||||
<tr><td>$text{'c'}</td><td><input name=c size=2 maxlength=2 value="$in{'c'}"></td></tr>
|
||||
<tr><td>$text{'emailAddress'}</td><td><input name=emailAddress size=40 value="$in{'emailAddress'}"></td></tr>
|
||||
<tr> <td colspan=2 align=right>
|
||||
<input type=reset value="$text{'reset'}">
|
||||
<input type=submit value="$text{$form.'_generate'}"></td> </tr>
|
||||
|
||||
</table></td></tr></table>
|
||||
</form>
|
||||
EOF
|
||||
my $form=$_[0];
|
||||
my $certfield;
|
||||
if ($form=~/^gen(.*)$/) {$certfield=$1."file";}
|
||||
print $text{'gencert_password_notice'};
|
||||
print &ui_hr();
|
||||
print &ui_form_start("$form.cgi", "post");
|
||||
print "<input type=hidden name=submitted value=generate>";
|
||||
print &ui_table_start($text{$form.'_header'}, undef, 2);
|
||||
print &ui_table_row($text{$form.'_'.$certfield}, &ui_textbox($certfield, $in{$certfield}, 40));
|
||||
print &ui_table_row($text{'keyfile'}, &ui_textbox("keyfile", $in{'keyfile'}, 40));
|
||||
if ($form eq "gencert") {
|
||||
print &ui_table_row($text{'keycertfile'}, &ui_textbox("keycertfile", $in{'keycertfile'}, 40));
|
||||
}
|
||||
print &ui_table_row($text{'password'}, &ui_password("password", $in{'password'}, 40));
|
||||
print &ui_table_row($text{'confirm_password'}, &ui_password("confirm_password", $in{'confirm_password'}, 40));
|
||||
print &ui_table_row($text{'keysize'},
|
||||
&ui_oneradio("keysize", "512", "512", ( $checked[0] ? 1 : undef ) )." ".
|
||||
&ui_oneradio("keysize", "1024", "1024", ( $checked[1] ? 1 : undef ) )." ".
|
||||
&ui_oneradio("keysize", "2048", "2048", ( $checked[2] ? 1 : undef ) ) );
|
||||
if ($form eq "gencert") {
|
||||
print &ui_table_row($text{$form.'_days'}, &ui_textbox("days", $in{'days'}, 40));
|
||||
}
|
||||
print &ui_table_row($text{'cn'}, &ui_textbox("cn", $in{'cn'}, 40));
|
||||
print &ui_table_row($text{'o'}, &ui_textbox("o", $in{'o'}, 40));
|
||||
print &ui_table_row($text{'ou'}, &ui_textbox("ou", $in{'ou'}, 40));
|
||||
print &ui_table_row($text{'l'}, &ui_textbox("l", $in{'l'}, 40));
|
||||
print &ui_table_row($text{'st'}, &ui_textbox("st", $in{'st'}, 40));
|
||||
print &ui_table_row($text{'c'}, &ui_textbox("c", $in{'c'}, 40, undef, 2));
|
||||
print &ui_table_row($text{'emailAddress'}, &ui_textbox("emailAddress", $in{'emailAddress'}, 40));
|
||||
print &ui_table_row(" ",
|
||||
&ui_reset($text{'reset'})." ".&ui_submit($text{$form.'_generate'}) );
|
||||
print &ui_table_end();
|
||||
print &ui_form_end();
|
||||
}
|
||||
|
||||
sub print_sign_form {
|
||||
my $form=$_[0];
|
||||
my $certfield;
|
||||
print <<EOF;
|
||||
$text{'signcsr_desc'}
|
||||
<hr>
|
||||
<form action=$form.cgi method=post>
|
||||
<input type=hidden name=submitted value=sign>
|
||||
<table border>
|
||||
<tr $tb> <td align=center><b>$text{'signcsr_header'}</b></td> </tr>
|
||||
<tr $cb> <td><table>
|
||||
<tr><td>$text{'signcsr_csrfile'}</td><td><input name=csrfile size=40 value="$in{'csrfile'}"></td></tr>
|
||||
<tr><td>$text{'signcsr_signfile'}</td><td><input name=signfile size=40 value="$in{'signfile'}"></td></tr>
|
||||
<tr><td>$text{'signcsr_keyfile'}</td><td><input name=keyfile size=40 value="$in{'keyfile'}"></td></tr>
|
||||
<tr><td>$text{'signcsr_keycertfile'}</td><td><input name=keycertfile size=40 value="$in{'keycertfile'}"></td></tr>
|
||||
<tr><td><a onClick='window.open("/help.cgi/certmgr/signcsr_ca_pass", "help", "toolbar=no,menubar=no,scrollbars=yes,width=400,height=300,resizable=yes"); return false' href="/help.cgi/certmgr/signcsr_ca_pass"><b>$text{'signcsr_ca_passphrase'}</b></a></td><td> <input name=password size=40 type=password value="$in{'password'}"> </td></tr>
|
||||
<tr><td>$text{'signcsr_days'}</td><td><input name=days size=40 value="$in{'days'}"></td></tr>
|
||||
<tr> <td colspan=2 align=right>
|
||||
<input type=reset value="$text{'reset'}">
|
||||
<input type=submit value="$text{'signcsr_generate'}"></td> </tr>
|
||||
|
||||
</table></td></tr></table>
|
||||
</form>
|
||||
EOF
|
||||
my $form=$_[0];
|
||||
my $certfield;
|
||||
print $text{'signcsr_desc'};
|
||||
print &ui_hr();
|
||||
print &ui_form_start("$form.cgi", "post");
|
||||
print "<input type=hidden name=submitted value=sign>";
|
||||
print &ui_table_start($text{'signcsr_header'}, undef, 2);
|
||||
print &ui_table_row($text{'signcsr_csrfile'}, &ui_textbox("csrfile", $in{'csrfile'}, 40));
|
||||
print &ui_table_row($text{'signcsr_signfile'}, &ui_textbox("signfile", $in{'signfile'}, 40));
|
||||
print &ui_table_row($text{'signcsr_keyfile'}, &ui_textbox("keycertfile", $in{'keycertfile'}, 40));
|
||||
print &ui_table_row("<a onClick='window.open(\"/help.cgi/certmgr/signcsr_ca_pass\", \"help\", \"toolbar=no,menubar=no,scrollbars=yes,width=400,height=300,resizable=yes\"); return false' href=\"/help.cgi/certmgr/signcsr_ca_pass\"><b>$text{'signcsr_ca_passphrase'}</b></a>",
|
||||
&ui_password("password", $in{'password'}, 40));
|
||||
print &ui_table_row($text{'signcsr_days'}, &ui_textbox("days", $in{'days'}, 40));
|
||||
print &ui_table_row(" ",
|
||||
&ui_reset($text{'reset'})." ".&ui_submit($text{'signcsr_generate'}) );
|
||||
print &ui_table_end();
|
||||
print &ui_form_end();
|
||||
}
|
||||
|
||||
sub print_cert_info{
|
||||
|
||||
@@ -9,18 +9,12 @@ if (! -d $config{'ssl_csr_dir'} ) { system("mkdir -p -m 0755 $config{'ssl_csr_di
|
||||
if (! -d $config{'ssl_key_dir'} ) { system("mkdir -p -m 0700 $config{'ssl_key_dir'}"); }
|
||||
|
||||
&ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1);
|
||||
|
||||
print <<EOF;
|
||||
<table border>
|
||||
<tr $tb> <td align=center><b>$text{'index_header'}</b></td> </tr>
|
||||
<tr $cb> <td><table width=100%><tr>
|
||||
EOF
|
||||
print &ui_table_start($text{'index_header'}, undef, 2);
|
||||
foreach $p (@pages) {
|
||||
next if (!$access{$p});
|
||||
$txt = $text{'index_'.$p};
|
||||
print "<tr> <td><a href=$p.cgi><img src=images/$p.gif border=0></a>\n";
|
||||
print "</td><td><a href=$p.cgi>$txt</a></td></tr>\n";
|
||||
}
|
||||
print "</table></td></tr></table>\n";
|
||||
print &ui_columns_row(["<a href=$p.cgi><img src=images/$p.gif border=0></a>", "<a href=$p.cgi>$txt</a>"]);
|
||||
}
|
||||
print ui_table_end();
|
||||
|
||||
&ui_print_footer("/", $text{'index_index'});
|
||||
|
||||
Reference in New Issue
Block a user