ftp_ansicht repariert und neues msd
16
msd/.gitignore
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
/.php-cs-fixer.cache
|
||||
/work/config/myoosdumper.conf.php
|
||||
/work/config/myoosdumper.php
|
||||
/work/config/sql_statements
|
||||
/work/log/*.gz
|
||||
*.bak
|
||||
/work/config/*.php
|
||||
/work/backup/*.gz
|
||||
/work/structure/*.gz
|
||||
/.project
|
||||
/.buildpath
|
||||
/.settings
|
||||
/work/cache
|
||||
/work/temp
|
||||
/work/log/update.log
|
||||
/nbproject
|
@ -3,5 +3,5 @@ RewriteEngine off
|
||||
</IfModule>
|
||||
AuthName "MyOOS-Dumper"
|
||||
AuthType Basic
|
||||
AuthUserFile "/var/www/web360/htdocs/leitgedanken_utf8/msd/.htpasswd"
|
||||
AuthUserFile "/var/www/web360/htdocs/leitgedanken_php8/msd/.htpasswd"
|
||||
require valid-user
|
76
msd/README.md
Normal file
@ -0,0 +1,76 @@
|
||||
# [MyOOS [Dumper]](https://www.oos-shop.de)
|
||||
===============
|
||||
|
||||
MyOOS [Dumper] is an open source community project. MyOOS [Dumper] is a backup program for MySQL databases. With it, backup copies of the data (forum, store, blog, etc.) can be created and restored if necessary. Especially for web space without shell access MyOOS [Dumper] is a useful alternative.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
- PHP version 7.4 or higher.
|
||||
- MySQL version 5.6 or higher.
|
||||
- Apache version 2.4 or higher.
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
1. [Download MyOOS [Dumper]](https://github.com/r23/MyOOS-Dumper/releases)
|
||||
2. Unzip the downloaded zip file
|
||||
3. Extract the file into an empty directory and upload everything from the directory Myoos-Dumper to the server.
|
||||
4. Go to install.php with your browser. The installation routine guides you through the individual steps and helps you to create the access data and database.
|
||||
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
### MyOOS [Dumper]
|
||||
Use your browser to open the [doku.oos-shop.de](https://doku.oos-shop.de/myoos-benutzerhandbuch/ueber-myoos/eine-einfuehrung-in-das-myoos-shopsystem/ueber-mysqldumper/) page for links to documentation.
|
||||
|
||||
|
||||
Support
|
||||
-------------
|
||||
For free support, visit our support site: (https://foren.myoos.de/viewforum.php?f=40)
|
||||
|
||||
|
||||
|
||||
Wish list / Future attractions
|
||||
-------------
|
||||
Do you have any suggestions for improvement? Feel free to contact the development team via the forum: (https://foren.myoos.de/viewforum.php?f=40)
|
||||
|
||||
|
||||
|
||||
|
||||
Contribute
|
||||
-------------
|
||||
If you would like to help us improve the MyOOS project, we welcome your pull requests via GitHub here.
|
||||
https://github.com/r23/MyOOS-Dumper
|
||||
|
||||
|
||||
License
|
||||
-------------
|
||||
MyOOS [Dumper] Copyright (c) 2013 - by the MyOOS Development Team.
|
||||
|
||||
based on MySQLDumper 1.24.4
|
||||
MySqlDumper Copyright (C)2004-2009 Daniel Schlichtholz (admin@mysqldumper.de)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation; either version 2 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program; if not, write to the Free Software Foundation, Inc., 675 Mass
|
||||
Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
Released under the GNU General Public License. You can find the whole license text in the `license.txt` file.
|
||||
|
||||
|
||||
## Further reading
|
||||
|
||||
* [MyOOS](https://www.oos-shop.de) - Homepage of MyOOS
|
||||
* [MyOOS Forum](https://foren.myoos.de/viewforum.php?f=40) - Community forum
|
@ -1,4 +1,4 @@
|
||||
MyOOS [Dumper] Copyright (c) 2016 - by the MyOOS Development Team.
|
||||
MyOOS [Dumper] Copyright (c) 2013 - by the MyOOS Development Team.
|
||||
|
||||
based on MySQLDumper 1.24.4
|
||||
MySqlDumper Copyright (C)2004-2009 Daniel Schlichtholz (admin@mysqldumper.de)
|
||||
|
@ -1,16 +0,0 @@
|
||||
MyOOS [Dumper] Version 4.2.0
|
||||
|
||||
Folgende Dinge wurden geändert:
|
||||
- Funktion 'ereg' ist veraltet, wir verwenden 'preg_match'
|
||||
- Funktion 'split' ist veraltet, wir verweden 'explode' oder 'preg_split'
|
||||
- Funktion 'mysql_list_tables' is veraltet
|
||||
- PHP mysql Erweiterung ist seit PHP 5.5.0 veraltet und wurde in PHP 7.0.0 entfernt. Wir verwenden mysqli
|
||||
|
||||
|
||||
|
||||
MyOOS [Dumper] based on MySQLDumper 1.24.4
|
||||
|
||||
Wer Du es ganz genau wissen möchtest, dann schaue Dir das changelog auf GitHub an. Hier ist akribisch
|
||||
jede Änderung am Code dokumentiert:
|
||||
|
||||
https://github.com/r23/MyOOS/tree/master/msd
|
@ -1,16 +0,0 @@
|
||||
MyOOS Version 4.2.0
|
||||
|
||||
We addressed the following issues:
|
||||
- Function 'ereg' is deprecated, we use 'preg_match'
|
||||
- Function 'split' is deprecated, we use 'explode' or 'preg_split'
|
||||
- Function 'mysql_list_tables' is deprecated
|
||||
- PHP 'mysql' extension is deprecated as of PHP 5.5.0, and has been removed as of PHP 7.0.0. Instead.
|
||||
|
||||
|
||||
MyOOS [Dumper] based on MySQLDumper 1.24.4
|
||||
|
||||
|
||||
When you want to know more, just take a look at the changelog of my code changes at GitHub . Each change
|
||||
of the code is documented here:
|
||||
|
||||
https://github.com/r23/MyOOS/tree/master/msd
|
@ -1,5 +0,0 @@
|
||||
Installation:
|
||||
|
||||
- lade den Ordner mysqldumper in einen beliebeigen Ordner auf Deinen Webspace hoch
|
||||
- Starte das Script im Browser (http://example.org/mysqldumper/)
|
||||
- Folge den Installationsanweisungen
|
@ -1,5 +0,0 @@
|
||||
Installation:
|
||||
|
||||
- upload the folder mysqldumper to any folder on your webspace
|
||||
- start the script in your browser (http://example.org/mysqldumper/)
|
||||
- Follow the Installatio assistent
|
@ -1,5 +0,0 @@
|
||||
Installation:
|
||||
|
||||
- Envoyer le r<>pertoire "mysqldumper" sur votre serveur
|
||||
- D<>buter le script en saisissant l'adresse suivante dans votre navigateur (http://example.org/mysqldumper/)
|
||||
- Suivez les instructions d'installation du script
|
@ -1,6 +0,0 @@
|
||||
Installazione:
|
||||
|
||||
- carica la cartella mysqldumper sul tuo spazio web
|
||||
- metti i diritti del file config.php a 777
|
||||
- fai partire lo script nel tuo Browser (http://example.org/mysqldumper/)
|
||||
- segui la installazione
|
@ -1,105 +0,0 @@
|
||||
GNU General Public License
|
||||
Deutsche Übersetzung der Version 2, Juni 1991
|
||||
|
||||
Copyright © 1989, 1991 Free Software Foundation, Inc.
|
||||
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
|
||||
|
||||
|
||||
Diese Übersetzung ist kein rechtskräftiger Ersatz für die englischsprachige Originalversion!
|
||||
|
||||
|
||||
Vorwort
|
||||
Die meisten Softwarelizenzen sind daraufhin entworfen worden, Ihnen die Freiheit zu nehmen, die Software weiterzugeben und zu verändern. Im Gegensatz dazu soll Ihnen die GNU General Public License , die Allgemeine Öffentliche GNU-Lizenz, ebendiese Freiheit garantieren. Sie soll sicherstellen, daß die Software für alle Benutzer frei ist. Diese Lizenz gilt für den Großteil der von der Free Software Foundation herausgegebenen Software und für alle anderen Programme, deren Autoren ihr Datenwerk dieser Lizenz unterstellt haben. Auch Sie können diese Möglichkeit der Lizenzierung für Ihre Programme anwenden. (Ein anderer Teil der Software der Free Software Foundation unterliegt stattdessen der GNU Library General Public License , der Allgemeinen Öffentlichen GNU-Lizenz für Bibliotheken.) [Mittlerweile wurde die GNU Library Public License von der GNU Lesser Public License abgelöst - Anmerkung des Übersetzers.]
|
||||
|
||||
Die Bezeichnung ,,freie`` Software bezieht sich auf Freiheit, nicht auf den Preis. Unsere Lizenzen sollen Ihnen die Freiheit garantieren, Kopien freier Software zu verbreiten (und etwas für diesen Service zu berechnen, wenn Sie möchten), die Möglichkeit, die Software im Quelltext zu erhalten oder den Quelltext auf Wunsch zu bekommen. Die Lizenzen sollen garantieren, daß Sie die Software ändern oder Teile davon in neuen freien Programmen verwenden dürfen - und daß Sie wissen, daß Sie dies alles tun dürfen.
|
||||
|
||||
Um Ihre Rechte zu schützen, müssen wir Einschränkungen machen, die es jedem verbieten, Ihnen diese Rechte zu verweigern oder Sie aufzufordern, auf diese Rechte zu verzichten. Aus diesen Einschränkungen folgen bestimmte Verantwortlichkeiten für Sie, wenn Sie Kopien der Software verbreiten oder sie verändern.
|
||||
|
||||
Beispielsweise müssen Sie den Empfängern alle Rechte gewähren, die Sie selbst haben, wenn Sie - kostenlos oder gegen Bezahlung - Kopien eines solchen Programms verbreiten. Sie müssen sicherstellen, daß auch die Empfänger den Quelltext erhalten bzw. erhalten können. Und Sie müssen ihnen diese Bedingungen zeigen, damit sie ihre Rechte kennen.
|
||||
|
||||
Wir schützen Ihre Rechte in zwei Schritten: (1) Wir stellen die Software unter ein Urheberrecht (Copyright), und (2) wir bieten Ihnen diese Lizenz an, die Ihnen das Recht gibt, die Software zu vervielfältigen, zu verbreiten und/oder zu verändern.
|
||||
|
||||
Um die Autoren und uns zu schützen, wollen wir darüberhinaus sicherstellen, daß jeder erfährt, daß für diese freie Software keinerlei Garantie besteht. Wenn die Software von jemand anderem modifiziert und weitergegeben wird, möchten wir, daß die Empfänger wissen, daß sie nicht das Original erhalten haben, damit irgendwelche von anderen verursachte Probleme nicht den Ruf des ursprünglichen Autors schädigen.
|
||||
|
||||
Schließlich und endlich ist jedes freie Programm permanent durch Software-Patente bedroht. Wir möchten die Gefahr ausschließen, daß Distributoren eines freien Programms individuell Patente lizensieren - mit dem Ergebnis, daß das Programm proprietär würde. Um dies zu verhindern, haben wir klargestellt, daß jedes Patent entweder für freie Benutzung durch jedermann lizenziert werden muß oder überhaupt nicht lizenziert werden darf.
|
||||
|
||||
Es folgen die genauen Bedingungen für die Vervielfältigung, Verbreitung und Bearbeitung:
|
||||
|
||||
|
||||
Allgemeine Öffentliche GNU-Lizenz
|
||||
Bedingungen für die Vervielfältigung,
|
||||
Verbreitung und Bearbeitung
|
||||
§0. Diese Lizenz gilt für jedes Programm und jedes andere Datenwerk, in dem ein entsprechender Vermerk des Copyright-Inhabers darauf hinweist, daß das Datenwerk unter den Bestimmungen dieser General Public License verbreitet werden darf. Im folgenden wird jedes derartige Programm oder Datenwerk als ,,das Programm`` bezeichnet; die Formulierung ,,auf dem Programm basierendes Datenwerk`` bezeichnet das Programm sowie jegliche Bearbeitung des Programms im urheberrechtlichen Sinne, also ein Datenwerk, welches das Programm, auch auszugsweise, sei es unverändert oder verändert und/oder in eine andere Sprache übersetzt, enthält. (Im folgenden wird die Übersetzung ohne Einschränkung als ,,Bearbeitung`` eingestuft.) Jeder Lizenznehmer wird im folgenden als ,,Sie`` angesprochen.
|
||||
|
||||
Andere Handlungen als Vervielfältigung, Verbreitung und Bearbeitung werden von dieser Lizenz nicht berührt; sie fallen nicht in ihren Anwendungsbereich. Der Vorgang der Ausführung des Programms wird nicht eingeschränkt, und die Ausgaben des Programms unterliegen dieser Lizenz nur, wenn der Inhalt ein auf dem Programm basierendes Datenwerk darstellt (unabhängig davon, daß die Ausgabe durch die Ausführung des Programmes erfolgte). Ob dies zutrifft, hängt von den Funktionen des Programms ab.
|
||||
|
||||
§1. Sie dürfen auf beliebigen Medien unveränderte Kopien des Quelltextes des Programms, wie sie ihn erhalten haben, anfertigen und verbreiten. Voraussetzung hierfür ist, daß Sie mit jeder Kopie einen entsprechenden Copyright-Vermerk sowie einen Haftungsausschluß veröffentlichen, alle Vermerke, die sich auf diese Lizenz und das Fehlen einer Garantie beziehen, unverändert lassen und desweiteren allen anderen Empfängern des Programms zusammen mit dem Programm eine Kopie dieser Lizenz zukommen lassen.
|
||||
|
||||
Sie dürfen für den eigentlichen Kopiervorgang eine Gebühr verlangen. Wenn Sie es wünschen, dürfen Sie auch gegen Entgeld eine Garantie für das Programm anbieten.
|
||||
|
||||
§2. Sie dürfen Ihre Kopie(n) des Programms oder eines Teils davon verändern, wodurch ein auf dem Programm basierendes Datenwerk entsteht; Sie dürfen derartige Bearbeitungen unter den Bestimmungen von Paragraph 1 vervielfältigen und verbreiten, vorausgesetzt, daß zusätzlich alle im folgenden genannten Bedingungen erfüllt werden:
|
||||
|
||||
|
||||
1.
|
||||
Sie müssen die veränderten Dateien mit einem auffälligen Vermerk versehen, der auf die von Ihnen vorgenommene Modifizierung und das Datum jeder Änderung hinweist.
|
||||
|
||||
2.
|
||||
Sie müssen dafür sorgen, daß jede von Ihnen verbreitete oder veröffentlichte Arbeit, die ganz oder teilweise von dem Programm oder Teilen davon abgeleitet ist, Dritten gegenüber als Ganzes unter den Bedingungen dieser Lizenz ohne Lizenzgebühren zur Verfügung gestellt wird.
|
||||
|
||||
3.
|
||||
Wenn das veränderte Programm normalerweise bei der Ausführung interaktiv Kommandos einliest, müssen Sie dafür sorgen, daß es, wenn es auf dem üblichsten Wege für solche interaktive Nutzung gestartet wird, eine Meldung ausgibt oder ausdruckt, die einen geeigneten Copyright-Vermerk enthält sowie einen Hinweis, daß es keine Gewährleistung gibt (oder anderenfalls, daß Sie Garantie leisten), und daß die Benutzer das Programm unter diesen Bedingungen weiter verbreiten dürfen. Auch muß der Benutzer darauf hingewiesen werden, wie er eine Kopie dieser Lizenz ansehen kann. (Ausnahme: Wenn das Programm selbst interaktiv arbeitet, aber normalerweise keine derartige Meldung ausgibt, muß Ihr auf dem Programm basierendes Datenwerk auch keine solche Meldung ausgeben).
|
||||
|
||||
Diese Anforderungen gelten für das bearbeitete Datenwerk als Ganzes. Wenn identifizierbare Teile des Datenwerkes nicht von dem Programm abgeleitet sind und vernünftigerweise als unabhängige und eigenständige Datenwerke für sich selbst zu betrachten sind, dann gelten diese Lizenz und ihre Bedingungen nicht für die betroffenen Teile, wenn Sie diese als eigenständige Datenwerke weitergeben. Wenn Sie jedoch dieselben Abschnitte als Teil eines Ganzen weitergeben, das ein auf dem Programm basierendes Datenwerk darstellt, dann muß die Weitergabe des Ganzen nach den Bedingungen dieser Lizenz erfolgen, deren Bedingungen für weitere Lizenznehmer somit auf das gesamte Ganze ausgedehnt werden - und somit auf jeden einzelnen Teil, unabhängig vom jeweiligen Autor.
|
||||
|
||||
Somit ist es nicht die Absicht dieses Abschnittes, Rechte für Datenwerke in Anspruch zu nehmen oder Ihnen die Rechte für Datenwerke streitig zu machen, die komplett von Ihnen geschrieben wurden; vielmehr ist es die Absicht, die Rechte zur Kontrolle der Verbreitung von Datenwerken, die auf dem Programm basieren oder unter seiner auszugsweisen Verwendung zusammengestellt worden sind, auszuüben.
|
||||
|
||||
Ferner bringt auch das einfache Zusammenlegen eines anderen Datenwerkes, das nicht auf dem Programm basiert, mit dem Programm oder einem auf dem Programm basierenden Datenwerk auf ein- und demselben Speicher- oder Vertriebsmedium dieses andere Datenwerk nicht in den Anwendungsbereich dieser Lizenz.
|
||||
|
||||
§3. Sie dürfen das Programm (oder ein darauf basierendes Datenwerk gemäß Paragraph 2) als Objectcode oder in ausführbarer Form unter den Bedingungen der Paragraphen 1 und 2 kopieren und weitergeben - vorausgesetzt, daß Sie außerdem eine der folgenden Leistungen erbringen:
|
||||
|
||||
|
||||
1.
|
||||
Liefern Sie das Programm zusammen mit dem vollständigen zugehörigen maschinenlesbaren Quelltext auf einem für den Datenaustausch üblichen Medium aus, wobei die Verteilung unter den Bedingungen der Paragraphen 1 und 2 erfolgen muß. Oder:
|
||||
|
||||
2.
|
||||
Liefern Sie das Programm zusammen mit einem mindestens drei Jahre lang gültigen schriftlichen Angebot aus, jedem Dritten eine vollständige maschinenlesbare Kopie des Quelltextes zur Verfügung zu stellen - zu nicht höheren Kosten als denen, die durch den physikalischen Kopiervorgang anfallen -, wobei der Quelltext unter den Bedingungen der Paragraphen 1 und 2 auf einem für den Datenaustausch üblichen Medium weitergegeben wird. Oder:
|
||||
|
||||
3.
|
||||
Liefern Sie das Programm zusammen mit dem schriftlichen Angebot der Zurverfügungstellung des Quelltextes aus, das Sie selbst erhalten haben. (Diese Alternative ist nur für nicht-kommerzielle Verbreitung zulässig und nur, wenn Sie das Programm als Objectcode oder in ausführbarer Form mit einem entsprechenden Angebot gemäß Absatz b erhalten haben.)
|
||||
|
||||
Unter dem Quelltext eines Datenwerkes wird diejenige Form des Datenwerkes verstanden, die für Bearbeitungen vorzugsweise verwendet wird. Für ein ausführbares Programm bedeutet ,,der komplette Quelltext``: Der Quelltext aller im Programm enthaltenen Module einschließlich aller zugehörigen Modulschnittstellen-Definitionsdateien sowie der zur Compilation und Installation verwendeten Skripte. Als besondere Ausnahme jedoch braucht der verteilte Quelltext nichts von dem zu enthalten, was üblicherweise (entweder als Quelltext oder in binärer Form) zusammen mit den Hauptkomponenten des Betriebssystems (Kernel, Compiler usw.) geliefert wird, unter dem das Programm läuft - es sei denn, diese Komponente selbst gehört zum ausführbaren Programm.
|
||||
|
||||
Wenn die Verbreitung eines ausführbaren Programms oder von Objectcode dadurch erfolgt, daß der Kopierzugriff auf eine dafür vorgesehene Stelle gewährt wird, so gilt die Gewährung eines gleichwertigen Zugriffs auf den Quelltext als Verbreitung des Quelltextes, auch wenn Dritte nicht dazu gezwungen sind, den Quelltext zusammen mit dem Objectcode zu kopieren.
|
||||
|
||||
§4. Sie dürfen das Programm nicht vervielfältigen, verändern, weiter lizenzieren oder verbreiten, sofern es nicht durch diese Lizenz ausdrücklich gestattet ist. Jeder anderweitige Versuch der Vervielfältigung, Modifizierung, Weiterlizenzierung und Verbreitung ist nichtig und beendet automatisch Ihre Rechte unter dieser Lizenz. Jedoch werden die Lizenzen Dritter, die von Ihnen Kopien oder Rechte unter dieser Lizenz erhalten haben, nicht beendet, solange diese die Lizenz voll anerkennen und befolgen.
|
||||
|
||||
§5. Sie sind nicht verpflichtet, diese Lizenz anzunehmen, da Sie sie nicht unterzeichnet haben. Jedoch gibt Ihnen nichts anderes die Erlaubnis, das Programm oder von ihm abgeleitete Datenwerke zu verändern oder zu verbreiten. Diese Handlungen sind gesetzlich verboten, wenn Sie diese Lizenz nicht anerkennen. Indem Sie das Programm (oder ein darauf basierendes Datenwerk) verändern oder verbreiten, erklären Sie Ihr Einverständnis mit dieser Lizenz und mit allen ihren Bedingungen bezüglich der Vervielfältigung, Verbreitung und Veränderung des Programms oder eines darauf basierenden Datenwerks.
|
||||
|
||||
§6. Jedesmal, wenn Sie das Programm (oder ein auf dem Programm basierendes Datenwerk) weitergeben, erhält der Empfänger automatisch vom ursprünglichen Lizenzgeber die Lizenz, das Programm entsprechend den hier festgelegten Bestimmungen zu vervielfältigen, zu verbreiten und zu verändern. Sie dürfen keine weiteren Einschränkungen der Durchsetzung der hierin zugestandenen Rechte des Empfängers vornehmen. Sie sind nicht dafür verantwortlich, die Einhaltung dieser Lizenz durch Dritte durchzusetzen.
|
||||
|
||||
§7. Sollten Ihnen infolge eines Gerichtsurteils, des Vorwurfs einer Patentverletzung oder aus einem anderen Grunde (nicht auf Patentfragen begrenzt) Bedingungen (durch Gerichtsbeschluß, Vergleich oder anderweitig) auferlegt werden, die den Bedingungen dieser Lizenz widersprechen, so befreien Sie diese Umstände nicht von den Bestimmungen dieser Lizenz. Wenn es Ihnen nicht möglich ist, das Programm unter gleichzeitiger Beachtung der Bedingungen in dieser Lizenz und Ihrer anderweitigen Verpflichtungen zu verbreiten, dann dürfen Sie als Folge das Programm überhaupt nicht verbreiten. Wenn zum Beispiel ein Patent nicht die gebührenfreie Weiterverbreitung des Programms durch diejenigen erlaubt, die das Programm direkt oder indirekt von Ihnen erhalten haben, dann besteht der einzige Weg, sowohl das Patentrecht als auch diese Lizenz zu befolgen, darin, ganz auf die Verbreitung des Programms zu verzichten.
|
||||
|
||||
Sollte sich ein Teil dieses Paragraphen als ungültig oder unter bestimmten Umständen nicht durchsetzbar erweisen, so soll dieser Paragraph seinem Sinne nach angewandt werden; im übrigen soll dieser Paragraph als Ganzes gelten.
|
||||
|
||||
Zweck dieses Paragraphen ist nicht, Sie dazu zu bringen, irgendwelche Patente oder andere Eigentumsansprüche zu verletzen oder die Gültigkeit solcher Ansprüche zu bestreiten; dieser Paragraph hat einzig den Zweck, die Integrität des Verbreitungssystems der freien Software zu schützen, das durch die Praxis öffentlicher Lizenzen verwirklicht wird. Viele Leute haben großzügige Beiträge zu dem großen Angebot der mit diesem System verbreiteten Software im Vertrauen auf die konsistente Anwendung dieses Systems geleistet; es liegt am Autor/Geber, zu entscheiden, ob er die Software mittels irgendeines anderen Systems verbreiten will; ein Lizenznehmer hat auf diese Entscheidung keinen Einfluß.
|
||||
|
||||
Dieser Paragraph ist dazu gedacht, deutlich klarzustellen, was als Konsequenz aus dem Rest dieser Lizenz betrachtet wird.
|
||||
|
||||
§8. Wenn die Verbreitung und/oder die Benutzung des Programms in bestimmten Staaten entweder durch Patente oder durch urheberrechtlich geschützte Schnittstellen eingeschränkt ist, kann der Urheberrechtsinhaber, der das Programm unter diese Lizenz gestellt hat, eine explizite geographische Begrenzung der Verbreitung angeben, in der diese Staaten ausgeschlossen werden, so daß die Verbreitung nur innerhalb und zwischen den Staaten erlaubt ist, die nicht ausgeschlossen sind. In einem solchen Fall beinhaltet diese Lizenz die Beschränkung, als wäre sie in diesem Text niedergeschrieben.
|
||||
|
||||
§9. Die Free Software Foundation kann von Zeit zu Zeit überarbeitete und/oder neue Versionen der General Public License veröffentlichen. Solche neuen Versionen werden vom Grundprinzip her der gegenwärtigen entsprechen, können aber im Detail abweichen, um neuen Problemen und Anforderungen gerecht zu werden.
|
||||
|
||||
Jede Version dieser Lizenz hat eine eindeutige Versionsnummer. Wenn in einem Programm angegeben wird, daß es dieser Lizenz in einer bestimmten Versionsnummer oder ,,jeder späteren Version`` (``any later version'') unterliegt, so haben Sie die Wahl, entweder den Bestimmungen der genannten Version zu folgen oder denen jeder beliebigen späteren Version, die von der Free Software Foundation veröffentlicht wurde. Wenn das Programm keine Versionsnummer angibt, können Sie eine beliebige Version wählen, die je von der Free Software Foundation veröffentlicht wurde.
|
||||
|
||||
§10. Wenn Sie den Wunsch haben, Teile des Programms in anderen freien Programmen zu verwenden, deren Bedingungen für die Verbreitung anders sind, schreiben Sie an den Autor, um ihn um die Erlaubnis zu bitten. Für Software, die unter dem Copyright der Free Software Foundation steht, schreiben Sie an die Free Software Foundation ; wir machen zu diesem Zweck gelegentlich Ausnahmen. Unsere Entscheidung wird von den beiden Zielen geleitet werden, zum einen den freien Status aller von unserer freien Software abgeleiteten Datenwerke zu erhalten und zum anderen das gemeinschaftliche Nutzen und Wiederverwenden von Software im allgemeinen zu fördern.
|
||||
|
||||
|
||||
Keine Gewährleistung
|
||||
|
||||
§11. Da das Programm ohne jegliche Kosten lizenziert wird, besteht keinerlei Gewährleistung für das Programm, soweit dies gesetzlich zulässig ist. Sofern nicht anderweitig schriftlich bestätigt, stellen die Copyright-Inhaber und/oder Dritte das Programm so zur Verfügung, ,,wie es ist``, ohne irgendeine Gewährleistung, weder ausdrücklich noch implizit, einschließlich - aber nicht begrenzt auf - Marktreife oder Verwendbarkeit für einen bestimmten Zweck. Das volle Risiko bezüglich Qualität und Leistungsfähigkeit des Programms liegt bei Ihnen. Sollte sich das Programm als fehlerhaft herausstellen, liegen die Kosten für notwendigen Service, Reparatur oder Korrektur bei Ihnen.
|
||||
|
||||
§12. In keinem Fall, außer wenn durch geltendes Recht gefordert oder schriftlich zugesichert, ist irgendein Copyright-Inhaber oder irgendein Dritter, der das Programm wie oben erlaubt modifiziert oder verbreitet hat, Ihnen gegenüber für irgendwelche Schäden haftbar, einschließlich jeglicher allgemeiner oder spezieller Schäden, Schäden durch Seiteneffekte (Nebenwirkungen) oder Folgeschäden, die aus der Benutzung des Programms oder der Unbenutzbarkeit des Programms folgen (einschließlich - aber nicht beschränkt auf - Datenverluste, fehlerhafte Verarbeitung von Daten, Verluste, die von Ihnen oder anderen getragen werden müssen, oder dem Unvermögen des Programms, mit irgendeinem anderen Programm zusammenzuarbeiten), selbst wenn ein Copyright-Inhaber oder Dritter über die Möglichkeit solcher Schäden unterrichtet worden war.
|
||||
|
||||
|
||||
Ende der Bedingungen
|
14
msd/composer.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"require": {
|
||||
"php": "^7.4 || ^8.0",
|
||||
"ext-ftp": "*",
|
||||
"ext-mysqli": "*",
|
||||
"ext-openssl": "*",
|
||||
"ext-curl": "*",
|
||||
"ext-json": "*",
|
||||
"ext-zip": "*",
|
||||
"ext-zlib": "*",
|
||||
"league/flysystem-sftp": "^2.0",
|
||||
"visualappeal/php-auto-update": "^1.0.2"
|
||||
}
|
||||
}
|
755
msd/composer.lock
generated
Normal file
@ -0,0 +1,755 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "531d14fef9748689e0b5fca816d3f8f1",
|
||||
"packages": [
|
||||
{
|
||||
"name": "composer/semver",
|
||||
"version": "3.3.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/semver.git",
|
||||
"reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9",
|
||||
"reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3.2 || ^7.0 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "^1.4",
|
||||
"symfony/phpunit-bridge": "^4.2 || ^5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "3.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Composer\\Semver\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nils Adermann",
|
||||
"email": "naderman@naderman.de",
|
||||
"homepage": "http://www.naderman.de"
|
||||
},
|
||||
{
|
||||
"name": "Jordi Boggiano",
|
||||
"email": "j.boggiano@seld.be",
|
||||
"homepage": "http://seld.be"
|
||||
},
|
||||
{
|
||||
"name": "Rob Bast",
|
||||
"email": "rob.bast@gmail.com",
|
||||
"homepage": "http://robbast.nl"
|
||||
}
|
||||
],
|
||||
"description": "Semver library that offers utilities, version constraint parsing and validation.",
|
||||
"keywords": [
|
||||
"semantic",
|
||||
"semver",
|
||||
"validation",
|
||||
"versioning"
|
||||
],
|
||||
"support": {
|
||||
"irc": "irc://irc.freenode.org/composer",
|
||||
"issues": "https://github.com/composer/semver/issues",
|
||||
"source": "https://github.com/composer/semver/tree/3.3.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://packagist.com",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/composer",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-04-01T19:23:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "desarrolla2/cache",
|
||||
"version": "v3.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/desarrolla2/Cache.git",
|
||||
"reference": "0b8f985d09abfc04a2c1535943f6f07b7206161a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/desarrolla2/Cache/zipball/0b8f985d09abfc04a2c1535943f6f07b7206161a",
|
||||
"reference": "0b8f985d09abfc04a2c1535943f6f07b7206161a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.0",
|
||||
"psr/simple-cache": "^1.0"
|
||||
},
|
||||
"provide": {
|
||||
"psr/simple-cache-implementation": "1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"cache/integration-tests": "dev-master",
|
||||
"ext-apcu": "*",
|
||||
"ext-json": "*",
|
||||
"ext-memcached": "*",
|
||||
"ext-mysqli": "*",
|
||||
"mikey179/vfsstream": "v1.6.8",
|
||||
"mongodb/mongodb": "^1.3",
|
||||
"phpstan/phpstan": "^0.12.29",
|
||||
"phpunit/phpunit": "^8.3 || ^9.0",
|
||||
"predis/predis": "~1.0.0",
|
||||
"symfony/phpunit-bridge": "^5.2"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Desarrolla2\\Cache\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Daniel González",
|
||||
"homepage": "http://desarrolla2.com/"
|
||||
},
|
||||
{
|
||||
"name": "Arnold Daniels",
|
||||
"homepage": "https://jasny.net/"
|
||||
}
|
||||
],
|
||||
"description": "Provides an cache interface for several adapters Apc, Apcu, File, Mongo, Memcache, Memcached, Mysql, Mongo, Redis is supported.",
|
||||
"homepage": "https://github.com/desarrolla2/Cache/",
|
||||
"keywords": [
|
||||
"apc",
|
||||
"apcu",
|
||||
"cache",
|
||||
"file",
|
||||
"memcache",
|
||||
"memcached",
|
||||
"mongo",
|
||||
"mysql",
|
||||
"psr-16",
|
||||
"redis",
|
||||
"simple-cache"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/desarrolla2/Cache/issues",
|
||||
"source": "https://github.com/desarrolla2/Cache/tree/v3.0.2"
|
||||
},
|
||||
"time": "2022-03-27T23:04:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "2.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem.git",
|
||||
"reference": "8aaffb653c5777781b0f7f69a5d937baf7ab6cdb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/8aaffb653c5777781b0f7f69a5d937baf7ab6cdb",
|
||||
"reference": "8aaffb653c5777781b0f7f69a5d937baf7ab6cdb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"league/mime-type-detection": "^1.0.0",
|
||||
"php": "^7.2 || ^8.0"
|
||||
},
|
||||
"conflict": {
|
||||
"guzzlehttp/ringphp": "<1.1.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"async-aws/s3": "^1.5",
|
||||
"async-aws/simple-s3": "^1.0",
|
||||
"aws/aws-sdk-php": "^3.132.4",
|
||||
"composer/semver": "^3.0",
|
||||
"ext-fileinfo": "*",
|
||||
"ext-ftp": "*",
|
||||
"friendsofphp/php-cs-fixer": "^3.2",
|
||||
"google/cloud-storage": "^1.23",
|
||||
"phpseclib/phpseclib": "^2.0",
|
||||
"phpstan/phpstan": "^0.12.26",
|
||||
"phpunit/phpunit": "^8.5 || ^9.4",
|
||||
"sabre/dav": "^4.1"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"League\\Flysystem\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Frank de Jonge",
|
||||
"email": "info@frankdejonge.nl"
|
||||
}
|
||||
],
|
||||
"description": "File storage abstraction for PHP",
|
||||
"keywords": [
|
||||
"WebDAV",
|
||||
"aws",
|
||||
"cloud",
|
||||
"file",
|
||||
"files",
|
||||
"filesystem",
|
||||
"filesystems",
|
||||
"ftp",
|
||||
"s3",
|
||||
"sftp",
|
||||
"storage"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/flysystem/issues",
|
||||
"source": "https://github.com/thephpleague/flysystem/tree/2.5.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://ecologi.com/frankdejonge",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/frankdejonge",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/league/flysystem",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-09-17T21:02:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem-sftp",
|
||||
"version": "2.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem-sftp.git",
|
||||
"reference": "e30acbc9be024bb7df6ee4b159f2c8db3efcb6a7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem-sftp/zipball/e30acbc9be024bb7df6ee4b159f2c8db3efcb6a7",
|
||||
"reference": "e30acbc9be024bb7df6ee4b159f2c8db3efcb6a7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"league/flysystem": "^2.0.0",
|
||||
"league/mime-type-detection": "^1.0.0",
|
||||
"php": "^7.2 || ^8.0",
|
||||
"phpseclib/phpseclib": "^2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"League\\Flysystem\\PhpseclibV2\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Frank de Jonge",
|
||||
"email": "info@frankdejonge.nl"
|
||||
}
|
||||
],
|
||||
"description": "SFTP filesystem adapter for Flysystem.",
|
||||
"keywords": [
|
||||
"Flysystem",
|
||||
"file",
|
||||
"files",
|
||||
"filesystem",
|
||||
"sftp"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/flysystem-sftp/issues",
|
||||
"source": "https://github.com/thephpleague/flysystem-sftp/tree/2.5.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://ecologi.com/frankdejonge",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/frankdejonge",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/league/flysystem",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"abandoned": "league/flysystem-sftp-v3",
|
||||
"time": "2022-04-27T17:27:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/mime-type-detection",
|
||||
"version": "1.11.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/mime-type-detection.git",
|
||||
"reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
|
||||
"reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-fileinfo": "*",
|
||||
"php": "^7.2 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^3.2",
|
||||
"phpstan/phpstan": "^0.12.68",
|
||||
"phpunit/phpunit": "^8.5.8 || ^9.3"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"League\\MimeTypeDetection\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Frank de Jonge",
|
||||
"email": "info@frankdejonge.nl"
|
||||
}
|
||||
],
|
||||
"description": "Mime-type detection for Flysystem",
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/mime-type-detection/issues",
|
||||
"source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/frankdejonge",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/league/flysystem",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-04-17T13:12:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
"version": "2.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Seldaek/monolog.git",
|
||||
"reference": "720488632c590286b88b80e62aa3d3d551ad4a50"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/720488632c590286b88b80e62aa3d3d551ad4a50",
|
||||
"reference": "720488632c590286b88b80e62aa3d3d551ad4a50",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"psr/log": "^1.0.1 || ^2.0 || ^3.0"
|
||||
},
|
||||
"provide": {
|
||||
"psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"aws/aws-sdk-php": "^2.4.9 || ^3.0",
|
||||
"doctrine/couchdb": "~1.0@dev",
|
||||
"elasticsearch/elasticsearch": "^7 || ^8",
|
||||
"ext-json": "*",
|
||||
"graylog2/gelf-php": "^1.4.2",
|
||||
"guzzlehttp/guzzle": "^7.4",
|
||||
"guzzlehttp/psr7": "^2.2",
|
||||
"mongodb/mongodb": "^1.8",
|
||||
"php-amqplib/php-amqplib": "~2.4 || ^3",
|
||||
"phpspec/prophecy": "^1.15",
|
||||
"phpstan/phpstan": "^0.12.91",
|
||||
"phpunit/phpunit": "^8.5.14",
|
||||
"predis/predis": "^1.1 || ^2.0",
|
||||
"rollbar/rollbar": "^1.3 || ^2 || ^3",
|
||||
"ruflin/elastica": "^7",
|
||||
"swiftmailer/swiftmailer": "^5.3|^6.0",
|
||||
"symfony/mailer": "^5.4 || ^6",
|
||||
"symfony/mime": "^5.4 || ^6"
|
||||
},
|
||||
"suggest": {
|
||||
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
|
||||
"doctrine/couchdb": "Allow sending log messages to a CouchDB server",
|
||||
"elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client",
|
||||
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
|
||||
"ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler",
|
||||
"ext-mbstring": "Allow to work properly with unicode symbols",
|
||||
"ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)",
|
||||
"ext-openssl": "Required to send log messages using SSL",
|
||||
"ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)",
|
||||
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
|
||||
"mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
|
||||
"php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
|
||||
"rollbar/rollbar": "Allow sending log messages to Rollbar",
|
||||
"ruflin/elastica": "Allow sending log messages to an Elastic Search server"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "2.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Monolog\\": "src/Monolog"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jordi Boggiano",
|
||||
"email": "j.boggiano@seld.be",
|
||||
"homepage": "https://seld.be"
|
||||
}
|
||||
],
|
||||
"description": "Sends your logs to files, sockets, inboxes, databases and various web services",
|
||||
"homepage": "https://github.com/Seldaek/monolog",
|
||||
"keywords": [
|
||||
"log",
|
||||
"logging",
|
||||
"psr-3"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/Seldaek/monolog/issues",
|
||||
"source": "https://github.com/Seldaek/monolog/tree/2.8.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/Seldaek",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-07-24T11:55:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpseclib/phpseclib",
|
||||
"version": "2.0.41",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpseclib/phpseclib.git",
|
||||
"reference": "7e763c6f97ec1fcb37c46aa8ecfc20a2c71d9c1b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/7e763c6f97ec1fcb37c46aa8ecfc20a2c71d9c1b",
|
||||
"reference": "7e763c6f97ec1fcb37c46aa8ecfc20a2c71d9c1b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phing/phing": "~2.7",
|
||||
"phpunit/phpunit": "^4.8.35|^5.7|^6.0|^9.4",
|
||||
"squizlabs/php_codesniffer": "~2.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.",
|
||||
"ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.",
|
||||
"ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.",
|
||||
"ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations.",
|
||||
"ext-xml": "Install the XML extension to load XML formatted public keys."
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"phpseclib/bootstrap.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"phpseclib\\": "phpseclib/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jim Wigginton",
|
||||
"email": "terrafrost@php.net",
|
||||
"role": "Lead Developer"
|
||||
},
|
||||
{
|
||||
"name": "Patrick Monnerat",
|
||||
"email": "pm@datasphere.ch",
|
||||
"role": "Developer"
|
||||
},
|
||||
{
|
||||
"name": "Andreas Fischer",
|
||||
"email": "bantu@phpbb.com",
|
||||
"role": "Developer"
|
||||
},
|
||||
{
|
||||
"name": "Hans-Jürgen Petrich",
|
||||
"email": "petrich@tronic-media.com",
|
||||
"role": "Developer"
|
||||
},
|
||||
{
|
||||
"name": "Graham Campbell",
|
||||
"email": "graham@alt-three.com",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.",
|
||||
"homepage": "http://phpseclib.sourceforge.net",
|
||||
"keywords": [
|
||||
"BigInteger",
|
||||
"aes",
|
||||
"asn.1",
|
||||
"asn1",
|
||||
"blowfish",
|
||||
"crypto",
|
||||
"cryptography",
|
||||
"encryption",
|
||||
"rsa",
|
||||
"security",
|
||||
"sftp",
|
||||
"signature",
|
||||
"signing",
|
||||
"ssh",
|
||||
"twofish",
|
||||
"x.509",
|
||||
"x509"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/phpseclib/phpseclib/issues",
|
||||
"source": "https://github.com/phpseclib/phpseclib/tree/2.0.41"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/terrafrost",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://www.patreon.com/phpseclib",
|
||||
"type": "patreon"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-12-23T16:44:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/log",
|
||||
"version": "1.1.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/log.git",
|
||||
"reference": "d49695b909c3b7628b6289db5479a1c204601f11"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
|
||||
"reference": "d49695b909c3b7628b6289db5479a1c204601f11",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\Log\\": "Psr/Log/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "https://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interface for logging libraries",
|
||||
"homepage": "https://github.com/php-fig/log",
|
||||
"keywords": [
|
||||
"log",
|
||||
"psr",
|
||||
"psr-3"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/php-fig/log/tree/1.1.4"
|
||||
},
|
||||
"time": "2021-05-03T11:20:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/simple-cache",
|
||||
"version": "1.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/simple-cache.git",
|
||||
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
|
||||
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\SimpleCache\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interfaces for simple caching",
|
||||
"keywords": [
|
||||
"cache",
|
||||
"caching",
|
||||
"psr",
|
||||
"psr-16",
|
||||
"simple-cache"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/php-fig/simple-cache/tree/master"
|
||||
},
|
||||
"time": "2017-10-23T01:57:42+00:00"
|
||||
},
|
||||
{
|
||||
"name": "visualappeal/php-auto-update",
|
||||
"version": "1.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/VisualAppeal/PHP-Auto-Update.git",
|
||||
"reference": "4454361a0fa346c7fb179deef11585c79715b645"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/VisualAppeal/PHP-Auto-Update/zipball/4454361a0fa346c7fb179deef11585c79715b645",
|
||||
"reference": "4454361a0fa346c7fb179deef11585c79715b645",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"composer/semver": "^3.0",
|
||||
"desarrolla2/cache": "^3.0",
|
||||
"ext-curl": "*",
|
||||
"ext-json": "*",
|
||||
"ext-zip": "*",
|
||||
"monolog/monolog": "^2.1",
|
||||
"php": ">=7.2.0",
|
||||
"psr/log": "1.1.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"roave/security-advisories": "dev-master"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"VisualAppeal\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Tim Helfensdörfer",
|
||||
"email": "tim@visualappeal.de"
|
||||
}
|
||||
],
|
||||
"description": "Autoupdater for PHP",
|
||||
"support": {
|
||||
"issues": "https://github.com/VisualAppeal/PHP-Auto-Update/issues",
|
||||
"source": "https://github.com/VisualAppeal/PHP-Auto-Update/tree/1.0.2"
|
||||
},
|
||||
"time": "2021-11-27T22:39:05+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": "^7.4 || ^8.0",
|
||||
"ext-ftp": "*",
|
||||
"ext-mysqli": "*",
|
||||
"ext-openssl": "*",
|
||||
"ext-curl": "*",
|
||||
"ext-json": "*",
|
||||
"ext-zip": "*",
|
||||
"ext-zlib": "*"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"plugin-api-version": "2.3.0"
|
||||
}
|
198
msd/config.php
@ -1,22 +1,6 @@
|
||||
<?php
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
MyOOS [Dumper]
|
||||
http://www.oos-shop.de/
|
||||
|
||||
Copyright (c) 2016 by the MyOOS Development Team.
|
||||
----------------------------------------------------------------------
|
||||
Based on:
|
||||
|
||||
MySqlDumper
|
||||
http://www.mysqldumper.de
|
||||
|
||||
Copyright (C)2004-2011 Daniel Schlichtholz (admin@mysqldumper.de)
|
||||
----------------------------------------------------------------------
|
||||
Released under the GNU General Public License
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
// MySQL Dumper Configuration
|
||||
// MyOOS [Dumper] Configuration
|
||||
|
||||
// Host-Adress, default 'localhost'
|
||||
$config['dbhost'] = 'localhost';
|
||||
@ -32,112 +16,148 @@ $config['dbpass'] = '!S1ge1nA';
|
||||
|
||||
//Speed Values between 50 and 1000000
|
||||
//use low values if you have bad connection or slow machines
|
||||
$config['minspeed']=100;
|
||||
$config['maxspeed']=50000;
|
||||
$config['minspeed'] = 100;
|
||||
$config['maxspeed'] = 50000;
|
||||
|
||||
// Interface language and style
|
||||
$config['language']='en';
|
||||
$config['theme']='msd';
|
||||
$config['language'] = 'en';
|
||||
$config['theme'] = 'mod';
|
||||
|
||||
//Shows the Serveradress if 1
|
||||
$config['interface_server_caption']=1;
|
||||
$config['interface_server_captioncolor']='#ff9966';
|
||||
$config['interface_server_caption'] = 1;
|
||||
$config['interface_server_captioncolor'] = '#ff9966';
|
||||
//Position of the Serveradress 0=left, 1=right
|
||||
$config['interface_server_caption_position']=0;
|
||||
$config['interface_server_caption_position'] = 0;
|
||||
|
||||
//Height of the SQL-Box in Mini-SQL in pixel
|
||||
$config['interface_sqlboxsize']=70;
|
||||
$config['interface_table_compact']=0;
|
||||
$config['interface_sqlboxsize'] = 70;
|
||||
$config['interface_table_compact'] = 0;
|
||||
|
||||
// Determine the maximum Amount for Memory Use in Bytes, 0 for no limit
|
||||
$config['memory_limit']=100000;
|
||||
$config['memory_limit'] = 100000;
|
||||
|
||||
// For gz-Compression set to 1, without compression set to 0
|
||||
$config['compression']=1;
|
||||
$config['compression'] = 1;
|
||||
|
||||
//Refreshtime for MySQL processlist in msec, use any value >1000
|
||||
$config['processlist_refresh']=3000;
|
||||
$config['processlist_refresh'] = 3000;
|
||||
|
||||
$config['empty_db_before_restore']=0;
|
||||
$config['optimize_tables_beforedump']=0;
|
||||
$config['stop_with_error']=1;
|
||||
$config['empty_db_before_restore'] = 0;
|
||||
$config['optimize_tables_beforedump'] = 0;
|
||||
$config['use_binary_container'] = 0;
|
||||
$config['stop_with_error'] = 1;
|
||||
$config['ignore_enable_keys'] = 0;
|
||||
|
||||
// For sending a mail after backup set send_mail to 1, otherless set to 0
|
||||
$config['send_mail']=0;
|
||||
$config['send_mail'] = 0;
|
||||
// Attach the backup 0=no 1=yes
|
||||
$config['send_mail_dump']=0;
|
||||
$config['send_mail_dump'] = 0;
|
||||
// set the recieve adress for the mail
|
||||
$config['email_recipient']='';
|
||||
$config['email_recipient_cc']='';
|
||||
$config['email_recipient'] = '';
|
||||
$config['email_recipient_cc'] = '';
|
||||
// set the sender adress (the script)
|
||||
$config['email_sender']='';
|
||||
$config['email_sender'] = '';
|
||||
|
||||
//max. Size of Email-Attach, here 3 MB
|
||||
$config['email_maxsize1']=3;
|
||||
$config['email_maxsize2']=2;
|
||||
$config['email_maxsize1'] = 3;
|
||||
$config['email_maxsize2'] = 2;
|
||||
|
||||
// FTP Server Configuration for Transfer
|
||||
$config['ftp_transfer'][0]=0;
|
||||
$config['ftp_timeout'][0]=30;
|
||||
$config['ftp_useSSL'][0]=0;
|
||||
$config['ftp_mode'][0]=0;
|
||||
$config['ftp_server'][0]=''; // Adress of FTP-Server
|
||||
$config['ftp_port'][0]='21'; // Port
|
||||
$config['ftp_user'][0]=''; // Username
|
||||
$config['ftp_pass'][0]=''; // Password
|
||||
$config['ftp_dir'][0]=''; // Upload-Directory
|
||||
$config['ftp_transfer'][0] = 0;
|
||||
$config['ftp_timeout'][0] = 30;
|
||||
$config['ftp_useSSL'][0] = 0;
|
||||
$config['ftp_mode'][0] = 0;
|
||||
$config['ftp_server'][0] = ''; // Adress of FTP-Server
|
||||
$config['ftp_port'][0] = '21'; // Port
|
||||
$config['ftp_user'][0] = ''; // Username
|
||||
$config['ftp_pass'][0] = ''; // Password
|
||||
$config['ftp_dir'][0] = ''; // Upload-Directory
|
||||
|
||||
$config['ftp_transfer'][1]=0;
|
||||
$config['ftp_timeout'][1]=30;
|
||||
$config['ftp_useSSL'][1]=0;
|
||||
$config['ftp_mode'][1]=0;
|
||||
$config['ftp_server'][1]='';
|
||||
$config['ftp_port'][1]='21';
|
||||
$config['ftp_user'][1]='';
|
||||
$config['ftp_pass'][1]='';
|
||||
$config['ftp_dir'][1]='';
|
||||
$config['ftp_transfer'][1] = 0;
|
||||
$config['ftp_timeout'][1] = 30;
|
||||
$config['ftp_useSSL'][1] = 0;
|
||||
$config['ftp_mode'][1] = 0;
|
||||
$config['ftp_server'][1] = '';
|
||||
$config['ftp_port'][1] = '21';
|
||||
$config['ftp_user'][1] = '';
|
||||
$config['ftp_pass'][1] = '';
|
||||
$config['ftp_dir'][1] = '';
|
||||
|
||||
$config['ftp_transfer'][2]=0;
|
||||
$config['ftp_timeout'][2]=30;
|
||||
$config['ftp_useSSL'][2]=0;
|
||||
$config['ftp_mode'][2]=0;
|
||||
$config['ftp_server'][2]='';
|
||||
$config['ftp_port'][2]='21';
|
||||
$config['ftp_user'][2]='';
|
||||
$config['ftp_pass'][2]='';
|
||||
$config['ftp_dir'][2]='';
|
||||
$config['ftp_transfer'][2] = 0;
|
||||
$config['ftp_timeout'][2] = 30;
|
||||
$config['ftp_useSSL'][2] = 0;
|
||||
$config['ftp_mode'][2] = 0;
|
||||
$config['ftp_server'][2] = '';
|
||||
$config['ftp_port'][2] = '21';
|
||||
$config['ftp_user'][2] = '';
|
||||
$config['ftp_pass'][2] = '';
|
||||
$config['ftp_dir'][2] = '';
|
||||
|
||||
// SFTP Server Configuration for Transfer
|
||||
$config['sftp_transfer'][0] = 0;
|
||||
$config['sftp_timeout'][0] = 30;
|
||||
$config['sftp_server'][0] = ''; // Adress of SFTP-Server
|
||||
$config['sftp_port'][0] = '22'; // Port
|
||||
$config['sftp_user'][0] = ''; // Username
|
||||
$config['sftp_pass'][0] = ''; // Password
|
||||
$config['sftp_dir'][0] = ''; // Upload-Directory
|
||||
$config['sftp_path_to_private_key'][0] = null; // private key (optional, default: null) can be used instead of password, set to null if password is set
|
||||
$config['sftp_secret_passphrase_for_private_key'][0] = null; // passphrase (optional, default: null), set to null if privateKey is not used or has no passphrase
|
||||
$config['sftp_fingerprint'][0] = null; // host fingerprint (optional, default: null),
|
||||
|
||||
$config['sftp_transfer'][1] = 0;
|
||||
$config['sftp_timeout'][1] = 30;
|
||||
$config['sftp_server'][1] = '';
|
||||
$config['sftp_port'][1] = '22';
|
||||
$config['sftp_user'][1] = '';
|
||||
$config['sftp_pass'][1] = '';
|
||||
$config['sftp_dir'][1] = '';
|
||||
$config['sftp_path_to_private_key'][1] = null;
|
||||
$config['sftp_secret_passphrase_for_private_key'][1] = null;
|
||||
$config['sftp_fingerprint'][1] = null;
|
||||
|
||||
$config['sftp_transfer'][2] = 0;
|
||||
$config['sftp_timeout'][2] = 30;
|
||||
$config['sftp_server'][2] = '';
|
||||
$config['sftp_port'][2] = '22';
|
||||
$config['sftp_user'][2] = '';
|
||||
$config['sftp_pass'][2] = '';
|
||||
$config['sftp_dir'][2] = '';
|
||||
$config['sftp_path_to_private_key'][2] = null;
|
||||
$config['sftp_secret_passphrase_for_private_key'][2] = null;
|
||||
$config['sftp_fingerprint'][2] = null;
|
||||
|
||||
//Multipart 0=off 1=on
|
||||
$config['multi_part']=0;
|
||||
$config['multipartgroesse1']=1;
|
||||
$config['multipartgroesse2']=2;
|
||||
$config['multipart_groesse']=0;
|
||||
$config['multi_part'] = 0;
|
||||
$config['multipartgroesse1'] = 1;
|
||||
$config['multipartgroesse2'] = 2;
|
||||
$config['multipart_groesse'] = 0;
|
||||
|
||||
//Auto-Delete 0=off 1=on
|
||||
$config['auto_delete']=0;
|
||||
$config['max_backup_files']=3;
|
||||
$config['auto_delete'] = 0;
|
||||
$config['max_backup_files'] = 3;
|
||||
|
||||
//configuration file
|
||||
$config['cron_configurationfile']='myoosdumper.conf.php';
|
||||
$config['cron_configurationfile'] = 'myoosdumper.conf.php';
|
||||
//path to perl, for windows use e.g. C:perlbinperl.exe
|
||||
$config['cron_perlpath']='/usr/bin/perl';
|
||||
$config['cron_perlpath'] = '/usr/bin/perl';
|
||||
//mailer use sendmail(1) or SMTP(0)
|
||||
$config['cron_use_sendmail']=1;
|
||||
$config['cron_use_sendmail'] = 1;
|
||||
//path to sendmail
|
||||
$sendmail_path=ini_get('sendmail_path');
|
||||
$config['cron_sendmail']=$sendmail_path>'' ? $sendmail_path: '/usr/lib/sendmail -t -oi -oem';
|
||||
$sendmail_path = ini_get('sendmail_path');
|
||||
$config['cron_sendmail'] = $sendmail_path > '' ? $sendmail_path : '/usr/lib/sendmail -t -oi -oem';
|
||||
|
||||
//adress of smtp-server
|
||||
$config['cron_smtp']='localhost';
|
||||
$config['cron_smtp'] = 'localhost';
|
||||
//smtp-port
|
||||
$config['cron_smtp_port']=25;
|
||||
$config['cron_extender']=0;
|
||||
$config['cron_compression']=1;
|
||||
$config['cron_printout']=1;
|
||||
$config['cron_completelog']=1;
|
||||
$config['cron_comment']='';
|
||||
$config['multi_dump']=0;
|
||||
$config['logcompression']=1;
|
||||
$config['log_maxsize1']=1;
|
||||
$config['log_maxsize2']=2;
|
||||
$config['log_maxsize']=1048576;
|
||||
$config['cron_smtp_port'] = 25;
|
||||
$config['cron_extender'] = 0;
|
||||
$config['cron_compression'] = 1;
|
||||
$config['cron_printout'] = 1;
|
||||
$config['cron_completelog'] = 1;
|
||||
$config['cron_comment'] = '';
|
||||
$config['multi_dump'] = 0;
|
||||
$config['logcompression'] = 1;
|
||||
$config['log_maxsize1'] = 1;
|
||||
$config['log_maxsize2'] = 2;
|
||||
$config['log_maxsize'] = 1048576;
|
||||
|
Before Width: | Height: | Size: 132 B After Width: | Height: | Size: 132 B |
Before Width: | Height: | Size: 131 B After Width: | Height: | Size: 131 B |
Before Width: | Height: | Size: 211 B After Width: | Height: | Size: 211 B |
Before Width: | Height: | Size: 131 B After Width: | Height: | Size: 131 B |
Before Width: | Height: | Size: 208 B After Width: | Height: | Size: 208 B |
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
Before Width: | Height: | Size: 991 B After Width: | Height: | Size: 991 B |
Before Width: | Height: | Size: 131 B After Width: | Height: | Size: 131 B |
Before Width: | Height: | Size: 145 B After Width: | Height: | Size: 145 B |
Before Width: | Height: | Size: 985 B After Width: | Height: | Size: 985 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1003 B After Width: | Height: | Size: 1003 B |
Before Width: | Height: | Size: 998 B After Width: | Height: | Size: 998 B |
Before Width: | Height: | Size: 547 B After Width: | Height: | Size: 547 B |
Before Width: | Height: | Size: 994 B After Width: | Height: | Size: 994 B |
Before Width: | Height: | Size: 1001 B After Width: | Height: | Size: 1001 B |
Before Width: | Height: | Size: 359 B After Width: | Height: | Size: 359 B |
Before Width: | Height: | Size: 74 B After Width: | Height: | Size: 74 B |
Before Width: | Height: | Size: 138 B After Width: | Height: | Size: 138 B |
Before Width: | Height: | Size: 154 B After Width: | Height: | Size: 154 B |
Before Width: | Height: | Size: 780 B After Width: | Height: | Size: 780 B |
Before Width: | Height: | Size: 680 B After Width: | Height: | Size: 680 B |
Before Width: | Height: | Size: 108 B After Width: | Height: | Size: 108 B |
Before Width: | Height: | Size: 296 B After Width: | Height: | Size: 296 B |
Before Width: | Height: | Size: 991 B After Width: | Height: | Size: 991 B |
Before Width: | Height: | Size: 979 B After Width: | Height: | Size: 979 B |
Before Width: | Height: | Size: 923 B After Width: | Height: | Size: 923 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 583 B After Width: | Height: | Size: 583 B |
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@ -3,7 +3,7 @@
|
||||
MyOOS [Dumper]
|
||||
http://www.oos-shop.de/
|
||||
|
||||
Copyright (c) 2016 by the MyOOS Development Team.
|
||||
Copyright (c) 2013 - 2022 by the MyOOS Development Team.
|
||||
----------------------------------------------------------------------
|
||||
Based on:
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
/*
|
||||
@MySQLDumper STYLESHEET
|
||||
@name msd
|
||||
@name mod
|
||||
@copyright MySQLDumper - Daniel Schlichtholz <http://www.mysqldumper.de>
|
||||
@author Ingo Wagener <http://www.vorderdeck.de>, Daniel Schlichtholz, Christian Gresshoener <http://www.gresshoener.de>
|
||||
@date 2008-02-28 13:39:07
|
Before Width: | Height: | Size: 859 B After Width: | Height: | Size: 859 B |
Before Width: | Height: | Size: 857 B After Width: | Height: | Size: 857 B |
Before Width: | Height: | Size: 65 B After Width: | Height: | Size: 65 B |
Before Width: | Height: | Size: 878 B After Width: | Height: | Size: 878 B |
Before Width: | Height: | Size: 64 B After Width: | Height: | Size: 64 B |
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
Before Width: | Height: | Size: 995 B After Width: | Height: | Size: 995 B |
Before Width: | Height: | Size: 880 B After Width: | Height: | Size: 880 B |
Before Width: | Height: | Size: 944 B After Width: | Height: | Size: 944 B |
Before Width: | Height: | Size: 985 B After Width: | Height: | Size: 985 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1003 B After Width: | Height: | Size: 1003 B |
Before Width: | Height: | Size: 998 B After Width: | Height: | Size: 998 B |
Before Width: | Height: | Size: 547 B After Width: | Height: | Size: 547 B |
Before Width: | Height: | Size: 994 B After Width: | Height: | Size: 994 B |
Before Width: | Height: | Size: 1001 B After Width: | Height: | Size: 1001 B |
Before Width: | Height: | Size: 359 B After Width: | Height: | Size: 359 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 74 B After Width: | Height: | Size: 74 B |
Before Width: | Height: | Size: 138 B After Width: | Height: | Size: 138 B |
Before Width: | Height: | Size: 941 B After Width: | Height: | Size: 941 B |
Before Width: | Height: | Size: 502 B After Width: | Height: | Size: 502 B |
Before Width: | Height: | Size: 471 B After Width: | Height: | Size: 471 B |
Before Width: | Height: | Size: 484 B After Width: | Height: | Size: 484 B |
Before Width: | Height: | Size: 296 B After Width: | Height: | Size: 296 B |
Before Width: | Height: | Size: 540 B After Width: | Height: | Size: 540 B |
Before Width: | Height: | Size: 979 B After Width: | Height: | Size: 979 B |
Before Width: | Height: | Size: 923 B After Width: | Height: | Size: 923 B |
Before Width: | Height: | Size: 53 B After Width: | Height: | Size: 53 B |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 51 B After Width: | Height: | Size: 51 B |
Before Width: | Height: | Size: 200 B After Width: | Height: | Size: 200 B |
@ -1,725 +0,0 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
MyOOS [Dumper]
|
||||
http://www.oos-shop.de/
|
||||
|
||||
Copyright (c) 2016 by the MyOOS Development Team.
|
||||
----------------------------------------------------------------------
|
||||
Based on:
|
||||
|
||||
MySqlDumper
|
||||
http://www.mysqldumper.de
|
||||
|
||||
Copyright (C)2004-2011 Daniel Schlichtholz (admin@mysqldumper.de)
|
||||
----------------------------------------------------------------------
|
||||
Released under the GNU General Public License
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
@MySQLDumper STYLESHEET
|
||||
@name msd_green
|
||||
@copyright MySQLDumper - Daniel Schlichtholz <http://www.mysqldumper.de>
|
||||
@author Ingo Wagener <http://www.vorderdeck.de>, Daniel Schlichtholz, Christian Gresshoener <http://www.gresshoener.de>
|
||||
@date 2006-04-11 16:26:00
|
||||
@lastmodified 2009-09-15 00:21:30
|
||||
@media screen and projection
|
||||
*/
|
||||
*,.normargin {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font: 12px/1.5 Verdana, Helvetica, sans-serif; /* Important IE Bugfix: No spaces in font-attribute between px and slash */
|
||||
color: #4E5665;
|
||||
background: #C7D1D0;
|
||||
}
|
||||
|
||||
body.content {
|
||||
min-width: 540px;
|
||||
}
|
||||
|
||||
.menu-frame {
|
||||
font: 12px/1.5 Verdana, Helvetica, sans-serif;
|
||||
background-color: #738C88;
|
||||
color: #eee;
|
||||
}
|
||||
|
||||
/* LINKS */
|
||||
a {
|
||||
color: #4E5665;
|
||||
text-decoration: underline;
|
||||
font: 12px verdana, sans-serif
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #E87B00;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
a.ul {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* general */
|
||||
#pagetitle {
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
background: url(pics/pagetitle.gif);
|
||||
background-repeat: repeat-x;
|
||||
letter-spacing: 2px;
|
||||
color: white;
|
||||
padding: 2px 6px;
|
||||
border-bottom: 1px solid #A9AFBB;
|
||||
height: 26px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#server0 {
|
||||
position: absolute;
|
||||
bottom: 4px;
|
||||
text-align: center;
|
||||
left: 10px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#server1 {
|
||||
position: absolute;
|
||||
right: 16px;
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
a.server {
|
||||
color: #333333;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
a.server:hover {
|
||||
text-decoration: underline;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.version {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 31px;
|
||||
left: 0;
|
||||
width: 190px;
|
||||
z-index: 5;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.ssmall {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.success {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.explain {
|
||||
text-decoration: none;
|
||||
border-bottom: 1px dotted;
|
||||
}
|
||||
|
||||
.explain:hover {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.active_db {
|
||||
font-weight: bold;
|
||||
border-bottom: 1px dotted;
|
||||
color: #9AA2B1;
|
||||
}
|
||||
|
||||
table td {
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
padding: 0 6px;
|
||||
}
|
||||
|
||||
table th {
|
||||
padding: 0 6px;
|
||||
}
|
||||
|
||||
table.bdr,.bdr {
|
||||
border: 1px solid #ddd !important;
|
||||
border-collapse: collapse !important;
|
||||
}
|
||||
|
||||
/* MENU */
|
||||
#wrapmenu {
|
||||
background: url(pics/pagetitle.gif) #A9AFBB;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
#db-select {
|
||||
font: 12px Verdana, Helvetica, sans-serif;
|
||||
color: #4E5665;
|
||||
background: #A9AFBB;
|
||||
}
|
||||
|
||||
#menu {
|
||||
position:absolute;
|
||||
margin: 0px;
|
||||
top: 222px;
|
||||
left:0;
|
||||
width:190px;
|
||||
height:160px;
|
||||
background-color: #738C88;
|
||||
border-top: 1px solid #9AA2B1
|
||||
}
|
||||
|
||||
#menu ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#menu ul li {
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
#menu ul li a {
|
||||
display: block;
|
||||
position: relative; /*fuer den ie*/
|
||||
font: 11px/20px verdana, sans-serif;
|
||||
text-decoration: none;
|
||||
color: #4E5665;
|
||||
background: url(pics/mainnavi.gif) repeat-x 0 -20px;
|
||||
padding: 0 15px;
|
||||
height: 20px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#menu ul li a:hover {
|
||||
color: #fff;
|
||||
background: url(pics/mainnavi.gif) repeat-x 0 0px;
|
||||
}
|
||||
|
||||
/*der aktive link in der navi*/
|
||||
#menu ul li.active a {
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
background: url(pics/mainnavi.gif) repeat-x 0 -40px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#menu p,#menu p a {
|
||||
color: #fff;
|
||||
line-height: 1.5;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#version {
|
||||
position:absolute;
|
||||
top:30px;
|
||||
left:0;
|
||||
margin:0;
|
||||
padding:0;
|
||||
height:191px;
|
||||
color: #4E5665;
|
||||
z-index:10;
|
||||
border-top:1px solid #A9AFBB;
|
||||
}
|
||||
.version-line
|
||||
{
|
||||
position:absolute;
|
||||
top:-1px;
|
||||
left:0;
|
||||
width:190px;
|
||||
text-align:center;
|
||||
font: 11px/20px verdana, sans-serif;
|
||||
}
|
||||
|
||||
#version a:link,
|
||||
#version a:active,
|
||||
#version a:hover,
|
||||
#version a:visited
|
||||
{ color: #4E5665; }
|
||||
|
||||
|
||||
#selectConfig
|
||||
{
|
||||
position:absolute;
|
||||
top:380px;
|
||||
left:0;
|
||||
width:190px;
|
||||
height: 196px;
|
||||
z-index:5;
|
||||
}
|
||||
|
||||
table.bdr,.bdr {
|
||||
border: 1px solid #4E5665 !important;
|
||||
border-collapse: collapse !important;
|
||||
}
|
||||
|
||||
#db-selectbox,#config-selectbox {
|
||||
position: relative;
|
||||
top: 0px;
|
||||
width: 190px;
|
||||
background: transparent;
|
||||
text-align: center;
|
||||
font: 11px/1.5 Verdana, Helvetica, sans-serif;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#db-selectbox a,#config-selectbox a {
|
||||
font: 11px/1.5 Verdana, Helvetica, sans-serif;
|
||||
color: white;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#db-selectbox a:hover,#config-selectbox a:hover {
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
fieldset {
|
||||
margin: 10px;
|
||||
padding: 5px;
|
||||
border: 1px solid #ddd;
|
||||
color: #256777;
|
||||
}
|
||||
|
||||
body.content legend {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
body.menu fieldset p {
|
||||
margin: 5px 0 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#configSelect legend,#dbSelect legend,#dbSelect a {
|
||||
font: 11px/1.5 Verdana, Helvetica, sans-serif;
|
||||
color: #eee;
|
||||
}
|
||||
|
||||
/* MAIN */
|
||||
#topnavi {
|
||||
list-style: none;
|
||||
margin: 10px 0 20px;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
|
||||
#topnavi li {
|
||||
float: left;
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
#topnavi li a {
|
||||
float: left;
|
||||
font: 0.8em verdana, arial, sans-serif;
|
||||
border: 1px solid #4E5665;
|
||||
background-color: #A9B2B1;
|
||||
color: #4E5665;
|
||||
margin: 3px;
|
||||
padding: 3px 23px 4px 23px;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#topnavi li a span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#content {
|
||||
margin-left: 12px;
|
||||
background-color: #C7D1D0;
|
||||
}
|
||||
|
||||
#content p {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
/*Tabellen */
|
||||
table tr.dbrow {
|
||||
background: #E4E9E8;
|
||||
}
|
||||
|
||||
table tr.dbrow1 {
|
||||
background: #D5DDDC;
|
||||
}
|
||||
|
||||
table tr.dbrowsel {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
table td.treffer {
|
||||
background: #000;
|
||||
}
|
||||
|
||||
/* Treffer bei der MySQL-Suche */
|
||||
table tr.dbrow .treffer,table tr.dbrow1 .treffer {
|
||||
color: yellow;
|
||||
background-color: #738C88;
|
||||
}
|
||||
|
||||
table.bordersmall,table.border {
|
||||
border: 2px solid #738C88;
|
||||
width: 84%;
|
||||
}
|
||||
|
||||
table.border th,table.bordersmall th {
|
||||
font-size: 11px;
|
||||
color: #738C88;
|
||||
}
|
||||
|
||||
table tr.thead th,table tr.thead td {
|
||||
background-color: #A5B6B4;
|
||||
color: #738C88;
|
||||
border: 1px solid #738C88;
|
||||
}
|
||||
|
||||
table.border tr.thead,table.bordersmall tr.thead {
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
table td.sum {
|
||||
background-color: red;
|
||||
font-weight: bold;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
table.bordersmall input,table.bordersmall select,table.bordersmall td,#sqlheaderbox select
|
||||
{
|
||||
border: 1px solid #738C88;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.tdcompact {
|
||||
width: 100px;
|
||||
height: 16px;
|
||||
overflow: hidden;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.tdnormal {
|
||||
white-space: nowrap;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.sqlheadmenu a {
|
||||
|
||||
}
|
||||
|
||||
/* FORM-Elements */
|
||||
#content .Formbutton,#content .Formtext {
|
||||
white-space: nowrap;
|
||||
margin: 6px;
|
||||
font: 10px verdana, sans-serif;
|
||||
border: 1px solid #4E5665;
|
||||
background: #A9B2B1;
|
||||
color: #4E5665;
|
||||
padding: 2px 10px;
|
||||
cursor: pointer;
|
||||
overflow: visible;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#content a.Formbutton {
|
||||
padding: 2px 23px 3px 23px;
|
||||
}
|
||||
|
||||
label {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.Formbutton {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.Formbutton:disabled {
|
||||
cursor: default !important;
|
||||
}
|
||||
|
||||
#content .Formtext {
|
||||
padding: 2px;
|
||||
overflow: hidden;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
#content .SQLbutton {
|
||||
font-size: 11px;
|
||||
background: #E4E9E8;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#content textarea #thta {
|
||||
font-size: 11px;
|
||||
color: blue;
|
||||
width: 400px;
|
||||
height: 300px;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
#content textarea {
|
||||
width: 100%;
|
||||
background: #B3C2C0;
|
||||
}
|
||||
|
||||
input.radio,input.checkbox {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/* Colors for Formelements */
|
||||
input.text,input.small {
|
||||
background: #B3C2C0;
|
||||
color: #4E5665;
|
||||
}
|
||||
|
||||
select {
|
||||
background: #B3C2C0;
|
||||
color: #4E5665;
|
||||
}
|
||||
|
||||
textarea {
|
||||
background: #B3C2C0;
|
||||
color: #4E5665;
|
||||
}
|
||||
|
||||
/* for Geckos */
|
||||
input[disabled] {
|
||||
color: #888 !important;
|
||||
}
|
||||
|
||||
/*horizontales Men<65> */
|
||||
#hormenu {
|
||||
|
||||
}
|
||||
|
||||
#hormenu ul {
|
||||
border-bottom: thin solid #D5DDDC;
|
||||
margin-bottom: 8px;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
#hormenu ul li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#hormenu ul li a {
|
||||
font: 11px/20px verdana, sans-serif;
|
||||
text-decoration: none;
|
||||
color: #4E5665;
|
||||
padding: 0 14px;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
#hormenu ul li a:hover {
|
||||
color: #E87B00;
|
||||
}
|
||||
|
||||
#hormenu ul li#active a {
|
||||
font: bold 11px/20px verdana, sans-serif;
|
||||
text-decoration: none;
|
||||
color: #E87B00;
|
||||
float: left;
|
||||
padding: 0 14px;
|
||||
}
|
||||
|
||||
#hormenu ul li#active a:hover {
|
||||
color: #E87B00;
|
||||
}
|
||||
|
||||
/* spezielle Elemente */
|
||||
.MySQLbox {
|
||||
font-size: 10pt;
|
||||
padding: 6px;
|
||||
background: #000;
|
||||
color: #fff;
|
||||
border: thin solid #999999;
|
||||
height: 200px;
|
||||
width: 80%;
|
||||
text-align: left;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#content #mysqlbox {
|
||||
border: 1px solid #738C88;
|
||||
background: #D5DDDC;
|
||||
}
|
||||
|
||||
#content #sqlheaderbox,.sqlbox-warning {
|
||||
white-space: nowrap;
|
||||
vertical-align: top;
|
||||
padding: 8px;
|
||||
border: 1px solid #738C88;
|
||||
color: #256777;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
#sqlheaderbox .Formbutton {
|
||||
line-height: 12px;
|
||||
padding: 2px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
#sqltextarea {
|
||||
width: 100% !important;
|
||||
overflow: auto;
|
||||
background-color: #B3C2C0;
|
||||
}
|
||||
|
||||
#content #sqlheaderbox {
|
||||
white-space: nowrap;
|
||||
height: 20px;
|
||||
vertical-align: middle;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
#content #sqleditbox {
|
||||
border: 1px solid #738C88;
|
||||
background: #E4E9E8;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#content #sqleditbox form {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
#content #sqleditbox p {
|
||||
background: #A5B6B4;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#content #sqlnewbox {
|
||||
border: 1px solid #738C88;
|
||||
background: #E4E9E8;
|
||||
}
|
||||
|
||||
#content #sqlnewbox p {
|
||||
background: #A5B6B4;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#content #sqloutbox {
|
||||
font-size: 11px;
|
||||
width: 700px;
|
||||
padding: 6px;
|
||||
background: #D5DDDC;
|
||||
border: 1px solid #738C88;
|
||||
overflow: auto;
|
||||
height: 240px;
|
||||
}
|
||||
|
||||
#content p.autodel {
|
||||
font-size: 11px;
|
||||
border-bottom: 1px dashed #fff;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
#content .Logbox {
|
||||
font: 12px/1.2 "Courier New", Courier, monospace;
|
||||
padding: 6px;
|
||||
border: thin solid #738C88;
|
||||
height: 320px;
|
||||
width: 90%;
|
||||
text-align: left;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#content .Logbox span {
|
||||
color: #738C88;
|
||||
}
|
||||
|
||||
#content .backupmsg {
|
||||
padding-left: 20px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#content .backupmsg .success,#content .backupmsg a {
|
||||
color: #999;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#content .backupmsg .error {
|
||||
color: red;
|
||||
}
|
||||
|
||||
/* TEXT */
|
||||
h1 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 14px;
|
||||
margin: 12px 0;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 11px;
|
||||
background: #D1D4DC;
|
||||
border: 1px solid #9AA2B1;
|
||||
text-indent: 12px;
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
/* Config */
|
||||
#configleft {
|
||||
float: left;
|
||||
width: 160px;
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
#configleft .Formbutton {
|
||||
width: 130px;
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
#configleft .ConfigButton {
|
||||
width: 130px;
|
||||
font-size: 11px;
|
||||
background: #E4E9E8;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#configleft .ConfigButtonSelected {
|
||||
width: 130px;
|
||||
font-size: 11px;
|
||||
background: #D5DDDC;
|
||||
}
|
||||
|
||||
#configright {
|
||||
font-size: 11px;
|
||||
margin-left: 160px;
|
||||
}
|
||||
|
||||
#configright fieldset {
|
||||
border: 1px solid #D5DDDC;
|
||||
padding: 12px;
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
#configright legend {
|
||||
color: #646968;
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
#footer {
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
border-top: 1px dashed #eee;
|
||||
margin-top: 36px;
|
||||
}
|
||||
|
||||
#footer a {
|
||||
font-size: 11px;
|
||||
}
|
799
msd/dump.php
@ -4,7 +4,7 @@
|
||||
MyOOS [Dumper]
|
||||
http://www.oos-shop.de/
|
||||
|
||||
Copyright (c) 2016 by the MyOOS Development Team.
|
||||
Copyright (c) 2013 - 2022 by the MyOOS Development Team.
|
||||
----------------------------------------------------------------------
|
||||
Based on:
|
||||
|
||||
@ -18,454 +18,461 @@
|
||||
|
||||
define('OOS_VALID_MOD', true);
|
||||
|
||||
if (!@ob_start("ob_gzhandler")) @ob_start();
|
||||
if (!@ob_start('ob_gzhandler')) {
|
||||
@ob_start();
|
||||
}
|
||||
|
||||
session_name('MyOOSDumperID');
|
||||
session_start();
|
||||
$aus2=$page_parameter=$a=$out='';
|
||||
include_once ('./inc/functions_dump.php');
|
||||
$aus2 = $page_parameter = $a = $out = '';
|
||||
include_once './inc/functions_dump.php';
|
||||
|
||||
// beim Erstaufruf Konfigurationsdatei auslesen und in Session speichern
|
||||
if (isset($_GET['config']))
|
||||
{
|
||||
// Session loeschen, damit keine alten Werte des letzten Laufs uebernommen werden
|
||||
if (isset($_SESSION['dump'])) unset($_SESSION['dump']);
|
||||
$search=array(
|
||||
|
||||
'/','\\',':','@');
|
||||
$replace=array(
|
||||
|
||||
'','','','');
|
||||
$config_file=str_replace($search,$replace,$_GET['config']);
|
||||
if (is_readable($config['paths']['config'].$config_file.'.php'))
|
||||
{
|
||||
$config['files']['parameter']=$config['paths']['config'].$config_file.'.php';
|
||||
$_SESSION['config_file']=$config_file;
|
||||
read_config($config['paths']['config'].$config['files']['parameter']);
|
||||
$_SESSION['config']=$config;
|
||||
}
|
||||
else
|
||||
die("Hacking attempt or configuration not found!");
|
||||
// read configuration file on first call and save it in session
|
||||
if (isset($_GET['config'])) {
|
||||
// Session loeschen, damit keine alten Werte des letzten Laufs uebernommen werden
|
||||
if (isset($_SESSION['dump'])) {
|
||||
unset($_SESSION['dump']);
|
||||
}
|
||||
$search = [
|
||||
'/', '\\', ':', '@', ];
|
||||
$replace = [
|
||||
'', '', '', '', ];
|
||||
$config_file = str_replace($search, $replace, $_GET['config']);
|
||||
if (is_readable($config['paths']['config'].$config_file.'.php')) {
|
||||
$config['files']['parameter'] = $config['paths']['config'].$config_file.'.php';
|
||||
$_SESSION['config_file'] = $config_file;
|
||||
read_config($config['paths']['config'].$config['files']['parameter']);
|
||||
$_SESSION['config'] = $config;
|
||||
} else {
|
||||
exit('Hacking attempt or configuration not found!');
|
||||
}
|
||||
}
|
||||
$config=$_SESSION['config'];
|
||||
include ('./'.$config['files']['parameter']);
|
||||
$config['files']['iconpath']='./css/'.$config['theme'].'/icons/';
|
||||
include ('./inc/mysql.php');
|
||||
include ('./language/'.$config['language'].'/lang.php');
|
||||
include ('./language/'.$config['language'].'/lang_dump.php');
|
||||
$config = $_SESSION['config'];
|
||||
|
||||
$pageheader=MSDHeader();
|
||||
$DumpFertig=0;
|
||||
$relativ_path='./';
|
||||
$flipped=array_flip($databases['Name']);
|
||||
include './'.$config['files']['parameter'];
|
||||
$config['files']['iconpath'] = './css/'.$config['theme'].'/icons/';
|
||||
include './inc/mysqli.php';
|
||||
include './language/'.$config['language'].'/lang.php';
|
||||
include './language/'.$config['language'].'/lang_dump.php';
|
||||
|
||||
if (isset($_SESSION['dump'])&&!isset($_GET['config']))
|
||||
{
|
||||
$dump=$_SESSION['dump'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$dump['tables']=Array();
|
||||
$dump['records']=Array();
|
||||
$dump['skip_data']=Array();
|
||||
$dump['totalrecords']=0;
|
||||
$dump['dbindex']=0;
|
||||
//$_POST-Parameter lesen
|
||||
$dump['kommentar']=(isset($_GET['comment'])) ? urldecode($_GET['comment']):'';
|
||||
if (isset($_POST['kommentar'])) $dump['kommentar']=urldecode($_POST['kommentar']);
|
||||
if (get_magic_quotes_gpc()) $dump['kommentar']=stripslashes($dump['kommentar']);
|
||||
$pageheader = MODHeader();
|
||||
$DumpFertig = 0;
|
||||
$relativ_path = './';
|
||||
$flipped = array_flip($databases['Name']);
|
||||
|
||||
$dump['backupdatei']=(isset($_POST['backupdatei'])) ? $_POST['backupdatei']:'';
|
||||
$dump['part']=(isset($_POST['part'])) ? $_POST['part']:1;
|
||||
$dump['part_offset']=(isset($_POST['part_offset'])) ? $_POST['part_offset']:0;
|
||||
$dump['verbraucht']=(isset($_POST['verbraucht'])) ? $_POST['verbraucht']:0;
|
||||
$dump['errors']=(isset($_POST['errors'])) ? $_POST['errors']:0;
|
||||
$dump['table_offset']=(isset($_POST['table_offset'])) ? $_POST['table_offset']:-1;
|
||||
$dump['zeilen_offset']=(isset($_POST['zeilen_offset'])) ? $_POST['zeilen_offset']:0;
|
||||
$dump['filename_stamp']=(isset($_POST['filename_stamp'])) ? $_POST['filename_stamp']:'';
|
||||
$dump['anzahl_zeilen']=(isset($_POST['anzahl_zeilen'])) ? $_POST['anzahl_zeilen']:(($config['minspeed']>0) ? $config['minspeed']:50);
|
||||
$dump['dump_encoding']=(isset($_POST['dump_encoding'])) ? urldecode($_POST['dump_encoding']):'';
|
||||
if (isset($_SESSION['dump']) && !isset($_GET['config'])) {
|
||||
$dump = $_SESSION['dump'];
|
||||
} else {
|
||||
$dump['tables'] = [];
|
||||
$dump['records'] = [];
|
||||
$dump['skip_data'] = [];
|
||||
$dump['totalrecords'] = 0;
|
||||
$dump['dbindex'] = 0;
|
||||
// Read $_POST parameter
|
||||
$dump['kommentar'] = (isset($_GET['comment'])) ? urldecode($_GET['comment']) : '';
|
||||
if (isset($_POST['kommentar'])) {
|
||||
$dump['kommentar'] = urldecode($_POST['kommentar']);
|
||||
}
|
||||
|
||||
if (isset($_GET['sel_dump_encoding']))
|
||||
{
|
||||
// Erstaufruf -> encoding auswerten
|
||||
include_once ('./inc/functions_sql.php');
|
||||
get_sql_encodings();
|
||||
$encodingline=$config['mysql_possible_character_sets'][$_GET['sel_dump_encoding']];
|
||||
$encoding=explode(' ',$encodingline);
|
||||
$dump['dump_encoding']=isset($encoding[0]) ? $encoding[0]:$encodingline;
|
||||
}
|
||||
include ('./inc/define_icons.php');
|
||||
$dump['tabellen_gesamt']=0;
|
||||
$dump['backupdatei'] = (isset($_POST['backupdatei'])) ? $_POST['backupdatei'] : '';
|
||||
$dump['part'] = (isset($_POST['part'])) ? $_POST['part'] : 1;
|
||||
$dump['part_offset'] = (isset($_POST['part_offset'])) ? $_POST['part_offset'] : 0;
|
||||
$dump['verbraucht'] = (isset($_POST['verbraucht'])) ? $_POST['verbraucht'] : 0;
|
||||
$dump['errors'] = (isset($_POST['errors'])) ? $_POST['errors'] : 0;
|
||||
$dump['table_offset'] = (isset($_POST['table_offset'])) ? $_POST['table_offset'] : -1;
|
||||
$dump['zeilen_offset'] = (isset($_POST['zeilen_offset'])) ? $_POST['zeilen_offset'] : 0;
|
||||
$dump['filename_stamp'] = (isset($_POST['filename_stamp'])) ? $_POST['filename_stamp'] : '';
|
||||
$dump['anzahl_zeilen'] = (isset($_POST['anzahl_zeilen'])) ? $_POST['anzahl_zeilen'] : (((isset($config['minspeed']) && $config['minspeed'] > 0)) ? $config['minspeed'] : 50);
|
||||
$dump['dump_encoding'] = (isset($_POST['dump_encoding'])) ? urldecode($_POST['dump_encoding']) : '';
|
||||
|
||||
if (isset($_GET['sel_dump_encoding'])) {
|
||||
// First call -> evaluate encoding
|
||||
include_once './inc/functions_sql.php';
|
||||
get_sql_encodings();
|
||||
$encodingline = $config['mysql_possible_character_sets'][$_GET['sel_dump_encoding']];
|
||||
$encoding = explode(' ', $encodingline);
|
||||
$dump['dump_encoding'] = isset($encoding[0]) ? $encoding[0] : $encodingline;
|
||||
}
|
||||
include './inc/define_icons.php';
|
||||
$dump['tabellen_gesamt'] = 0;
|
||||
}
|
||||
|
||||
$mp2=array(
|
||||
$mp2 = [
|
||||
'Bytes', 'Kilobytes', 'Megabytes', 'Gigabytes', ];
|
||||
|
||||
'Bytes','Kilobytes','Megabytes','Gigabytes');
|
||||
|
||||
FillMultiDBArrays();
|
||||
if ($databases['db_actual_tableselected']!=''&&$config['multi_dump']==0)
|
||||
{
|
||||
$dump['tblArray']=explode('|',$databases['db_actual_tableselected']);
|
||||
$tbl_sel=true;
|
||||
$msgTbl=sprintf($lang['L_NR_TABLES_SELECTED'],count($dump['tblArray']));
|
||||
FillMultiDBarrays();
|
||||
if ('' != $databases['db_actual_tableselected'] && 0 == $config['multi_dump']) {
|
||||
$dump['tblArray'] = explode('|', $databases['db_actual_tableselected']);
|
||||
$tbl_sel = true;
|
||||
$msgTbl = sprintf($lang['L_NR_TABLES_SELECTED'], count($dump['tblArray']));
|
||||
}
|
||||
// Korrektur -> Multi-DB-Array ist gefuellt (damit die Infos in der Konfig nicht verloren gehen), aber Multidump ist nicht aktiviert)
|
||||
if ($config['multi_dump']==0)
|
||||
{
|
||||
unset($databases['multi']);
|
||||
$databases['multi']=array();
|
||||
$databases['multi'][0]=$databases['db_actual'];
|
||||
}
|
||||
else
|
||||
{
|
||||
// wenn Multidump aktiviert ist, aber keine DB gewaehlt wurde -> aktuelle DB uebernehmen
|
||||
if (!isset($databases['multi'][0])) $databases['multi'][0]=$databases['db_actual'];
|
||||
// find correct dbindex -> take dbname from $databases['multi'] and get the correct index
|
||||
// from $databases['Name'] -> needed to set $dump['dbindex'] for first run of command_before_dump
|
||||
$dump['dbindex']=$flipped[$databases['multi'][0]];
|
||||
// Correction -> Multi-DB-array is filled (so that the info is not lost in the config), but multidump is not activated)
|
||||
if (isset($config['multi_dump']) && (0 == $config['multi_dump'])) {
|
||||
unset($databases['multi']);
|
||||
$databases['multi'] = [];
|
||||
$databases['multi'][0] = $databases['db_actual'];
|
||||
} else {
|
||||
// if multidump is activated, but no DB is selected -> take over current DB
|
||||
if (!isset($databases['multi'][0])) {
|
||||
$databases['multi'][0] = $databases['db_actual'];
|
||||
}
|
||||
// find correct dbindex -> take dbname from $databases['multi'] and get the correct index
|
||||
// from $databases['Name'] -> needed to set $dump['dbindex'] for first run of command_before_dump
|
||||
$dump['dbindex'] = $flipped[$databases['multi'][0]];
|
||||
}
|
||||
|
||||
//Zeitzähler aktivieren
|
||||
$dump['max_zeit']=intval($config['max_execution_time']*$config['time_buffer']);
|
||||
$dump['startzeit']=time();
|
||||
$xtime=(isset($_POST['xtime'])) ? $_POST['xtime']:time();
|
||||
$dump['countdata']=(!empty($_POST['countdata'])) ? $_POST['countdata']:0;
|
||||
$dump['aufruf']=(!empty($_POST['aufruf'])) ? $_POST['aufruf']:0;
|
||||
MSD_mysql_connect($dump['dump_encoding']);
|
||||
if ($dump['table_offset']==-1) ExecuteCommand('b');
|
||||
// Activate time counter
|
||||
$dump['max_zeit'] = intval($config['max_execution_time'] * $config['time_buffer']);
|
||||
$dump['startzeit'] = time();
|
||||
$xtime = (isset($_POST['xtime'])) ? $_POST['xtime'] : time();
|
||||
$dump['countdata'] = (!empty($_POST['countdata'])) ? $_POST['countdata'] : 0;
|
||||
$dump['aufruf'] = (!empty($_POST['aufruf'])) ? $_POST['aufruf'] : 0;
|
||||
mod_mysqli_connect($dump['dump_encoding']);
|
||||
|
||||
if (-1 == $dump['table_offset']) {
|
||||
ExecuteCommand('b');
|
||||
}
|
||||
|
||||
// only read tableinfos the first time and save it to session to speed up backing up process
|
||||
if (!isset($_SESSION['dump'])) getDBInfos();
|
||||
|
||||
$num_tables=count($dump['tables']);
|
||||
|
||||
if ($config['optimize_tables_beforedump']==1&&$dump['table_offset']==-1) $out.=sprintf($lang['L_NR_TABLES_OPTIMIZED'],$num_tables).'<br>';
|
||||
$dump['data']='';
|
||||
$dump['dbindex']=(isset($_POST['dbindex'])) ? $_POST['dbindex']:$flipped[$databases['multi'][0]];
|
||||
|
||||
//Ausgaben-Header bauen
|
||||
$aus_header[]=headline('Backup: '.(($config['multi_dump']==1) ? 'Multidump ('.count($databases['multi']).' '.$lang['L_DBS'].')':$lang['L_DB'].': '.$databases['Name'][$dump['dbindex']].(($databases['praefix'][$dump['dbindex']]!='') ? ' ('.$lang['L_WITHPRAEFIX'].' <span>'.$databases['praefix'][$dump['dbindex']].'</span>)':'')));
|
||||
if (isset($aus_error)&&count($aus_error)>0) $aus_header=array_merge($aus_header,$aus_error);
|
||||
|
||||
if ($num_tables==0)
|
||||
{
|
||||
//keine Tabellen gefunden
|
||||
$aus[]='<br><br><p class="error">'.$lang['L_ERROR'].': '.sprintf($lang['L_DUMP_NOTABLES'],$databases['Name'][$dump['dbindex']]).'</p>';
|
||||
if (!$config['multi_dump']==1)
|
||||
{
|
||||
echo $pageheader;
|
||||
echo get_page_parameter($dump);
|
||||
echo implode("\n",$aus);
|
||||
echo '</body></html>';
|
||||
exit();
|
||||
}
|
||||
if (!isset($_SESSION['dump'])) {
|
||||
getDBInfos();
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($dump['table_offset']==-1)
|
||||
{
|
||||
// File anlegen, da Erstaufruf
|
||||
new_file();
|
||||
$dump['table_offset']=0; // jetzt kanns losgehen
|
||||
flush();
|
||||
}
|
||||
else
|
||||
{
|
||||
// SQL-Befehle ermitteln
|
||||
$dump['restzeilen']=$dump['anzahl_zeilen'];
|
||||
while (($dump['table_offset']<$num_tables)&&($dump['restzeilen']>0))
|
||||
{
|
||||
$table=substr($dump['tables'][$dump['table_offset']],strpos($dump['tables'][$dump['table_offset']],'|')+1);
|
||||
$adbname=substr($dump['tables'][$dump['table_offset']],0,strpos($dump['tables'][$dump['table_offset']],'|'));
|
||||
if ($databases['Name'][$dump['dbindex']]!=$adbname)
|
||||
{
|
||||
//neue Datenbank
|
||||
$dump['data'].="\nSET FOREIGN_KEY_CHECKS=1;";
|
||||
$dump['data'].="\n".$mysql_commentstring.' EOB'."\n\n";
|
||||
WriteToDumpFile();
|
||||
WriteLog('Dump \''.$dump['backupdatei'].'\' finished.');
|
||||
ExecuteCommand('a');
|
||||
if ($config['multi_part']==1)
|
||||
{
|
||||
$out.=$lang['L_FINISHED'].'<br><div class="backupmsg">';
|
||||
$dateistamm=substr($dump['backupdatei'],0,strrpos($dump['backupdatei'],'part_')).'part_';
|
||||
$dateiendung=($config['compression']==1) ? '.sql.gz':'.sql';
|
||||
for($i=1;$i<($dump['part']-$dump['part_offset']);$i++)
|
||||
{
|
||||
$mpdatei=$dateistamm.$i.$dateiendung;
|
||||
clearstatcache();
|
||||
$sz=byte_output(@filesize($config['paths']['backup'].$mpdatei));
|
||||
$out.=$lang['L_FILE'].' <a href="'.$config['paths']['backup'].$mpdatei.'" class="smallblack">'.$mpdatei.' ('.$sz.')</a> '.$lang['L_DUMP_SUCCESSFUL'].'<br>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
clearstatcache();
|
||||
$out.=$lang['L_FINISHED'].'<br><div class="backupmsg"><a href="'.$config['paths']['backup'].$dump['backupdatei'].'" class="smallblack">'.$dump['backupdatei'].' ('.byte_output(filesize($config['paths']['backup'].$dump['backupdatei'])).')</a><br>';
|
||||
}
|
||||
if ($config['send_mail']==1) DoEmail();
|
||||
|
||||
for($i=0;$i<3;$i++)
|
||||
{
|
||||
if ($config['ftp_transfer'][$i]==1) DoFTP($i);
|
||||
}
|
||||
if (isset($flipped[$adbname])) $dump['dbindex']=$flipped[$adbname];
|
||||
$dump['part_offset']=$dump['part']-1;
|
||||
$out.='</div><br>';
|
||||
ExecuteCommand('b');
|
||||
new_file();
|
||||
}
|
||||
$num_tables = count($dump['tables']);
|
||||
|
||||
$aktuelle_tabelle=$dump['table_offset'];
|
||||
if ($dump['zeilen_offset']==0)
|
||||
{
|
||||
if ($config['minspeed']>0)
|
||||
{
|
||||
$dump['anzahl_zeilen']=$config['minspeed'];
|
||||
$dump['restzeilen']=$config['minspeed'];
|
||||
}
|
||||
if ((isset($config['optimize_tables_beforedump']) && (1 == $config['optimize_tables_beforedump'])) && -1 == $dump['table_offset']) {
|
||||
$out .= sprintf($lang['L_NR_TABLES_OPTIMIZED'], $num_tables).'<br>';
|
||||
}
|
||||
$dump['data'] = '';
|
||||
$dump['dbindex'] = (isset($_POST['dbindex'])) ? $_POST['dbindex'] : $flipped[$databases['multi'][0]];
|
||||
|
||||
$create_statement='';
|
||||
$create_statement=get_def($adbname,$table);
|
||||
// Build output header
|
||||
$aus_header[] = headline('Backup: '.((isset($config['multi_dump']) && (1 == $config['multi_dump'])) ? 'Multidump ('.count($databases['multi']).' '.$lang['L_DBS'].')' : $lang['L_DB'].': '.$databases['Name'][$dump['dbindex']].(('' != $databases['praefix'][$dump['dbindex']]) ? ' ('.$lang['L_WITHPRAEFIX'].' <span>'.$databases['praefix'][$dump['dbindex']].'</span>)' : '')));
|
||||
if (isset($aus_error) && count($aus_error) > 0) {
|
||||
$aus_header = array_merge($aus_header, $aus_error);
|
||||
}
|
||||
|
||||
if (!($create_statement===false))
|
||||
{
|
||||
$dump['data'].=$create_statement;
|
||||
}
|
||||
else
|
||||
{
|
||||
WriteToDumpFile(); // save data we have up to now
|
||||
// error reading table definition
|
||||
$read_create_error=sprintf($lang['L_FATAL_ERROR_DUMP'],$table,$adbname).': '.mysqli_error($config['dbconnection']);
|
||||
Errorlog("DUMP",$databases['db_actual'],'',$read_create_error,0);
|
||||
WriteLog($read_create_error);
|
||||
if ($config['stop_with_error']>0)
|
||||
{
|
||||
die($read_create_error);
|
||||
}
|
||||
$dump['errors']++;
|
||||
}
|
||||
}
|
||||
WriteToDumpFile();
|
||||
if (!in_array($adbname.'|'.$table,$dump['skip_data'])&&$dump['table_types'][getDBIndex($adbname,$table)]!='VIEW')
|
||||
{
|
||||
get_content($adbname,$table);
|
||||
$dump['restzeilen']--;
|
||||
}
|
||||
else
|
||||
{
|
||||
// skip data
|
||||
if ($dump['table_types'][getDBIndex($adbname,$table)]!='VIEW') $dump['data'].='/*!40000 ALTER TABLE `'.$table.'` ENABLE KEYS */;'."\n";
|
||||
WriteToDumpFile();
|
||||
$dump['table_offset']++;
|
||||
}
|
||||
if ($config['memory_limit']>0&&strlen($dump['data'])>$config['memory_limit']) WriteToDumpFile();
|
||||
}
|
||||
}
|
||||
if (0 == $num_tables) {
|
||||
// no tables found
|
||||
$aus[] = '<br><br><p class="error">'.$lang['L_ERROR'].': '.sprintf($lang['L_DUMP_NOTABLES'], $databases['Name'][$dump['dbindex']]).'</p>';
|
||||
if (1 == !$config['multi_dump']) {
|
||||
echo $pageheader;
|
||||
echo get_page_parameter($dump);
|
||||
echo implode("\n", $aus);
|
||||
echo '</body></html>';
|
||||
exit();
|
||||
}
|
||||
} else {
|
||||
if (-1 == $dump['table_offset']) {
|
||||
// Create file, since first call
|
||||
new_file();
|
||||
$dump['table_offset'] = 0; // now it can start
|
||||
flush();
|
||||
} else {
|
||||
// Determine SQL commands
|
||||
$dump['restzeilen'] = $dump['anzahl_zeilen'];
|
||||
while (($dump['table_offset'] < $num_tables) && ($dump['restzeilen'] > 0)) {
|
||||
$table = substr($dump['tables'][$dump['table_offset']], strpos($dump['tables'][$dump['table_offset']], '|') + 1);
|
||||
$adbname = substr($dump['tables'][$dump['table_offset']], 0, strpos($dump['tables'][$dump['table_offset']], '|'));
|
||||
if ($databases['Name'][$dump['dbindex']] != $adbname) {
|
||||
//neue Datenbank
|
||||
$dump['data'] .= "\nSET FOREIGN_KEY_CHECKS=1;";
|
||||
$dump['data'] .= "\n".$mysql_commentstring.' EOB'."\n\n";
|
||||
WriteToDumpFile();
|
||||
WriteLog('Dump \''.$dump['backupdatei'].'\' finished.');
|
||||
ExecuteCommand('a');
|
||||
if (1 == $config['multi_part']) {
|
||||
$out .= $lang['L_FINISHED'].'<br><div class="backupmsg">';
|
||||
$dateistamm = substr($dump['backupdatei'], 0, strrpos($dump['backupdatei'], 'part_')).'part_';
|
||||
$dateiendung = (1 == $config['compression']) ? '.sql.gz' : '.sql';
|
||||
for ($i = 1; $i < ($dump['part'] - $dump['part_offset']); ++$i) {
|
||||
$mpdatei = $dateistamm.$i.$dateiendung;
|
||||
clearstatcache();
|
||||
$sz = byte_output(@filesize($config['paths']['backup'].$mpdatei));
|
||||
$out .= $lang['L_FILE'].' <a href="'.$config['paths']['backup'].$mpdatei.'" class="smallblack">'.$mpdatei.' ('.$sz.')</a> '.$lang['L_DUMP_SUCCESSFUL'].'<br>';
|
||||
}
|
||||
} else {
|
||||
clearstatcache();
|
||||
$out .= $lang['L_FINISHED'].'<br><div class="backupmsg"><a href="'.$config['paths']['backup'].$dump['backupdatei'].'" class="smallblack">'.$dump['backupdatei'].' ('.byte_output(filesize($config['paths']['backup'].$dump['backupdatei'])).')</a><br>';
|
||||
}
|
||||
if (1 == $config['send_mail']) {
|
||||
DoEmail();
|
||||
}
|
||||
|
||||
/////////////////////////////////
|
||||
// Anzeige - Fortschritt
|
||||
/////////////////////////////////
|
||||
if ($config['multi_dump']==1)
|
||||
{
|
||||
$mudbs='';
|
||||
$count_dbs=count($databases['multi']);
|
||||
for($i=0;$i<$count_dbs;$i++)
|
||||
{
|
||||
if ($databases['Name'][$dump['dbindex']]==$databases['multi'][$i]) $mudbs.='<span class="active_db">'.$databases['multi'][$i].' </span> ';
|
||||
else
|
||||
$mudbs.='<span class="success">'.$databases['multi'][$i].' </span> ';
|
||||
}
|
||||
}
|
||||
if ($config['multi_part']==1) $aus[]='<h5>Multipart-Backup: '.$config['multipartgroesse1'].' '.$mp2[$config['multipartgroesse2']].'</h5>';
|
||||
for ($i = 0; $i < 3; ++$i) {
|
||||
if (isset($config['ftp_transfer'][$i]) && (1 == $config['ftp_transfer'][$i])) {
|
||||
DoFTP($i);
|
||||
}
|
||||
if (isset($config['sftp_transfer'][$i]) && (1 == $config['sftp_transfer'][$i])) {
|
||||
DoSFTP($i);
|
||||
}
|
||||
}
|
||||
if (isset($flipped[$adbname])) {
|
||||
$dump['dbindex'] = $flipped[$adbname];
|
||||
}
|
||||
$dump['part_offset'] = $dump['part'] - 1;
|
||||
$out .= '</div><br>';
|
||||
ExecuteCommand('b');
|
||||
new_file();
|
||||
}
|
||||
|
||||
$aus[]='<h4>'.$lang['L_DUMP_HEADLINE'].'</h4>';
|
||||
$aktuelle_tabelle = $dump['table_offset'];
|
||||
if (0 == $dump['zeilen_offset']) {
|
||||
if (isset($config['minspeed']) && ($config['minspeed'] > 0)) {
|
||||
$dump['anzahl_zeilen'] = $config['minspeed'];
|
||||
$dump['restzeilen'] = $config['minspeed'];
|
||||
}
|
||||
|
||||
if ($dump['kommentar']>'') $aus[]=$lang['L_COMMENT'].': <span><em>'.$dump['kommentar'].'</em></span><br>';
|
||||
$aus[]=($config['multi_dump']==1) ? $lang['L_DB'].': '.$mudbs:$lang['L_DB'].': <strong>'.$databases['Name'][$dump['dbindex']].'</strong>';
|
||||
$aus[]=(($databases['praefix'][$dump['dbindex']]!='') ? ' ('.$lang['L_WITHPRAEFIX'].' <span>'.$databases['praefix'][$dump['dbindex']].'</span>)':'').'<br>';
|
||||
if (isset($tbl_sel)) $aus[]=$msgTbl.'<br><br>';
|
||||
$create_statement = '';
|
||||
$create_statement = get_def($adbname, $table);
|
||||
|
||||
if ($config['multi_part']==1)
|
||||
{
|
||||
$aus[]='<span>Multipart-Backup File <strong>'.($dump['part']-$dump['part_offset']-1).'</strong></span><br>';
|
||||
$aus2=', '.($dump['part']-1).' files';
|
||||
}
|
||||
$aus[]=$lang['L_DUMP_FILENAME'].'<b>'.$dump['backupdatei'].'</b><br>'.$lang['L_CHARSET'].': <strong>'.$dump['dump_encoding'].'</strong>'.
|
||||
if (!(false === $create_statement)) {
|
||||
$dump['data'] .= $create_statement;
|
||||
} else {
|
||||
WriteToDumpFile(); // save data we have up to now
|
||||
// error reading table definition
|
||||
$read_create_error = sprintf($lang['L_FATAL_ERROR_DUMP'], $table, $adbname).': '.mysqli_error($config['dbconnection']);
|
||||
Errorlog('DUMP', $databases['db_actual'], '', $read_create_error, 0);
|
||||
WriteLog($read_create_error);
|
||||
if ($config['stop_with_error'] > 0) {
|
||||
exit($read_create_error);
|
||||
}
|
||||
++$dump['errors'];
|
||||
}
|
||||
}
|
||||
WriteToDumpFile();
|
||||
if (!in_array($adbname.'|'.$table, $dump['skip_data']) && 'VIEW' != $dump['table_types'][getDBIndex($adbname, $table)]) {
|
||||
get_content($adbname, $table);
|
||||
--$dump['restzeilen'];
|
||||
} else {
|
||||
// skip data
|
||||
if ('VIEW' != $dump['table_types'][getDBIndex($adbname, $table)]) {
|
||||
$dump['data'] .= '/*!40000 ALTER TABLE `'.$table.'` ENABLE KEYS */;'."\n";
|
||||
}
|
||||
WriteToDumpFile();
|
||||
++$dump['table_offset'];
|
||||
}
|
||||
if ((isset($config['memory_limit']) && $config['memory_limit'] > 0) && strlen($dump['data']) > $config['memory_limit']) {
|
||||
WriteToDumpFile();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
'<br>'.$lang['L_FILESIZE'].': <b>'.byte_output($dump['filesize']).'</b><br><br>'.$lang['L_GZIP_COMPRESSION'].' <b>';
|
||||
$aus[]=($config['compression']==1) ? $lang['L_ACTIVATED']:$lang['L_NOT_ACTIVATED'];
|
||||
$aus[]='</b>.<br>';
|
||||
if ($out>'') $aus[]='<br><span class="smallgrey">'.$out.'</span>';
|
||||
/*
|
||||
* Display - Progress
|
||||
*/
|
||||
if (isset($config['multi_dump']) && (1 == $config['multi_dump'])) {
|
||||
$mudbs = '';
|
||||
$count_dbs = count($databases['multi']);
|
||||
for ($i = 0; $i < $count_dbs; ++$i) {
|
||||
if ($databases['Name'][$dump['dbindex']] == $databases['multi'][$i]) {
|
||||
$mudbs .= '<span class="active_db">'.$databases['multi'][$i].' </span> ';
|
||||
} else {
|
||||
$mudbs .= '<span class="success">'.$databases['multi'][$i].' </span> ';
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isset($config['multi_part']) && (1 == $config['multi_part'])) {
|
||||
$aus[] = '<h5>Multipart-Backup: '.$config['multipartgroesse1'].' '.$mp2[$config['multipartgroesse2']].'</h5>';
|
||||
}
|
||||
|
||||
if (isset($dump['tables'][$dump['table_offset']]))
|
||||
{
|
||||
$table=substr($dump['tables'][$dump['table_offset']],strpos($dump['tables'][$dump['table_offset']],'|')+1);
|
||||
$adbname=substr($dump['tables'][$dump['table_offset']],0,strpos($dump['tables'][$dump['table_offset']],'|'));
|
||||
$aus[] = '<h4>'.$lang['L_DUMP_HEADLINE'].'</h4>';
|
||||
|
||||
// get nr of recorsd from dump-array
|
||||
$record_string=$dump['records'][$dump['table_offset']];
|
||||
$record_string=explode('|',$record_string);
|
||||
$dump['zeilen_total']=$record_string[1];
|
||||
if ($dump['kommentar'] > '') {
|
||||
$aus[] = $lang['L_COMMENT'].': <span><em>'.$dump['kommentar'].'</em></span><br>';
|
||||
}
|
||||
$aus[] = ((isset($config['multi_dump']) && 1 == $config['multi_dump'])) ? $lang['L_DB'].': '.$mudbs : $lang['L_DB'].': <strong>'.$databases['Name'][$dump['dbindex']].'</strong>';
|
||||
$aus[] = (('' != $databases['praefix'][$dump['dbindex']]) ? ' ('.$lang['L_WITHPRAEFIX'].' <span>'.$databases['praefix'][$dump['dbindex']].'</span>)' : '').'<br>';
|
||||
if (isset($tbl_sel)) {
|
||||
$aus[] = $msgTbl.'<br><br>';
|
||||
}
|
||||
|
||||
if ($dump['zeilen_total']>0) $fortschritt=intval((100*$dump['zeilen_offset'])/$dump['zeilen_total']);
|
||||
else
|
||||
$fortschritt=100;
|
||||
if (isset($config['multi_part']) && (1 == $config['multi_part'])) {
|
||||
$aus[] = '<span>Multipart-Backup File <strong>'.($dump['part'] - $dump['part_offset'] - 1).'</strong></span><br>';
|
||||
$aus2 = ', '.($dump['part'] - 1).' files';
|
||||
}
|
||||
$aus[] = $lang['L_DUMP_FILENAME'].'<b>'.$dump['backupdatei'].'</b><br>'.$lang['L_CHARSET'].': <strong>'.$dump['dump_encoding'].'</strong>'.
|
||||
|
||||
$aus[]=$lang['L_SAVING_TABLE'].'<b>'.($dump['table_offset']+1).'</b> '.$lang['L_OF'].'<b> '.sizeof($dump['tables']).'</b><br>'.$lang['L_ACTUAL_TABLE'].': <b>'.$table.'</b><br><br>'.$lang['L_PROGRESS_TABLE'].':<br>';
|
||||
'<br>'.$lang['L_FILESIZE'].': <b>'.byte_output($dump['filesize']).'</b><br><br>'.$lang['L_GZIP_COMPRESSION'].' <b>';
|
||||
$aus[] = (isset($config['compression']) && (1 == $config['compression'])) ? $lang['L_ACTIVATED'] : $lang['L_NOT_ACTIVATED'];
|
||||
$aus[] = '</b>.<br>';
|
||||
if ($out > '') {
|
||||
$aus[] = '<br><span class="smallgrey">'.$out.'</span>';
|
||||
}
|
||||
|
||||
$aus[]='<table border="0" width="380"><tr>'.'<td width="'.($fortschritt*3).'"><img src="'.$config['files']['iconpath'].'progressbar_dump.gif" alt="" width="'.($fortschritt*3).'" height="16" border="0"></td>'.'<td width="'.((100-$fortschritt)*3).'"> </td>'.'<td width="80" align="right">'.($fortschritt).'%</td>';
|
||||
if (isset($dump['tables'][$dump['table_offset']])) {
|
||||
$table = substr($dump['tables'][$dump['table_offset']], strpos($dump['tables'][$dump['table_offset']], '|') + 1);
|
||||
$adbname = substr($dump['tables'][$dump['table_offset']], 0, strpos($dump['tables'][$dump['table_offset']], '|'));
|
||||
|
||||
if ($dump['anzahl_zeilen']+$dump['zeilen_offset']>=$dump['zeilen_total'])
|
||||
{
|
||||
$eintrag=$dump['zeilen_offset']+1;
|
||||
$zeilen_gesamt=$dump['zeilen_total'];
|
||||
if ($zeilen_gesamt==0) $eintrag=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$zeilen_gesamt=$dump['zeilen_offset']+$dump['anzahl_zeilen'];
|
||||
$eintrag=$dump['zeilen_offset']+1;
|
||||
}
|
||||
// get nr of recorsd from dump-array
|
||||
$record_string = $dump['records'][$dump['table_offset']];
|
||||
$record_string = explode('|', $record_string);
|
||||
$dump['zeilen_total'] = $record_string[1];
|
||||
|
||||
$aus[]='</tr><tr>'.'<td colspan="3">'.$lang['L_ENTRY'].' <b>'.number_format($eintrag,0,',','.').'</b> '.$lang['L_UPTO'].' <b>'.number_format(($zeilen_gesamt),0,',','.').'</b> '.$lang['L_OF'].' <b>'.number_format($dump['zeilen_total'],0,',','.').'</b></td></tr></table>';
|
||||
if ($dump['zeilen_total'] > 0) {
|
||||
$fortschritt = intval((100 * $dump['zeilen_offset']) / $dump['zeilen_total']);
|
||||
} else {
|
||||
$fortschritt = 100;
|
||||
}
|
||||
|
||||
$dump['tabellen_gesamt']=(isset($dump['tables'])) ? count($dump['tables']):0;
|
||||
$aus[] = $lang['L_SAVING_TABLE'].'<b>'.($dump['table_offset'] + 1).'</b> '.$lang['L_OF'].'<b> '.sizeof($dump['tables']).'</b><br>'.$lang['L_ACTUAL_TABLE'].': <b>'.$table.'</b><br><br>'.$lang['L_PROGRESS_TABLE'].':<br>';
|
||||
|
||||
$noch_zu_speichern=$dump['totalrecords']-$dump['countdata'];
|
||||
$prozent=($dump['totalrecords']>0) ? round(((100*$noch_zu_speichern)/$dump['totalrecords']),0):100;
|
||||
if ($noch_zu_speichern==0||$prozent>100) $prozent=100;
|
||||
$aus[] = '<table border="0" width="380"><tr>'.'<td width="'.($fortschritt * 3).'"><img src="'.$config['files']['iconpath'].'progressbar_dump.gif" alt="" width="'.($fortschritt * 3).'" height="16" border="0"></td>'.'<td width="'.((100 - $fortschritt) * 3).'"> </td>'.'<td width="80" align="right">'.($fortschritt).'%</td>';
|
||||
|
||||
$aus[]="\n".'<br>'.$lang['L_PROGRESS_OVER_ALL'].':'."\n".'<table border="0" width="550" cellpadding="0" cellspacing="0"><tr>'.'<td width="'.(5*(100-$prozent)).'"><img src="'.$config['files']['iconpath'].'progressbar_dump.gif" alt="" width="'.(5*(100-$prozent)).'" height="16" border="0"></td>'.'<td width="'.($prozent*5).'" align="center"></td>'.'<td width="50">'.(100-$prozent).'%</td></tr></table>';
|
||||
if ($dump['anzahl_zeilen'] + $dump['zeilen_offset'] >= $dump['zeilen_total']) {
|
||||
$eintrag = $dump['zeilen_offset'] + 1;
|
||||
$zeilen_gesamt = $dump['zeilen_total'];
|
||||
if (0 == $zeilen_gesamt) {
|
||||
$eintrag = 0;
|
||||
}
|
||||
} else {
|
||||
$zeilen_gesamt = $dump['zeilen_offset'] + $dump['anzahl_zeilen'];
|
||||
$eintrag = $dump['zeilen_offset'] + 1;
|
||||
}
|
||||
|
||||
//Speed-Anzeige
|
||||
$fw=($config['maxspeed']==$config['minspeed']) ? 300:round(($dump['anzahl_zeilen']-$config['minspeed'])/($config['maxspeed']-$config['minspeed'])*300,0);
|
||||
if ($fw>300) $fw=300;
|
||||
$aus[]='<br><table border="0" cellpadding="0" cellspacing="0"><tr>'.'<td class="nomargin" width="60" valign="top" align="center" style="font-size:10px;" >'.'<strong>Speed</strong><br>'.$dump['anzahl_zeilen'].'</td><td class="nomargin" width="300">'.'<table border="0" width="100%" cellpadding="0" cellspacing="0"><tr>'.'<td class="nomargin small" align="left" width="300" nowrap="nowrap">'.'<img src="'.$config['files']['iconpath'].'progressbar_speed.gif" alt="" width="'.$fw.'" height="14" border="0" vspace="0" hspace="0">'.'</td></tr></table><table border="0" width="100%" cellpadding="0" cellspacing="0"><tr>'.'<td class="nomargin" align="left" nowrap="nowrap" style="font-size:10px;" >'.$config['minspeed'].'</td>'.'<td class="nomargin" nowrap="nowrap" style="font-size:10px;text-align:right;" >'.$config['maxspeed'].'</td>'.'</tr></table>'."\n".'</td></tr></table>'.
|
||||
$aus[] = '</tr><tr>'.'<td colspan="3">'.$lang['L_ENTRY'].' <b>'.number_format($eintrag, 0, ',', '.').'</b> '.$lang['L_UPTO'].' <b>'.number_format(($zeilen_gesamt), 0, ',', '.').'</b> '.$lang['L_OF'].' <b>'.number_format($dump['zeilen_total'], 0, ',', '.').'</b></td></tr></table>';
|
||||
|
||||
//Status-Text
|
||||
'<p class="small">'.zeit_format(time()-$xtime).', '.$dump['aufruf'].' '.$lang['L_PAGE_REFRESHS'].$aus2;
|
||||
$aus[]=($dump['errors']>0) ? ', <span style="color:red;">'.$dump['errors'].' errors</span>':'';
|
||||
$aus[]='</p>';
|
||||
}
|
||||
else
|
||||
$dump['table_offset']++;
|
||||
// Ende Anzeige
|
||||
WriteToDumpFile();
|
||||
if (!isset($summe_eintraege)) $summe_eintraege=0;
|
||||
$dump['tabellen_gesamt'] = (isset($dump['tables'])) ? count($dump['tables']) : 0;
|
||||
|
||||
if ($dump['table_offset']<=$dump['tabellen_gesamt'])
|
||||
{
|
||||
$dauer=time()-($xtime+$dump['verbraucht']);
|
||||
$dump['verbraucht']+=$dauer;
|
||||
$summe_eintraege+=$dump['anzahl_zeilen'];
|
||||
$noch_zu_speichern = $dump['totalrecords'] - $dump['countdata'];
|
||||
$prozent = ($dump['totalrecords'] > 0) ? round(((100 * $noch_zu_speichern) / $dump['totalrecords']), 0) : 100;
|
||||
if (0 == $noch_zu_speichern || $prozent > 100) {
|
||||
$prozent = 100;
|
||||
}
|
||||
|
||||
//Zeitanpassung
|
||||
if ($dauer<$dump['max_zeit'])
|
||||
{
|
||||
$dump['anzahl_zeilen']=$dump['anzahl_zeilen']*$config['tuning_add'];
|
||||
if ($dauer<$dump['max_zeit']/2) $dump['anzahl_zeilen']*=1.8;
|
||||
if ($dump['anzahl_zeilen']>$config['maxspeed']) $dump['anzahl_zeilen']=$config['maxspeed'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$dump['anzahl_zeilen']=$dump['anzahl_zeilen']*$config['tuning_sub'];
|
||||
if ($dump['anzahl_zeilen']<$config['minspeed']) $dump['anzahl_zeilen']=$config['minspeed'];
|
||||
}
|
||||
$dump['anzahl_zeilen']=intval($dump['anzahl_zeilen']);
|
||||
$dump['aufruf']++;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Backup fertig
|
||||
$dump['data']="\nSET FOREIGN_KEY_CHECKS=1;";
|
||||
$dump['data'].="\n".$mysql_commentstring.' EOB'."\n\n";
|
||||
WriteToDumpFile();
|
||||
ExecuteCommand('a');
|
||||
chmod($config['paths']['backup'].$dump['backupdatei'],0777);
|
||||
if ($config['multi_part']==1)
|
||||
{
|
||||
$out.="\n".'<br><div class="backupmsg">';
|
||||
$dateistamm=substr($dump['backupdatei'],0,strrpos($dump['backupdatei'],'part_')).'part_';
|
||||
$dateiendung=($config['compression']==1) ? '.sql.gz':'.sql';
|
||||
clearstatcache();
|
||||
for($i=1;$i<($dump['part']-$dump['part_offset']);$i++)
|
||||
{
|
||||
$mpdatei=$dateistamm.$i.$dateiendung;
|
||||
$sz=byte_output(@filesize($config['paths']['backup'].$mpdatei));
|
||||
$out.="\n".$lang['L_FILE'].' <a href="'.$config['paths']['backup'].$mpdatei.'" class="smallblack">'.$mpdatei.' ('.$sz.')</a> '.$lang['L_DUMP_SUCCESSFUL'].'<br>';
|
||||
}
|
||||
$aus[] = "\n".'<br>'.$lang['L_PROGRESS_OVER_ALL'].':'."\n".'<table border="0" width="550" cellpadding="0" cellspacing="0"><tr>'.'<td width="'.(5 * (100 - $prozent)).'"><img src="'.$config['files']['iconpath'].'progressbar_dump.gif" alt="" width="'.(5 * (100 - $prozent)).'" height="16" border="0"></td>'.'<td width="'.($prozent * 5).'" align="center"></td>'.'<td width="50">'.(100 - $prozent).'%</td></tr></table>';
|
||||
|
||||
}
|
||||
else
|
||||
$out.="\n".'<div class="backupmsg">'.$lang['L_FILE'].' <a href="'.$config['paths']['backup'].$dump['backupdatei'].'" class="smallblack">'.$dump['backupdatei'].' ('.byte_output(filesize($config['paths']['backup'].$dump['backupdatei'])).')'.'</a>'.$lang['L_DUMP_SUCCESSFUL'].'<br>';
|
||||
//Speed-Anzeige
|
||||
$config['maxspeed'] = isset($config['maxspeed']) ? $config['maxspeed'] : '1';
|
||||
$config['minspeed'] = isset($config['minspeed']) ? $config['minspeed'] : '1';
|
||||
$fw = ($config['maxspeed'] == $config['minspeed']) ? 300 : round(($dump['anzahl_zeilen'] - $config['minspeed']) / ($config['maxspeed'] - $config['minspeed']) * 300, 0);
|
||||
if ($fw > 300) {
|
||||
$fw = 300;
|
||||
}
|
||||
$aus[] = '<br><table border="0" cellpadding="0" cellspacing="0"><tr>'.'<td class="nomargin" width="60" valign="top" align="center" style="font-size:10px;" >'.'<strong>Speed</strong><br>'.$dump['anzahl_zeilen'].'</td><td class="nomargin" width="300">'.'<table border="0" width="100%" cellpadding="0" cellspacing="0"><tr>'.'<td class="nomargin small" align="left" width="300" nowrap="nowrap">'.'<img src="'.$config['files']['iconpath'].'progressbar_speed.gif" alt="" width="'.$fw.'" height="14" border="0" vspace="0" hspace="0">'.'</td></tr></table><table border="0" width="100%" cellpadding="0" cellspacing="0"><tr>'.'<td class="nomargin" align="left" nowrap="nowrap" style="font-size:10px;" >'.$config['minspeed'].'</td>'.'<td class="nomargin" nowrap="nowrap" style="font-size:10px;text-align:right;" >'.$config['maxspeed'].'</td>'.'</tr></table>'."\n".'</td></tr></table>'.
|
||||
|
||||
$xtime=time()-$xtime;
|
||||
$aus=Array();
|
||||
$aus[]='<br>'."\n";
|
||||
if ($config['multi_dump']==1)
|
||||
{
|
||||
WriteLog('Dump \''.$dump['backupdatei'].'\' finished.');
|
||||
WriteLog('Multidump: '.count($databases['multi']).' Databases in '.zeit_format($xtime).'.');
|
||||
}
|
||||
else
|
||||
WriteLog('Dump \''.$dump['backupdatei'].'\' finished in '.zeit_format($xtime).'.');
|
||||
//Status-Text
|
||||
'<p class="small">'.zeit_format(time() - $xtime).', '.$dump['aufruf'].' '.$lang['L_PAGE_REFRESHS'].$aus2;
|
||||
$aus[] = ($dump['errors'] > 0) ? ', <span style="color:red;">'.$dump['errors'].' errors</span>' : '';
|
||||
$aus[] = '</p>';
|
||||
} else {
|
||||
++$dump['table_offset'];
|
||||
}
|
||||
// End display
|
||||
WriteToDumpFile();
|
||||
if (!isset($summe_eintraege)) {
|
||||
$summe_eintraege = 0;
|
||||
}
|
||||
|
||||
if ($config['send_mail']==1) DoEmail();
|
||||
for($i=0;$i<3;$i++)
|
||||
{
|
||||
if ($config['ftp_transfer'][$i]==1) DoFTP($i);
|
||||
}
|
||||
if ($dump['table_offset'] <= $dump['tabellen_gesamt']) {
|
||||
$dauer = time() - ($xtime + $dump['verbraucht']);
|
||||
$dump['verbraucht'] += $dauer;
|
||||
$summe_eintraege += $dump['anzahl_zeilen'];
|
||||
|
||||
$aus[]='<strong>'.$lang['L_DONE'].'</strong><br>';
|
||||
// Time adjustment
|
||||
if ($dauer < $dump['max_zeit']) {
|
||||
$dump['anzahl_zeilen'] = $dump['anzahl_zeilen'] * $config['tuning_add'];
|
||||
if ($dauer < $dump['max_zeit'] / 2) {
|
||||
$dump['anzahl_zeilen'] *= 1.8;
|
||||
}
|
||||
if ($dump['anzahl_zeilen'] > $config['maxspeed']) {
|
||||
$dump['anzahl_zeilen'] = $config['maxspeed'];
|
||||
}
|
||||
} else {
|
||||
$dump['anzahl_zeilen'] = $dump['anzahl_zeilen'] * $config['tuning_sub'];
|
||||
if ($dump['anzahl_zeilen'] < $config['minspeed']) {
|
||||
$dump['anzahl_zeilen'] = $config['minspeed'];
|
||||
}
|
||||
}
|
||||
$dump['anzahl_zeilen'] = intval($dump['anzahl_zeilen']);
|
||||
++$dump['aufruf'];
|
||||
} else {
|
||||
// Backup ready
|
||||
$dump['data'] = "\nSET FOREIGN_KEY_CHECKS=1;";
|
||||
$dump['data'] .= "\n".$mysql_commentstring.' EOB'."\n\n";
|
||||
WriteToDumpFile();
|
||||
ExecuteCommand('a');
|
||||
chmod($config['paths']['backup'].$dump['backupdatei'], 0777);
|
||||
if (isset($config['multi_part']) && (1 == $config['multi_part'])) {
|
||||
$out .= "\n".'<br><div class="backupmsg">';
|
||||
$dateistamm = substr($dump['backupdatei'], 0, strrpos($dump['backupdatei'], 'part_')).'part_';
|
||||
$dateiendung = (1 == $config['compression']) ? '.sql.gz' : '.sql';
|
||||
clearstatcache();
|
||||
for ($i = 1; $i < ($dump['part'] - $dump['part_offset']); ++$i) {
|
||||
$mpdatei = $dateistamm.$i.$dateiendung;
|
||||
$sz = byte_output(@filesize($config['paths']['backup'].$mpdatei));
|
||||
$out .= "\n".$lang['L_FILE'].' <a href="'.$config['paths']['backup'].$mpdatei.'" class="smallblack">'.$mpdatei.' ('.$sz.')</a> '.$lang['L_DUMP_SUCCESSFUL'].'<br>';
|
||||
}
|
||||
} else {
|
||||
$out .= "\n".'<div class="backupmsg">'.$lang['L_FILE'].' <a href="'.$config['paths']['backup'].$dump['backupdatei'].'" class="smallblack">'.$dump['backupdatei'].' ('.byte_output(filesize($config['paths']['backup'].$dump['backupdatei'])).')'.'</a>'.$lang['L_DUMP_SUCCESSFUL'].'<br>';
|
||||
}
|
||||
|
||||
if ($config['multi_dump']==1)
|
||||
{
|
||||
$aus[]=sprintf($lang['L_MULTIDUMP'],count($databases['multi'])).': ';
|
||||
$aus[]='<strong>'.implode(', ',$databases['multi']).'</strong>';
|
||||
$aus2='';
|
||||
$out='';
|
||||
}
|
||||
else
|
||||
{
|
||||
$aus[]='<br>'.sprintf($lang['L_DUMP_ENDERGEBNIS'],$num_tables,number_format($dump['countdata'],0,',','.'));
|
||||
}
|
||||
if ($dump['errors']>0) $aus[]=sprintf($lang['L_DUMP_ERRORS'],$dump['errors']);
|
||||
$xtime = time() - $xtime;
|
||||
$aus = [];
|
||||
$aus[] = '<br>'."\n";
|
||||
if (isset($config['multi_dump']) && (1 == $config['multi_dump'])) {
|
||||
WriteLog('Dump \''.$dump['backupdatei'].'\' finished.');
|
||||
WriteLog('Multidump: '.count($databases['multi']).' Databases in '.zeit_format($xtime).'.');
|
||||
} else {
|
||||
WriteLog('Dump \''.$dump['backupdatei'].'\' finished in '.zeit_format($xtime).'.');
|
||||
}
|
||||
|
||||
$aus[]='<form action="dump.php?MySQLDumper='.session_id().'" method="POST">'.$out.'<br>'.'<p class="small">'.zeit_format($xtime).', '.$dump['aufruf'].' '.$lang['L_PAGE_REFRESHS'].$aus2.'</p>'."\n";
|
||||
$aus[]="\n".'<br><input class="Formbutton" type="button" value="'.$lang['L_BACK_TO_CONTROL'].'" onclick="self.location.href=\''.$relativ_path.'filemanagement.php\'">';
|
||||
$aus[]=' <input class="Formbutton" type="button" value="'.$lang['L_BACK_TO_MINISQL'].'" onclick="self.location.href=\''.$relativ_path.'sql.php\'">';
|
||||
$aus[]=' <input class="Formbutton" type="button" value="'.$lang['L_BACK_TO_OVERVIEW'].'" onclick="self.location.href=\''.$relativ_path.'main.php?action=db&dbid='.$dump['dbindex'].'#dbid\'"><br><br>';
|
||||
$aus[]='</div></form>';
|
||||
if (isset($config['send_mail']) && (1 == $config['send_mail'])) {
|
||||
DoEmail();
|
||||
}
|
||||
for ($i = 0; $i < 3; ++$i) {
|
||||
if (isset($config['ftp_transfer'][$i]) && (1 == $config['ftp_transfer'][$i])) {
|
||||
DoFTP($i);
|
||||
}
|
||||
if (isset($config['sftp_transfer'][$i]) && (1 == $config['sftp_transfer'][$i])) {
|
||||
DoSFTP($i);
|
||||
}
|
||||
}
|
||||
|
||||
$DumpFertig=1;
|
||||
}
|
||||
$aus[] = '<strong>'.$lang['L_DONE'].'</strong><br>';
|
||||
|
||||
if (isset($config['multi_dump']) && (1 == $config['multi_dump'])) {
|
||||
$aus[] = sprintf($lang['L_MULTIDUMP'], count($databases['multi'])).': ';
|
||||
$aus[] = '<strong>'.implode(', ', $databases['multi']).'</strong>';
|
||||
$aus2 = '';
|
||||
$out = '';
|
||||
} else {
|
||||
$aus[] = '<br>'.sprintf($lang['L_DUMP_ENDERGEBNIS'], $num_tables, number_format($dump['countdata'], 0, ',', '.'));
|
||||
}
|
||||
if ($dump['errors'] > 0) {
|
||||
$aus[] = sprintf($lang['L_DUMP_ERRORS'], $dump['errors']);
|
||||
}
|
||||
|
||||
$aus[] = '<form action="dump.php?MyOOSDumperID='.session_id().'" method="POST">'.$out.'<br>'.'<p class="small">'.zeit_format($xtime).', '.$dump['aufruf'].' '.$lang['L_PAGE_REFRESHS'].$aus2.'</p>'."\n";
|
||||
$aus[] = "\n".'<br><input class="Formbutton" type="button" value="'.$lang['L_BACK_TO_CONTROL'].'" onclick="self.location.href=\''.$relativ_path.'filemanagement.php\'">';
|
||||
$aus[] = ' <input class="Formbutton" type="button" value="'.$lang['L_BACK_TO_MINISQL'].'" onclick="self.location.href=\''.$relativ_path.'sql.php\'">';
|
||||
$aus[] = ' <input class="Formbutton" type="button" value="'.$lang['L_BACK_TO_OVERVIEW'].'" onclick="self.location.href=\''.$relativ_path.'main.php?action=db&dbid='.$dump['dbindex'].'#dbid\'"><br><br>';
|
||||
$aus[] = '</div></form>';
|
||||
|
||||
$DumpFertig = 1;
|
||||
}
|
||||
}
|
||||
|
||||
//=====================================================================
|
||||
//================= Anzeige ===========================================
|
||||
//================= Display ===========================================
|
||||
//=====================================================================
|
||||
|
||||
// Craft page
|
||||
$aus = array_merge($aus_header, $aus);
|
||||
|
||||
//Seite basteln
|
||||
$aus=array_merge($aus_header,$aus);
|
||||
|
||||
$dump['xtime']=$xtime;
|
||||
if ($DumpFertig!=1)
|
||||
{
|
||||
// save actual values to session
|
||||
$_SESSION['dump']=$dump;
|
||||
$page_parameter=get_page_parameter($dump);
|
||||
$pagefooter='</body></html>';
|
||||
$selbstaufruf=$page_parameter.'<script language="javascript" type="text/javascript">setTimeout("document.dump.submit()", 10);</script></div>';
|
||||
$dump['xtime'] = $xtime;
|
||||
if (1 != $DumpFertig) {
|
||||
// save actual values to session
|
||||
$_SESSION['dump'] = $dump;
|
||||
$page_parameter = get_page_parameter($dump);
|
||||
$pagefooter = '</body></html>';
|
||||
$selbstaufruf = $page_parameter.'<script>setTimeout("document.dump.submit()", 10);</script></div>';
|
||||
} else {
|
||||
$dump = [];
|
||||
$_SESSION['dump'] = $dump;
|
||||
$pagefooter = MODFooter('', 1);
|
||||
$selbstaufruf = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$dump=array();
|
||||
$_SESSION['dump']=$dump;
|
||||
$pagefooter=MSDFooter('',1);
|
||||
$selbstaufruf='';
|
||||
}
|
||||
$complete_page=$pageheader.implode("\n",$aus)."\n".$selbstaufruf."\n".$pagefooter;
|
||||
$complete_page = $pageheader.implode("\n", $aus)."\n".$selbstaufruf."\n".$pagefooter;
|
||||
echo $complete_page;
|
||||
ob_end_flush();
|
||||
|
@ -1,10 +1,13 @@
|
||||
<?php
|
||||
error_reporting(E_ALL & ~E_STRICT);
|
||||
ini_set('display_errors', true);
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
MyOOS [Dumper]
|
||||
http://www.oos-shop.de/
|
||||
|
||||
Copyright (c) 2016 by the MyOOS Development Team.
|
||||
Copyright (c) 2013 - 2022 by the MyOOS Development Team.
|
||||
----------------------------------------------------------------------
|
||||
Based on:
|
||||
|
||||
@ -18,542 +21,530 @@
|
||||
|
||||
define('OOS_VALID_MOD', true);
|
||||
|
||||
if (isset($_GET['action'])&&$_GET['action']=='dl') $download=true;
|
||||
include ('./inc/header.php');
|
||||
include_once ('./language/'.$config['language'].'/lang.php');
|
||||
include_once ('./language/'.$config['language'].'/lang_filemanagement.php');
|
||||
include_once ('./language/'.$config['language'].'/lang_config_overview.php');
|
||||
include_once ('./language/'.$config['language'].'/lang_main.php');
|
||||
include_once ('./inc/functions_files.php');
|
||||
include_once ('./inc/functions_sql.php');
|
||||
$msg='';
|
||||
$dump=array();
|
||||
if ($config['auto_delete']==1) $msg=AutoDelete();
|
||||
if (isset($_GET['action']) && 'dl' == $_GET['action']) {
|
||||
$download = true;
|
||||
}
|
||||
include './inc/header.php';
|
||||
include_once './language/'.$config['language'].'/lang.php';
|
||||
include_once './language/'.$config['language'].'/lang_dump.php';
|
||||
include_once './language/'.$config['language'].'/lang_filemanagement.php';
|
||||
include_once './language/'.$config['language'].'/lang_config_overview.php';
|
||||
include_once './language/'.$config['language'].'/lang_main.php';
|
||||
include_once './inc/functions_files.php';
|
||||
include_once './inc/functions_sql.php';
|
||||
$msg = '';
|
||||
$dump = [];
|
||||
if (isset($config['auto_delete']) && (1 == $config['auto_delete'])) {
|
||||
$msg = AutoDelete();
|
||||
}
|
||||
get_sql_encodings(); // get possible sql charsets and also get default charset
|
||||
//0=Datenbank 1=Struktur
|
||||
$action=(isset($_GET['action'])) ? $_GET['action'] : 'files';
|
||||
$kind=(isset($_GET['kind'])) ? $_GET['kind'] : 0;
|
||||
$expand=(isset($_GET['expand'])) ? $_GET['expand'] : -1;
|
||||
$selectfile=(isset($_POST['selectfile'])) ? $_POST['selectfile'] : "";
|
||||
$destfile=(isset($_POST['destfile'])) ? $_POST['destfile'] : "";
|
||||
$compressed=(isset($_POST['compressed'])) ? $_POST['compressed'] : "";
|
||||
$dk=(isset($_POST['dumpKommentar'])) ? ((get_magic_quotes_gpc()) ? stripslashes($_POST['dumpKommentar']) : $_POST['dumpKommentar']) : "";
|
||||
$dk=str_replace(':','|',$dk); // remove : because of statusline
|
||||
$dump['sel_dump_encoding']=(isset($_POST['sel_dump_encoding'])) ? $_POST['sel_dump_encoding'] : get_index($config['mysql_possible_character_sets'],$config['mysql_standard_character_set']);
|
||||
$dump['dump_encoding']=isset($config['mysql_possible_character_sets'][$dump['sel_dump_encoding']]) ? $config['mysql_possible_character_sets'][$dump['sel_dump_encoding']] : 0;
|
||||
$action = (isset($_GET['action'])) ? $_GET['action'] : 'files';
|
||||
$kind = (isset($_GET['kind'])) ? $_GET['kind'] : 0;
|
||||
$expand = (isset($_GET['expand'])) ? $_GET['expand'] : -1;
|
||||
$selectfile = (isset($_POST['selectfile'])) ? $_POST['selectfile'] : '';
|
||||
$destfile = (isset($_POST['destfile'])) ? $_POST['destfile'] : '';
|
||||
$compressed = (isset($_POST['compressed'])) ? $_POST['compressed'] : '';
|
||||
$dk = (isset($_POST['dumpKommentar'])) ? $_POST['dumpKommentar'] : '';
|
||||
|
||||
if ($action=='dl')
|
||||
{
|
||||
// Download of a backup file wanted
|
||||
$file='./'.$config['paths']['backup'].urldecode($_GET['f']);
|
||||
if (is_readable($file))
|
||||
{
|
||||
header('Content-Description: File Transfer');
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-Disposition: attachment; filename='.basename($file));
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
header('Expires: 0');
|
||||
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
||||
header('Pragma: public');
|
||||
header('Content-Length: '.(string) filesize($file));
|
||||
flush();
|
||||
$file=fopen($file,"rb");
|
||||
while (!feof($file))
|
||||
{
|
||||
print fread($file,round(100*1024));
|
||||
flush();
|
||||
}
|
||||
fclose($file);
|
||||
}
|
||||
$dk = str_replace(':', '|', $dk); // remove : because of statusline
|
||||
$dump['sel_dump_encoding'] = (isset($_POST['sel_dump_encoding'])) ? $_POST['sel_dump_encoding'] : get_index($config['mysql_possible_character_sets'], $config['mysql_standard_character_set']);
|
||||
$dump['dump_encoding'] = isset($config['mysql_possible_character_sets'][$dump['sel_dump_encoding']]) ? $config['mysql_possible_character_sets'][$dump['sel_dump_encoding']] : 0;
|
||||
|
||||
//readfile($file);
|
||||
exit();
|
||||
if ('dl' == $action) {
|
||||
// Download of a backup file wanted
|
||||
$file = './'.$config['paths']['backup'].urldecode($_GET['f']);
|
||||
if (is_readable($file)) {
|
||||
header('Content-Description: File Transfer');
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-Disposition: attachment; filename='.basename($file));
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
header('Expires: 0');
|
||||
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
||||
header('Pragma: public');
|
||||
header('Content-Length: '.(string) filesize($file));
|
||||
flush();
|
||||
$file = fopen($file, 'rb');
|
||||
while (!feof($file)) {
|
||||
echo fread($file, round(100 * 1024));
|
||||
flush();
|
||||
}
|
||||
fclose($file);
|
||||
}
|
||||
|
||||
//readfile($file);
|
||||
exit();
|
||||
}
|
||||
if (!@ob_start("ob_gzhandler")) @ob_start();
|
||||
echo MSDHeader();
|
||||
|
||||
$toolboxstring='';
|
||||
$fpath=$config['paths']['backup'];
|
||||
$dbactiv=(isset($_GET['dbactiv'])) ? $_GET['dbactiv'] : $databases['db_actual'];
|
||||
$databases['multi']=Array();
|
||||
if ($databases['multisetting']=="")
|
||||
{
|
||||
$databases['multi'][0]=$databases['db_actual'];
|
||||
if (!@ob_start('ob_gzhandler')) {
|
||||
@ob_start();
|
||||
}
|
||||
else
|
||||
{
|
||||
$databases['multi']=explode(";",$databases['multisetting']);
|
||||
$multi_praefixe=array();
|
||||
$multi_praefixe=explode(";",$databases['multisetting_praefix']);
|
||||
$toolboxstring='<br>';
|
||||
if (is_array($databases['multi']))
|
||||
{
|
||||
for ($i=0; $i<sizeof($databases['multi']); $i++)
|
||||
{
|
||||
if ($i>0) $toolboxstring.=', ';
|
||||
$toolboxstring.=$databases['multi'][$i];
|
||||
if ($multi_praefixe[$i]>'') $toolboxstring.=' (<i>\''.$multi_praefixe[$i].'\'</i>)';
|
||||
}
|
||||
}
|
||||
echo MODHeader();
|
||||
|
||||
$toolboxstring = '';
|
||||
$fpath = $config['paths']['backup'];
|
||||
$dbactiv = (isset($_GET['dbactiv'])) ? $_GET['dbactiv'] : $databases['db_actual'];
|
||||
$databases['multi'] = [];
|
||||
if ('' == $databases['multisetting']) {
|
||||
$databases['multi'][0] = $databases['db_actual'];
|
||||
} else {
|
||||
$databases['multi'] = explode(';', $databases['multisetting']);
|
||||
$multi_praefixe = [];
|
||||
$multi_praefixe = explode(';', $databases['multisetting_praefix']);
|
||||
$toolboxstring = '<br>';
|
||||
if (is_array($databases['multi'])) {
|
||||
for ($i = 0; $i < sizeof($databases['multi']); ++$i) {
|
||||
if ($i > 0) {
|
||||
$toolboxstring .= ', ';
|
||||
}
|
||||
$toolboxstring .= $databases['multi'][$i];
|
||||
if ($multi_praefixe[$i] > '') {
|
||||
$toolboxstring .= ' (<i>\''.$multi_praefixe[$i].'\'</i>)';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//*** Abfrage ob Dump nach Tabellenaufruf ***
|
||||
if (isset($_POST['dump_tbl']))
|
||||
{
|
||||
$check_dirs=TestWorkDir();
|
||||
if (!$check_dirs===true) die($check_dirs);
|
||||
$databases['db_actual_tableselected']=substr($_POST['tbl_array'],0,strlen($_POST['tbl_array'])-1);
|
||||
WriteParams();
|
||||
$dump['fileoperations']=0;
|
||||
echo '<script language="JavaScript" type="text/javascript">parent.MyOOS_Dumper_content.location.href="dump.php?comment='.urlencode($dk).'&sel_dump_encoding='.$dump['sel_dump_encoding'].'&config='.urlencode($config['config_file']).'";</script></body></html>';
|
||||
exit();
|
||||
if (isset($_POST['dump_tbl'])) {
|
||||
$check_dirs = TestWorkDir();
|
||||
if (true === !$check_dirs) {
|
||||
exit($check_dirs);
|
||||
}
|
||||
$databases['db_actual_tableselected'] = substr($_POST['tbl_array'], 0, strlen($_POST['tbl_array']) - 1);
|
||||
WriteParams();
|
||||
$dump['fileoperations'] = 0;
|
||||
echo '<script>parent.MyOOS_Dumper_content.location.href="dump.php?comment='.urlencode($dk).'&sel_dump_encoding='.$dump['sel_dump_encoding'].'&config='.urlencode($config['config_file']).'";</script></body></html>';
|
||||
exit();
|
||||
}
|
||||
|
||||
//*** Abfrage ob Dump ***
|
||||
if (isset($_POST['dump']))
|
||||
{
|
||||
if (isset($_POST['tblfrage'])&&$_POST['tblfrage']==1)
|
||||
{
|
||||
//Tabellenabfrage
|
||||
$tblfrage_refer="dump";
|
||||
include ("inc/tabellenabfrage.php");
|
||||
exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
@$check_dir=TestWorkDir();
|
||||
if (!$check_dir===true) die($check_dir);
|
||||
$databases['db_actual_tableselected']="";
|
||||
WriteParams();
|
||||
if (isset($_POST['dump'])) {
|
||||
if (isset($_POST['tblfrage']) && 1 == $_POST['tblfrage']) {
|
||||
//Tabellenabfrage
|
||||
$tblfrage_refer = 'dump';
|
||||
include 'inc/table_query.php';
|
||||
exit();
|
||||
} else {
|
||||
@$check_dir = TestWorkDir();
|
||||
if (true === !$check_dir) {
|
||||
exit($check_dir);
|
||||
}
|
||||
$databases['db_actual_tableselected'] = '';
|
||||
WriteParams();
|
||||
$dump['fileoperations'] = 0;
|
||||
|
||||
$dump['fileoperations']=0;
|
||||
echo '<script language="JavaScript" type="text/javascript">parent.MyOOS_Dumper_content.location.href="dump.php?comment='.urlencode($dk).'&sel_dump_encoding='.$dump['sel_dump_encoding'].'&config='.urlencode($config['config_file']).'";</script></body></html>';
|
||||
exit();
|
||||
}
|
||||
$sUrl = 'dump.php?comment='.urlencode($dk).'&sel_dump_encoding='.$dump['sel_dump_encoding'].'&config='.urlencode($config['config_file']);
|
||||
if ((isset($config['optimize_tables_beforedump']) && (1 == $config['optimize_tables_beforedump']))) {
|
||||
echo '<div id="pagetitle">'.$lang['L_DUMP_HEADLINE'].'</div><div id="content"><p>';
|
||||
echo '<br><br><p>'.sprintf($lang['L_DUMP_INFO'], $sUrl).'</p></div>';
|
||||
}
|
||||
echo '<script>parent.MyOOS_Dumper_content.location.href="dump.php?comment='.urlencode($dk).'&sel_dump_encoding='.$dump['sel_dump_encoding'].'&config='.urlencode($config['config_file']).'";</script></body></html>';
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
//*** Abfrage ob Restore nach Tabellenaufruf ***
|
||||
if (isset($_POST['restore_tbl']))
|
||||
{
|
||||
$databases['db_actual_tableselected']=substr($_POST['tbl_array'],0,strlen($_POST['tbl_array'])-1);
|
||||
WriteParams();
|
||||
echo '<script language="JavaScript" type="text/javascript">parent.MyOOS_Dumper_content.location.href="restore.php?filename='.urlencode($_POST['filename']).'";</script></body></html>';
|
||||
if (isset($_POST['restore_tbl'])) {
|
||||
$databases['db_actual_tableselected'] = substr($_POST['tbl_array'], 0, strlen($_POST['tbl_array']) - 1);
|
||||
WriteParams();
|
||||
echo '<script>parent.MyOOS_Dumper_content.location.href="restore.php?filename='.urlencode($_POST['filename']).'";</script></body></html>';
|
||||
|
||||
exit();
|
||||
exit();
|
||||
}
|
||||
|
||||
//*** Abfrage ob Restore ***
|
||||
if (isset($_POST['restore']))
|
||||
{
|
||||
if (isset($_POST['file']))
|
||||
{
|
||||
if (isset($_POST['tblfrage'])&&$_POST['tblfrage']==1)
|
||||
{
|
||||
//Tabellenabfrage
|
||||
$tblfrage_refer="restore";
|
||||
$filename=urldecode($_POST['file'][0]);
|
||||
include ("inc/tabellenabfrage.php");
|
||||
exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
$file=$_POST['file'][0];
|
||||
$statusline=read_statusline_from_file($file);
|
||||
if (isset($_POST['sel_dump_encoding_restore']))
|
||||
{
|
||||
$encodingstring=$config['mysql_possible_character_sets'][$_POST['sel_dump_encoding_restore']];
|
||||
$encoding=explode(' ',$encodingstring);
|
||||
$dump_encoding=$encoding[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!isset($statusline['charset'])||trim($statusline['charset'])=='?')
|
||||
{
|
||||
echo headline($lang['L_FM_RESTORE'].': '.$file);
|
||||
if (isset($_POST['restore'])) {
|
||||
if (isset($_POST['file'])) {
|
||||
if (isset($_POST['tblfrage']) && 1 == $_POST['tblfrage']) {
|
||||
//Tabellenabfrage
|
||||
$tblfrage_refer = 'restore';
|
||||
$filename = urldecode($_POST['file'][0]);
|
||||
include 'inc/table_query.php';
|
||||
exit();
|
||||
} else {
|
||||
$file = $_POST['file'][0];
|
||||
$statusline = read_statusline_from_file($file);
|
||||
if (isset($_POST['sel_dump_encoding_restore'])) {
|
||||
$encodingstring = $config['mysql_possible_character_sets'][$_POST['sel_dump_encoding_restore']];
|
||||
$encoding = explode(' ', $encodingstring);
|
||||
$dump_encoding = $encoding[0];
|
||||
} else {
|
||||
if (!isset($statusline['charset']) || '?' == trim($statusline['charset'])) {
|
||||
echo headline($lang['L_FM_RESTORE'].': '.$file);
|
||||
|
||||
// if we can't detect encoding ask user
|
||||
echo '<br>'.$lang['L_CHOOSE_CHARSET'].'<br><br>';
|
||||
echo '<form action="filemanagement.php?action=restore&kind=0" method="POST">';
|
||||
echo '<table><tr><td>'.$lang['L_FM_CHOOSE_ENCODING'].':</td><td>';
|
||||
echo '<select name="sel_dump_encoding_restore">';
|
||||
echo make_options($config['mysql_possible_character_sets'],$dump['sel_dump_encoding']);
|
||||
echo '</select></td></tr><tr><td>';
|
||||
echo $lang['L_MYSQL_CONNECTION_ENCODING'].':</td><td><strong>'.$config['mysql_standard_character_set'].'</strong></td></tr>';
|
||||
// if we can't detect encoding ask user
|
||||
echo '<br>'.$lang['L_CHOOSE_CHARSET'].'<br><br>';
|
||||
echo '<form action="filemanagement.php?action=restore&kind=0" method="POST">';
|
||||
echo '<table><tr><td>'.$lang['L_FM_CHOOSE_ENCODING'].':</td><td>';
|
||||
echo '<select name="sel_dump_encoding_restore">';
|
||||
echo make_options($config['mysql_possible_character_sets'], $dump['sel_dump_encoding']);
|
||||
echo '</select></td></tr><tr><td>';
|
||||
echo $lang['L_MYSQL_CONNECTION_ENCODING'].':</td><td><strong>'.$config['mysql_standard_character_set'].'</strong></td></tr>';
|
||||
|
||||
echo '<tr><td colspan="2"><br><input type="submit" name="restore" class="Formbutton" value="'.$lang['L_FM_RESTORE'].'">';
|
||||
echo '<input type="hidden" name="file[0]" value="'.$file.'">';
|
||||
echo '</td></tr></table></form></body></html>';
|
||||
exit();
|
||||
}
|
||||
else
|
||||
$dump_encoding=$statusline['charset'];
|
||||
}
|
||||
echo '<tr><td colspan="2"><br><input type="submit" name="restore" class="Formbutton" value="'.$lang['L_FM_RESTORE'].'">';
|
||||
echo '<input type="hidden" name="file[0]" value="'.$file.'">';
|
||||
echo '</td></tr></table></form></body></html>';
|
||||
exit();
|
||||
} else {
|
||||
$dump_encoding = $statusline['charset'];
|
||||
}
|
||||
}
|
||||
|
||||
$databases['db_actual_tableselected']="";
|
||||
WriteParams();
|
||||
echo '<script language="JavaScript" type="text/javascript">parent.MyOOS_Dumper_content.location.href="restore.php?filename='.$file.'&dump_encoding='.$dump_encoding.'&kind='.$kind.'";</script></body></html>';
|
||||
exit();
|
||||
}
|
||||
}
|
||||
else
|
||||
$msg.='<p class="error">'.$lang['L_FM_NOFILE'].'</p>';
|
||||
$databases['db_actual_tableselected'] = '';
|
||||
WriteParams();
|
||||
echo '<script>parent.MyOOS_Dumper_content.location.href="restore.php?filename='.$file.'&dump_encoding='.$dump_encoding.'&kind='.$kind.'";</script></body></html>';
|
||||
exit();
|
||||
}
|
||||
} else {
|
||||
$msg .= '<p class="error">'.$lang['L_FM_NOFILE'].'</p>';
|
||||
}
|
||||
}
|
||||
|
||||
//*** Abfrage ob Delete ***
|
||||
$del=array();
|
||||
if (isset($_POST['delete']))
|
||||
{
|
||||
if (isset($_POST['file']))
|
||||
{
|
||||
$delfiles=Array();
|
||||
for ($i=0; $i<count($_POST['file']); $i++)
|
||||
{
|
||||
if (!strpos($_POST['file'][$i],"_part_")===false)
|
||||
{
|
||||
$delfiles[]=substr($_POST['file'][$i],0,strpos($_POST['file'][$i],"_part_")+6).'*';
|
||||
}
|
||||
else
|
||||
$delfiles[]=$_POST['file'][$i];
|
||||
}
|
||||
for ($i=0; $i<count($delfiles); $i++)
|
||||
{
|
||||
$del=array_merge($del,DeleteFilesM($fpath,$delfiles[$i]));
|
||||
}
|
||||
}
|
||||
else
|
||||
$msg.='<p class="error">'.$lang['L_FM_NOFILE'].'</p>';
|
||||
$del = [];
|
||||
if (isset($_POST['delete'])) {
|
||||
if (isset($_POST['file'])) {
|
||||
$delfiles = [];
|
||||
for ($i = 0; $i < count($_POST['file']); ++$i) {
|
||||
if (false === !strpos($_POST['file'][$i], '_part_')) {
|
||||
$delfiles[] = substr($_POST['file'][$i], 0, strpos($_POST['file'][$i], '_part_') + 6).'*';
|
||||
} else {
|
||||
$delfiles[] = $_POST['file'][$i];
|
||||
}
|
||||
}
|
||||
for ($i = 0; $i < count($delfiles); ++$i) {
|
||||
$del = array_merge($del, DeleteFilesM($fpath, $delfiles[$i]));
|
||||
}
|
||||
} else {
|
||||
$msg .= '<p class="error">'.$lang['L_FM_NOFILE'].'</p>';
|
||||
}
|
||||
}
|
||||
if (isset($_POST['deleteauto']))
|
||||
{
|
||||
$delete_result=AutoDelete();
|
||||
if ($delete_result>'') $msg.='<p class="small">'.$delete_result.'</p>';
|
||||
if (isset($_POST['deleteauto'])) {
|
||||
$delete_result = AutoDelete();
|
||||
if ($delete_result > '') {
|
||||
$msg .= '<p class="small">'.$delete_result.'</p>';
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_POST['deleteall'])||isset($_POST['deleteallfilter']))
|
||||
{
|
||||
if (isset($_POST['deleteall']))
|
||||
{
|
||||
$del=DeleteFilesM($fpath,"*.sql");
|
||||
$del=array_merge($del,DeleteFilesM($fpath,"*.gz"));
|
||||
}
|
||||
else
|
||||
$del=DeleteFilesM($fpath,$databases['db_actual']."*");
|
||||
if (isset($_POST['deleteall']) || isset($_POST['deleteallfilter'])) {
|
||||
if (isset($_POST['deleteall'])) {
|
||||
$del = DeleteFilesM($fpath, '*.sql');
|
||||
$del = array_merge($del, DeleteFilesM($fpath, '*.gz'));
|
||||
} else {
|
||||
$del = DeleteFilesM($fpath, $databases['db_actual'].'*');
|
||||
}
|
||||
}
|
||||
|
||||
// print file-delete-messages
|
||||
if (is_array($del)&&sizeof($del)>0)
|
||||
{
|
||||
foreach ($del as $filename=>$success)
|
||||
{
|
||||
if ($success)
|
||||
{
|
||||
$msg.='<span class="small">';
|
||||
$msg.=$lang['L_FM_DELETE1'].' \''.$filename.'\' '.$lang['L_FM_DELETE2'];
|
||||
WriteLog("deleted '$filename'.");
|
||||
$msg.='</span><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg.='<span class="small error">';
|
||||
$msg.=$lang['L_FM_DELETE1'].' \''.$filename.'\' '.$lang['L_FM_DELETE3'];
|
||||
WriteLog("deleted '$filename'.");
|
||||
$msg.='</span><br>';
|
||||
}
|
||||
}
|
||||
if (is_array($del) && sizeof($del) > 0) {
|
||||
foreach ($del as $filename => $success) {
|
||||
if ($success) {
|
||||
$msg .= '<span class="small">';
|
||||
$msg .= $lang['L_FM_DELETE1'].' \''.$filename.'\' '.$lang['L_FM_DELETE2'];
|
||||
WriteLog("deleted '$filename'.");
|
||||
$msg .= '</span><br>';
|
||||
} else {
|
||||
$msg .= '<span class="small error">';
|
||||
$msg .= $lang['L_FM_DELETE1'].' \''.$filename.'\' '.$lang['L_FM_DELETE3'];
|
||||
WriteLog("deleted '$filename'.");
|
||||
$msg .= '</span><br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Upload
|
||||
if (isset($_POST['upload']))
|
||||
{
|
||||
$error=false;
|
||||
if (!isset($_FILES['upfile']['name'])) echo '<span class="error">'.$lang['L_FM_UPLOADFILEREQUEST'].'</span><br><br>';
|
||||
else
|
||||
{
|
||||
if (!file_exists($fpath.$_FILES['upfile']['name']))
|
||||
{
|
||||
// Extension ermitteln -strrpos fängt hinten an und ermittelt somit den letzten Punkt
|
||||
$endung=strrchr($_FILES['upfile']['name'],".");
|
||||
$erlaubt= array (
|
||||
|
||||
".gz", ".sql");
|
||||
if (!in_array($endung,$erlaubt))
|
||||
{
|
||||
$msg.="<font color=\"red\">".$lang['L_FM_UPLOADNOTALLOWED1']."<br>";
|
||||
$msg.=$lang['L_FM_UPLOADNOTALLOWED2']."</font>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!$error)
|
||||
{
|
||||
if (move_uploaded_file($_FILES['upfile']['tmp_name'],$fpath.$_FILES['upfile']['name'])) @chmod($fpath.$upfile_name,0777);
|
||||
else
|
||||
$error.="<font color=\"red\">".$lang['L_FM_UPLOADMOVEERROR']."<br>";
|
||||
}
|
||||
if ($error) $msg.=$error."<font color=\"red\">".$lang['L_FM_UPLOADFAILED']."</font><br>";
|
||||
}
|
||||
}
|
||||
else
|
||||
$msg.="<font color=\"red\">".$lang['L_FM_UPLOADFILEEXISTS']."</font><br>";
|
||||
}
|
||||
if (isset($_POST['upload'])) {
|
||||
$error = false;
|
||||
if (!isset($_FILES['upfile']['name'])) {
|
||||
echo '<span class="error">'.$lang['L_FM_UPLOADFILEREQUEST'].'</span><br><br>';
|
||||
} else {
|
||||
if (!file_exists($fpath.$_FILES['upfile']['name'])) {
|
||||
// Extension ermitteln -strrpos fängt hinten an und ermittelt somit den letzten Punkt
|
||||
$endung = strrchr($_FILES['upfile']['name'], '.');
|
||||
$erlaubt = [
|
||||
'.gz', '.sql', ];
|
||||
if (!in_array($endung, $erlaubt)) {
|
||||
$msg .= '<font color="red">'.$lang['L_FM_UPLOADNOTALLOWED1'].'<br>';
|
||||
$msg .= $lang['L_FM_UPLOADNOTALLOWED2'].'</font>';
|
||||
} else {
|
||||
if (!$error) {
|
||||
if (move_uploaded_file($_FILES['upfile']['tmp_name'], $fpath.$_FILES['upfile']['name'])) {
|
||||
@chmod($fpath.$upfile_name, 0777);
|
||||
} else {
|
||||
$error .= '<font color="red">'.$lang['L_FM_UPLOADMOVEERROR'].'<br>';
|
||||
}
|
||||
}
|
||||
if ($error) {
|
||||
$msg .= $error.'<font color="red">'.$lang['L_FM_UPLOADFAILED'].'</font><br>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$msg .= '<font color="red">'.$lang['L_FM_UPLOADFILEEXISTS'].'</font><br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Seitenteile vordefinieren
|
||||
$href='filemanagement.php?action='.$action.'&kind='.$kind;
|
||||
$tbl_abfrage='';
|
||||
if ($config['multi_dump']==0) $tbl_abfrage='<tr><td>'.$lang['L_FM_SELECTTABLES'].'</td><td><input type="checkbox" class="checkbox" name="tblfrage" value="1"></td></tr>';
|
||||
$dk=(isset($_POST['dumpKommentar'])) ? htmlentities($_POST['dumpKommentar']) : '';
|
||||
$tbl_abfrage.='<tr><td>'.$lang['L_FM_COMMENT'].':</td><td><input type="text" class="text" style="width:260px;" name="dumpKommentar" value="'.$dk.'"></td></tr>';
|
||||
$autodel='<p class="autodel">'.$lang['L_AUTODELETE'].": ";
|
||||
$autodel.=($config['auto_delete']==0) ? $lang['L_NOT_ACTIVATED'] : $lang['L_ACTIVATED'].' ('.$config['max_backup_files'].' '.$lang['L_MAX_BACKUP_FILES_EACH2'].')';
|
||||
$autodel.='</p>';
|
||||
$href = 'filemanagement.php?action='.$action.'&kind='.$kind;
|
||||
$tbl_abfrage = '';
|
||||
if (isset($config['multi_dump']) && (0 == $config['multi_dump'])) {
|
||||
$tbl_abfrage = '<tr><td>'.$lang['L_FM_SELECTTABLES'].'</td><td><input type="checkbox" class="checkbox" name="tblfrage" value="1"></td></tr>';
|
||||
}
|
||||
$dk = (isset($_POST['dumpKommentar'])) ? htmlentities($_POST['dumpKommentar']) : '';
|
||||
$tbl_abfrage .= '<tr><td>'.$lang['L_FM_COMMENT'].':</td><td><input type="text" class="text" style="width:260px;" name="dumpKommentar" value="'.$dk.'"></td></tr>';
|
||||
$autodel = '<p class="autodel">'.$lang['L_AUTODELETE'].': ';
|
||||
$autodel .= (isset($config['auto_delete']) && (0 == $config['auto_delete'])) ? $lang['L_NOT_ACTIVATED'] : $lang['L_ACTIVATED'];
|
||||
if (isset($config['max_backup_files'])) {
|
||||
$autodel .= ' ('.$config['max_backup_files'].' '.$lang['L_MAX_BACKUP_FILES_EACH2'].')';
|
||||
}
|
||||
|
||||
$autodel .= '</p>';
|
||||
|
||||
//Fallunterscheidung
|
||||
switch ($action)
|
||||
{
|
||||
case 'dump':
|
||||
switch ($action) {
|
||||
case 'dump':
|
||||
$dbName = $databases['Name'][$databases['db_selected_index']];
|
||||
if ($config['multi_dump']==0 && in_array($dbName, $dontBackupDatabases)) {
|
||||
if ((isset($config['multi_dump']) && (0 == $config['multi_dump'])) && in_array($dbName, $dontBackupDatabases)) {
|
||||
echo headline($lang['L_FM_DUMP_HEADER'].' <span class="small">("'.$lang['L_CONFIG_HEADLINE'].': '.$config['config_file'].'")</span>');
|
||||
echo '<span class="error">'.sprintf($lang['L_BACKUP_NOT_POSSIBLE'], $dbName).'</span>';
|
||||
break;
|
||||
}
|
||||
if ($config['multi_dump']==0) DBDetailInfo($databases['db_selected_index']);
|
||||
$cext=($config['cron_extender']==0) ? "pl" : "cgi";
|
||||
$actualUrl=substr($_SERVER['SCRIPT_NAME'],0,strrpos($_SERVER['SCRIPT_NAME'],"/")+1);
|
||||
if (substr($actualUrl,-1)!="/") $actualUrl.="/";
|
||||
if (substr($actualUrl,0,1)!="/") $actualUrl="/$actualUrl";
|
||||
$refdir=(substr($config['cron_execution_path'],0,1)=="/") ? "" : $actualUrl;
|
||||
$scriptdir=$config['cron_execution_path'].'crondump.'.$cext;
|
||||
$sfile=$config['cron_execution_path']."perltest.$cext";
|
||||
$simplefile=$config['cron_execution_path']."simpletest.$cext";
|
||||
$scriptentry=Realpfad("./").$config['paths']['config'];
|
||||
$cronabsolute=(substr($config['cron_execution_path'],0,1)=="/") ? $_SERVER['DOCUMENT_ROOT'].$scriptdir : Realpfad("./").$scriptdir;
|
||||
$confabsolute=$config['config_file'];
|
||||
$scriptref=getServerProtocol().$_SERVER['SERVER_NAME'].$refdir.$config['cron_execution_path'].'crondump.'.$cext."?config=".$confabsolute;
|
||||
$cronref="perl ".$cronabsolute." -config=".$confabsolute." -html_output=0";
|
||||
if (isset($config['multi_dump']) && (0 == $config['multi_dump'])) {
|
||||
DBDetailInfo($databases['db_selected_index']);
|
||||
}
|
||||
$cext = (isset($config['cron_extender']) && (0 == $config['cron_extender'])) ? 'pl' : 'cgi';
|
||||
$actualUrl = substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/') + 1);
|
||||
if ('/' != substr($actualUrl, -1)) {
|
||||
$actualUrl .= '/';
|
||||
}
|
||||
if ('/' != substr($actualUrl, 0, 1)) {
|
||||
$actualUrl = "/$actualUrl";
|
||||
}
|
||||
$refdir = ('/' == substr($config['cron_execution_path'], 0, 1)) ? '' : $actualUrl;
|
||||
$scriptdir = $config['cron_execution_path'].'crondump.'.$cext;
|
||||
$sfile = $config['cron_execution_path']."perltest.$cext";
|
||||
$simplefile = $config['cron_execution_path']."simpletest.$cext";
|
||||
$scriptentry = Realpfad('./').$config['paths']['config'];
|
||||
$cronabsolute = ('/' == substr($config['cron_execution_path'], 0, 1)) ? $_SERVER['DOCUMENT_ROOT'].$scriptdir : Realpfad('./').$scriptdir;
|
||||
$confabsolute = $config['config_file'];
|
||||
$scriptref = getServerProtocol().$_SERVER['SERVER_NAME'].$refdir.$config['cron_execution_path'].'crondump.'.$cext.'?config='.$confabsolute;
|
||||
$cronref = 'perl '.$cronabsolute.' -config='.$confabsolute.' -html_output=0';
|
||||
|
||||
//Ausgabe
|
||||
echo headline($lang['L_FM_DUMP_HEADER'].' <span class="small">("'.$lang['L_CONFIG_HEADLINE'].': '.$config['config_file'].'")</span>');
|
||||
if (!is_writable($config['paths']['backup'])) die('<span class="error">'.sprintf($lang['L_WRONG_RIGHTS'],'work/backup','777').'</span>');
|
||||
echo ($msg>'') ? $msg.'<br>' : '';
|
||||
echo $autodel;
|
||||
//Ausgabe
|
||||
echo headline($lang['L_FM_DUMP_HEADER'].' <span class="small">("'.$lang['L_CONFIG_HEADLINE'].': '.$config['config_file'].'")</span>');
|
||||
if (!is_writable($config['paths']['backup'])) {
|
||||
exit('<span class="error">'.sprintf($lang['L_WRONG_RIGHTS'], 'work/backup', '777').'</span>');
|
||||
}
|
||||
echo ($msg > '') ? $msg.'<br>' : '';
|
||||
echo $autodel;
|
||||
|
||||
//Auswahl
|
||||
echo '<div>
|
||||
//Auswahl
|
||||
echo '<div>
|
||||
<input type="button" value=" '.$lang['L_DUMP'].' PHP " class="Formbutton" onclick="document.getElementById(\'buperl\').style.display=\'none\';document.getElementById(\'buphp\').style.display=\'block\';">
|
||||
|
||||
<input type="button" value=" '.$lang['L_DUMP'].' PERL " class="Formbutton" onclick="document.getElementById(\'buphp\').style.display=\'none\';document.getElementById(\'buperl\').style.display=\'block\';">
|
||||
</div>';
|
||||
echo '<div id="buphp">';
|
||||
echo '<div id="buphp">';
|
||||
|
||||
//Dumpsettings
|
||||
echo '<h6>'.$lang['L_DUMP'].' (PHP)</h6>';
|
||||
//Dumpsettings
|
||||
echo '<h6>'.$lang['L_DUMP'].' (PHP)</h6>';
|
||||
|
||||
echo '<div><form name="fm" id="fm" method="post" action="'.$href.'">';
|
||||
echo '<input class="Formbutton" name="dump" type="submit" value="';
|
||||
echo $lang['L_FM_STARTDUMP'].'"><br>';
|
||||
echo '<div><form name="fm" id="fm" method="post" action="'.$href.'">';
|
||||
echo '<input class="Formbutton" name="dump" type="submit" value="';
|
||||
echo $lang['L_FM_STARTDUMP'].'"><br>';
|
||||
|
||||
echo '<br><table>';
|
||||
echo $tbl_abfrage;
|
||||
echo '<tr><td><label for="sel_dump_encoding">'.$lang['L_FM_CHOOSE_ENCODING'].'</label></td>';
|
||||
echo '<td><select name="sel_dump_encoding" id="sel_dump_encoding">';
|
||||
echo make_options($config['mysql_possible_character_sets'],$dump['sel_dump_encoding']);
|
||||
echo '</select></td></tr>';
|
||||
echo '<tr><td>'.$lang['L_MYSQL_CONNECTION_ENCODING'].':</td><td><strong>'.$config['mysql_standard_character_set'].'</strong></td></tr>';
|
||||
echo '</table>';
|
||||
echo '</form><br></div>';
|
||||
echo '<br><table>';
|
||||
echo $tbl_abfrage;
|
||||
echo '<tr><td><label for="sel_dump_encoding">'.$lang['L_FM_CHOOSE_ENCODING'].'</label></td>';
|
||||
echo '<td><select name="sel_dump_encoding" id="sel_dump_encoding">';
|
||||
echo make_options($config['mysql_possible_character_sets'], $dump['sel_dump_encoding']);
|
||||
echo '</select></td></tr>';
|
||||
echo '<tr><td>'.$lang['L_MYSQL_CONNECTION_ENCODING'].':</td><td><strong>'.$config['mysql_standard_character_set'].'</strong></td></tr>';
|
||||
echo '</table>';
|
||||
echo '</form><br></div>';
|
||||
|
||||
echo '<h6>'.$lang['L_FM_DUMPSETTINGS'].' (PHP)</h6>';
|
||||
echo '<h6>'.$lang['L_FM_DUMPSETTINGS'].' (PHP)</h6>';
|
||||
|
||||
echo '<table>';
|
||||
echo '<tr><td>'.$lang['L_DB'].':</td><td><strong>';
|
||||
if ($config['multi_dump']==1)
|
||||
{
|
||||
echo 'Multidump ('.count($databases['multi']).' '.$lang['L_DBS'].')</strong>';
|
||||
echo '<span class="small">'.$toolboxstring.'</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $databases['db_actual'].' <span>('.$databases['Detailinfo']['tables']." Tables, ".$databases['Detailinfo']['records']." Records, ".byte_output($databases['Detailinfo']['size']).')</span></strong>';
|
||||
echo '<table>';
|
||||
echo '<tr><td>'.$lang['L_DB'].':</td><td><strong>';
|
||||
if (isset($config['multi_dump']) && (1 == $config['multi_dump'])) {
|
||||
echo 'Multidump ('.count($databases['multi']).' '.$lang['L_DBS'].')</strong>';
|
||||
echo '<span class="small">'.$toolboxstring.'</span>';
|
||||
} else {
|
||||
echo $databases['db_actual'];
|
||||
if (isset($databases['Detailinfo'])) {
|
||||
echo ' <span> ('.$databases['Detailinfo']['tables'].' Tables, '.$databases['Detailinfo']['records'].' Records, '.byte_output($databases['Detailinfo']['size']).')</span>';
|
||||
}
|
||||
echo '</strong>';
|
||||
}
|
||||
echo '</td></tr>';
|
||||
|
||||
}
|
||||
echo '</td></tr>';
|
||||
if ((isset($config['multi_dump']) && (0 == $config['multi_dump'])) && $databases['praefix'][$databases['db_selected_index']] > '') {
|
||||
echo '<tr><td>'.$lang['L_PRAEFIX'].':</td><td><strong>';
|
||||
echo $databases['praefix'][$databases['db_selected_index']];
|
||||
echo '</strong></td></tr>';
|
||||
}
|
||||
|
||||
if ($config['multi_dump']==0&&$databases['praefix'][$databases['db_selected_index']]>'')
|
||||
{
|
||||
echo '<tr><td>'.$lang['L_PRAEFIX'].':</td><td><strong>';
|
||||
echo $databases['praefix'][$databases['db_selected_index']];
|
||||
echo '</strong></td></tr>';
|
||||
}
|
||||
echo '<tr><td>'.$lang['L_GZIP'].':</td><td><strong>'.((isset($config['compression']) && (1 == $config['compression'])) ? $lang['L_ACTIVATED'] : $lang['L_NOT_ACTIVATED']);
|
||||
echo '</strong></td></tr>';
|
||||
|
||||
echo '<tr><td>'.$lang['L_GZIP'].':</td><td><strong>'.(($config['compression']==1) ? $lang['L_ACTIVATED'] : $lang['L_NOT_ACTIVATED']);
|
||||
echo '</strong></td></tr>';
|
||||
echo '<tr><td>'.$lang['L_MULTI_PART'].':</td><td><strong>'.((isset($config['multi_part']) && (1 == $config['multi_part'])) ? $lang['L_YES'] : $lang['L_NO']);
|
||||
echo '</strong></td></tr>';
|
||||
|
||||
echo '<tr><td>'.$lang['L_MULTI_PART'].':</td><td><strong>'.(($config['multi_part']==1) ? $lang['L_YES'] : $lang['L_NO']);
|
||||
echo '</strong></td></tr>';
|
||||
if (isset($config['multi_part']) && (1 == $config['multi_part'])) {
|
||||
echo '<tr><td>'.$lang['L_MULTI_PART_GROESSE'].':</td><td><strong>'.byte_output($config['multipart_groesse']).'</strong></td></tr>';
|
||||
}
|
||||
|
||||
if ($config['multi_part']==1)
|
||||
{
|
||||
echo '<tr><td>'.$lang['L_MULTI_PART_GROESSE'].':</td><td><strong>'.byte_output($config['multipart_groesse']).'</strong></td></tr>';
|
||||
}
|
||||
if (isset($config['send_mail']) && (1 == $config['send_mail'])) {
|
||||
$t = $config['email_recipient'].((1 == $config['send_mail_dump']) ? $lang['L_WITHATTACH'] : $lang['L_WITHOUTATTACH']);
|
||||
}
|
||||
echo '<tr><td>'.$lang['L_SEND_MAIL_FORM'].':</td><td><strong>'.((isset($config['send_mail']) && (1 == $config['send_mail'])) ? $t : $lang['L_NOT_ACTIVATED']);
|
||||
echo '</strong></td></tr>';
|
||||
|
||||
if ($config['send_mail']==1)
|
||||
{
|
||||
$t=$config['email_recipient'].(($config['send_mail_dump']==1) ? $lang['L_WITHATTACH'] : $lang['L_WITHOUTATTACH']);
|
||||
}
|
||||
echo '<tr><td>'.$lang['L_SEND_MAIL_FORM'].':</td><td><strong>'.(($config['send_mail']==1) ? $t : $lang['L_NOT_ACTIVATED']);
|
||||
echo '</strong></td></tr>';
|
||||
for ($x = 0; $x < 3; ++$x) {
|
||||
if (isset($config['ftp_transfer'][$x]) && $config['ftp_transfer'][$x] > 0) {
|
||||
echo table_output($lang['L_FTP_TRANSFER'], sprintf(str_replace('<br>', ' ', $lang['L_FTP_SEND_TO']), $config['ftp_server'][$x], $config['ftp_dir'][$x]), 1, 2);
|
||||
}
|
||||
if (isset($config['sftp_transfer'][$x]) && $config['sftp_transfer'][$x] > 0) {
|
||||
echo table_output($lang['L_SFTP_TRANSFER'], sprintf(str_replace('<br>', ' ', $lang['L_SFTP_SEND_TO']), $config['sftp_server'][$x], $config['sftp_dir'][$x]), 1, 2);
|
||||
}
|
||||
}
|
||||
//echo '</td></tr>';
|
||||
echo '</table>';
|
||||
|
||||
for ($x=0; $x<3; $x++)
|
||||
{
|
||||
if (isset($config['ftp_transfer'][$x])&&$config['ftp_transfer'][$x]>0)
|
||||
{
|
||||
echo table_output($lang['L_FTP_TRANSFER'],sprintf(str_replace('<br>',' ',$lang['L_FTP_SEND_TO']),$config['ftp_server'][$x],$config['ftp_dir'][$x]),1,2);
|
||||
}
|
||||
}
|
||||
//echo '</td></tr>';
|
||||
echo '</table>';
|
||||
echo '<div style="display:none"><img src="'.$config['files']['iconpath'].'progressbar_dump.gif" alt=""><br><img src="'.$config['files']['iconpath'].'progressbar_speed.gif" alt=""></div>';
|
||||
|
||||
echo '<div style="display:none"><img src="'.$config['files']['iconpath'].'progressbar_dump.gif" alt=""><br><img src="'.$config['files']['iconpath'].'progressbar_speed.gif" alt=""></div>';
|
||||
echo '</div><div id="buperl" style="display:none;">';
|
||||
|
||||
echo '</div><div id="buperl" style="display:none;">';
|
||||
//crondumpsettings
|
||||
echo '<h6>'.$lang['L_DUMP'].' (PERL)</h6>';
|
||||
|
||||
//crondumpsettings
|
||||
echo '<h6>'.$lang['L_DUMP'].' (PERL)</h6>';
|
||||
echo '<p><input class="Formbutton" type="Button" name="DoCronscript" value="'.$lang['L_DOCRONBUTTON'].'" onclick="self.location.href=\''.$scriptref.'\'"> ';
|
||||
echo '<input class="Formbutton" type="Button" name="DoPerlTest" value="'.$lang['L_DOPERLTEST'].'" onclick="self.location.href=\''.$sfile.'\'"> ';
|
||||
echo '<input class="Formbutton" type="Button" name="DoSimpleTest" value="'.$lang['L_DOSIMPLETEST'].'" onclick="self.location.href=\''.$simplefile.'\'"></p>';
|
||||
|
||||
echo '<p><input class="Formbutton" type="Button" name="DoCronscript" value="'.$lang['L_DOCRONBUTTON'].'" onclick="self.location.href=\''.$scriptref.'\'"> ';
|
||||
echo '<input class="Formbutton" type="Button" name="DoPerlTest" value="'.$lang['L_DOPERLTEST'].'" onclick="self.location.href=\''.$sfile.'\'"> ';
|
||||
echo '<input class="Formbutton" type="Button" name="DoSimpleTest" value="'.$lang['L_DOSIMPLETEST'].'" onclick="self.location.href=\''.$simplefile.'\'"></p>';
|
||||
echo '<h6>'.$lang['L_FM_DUMPSETTINGS'].' (PERL)</h6>';
|
||||
|
||||
echo '<h6>'.$lang['L_FM_DUMPSETTINGS'].' (PERL)</h6>';
|
||||
if (-3 == $config['cron_dbindex']) {
|
||||
$cron_dbname = $lang['L_MULTIDUMPALL'];
|
||||
$cron_dbpraefix = '';
|
||||
} elseif (-2 == $config['cron_dbindex']) {
|
||||
//$cron_dbname='Multidump ('.count($databases['multi']).' '.$lang['L_DBS'].')';
|
||||
$cron_dbname = 'Multidump ('.count($databases['multi']).' '.$lang['L_DBS'].')</strong>';
|
||||
$cron_dbname .= '<span class="small">'.$toolboxstring.'</span>';
|
||||
$cron_dbpraefix = '';
|
||||
} else {
|
||||
$cron_dbname = $databases['Name'][$config['cron_dbindex']];
|
||||
$cron_dbpraefix = $databases['praefix'][$config['cron_dbindex']];
|
||||
}
|
||||
|
||||
if ($config['cron_dbindex']==-3)
|
||||
{
|
||||
$cron_dbname=$lang['L_MULTIDUMPALL'];
|
||||
$cron_dbpraefix="";
|
||||
}
|
||||
elseif ($config['cron_dbindex']==-2)
|
||||
{
|
||||
//$cron_dbname='Multidump ('.count($databases['multi']).' '.$lang['L_DBS'].')';
|
||||
$cron_dbname='Multidump ('.count($databases['multi']).' '.$lang['L_DBS'].')</strong>';
|
||||
$cron_dbname.='<span class="small">'.$toolboxstring.'</span>';
|
||||
$cron_dbpraefix="";
|
||||
}
|
||||
else
|
||||
{
|
||||
$cron_dbname=$databases['Name'][$config['cron_dbindex']];
|
||||
$cron_dbpraefix=$databases['praefix'][$config['cron_dbindex']];
|
||||
}
|
||||
echo '<table>';
|
||||
echo '<tr><td>'.$lang['L_DB'].':</td><td><strong>'.$cron_dbname.'</strong></td></tr>';
|
||||
|
||||
echo '<table>';
|
||||
echo '<tr><td>'.$lang['L_DB'].':</td><td><strong>'.$cron_dbname.'</strong></td></tr>';
|
||||
if ($cron_dbpraefix > '') {
|
||||
echo '<tr><td>'.$lang['L_PRAEFIX'].':</td><td><strong>';
|
||||
echo $cron_dbpraefix.'</strong></td></tr>';
|
||||
}
|
||||
|
||||
if ($cron_dbpraefix>'')
|
||||
{
|
||||
echo '<tr><td>'.$lang['L_PRAEFIX'].":</td><td><strong>";
|
||||
echo $cron_dbpraefix.'</strong></td></tr>';
|
||||
}
|
||||
echo '<tr><td>'.$lang['L_GZIP'].':</td><td><strong>'.((isset($config['cron_compression']) && (1 == $config['cron_compression'])) ? $lang['L_ACTIVATED'] : $lang['L_NOT_ACTIVATED']);
|
||||
echo '</strong></td></tr>';
|
||||
|
||||
echo '<tr><td>'.$lang['L_GZIP'].":</td><td><strong>".(($config['cron_compression']==1) ? $lang['L_ACTIVATED'] : $lang['L_NOT_ACTIVATED']);
|
||||
echo '</strong></td></tr>';
|
||||
echo '<tr><td>'.$lang['L_MULTI_PART'].':</td><td><strong>'.((isset($config['multi_part']) && (1 == $config['multi_part'])) ? $lang['L_YES'] : $lang['L_NO']);
|
||||
echo '</strong></td></tr>';
|
||||
|
||||
echo '<tr><td>'.$lang['L_MULTI_PART'].":</td><td><strong>".(($config['multi_part']==1) ? $lang['L_YES'] : $lang['L_NO']);
|
||||
echo '</strong></td></tr>';
|
||||
if (isset($config['multi_part']) && (1 == $config['multi_part'])) {
|
||||
echo '<tr><td>'.$lang['L_MULTI_PART_GROESSE'].':</td><td><strong>'.byte_output($config['multipart_groesse']).'</td></tr>';
|
||||
}
|
||||
echo '<tr><td>'.$lang['L_CRON_PRINTOUT'].':</td><td><strong>'.((isset($config['cron_printout']) && (1 == $config['cron_printout'])) ? $lang['L_ACTIVATED'] : $lang['L_NOT_ACTIVATED']).'</strong></td></tr>';
|
||||
|
||||
if ($config['multi_part']==1)
|
||||
{
|
||||
echo '<tr><td>'.$lang['L_MULTI_PART_GROESSE'].':</td><td><strong>'.byte_output($config['multipart_groesse']).'</td></tr>';
|
||||
}
|
||||
echo '<tr><td>'.$lang['L_CRON_PRINTOUT'].':</td><td><strong>'.(($config['cron_printout']==1) ? $lang['L_ACTIVATED'] : $lang['L_NOT_ACTIVATED']).'</strong></td></tr>';
|
||||
if (isset($config['send_mail']) && (1 == $config['send_mail'])) {
|
||||
$t = $config['email_recipient'].((1 == $config['send_mail_dump']) ? $lang['L_WITHATTACH'] : $lang['L_WITHOUTATTACH']);
|
||||
}
|
||||
echo '<tr><td>'.$lang['L_SEND_MAIL_FORM'].':</td><td><strong>'.((isset($config['send_mail']) && (1 == $config['send_mail'])) ? $t : $lang['L_NOT_ACTIVATED']).'</strong></td></tr>';
|
||||
|
||||
if ($config['send_mail']==1)
|
||||
{
|
||||
$t=$config['email_recipient'].(($config['send_mail_dump']==1) ? $lang['L_WITHATTACH'] : $lang['L_WITHOUTATTACH']);
|
||||
}
|
||||
echo '<tr><td>'.$lang['L_SEND_MAIL_FORM'].':</td><td><strong>'.(($config['send_mail']==1) ? $t : $lang['L_NOT_ACTIVATED']).'</strong></td></tr>';
|
||||
for ($x = 0; $x < 3; ++$x) {
|
||||
if (isset($config['ftp_transfer'][$x]) && $config['ftp_transfer'][$x] > 0) {
|
||||
echo table_output($lang['L_FTP_TRANSFER'], sprintf(str_replace('<br>', ' ', $lang['L_FTP_SEND_TO']), $config['ftp_server'][$x], $config['ftp_dir'][$x]), 1, 2);
|
||||
}
|
||||
if (isset($config['sftp_transfer'][$x]) && $config['sftp_transfer'][$x] > 0) {
|
||||
echo table_output($lang['L_SFTP_TRANSFER'], sprintf(str_replace('<br>', ' ', $lang['L_SFTP_SEND_TO']), $config['sftp_server'][$x], $config['sftp_dir'][$x]), 1, 2);
|
||||
}
|
||||
}
|
||||
//echo '</td></tr>';
|
||||
echo '</table>';
|
||||
|
||||
for ($x=0; $x<3; $x++)
|
||||
{
|
||||
if (isset($config['ftp_transfer'][$x])&&$config['ftp_transfer'][$x]>0)
|
||||
{
|
||||
echo table_output($lang['L_FTP_TRANSFER'],sprintf(str_replace('<br>',' ',$lang['L_FTP_SEND_TO']),$config['ftp_server'][$x],$config['ftp_dir'][$x]),1,2);
|
||||
}
|
||||
}
|
||||
//echo '</td></tr>';
|
||||
echo '</table>';
|
||||
// Eintraege fuer Perl
|
||||
echo '<br><p class="small">'.$lang['L_PERLOUTPUT1'].':<br> <strong>'.$scriptentry.'</strong><br>';
|
||||
echo $lang['L_PERLOUTPUT2'].':<br> <strong>'.$scriptref.'</strong><br>';
|
||||
echo $lang['L_PERLOUTPUT3'].':<br> <strong>'.$cronref.'</strong></p>';
|
||||
|
||||
// Eintraege fuer Perl
|
||||
echo '<br><p class="small">'.$lang['L_PERLOUTPUT1'].':<br> <strong>'.$scriptentry.'</strong><br>';
|
||||
echo $lang['L_PERLOUTPUT2'].':<br> <strong>'.$scriptref.'</strong><br>';
|
||||
echo $lang['L_PERLOUTPUT3'].':<br> <strong>'.$cronref.'</strong></p>';
|
||||
echo '</div>';
|
||||
|
||||
echo '</div>';
|
||||
break;
|
||||
|
||||
break;
|
||||
case 'restore':
|
||||
echo headline(sprintf($lang['L_FM_RESTORE_HEADER'], $databases['db_actual']));
|
||||
echo ($msg > '') ? $msg : '';
|
||||
echo $autodel;
|
||||
echo '<form name="fm" id="fm" method="post" action="'.$href.'">';
|
||||
echo '<div>';
|
||||
echo '<input class="Formbutton" name="restore" type="submit" value="'.$lang['L_FM_RESTORE'].'" onclick="if (!confirm(\''.$lang['L_FM_ALERTRESTORE1'].' `'.$databases['db_actual'].'` '.$lang['L_FM_ALERTRESTORE2'].' `\' + GetSelectedFilename() + \'` '.$lang['L_FM_ALERTRESTORE3'].'\')) return false;">';
|
||||
echo '<input class="Formbutton" name="restore" type="submit" value="'.$lang['L_RESTORE_OF_TABLES'].'" onclick="document.forms[0].tblfrage.value=1;">';
|
||||
|
||||
case 'restore':
|
||||
echo headline(sprintf($lang['L_FM_RESTORE_HEADER'],$databases['db_actual']));
|
||||
echo ($msg>'') ? $msg : '';
|
||||
echo $autodel;
|
||||
echo '<form name="fm" id="fm" method="post" action="'.$href.'">';
|
||||
echo '<div>';
|
||||
echo '<input class="Formbutton" name="restore" type="submit" value="'.$lang['L_FM_RESTORE'].'" onclick="if (!confirm(\''.$lang['L_FM_ALERTRESTORE1'].' `'.$databases['db_actual'].'` '.$lang['L_FM_ALERTRESTORE2'].' `\' + GetSelectedFilename() + \'` '.$lang['L_FM_ALERTRESTORE3'].'\')) return false;">';
|
||||
echo '<input class="Formbutton" name="restore" type="submit" value="'.$lang['L_RESTORE_OF_TABLES'].'" onclick="document.forms[0].tblfrage.value=1;">';
|
||||
echo FileList();
|
||||
echo '<input type="hidden" name="tblfrage" value="0">';
|
||||
echo '</div></form>';
|
||||
break;
|
||||
case 'files':
|
||||
$sysfedit=(isset($_POST['sysfedit'])) ? 1 : 0;
|
||||
$sysfedit=(isset($_GET['sysfedit'])) ? $_GET['sysfedit'] : $sysfedit;
|
||||
echo headline($lang['L_FILE_MANAGE']);
|
||||
echo ($msg>'') ? $msg.'<br>' : '';
|
||||
echo $autodel;
|
||||
echo '<form name="fm" id="fm" method="post" action="'.$href.'">';
|
||||
echo '<input class="Formbutton" name="delete" type="submit" value="'.$lang['L_FM_DELETE'].'" onclick="if (!confirm(\''.$lang['L_FM_ASKDELETE1'].'\n\' + GetSelectedFilename() + \'\n\n'.$lang['L_FM_ASKDELETE2'].'\')) return false;">';
|
||||
echo '<input class="Formbutton" name="deleteauto" type="submit" value="'.$lang['L_FM_DELETEAUTO'].'" onclick="if (!confirm(\''.$lang['L_FM_ASKDELETE3'].'\')) return false;">';
|
||||
echo '<input class="Formbutton" name="deleteall" type="submit" value="'.$lang['L_FM_DELETEALL'].'" onclick="if (!confirm(\''.$lang['L_FM_ASKDELETE4'].'\')) return false;">';
|
||||
echo '<input class="Formbutton" name="deleteallfilter" type="submit" value="'.$lang['L_FM_DELETEALLFILTER'].$databases['db_actual'].$lang['L_FM_DELETEALLFILTER2'].'" onclick="if (!confirm(\''.$lang['L_FM_ASKDELETE5'].$databases['db_actual'].$lang['L_FM_ASKDELETE5_2'].'\')) return false;">';
|
||||
|
||||
echo FileList().'</form>';
|
||||
echo FileList();
|
||||
echo '<input type="hidden" name="tblfrage" value="0">';
|
||||
echo '</div></form>';
|
||||
break;
|
||||
case 'files':
|
||||
$sysfedit = (isset($_POST['sysfedit'])) ? 1 : 0;
|
||||
$sysfedit = (isset($_GET['sysfedit'])) ? $_GET['sysfedit'] : $sysfedit;
|
||||
echo headline($lang['L_FILE_MANAGE']);
|
||||
echo ($msg > '') ? $msg.'<br>' : '';
|
||||
echo $autodel;
|
||||
echo '<form name="fm" id="fm" method="post" action="'.$href.'">';
|
||||
echo '<input class="Formbutton" name="delete" type="submit" value="'.$lang['L_FM_DELETE'].'" onclick="if (!confirm(\''.$lang['L_FM_ASKDELETE1'].'\n\' + GetSelectedFilename() + \'\n\n'.$lang['L_FM_ASKDELETE2'].'\')) return false;">';
|
||||
echo '<input class="Formbutton" name="deleteauto" type="submit" value="'.$lang['L_FM_DELETEAUTO'].'" onclick="if (!confirm(\''.$lang['L_FM_ASKDELETE3'].'\')) return false;">';
|
||||
echo '<input class="Formbutton" name="deleteall" type="submit" value="'.$lang['L_FM_DELETEALL'].'" onclick="if (!confirm(\''.$lang['L_FM_ASKDELETE4'].'\')) return false;">';
|
||||
echo '<input class="Formbutton" name="deleteallfilter" type="submit" value="'.$lang['L_FM_DELETEALLFILTER'].$databases['db_actual'].$lang['L_FM_DELETEALLFILTER2'].'" onclick="if (!confirm(\''.$lang['L_FM_ASKDELETE5'].$databases['db_actual'].$lang['L_FM_ASKDELETE5_2'].'\')) return false;">';
|
||||
echo FileList().'</form>';
|
||||
|
||||
echo '<h6>'.$lang['L_FM_FILEUPLOAD'].'</h6>';
|
||||
echo '<div align="left"><form action="'.$href.'" method="POST" enctype="multipart/form-data">';
|
||||
echo '<input type="file" name="upfile" class="Formtext" size="60">';
|
||||
echo '<input type="submit" name="upload" value="'.$lang['L_FM_FILEUPLOAD'].'" class="Formbutton">';
|
||||
echo '<br>'.$lang['L_MAX_UPLOAD_SIZE'].': <strong>'.$config['upload_max_filesize'].'</strong>';
|
||||
echo '<br>'.$lang['L_MAX_UPLOAD_SIZE_INFO'];
|
||||
echo '<h6>'.$lang['L_FM_FILEUPLOAD'].'</h6>';
|
||||
echo '<div align="left"><form action="'.$href.'" method="POST" enctype="multipart/form-data">';
|
||||
echo '<input type="file" name="upfile" class="Formtext" size="60">';
|
||||
echo '<input type="submit" name="upload" value="'.$lang['L_FM_FILEUPLOAD'].'" class="Formbutton">';
|
||||
echo '<br>'.$lang['L_MAX_UPLOAD_SIZE'].': <strong>'.$config['upload_max_filesize'].'</strong>';
|
||||
echo '<br>'.$lang['L_MAX_UPLOAD_SIZE_INFO'];
|
||||
|
||||
echo '</form></div>';
|
||||
echo '</form></div>';
|
||||
|
||||
echo '<h6>Tools</h6><div align="left">';
|
||||
echo '<input type="Button" onclick="document.location=\'filemanagement.php?action=convert\'" class="Formbutton" value="'.$lang['L_CONVERTER'].'">';
|
||||
echo '</div>';
|
||||
echo '<h6>Tools</h6><div align="left">';
|
||||
echo '<input type="Button" onclick="document.location=\'filemanagement.php?action=convert\'" class="Formbutton" value="'.$lang['L_CONVERTER'].'">';
|
||||
echo '</div>';
|
||||
|
||||
break;
|
||||
case "convert":
|
||||
// Konverter
|
||||
echo headline($lang['L_CONVERTER']);
|
||||
echo '<br><br><form action="filemanagement.php?action=convert" method="post">';
|
||||
echo '<table class="bdr"><tr><th colspan="2">'.$lang['L_CONVERT_TITLE'].'</th></tr>';
|
||||
echo '<tr><td>'.$lang['L_CONVERT_FILE'].'</td><td>'.FilelisteCombo($config['paths']['backup'],$selectfile).'</td></tr>';
|
||||
echo '<tr><td>'.$lang['L_CONVERT_FILENAME'].':</td><td><input type="text" name="destfile" size="50" value="'.$destfile.'"></td></tr>';
|
||||
echo '<tr><td><input type="checkbox" name="compressed" value="1" '.(($compressed==1) ? "checked" : "").'> '.$lang['L_COMPRESSED'].'</td>';
|
||||
echo '<td><input type="submit" name="startconvert" value=" '.$lang['L_CONVERT_START'].' " class="Formbutton"></td></tr>';
|
||||
echo '</table></form><br>';
|
||||
if (isset($_POST['startconvert']))
|
||||
{
|
||||
//$destfile.=($compressed==1) ? ".sql.gz" : ".sql";
|
||||
echo $lang['L_CONVERTING']." $selectfile ==> $destfile<br>";
|
||||
|
||||
if ($selectfile!=""&&file_exists($config['paths']['backup'].$selectfile)&&strlen($destfile)>2)
|
||||
{
|
||||
Converter($selectfile,$destfile,$compressed);
|
||||
}
|
||||
else
|
||||
echo $lang['L_CONVERT_WRONG_PARAMETERS'];
|
||||
}
|
||||
break;
|
||||
case 'convert':
|
||||
// Konverter
|
||||
echo headline($lang['L_CONVERTER']);
|
||||
echo '<br><br><form action="filemanagement.php?action=convert" method="post">';
|
||||
echo '<table class="bdr"><tr><th colspan="2">'.$lang['L_CONVERT_TITLE'].'</th></tr>';
|
||||
echo '<tr><td>'.$lang['L_CONVERT_FILE'].'</td><td>'.FilelisteCombo($config['paths']['backup'], $selectfile).'</td></tr>';
|
||||
echo '<tr><td>'.$lang['L_CONVERT_FILENAME'].':</td><td><input type="text" name="destfile" size="50" value="'.$destfile.'"></td></tr>';
|
||||
echo '<tr><td><input type="checkbox" name="compressed" value="1" '.((1 == $compressed) ? 'checked' : '').'> '.$lang['L_COMPRESSED'].'</td>';
|
||||
echo '<td><input type="submit" name="startconvert" value=" '.$lang['L_CONVERT_START'].' " class="Formbutton"></td></tr>';
|
||||
echo '</table></form><br>';
|
||||
if (isset($_POST['startconvert'])) {
|
||||
//$destfile.=($compressed==1) ? ".sql.gz" : ".sql";
|
||||
echo $lang['L_CONVERTING']." $selectfile ==> $destfile<br>";
|
||||
|
||||
if ('' != $selectfile && file_exists($config['paths']['backup'].$selectfile) && strlen($destfile) > 2) {
|
||||
Converter($selectfile, $destfile, $compressed);
|
||||
} else {
|
||||
echo $lang['L_CONVERT_WRONG_PARAMETERS'];
|
||||
}
|
||||
}
|
||||
}
|
||||
echo MSDFooter();
|
||||
echo MODFooter();
|
||||
ob_end_flush();
|
||||
exit();
|
||||
|
70
msd/help.php
@ -4,7 +4,7 @@
|
||||
MyOOS [Dumper]
|
||||
http://www.oos-shop.de/
|
||||
|
||||
Copyright (c) 2016 by the MyOOS Development Team.
|
||||
Copyright (c) 2013 - 2022 by the MyOOS Development Team.
|
||||
----------------------------------------------------------------------
|
||||
Based on:
|
||||
|
||||
@ -18,62 +18,16 @@
|
||||
|
||||
define('OOS_VALID_MOD', true);
|
||||
|
||||
if (!@ob_start("ob_gzhandler")) @ob_start();
|
||||
include ( './inc/header.php' );
|
||||
include ( MSD_PATH . 'language/' . $config['language'] . '/lang.php' );
|
||||
include ( MSD_PATH . 'language/' . $config['language'] . '/lang_help.php' );
|
||||
echo MSDHeader(0);
|
||||
if (!@ob_start('ob_gzhandler')) {
|
||||
@ob_start();
|
||||
}
|
||||
|
||||
include './inc/header.php';
|
||||
include MOD_PATH.'language/'.$config['language'].'/lang.php';
|
||||
include MOD_PATH.'language/'.$config['language'].'/lang_help.php';
|
||||
echo MODHeader(0);
|
||||
echo headline($lang['L_CREDITS']);
|
||||
include ( MSD_PATH . 'language/' . $config['language'] . '/help.php' );
|
||||
?>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<?php
|
||||
echo MSDFooter();
|
||||
readfile(MOD_PATH.'language/'.$config['language'].'/help.html');
|
||||
echo MODFooter();
|
||||
ob_end_flush();
|
||||
exit();
|
||||
|
Before Width: | Height: | Size: 5.1 KiB |
BIN
msd/images/qrcode.png
Normal file
After Width: | Height: | Size: 37 KiB |
@ -4,7 +4,7 @@
|
||||
MyOOS [Dumper]
|
||||
http://www.oos-shop.de/
|
||||
|
||||
Copyright (c) 2016 by the MyOOS Development Team.
|
||||
Copyright (c) 2013 - 2022 by the MyOOS Development Team.
|
||||
----------------------------------------------------------------------
|
||||
Based on:
|
||||
|
||||
@ -16,28 +16,29 @@
|
||||
Released under the GNU General Public License
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
if (!defined('MSD_VERSION')) die('No direct access.');
|
||||
if (!defined('MOD_VERSION')) {
|
||||
exit('No direct access.');
|
||||
}
|
||||
//define icons
|
||||
$icon['arrow_up']='<img src="' . $config['files']['iconpath'] . 'arrow_up.gif" alt="">';
|
||||
$icon['arrow_down']='<img src="' . $config['files']['iconpath'] . 'arrow_down.gif" alt="">';
|
||||
$icon['blank']=$config['files']['iconpath'] . 'blank.gif';
|
||||
$icon['browse']='<img src="' . $config['files']['iconpath'] . 'browse.gif" alt="' . $lang['L_TITLE_SHOW_DATA'] . '" title="' . $lang['L_TITLE_SHOW_DATA'] . '">';
|
||||
$icon['edit']='<img src="' . $config['files']['iconpath'] . 'edit.gif" alt="' . $lang['L_EDIT'] . '" title="' . $lang['L_EDIT'] . '">';
|
||||
$icon['delete']='<img src="' . $config['files']['iconpath'] . 'delete.gif" alt="' . $lang['L_DELETE'] . '" title="' . $lang['L_DELETE'] . '">';
|
||||
$icon['arrow_up'] = '<img src="'.$config['files']['iconpath'].'arrow_up.gif" alt="">';
|
||||
$icon['arrow_down'] = '<img src="'.$config['files']['iconpath'].'arrow_down.gif" alt="">';
|
||||
$icon['blank'] = $config['files']['iconpath'].'blank.gif';
|
||||
$icon['browse'] = '<img src="'.$config['files']['iconpath'].'browse.gif" alt="'.$lang['L_TITLE_SHOW_DATA'].'" title="'.$lang['L_TITLE_SHOW_DATA'].'">';
|
||||
$icon['edit'] = '<img src="'.$config['files']['iconpath'].'edit.gif" alt="'.$lang['L_EDIT'].'" title="'.$lang['L_EDIT'].'">';
|
||||
$icon['delete'] = '<img src="'.$config['files']['iconpath'].'delete.gif" alt="'.$lang['L_DELETE'].'" title="'.$lang['L_DELETE'].'">';
|
||||
|
||||
$icon['index']='<img src="' . $config['files']['iconpath'] . 'index.gif" alt="' . $lang['L_TITLE_INDEX'] . '" title="' . $lang['L_TITLE_INDEX'] . '">';
|
||||
$icon['key_primary']='<img src="' . $config['files']['iconpath'] . 'key_primary.gif" alt="' . $lang['L_TITLE_KEY_PRIMARY'] . '" title="' . $lang['L_TITLE_KEY_PRIMARY'] . '">';
|
||||
$icon['key_fulltext']='<img src="' . $config['files']['iconpath'] . 'key_fulltext.gif" alt="' . $lang['L_TITLE_KEY_FULLTEXT'] . '" title="' . $lang['L_TITLE_KEY_FULLTEXT'] . '">';
|
||||
$icon['key_unique']='<img src="' . $config['files']['iconpath'] . 'key_unique.gif" alt="' . $lang['L_TITLE_KEY_UNIQUE'] . '" title="' . $lang['L_TITLE_KEY_UNIQUE'] . '">';
|
||||
$icon['key_nokey']='<img src="' . $config['files']['iconpath'] . 'key_nokey.gif" alt="' . $lang['L_TITLE_NOKEY'] . '" title="' . $lang['L_TITLE_NOKEY'] . '">';
|
||||
$icon['table_truncate']='<img src="' . $config['files']['iconpath'] . 'table_truncate.gif" alt="' . $lang['L_EMPTY'] . '" title="' . $lang['L_EMPTY'] . '">';
|
||||
$icon['table_truncate_reset']='<img src="' . $config['files']['iconpath'] . 'table_truncate_reset.gif" alt="' . $lang['L_EMPTYKEYS'] . '" title="' . $lang['L_EMPTYKEYS'] . '">';
|
||||
$icon['back2db_overview']='<img src="' . $config['files']['iconpath'] . 'arrowleft.gif" alt="' . $lang['L_SQL_BACKDBOVERVIEW'] . '" title="' . $lang['L_SQL_BACKDBOVERVIEW'] . '">';
|
||||
$icon['index'] = '<img src="'.$config['files']['iconpath'].'index.gif" alt="'.$lang['L_TITLE_INDEX'].'" title="'.$lang['L_TITLE_INDEX'].'">';
|
||||
$icon['key_primary'] = '<img src="'.$config['files']['iconpath'].'key_primary.gif" alt="'.$lang['L_TITLE_KEY_PRIMARY'].'" title="'.$lang['L_TITLE_KEY_PRIMARY'].'">';
|
||||
$icon['key_fulltext'] = '<img src="'.$config['files']['iconpath'].'key_fulltext.gif" alt="'.$lang['L_TITLE_KEY_FULLTEXT'].'" title="'.$lang['L_TITLE_KEY_FULLTEXT'].'">';
|
||||
$icon['key_unique'] = '<img src="'.$config['files']['iconpath'].'key_unique.gif" alt="'.$lang['L_TITLE_KEY_UNIQUE'].'" title="'.$lang['L_TITLE_KEY_UNIQUE'].'">';
|
||||
$icon['key_nokey'] = '<img src="'.$config['files']['iconpath'].'key_nokey.gif" alt="'.$lang['L_TITLE_NOKEY'].'" title="'.$lang['L_TITLE_NOKEY'].'">';
|
||||
$icon['table_truncate'] = '<img src="'.$config['files']['iconpath'].'table_truncate.gif" alt="'.$lang['L_EMPTY'].'" title="'.$lang['L_EMPTY'].'">';
|
||||
$icon['table_truncate_reset'] = '<img src="'.$config['files']['iconpath'].'table_truncate_reset.gif" alt="'.$lang['L_EMPTYKEYS'].'" title="'.$lang['L_EMPTYKEYS'].'">';
|
||||
$icon['back2db_overview'] = '<img src="'.$config['files']['iconpath'].'arrowleft.gif" alt="'.$lang['L_SQL_BACKDBOVERVIEW'].'" title="'.$lang['L_SQL_BACKDBOVERVIEW'].'">';
|
||||
|
||||
$icon['search']='<img src="' . $config['files']['iconpath'] . 'search.gif" alt="' . $lang['L_TITLE_SEARCH'] . '" title="' . $lang['L_TITLE_SEARCH'] . '">';
|
||||
$icon['mysql_help']='<img src="' . $config['files']['iconpath'] . 'mysql_help.gif" alt="' . $lang['L_TITLE_MYSQL_HELP'] . '" title="' . $lang['L_TITLE_MYSQL_HELP'] . '">';
|
||||
$icon['upload']='<img src="' . $config['files']['iconpath'] . 'openfile.gif" alt="' . $lang['L_TITLE_UPLOAD'] . '" title="' . $lang['L_TITLE_UPLOAD'] . '">';
|
||||
$icon['search'] = '<img src="'.$config['files']['iconpath'].'search.gif" alt="'.$lang['L_TITLE_SEARCH'].'" title="'.$lang['L_TITLE_SEARCH'].'">';
|
||||
$icon['mysql_help'] = '<img src="'.$config['files']['iconpath'].'mysql_help.gif" alt="'.$lang['L_TITLE_MYSQL_HELP'].'" title="'.$lang['L_TITLE_MYSQL_HELP'].'">';
|
||||
$icon['upload'] = '<img src="'.$config['files']['iconpath'].'openfile.gif" alt="'.$lang['L_TITLE_UPLOAD'].'" title="'.$lang['L_TITLE_UPLOAD'].'">';
|
||||
|
||||
//other pics
|
||||
$icon['logo']=$config['theme'] . 'pics/h1_logo.gif';
|
||||
|
||||
$icon['logo'] = $config['theme'].'pics/h1_logo.gif';
|
||||
|
@ -4,7 +4,7 @@
|
||||
MyOOS [Dumper]
|
||||
http://www.oos-shop.de/
|
||||
|
||||
Copyright (c) 2016 by the MyOOS Development Team.
|
||||
Copyright (c) 2013 - 2022 by the MyOOS Development Team.
|
||||
----------------------------------------------------------------------
|
||||
Based on:
|
||||
|
||||
@ -16,68 +16,68 @@
|
||||
Released under the GNU General Public License
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
if (!defined('MSD_VERSION')) die('No direct access.');
|
||||
if (!defined('MOD_VERSION')) {
|
||||
exit('No direct access.');
|
||||
}
|
||||
|
||||
function FilelisteCombo($fpath,$selected)
|
||||
function FilelisteCombo($fpath, $selected)
|
||||
{
|
||||
$r='<select name="selectfile">';
|
||||
$r.='<option value="" '.(($selected=="") ? "SELECTED":"").'></option>';
|
||||
$r = '<select name="selectfile">';
|
||||
$r .= '<option value="" '.(('' == $selected) ? 'SELECTED' : '').'></option>';
|
||||
|
||||
$dh=opendir($fpath);
|
||||
while (false!==($filename=readdir($dh)))
|
||||
{
|
||||
if ($filename!="."&&$filename!=".."&&!is_dir($fpath.$filename))
|
||||
{
|
||||
$r.='<option value="'.$filename.'" ';
|
||||
if ($filename==$selected) $r.=' SELECTED';
|
||||
$r.='>'.$filename.'</option>'."\n";
|
||||
}
|
||||
}
|
||||
$r.='</select>';
|
||||
return $r;
|
||||
$dh = opendir($fpath);
|
||||
while (false !== ($filename = readdir($dh))) {
|
||||
if ('.' != $filename && '..' != $filename && !is_dir($fpath.$filename)) {
|
||||
$r .= '<option value="'.$filename.'" ';
|
||||
if ($filename == $selected) {
|
||||
$r .= ' selected';
|
||||
}
|
||||
$r .= '>'.$filename.'</option>'."\n";
|
||||
}
|
||||
}
|
||||
$r .= '</select>';
|
||||
return $r;
|
||||
}
|
||||
|
||||
function sortierdatum($datum)
|
||||
{
|
||||
$p=explode(' ',$datum);
|
||||
$uhrzeit=$p[1];
|
||||
$p2=explode('.',$p[0]);
|
||||
$day=$p2[0];
|
||||
$month=$p2[1];
|
||||
$year=$p2[2];
|
||||
return $year.'.'.$month.'.'.$day.' '.$uhrzeit;
|
||||
$p = explode(' ', $datum);
|
||||
$uhrzeit = $p[1];
|
||||
$p2 = explode('.', $p[0]);
|
||||
$day = $p2[0];
|
||||
$month = $p2[1];
|
||||
$year = $p2[2];
|
||||
return $year.'.'.$month.'.'.$day.' '.$uhrzeit;
|
||||
}
|
||||
|
||||
function FileList($multi=0)
|
||||
function FileList($multi = 0)
|
||||
{
|
||||
global $config,$fpath,$lang,$databases,$href,$dbactiv,$action,$expand;
|
||||
global $config, $fpath, $lang, $databases, $href, $dbactiv, $action, $expand;
|
||||
|
||||
$files=Array();
|
||||
//Backup-Dateien
|
||||
$Theader=$lang['L_FM_FILES1'].' '.$lang['L_OF'].' "'.$dbactiv.'"';
|
||||
$akind=1;
|
||||
$Sum_Files=0;
|
||||
$dh=opendir($fpath);
|
||||
$fl="";
|
||||
$i=0;
|
||||
while (false!==($filename=readdir($dh)))
|
||||
{
|
||||
if ($filename!='.'&&$filename!='..'&&!is_dir($fpath.$filename))
|
||||
{
|
||||
$files[$i]['name']=$filename;
|
||||
$Sum_Files++;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
$files = [];
|
||||
//Backup-Dateien
|
||||
$Theader = $lang['L_FM_FILES1'].' '.$lang['L_OF'].' "'.$dbactiv.'"';
|
||||
$akind = 1;
|
||||
$Sum_Files = 0;
|
||||
$dh = opendir($fpath);
|
||||
$fl = '';
|
||||
$i = 0;
|
||||
while (false !== ($filename = readdir($dh))) {
|
||||
if ('.' != $filename && '..' != $filename && !is_dir($fpath.$filename)) {
|
||||
$files[$i]['name'] = $filename;
|
||||
++$Sum_Files;
|
||||
++$i;
|
||||
}
|
||||
}
|
||||
|
||||
$fl.='<div>'.$lang['L_FM_CHOOSE_FILE'].' ';
|
||||
$fl.='<span id="gd"> </span><br><br>';
|
||||
$fl .= '<div>'.$lang['L_FM_CHOOSE_FILE'].' ';
|
||||
$fl .= '<span id="gd"> </span><br><br>';
|
||||
|
||||
$fl.='<table class="bdr">';
|
||||
$fl.='<tr><td colspan="8" align="left"><strong>'.$Theader.'</strong></td><td colspan="3" align="right"></td></tr>';
|
||||
$fl .= '<table class="bdr">';
|
||||
$fl .= '<tr><td colspan="8" align="left"><strong>'.$Theader.'</strong></td><td colspan="3" align="right"></td></tr>';
|
||||
|
||||
//Tableheader
|
||||
$fl.='<tr class="thead"><th colspan="3">'.$lang['L_DB'].'</th>
|
||||
//Tableheader
|
||||
$fl .= '<tr class="thead"><th colspan="3">'.$lang['L_DB'].'</th>
|
||||
<th>gz</th>
|
||||
<th>Script</th>
|
||||
<th colspan="2">'.$lang['L_COMMENT'].'</th>
|
||||
@ -87,422 +87,400 @@ function FileList($multi=0)
|
||||
<th>'.$lang['L_FM_FILESIZE'].'</th>
|
||||
<th>'.$lang['L_ENCODING'].'</th></tr>';
|
||||
|
||||
$checkindex=$arrayindex=$gesamt=0;
|
||||
$db_summary_anzahl=Array();
|
||||
if (count($files)>0)
|
||||
{
|
||||
for($i=0;$i<sizeof($files);$i++)
|
||||
{
|
||||
// Dateigröße
|
||||
$size=filesize($fpath.$files[$i]['name']);
|
||||
$file_datum=date("d\.m\.Y H:i",filemtime($fpath.$files[$i]['name']));
|
||||
$checkindex = $arrayindex = $gesamt = 0;
|
||||
$db_summary_anzahl = [];
|
||||
if (count($files) > 0) {
|
||||
for ($i = 0; $i < sizeof($files); ++$i) {
|
||||
// Dateigröße
|
||||
$size = filesize($fpath.$files[$i]['name']);
|
||||
$file_datum = date("d\.m\.Y H:i", filemtime($fpath.$files[$i]['name']));
|
||||
|
||||
//statuszeile auslesen
|
||||
$sline='';
|
||||
//statuszeile auslesen
|
||||
$sline = '';
|
||||
|
||||
if (substr($files[$i]['name'],-3)=='.gz')
|
||||
{
|
||||
if ($config['zlib'])
|
||||
{
|
||||
$fp=gzopen($fpath.$files[$i]['name'],"r");
|
||||
$sline=gzgets($fp,40960);
|
||||
gzclose($fp);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$fp=fopen($fpath.$files[$i]['name'],"r");
|
||||
$sline=fgets($fp,5000);
|
||||
fclose($fp);
|
||||
}
|
||||
$statusline=ReadStatusline($sline);
|
||||
if ('.gz' == substr($files[$i]['name'], -3)) {
|
||||
if ($config['zlib']) {
|
||||
$fp = gzopen($fpath.$files[$i]['name'], 'r');
|
||||
$sline = gzgets($fp, 40960);
|
||||
gzclose($fp);
|
||||
}
|
||||
} else {
|
||||
$fp = fopen($fpath.$files[$i]['name'], 'r');
|
||||
$sline = fgets($fp, 5000);
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
$but=ExtractBUT($files[$i]['name']);
|
||||
if ($but=='') $but=$file_datum;
|
||||
$dbn=$statusline['dbname'];
|
||||
if ($dbn=='unknown') $dbn='~unknown'; // needed for sorting - place unknown files at the end
|
||||
//jetzt alle in ein Array packen
|
||||
if ($statusline['part']=='MP_0'||$statusline['part']=='')
|
||||
{
|
||||
$db_backups[$arrayindex]['name']=$files[$i]['name'];
|
||||
$db_backups[$arrayindex]['db']=$dbn;
|
||||
$db_backups[$arrayindex]['size']=$size;
|
||||
$db_backups[$arrayindex]['date']=$but;
|
||||
$db_backups[$arrayindex]['sort']=sortierdatum($but);
|
||||
$db_backups[$arrayindex]['tabellen']=$statusline['tables'];
|
||||
$db_backups[$arrayindex]['eintraege']=$statusline['records'];
|
||||
$db_backups[$arrayindex]['multipart']=0;
|
||||
$db_backups[$arrayindex]['kommentar']=$statusline['comment'];
|
||||
$db_backups[$arrayindex]['script']=($statusline['script']!='') ? $statusline['script'].'('.$statusline['scriptversion'].')':'';
|
||||
$db_backups[$arrayindex]['charset']=$statusline['charset'];
|
||||
$statusline = ReadStatusline($sline);
|
||||
|
||||
if (!isset($db_summary_last[$dbn])) $db_summary_last[$dbn]=$but;
|
||||
$db_summary_anzahl[$dbn]=(isset($db_summary_anzahl[$dbn])) ? $db_summary_anzahl[$dbn]+1:1;
|
||||
$db_summary_size[$dbn]=(isset($db_summary_size[$dbn])) ? $db_summary_size[$dbn]+$size:$size;
|
||||
if (sortierdatum($but)>sortierdatum($db_summary_last[$dbn])) $db_summary_last[$dbn]=$but;
|
||||
}
|
||||
else
|
||||
{
|
||||
//multipart nur einmal
|
||||
$done=0;
|
||||
if (!isset($db_summary_size[$dbn])) $db_summary_size[$dbn]=0;
|
||||
for($j=0;$j<$arrayindex;$j++)
|
||||
{
|
||||
if (isset($db_backups[$j]))
|
||||
{
|
||||
if (($db_backups[$j]['date']==$but)&&($db_backups[$j]['db']==$dbn))
|
||||
{
|
||||
$db_backups[$j]['multipart']++;
|
||||
$db_backups[$j]['size']+=$size;
|
||||
$db_summary_size[$dbn]+=$size;
|
||||
$done=1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($done==1) $arrayindex--;
|
||||
$but = ExtractBUT($files[$i]['name']);
|
||||
if ('' == $but) {
|
||||
$but = $file_datum;
|
||||
}
|
||||
$dbn = $statusline['dbname'];
|
||||
if ('unknown' == $dbn) {
|
||||
$dbn = '~unknown';
|
||||
} // needed for sorting - place unknown files at the end
|
||||
//jetzt alle in ein Array packen
|
||||
if ('MP_0' == $statusline['part'] || '' == $statusline['part']) {
|
||||
$db_backups[$arrayindex]['name'] = $files[$i]['name'];
|
||||
$db_backups[$arrayindex]['db'] = $dbn;
|
||||
$db_backups[$arrayindex]['size'] = $size;
|
||||
$db_backups[$arrayindex]['date'] = $but;
|
||||
$db_backups[$arrayindex]['sort'] = sortierdatum($but);
|
||||
$db_backups[$arrayindex]['tabellen'] = $statusline['tables'];
|
||||
$db_backups[$arrayindex]['eintraege'] = $statusline['records'];
|
||||
$db_backups[$arrayindex]['multipart'] = 0;
|
||||
$db_backups[$arrayindex]['kommentar'] = $statusline['comment'];
|
||||
$db_backups[$arrayindex]['script'] = ('' != $statusline['script']) ? $statusline['script'].'('.$statusline['scriptversion'].')' : '';
|
||||
$db_backups[$arrayindex]['charset'] = $statusline['charset'];
|
||||
|
||||
if ($done==0)
|
||||
{
|
||||
//Eintrag war noch nicht vorhanden
|
||||
$db_backups[$arrayindex]['name']=$files[$i]['name'];
|
||||
$db_backups[$arrayindex]['db']=$dbn;
|
||||
$db_backups[$arrayindex]['size']=$size;
|
||||
$db_backups[$arrayindex]['date']=$but;
|
||||
$db_backups[$arrayindex]['sort']=sortierdatum($but);
|
||||
$db_backups[$arrayindex]['tabellen']=$statusline['tables'];
|
||||
$db_backups[$arrayindex]['eintraege']=$statusline['records'];
|
||||
$db_backups[$arrayindex]['multipart']=1;
|
||||
$db_backups[$arrayindex]['kommentar']=$statusline['comment'];
|
||||
$db_backups[$arrayindex]['script']=($statusline['script']!="") ? $statusline['script']."(".$statusline['scriptversion'].")":"";
|
||||
$db_backups[$arrayindex]['charset']=$statusline['charset'];
|
||||
if (!isset($db_summary_last[$dbn])) {
|
||||
$db_summary_last[$dbn] = $but;
|
||||
}
|
||||
$db_summary_anzahl[$dbn] = (isset($db_summary_anzahl[$dbn])) ? $db_summary_anzahl[$dbn] + 1 : 1;
|
||||
$db_summary_size[$dbn] = (isset($db_summary_size[$dbn])) ? $db_summary_size[$dbn] + $size : $size;
|
||||
if (sortierdatum($but) > sortierdatum($db_summary_last[$dbn])) {
|
||||
$db_summary_last[$dbn] = $but;
|
||||
}
|
||||
} else {
|
||||
//multipart nur einmal
|
||||
$done = 0;
|
||||
if (!isset($db_summary_size[$dbn])) {
|
||||
$db_summary_size[$dbn] = 0;
|
||||
}
|
||||
for ($j = 0; $j < $arrayindex; ++$j) {
|
||||
if (isset($db_backups[$j])) {
|
||||
if (($db_backups[$j]['date'] == $but) && ($db_backups[$j]['db'] == $dbn)) {
|
||||
++$db_backups[$j]['multipart'];
|
||||
$db_backups[$j]['size'] += $size;
|
||||
$db_summary_size[$dbn] += $size;
|
||||
$done = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (1 == $done) {
|
||||
--$arrayindex;
|
||||
}
|
||||
|
||||
if (!isset($db_summary_last[$dbn])) $db_summary_last[$dbn]=$but;
|
||||
$db_summary_anzahl[$dbn]=(isset($db_summary_anzahl[$dbn])) ? $db_summary_anzahl[$dbn]+1:1;
|
||||
$db_summary_size[$dbn]=(isset($db_summary_size[$dbn])) ? $db_summary_size[$dbn]+$size:$size;
|
||||
if (sortierdatum($but)>sortierdatum($db_summary_last[$dbn])) $db_summary_last[$dbn]=$but;
|
||||
if (0 == $done) {
|
||||
//Eintrag war noch nicht vorhanden
|
||||
$db_backups[$arrayindex]['name'] = $files[$i]['name'];
|
||||
$db_backups[$arrayindex]['db'] = $dbn;
|
||||
$db_backups[$arrayindex]['size'] = $size;
|
||||
$db_backups[$arrayindex]['date'] = $but;
|
||||
$db_backups[$arrayindex]['sort'] = sortierdatum($but);
|
||||
$db_backups[$arrayindex]['tabellen'] = $statusline['tables'];
|
||||
$db_backups[$arrayindex]['eintraege'] = $statusline['records'];
|
||||
$db_backups[$arrayindex]['multipart'] = 1;
|
||||
$db_backups[$arrayindex]['kommentar'] = $statusline['comment'];
|
||||
$db_backups[$arrayindex]['script'] = ('' != $statusline['script']) ? $statusline['script'].'('.$statusline['scriptversion'].')' : '';
|
||||
$db_backups[$arrayindex]['charset'] = $statusline['charset'];
|
||||
|
||||
}
|
||||
}
|
||||
// Gesamtgroesse aller Backupfiles
|
||||
$arrayindex++;
|
||||
$gesamt=$gesamt+$size;
|
||||
}
|
||||
}
|
||||
//Schleife fertig - jetzt Ausgabe
|
||||
if ((isset($db_backups))&&(is_array($db_backups))) $db_backups=mu_sort($db_backups,'sort,name');
|
||||
if (!isset($db_summary_last[$dbn])) {
|
||||
$db_summary_last[$dbn] = $but;
|
||||
}
|
||||
$db_summary_anzahl[$dbn] = (isset($db_summary_anzahl[$dbn])) ? $db_summary_anzahl[$dbn] + 1 : 1;
|
||||
$db_summary_size[$dbn] = (isset($db_summary_size[$dbn])) ? $db_summary_size[$dbn] + $size : $size;
|
||||
if (sortierdatum($but) > sortierdatum($db_summary_last[$dbn])) {
|
||||
$db_summary_last[$dbn] = $but;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Gesamtgroesse aller Backupfiles
|
||||
++$arrayindex;
|
||||
$gesamt = $gesamt + $size;
|
||||
}
|
||||
}
|
||||
//Schleife fertig - jetzt Ausgabe
|
||||
if ((isset($db_backups)) && (is_array($db_backups))) {
|
||||
$db_backups = mu_sort($db_backups, 'sort,name');
|
||||
}
|
||||
|
||||
// Hier werden die Dateinamen ausgegeben
|
||||
$rowclass=0;
|
||||
if ($arrayindex>0)
|
||||
{
|
||||
for($i=$arrayindex;$i>=0;$i--)
|
||||
{
|
||||
if (isset($db_backups[$i]['db'])&&$db_backups[$i]['db']==$dbactiv)
|
||||
{
|
||||
$cl=($rowclass%2) ? 'dbrow':'dbrow1';
|
||||
$multi=($db_summary_anzahl[$dbactiv]>1&&$action=='files') ? 1:0;
|
||||
// Hier werden die Dateinamen ausgegeben
|
||||
$rowclass = 0;
|
||||
if ($arrayindex > 0) {
|
||||
for ($i = $arrayindex; $i >= 0; --$i) {
|
||||
if (isset($db_backups[$i]['db']) && $db_backups[$i]['db'] == $dbactiv) {
|
||||
$cl = ($rowclass % 2) ? 'dbrow' : 'dbrow1';
|
||||
$multi = ($db_summary_anzahl[$dbactiv] > 1 && 'files' == $action) ? 1 : 0;
|
||||
|
||||
if ($db_backups[$i]['multipart']>0)
|
||||
{
|
||||
$dbn=NextPart($db_backups[$i]['name'],1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$dbn=$db_backups[$i]['name'];
|
||||
}
|
||||
$fl.='<tr ';
|
||||
$fl.='class="'.(($rowclass%2) ? 'dbrow"':'dbrow1"');
|
||||
$fl.='>';
|
||||
$fl.='<td align="left" colspan="2" nowrap="nowrap">';
|
||||
$fl.='<input type="hidden" name="multi" value="'.$multi.'">';
|
||||
if ($db_backups[$i]['multipart'] > 0) {
|
||||
$dbn = NextPart($db_backups[$i]['name'], 1);
|
||||
} else {
|
||||
$dbn = $db_backups[$i]['name'];
|
||||
}
|
||||
$fl .= '<tr ';
|
||||
$fl .= 'class="'.(($rowclass % 2) ? 'dbrow"' : 'dbrow1"');
|
||||
$fl .= '>';
|
||||
$fl .= '<td align="left" colspan="2" nowrap="nowrap">';
|
||||
$fl .= '<input type="hidden" name="multi" value="'.$multi.'">';
|
||||
|
||||
if ($multi==0)
|
||||
{
|
||||
$fl.='<input type="hidden" name="multipart[]" value="'.$db_backups[$i]['multipart'].'"><input name="file[]" type="radio" class="radio" value="'.$dbn.'" onClick="Check('.$checkindex++.',0);">';
|
||||
}
|
||||
else
|
||||
{
|
||||
$fl.='<input type="hidden" name="multipart[]" value="'.$db_backups[$i]['multipart'].'"><input name="file[]" type="checkbox" class="checkbox" value="'.$dbn.'" onClick="Check('.$checkindex++.',1);">';
|
||||
}
|
||||
if (0 == $multi) {
|
||||
$fl .= '<input type="hidden" name="multipart[]" value="'.$db_backups[$i]['multipart'].'"><input name="file[]" type="radio" class="radio" value="'.$dbn.'" onClick="Check('.$checkindex++.',0);">';
|
||||
} else {
|
||||
$fl .= '<input type="hidden" name="multipart[]" value="'.$db_backups[$i]['multipart'].'"><input name="file[]" type="checkbox" class="checkbox" value="'.$dbn.'" onClick="Check('.$checkindex++.',1);">';
|
||||
}
|
||||
|
||||
if ($db_backups[$i]['multipart']==0)
|
||||
{
|
||||
$fl.=' <a href="'.$fpath.urlencode($dbn).'" title="Backupfile: '.$dbn.'" style="font-size:8pt;" target="_blank">';
|
||||
$fl.=(($db_backups[$i]['db']=='~unknown') ? $dbn:$db_backups[$i]['db']).'</a></td>';
|
||||
$fl.='<td><a href="filemanagement.php?action=dl&f='.urlencode($dbn).'" title="'.$lang['L_DOWNLOAD_FILE'].'" alt="'.$lang['L_DOWNLOAD_FILE'].'"><img src="'.$config['files']['iconpath'].'/openfile.gif"></a></td>';
|
||||
}
|
||||
else
|
||||
$fl.=' <span style="font-size:8pt;">'.$db_backups[$i]['db'].'</span><td> </td></td>';
|
||||
if (0 == $db_backups[$i]['multipart']) {
|
||||
$fl .= ' <a href="'.$fpath.urlencode($dbn).'" title="Backupfile: '.$dbn.'" style="font-size:8pt;" target="_blank">';
|
||||
$fl .= (('~unknown' == $db_backups[$i]['db']) ? $dbn : $db_backups[$i]['db']).'</a></td>';
|
||||
$fl .= '<td><a href="filemanagement.php?action=dl&f='.urlencode($dbn).'" title="'.$lang['L_DOWNLOAD_FILE'].'" alt="'.$lang['L_DOWNLOAD_FILE'].'"><img src="'.$config['files']['iconpath'].'/openfile.gif"></a></td>';
|
||||
} else {
|
||||
$fl .= ' <span style="font-size:8pt;">'.$db_backups[$i]['db'].'</span><td> </td></td>';
|
||||
}
|
||||
|
||||
$fl.='<td class="sm" nowrap="nowrap" align="center">'.((substr($dbn,-3)==".gz") ? '<img src="'.$config['files']['iconpath'].'gz.gif" alt="'.$lang['L_COMPRESSED'].'" width="16" height="16" border="0">':" ").'</td>';
|
||||
$fl.='<td class="sm" nowrap="nowrap" align="center">'.$db_backups[$i]['script'].'</td>';
|
||||
$fl.='<td class="sm" nowrap="nowrap" align="right">'.(($db_backups[$i]['kommentar']!="") ? '<img src="'.$config['files']['iconpath'].'rename.gif" alt="'.$db_backups[$i]['kommentar'].'" title="'.$db_backups[$i]['kommentar'].'" width="16" height="16" border="0">':" ").'</td>';
|
||||
$fl.='<td class="sm" nowrap="nowrap" align="left">'.(($db_backups[$i]['kommentar']!="") ? nl2br(wordwrap($db_backups[$i]['kommentar'],50)):" ").'</td>';
|
||||
$fl .= '<td class="sm" nowrap="nowrap" align="center">'.(('.gz' == substr($dbn, -3)) ? '<img src="'.$config['files']['iconpath'].'gz.gif" alt="'.$lang['L_COMPRESSED'].'" width="16" height="16" border="0">' : ' ').'</td>';
|
||||
$fl .= '<td class="sm" nowrap="nowrap" align="center">'.$db_backups[$i]['script'].'</td>';
|
||||
$fl .= '<td class="sm" nowrap="nowrap" align="right">'.(('' != $db_backups[$i]['kommentar']) ? '<img src="'.$config['files']['iconpath'].'rename.gif" alt="'.$db_backups[$i]['kommentar'].'" title="'.$db_backups[$i]['kommentar'].'" width="16" height="16" border="0">' : ' ').'</td>';
|
||||
$fl .= '<td class="sm" nowrap="nowrap" align="left">'.(('' != $db_backups[$i]['kommentar']) ? nl2br(wordwrap($db_backups[$i]['kommentar'], 50)) : ' ').'</td>';
|
||||
|
||||
$fl.='<td class="sm" nowrap="nowrap">'.$db_backups[$i]['date'].'</td>';
|
||||
$fl.='<td style="text-align:center">';
|
||||
$fl.=($db_backups[$i]['multipart']==0) ? $lang['L_NO']:'<a style="font-size:11px;" href="filemanagement.php?action=files&kind=0&dbactiv='.$dbactiv.'&expand='.$i.'">'.$db_backups[$i]['multipart'].' Files</a>'; //
|
||||
$fl.='</td><td style="text-align:right;padding-right:12px;" nowrap="nowrap">';
|
||||
$fl.=($db_backups[$i]['eintraege']!=-1) ? $db_backups[$i]['tabellen'].' / '.number_format($db_backups[$i]['eintraege'],0,",","."):$lang['L_FM_OLDBACKUP'];
|
||||
$fl.='</td>';
|
||||
$fl.='<td style="font-size:8pt;text-align:right">'.byte_output($db_backups[$i]['size']).'</td>';
|
||||
$fl.='<td style="font-size:8pt;text-align:right">'.$db_backups[$i]['charset'].'</td>';
|
||||
$fl.='</tr>';
|
||||
$fl .= '<td class="sm" nowrap="nowrap">'.$db_backups[$i]['date'].'</td>';
|
||||
$fl .= '<td style="text-align:center">';
|
||||
$fl .= (0 == $db_backups[$i]['multipart']) ? $lang['L_NO'] : '<a style="font-size:11px;" href="filemanagement.php?action=files&kind=0&dbactiv='.$dbactiv.'&expand='.$i.'">'.$db_backups[$i]['multipart'].' Files</a>';
|
||||
$fl .= '</td><td style="text-align:right;padding-right:12px;" nowrap="nowrap">';
|
||||
$fl .= (-1 != $db_backups[$i]['eintraege']) ? $db_backups[$i]['tabellen'].' / '.number_format($db_backups[$i]['eintraege'], 0, ',', '.') : $lang['L_FM_OLDBACKUP'];
|
||||
$fl .= '</td>';
|
||||
$fl .= '<td style="font-size:8pt;text-align:right">'.byte_output($db_backups[$i]['size']).'</td>';
|
||||
$fl .= '<td style="font-size:8pt;text-align:right">'.$db_backups[$i]['charset'].'</td>';
|
||||
$fl .= '</tr>';
|
||||
|
||||
if ($expand==$i)
|
||||
{
|
||||
$fl.='<tr '.(($dbactiv==$databases['db_actual']) ? 'class="dbrowsel"':'class="'.$cl.'"').'>';
|
||||
$fl.='<td class="sm" valign="top">All Parts:</td><td class="sm" colspan="11" align="left">'.PartListe($db_backups[$i]['name'],$db_backups[$i]['multipart']).'</td>';
|
||||
}
|
||||
$rowclass++;
|
||||
}
|
||||
}
|
||||
}
|
||||
//v($db_backups);
|
||||
$fl.='<tr><td colspan="11" align="left"><br><strong>'.$lang['L_FM_ALL_BU'].'</strong></td></tr>';
|
||||
//Tableheader
|
||||
$fl.='<tr class="thead"><th colspan="5" align="left">'.$lang['L_FM_DBNAME'].'</th>
|
||||
if ($expand == $i) {
|
||||
$fl .= '<tr '.(($dbactiv == $databases['db_actual']) ? 'class="dbrowsel"' : 'class="'.$cl.'"').'>';
|
||||
$fl .= '<td class="sm" valign="top">All Parts:</td><td class="sm" colspan="11" align="left">'.PartListe($db_backups[$i]['name'], $db_backups[$i]['multipart']).'</td>';
|
||||
}
|
||||
++$rowclass;
|
||||
}
|
||||
}
|
||||
}
|
||||
//v($db_backups);
|
||||
$fl .= '<tr><td colspan="11" align="left"><br><strong>'.$lang['L_FM_ALL_BU'].'</strong></td></tr>';
|
||||
//Tableheader
|
||||
$fl .= '<tr class="thead"><th colspan="5" align="left">'.$lang['L_FM_DBNAME'].'</th>
|
||||
<th align="left">'.$lang['L_FM_ANZ_BU'].'</th><th>'.$lang['L_FM_LAST_BU'].'</th>
|
||||
<th colspan="5" style="text-align:right;">'.$lang['L_FM_TOTALSIZE'].'</th></tr>';
|
||||
//die anderen Backups
|
||||
if (count($db_summary_anzahl)>0)
|
||||
{
|
||||
//lets sort the list
|
||||
ksort($db_summary_last);
|
||||
ksort($db_summary_anzahl);
|
||||
ksort($db_summary_size);
|
||||
//die anderen Backups
|
||||
if (count($db_summary_anzahl) > 0) {
|
||||
//lets sort the list
|
||||
ksort($db_summary_last);
|
||||
ksort($db_summary_anzahl);
|
||||
ksort($db_summary_size);
|
||||
|
||||
$i=0;
|
||||
while (list ($key,$val)=each($db_summary_anzahl))
|
||||
{
|
||||
$cl=($i++%2) ? "dbrow":"dbrow1";
|
||||
$keyaus=($key=="~unknown") ? '<em>'.$lang['L_NO_MSD_BACKUPFILE'].'</em>':$key;
|
||||
$fl.='<tr class="'.$cl.'"><td colspan="5" align="left"><a href="'.$href.'&dbactiv='.$key.'">'.$keyaus.'</a></td>';
|
||||
$fl.='<td style="text-align:right">'.$val.' </td>';
|
||||
$fl.='<td class="sm" nowrap="nowrap">'.((isset($db_summary_last[$key])) ? $db_summary_last[$key]:'').'</td>';
|
||||
$fl.='<td style="text-align:right;font-size:8pt;" colspan="5">'.byte_output($db_summary_size[$key]).' </td>';
|
||||
$fl.='</tr>';
|
||||
}
|
||||
}
|
||||
if (!is_array($files)) $fl.='<tr><td colspan="11">'.$lang['L_FM_NOFILESFOUND'].'</td></tr>';
|
||||
$i = 0;
|
||||
foreach ($db_summary_anzahl as $key => $val) {
|
||||
$cl = ($i++ % 2) ? 'dbrow' : 'dbrow1';
|
||||
$keyaus = ('~unknown' == $key) ? '<em>'.$lang['L_NO_MOD_BACKUPFILE'].'</em>' : $key;
|
||||
$fl .= '<tr class="'.$cl.'"><td colspan="5" align="left"><a href="'.$href.'&dbactiv='.$key.'">'.$keyaus.'</a></td>';
|
||||
$fl .= '<td style="text-align:right">'.$val.' </td>';
|
||||
$fl .= '<td class="sm" nowrap="nowrap">'.((isset($db_summary_last[$key])) ? $db_summary_last[$key] : '').'</td>';
|
||||
$fl .= '<td style="text-align:right;font-size:8pt;" colspan="5">'.byte_output($db_summary_size[$key]).' </td>';
|
||||
$fl .= '</tr>';
|
||||
}
|
||||
}
|
||||
if (!is_array($files)) {
|
||||
$fl .= '<tr><td colspan="11">'.$lang['L_FM_NOFILESFOUND'].'</td></tr>';
|
||||
}
|
||||
|
||||
//--------------------------------------------------------
|
||||
//*** Ausgabe der Gesamtgröße aller Backupfiles ***
|
||||
//--------------------------------------------------------
|
||||
$space=MD_FreeDiskSpace();
|
||||
$fl.='<tr>';
|
||||
$fl.='<td align="left" colspan="8"><b>'.$lang['L_FM_TOTALSIZE'].' ('.$Sum_Files.' files): </b> </td>';
|
||||
$fl.='<td style="text-align:right" colspan="4"><b>'.byte_output($gesamt).'</b></td>';
|
||||
$fl.='</tr>';
|
||||
//--------------------------------------------------------
|
||||
//*** Ausgabe der Gesamtgröße aller Backupfiles ***
|
||||
//--------------------------------------------------------
|
||||
$space = MD_FreeDiskSpace();
|
||||
$fl .= '<tr>';
|
||||
$fl .= '<td align="left" colspan="8"><b>'.$lang['L_FM_TOTALSIZE'].' ('.$Sum_Files.' files): </b> </td>';
|
||||
$fl .= '<td style="text-align:right" colspan="4"><b>'.byte_output($gesamt).'</b></td>';
|
||||
$fl .= '</tr>';
|
||||
|
||||
//--------------------------------------------------------
|
||||
//*** Ausgabe des freien Speicher auf dem Rechner ***
|
||||
//--------------------------------------------------------
|
||||
$fl.='<tr>';
|
||||
$fl.='<td colspan="8" align="left">'.$lang['L_FM_FREESPACE'].': </td>';
|
||||
$fl.='<td colspan="4" style="text-align:right"><b>'.$space.'</b></td>';
|
||||
$fl.='</tr>';
|
||||
$fl.='</table></div>';
|
||||
//--------------------------------------------------------
|
||||
//*** Ausgabe des freien Speicher auf dem Rechner ***
|
||||
//--------------------------------------------------------
|
||||
$fl .= '<tr>';
|
||||
$fl .= '<td colspan="8" align="left">'.$lang['L_FM_FREESPACE'].': </td>';
|
||||
$fl .= '<td colspan="4" style="text-align:right"><b>'.$space.'</b></td>';
|
||||
$fl .= '</tr>';
|
||||
$fl .= '</table></div>';
|
||||
|
||||
return $fl;
|
||||
return $fl;
|
||||
}
|
||||
|
||||
function read_statusline_from_file($filename)
|
||||
{
|
||||
global $config;
|
||||
if (strtolower(substr($filename,-2))=='gz')
|
||||
{
|
||||
$fp=gzopen($config['paths']['backup'].$filename,"r");
|
||||
if ($fp===false) die('Can\'t open file '.$filename);
|
||||
$sline=gzgets($fp,40960);
|
||||
gzclose($fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
$fp=fopen($config['paths']['backup'].$filename,"r");
|
||||
if ($fp===false) die('Can\'t open file '.$filename);
|
||||
$sline=fgets($fp,5000);
|
||||
fclose($fp);
|
||||
}
|
||||
$statusline=ReadStatusline($sline);
|
||||
return $statusline;
|
||||
global $config;
|
||||
if ('gz' == strtolower(substr($filename, -2))) {
|
||||
$fp = gzopen($config['paths']['backup'].$filename, 'r');
|
||||
if (false === $fp) {
|
||||
exit('Can\'t open file '.$filename);
|
||||
}
|
||||
$sline = gzgets($fp, 40960);
|
||||
gzclose($fp);
|
||||
} else {
|
||||
$fp = fopen($config['paths']['backup'].$filename, 'r');
|
||||
if (false === $fp) {
|
||||
exit('Can\'t open file '.$filename);
|
||||
}
|
||||
$sline = fgets($fp, 5000);
|
||||
fclose($fp);
|
||||
}
|
||||
$statusline = ReadStatusline($sline);
|
||||
return $statusline;
|
||||
}
|
||||
|
||||
function PartListe($f,$nr)
|
||||
function PartListe($f, $nr)
|
||||
{
|
||||
global $config,$lang,$fpath;
|
||||
$dateistamm=substr($f,0,strrpos($f,"part_"))."part_";
|
||||
$dateiendung=(substr(strtolower($f),-2)=="gz") ? ".sql.gz":".sql";
|
||||
$s="";
|
||||
for($i=1;$i<=$nr;$i++)
|
||||
{
|
||||
if ($i>1) $s.="<br>";
|
||||
$s.='<a href="'.$fpath.urlencode($dateistamm.$i.$dateiendung).'">'.$dateistamm.$i.$dateiendung.'</a> '.byte_output(@filesize($config['paths']['backup'].$dateistamm.$i.$dateiendung));
|
||||
$s.=' <a href="filemanagement.php?action=dl&f='.urlencode($dateistamm.$i.$dateiendung).'" title="'.$lang['L_DOWNLOAD_FILE'].'" alt="'.$lang['L_DOWNLOAD_FILE'].'"><img src="'.$config['files']['iconpath'].'/openfile.gif"></a>';
|
||||
|
||||
}
|
||||
return $s;
|
||||
global $config, $lang, $fpath;
|
||||
$dateistamm = substr($f, 0, strrpos($f, 'part_')).'part_';
|
||||
$dateiendung = ('gz' == substr(strtolower($f), -2)) ? '.sql.gz' : '.sql';
|
||||
$s = '';
|
||||
for ($i = 1; $i <= $nr; ++$i) {
|
||||
if ($i > 1) {
|
||||
$s .= '<br>';
|
||||
}
|
||||
$s .= '<a href="'.$fpath.urlencode($dateistamm.$i.$dateiendung).'">'.$dateistamm.$i.$dateiendung.'</a> '.byte_output(@filesize($config['paths']['backup'].$dateistamm.$i.$dateiendung));
|
||||
$s .= ' <a href="filemanagement.php?action=dl&f='.urlencode($dateistamm.$i.$dateiendung).'" title="'.$lang['L_DOWNLOAD_FILE'].'" alt="'.$lang['L_DOWNLOAD_FILE'].'"><img src="'.$config['files']['iconpath'].'/openfile.gif"></a>';
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
|
||||
function Converter($filesource,$filedestination,$cp)
|
||||
function Converter($filesource, $filedestination, $cp)
|
||||
{
|
||||
global $config,$lang;
|
||||
global $config, $lang;
|
||||
|
||||
$filesize=0;
|
||||
$max_filesize=1024*1024*10; //10 MB splitsize
|
||||
$part=1;
|
||||
$cps=(substr(strtolower($filesource),-2)=="gz") ? 1:0;
|
||||
$filedestination.='_'.date("Y_m_d_H_i",time());
|
||||
echo "<h5>".sprintf($lang['L_CONVERT_FILEREAD'],$filesource).".....</h5><span style=\"font-size:10px;\">";
|
||||
if (file_exists($config['paths']['backup'].$filedestination)) unlink($config['paths']['backup'].$filedestination);
|
||||
$f=($cps==1) ? gzopen($config['paths']['backup'].$filesource,"r"):fopen($config['paths']['backup'].$filesource,"r");
|
||||
$z=($cp==1) ? gzopen($config['paths']['backup'].$filedestination.'_part_1.sql.gz',"w"):fopen($config['paths']['backup'].$filedestination.'_part_1.sql',"w");
|
||||
$filesize = 0;
|
||||
$max_filesize = 1024 * 1024 * 10; //10 MB splitsize
|
||||
$part = 1;
|
||||
$cps = ('gz' == substr(strtolower($filesource), -2)) ? 1 : 0;
|
||||
$filedestination .= '_'.date('Y_m_d_H_i', time());
|
||||
echo '<h5>'.sprintf($lang['L_CONVERT_FILEREAD'], $filesource).'.....</h5><span style="font-size:10px;">';
|
||||
if (file_exists($config['paths']['backup'].$filedestination)) {
|
||||
unlink($config['paths']['backup'].$filedestination);
|
||||
}
|
||||
$f = (1 == $cps) ? gzopen($config['paths']['backup'].$filesource, 'r') : fopen($config['paths']['backup'].$filesource, 'r');
|
||||
$z = (1 == $cp) ? gzopen($config['paths']['backup'].$filedestination.'_part_1.sql.gz', 'w') : fopen($config['paths']['backup'].$filedestination.'_part_1.sql', 'w');
|
||||
|
||||
$zeile=get_pseudo_statusline($part,$filedestination)."\r\n";
|
||||
($cp==1) ? gzwrite($z,$zeile):fwrite($z,$zeile);
|
||||
$zeile='';
|
||||
$zeile = get_pseudo_statusline($part, $filedestination)."\r\n";
|
||||
(1 == $cp) ? gzwrite($z, $zeile) : fwrite($z, $zeile);
|
||||
$zeile = '';
|
||||
|
||||
$insert=$mode="";
|
||||
$n=0;
|
||||
$eof=($cps==1) ? gzeof($f):feof($f);
|
||||
$splitable=false; // can the file be splitted? Try to avoid splitting before a command is completed
|
||||
while (!$eof)
|
||||
{
|
||||
$eof=($cps==1) ? gzeof($f):feof($f);
|
||||
$zeile=($cps==1) ? gzgets($f,5144000):fgets($f,5144000);
|
||||
$insert = $mode = '';
|
||||
$n = 0;
|
||||
$eof = (1 == $cps) ? gzeof($f) : feof($f);
|
||||
$splitable = false; // can the file be splitted? Try to avoid splitting before a command is completed
|
||||
while (!$eof) {
|
||||
$eof = (1 == $cps) ? gzeof($f) : feof($f);
|
||||
$zeile = (1 == $cps) ? gzgets($f, 5144000) : fgets($f, 5144000);
|
||||
|
||||
$t=strtolower(substr($zeile,0,10));
|
||||
if ($t>'')
|
||||
{
|
||||
switch ($t)
|
||||
{
|
||||
case 'insert int':
|
||||
{
|
||||
// eine neue Insert Anweisung beginnt
|
||||
if (strpos($zeile,'(')===false)
|
||||
{
|
||||
//Feldnamen stehen in der naechsten Zeile - holen
|
||||
$zeile.="\n\r";
|
||||
$zeile.=($cps==1) ? trim(gzgets($f,8192)):trim(fgets($f,8192));
|
||||
$zeile.=' ';
|
||||
}
|
||||
$t = strtolower(substr($zeile, 0, 10));
|
||||
if ($t > '') {
|
||||
switch ($t) {
|
||||
case 'insert int':
|
||||
// eine neue Insert Anweisung beginnt
|
||||
if (false === strpos($zeile, '(')) {
|
||||
//Feldnamen stehen in der naechsten Zeile - holen
|
||||
$zeile .= "\n\r";
|
||||
$zeile .= (1 == $cps) ? trim(gzgets($f, 8192)) : trim(fgets($f, 8192));
|
||||
$zeile .= ' ';
|
||||
}
|
||||
|
||||
// get INSERT-Satement
|
||||
$insert=substr($zeile,0,strpos($zeile,'('));
|
||||
if (substr(strtoupper($insert),-7)!='VALUES ') $insert.=' VALUES ';
|
||||
$mode='insert';
|
||||
$zeile="\n\r".$zeile;
|
||||
$splitable=false;
|
||||
break;
|
||||
}
|
||||
// get INSERT-Satement
|
||||
$insert = substr($zeile, 0, strpos($zeile, '('));
|
||||
if ('VALUES ' != substr(strtoupper($insert), -7)) {
|
||||
$insert .= ' VALUES ';
|
||||
}
|
||||
$mode = 'insert';
|
||||
$zeile = "\n\r".$zeile;
|
||||
$splitable = false;
|
||||
break;
|
||||
|
||||
case 'create tab':
|
||||
{
|
||||
$mode='create';
|
||||
while (substr(rtrim($zeile),-1)!=';')
|
||||
{
|
||||
$zeile.=fgets($f,8192);
|
||||
}
|
||||
$zeile="\n\r".MySQL_Ticks($zeile)."\n\r";
|
||||
$splitable=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
case 'create tab':
|
||||
$mode = 'create';
|
||||
while (';' != substr(rtrim($zeile), -1)) {
|
||||
$zeile .= fgets($f, 8192);
|
||||
}
|
||||
$zeile = "\n\r".MySQLi_Ticks($zeile)."\n\r";
|
||||
$splitable = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode=='insert')
|
||||
{
|
||||
if (substr(rtrim($zeile),strlen($zeile)-3,2)==');') $splitable=true;
|
||||
if ('insert' == $mode) {
|
||||
if (');' == substr(rtrim($zeile), strlen($zeile) - 3, 2)) {
|
||||
$splitable = true;
|
||||
}
|
||||
|
||||
// Komma loeschen
|
||||
$zeile=str_replace('),(',");\n\r".$insert.' (',$zeile);
|
||||
}
|
||||
// Komma loeschen
|
||||
$zeile = str_replace('),(', ");\n\r".$insert.' (', $zeile);
|
||||
}
|
||||
|
||||
if ($splitable==true&&$filesize>$max_filesize) // start new file?
|
||||
{
|
||||
$part++;
|
||||
if ($mode=='insert') // Insert -> first complete Insert-Statement, then begin new file
|
||||
{
|
||||
if ($cp==1)
|
||||
{
|
||||
gzwrite($z,$zeile);
|
||||
gzclose($z);
|
||||
$z=gzopen($config['paths']['backup'].$filedestination.'_part_'.$part.'.sql.gz',"w");
|
||||
$zeile=get_pseudo_statusline($part,$filedestination)."\r\n";
|
||||
gzwrite($z,$zeile);
|
||||
$zeile='';
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite($z,$zeile);
|
||||
echo "<br>Neue Datei.Zeile: <br>".htmlspecialchars(substr($zeile,0,20))."..".htmlspecialchars(substr($zeile,strlen($zeile)-41,40))."<br>";
|
||||
fclose($z);
|
||||
$z=fopen($config['paths']['backup'].$filedestination.'_part_'.$part.'.sql',"w");
|
||||
$zeile=get_pseudo_statusline($part,$filedestination)."\r\n";
|
||||
gzwrite($z,$zeile);
|
||||
$zeile='';
|
||||
}
|
||||
}
|
||||
else // first close last file, then begin new one and write new beginning command
|
||||
{
|
||||
if ($cp==1)
|
||||
{
|
||||
gzclose($z);
|
||||
$z=gzopen($config['paths']['backup'].$filedestination.'_part_'.$part.'.sql.gz',"w");
|
||||
$zeile=get_pseudo_statusline($part,$filedestination)."\r\n".$zeile;
|
||||
gzwrite($z,$zeile);
|
||||
}
|
||||
else
|
||||
{
|
||||
fclose($z);
|
||||
$z=fopen($config['paths']['backup'].$filedestination.'_part_'.$part.'.sql',"w");
|
||||
$zeile=get_pseudo_statusline($part,$filedestination)."\r\n".$zeile;
|
||||
fwrite($z,$zeile);
|
||||
}
|
||||
}
|
||||
$filesize=0;
|
||||
$splitable=false;
|
||||
}
|
||||
else // no, append to actual file
|
||||
{
|
||||
$filesize+=strlen($zeile);
|
||||
if ($n>600)
|
||||
{
|
||||
$n=0;
|
||||
echo '<br>';
|
||||
}
|
||||
echo '.';
|
||||
if ($cps==1) gzwrite($z,$zeile);
|
||||
else
|
||||
fwrite($z,$zeile);
|
||||
flush();
|
||||
}
|
||||
$n++;
|
||||
//if ($part>4) break;
|
||||
}
|
||||
$zeile="\n-- EOB";
|
||||
if ($cps==1)
|
||||
{
|
||||
gzwrite($z,$zeile);
|
||||
gzclose($z);
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite($z,$zeile);
|
||||
fclose($z);
|
||||
}
|
||||
if (true == $splitable && $filesize > $max_filesize) { // start new file?
|
||||
++$part;
|
||||
if ('insert' == $mode) { // Insert -> first complete Insert-Statement, then begin new file
|
||||
if (1 == $cp) {
|
||||
gzwrite($z, $zeile);
|
||||
gzclose($z);
|
||||
$z = gzopen($config['paths']['backup'].$filedestination.'_part_'.$part.'.sql.gz', 'w');
|
||||
$zeile = get_pseudo_statusline($part, $filedestination)."\r\n";
|
||||
gzwrite($z, $zeile);
|
||||
$zeile = '';
|
||||
} else {
|
||||
fwrite($z, $zeile);
|
||||
echo '<br>Neue Datei.Zeile: <br>'.htmlspecialchars(substr($zeile, 0, 20)).'..'.htmlspecialchars(substr($zeile, strlen($zeile) - 41, 40)).'<br>';
|
||||
fclose($z);
|
||||
$z = fopen($config['paths']['backup'].$filedestination.'_part_'.$part.'.sql', 'w');
|
||||
$zeile = get_pseudo_statusline($part, $filedestination)."\r\n";
|
||||
gzwrite($z, $zeile);
|
||||
$zeile = '';
|
||||
}
|
||||
} else { // first close last file, then begin new one and write new beginning command
|
||||
if (1 == $cp) {
|
||||
gzclose($z);
|
||||
$z = gzopen($config['paths']['backup'].$filedestination.'_part_'.$part.'.sql.gz', 'w');
|
||||
$zeile = get_pseudo_statusline($part, $filedestination)."\r\n".$zeile;
|
||||
gzwrite($z, $zeile);
|
||||
} else {
|
||||
fclose($z);
|
||||
$z = fopen($config['paths']['backup'].$filedestination.'_part_'.$part.'.sql', 'w');
|
||||
$zeile = get_pseudo_statusline($part, $filedestination)."\r\n".$zeile;
|
||||
fwrite($z, $zeile);
|
||||
}
|
||||
}
|
||||
$filesize = 0;
|
||||
$splitable = false;
|
||||
} else { // no, append to actual file
|
||||
$filesize += strlen($zeile);
|
||||
if ($n > 600) {
|
||||
$n = 0;
|
||||
echo '<br>';
|
||||
}
|
||||
echo '.';
|
||||
if (1 == $cps) {
|
||||
gzwrite($z, $zeile);
|
||||
} else {
|
||||
fwrite($z, $zeile);
|
||||
}
|
||||
flush();
|
||||
}
|
||||
++$n;
|
||||
//if ($part>4) break;
|
||||
}
|
||||
$zeile = "\n-- EOB";
|
||||
if (1 == $cps) {
|
||||
gzwrite($z, $zeile);
|
||||
gzclose($z);
|
||||
} else {
|
||||
fwrite($z, $zeile);
|
||||
fclose($z);
|
||||
}
|
||||
|
||||
if ($cps==1) gzclose($f);
|
||||
else
|
||||
fclose($f);
|
||||
echo '</span><h5>'.sprintf($lang['L_CONVERT_FINISHED'],$filedestination).'</h5>';
|
||||
if (1 == $cps) {
|
||||
gzclose($f);
|
||||
} else {
|
||||
fclose($f);
|
||||
}
|
||||
echo '</span><h5>'.sprintf($lang['L_CONVERT_FINISHED'], $filedestination).'</h5>';
|
||||
}
|
||||
|
||||
function get_pseudo_statusline($part,$filedestination)
|
||||
function get_pseudo_statusline($part, $filedestination)
|
||||
{
|
||||
echo '<br>Continue with part: '.$part.'<br>';
|
||||
$ret='-- Status:-1:-1:MP_'.($part).':'.$filedestination.":php:converter2:converted:unknown:1:::latin1:EXTINFO\r\n"."-- TABLE-INFO\r\n"."-- TABLE|unknown|0|0|2009-01-24 20:39:39\r\n"."-- EOF TABLE-INFO\r\n";
|
||||
return $ret;
|
||||
echo '<br>Continue with part: '.$part.'<br>';
|
||||
$ret = '-- Status:-1:-1:MP_'.($part).':'.$filedestination.":php:converter2:converted:unknown:1:::latin1:EXTINFO\r\n"."-- TABLE-INFO\r\n"."-- TABLE|unknown|0|0|2009-01-24 20:39:39\r\n"."-- EOF TABLE-INFO\r\n";
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
MyOOS [Dumper]
|
||||
http://www.oos-shop.de/
|
||||
|
||||
Copyright (c) 2016 by the MyOOS Development Team.
|
||||
Copyright (c) 2013 - 2022 by the MyOOS Development Team.
|
||||
----------------------------------------------------------------------
|
||||
Based on:
|
||||
|
||||
@ -18,402 +18,401 @@
|
||||
|
||||
function CheckCSVOptions()
|
||||
{
|
||||
global $sql;
|
||||
if (!isset($sql['export']['trenn'])) $sql['export']['trenn']=";";
|
||||
if (!isset($sql['export']['enc'])) $sql['export']['enc']="\"";
|
||||
if (!isset($sql['export']['esc'])) $sql['export']['esc']="\\";
|
||||
if (!isset($sql['export']['ztrenn'])) $sql['export']['ztrenn']="\\r\\n";
|
||||
if (!isset($sql['export']['null'])) $sql['export']['null']="NULL";
|
||||
if (!isset($sql['export']['namefirstline'])) $sql['export']['namefirstline']=0;
|
||||
if (!isset($sql['export']['format'])) $sql['export']['format']=0;
|
||||
if (!isset($sql['export']['sendfile'])) $sql['export']['sendfile']=0;
|
||||
if (!isset($sql['export']['tables'])) $sql['export']['tables']=Array();
|
||||
if (!isset($sql['export']['compressed'])) $sql['export']['compressed']=0;
|
||||
if (!isset($sql['export']['htmlstructure'])) $sql['export']['htmlstructure']=0;
|
||||
if (!isset($sql['export']['xmlstructure'])) $sql['export']['xmlstructure']=0;
|
||||
|
||||
if (!isset($sql['import']['trenn'])) $sql['import']['trenn']=";";
|
||||
if (!isset($sql['import']['enc'])) $sql['import']['enc']="\"";
|
||||
if (!isset($sql['import']['esc'])) $sql['import']['esc']="\\";
|
||||
if (!isset($sql['import']['ztrenn'])) $sql['import']['ztrenn']="\\r\\n";
|
||||
if (!isset($sql['import']['null'])) $sql['import']['null']="NULL";
|
||||
if (!isset($sql['import']['namefirstline'])) $sql['import']['namefirstline']=0;
|
||||
if (!isset($sql['import']['format'])) $sql['import']['format']=0;
|
||||
global $sql;
|
||||
if (!isset($sql['export']['trenn'])) {
|
||||
$sql['export']['trenn'] = ';';
|
||||
}
|
||||
if (!isset($sql['export']['enc'])) {
|
||||
$sql['export']['enc'] = '"';
|
||||
}
|
||||
if (!isset($sql['export']['esc'])) {
|
||||
$sql['export']['esc'] = '\\';
|
||||
}
|
||||
if (!isset($sql['export']['ztrenn'])) {
|
||||
$sql['export']['ztrenn'] = '\\r\\n';
|
||||
}
|
||||
if (!isset($sql['export']['null'])) {
|
||||
$sql['export']['null'] = 'NULL';
|
||||
}
|
||||
if (!isset($sql['export']['namefirstline'])) {
|
||||
$sql['export']['namefirstline'] = 0;
|
||||
}
|
||||
if (!isset($sql['export']['format'])) {
|
||||
$sql['export']['format'] = 0;
|
||||
}
|
||||
if (!isset($sql['export']['sendfile'])) {
|
||||
$sql['export']['sendfile'] = 0;
|
||||
}
|
||||
if (!isset($sql['export']['tables'])) {
|
||||
$sql['export']['tables'] = [];
|
||||
}
|
||||
if (!isset($sql['export']['compressed'])) {
|
||||
$sql['export']['compressed'] = 0;
|
||||
}
|
||||
if (!isset($sql['export']['htmlstructure'])) {
|
||||
$sql['export']['htmlstructure'] = 0;
|
||||
}
|
||||
if (!isset($sql['export']['xmlstructure'])) {
|
||||
$sql['export']['xmlstructure'] = 0;
|
||||
}
|
||||
|
||||
if (!isset($sql['import']['trenn'])) {
|
||||
$sql['import']['trenn'] = ';';
|
||||
}
|
||||
if (!isset($sql['import']['enc'])) {
|
||||
$sql['import']['enc'] = '"';
|
||||
}
|
||||
if (!isset($sql['import']['esc'])) {
|
||||
$sql['import']['esc'] = '\\';
|
||||
}
|
||||
if (!isset($sql['import']['ztrenn'])) {
|
||||
$sql['import']['ztrenn'] = '\\r\\n';
|
||||
}
|
||||
if (!isset($sql['import']['null'])) {
|
||||
$sql['import']['null'] = 'NULL';
|
||||
}
|
||||
if (!isset($sql['import']['namefirstline'])) {
|
||||
$sql['import']['namefirstline'] = 0;
|
||||
}
|
||||
if (!isset($sql['import']['format'])) {
|
||||
$sql['import']['format'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
function ExportCSV()
|
||||
{
|
||||
global $sql,$config;
|
||||
$t="";
|
||||
$time_start=time();
|
||||
if (!isset($config['dbconnection'])) MSD_mysql_connect();
|
||||
for ($table=0; $table < count($sql['export']['tables']); $table++)
|
||||
{
|
||||
$sqlt="SHOW Fields FROM `" . $sql['export']['db'] . "`.`" . $sql['export']['tables'][$table] . "`;";
|
||||
$res=MSD_query($sqlt);
|
||||
if ($res)
|
||||
{
|
||||
$numfields=mysqli_num_rows($res);
|
||||
if ($sql['export']['namefirstline'] == 1)
|
||||
{
|
||||
for ($feld=0; $feld < $numfields; $feld++)
|
||||
{
|
||||
$row=mysqli_fetch_row($res);
|
||||
if ($sql['export']['enc'] != "") $t.=$sql['export']['enc'] . $row[0] . $sql['export']['enc'] . ( ( $feld + 1 < $numfields ) ? $sql['export']['trenn'] : '' );
|
||||
else $t.=$row[0] . ( ( $feld + 1 < $numfields ) ? $sql['export']['trenn'] : '' );
|
||||
}
|
||||
$t.=$sql['export']['endline'];
|
||||
$sql['export']['lines']++;
|
||||
}
|
||||
}
|
||||
$sqlt="SELECT * FROM `" . $sql['export']['db'] . "`.`" . $sql['export']['tables'][$table] . "`;";
|
||||
$res=MSD_query($sqlt);
|
||||
if ($res)
|
||||
{
|
||||
$numrows=mysqli_num_rows($res);
|
||||
for ($data=0; $data < $numrows; $data++)
|
||||
{
|
||||
$row=mysqli_fetch_row($res);
|
||||
for ($feld=0; $feld < $numfields; $feld++)
|
||||
{
|
||||
if (!isset($row[$feld]) || is_null($row[$feld]))
|
||||
{
|
||||
$t.=$sql['export']['null'];
|
||||
}
|
||||
elseif ($row[$feld] == '0' || $row[$feld] != '')
|
||||
{
|
||||
if ($sql['export']['enc'] != "") $t.=$sql['export']['enc'] . str_replace($sql['export']['enc'],$sql['export']['esc'] . $sql['export']['enc'],$row[$feld]) . $sql['export']['enc'];
|
||||
else $t.=$row[$feld];
|
||||
}
|
||||
else
|
||||
{
|
||||
$t.='';
|
||||
}
|
||||
$t.=( $feld + 1 < $numfields ) ? $sql['export']['trenn'] : '';
|
||||
}
|
||||
$t.=$sql['export']['endline'];
|
||||
$sql['export']['lines']++;
|
||||
if (strlen($t) > $config['memory_limit'])
|
||||
{
|
||||
CSVOutput($t);
|
||||
$t="";
|
||||
}
|
||||
$time_now=time();
|
||||
if ($time_start >= $time_now + 30)
|
||||
{
|
||||
$time_start=$time_now;
|
||||
header('X-MSDPing: Pong');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
CSVOutput($t,1);
|
||||
global $sql, $config;
|
||||
$t = '';
|
||||
$time_start = time();
|
||||
if (!isset($config['dbconnection'])) {
|
||||
mod_mysqli_connect();
|
||||
}
|
||||
for ($table = 0; $table < count($sql['export']['tables']); ++$table) {
|
||||
$sqlt = 'SHOW Fields FROM `'.$sql['export']['db'].'`.`'.$sql['export']['tables'][$table].'`;';
|
||||
$res = mod_query($sqlt);
|
||||
if ($res) {
|
||||
$numfields = mysqli_num_rows($res);
|
||||
if (1 == $sql['export']['namefirstline']) {
|
||||
for ($feld = 0; $feld < $numfields; ++$feld) {
|
||||
$row = mysqli_fetch_row($res);
|
||||
if ('' != $sql['export']['enc']) {
|
||||
$t .= $sql['export']['enc'].$row[0].$sql['export']['enc'].(($feld + 1 < $numfields) ? $sql['export']['trenn'] : '');
|
||||
} else {
|
||||
$t .= $row[0].(($feld + 1 < $numfields) ? $sql['export']['trenn'] : '');
|
||||
}
|
||||
}
|
||||
$t .= $sql['export']['endline'];
|
||||
++$sql['export']['lines'];
|
||||
}
|
||||
}
|
||||
$sqlt = 'SELECT * FROM `'.$sql['export']['db'].'`.`'.$sql['export']['tables'][$table].'`;';
|
||||
$res = mod_query($sqlt);
|
||||
if ($res) {
|
||||
$numrows = mysqli_num_rows($res);
|
||||
for ($data = 0; $data < $numrows; ++$data) {
|
||||
$row = mysqli_fetch_row($res);
|
||||
for ($feld = 0; $feld < $numfields; ++$feld) {
|
||||
if (!isset($row[$feld]) || is_null($row[$feld])) {
|
||||
$t .= $sql['export']['null'];
|
||||
} elseif ('0' == $row[$feld] || '' != $row[$feld]) {
|
||||
if ('' != $sql['export']['enc']) {
|
||||
$t .= $sql['export']['enc'].str_replace($sql['export']['enc'], $sql['export']['esc'].$sql['export']['enc'], $row[$feld]).$sql['export']['enc'];
|
||||
} else {
|
||||
$t .= $row[$feld];
|
||||
}
|
||||
} else {
|
||||
$t .= '';
|
||||
}
|
||||
$t .= ($feld + 1 < $numfields) ? $sql['export']['trenn'] : '';
|
||||
}
|
||||
$t .= $sql['export']['endline'];
|
||||
++$sql['export']['lines'];
|
||||
if ('' == $config['memory_limit']) {
|
||||
$config['memory_limit'] = 0;
|
||||
}
|
||||
if (strlen($t) > $config['memory_limit']) {
|
||||
CSVOutput($t);
|
||||
$t = '';
|
||||
}
|
||||
$time_now = time();
|
||||
if ($time_start >= $time_now + 30) {
|
||||
$time_start = $time_now;
|
||||
header('X-MODPing: Pong');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
CSVOutput($t, 1);
|
||||
}
|
||||
|
||||
function CSVOutput($str, $last=0)
|
||||
function CSVOutput($str, $last = 0)
|
||||
{
|
||||
global $sql,$config;
|
||||
if ($sql['export']['sendfile'] == 0)
|
||||
{
|
||||
//Display
|
||||
echo $str;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($sql['export']['header_sent'] == "")
|
||||
{
|
||||
if ($sql['export']['compressed'] == 1 & !function_exists('gzencode')) $sql['export']['compressed']=0;
|
||||
if ($sql['export']['format'] < 4)
|
||||
{
|
||||
$file=$sql['export']['db'] . ( ( $sql['export']['compressed'] == 1 ) ? ".csv.gz" : ".csv" );
|
||||
}
|
||||
elseif ($sql['export']['format'] == 4)
|
||||
{
|
||||
$file=$sql['export']['db'] . ( ( $sql['export']['compressed'] == 1 ) ? ".xml.gz" : ".xml" );
|
||||
}
|
||||
elseif ($sql['export']['format'] == 5)
|
||||
{
|
||||
$file=$sql['export']['db'] . ( ( $sql['export']['compressed'] == 1 ) ? ".html.gz" : ".html" );
|
||||
}
|
||||
$mime=( $sql['export']['compressed'] == 0 ) ? "x-type/subtype" : "application/x-gzip";
|
||||
global $sql, $config;
|
||||
if (0 == $sql['export']['sendfile']) {
|
||||
//Display
|
||||
echo $str;
|
||||
} else {
|
||||
if ('' == $sql['export']['header_sent']) {
|
||||
if (1 == $sql['export']['compressed'] & !function_exists('gzencode')) {
|
||||
$sql['export']['compressed'] = 0;
|
||||
}
|
||||
if ($sql['export']['format'] < 4) {
|
||||
$file = $sql['export']['db'].((1 == $sql['export']['compressed']) ? '.csv.gz' : '.csv');
|
||||
} elseif (4 == $sql['export']['format']) {
|
||||
$file = $sql['export']['db'].((1 == $sql['export']['compressed']) ? '.xml.gz' : '.xml');
|
||||
} elseif (5 == $sql['export']['format']) {
|
||||
$file = $sql['export']['db'].((1 == $sql['export']['compressed']) ? '.html.gz' : '.html');
|
||||
}
|
||||
$mime = (0 == $sql['export']['compressed']) ? 'x-type/subtype' : 'application/x-gzip';
|
||||
|
||||
header('Content-Disposition: attachment; filename="' . $file . '"');
|
||||
header('Pragma: no-cache');
|
||||
header('Content-Type: ' . $mime);
|
||||
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
$sql['export']['header_sent']=1;
|
||||
}
|
||||
if ($sql['export']['compressed'] == 1) echo gzencode($str);
|
||||
else echo $str;
|
||||
|
||||
}
|
||||
header('Content-Disposition: attachment; filename="'.$file.'"');
|
||||
header('Pragma: no-cache');
|
||||
header('Content-Type: '.$mime);
|
||||
header('Expires: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
$sql['export']['header_sent'] = 1;
|
||||
}
|
||||
if (1 == $sql['export']['compressed']) {
|
||||
echo gzencode($str);
|
||||
} else {
|
||||
echo $str;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function DoImport()
|
||||
{
|
||||
global $sql,$lang;
|
||||
$r='<span class="swarnung">';
|
||||
$zeilen=count($sql['import']['csv']) - $sql['import']['namefirstline'];
|
||||
$sql['import']['first_zeile']=explode($sql['import']['trenn'],$sql['import']['csv'][0]);
|
||||
$importfelder=count($sql['import']['first_zeile']);
|
||||
global $sql, $lang;
|
||||
$r = '<span class="swarnung">';
|
||||
$zeilen = count($sql['import']['csv']) - $sql['import']['namefirstline'];
|
||||
$sql['import']['first_zeile'] = explode($sql['import']['trenn'], $sql['import']['csv'][0]);
|
||||
$importfelder = count($sql['import']['first_zeile']);
|
||||
|
||||
if ($sql['import']['tablecreate'] == 0)
|
||||
{
|
||||
$res=MSD_query("show fields FROM " . $sql['import']['table']);
|
||||
$tabellenfelder=mysqli_num_rows($res);
|
||||
if ($importfelder != $tabellenfelder)
|
||||
{
|
||||
$r.='<br>' . sprintf($lang['L_CSV_FIELDCOUNT_NOMATCH'],$tabellenfelder,$importfelder);
|
||||
}
|
||||
else
|
||||
{
|
||||
$ok=1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$ok=ImportCreateTable();
|
||||
if ($ok == 0)
|
||||
{
|
||||
$r.='<br>' . sprintf($lang['L_CSV_ERRORCREATETABLE'],$sql['import']['table']);
|
||||
}
|
||||
}
|
||||
if ($ok == 1)
|
||||
{
|
||||
$insert="";
|
||||
if ($sql['import']['emptydb'] == 1 && $sql['import']['tablecreate'] == 0)
|
||||
{
|
||||
MSD_DoSQL("TRUNCATE " . $sql['import']['table'] . ";");
|
||||
}
|
||||
$sql['import']['lines_imported']=0;
|
||||
$enc=( $sql['import']['enc'] == "" ) ? "'" : "";
|
||||
$zc="";
|
||||
for ($i=$sql['import']['namefirstline']; $i < $zeilen + $sql['import']['namefirstline']; $i++)
|
||||
{
|
||||
//Importieren
|
||||
$insert="INSERT INTO " . $sql['import']['table'] . " VALUES(";
|
||||
if ($sql['import']['createindex'] == 1) $insert.="'', ";
|
||||
$zc.=trim(rtrim($sql['import']['csv'][$i]));
|
||||
//echo "Zeile $i: $zc<br>";
|
||||
if ($zc != "")
|
||||
{ // && substr($zc,-1)==$enc) {
|
||||
$zeile=explode($sql['import']['trenn'],$zc);
|
||||
for ($j=0; $j < $importfelder; $j++)
|
||||
{
|
||||
$a=( $zeile[$j] == "" && $enc == "" ) ? "''" : $zeile[$j];
|
||||
$insert.=$enc . $a . $enc . ( ( $j == $importfelder - 1 ) ? ");\n" : "," );
|
||||
}
|
||||
MSD_DoSQL($insert);
|
||||
$sql['import']['lines_imported']++;
|
||||
$zc="";
|
||||
}
|
||||
|
||||
}
|
||||
$r.=sprintf($lang['L_CSV_FIELDSLINES'],$importfelder,$sql['import']['lines_imported']);
|
||||
}
|
||||
|
||||
$r.='</span>';
|
||||
return $r;
|
||||
if (0 == $sql['import']['tablecreate']) {
|
||||
$res = mod_query('show fields FROM '.$sql['import']['table']);
|
||||
$tabellenfelder = mysqli_num_rows($res);
|
||||
if ($importfelder != $tabellenfelder) {
|
||||
$r .= '<br>'.sprintf($lang['L_CSV_FIELDCOUNT_NOMATCH'], $tabellenfelder, $importfelder);
|
||||
} else {
|
||||
$ok = 1;
|
||||
}
|
||||
} else {
|
||||
$ok = ImportCreateTable();
|
||||
if (0 == $ok) {
|
||||
$r .= '<br>'.sprintf($lang['L_CSV_ERRORCREATETABLE'], $sql['import']['table']);
|
||||
}
|
||||
}
|
||||
if (1 == $ok) {
|
||||
$insert = '';
|
||||
if (1 == $sql['import']['emptydb'] && 0 == $sql['import']['tablecreate']) {
|
||||
MOD_DoSQL('TRUNCATE '.$sql['import']['table'].';');
|
||||
}
|
||||
$sql['import']['lines_imported'] = 0;
|
||||
$enc = ('' == $sql['import']['enc']) ? "'" : '';
|
||||
$zc = '';
|
||||
for ($i = $sql['import']['namefirstline']; $i < $zeilen + $sql['import']['namefirstline']; ++$i) {
|
||||
//Importieren
|
||||
$insert = 'INSERT INTO '.$sql['import']['table'].' VALUES(';
|
||||
if (1 == $sql['import']['createindex']) {
|
||||
$insert .= "'', ";
|
||||
}
|
||||
$zc .= trim(rtrim($sql['import']['csv'][$i]));
|
||||
//echo "Zeile $i: $zc<br>";
|
||||
if ('' != $zc) { // && substr($zc,-1)== $enc) {
|
||||
$zeile = explode($sql['import']['trenn'], $zc);
|
||||
for ($j = 0; $j < $importfelder; ++$j) {
|
||||
$a = ('' == $zeile[$j] && '' == $enc) ? "''" : $zeile[$j];
|
||||
$insert .= $enc.$a.$enc.(($j == $importfelder - 1) ? ");\n" : ',');
|
||||
}
|
||||
MOD_DoSQL($insert);
|
||||
++$sql['import']['lines_imported'];
|
||||
$zc = '';
|
||||
}
|
||||
}
|
||||
$r .= sprintf($lang['L_CSV_FIELDSLINES'], $importfelder, $sql['import']['lines_imported']);
|
||||
}
|
||||
|
||||
$r .= '</span>';
|
||||
return $r;
|
||||
}
|
||||
|
||||
function ImportCreateTable()
|
||||
{
|
||||
global $sql,$lang,$db,$config;
|
||||
$tbl=Array();
|
||||
$sql = "SHOW TABLES FROM $db";
|
||||
$tabellen=MSD_query($sql);
|
||||
// while ($row = mysqli_fetch_row($num_tables))
|
||||
while ($row = mysqli_fetch_row($tabellen))
|
||||
{
|
||||
$tbl[]=strtolower($row[0]);
|
||||
}
|
||||
$i=0;
|
||||
$sql['import']['table']=$sql['import']['table'] . $i;
|
||||
while (in_array($sql['import']['table'],$tbl))
|
||||
{
|
||||
$sql['import']['table']=substr($sql['import']['table'],0,strlen($sql['import']['table']) - 1) . ++$i;
|
||||
}
|
||||
$create="CREATE TABLE `" . $sql['import']['table'] . "` (" . ( ( $sql['import']['createindex'] == 1 ) ? '`import_id` int(11) unsigned NOT NULL auto_increment, ' : '' );
|
||||
if ($sql['import']['namefirstline'])
|
||||
{
|
||||
for ($i=0; $i < count($sql['import']['first_zeile']); $i++)
|
||||
{
|
||||
$create.='`' . $sql['import']['first_zeile'][$i] . '` VARCHAR(250) NOT NULL, ';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for ($i=0; $i < count($sql['import']['first_zeile']); $i++)
|
||||
{
|
||||
$create.='`FIELD_' . $i . '` VARCHAR(250) NOT NULL, ';
|
||||
}
|
||||
}
|
||||
if ($sql['import']['createindex'] == 1) $create.='PRIMARY KEY (`import_id`) ';
|
||||
else $create=substr($create,0,strlen($create) - 2);
|
||||
global $sql, $lang, $db, $config;
|
||||
$tbl = [];
|
||||
$sql = "SHOW TABLES FROM $db";
|
||||
$tabellen = mod_query($sql);
|
||||
// while ($row = mysqli_fetch_row($num_tables))
|
||||
while ($row = mysqli_fetch_row($tabellen)) {
|
||||
$tbl[] = strtolower($row[0]);
|
||||
}
|
||||
$i = 0;
|
||||
$sql['import']['table'] = $sql['import']['table'].$i;
|
||||
while (in_array($sql['import']['table'], $tbl)) {
|
||||
$sql['import']['table'] = substr($sql['import']['table'], 0, strlen($sql['import']['table']) - 1).++$i;
|
||||
}
|
||||
$create = 'CREATE TABLE `'.$sql['import']['table'].'` ('.((1 == $sql['import']['createindex']) ? '`import_id` int(11) unsigned NOT NULL auto_increment, ' : '');
|
||||
if ($sql['import']['namefirstline']) {
|
||||
for ($i = 0; $i < count($sql['import']['first_zeile']); ++$i) {
|
||||
$create .= '`'.$sql['import']['first_zeile'][$i].'` VARCHAR(250) NOT NULL, ';
|
||||
}
|
||||
} else {
|
||||
for ($i = 0; $i < count($sql['import']['first_zeile']); ++$i) {
|
||||
$create .= '`FIELD_'.$i.'` VARCHAR(250) NOT NULL, ';
|
||||
}
|
||||
}
|
||||
if (1 == $sql['import']['createindex']) {
|
||||
$create .= 'PRIMARY KEY (`import_id`) ';
|
||||
} else {
|
||||
$create = substr($create, 0, strlen($create) - 2);
|
||||
}
|
||||
|
||||
$create.=') ' . ( ( MSD_NEW_VERSION ) ? 'ENGINE' : 'TYPE' ) . "=MyISAM COMMENT='imported at " . date("l dS of F Y H:i:s A") . "'";
|
||||
$res=mysqli_query($config['dbconnection'], $create) || die(SQLError($create,mysqli_error($config['dbconnection'])));
|
||||
return 1;
|
||||
$create .= ') '.((MOD_NEW_VERSION) ? 'ENGINE' : 'TYPE')."=MyISAM COMMENT='imported at ".date('l dS of F Y H:i:s A')."'";
|
||||
$res = mysqli_query($config['dbconnection'], $create) || exit(SQLError($create, mysqli_error($config['dbconnection'])));
|
||||
return 1;
|
||||
}
|
||||
|
||||
function ExportXML()
|
||||
{
|
||||
global $sql,$config;
|
||||
$tab="\t";
|
||||
$level=0;
|
||||
$t='<?xml version="1.0" encoding="UTF-8" ?>' . "\n" . '<database name="' . $sql['export']['db'] . '">' . "\n";
|
||||
$level++;
|
||||
$time_start=time();
|
||||
global $sql, $config;
|
||||
$tab = "\t";
|
||||
$level = 0;
|
||||
$t = '<?xml version="1.0" encoding="UTF-8" ?>'."\n".'<database name="'.$sql['export']['db'].'">'."\n";
|
||||
++$level;
|
||||
$time_start = time();
|
||||
|
||||
if (!isset($config['dbconnection'])) MSD_mysql_connect();
|
||||
for ($table=0; $table < count($sql['export']['tables']); $table++)
|
||||
{
|
||||
$t.=str_repeat($tab,$level++) . '<table name="' . $sql['export']['tables'][$table] . '">' . "\n";
|
||||
$sqlt="SHOW Fields FROM `" . $sql['export']['db'] . "`.`" . $sql['export']['tables'][$table] . "`;";
|
||||
$res=MSD_query($sqlt);
|
||||
if ($res)
|
||||
{
|
||||
$numfields=mysqli_num_rows($res);
|
||||
if ($sql['export']['xmlstructure'] == 1)
|
||||
{
|
||||
$t.=str_repeat($tab,$level++) . '<structure>' . "\n";
|
||||
for ($feld=0; $feld < $numfields; $feld++)
|
||||
{
|
||||
$row=mysqli_fetch_array($res);
|
||||
$t.=str_repeat($tab,$level++) . '<field no="' . $feld . '">' . "\n";
|
||||
$t.=str_repeat($tab,$level) . '<name>' . $row['Field'] . '</name>' . "\n";
|
||||
$t.=str_repeat($tab,$level) . '<type>' . $row['Type'] . '</type>' . "\n";
|
||||
$t.=str_repeat($tab,$level) . '<null>' . $row['Null'] . '</null>' . "\n";
|
||||
$t.=str_repeat($tab,$level) . '<key>' . $row['Key'] . '</key>' . "\n";
|
||||
$t.=str_repeat($tab,$level) . '<default>' . $row['Default'] . '</default>' . "\n";
|
||||
$t.=str_repeat($tab,$level) . '<extra>' . $row['Extra'] . '</extra>' . "\n";
|
||||
$t.=str_repeat($tab,--$level) . '</field>' . "\n";
|
||||
}
|
||||
$t.=str_repeat($tab,--$level) . '</structure>' . "\n";
|
||||
}
|
||||
}
|
||||
$t.=str_repeat($tab,$level++) . '<data>' . "\n";
|
||||
$sqlt="SELECT * FROM `" . $sql['export']['db'] . "`.`" . $sql['export']['tables'][$table] . "`;";
|
||||
$res=MSD_query($sqlt);
|
||||
if ($res)
|
||||
{
|
||||
$numrows=mysqli_num_rows($res);
|
||||
for ($data=0; $data < $numrows; $data++)
|
||||
{
|
||||
$t.=str_repeat($tab,$level) . "<row>\n";
|
||||
$level++;
|
||||
$row=mysqli_fetch_row($res);
|
||||
for ($feld=0; $feld < $numfields; $feld++)
|
||||
{
|
||||
$t.=str_repeat($tab,$level) . '<field no="' . $feld . '">' . $row[$feld] . '</field>' . "\n";
|
||||
}
|
||||
$t.=str_repeat($tab,--$level) . "</row>\n";
|
||||
$sql['export']['lines']++;
|
||||
if (strlen($t) > $config['memory_limit'])
|
||||
{
|
||||
CSVOutput($t);
|
||||
$t="";
|
||||
}
|
||||
$time_now=time();
|
||||
if ($time_start >= $time_now + 30)
|
||||
{
|
||||
$time_start=$time_now;
|
||||
header('X-MSDPing: Pong');
|
||||
}
|
||||
}
|
||||
}
|
||||
$t.=str_repeat($tab,--$level) . '</data>' . "\n";
|
||||
$t.=str_repeat($tab,--$level) . '</table>' . "\n";
|
||||
}
|
||||
$t.=str_repeat($tab,--$level) . '</database>' . "\n";
|
||||
CSVOutput($t,1);
|
||||
if (!isset($config['dbconnection'])) {
|
||||
mod_mysqli_connect();
|
||||
}
|
||||
for ($table = 0; $table < count($sql['export']['tables']); ++$table) {
|
||||
$t .= str_repeat($tab, $level++).'<table name="'.$sql['export']['tables'][$table].'">'."\n";
|
||||
$sqlt = 'SHOW Fields FROM `'.$sql['export']['db'].'`.`'.$sql['export']['tables'][$table].'`;';
|
||||
$res = mod_query($sqlt);
|
||||
if ($res) {
|
||||
$numfields = mysqli_num_rows($res);
|
||||
if (1 == $sql['export']['xmlstructure']) {
|
||||
$t .= str_repeat($tab, $level++).'<structure>'."\n";
|
||||
for ($feld = 0; $feld < $numfields; ++$feld) {
|
||||
$row = mysqli_fetch_array($res);
|
||||
$t .= str_repeat($tab, $level++).'<field no="'.$feld.'">'."\n";
|
||||
$t .= str_repeat($tab, $level).'<name>'.$row['Field'].'</name>'."\n";
|
||||
$t .= str_repeat($tab, $level).'<type>'.$row['Type'].'</type>'."\n";
|
||||
$t .= str_repeat($tab, $level).'<null>'.$row['Null'].'</null>'."\n";
|
||||
$t .= str_repeat($tab, $level).'<key>'.$row['Key'].'</key>'."\n";
|
||||
$t .= str_repeat($tab, $level).'<default>'.$row['Default'].'</default>'."\n";
|
||||
$t .= str_repeat($tab, $level).'<extra>'.$row['Extra'].'</extra>'."\n";
|
||||
$t .= str_repeat($tab, --$level).'</field>'."\n";
|
||||
}
|
||||
$t .= str_repeat($tab, --$level).'</structure>'."\n";
|
||||
}
|
||||
}
|
||||
$t .= str_repeat($tab, $level++).'<data>'."\n";
|
||||
$sqlt = 'SELECT * FROM `'.$sql['export']['db'].'`.`'.$sql['export']['tables'][$table].'`;';
|
||||
$res = mod_query($sqlt);
|
||||
if ($res) {
|
||||
$numrows = mysqli_num_rows($res);
|
||||
for ($data = 0; $data < $numrows; ++$data) {
|
||||
$t .= str_repeat($tab, $level)."<row>\n";
|
||||
++$level;
|
||||
$row = mysqli_fetch_row($res);
|
||||
for ($feld = 0; $feld < $numfields; ++$feld) {
|
||||
$t .= str_repeat($tab, $level).'<field no="'.$feld.'">'.$row[$feld].'</field>'."\n";
|
||||
}
|
||||
$t .= str_repeat($tab, --$level)."</row>\n";
|
||||
++$sql['export']['lines'];
|
||||
if ('' == $config['memory_limit']) {
|
||||
$config['memory_limit'] = 0;
|
||||
}
|
||||
if (strlen($t) > $config['memory_limit']) {
|
||||
CSVOutput($t);
|
||||
$t = '';
|
||||
}
|
||||
$time_now = time();
|
||||
if ($time_start >= $time_now + 30) {
|
||||
$time_start = $time_now;
|
||||
header('X-MODPing: Pong');
|
||||
}
|
||||
}
|
||||
}
|
||||
$t .= str_repeat($tab, --$level).'</data>'."\n";
|
||||
$t .= str_repeat($tab, --$level).'</table>'."\n";
|
||||
}
|
||||
$t .= str_repeat($tab, --$level).'</database>'."\n";
|
||||
CSVOutput($t, 1);
|
||||
}
|
||||
|
||||
function ExportHTML()
|
||||
{
|
||||
global $sql,$config,$lang;
|
||||
$header='<html><head><title>MSD Export</title></head>';
|
||||
$footer="\n\n</body>\n</html>";
|
||||
$content="";
|
||||
$content.='<h1>' . $lang['L_DB'] . ' ' . $sql['export']['db'] . '</h1>';
|
||||
global $sql, $config, $lang;
|
||||
$header = '<html><head><title>MOD Export</title></head>';
|
||||
$footer = "\n\n</body>\n</html>";
|
||||
$content = '';
|
||||
$content .= '<h1>'.$lang['L_DB'].' '.$sql['export']['db'].'</h1>';
|
||||
|
||||
$time_start=time();
|
||||
$time_start = time();
|
||||
|
||||
if (!isset($config['dbconnection'])) MSD_mysql_connect();
|
||||
for ($table=0; $table < count($sql['export']['tables']); $table++)
|
||||
{
|
||||
$content.='<h2>Tabelle ' . $sql['export']['tables'][$table] . '</h2>' . "\n";
|
||||
$fsql="show fields from `" . $sql['export']['tables'][$table] . "`";
|
||||
$dsql="select * from `" . $sql['export']['tables'][$table] . "`";
|
||||
//Struktur
|
||||
$res=MSD_query($fsql);
|
||||
if ($res)
|
||||
{
|
||||
$field=$fieldname=$fieldtyp=Array();
|
||||
$structure="<table class=\"Table\">\n";
|
||||
$numfields=mysqli_num_rows($res);
|
||||
for ($feld=0; $feld < $numfields; $feld++)
|
||||
{
|
||||
$row=mysqli_fetch_row($res);
|
||||
$field[$feld]=$row[0];
|
||||
if (!isset($config['dbconnection'])) {
|
||||
mod_mysqli_connect();
|
||||
}
|
||||
for ($table = 0; $table < count($sql['export']['tables']); ++$table) {
|
||||
$content .= '<h2>Tabelle '.$sql['export']['tables'][$table].'</h2>'."\n";
|
||||
$fsql = 'show fields from `'.$sql['export']['tables'][$table].'`';
|
||||
$dsql = 'select * from `'.$sql['export']['tables'][$table].'`';
|
||||
//Struktur
|
||||
$res = mod_query($fsql);
|
||||
if ($res) {
|
||||
$field = $fieldname = $fieldtyp = [];
|
||||
$structure = "<table class=\"Table\">\n";
|
||||
$numfields = mysqli_num_rows($res);
|
||||
for ($feld = 0; $feld < $numfields; ++$feld) {
|
||||
$row = mysqli_fetch_row($res);
|
||||
$field[$feld] = $row[0];
|
||||
|
||||
if ($feld == 0)
|
||||
{
|
||||
$structure.="<tr class=\"Header\">\n";
|
||||
for ($i=0; $i < count($row); $i++)
|
||||
{
|
||||
$str=mysqli_fetch_field($res,$i);
|
||||
$fieldname[$i]=$str->name;
|
||||
$fieldtyp[$i]=$str->type;
|
||||
$structure.="<th>" . $str->name . "</th>\n";
|
||||
}
|
||||
$structure.="</tr>\n<tr>\n";
|
||||
}
|
||||
for ($i=0; $i < count($row); $i++)
|
||||
{
|
||||
$structure.="<td class=\"Object\">" . ( ( $row[$i] != "" ) ? $row[$i] : " " ) . "</td>\n";
|
||||
}
|
||||
$structure.="</tr>\n";
|
||||
}
|
||||
$structure.="</table>\n";
|
||||
}
|
||||
if ($sql['export']['htmlstructure'] == 1) $content.="<h3>Struktur</h3>\n" . $structure;
|
||||
//Daten
|
||||
if (0 == $feld) {
|
||||
$structure .= "<tr class=\"Header\">\n";
|
||||
for ($i = 0; $i < count($row); ++$i) {
|
||||
$str = mysqli_fetch_field($res, $i);
|
||||
$fieldname[$i] = $str->name;
|
||||
$fieldtyp[$i] = $str->type;
|
||||
$structure .= '<th>'.$str->name."</th>\n";
|
||||
}
|
||||
$structure .= "</tr>\n<tr>\n";
|
||||
}
|
||||
for ($i = 0; $i < count($row); ++$i) {
|
||||
$structure .= '<td class="Object">'.(('' != $row[$i]) ? $row[$i] : ' ')."</td>\n";
|
||||
}
|
||||
$structure .= "</tr>\n";
|
||||
}
|
||||
$structure .= "</table>\n";
|
||||
}
|
||||
if (1 == $sql['export']['htmlstructure']) {
|
||||
$content .= "<h3>Struktur</h3>\n".$structure;
|
||||
}
|
||||
//Daten
|
||||
|
||||
|
||||
$res=MSD_query($dsql);
|
||||
if ($res)
|
||||
{
|
||||
$anz=mysqli_num_rows($res);
|
||||
$content.="<h3>Daten ($anz Datensätze)</h3>\n";
|
||||
$content.="<table class=\"Table\">\n";
|
||||
for ($feld=0; $feld < count($field); $feld++)
|
||||
{
|
||||
if ($feld == 0)
|
||||
{
|
||||
$content.="<tr class=\"Header\">\n";
|
||||
for ($i=0; $i < count($field); $i++)
|
||||
{
|
||||
$content.="<th>" . $field[$i] . "</th>\n";
|
||||
}
|
||||
$content.="</tr>\n";
|
||||
}
|
||||
}
|
||||
for ($d=0; $d < $anz; $d++)
|
||||
{
|
||||
$row=mysqli_fetch_row($res);
|
||||
$content.="<tr>\n";
|
||||
for ($i=0; $i < count($row); $i++)
|
||||
{
|
||||
|
||||
$content.='<td class="Object">' . ( ( $row[$i] != "" ) ? $row[$i] : " " ) . "</td>\n";
|
||||
}
|
||||
$content.="</tr>\n";
|
||||
}
|
||||
}
|
||||
$content.="</table>";
|
||||
}
|
||||
CSVOutput($header . $content . $footer);
|
||||
$res = mod_query($dsql);
|
||||
if ($res) {
|
||||
$anz = mysqli_num_rows($res);
|
||||
$content .= "<h3>Daten ($anz Datensätze)</h3>\n";
|
||||
$content .= "<table class=\"Table\">\n";
|
||||
for ($feld = 0; $feld < count($field); ++$feld) {
|
||||
if (0 == $feld) {
|
||||
$content .= "<tr class=\"Header\">\n";
|
||||
for ($i = 0; $i < count($field); ++$i) {
|
||||
$content .= '<th>'.$field[$i]."</th>\n";
|
||||
}
|
||||
$content .= "</tr>\n";
|
||||
}
|
||||
}
|
||||
for ($d = 0; $d < $anz; ++$d) {
|
||||
$row = mysqli_fetch_row($res);
|
||||
$content .= "<tr>\n";
|
||||
for ($i = 0; $i < count($row); ++$i) {
|
||||
$content .= '<td class="Object">'.(('' != $row[$i]) ? $row[$i] : ' ')."</td>\n";
|
||||
}
|
||||
$content .= "</tr>\n";
|
||||
}
|
||||
}
|
||||
$content .= '</table>';
|
||||
}
|
||||
CSVOutput($header.$content.$footer);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
MyOOS [Dumper]
|
||||
http://www.oos-shop.de/
|
||||
|
||||
Copyright (c) 2016 by the MyOOS Development Team.
|
||||
Copyright (c) 2013 - 2022 by the MyOOS Development Team.
|
||||
----------------------------------------------------------------------
|
||||
Based on:
|
||||
|
||||
@ -16,410 +16,405 @@
|
||||
Released under the GNU General Public License
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
define('DEBUG',0);
|
||||
if (!defined('MSD_VERSION')) die('No direct access.');
|
||||
define('DEBUG', 0);
|
||||
if (!defined('MOD_VERSION')) {
|
||||
exit('No direct access.');
|
||||
}
|
||||
function get_sqlbefehl()
|
||||
{
|
||||
global $restore,$config,$databases,$lang;
|
||||
global $restore, $config, $databases, $lang;
|
||||
|
||||
//Init
|
||||
$restore['fileEOF']=false;
|
||||
$restore['EOB']=false;
|
||||
$complete_sql='';
|
||||
$sqlparser_status=0;
|
||||
if (!isset($restore['eintraege_ready'])) $restore['eintraege_ready']=0;
|
||||
//Init
|
||||
$restore['fileEOF'] = false;
|
||||
$restore['EOB'] = false;
|
||||
$complete_sql = '';
|
||||
$sqlparser_status = 0;
|
||||
if (!isset($restore['eintraege_ready'])) {
|
||||
$restore['eintraege_ready'] = 0;
|
||||
}
|
||||
|
||||
//Parsen
|
||||
while ($sqlparser_status!=100&&!$restore['fileEOF']&&!$restore['EOB'])
|
||||
{
|
||||
//nächste Zeile lesen
|
||||
$zeile=($restore['compressed']) ? gzgets($restore['filehandle']):fgets($restore['filehandle']);
|
||||
if (DEBUG) echo "<br><br>Zeile: ".htmlspecialchars($zeile);
|
||||
/******************* Setzen des Parserstatus *******************/
|
||||
// herausfinden um was für einen Befehl es sich handelt
|
||||
if ($sqlparser_status==0)
|
||||
{
|
||||
//Parsen
|
||||
while (100 != $sqlparser_status && !$restore['fileEOF'] && !$restore['EOB']) {
|
||||
//nächste Zeile lesen
|
||||
$zeile = ($restore['compressed']) ? gzgets($restore['filehandle']) : fgets($restore['filehandle']);
|
||||
if (DEBUG) {
|
||||
echo '<br><br>Zeile: '.htmlspecialchars($zeile);
|
||||
}
|
||||
/******************* Setzen des Parserstatus *******************/
|
||||
// herausfinden um was für einen Befehl es sich handelt
|
||||
if (0 == $sqlparser_status) {
|
||||
//Vergleichszeile, um nicht bei jedem Vergleich strtoupper ausführen zu müssen
|
||||
$zeile2 = strtoupper(trim($zeile));
|
||||
// pre-built compare strings - so we need the CPU power only once :)
|
||||
$sub9 = substr($zeile2, 0, 9);
|
||||
$sub7 = substr($sub9, 0, 7);
|
||||
$sub6 = substr($sub7, 0, 6);
|
||||
$sub4 = substr($sub6, 0, 4);
|
||||
$sub3 = substr($sub4, 0, 3);
|
||||
$sub2 = substr($sub3, 0, 2);
|
||||
$sub1 = substr($sub2, 0, 1);
|
||||
|
||||
//Vergleichszeile, um nicht bei jedem Vergleich strtoupper ausführen zu müssen
|
||||
$zeile2=strtoupper(trim($zeile));
|
||||
// pre-built compare strings - so we need the CPU power only once :)
|
||||
$sub9=substr($zeile2,0,9);
|
||||
$sub7=substr($sub9,0,7);
|
||||
$sub6=substr($sub7,0,6);
|
||||
$sub4=substr($sub6,0,4);
|
||||
$sub3=substr($sub4,0,3);
|
||||
$sub2=substr($sub3,0,2);
|
||||
$sub1=substr($sub2,0,1);
|
||||
if ('INSERT ' == $sub7) {
|
||||
$sqlparser_status = 3; //Datensatzaktion
|
||||
$restore['actual_table'] = get_tablename($zeile);
|
||||
}
|
||||
|
||||
if ($sub7=='INSERT ')
|
||||
{
|
||||
$sqlparser_status=3; //Datensatzaktion
|
||||
$restore['actual_table']=get_tablename($zeile);
|
||||
}
|
||||
//Einfache Anweisung finden die mit Semikolon beendet werden
|
||||
elseif ('LOCK TA' == $sub7) {
|
||||
$sqlparser_status = 4;
|
||||
} elseif ('COMMIT' == $sub6) {
|
||||
$sqlparser_status = 7;
|
||||
} elseif ('BEGIN' == substr($sub6, 0, 5)) {
|
||||
$sqlparser_status = 7;
|
||||
} elseif ('UNLOCK TA' == $sub9) {
|
||||
$sqlparser_status = 4;
|
||||
} elseif ('SET' == $sub3) {
|
||||
$sqlparser_status = 4;
|
||||
} elseif ('START ' == $sub6) {
|
||||
$sqlparser_status = 4;
|
||||
} elseif ('/*!' == $sub3) {
|
||||
$sqlparser_status = 5;
|
||||
} //MySQL-Condition oder Kommentar
|
||||
elseif ('ALTER TAB' == $sub9) {
|
||||
$sqlparser_status = 4;
|
||||
} // Alter Table
|
||||
elseif ('CREATE TA' == $sub9) {
|
||||
$sqlparser_status = 2;
|
||||
} //Create Table
|
||||
elseif ('CREATE AL' == $sub9) {
|
||||
$sqlparser_status = 2;
|
||||
} //Create View
|
||||
elseif ('CREATE IN' == $sub9) {
|
||||
$sqlparser_status = 4;
|
||||
} //Indexaktion
|
||||
|
||||
//Einfache Anweisung finden die mit Semikolon beendet werden
|
||||
elseif ($sub7=='LOCK TA') $sqlparser_status=4;
|
||||
elseif ($sub6=='COMMIT') $sqlparser_status=7;
|
||||
elseif (substr($sub6,0,5)=='BEGIN') $sqlparser_status=7;
|
||||
elseif ($sub9=='UNLOCK TA') $sqlparser_status=4;
|
||||
elseif ($sub3=='SET') $sqlparser_status=4;
|
||||
elseif ($sub6=='START ') $sqlparser_status=4;
|
||||
elseif ($sub3=='/*!') $sqlparser_status=5; //MySQL-Condition oder Kommentar
|
||||
elseif ($sub9=='ALTER TAB') $sqlparser_status=4; // Alter Table
|
||||
elseif ($sub9=='CREATE TA') $sqlparser_status=2; //Create Table
|
||||
elseif ($sub9=='CREATE AL') $sqlparser_status=2; //Create View
|
||||
elseif ($sub9=='CREATE IN') $sqlparser_status=4; //Indexaktion
|
||||
//Condition?
|
||||
elseif ((5 != $sqlparser_status) && ('/*' == substr($zeile2, 0, 2))) {
|
||||
$sqlparser_status = 6;
|
||||
}
|
||||
|
||||
// Delete actions
|
||||
elseif ('DROP TABL' == $sub9) {
|
||||
$sqlparser_status = 1;
|
||||
} elseif ('DROP VIEW' == $sub9) {
|
||||
$sqlparser_status = 1;
|
||||
}
|
||||
|
||||
//Condition?
|
||||
elseif (($sqlparser_status!=5)&&(substr($zeile2,0,2)=='/*')) $sqlparser_status=6;
|
||||
// Befehle, die nicht ausgeführt werden sollen
|
||||
elseif ('CREATE DA' == $sub9) {
|
||||
$sqlparser_status = 7;
|
||||
} elseif ('DROP DATA ' == $sub9) {
|
||||
$sqlparser_status = 7;
|
||||
} elseif ('USE' == $sub3) {
|
||||
$sqlparser_status = 7;
|
||||
}
|
||||
|
||||
// Delete actions
|
||||
elseif ($sub9=='DROP TABL') $sqlparser_status=1;
|
||||
elseif ($sub9=='DROP VIEW') $sqlparser_status=1;
|
||||
// Am Ende eines MySQLDumper-Backups angelangt?
|
||||
elseif ('-- EOB' == $sub6 || '# EO' == $sub4) {
|
||||
$restore['EOB'] = true;
|
||||
$restore['fileEOF'] = true;
|
||||
$zeile = '';
|
||||
$zeile2 = '';
|
||||
$sqlparser_status = 100;
|
||||
}
|
||||
|
||||
// Befehle, die nicht ausgeführt werden sollen
|
||||
elseif ($sub9=='CREATE DA') $sqlparser_status=7;
|
||||
elseif ($sub9=='DROP DATA ') $sqlparser_status=7;
|
||||
elseif ($sub3=='USE') $sqlparser_status=7;
|
||||
// Kommentar?
|
||||
elseif ('--' == $sub2 || '#' == $sub1) {
|
||||
$zeile = '';
|
||||
$zeile2 = '';
|
||||
$sqlparser_status = 0;
|
||||
}
|
||||
|
||||
// Am Ende eines MySQLDumper-Backups angelangt?
|
||||
elseif ($sub6=='-- EOB'||$sub4=='# EO')
|
||||
{
|
||||
$restore['EOB']=true;
|
||||
$restore['fileEOF']=true;
|
||||
$zeile='';
|
||||
$zeile2='';
|
||||
$sqlparser_status=100;
|
||||
}
|
||||
// Fortsetzung von erweiterten Inserts
|
||||
if (1 == $restore['flag']) {
|
||||
$sqlparser_status = 3;
|
||||
}
|
||||
|
||||
// Kommentar?
|
||||
elseif ($sub2=='--'|| $sub1=='#')
|
||||
{
|
||||
$zeile='';
|
||||
$zeile2='';
|
||||
$sqlparser_status=0;
|
||||
}
|
||||
if ((0 == $sqlparser_status) && (trim($complete_sql) > '') && (-1 == $restore['flag'])) {
|
||||
// Unbekannten Befehl entdeckt
|
||||
v($restore);
|
||||
echo '<br>Sql: '.htmlspecialchars($complete_sql);
|
||||
echo '<br>Erweiterte Inserts: '.$restore['erweiterte_inserts'];
|
||||
exit('<br>'.$lang['L_UNKNOWN_SQLCOMMAND'].': '.$zeile.'<br><br>'.$complete_sql);
|
||||
}
|
||||
/******************* Ende von Setzen des Parserstatus *******************/
|
||||
}
|
||||
|
||||
// Fortsetzung von erweiterten Inserts
|
||||
if ($restore['flag']==1) $sqlparser_status=3;
|
||||
$last_char = substr(rtrim($zeile), -1);
|
||||
// Zeilenumbrüche erhalten - sonst werden Schlüsselwörter zusammengefügt
|
||||
// z.B. 'null' und in der nächsten Zeile 'check' wird zu 'nullcheck'
|
||||
$complete_sql .= $zeile."\n";
|
||||
|
||||
if (($sqlparser_status==0)&&(trim($complete_sql)>'')&&($restore['flag']==-1))
|
||||
{
|
||||
// Unbekannten Befehl entdeckt
|
||||
v($restore);
|
||||
echo "<br>Sql: ".htmlspecialchars($complete_sql);
|
||||
echo "<br>Erweiterte Inserts: ".$restore['erweiterte_inserts'];
|
||||
die('<br>'.$lang['L_UNKNOWN_SQLCOMMAND'].': '.$zeile.'<br><br>'.$complete_sql);
|
||||
}
|
||||
/******************* Ende von Setzen des Parserstatus *******************/
|
||||
}
|
||||
if (3 == $sqlparser_status) {
|
||||
//INSERT
|
||||
if (SQL_Is_Complete($complete_sql)) {
|
||||
$sqlparser_status = 100;
|
||||
$complete_sql = trim($complete_sql);
|
||||
if ('*/' == substr($complete_sql, -2)) {
|
||||
$complete_sql = remove_comment_at_eol($complete_sql);
|
||||
}
|
||||
|
||||
$last_char=substr(rtrim($zeile),-1);
|
||||
// Zeilenumbrüche erhalten - sonst werden Schlüsselwörter zusammengefügt
|
||||
// z.B. 'null' und in der nächsten Zeile 'check' wird zu 'nullcheck'
|
||||
$complete_sql.=$zeile."\n";
|
||||
// letzter Ausdruck des erweiterten Inserts erreicht?
|
||||
if (');' == substr($complete_sql, -2)) {
|
||||
$restore['flag'] = -1;
|
||||
}
|
||||
|
||||
if ($sqlparser_status==3)
|
||||
{
|
||||
//INSERT
|
||||
if (SQL_Is_Complete($complete_sql))
|
||||
{
|
||||
$sqlparser_status=100;
|
||||
$complete_sql=trim($complete_sql);
|
||||
if (substr($complete_sql,-2)=='*/')
|
||||
{
|
||||
$complete_sql=remove_comment_at_eol($complete_sql);
|
||||
}
|
||||
// Wenn am Ende der Zeile ein Klammer Komma -> erweiterter Insert-Modus -> Steuerflag setzen
|
||||
elseif ('),' == substr($complete_sql, -2)) {
|
||||
// letztes Komme gegen Semikolon tauschen
|
||||
$complete_sql = substr($complete_sql, 0, -1).';';
|
||||
$restore['erweiterte_inserts'] = 1;
|
||||
$restore['flag'] = 1;
|
||||
}
|
||||
|
||||
// letzter Ausdruck des erweiterten Inserts erreicht?
|
||||
if (substr($complete_sql,-2)==');')
|
||||
{
|
||||
$restore['flag']=-1;
|
||||
}
|
||||
if ('INSERT ' != substr(strtoupper($complete_sql), 0, 7)) {
|
||||
// wenn der Syntax aufgrund eines Reloads verloren ging - neu ermitteln
|
||||
if (!isset($restore['insert_syntax'])) {
|
||||
$restore['insert_syntax'] = get_insert_syntax($restore['actual_table']);
|
||||
}
|
||||
$complete_sql = $restore['insert_syntax'].' VALUES '.$complete_sql.';';
|
||||
} else {
|
||||
// INSERT Syntax ermitteln und merken
|
||||
$ipos = strpos(strtoupper($complete_sql), ' VALUES');
|
||||
if (false === !$ipos) {
|
||||
$restore['insert_syntax'] = substr($complete_sql, 0, $ipos);
|
||||
} else {
|
||||
$restore['insert_syntax'] = 'INSERT INTO `'.$restore['actual_table'].'`';
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif (1 == $sqlparser_status) {
|
||||
//Löschaktion
|
||||
if (';' == $last_char) {
|
||||
$sqlparser_status = 100;
|
||||
} //Befehl komplett
|
||||
$restore['actual_table'] = get_tablename($complete_sql);
|
||||
} elseif (2 == $sqlparser_status) {
|
||||
// Createanweisung ist beim Finden eines ; beendet
|
||||
if (';' == $last_char) {
|
||||
if ($config['minspeed'] > 0) {
|
||||
$restore['anzahl_zeilen'] = $config['minspeed'];
|
||||
}
|
||||
// Soll die Tabelle hergestellt werden?
|
||||
$do_it = true;
|
||||
if (is_array($restore['tables_to_restore'])) {
|
||||
$do_it = false;
|
||||
if (in_array($restore['actual_table'], $restore['tables_to_restore'])) {
|
||||
$do_it = true;
|
||||
}
|
||||
}
|
||||
if ($do_it) {
|
||||
$tablename = submit_create_action($complete_sql);
|
||||
$restore['actual_table'] = $tablename;
|
||||
++$restore['table_ready'];
|
||||
}
|
||||
// Zeile verwerfen, da CREATE jetzt bereits ausgefuehrt wurde und naechsten Befehl suchen
|
||||
$complete_sql = '';
|
||||
$sqlparser_status = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Wenn am Ende der Zeile ein Klammer Komma -> erweiterter Insert-Modus -> Steuerflag setzen
|
||||
else
|
||||
if (substr($complete_sql,-2)=='),')
|
||||
{
|
||||
// letztes Komme gegen Semikolon tauschen
|
||||
$complete_sql=substr($complete_sql,0,-1).';';
|
||||
$restore['erweiterte_inserts']=1;
|
||||
$restore['flag']=1;
|
||||
}
|
||||
// Index
|
||||
elseif (4 == $sqlparser_status) { //Createindex
|
||||
if (';' == $last_char) {
|
||||
if ($config['minspeed'] > 0) {
|
||||
$restore['anzahl_zeilen'] = $config['minspeed'];
|
||||
}
|
||||
$complete_sql = del_inline_comments($complete_sql);
|
||||
$sqlparser_status = 100;
|
||||
}
|
||||
}
|
||||
|
||||
if (substr(strtoupper($complete_sql),0,7)!='INSERT ')
|
||||
{
|
||||
// wenn der Syntax aufgrund eines Reloads verloren ging - neu ermitteln
|
||||
if (!isset($restore['insert_syntax'])) $restore['insert_syntax']=get_insert_syntax($restore['actual_table']);
|
||||
$complete_sql=$restore['insert_syntax'].' VALUES '.$complete_sql.';';
|
||||
}
|
||||
else
|
||||
{
|
||||
// INSERT Syntax ermitteln und merken
|
||||
$ipos=strpos(strtoupper($complete_sql),' VALUES');
|
||||
if (!$ipos===false) $restore['insert_syntax']=substr($complete_sql,0,$ipos);
|
||||
else
|
||||
$restore['insert_syntax']='INSERT INTO `'.$restore['actual_table'].'`';
|
||||
}
|
||||
}
|
||||
}
|
||||
// Kommentar oder Condition
|
||||
elseif (5 == $sqlparser_status) { //Anweisung
|
||||
$t = strrpos($zeile, '*/;');
|
||||
if (false === !$t) {
|
||||
$restore['anzahl_zeilen'] = $config['minspeed'];
|
||||
$sqlparser_status = 100;
|
||||
if ($config['ignore_enable_keys'] &&
|
||||
false !== strrpos($zeile, 'ENABLE KEYS ')) {
|
||||
$sqlparser_status = 100;
|
||||
$complete_sql = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
if ($sqlparser_status==1)
|
||||
{
|
||||
//Löschaktion
|
||||
if ($last_char==';') $sqlparser_status=100; //Befehl komplett
|
||||
$restore['actual_table']=get_tablename($complete_sql);
|
||||
}
|
||||
// Mehrzeiliger oder Inline-Kommentar
|
||||
elseif (6 == $sqlparser_status) {
|
||||
$t = strrpos($zeile, '*/');
|
||||
if (false === !$t) {
|
||||
$complete_sql = '';
|
||||
$sqlparser_status = 0;
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
if ($sqlparser_status==2)
|
||||
{
|
||||
// Createanweisung ist beim Finden eines ; beendet
|
||||
if ($last_char==';')
|
||||
{
|
||||
if ($config['minspeed']>0) $restore['anzahl_zeilen']=$config['minspeed'];
|
||||
// Soll die Tabelle hergestellt werden?
|
||||
$do_it=true;
|
||||
if (is_array($restore['tables_to_restore']))
|
||||
{
|
||||
$do_it=false;
|
||||
if (in_array($restore['actual_table'],$restore['tables_to_restore']))
|
||||
{
|
||||
$do_it=true;
|
||||
}
|
||||
}
|
||||
if ($do_it)
|
||||
{
|
||||
$tablename=submit_create_action($complete_sql);
|
||||
$restore['actual_table']=$tablename;
|
||||
$restore['table_ready']++;
|
||||
}
|
||||
// Zeile verwerfen, da CREATE jetzt bereits ausgefuehrt wurde und naechsten Befehl suchen
|
||||
$complete_sql='';
|
||||
$sqlparser_status=0;
|
||||
}
|
||||
}
|
||||
// Befehle, die verworfen werden sollen
|
||||
elseif (7 == $sqlparser_status) { //Anweisung
|
||||
if (';' == $last_char) {
|
||||
if ($config['minspeed'] > 0) {
|
||||
$restore['anzahl_zeilen'] = $config['minspeed'];
|
||||
}
|
||||
$complete_sql = '';
|
||||
$sqlparser_status = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Index
|
||||
else
|
||||
if ($sqlparser_status==4)
|
||||
{ //Createindex
|
||||
if ($last_char==';')
|
||||
{
|
||||
if ($config['minspeed']>0)
|
||||
{
|
||||
$restore['anzahl_zeilen']=$config['minspeed'];
|
||||
}
|
||||
$complete_sql=del_inline_comments($complete_sql);
|
||||
$sqlparser_status=100;
|
||||
}
|
||||
}
|
||||
|
||||
// Kommentar oder Condition
|
||||
else
|
||||
if ($sqlparser_status==5)
|
||||
{ //Anweisung
|
||||
$t=strrpos($zeile,'*/;');
|
||||
if (!$t===false)
|
||||
{
|
||||
$restore['anzahl_zeilen']=$config['minspeed'];
|
||||
$sqlparser_status=100;
|
||||
if ($config['ignore_enable_keys'] &&
|
||||
strrpos($zeile, 'ENABLE KEYS ') !== false)
|
||||
{
|
||||
$sqlparser_status=100;
|
||||
$complete_sql = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Mehrzeiliger oder Inline-Kommentar
|
||||
else
|
||||
if ($sqlparser_status==6)
|
||||
{
|
||||
$t=strrpos($zeile,'*/');
|
||||
if (!$t===false)
|
||||
{
|
||||
$complete_sql='';
|
||||
$sqlparser_status=0;
|
||||
}
|
||||
}
|
||||
|
||||
// Befehle, die verworfen werden sollen
|
||||
else
|
||||
if ($sqlparser_status==7)
|
||||
{ //Anweisung
|
||||
if ($last_char==';')
|
||||
{
|
||||
if ($config['minspeed']>0)
|
||||
{
|
||||
$restore['anzahl_zeilen']=$config['minspeed'];
|
||||
}
|
||||
$complete_sql='';
|
||||
$sqlparser_status=0;
|
||||
}
|
||||
}
|
||||
|
||||
if (($restore['compressed'])&&(gzeof($restore['filehandle']))) $restore['fileEOF']=true;
|
||||
if ((!$restore['compressed'])&&(feof($restore['filehandle']))) $restore['fileEOF']=true;
|
||||
}
|
||||
// wenn bestimmte Tabellen wiederhergestellt werden sollen -> pruefen
|
||||
if (is_array($restore['tables_to_restore'])&&!(in_array($restore['actual_table'],$restore['tables_to_restore'])))
|
||||
{
|
||||
$complete_sql='';
|
||||
}
|
||||
return trim($complete_sql);
|
||||
if (($restore['compressed']) && (gzeof($restore['filehandle']))) {
|
||||
$restore['fileEOF'] = true;
|
||||
}
|
||||
if ((!$restore['compressed']) && (feof($restore['filehandle']))) {
|
||||
$restore['fileEOF'] = true;
|
||||
}
|
||||
}
|
||||
// wenn bestimmte Tabellen wiederhergestellt werden sollen -> pruefen
|
||||
if (is_array($restore['tables_to_restore']) && !(in_array($restore['actual_table'], $restore['tables_to_restore']))) {
|
||||
$complete_sql = '';
|
||||
}
|
||||
return trim($complete_sql);
|
||||
}
|
||||
|
||||
function submit_create_action($sql)
|
||||
{
|
||||
global $config;
|
||||
global $config;
|
||||
|
||||
//executes a create command
|
||||
$tablename=get_tablename($sql);
|
||||
if (strtoupper(substr($sql,0,16))=='CREATE ALGORITHM')
|
||||
{
|
||||
// It`s a VIEW. We need to substitute the original DEFINER with the actual MySQL-User
|
||||
$parts=explode(' ',$sql);
|
||||
for ($i=0,$count=sizeof($parts);$i<$count;$i++)
|
||||
{
|
||||
if (strtoupper(substr($parts[$i],0,8))=='DEFINER=')
|
||||
{
|
||||
$parts[$i]='DEFINER=`'.$config['dbuser'].'`@`'.$config['dbhost'].'`';
|
||||
$sql=implode(' ',$parts);
|
||||
$i=$count;
|
||||
}
|
||||
}
|
||||
}
|
||||
//executes a create command
|
||||
$tablename = get_tablename($sql);
|
||||
if ('CREATE ALGORITHM' == strtoupper(substr($sql, 0, 16))) {
|
||||
// It`s a VIEW. We need to substitute the original DEFINER with the actual MySQL-User
|
||||
$parts = explode(' ', $sql);
|
||||
for ($i = 0, $count = sizeof($parts); $i < $count; ++$i) {
|
||||
if ('DEFINER=' == strtoupper(substr($parts[$i], 0, 8))) {
|
||||
$parts[$i] = 'DEFINER=`'.$config['dbuser'].'`@`'.$config['dbhost'].'`';
|
||||
$sql = implode(' ', $parts);
|
||||
$i = $count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$res=@mysqli_query($config['dbconnection'], $sql);
|
||||
if ($res===false)
|
||||
{
|
||||
// erster Versuch fehlgeschlagen -> zweiter Versuch - vielleicht versteht der Server die Inline-Kommentare nicht?
|
||||
$sql=del_inline_comments($sql);
|
||||
$res=@mysqli_query($config['dbconnection'], downgrade($sql));
|
||||
if ($res===false)
|
||||
{
|
||||
// wieder nichts. Ok, haben wir hier einen alten MySQL-Server 3.x oder 4.0.x?
|
||||
// versuchen wir es mal mit der alten Syntax
|
||||
$res=@mysqli_query($config['dbconnection'], downgrade($sql));
|
||||
}
|
||||
}
|
||||
if ($res===false)
|
||||
{
|
||||
// wenn wir hier angekommen sind hat nichts geklappt -> Fehler ausgeben und abbrechen
|
||||
SQLError($sql,mysqli_error($config['dbconnection']));
|
||||
die("<br>Fatal error: Couldn't create table or view `".$tablename."´");
|
||||
}
|
||||
return $tablename;
|
||||
$res = mysqli_query($config['dbconnection'], $sql);
|
||||
if (false === $res) {
|
||||
// erster Versuch fehlgeschlagen -> zweiter Versuch - vielleicht versteht der Server die Inline-Kommentare nicht?
|
||||
$sql = del_inline_comments($sql);
|
||||
$res = mysqli_query($config['dbconnection'], downgrade($sql));
|
||||
}
|
||||
if (false === $res) {
|
||||
// wenn wir hier angekommen sind hat nichts geklappt -> Fehler ausgeben und abbrechen
|
||||
SQLError($sql, mysqli_error($config['dbconnection']));
|
||||
exit("<br>Fatal error: Couldn't create table or view `".$tablename.'´');
|
||||
}
|
||||
return $tablename;
|
||||
}
|
||||
|
||||
function get_insert_syntax($table)
|
||||
{
|
||||
global $config;
|
||||
global $config;
|
||||
|
||||
$insert='';
|
||||
$sql='SHOW COLUMNS FROM `'.$table.'`';
|
||||
$res=mysqli_query($config['dbconnection'], $sql);
|
||||
if ($res)
|
||||
{
|
||||
$insert='INSERT INTO `'.$table.'` (';
|
||||
while ($row=mysqli_fetch_object($res))
|
||||
{
|
||||
$insert.='`'.$row->Field.'`,';
|
||||
}
|
||||
$insert=substr($insert,0,strlen($insert)-1).') ';
|
||||
}
|
||||
else
|
||||
{
|
||||
global $restore;
|
||||
v($restore);
|
||||
SQLError($sql,mysqli_error($config['dbconnection']));
|
||||
}
|
||||
return $insert;
|
||||
$insert = '';
|
||||
$sql = 'SHOW COLUMNS FROM `'.$table.'`';
|
||||
$res = mysqli_query($config['dbconnection'], $sql);
|
||||
if ($res) {
|
||||
$insert = 'INSERT INTO `'.$table.'` (';
|
||||
while ($row = mysqli_fetch_object($res)) {
|
||||
$insert .= '`'.$row->Field.'`,';
|
||||
}
|
||||
$insert = substr($insert, 0, strlen($insert) - 1).') ';
|
||||
} else {
|
||||
global $restore;
|
||||
v($restore);
|
||||
SQLError($sql, mysqli_error($config['dbconnection']));
|
||||
}
|
||||
return $insert;
|
||||
}
|
||||
|
||||
function del_inline_comments($sql)
|
||||
{
|
||||
//$sql=str_replace("\n",'<br>',$sql);
|
||||
$array=array();
|
||||
preg_match_all("/(\/\*(.+)\*\/)/U",$sql,$array);
|
||||
if (is_array($array[0]))
|
||||
{
|
||||
$sql=str_replace($array[0],'',$sql);
|
||||
if (DEBUG) echo "Nachher: :<br>".$sql."<br><hr>";
|
||||
}
|
||||
//$sql=trim(str_replace('<br>',"\n",$sql));
|
||||
//Wenn nach dem Entfernen nur noch ein ; übrigbleibt -> entfernen
|
||||
if ($sql==';') $sql='';
|
||||
return $sql;
|
||||
//$sql=str_replace("\n",'<br>', $sql);
|
||||
$array = [];
|
||||
preg_match_all("/(\/\*(.+)\*\/)/U", $sql, $array);
|
||||
if (is_array($array[0])) {
|
||||
$sql = str_replace($array[0], '', $sql);
|
||||
if (DEBUG) {
|
||||
echo 'Nachher: :<br>'.$sql.'<br><hr>';
|
||||
}
|
||||
}
|
||||
//$sql=trim(str_replace('<br>',"\n", $sql));
|
||||
//Wenn nach dem Entfernen nur noch ein ; übrigbleibt -> entfernen
|
||||
if (';' == $sql) {
|
||||
$sql = '';
|
||||
}
|
||||
return $sql;
|
||||
}
|
||||
|
||||
// extrahiert auf einfache Art den Tabellennamen aus dem "Create",Drop"-Befehl
|
||||
function get_tablename($t)
|
||||
{
|
||||
// alle Schluesselbegriffe entfernen, bis der Tabellenname am Anfang steht
|
||||
$t=substr($t,0,150); // verkuerzen, um Speicher zu sparen - wir brauchenhier nur den Tabellennamen
|
||||
$t=str_ireplace('DROP TABLE','',$t);
|
||||
$t=str_ireplace('DROP VIEW','',$t);
|
||||
$t=str_ireplace('CREATE TABLE','',$t);
|
||||
$t=str_ireplace('INSERT INTO','',$t);
|
||||
$t=str_ireplace('REPLACE INTO','',$t);
|
||||
$t=str_ireplace('IF NOT EXISTS','',$t);
|
||||
$t=str_ireplace('IF EXISTS','',$t);
|
||||
if (substr(strtoupper($t),0,16)=='CREATE ALGORITHM')
|
||||
{
|
||||
$pos=strpos($t,'DEFINER VIEW ');
|
||||
$t=substr($t,$pos,strlen($t)-$pos);
|
||||
}
|
||||
$t=str_ireplace(';',' ;',$t); // tricky -> insert space as delimiter
|
||||
$t=trim($t);
|
||||
// alle Schluesselbegriffe entfernen, bis der Tabellenname am Anfang steht
|
||||
$t = substr($t, 0, 150); // verkuerzen, um Speicher zu sparen - wir brauchenhier nur den Tabellennamen
|
||||
$t = str_ireplace('DROP TABLE', '', $t);
|
||||
$t = str_ireplace('DROP VIEW', '', $t);
|
||||
$t = str_ireplace('CREATE TABLE', '', $t);
|
||||
$t = str_ireplace('INSERT INTO', '', $t);
|
||||
$t = str_ireplace('REPLACE INTO', '', $t);
|
||||
$t = str_ireplace('IF NOT EXISTS', '', $t);
|
||||
$t = str_ireplace('IF EXISTS', '', $t);
|
||||
if ('CREATE ALGORITHM' == substr(strtoupper($t), 0, 16)) {
|
||||
$pos = strpos($t, 'DEFINER VIEW ');
|
||||
$t = substr($t, $pos, strlen($t) - $pos);
|
||||
}
|
||||
$t = str_ireplace(';', ' ;', $t); // tricky -> insert space as delimiter
|
||||
$t = trim($t);
|
||||
|
||||
// jetzt einfach nach dem ersten Leerzeichen suchen
|
||||
$delimiter=substr($t,0,1);
|
||||
if ($delimiter!='`') $delimiter=' ';
|
||||
$found=false;
|
||||
$position=1;
|
||||
while (!$found)
|
||||
{
|
||||
if (substr($t,$position,1)==$delimiter) $found=true;
|
||||
if ($position>=strlen($t)) $found=true;
|
||||
$position++;
|
||||
}
|
||||
$t=substr($t,0,$position);
|
||||
$t=trim(str_replace('`','',$t));
|
||||
return $t;
|
||||
// jetzt einfach nach dem ersten Leerzeichen suchen
|
||||
$delimiter = substr($t, 0, 1);
|
||||
if ('`' != $delimiter) {
|
||||
$delimiter = ' ';
|
||||
}
|
||||
$found = false;
|
||||
$position = 1;
|
||||
while (!$found) {
|
||||
if (substr($t, $position, 1) == $delimiter) {
|
||||
$found = true;
|
||||
}
|
||||
if ($position >= strlen($t)) {
|
||||
$found = true;
|
||||
}
|
||||
++$position;
|
||||
}
|
||||
$t = substr($t, 0, $position);
|
||||
$t = trim(str_replace('`', '', $t));
|
||||
return $t;
|
||||
}
|
||||
|
||||
// decide if an INSERT-Command is complete - simply count quotes and look for ); at the end of line
|
||||
function SQL_Is_Complete($string)
|
||||
{
|
||||
$string=str_replace('\\\\','',trim($string)); // trim and remove escaped backslashes
|
||||
$string=trim($string);
|
||||
$quotes=substr_count($string,'\'');
|
||||
$escaped_quotes=substr_count($string,'\\\'');
|
||||
if (($quotes-$escaped_quotes)%2==0)
|
||||
{
|
||||
$compare=substr($string,-2);
|
||||
if ($compare=='*/') $compare=substr(trim(remove_comment_at_eol($string)),-2);
|
||||
if ($compare==');') return true;
|
||||
if ($compare=='),') return true;
|
||||
}
|
||||
return false;
|
||||
$string = str_replace('\\\\', '', trim($string)); // trim and remove escaped backslashes
|
||||
$string = trim($string);
|
||||
$quotes = substr_count($string, '\'');
|
||||
$escaped_quotes = substr_count($string, '\\\'');
|
||||
if (($quotes - $escaped_quotes) % 2 == 0) {
|
||||
$compare = substr($string, -2);
|
||||
if ('*/' == $compare) {
|
||||
$compare = substr(trim(remove_comment_at_eol($string)), -2);
|
||||
}
|
||||
if (');' == $compare) {
|
||||
return true;
|
||||
}
|
||||
if ('),' == $compare) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function remove_comment_at_eol($string)
|
||||
{
|
||||
// check for Inline-Comments at the end of the line
|
||||
if (substr(trim($string),-2)=='*/')
|
||||
{
|
||||
$pos=strrpos($string,'/*');
|
||||
if ($pos>0)
|
||||
{
|
||||
$string=trim(substr($string,0,$pos));
|
||||
}
|
||||
}
|
||||
return $string;
|
||||
// check for Inline-Comments at the end of the line
|
||||
if ('*/' == substr(trim($string), -2)) {
|
||||
$pos = strrpos($string, '/*');
|
||||
if ($pos > 0) {
|
||||
$string = trim(substr($string, 0, $pos));
|
||||
}
|
||||
}
|
||||
return $string;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
MyOOS [Dumper]
|
||||
http://www.oos-shop.de/
|
||||
|
||||
Copyright (c) 2016 by the MyOOS Development Team.
|
||||
Copyright (c) 2013 - 2022 by the MyOOS Development Team.
|
||||
----------------------------------------------------------------------
|
||||
Based on:
|
||||
|
||||
@ -16,25 +16,35 @@
|
||||
Released under the GNU General Public License
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
$msd_path=realpath(dirname(__FILE__) . '/../') . '/';
|
||||
if (!defined('MSD_PATH')) define('MSD_PATH',$msd_path);
|
||||
$mod_path = realpath(dirname(__FILE__).'/../').'/';
|
||||
if (!defined('MOD_PATH')) {
|
||||
define('MOD_PATH', $mod_path);
|
||||
}
|
||||
session_name('MyOOSDumperID');
|
||||
session_start();
|
||||
if (!isset($download))
|
||||
{
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0",false);
|
||||
header("Pragma: no-cache");
|
||||
if (!isset($download)) {
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
}
|
||||
include MOD_PATH.'inc/functions.php';
|
||||
include MOD_PATH.'inc/mysqli.php';
|
||||
if (!defined('MOD_VERSION')) {
|
||||
exit('No direct access.');
|
||||
}
|
||||
if (!file_exists($config['files']['parameter'])) {
|
||||
$error = TestWorkDir();
|
||||
}
|
||||
include ( MSD_PATH . 'inc/functions.php' );
|
||||
include ( MSD_PATH . 'inc/mysql.php' );
|
||||
if (!defined('MSD_VERSION')) die('No direct access.');
|
||||
if (!file_exists($config['files']['parameter'])) $error=TestWorkDir();
|
||||
read_config($config['config_file']);
|
||||
include ( MSD_PATH . 'language/lang_list.php' );
|
||||
if (!isset($databases['db_selected_index'])) $databases['db_selected_index']=0;
|
||||
include MOD_PATH.'language/lang_list.php';
|
||||
if (!isset($databases['db_selected_index'])) {
|
||||
$databases['db_selected_index'] = 0;
|
||||
}
|
||||
SelectDB($databases['db_selected_index']);
|
||||
$config['files']['iconpath']='./css/' . $config['theme'] . '/icons/';
|
||||
if (isset($error)) echo $error;
|
||||
$config['theme'] = isset($config['theme']) ? $config['theme'] : 'mod';
|
||||
$config['files']['iconpath'] = './css/'.$config['theme'].'/icons/';
|
||||
if (isset($error)) {
|
||||
echo $error;
|
||||
}
|
||||
|