Revision 4e0ea59f
Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt
bin/mozilla/admin.pl | ||
---|---|---|
|
||
use DBI;
|
||
use CGI;
|
||
use POSIX qw(strftime);
|
||
use IO::File;
|
||
use Fcntl;
|
||
use English qw(-no_match_vars);
|
||
use Sys::Hostname;
|
||
|
||
use SL::Form;
|
||
use SL::Mailer;
|
||
use SL::User;
|
||
use SL::Common;
|
||
use SL::Inifile;
|
||
... | ... | |
|
||
$form->{title} = "Lx-Office ERP / " . $locale->text('Database Administration');
|
||
|
||
$form->{ALLOW_DBBACKUP} = "$pg_dump_exe" ne "DISABLED";
|
||
|
||
$form->header();
|
||
print $form->parse_html_template("admin/dbadmin");
|
||
}
|
||
... | ... | |
"Lx-Office ERP "
|
||
. $locale->text('Database Administration') . " / "
|
||
. $locale->text('Delete Dataset');
|
||
|
||
$form->header();
|
||
print $form->parse_html_template("admin/dbdelete");
|
||
}
|
||
|
||
sub backup_dataset {
|
||
$form->{title} =
|
||
"Lx-Office ERP "
|
||
. $locale->text('Database Administration') . " / "
|
||
. $locale->text('Backup Dataset');
|
||
|
||
if ("$pg_dump_exe" eq "DISABLED") {
|
||
$form->error($locale->text('Database backups and restorations are disabled in lx-erp.conf.'));
|
||
}
|
||
|
||
my @dbsources = sort User->dbsources($form);
|
||
$form->{DATABASES} = [ map { { "dbname" => $_ } } @dbsources ];
|
||
$form->{NO_DATABASES} = !scalar @dbsources;
|
||
|
||
my $username = getpwuid $UID || "unknown-user";
|
||
my $hostname = hostname() || "unknown-host";
|
||
$form->{from} = "Lx-Office Admin <${username}\@${hostname}>";
|
||
|
||
$form->header();
|
||
print $form->parse_html_template("admin/backup_dataset");
|
||
}
|
||
|
||
sub backup_dataset_start {
|
||
$form->{title} =
|
||
"Lx-Office ERP "
|
||
. $locale->text('Database Administration') . " / "
|
||
. $locale->text('Backup Dataset');
|
||
|
||
$pg_dump_exe ||= "pg_dump";
|
||
|
||
if ("$pg_dump_exe" eq "DISABLED") {
|
||
$form->error($locale->text('Database backups and restorations are disabled in lx-erp.conf.'));
|
||
}
|
||
|
||
$form->isblank("dbname", $locale->text('The dataset name is missing.'));
|
||
$form->isblank("to", $locale->text('The email address is missing.')) if $form->{destination} eq "email";
|
||
|
||
my $tmpdir = "/tmp/lx_office_backup_" . Common->unique_id();
|
||
mkdir $tmpdir, 0700 || $form->error($locale->text('A temporary directory could not be created:') . " $!");
|
||
|
||
my $pgpass = IO::File->new("${tmpdir}/.pgpass", O_WRONLY | O_CREAT, 0600);
|
||
|
||
if (!$pgpass) {
|
||
unlink $tmpdir;
|
||
$form->error($locale->text('A temporary file could not be created:') . " $!");
|
||
}
|
||
|
||
print $pgpass "$form->{dbhost}:$form->{dbport}:$form->{dbname}:$form->{dbuser}:$form->{dbpasswd}\n";
|
||
$pgpass->close();
|
||
|
||
$ENV{HOME} = $tmpdir;
|
||
|
||
my @args = ("-c", "-o", "-h", $form->{dbhost}, "-U", $form->{dbuser});
|
||
push @args, ("-p", $form->{dbport}) if ($form->{dbport});
|
||
push @args, $form->{dbname};
|
||
|
||
my $cmd = "${pg_dump_exe} " . join(" ", map { s/\\/\\\\/g; s/\"/\\\"/g; $_ } @args);
|
||
my $name = "dataset_backup_$form->{dbname}_" . strftime("%Y%m%d", localtime()) . ".sql.gz";
|
||
|
||
if ($form->{destination} ne "email") {
|
||
my $in = IO::File->new("$cmd |");
|
||
|
||
if (!$in) {
|
||
unlink "${tmpdir}/.pgpass";
|
||
rmdir $tmpdir;
|
||
|
||
$form->error($locale->text('The pg_dump process could not be started.'));
|
||
}
|
||
|
||
print "content-type: application/octet-stream\n";
|
||
print "content-disposition: attachment; filename=\"${name}\"\n\n";
|
||
|
||
while (my $line = <$in>) {
|
||
print $line;
|
||
}
|
||
|
||
$in->close();
|
||
|
||
unlink "${tmpdir}/.pgpass";
|
||
rmdir $tmpdir;
|
||
|
||
} else {
|
||
my $tmp = $tmpdir . "/dump_" . Common::unique_id();
|
||
|
||
if (system("$cmd > $tmp") != 0) {
|
||
unlink "${tmpdir}/.pgpass", $tmp;
|
||
rmdir $tmpdir;
|
||
|
||
$form->error($locale->text('The pg_dump process could not be started.'));
|
||
}
|
||
|
||
my $mail = new Mailer;
|
||
|
||
map { $mail->{$_} = $form->{$_} } qw(from to cc subject message);
|
||
|
||
$mail->{charset} = $dbcharset ? $dbcharset : Common::DEFAULT_CHARSET;
|
||
$mail->{attachments} = [ { "filename" => $tmp, "name" => $name } ];
|
||
$mail->send();
|
||
|
||
unlink "${tmpdir}/.pgpass", $tmp;
|
||
rmdir $tmpdir;
|
||
|
||
$form->{title} =
|
||
"Lx-Office ERP "
|
||
. $locale->text('Database Administration') . " / "
|
||
. $locale->text('Backup Dataset');
|
||
|
||
$form->header();
|
||
print $form->parse_html_template("admin/backup_dataset_email_done");
|
||
}
|
||
}
|
||
|
||
sub restore_dataset {
|
||
$form->{title} =
|
||
"Lx-Office ERP "
|
||
. $locale->text('Database Administration') . " / "
|
||
. $locale->text('Restore Dataset');
|
||
|
||
if ("$pg_dump_exe" eq "DISABLED") {
|
||
$form->error($locale->text('Database backups and restorations are disabled in lx-erp.conf.'));
|
||
}
|
||
}
|
||
|
||
sub unlock_system {
|
||
|
||
unlink "$userspath/nologin";
|
locale/de/admin | ||
---|---|---|
$self->{texts} = {
|
||
'A temporary directory could not be created:' => 'Ein temporäres Verzeichnis konnte nicht erstellt werden:',
|
||
'A temporary file could not be created:' => 'Eine temporäre Datei konnte nicht erstellt werden:',
|
||
'ADDED' => 'Hinzugef?gt',
|
||
'Add User' => 'Benutzer erfassen',
|
||
'Address' => 'Adresse',
|
||
'Administration' => 'Administration',
|
||
'Attempt to call an undefined sub named \'%s\'' => 'Es wurde versucht, eine nicht definierte Unterfunktion namens \'%s\' aufzurufen.',
|
||
'Backup Dataset' => 'Datenbank sichern',
|
||
'Bin List' => 'Lagerliste',
|
||
'CANCELED' => 'Storniert',
|
||
'Cannot create Lock!' => 'System kann nicht gesperrt werden!',
|
||
... | ... | |
'DUNNING STARTED' => 'Mahnprozess gestartet',
|
||
'Database Administration' => 'Datenbankadministration',
|
||
'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!',
|
||
'Dataset upgrade' => 'Datenbankaktualisierung',
|
||
'Delete Dataset' => 'Datenbank l?schen',
|
||
... | ... | |
'Purchase Order' => 'Lieferantenauftrag',
|
||
'Quotation' => 'Angebot',
|
||
'RFQ' => 'Anfrage',
|
||
'Restore Dataset' => 'Datenbank wiederherstellen',
|
||
'SAVED' => 'Gespeichert',
|
||
'SAVED FOR DUNNING' => 'Gespeichert',
|
||
'SCREENED' => 'Angezeigt',
|
||
... | ... | |
'Storno Invoice' => 'Stornorechnung',
|
||
'Storno Packing List' => 'Stornolieferschein',
|
||
'The \'tag\' field must only consist of alphanumeric characters or the carachters - _ ( )' => 'Das Feld \'tag\' darf nur aus alphanumerischen Zeichen und den Zeichen - _ ( ) bestehen.',
|
||
'The dataset name is missing.' => 'Der Datenbankname fehlt.',
|
||
'The directory %s does not exist.' => 'Das Verzeichnis %s existiert nicht.',
|
||
'The email address is missing.' => 'Die Emailadresse fehlt.',
|
||
'The login is missing.' => 'Das Login fehlt.',
|
||
'The passwords do not match.' => 'Die Passwörter stimmen nicht überein.',
|
||
'The pg_dump process could not be started.' => 'Der pg_dump-Prozess konnte nicht gestartet werden.',
|
||
'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\'.',
|
||
... | ... | |
'Q' => 'Q',
|
||
'add_user' => 'add_user',
|
||
'adminlogin' => 'adminlogin',
|
||
'backup_dataset' => 'backup_dataset',
|
||
'backup_dataset_start' => 'backup_dataset_start',
|
||
'build_std_url' => 'build_std_url',
|
||
'calculate_qty' => 'calculate_qty',
|
||
'call_sub' => 'call_sub',
|
||
... | ... | |
'pg_database_administration' => 'pg_database_administration',
|
||
'project_selection_internal' => 'project_selection_internal',
|
||
'reformat_numbers' => 'reformat_numbers',
|
||
'restore_dataset' => 'restore_dataset',
|
||
'restore_form' => 'restore_form',
|
||
'save' => 'save',
|
||
'save_form' => 'save_form',
|
||
... | ... | |
'update_dataset' => 'update_dataset',
|
||
'vendor_selection' => 'vendor_selection',
|
||
'benutzer_erfassen' => 'add_user',
|
||
'datenbank_sichern' => 'backup_dataset',
|
||
'administratorpasswort_?ndern' => 'change_admin_password',
|
||
'passwort_?ndern' => 'change_password',
|
||
'weiter' => 'continue',
|
||
... | ... | |
'system_sperren' => 'lock_system',
|
||
'anmeldung' => 'login',
|
||
'datenbankadministration' => 'pg_database_administration',
|
||
'datenbank_wiederherstellen' => 'restore_dataset',
|
||
'speichern' => 'save',
|
||
'system_entsperren' => 'unlock_system',
|
||
'datenbank_aktualisieren' => 'update_dataset',
|
locale/de/all | ||
---|---|---|
'4. Quarter' => '4. Quartal',
|
||
'<b>What</b> do you want to look for?' => '<b>Wonach</b> wollen Sie suchen?',
|
||
'A Buchungsgruppe consists of a descriptive name and the account numbers for the income and expense accounts for those four tax zones as well as the inventory account number.' => 'Eine Buchungsgruppe besteht aus einem deskriptiven Namen, den Erlös- und Aufwandskonten für diese vier Steuerzonen sowie aus einem Inventarkonto.',
|
||
'A temporary directory could not be created:' => 'Ein temporäres Verzeichnis konnte nicht erstellt werden:',
|
||
'A temporary file could not be created:' => 'Eine temporäre Datei konnte nicht erstellt werden:',
|
||
'A unit with this name does already exist.' => 'Eine Einheit mit diesem Namen existiert bereits.',
|
||
'ADDED' => 'Hinzugef?gt',
|
||
'AP' => 'Einkauf',
|
||
... | ... | |
'BOM' => 'St?ckliste',
|
||
'BWA' => 'BWA',
|
||
'Back' => 'Zurück',
|
||
'Backup Dataset' => 'Datenbank sichern',
|
||
'Backup of dataset' => 'Sicherung der Datenbank',
|
||
'Balance' => 'Bilanz',
|
||
'Balance Sheet' => 'Bilanz',
|
||
'Balanced Ledger' => 'Bilanz ausgeglichen',
|
||
... | ... | |
'Database Administration' => 'Datenbankadministration',
|
||
'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.',
|
||
'Database template' => 'Datenbankvorlage',
|
||
'Database update error:' => 'Fehler beim Datenbankupgrade:',
|
||
'Dataset' => 'Datenbank',
|
||
... | ... | |
'Display file' => 'Datei anzeigen',
|
||
'Do you want to <b>limit</b> your search?' => 'Wollen Sie Ihre Suche <b>spezialisieren</b>?',
|
||
'Done' => 'Fertig',
|
||
'Download the backup' => 'Die Sicherungsdatei herunterladen',
|
||
'Draft saved.' => 'Entwurf gespeichert.',
|
||
'Drawing' => 'Zeichnung',
|
||
'Driver' => 'Treiber',
|
||
... | ... | |
'No Dataset selected!' => 'Keine Datenbank ausgew?hlt!',
|
||
'No Vendor was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein H?ndler gefunden',
|
||
'No customer has been selected yet.' => 'Es wurde noch kein Kunde ausgew?hlt.',
|
||
'No databases have been found on this server.' => 'Auf diesem Server wurden keine Datenbanken gefunden.',
|
||
'No datasets have been selected.' => 'Es wurden keine Datenbanken ausgewählt.',
|
||
'No employee was found matching the search parameters.' => 'Es wurde kein Angestellter gefunden, auf den die Suchparameter zutreffen.',
|
||
'No entries were found which had no unit assigned to them.' => 'Es wurden keine Einträge gefunden, denen keine Einheit zugeordnet war.',
|
||
... | ... | |
'Please select a customer from the list below.' => 'Bitte einen Endkunden aus der Liste ausw?hlen',
|
||
'Please select a vendor from the list below.' => 'Bitte einen H?ndler aus der Liste ausw?hlen',
|
||
'Please select the chart of accounts this installation is using from the list below.' => 'Bitte wählen Sie den Kontenrahmen aus, der bei dieser Installation verwendet wird.',
|
||
'Please select the database you want to backup' => 'Bitte wählen Sie die zu sichernde Datenbank gefunden',
|
||
'Please seletct the dataset you want to delete:' => 'Bitte wählen Sie die zu löschende Datenbank aus:',
|
||
'Plural' => 'Plural',
|
||
'Port' => 'Port',
|
||
... | ... | |
'Request for Quotation' => 'Anfrage',
|
||
'Request for Quotations' => 'Anfragen',
|
||
'Required by' => 'Lieferdatum',
|
||
'Restore Dataset' => 'Datenbank wiederherstellen',
|
||
'Revenue' => 'Erl?skonto',
|
||
'Revenue Account' => 'Erl?skonto',
|
||
'Revenues EU with UStId' => 'Erlöse EU m. UStId',
|
||
... | ... | |
'Select postscript or PDF!' => 'Postscript oder PDF ausw?hlen!',
|
||
'Select the chart of accounts in use' => 'Benutzten Kontenrahmen auswählen',
|
||
'Sell Price' => 'Verkaufspreis',
|
||
'Send the backup via Email' => 'Die Sicherungsdatei per Email verschicken',
|
||
'Sep' => 'Sep',
|
||
'September' => 'September',
|
||
'Serial No.' => 'Seriennummer',
|
||
... | ... | |
'The database upgrade for the introduction of Buchungsgruppen is now complete.' => 'Das Datenbankupgrade für die Einführung von Buchungsgruppen ist jetzt beendet.',
|
||
'The database upgrade for the introduction of units is now complete.' => 'Das Datenbankupgrade zwecks Einführung von Einheiten ist nun beendet.',
|
||
'The dataset <TMPL_VAR db ESCAPE=HTML> has been successfully created.' => 'Die Datenbank <TMPL_VAR db ESCAPE=HTML> wurde erfolgreich erstellt.',
|
||
'The dataset backup has been sent via email to <TMPL_VAR to ESCAPE=HTML>.' => 'Die Datenbanksicherung wurde an <TMPL_VAR to ESCAPE=HTML> per Email verschickt.',
|
||
'The dataset name is missing.' => 'Der Datenbankname fehlt.',
|
||
'The directory %s does not exist.' => 'Das Verzeichnis %s existiert nicht.',
|
||
'The dunning process started' => 'Der Mahnprozess ist gestartet.',
|
||
'The email address is missing.' => 'Die Emailadresse fehlt.',
|
||
'The factor is missing in row %d.' => 'Der Faktor fehlt in Zeile %d.',
|
||
'The factor is missing.' => 'Der Faktor fehlt.',
|
||
'The following Buchungsgruppen have already been created:' => 'Die folgenden Buchungsgruppen wurden bereits angelegt:',
|
||
... | ... | |
'The name is missing in row %d.' => 'Der Name fehlt in Zeile %d.',
|
||
'The name is missing.' => 'Der Name fehlt.',
|
||
'The passwords do not match.' => 'Die Passwörter stimmen nicht überein.',
|
||
'The pg_dump process could not be started.' => 'Der pg_dump-Prozess konnte nicht gestartet werden.',
|
||
'The preferred one is to install packages provided by your operating system distribution (e.g. Debian or RPM packages).' => 'Die bevorzugte Art, ein Perl-Modul zu installieren, ist durch Installation eines von Ihrem Betriebssystem zur Verfügung gestellten Paketes (z.B. Debian-Pakete oder RPM).',
|
||
'The second way is to use Perl\'s CPAN module and let it download and install the module for you.' => 'Die zweite Variante besteht darin, Perls CPAN-Modul zu benutzen und es das Modul für Sie installieren zu lassen.',
|
||
'The third way is to download the module from the above mentioned URL and to install the module manually following the installations instructions contained in the source archive.' => 'Die dritte Variante besteht darin, das Paket von der oben genannten URL herunterzuladen und es manuell zu installieren. Beachten Sie dabei die im Paket enthaltenen Installationsanweisungen.',
|
lx-erp.conf | ||
---|---|---|
use Cwd;
|
||
use vars qw($userspath $spool $memberfile $templates $sendmail $language $sid $latex $eur $webdav $lizenzen $watch_form_variables);
|
||
use vars qw($userspath $spool $memberfile $templates $sendmail $language $sid $latex $eur $webdav $lizenzen $pg_dump_exe $watch_form_variables);
|
||
|
||
# path to user configuration files
|
||
$userspath = "users";
|
||
... | ... | |
$dbcharset = "ISO-8859-15";
|
||
|
||
|
||
# Datenbankbackups werden mit dem externen Programm "pg_dump" erledigt.
|
||
# Wenn es nicht im aktuellen Pfad vorhanden ist, so muss hier der vollst?ndige
|
||
# Pfad eingetragen werden. Wenn die Variable auf "DISABLED" gesetzt wird,
|
||
# so werden die Men?punkte zum Backup und Wiederherstellen von Datenbanken
|
||
# im Administrationsfrontend nicht angeboten.
|
||
$pg_dump_exe = "pg_dump";
|
||
|
||
# Globale Debug-Ausgaben (de-)aktivieren? Moegliche Werte sind
|
||
# LXDebug::NONE - keine Debugausgaben
|
||
# LXDebug::INFO
|
templates/webpages/admin/backup_dataset_de.html | ||
---|---|---|
<body class="admin" onload="set_subject(); document.getElementsByName('to')[0].focus(); ">
|
||
|
||
<script type="text/javascript">
|
||
<!--
|
||
function set_subject() {
|
||
var subject_template = "Sicherung der Datenbank";
|
||
var subject = document.Form.subject.value;
|
||
|
||
if ((subject == "") || (subject.substr(0, subject_template.length) == subject_template)) {
|
||
document.Form.subject.value = subject_template + " " + document.Form.dbname.value;
|
||
}
|
||
}
|
||
-->
|
||
</script>
|
||
|
||
<h2><TMPL_VAR title></h2>
|
||
|
||
<TMPL_IF NO_DATABSES>
|
||
Auf diesem Server wurden keine Datenbanken gefunden.
|
||
|
||
<TMPL_ELSE>
|
||
|
||
<form name="Form" method="post" action="admin.pl">
|
||
|
||
<input type="hidden" name="dbdriver" value="Pg">
|
||
<input type="hidden" name="dbhost" value="<TMPL_VAR dbhost ESCAPE=HTML>">
|
||
<input type="hidden" name="dbport" value="<TMPL_VAR dbport ESCAPE=HTML>">
|
||
<input type="hidden" name="dbuser" value="<TMPL_VAR dbuser ESCAPE=HTML>">
|
||
|
||
<p>
|
||
Bitte wählen Sie die zu sichernde Datenbank gefunden:
|
||
<select name="dbname" onchange="set_subject()"><TMPL_LOOP DATABASES><option><TMPL_VAR dbname ESCAPE=HTML></option></TMPL_LOOP></select>
|
||
</p>
|
||
|
||
<table>
|
||
<tr>
|
||
<td valign="top"><input type="radio" name="destination" id="destination_download" value="download" checked></td>
|
||
<td valign="top"><label for="destination_download">Die Sicherungsdatei herunterladen</label></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td valign="top"><input type="radio" name="destination" id="destination_email" value="email"></td>
|
||
<td valign="top">
|
||
<label for="destination_email">Die Sicherungsdatei per Email verschicken</label><br>
|
||
|
||
<table>
|
||
<tr>
|
||
<td valign="top" align="right">Von</td>
|
||
<td valign="top"><input name="from" size="40" value="<TMPL_VAR from ESCAPE=HTML>"></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td valign="top" align="right">An</td>
|
||
<td valign="top"><input name="to" size="40"></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td valign="top" align="right">Cc</td>
|
||
<td valign="top"><input name="cc" size="40"></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td valign="top" align="right">Betreff</td>
|
||
<td valign="top"><input name="subject" size="40"></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td valign="top" align="right">Nachricht</td>
|
||
<td valign="top"><textarea name="message" cols="40" rows="10"></textarea></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>">
|
||
<input type="hidden" name="nextsub" value="backup_dataset_start">
|
||
|
||
<hr size="3" noshade>
|
||
|
||
<br>
|
||
|
||
<input type="submit" class="submit" name="action" value="Weiter">
|
||
|
||
</form>
|
||
|
||
</TMPL_IF>
|
||
|
||
</body>
|
||
</html>
|
templates/webpages/admin/backup_dataset_email_done_de.html | ||
---|---|---|
<body class="admin">
|
||
|
||
<h2><TMPL_VAR title></h2>
|
||
|
||
<p>Die Datenbanksicherung wurde an <TMPL_VAR to ESCAPE=HTML> per Email verschickt.</p>
|
||
|
||
<form method="post" action="admin.pl">
|
||
<input type="hidden" name="nextsub" value="list_users">
|
||
<input type="submit" name="action" value="Weiter">
|
||
</form>
|
||
</body>
|
||
</html>
|
templates/webpages/admin/backup_dataset_email_done_master.html | ||
---|---|---|
<body class="admin">
|
||
|
||
<h2><TMPL_VAR title></h2>
|
||
|
||
<p><translate>The dataset backup has been sent via email to <TMPL_VAR to ESCAPE=HTML>.</translate></p>
|
||
|
||
<form method="post" action="admin.pl">
|
||
<input type="hidden" name="nextsub" value="list_users">
|
||
<input type="submit" name="action" value="<translate>Continue</translate>">
|
||
</form>
|
||
</body>
|
||
</html>
|
templates/webpages/admin/backup_dataset_master.html | ||
---|---|---|
<body class="admin" onload="set_subject(); document.getElementsByName('to')[0].focus(); ">
|
||
|
||
<script type="text/javascript">
|
||
<!--
|
||
function set_subject() {
|
||
var subject_template = "<translate>Backup of dataset</translate>";
|
||
var subject = document.Form.subject.value;
|
||
|
||
if ((subject == "") || (subject.substr(0, subject_template.length) == subject_template)) {
|
||
document.Form.subject.value = subject_template + " " + document.Form.dbname.value;
|
||
}
|
||
}
|
||
-->
|
||
</script>
|
||
|
||
<h2><TMPL_VAR title></h2>
|
||
|
||
<TMPL_IF NO_DATABSES>
|
||
<translate>No databases have been found on this server.</translate>
|
||
|
||
<TMPL_ELSE>
|
||
|
||
<form name="Form" method="post" action="admin.pl">
|
||
|
||
<input type="hidden" name="dbdriver" value="Pg">
|
||
<input type="hidden" name="dbhost" value="<TMPL_VAR dbhost ESCAPE=HTML>">
|
||
<input type="hidden" name="dbport" value="<TMPL_VAR dbport ESCAPE=HTML>">
|
||
<input type="hidden" name="dbuser" value="<TMPL_VAR dbuser ESCAPE=HTML>">
|
||
|
||
<p>
|
||
<translate>Please select the database you want to backup</translate>:
|
||
<select name="dbname" onchange="set_subject()"><TMPL_LOOP DATABASES><option><TMPL_VAR dbname ESCAPE=HTML></option></TMPL_LOOP></select>
|
||
</p>
|
||
|
||
<table>
|
||
<tr>
|
||
<td valign="top"><input type="radio" name="destination" id="destination_download" value="download" checked></td>
|
||
<td valign="top"><label for="destination_download"><translate>Download the backup</translate></label></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td valign="top"><input type="radio" name="destination" id="destination_email" value="email"></td>
|
||
<td valign="top">
|
||
<label for="destination_email"><translate>Send the backup via Email</translate></label><br>
|
||
|
||
<table>
|
||
<tr>
|
||
<td valign="top" align="right"><translate>From</translate></td>
|
||
<td valign="top"><input name="from" size="40" value="<TMPL_VAR from ESCAPE=HTML>"></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td valign="top" align="right"><translate>To</translate></td>
|
||
<td valign="top"><input name="to" size="40"></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td valign="top" align="right"><translate>Cc</translate></td>
|
||
<td valign="top"><input name="cc" size="40"></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td valign="top" align="right"><translate>Subject</translate></td>
|
||
<td valign="top"><input name="subject" size="40"></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td valign="top" align="right"><translate>Message</translate></td>
|
||
<td valign="top"><textarea name="message" cols="40" rows="10"></textarea></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>">
|
||
<input type="hidden" name="nextsub" value="backup_dataset_start">
|
||
|
||
<hr size="3" noshade>
|
||
|
||
<br>
|
||
|
||
<input type="submit" class="submit" name="action" value="<translate>Continue</translate>">
|
||
|
||
</form>
|
||
|
||
</TMPL_IF>
|
||
|
||
</body>
|
||
</html>
|
templates/webpages/admin/dbadmin_de.html | ||
---|---|---|
<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">
|
||
<TMPL_IF ALLOW_DBBACKUP>
|
||
<input type="submit" class="submit" name="action" value="Datenbank sichern">
|
||
<!-- <input type="submit" class="submit" name="action" value="Datenbank wiederherstellen"> -->
|
||
</TMPL_IF>
|
||
</td>
|
||
</tr>
|
||
</table>
|
templates/webpages/admin/dbadmin_master.html | ||
---|---|---|
<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>">
|
||
<TMPL_IF ALLOW_DBBACKUP>
|
||
<input type="submit" class="submit" name="action" value="<translate>Backup Dataset</translate>">
|
||
<!-- <input type="submit" class="submit" name="action" value="<translate>Restore Dataset</translate>"> -->
|
||
</TMPL_IF>
|
||
</td>
|
||
</tr>
|
||
</table>
|
Auch abrufbar als: Unified diff
Beim Administrationsfrontend einen Punkt eingebaut, mit dem man Datenbanken mittels pg_dump sichern kann. Das Ergebnis wird ge-gzipt und kann heruntergeladen oder direkt per Email verschickt werden.