Revision 12a7cea9
Von Moritz Bunkus vor etwa 17 Jahren hinzugefügt
bin/mozilla/admin.pl | ||
---|---|---|
print $form->parse_html_template("admin/dbadmin");
|
||
}
|
||
|
||
sub test_db_connection {
|
||
$form->{dbdriver} = 'Pg';
|
||
User::dbconnect_vars($form, $form->{dbname});
|
||
|
||
my $dbh = DBI->connect($form->{dbconnect}, $form->{dbuser}, $form->{dbpasswd});
|
||
|
||
$form->{connection_ok} = $dbh ? 1 : 0;
|
||
$form->{errstr} = $DBI::errstr;
|
||
|
||
$dbh->disconnect() if ($dbh);
|
||
|
||
$form->{title} = $locale->text('Database Connection Test');
|
||
$form->header();
|
||
print $form->parse_html_template("admin/test_db_connection");
|
||
}
|
||
|
||
sub continue {
|
||
call_sub($form->{"nextsub"});
|
||
}
|
js/common.js | ||
---|---|---|
return false;
|
||
}
|
||
|
||
function get_input_value(input_name) {
|
||
var the_input = document.getElementsByName(input_name);
|
||
if (the_input && the_input[0])
|
||
return the_input[0].value;
|
||
return '';
|
||
}
|
locale/de/admin | ||
---|---|---|
'DELETED' => 'Gel?scht',
|
||
'DUNNING STARTED' => 'Mahnprozess gestartet',
|
||
'Database Administration' => 'Datenbankadministration',
|
||
'Database Connection Test' => 'Test der Datenbankverbindung',
|
||
'Database User missing!' => 'Datenbankbenutzer fehlt!',
|
||
'Database backups and restorations are disabled in lx-erp.conf.' => 'Datenbanksicherungen und -wiederherstellungen sind in der lx-erp.conf deaktiviert.',
|
||
'Dataset missing!' => 'Datenbank fehlt!',
|
||
... | ... | |
'set_longdescription' => 'set_longdescription',
|
||
'show_history' => 'show_history',
|
||
'show_vc_details' => 'show_vc_details',
|
||
'test_db_connection' => 'test_db_connection',
|
||
'unlock_system' => 'unlock_system',
|
||
'update_dataset' => 'update_dataset',
|
||
'user_migration_complete' => 'user_migration_complete',
|
locale/de/all | ||
---|---|---|
'DUNS-Nr' => 'DUNS-Nr.',
|
||
'Database' => 'Datenbank',
|
||
'Database Administration' => 'Datenbankadministration',
|
||
'Database Connection Test' => 'Test der Datenbankverbindung',
|
||
'Database Host' => 'Datenbankcomputer',
|
||
'Database User missing!' => 'Datenbankbenutzer fehlt!',
|
||
'Database backups and restorations are disabled in lx-erp.conf.' => 'Datenbanksicherungen und -wiederherstellungen sind in der lx-erp.conf deaktiviert.',
|
||
... | ... | |
'Error in position #1: You must either assign no stock at all or the full quantity of #2 #3.' => 'Fehler in Position #1: Sie müssen einer Position entweder gar keinen Lagereingang oder die vollständige im Lieferschein vermerkte Menge von #2 #3 zuweisen.',
|
||
'Error in position #1: You must either assign no transfer at all or the full quantity of #2 #3.' => 'Fehler in Position #1: Sie müssen einer Position entweder gar keinen Lagerausgang oder die vollständige im Lieferschein vermerkte Menge von #2 #3 zuweisen.',
|
||
'Error in row #1: The quantity you entered is bigger than the stocked quantity.' => 'Fehler in Zeile #1: Die angegebene Menge ist größer als die vorhandene Menge.',
|
||
'Error message from the database driver:' => 'Fehlermeldung des Datenbanktreibers:',
|
||
'Error!' => 'Fehler!',
|
||
'Ertrag' => 'Ertrag',
|
||
'Ertrag prozentual' => 'Ertrag prozentual',
|
||
... | ... | |
'Template database' => 'Datenbankvorlage',
|
||
'Templates' => 'Vorlagen',
|
||
'Terms missing in row ' => '+Tage fehlen in Zeile ',
|
||
'Test connection' => 'Verbindung testen',
|
||
'Text field' => 'Textfeld',
|
||
'Text field variables: \'WIDTH=w HEIGHT=h\' sets the width and height of the text field. They default to 30 and 5 respectively.' => 'Textfelder: \'WIDTH=w HEIGHT=h\' setzen die Breite und die Höhe des Textfeldes. Wenn nicht anders angegeben, so werden sie 30 Zeichen breit und fünf Zeichen hoch dargestellt.',
|
||
'Text variables: \'MAXLENGTH=n\' sets the maximum entry length to \'n\'.' => 'Textzeilen: \'MAXLENGTH=n\' setzt eine Maximallänge von n Zeichen.',
|
||
... | ... | |
'The config file "config/authentication.pl" was not found.' => 'Die Konfigurationsdatei "config/authentication.pl" wurde nicht gefunden.',
|
||
'The connection to the LDAP server cannot be encrypted (SSL/TLS startup failure). Please check config/authentication.pl.' => 'Die Verbindung zum LDAP-Server kann nicht verschlüsselt werden (Fehler bei SSL/TLS-Initialisierung). Bitte überprüfen Sie die Angaben in config/authentication.pl.',
|
||
'The connection to the authentication database failed:' => 'Die Verbindung zur Authentifizierungsdatenbank schlug fehl:',
|
||
'The connection to the database could not be established.' => 'Die Verbindung zur Datenbank konnte nicht hergestellt werden.',
|
||
'The connection to the template database failed:' => 'Die Verbindung zur Vorlagendatenbank schlug fehl:',
|
||
'The connection was established successfully.' => 'Die Verbindung zur Datenbank wurde erfolgreich hergestellt.',
|
||
'The creation of the authentication database failed:' => 'Das Anlegen der Authentifizierungsdatenbank schlug fehl:',
|
||
'The custom variable has been deleted.' => 'Die benutzerdefinierte Variable wurde gelöscht.',
|
||
'The custom variable has been saved.' => 'Die benutzerdefinierte Variable wurde gespeichert.',
|
templates/webpages/admin/edit_user_de.html | ||
---|---|---|
[% USE HTML %]<body class="admin">
|
||
|
||
<form method="post" action="admin.pl">
|
||
<script type="text/javascript" src="js/common.js"></script>
|
||
<script type="text/javascript">
|
||
<!--
|
||
function open_connection_test_window() {
|
||
// host name port user passwd
|
||
var url = "admin.pl?action=test_db_connection&" +
|
||
"dbhost=" + escape_more(get_input_value("dbhost")) + "&" +
|
||
"dbname=" + escape_more(get_input_value("dbname")) + "&" +
|
||
"dbuser=" + escape_more(get_input_value("dbuser")) + "&" +
|
||
"dbpasswd=" + escape_more(get_input_value("dbpasswd")) + "&";
|
||
|
||
var parm = centerParms(400,300) + ",width=400,height=300,status=yes,scrollbars=yes";
|
||
|
||
window.open(url, "_new_generic", parm);
|
||
}
|
||
-->
|
||
</script>
|
||
|
||
<form name="Form" method="post" action="admin.pl">
|
||
|
||
<div class="listtop" width="100%">[% title %]</div>
|
||
|
||
... | ... | |
<th align="right">Passwort</th>
|
||
<td><input name="dbpasswd" type="password" size="10" value="[% HTML.escape(myc_dbpasswd) %]"></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td colspan="2"><input type="button" class="submit" onclick="open_connection_test_window();" value="Verbindung testen"></td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
templates/webpages/admin/edit_user_master.html | ||
---|---|---|
[% USE HTML %]<body class="admin">
|
||
|
||
<form method="post" action="admin.pl">
|
||
<script type="text/javascript" src="js/common.js"></script>
|
||
<script type="text/javascript">
|
||
<!--
|
||
function open_connection_test_window() {
|
||
// host name port user passwd
|
||
var url = "admin.pl?action=test_db_connection&" +
|
||
"dbhost=" + escape_more(get_input_value("dbhost")) + "&" +
|
||
"dbname=" + escape_more(get_input_value("dbname")) + "&" +
|
||
"dbuser=" + escape_more(get_input_value("dbuser")) + "&" +
|
||
"dbpasswd=" + escape_more(get_input_value("dbpasswd")) + "&";
|
||
|
||
var parm = centerParms(400,300) + ",width=400,height=300,status=yes,scrollbars=yes";
|
||
|
||
window.open(url, "_new_generic", parm);
|
||
}
|
||
-->
|
||
</script>
|
||
|
||
<form name="Form" method="post" action="admin.pl">
|
||
|
||
<div class="listtop" width="100%">[% title %]</div>
|
||
|
||
... | ... | |
<th align="right"><translate>Password</translate></th>
|
||
<td><input name="dbpasswd" type="password" size="10" value="[% HTML.escape(myc_dbpasswd) %]"></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td colspan="2"><input type="button" class="submit" onclick="open_connection_test_window();" value="<translate>Test connection</translate>"></td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
templates/webpages/admin/test_db_connection_de.html | ||
---|---|---|
[% USE HTML %]<body>
|
||
|
||
<div class="listtop">[% title %]</div>
|
||
|
||
[%- IF connection_ok %]
|
||
|
||
<p>Die Verbindung zur Datenbank wurde erfolgreich hergestellt.</p>
|
||
|
||
[%- ELSE %]
|
||
|
||
<p>
|
||
Die Verbindung zur Datenbank konnte nicht hergestellt werden.
|
||
Fehlermeldung des Datenbanktreibers:
|
||
</p>
|
||
|
||
<p>[% HTML.escape(errstr) %]</p>
|
||
|
||
[%- END %]
|
||
|
||
<p>
|
||
<form>
|
||
<input type="button" class="submit" onclick="window.close()" value="Fenster Schließen">
|
||
</form>
|
||
</p>
|
||
|
||
</body>
|
||
</html>
|
templates/webpages/admin/test_db_connection_master.html | ||
---|---|---|
[% USE HTML %]<body>
|
||
|
||
<div class="listtop">[% title %]</div>
|
||
|
||
[%- IF connection_ok %]
|
||
|
||
<p><translate>The connection was established successfully.</translate></p>
|
||
|
||
[%- ELSE %]
|
||
|
||
<p>
|
||
<translate>The connection to the database could not be
|
||
established.</translate>
|
||
<translate>Error message from the database driver:</translate>
|
||
</p>
|
||
|
||
<p>[% HTML.escape(errstr) %]</p>
|
||
|
||
[%- END %]
|
||
|
||
<p>
|
||
<form>
|
||
<input type="button" class="submit" onclick="window.close()" value="<translate>Close Window</translate>">
|
||
</form>
|
||
</p>
|
||
|
||
</body>
|
||
</html>
|
Auch abrufbar als: Unified diff
Administration: Einen Button zum Testen der Datenbankeinstellung in der Maske zur Bearbeitung der Benutzerdaten eingefügt.