stta/stta/addhostsuser.cgi
2021-10-01 20:35:43 +01:00

47 lines
1.5 KiB
Perl
Executable File

#!/usr/bin/perl
# addhostsuser.cgi
# ... Services with Tarantella.
# STTA Rev. 1.3 Copyright (c) 2001-2004 Jesús Pérez Lorenzo --- license GNU GPL
# stta: (@#) 1.31051043346- [2004_01_29_102036]
require './stta-lib.pl';
&headerstta($text{'index_addhostsuser'}, "", "addhostsuser",undef,1,0,"$text{'headpage_right'}"."$text{'head_logout'}",undef,undef,"$text{head_below}" );
print "<hr><p>\n";
&foreign_require("proc", "proc-lib.pl");
&ReadParse();
$type_cmd = $in{ttacmd};
print "<table width=100% border>\n";
print "<tr $tb> <td><font color='$revtext'><b>$text{'titidx_adhostsuser'}</b></td> </tr>\n";
print "<tr $cb> <td><table width=100%>\n";
print "<center>\n";
$hostname=$in{hostname};
$username=$in{username};
$descrip=$in{descrip};
$password=$in{password};
if ($username) {
$alias=$username;
%h_hostsuser=&list_hostsuser();
if ( $h_hostsuser{$username}->{'username'} eq $username ) {
$err_msg=$text{'list_err'};
&footHere;
exit;
}
$organizationname="";
$dn_hostsuser="";
$ens_hostsuser="";
$lin_hostsuser=$username."::".$password."::".$descrip."::";
&out_objslist( "add", "addhostsuser.cgi", "hostsuser", "hostsuser_list", $username, $lin_hostsuser, undef );
print "<tr><p><b>".$text{'user_made'}.$username." -> ".$in{userhostsuser}."</b></tr>\n";
print "<tr></tr>\n";
}
print "<tr><tr></table></table><hr><p>\n";
&footer($config{'back_return'},$text{'index'});
print "<p><p><p>\n";
do "footer.pl";
exit;