%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY
| Server IP : 14.207.165.8 / Your IP : 216.73.216.101 Web Server : Apache/2.4.18 (Ubuntu) System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : root ( 0) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/thread-self/root/usr/share/webmin/iscsi-server/ |
Upload File : |
#!/usr/bin/perl
# Show a form to edit or create a user
use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
require './iscsi-server-lib.pl';
our (%text, %in);
&ReadParse();
# Get the user, or create a new one
my $user;
if ($in{'new'}) {
&ui_print_header(undef, $text{'user_create'}, "");
$user = { 'mode' => 'chap' };
}
else {
&ui_print_header(undef, $text{'user_edit'}, "");
($user) = grep { $_->{'user'} eq $in{'user'} } &list_iscsi_users();
$user || &error($text{'user_egone'});
}
# Show editing form
print &ui_form_start("save_user.cgi", "post");
print &ui_hidden("new", $in{'new'});
print &ui_hidden("old", $in{'user'});
print &ui_table_start($text{'user_header'}, undef, 2);
# Username
print &ui_table_row($text{'user_user'},
&ui_textbox("iuser", $user->{'user'}, 40));
# Authentication method
print &ui_table_row($text{'user_mode'},
&ui_select("imode", lc($user->{'mode'}),
[ [ "none", $text{'user_modenone'} ],
[ "chap", "CHAP" ] ], 1, 0, 1));
# Password
print &ui_table_row($text{'user_pass'},
&ui_textbox("ipass", $user->{'pass'}, 20));
print &ui_table_end();
if ($in{'new'}) {
print &ui_form_end([ [ undef, $text{'create'} ] ]);
}
else {
print &ui_form_end([ [ undef, $text{'save'} ],
[ 'delete', $text{'delete'} ] ]);
}
&ui_print_footer("list_users.cgi", $text{'users_return'});