| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/home/SERVERWEB/webmin-2.105/mount/ |
Upload File : |
#!/usr/bin/perl
# nfs_export.cgi
# Display a list of NFS exports on some host for the user to choose from
require './mount-lib.pl';
&ReadParse();
&popup_header(&text('nfs_choose', &html_escape($in{'server'})));
print <<EOF;
<script>
function choose(f)
{
top.opener.ifield.value = f;
window.close();
}
</script>
EOF
if ($error = &exports_list($in{'server'}, \@dirs, \@clients)) {
print "<b>",&text('nfs_failed', &html_escape($in{'server'}),
"<p><tt>$error</tt><p>"),"</b>\n";
exit;
}
print "<b>$text{'nfs_seldir'}</b>\n";
if (defined(&nfs_max_version) && &nfs_max_version($in{'server'}) >= 4) {
print "<br>$text{'nfs_seldirv4'}\n";
}
print "<table border width=100%>\n";
print "<tr $tb> <td><b>$text{'nfs_dir'}</b></td> ",
"<td><b>$text{'nfs_clients'}</b></td> </tr>\n";
for($i=0; $i<@dirs; $i++) {
print "<tr $cb>\n";
print "<td>".&ui_link("#", $dirs[$i], undef, "onClick='choose(\"$dirs[$i]\"); return false;'" );
print "</td>\n";
printf "<td>%s</td>\n",
length($clients[$i]) > 45 ?
&html_escape(substr($clients[$i], 0, 45))." ..." :
&html_escape($clients[$i]);
print "</tr>\n";
}
print "</table>\n";
&popup_footer();