use SL::User;
$form = new Form;
+$form->{"root"} = "root login";
$locale = new Locale $language, "admin";
if ($form->{action}) {
+
$subroutine = $locale->findsub($form->{action});
if ($subroutine eq 'login') {
. $locale->text('Login') . qq|"></td>
</tr>
<input type=hidden name=action value=login>
-<input type=hidden name=root value="root login">
<input type=hidden name=path value=$form->{path}>
</table>
print qq|
-<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$form->{rpw}">
-<input type=hidden name=root value="$form->{root}">
+<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&rpw=$form->{rpw}">
<input type=hidden name=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
foreach $key (sort keys %member) {
$href =
- "$script?action=edit&login=$key&path=$form->{path}&root=$form->{root}&rpw=$form->{rpw}";
+ "$script?action=edit&login=$key&path=$form->{path}&rpw=$form->{rpw}";
$href =~ s/ /%20/g;
$member{$key}{templates} =~ s/^$templates\///;
<input type=hidden name=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
-<input type=hidden name=root value="$form->{root}">
<br><input type=submit class=submit name=action value="|
. $locale->text('Add User') . qq|">
. $locale->text('Password')
. qq|</b> <input type=password name=password size=8>
-<input type=hidden name=root value="$form->{root}">
<input type=hidden name=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
$root->save_member($memberfile);
$form->{callback} =
- "$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$root->{password}";
+ "$form->{script}?action=list_users&path=$form->{path}&rpw=$root->{password}";
$form->redirect($locale->text('Password changed!'));
}
sub check_password {
-
$root = new User "$memberfile", $form->{root};
- if ($root->{password}) {
- if ($root->{password} ne $form->{rpw}) {
- $form->error($locale->text('Incorrect Password!'));
- }
+ if (!$root->{password} || ($root->{password} ne $form->{rpw})) {
+ $form->error($locale->text('Incorrect Password!'));
}
}
</td></tr>
</table>
-<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$form->{rpw}">
-<input type=hidden name=root value="$form->{root}">
+<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&rpw=$form->{rpw}">
<input type=hidden name=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
<input name=dbupdate type=hidden value="$form->{dbupdate}">
-<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$form->{rpw}">
+<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&rpw=$form->{rpw}">
-<input type=hidden name=root value="$form->{root}">
<input type=hidden name=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
<input type=hidden name=dbpasswd value=$form->{dbpasswd}>
<input type=hidden name=dbdefault value=$form->{dbdefault}>
-<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$form->{rpw}">
+<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&rpw=$form->{rpw}">
-<input type=hidden name=root value="$form->{root}">
<input type=hidden name=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
. qq|
-<input type=hidden name=root value="$form->{root}">
<input type=hidden name=path value="$form->{path}">
<input type=hidden name=rpw value="$form->{rpw}">
<input type=hidden name=dbpasswd value=$form->{dbpasswd}>
<input type=hidden name=dbdefault value=$form->{dbdefault}>
-<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$form->{rpw}">
+<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&rpw=$form->{rpw}">
-<input type=hidden name=root value="$form->{root}">
<input type=hidden name=path value="$form->{path}">
<input type=hidden name=rpw value="$form->{rpw}">
. qq|
-<input type=hidden name=root value="$form->{root}">
<input type=hidden name=path value="$form->{path}">
<input type=hidden name=rpw value="$form->{rpw}">
unlink "$userspath/nologin";
$form->{callback} =
- "$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$root->{password}";
+ "$form->{script}?action=list_users&path=$form->{path}&rpw=$root->{password}";
$form->redirect($locale->text('Lockfile removed!'));
close(FH);
$form->{callback} =
- "$form->{script}?action=list_users&path=$form->{path}&root=$form->{root}&rpw=$root->{password}";
+ "$form->{script}?action=list_users&path=$form->{path}&rpw=$root->{password}";
$form->redirect($locale->text('Lockfile created!'));