$menufile = "menu.ini";
+use DBI;
use SL::Form;
use SL::User;
+require "bin/mozilla/common.pl";
+
$form = new Form;
$form->{"root"} = "root login";
$locale = new Locale $language, "admin";
-eval { require DBI; };
-$form->error($locale->text('DBI not installed!')) if ($@);
-
# customization
-if (-f "$form->{path}/custom_$form->{script}") {
- eval { require "$form->{path}/custom_$form->{script}"; };
+if (-f "bin/mozilla/custom_$form->{script}") {
+ eval { require "bin/mozilla/custom_$form->{script}"; };
$form->error($@) if ($@);
}
&check_password;
- &$subroutine;
+ call_sub($subroutine);
} else {
. $locale->text('Login') . qq|"></td>
</tr>
<input type=hidden name=action value=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}&rpw=$form->{rpw}">
-<input type=hidden name=path value=$form->{path}>
+<input name=callback type=hidden value="$form->{script}?action=list_users&rpw=$form->{rpw}">
<input type=hidden name=rpw value=$form->{rpw}>
<input type=submit class=submit name=action value="|
foreach $key (sort keys %member) {
$href =
- "$script?action=edit&login=$key&path=$form->{path}&rpw=$form->{rpw}";
+ "$script?action=edit&login=$key&rpw=$form->{rpw}";
$href =~ s/ /%20/g;
$member{$key}{templates} =~ s/^$templates\///;
</tr>
</table>
-<input type=hidden name=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
<br><input type=submit class=submit name=action value="|
<td><input type=submit name=action value="|
. $locale->text('Login') . qq|"></td>
</tr>
-<input type=hidden name=path value=$form->{path}>
</table>
</td>
</tr>
}
}
- opendir CSS, "css/.";
- @all = sort(grep({ /\.css$/ && ($_ ne "tabcontent.css") } readdir(CSS)));
- closedir CSS;
+# opendir CSS, "css/.";
+# @all = grep /.*\.css$/, readdir CSS;
+# closedir CSS;
+
+# css dir has styles that are not intended as general layouts.
+# reverting to hardcoded list
+ @all = qw(lx-office-erp.css Win2000.css);
foreach $item (@all) {
if ($item eq $myconfig->{stylesheet}) {
</tr>
</table>
-<input type=hidden name=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
<p>
$root->save_member($memberfile);
$form->{callback} =
- "$form->{script}?action=list_users&path=$form->{path}&rpw=$root->{password}";
+ "$form->{script}?action=list_users&rpw=$root->{password}";
$form->redirect($locale->text('Password changed!'));
</td></tr>
</table>
-<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 name=callback type=hidden value="$form->{script}?action=list_users&rpw=$form->{rpw}">
<input type=hidden name=rpw value=$form->{rpw}>
<br>
}
sub continue {
-
- &{ $form->{nextsub} };
-
+ call_sub($form->{"nextsub"});
}
sub update_dataset {
<input name=dbupdate type=hidden value="$form->{dbupdate}">
-<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&rpw=$form->{rpw}">
+<input name=callback type=hidden value="$form->{script}?action=list_users&rpw=$form->{rpw}">
-<input type=hidden name=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
<input type=hidden name=nextsub value=dbupdate>
<br>
<a id="enddatasetupdate" href="admin.pl?action=login&| .
-join("&", map({ "$_=" . $form->escape($form->{$_}); } qw(path rpw))) .
+join("&", map({ "$_=" . $form->escape($form->{$_}); } qw(rpw))) .
qq|">| . $locale->text("Continue") . qq|</a>|;
}
<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}&rpw=$form->{rpw}">
+<input name=callback type=hidden value="$form->{script}?action=list_users&rpw=$form->{rpw}">
-<input type=hidden name=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
<input type=hidden name=nextsub value=dbcreate>
. qq|
-<input type=hidden name=path value="$form->{path}">
<input type=hidden name=rpw value="$form->{rpw}">
<input type=hidden name=nextsub value=list_users>
<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}&rpw=$form->{rpw}">
+<input name=callback type=hidden value="$form->{script}?action=list_users&rpw=$form->{rpw}">
-<input type=hidden name=path value="$form->{path}">
<input type=hidden name=rpw value="$form->{rpw}">
<input type=hidden name=nextsub value=dbdelete>
. qq|
-<input type=hidden name=path value="$form->{path}">
<input type=hidden name=rpw value="$form->{rpw}">
<input type=hidden name=nextsub value=list_users>
unlink "$userspath/nologin";
$form->{callback} =
- "$form->{script}?action=list_users&path=$form->{path}&rpw=$root->{password}";
+ "$form->{script}?action=list_users&rpw=$root->{password}";
$form->redirect($locale->text('Lockfile removed!'));
close(FH);
$form->{callback} =
- "$form->{script}?action=list_users&path=$form->{path}&rpw=$root->{password}";
+ "$form->{script}?action=list_users&rpw=$root->{password}";
$form->redirect($locale->text('Lockfile created!'));