projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Recommit von r1166 von udo_spallek: Bug in verstecktem Feld: <input type=hidden name...
[kivitendo-erp.git]
/
bin
/
mozilla
/
admin.pl
diff --git
a/bin/mozilla/admin.pl
b/bin/mozilla/admin.pl
index
566f29a
..
1187125
100644
(file)
--- a/
bin/mozilla/admin.pl
+++ b/
bin/mozilla/admin.pl
@@
-38,6
+38,7
@@
use SL::Form;
use SL::User;
$form = new Form;
use SL::User;
$form = new Form;
+$form->{"root"} = "root login";
$locale = new Locale $language, "admin";
$locale = new Locale $language, "admin";
@@
-55,6
+56,7
@@
$form->{favicon} = "favicon.ico";
if ($form->{action}) {
if ($form->{action}) {
+
$subroutine = $locale->findsub($form->{action});
if ($subroutine eq 'login') {
$subroutine = $locale->findsub($form->{action});
if ($subroutine eq 'login') {
@@
-120,11
+122,9
@@
sub adminlogin {
<th>| . $locale->text('Password') . qq|</th>
<td><input type=password name=rpw></td>
<td><input type=submit class=submit name=action value="|
<th>| . $locale->text('Password') . qq|</th>
<td><input type=password name=rpw></td>
<td><input type=submit class=submit name=action value="|
- . $locale->text('Login')
- . qq|"></td>
+ . $locale->text('Login') . qq|"></td>
</tr>
<input type=hidden name=action value=login>
</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>
<input type=hidden name=path value=$form->{path}>
</table>
@@
-164,6
+164,10
@@
sub add_user {
}
$myconfig->{vclimit} = 200;
}
$myconfig->{vclimit} = 200;
+ $myconfig->{"countrycode"} = "de";
+ $myconfig->{"numberformat"} = "1000,00";
+ $myconfig->{"dateformat"} = "dd.mm.yy";
+
&form_header;
&form_footer;
&form_header;
&form_footer;
@@
-193,8
+197,7
@@
sub form_footer {
print qq|
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}>
<input type=hidden name=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
@@
-290,7
+293,7
@@
sub list_users {
foreach $key (sort keys %member) {
$href =
foreach $key (sort keys %member) {
$href =
- "$script?action=edit&login=$key&path=$form->{path}&r
oot=$form->{root}&r
pw=$form->{rpw}";
+ "$script?action=edit&login=$key&path=$form->{path}&rpw=$form->{rpw}";
$href =~ s/ /%20/g;
$member{$key}{templates} =~ s/^$templates\///;
$href =~ s/ /%20/g;
$member{$key}{templates} =~ s/^$templates\///;
@@
-329,7
+332,6
@@
sub list_users {
<input type=hidden name=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
<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|">
<br><input type=submit class=submit name=action value="|
. $locale->text('Add User') . qq|">
@@
-369,8
+371,7
@@
$nologin
<th align=right>| . $locale->text('Password') . qq|</th>
<td><input class=login type=password name=password></td>
<td><input type=submit name=action value="|
<th align=right>| . $locale->text('Password') . qq|</th>
<td><input class=login type=password name=password></td>
<td><input type=submit name=action value="|
- . $locale->text('Login')
- . qq|"></td>
+ . $locale->text('Login') . qq|"></td>
</tr>
<input type=hidden name=path value=$form->{path}>
</table>
</tr>
<input type=hidden name=path value=$form->{path}>
</table>
@@
-422,7
+423,8
@@
sub form_header {
%countrycodes = User->country_codes;
$countrycodes = "";
foreach $key (sort { $countrycodes{$a} cmp $countrycodes{$b} }
%countrycodes = User->country_codes;
$countrycodes = "";
foreach $key (sort { $countrycodes{$a} cmp $countrycodes{$b} }
- keys %countrycodes) {
+ keys %countrycodes
+ ) {
$countrycodes .=
($myconfig->{countrycode} eq $key)
? "<option selected value=$key>$countrycodes{$key}"
$countrycodes .=
($myconfig->{countrycode} eq $key)
? "<option selected value=$key>$countrycodes{$key}"
@@
-442,7
+444,8
@@
sub form_header {
closedir TEMPLATEDIR;
@allhtml = sort grep /\.html/, @all;
closedir TEMPLATEDIR;
@allhtml = sort grep /\.html/, @all;
- @alldir = grep !/\.(html|tex)$/, @all;
+ @alldir = grep !/\.(html|tex|sty|odt)$/, @all;
+ @alldir = grep !/^(webpages|\.svn)$/, @alldir;
@allhtml = reverse grep !/Default/, @allhtml;
push @allhtml, 'Default';
@allhtml = reverse grep !/Default/, @allhtml;
push @allhtml, 'Default';
@@
-463,7
+466,8
@@
sub form_header {
$item =~ s/-.*//g;
if ($item ne $lastitem) {
$item =~ s/-.*//g;
if ($item ne $lastitem) {
- $mastertemplates .= qq|<option>$item\n|;
+ my $selected = $item eq "German" ? " selected" : "";
+ $mastertemplates .= qq|<option$selected>$item\n|;
$lastitem = $item;
}
}
$lastitem = $item;
}
}
@@
-483,6
+487,9
@@
sub form_header {
$form->header;
$form->header;
+ if ($myconfig->{menustyle} eq "neu") { $neu = "checked"; }
+ else { $old = "checked"; }
+
print qq|
<body class=admin>
print qq|
<body class=admin>
@@
-537,7
+544,7
@@
sub form_header {
</tr>
<tr valign=top>
<th align=right>| . $locale->text('Ust-IDNr') . qq|</th>
</tr>
<tr valign=top>
<th align=right>| . $locale->text('Ust-IDNr') . qq|</th>
- <td><input name=
ustid size=14 value="$myconfig->{
ustid}"></td>
+ <td><input name=
co_ustid size=14 value="$myconfig->{co_
ustid}"></td>
</tr>
<tr valign=top>
<th align=right>| . $locale->text('DUNS-Nr') . qq|</th>
</tr>
<tr valign=top>
<th align=right>| . $locale->text('DUNS-Nr') . qq|</th>
@@
-587,6
+594,11
@@
sub form_header {
<th align=right>| . $locale->text('Setup Templates') . qq|</th>
<td><select name=mastertemplates>$mastertemplates</select></td>
</tr>
<th align=right>| . $locale->text('Setup Templates') . qq|</th>
<td><select name=mastertemplates>$mastertemplates</select></td>
</tr>
+ <tr>
+ <th align=right>| . $locale->text('Setup Menu') . qq|</th>
+ <td><input name=menustyle type=radio class=radio value=neu $neu> New
+ <input name=menustyle type=radio class=radio value=old $old> Old</td>
+ </tr>
<input type=hidden name=templates value=$myconfig->{templates}>
</table>
</td>
<input type=hidden name=templates value=$myconfig->{templates}>
</table>
</td>
@@
-957,7
+969,7
@@
sub save {
# copy templates to the directory
opendir TEMPLATEDIR, "$templates/." or $form - error("$templates : $!");
# copy templates to the directory
opendir TEMPLATEDIR, "$templates/." or $form - error("$templates : $!");
- @templates = grep /$form->{mastertemplates}.*?\.(html|tex)$/,
+ @templates = grep /$form->{mastertemplates}.*?\.(html|tex
|sty
)$/,
readdir TEMPLATEDIR;
closedir TEMPLATEDIR;
readdir TEMPLATEDIR;
closedir TEMPLATEDIR;
@@
-1058,6
+1070,7
@@
sub delete {
if (-d "$dir") {
unlink <$dir/*.html>;
unlink <$dir/*.tex>;
if (-d "$dir") {
unlink <$dir/*.html>;
unlink <$dir/*.tex>;
+ unlink <$dir/*.sty>;
rmdir "$dir";
}
}
rmdir "$dir";
}
}
@@
-1112,7
+1125,6
@@
sub change_admin_password {
. $locale->text('Password')
. qq|</b> <input type=password name=password size=8>
. $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}>
<input type=hidden name=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
@@
-1136,20
+1148,17
@@
sub change_password {
$root->save_member($memberfile);
$form->{callback} =
$root->save_member($memberfile);
$form->{callback} =
- "$form->{script}?action=list_users&path=$form->{path}&r
oot=$form->{root}&r
pw=$root->{password}";
+ "$form->{script}?action=list_users&path=$form->{path}&rpw=$root->{password}";
$form->redirect($locale->text('Password changed!'));
}
sub check_password {
$form->redirect($locale->text('Password changed!'));
}
sub check_password {
-
$root = new User "$memberfile", $form->{root};
$root = new User "$memberfile", $form->{root};
- if ($root->{password}) {
- if ($root->{password} ne $form->{rpw}) {
- $form->error($locale->text('Incorrect Password!'));
- }
+ if (!defined($root->{password}) || ($root->{password} ne $form->{rpw})) {
+ $form->error($locale->text('Incorrect Password!'));
}
}
}
}
@@
-1260,8
+1269,7
@@
sub dbselect_source {
</td></tr>
</table>
</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 type=hidden name=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
@@
-1356,9
+1364,8
@@
$upd
<input name=dbupdate type=hidden value="$form->{dbupdate}">
<input name=dbupdate type=hidden value="$form->{dbupdate}">
-<input name=callback type=hidden value="$form->{script}?action=list_users&path=$form->{path}&r
oot=$form->{root}&r
pw=$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=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
@@
-1475,8
+1482,7
@@
sub create_dataset {
<tr>
<th align=right nowrap>|
<tr>
<th align=right nowrap>|
- . $locale->text('Create Chart of Accounts')
- . qq|</th>
+ . $locale->text('Create Chart of Accounts') . qq|</th>
<td>@charts</td>
</tr>
<td>@charts</td>
</tr>
@@
-1490,9
+1496,8
@@
sub create_dataset {
<input type=hidden name=dbpasswd value=$form->{dbpasswd}>
<input type=hidden name=dbdefault value=$form->{dbdefault}>
<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}&r
oot=$form->{root}&r
pw=$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=path value=$form->{path}>
<input type=hidden name=rpw value=$form->{rpw}>
@@
-1544,7
+1549,6
@@
sub dbcreate {
. qq|
. 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=path value="$form->{path}">
<input type=hidden name=rpw value="$form->{rpw}">
@@
-1608,9
+1612,8
@@
sub delete_dataset {
<input type=hidden name=dbpasswd value=$form->{dbpasswd}>
<input type=hidden name=dbdefault value=$form->{dbdefault}>
<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}&r
oot=$form->{root}&r
pw=$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=path value="$form->{path}">
<input type=hidden name=rpw value="$form->{rpw}">
@@
-1661,7
+1664,6
@@
$form->{db} | . $locale->text('successfully deleted!')
. qq|
. 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=path value="$form->{path}">
<input type=hidden name=rpw value="$form->{rpw}">
@@
-1683,7
+1685,7
@@
sub unlock_system {
unlink "$userspath/nologin";
$form->{callback} =
unlink "$userspath/nologin";
$form->{callback} =
- "$form->{script}?action=list_users&path=$form->{path}&r
oot=$form->{root}&r
pw=$root->{password}";
+ "$form->{script}?action=list_users&path=$form->{path}&rpw=$root->{password}";
$form->redirect($locale->text('Lockfile removed!'));
$form->redirect($locale->text('Lockfile removed!'));
@@
-1696,7
+1698,7
@@
sub lock_system {
close(FH);
$form->{callback} =
close(FH);
$form->{callback} =
- "$form->{script}?action=list_users&path=$form->{path}&r
oot=$form->{root}&r
pw=$root->{password}";
+ "$form->{script}?action=list_users&path=$form->{path}&rpw=$root->{password}";
$form->redirect($locale->text('Lockfile created!'));
$form->redirect($locale->text('Lockfile created!'));