Revision f8ec8de4
Added by Renato Botelho about 15 years ago
usr/local/www/diag_authentication.php | ||
---|---|---|
49 | 49 |
|
50 | 50 |
$authcfg = auth_get_authserver($_POST['authmode']); |
51 | 51 |
if (!$authcfg) |
52 |
$input_errors[] = "{$_POST['authmode']} is not a valid authentication server ";
|
|
52 |
$input_errors[] = $_POST['authmode'] . " " . gettext("is not a valid authentication server");
|
|
53 | 53 |
|
54 | 54 |
if (empty($_POST['username']) || empty($_POST['password'])) |
55 |
$input_errors[] = "A username and password must be specified.";
|
|
55 |
$input_errors[] = gettext("A username and password must be specified.");
|
|
56 | 56 |
|
57 | 57 |
if (!$input_errors) { |
58 | 58 |
if (authenticate_user($_POST['username'], $_POST['password'], $authcfg)) { |
59 |
$savemsg = "User: {$_POST['username']} authenticated sucessfully.";
|
|
59 |
$savemsg = gettext("User") . ": " . $_POST['username'] . " " . gettext("authenticated sucessfully.");
|
|
60 | 60 |
$groups = getUserGroups($_POST['username'], $authcfg); |
61 |
$savemsg .= "<br />This user is member of this groups: <br />";
|
|
61 |
$savemsg .= "<br />" + gettext("This user is member of this groups") + ": <br />";
|
|
62 | 62 |
foreach ($groups as $group) |
63 | 63 |
$savemsg .= "{$group} "; |
64 | 64 |
} else { |
65 |
$input_errors[] = "Authentication failed.";
|
|
65 |
$input_errors[] = gettext("Authentication failed.");
|
|
66 | 66 |
} |
67 | 67 |
} |
68 | 68 |
} |
69 |
$pgtitle = array("Diagnostics","Authentication");
|
|
69 |
$pgtitle = array(gettext("Diagnostics"),gettext("Authentication"));
|
|
70 | 70 |
include("head.inc"); |
71 | 71 |
|
72 | 72 |
?> |
73 | 73 |
|
74 | 74 |
<body link="#000000" vlink="#000000" alink="#000000"> |
75 |
|
|
75 |
|
|
76 | 76 |
<?php include("fbegin.inc"); ?> |
77 | 77 |
<?php if ($input_errors) print_input_errors($input_errors);?> |
78 | 78 |
<?php if ($savemsg) print_info_box($savemsg);?> |
... | ... | |
87 | 87 |
<form id="iform" name="iform" action="diag_authentication.php" method="post"> |
88 | 88 |
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="6"> |
89 | 89 |
<tr> |
90 |
<td width="22%" valign="top" class="vncell">Authentication Server</td>
|
|
90 |
<td width="22%" valign="top" class="vncell"><?=gettext("Authentication Server"); ?></td>
|
|
91 | 91 |
<td width="78%" class="vtable"> |
92 | 92 |
<select name='authmode' id='authmode' class="formselect" > |
93 | 93 |
<?php |
... | ... | |
103 | 103 |
</td> |
104 | 104 |
</tr> |
105 | 105 |
<tr> |
106 |
<td width="22%" valign="top" class="vncell">Username</td>
|
|
106 |
<td width="22%" valign="top" class="vncell"><?=gettext("Username"); ?></td>
|
|
107 | 107 |
<td width="78%" class="vtable"> |
108 | 108 |
<input class="formfld unknown" size='20' id='username' name='username' value='<?=$pconfig['username'];?>' /> |
109 | 109 |
</td> |
110 | 110 |
</tr> |
111 | 111 |
<tr> |
112 |
<td width="22%" valign="top" class="vncell">Password</td>
|
|
112 |
<td width="22%" valign="top" class="vncell"><?=gettext("Password"); ?></td>
|
|
113 | 113 |
<td width="78%" class="vtable"> |
114 | 114 |
<input class="formfld pwd" type='password' size='20' id='password' name='password' value='<?=$pconfig['password'];?>' /> |
115 | 115 |
</td> |
Also available in: Unified diff
Sync with mainline, diag_* files were missing