. $locale->text('Administration') . " / "
. $locale->text('Add User');
- $form->{Oracle_sid} = $sid;
- $form->{Oracle_dbport} = '1521';
- $form->{Oracle_dbhost} = `hostname`;
-
my $myconfig = {
"vclimit" => 200,
"countrycode" => "de",
map { $form->{"myc_${_}"} = $myconfig->{$_} } keys %{ $myconfig };
- map { $form->{"Pg_${_}"} = $myconfig->{$_} } qw(dbhost dbport dbname dbuser dbpasswd);
-
# access control
my @acsorder = ();
my %acs = ();
sub save {
- # no driver checked
- $form->error($locale->text('Database Driver not checked!'))
- unless $form->{dbdriver};
+ $form->{dbdriver} = 'Pg';
# no spaces allowed in login name
($form->{login}) = split / /, $form->{login};
}
$form->{acs} = join ";", @acs;
- # check which database was filled in
- if ($form->{dbdriver} eq 'Oracle') {
- $form->{sid} = $form->{Oracle_sid},;
- $form->{dbhost} = $form->{Oracle_dbhost},;
- $form->{dbport} = $form->{Oracle_dbport};
- $form->{dbpasswd} = $form->{Oracle_dbpasswd};
- $form->{dbuser} = $form->{Oracle_dbuser};
- $form->{dbname} = $form->{Oracle_dbuser};
-
- $form->isblank("dbhost", $locale->text('Hostname missing!'));
- $form->isblank("dbport", $locale->text('Port missing!'));
- $form->isblank("dbuser", $locale->text('Dataset missing!'));
- }
- if ($form->{dbdriver} eq 'Pg') {
- $form->{dbhost} = $form->{Pg_dbhost};
- $form->{dbport} = $form->{Pg_dbport};
- $form->{dbpasswd} = $form->{Pg_dbpasswd};
- $form->{dbuser} = $form->{Pg_dbuser};
- $form->{dbname} = $form->{Pg_dbname};
-
- $form->isblank("dbname", $locale->text('Dataset missing!'));
- $form->isblank("dbuser", $locale->text('Database User missing!'));
- }
+ $form->isblank("dbname", $locale->text('Dataset missing!'));
+ $form->isblank("dbuser", $locale->text('Database User missing!'));
foreach $item (keys %{$form}) {
$myconfig->{$item} = $form->{$item};
}
-sub oracle_database_administration {
-
- $form->{dbdriver} = 'Oracle';
- dbselect_source();
-
-}
-
-sub dbdriver_defaults {
-
- # load some defaults for the selected driver
- %driverdefaults = (
- 'Pg' => { dbport => '5432',
- dbuser => 'postgres',
- dbdefault => 'template1',
- dbhost => 'localhost',
- connectstring => $locale->text('Connect to')
- },
- 'Oracle' => { dbport => '1521',
- dbuser => 'oralin',
- dbdefault => $sid,
- dbhost => `hostname`,
- connectstring => 'SID'
- });
-
- map { $form->{$_} = $driverdefaults{ $form->{dbdriver} }{$_} }
- keys %{ $driverdefaults{Pg} };
-
-}
-
sub dbselect_source {
+ $form->{dbport} = '5432';
+ $form->{dbuser} = 'postgres';
+ $form->{dbdefault} = 'template1';
+ $form->{dbhost} = 'localhost';
- dbdriver_defaults();
-
- $msg{Pg} =
- $locale->text(
- 'Leave host and port field empty unless you want to make a remote connection.'
- );
- $msg{Oracle} =
- $locale->text(
- 'You must enter a host and port for local and remote connections!');
-
- $form->{title} =
- "Lx-Office ERP / " . $locale->text('Database Administration');
-
- $form->header;
-
- print qq|
-<body class=admin>
-
-
-<center>
-<h2>$form->{title}</h2>
-
-<form method=post action=$form->{script}>
-
-<table>
-<tr><td>
-
-<table>
-
- <tr class=listheading>
- <th colspan=4>| . $locale->text('Database') . qq|</th>
- </tr>
-
-<input type=hidden name=dbdriver value=$form->{dbdriver}>
-
- <tr><td>
- <table>
-
- <tr>
-
- <th align=right>| . $locale->text('Host') . qq|</th>
- <td><input name=dbhost size=25 value=$form->{dbhost}></td>
- <th align=right>| . $locale->text('Port') . qq|</th>
- <td><input name=dbport size=5 value=$form->{dbport}></td>
-
- </tr>
-
- <tr>
-
- <th align=right>| . $locale->text('User') . qq|</th>
- <td><input name="dbuser" size="10" value="$form->{dbuser}"></td>
- <th align=right>| . $locale->text('Password') . qq|</th>
- <td><input type="password" name="dbpasswd" size="10"></td>
-
- </tr>
-
- <tr>
-
- <th align=right>$form->{connectstring}</th>
- <td colspan=3><input name=dbdefault size=10 value=$form->{dbdefault}></td>
-
- </tr>
-
-</table>
-
-</td></tr>
-</table>
-
-<input name=callback type=hidden value="$form->{script}?action=list_users&rpw=$form->{rpw}">
-<input type=hidden name=rpw value=$form->{rpw}>
-
-<br>
-
-<input type=submit class=submit name=action value="|
- . $locale->text('Create Dataset') . qq|">|;
-# Vorübergehend Deaktiviert
-# <input type=submit class=submit name=action value="|
-# . $locale->text('Update Dataset') . qq|">
-print qq| <input type=submit class=submit name=action value="|
- . $locale->text('Delete Dataset') . qq|">
-
-</form>
-
-</td></tr>
-</table>
-
-<p>|
- . $locale->text(
- 'This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!'
- )
-
- . qq|
-<br>$msg{$form->{dbdriver}}
-
-
-</body>
-</html>
-|;
+ $form->{title} = "Lx-Office ERP / " . $locale->text('Database Administration');
+ $form->header();
+ print $form->parse_html_template("admin/dbadmin");
}
sub continue {
<table width=100%>
<form method=post action=$form->{script}>
-<input type=hidden name="dbdriver" value="$form->{dbdriver}">
<input type=hidden name="dbhost" value="$form->{dbhost}">
<input type=hidden name="dbport" value="$form->{dbport}">
<input type=hidden name="dbuser" value="$form->{dbuser}">
'Cannot create Lock!' => 'System kann nicht gesperrt werden!',
'Change Admin Password' => 'Administratorpasswort ändern',
'Confirmation' => 'Auftragsbestätigung',
- 'Connect to' => 'Als Vorlage verwenden',
'Continue' => 'Weiter',
'Create Dataset' => 'Datenbank anlegen',
'Credit Note' => 'Gutschrift',
'Customer details' => 'Kundendetails',
'DELETED' => 'Gelöscht',
'DUNNING STARTED' => 'Mahnprozess gestartet',
- 'Database' => 'Datenbank',
'Database Administration' => 'Datenbankadministration',
- 'Database Driver not checked!' => 'Kein Datenbanktreiber ausgewählt!',
'Database User missing!' => 'Datenbankbenutzer fehlt!',
'Dataset missing!' => 'Datenbank fehlt!',
'Dataset updated!' => 'Datenbank erneuert!',
'Error in database control file \'%s\': %s' => 'Fehler in Datenbankupgradekontrolldatei \'%s\': %s',
'File locked!' => 'Datei gesperrt!',
'History' => 'Historie',
- 'Host' => 'Datenbankcomputer',
- 'Hostname missing!' => 'Computername fehlt!',
'Incorrect Password!' => 'Ungültiges Passwort!',
'Invoice' => 'Rechnung',
- 'Leave host and port field empty unless you want to make a remote connection.' => 'Für lokale Verbindungen "Rechner" und "Port" freilassen.',
'Lockfile created!' => 'System gesperrt!',
'Lockfile removed!' => 'System entsperrt!',
'Login name missing!' => 'Loginname fehlt.',
'Packing List' => 'Lieferschein',
'Part Number' => 'Artikelnummer',
'Part description' => 'Artikelbeschreibung',
- 'Password' => 'Passwort',
'Password changed!' => 'Passwort geändert!',
'Pick List' => 'Sammelliste',
'Please enter values' => 'Bitte Werte eingeben',
- 'Port' => 'Port',
- 'Port missing!' => 'Portangabe fehlt!',
'Proforma Invoice' => 'Proformarechnung',
'Project Number' => 'Projektnummer',
'Project description' => 'Projektbeschreibung',
'The following Datasets need to be updated' => 'Folgende Datenbanken müssen aktualisiert werden',
'The login is missing.' => 'Das Login fehlt.',
'The passwords do not match.' => 'Die Passwörter stimmen nicht überein.',
- 'This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!' => 'In diesem Schritt werden bestehende Datenbanken gesucht. Es werden noch keine Änderungen vorgenommen!',
'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.',
'Unit' => 'Einheit',
'Unknown dependency \'%s\'.' => 'Unbekannte Abhängigkeit \'%s\'.',
'Update Dataset' => 'Datenbank aktualisieren',
- 'User' => 'Benutzer',
'User deleted!' => 'Benutzer gelöscht!',
'User saved!' => 'Benutzer gespeichert!',
'Value' => 'Wert',
'Variable' => 'Variable',
'Vendor details' => 'Lieferantendetails',
- 'You must enter a host and port for local and remote connections!' => '"Rechner" und "Port" müssen für lokale und externe Verbindungen eingetragen werden!',
'bin_list' => 'Lagerliste',
'invoice' => 'Rechnung',
'is already a member!' => 'ist bereits ein Mitglied!',
'create_dataset' => 'create_dataset',
'dbcreate' => 'dbcreate',
'dbdelete' => 'dbdelete',
- 'dbdriver_defaults' => 'dbdriver_defaults',
'dbselect_source' => 'dbselect_source',
'dbupdate' => 'dbupdate',
'delete' => 'delete',
'lock_system' => 'lock_system',
'login' => 'login',
'login_name' => 'login_name',
- 'oracle_database_administration' => 'oracle_database_administration',
'part_selection_internal' => 'part_selection_internal',
'pg_database_administration' => 'pg_database_administration',
'project_selection_internal' => 'project_selection_internal',
'Compare to' => 'Gegenüberstellen zu',
'Confirm!' => 'Bestätigen Sie!',
'Confirmation' => 'Auftragsbestätigung',
- 'Connect to' => 'Als Vorlage verwenden',
'Contact' => 'Kontakt',
'Contact Person' => 'Ansprechpartner',
'Contacts' => 'Kontakte',
'DUNS-Nr' => 'DUNS-Nr.',
'Database' => 'Datenbank',
'Database Administration' => 'Datenbankadministration',
- 'Database Driver not checked!' => 'Kein Datenbanktreiber ausgewählt!',
'Database Host' => 'Datenbankcomputer',
'Database User missing!' => 'Datenbankbenutzer fehlt!',
+ 'Database template' => 'Datenbankvorlage',
'Database update error:' => 'Fehler beim Datenbankupgrade:',
'Dataset' => 'Datenbank',
'Dataset missing!' => 'Datenbank fehlt!',
'History Search Engine' => 'Historien Suchmaschiene',
'Homepage' => 'Homepage',
'Host' => 'Datenbankcomputer',
- 'Hostname missing!' => 'Computername fehlt!',
'I' => 'I',
'ID' => 'Buchungsnummer',
'ID-Nummer' => 'ID-Nummer (intern)',
'Last Service Number' => 'Letzte Dienstleistungsnr.',
'Last Vendor Number' => 'Letzte Lieferantennummer',
'Lead' => 'Kundenquelle',
- 'Leave host and port field empty unless you want to make a remote connection.' => 'Für lokale Verbindungen "Rechner" und "Port" freilassen.',
+ 'Leave host and port field empty unless you want to make a remote connection.' => 'Für lokale Verbindungen "Rechner" und "Port" freilassen.',
'Liability' => 'Passiva/Mittelherkunft',
'License' => 'Lizenz',
'License key' => 'Lizenzschlüssel',
'Please seletct the dataset you want to delete:' => 'Bitte wählen Sie die zu löschende Datenbank aus:',
'Plural' => 'Plural',
'Port' => 'Port',
- 'Port missing!' => 'Portangabe fehlt!',
'Post' => 'Buchen',
'Post Payment' => 'Zahlung buchen',
'Post as new' => 'Neu buchen',
'Therefore there\'s no need to create the same article more than once if it is sold or bought in/from another tax zone.' => 'Deswegen muss man den gleichen Artikel nicht mehr mehrmals anlegen, wenn er in verschiedenen Steuerzonen gehandelt werden soll.',
'These units can be based on other units so that Lx-Office can convert prices when the user switches from one unit to another.' => 'Diese Einheiten können auf anderen Einheiten basieren, sodass Lx-Office Preise umrechnen kann, wenn der Benutzer von einer Einheit zu einer anderen Wechselt.',
'This customer number is already in use.' => 'Diese Kundennummer wird bereits verwendet.',
- 'This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!' => 'In diesem Schritt werden bestehende Datenbanken gesucht. Es werden noch keine Änderungen vorgenommen!',
+ 'This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!' => 'In diesem Schritt werden bestehende Datenbanken gesucht. Es werden noch keine Änderungen vorgenommen!',
'This upgrade script tries to map all existing parts in the database to the newly created Buchungsgruppen.' => 'Dieses Upgradescript versucht, bei allen bestehenden Artikeln neu erstellte Buchungsgruppen zuzuordnen.',
'This upgrade script tries to map all existing units in the database to the newly created units.' => 'Dieses Update-Script versucht, alle bestehenden Einheiten automatisch in die neuen Einheiten umzuwandeln.',
'This vendor number is already in use.' => 'Diese Lieferantennummer wird bereits verwendet.',
'You have to chose a dimension unit and a service unit which will then be assigned to those entries.' => 'Sie müssen eine Maß- und eine Dienstleistungseinheit auswählen, die diesen Waren und Dienstleistungen, denen noch keine Einheit zugeordnet ist, zugeordnet wird.',
'You have to chose which unit to save for each of them.' => 'Sie müssen für jeden Artikel die neue Einheit auswählen.',
'You have to create new Buchungsgruppen for all the combinations of inventory, income and expense accounts that have been used already.' => 'Sie müssen neue Buchungsgruppen für alle Kombinationen aus Inventar-, Erlös- und Aufwandskonto, die bereits benutzt wurden.',
- 'You must enter a host and port for local and remote connections!' => '"Rechner" und "Port" müssen für lokale und externe Verbindungen eingetragen werden!',
'You\'re not editing a file.' => 'Sie bearbeiten momentan keine Datei.',
'You\'ve already chosen the following limitations:' => 'Sie haben bereits die folgenden Einschränkungen vorgenommen:',
'Zeitpunkt' => 'Zeitpunkt',
--- /dev/null
+<body class="admin">
+
+ <div align="center">
+ <h2><TMPL_VAR title></h2>
+
+ <form method="post" action="admin.pl">
+
+ <table>
+ <tr>
+ <td>
+
+ <table>
+
+ <input type="hidden" name="dbdriver" value="<TMPL_VAR dbdriver ESCAPE=HTML>">
+
+ <tr>
+ <td>
+ <table>
+
+ <tr>
+
+ <th align="right">Datenbankcomputer</th>
+ <td><input name="dbhost" size="25" value="<TMPL_VAR dbhost ESCAPE=HTML>"></td>
+ <th align="right">Port</th>
+ <td><input name="dbport" size="5" value="<TMPL_VAR dbport ESCAPE=HTML>"></td>
+
+ </tr>
+
+ <tr>
+
+ <th align="right">Benutzer</th>
+ <td><input name="dbuser" size="10" value="<TMPL_VAR dbuser ESCAPE=HTML>"></td>
+ <th align="right">Passwort</th>
+ <td><input type="password" name="dbpasswd" size="10"></td>
+
+ </tr>
+
+ <tr>
+
+ <th align="right">Datenbankvorlage</th>
+ <td colspan="3"><input name="dbdefault" size="10" value="<TMPL_VAR dbdefault ESCAPE=HTML>"></td>
+
+ </tr>
+
+ </table>
+
+ </td>
+ </tr>
+ </table>
+
+ <input name="callback" type="hidden" value="admin.pl?action=list_users&rpw=<TMPL_VAR rpw ESCAPE=URL>">
+ <input type="hidden" name="rpw" value="<TMPL_VAR rpw ESCAPE=HTML>">
+
+ <br>
+
+ <input type="submit" class="submit" name="action" value="Datenbank anlegen">
+ <!-- <input type="submit" class="submit" name="action" value="Datenbank aktualisieren"> -->
+ <input type="submit" class="submit" name="action" value="Datenbank löschen">
+ </td>
+ </tr>
+ </table>
+ </form>
+
+ <p>In diesem Schritt werden bestehende Datenbanken gesucht. Es werden noch keine Änderungen vorgenommen!</p>
+
+ <p>Für lokale Verbindungen "Rechner" und "Port" freilassen.</p>
+
+ </div>
+</body>
+</html>
--- /dev/null
+<body class="admin">
+
+ <div align="center">
+ <h2><TMPL_VAR title></h2>
+
+ <form method="post" action="admin.pl">
+
+ <table>
+ <tr>
+ <td>
+
+ <table>
+
+ <input type="hidden" name="dbdriver" value="<TMPL_VAR dbdriver ESCAPE=HTML>">
+
+ <tr>
+ <td>
+ <table>
+
+ <tr>
+
+ <th align="right"><translate>Host</translate></th>
+ <td><input name="dbhost" size="25" value="<TMPL_VAR dbhost ESCAPE=HTML>"></td>
+ <th align="right"><translate>Port</translate></th>
+ <td><input name="dbport" size="5" value="<TMPL_VAR dbport ESCAPE=HTML>"></td>
+
+ </tr>
+
+ <tr>
+
+ <th align="right"><translate>User</translate></th>
+ <td><input name="dbuser" size="10" value="<TMPL_VAR dbuser ESCAPE=HTML>"></td>
+ <th align="right"><translate>Password</translate></th>
+ <td><input type="password" name="dbpasswd" size="10"></td>
+
+ </tr>
+
+ <tr>
+
+ <th align="right"><translate>Database template</translate></th>
+ <td colspan="3"><input name="dbdefault" size="10" value="<TMPL_VAR dbdefault ESCAPE=HTML>"></td>
+
+ </tr>
+
+ </table>
+
+ </td>
+ </tr>
+ </table>
+
+ <input name="callback" type="hidden" value="admin.pl?action=list_users&rpw=<TMPL_VAR rpw ESCAPE=URL>">
+ <input type="hidden" name="rpw" value="<TMPL_VAR rpw ESCAPE=HTML>">
+
+ <br>
+
+ <input type="submit" class="submit" name="action" value="<translate>Create Dataset</translate>">
+ <!-- <input type="submit" class="submit" name="action" value="<translate>Update Dataset</translate>"> -->
+ <input type="submit" class="submit" name="action" value="<translate>Delete Dataset</translate>">
+ </td>
+ </tr>
+ </table>
+ </form>
+
+ <p><translate>This is a preliminary check for existing sources. Nothing will be created or deleted at this stage!</translate></p>
+
+ <p><translate>Leave host and port field empty unless you want to make a remote connection.</translate></p>
+
+ </div>
+</body>
+</html>
<table>
<tr>
<th align="right">Treiber</th>
- <td><input type="hidden" name="dbdriver" value="Pg">PostgreSQL</td>
+ <td>PostgreSQL</td>
<th align="right">Datenbankcomputer</th>
- <td><input name="Pg_dbhost" size="30" value="<TMPL_VAR Pg_dbhost ESCAPE=HTML>"></td>
+ <td><input name="dbhost" size="30" value="<TMPL_VAR myc_dbhost ESCAPE=HTML>"></td>
</tr>
<tr>
<th align="right">Datenbank</th>
- <td><input name="Pg_dbname" size="15" value="<TMPL_VAR Pg_dbname ESCAPE=HTML>"></td>
+ <td><input name="dbname" size="15" value="<TMPL_VAR myc_dbname ESCAPE=HTML>"></td>
<th align="right">Port</th>
- <td><input name="Pg_dbport" size="4" value="<TMPL_VAR Pg_dbport ESCAPE=HTML>"></td>
+ <td><input name="dbport" size="4" value="<TMPL_VAR myc_dbport ESCAPE=HTML>"></td>
</tr>
<tr>
<th align="right">Benutzer</th>
- <td><input name="Pg_dbuser" size="15" value="<TMPL_VAR Pg_dbuser ESCAPE=HTML>"></td>
+ <td><input name="dbuser" size="15" value="<TMPL_VAR myc_dbuser ESCAPE=HTML>"></td>
<th align="right">Passwort</th>
- <td><input name="Pg_dbpasswd" type="password" size="10" value="<TMPL_VAR Pg_dbpasswd ESCAPE=HTML>"></td>
+ <td><input name="dbpasswd" type="password" size="10" value="<TMPL_VAR myc_dbpasswd ESCAPE=HTML>"></td>
</tr>
<input type="hidden" name="old_dbpasswd" value="<TMPL_VAR myc_dbpasswd ESCAPE=HTML>">
<table>
<tr>
<th align="right"><translate>Driver</translate></th>
- <td><input type="hidden" name="dbdriver" value="Pg">PostgreSQL</td>
+ <td>PostgreSQL</td>
<th align="right"><translate>Host</translate></th>
- <td><input name="Pg_dbhost" size="30" value="<TMPL_VAR Pg_dbhost ESCAPE=HTML>"></td>
+ <td><input name="dbhost" size="30" value="<TMPL_VAR myc_dbhost ESCAPE=HTML>"></td>
</tr>
<tr>
<th align="right"><translate>Dataset</translate></th>
- <td><input name="Pg_dbname" size="15" value="<TMPL_VAR Pg_dbname ESCAPE=HTML>"></td>
+ <td><input name="dbname" size="15" value="<TMPL_VAR myc_dbname ESCAPE=HTML>"></td>
<th align="right"><translate>Port</translate></th>
- <td><input name="Pg_dbport" size="4" value="<TMPL_VAR Pg_dbport ESCAPE=HTML>"></td>
+ <td><input name="dbport" size="4" value="<TMPL_VAR myc_dbport ESCAPE=HTML>"></td>
</tr>
<tr>
<th align="right"><translate>User</translate></th>
- <td><input name="Pg_dbuser" size="15" value="<TMPL_VAR Pg_dbuser ESCAPE=HTML>"></td>
+ <td><input name="dbuser" size="15" value="<TMPL_VAR myc_dbuser ESCAPE=HTML>"></td>
<th align="right"><translate>Password</translate></th>
- <td><input name="Pg_dbpasswd" type="password" size="10" value="<TMPL_VAR Pg_dbpasswd ESCAPE=HTML>"></td>
+ <td><input name="dbpasswd" type="password" size="10" value="<TMPL_VAR myc_dbpasswd ESCAPE=HTML>"></td>
</tr>
<input type="hidden" name="old_dbpasswd" value="<TMPL_VAR myc_dbpasswd ESCAPE=HTML>">