1
0
Fork 0

Commits vergleichen

...

Keine gemeinsamen Commits. "msd1.24stable" und "master" haben vollständig unterschiedliche Historien.

133 geänderte Dateien mit 7010 neuen und 6006 gelöschten Zeilen

2
.gitignore vendored Normale Datei
Datei anzeigen

@ -0,0 +1,2 @@
.idea
/work/

6
README.md Normale Datei
Datei anzeigen

@ -0,0 +1,6 @@
# MySQLDumper
Backup & Restore for MySQL databases
This project is no longer maintained and inactive. Please take a look for alternatives.
Adding version 1.24 as master to make bug fixing via pull request as easy as possible.

Datei anzeigen

@ -1,53 +1,107 @@
Changelog der wichtigsten Änderungen im Vergleich zur Version 1.22 (1.23 hat die Beta-Phase nie verlassen):
Version 1.24.4
Folgende Dinge wurden geändert:
- Allgemein: Wenn "inc" in der Domain oder im Pfad zum MySQLDUmper-Verzeichnis vorkam, konnte die Datei runtime.php nicht eingebunden werden.
- Home / Konfiguration: beim Speichern der Perl-Konfigurationsdatei wurden die Auswahl der zu sichernden Datenbanken nicht korrekt gespeichert.
- Home / Verzeichnisschutz: beim Anlegen des Verzeichnisschutzes wurden PHP-Warnungen ausgegeben wenn PHP kleiner 5.3.0 genutzt wird.
- Perl: Einige kosmetische Änderungen in der Ausgabe.
- Perl: Schreibt "DROP VIEW" anstelle von "DROP TABLE" in die Backupdatei wenn es sich um einen VIEW handelt.
- Perl: Ausgabe des Typs einer Tabelle zur Ausgabe hinzugefügt.
Version 1.24.3
Folgende Dinge wurden geändert:
- Manuelles Hinzufügen von Datenbanken: Das interne Handling wurde überarbeitet. Die Datei dbs_manual.php ist nicht mehr notwendig; manuell hinzugefügte Datenbanken werden nun im jeweiligen Konfigurationsprofil gespeichert.
- Home / Verzeichnisschutz: Beim Anlegen war die Ausgabe über Erfolg / Misserfolg vertauscht.
- Home / Verzeichnisschutz: Schlägt das Erstellen des Schutzes fehl, so enthielt die folgende Anzeige der Inhalte der Dateien unschöne <br>'s, die nicht in die Dateien gehören.
- Home / Verzeichnisschutz: Der erstellten htaccess-Datei wurde "RewriteEngine off" hinzugefügt. Das vermindert Probleme, wenn MySQLDumper in einen Unterordner bestehender Systeme installiert wird, die selbst mod_rewrite nutzen.
- Home / Verzeichnisschutz: Funktion zum Editieren eines bestehenden Schutzes wurde überarbeitet.
- Home / Datenbanken: Der Key Status wurde unvollständig ermittelt. Es wurde für jede Tabelle nur der erste Index betrachtet.
- SQLBrowser / Tabellenstruktur: Bei der Anzeige der Felder und Indizes ist die Spalte "Kommentar" hinzugekommen.
- SQLBrowser / Tabellenstruktur: Die Verwaltung für Indizes wurde überarbeitet. Es können nun beliebige Indizes festgelegt werden, was bisher auf Primärschlüssel beschränkt war.
- SQLBrowser: Die Systemtabelle "information_schema" wird nun angezeigt und kann betrachtet werden.
- SQLBrowser: Ein Fehler, welcher die korrekte Funktion der Suche verhindern konnte, wurde korrigiert.
- SQLBrowser: Bei bestimmten Anfragen wurde die Anzahl der Datensätze nicht korrekt ermittelt.
- SQLBrowser: Datensätze, welche in einem Feld das Zeichen "|" enthalten, konnten unter Umständen nicht editiert werden.
- SQLBrowser: Die Fehlerbehandlung wurde verbessert.
- Wiederherstellung: Bei der Wiederherstellung von Backups anderer Skripte wurden "CREATE DATABASE"-Anweisungen nicht korrekt erkannt.
- Verwaltung / Backup-Konverter: Im Backup-Konverter befand sich ein fehlerhafter Funktionsaufruf, der eine Fehlermeldung verursachte.
- Perl: in der Perl-Datei crondump.pl wurden Warnungen ausgegeben, wenn die Option "Autodelete" aktiviert ist und sich Backups anderer Programme im work/backup-Ordner befinden.
- Perl: Anzeige der Perl-Version, Kleinigkeiten bei der Fehlerbehandlung, Schriftart in der HTML-Ausgabe
- Perl: Unterstützung von FTP via SSL (NET::FTPSSL-Perl-Modul notwendig)
- Perl: Die optionalen SQL-Befehle (Command Before/After) können nun mit mehreren, aufeinanderfolgenden Querys konfiguriert werden
Version 1.24.2
Folgende Dinge wurden geändert:
- Trotz der inteligenten Umgehung des PHP-Timeouts, kann es während einer Wiederherstellung beim Aufbau von Indexen großer Tabellen zu einem Timeout kommen.
Jetzt kann man MySQLDumper so konfigurieren, dass während der Wiederherstellung "ENABLE KEYS"-Befehle ignoriert werden.
Nach der Wiederherstellung müssen die so deaktivierten Schlüssel/Indexe manuell wieder aktiviert werden.
Dies geschieht unter Home/Datenbanken/Datenbank wählen/ Button: Enable keys. Die Option und eine entsprechende Nachricht wird automatisch eingeblendet wenn nicht aktivierte Schlüssel/Indexe erkannt werden => nichts zu sehen = nichts zu tun.
- Bei Systemen, die den Wert 0 in auto_increment-Feldern nutzen (z.B. bei Magento), kann die Wiederherstellung den Eintrag mit dem Wert 0 verfälschen, so dass es in der Anwendung (die gesicherte Anwendung, nicht MySQLDumper) zu Fehlfunktionen kommen kann.
Nun setzt MySQLDumper für die Dauer der Wiederherstellung den SQL-Modus auf "NO_AUTO_VALUE_ON_ZERO", so dass auch ungültige Werte aus der Originalanwendung unverfälscht erhalten bleiben.
- Das Perl Skript wirft Warnungen beim Sichern von VIEWS.
- Beim Sichern über die Web-Gui und aktivierter Option "Tabellen optimieren" hat diese aufgrund eines fehlerhaften Befehls
keine Auswirkung.
--------------------
Version 1.24
Changelog der wichtigsten Änderungen im Vergleich zur Version 1.22 (1.23 hat die Beta-Phase nie verlassen):
- MySQLDumper 1.24 funktioniert nach wie vor sowohl mit PHP4 als auch mit PHP5
- neue, helle und freundliche Optik. Der "alte" Style ist für "Nostaligiker" ebenfalls enthalten.
- neue, helle und freundliche Optik. Der "alte" Style ist für "Nostaligiker" ebenfalls enthalten.
- bessere Speicherausnutzung
- Backup und Wiederherstellung per PHP sind im Schnitt ca. 25 Prozent schneller
- Möglichkeit beim Sichern und auch beim Wiederherstellen nur bestimmte Tabellen auszuwählen
- Nutzen von mehreren MySQL-Servern und -Usern über Konfigurationsprofile.
Damit kann man mehrere Server über eine MySQLDumper-Installation warten und sichern.
- der interne SQL-Parser ist an vielen Stellen verbessert worden (noch mehr Fremdbackups können importiert werden)
- Möglichkeit beim Sichern und auch beim Wiederherstellen nur bestimmte Tabellen auszuwählen
- Nutzen von mehreren MySQL-Servern und -Usern über Konfigurationsprofile.
Damit kann man mehrere Server über eine MySQLDumper-Installation warten und sichern.
- der interne SQL-Parser ist an vielen Stellen verbessert worden (noch mehr Fremdbackups können importiert werden)
- SQLBrowser: jede Menge Bugfxies und kleinere Erweiterungen (dennoch ist der SQLBrowser noch als experimentell einzustufen)
- SQLBrowser: über die Lupe kommt man zu einer durchdachten Vollextsuche. Editiert man einen Datensatz, kommt man zur Trefferliste zurück.
Das ist recht komfortabel wenn man Stellen finden muss, von denen man nicht genau weiß in welchen Spalten sie vorkommen können.
- SQLBrowser: über die Lupe kommt man zu einer durchdachten Vollextsuche. Editiert man einen Datensatz, kommt man zur Trefferliste zurück.
Das ist recht komfortabel wenn man Stellen finden muss, von denen man nicht genau weiß in welchen Spalten sie vorkommen können.
- Tools: der Export von Daten als Datei funktionierte in 1.22 nicht. Jetzt klappt das wieder.
- die Konfiguration in der WEB-GUI wurde an einigen Stellen nochmals vereinfacht und überflüssige Parameter entfernt
- die Konfiguration in der WEB-GUI wurde an einigen Stellen nochmals vereinfacht und überflüssige Parameter entfernt
(Du hast kaum noch eine Chance etwas "falsch" einzustellen. :) )
- FTP-Übertragung kann nun optional auf bis zu 3 unterschiedliche Server gleichzeitig erfolgen
- FTP-Übertragung kann nun optional auf bis zu 3 unterschiedliche Server gleichzeitig erfolgen
- Tabellen vom Typ VIEW und MEMORY werden nun automatisch erkannt und deren Daten korrekterweise nicht mitgesichert, wohl aber deren Struktur.
- das Verzeichnis work/structure wird nicht mehr benötigt
- das Verzeichnis work/structure wird nicht mehr benötigt
- die automatisch immer mit angelegten Struktur-Backups wurden entfernt
- noch besseres, internes Handling der Kodierung von Backups (Umlautproblematik)
- Fehler (auch beim Sichern) werden noch zuverlässig abgefangen und aussagekräftig im Log notiert
- Konverter: wurde neu geschrieben. Jetzt werden große Dateien beim Konvertieren automatisch in Multipart-Dateien aufgeteilt
- Fehler (auch beim Sichern) werden noch zuverlässig abgefangen und aussagekräftig im Log notiert
- Konverter: wurde neu geschrieben. Jetzt werden große Dateien beim Konvertieren automatisch in Multipart-Dateien aufgeteilt
- keine Notices in Server-Logs mehr
- Beim Anlegen von gespeicherten SQL-Befehlen können nun mehrere Queries angegeben werden, die bei Nutzung von "Command before/after backup"
nacheinander ausgeführt werden. Der Erfolg oder Mißerfolg wird om Logfile notiert.
- Beim Anlegen des Verzeichnisschutzes wird die Stärke des Kennworts visualisiert.
- Beim Anlegen von gespeicherten SQL-Befehlen können nun mehrere Queries angegeben werden, die bei Nutzung von "Command before/after backup"
nacheinander ausgeführt werden. Der Erfolg oder Mißerfolg wird om Logfile notiert.
- Beim Anlegen des Verzeichnisschutzes wird die Stärke des Kennworts visualisiert.
crodump.pl:
- wenn die crondump.pl im Standardordner "msd_cron" aufgerufen werded kann, braucht man den "$absolute_path_of_configdir" nicht mehr editieren.
Hier findet nun eine automatische Erkennung statt.
- besseres Abfangen von Fehlern
- es wird präziser mit aussagekräftigen Nachrichten geloggt
- automatisches Löschen betrachtet Multipart-Dateien nun korrekt als 1 vollständiges Backup und funktioniert wie erwartet
- das automatische Löschen wird nicht mehr zu Beginn ausgeführt, sondern erst nach Beenden des Sicherungsvorgangs
- es wird präziser mit aussagekräftigen Nachrichten geloggt
- automatisches Löschen betrachtet Multipart-Dateien nun korrekt als 1 vollständiges Backup und funktioniert wie erwartet
- das automatische Löschen wird nicht mehr zu Beginn ausgeführt, sondern erst nach Beenden des Sicherungsvorgangs
(somit bleiben im Fehlerfall alte Backups erhalten)
- der Parameter der zu nutzenden Konfigurationsdatei kann im Aufruf nun auf 3 Arten angegeben werden.
Die fehlende Endung ".conf.php" wird bei Bedarf automatisch ergänzt:
Die fehlende Endung ".conf.php" wird bei Bedarf automatisch ergänzt:
1. config=mysqldumper.conf.php
2. config=mysqdumper.conf
3. config=mysqldumper
- Signalhandler entfernt:
Dieser sollte eigentlich einen Abbruch des Users melden und das Skript beenden. Über einen Cronjob aufgerufen führte dies bei einigen, wenigen
Dieser sollte eigentlich einen Abbruch des Users melden und das Skript beenden. Über einen Cronjob aufgerufen führte dies bei einigen, wenigen
Servern zu der Fehlfunktion, dass mehrere Instanzen des Skripts gestartet wurden, die lange in der Prozesliste standen und manuell beendet
werden mussten.
... und viele weitere kleine und große Bugfixes und jede Menge Aufräumarbeiten im Code.
... und viele weitere kleine und große Bugfixes und jede Menge Aufräumarbeiten im Code.
Wer Du es ganz genau wissen möchtest, dann schaue Dir das changelog auf Sourceforge an. Hier ist akribisch
jede Änderung am Code dokumentiert:
Wer Du es ganz genau wissen möchtest, dann schaue Dir das changelog auf Sourceforge an. Hier ist akribisch
jede Änderung am Code dokumentiert:
http://mysqldumper.svn.sourceforge.net/viewvc/mysqldumper/trunk/?view=log

Datei anzeigen

@ -1,6 +1,56 @@
Version 1.24.4
We addressed the following issues:
- General: If "inc" was anywhere in the path or the domain to the MySQLDumper-Root-Diretory the file runtime.php couldn't be included.
- Configuration: When saving the Perl configuration file, the selected databases to be backed up have been saved incorrectly.
- Home / directory protection: At creating the protection PHP-Warnings were shown if running PHP lower than 5.3.0.
- Perl: Some cosmetic changes in output
- Perl: Write "DROP VIEW" instead of "DROP TABLE" to backup file if table is a view.
- Perl: Added type of table to log output.
Version 1.24.3
We addressed the following issues:
- Configuration / Databases / Connection Parameter: manual adding of databases: The internal handling was completely modified. The file dbs_manual.php is no longer needed. Manually added databases are now stored in the selected configuration profile.
- Home / directory protection: Fixed a bug that inverted the resulting message of success / failure.
- Home / directory protection: If the automatic creation of the directory protection failed, the displayed content of the .htaccess file to be created manually contained some messy <br> html code.
- Home / directory protection: The created .htaccess file was extended with "RewriteEngine off". That fixes some problems if MySQLDumper was installed in a sub-folder of an existing website that also used .htaccess files with "mod_rewrite".
- Home / directory protection: The functionality for editing an existing protection was revised.
- Home / Databases: The key status was determined incompletely so that only the first index of each table was considered.
- SQL-Browser / table structure: Added the row "comment" in the display of fields and indexes.
- SQL-Browser / table structure: The functionality for managing keys was revised. It is now possible to define any kind of keys which was limited to primary keys.
- SQL-Browser: The system table "information_schema" is now displayed and can be browsed.
- SQL-Browser: A bug was fixed that could prevent the search from working correctly.
- SQL-Browser: For some queries the number of records was not determined correctly.
- SQL-Browser: Records containing the character "|" could not be edited in some cases.
- SQL-Browser: Error handling was improved.
- Restore: When restoring backups that were not created with MySQLDumper, CREATE DATABASE statements were not recognized correctly.
- File-Administration / Backup Converter: Inside the backup converter there was a buggy routine that caused an error message.
- Backup / Perl: When the configuration option "autodelete" was activated and the folder work/backup contained files not created by MySQLDumper, the perl script crondump.pl issued warning messages.
- Perl: Show perl version, better error handling, nicer font with html
- Perl: Support for FTP over SSL added (NET::FTPSSL perl modul necessary).
- Perl: The optional SQL-Commands (Command Before/After) can now handle multiple Queries.
Version 1.24.2
We addressed the following issues:
- Although MySQLDumper bypasses timeouts by taking care of PHP's max_execution_time, it can happen that building the index of a big table leads to a timeout.
Now you can can configure MySQLDumper to ignore "ENABLE KEYS" statements while restoring a backup. But remember to enable them manually afterwards.
This is done under Home/Databases/Select database/ Button: Enable Keys. This option and a message will only show up, if MySQLDumper detects disabled keys or indexes.
- When systems use the value 0 for auto_increment fields (e.g. Magento), restoring could change the value which could cause the app to malfunction.
While restoring MySQLDumper now sets the SQL-Mode to "NO_AUTO_VALUE_ON_ZERO" for the restoring session.
- The Perl script crondump.pl threw warnings when backing up views.
- When backing up via the gui the option "optimize tables" has no effect because of an incomplete query.
--------------------
Version 1.24
Changelog of the most important changes compared to version 1.22 (1.23 never left the beta status):
- MySQLDumper 1.24 still is wokring on PHP4 and PHP5
- MySQLDumper 1.24 still is working on PHP4 and PHP5
- new, light and friendly style. The "old" style is still included.
- better use of RAM
- backup and restore via PHP is about 25 percent faster

100
ReadMe/changelog_español.txt Normale Datei
Datei anzeigen

@ -0,0 +1,100 @@
Versión 1.24.4
Hemos abordado los siguientes temas:
- General: Si "inc" estaba en cualquier parte de la ruta o el dominio a la MySQLDumper-Root-Diretory, el archivo runtime.php no pudo ser incluido.
- Configuración: Al guardar el archivo de configuración de Perl, las bases de datos seleccionadas para realizar una copia de seguridad se han guardado incorrectamente.
- Protección de inicio / directorio: Al crear la protección se mostraron PHP-Advertencias si se ejecuta PHP inferior a 5.3.0.
- Perl: Algunos cambios cosméticos en la salida
- Perl: Escribir "DROP VIEW" en lugar de "DROP TABLE" al archivo de copia de seguridad si la tabla es una vista.
- Perl: Se agregó el tipo de tabla para registrar la salida.
Versión 1.24.3
Hemos abordado los siguientes temas:
- Configuración / Bases de datos / Parámetro de conexión: adición manual de bases de datos: El manejo interno fue completamente modificado. El archivo dbs_manual.php ya no es necesario. Las bases de datos añadidas manualmente se almacenan ahora en el perfil de configuración seleccionado.
- Protección de inicio / directorio: Corregido un error que invirtió el mensaje resultante de éxito / fracaso.
- Protección de inicio / directorio: Si falla la creación automática de la protección de directorio, el contenido mostrado en el archivo .htaccess que se va a crear manualmente contiene algún código html desordenado.
- Protección de inicio / directorio: El archivo .htaccess creado se extendió con "RewriteEngine off". Esto soluciona algunos problemas si MySQLDumper se instaló en una subcarpeta de un sitio web existente que también usaba archivos .htaccess con "mod_rewrite".
- Protección de inicio / directorio: Se revisó la funcionalidad para editar una protección existente.
- Inicio / Bases de datos: El estado clave se determinó de manera incompleta de modo que sólo se consideró el primer índice de cada tabla.
- SQL-Navegador / estructura de tabla: Se agregó la fila "comentario" en la visualización de campos e índices.
- SQL-Browser / estructura de tabla: Se revisó la funcionalidad para gestionar claves. Ahora es posible definir cualquier tipo de claves que estuviera limitada a las claves primarias.
- SQL-Browser: La tabla de sistema "information_schema" ahora se muestra y se puede navegar.
- SQL-Browser: Se ha corregido un error que podría impedir que la búsqueda funcione correctamente.
- SQL-Browser: Para algunas consultas el número de registros no se determinó correctamente.
- SQL-Browser: Registros que contienen el carácter "|" No se pudo editar en algunos casos.
- SQL-Browser: Se ha mejorado el manejo de errores.
- Restaurar: Al restaurar copias de seguridad que no se crearon con MySQLDumper, las sentencias CREATE DATABASE no fueron reconocidas correctamente.
- File-Administration / Backup Converter: Dentro del convertidor de copia de seguridad había una rutina de buggy que causó un mensaje de error.
- Backup / Perl: Cuando la opción de configuración "autodelete" fue activada y la carpeta work / backup contenía archivos no creados por MySQLDumper, el script perl crondump.pl emitió mensajes de advertencia.
- Perl: Mostrar versión de Perl, mejor manejo de errores, mejor fuente con html
- Perl: Se ha añadido soporte para FTP a través de SSL (NET :: FTPLL perl modul necesario).
- Perl: Los comandos SQL opcionales (Command Before / After) ahora pueden manejar varias consultas.
Versión 1.24.2
Hemos abordado los siguientes temas:
- Aunque MySQLDumper ignora los timeouts (tiempos fuera) de espera al cuidar el max_execution_time de PHP, puede suceder que construir el índice de una tabla grande conduzca a un tiempo de espera.
Ahora puede configurar MySQLDumper para ignorar las sentencias "ENABLE KEYS" mientras restaura una copia de seguridad. Pero recuerde habilitarlos manualmente después.
Esto se realiza en Inicio / Bases de datos / Seleccionar base de datos / Botón: Habilitar claves. Esta opción y un mensaje solo aparecerán si MySQLDumper detecta claves o índices inhabilitados.
- Cuando los sistemas usan el valor 0 para campos de auto_increment (por ejemplo, Magento), la restauración podría cambiar el valor que podría provocar que la aplicación funcione mal.
Mientras restaura MySQLDumper ahora establece el modo SQL como "NO_AUTO_VALUE_ON_ZERO" para la sesión de restauración.
- El script de Perl crondump.pl lanzó advertencias al realizar copias de seguridad de vistas.
- Al realizar una copia de seguridad a través del gui, la opción "optimizar tablas" no tiene ningún efecto debido a una consulta incompleta.
--------------------
Versión 1.24
Changelog de los cambios más importantes en comparación con la versión 1.22 (1.23 nunca dejó el estado beta):
- MySQLDumper 1.24 sigue trabajando en PHP4 y PHP5
- estilo nuevo, ligero y amistoso. El "viejo" estilo sigue siendo incluido.
- mejor uso de la RAM
- la copia de seguridad y restauración a través de PHP es aproximadamente un 25% más rápida
- posibilidad de seleccionar tablas al hacer una copia de seguridad o restauración
- utilizar diferentes perfiles de configuración para gestionar diferentes MySQL-Server o -user.
  De esta manera usted puede mantener diferentes MySQL-Server con un solo MySQLDumper-Instalación.
- el SQL-Parser interno se ha mejorado (más copias de seguridad de otros programas pueden ser importet)
- SQLBrowser: un montón de correcciones de errores y algunas mejoras (sin embargo, debe ser considerado como experimental)
- SQLBrowser: una cómoda búsqueda fulltext le permite encontrar texto incluso cuando no sabe en qué columna puede ocurrir
  Después de editar un registro volverá a la lista de resultados. Eso realmente es cómodo cuando se necesita cambiar los datos.
- Herramientas: en la versión 1.22 la exportación de datos como archivo no funcionó. Ahora está funcionando de nuevo.
- la GUI Web ha sido simplificada. Se han eliminado algunos parámetros. (Casi no tienes la oportunidad de configurar algo incorrectamente :))
- FTP-Transfer: direcciona hasta 3 configuraciones de ftp simultáneamente en un proceso de reserva
- Ahora se detectan las tablas de tipo VIEW o MEMORY y los datos no se guardan, pero la estructura de la tabla es
- el directorio de trabajo / estructura ya no es necesario
- se ha eliminado la copia de seguridad automática de "estructura única"
- mejor y más seguro manejo de las codificaciones de los archivos de copia de seguridad
- mejor y más seguro manejo de errores
- el convertidor de copia de seguridad ha sido reescrito. Ahora también convierte automáticamente archivos grandes en archivos Multipart.
- no hay avisos en los registros del servidor
- al agregar consultas SQL a la biblioteca de SQL, ahora puede introducir más de una consulta. Si utiliza "commadn antes / después de la copia de seguridad"
  Estas consultas se ejecutarán en una fila. Suces o falla se escribe en el archivo de registro.
- Al crear una protección por contraseña se visualiza la fuerza de la contraseña.
Crodump.pl:
- cuando se puede llamar a crondump.pl en el directorio estándar "msd_cron" ya no es necesario ingresar el
  "$ Absolute_path_of_configdir" manualmente. Se añadió una detección automática.
- una mejor y más segura captura de errores
- registro de eventos es mucho más preciso y le da declaraciones claras lo que sucedió
- la eliminación automática ahora considera archivos Multipart como una copia de seguridad completa y funciona de la manera que usted espera que funcione
- la eliminación automática se realiza después del proceso de copia de seguridad. En caso de errores, esto conserva las copias de seguridad antiguas que pueda necesitar.
- el parámetro de configuración - el perfil de configuración que se va a utilizar - se puede configurar de tres maneras. El sufijo faltante
  ".conf.php" se añadirá dinámicamente.
1. config = mysqldumper.conf.php
2. config = mysqdumper.conf
3. config = mysqldumper
- manipulador de señales eliminado:
Cuando crondump.pl se inició a través de un cronjob hubo un mal funcionamiento. En algunos, un servidor raro este manipulador de señales causó un segundo
O tercera instancia de la secuencia de comandos que nunca se detuvo y se quedó en la lista de procesos. En este caso el proceso debe ser eliminado manualmente.
... y muchos más pequeños o grandes correcciones de errores y la limpieza del código
Cuando quiera saber más, eche un vistazo al changelog de mis cambios de código en Sourceforge. Cada cambio
Del código se documenta aquí:
Http://mysqldumper.svn.sourceforge.net/viewvc/mysqldumper/trunk/?view=log

Datei anzeigen

@ -2,4 +2,4 @@ Installation:
- upload the folder mysqldumper to any folder on your webspace
- start the script in your browser (http://www.yourDomain.de/yourFolder/mysqldumper/)
- Follow the Installatio assistent
- Follow the Installation assistent

6
ReadMe/install_español.txt Normale Datei
Datei anzeigen

@ -0,0 +1,6 @@
Instalación:
- Descargue la carpeta MySQLDumper en su espacio web
- Cambie los derechos de config.php a 777
- Navegue a su sitio (por ejemplo: http://www.su_sitio_de_internet.mx/mysqldumper/)
- Sigue la instalación

87
ReadMe/license_español.txt Normale Datei
Datei anzeigen

@ -0,0 +1,87 @@
Licencia Pública General de GNU
Versión 2 (junio de 1991)
Copyright © 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 EE.UU. Se permite la copia y distribución de copias literales de esta licencia, siempre y cuando no entren en los cambios.
preámbulo
La mayoría de las licencias de software están diseñadas para privar al usuario de la libertad de compartir y modificar el software. Por el contrario, la Licencia Pública General de GNU pretende garantizar su libertad de compartir y modificar software libre, para asegurar que el software es libre para todos sus usuarios. Esta Licencia Pública General se aplica a la mayoría del software de la Free Software Foundation, así como cualquier otro programa cuyos autores se comprometen a utilizarla (ningún otro software de la Free Software Foundation que se rige, en cambio, por la Licencia Pública General reducida GNU). También puede aplicarla a sus propios programas.
Cuando se habla de software libre expresión de libertad, no de precio. Nuestras Licencias Públicas Generales están diseñadas con el objetivo de garantizar su libertad de distribuir copias de software libre (y cobrar por ese servicio si lo desea), que reciba el código fuente o que pueda recibir, si lo desea, tiene la posibilidad para modificar el software o usar fragmentos de él en nuevos programas libres, y que, por otra parte, es consciente de que puede hacerlo todo.
Para proteger sus derechos, necesitamos introducir algunas restricciones que impiden que cualquier otro puede negar estos derechos o pedirle que renuncie a ellos. Estas restricciones implican ciertas obligaciones que le afectan si distribuir copias del software o modificar.
Por ejemplo, si distribuye copias del software libre, ya sea libre o no, lo tiene que dar a los receptores todos los derechos que tiene. Tendrá que asegurarse de que estos, también, reciban o puedan obtener el código fuente y tendrán que mostrar estos términos para informarles de sus derechos.
Hay dos pasos para proteger sus derechos: (1) poner el software con derechos de autor y (2) le ofrecemos esta licencia, que autoriza legalmente copiar, distribuir y / o modificar el software.
También, como una protección para todos los autores y nosotros mismos, es importante hacerles claro a todas las partes que no existe garantía para este software libre. En el caso de que cualquier usuario puede modificar el software y luego distribuir a un tercero, los beneficiarios deben saber que lo que nos trajeron no es el software original, por lo que cualquier problema introducido por la otra parte no afecta a la reputación de los autores originales.
Por último, cualquier programa libre está constantemente amenazado por las patentes de software. Nuestra intención es evitar el peligro de que los redistribuidores de un programa libre obtengan patentes por su cuenta, por lo tanto, su programa de software registrado. Para evitar esto, deja claro que cualquier patente debe garantizar la transferencia de la licencia a cualquier usuario que sea posible, para que todos puedan utilizar el software libre o de otro modo, no debe garantizar que nadie ninguna licencia.
A continuación se enumeran los términos y condiciones exactos para la copia, distribución y modificación.
Licencia Pública General de GNU
TÉRMINOS Y CONDICIONES PARA LA COPIA, distribución y modificación
0. Esta Licencia se aplica a cualquier programa o producto contenida de otra manera en una nota colocada por el titular de los derechos de autor para especificar que puede ser distribuido bajo los términos de esta Licencia Pública General. En lo sucesivo, el término "programa" se refiere a cualquier programa o producto de este tipo, mientras que el término "basado en el Programa" se refieren al programa tanto como cualquier producto derivado de acuerdo con la ley de derechos de autor, es decir, cualquier producto que contiene el programa o una porción del mismo, ya sea literal o con modificaciones y / o traducido a otro idioma. (De aquí en adelante, la traducción está incluida sin ningún límite en el término "modificación".) Las licencias se escriben en la forma de cortesía cómo a "usted".
Cualquier actividad que no sea la copia, distribución y modificación no están cubiertas por esta licencia, pero quedan fuera de su alcance. No se restringen a la acción para ejecutar el programa, y los resultados extraídos del Programa están cubiertos únicamente si sus contenidos constituyen un trabajo basado en el Programa (independientemente de si se hace ejecutando el Programa). Esto es cierto o no, dependerá de lo que haga el programa.
1. Usted puede copiar y distribuir copias literales del código fuente del Programa, ya que recibe, en cualquier medio, siempre que cada copia incluye, de manera adecuada y suficientemente visibles, las indicaciones requeridas relativas a la propiedad intelectual y la exención del garantía de que mantenga intactos todos los avisos que se refieran a esta licencia ya la ausencia de cualquier interés para ellos y entregado a todos los demás destinatarios del programa una copia de esta licencia junto con el programa.
Puede cobrar un precio por el acto físico de transferir una copia, y si lo desea, también puede ofrecer una cierta garantía a cambio de una tarifa.
2. Puede modificar su copia o copias del Programa o cualquier parte de ella, y así obtener un producto basado en el Programa, y copiar y distribuir tales modificaciones o producto en los términos del apartado 1 anterior, siempre que se mantengan también con todas las condiciones siguientes:
a) Debe hacer que cualquier archivo modificado incluye instrucciones en un lugar destacado sentido de que el archivo correspondiente se modificó, y la fecha de cualquier cambio.
b) Debe hacer que cualquier producto distribuido ni publicado por usted, en su totalidad o en parte contiene o se deriva del Programa o de cualquier parte del programa, obtener una licencia en su conjunto sin este impacto gasto alguno a ningún acuerdo con terceras partes con los términos de esta licencia.
c) Si el programa modificado lee normalmente órdenes interactivamente cuando es ejecutado, debe hacer que, cuando su ejecución para ese uso interactivo de la más común, mostrar o exhibir un aviso que incluya la información correspondiente al programa de propiedad intelectual y la ausencia de cualquier interés (o, en su caso, al hecho de que usted es el que da la garantía), la indicación de que los usuarios pueden redistribuir el programa de acuerdo con estas condiciones y la información necesaria para conocer cómo el acceso de un usuario copia de esta licencia. (Excepción: si el propio programa es interactivo pero normalmente no muestra este tipo de advertencias, no es necesario que su producto basado en el Programa muestre ningún aviso.)
Estos requisitos se aplican al producto modificado como un todo. Si el producto contiene secciones fácilmente identificables no derivadas del Programa, que razonablemente puede considerarse como productos separados e independientes para sí mismos, pero esta licencia y sus términos no se aplican a esas partes cuando sean distribuidas como productos separados. Pero si esas mismas secciones se distribuyen como parte de un todo que consiste basado en el Programa, la distribución de todos debe ser la sede de los términos de esta licencia, cuyas disposiciones se aplican a todos los demás poseedores de la licencia, que cubre todo el conjunto y, en En consecuencia, todas y cada una de las partes de la articulación independientemente de quien los escribe.
Así que el propósito de esta sección no ha sido reclamar los derechos o refutar sus afirmaciones sobre cualquier producto en para usted en su totalidad; más bien al contrario, su propósito es ejercer el derecho a controlar la distribución de derivados o colectivos basados en el Programa.
Por otra parte, la simple agregación de Programa (o un trabajo basado en el Programa) otro producto no basado en el Programa en un volumen de un medio de distribución o almacenamiento no implica la inclusión de otros productos dentro del alcance de esta licencia.
3. Usted puede copiar y distribuir el Programa (o un producto basado en él, según los términos de la Sección 2) en código objeto o en formato ejecutable según los apartados 1 y 2 anteriores, siempre que cumplan también con los siguientes requisitos:
a) Acompañarlo con el código fuente completo correspondiente en formato legible por máquina, que se distribuye bajo los términos de los apartados 1 y 2 anteriores, en un medio habitualmente utilizado para el intercambio de software.
b) Acompañarlo con una oferta por escrito, válida durante al menos tres años, que fue dada a terceros, por un costo sea superior a los costes en que se puede incurrir en la ejecución física de la distribución del código fuente, un formato de copia completa código fuente legible por la máquina, que se ha distribuido bajo los términos de las secciones 1 y 2 anteriores, en un medio habitualmente utilizado para el intercambio de software.
c) Acompañarlo con la información que recibió sobre la oferta de distribución del código fuente correspondiente. (Esta opción se permite sólo para distribución no comercial y sólo si usted recibió el programa como código objeto o en formato ejecutable con tal oferta acabamos de explicar, de conformidad con el apartado b anterior).
Se entiende por una fuente que trabaja su formato más adecuado cuando se le hacen modificaciones. En el caso de un trabajo ejecutable, se considera el código fuente completo todo el código fuente para todos los módulos, que incluye todos los archivos de definición de interfaz asociados y los guiones utilizados para controlar la compilación e instalación del ejecutable. Sin embargo, como una excepción especial, el código fuente distribuido no necesita incluir nada que sea distribuido normalmente (ya sea binaria o fuente) con los componentes principales (compilador, kernel, etc.) del sistema operativo en el cual funciona el ejecutable, salvo que dicha el propio componente acompañe al ejecutable.
Si la distribución del ejecutable o del código objeto se hace mediante la concesión de acceso a la copia desde un lugar designado, a continuación, la concesión de acceso para copiar el código fuente desde el mismo lugar que se considera como distribución del código fuente, aunque se requiere un tercero para copiar el código fuente junto con el objeto.
4. Usted no puede copiar, modificar, sublicenciar o distribuir el Programa excepto las expresamente mencionadas en este documento. Cualquier otro intento de copiar, modificar, sublicenciar o distribuir el programa es nulo, y supondrá la cancelación automática de los derechos de la concesión de esta licencia. Sin embargo, las partes a las que las copias o los derechos concedidos en virtud de los términos de esta licencia no se resuelva sus respectivas licencias, siempre que cumplan plenamente con todo lo que en ellos se estipula.
5. Teniendo en cuenta que no han firmado, no está obligado a aceptar estos términos. Sin embargo, ella es la única que autoriza modificar o distribuir el Programa o cualquier obra derivada. Estas acciones están prohibidas por la ley, mientras no aceptar esta licencia. Por lo tanto, al modificar o distribuir el Programa (o cualquier trabajo basado en el Programa) está indicando que acepta esta Licencia para la ejecución de estas acciones, así como todos los términos y condiciones establecidos en el mismo para la copia, distribución o la modificación del programa o cualquier producto basado en él.
6. Cada vez que redistribuya el Programa (o cualquier trabajo basado en el Programa), el receptor recibirá automáticamente una licencia del licenciatario original para copiar, distribuir o modificar el Programa sujeto a estos términos y condiciones. Usted no puede imponer ninguna restricción adicional sobre el ejercicio de los derechos establecidos en el mismo por el receptor. Usted no es responsable cuando un tercero para exigir el cumplimiento de los términos establecidos en este documento.
7. Si, como consecuencia de una resolución judicial o alegación patente violación, o por cualquier otra razón (no limitada a asuntos relacionados con patentes), dio lugar a la imposición de cualquier condición (ya sea por orden judicial, acuerdo o cualquier otra causa) que contradigan las condiciones de esta licencia, que no le exime de cumplir las condiciones de esta licencia. Para que no sea posible distribuir el programa respetando las obligaciones bajo esta licencia y asimismo cualquier otra obligación pertinente, entonces usted tiene que dejar de distribuir de ninguna manera. Por ejemplo, si hay una licencia de patente que no permite la redistribución del Programa libre de derechos de autor por parte de todos aquellos que reciban copias directa o indirectamente de usted, la única manera de cumplir con los términos de la licencia de patentes y más de esta licencia, al mismo tiempo estarían evitando por completo la distribución del programa.
En el caso de que cualquier sección de este apartado se considera inválida o imposible de cumplir bajo cualquier circunstancia particular se aplica al resto de la sección y, en cualquier otra circunstancia, se aplica la sección en su conjunto.
El objetivo de esta sección no se induzca a infringir ninguna reivindicación de patente o cualquier otro derecho de propiedad intelectual, ni impugnar la validez de tales reclamaciones. La única intención de esta sección es la de proteger la integridad del sistema de distribución de software libre, puesto en práctica por el desarrollo de licencia pública.
Mucha gente ha hecho contribuciones generosas a la evolución de la amplia gama de software distribuido a través de este sistema, con la confianza de que una aplicación coherente. Sólo el autor / donante puede decidir si está dispuesto a distribuir su software mediante cualquier otro sistema; titular de una licencia no puede imponer este tipo de elección.
Esta sección está destinada a dejar claro lo que se cree es una consecuencia del resto de esta Licencia.
8. En el caso de que algunos países restringen la distribución y / o uso del Programa de cualquier patente o por interfaces bajo copyright, el tenedor del copyright que presentó el programa a los términos de esta Licencia puede añadir una limitación explícita de distribución geográfica excluyendo esos países, de forma que sólo se permite la distribución en o entre los países no sujetos a dicha exclusión. Si este es el caso, la licencia para incorporar limitación mencionada en los mismos términos que fueron reclutados como parte del cuerpo de esta Licencia.
9. La Free Software Foundation puede publicar versiones revisadas y / o nuevas esta Licencia Pública General en el momento que considere oportuno. La nueva versión mantiene el mismo espíritu que el actual, aunque los detalles pueden diferir en algunos de los contenidos con el fin de hacer frente a nuevos problemas o preocupaciones.
Cada versión tiene un número de identificación diferente. Si el Programa especifica que se aplica a una versión específica de esta licencia y "cualquier versión posterior", se puede elegir entre adhieren a los términos y condiciones del primer pozo de esa versión o de cualquier versión posterior publicada por la Free Software Foundation. Si el Programa no especifica un número de versión de esta Licencia, usted tiene la opción de elegir cualquier versión de todos publicados por la Free Software Foundation.
10. Si desea incluir partes del Programa en otros programas libres con diferentes condiciones de distribución, se espera que para hacer frente a la escritura del autor de pedir su consentimiento. En el caso de los derechos de autor de software de la Free Software Foundation, ir a escribir a la Free Software Foundation, que a veces hace excepciones en estos casos. La elección que hacemos se basa en nuestros dos objetivos de preservar la libertad de todos los derivados de nuestro software libre y promover el intercambio y la reutilización del software en general.
SIN GARANTÍA
11. COMO EL PROGRAMA SE LICENCIA LIBRE DE CARGAS, NO SE OFRECE NINGUNA GARANTÍA SOBRE EL PROGRAMA, EN LA EXTENSIÓN PERMITIDA POR LA LEGISLACIÓN APLICABLE. EXCEPTO CUANDO SE INDIQUE DE OTRA FORMA POR ESCRITO, LOS TENEDORES DEL COPYRIGHT Y / U OTRAS PARTES PROPORCIONAN EL PROGRAMA "TAL CUAL" SIN GARANTÍA DE NINGÚN TIPO, YA SEA EXPRESA O IMPLÍCITA, INCLUYENDO, PERO NO LIMITADO A, LAS GARANTÍAS IMPLÍCITAS DE COMERCIALIZACIÓN E IDONEIDAD PARA UN FIN DETERMINADO . TODO EL RIESGO EN CUANTO A LA CALIDAD Y RENDIMIENTO DEL PROGRAMA ES CON USTED. SI EL PROGRAMA TIENE UN ERROR, ASUME EL COSTE DE CUALQUIER SERVICIO, REPARACIÓN O CORRECCIÓN.
12. EN NINGÚN CASO, SALVO QUE LO REQUIERA LA LEGISLACIÓN APLICABLE O HAYA SIDO ACORDADO POR ESCRITO, NINGÚN TENEDOR DEL COPYRIGHT NI NINGUNA OTRA PARTE QUE MODIFIQUE Y / O REDISTRIBUYA EL PROGRAMA SEGÚN PERMITE EN ESTA LICENCIA SERÁ RESPONSABLE ANTE USTED POR DAÑOS, INCLUYENDO CUALQUIER GENERAL, ESPECIAL, DAÑOS INCIDENTALES O CONSECUENTES QUE SURJAN DEL USO O DE USO DEL PROGRAMA INCAPACIDAD (INCLUYENDO PERO NO LIMITADO A LA PÉRDIDA DE DATOS OA LA GENERACIÓN INCORRECTA OA PÉRDIDAS SUFRIDAS POR USTED O POR TERCERAS PARTES OA UN FALLO DEL PROGRAMA AL FUNCIONAR EN COMBINACIÓN CON CUALQUIER OTRO PROGRAMA) , INCLUSO SI DICHO TENEDOR U OTRA PARTE HA SIDO ADVERTIDO DE LA POSIBILIDAD DE TALES DAÑOS.
FIN DE LOS TÉRMINOS Y CONDICIONES

Datei anzeigen

@ -42,7 +42,7 @@ $config['compression']=1;
$config['processlist_refresh']=3000;
$config['empty_db_before_restore']=0;
$config['optimize_tables_beforedump']=1;
$config['optimize_tables_beforedump']=0;
$config['stop_with_error']=1;
// For sending a mail after backup set send_mail to 1, otherless set to 0
@ -75,9 +75,9 @@ $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_port'][1]='21';
$config['ftp_user'][1]='';
$config['ftp_pass'][1]='';
$config['ftp_dir'][1]='';
$config['ftp_transfer'][2]=0;
@ -85,10 +85,10 @@ $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_port'][2]='21';
$config['ftp_user'][2]='';
$config['ftp_pass'][2]='';
$config['ftp_dir'][2]='';
//Multipart 0=off 1=on
$config['multi_part']=0;
@ -123,4 +123,4 @@ $config['multi_dump']=0;
$config['logcompression']=1;
$config['log_maxsize1']=1;
$config['log_maxsize2']=2;
$config['log_maxsize']=1048576;
$config['log_maxsize']=1048576;

Datei anzeigen

@ -58,7 +58,7 @@ if (isset($_GET['config_delete']))
$_SESSION['config_file']=$config['config_file'];
read_config($config['config_file']); // Standard laden
}
$del=@unlink($config['paths']['config'] . $del_config . '.php');
if ($del) $del=@unlink($config['paths']['config'] . $del_config . '.conf.php');
if ($del === false) $msg='<p class="error">' . sprintf($lang['L_ERROR_DELETING_CONFIGFILE'],$del_config) . '</p>';
@ -75,9 +75,9 @@ $config['cron_smtp_port']=( !isset($config['cron_smtp_port']) ) ? 25 : $config['
if (!isset($command)) $command=0;
$checkFTP=Array(
"&nbsp;<br><br>&nbsp;<br>&nbsp;",
"&nbsp;<br><br>&nbsp;<br>&nbsp;",
"&nbsp;<br><br>&nbsp;<br>&nbsp;",
"&nbsp;<br><br>&nbsp;<br>&nbsp;",
"&nbsp;<br><br>&nbsp;<br>&nbsp;"
);
$checkFTP[$i]="";
@ -88,7 +88,7 @@ if (( isset($_POST['testFTP0']) ) || ( isset($_POST['testFTP1']) ) || ( isset($_
$config['ftp_timeout']=array();
$config['ftp_mode']=array();
$config['ftp_useSSL']=array();
for ($i=0; $i < 3; $i++)
{
$config['ftp_transfer'][$i]=( isset($_POST['ftp_transfer'][$i]) ) ? $_POST['ftp_transfer'][$i] : 0;
@ -132,7 +132,7 @@ if ($ftptested > -1)
$config['ftp_user'][$ftptested]=$ftp_user[$ftptested];
$config['ftp_pass'][$ftptested]=$ftp_pass[$ftptested];
$config['ftp_dir'][$ftptested]=$ftp_dir[$ftptested];
if ($ftp_dir[$ftptested] == "" || ( strlen($ftp_dir[$ftptested]) > 1 && substr($ftp_dir[$ftptested],-1) != "/" )) $ftp_dir[$ftptested].="/";
WriteParams();
}
@ -159,47 +159,48 @@ if (isset($_POST['save']))
$config['interface_sqlboxsize']=$_POST['sqlboxsize'];
$config['theme']=$_POST['theme'];
$config['interface_table_compact']=( isset($_POST['interface_table_compact']) ) ? $_POST['interface_table_compact'] : 1;
$config['email_recipient']=$_POST['email0'];
$config['email_recipient_cc']=$_POST['email_recipient_cc'];
$config['email_sender']=$_POST['email1'];
$config['send_mail']=$_POST['send_mail'];
$config['send_mail_dump']=$_POST['send_mail_dump'];
$config['email_maxsize1']=$_POST['email_maxsize1'];
if ($config['email_maxsize1'] == "") $config['email_maxsize1']=0;
$config['email_maxsize2']=$_POST['email_maxsize2'];
$config['email_maxsize']=$config['email_maxsize1'] * ( ( $config['email_maxsize2'] == 1 ) ? 1024 : 1024 * 1024 );
$config['memory_limit']=$_POST['memory_limit'];
if ($config['memory_limit'] == "") $config['memory_limit']=0;
$config['minspeed']=$_POST['minspeed'];
if ($config['minspeed'] < 50) $config['minspeed']=50;
$config['maxspeed']=$_POST['maxspeed'];
if ($config['maxspeed'] < $config['minspeed']) $config['maxspeed']=$config['minspeed'] * 2;
$config['stop_with_error']=$_POST['stop_with_error'];
$config['stop_with_error']=$_POST['stop_with_error'];
$config['ignore_enable_keys']=isset($_POST['ignore_enable_keys']) ? (int) $_POST['ignore_enable_keys']:0;
$config['multi_part']=$_POST['multi_part'];
$config['multipartgroesse1']=isset($_POST['multipartgroesse1']) ? floatval(str_replace(',','.',$_POST['multipartgroesse1'])) : 0;
$config['multipartgroesse2']=isset($_POST['multipartgroesse2']) ? intval($_POST['multipartgroesse2']) : 0;
if ($config['multipartgroesse1'] < 100 && $config['multipartgroesse2'] == 1) $config['multipartgroesse1']=100;
if ($config['multipartgroesse1'] < 1 && $config['multipartgroesse2'] == 2) $config['multipartgroesse1']=1;
$oldlogcompression=$config['logcompression'];
$config['logcompression']=( isset($_POST['logcompression']) && $_POST['logcompression'] == 1 ) ? 1 : 0;
$config['log_maxsize1']=$_POST['log_maxsize1'];
if ($config['log_maxsize1'] == "") $config['log_maxsize1']=0;
$config['log_maxsize2']=$_POST['log_maxsize2'];
$config['log_maxsize']=$config['log_maxsize1'] * ( ( $config['log_maxsize2'] == 1 ) ? 1024 : 1024 * 1024 );
$config['auto_delete']=$_POST['auto_delete'];
$config['max_backup_files']=$_POST['max_backup_files'];
$config['empty_db_before_restore']=$_POST['empty_db_before_restore'];
$config['optimize_tables_beforedump']=$_POST['optimize_tables'];
$config['cron_dbindex']=$_POST['cron_dbindex'];
$config['cron_comment']=$_POST['cron_comment'];
$config['cron_extender']=$_POST['cron_extender'];
// cron_select_savepath/
if (!isset($_POST['cron_select_savepath'])) $_POST['cron_select_savepath']=$config['config_file'];
@ -217,25 +218,25 @@ if (isset($_POST['save']))
$config['cron_configurationfile']=$_POST['cron_savepath_new'] . ".conf.php";
}
}
$config['cron_execution_path']=$_POST['cron_execution_path'];
if ($config['cron_execution_path'] == "") $config['cron_execution_path']="msd_cron/";
if (strlen($config['cron_execution_path']) > 1 && substr($config['cron_execution_path'],-1) != "/") $config['cron_execution_path'].="/";
$config['cron_use_sendmail']=$_POST['cron_use_sendmail'];
$config['cron_sendmail']=$_POST['cron_sendmail'];
$config['cron_smtp']=isset($_POST['cron_smtp']) ? $_POST['cron_smtp'] : 'localhost';
$config['cron_printout']=$_POST['cron_printout'];
$config['cron_completelog']=$_POST['cron_completelog'];
$config['cron_compression']=$_POST['compression'];
$config['cron_completelog']=$_POST['cron_completelog'];
$databases['multi']=Array();
$databases['multi_praefix']=Array();
$databases['multi_commandbeforedump']=Array();
$databases['multi_commandafterdump']=Array();
if (isset($databases['Name'][0]) && $databases['Name'][0] > '')
{
for ($i=0; $i < count($databases['Name']); $i++)
@ -256,7 +257,7 @@ if (isset($_POST['save']))
$databases['multisetting_praefix']=( count($databases['multi']) > 0 ) ? implode(";",$databases['multi_praefix']) : "";
$databases['multisetting_commandbeforedump']=( count($databases['multi']) > 0 ) ? implode(";",$databases['multi_commandbeforedump']) : "";
$databases['multisetting_commandafterdump']=( count($databases['multi']) > 0 ) ? implode(";",$databases['multi_commandafterdump']) : "";
if ($config['cron_dbindex'] == -2)
{
$datenbanken=count($databases['Name']);
@ -264,7 +265,7 @@ if (isset($_POST['save']))
$cron_dbpraefix_array=str_replace(";","|",$databases['multisetting_praefix']);
$cron_db_cbd_array=str_replace(";","|",$databases['multisetting_commandbeforedump']);
$cron_db_cad_array=str_replace(";","|",$databases['multisetting_commandafterdump']);
}
elseif ($config['cron_dbindex'] == -3)
{
@ -273,19 +274,19 @@ if (isset($_POST['save']))
$cron_db_cbd_array=implode("|",$databases['command_before_dump']);
$cron_db_cad_array=implode("|",$databases['command_after_dump']);
}
$config['ftp_transfer']=array();
$config['ftp_timeout']=array();
$config['ftp_mode']=array();
$config['ftp_useSSL']=array();
for ($i=0; $i < 3; $i++)
{
$checkFTP[$i]="";
$config['ftp_transfer'][$i]=isset($_POST['ftp_transfer'][$i]) ? $_POST['ftp_transfer'][$i] : $config['ftp_transfer'][$i];
$config['ftp_timeout'][$i]=isset($_POST['ftp_timeout'][$i]) ? $_POST['ftp_timeout'][$i] : 30;
$config['ftp_useSSL'][$i]=isset($_POST['ftp_useSSL'][$i]) ? 1 : 0;
$config['ftp_mode'][$i]=isset($_POST['ftp_mode'][$i]) ? 1 : 0;
$config['ftp_server'][$i]=$_POST['ftp_server'][$i];
$config['ftp_port'][$i]=$_POST['ftp_port'][$i];
@ -295,23 +296,23 @@ if (isset($_POST['save']))
if ($config['ftp_port'][$i] == 0) $config['ftp_port'][$i]=21;
if ($config['ftp_dir'][$i] == "" || ( strlen($config['ftp_dir'][$i]) > 1 && substr($config['ftp_dir'][$i],-1) != "/" )) $config['ftp_dir'][$i].="/";
}
$config['bb_width']=$_POST['bb_width'];
$config['bb_textcolor']=$_POST['bb_textcolor'];
$config['sql_limit']=$_POST['sql_limit'];
if ($config['dbhost'] != $_POST['dbhost'] || $config['dbuser'] != $_POST['dbuser'] || $config['dbpass'] != $_POST['dbpass'] || $config['dbport'] != $_POST['dbport'] || $config['dbsocket'] != $_POST['dbsocket'])
{
//neue Verbindungsparameter
$show_VP=true;
//alte Parameter sichern
$old['dbhost']=$config['dbhost'];
$old['dbuser']=$config['dbuser'];
$old['dbpass']=$config['dbpass'];
$old['dbport']=$config['dbport'];
$old['dbsocket']=$config['dbsocket'];
//neu setzen
$config['dbhost']=$_POST['dbhost'];
$config['dbuser']=$_POST['dbuser'];
@ -321,7 +322,6 @@ if (isset($_POST['save']))
if (MSD_mysql_connect())
{
// neue Verbindungsdaten wurden akzeptiert -> manuelle DB-Liste von anderem User löschen
if (file_exists('./' . $config['files']['dbs_manual'])) @unlink('./' . $config['files']['dbs_manual']);
SetDefault();
$msg.='<script type="text/javascript">parent.MySQL_Dumper_menu.location.href="menu.php";</script>';
}
@ -336,7 +336,7 @@ if (isset($_POST['save']))
$msg.='<p class="error">' . $lang['L_WRONG_CONNECTIONPARS'] . '</p>';
}
}
// Manuelles hinzufügen einer Datenbank
if ($_POST['add_db_manual'] > '')
{
@ -355,26 +355,12 @@ if (isset($_POST['save']))
{
if (MSD_mysql_connect())
{
$res=mysql_selectdb($to_add,$config['dbconnection']);
$res=@mysqli_select_db($config['dbconnection'], $to_add);
if (!$res === false)
{
$dbs_manual=array();
if (file_exists('./' . $config['files']['dbs_manual'])) $dbs_manual=file('./' . $config['files']['dbs_manual']);
if (!in_array($to_add,$dbs_manual)) $dbs_manual[]=$to_add;
$file_handle=fopen('./' . $config['files']['dbs_manual'],'a');
if ($file_handle)
{
foreach ($dbs_manual as $f)
{
fwrite($file_handle,$f);
}
fclose($file_handle);
@chmod('./' . $config['files']['dbs_manual'],0777);
//Menü aktualisieren, damit die DB in der Selectliste erscheint
echo '<script type="text/javascript">parent.MySQL_Dumper_menu.location.href="menu.php";</script>';
}
else
$add_db_message=sprintf($lang['L_DB_MANUAL_FILE_ERROR'],$to_add);
$databases['Name'][] = $to_add;
//Menü aktualisieren, damit die DB in der Selectliste erscheint
echo '<script type="text/javascript">parent.MySQL_Dumper_menu.location.href="menu.php";</script>';
}
else
$add_db_message=sprintf($lang['L_DB_MANUAL_ERROR'],$to_add);
@ -382,7 +368,7 @@ if (isset($_POST['save']))
}
}
}
//Nach einer Uebernahme einer neuen Configuration vor dem Schreiben ueberfluessige Indexe entfernen
$anzahl_datenbanken=sizeof($databases['Name']);
if (sizeof($databases['praefix']) > $anzahl_datenbanken)
@ -395,7 +381,7 @@ if (isset($_POST['save']))
}
if ($databases['db_selected_index'] >= $anzahl_datenbanken) $databases['db_selected_index']=0;
}
// und wegschreiben
if ($save_config)
{
@ -556,25 +542,25 @@ if (sizeof($configs) > 0)
if ($old_config['config_file'] == $c) $aus['conf'].='dbrowsel';
else $aus['conf'].=( $i % 2 ) ? 'dbrow' : 'dbrow1';
$aus['conf'].='">';
$aus['conf'].='<td><a name="config' . sprintf("%03d",$i) . '" style="text-decoration:none;">' . $i . '.</a></td>';
// Einstellungen
$aus['conf'].='<td>';
$aus['conf'].='<table>';
$aus['conf'].='<tr><td>' . $lang['L_NAME'] . ':</td><td><strong>' . $c . '</strong></td></tr>'; // filename
$aus['conf'].='<tr><td>' . $lang['L_DB_HOST'] . ':</td><td><strong>' . $config['dbhost'] . '</strong></td></tr>';
$aus['conf'].='<tr><td>' . $lang['L_DB_USER'] . ':</td><td><strong>' . $config['dbuser'] . '</strong></td></tr>';
$aus['conf'].='<tr><td>';
$aus['conf'].=$lang['L_DBS'] . ':</td><td>';
$aus['conf'].='<a href="#config' . sprintf("%03d",$i) . '" onclick="SwitchVP(\'show_db' . sprintf("%03d",$i) . '\');">';
$aus['conf'].=$icon['search'] . '<strong>' . sizeof($databases['Name']) . '</strong></a>';
$aus['conf'].='</td></tr>';
// Datenbankliste anzeigen
$aus['conf'].='<tr><td colspan="2">';
$aus['conf'].='<div id="show_db' . sprintf("%03d",$i) . '" style="padding:0;margin:0;display:none;">';
@ -592,11 +578,11 @@ if (sizeof($configs) > 0)
}
}
$aus['conf'].='</table></div></td></tr>';
$aus['conf'].='</table></td>';
$aus['conf'].='<td><table>';
// String aus Multidump-DBs aufbauen
$toolboxstring='';
$databases['multi']=array();
@ -612,7 +598,7 @@ if (sizeof($configs) > 0)
if (isset($multi_praefixe[$x]) && $multi_praefixe[$x] > '') $toolboxstring.=' (<i>\'' . $multi_praefixe[$x] . '\'</i>)';
}
}
// DB-Liste fuer PHP
if ($config['multi_dump'] == 1) // Multidump
{
@ -625,7 +611,7 @@ if (sizeof($configs) > 0)
if (isset($databases['db_selected_index']) && isset($databases['praefix'][$databases['db_selected_index']]) && $databases['praefix'][$databases['db_selected_index']] > '') $text.=" ('<i>" . $databases['praefix'][$databases['db_selected_index']] . "</i>')";
$aus['conf'].=table_output($lang['L_BACKUP_DBS_PHP'],$text);
}
// DB-Liste fuer Perl
// Fallback falls aus alten Konfigurationsdateien der Index noch nicht gesetzt ist -> alle DBs sichern
if (!isset($config['cron_dbindex'])) $config['cron_dbindex']=-3;
@ -644,12 +630,12 @@ if (sizeof($configs) > 0)
if (isset($databases['praefix'][$config['cron_dbindex']]) && $databases['praefix'][$config['cron_dbindex']] > '') $text.=" ('<i>" . $databases['praefix'][$config['cron_dbindex']] . "</i>')";
$aus['conf'].=table_output($lang['L_BACKUP_DBS_PERL'],$text);
}
if ($config['multi_part'] == 1) // Multipart
{
$aus['conf'].=table_output($lang['L_MULTI_PART'],$lang['L_YES'] . ", " . $lang['L_FILESIZE'] . " " . byte_output($config['multipart_groesse']));
}
if ($config['send_mail'] == 1) //Email
{
$aus['conf'].=table_output($lang['L_SEND_MAIL_FORM'],$lang['L_YES'] . ", " . $lang['L_EMAIL_ADRESS'] . ": " . $config['email_recipient']);
@ -659,9 +645,9 @@ if (sizeof($configs) > 0)
if ($config['email_maxsize2'] == 2) $bytes=$bytes * 1024;
$text.=byte_output($bytes);
if ($config['send_mail_dump'] == 1) $aus['conf'].=table_output($lang['L_SEND_MAIL_DUMP'],$text);
}
for ($x=0; $x < 3; $x++)
{
if (isset($config['ftp_transfer'][$x]) && $config['ftp_transfer'][$x] > 0)
@ -672,11 +658,11 @@ if (sizeof($configs) > 0)
}
$aus['conf'].='</table></td><td>';
$aus['conf'].='<a href="config_overview.php?config=' . urlencode($c) . '">' . $icon['edit'] . '</a>';
if ($c != 'mysqldumper') // && $old_config['config_file']!=$c)
$aus['conf'].='<a href="config_overview.php?config_delete=' . urlencode($c) . '" onclick="if(!confirm(\'' . sprintf($lang['L_CONFIRM_CONFIGFILE_DELETE'],$c) . '\')) return false;">' . $icon['delete'] . '</a>';
else $aus['conf'].='&nbsp;';
$aus['conf'].='</td></tr>';
}
}
@ -733,19 +719,25 @@ if (isset($databases['Name'][0]) && $databases['Name'][0] > '')
}
else
{
$disabled = '';
if (in_array($databases['db_actual'], $dontBackupDatabases)) $disabled = ' disabled="disabled"';
$aus['db'].='<tr><td>' . Help($lang['L_HELP_DB'],"conf1") . $lang['L_LIST_DB'] . '</td><td><input type="checkbox" class="checkbox" name="MultiDBDump" value="1" ' . ( ( $config['multi_dump'] == 1 ) ? "CHECKED" : "" ) . '>&nbsp;' . $lang['L_ACTIVATE_MULTIDUMP'] . '</td>';
$aus['db'].='<tr><td colspan="2"><table class="bdr">';
$aus['db'].='<tr class="thead"><th>' . $lang['L_DB'] . '</th><th>Multidump<br><span class="ssmall">(<a href="javascript:SelectMD(true,' . count($databases['Name']) . ')" class="small">' . $lang['L_ALL'] . '</a>&nbsp;<a href="javascript:SelectMD(false,' . count($databases['Name']) . ')" class="small">' . $lang['L_NONE'] . '</a>)</span></th>';
$aus['db'].='<th>' . Help($lang['L_HELP_PRAEFIX'],"conf2") . $lang['L_PRAEFIX'] . '</th><th>' . Help($lang['L_HELP_COMMANDS'],"",11) . 'Command before Dump</th><th>' . Help($lang['L_HELP_COMMANDS'],"",11) . 'Command after Dump</th><th>' . $lang['L_SQL_BEFEHLE'] . '</th></tr>';
//erst die aktuelle DB
$aus['db'].='<tr class="dbrowsel"><td><strong>' . $databases['db_actual'] . '</strong></td>';
$aus['db'].='<td align="center"><input type="checkbox" class="checkbox" name="db_multidump_' . $databases['db_selected_index'] . '" value="db_multidump_' . $databases['db_selected_index'] . '" ' . ( ( in_array($databases['db_actual'],$databases['multi']) ) ? "CHECKED" : "" ) . '></td>';
$aus['db'].='<td><img src="' . $icon['blank'] . '" width="40" height="1" alt=""><input type="text" class="text" name="dbpraefix_' . $databases['db_selected_index'] . '" size="10" value="' . $databases['praefix'][$databases['db_selected_index']] . '"></td>';
$aus['db'].='<td>' . ComboCommandDump(0,$databases['db_selected_index']) . '</td><td>' . ComboCommandDump(1,$databases['db_selected_index']) . '</td>';
$aus['db'].='<td align="center"><input type="checkbox" class="checkbox" name="db_multidump_' . $databases['db_selected_index'] . '" value="db_multidump_' . $databases['db_selected_index'] . '" ' . ( ( in_array($databases['db_actual'],$databases['multi']) ) ? "CHECKED" : "" );
$aus['db'].= $disabled . '></td>';
$aus['db'].='<td><img src="' . $icon['blank'] . '" width="40" height="1" alt=""><input type="text" class="text" name="dbpraefix_' . $databases['db_selected_index'] . '" size="10" value="'
. $databases['praefix'][$databases['db_selected_index']] . '"' . $disabled . '></td>';
$aus['db'].='<td>' . ComboCommandDump(0,$databases['db_selected_index'], $disabled)
. '</td><td>' . ComboCommandDump(1,$databases['db_selected_index'], $disabled) . '</td>';
$aus['db'].='<td><a href="sql.php?context=1">' . $lang['L_SQL_BEFEHLE'] . '</a></td>';
$aus['db'].='</tr>';
$dbacombo=$dbbcombo="";
$j=0;
for ($i=0; $i < count($databases['Name']); $i++)
@ -753,9 +745,17 @@ if (isset($databases['Name'][0]) && $databases['Name'][0] > '')
if ($i != $databases['db_selected_index'])
{
$j++;
$disabled = '';
if (in_array($databases['Name'][$i], $dontBackupDatabases)) $disabled = ' disabled="disabled"';
if (!isset($databases['praefix'][$i])) $databases['praefix'][$i] = '';
$aus['db'].='<tr class="' . ( ( $i % 2 ) ? 'dbrow' : 'dbrow1' ) . '"><td>' . $databases['Name'][$i] . '</td>';
$aus['db'].='<td align="center"><input type="checkbox" class="checkbox" name="db_multidump_' . $i . '" value="db_multidump_' . $i . '" ' . ( ( in_array($databases['Name'][$i],$databases['multi']) ) ? "CHECKED" : "" ) . '></td>';
$aus['db'].='<td><img src="' . $icon['blank'] . '" width="40" height="1" alt=""><input type="text" class="text" name="dbpraefix_' . $i . '" size="10" value="' . $databases['praefix'][$i] . '"></td><td>' . ComboCommandDump(0,$i) . '</td><td>' . ComboCommandDump(1,$i) . '</td>';
$aus['db'].='<td align="center"><input type="checkbox" class="checkbox" name="db_multidump_' . $i . '" value="db_multidump_' . $i . '" ' . ( ( in_array($databases['Name'][$i],$databases['multi']) ) ? "CHECKED" : "" );
$aus['db'] .= $disabled.'></td>';
$aus['db'].='<td><img src="' . $icon['blank'] . '" width="40" height="1" alt=""><input type="text" class="text" name="dbpraefix_' . $i . '" size="10" value="'
. $databases['praefix'][$i] . '"';
$aus['db'] .= $disabled . '></td><td>' . ComboCommandDump(0,$i, $disabled) . '</td><td>'
. ComboCommandDump(1,$i, $disabled) . '</td>';
$aus['db'].='<td><a href="sql.php?context=1">' . $lang['L_SQL_BEFEHLE'] . '</a></td>';
$aus['db'].='</tr>';
}
@ -804,7 +804,7 @@ $aus['global1'].='<select id="multipartgroesse2" name="multipartgroesse2"';
if ($config['multi_part'] == 0) $aus['global1'].=' disabled';
$aus['global1'].='><option value="1" ' . ( ( $config['multipartgroesse2'] == 1 ) ? 'SELECTED' : '' ) . '>Kilobytes</option><option value="2" ' . ( ( $config['multipartgroesse2'] == 2 ) ? 'SELECTED' : '' ) . '>Megabytes</option></select></td></tr>';
$aus['global1'].='<tr><td>' . Help($lang['L_HELP_OPTIMIZE'],"") . $lang['L_OPTIMIZE'] . '</td>';
$aus['global1'].='<tr><td>' . Help($lang['L_HELP_OPTIMIZE'],"") . $lang['L_OPTIMIZE'] . ':</td>';
$aus['global1'].='<td><input type="radio" class="radio" value="1" name="optimize_tables" ' . ( ( $config['optimize_tables_beforedump'] == 1 ) ? " checked" : "" ) . '>&nbsp;' . $lang['L_ACTIVATED'];
$aus['global1'].='&nbsp;&nbsp;&nbsp;<input type="radio" class="radio" value="0" name="optimize_tables" ' . ( ( $config['optimize_tables_beforedump'] == 0 ) ? " checked" : "" ) . '>&nbsp;' . $lang['L_NOT_ACTIVATED'] . '</td></tr>';
@ -814,10 +814,20 @@ $aus['global1'].='<input type="radio" class="radio" value="1" name="empty_db_bef
$aus['global1'].='&nbsp;&nbsp;&nbsp;<input type="radio" class="radio" value="0" name="empty_db_before_restore" ' . ( ( $config['empty_db_before_restore'] == 0 ) ? " checked" : "" ) . '>&nbsp;' . $lang['L_NO'];
$aus['global1'].='</td></tr>';
$aus['global1'].='<tr><td>' . Help("","") . $lang['L_ERRORHANDLING_RESTORE'] . '</td><td>';
$aus['global1'].='<tr><td>' . Help("","") . $lang['L_ERRORHANDLING_RESTORE'] . ':</td><td>';
$aus['global1'].='<input type="radio" class="radio" name="stop_with_error" value="0" ' . ( ( $config['stop_with_error'] == 0 ) ? " checked" : "" ) . '>&nbsp;' . $lang['L_EHRESTORE_CONTINUE'] . '<br>';
$aus['global1'].='<input type="radio" class="radio" name="stop_with_error" value="1" ' . ( ( $config['stop_with_error'] == 1 ) ? " checked" : "" ) . '>&nbsp;' . $lang['L_EHRESTORE_STOP'];
$aus['global1'].='</td></tr></table></fieldset>';
$aus['global1'].='</td></tr>';
if (!isset($config['ignore_enable_keys'])) {
$config['ignore_enable_keys'] = 0;
}
$aus['global1'].='<tr><td>Ignore "ENABLE KEYS":</td><td>';
$aus['global1'].='<input type="radio" class="radio" name="ignore_enable_keys" value="1" ' . ( ( $config['ignore_enable_keys'] == 1 ) ? " checked" : "" ) . '>&nbsp;' . $lang['L_YES'];
$aus['global1'].='&nbsp;&nbsp;&nbsp;<input type="radio" class="radio" name="ignore_enable_keys" value="0" ' . ( ( $config['ignore_enable_keys'] == 0 ) ? " checked" : "" ) . '>&nbsp;' . $lang['L_NO'];
$aus['global1'].='</td></tr>';
$aus['global1'].='</table></fieldset>';
$aus['global1'].=print_save_button();
$aus['global1'].='</div>';
@ -825,13 +835,13 @@ $aus['global1'].='</div>';
$aus['global3']='<div id="global3"><fieldset><legend>' . $lang['L_CONFIG_INTERFACE'] . '</legend><table>';
$aus['global3'].='<tr><td>' . Help($lang['L_HELP_LANG'],"conf11") . $lang['L_LANGUAGE'] . ':&nbsp;</td>';
$aus['global3'].='<td><select name="language">' . GetLanguageCombo("op");
$aus['global3'].='</select>&nbsp;&nbsp;<a href="' . $languagepacks_ref . '" target="_blank">' . $lang['L_DOWNLOAD_LANGUAGES'] . '</a><input type="hidden" name="lang_old" value="' . $config['language'] . '"><input type="hidden" name="scaption_old" value="' . $config['interface_server_caption'] . '"></td></tr>';
$aus['global3'].='</select><input type="hidden" name="lang_old" value="' . $config['language'] . '"><input type="hidden" name="scaption_old" value="' . $config['interface_server_caption'] . '"></td></tr>';
$aus['global3'].='<tr><td>' . Help($lang['L_HELP_SERVERCAPTION'],"") . $lang['L_SERVERCAPTION'] . ':</td>';
$aus['global3'].='<td><input type="checkbox" class="checkbox" value="1" name="server_caption" ' . ( ( $config['interface_server_caption'] == 1 ) ? " checked" : "" ) . '>&nbsp;' . $lang['L_ACTIVATED'] . '&nbsp;&nbsp;&nbsp;';
$aus['global3'].='<input type="radio" class="radio" name="server_caption_position" value="1" ' . ( ( $config['interface_server_caption_position'] == 1 ) ? "checked" : "" ) . '>&nbsp;' . $lang['L_IN_MAINFRAME'] . '&nbsp;&nbsp;<input type="radio" class="radio" name="server_caption_position" value="0" ' . ( ( $config['interface_server_caption_position'] == 0 ) ? "checked" : "" ) . '>&nbsp;' . $lang['L_IN_LEFTFRAME'] . '';
$aus['global3'].='</td></tr>';
$aus['global3'].='<tr><td>' . Help("","") . 'Theme</td><td><select name="theme">' . GetThemes() . '</select>&nbsp;&nbsp;<a href="' . $stylepacks_ref . '" target="_blank">' . $lang['L_DOWNLOAD_STYLES'] . '</a></td></tr>';
$aus['global3'].='<tr><td>' . Help("","") . 'Theme:</td><td><select name="theme">' . GetThemes() . '</select></td></tr>';
$aus['global3'].='</table></fieldset><fieldset><legend>' . $lang['L_SQL_BROWSER'] . '</legend><table>';
$aus['global3'].='<tr><td>' . Help("","") . $lang['L_SQLBOXHEIGHT'] . ':&nbsp;</td>';
@ -894,22 +904,22 @@ $aus['transfer2']='<div id="transfer2"><fieldset><legend>' . $lang['L_CONFIG_FTP
for ($i=0; $i < 3; $i++)
{
$aus['transfer2'].='<fieldset><legend>FTP-Connection ' . ( $i + 1 ) . '</legend><table>';
$aus['transfer2'].='<tr><td>' . Help($lang['L_HELP_FTPTRANSFER'],"") . $lang['L_FTP_TRANSFER'] . ':&nbsp;</td>';
$aus['transfer2'].='<td><input type="radio" class="radio" value="1" name="ftp_transfer[' . $i . ']" ' . ( ( !extension_loaded("ftp") ) ? "disabled " : "" ) . ( ( $config['ftp_transfer'][$i] == 1 ) ? " checked" : "" ) . '>&nbsp;' . $lang['L_ACTIVATED'];
$aus['transfer2'].='&nbsp;&nbsp;&nbsp;<input type="radio" class="radio" value="0" name="ftp_transfer[' . $i . ']" ' . ( ( $config['ftp_transfer'][$i] == 0 ) ? " checked" : "" ) . '>&nbsp;' . $lang['L_NOT_ACTIVATED'] . '</td></tr>';
$aus['transfer2'].='<tr><td>' . Help($lang['L_HELP_FTPTIMEOUT'],"") . $lang['L_FTP_TIMEOUT'] . ':&nbsp;</td>';
$aus['transfer2'].='<td><input type="text" class="text" size="10" name="ftp_timeout[' . $i . ']" maxlength="3" style="text-align:right;" value="' . $config['ftp_timeout'][$i] . '">&nbsp;sec</td></tr>';
$aus['transfer2'].='<tr><td>' . Help($lang['L_HELP_FTP_MODE'],"") . $lang['L_FTP_CHOOSE_MODE'] . ':&nbsp;</td>';
$aus['transfer2'].='<td><input type="checkbox" class="checkbox" name="ftp_mode[' . $i . ']" value="1" ' . ( ( $config['ftp_mode'][$i] == 1 ) ? 'checked' : '' ) . '>&nbsp;';
$aus['transfer2'].=$lang['L_FTP_PASSIVE'] . '</td></tr><tr><td colspan="2">';
$aus['transfer2'].='<tr><td>' . Help($lang['L_HELP_FTPSSL'],"") . $lang['L_FTP_SSL'] . ':&nbsp;</td>';
$aus['transfer2'].='<td><input type="checkbox" class="checkbox" name="ftp_useSSL[' . $i . ']" value="1" ' . ( ( $config['ftp_useSSL'][$i] == 1 ) ? 'checked' : '' ) . ' ' . ( ( !extension_loaded("openssl") ) ? "disabled " : "" ) . '>';
$aus['transfer2'].='&nbsp;<span ' . ( ( !extension_loaded("openssl") ) ? 'style="color:#999999;"' : '' ) . '>' . $lang['L_FTP_USESSL'] . '</span></td></tr><tr><td colspan="2">';
$aus['transfer2'].='<tr><td><input type="submit" name="testFTP' . $i . '" value="' . $lang['L_TESTCONNECTION'] . '" class="Formbutton"><br>' . $checkFTP[$i] . '</td><td><table>';
$aus['transfer2'].='<tr><td class="small">' . Help($lang['L_HELP_FTPSERVER'],"conf14",12) . $lang['L_FTP_SERVER'] . ':&nbsp;</td><td><input class="text" type="text" size="30" name="ftp_server[' . $i . ']" value="' . $config['ftp_server'][$i] . '"></td></tr>';
$aus['transfer2'].='<tr><td class="small">' . Help($lang['L_HELP_FTPPORT'],"conf15",12) . $lang['L_FTP_PORT'] . ':&nbsp;</td><td class="small"><input class="text" type="text" size="30" name="ftp_port[' . $i . ']" value="' . $config['ftp_port'][$i] . '"></td></tr>';
@ -948,8 +958,11 @@ if (isset($databases['Name'][0]) && $databases['Name'][0] > '')
$datenbanken=count($databases['Name']);
for ($i=0; $i < $datenbanken; $i++)
{
$aus['cron'].='<option value="' . $i . '" ';
if ($i == $config['cron_dbindex']) $aus['cron'].='SELECTED';
$aus['cron'].='<option value="' . $i . '"';
if ($i == $config['cron_dbindex']) $aus['cron'].=' selected="selected"';
if (in_array($databases['Name'][$i], $dontBackupDatabases)) {
$aus['cron'] .= ' disabled="disabled"';
}
$aus['cron'].='>' . $databases['Name'][$i] . "</option>\n";
}
}
@ -989,4 +1002,4 @@ if (( $showVP ) || ( !isset($databases['Name']) ) || ( isset($databases['name'])
echo '</script>';
echo MSDFooter();
$_SESSION['config']=$config;
ob_end_flush();
ob_end_flush();

Datei anzeigen

@ -92,6 +92,7 @@ a.ul {
.error {
color: #E87B00;
background-color: yellow;
font-weight: bold;
}
@ -399,13 +400,10 @@ textarea {
/* for Geckos */
input[disabled] {
color: #888 !important;
border: 1px solid #CAC8BB !important;
}
/*horizontal menu */
#hormenu {
}
#hormenu ul {
border-bottom: thin solid #D5DDDC;
margin-bottom: 8px;

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei anzeigen

@ -54,7 +54,7 @@ else
$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']);
$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;
@ -65,7 +65,7 @@ else
$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($_GET['sel_dump_encoding']))
{
// Erstaufruf -> encoding auswerten
@ -132,7 +132,7 @@ 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)
if (!$config['multi_dump']==1)
{
echo $pageheader;
echo get_page_parameter($dump);
@ -185,7 +185,7 @@ else
$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);
@ -196,7 +196,7 @@ else
ExecuteCommand('b');
new_file();
}
$aktuelle_tabelle=$dump['table_offset'];
if ($dump['zeilen_offset']==0)
{
@ -205,10 +205,10 @@ else
$dump['anzahl_zeilen']=$config['minspeed'];
$dump['restzeilen']=$config['minspeed'];
}
$create_statement='';
$create_statement=get_def($adbname,$table);
if (!($create_statement===false))
{
$dump['data'].=$create_statement;
@ -217,7 +217,7 @@ else
{
WriteToDumpFile(); // save data we have up to now
// error reading table definition
$read_create_error=sprintf($lang['L_FATAL_ERROR_DUMP'],$table,$adbname).': '.mysql_error($config['dbconnection']);
$read_create_error=sprintf($lang['L_FATAL_ERROR_DUMP'],$table,$adbname).': '.((is_object($config['dbconnection'])) ? mysqli_error($config['dbconnection']) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false));
Errorlog("DUMP",$databases['db_actual'],'',$read_create_error,0);
WriteLog($read_create_error);
if ($config['stop_with_error']>0)
@ -243,7 +243,7 @@ else
if ($config['memory_limit']>0&&strlen($dump['data'])>$config['memory_limit']) WriteToDumpFile();
}
}
/////////////////////////////////
// Anzeige - Fortschritt
/////////////////////////////////
@ -253,21 +253,20 @@ else
$count_dbs=count($databases['multi']);
for($i=0;$i<$count_dbs;$i++)
{
//$a.=$databases['multi'][$i];
if ($databases['Name'][$dump['dbindex']]==$databases['multi'][$i]) $mudbs.='<span class="active_db">'.$databases['multi'][$i].'&nbsp;&nbsp;</span> ';
else
$mudbs.='<span class="success">'.$databases['multi'][$i].'&nbsp;&nbsp;</span> ';
}
}
if ($config['multi_part']==1) $aus[]='<h5>Multipart-Backup: '.$config['multipartgroesse1'].' '.$mp2[$config['multipartgroesse2']].'</h5>';
$aus[]='<h4>'.$lang['L_DUMP_HEADLINE'].'</h4>';
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>';
if ($config['multi_part']==1)
{
$aus[]='<span>Multipart-Backup File <strong>'.($dump['part']-$dump['part_offset']-1).'</strong></span><br>';
@ -279,25 +278,25 @@ else
$aus[]=($config['compression']==1) ? $lang['L_ACTIVATED']:$lang['L_NOT_ACTIVATED'];
$aus[]='</b>.<br>';
if ($out>'') $aus[]='<br><span class="smallgrey">'.$out.'</span>';
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']],'|'));
// 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['zeilen_total']>0) $fortschritt=intval((100*$dump['zeilen_offset'])/$dump['zeilen_total']);
else
$fortschritt=100;
$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>';
$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).'">&nbsp;</td>'.'<td width="80" align="right">'.($fortschritt).'%</td>';
if ($dump['anzahl_zeilen']+$dump['zeilen_offset']>=$dump['zeilen_total'])
{
$eintrag=$dump['zeilen_offset']+1;
@ -309,17 +308,17 @@ else
$zeilen_gesamt=$dump['zeilen_offset']+$dump['anzahl_zeilen'];
$eintrag=$dump['zeilen_offset']+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>';
$dump['tabellen_gesamt']=(isset($dump['tables'])) ? count($dump['tables']):0;
$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[]="\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>';
//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;
@ -335,13 +334,13 @@ else
// Ende Anzeige
WriteToDumpFile();
if (!isset($summe_eintraege)) $summe_eintraege=0;
if ($dump['table_offset']<=$dump['tabellen_gesamt'])
{
$dauer=time()-($xtime+$dump['verbraucht']);
$dump['verbraucht']+=$dauer;
$summe_eintraege+=$dump['anzahl_zeilen'];
//Zeitanpassung
if ($dauer<$dump['max_zeit'])
{
@ -377,11 +376,11 @@ else
$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>';
$xtime=time()-$xtime;
$aus=Array();
$aus[]='<br>'."\n";
@ -392,15 +391,15 @@ else
}
else
WriteLog('Dump \''.$dump['backupdatei'].'\' finished in '.zeit_format($xtime).'.');
if ($config['send_mail']==1) DoEmail();
for($i=0;$i<3;$i++)
{
if ($config['ftp_transfer'][$i]==1) DoFTP($i);
}
$aus[]='<strong>'.$lang['L_DONE'].'</strong><br>';
if ($config['multi_dump']==1)
{
$aus[]=sprintf($lang['L_MULTIDUMP'],count($databases['multi'])).': ';
@ -413,13 +412,13 @@ 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?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[]='&nbsp;&nbsp;&nbsp;<input class="Formbutton" type="button" value="'.$lang['L_BACK_TO_MINISQL'].'" onclick="self.location.href=\''.$relativ_path.'sql.php\'">';
$aus[]='&nbsp;&nbsp;&nbsp;<input class="Formbutton" type="button" value="'.$lang['L_BACK_TO_OVERVIEW'].'" onclick="self.location.href=\''.$relativ_path.'main.php?action=db&amp;dbid='.$dump['dbindex'].'#dbid\'"><br><br>';
$aus[]='</div></form>';
$DumpFertig=1;
}
}

Datei anzeigen

@ -46,7 +46,7 @@ if ($action=='dl')
}
fclose($file);
}
//readfile($file);
exit();
}
@ -106,7 +106,7 @@ if (isset($_POST['dump']))
if (!$check_dir===true) die($check_dir);
$databases['db_actual_tableselected']="";
WriteParams();
$dump['fileoperations']=0;
echo '<script language="JavaScript" type="text/javascript">parent.MySQL_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();
@ -119,7 +119,7 @@ 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.MySQL_Dumper_content.location.href="restore.php?filename='.urlencode($_POST['filename']).'";</script></body></html>';
exit();
}
@ -151,7 +151,7 @@ if (isset($_POST['restore']))
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&amp;kind=0" method="POST">';
@ -160,7 +160,7 @@ if (isset($_POST['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>';
@ -169,7 +169,7 @@ if (isset($_POST['restore']))
else
$dump_encoding=$statusline['charset'];
}
$databases['db_actual_tableselected']="";
WriteParams();
echo '<script language="JavaScript" type="text/javascript">parent.MySQL_Dumper_content.location.href="restore.php?filename='.$file.'&dump_encoding='.$dump_encoding.'&kind='.$kind.'";</script></body></html>';
@ -292,7 +292,12 @@ $autodel.='</p>';
switch ($action)
{
case 'dump':
//Variablen
$dbName = $databases['Name'][$databases['db_selected_index']];
if ($config['multi_dump']==0 && 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);
@ -302,18 +307,18 @@ switch ($action)
$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;
$scriptentry=basePath(). $config['paths']['config'];
$cronabsolute=(substr($config['cron_execution_path'],0,1)=="/") ? $_SERVER['DOCUMENT_ROOT'].$scriptdir : basePath().$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;
//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\';">
@ -321,14 +326,14 @@ switch ($action)
<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">';
//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 '<br><table>';
echo $tbl_abfrage;
echo '<tr><td><label for="sel_dump_encoding">'.$lang['L_FM_CHOOSE_ENCODING'].'</label></td>';
@ -338,9 +343,9 @@ switch ($action)
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 '<table>';
echo '<tr><td>'.$lang['L_DB'].':</td><td><strong>';
if ($config['multi_dump']==1)
@ -351,35 +356,35 @@ switch ($action)
else
{
echo $databases['db_actual'].'&nbsp;&nbsp;<span>('.$databases['Detailinfo']['tables']." Tables, ".$databases['Detailinfo']['records']." Records, ".byte_output($databases['Detailinfo']['size']).')</span></strong>';
}
echo '</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>'.(($config['compression']==1) ? $lang['L_ACTIVATED'] : $lang['L_NOT_ACTIVATED']);
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 ($config['multi_part']==1)
{
echo '<tr><td>'.$lang['L_MULTI_PART_GROESSE'].':</td><td><strong>'.byte_output($config['multipart_groesse']).'</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)
@ -389,20 +394,20 @@ switch ($action)
}
//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><div id="buperl" style="display:none;">';
//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.'\'">&nbsp;&nbsp;';
echo '<input class="Formbutton" type="Button" name="DoPerlTest" value="'.$lang['L_DOPERLTEST'].'" onclick="self.location.href=\''.$sfile.'\'">&nbsp;&nbsp;';
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>';
if ($config['cron_dbindex']==-3)
{
$cron_dbname=$lang['L_MULTIDUMPALL'];
@ -420,34 +425,34 @@ switch ($action)
$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>';
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>".(($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>".(($config['multi_part']==1) ? $lang['L_YES'] : $lang['L_NO']);
echo '</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 ($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)
@ -457,16 +462,16 @@ switch ($action)
}
//echo '</td></tr>';
echo '</table>';
// Eintraege fuer Perl
echo '<br><p class="small">'.$lang['L_PERLOUTPUT1'].':<br>&nbsp;&nbsp;&nbsp;&nbsp;<strong>'.$scriptentry.'</strong><br>';
echo $lang['L_PERLOUTPUT2'].':<br>&nbsp;&nbsp;&nbsp;&nbsp;<strong>'.$scriptref.'</strong><br>';
echo $lang['L_PERLOUTPUT3'].':<br>&nbsp;&nbsp;&nbsp;&nbsp;<strong>'.$cronref.'</strong></p>';
echo '</div>';
break;
case 'restore':
echo headline(sprintf($lang['L_FM_RESTORE_HEADER'],$databases['db_actual']));
echo ($msg>'') ? $msg : '';
@ -490,22 +495,22 @@ switch ($action)
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 '</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>';
break;
case "convert":
// Konverter
@ -521,7 +526,7 @@ switch ($action)
{
//$destfile.=($compressed==1) ? ".sql.gz" : ".sql";
echo $lang['L_CONVERTING']." $selectfile ==&gt; $destfile<br>";
if ($selectfile!=""&&file_exists($config['paths']['backup'].$selectfile)&&strlen($destfile)>2)
{
Converter($selectfile,$destfile,$compressed);

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei anzeigen

@ -72,18 +72,18 @@ function GetStatusLine($kind="php")
$r=0;
$t_zeile="$mysql_commentstring\n$mysql_commentstring TABLE-INFO\r\n";
MSD_mysql_connect();
$res=mysql_query("SHOW TABLE STATUS FROM `".$databases['Name'][$dump['dbindex']]."`");
$numrows=intval(@mysql_num_rows($res));
$res=mysqli_query($GLOBALS["___mysqli_ston"], "SHOW TABLE STATUS FROM `".$databases['Name'][$dump['dbindex']]."`");
$numrows=intval(@mysqli_num_rows($res));
for($i=0;$i<$numrows;$i++)
{
$erg=mysql_fetch_array($res);
$erg=mysqli_fetch_array($res);
// Get nr of records -> need to do it this way because of incorrect returns when using InnoDBs
$sql_2="SELECT count(*) as `count_records` FROM `".$databases['Name'][$dump['dbindex']]."`.`".$erg['Name']."`";
$res2=@mysql_query($sql_2);
$res2=@mysqli_query($GLOBALS["___mysqli_ston"], $sql_2);
if ($res2===false)
{
// error reading table definition
$read_create_error=sprintf($lang['L_FATAL_ERROR_DUMP'],$databases['Name'][$dump['dbindex']],$erg['Name']).': '.mysql_error($config['dbconnection']);
$read_create_error=sprintf($lang['L_FATAL_ERROR_DUMP'],$databases['Name'][$dump['dbindex']],$erg['Name']).': '.((is_object($config['dbconnection'])) ? mysqli_error($config['dbconnection']) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false));
Errorlog("DUMP",$databases['Name'][$dump['dbindex']],'',$read_create_error,0);
WriteLog($read_create_error);
if ($config['stop_with_error']>0)
@ -95,7 +95,7 @@ function GetStatusLine($kind="php")
}
else
{
$row2=mysql_fetch_array($res2);
$row2=mysqli_fetch_array($res2);
$erg['Rows']=$row2['count_records'];
if (($databases['db_actual_tableselected']==''||($databases['db_actual_tableselected']!=''&&(in_array($erg[0],$t_array))))&&(substr($erg[0],0,strlen($databases['praefix'][$dump['dbindex']]))==$databases['praefix'][$dump['dbindex']]))
@ -129,9 +129,9 @@ function get_def($db,$table,$withdata=1)
}
else
$def.="DROP TABLE IF EXISTS `$table`;\n";
mysql_select_db($db);
$result=mysql_query('SHOW CREATE TABLE `'.$table.'`',$config['dbconnection']);
$row=@mysql_fetch_row($result);
mysqli_select_db($GLOBALS["___mysqli_ston"], $db);
$result=mysqli_query($config['dbconnection'], 'SHOW CREATE TABLE `'.$table.'`');
$row=@mysqli_fetch_row($result);
if ($row===false) return false;
$def.=$row[1].';'."\n\n";
if ($withdata==1)
@ -152,12 +152,12 @@ function get_content($db,$table)
$table_ready=0;
$query='SELECT * FROM `'.$table.'` LIMIT '.$dump['zeilen_offset'].','.($dump['restzeilen']+1);
mysql_select_db($db);
$result=mysql_query($query,$config['dbconnection']);
$ergebnisse=@mysql_num_rows($result);
mysqli_select_db($GLOBALS["___mysqli_ston"], $db);
$result=mysqli_query($config['dbconnection'], $query);
$ergebnisse=@mysqli_num_rows($result);
if ($ergebnisse!==false)
{
$num_felder=mysql_num_fields($result);
$num_felder=(($___mysqli_tmp = mysqli_num_fields($result)) ? $___mysqli_tmp : false);
$first=1;
if ($ergebnisse>$dump['restzeilen'])
@ -176,7 +176,7 @@ function get_content($db,$table)
$ax=0;
for($x=0;$x<$ergebnisse;$x++)
{
$row=mysql_fetch_row($result);
$row=mysqli_fetch_row($result);
$ax++;
$insert='INSERT INTO `'.$table.'` '.$complete.'VALUES (';
@ -185,7 +185,7 @@ function get_content($db,$table)
{
if (!isset($row[$j])) $insert.='NULL,';
else
if ($row[$j]!='') $insert.='\''.mysql_escape_string($row[$j]).'\',';
if ($row[$j]!='') $insert.='\''. mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $row[$j]) .'\',';
else
$insert.='\'\',';
}
@ -211,7 +211,7 @@ function get_content($db,$table)
WriteToDumpFile();
}
}
@mysql_free_result($result);
@((mysqli_free_result($result) || (is_object($result) && (get_class($result) == "mysqli_result"))) ? true : false);
}
function WriteToDumpFile()
@ -275,7 +275,7 @@ function ExecuteCommand($when)
if (substr(strtolower($cd),0,7)!='system:')
{
$cad=array();
@mysql_select_db($databases['Name'][$dump['dbindex']]);
mysqli_select_db($GLOBALS["___mysqli_ston"], $databases['Name'][$dump['dbindex']]);
if (strpos($cd,';'))
{
$cad=explode(';',$cd);
@ -287,12 +287,12 @@ function ExecuteCommand($when)
{
if (trim($cad[$i])>'')
{
$result=@mysql_query($cad[$i],$config['dbconnection']);
$result=@mysqli_query($config['dbconnection'], $cad[$i]);
if ($result===false)
{
WriteLog("Error executing Query '$cad[$i]'! MySQL returns: ".trim(mysql_error()));
ErrorLog("Error executing Query '$cad[$i]'!",$databases['Name'][$dump['dbindex']],$cad[$i],mysql_error(),0);
WriteLog("Error executing Query '$cad[$i]'! MySQL returns: ".trim(((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false))));
ErrorLog("Error executing Query '$cad[$i]'!",$databases['Name'][$dump['dbindex']],$cad[$i],((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)),0);
$dump['errors']++;
$out.='<span class="error">Error executing Query '.$cad[$i].'</span>'.$lf;
}

Datei anzeigen

@ -4,7 +4,7 @@ function FilelisteCombo($fpath,$selected)
{
$r='<select name="selectfile">';
$r.='<option value="" '.(($selected=="") ? "SELECTED":"").'></option>';
$dh=opendir($fpath);
while (false!==($filename=readdir($dh)))
{
@ -33,7 +33,7 @@ function sortierdatum($datum)
function FileList($multi=0)
{
global $config,$fpath,$lang,$databases,$href,$dbactiv,$action,$expand;
$files=Array();
//Backup-Dateien
$Theader=$lang['L_FM_FILES1'].' '.$lang['L_OF'].' "'.$dbactiv.'"';
@ -51,13 +51,13 @@ function FileList($multi=0)
$i++;
}
}
$fl.='<div>'.$lang['L_FM_CHOOSE_FILE'].' ';
$fl.='<span id="gd">&nbsp;</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>';
//Tableheader
$fl.='<tr class="thead"><th colspan="3">'.$lang['L_DB'].'</th>
<th>gz</th>
@ -68,7 +68,7 @@ function FileList($multi=0)
<th>'.$lang['L_FM_TABLES'].' / '.$lang['L_FM_RECORDS'].'</th>
<th>'.$lang['L_FM_FILESIZE'].'</th>
<th>'.$lang['L_ENCODING'].'</th></tr>';
$checkindex=$arrayindex=$gesamt=0;
$db_summary_anzahl=Array();
if (count($files)>0)
@ -78,10 +78,10 @@ function FileList($multi=0)
// Dateigr&ouml;&szlig;e
$size=filesize($fpath.$files[$i]['name']);
$file_datum=date("d\.m\.Y H:i",filemtime($fpath.$files[$i]['name']));
//statuszeile auslesen
$sline='';
if (substr($files[$i]['name'],-3)=='.gz')
{
if ($config['zlib'])
@ -98,7 +98,7 @@ function FileList($multi=0)
fclose($fp);
}
$statusline=ReadStatusline($sline);
$but=ExtractBUT($files[$i]['name']);
if ($but=='') $but=$file_datum;
$dbn=$statusline['dbname'];
@ -117,7 +117,7 @@ function FileList($multi=0)
$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;
@ -143,7 +143,7 @@ function FileList($multi=0)
}
}
if ($done==1) $arrayindex--;
if ($done==0)
{
//Eintrag war noch nicht vorhanden
@ -158,12 +158,12 @@ function FileList($multi=0)
$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;
}
}
// Gesamtgroesse aller Backupfiles
@ -173,7 +173,7 @@ function FileList($multi=0)
}
//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)
@ -184,7 +184,7 @@ function FileList($multi=0)
{
$cl=($rowclass%2) ? 'dbrow':'dbrow1';
$multi=($db_summary_anzahl[$dbactiv]>1&&$action=='files') ? 1:0;
if ($db_backups[$i]['multipart']>0)
{
$dbn=NextPart($db_backups[$i]['name'],1);
@ -198,7 +198,7 @@ function FileList($multi=0)
$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);">';
@ -216,12 +216,12 @@ function FileList($multi=0)
}
else
$fl.='&nbsp;<span style="font-size:8pt;">'.$db_backups[$i]['db'].'</span><td>&nbsp;</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">':"&nbsp;").'</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">':"&nbsp;").'</td>';
$fl.='<td class="sm" nowrap="nowrap" align="left">'.(($db_backups[$i]['kommentar']!="") ? nl2br(wordwrap($db_backups[$i]['kommentar'],50)):"&nbsp;").'</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&amp;kind=0&amp;dbactiv='.$dbactiv.'&amp;expand='.$i.'">'.$db_backups[$i]['multipart'].' Files</a>'; //
@ -231,7 +231,7 @@ function FileList($multi=0)
$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.'"').'>';
@ -254,7 +254,7 @@ function FileList($multi=0)
ksort($db_summary_last);
ksort($db_summary_anzahl);
ksort($db_summary_size);
$i=0;
while (list ($key,$val)=each($db_summary_anzahl))
{
@ -268,7 +268,7 @@ function FileList($multi=0)
}
}
if (!is_array($files)) $fl.='<tr><td colspan="11">'.$lang['L_FM_NOFILESFOUND'].'</td></tr>';
//--------------------------------------------------------
//*** Ausgabe der Gesamtgr&ouml;&szlig;e aller Backupfiles ***
//--------------------------------------------------------
@ -277,7 +277,7 @@ function FileList($multi=0)
$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 ***
//--------------------------------------------------------
@ -286,7 +286,7 @@ function FileList($multi=0)
$fl.='<td colspan="4" style="text-align:right"><b>'.$space.'</b></td>';
$fl.='</tr>';
$fl.='</table></div>';
return $fl;
}
@ -322,7 +322,7 @@ function PartListe($f,$nr)
if ($i>1) $s.="<br>";
$s.='<a href="'.$fpath.urlencode($dateistamm.$i.$dateiendung).'">'.$dateistamm.$i.$dateiendung.'</a>&nbsp;&nbsp;&nbsp;'.byte_output(@filesize($config['paths']['backup'].$dateistamm.$i.$dateiendung));
$s.='&nbsp;<a href="filemanagement.php?action=dl&amp;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;
}
@ -330,7 +330,7 @@ function PartListe($f,$nr)
function Converter($filesource,$filedestination,$cp)
{
global $config,$lang;
$filesize=0;
$max_filesize=1024*1024*10; //10 MB splitsize
$part=1;
@ -340,11 +340,11 @@ function Converter($filesource,$filedestination,$cp)
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");
$zeile=get_pseudo_statusline($part,$filedestination)."\r\n";
($cp==1) ? gzwrite($z,$zeile):fwrite($z,$zeile);
$zeile='';
$insert=$mode="";
$n=0;
$eof=($cps==1) ? gzeof($f):feof($f);
@ -353,7 +353,7 @@ function Converter($filesource,$filedestination,$cp)
{
$eof=($cps==1) ? gzeof($f):feof($f);
$zeile=($cps==1) ? gzgets($f,5144000):fgets($f,5144000);
$t=strtolower(substr($zeile,0,10));
if ($t>'')
{
@ -362,14 +362,14 @@ function Converter($filesource,$filedestination,$cp)
case 'insert int':
{
// eine neue Insert Anweisung beginnt
if (strpos($zeile,0,'(')===false)
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.=' ';
}
// get INSERT-Satement
$insert=substr($zeile,0,strpos($zeile,'('));
if (substr(strtoupper($insert),-7)!='VALUES ') $insert.=' VALUES ';
@ -378,7 +378,7 @@ function Converter($filesource,$filedestination,$cp)
$splitable=false;
break;
}
case 'create tab':
{
$mode='create';
@ -392,15 +392,15 @@ function Converter($filesource,$filedestination,$cp)
}
}
}
if ($mode=='insert')
{
if (substr(rtrim($zeile),strlen($zeile)-3,2)==');') $splitable=true;
// Komma loeschen
$zeile=str_replace('),(',");\n\r".$insert.' (',$zeile);
}
if ($splitable==true&&$filesize>$max_filesize) // start new file?
{
$part++;
@ -474,7 +474,7 @@ function Converter($filesource,$filedestination,$cp)
fwrite($z,$zeile);
fclose($z);
}
if ($cps==1) gzclose($f);
else
fclose($f);

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei anzeigen

@ -38,12 +38,12 @@ function ExportCSV()
$res=MSD_query($sqlt);
if ($res)
{
$numfields=mysql_numrows($res);
$numfields=mysqli_num_rows($res);
if ($sql['export']['namefirstline'] == 1)
{
for ($feld=0; $feld < $numfields; $feld++)
{
$row=mysql_fetch_row($res);
$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'] : '' );
}
@ -55,10 +55,10 @@ function ExportCSV()
$res=MSD_query($sqlt);
if ($res)
{
$numrows=mysql_numrows($res);
$numrows=mysqli_num_rows($res);
for ($data=0; $data < $numrows; $data++)
{
$row=mysql_fetch_row($res);
$row=mysqli_fetch_row($res);
for ($feld=0; $feld < $numfields; $feld++)
{
if (!isset($row[$feld]) || is_null($row[$feld]))
@ -145,7 +145,7 @@ function DoImport()
if ($sql['import']['tablecreate'] == 0)
{
$res=MSD_query("show fields FROM " . $sql['import']['table']);
$tabellenfelder=mysql_num_rows($res);
$tabellenfelder=mysqli_num_rows($res);
if ($importfelder != $tabellenfelder)
{
$r.='<br>' . sprintf($lang['L_CSV_FIELDCOUNT_NOMATCH'],$tabellenfelder,$importfelder);
@ -206,11 +206,11 @@ function ImportCreateTable()
{
global $sql,$lang,$db,$config;
$tbl=Array();
$tabellen=mysql_list_tables($db,$config['dbconnection']);
$num_tables=mysql_num_rows($tabellen);
$tabellen=mysqli_query($config['dbconnection'], "SHOW TABLES FROM `$db`");
$num_tables=mysqli_num_rows($tabellen);
for ($i=0; $i < $num_tables; $i++)
{
$tbl[]=strtolower(mysql_tablename($tabellen,$i));
$tbl[]=strtolower(((mysqli_data_seek($tabellen, $i) && (($___mysqli_tmp = mysqli_fetch_row($tabellen)) !== NULL)) ? array_shift($___mysqli_tmp) : false));
}
$i=0;
$sql['import']['table']=$sql['import']['table'] . $i;
@ -237,7 +237,7 @@ function ImportCreateTable()
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=mysql_query($create,$config['dbconnection']) || die(SQLError($create,mysql_error()));
$res=mysqli_query($config['dbconnection'], $create) || die(SQLError($create,((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false))));
return 1;
}
@ -258,13 +258,13 @@ function ExportXML()
$res=MSD_query($sqlt);
if ($res)
{
$numfields=mysql_num_rows($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=mysql_fetch_array($res);
$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";
@ -282,12 +282,12 @@ function ExportXML()
$res=MSD_query($sqlt);
if ($res)
{
$numrows=mysql_numrows($res);
$numrows=mysqli_num_rows($res);
for ($data=0; $data < $numrows; $data++)
{
$t.=str_repeat($tab,$level) . "<row>\n";
$level++;
$row=mysql_fetch_row($res);
$row=mysqli_fetch_row($res);
for ($feld=0; $feld < $numfields; $feld++)
{
$t.=str_repeat($tab,$level) . '<field no="' . $feld . '">' . $row[$feld] . '</field>' . "\n";
@ -336,10 +336,10 @@ function ExportHTML()
{
$field=$fieldname=$fieldtyp=Array();
$structure="<table class=\"Table\">\n";
$numfields=mysql_numrows($res);
$numfields=mysqli_num_rows($res);
for ($feld=0; $feld < $numfields; $feld++)
{
$row=mysql_fetch_row($res);
$row=mysqli_fetch_row($res);
$field[$feld]=$row[0];
if ($feld == 0)
@ -347,7 +347,7 @@ function ExportHTML()
$structure.="<tr class=\"Header\">\n";
for ($i=0; $i < count($row); $i++)
{
$str=mysql_fetch_field($res,$i);
$str=(((($___mysqli_tmp = mysqli_fetch_field_direct($res, 0)) && is_object($___mysqli_tmp)) ? ( (!is_null($___mysqli_tmp->primary_key = ($___mysqli_tmp->flags & MYSQLI_PRI_KEY_FLAG) ? 1 : 0)) && (!is_null($___mysqli_tmp->multiple_key = ($___mysqli_tmp->flags & MYSQLI_MULTIPLE_KEY_FLAG) ? 1 : 0)) && (!is_null($___mysqli_tmp->unique_key = ($___mysqli_tmp->flags & MYSQLI_UNIQUE_KEY_FLAG) ? 1 : 0)) && (!is_null($___mysqli_tmp->numeric = (int)(($___mysqli_tmp->type <= MYSQLI_TYPE_INT24) || ($___mysqli_tmp->type == MYSQLI_TYPE_YEAR) || ((defined("MYSQLI_TYPE_NEWDECIMAL")) ? ($___mysqli_tmp->type == MYSQLI_TYPE_NEWDECIMAL) : 0)))) && (!is_null($___mysqli_tmp->blob = (int)in_array($___mysqli_tmp->type, array(MYSQLI_TYPE_TINY_BLOB, MYSQLI_TYPE_BLOB, MYSQLI_TYPE_MEDIUM_BLOB, MYSQLI_TYPE_LONG_BLOB)))) && (!is_null($___mysqli_tmp->unsigned = ($___mysqli_tmp->flags & MYSQLI_UNSIGNED_FLAG) ? 1 : 0)) && (!is_null($___mysqli_tmp->zerofill = ($___mysqli_tmp->flags & MYSQLI_ZEROFILL_FLAG) ? 1 : 0)) && (!is_null($___mysqli_type = $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = (($___mysqli_type == MYSQLI_TYPE_STRING) || ($___mysqli_type == MYSQLI_TYPE_VAR_STRING)) ? "type" : "")) &&(!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && in_array($___mysqli_type, array(MYSQLI_TYPE_TINY, MYSQLI_TYPE_SHORT, MYSQLI_TYPE_LONG, MYSQLI_TYPE_LONGLONG, MYSQLI_TYPE_INT24))) ? "int" : $___mysqli_tmp->type)) &&(!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && in_array($___mysqli_type, array(MYSQLI_TYPE_FLOAT, MYSQLI_TYPE_DOUBLE, MYSQLI_TYPE_DECIMAL, ((defined("MYSQLI_TYPE_NEWDECIMAL")) ? constant("MYSQLI_TYPE_NEWDECIMAL") : -1)))) ? "real" : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && $___mysqli_type == MYSQLI_TYPE_TIMESTAMP) ? "timestamp" : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && $___mysqli_type == MYSQLI_TYPE_YEAR) ? "year" : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && (($___mysqli_type == MYSQLI_TYPE_DATE) || ($___mysqli_type == MYSQLI_TYPE_NEWDATE))) ? "date " : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && $___mysqli_type == MYSQLI_TYPE_TIME) ? "time" : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && $___mysqli_type == MYSQLI_TYPE_SET) ? "set" : $___mysqli_tmp->type)) &&(!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && $___mysqli_type == MYSQLI_TYPE_ENUM) ? "enum" : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && $___mysqli_type == MYSQLI_TYPE_GEOMETRY) ? "geometry" : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && $___mysqli_type == MYSQLI_TYPE_DATETIME) ? "datetime" : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && (in_array($___mysqli_type, array(MYSQLI_TYPE_TINY_BLOB, MYSQLI_TYPE_BLOB, MYSQLI_TYPE_MEDIUM_BLOB, MYSQLI_TYPE_LONG_BLOB)))) ? "blob" : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && $___mysqli_type == MYSQLI_TYPE_NULL) ? "null" : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type) ? "unknown" : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->not_null = ($___mysqli_tmp->flags & MYSQLI_NOT_NULL_FLAG) ? 1 : 0)) ) : false ) ? $___mysqli_tmp : false);
$fieldname[$i]=$str->name;
$fieldtyp[$i]=$str->type;
$structure.="<th>" . $str->name . "</th>\n";
@ -369,7 +369,7 @@ function ExportHTML()
$res=MSD_query($dsql);
if ($res)
{
$anz=mysql_num_rows($res);
$anz=mysqli_num_rows($res);
$content.="<h3>Daten ($anz Datens&auml;tze)</h3>\n";
$content.="<table class=\"Table\">\n";
for ($feld=0; $feld < count($field); $feld++)
@ -386,7 +386,7 @@ function ExportHTML()
}
for ($d=0; $d < $anz; $d++)
{
$row=mysql_fetch_row($res);
$row=mysqli_fetch_row($res);
$content.="<tr>\n";
for ($i=0; $i < count($row); $i++)
{

Datei anzeigen

@ -4,14 +4,14 @@ if (!defined('MSD_VERSION')) die('No direct access.');
function get_sqlbefehl()
{
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;
//Parsen
WHILE ($sqlparser_status!=100&&!$restore['fileEOF']&&!$restore['EOB'])
{
@ -22,7 +22,7 @@ function get_sqlbefehl()
// herausfinden um was für einen Befehl es sich handelt
if ($sqlparser_status==0)
{
//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 :)
@ -33,13 +33,13 @@ function get_sqlbefehl()
$sub3=substr($sub4,0,3);
$sub2=substr($sub3,0,2);
$sub1=substr($sub2,0,1);
if ($sub7=='INSERT ')
{
$sqlparser_status=3; //Datensatzaktion
$restore['actual_table']=get_tablename($zeile);
}
//Einfache Anweisung finden die mit Semikolon beendet werden
elseif ($sub7=='LOCK TA') $sqlparser_status=4;
elseif ($sub6=='COMMIT') $sqlparser_status=7;
@ -52,20 +52,20 @@ function get_sqlbefehl()
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 (($sqlparser_status!=5)&&(substr($zeile2,0,2)=='/*')) $sqlparser_status=6;
// Delete actions
elseif ($sub9=='DROP TABL') $sqlparser_status=1;
elseif ($sub9=='DROP VIEW') $sqlparser_status=1;
// Befehle, die nicht ausgeführt werden sollen
elseif ($sub9=='CREATE DA ') $sqlparser_status=7;
elseif ($sub9=='CREATE DA') $sqlparser_status=7;
elseif ($sub9=='DROP DATA ') $sqlparser_status=7;
elseif ($sub3=='USE') $sqlparser_status=7;
// Am Ende eines MySQLDumper-Backups angelangt?
elseif ($sub6=='-- EOB'||$sub4=='# EO')
{
@ -75,7 +75,7 @@ function get_sqlbefehl()
$zeile2='';
$sqlparser_status=100;
}
// Kommentar?
elseif ($sub2=='--'|| $sub1=='#')
{
@ -83,10 +83,10 @@ function get_sqlbefehl()
$zeile2='';
$sqlparser_status=0;
}
// Fortsetzung von erweiterten Inserts
if ($restore['flag']==1) $sqlparser_status=3;
if (($sqlparser_status==0)&&(trim($complete_sql)>'')&&($restore['flag']==-1))
{
// Unbekannten Befehl entdeckt
@ -97,12 +97,12 @@ function get_sqlbefehl()
}
/******************* Ende von Setzen des Parserstatus *******************/
}
$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==3)
{
//INSERT
@ -110,19 +110,19 @@ function get_sqlbefehl()
{
$sqlparser_status=100;
$complete_sql=trim($complete_sql);
if (substr($complete_sql,-2)=='*/')
if (substr($complete_sql,-2)=='*/')
{
$complete_sql=remove_comment_at_eol($complete_sql);
}
// letzter Ausdruck des erweiterten Inserts erreicht?
if (substr($complete_sql,-2)==');')
{
$restore['flag']=-1;
}
// Wenn am Ende der Zeile ein Klammer Komma -> erweiterter Insert-Modus -> Steuerflag setzen
else
else
if (substr($complete_sql,-2)=='),')
{
// letztes Komme gegen Semikolon tauschen
@ -130,7 +130,7 @@ function get_sqlbefehl()
$restore['erweiterte_inserts']=1;
$restore['flag']=1;
}
if (substr(strtoupper($complete_sql),0,7)!='INSERT ')
{
// wenn der Syntax aufgrund eines Reloads verloren ging - neu ermitteln
@ -147,16 +147,16 @@ function get_sqlbefehl()
}
}
}
else
else
if ($sqlparser_status==1)
{
//Löschaktion
if ($last_char==';') $sqlparser_status=100; //Befehl komplett
$restore['actual_table']=get_tablename($complete_sql);
}
else
else
if ($sqlparser_status==2)
{
// Createanweisung ist beim Finden eines ; beendet
@ -184,9 +184,9 @@ function get_sqlbefehl()
$sqlparser_status=0;
}
}
// Index
else
else
if ($sqlparser_status==4)
{ //Createindex
if ($last_char==';')
@ -199,9 +199,9 @@ function get_sqlbefehl()
$sqlparser_status=100;
}
}
// Kommentar oder Condition
else
else
if ($sqlparser_status==5)
{ //Anweisung
$t=strrpos($zeile,'*/;');
@ -209,11 +209,17 @@ function get_sqlbefehl()
{
$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
else
if ($sqlparser_status==6)
{
$t=strrpos($zeile,'*/');
@ -223,9 +229,9 @@ function get_sqlbefehl()
$sqlparser_status=0;
}
}
// Befehle, die verworfen werden sollen
else
else
if ($sqlparser_status==7)
{ //Anweisung
if ($last_char==';')
@ -238,7 +244,7 @@ function get_sqlbefehl()
$sqlparser_status=0;
}
}
if (($restore['compressed'])&&(gzeof($restore['filehandle']))) $restore['fileEOF']=true;
if ((!$restore['compressed'])&&(feof($restore['filehandle']))) $restore['fileEOF']=true;
}
@ -269,24 +275,24 @@ function submit_create_action($sql)
}
}
}
$res=@mysql_query($sql);
$res=@mysqli_query($GLOBALS["___mysqli_ston"], $sql);
if ($res===false)
{
// erster Versuch fehlgeschlagen -> zweiter Versuch - vielleicht versteht der Server die Inline-Kommentare nicht?
$sql=del_inline_comments($sql);
$res=@mysql_query(downgrade($sql));
$res=@mysqli_query($GLOBALS["___mysqli_ston"], downgrade($sql));
if ($res===false)
{
// wieder nichts. Ok, haben wir hier einen alten MySQL-Server 3.x oder 4.0.x?
// 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=@mysql_query(downgrade($sql));
$res=@mysqli_query($GLOBALS["___mysqli_ston"], downgrade($sql));
}
}
if ($res===false)
{
// wenn wir hier angekommen sind hat nichts geklappt -> Fehler ausgeben und abbrechen
SQLError($sql,mysql_error());
SQLError($sql,((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));
die("<br>Fatal error: Couldn't create table or view `".$tablename."´");
}
return $tablename;
@ -296,11 +302,11 @@ function get_insert_syntax($table)
{
$insert='';
$sql='SHOW COLUMNS FROM `'.$table.'`';
$res=mysql_query($sql);
$res=mysqli_query($GLOBALS["___mysqli_ston"], $sql);
if ($res)
{
$insert='INSERT INTO `'.$table.'` (';
while ($row=mysql_fetch_object($res))
while ($row=mysqli_fetch_object($res))
{
$insert.='`'.$row->Field.'`,';
}
@ -310,7 +316,7 @@ function get_insert_syntax($table)
{
global $restore;
v($restore);
SQLError($sql,mysql_error());
SQLError($sql,((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));
}
return $insert;
}
@ -350,7 +356,7 @@ function get_tablename($t)
}
$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=' ';

Datei anzeigen

@ -18,7 +18,7 @@ function ReadSQL()
fclose($fp);
@chmod($sf,0777);
}
if (count($SQL_ARRAY) == 0 && filesize($sf) > 0)
if ((!is_array($SQL_ARRAY) || count($SQL_ARRAY) == 0) && filesize($sf) > 0)
{
$SQL_ARRAY=file($sf);
}
@ -63,7 +63,7 @@ function SQL_ComboBox()
{
global $SQL_ARRAY,$tablename,$nl;
$s='';
if (count($SQL_ARRAY) > 0)
if (is_array($SQL_ARRAY) && count($SQL_ARRAY) > 0)
{
$s=$nl . $nl . '<select class="SQLCombo" name="sqlcombo" onchange="this.form.sqltextarea.value=this.options[this.selectedIndex].value;">' . $nl;
$s.='<option value="" selected>---</option>' . $nl;
@ -79,12 +79,15 @@ function SQL_ComboBox()
function Table_ComboBox()
{
global $db,$config,$lang,$nl;
$tabellen=mysql_query('SHOW TABLES FROM `' . $db . '`',$config['dbconnection']);
$num_tables=mysql_num_rows($tabellen);
$tabellen=mysqli_query($config['dbconnection'], 'SHOW TABLES FROM `' . $db . '`');
$num_tables = 0;
if (is_resource($tabellen)) {
$num_tables=mysqli_num_rows($tabellen);
}
$s=$nl . $nl . '<select class="SQLCombo" name="tablecombo" onchange="this.form.sqltextarea.value=this.options[this.selectedIndex].value;this.form.execsql.click();">' . $nl . '<option value="" selected> --- </option>' . $nl;
for ($i=0; $i < $num_tables; $i++)
{
$t=mysql_fetch_row($tabellen);
$t=mysqli_fetch_row($tabellen);
$s.='<option value="SELECT * FROM `' . $db . '`.`' . $t[0] . '`">' . $lang['L_TABLE'] . ' `' . $t[0] . '`</option>' . $nl;
}
$s.='</select>' . $nl . $nl;
@ -94,12 +97,12 @@ function Table_ComboBox()
function TableComboBox($default='')
{
global $db,$config,$lang,$nl;
$tabellen=mysql_list_tables($db,$config['dbconnection']);
$num_tables=mysql_num_rows($tabellen);
$tabellen=mysqli_query($config['dbconnection'], "SHOW TABLES FROM `$db`");
$num_tables=mysqli_num_rows($tabellen);
$s='<option value="" ' . ( ( $default == '' ) ? 'selected' : '' ) . '> </option>' . $nl;
for ($i=0; $i < $num_tables; $i++)
{
$t=mysql_tablename($tabellen,$i);
$t=((mysqli_data_seek($tabellen, $i) && (($___mysqli_tmp = mysqli_fetch_row($tabellen)) !== NULL)) ? array_shift($___mysqli_tmp) : false);
$s.='<option value="`' . $t . '`"' . ( ( $default == '`' . $t . '`' ) ? 'selected' : '' ) . '>`' . $t . '`</option>' . $nl;
}
return $s;
@ -110,8 +113,8 @@ function DB_Exists($db)
global $config;
if (!isset($config['dbconnection'])) MSD_mysql_connect();
$erg=false;
$dbs=mysql_list_dbs($config['dbconnection']);
while ($row=mysql_fetch_object($dbs))
$dbs=(($___mysqli_tmp = mysqli_query($config['dbconnection'], "SHOW DATABASES")) ? $___mysqli_tmp : false);
while ($row=mysqli_fetch_object($dbs))
{
if (strtolower($row->Database) == strtolower($db))
{
@ -131,7 +134,7 @@ function Table_Exists($db, $table)
if ($res)
{
$tables=array();
WHILE ($row=mysql_fetch_row($res))
WHILE ($row=mysqli_fetch_row($res))
{
$tables[]=$row[0];
}
@ -143,7 +146,7 @@ function Table_Exists($db, $table)
function DB_Empty($dbn)
{
$r="DROP DATABASE `$dbn`;\nCREATE DATABASE `$dbn`;";
MSD_DoSQL($r);
return MSD_DoSQL($r);
}
@ -195,25 +198,38 @@ function DB_Copy($source, $destination, $drop_source=0, $insert_data=1)
global $config;
if (!isset($config['dbconnection'])) MSD_mysql_connect();
$SQL_Array=$t="";
if (!DB_Exists($destination)) $SQL_Array.="CREATE DATABASE `$destination` ;\n";
if (!DB_Exists($destination))
{
$res = MSD_DoSQL("CREATE DATABASE `$destination`;");
if (!$res)
{
return false;
}
}
$SQL_Array.="USE `$destination` ;\n";
$tabellen=mysql_list_tables($source,$config['dbconnection']);
$num_tables=mysql_num_rows($tabellen);
$tabellen=mysqli_query($config['dbconnection'], "SHOW TABLES FROM `$source`");
$num_tables=mysqli_num_rows($tabellen);
for ($i=0; $i < $num_tables; $i++)
{
$table=mysql_tablename($tabellen,$i);
$table=((mysqli_data_seek($tabellen, $i) && (($___mysqli_tmp = mysqli_fetch_row($tabellen)) !== NULL)) ? array_shift($___mysqli_tmp) : false);
$sqlt="SHOW CREATE TABLE `$source`.`$table`";
$res=MSD_query($sqlt);
$row=mysql_fetch_row($res);
$c=$row[1];
if (substr($c,-1) == ";") $c=substr($c,0,strlen($c) - 1);
$SQL_Array.=( $insert_data == 1 ) ? "$c SELECT * FROM `$source`.`$table` ;\n" : "$c ;\n";
if ($res)
{
$row=mysqli_fetch_row($res);
$c=$row[1];
if (substr($c,-1) == ";") $c=substr($c,0,strlen($c) - 1);
$SQL_Array.=( $insert_data == 1 ) ? "$c SELECT * FROM `$source`.`$table` ;\n" : "$c ;\n";
}
else
{
return false;
}
}
if ($drop_source == 1) $SQL_Array.="DROP DATABASE `$source` ;";
mysql_select_db($destination);
MSD_DoSQL($SQL_Array);
mysqli_select_db($GLOBALS["___mysqli_ston"], $destination);
$res=MSD_DoSQL($SQL_Array);
if ($drop_source == 1 && $res) MSD_query("DROP DATABASE `$source`;");
return $res;
}
function Table_Copy($source, $destination, $insert_data, $destinationdb="")
@ -223,7 +239,7 @@ function Table_Copy($source, $destination, $insert_data, $destinationdb="")
$SQL_Array=$t="";
$sqlc="SHOW CREATE TABLE $source";
$res=MSD_query($sqlc);
$row=mysql_fetch_row($res);
$row=mysqli_fetch_row($res);
$c=$row[1];
$a1=strpos($c,"`");
$a2=strpos($c,"`",$a1 + 1);
@ -258,6 +274,7 @@ function MSD_DoSQL($sqlcommands, $limit="")
}
else
{
$result = true;
for ($i=0; $i < $sql_queries; $i++)
{
$allSQL[$i]=trim(rtrim($allSQL[$i]));
@ -271,13 +288,14 @@ function MSD_DoSQL($sqlcommands, $limit="")
//sql complete
$sql['parser']['sql_commands']++;
$out.=Stringformat(( $sql['parser']['sql_commands'] ),4) . ': ' . $sqlcommand . "\n";
$result=MSD_query($sqlcommand);
$result=$result && MSD_query($sqlcommand);
$sqlcommand="";
}
}
}
}
$sql['parser']['time_used']=getmicrotime() - $sql['parser']['time_used'];
return $result;
}
function SQLParser($command, $debug=0)
@ -444,11 +462,11 @@ function SQLOutput($sqlcommand, $meldung='')
{
global $sql,$lang;
$s='<h6 align="center">' . $lang['L_SQL_OUTPUT'] . '</h6><div id="sqloutbox"><strong>';
if ($meldung != '') $s.=$meldung;
if ($meldung != '') $s.=trim($meldung);
if (isset($sql['parser']['sql_commands']))
{
$s.='' . $sql['parser']['sql_commands'] . '</strong>' . $lang['L_SQL_COMMANDS_IN'] . round($sql['parser']['time_used'],4) . $lang['L_SQL_COMMANDS_IN2'] . '<br><br>';
$s.=' ' . $sql['parser']['sql_commands'] . '</strong>' . $lang['L_SQL_COMMANDS_IN'] . round($sql['parser']['time_used'],4) . $lang['L_SQL_COMMANDS_IN2'] . '<br><br>';
$s.=$lang['L_SQL_OUT1'] . '<strong>' . $sql['parser']['drop'] . '</strong> <span style="color:#990099;font-weight:bold;">DROP</span>-, ';
$s.='<strong>' . $sql['parser']['create'] . '</strong> <span style="color:#990099;font-weight:bold;">CREATE</span>-, ';
$s.='<strong>' . $sql['parser']['insert'] . '</strong> <span style="color:#990099;font-weight:bold;">INSERT</span>-, ';
@ -465,16 +483,16 @@ function GetCreateTable($db, $tabelle)
{
global $config;
if (!isset($config['dbconnection'])) MSD_mysql_connect();
$res=mysql_query("SHOW CREATE TABLE `$db`.`$tabelle`");
$res=mysqli_query($GLOBALS["___mysqli_ston"], "SHOW CREATE TABLE `$db`.`$tabelle`");
if ($res)
{
$row=mysql_fetch_array($res);
$row=mysqli_fetch_array($res);
if (isset($row['Create Table'])) return $row['Create Table'];
elseif (isset($row['Create View'])) return $row['Create View'];
else return false;
}
else
return mysql_error();
return ((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false));
}
@ -512,10 +530,10 @@ function correct_post_index($index)
$index=str_replace('.','_',$index);
return $index;
}
function ComboCommandDump($when, $index)
function ComboCommandDump($when, $index, $disabled = '')
{
global $SQL_ARRAY,$nl,$databases,$lang;
if (count($SQL_ARRAY) == 0)
if (!is_array($SQL_ARRAY) || count($SQL_ARRAY) == 0)
{
$r='<a href="sql.php?context=1" class="uls">' . $lang['L_SQL_BEFEHLE'] . '</a>';
if ($when == 0) $r.='<input type="hidden" name="command_before_' . $index . '" value="">';
@ -525,12 +543,14 @@ function ComboCommandDump($when, $index)
{
if ($when == 0)
{
$r='<select class="SQLCombo" name="command_before_' . $index . '">';
$r='<select class="SQLCombo" name="command_before_' . $index . '"'
. $disabled.'>';
$csql=$databases['command_before_dump'][$index];
}
else
{
$r='<select class="SQLCombo" name="command_after_' . $index . '">';
$r='<select class="SQLCombo" name="command_after_' . $index . '"'
. $disabled.'>';
$csql=$databases['command_after_dump'][$index];
}
@ -567,11 +587,11 @@ function EngineCombo($default="")
}
else
{
$res=mysql_query("SHOW ENGINES");
$num=mysql_num_rows($res);
$res=mysqli_query($GLOBALS["___mysqli_ston"], "SHOW ENGINES");
$num=mysqli_num_rows($res);
for ($i=0; $i < $num; $i++)
{
$row=mysql_fetch_array($res);
$row=mysqli_fetch_array($res);
$r.='<option value="' . $row['Engine'] . '" ' . ( ( $row['Engine'] == $default ) ? "selected" : "" ) . '>' . $row['Engine'] . '</option>';
}
}
@ -588,13 +608,13 @@ function CharsetCombo($default="")
else
{
if (!isset($config['dbconnection'])) MSD_mysql_connect();
$res=mysql_query("SHOW Charset");
$num=mysql_num_rows($res);
$res=mysqli_query($GLOBALS["___mysqli_ston"], "SHOW Charset");
$num=mysqli_num_rows($res);
$r='<option value="" ' . ( ( $default == "" ) ? "selected" : "" ) . '></option>';
$charsets=array();
for ($i=0; $i < $num; $i++)
{
$charsets[]=mysql_fetch_array($res);
$charsets[]=mysqli_fetch_array($res);
}
if (is_array($charsets))
@ -614,14 +634,14 @@ function GetCollationArray()
global $config;
if (!isset($config['dbconnection'])) MSD_mysql_connect();
$res=mysql_query("SHOW Collation");
$num=@mysql_num_rows($res);
$res=mysqli_query($GLOBALS["___mysqli_ston"], "SHOW Collation");
$num=@mysqli_num_rows($res);
$r=Array();
if (is_array($r))
{
for ($i=0; $i < $num; $i++)
{
$row=mysql_fetch_array($res);
$row=mysqli_fetch_array($res);
$r[$i]['Collation']=isset($row['Collation']) ? $row['Collation'] : '';
$r[$i]['Charset']=isset($row['Charset']) ? $row['Charset'] : '';
$r[$i]['Id']=isset($row['Id']) ? $row['Id'] : '';
@ -715,7 +735,7 @@ function ExtractTablenameFromSQL($q)
if (strlen($q) > 100) $q=substr($q,0,100);
$p=trim($q);
// if we get a list of tables - no current table is selected -> return ''
if (strtoupper(substr($q,0,17)) == 'SHOW TABLE STATUS') return '';
if (strtoupper(substr($p,0,17)) == 'SHOW TABLE STATUS') return '';
// check for SELECT-Statement to extract tablename after FROM
if (strtoupper(substr($p,0,7)) == 'SELECT ')
{
@ -724,8 +744,11 @@ function ExtractTablenameFromSQL($q)
$parts=explode(' ',$p);
$p=$parts[0];
}
// remove keyword DATABASES and the database name after that
$p = preg_replace('/DATABASE [`]*\w+[`]*/i', '', $p);
// remove other keywords
$suchen=array(
'SHOW DATABASES',
'SHOW ',
'SELECT',
'DROP',
@ -739,7 +762,7 @@ function ExtractTablenameFromSQL($q)
'*'
);
$ersetzen=array(
'',
'',
'',
'',
@ -817,7 +840,7 @@ function getFieldinfos($db, $tabelle)
$t=GetCreateTable($db,$tabelle);
$sqlf="SHOW FULL FIELDS FROM `$db`.`$tabelle`;";
$res=MSD_query($sqlf);
$anz_fields=mysql_num_rows($res);
$anz_fields=mysqli_num_rows($res);
$fields_infos['_primarykeys_']=array();
$fields_infos['_key_']=array();
@ -844,7 +867,7 @@ function getFieldinfos($db, $tabelle)
$fields_infos[$i]['type']='';
$fields_infos[$i]['privileges']='';
$row=mysql_fetch_array($res,MYSQL_ASSOC);
$row=mysqli_fetch_array($res, MYSQLI_ASSOC);
//v($row);
if (isset($row['Collation'])) $fields_infos[$i]['collate']=$row['Collation'];
if (isset($row['COLLATE'])) $fields_infos[$i]['collate']=$row['COLLATE']; // MySQL <4.1
@ -875,12 +898,13 @@ function getFieldinfos($db, $tabelle)
// now get key definitions of the table and add info to fields
$sql='SHOW KEYS FROM `' . $db . '`.`' . $tabelle . '`';
$res=MSD_query($sql);
WHILE ($row=mysql_fetch_array($res,MYSQL_ASSOC))
WHILE ($row=mysqli_fetch_array($res, MYSQLI_ASSOC))
{
//v($row);
$key_name=isset($row['Key_name']) ? $row['Key_name'] : '';
$index_type=isset($row['Index_type']) ? $row['Index_type'] : '';
$column_name=isset($row['Column_name']) ? $row['Column_name'] : '';
$non_unique=isset($row['Non_unique']) ? $row['Non_unique'] : '';
if ($column_name > '')
{
// first find indexnr of field
@ -888,7 +912,14 @@ function getFieldinfos($db, $tabelle)
{
if ($fields_infos[$index]['name'] == $column_name) break;
}
if ($key_name == 'PRIMARY') $fields_infos['_primarykeys_'][]=$column_name;
if ($key_name == 'PRIMARY')
$fields_infos['_primarykeys_'][]=$column_name;
elseif ($index_type == 'FULLTEXT')
$fields_infos['_fulltextkey_'][]=$column_name;
elseif ($non_unique == 0)
$fields_infos['_uniquekey_'][]=$column_name;
else
$fields_infos['_key_'][]=$column_name;
}
}
//v($fields_infos);
@ -916,12 +947,12 @@ function getExtendedFieldInfo($db, $table)
$t=GetCreateTable($db,$table);
$sqlf="SHOW FULL FIELDS FROM `$db`.`$table`;";
$res=MSD_query($sqlf);
$num_fields=mysql_num_rows($res);
$num_fields=mysqli_num_rows($res);
$f=array(); //will hold all info
for ($x=0; $x < $num_fields; $x++)
{
$row=mysql_fetch_array($res,MYSQL_ASSOC);
$row=mysqli_fetch_array($res, MYSQLI_ASSOC);
//v($row);
$i=$row['Field']; // define name of field as index of array
//define field defaults - this way the index of the array is defined anyway
@ -966,7 +997,7 @@ function getExtendedFieldInfo($db, $table)
// now get key definitions of the table and add info to field-array
$sql='SHOW KEYS FROM `' . $db . '`.`' . $table . '`';
$res=MSD_query($sql);
WHILE ($row=mysql_fetch_array($res,MYSQL_ASSOC))
WHILE ($row=mysqli_fetch_array($res, MYSQLI_ASSOC))
{
//echo "<br>Keys of $table: ";v($row);
$key_name=isset($row['Key_name']) ? $row['Key_name'] : '';
@ -1029,9 +1060,9 @@ function build_where_from_record($data)
{
$val=str_replace('<span class="treffer">','',$val);
$val=str_replace('</span>','',$val);
$ret.='`' . $key . '`="' . addslashes($val) . '"|';
$ret.='`' . $key . '`="' . addslashes($val) . '" AND ';
}
$ret=substr($ret,0,-1);
$ret=substr($ret,0,-5);
return $ret;
}
@ -1046,11 +1077,20 @@ function getPrimaryKeys($db, $table)
$keys=Array();
$sqlk="SHOW KEYS FROM `" . $db . "`.`" . $table . "`;";
$res=MSD_query($sqlk);
while ($row=mysql_fetch_array($res))
while ($row=mysqli_fetch_array($res))
{
//wenn Primaerschluessel
if ($row['Key_name'] == "PRIMARY") $keys[]=$row['Column_name'];
if ($row['Key_name'] == "PRIMARY") $keys['name'][]=$row['Column_name'];
if ($row['Sub_part'] != null)
{
$keys['size'][]=$row['Sub_part'];
}
else
{
$keys['size'][]='';
}
}
return $keys;
}
@ -1065,7 +1105,7 @@ function getAllFields($db, $table)
$fields=Array();
$sqlk="DESCRIBE `" . $db . "`.`" . $table . "`;";
$res=MSD_query($sqlk);
while ($row=mysql_fetch_array($res))
while ($row=mysqli_fetch_array($res))
{
$fields[]=$row['Field'];
}
@ -1078,20 +1118,67 @@ function getAllFields($db, $table)
* OUTPUT: true/false
* Author: DH
*/
function setNewPrimaryKeys($db, $table, $newKeys)
function setNewPrimaryKeys($db, $table, $newKeys, $indexSizes)
{
$sqlSetNewPrimaryKeys="ALTER TABLE `" . $db . "`.`" . $table . "` DROP PRIMARY KEY";
//wenn min. 1 Schluessel im Array, sonst nur loeschen
$sqlSetNewPrimaryKeys="ALTER TABLE `" . $db . "`.`" . $table . "`";
//wenn es Primaerschluessel gibt, diese loeschen
$existingKeys = getPrimaryKeys($db, $table);
if (count($existingKeys) > 0)
{
$sqlSetNewPrimaryKeys.=" DROP PRIMARY KEY";
}
//wenn min. 1 Schluessel im Array, sonst nur loeschen
if (count($newKeys) > 0)
{
$sqlSetNewPrimaryKeys.=",
ADD PRIMARY KEY (`" . implode("`,`",$newKeys) . "`)";
if (count($existingKeys) > 0)
{
$sqlSetNewPrimaryKeys.=", ";
}
$sqlSetNewPrimaryKeys.=" ADD PRIMARY KEY (";
foreach ($newKeys as $id => $name)
{
if ($id > 0) $sqlSetNewPrimaryKeys.=", ";
$sqlSetNewPrimaryKeys.="`" . $name . "`";
if ($indexSizes[$id]) {
$sqlSetNewPrimaryKeys.=" (" . $indexSizes[$id] . ")";
}
}
$sqlSetNewPrimaryKeys.=")";
}
$sqlSetNewPrimaryKeys.=";";
$res=MSD_query($sqlSetNewPrimaryKeys);
return $res;
}
function setNewKeys($db, $table, $newKeys, $indexType, $indexName, $indexSizes)
{
$sqlSetNewKeys="ALTER TABLE `" . $db . "`.`" . $table . "` ";
$sqlSetNewKeys.="ADD ".$indexType." ";
if ($indexName)
{
$sqlSetNewKeys.="`" . $indexName ."` ";
}
$sqlSetNewKeys.="(";
foreach ($newKeys as $id => $name)
{
if ($id > 0) $sqlSetNewKeys.=", ";
$sqlSetNewKeys.="`" . $name . "`";
if ($indexSizes[$id]) {
$sqlSetNewKeys.=" (" . $indexSizes[$id] . ")";
}
}
$sqlSetNewKeys.=");";
$res=MSD_query($sqlSetNewKeys);
return $res;
}
function killKey($db, $table, $indexName)
{
$sqlKillKey = "ALTER TABLE `".$db."`.`".$table."` DROP INDEX `".$indexName."`";
$res=MSD_query($sqlKillKey);
return $res;
}
function get_output_attribut_null($null)
{
global $lang;

Datei anzeigen

@ -1,25 +1,32 @@
<?php
$msd_path=realpath(dirname(__FILE__));
$msd_path=str_replace('\\','/',$msd_path);
$msd_path=str_replace('/inc','/',$msd_path);
if (!defined('MSD_PATH')) define('MSD_PATH',$msd_path);
session_name('MySQLDumper');
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");
include(dirname(__FILE__) . '/functions.php');
$msd_path = basePath();
if (!defined('MSD_PATH')) {
define('MSD_PATH', $msd_path);
}
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(MSD_PATH . 'inc/mysql.php');
if (!defined('MSD_VERSION')) {
die('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(MSD_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['files']['iconpath'] = './css/' . $config['theme'] . '/icons/';
if (isset($error)) {
echo $error;
}

Datei anzeigen

@ -3,7 +3,7 @@ if (!defined('MSD_VERSION')) die('No direct access.');
include('./language/'.$config['language'].'/lang_sql.php');
$checkit=(isset($_GET['checkit'])) ? urldecode($_GET['checkit']) : '';
$repair=(isset($_GET['repair'])) ? $_GET['repair'] : 0;
$enableKeys=(isset($_GET['enableKeys'])) ? $_GET['enableKeys'] : '';
for ($i=0; $i<count($databases['Name']); $i++)
{
if (isset($_POST['empty'.$i]))
@ -14,7 +14,7 @@ for ($i=0; $i<count($databases['Name']); $i++)
}
if (isset($_POST['kill'.$i]))
{
$res=mysql_query('DROP DATABASE `'.$databases['Name'][$i].'`') or die(mysql_error());
$res=mysqli_query($GLOBALS["___mysqli_ston"], 'DROP DATABASE `'.$databases['Name'][$i].'`') or die(((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));
$dba='<p class="green">'.$lang['L_DB'].' '.$databases['Name'][$i].' '.$lang['L_INFO_DELETED'].'</p>';
SetDefault();
include ($config['files']['parameter']);
@ -23,16 +23,16 @@ for ($i=0; $i<count($databases['Name']); $i++)
}
if (isset($_POST['optimize'.$i]))
{
mysql_select_db($databases['Name'][$i],$config['dbconnection']);
$res=mysql_list_tables($databases['Name'][$i],$config['dbconnection']);
mysqli_select_db($config['dbconnection'], $databases['Name'][$i]);
$res=mysqli_query($config['dbconnection'], 'SHOW TABLES FROM `'.$databases['Name'][$i].'`');
$tabellen='';
WHILE ($row=mysql_fetch_row($res))
WHILE ($row=mysqli_fetch_row($res))
$tabellen.='`'.$row[0].'`,';
$tabellen=substr($tabellen,0,(strlen($tabellen)-1));
if ($tabellen>"")
{
$query="OPTIMIZE TABLE ".$tabellen;
$res=mysql_query($query) or die(mysql_error()."");
$res=mysqli_query($GLOBALS["___mysqli_ston"], $query) or die(((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false))."");
}
$_GET['dbid']=$i;
$dba='<p class="green">'.$lang['L_DB'].' <b>'.$databases['Name'][$i].'</b> '.$lang['L_INFO_OPTIMIZED'].'.</p>';
@ -43,6 +43,10 @@ for ($i=0; $i<count($databases['Name']); $i++)
$checkit="ALL";
$_GET['dbid']=$i;
}
if (isset($_POST['enableKeys'.$i])) {
$enableKeys="ALL";
$_GET['dbid']=$i;
}
}
//list databases
@ -57,26 +61,26 @@ for ($i=0; $i<count($databases['Name']); $i++)
{
$rowclass=($i%2) ? 'dbrow' : 'dbrow1';
if ($i==$databases['db_selected_index']) $rowclass="dbrowsel";
//gibts die Datenbank überhaupt?
if (!mysql_select_db($databases['Name'][$i],$config['dbconnection']))
if (!mysqli_select_db($config['dbconnection'], $databases['Name'][$i]))
{
$tpl->assign_block_vars('DB_NOT_FOUND',array(
'ROWCLASS' => $rowclass,
'NR' => ($i+1),
'DB_NAME' => $databases['Name'][$i],
'ROWCLASS' => $rowclass,
'NR' => ($i+1),
'DB_NAME' => $databases['Name'][$i],
'DB_ID' => $i));
}
else
{
mysql_select_db($databases['Name'][$i],$config['dbconnection']);
$tabellen=mysql_query('SHOW TABLES FROM `'.$databases['Name'][$i].'`',$config['dbconnection']);
$num_tables=mysql_num_rows($tabellen);
mysqli_select_db($config['dbconnection'], $databases['Name'][$i]);
$tabellen=mysqli_query($config['dbconnection'], 'SHOW TABLES FROM `'.$databases['Name'][$i].'`');
$num_tables=mysqli_num_rows($tabellen);
$tpl->assign_block_vars('ROW',array(
'ROWCLASS' => $rowclass,
'NR' => ($i+1),
'DB_NAME' => $databases['Name'][$i],
'DB_ID' => $i,
'ROWCLASS' => $rowclass,
'NR' => ($i+1),
'DB_NAME' => $databases['Name'][$i],
'DB_ID' => $i,
'TABLE_COUNT' => $num_tables));
if ($num_tables==1) $tpl->assign_block_vars('ROW.TABLE',array());
else
@ -88,21 +92,23 @@ $tpl->pparse('show');
//list tables of selected database
if (isset($_GET['dbid']))
{
// Output list of tables of the selected database
$disabled_keys_found = false;
// Output list of tables of the selected database
$tpl=new MSDTemplate();
$tpl->set_filenames(array(
'show' => 'tpl/home/databases_list_tables.tpl'));
$dbid=$_GET['dbid'];
$numrows=0;
$res=@mysql_query("SHOW TABLE STATUS FROM `".$databases['Name'][$dbid]."`");
mysql_select_db($databases['Name'][$dbid]);
if ($res) $numrows=mysql_num_rows($res);
$res=@mysqli_query($GLOBALS["___mysqli_ston"], "SHOW TABLE STATUS FROM `".$databases['Name'][$dbid]."`");
mysqli_select_db($GLOBALS["___mysqli_ston"], $databases['Name'][$dbid]);
if ($res) $numrows=mysqli_num_rows($res);
$tpl->assign_vars(array(
'DB_NAME' => $databases['Name'][$dbid],
'DB_NAME_URLENCODED' => urlencode($databases['Name'][$dbid]),
'DB_ID' => $dbid,
'TABLE_COUNT' => $numrows,
'DB_NAME' => $databases['Name'][$dbid],
'DB_NAME_URLENCODED' => urlencode($databases['Name'][$dbid]),
'DB_ID' => $dbid,
'TABLE_COUNT' => $numrows,
'ICONPATH' => $config['files']['iconpath']));
$numrows=intval($numrows);
if ($numrows>1) $tpl->assign_block_vars('MORE_TABLES',array());
@ -114,10 +120,10 @@ if (isset($_GET['dbid']))
$sum_records=$sum_data_length='';
for ($i=0; $i<$numrows; $i++)
{
$row=mysql_fetch_array($res,MYSQL_ASSOC);
$row=mysqli_fetch_array($res, MYSQLI_ASSOC);
// Get nr of records -> need to do it this way because of incorrect returns when using InnoDBs
$sql_2="SELECT count(*) as `count_records` FROM `".$databases['Name'][$dbid]."`.`".$row['Name']."`";
$res2=@mysql_query($sql_2);
$res2=@mysqli_query($GLOBALS["___mysqli_ston"], $sql_2);
if ($res2===false)
{
$row['Rows']=0;
@ -125,44 +131,48 @@ if (isset($_GET['dbid']))
}
else
{
$row2=mysql_fetch_array($res2);
$row2=mysqli_fetch_array($res2);
$row['Rows']=$row2['count_records'];
$rowclass=($i%2) ? 'dbrow' : 'dbrow1';
}
if (isset($row['Update_time'])&&strtotime($row['Update_time'])>strtotime($last_update)) $last_update=$row['Update_time'];
$sum_records+=$row['Rows'];
$sum_data_length+=$row['Data_length']+$row['Index_length'];
$tpl->assign_block_vars('ROW',array(
'ROWCLASS' => $rowclass,
'NR' => ($i+1),
'TABLE_NAME' => $row['Name'],
'TABLE_NAME_URLENCODED' => urlencode($row['Name']),
'RECORDS' => $row['Rows'],
'SIZE' => byte_output($row['Data_length']+$row['Index_length']),
'LAST_UPDATE' => $row['Update_time'],
'ENGINE' => $row['Engine']));
$keys_disabled = false;
if ($row['Engine'] == "MyIsam") {
}
$tpl->assign_block_vars('ROW',array(
'ROWCLASS' => $rowclass,
'NR' => ($i+1),
'TABLE_NAME' => $row['Name'],
'TABLE_NAME_URLENCODED' => urlencode($row['Name']),
'RECORDS' => $row['Rows'],
'SIZE' => byte_output($row['Data_length']+$row['Index_length']),
'LAST_UPDATE' => $row['Update_time'],
'ENGINE' => $row['Engine'],
));
// Otimize & Repair - only for MyISAM-Tables
if ($row['Engine']=='MyISAM')
{
if ($row['Data_free']==0) $tpl->assign_block_vars('ROW.OPTIMIZED',array());
else
$tpl->assign_block_vars('ROW.NOT_OPTIMIZED',array());
if ($checkit==$row['Name']||$repair==1)
{
$tmp_res=mysql_query("REPAIR TABLE `".$row['Name']."`");
$tmp_res=mysqli_query($GLOBALS["___mysqli_ston"], "REPAIR TABLE `".$row['Name']."`");
}
if (($checkit==$row['Name']||$checkit=='ALL'))
{
// table needs to be checked
$tmp_res=mysql_query('CHECK TABLE `'.$row['Name'].'`');
$tmp_res=mysqli_query($GLOBALS["___mysqli_ston"], 'CHECK TABLE `'.$row['Name'].'`');
if ($tmp_res)
{
$tmp_row=mysql_fetch_row($tmp_res);
$tmp_row=mysqli_fetch_row($tmp_res);
if ($tmp_row[3]=='OK') $tpl->assign_block_vars('ROW.CHECK_TABLE_OK',array());
else
$tpl->assign_block_vars('ROW.CHECK_TABLE_NOT_OK',array());
@ -173,14 +183,31 @@ if (isset($_GET['dbid']))
// Show Check table link
$tpl->assign_block_vars('ROW.CHECK_TABLE',array());
}
if ($enableKeys==$row['Name'] || $enableKeys=="ALL")
{
$sSql= "ALTER TABLE `".$databases['Name'][$dbid]."`.`".$row['Name']."` ENABLE KEYS";
$tmp_res=mysqli_query($GLOBALS["___mysqli_ston"], $sSql);
}
$res3=mysqli_query($GLOBALS["___mysqli_ston"], 'SHOW INDEX FROM `'.$databases['Name'][$dbid]."`.`".$row['Name']."`");
WHILE ($row3 = mysqli_fetch_array($res3, MYSQLI_ASSOC))
{
if ($row3['Comment']=="disabled") {
$keys_disabled = true;
$disabled_keys_found = true;
}
}
if ($keys_disabled) $tpl->assign_block_vars('ROW.KEYS_DISABLED', array());
else $tpl->assign_block_vars('ROW.KEYS_ENABLED', array());
}
}
// Output sum-row
$tpl->assign_block_vars('SUM',array(
'RECORDS' => number_format($sum_records,0,",","."),
'SIZE' => byte_output($sum_data_length),
'RECORDS' => number_format($sum_records,0,",","."),
'SIZE' => byte_output($sum_data_length),
'LAST_UPDATE' => $last_update));
if ($disabled_keys_found) $tpl->assign_block_vars('DISABLED_KEYS_FOUND', array());
}
$tpl->pparse('show');
}

Datei anzeigen

@ -14,8 +14,8 @@ echo '<p>&nbsp;</p>';
switch ($var)
{
case "variables":
$res=@mysql_query("SHOW variables");
if ($res) $numrows=mysql_num_rows($res);
$res=@mysqli_query($GLOBALS["___mysqli_ston"], "SHOW variables");
if ($res) $numrows=mysqli_num_rows($res);
if ($numrows==0)
{
echo $lang['L_INFO_NOVARS'];
@ -25,7 +25,7 @@ switch ($var)
echo '<table class="bdr"><tr class="thead"><th><strong>Name</strong></th><th><strong>'.$lang['L_INHALT'].'</strong></th></tr>';
for ($i=0; $i<$numrows; $i++)
{
$row=mysql_fetch_array($res);
$row=mysqli_fetch_array($res);
$cl=($i%2) ? "dbrow" : "dbrow1";
echo '<tr class="'.$cl.'"><td align="left">'.$row[0].'</td><td align="left">'.$row[1].'</td></tr>';
}
@ -33,8 +33,8 @@ switch ($var)
echo '</table>';
break;
case "status":
$res=@mysql_query("SHOW STATUS");
if ($res) $numrows=mysql_num_rows($res);
$res=@mysqli_query($GLOBALS["___mysqli_ston"], "SHOW STATUS");
if ($res) $numrows=mysqli_num_rows($res);
if ($numrows==0)
{
echo $lang['L_INFO_NOSTATUS'];
@ -45,7 +45,7 @@ switch ($var)
for ($i=0; $i<$numrows; $i++)
{
$cl=($i%2) ? "dbrow" : "dbrow1";
$row=mysql_fetch_array($res);
$row=mysqli_fetch_array($res);
echo '<tr class="'.$cl.'"><td align="left" valign="top">'.$row[0].'</td><td align="left" valign="top">'.$row[1].'</td></tr>';
}
}
@ -59,7 +59,7 @@ switch ($var)
$wait=(isset($_GET['wait'])) ? $_GET['wait'] : 0;
if ($wait==0)
{
$ret=mysql_query("KILL ".$_GET['killid']);
$ret=mysqli_query($GLOBALS["___mysqli_ston"], "KILL ".$_GET['killid']);
$wait=2;
}
else
@ -77,8 +77,8 @@ switch ($var)
}
$killid=$wait=0;
$res=@mysql_query("SHOW FULL PROCESSLIST ");
if ($res) $numrows=mysql_num_rows($res);
$res=@mysqli_query($GLOBALS["___mysqli_ston"], "SHOW FULL PROCESSLIST ");
if ($res) $numrows=mysqli_num_rows($res);
if ($numrows==0)
{
echo $lang['L_INFO_NOPROCESSES'];
@ -89,7 +89,7 @@ switch ($var)
for ($i=0; $i<$numrows; $i++)
{
$cl=($i%2) ? "dbrow" : "dbrow1";
$row=mysql_fetch_array($res);
$row=mysqli_fetch_array($res);
echo '<tr><td>'.$row[0].'</td><td>'.$row[1].'</td>
<td>'.$row[2].'</td><td>'.$row[3].'</td><td>'.$row[4].'</td><td>'.$row[5].'</td>
<td>'.$row[6].'</td><td>'.$row[7].'</td>

Datei anzeigen

@ -27,7 +27,7 @@ $tpl=new MSDTemplate();
$tpl->set_filenames(array(
'show' => './tpl/home/protection_create.tpl'));
$tpl->assign_vars(array(
'THEME' => $config['theme'],
'THEME' => $config['theme'],
'HEADLINE' => headline($lang['L_HTACC_CREATE'])));
if (isset($_POST['username']))
@ -35,11 +35,13 @@ if (isset($_POST['username']))
// Form submitted
if ($username=='') $error[]=$lang['L_HTACC_NO_USERNAME'];
if (($userpass1!=$userpass2)||($userpass1=='')) $error[]=$lang['L_PASSWORDS_UNEQUAL'];
if (sizeof($error)==0)
{
$htaccess = "<IfModule mod_rewrite.c>\nRewriteEngine off\n</IfModule>\n";
$realm='MySQLDumper';
$htaccess="AuthName \"".$realm."\"\nAuthType Basic\nAuthUserFile \"".$config['paths']['root'].".htpasswd\"\nrequire valid-user\n";
$htaccess.="AuthName \"".$realm."\"\nAuthType Basic\nAuthUserFile \""
.$config['paths']['root'].".htpasswd\"\nrequire valid-user";
switch ($type)
{
// Crypt
@ -61,15 +63,16 @@ if (isset($_POST['username']))
}
$htpasswd=$username.':'.$userpass;
@chmod($config['paths']['root'],0777);
$saved=true;
// save .htpasswd
if ($file_htpasswd=@fopen('.htpasswd','w'))
{
$saved=fputs($file_htpasswd,$htpasswd);
fclose($file_htpasswd);
}
else
$saved=false;
// save .htaccess
if (false!==$saved)
{
@ -82,20 +85,30 @@ if (isset($_POST['username']))
else
$saved=false;
}
if (false!==$saved)
{
$msg=$lang['L_HTACC_CREATED'];
$tpl->assign_block_vars('CREATE_SUCCESS',array(
'HTACCESS' => nl2br(my_quotes($htaccess)),
'HTPASSWD' => nl2br(my_quotes($htpasswd))));
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
$output = array(
'HTACCESS' => nl2br(htmlspecialchars($htaccess), false),
'HTPASSWD' => nl2br(htmlspecialchars($htpasswd), false)
);
} else {
$output = array(
'HTACCESS' => nl2br(htmlspecialchars($htaccess)),
'HTPASSWD' => nl2br(htmlspecialchars($htpasswd))
);
}
$msg='<span class="success">'.$lang['L_HTACC_CREATED'].'</span>';
$tpl->assign_block_vars('CREATE_SUCCESS', $output);
@chmod($config['paths']['root'],0755);
}
else
{
$tpl->assign_block_vars('CREATE_ERROR',array(
'HTACCESS' => nl2br(my_quotes($htaccess)),
'HTPASSWD' => nl2br(my_quotes($htpasswd))));
'HTACCESS' => htmlspecialchars($htaccess),
'HTPASSWD' => htmlspecialchars($htpasswd)));
}
}
}
@ -103,16 +116,16 @@ if (isset($_POST['username']))
if (sizeof($error)>0||!isset($_POST['username']))
{
$tpl->assign_vars(array(
'PASSWORDS_UNEQUAL' => my_addslashes($lang['L_PASSWORDS_UNEQUAL']),
'PASSWORDS_UNEQUAL' => my_addslashes($lang['L_PASSWORDS_UNEQUAL']),
'HTACC_CONFIRM_DELETE' => my_addslashes($lang['L_HTACC_CONFIRM_DELETE'])));
$tpl->assign_block_vars('INPUT',array(
'USERNAME' => my_quotes($username),
'USERPASS1' => my_quotes($userpass1),
'USERPASS2' => my_quotes($userpass2),
'TYPE0_CHECKED' => $type==0 ? ' checked="checked"' : '',
'TYPE1_CHECKED' => $type==1 ? ' checked="checked"' : '',
'TYPE2_CHECKED' => $type==2 ? ' checked="checked"' : '',
'USERNAME' => htmlspecialchars($username),
'USERPASS1' => htmlspecialchars($userpass1),
'USERPASS2' => htmlspecialchars($userpass2),
'TYPE0_CHECKED' => $type==0 ? ' checked="checked"' : '',
'TYPE1_CHECKED' => $type==1 ? ' checked="checked"' : '',
'TYPE2_CHECKED' => $type==2 ? ' checked="checked"' : '',
'TYPE3_CHECKED' => $type==3 ? ' checked="checked"' : ''));
}

Binäre Datei nicht angezeigt.

Datei anzeigen

@ -6,29 +6,35 @@ echo headline($lang['L_HTACC_EDIT']);
$htaccessdontexist=0;
if (isset($_POST['hta_dir'])&&isset($_POST['hta_file'])&&is_dir($_POST['hta_dir']))
{
$hta_dir=$_POST['hta_dir'];
$hta_file=$_POST['hta_file'];
}
else
{
$hta_dir=$config['paths']['root'];
$hta_file='.htaccess';
}
if ($hta_dir!=''&substr($hta_dir,-1)!='/') $hta_dir.='/';
$hta_complete=$hta_dir.$hta_file;
if ((isset($_GET['create'])&&$_GET['create']==1)||(isset($_POST['create'])&&$_POST['create']==1))
{
$fp=fopen($hta_dir.'.htaccess','w');
$fp=fopen($hta_complete,'w');
fwrite($fp,"# created by MySQLDumper ".MSD_VERSION."\n");
fclose($fp);
}
if (isset($_POST['newload']))
{
$hta_dir=(isset($_POST['newhtadir'])) ? $_POST['newhtadir'] : '';
}
else
$hta_dir=(isset($_POST['hta_dir'])) ? $_POST['hta_dir'] : '';
if ($hta_dir!=''&substr($hta_dir,-1)!='/') $hta_dir.='/';
if (isset($_POST['submit'])&&isset($_POST['thta']))
{
$fp=fopen($hta_dir.'.htaccess','w');
$fp=fopen($hta_complete,'w');
fwrite($fp,$_POST['thta']);
fclose($fp);
}
if (file_exists($hta_dir.'.htaccess'))
if (file_exists($hta_complete))
{
$htaccess_exist=file($hta_dir.'.htaccess');
$htaccess_exist=file($hta_complete);
}
else
{
@ -36,7 +42,11 @@ else
}
echo $lang['L_HTACCESS32'];
echo '<form name="ehta" action="main.php?action=edithtaccess" method="post">File: <input type="text" name="newhtadir" value="'.$hta_dir.'" style="text-align:right;">.htaccess&nbsp;&nbsp;&nbsp;<input type="submit" name="newload" value=" '.$lang['L_HTACCESS19'].' " class="Formbutton">';
echo '<br><br><form name="ehta" action="main.php?action=edithtaccess" method="post">';
echo '<table>';
echo '<tr><td>'.$lang['L_DIR'].':</td><td><input type="text" name="hta_dir" value="'.$hta_dir.'" size="60"></td></tr>';
echo '<tr><td>'.$lang['L_FILE'].':</td><td><input type="text" name="hta_file" value="'.$hta_file.'"></td></tr>';
echo '</table>';
if ($htaccessdontexist!=1)
{
echo '<table class="bdr"><tr><td style="width:70%;"><textarea rows="25" cols="40" name="thta" id="thta">'.htmlspecialchars(implode("",$htaccess_exist)).'</textarea><br><br>';
@ -56,16 +66,18 @@ if ($htaccessdontexist!=1)
<a href="javascript:insertHTA(108,document.ehta.thta)">'.$lang['L_HTACCESS27'].'</a><br>
<a href="javascript:insertHTA(109,document.ehta.thta)">'.$lang['L_HTACCESS28'].'</a><br>
<br><a href="http://httpd.apache.org/docs/2.0/mod/directives.html" target="_blank">'.$lang['L_HTACCESS29'].'</a>';
echo '</td></tr><tr><td colspan="2">'.$lang['L_HTACCESS18'].'<input type="text" name="hta_dir" size="60" value="'.$hta_dir.'"></td></tr><tr><td colspan="2">';
echo '<input type="submit" class="Formbutton" name="submit" value=" '.$lang['L_SAVE'].' " class="Formbutton">&nbsp;&nbsp;&nbsp;';
echo '<input type="reset" class="Formbutton" name="reset" value=" '.$lang['L_RESET'].' " class="Formbutton">&nbsp;&nbsp;&nbsp;';
echo '</td></tr>';
echo '<tr><td colspan="2">';
echo '<input type="submit" name="submit" value=" '.$lang['L_SAVE'].' " class="Formbutton">&nbsp;&nbsp;&nbsp;';
echo '<input type="reset" name="reset" value=" '.$lang['L_RESET'].' " class="Formbutton">&nbsp;&nbsp;&nbsp;';
echo '<input type="submit" name="newload" value=" '.$lang['L_HTACCESS19'].' " class="Formbutton">';
echo '</td></tr></table></form>';
}
else
{
echo '<p class="warnung">'.$hta_dir.'.htaccess existiert nicht. Soll sie erstellt werden ?</p>';
echo '<form action="" method="post"><input type="hidden" name="hta_dir" value="'.$hta_dir.'"><input type="hidden" name="create" value="1"><input type="submit" name="createhtaccess" value="erstellen"></form>';
echo '<br>'.$lang['L_FILE_MISSING'].': '.$hta_complete.'<br><br>';
echo '<form action="" method="post"><input type="hidden" name="hta_dir" value="'.$hta_dir.'"><input type="hidden" name="hta_file" value="'.$hta_file.'"><input type="hidden" name="create" value="1"><input type="submit" name="createhtaccess" value="'.$lang['L_CREATE'].'" class="Formbutton"></form>';
}
echo '<br><a href="main.php">'.$lang['L_BACK'].'</a>';
echo '</div>';
ob_end_flush();
exit();

Datei anzeigen

@ -2,18 +2,18 @@
if (!defined('MSD_VERSION')) die('No direct access.');
$sysaction=(isset($_GET['dosys'])) ? $_GET['dosys'] : 0;
$msg="";
$res=@mysql_query("SHOW VARIABLES LIKE 'datadir'",$config['dbconnection']);
$res=@mysqli_query($config['dbconnection'], "SHOW VARIABLES LIKE 'datadir'");
if ($res)
{
$row=mysql_fetch_array($res);
$row=mysqli_fetch_array($res);
$data_dir=$row[1];
}
switch ($sysaction)
{
case 1: //FLUSH PRIVILEGES
$msg="&gt; operating FLUSH PRIVILEGES<br>";
$res=@mysql_query("FLUSH PRIVILEGES",$config['dbconnection']);
$meldung=mysql_error($config['dbconnection']);
$res=@mysqli_query($config['dbconnection'], "FLUSH PRIVILEGES");
$meldung=((is_object($config['dbconnection'])) ? mysqli_error($config['dbconnection']) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false));
if ($meldung!="")
{
$msg.='&gt; MySQL-Error: '.$meldung;
@ -25,8 +25,8 @@ switch ($sysaction)
break;
case 2: //FLUSH STATUS
$msg="&gt; operating FLUSH STATUS<br>";
$res=@mysql_query("FLUSH STATUS",$config['dbconnection']);
$meldung=mysql_error($config['dbconnection']);
$res=@mysqli_query($config['dbconnection'], "FLUSH STATUS");
$meldung=((is_object($config['dbconnection'])) ? mysqli_error($config['dbconnection']) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false));
if ($meldung!="")
{
$msg.='&gt; MySQL-Error: '.$meldung;
@ -38,8 +38,8 @@ switch ($sysaction)
break;
case 3: //FLUSH HOSTS
$msg="&gt; operating FLUSH HOSTS<br>";
$res=@mysql_query("FLUSH HOSTS",$config['dbconnection']);
$meldung=mysql_error($config['dbconnection']);
$res=@mysqli_query($config['dbconnection'], "FLUSH HOSTS");
$meldung=((is_object($config['dbconnection'])) ? mysqli_error($config['dbconnection']) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false));
if ($meldung!="")
{
$msg.='&gt; MySQL-Error: '.$meldung;
@ -52,15 +52,15 @@ switch ($sysaction)
break;
case 4: //SHOW MASTER LOGS
$msg="> operating SHOW MASTER LOGS<br>";
$res=@mysql_query("SHOW MASTER LOGS",$config['dbconnection']);
$meldung=mysql_error($config['dbconnection']);
$res=@mysqli_query($config['dbconnection'], "SHOW MASTER LOGS");
$meldung=((is_object($config['dbconnection'])) ? mysqli_error($config['dbconnection']) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false));
if ($meldung!="")
{
$msg.='&gt; MySQL-Error: '.$meldung;
}
else
{
$numrows=mysql_num_rows($res);
$numrows=mysqli_num_rows($res);
if ($numrows==0||$numrows===false)
{
$msg.='&gt; there are no master log-files';
@ -70,7 +70,7 @@ switch ($sysaction)
$msg.='&gt; there are '.$numrows.' logfiles<br>';
for ($i=0; $i<$numrows; $i++)
{
$row=mysql_fetch_row($res);
$row=mysqli_fetch_row($res);
$msg.='&gt; '.$row[0].'&nbsp;&nbsp;&nbsp;'.(($data_dir) ? byte_output(@filesize($data_dir.$row[0])) : '').'<br>';
}
}
@ -78,8 +78,8 @@ switch ($sysaction)
break;
case 5: //RESET MASTER
$msg="&gt; operating RESET MASTER<br>";
$res=@mysql_query("RESET MASTER",$config['dbconnection']);
$meldung=mysql_error($config['dbconnection']);
$res=@mysqli_query($config['dbconnection'], "RESET MASTER");
$meldung=((is_object($config['dbconnection'])) ? mysqli_error($config['dbconnection']) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false));
if ($meldung!="")
{
$msg.='&gt; MySQL-Error: '.$meldung;

Datei anzeigen

@ -3,270 +3,281 @@ if (!defined('MSD_VERSION')) die('No direct access.');
//Feldspezifikationen
$feldtypen=Array(
"VARCHAR",
"TINYINT",
"TEXT",
"DATE",
"SMALLINT",
"MEDIUMINT",
"INT",
"BIGINT",
"FLOAT",
"DOUBLE",
"DECIMAL",
"DATETIME",
"TIMESTAMP",
"TIME",
"YEAR",
"CHAR",
"TINYBLOB",
"TINYTEXT",
"BLOB",
"MEDIUMBLOB",
"MEDIUMTEXT",
"LONGBLOB",
"LONGTEXT",
"ENUM",
"VARCHAR",
"TINYINT",
"TEXT",
"DATE",
"SMALLINT",
"MEDIUMINT",
"INT",
"BIGINT",
"FLOAT",
"DOUBLE",
"DECIMAL",
"DATETIME",
"TIMESTAMP",
"TIME",
"YEAR",
"CHAR",
"TINYBLOB",
"TINYTEXT",
"BLOB",
"MEDIUMBLOB",
"MEDIUMTEXT",
"LONGBLOB",
"LONGTEXT",
"ENUM",
"SET"
);
$feldattribute=ARRAY(
"",
"BINARY",
"UNSIGNED",
"",
"BINARY",
"UNSIGNED",
"UNSIGNED ZEROFILL"
);
$feldnulls=Array(
"NOT NULL",
"NOT NULL",
"NULL"
);
$feldextras=Array(
"",
"",
"AUTO_INCREMENT"
);
$feldkeys=Array(
"",
"PRIMARY KEY",
"UNIQUE KEY",
"",
"PRIMARY KEY",
"UNIQUE KEY",
"FULLTEXT"
);
$feldrowformat=Array(
"",
"FIXED",
"DYNAMIC",
"",
"FIXED",
"DYNAMIC",
"COMPRESSED"
);
$rechte_daten=Array(
"SELECT",
"INSERT",
"UPDATE",
"DELETE",
"SELECT",
"INSERT",
"UPDATE",
"DELETE",
"FILE"
);
$rechte_struktur=Array(
"CREATE",
"ALTER",
"INDEX",
"DROP",
"CREATE",
"ALTER",
"INDEX",
"DROP",
"CREATE TEMPORARY TABLES"
);
$rechte_admin=Array(
"GRANT",
"SUPER",
"PROCESS",
"RELOAD",
"SHUTDOWN",
"SHOW DATABASES",
"LOCK TABLES",
"REFERENCES",
"EXECUTE",
"REPLICATION CLIENT",
"GRANT",
"SUPER",
"PROCESS",
"RELOAD",
"SHUTDOWN",
"SHOW DATABASES",
"LOCK TABLES",
"REFERENCES",
"EXECUTE",
"REPLICATION CLIENT",
"REPLICATION SLAVE"
);
$rechte_resourcen=Array(
"MAX QUERIES PER HOUR",
"MAX UPDATES PER HOUR",
"MAX QUERIES PER HOUR",
"MAX UPDATES PER HOUR",
"MAX CONNECTIONS PER HOUR"
);
$sql_keywords=array(
'ALTER',
'AND',
'ADD',
'AUTO_INCREMENT',
'BETWEEN',
'BINARY',
'BOTH',
'BY',
'BOOLEAN',
'CHANGE',
'CHARSET',
'CHECK',
'COLLATE',
'COLUMNS',
'COLUMN',
'CROSS',
'CREATE',
'DATABASES',
'DATABASE',
'DATA',
'DELAYED',
'DESCRIBE',
'DESC',
'DISTINCT',
'DELETE',
'DROP',
'DEFAULT',
'ENCLOSED',
'ENGINE',
'ESCAPED',
'EXISTS',
'EXPLAIN',
'FIELDS',
'FIELD',
'FLUSH',
'FOR',
'FOREIGN',
'FUNCTION',
'FROM',
'GROUP',
'GRANT',
'HAVING',
'IGNORE',
'INDEX',
'INFILE',
'INSERT',
'INNER',
'INTO',
'IDENTIFIED',
'JOIN',
'KEYS',
'KILL',
'KEY',
'LEADING',
'LIKE',
'LIMIT',
'LINES',
'LOAD',
'LOCAL',
'LOCK',
'LOW_PRIORITY',
'LEFT',
'LANGUAGE',
'MEDIUMINT',
'MODIFY',
'MyISAM',
'NATURAL',
'NOT',
'NULL',
'NEXTVAL',
'OPTIMIZE',
'OPTION',
'OPTIONALLY',
'ORDER',
'OUTFILE',
'OR',
'OUTER',
'ON',
'PROCEEDURE',
'PROCEDURAL',
'PRIMARY',
'READ',
'REFERENCES',
'REGEXP',
'RENAME',
'REPLACE',
'RETURN',
'REVOKE',
'RLIKE',
'RIGHT',
'SHOW',
'SONAME',
'STATUS',
'STRAIGHT_JOIN',
'SELECT',
'SETVAL',
'TABLES',
'TEMINATED',
'TO',
'TRAILING',
'TRUNCATE',
'TABLE',
'TEMPORARY',
'TRIGGER',
'TRUSTED',
'UNIQUE',
'UNLOCK',
'USE',
'USING',
'UPDATE',
'UNSIGNED',
'VALUES',
'VARIABLES',
'VIEW',
'WITH',
'WRITE',
'WHERE',
'ZEROFILL',
'XOR',
'ALL',
'ASC',
'AS',
'SET',
'IN',
'IS',
'ALTER',
'AND',
'ADD',
'AUTO_INCREMENT',
'BETWEEN',
'BINARY',
'BOTH',
'BY',
'BOOLEAN',
'CHANGE',
'CHARSET',
'CHECK',
'COLLATE',
'COLUMNS',
'COLUMN',
'CROSS',
'CREATE',
'DATABASES',
'DATABASE',
'DATA',
'DELAYED',
'DESCRIBE',
'DESC',
'DISTINCT',
'DELETE',
'DROP',
'DEFAULT',
'ENCLOSED',
'ENGINE',
'ESCAPED',
'EXISTS',
'EXPLAIN',
'FIELDS',
'FIELD',
'FLUSH',
'FOR',
'FOREIGN',
'FUNCTION',
'FROM',
'GROUP',
'GRANT',
'HAVING',
'IGNORE',
'INDEX',
'INFILE',
'INSERT',
'INNER',
'INTO',
'IDENTIFIED',
'JOIN',
'KEYS',
'KILL',
'KEY',
'LEADING',
'LIKE',
'LIMIT',
'LINES',
'LOAD',
'LOCAL',
'LOCK',
'LOW_PRIORITY',
'LEFT',
'LANGUAGE',
'MEDIUMINT',
'MODIFY',
'MyISAM',
'NATURAL',
'NOT',
'NULL',
'NEXTVAL',
'OPTIMIZE',
'OPTION',
'OPTIONALLY',
'ORDER',
'OUTFILE',
'OR',
'OUTER',
'ON',
'PROCEEDURE',
'PROCEDURAL',
'PRIMARY',
'READ',
'REFERENCES',
'REGEXP',
'RENAME',
'REPLACE',
'RETURN',
'REVOKE',
'RLIKE',
'RIGHT',
'SHOW',
'SONAME',
'STATUS',
'STRAIGHT_JOIN',
'SELECT',
'SETVAL',
'TABLES',
'TEMINATED',
'TO',
'TRAILING',
'TRUNCATE',
'TABLE',
'TEMPORARY',
'TRIGGER',
'TRUSTED',
'UNIQUE',
'UNLOCK',
'USE',
'USING',
'UPDATE',
'UNSIGNED',
'VALUES',
'VARIABLES',
'VIEW',
'WITH',
'WRITE',
'WHERE',
'ZEROFILL',
'XOR',
'ALL',
'ASC',
'AS',
'SET',
'IN',
'IS',
'IF'
);
$mysql_doc=Array(
"Feldtypen" => "http://dev.mysql.com/doc/mysql/de/Column_types.html"
);
$mysql_string_types = array(
'char',
'varchar',
'tinytext',
'text',
'mediumtext',
'longtext',
'binary',
'varbinary',
'tinyblob',
'mediumblob',
'blob',
'longblob',
'enum',
'set'
);
$mysql_SQLhasRecords=array(
'SELECT',
'SHOW',
'EXPLAIN',
'DESCRIBE',
'SELECT',
'SHOW',
'EXPLAIN',
'DESCRIBE',
'DESC'
);
function MSD_mysql_connect($encoding='utf8', $keycheck_off=false, $actual_table='')
{
global $config,$databases;
$port=( isset($config['dbport']) && !empty($config['dbport']) ) ? ':' . $config['dbport'] : '';
$socket=( isset($config['dbsocket']) && !empty($config['dbsocket']) ) ? ':' . $config['dbsocket'] : '';
$config['dbconnection']=mysql_connect($config['dbhost'] . $port . $socket,$config['dbuser'],$config['dbpass']) or die(SQLError("Database connection error: ",mysql_error()));
if (isset($config['dbconnection']) && is_resource($config['dbconnection'])) {
return $config['dbconnection'];
}
$port=( isset($config['dbport']) && !empty($config['dbport']) ) ? $config['dbport'] : ini_get("mysqli.default_port");
$socket=( isset($config['dbsocket']) && !empty($config['dbsocket']) ) ? $config['dbsocket'] : ini_get("mysqli.default_socket");
$config['dbconnection']=@($GLOBALS["___mysqli_ston"] = mysqli_connect($config['dbhost'], $config['dbuser'], $config['dbpass'], "", $port, $socket)) or die(SQLError("Error establishing a database connection!", ((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false))));
if (!defined('MSD_MYSQL_VERSION')) GetMySQLVersion();
if (!isset($config['mysql_standard_character_set']) || $config['mysql_standard_character_set'] == '') get_sql_encodings();
if ($config['mysql_standard_character_set'] != $encoding)
{
$set_encoding=@mysql_query('SET NAMES \'' . $encoding . '\'',$config['dbconnection']);
$set_encoding=@mysqli_query($config['dbconnection'], 'SET NAMES \'' . $encoding . '\'');
if ($set_encoding === false) $config['mysql_can_change_encoding']=false;
else $config['mysql_can_change_encoding']=true;
}
if ($keycheck_off) mysql_query('SET FOREIGN_KEY_CHECKS=0',$config['dbconnection']);
if ($keycheck_off) {
// only called with this param when restoring
mysqli_query($config['dbconnection'], 'SET FOREIGN_KEY_CHECKS=0');
// also set SQL-Mode NO_AUTO_VALUE_ON_ZERO for magento users
mysqli_query( $config['dbconnection'], 'SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"');
}
return $config['dbconnection'];
}
function GetMySQLVersion()
{
$res=MSD_query("select version()");
$row=mysql_fetch_array($res);
$row=mysqli_fetch_array($res);
$version=$row[0];
if (!defined('MSD_MYSQL_VERSION')) define('MSD_MYSQL_VERSION',$version);
$versions=explode('.',$version);
@ -282,22 +293,21 @@ function MSD_query($query, $error_output=true)
global $config;
if (!isset($config['dbconnection'])) MSD_mysql_connect();
//echo "<br>Query: ".htmlspecialchars($query);
$res=mysql_query($query,$config['dbconnection']);
if (false === $res && $error_output) SQLError($query,mysql_error($config['dbconnection']));
$res=mysqli_query($config['dbconnection'], $query);
if (false === $res && $error_output) SQLError($query,((is_object($config['dbconnection'])) ? mysqli_error($config['dbconnection']) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));
return $res;
}
function SQLError($sql, $error, $return_output=false)
{
// v(debug_backtrace());
global $lang;
$ret='<div align="center"><table style="border:1px solid #ff0000" cellspacing="0">
<tr bgcolor="#ff0000"><td style="color:white;font-size:16px;"><strong>MySQL-ERROR</strong></td></tr>
<tr><td style="width:80%;overflow: auto;">' . $lang['L_SQL_ERROR2'] . '<br><span style="color:red;">' . $error . '</span></td></tr>
<tr><td width="600"><br>' . $lang['L_SQL_ERROR1'] . '<br>' . Highlight_SQL($sql) . '</td></tr>
</table></div>';
</table></div><br />';
if ($return_output) return $ret;
else echo $ret;
}
@ -305,10 +315,10 @@ function SQLError($sql, $error, $return_output=false)
function Highlight_SQL($sql)
{
global $sql_keywords;
$end='';
$tickstart=false;
if (function_exists("token_get_all")) $a=@token_get_all("<?$sql?>");
if (function_exists("token_get_all")) $a=@token_get_all("<?php $sql?>");
else return $sql;
foreach ($a as $token)
{
@ -327,7 +337,7 @@ function Highlight_SQL($sql)
case "T_STRING":
case "T_AS":
case "T_FOR":
$end.=( in_array(strtoupper($token[1]),$sql_keywords) ) ? "<span style=\"color:#990099;font-weight:bold;\">" . $token[1] . "</span>" : $token[1];
break;
case "T_IF":
@ -356,9 +366,9 @@ function Fieldlist($db, $tbl)
if ($res)
{
$fl='(';
for ($i=0; $i < mysql_num_rows($res); $i++)
for ($i=0; $i < mysqli_num_rows($res); $i++)
{
$row=mysql_fetch_row($res);
$row=mysqli_fetch_row($res);
$fl.='`' . $row[0] . '`,';
}
$fl=substr($fl,0,strlen($fl) - 1) . ')';
@ -373,27 +383,35 @@ function getDBInfos()
for ($ii=0; $ii < count($databases['multi']); $ii++)
{
$dump['dbindex']=$flipped[$databases['multi'][$ii]];
$tabellen=mysql_query('SHOW TABLE STATUS FROM `' . $databases['Name'][$dump['dbindex']] . '`',$config['dbconnection']) or die('getDBInfos: ' . mysql_error());
$num_tables=mysql_num_rows($tabellen);
$tabellen=mysqli_query($config['dbconnection'], 'SHOW TABLE STATUS FROM `' . $databases['Name'][$dump['dbindex']] . '`') or die('getDBInfos: ' . ((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));
$num_tables=mysqli_num_rows($tabellen);
// Array mit den gewünschten Tabellen zusammenstellen... wenn Präfix angegeben, werden die anderen einfach nicht übernommen
if ($num_tables > 0)
{
for ($i=0; $i < $num_tables; $i++)
{
$row=mysql_fetch_array($tabellen);
$row=mysqli_fetch_array($tabellen);
if (isset($row['Type'])) $row['Engine']=$row['Type'];
if (isset($row['Comment']) && substr(strtoupper($row['Comment']),0,4) == 'VIEW') $dump['table_types'][]='VIEW';
else $dump['table_types'][]=strtoupper($row['Engine']);
// check if data needs to be backed up
if (strtoupper($row['Comment']) == 'VIEW' || ( isset($row['Engine']) && in_array(strtoupper($row['Engine']),array(
'MEMORY'
'MEMORY'
)) ))
{
$dump['skip_data'][]=$databases['Name'][$dump['dbindex']] . '|' . $row['Name'];
}
if ($config['optimize_tables_beforedump'] == 1 && $dump['table_offset'] == -1) mysql_query('OPTIMIZE `' . $row['Name'] . '`');
if (isset($tbl_sel))
if ($config['optimize_tables_beforedump'] == 1 && $dump['table_offset'] == -1
&& $databases['Name'][$dump['dbindex']]!='information_schema') {
mysqli_select_db($GLOBALS["___mysqli_ston"], $databases['Name'][$dump['dbindex']]);
$opt = 'OPTIMIZE TABLE `' . $row['Name'] . '`';
$res = mysqli_query($GLOBALS["___mysqli_ston"], 'OPTIMIZE TABLE `' . $row['Name'] . '`');
if ($res === false) {
die("Error in ".$opt." -> ".((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));
}
}
if (isset($tbl_sel))
{
if (in_array($row['Name'],$dump['tblArray']))
{
@ -415,13 +433,13 @@ function getDBInfos()
{
$dump['tables'][]=$databases['Name'][$dump['dbindex']] . '|' . $row['Name'];
$dump['records'][]=$databases['Name'][$dump['dbindex']] . '|' . $row['Rows'];
// Get nr of records -> need to do it this way because of incorrect returns when using InnoDBs
$sql_2="SELECT count(*) as `count_records` FROM `" . $databases['Name'][$dump['dbindex']] . "`.`" . $row['Name'] . "`";
$res2=@mysql_query($sql_2);
$res2=@mysqli_query($GLOBALS["___mysqli_ston"], $sql_2);
if ($res2 === false)
{
$read_error='(' . mysql_errno() . ') ' . mysql_error();
$read_error='(' . ((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_errno($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_errno()) ? $___mysqli_res : false)) . ') ' . ((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false));
SQLError($read_error,$sql_2);
WriteLog($read_error);
if ($config['stop_with_error'] > 0)
@ -431,7 +449,7 @@ function getDBInfos()
}
else
{
$row2=@mysql_fetch_array($res2);
$row2=@mysqli_fetch_array($res2);
$row['Rows']=$row2['count_records'];
$dump['totalrecords']+=$row['Rows'];
}

Datei anzeigen

@ -1,14 +1,19 @@
<?php
error_reporting(E_ALL);
if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);
}
if (function_exists("date_default_timezone_set")) date_default_timezone_set(@date_default_timezone_get());
//Konstanten
if (!defined('MSD_VERSION')) define('MSD_VERSION','1.24');
if (!defined('MSD_VERSION')) define('MSD_VERSION','1.24.4');
if (!defined('MSD_OS')) define('MSD_OS',PHP_OS);
if (!defined('MSD_OS_EXT')) define('MSD_OS_EXT',@php_uname());
if (!defined('config') || !is_array($config)) $config=array();
if (!defined('databases') || !is_array($databases)) $databases=array();
//Pfade und Files
$config['paths']['root']=Realpfad('./');
$config['paths']['root']=basePath();
$config['paths']['work']='work/';
$config['paths']['backup']=$config['paths']['work'] . 'backup/';
$config['paths']['log']=$config['paths']['work'] . 'log/';
@ -30,7 +35,6 @@ $config['files']['log']=$config['paths']['log'] . 'mysqldump.log';
$config['files']['perllog']=$config['paths']['log'] . 'mysqldump_perl.log';
$config['files']['perllogcomplete']=$config['paths']['log'] . 'mysqldump_perl.complete.log';
$config['files']['parameter']=$config['paths']['config'] . $config['config_file'] . '.php';
$config['files']['dbs_manual']=$config['paths']['config'] . 'dbs_manual.php';
// inti MySQL-Setting-Vars
$config['mysql_standard_character_set']='';
@ -64,7 +68,7 @@ $config['tuning_add']=1.1;
$config['tuning_sub']=0.9;
$config['time_buffer']=0.75; //max_zeit=$config['max_execution_time']*$config['time_buffer']
$config['perlspeed']=10000; //Anzahl der Datensaetze, die in einem Rutsch gelesen werden
$config['ignore_enable_keys'] = 0;
//Bausteine
$config['homepage']='http://mysqldumper.net';
@ -101,8 +105,10 @@ $config_dontsave=Array(
'files'
);
$dontBackupDatabases = array('mysql', 'information_schema');
// Automatisches entfernen von Slashes und Leerzeichen vorn und hinten abschneiden
if (1==get_magic_quotes_gpc())
if (1==get_magic_quotes_gpc())
{
$_POST=stripslashes_deep($_POST);
$_GET=stripslashes_deep($_GET);

Datei anzeigen

@ -209,11 +209,11 @@ else
$res=MSD_query($sqlt);
if ($res)
{
$sql['export']['tablecount']=mysql_numrows($res);
$sql['export']['tablecount']=mysqli_num_rows($res);
$sql['export']['recordcount']=0;
for ($i=0; $i < $sql['export']['tablecount']; $i++)
{
$row=mysql_fetch_array($res);
$row=mysqli_fetch_array($res);
$tblstr.='<option value="' . $row['Name'] . '" ' . ( ( isset($sql['export']['tables']) && in_array($row['Name'],$sql['export']['tables']) ) ? "selected" : "" ) . '>' . $row['Name'] . ' (' . $row['Rows'] . ')</option>' . "\n";
$sql['export']['recordcount']+=$row['Rows'];
}

Datei anzeigen

@ -10,48 +10,55 @@ if (isset($_POST['dbdosubmit']))
{
$newname=$_POST['newname'];
$db_index=$_POST['db_index'];
echo "<br>Db-Index:" . $_GET['db_index'];
$db_action=$_POST['db_action'];
$changed=false;
$ausgabe=$out="";
switch ($db_action)
{
case "drop":
MSD_DoSQL("DROP DATABASE `" . $databases['Name'][$db_index] . "`");
echo SQLOutput($out,'<p class="success">' . $lang['L_DB'] . ' `' . $databases['Name'][$db_index] . '` wurde gelöscht.</p>');
$changed=true;
break;
if (MSD_DoSQL("DROP DATABASE `" . $databases['Name'][$db_index] . "`"))
{
echo SQLOutput($out,'<p class="success">' . $lang['L_DB'] . ' `' . $databases['Name'][$db_index] . '` ' . $lang['L_SQL_DELETED'] . '</p>');
$changed=true;
}
break;
case "empty":
EmptyDB($databases['Name'][$db_index]);
echo SQLOutput($out,'<p class="success">' . $lang['L_DB'] . ' `' . $databases['Name'][$db_index] . '` ' . $lang['L_SQL_WASEMPTIED'] . '.</p>');
break;
case "rename":
$dbold=$databases['Name'][$db_index];
DB_Copy($dbold,$newname,1);
echo SQLOutput($out,'<p class="success">' . $lang['L_DB'] . ' `' . $dbold . '` ' . $lang['L_SQL_RENAMEDTO'] . ' `' . $newname . '`.</p>');
$changed=true;
if (DB_Copy($dbold,$newname,1))
{
echo SQLOutput($out,'<p class="success">' . $lang['L_DB'] . ' `' . $dbold . '` ' . $lang['L_SQL_RENAMEDTO'] . ' `' . $newname . '`.</p>');
$changed=true;
}
break;
case "copy":
$dbold=$databases['Name'][$db_index];
DB_Copy($dbold,$newname);
$changed=true;
echo SQLOutput($out,'<p class="success">' . sprintf($lang['L_SQL_DBCOPY'],$dbold,$newname) . '</p>');
break;
if (DB_Copy($dbold,$newname))
{
$changed=true;
echo SQLOutput($out,'<p class="success">' . sprintf($lang['L_SQL_DBCOPY'],$dbold,$newname) . '</p>');
}
break;
case "structure":
DB_Copy($databases['Name'][$db_index],$newname,0,0);
$changed=true;
echo SQLOutput($out,'<p class="success">' . sprintf($lang['L_SQL_DBSCOPY'],$databases['Name'][$db_index],$newname) . '</p>');
break;
if (DB_Copy($databases['Name'][$db_index],$newname,0,0))
{
$changed=true;
echo SQLOutput($out,'<p class="success">' . sprintf($lang['L_SQL_DBSCOPY'],$databases['Name'][$db_index],$newname) . '</p>');
}
break;
case "rights":
break;
}
if ($changed=true)
if ($changed==true)
{
SetDefault();
include ( $config['files']['parameter'] );
echo '<script language="JavaScript" type="text/javascript">parent.MySQL_Dumper_menu.location.href="menu.php?action=dbrefresh";</script>';
}
}
if (isset($_POST['dbwantaction']))
@ -71,13 +78,14 @@ if (isset($_POST['dbwantaction']))
}
$db_default_collation=@explode('|',$col);
if (isset($db_default_collation[1])) $sqlc.=' COLLATE `' . $db_default_collation[1] . '`';
MSD_query($sqlc);
echo $lang['L_DB'] . " `$newname` " . $lang['L_SQL_WASCREATED'] . ".<br>";
SetDefault();
include ( $config['files']['parameter'] );
echo '<script language="JavaScript" type="text/javascript">parent.MySQL_Dumper_menu.location.href="menu.php?action=dbrefresh";</script>';
if (MSD_query($sqlc))
{
echo $lang['L_DB'] . " `$newname` " . $lang['L_SQL_WASCREATED'] . ".<br>";
SetDefault();
include ( $config['files']['parameter'] );
echo '<script language="JavaScript" type="text/javascript">parent.MySQL_Dumper_menu.location.href="menu.php?action=dbrefresh";</script>';
}
}
}
$db_action=$newname="";
@ -111,7 +119,11 @@ if (isset($_POST['dbwantaction']))
break;
case "rename":
echo '<strong>' . $lang['L_SQL_RENAMEDB'] . ' `' . $databases['Name'][$db_index] . '` ' . $lang['L_IN'] . ' `' . $newname . '`</strong><br><br>';
echo '<input type="submit" name="dbdosubmit" value="' . $lang['L_DO_NOW'] . '" class="Formbutton">';
if ($newname == "") echo '<p class="error">' . $lang['L_SQL_NAMEDEST_MISSING'] . '</p>';
else
{
echo '<input type="submit" name="dbdosubmit" value="' . $lang['L_DO_NOW'] . '" class="Formbutton">';
}
break;
case "copy":
echo '<strong>' . sprintf($lang['L_ASKDBCOPY'],$databases['Name'][$db_index],$newname) . '</strong><br><br>';
@ -164,13 +176,12 @@ for ($i=0; $i < count($databases['Name']); $i++)
if (MSD_NEW_VERSION) echo '<option value="rename">' . $lang['L_SQL_RENAMEDB'] . '</option>';
if (MSD_NEW_VERSION) echo '<option value="copy">' . $lang['L_SQL_COPYDATADB'] . '</option>';
echo '<option value="structure">' . $lang['L_SQL_COPYSDB'] . '</option>';
echo '</select>';
echo "\n\n" . '&nbsp;&nbsp;<input type="submit" name="db_do_' . $i . '" value="' . $lang['L_DO'] . '" disabled="disabled" class="Formbutton">';
echo '&nbsp;&nbsp;<input type="Button" value="' . $lang['L_SQL_IMEXPORT'] . '" onclick="location.href=\'sql.php?db=' . $databases['Name'][$i] . '&amp;dbid=' . $i . '&amp;context=4\'" class="Formbutton"></td></tr>';
}
echo '</table></div></form>';

Datei anzeigen

@ -4,10 +4,10 @@ if (!defined('MSD_VERSION')) die('No direct access.');
$sql='SHOW TABLES FROM `'.$db.'`';
$tables=ARRAY();
$link=MSD_mysql_connect();
$res=mysql_query($sql,$link);
$res=mysqli_query($link, $sql);
if (!$res===false)
{
WHILE ($row=mysql_fetch_array($res,MYSQL_NUM))
WHILE ($row=mysqli_fetch_array($res, MYSQLI_NUM))
{
$tables[]=$row[0];
}
@ -39,7 +39,6 @@ $tablename=isset($_GET['tablename']) ? urldecode($_GET['tablename']) : '';
if (isset($_GET['mode'])&&$_GET['mode']=="kill"&&$rk>'')
{
//echo "<br> RK ist: ".$rk."<br><br>";
if (strpos($rk,"|")!=false) $rk=str_replace('|',' AND ',$rk);
$sqlk="DELETE FROM `$tablename` WHERE ".$rk." LIMIT 1";
//echo $sqlk;
$res=MSD_query($sqlk);
@ -71,12 +70,12 @@ function mysql_search($db, $tabelle, $suchbegriffe, $suchart, $offset=0, $anzahl
// Felder ermitteln
$sql='SHOW COLUMNS FROM `'.$db.'`.`'.$tables[$tabelle].'`';
$res=mysql_query($sql,$link);
$res=mysqli_query($link, $sql);
unset($felder);
if (!$res===false)
{
// Felder der Tabelle ermitteln
WHILE ($row=mysql_fetch_object($res))
WHILE ($row=mysqli_fetch_object($res))
{
$felder[]=$row->Field;
}
@ -131,10 +130,10 @@ function mysql_search($db, $tabelle, $suchbegriffe, $suchart, $offset=0, $anzahl
else
$sql='SELECT * FROM `'.$db.'`.`'.$tables[$tabelle].'` LIMIT '.$offset.','.$anzahl_ergebnisse;
$res=@mysql_query($sql,$link);
$res=@mysqli_query($link, $sql);
if ($res)
{
WHILE ($row=mysql_fetch_array($res,MYSQL_ASSOC))
WHILE ($row=mysqli_fetch_array($res, MYSQLI_ASSOC))
{
//Treffer markieren
foreach ($row as $key=>$val)
@ -351,9 +350,9 @@ if (is_array($treffer)&&isset($treffer[0]))
// remove hit marker from value
$x=str_replace('<span class="treffer">','',$treffer[$a][$k]);
$x=str_replace('</span>','',$x);
$keystring.='`'.$k.'`="'.addslashes($x).'"|';
$keystring.='`'.$k.'`="'.addslashes($x).'" AND ';
}
$keystring=substr($keystring,0,-1);
$keystring=substr($keystring,0,-5);
$rk=build_recordkey($keystring);
}
else

Datei anzeigen

@ -7,12 +7,12 @@ function nl2null($string)
return trim(str_replace($search,$replace,$string));
}
//SQL-Strings
echo $aus.='<h4>' . $lang['L_SQL_BEFEHLE'] . ' (' . count($SQL_ARRAY) . ')</h4>';
echo $aus.='<h4>' . $lang['L_SQL_BEFEHLE'] . ' (' . (is_array($SQL_ARRAY)? count($SQL_ARRAY) : 0) . ')</h4>';
echo '<a href="' . $params . '&amp;sqlconfig=1&amp;new=1">' . $lang['L_SQL_BEFEHLNEU'] . '</a><br><br>';
if (isset($_POST['sqlnewupdate']))
{
$ind=count($SQL_ARRAY);
if (count($SQL_ARRAY) > 0) array_push($SQL_ARRAY,$_POST['sqlname' . $ind] . "|" . $_POST['sqlstring' . $ind]);
$ind=(is_array($SQL_ARRAY))? count($SQL_ARRAY) : 0;
if ($ind > 0) array_push($SQL_ARRAY,$_POST['sqlname' . $ind] . "|" . $_POST['sqlstring' . $ind]);
else $SQL_ARRAY[0]=htmlspecialchars($_POST['sqlname0'],ENT_COMPAT ,'UTF-8') . '|' . $_POST['sqlstring0'];
WriteSQL();
echo '<p>' . $lang['L_SQL_BEFEHLSAVED1'] . ' \'' . $_POST['sqlname' . $ind] . '\' ' . $lang['L_SQL_BEFEHLSAVED2'] . '</p>';
@ -24,7 +24,7 @@ echo '<form name="sqlform" action="sql.php" method="post">
<input type="hidden" name="dbid" value="' . $dbid . '">';
echo '<table class="bdr" style="width:100%"><tr class="thead"><th>#</th><th>' . $lang['L_NAME'] . '</th><th>SQL</th><th>' . $lang['L_COMMAND'] . '</th></tr>';
$i=0;
if (count($SQL_ARRAY) > 0)
if (is_array($SQL_ARRAY) && count($SQL_ARRAY) > 0)
{
for ($i=0; $i < count($SQL_ARRAY); $i++)
{

Datei anzeigen

@ -1,36 +1,35 @@
<?php
if (!defined('MSD_VERSION')) die('No direct access.');
// fuegt eine Sortierungsnummer hinzu, um die Ausgabereihenfolge der Daten steuern zu koennen
// (das Feld ENGINE interessiert mich nicht so sehr und muss nicht vorne stehen)
$keysort=array(
'Name' => 0,
'Rows' => 1,
'Data_length' => 2,
'Auto_increment' => 3,
'Avg_row_length' => 4,
'Max_data_length' => 5,
'Comment' => 6,
'Row_format' => 7,
'Index_length' => 8,
'Data_free' => 9,
'Collation' => 10,
'Create_time' => 11,
'Update_time' => 12,
'Check_time' => 13,
'Create_options' => 14,
'Version' => 15,
'Engine' => 16,
'Name' => 0,
'Rows' => 1,
'Data_length' => 2,
'Auto_increment' => 3,
'Avg_row_length' => 4,
'Max_data_length' => 5,
'Comment' => 6,
'Row_format' => 7,
'Index_length' => 8,
'Data_free' => 9,
'Collation' => 10,
'Create_time' => 11,
'Update_time' => 12,
'Check_time' => 13,
'Create_options' => 14,
'Version' => 15,
'Engine' => 16,
'Checksum' => 17
);
$byte_output=array(
'Data_length',
'Avg_row_length',
'Max_data_length',
'Index_length',
'Data_length',
'Avg_row_length',
'Max_data_length',
'Index_length',
'Data_free'
);
@ -67,16 +66,15 @@ if ($databases['Name'][$dbid]!=$databases['db_actual'])
// refresh menu to switch to actual database
echo '<script type="text/javascript" language="javascript">'
.'parent.MySQL_Dumper_menu.location.href=\'menu.php?dbindex='.$dbid.'\';</script>';
}
echo '</p><p class="tablename">' . ( $tn != '' ? $lang['L_TABLE'] . ' <strong>`' . $databases['db_actual'] . '`.`' . $tn . '`</strong><br>' : '' );
if (isset($msg)) echo $msg;
$numrowsabs=-1;
$numrows=0;
// vorgehensweise - zwischen SELECT und FROM alles rausschneiden und durch count(*) ersetzen
// es soll die Summe der Datensaetze ermittelt werden, wenn es kein LIMIT geben wuerde, um die
// Blaettern-Links korrekt anzuzeigen
// Vorgehensweise - es soll die Summe der Datensaetze ermittelt werden, wenn es kein LIMIT gibt,
// um die Blaettern-Links korrekt anzuzeigen
$skip_mysql_execution=false;
if ($sql_to_display_data == 0)
{
@ -88,22 +86,24 @@ if ($sql_to_display_data == 0)
}
else
{
// auch alle Tabellen-Namen werden lowercase! -> das kann zu Problemen fuehren
// siehe https://dev.mysql.com/doc/refman/5.7/en/identifier-case-sensitivity.html
$sql_temp=strtolower($sql['sql_statement']);
if (substr($sql_temp,0,7) == 'select ')
{
if (false !== strpos($sql_temp,' limit '))
{
// es wurde ein eigenes Lmit im Query angegeben - eigene Berechnung abbrechen
// es wurde ein eigenes Limit im Query angegeben - eigene Berechnung abbrechen
$numrowsabs=-1;
}
else
{
$pos=strpos($sql_temp,'from ');
$sql_temp='SELECT count(*) as anzahl ' . substr($sql['sql_statement'],$pos,strlen($sql['sql_statement']) - $pos);
// anstatt sql_temp in lowerase hier das 'original' sql_statement verwenden
$sql_temp="SELECT count(*) as anzahl FROM (".$sql['sql_statement'].") as query;";
$res=@MSD_query($sql_temp,false);
if ($res)
{
if ($row=mysql_fetch_object($res))
if ($row=mysqli_fetch_object($res))
{
$numrowsabs=$row->anzahl;
}
@ -119,7 +119,7 @@ else
$sqltmp=$sql['sql_statement'] . $sql['order_statement'] . ( strpos(strtolower($sql['sql_statement'] . $sql['order_statement']),' limit ') ? '' : $limit );
if (!$skip_mysql_execution) $res=MSD_query($sqltmp);
$numrows=@mysql_num_rows($res);
$numrows=@mysqli_num_rows($res);
if ($numrowsabs == -1) $numrowsabs=$numrows;
if ($limitende > $numrowsabs) $limitende=$numrowsabs;
@ -144,7 +144,7 @@ if ($numrowsabs > 0 && $Anzahl_SQLs <= 1)
echo '</p>';
//Datentabelle
echo '<table class="bdr" id="dataTable">';
$t=$d="";
$fdesc=Array();
$key=-1;
@ -152,25 +152,22 @@ if ($numrowsabs > 0 && $Anzahl_SQLs <= 1)
{
//Infos und Header holen
//1.Datensatz fuer Feldinfos
$row=mysql_fetch_row($res);
$row=mysqli_fetch_row($res);
//Kompaktmodus-Switcher
$t='<td colspan="' . ( count($row) + 1 ) . '" align="left"><a href="sql.php?db=' . $db . '&amp;tablename=' . $tablename . '&amp;dbid=' . $dbid . '&amp;order=' . urlencode($order) . '&amp;orderdir=' . $orderdir . '&amp;limitstart=' . $limitstart . '&amp;sql_statement=' . urlencode($sql['sql_statement']) . '&amp;tdc=' . ( ( $tdcompact == 0 ) ? '1' : '0' ) . '">' . ( ( $tdcompact == 1 ) ? $lang['L_SQL_VIEW_STANDARD'] : $lang['L_SQL_VIEW_COMPACT'] ) . '</a>';
$t.='&nbsp;&nbsp;&nbsp;' . $lang['L_SQL_QUERYENTRY'] . ' ' . count($row) . ' ' . $lang['L_SQL_COLUMNS'];
$t.='</td></tr><tr class="thead">';
$t.='<th>&nbsp;</th><th>#</th>';
$temp=array();
for ($x=0; $x < count($row); $x++)
{
$temp[$x]['data']=mysql_fetch_field($res,$x);
$temp[$x]['data']=(((($___mysqli_tmp = mysqli_fetch_field_direct($res, $x)) && is_object($___mysqli_tmp)) ? ( (!is_null($___mysqli_tmp->primary_key = ($___mysqli_tmp->flags & MYSQLI_PRI_KEY_FLAG) ? 1 : 0)) && (!is_null($___mysqli_tmp->multiple_key = ($___mysqli_tmp->flags & MYSQLI_MULTIPLE_KEY_FLAG) ? 1 : 0)) && (!is_null($___mysqli_tmp->unique_key = ($___mysqli_tmp->flags & MYSQLI_UNIQUE_KEY_FLAG) ? 1 : 0)) && (!is_null($___mysqli_tmp->numeric = (int)(($___mysqli_tmp->type <= MYSQLI_TYPE_INT24) || ($___mysqli_tmp->type == MYSQLI_TYPE_YEAR) || ((defined("MYSQLI_TYPE_NEWDECIMAL")) ? ($___mysqli_tmp->type == MYSQLI_TYPE_NEWDECIMAL) : 0)))) && (!is_null($___mysqli_tmp->blob = (int)in_array($___mysqli_tmp->type, array(MYSQLI_TYPE_TINY_BLOB, MYSQLI_TYPE_BLOB, MYSQLI_TYPE_MEDIUM_BLOB, MYSQLI_TYPE_LONG_BLOB)))) && (!is_null($___mysqli_tmp->unsigned = ($___mysqli_tmp->flags & MYSQLI_UNSIGNED_FLAG) ? 1 : 0)) && (!is_null($___mysqli_tmp->zerofill = ($___mysqli_tmp->flags & MYSQLI_ZEROFILL_FLAG) ? 1 : 0)) && (!is_null($___mysqli_type = $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = (($___mysqli_type == MYSQLI_TYPE_STRING) || ($___mysqli_type == MYSQLI_TYPE_VAR_STRING)) ? "type" : "")) &&(!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && in_array($___mysqli_type, array(MYSQLI_TYPE_TINY, MYSQLI_TYPE_SHORT, MYSQLI_TYPE_LONG, MYSQLI_TYPE_LONGLONG, MYSQLI_TYPE_INT24))) ? "int" : $___mysqli_tmp->type)) &&(!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && in_array($___mysqli_type, array(MYSQLI_TYPE_FLOAT, MYSQLI_TYPE_DOUBLE, MYSQLI_TYPE_DECIMAL, ((defined("MYSQLI_TYPE_NEWDECIMAL")) ? constant("MYSQLI_TYPE_NEWDECIMAL") : -1)))) ? "real" : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && $___mysqli_type == MYSQLI_TYPE_TIMESTAMP) ? "timestamp" : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && $___mysqli_type == MYSQLI_TYPE_YEAR) ? "year" : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && (($___mysqli_type == MYSQLI_TYPE_DATE) || ($___mysqli_type == MYSQLI_TYPE_NEWDATE))) ? "date " : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && $___mysqli_type == MYSQLI_TYPE_TIME) ? "time" : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && $___mysqli_type == MYSQLI_TYPE_SET) ? "set" : $___mysqli_tmp->type)) &&(!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && $___mysqli_type == MYSQLI_TYPE_ENUM) ? "enum" : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && $___mysqli_type == MYSQLI_TYPE_GEOMETRY) ? "geometry" : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && $___mysqli_type == MYSQLI_TYPE_DATETIME) ? "datetime" : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && (in_array($___mysqli_type, array(MYSQLI_TYPE_TINY_BLOB, MYSQLI_TYPE_BLOB, MYSQLI_TYPE_MEDIUM_BLOB, MYSQLI_TYPE_LONG_BLOB)))) ? "blob" : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type && $___mysqli_type == MYSQLI_TYPE_NULL) ? "null" : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->type = ("" == $___mysqli_tmp->type) ? "unknown" : $___mysqli_tmp->type)) && (!is_null($___mysqli_tmp->not_null = ($___mysqli_tmp->flags & MYSQLI_NOT_NULL_FLAG) ? 1 : 0)) ) : false ) ? $___mysqli_tmp : false);
$temp[$x]['sort']=add_sortkey($temp[$x]['data']->name);
}
//v($temp);
if ($showtables == 1) $temp=mu_sort($temp,'sort');
for ($x=0; $x < count($temp); $x++)
{
$str=$temp[$x]['data'];
@ -193,23 +190,23 @@ if ($numrowsabs > 0 && $Anzahl_SQLs <= 1)
$fdesc[$temp[$x]['data']->name]['Engine']=isset($str->Engine) ? $str->Engine : '';
if (isset($str->Comment) && substr($str->Comment,0,4) == 'VIEW') $fdesc[$temp[$x]['data']->name]['Engine']='View';
$fdesc[$temp[$x]['data']->name]['Version']=isset($str->Version) ? $str->Version : '';
$tt=$lang['L_NAME'] . ': ' . $fdesc[$temp[$x]['data']->name]['name'] . ' Type: ' . $fdesc[$temp[$x]['data']->name]['type'] . " Max Length: " . $fdesc[$temp[$x]['data']->name]['max_length'] . " Unsigned: " . $fdesc[$temp[$x]['data']->name]['unsigned'] . " zerofill: " . $fdesc[$temp[$x]['data']->name]['zerofill'];
$pic='<img src="' . $icon['blank'] . '" alt="" width="1" height="1" border="0">';
if ($str->primary_key == 1 || $str->unique_key == 1)
{
if ($key == -1) $key=$temp[$x]['data']->name;
else $key.='|' . $temp[$x]['data']->name;
if ($str->primary_key == 1) $pic=$icon['key_primary'];
elseif ($str->unique_key == 1) $pic=$icon['index'];
}
// show sorting icon
$arname=( $orderdir == "ASC" ) ? $icon['arrow_down'] : $icon['arrow_up'];
if ($str->name == $order) $t.=$arname;
if ($bb == -1) $bb_link=( $str->type == "blob" ) ? '&nbsp;&nbsp;&nbsp;<a style="font-size:10px;color:blue;" title="use BB-Code for this field" href="sql.php?db=' . $db . '&amp;bb=' . $x . '&amp;tablename=' . $tablename . '&amp;dbid=' . $dbid . '&amp;order=' . $order . '&amp;orderdir=' . $orderdir . '&amp;limitstart=' . $limitstart . '&amp;sql_statement=' . urlencode($sql['sql_statement']) . '&amp;tdc=' . $tdcompact . '">[BB]</a>' : '';
else $bb_link=( $str->type == "blob" ) ? '&nbsp;&nbsp;&nbsp;<a title="use BB-Code for this field" href="sql.php?db=' . $db . '&amp;bb=-1&amp;tablename=' . $tablename . '&amp;dbid=' . $dbid . '&amp;order=' . urlencode($order) . '&amp;orderdir=' . $orderdir . '&amp;limitstart=' . $limitstart . '&amp;sql_statement=' . urlencode($sql['sql_statement']) . '&amp;tdc=' . $tdcompact . '">[no BB]</a>' : '';
if ($no_order == false && $showtables == 0) $t.=$pic . '&nbsp;<a title="' . $tt . '" href="sql.php?db=' . $db . '&amp;tablename=' . $tablename . '&amp;dbid=' . $dbid . '&amp;order=' . urlencode($str->name) . '&amp;orderdir=' . $norder . '&amp;sql_statement=' . urlencode($sql['sql_statement']) . '&amp;tdc=' . $tdcompact . '">' . $str->name . '</a>' . $bb_link;
@ -217,17 +214,17 @@ if ($numrowsabs > 0 && $Anzahl_SQLs <= 1)
$t.='</th>';
}
unset($temp);
$temp=array();
//und jetzt Daten holen
mysql_data_seek($res,0);
mysqli_data_seek($res, 0);
$s=$keysort;
$s=array_flip($keysort);
ksort($s);
for ($i=0; $i < $numrows; $i++)
{
$data[0]=mysql_fetch_array($res,MYSQL_ASSOC);
$data[0]=mysqli_fetch_array($res, MYSQLI_ASSOC);
if ($showtables == 1 && $tabellenansicht == 1)
{
// Spalten sortieren, wenn wir uns in einer Tabellenuebersicht befinden
@ -237,19 +234,19 @@ if ($numrowsabs > 0 && $Anzahl_SQLs <= 1)
else
$temp[$i]=$data[0];
}
$rownr=$limitstart + 1;
for ($i=0; $i < $numrows; $i++)
{
$row=$temp[$i]; // mysql_fetch_row($res);
$cl=( $i % 2 ) ? 'dbrow' : 'dbrow1';
$erste_spalte=1;
// bei Tabellenuebersicht soll nach vorgefertigter Reihenfolge sortiert werden, ansonsten einfach Daten anzeigen
if ($showtables == 1) $sortkey=$keysort;
else $sortkey=$row;
$spalte=0;
// get primary key link for editing
if ($key > -1)
{
@ -259,17 +256,17 @@ if ($numrowsabs > 0 && $Anzahl_SQLs <= 1)
{
if (in_array($rowkey,$keys))
{
if (strlen($primary_key) > 0) $primary_key.='|';
if (strlen($primary_key) > 0) $primary_key.=' AND ';
$primary_key.='`' . urlencode($rowkey) . '`=\'' . urlencode($rowval) . '\'';
}
}
//echo "<br><br>Primaerschluessel erkannt: ".$primary_key;
}
foreach ($sortkey as $rowkey=>$rowval)
{
if (( $rowkey == 'Name' ) && $tabellenansicht == 1 && isset($row['Name'])) $tablename=$row['Name'];
if ($erste_spalte == 1)
{
//edit-pics
@ -293,7 +290,7 @@ if ($numrowsabs > 0 && $Anzahl_SQLs <= 1)
$d.='<a href="' . $p . '&amp;mode=edit">' . $icon['edit'] . '</a>&nbsp;';
}
}
if ($showtables == 0 && $tabellenansicht == 0)
{
$d.='<a href="' . $p . '&amp;mode=kill" onclick="if(!confirm(\'' . $lang['L_ASKDELETERECORD'] . '\')) return false;">' . $icon['delete'] . '</a>';
@ -337,14 +334,14 @@ if ($numrowsabs > 0 && $Anzahl_SQLs <= 1)
if (isset($temp[$i][$rowkey])) $data=( $fdesc[$rowkey]['type'] == 'string' || $fdesc[$rowkey]['type'] == 'blob' ) ? convert_to_utf8($temp[$i][$rowkey]) : $temp[$i][$rowkey];
else $data='';
if (in_array($rowkey,$byte_output)) $data=byte_output($data);
}
}
//v($fdesc[$rowkey]);
if ($showtables==0)
if ($showtables==0)
{
if (is_null($rowval)) $data='<i>NULL</i>';
else $data=htmlspecialchars($data,ENT_COMPAT,'UTF-8');
}
$spalte++;
@ -360,8 +357,8 @@ if ($numrowsabs > 0 && $Anzahl_SQLs <= 1)
}
}
echo '</table>';
if ($showtables == 0) echo '<br>' . $command_line;
}
else
echo '<p class="success">' . $lang['L_SQL_NODATA'] . '</p>';
echo '<p class="success">' . $lang['L_SQL_NODATA'] . '</p>';

Datei anzeigen

@ -6,12 +6,12 @@ $tpl->set_filenames(array(
$sqledit="SHOW FIELDS FROM `$tablename`";
$res=MSD_query($sqledit);
$num=mysql_numrows($res);
$num=mysqli_num_rows($res);
$feldnamen="";
for ($x=0; $x<$num; $x++)
{
$row=mysql_fetch_object($res);
$row=mysqli_fetch_object($res);
$feldnamen.=$row->Field.'|';
$tpl->assign_block_vars('ROW',array(
'CLASS' => ($x%2) ? 1 : 2,

Datei anzeigen

@ -4,13 +4,12 @@ $tpl=new MSDTemplate();
$tpl->set_filenames(array(
'show' => './tpl/sqlbrowser/sql_record_update_inputmask.tpl'));
$recordkey=str_replace('|',' AND ',$recordkey);
$target=($mode=="searchedit") ? '?mode=searchedit' : '?mode=update'; // jump back to search hit list after saving
$fields=getExtendedFieldInfo($db,$tablename);
$sqledit="SELECT * FROM `$tablename` WHERE ".$recordkey;
$res=MSD_query($sqledit);
$record=mysql_fetch_array($res,MYSQL_ASSOC); // get the record
$record=mysqli_fetch_array($res, MYSQLI_ASSOC); // get the record
$num=sizeof($record); // get the nr of fields of the record

Datei anzeigen

@ -3,17 +3,19 @@ if (!defined('MSD_VERSION')) die('No direct access.');
//Tabellen
echo $aus.'<h6>'.$lang['L_SQL_TABLESOFDB'].' `'.$databases['Name'][$dbid].'` '.$lang['L_SQL_EDIT'].'</h6>';
//////////////////////// DH
//Primaerschluessel loeschen
if (isset($_GET['killPrimaryKey']))
{
$keys=getPrimaryKeys($databases['Name'][$dbid],$_GET['tablename']);
//Zu loeschenden Schluessel aus dem Array entfernen
$keyPos=array_search($_GET['killPrimaryKey'],$keys);
$keyPos=array_search($_GET['killPrimaryKey'],$keys['name']);
if (!(false===$keyPos))
{
unset($keys[$keyPos]);
$res=setNewPrimaryKeys($databases['Name'][$dbid],$_GET['tablename'],$keys);
unset($keys['name'][$keyPos]);
unset($keys['size'][$keyPos]);
$keys['name']=array_values($keys['name']);
$keys['size']=array_values($keys['size']);
$res=setNewPrimaryKeys($databases['Name'][$dbid], $_GET['tablename'], $keys['name'], $keys['size']);
if ($res)
{
echo '<script language="JavaScript">
@ -23,7 +25,7 @@ if (isset($_GET['killPrimaryKey']))
else
{
echo '<script language="JavaScript">
alert("'.$lang['L_PRIMARYKEY_NOTFOUND'].': '.$_GET['killPrimaryKey'].'");
alert("'.$lang['L_PRIMARYKEYS_CHANGINGERROR'].': '.$_GET['killPrimaryKey'].'");
</script>';
}
}
@ -37,37 +39,88 @@ if (isset($_GET['killPrimaryKey']))
//Primärschlüssel löschen ende
//Neue Primärschlüssel setzen
if (isset($_POST['setNewPrimaryKeys']))
//Neue Schlüssel setzen
if (isset($_POST['setNewKeys']))
{
$fields=getAllFields($databases['Name'][$dbid],$_GET['tablename']);
$newKeysArray=Array();
$newKeySizesArray=Array();
foreach ($fields as $index=>$field)
{
if ((isset($_POST["setNewPrimKey".$index]))&&($_POST["setNewPrimKey".$index]!=""))
if ((isset($_POST["setNewKey".$index]))&&($_POST["setNewKey".$index]!=""))
{
$newKeysArray[]=$_POST["setNewPrimKey".$index];
$newKeysArray[]=$_POST["setNewKey".$index];
$newKeySizesArray[]=isset($_POST["indexSize".$index]) ? (int) $_POST["indexSize".$index]:'';
}
}
//doppelte Elemente entfernen
$newKeysArray=array_unique($newKeysArray);
$res=setNewPrimaryKeys($databases['Name'][$dbid],$_GET['tablename'],$newKeysArray);
$newKeySizesArray=array_intersect_key($newKeySizesArray, $newKeysArray);
if ($_POST["indexType"]=="primary")
{
$res=setNewPrimaryKeys($databases['Name'][$dbid], $_GET['tablename'], $newKeysArray, $newKeySizesArray);
if ($res)
{
echo '<script language="JavaScript">
alert("'.$lang['L_PRIMARYKEYS_CHANGED'].'");
</script>';
}
else
{
echo '<script language="JavaScript">
alert("'.$lang['L_PRIMARYKEYS_CHANGINGERROR'].'");
</script>';
}
}
else
{
if ($_POST["indexType"]=="unique")
{
$newIndexType="UNIQUE";
}
elseif ($_POST["indexType"]=="fulltext")
{
$newIndexType="FULLTEXT";
}
else
{
$newIndexType="INDEX";
}
$res=setNewKeys($databases['Name'][$dbid], $_GET['tablename'], $newKeysArray, $newIndexType, $_POST['indexName'], $newKeySizesArray);
if ($res)
{
echo '<script language="JavaScript">
alert("'.$lang['L_KEY_ADDED'].'");
</script>';
}
else
{
echo '<script language="JavaScript">
alert("'.$lang['L_KEY_ADDERROR'].'");
</script>';
}
}
}
//Andere Indizes löschen
if (isset($_GET['killIndex']))
{
$res = killKey($databases['Name'][$dbid], $_GET['tablename'], $_GET['killIndex']);
if ($res)
{
echo '<script language="JavaScript">
alert("'.$lang['L_PRIMARYKEYS_CHANGED'].'");
alert("'.$lang['L_KEY_DELETED'].': '.$_GET['killIndex'].'");
</script>';
}
else
{
echo '<script language="JavaScript">
alert("'.$lang['L_PRIMARYKEYS_CHANGINGERROR'].'");
alert("'.$lang['L_KEY_DELETEERROR'].': '.$_GET['killIndex'].'");
</script>';
}
}
//Neue Primärschlüssel setzen ende
//////////////////////// DH ende
if (isset($_GET['kill']))
{
@ -75,9 +128,12 @@ if (isset($_GET['kill']))
else
{
$sql_alter="ALTER TABLE `".$databases['Name'][$dbid]."`.`".$_GET['tablename']."` DROP COLUMN `".$_GET['kill']."`";
MSD_DoSQL($sql_alter);
echo '<div align="left" id="sqleditbox" style="font-size: 11px;width:90%;padding=6px;">';
echo '<p class="success">'.$lang['L_SQL_FIELDDELETE1'].' `'.$_GET['kill'].'` '.$lang['L_SQL_DELETED'].'.</p>'.highlight_sql($out).'</div>';
$res = MSD_DoSQL($sql_alter);
if ($res)
{
echo '<div align="left" id="sqleditbox" style="font-size: 11px;width:90%;padding=6px;">';
echo '<p class="success">'.$lang['L_SQL_FIELDDELETE1'].' `'.$_GET['kill'].'` '.$lang['L_SQL_DELETED'].'.</p>'.highlight_sql($out).'</div>';
}
}
}
if (isset($_POST['tablecopysubmit']))
@ -95,8 +151,7 @@ if (isset($_POST['tablecopysubmit']))
{
Table_Copy("`".$databases['Name'][$dbid]."`.`".$table_edit_name."`",$_POST['tablecopyname'],$_POST['copyatt']);
echo '<div align="left" id="sqleditbox">';
echo ($_POST['copyatt']==0) ? '<p class="success">'.sprintf($lang['L_SQL_SCOPY'],$table_edit_name,$_POST['tablecopyname']).'.</p>' : sprintf($lang['L_SQL_TCOPY'],$table_edit_name,$_POST['tablecopyname']).'</p>';
echo highlight_sql($out).'</div>';
echo ($_POST['copyatt']==0) ? '<p class="success">'.sprintf($lang['L_SQL_SCOPY'],$table_edit_name,$_POST['tablecopyname']).'</p>' : sprintf($lang['L_SQL_TCOPY'],$table_edit_name,$_POST['tablecopyname']).'</p>'; echo highlight_sql($out).'</div>';
$tablename=$_POST['tablecopyname'];
}
}
@ -109,8 +164,11 @@ if (isset($_POST['newtablesubmit']))
else
{
$sql_alter="CREATE TABLE `".$databases['Name'][$dbid]."`.`".$_POST['newtablename']."` (`id` int(11) unsigned not null AUTO_INCREMENT PRIMARY KEY ) ".((MSD_NEW_VERSION) ? "ENGINE" : "TYPE")."=MyISAM;";
MSD_DoSQL($sql_alter);
echo SQLOutput($out,$lang['L_TABLE'].' `'.$_POST['newtablename'].'` '.$lang['L_SQL_CREATED']);
$res = MSD_DoSQL($sql_alter);
if ($res)
{
echo SQLOutput($out,$lang['L_TABLE'].' `'.$_POST['newtablename'].'` '.$lang['L_SQL_CREATED']);
}
}
}
if (isset($_POST['t_edit_submit']))
@ -132,9 +190,12 @@ if (isset($_POST['t_edit_submit']))
if (MSD_NEW_VERSION&&$_POST['t_edit_charset']!="") $sql_alter.="DEFAULT CHARSET=".$_POST['t_edit_charset'].", ";
if (MSD_NEW_VERSION&&$_POST['t_edit_collate']!="") $sql_alter.="COLLATE ".$_POST['t_edit_collate'].", ";
$sql_alter.="COMMENT='".$_POST['t_edit_comment']."' ";
MSD_DoSQL($sql_alter);
echo SQLOutput($out,$lang['L_TABLE'].' `'.$_POST['table_edit_name'].'` '.$lang['L_SQL_CHANGED']);
$res = MSD_DoSQL($sql_alter);
if ($res)
{
echo SQLOutput($out,$lang['L_TABLE'].' `'.$_POST['table_edit_name'].'` '.$lang['L_SQL_CHANGED']);
}
}
}
else
@ -166,9 +227,9 @@ if (isset($_POST['newfield_posted']))
$newkeys[1]=($_POST['f_index_new']=="unique") ? 1 : 0;
$newkeys[2]=($_POST['f_index_new']=="index") ? 1 : 0;
$newkeys[3]=(isset($_POST['f_indexfull'])) ? 1 : 0;
$add_sql.=ChangeKeys($oldkeys,$newkeys,$_POST['f_name'],$_POST['f_size'],"drop_only");
$sql_stamm="ALTER TABLE `".$databases['Name'][$dbid]."`.`$table_edit_name` ";
$sql_alter=$sql_stamm.((isset($_POST['editfield'])) ? "CHANGE COLUMN `".$_POST['fieldname']."` `".$_POST['f_name']."` " : "ADD COLUMN `".$_POST['f_name']."` ");
$sql_alter.=$_POST['f_type'];
@ -186,37 +247,41 @@ if (isset($_POST['newfield_posted']))
$sql_alter.=$_POST['f_attribut']." ";
$sql_alter.=$_POST['f_null']." ";
$sql_alter.=($_POST['f_default']!="") ? "DEFAULT '".addslashes($_POST['f_default'])."' " : "";
if (MSD_NEW_VERSION&&$_POST['f_collate']!="") $sql_alter.="COLLATE ".$_POST['f_collate']." ";
if ($_POST['f_extra']=="AUTO_INCREMENT")
{
$sql_alter.=" AUTO_INCREMENT ";
}
if ($newkeys[0]==1) $sql_alter.=" PRIMARY KEY ";
if ($newkeys[1]==1) $sql_alter.=" UNIQUE INDEX ";
if ($newkeys[2]==1) $sql_alter.=" INDEX ";
if ($newkeys[3]==1) $sql_alter.=" FULLTEXT INDEX ";
$sql_alter.=$_POST['f_position']." ;";
$sql_alter.=$_POST['f_position'];
if ($newkeys[0]==1) $sql_alter.=", ADD PRIMARY KEY (`".$_POST['f_name']."`)";
if ($newkeys[1]==1) $sql_alter.=", ADD UNIQUE (`".$_POST['f_name']."`)";
if ($newkeys[2]==1) $sql_alter.=", ADD INDEX (`".$_POST['f_name']."`)";
if ($newkeys[3]==1) $sql_alter.=", ADD FULLTEXT INDEX (`".$_POST['f_name']."`)";
$sql_alter.=";";
if ($add_sql!="")
{
$add_sql=$sql_stamm.$add_sql;
$sql_alter="$sql_alter;\n$add_sql;\n";
$sql_alter="$sql_alter\n$add_sql;";
}
$res = MSD_DoSQL($sql_alter);
if ($res)
{
echo '<div align="left" id="sqleditbox" style="font-size: 11px;width:90%;padding=6px;">';
echo '<p class="success"> `'.$_POST['f_name'].'` '.((isset($_POST['editfield'])) ? $lang['L_SQL_CHANGED'] : $lang['L_SQL_CREATED']).'</p>';
echo highlight_sql($out).'</div>';
}
MSD_DoSQL($sql_alter);
echo '<div align="left" id="sqleditbox" style="font-size: 11px;width:90%;padding=6px;">';
echo '<p class="success"> `'.$_POST['f_name'].'` '.((isset($_POST['editfield'])) ? $lang['L_SQL_CHANGED'] : $lang['L_SQL_CREATED']).'.</p>';
echo highlight_sql($out).'</div>';
$fields_infos=getFieldinfos($databases['Name'][$dbid],$table_edit_name);
}
}
mysql_select_db($databases['Name'][$dbid]);
mysqli_select_db($GLOBALS["___mysqli_ston"], $databases['Name'][$dbid]);
$sqlt="SHOW TABLE STATUS FROM `".$databases['Name'][$dbid]."` ;";
$res=MSD_query($sqlt);
$anz_tabellen=mysql_numrows($res);
$anz_tabellen=mysqli_num_rows($res);
$p="sql.php?db=".$databases['Name'][$dbid]."&amp;dbid=$dbid&amp;tablename=$table_edit_name&amp;context=2";
echo '<form action="sql.php?db='.$databases['Name'][$dbid].'&amp;dbid='.$dbid.'&amp;tablename='.$table_edit_name.'&amp;context=2" method="post">';
@ -229,12 +294,12 @@ if ($anz_tabellen==0)
}
else
{
echo '<tr><td>'.$lang['L_SQL_SELECTTABLE'].':&nbsp;&nbsp;&nbsp;</td>';
echo '<td colspan="2"><select name="tableselect" onchange="this.form.submit()"><option value="1" SELECTED></option>';
for ($i=0; $i<$anz_tabellen; $i++)
{
$row=mysql_fetch_array($res);
$row=mysqli_fetch_array($res);
echo '<option value="'.$row['Name'].'">'.$row['Name'].'</option>';
}
echo '</select>&nbsp;&nbsp;</td>';
@ -245,20 +310,20 @@ if ($table_edit_name!="")
{
$sqlf="SHOW FULL FIELDS FROM `".$databases['Name'][$dbid]."`.`$table_edit_name` ;";
$res=MSD_query($sqlf);
$anz_fields=mysql_num_rows($res);
$anz_fields=mysqli_num_rows($res);
$fields_infos=getFieldinfos($databases['Name'][$dbid],$table_edit_name);
if (MSD_NEW_VERSION) $t_engine=(isset($fields_infos['_tableinfo_']['ENGINE'])) ? $fields_infos['_tableinfo_']['ENGINE'] : "MyISAM";
else
$t_engine=(isset($fields_infos['_tableinfo_']['TYPE'])) ? $fields_infos['_tableinfo_']['TYPE'] : "MyISAM";
$t_charset=(isset($fields_infos['_tableinfo_']['DEFAULT CHARSET'])) ? $fields_infos['_tableinfo_']['DEFAULT CHARSET'] : "";
$t_collation=isset($row['Collation']) ? $row['Collation'] : ""; //(isset($fields_infos['_tableinfo_']['COLLATE'])) ? $fields_infos['_tableinfo_']['COLLATE'] : "";
$t_comment=(isset($fields_infos['_tableinfo_']['COMMENT'])) ? substr($fields_infos['_tableinfo_']['COMMENT'],1,strlen($fields_infos['_tableinfo_']['COMMENT'])-2) : "";
$t_rowformat=(isset($fields_infos['_tableinfo_']['ROW_FORMAT'])) ? $fields_infos['_tableinfo_']['ROW_FORMAT'] : "";
echo "<h6>".$lang['L_TABLE']." `$table_edit_name`</h6>";
$td='<td valign="top" nowrap="nowrap" class="small">';
//Tabelleneigenschaften
echo '<form action="'.$p.'" method="post"><input type="hidden" name="table_edit_name" value="'.$table_edit_name.'"><table class="bdr">';
echo '<tr class="sqlNew"><td colspan="4" style="font-size:10pt;font-weight:bold;">'.$lang['L_SQL_TBLPROPSOF'].' `'.$table_edit_name.'` ('.$anz_fields.' '.$lang['L_FIELDS'].')</td>';
@ -271,13 +336,13 @@ if ($table_edit_name!="")
echo '<td class="small" align="center">'.$lang['L_COMMENT'].'<br><input type="text" class="text" name="t_edit_comment" value="'.$t_comment.'" size="30" maxlength="100" style="font-size:11px;"></td>';
echo '<td class="small" align="center">&nbsp;<br><input type="submit" name="t_edit_submit" value="'.$lang['L_CHANGE'].'" class="Formbutton"></td></tr>';
echo '</table></form><p>&nbsp;</p>';
$field_fehler=0;
echo '<h6>'.$lang['L_FIELDS_OF_TABLE'].' `'.$table_edit_name.'`</h6>';
$d_collate='';
$d_comment='';
if (isset($_GET['newfield'])||isset($_GET['editfield'])||$field_fehler>0||isset($_POST['newfield_posted']))
{
if (isset($_GET['editfield'])) $id=$_GET['editfield'];
@ -286,7 +351,7 @@ if ($table_edit_name!="")
$d_size=(isset($_GET['editfield'])) ? $fields_infos[$id]['size'] : "";
$d_null=(isset($_GET['editfield'])) ? $fields_infos[$id]['null'] : "";
$d_attribute=(isset($_GET['editfield'])) ? $fields_infos[$id]['attributes'] : "";
$d_default='';
if (isset($id)&&isset($fields_infos[$id])&&isset($fields_infos[$id]['default']))
{
@ -295,7 +360,7 @@ if ($table_edit_name!="")
$d_default=substr($fields_infos[$id]['default'],1,strlen($fields_infos[$id]['default'])-2);
}
$d_extra=(isset($_GET['editfield'])) ? $fields_infos[$id]['extra'] : "";
$d_primary=$d_unique=$d_index=$d_fulltext=0;
if (isset($id))
{
@ -306,39 +371,9 @@ if ($table_edit_name!="")
if (isset($_GET['editfield']))
{
$d_primary=(in_array($fields_infos[$id]['name'],$fields_infos['_primarykeys_'])) ? 1 : 0;
if (isset($fields_infos['_key_']))
{
for ($i=0; $i<count($fields_infos['_key_']); $i++)
{
if ($fields_infos['_key_'][$i]['name']==$fields_infos[$id]['name'])
{
$d_index=1;
break;
}
}
}
if (isset($fields_infos['_fulltextkey_']))
{
for ($i=0; $i<count($fields_infos['_fulltextkey_']); $i++)
{
if ($fields_infos['_fulltextkey_'][$i]['name']==$fields_infos[$id]['name'])
{
$d_fulltext=1;
break;
}
}
}
if (isset($fields_infos['_uniquekey_']))
{
for ($i=0; $i<count($fields_infos['_uniquekey_']); $i++)
{
if ($fields_infos['_uniquekey_'][$i]['name']==$fields_infos[$id]['name'])
{
$d_unique=1;
break;
}
}
}
$d_index=(in_array($fields_infos[$id]['name'],$fields_infos['_key_'])) ? 1 : 0;
$d_fulltext=(in_array($fields_infos[$id]['name'],$fields_infos['_fulltextkey_'])) ? 1 : 0;
$d_unique=(in_array($fields_infos[$id]['name'],$fields_infos['_uniquekey_'])) ? 1 : 0;
}
echo '<form action="'.$p.'" method="post" id="smallform"><input type="hidden" name="newfield_posted" value="1">';
if (isset($_GET['editfield'])) echo '<input type="hidden" name="editfield" value="'.$id.'"><input type="hidden" name="fieldname" value="'.$d_name.'">';
@ -352,23 +387,23 @@ if ($table_edit_name!="")
echo '<td>NULL<br><select name="f_null">'.GetOptionsCombo($feldnulls,$d_null).'</select></td>';
echo '<td align="center">Default<br><input type="text" class="text" name="f_default" value="'.$d_default.'" size="10"></td>';
echo '<td align="center">Extra<br><select name="f_extra">'.GetOptionsCombo($feldextras,$d_extra).'</select></td>';
echo '</tr><tr><td align="center">'.$lang['L_SQL_INDEXES'].'<br>';
echo '<input type="radio" class="radio" name="f_index_new" id="k_no_index" value="no" '.(($d_primary+$d_unique+$d_index+$d_fulltext==0) ? 'checked="checked"' : '').'>';
echo '<label for="k_no_index">'.$icon['key_nokey'].'</label>&nbsp;&nbsp;';
echo '<input type="radio" class="radio" name="f_index_new" id="k_primary" value="primary" '.(($d_primary==1) ? "checked" : "").'>';
echo '<label for="k_primary">'.$icon['key_primary'].'</label>&nbsp;&nbsp;';
echo '<input type="radio" class="radio" name="f_index_new" id="k_unique" value="unique" '.(($d_unique==1) ? "checked" : "").'>';
echo '<label for="k_unique">'.$icon['key_unique'].'</label>&nbsp;&nbsp;';
echo '<input type="radio" class="radio" name="f_index_new" id="k_index" value="index" '.(($d_index==1) ? "checked" : "").'>&nbsp;';
echo '<label for="k_index">'.$icon['index'].'</label>&nbsp;&nbsp;';
echo '<input type="checkbox" class="checkbox" name="f_indexfull" id="k_fulltext" value="1" '.(($d_fulltext==1) ? "checked" : "").'>';
echo '<label for="k_fulltext">'.$icon['key_fulltext'].'</label>&nbsp;&nbsp;</td>';
echo '<td align="center" colspan="2" >'.$lang['L_COLLATION'].'<br><select name="f_collate">'.CollationCombo($d_collate).'</select></td>';
echo '<td align="center">'.$lang['L_SQL_ATTRIBUTES'].'<br><select name="f_attribut">'.AttributeCombo($d_attribute).'</select></td>';
echo '<td align="center">'.$lang['L_SQL_ATPOSITION'].':<br><select name="f_position"><option value=""></option><option value="FIRST">'.$lang['L_SQL_FIRST'].'</option>';
@ -379,7 +414,7 @@ if ($table_edit_name!="")
echo '<option value="AFTER `'.$fields_infos[$i]['name'].'`">'.$lang['L_SQL_AFTER'].' `'.$fields_infos[$i]['name'].'`</option>';
}
}
echo '</select></td><td align="center"><input type="submit" name="newfieldsubmit" value="'.((isset($_GET['editfield'])) ? $lang['L_SQL_CHANGEFIELD'] : $lang['L_SQL_INSERTFIELD']).'" class="Formbutton"></td></tr></table></form><p>&nbsp;</p>';
echo '</select></td><td align="center"><br><input type="submit" name="newfieldsubmit" value="'.((isset($_GET['editfield'])) ? $lang['L_SQL_CHANGEFIELD'] : $lang['L_SQL_INSERTFIELD']).'" class="Formbutton"></td></tr></table></form><p>&nbsp;</p>';
}
else
echo '<a style="font-size:8pt;padding-bottom:8px;" href="'.$p.'&amp;newfield=1">'.$lang['L_SQL_INSERTNEWFIELD'].'</a><br><br>';
@ -388,67 +423,46 @@ if ($table_edit_name!="")
for ($i=0; $i<$anz_fields; $i++)
{
$cl=($i%2) ? "dbrow" : "dbrow1";
if ($i==0) echo '<tr class="thead"><th colspan="2">&nbsp;</th><th>Field</th><th>Type</th><th>Size</th><th>NULL</th><th>Key</th><th>Attribute</th><th>Default</th><th>Extra</th><th>Sortierung</th></tr>';
if ($i==0) echo '<tr class="thead"><th colspan="2">&nbsp;</th><th>Field</th><th>Type</th><th>Size</th><th>NULL</th><th>Key</th><th>Attribute</th><th>Default</th><th>Extra</th><th>'.
$lang['L_COLLATION'].'</th><th>'.$lang['L_COMMENT'].'</th></tr>';
echo '<tr class="'.$cl.'">';
echo '<td nowrap="nowrap">';
echo '<a href="'.$p.'&amp;editfield='.$i.'"><img src="'.$config['files']['iconpath'].'edit.gif" title="edit field" alt="edit field" border="0"></a>&nbsp;&nbsp;';
echo '<a href="'.$p.'&amp;kill='.$fields_infos[$i]['name'].'&amp;anz='.$anz_fields.'" onclick="if(!confirm(\''.$lang['L_ASKDELETEFIELD'].'\')) return false;"><img src="'.$config['files']['iconpath'].'delete.gif" alt="delete field" border="0"></a>&nbsp;&nbsp;';
echo '</td>';
echo '<td style="text-align:right">'.($i+1).'.</td>';
echo '<td><strong>'.$fields_infos[$i]['name'].'</strong></td><td>'.$fields_infos[$i]['type'].'</td><td>'.$fields_infos[$i]['size'].'</td>';
echo '<td>'.get_output_attribut_null($fields_infos[$i]['null']).'</td><td>';
//key
if (in_array($fields_infos[$i]['name'],$fields_infos['_primarykeys_'])) echo $icon['key_primary'];
if (isset($fields_infos['_fulltextkey_']))
{
for ($ii=0; $ii<count($fields_infos['_fulltextkey_']); $ii++)
{
if ($fields_infos['_fulltextkey_'][$ii]['name']==$fields_infos[$i]['name'])
{
echo $icon['key_fulltext'];
break;
}
}
}
else
if (isset($fields_infos['_uniquekey_']))
{
for ($ii=0; $ii<count($fields_infos['_uniquekey_']); $ii++)
{
if ($fields_infos['_uniquekey_'][$ii]['name']==$fields_infos[$i]['name'])
{
echo $icon['key_unique'];
break;
}
}
}
else
if (isset($fields_infos['_key_']))
{
for ($ii=0; $ii<count($fields_infos['_key_']); $ii++)
{
//echo "<h5>".$fields_infos['_key_'][$ii]['columns']."</h5>";
if ($fields_infos['_key_'][$ii]['name']==$fields_infos[$i]['name'])
{
echo $icon['index'];
break;
}
}
}
if (in_array($fields_infos[$i]['name'],$fields_infos['_fulltextkey_'])) echo $icon['key_fulltext'];
if (in_array($fields_infos[$i]['name'],$fields_infos['_uniquekey_'])) echo $icon['key_unique'];
if (in_array($fields_infos[$i]['name'],$fields_infos['_key_'])) echo $icon['index'];
echo '</td><td>'.$fields_infos[$i]['attributes'].'</td>';
echo '<td>'.$fields_infos[$i]['default'].'</td>'.$td.$fields_infos[$i]['extra'].'</td>';
echo '<td>'.((MSD_NEW_VERSION) ? $fields_infos[$i]['collate'] : "&nbsp;").'</td></tr>';
echo '<td>'.((MSD_NEW_VERSION) ? $fields_infos[$i]['collate'] : "&nbsp;").'</td>';
echo '<td>'.((isset($fields_infos[$i]['comment'])) ? $fields_infos[$i]['comment'] : "&nbsp;").'</td>';
echo "</tr>";
}
echo '</table><br>';
echo '<h6>'.$lang['L_SQL_TABLEINDEXES'].' `'.$table_edit_name.'`</h6>';
echo '<table class="bdr"><tr class="thead"><th colspan="2">&nbsp;</th><th>Index-Name</th>'.((MSD_NEW_VERSION) ? '<th>Typ</th>' : '').'<th>'.$lang['L_SQL_ALLOWDUPS'].'</th><th>'.$lang['L_SQL_CARDINALITY'].'</th><th>Spalten</th></tr>';
echo '<table class="bdr">
<tr class="thead">
<th colspan="2">&nbsp;</th>
<th>'.$lang['L_NAME'].'</th>
<th>'.$lang['L_SQL_COLUMNS'].'</th>
<th>'.$lang['L_INFO_SIZE'].'</th>
'.((MSD_NEW_VERSION) ? '<th>'.$lang['L_TABLE_TYPE'].'</th>' : '').'
<th>'.$lang['L_SQL_ALLOWDUPS'].'</th>
<th>'.$lang['L_SQL_CARDINALITY'].'</th>
<th>'.$lang['L_COMMENT'].'</th>
</tr>';
$sqlk="SHOW KEYS FROM `".$databases['Name'][$dbid]."`.`$table_edit_name`;";
$res=MSD_query($sqlk);
$num=mysql_numrows($res);
$num=mysqli_num_rows($res);
if ($num==0)
{
echo '<tr><td colspan="6">'.$lang['L_SQL_TABLENOINDEXES'].'</td></tr>';
@ -457,83 +471,125 @@ if ($table_edit_name!="")
{
for ($i=0; $i<$num; $i++)
{
$row=mysql_fetch_array($res,MYSQL_ASSOC);
//v($row);
$row=mysqli_fetch_array($res, MYSQLI_ASSOC);
if (!isset($row['Comment'])) {
$row['Comment'] = '';
}
$cl=($i%2) ? "dbrow" : "dbrow1";
//Images
echo '<tr class="'.$cl.'">';
echo '<td>';
//echo '<img src="' . $config['files']['iconpath'] . 'edit.gif" alt="" border="0">&nbsp;&nbsp;';
///// DH
//erstmal nur fuer Primaerschluessel
if ($row['Key_name']=="PRIMARY")
{
echo '<a href="'.$p.'&amp;killPrimaryKey='.$row['Column_name'].'" onclick="if(!confirm(\''.$lang['L_PRIMARYKEY_CONFIRMDELETE'].'\')) return false;">';
echo '<img src="'.$config['files']['iconpath'].'delete.gif" alt="" border="0">';
echo '</a>';
}
///// DH ende
else
{
echo '<a href="'.$p.'&amp;killIndex='.$row['Key_name'].'" onclick="if(!confirm(\''.$lang['L_KEY_CONFIRMDELETE'].'\')) return false;">';
echo '<img src="'.$config['files']['iconpath'].'delete.gif" alt="" border="0">';
echo '</a>';
}
echo '</td>';
echo '<td style="text-align:right">'.($i+1).'.</td>';
echo '<td>'.$row['Key_name'].'</td>';
echo '<td>'.$row['Column_name'].'</td>';
echo '<td class="right">';
if (isset($row['Sub_part']) && $row['Sub_part']>0) echo $row['Sub_part'];
echo '</td>';
if (MSD_NEW_VERSION) echo '<td>'.$row['Index_type'].'</td>';
echo '<td align="center">'.(($row['Non_unique']==1) ? $lang['L_YES'] : $lang['L_NO']).'</td>';
echo '<td>'.(($row['Cardinality']>=0) ? $row['Cardinality'] : $lang['L_NO']).'</td>';
echo '<td>'.$row['Column_name'].'</td>';
echo '<td>'.$row['Comment'].'</td>';
echo '</tr>';
}
}
echo '</table><br><input type="Button" value="'.$lang['L_SQL_CREATEINDEX'].'" onclick="location.href=\''.$p.'&amp;sql_createindex=1\'" class="Formbutton">';
///// DH
echo '</table><br><input type="Button" value="'.$lang['L_SQL_CREATEINDEX'].'" onclick="location.href=\''.$p.'&amp;sql_createindex=1#setnewkeys\'" class="Formbutton">';
if ((isset($_GET['sql_createindex']))&&($_GET['sql_createindex']=="1"))
{ ?>
<script type="text/javascript">
function toggleIndexLength(id)
{
var mysqlStrings = ['<?php echo implode("','", $mysql_string_types);?>'];
var field = 'setNewKey'+id;
var sel = document.getElementById(field).selectedIndex;
var val = document.getElementById(field).options[sel].innerHTML;
document.getElementById('indexSize'+id).disabled = true;
for (i=0;i<mysqlStrings.length;i++)
{
if (val.indexOf("["+mysqlStrings[i]) != -1)
{
document.getElementById('indexSize'+id).disabled = false;
}
}
}
</script>
<?php
echo '<br><a name="setnewkeys"></a>';
echo '<form action="'.$p.'" method="POST">';
echo '<h6>'.$lang['L_SETPRIMARYKEYSFOR'].' `'.$table_edit_name.'`</h6>';
echo '<h6>'.$lang['L_SETKEYSFOR'].' `'.$table_edit_name.'`</h6>';
//kopf
echo '<table class="bdr"><tr class="thead"><th>'.$lang['L_PRIMARYKEY_FIELD'].'</th></tr>';
echo '<table class="bdr">';
//body
$sqlFelder="DESCRIBE `".$databases['Name'][$dbid]."`.`".$_GET['tablename']."`;";
$res=MSD_query($sqlFelder);
$num=mysql_numrows($res);
$num=mysqli_num_rows($res);
if ($num==0)
{
echo '<tr><td>'.$lang['L_SQL_TABLENOINDEXES'].'</td></tr>';
}
else
{
//alle Felder holen
echo '<tr class="thead"><th>'.$lang['L_NAME'].'</th><th>'.$lang['L_TABLE_TYPE'].'</th></tr>';
echo '<tr>';
echo '<td><input type="text" name="indexName" value="" class="text">';
echo '<td><select name="indexType"><option value="primary">'.$lang['L_TITLE_KEY_PRIMARY'].'</option><option value="unique">'.$lang['L_TITLE_KEY_UNIQUE'].'</option><option value="index" selected="selected">'.$lang['L_TITLE_INDEX'].'</option><option value="fulltext">'.$lang['L_TITLE_KEY_FULLTEXT'].'</option></select></td>';
echo '</tr>';
echo '</table><br>';
//alle Felder holen
$feldArray=Array();
while ($row=mysql_fetch_array($res))
echo '<table class="bdr">';
echo '<tr class="thead"><th>#</th><th>'.$lang['L_PRIMARYKEY_FIELD'].'</th><th>'.$lang['L_INFO_SIZE'].'</th>';
while ($row=mysqli_fetch_array($res, MYSQLI_ASSOC))
{
$feldArray[$row['Field']]=$row['Type'];
}
//Primaerschluessel holen, um automatisch vorzuselektieren
$primaryKeys=getPrimaryKeys($databases['Name'][$dbid],$_GET['tablename']);
//eine Select-Box pro Feld anzeigen
//eine Select-Box pro Feld anzeigen, Felder für Name und Typ nur in der ersten Zeile
for ($i=0; $i<$num; $i++)
{
$cl=($i%2) ? "dbrow" : "dbrow1";
echo '<tr class="'.$cl.'">';
echo '<td>';
echo '<select name="setNewPrimKey'.$i.'">';
echo '<option value="">---</option>';
echo '<tr><td class="right">'.($i+1).'.</td><td>';
$options ="\n\n".'<option value="">---</option>';
$selectedFeldTyp = false;
foreach ($feldArray as $feldName=>$feldTyp)
{
echo '<option value="'.$feldName.'"';
$options.="\n".'<option value="'.$feldName.'"';
//alle Primaerschluessel vorselektieren
if ((isset($primaryKeys[$i]))&&($primaryKeys[$i]==$feldName)) echo ' selected="selected"';
echo '>'.$feldName.' ['.$feldTyp.']</option>';
if (isset($primaryKeys['name'][$i]) && $primaryKeys['name'][$i]==$feldName) {
$options.=' selected="selected"';
$selectedFeldTyp = $feldTyp;
}
$options.='>'.$feldName.' ['.$feldTyp.']</option>';
}
echo '</select>';
echo '</td>';
echo '<select id="setNewKey'.$i.'" name="setNewKey'.$i.'" onchange="toggleIndexLength('.$i.');">';
echo $options."\n".'</select></td>';
echo '<td>';
$type =explode('(', $selectedFeldTyp);
echo '<input type="text" id="indexSize'.$i.'" name="indexSize'.$i.'" value="" size="10" class="text"';
if (!isset($type[0]) || !in_array($type[0], $mysql_string_types)) echo ' disabled="disabled"';
echo '></td>';
echo '</tr>';
}
$i ++;
}
echo '</table>';
//Speichern Knopf
echo '<br /><input name="setNewPrimaryKeys" type="submit" value="'.$lang['L_PRIMARYKEYS_SAVE'].'" class="Formbutton">';
echo '<br><input name="setNewKeys" type="submit" value="'.$lang['L_SAVE'].'" class="Formbutton">';
echo '</form>';
}
///// DH ende
}
}

Datei anzeigen

@ -21,24 +21,24 @@ if ($tblr == 'Backup')
$button_name='dump_tbl';
//Info aus der Datenbank lesen
MSD_mysql_connect();
$res=mysql_query('SHOW TABLE STATUS FROM `' . $databases['db_actual'] . '`');
$numrows=mysql_num_rows($res);
$res=mysqli_query($GLOBALS["___mysqli_ston"], 'SHOW TABLE STATUS FROM `' . $databases['db_actual'] . '`');
$numrows=mysqli_num_rows($res);
$tbl_zeile='';
for ($i=0; $i < $numrows; $i++)
{
$row=mysql_fetch_array($res,MYSQL_ASSOC);
$row=mysqli_fetch_array($res, MYSQLI_ASSOC);
//v($row);
// Get nr of records -> need to do it this way because of incorrect returns when using InnoDBs
$sql_2="SELECT count(*) as `count_records` FROM `" . $databases['db_actual'] . "`.`" . $row['Name'] . "`";
$res2=@mysql_query($sql_2);
$res2=@mysqli_query($GLOBALS["___mysqli_ston"], $sql_2);
if ($res2 === false)
{
$read_error='(' . mysql_errno() . ') ' . mysql_error();
$read_error='(' . ((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_errno($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_errno()) ? $___mysqli_res : false)) . ') ' . ((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false));
$row['Rows']='<span class="error">' . $lang['L_ERROR'] . ': ' . $read_error . '</span>';
}
else
{
$row2=@mysql_fetch_array($res2);
$row2=@mysqli_fetch_array($res2);
$row['Rows']=$row2['count_records'];
}

Datei anzeigen

@ -1,6 +1,8 @@
<?php
if (!defined('MSD_VERSION')) die('No direct access.');
define('TPL_DEBUG',0); // used if evaluationg of template fails
if (!defined('MSD_VERSION')) {
die('No direct access.');
}
define('TPL_DEBUG', 0); // used if evaluationg of template fails
/***************************************************************************
* template.php
* -------------------
@ -8,7 +10,7 @@ define('TPL_DEBUG',0); // used if evaluationg of template fails
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
* $Id: template.php 1330 2011-01-07 17:51:25Z dsb1971 $
*
*
***************************************************************************/
@ -28,457 +30,438 @@ define('TPL_DEBUG',0); // used if evaluationg of template fails
* and the template file formats are quite similar.
*
*/
class MSDTemplate
{
var $classname="MSDTemplate";
// variable that holds all the data we'll be substituting into
// the compiled templates.
// ...
// This will end up being a multi-dimensional array like this:
// $this->_tpldata[block.][iteration#][child.][iteration#][child2.][iteration#][variablename] == value
// if it's a root-level variable, it'll be like this:
// $this->_tpldata[.][0][varname] == value
var $_tpldata=array();
// Hash of filenames for each template handle.
var $files=array();
// Root template directory.
var $root="";
// this will hash handle names to the compiled code for that handle.
var $compiled_code=array();
// This will hold the uncompiled code for that handle.
var $uncompiled_code=array();
/**
* Constructor. Simply sets the root dir.
*
*/
function MSDTemplate($root=".")
{
$this->set_rootdir($root);
}
/**
* Destroys this template object. Should be called when you're done with it, in order
* to clear out the template data so you can load/parse a new template set.
*/
function destroy()
{
$this->_tpldata=array();
}
/**
* Sets the template root directory for this Template object.
*/
function set_rootdir($dir)
{
if (!is_dir($dir))
{
return false;
}
$this->root=$dir;
return true;
}
/**
* Sets the template filenames for handles. $filename_array
* should be a hash of handle => filename pairs.
*/
function set_filenames($filename_array)
{
if (!is_array($filename_array))
{
return false;
}
reset($filename_array);
while (list ($handle, $filename)=each($filename_array))
{
$this->files[$handle]=$this->make_filename($filename);
}
return true;
}
/**
* Load the file for the handle, compile the file,
* and run the compiled code. This will print out
* the results of executing the template.
*/
function pparse($handle)
{
// Edit DSB: autimatically assign language vars
global $lang;
$this->assign_vars($lang);
if (!$this->loadfile($handle))
{
die("Template->pparse(): Couldn't load template file for handle $handle");
}
// actually compile the template now.
if (!isset($this->compiled_code[$handle]) || empty($this->compiled_code[$handle]))
{
// Actually compile the code now.
$this->compiled_code[$handle]=$this->compile($this->uncompiled_code[$handle]);
}
// Run the compiled code.
if (defined(TPL_DEBUG) && TPL_DEBUG>0) echo '<pre>'.htmlspecialchars($this->compiled_code[$handle]).'</pre>';
eval($this->compiled_code[$handle]);
return true;
}
/**
* Inserts the uncompiled code for $handle as the
* value of $varname in the root-level. This can be used
* to effectively include a template in the middle of another
* template.
* Note that all desired assignments to the variables in $handle should be done
* BEFORE calling this function.
*/
function assign_var_from_handle($varname, $handle)
{
if (!$this->loadfile($handle))
{
die("Template->assign_var_from_handle(): Couldn't load template file for handle $handle");
}
// Compile it, with the "no echo statements" option on.
$_str="";
$code=$this->compile($this->uncompiled_code[$handle],true,'_str');
// evaluate the variable assignment.
eval($code);
// assign the value of the generated variable to the given varname.
$this->assign_var($varname,$_str);
return true;
}
/**
* Block-level variable assignment. Adds a new block iteration with the given
* variable assignments. Note that this should only be called once per block
* iteration.
*/
function assign_block_vars($blockname, $vararray)
{
if (strstr($blockname,'.'))
{
// Nested block.
$blocks=explode('.',$blockname);
$blockcount=sizeof($blocks) - 1;
$str='$this->_tpldata';
for ($i=0; $i < $blockcount; $i++)
{
$str.='[\'' . $blocks[$i] . '.\']';
eval('$lastiteration = sizeof(' . $str . ') - 1;');
$str.='[' . $lastiteration . ']';
}
// Now we add the block that we're actually assigning to.
// We're adding a new iteration to this block with the given
// variable assignments.
$str.='[\'' . $blocks[$blockcount] . '.\'][] = $vararray;';
// Now we evaluate this assignment we've built up.
eval($str);
}
else
{
// Top-level block.
// Add a new iteration to this block with the variable assignments
// we were given.
$this->_tpldata[$blockname . '.'][]=$vararray;
}
return true;
}
/**
* Root-level variable assignment. Adds to current assignments, overriding
* any existing variable assignment with the same name.
*/
function assign_vars($vararray)
{
global $lang;
while (list ($key, $val)=each($vararray))
{
$this->_tpldata['.'][0][$key]=$val;
}
return true;
}
/**
* Root-level variable assignment. Adds to current assignments, overriding
* any existing variable assignment with the same name.
*/
function assign_var($varname, $varval)
{
$this->_tpldata['.'][0][$varname]=$varval;
return true;
}
/**
* Generates a full path+filename for the given filename, which can either
* be an absolute name, or a name relative to the rootdir for this Template
* object.
*/
function make_filename($filename)
{
// Check if it's an absolute or relative path.
/*
if (substr($filename, 0, 1) != '/')
{
$filename = $this->root . '/' . $filename;
}
var $classname = "MSDTemplate";
// variable that holds all the data we'll be substituting into
// the compiled templates.
// ...
// This will end up being a multi-dimensional array like this:
// $this->_tpldata[block.][iteration#][child.][iteration#][child2.][iteration#][variablename] == value
// if it's a root-level variable, it'll be like this:
// $this->_tpldata[.][0][varname] == value
var $_tpldata = array();
// Hash of filenames for each template handle.
var $files = array();
// Root template directory.
var $root = "";
// this will hash handle names to the compiled code for that handle.
var $compiled_code = array();
// This will hold the uncompiled code for that handle.
var $uncompiled_code = array();
/**
* Constructor. Simply sets the root dir.
*
* @param string $root
*/
public function __construct($root = '.')
{
$this->set_rootdir($root);
}
/**
* Destroys this template object. Should be called when you're done with it, in order
* to clear out the template data so you can load/parse a new template set.
*/
public function destroy()
{
$this->_tpldata = array();
}
/**
* Sets the template root directory for this Template object.
*/
public function set_rootdir($dir)
{
if (!is_dir($dir)) {
return false;
}
$this->root = $dir;
return true;
}
/**
* Sets the template filenames for handles. $filename_array
* should be a hash of handle => filename pairs.
*/
public function set_filenames($filename_array)
{
if (!is_array($filename_array)) {
return false;
}
reset($filename_array);
while (list ($handle, $filename) = each($filename_array)) {
$this->files[$handle] = $this->make_filename($filename);
}
return true;
}
/**
* Load the file for the handle, compile the file,
* and run the compiled code. This will print out
* the results of executing the template.
*/
public function pparse($handle)
{
// Edit DSB: automatically assign language vars
global $lang;
$this->assign_vars($lang);
if (!$this->loadfile($handle)) {
die("Template->pparse(): Couldn't load template file for handle $handle");
}
// actually compile the template now.
if (!isset($this->compiled_code[$handle]) || empty($this->compiled_code[$handle])) {
// Actually compile the code now.
$this->compiled_code[$handle] = $this->compile($this->uncompiled_code[$handle]);
}
// Run the compiled code.
if (defined(TPL_DEBUG) && TPL_DEBUG > 0) {
echo '<pre>' . htmlspecialchars($this->compiled_code[$handle]) . '</pre>';
}
eval($this->compiled_code[$handle]);
return true;
}
/**
* Inserts the uncompiled code for $handle as the
* value of $varname in the root-level. This can be used
* to effectively include a template in the middle of another
* template.
* Note that all desired assignments to the variables in $handle should be done
* BEFORE calling this function.
*/
public function assign_var_from_handle($varname, $handle)
{
if (!$this->loadfile($handle)) {
die("Template->assign_var_from_handle(): Couldn't load template file for handle $handle");
}
// Compile it, with the "no echo statements" option on.
$_str = "";
$code = $this->compile($this->uncompiled_code[$handle], true, '_str');
// evaluate the variable assignment.
eval($code);
// assign the value of the generated variable to the given varname.
$this->assign_var($varname, $_str);
return true;
}
/**
* Block-level variable assignment. Adds a new block iteration with the given
* variable assignments. Note that this should only be called once per block
* iteration.
*/
public function assign_block_vars($blockname, $vararray)
{
if (strstr($blockname, '.')) {
// Nested block.
$blocks = explode('.', $blockname);
$blockcount = sizeof($blocks) - 1;
$str = '$this->_tpldata';
for ($i = 0; $i < $blockcount; $i++) {
$str .= '[\'' . $blocks[$i] . '.\']';
eval('$lastiteration = sizeof(' . $str . ') - 1;');
$str .= '[' . $lastiteration . ']';
}
// Now we add the block that we're actually assigning to.
// We're adding a new iteration to this block with the given
// variable assignments.
$str .= '[\'' . $blocks[$blockcount] . '.\'][] = $vararray;';
// Now we evaluate this assignment we've built up.
eval($str);
} else {
// Top-level block.
// Add a new iteration to this block with the variable assignments
// we were given.
$this->_tpldata[$blockname . '.'][] = $vararray;
}
return true;
}
/**
* Root-level variable assignment. Adds to current assignments, overriding
* any existing variable assignment with the same name.
*/
public function assign_vars($vararray)
{
global $lang;
while (list ($key, $val) = each($vararray)) {
$this->_tpldata['.'][0][$key] = $val;
}
return true;
}
/**
* Root-level variable assignment. Adds to current assignments, overriding
* any existing variable assignment with the same name.
*/
public function assign_var($varname, $varval)
{
$this->_tpldata['.'][0][$varname] = $varval;
return true;
}
/**
* Generates a full path+filename for the given filename, which can either
* be an absolute name, or a name relative to the rootdir for this Template
* object.
*/
public function make_filename($filename)
{
// Check if it's an absolute or relative path.
/*
if (substr($filename, 0, 1) != '/')
{
$filename = $this->root . '/' . $filename;
}
*/
if (!file_exists($filename))
{
die("Template->make_filename(): Error - file $filename does not exist");
}
return $filename;
}
/**
* If not already done, load the file for the given handle and populate
* the uncompiled_code[] hash with its code. Do not compile.
*/
function loadfile($handle)
{
// If the file for this handle is already loaded and compiled, do nothing.
if (isset($this->uncompiled_code[$handle]) && !empty($this->uncompiled_code[$handle]))
{
return true;
}
// If we don't have a file assigned to this handle, die.
if (!isset($this->files[$handle]))
{
die("Template->loadfile(): No file specified for handle $handle");
}
$filename=$this->files[$handle];
$str=implode("",@file($filename));
if (empty($str))
{
die("Template->loadfile(): File $filename for handle $handle is empty");
}
$this->uncompiled_code[$handle]=$str;
return true;
}
/**
* Compiles the given string of code, and returns
* the result in a string.
* If "do_not_echo" is true, the returned code will not be directly
* executable, but can be used as part of a variable assignment
* for use in assign_code_from_handle().
*/
function compile($code, $do_not_echo=false, $retvar='')
{
// replace \ with \\ and then ' with \'.
$code=str_replace('\\','\\\\',$code);
$code=str_replace('\'','\\\'',$code);
if (!file_exists($filename)) {
die("Template->make_filename(): Error - file $filename does not exist");
}
// change template varrefs into PHP varrefs
return $filename;
}
// This one will handle varrefs WITH namespaces
$varrefs=array();
preg_match_all('#\{(([a-z0-9\-_]+?\.)+?)([a-z0-9\-_]+?)\}#is',$code,$varrefs);
$varcount=sizeof($varrefs[1]);
for ($i=0; $i < $varcount; $i++)
{
$namespace=$varrefs[1][$i];
$varname=$varrefs[3][$i];
$new=$this->generate_block_varref($namespace,$varname);
$code=str_replace($varrefs[0][$i],$new,$code);
}
// This will handle the remaining root-level varrefs
$code=preg_replace('#\{([a-z0-9\-_]*?)\}#is','\' . ( ( isset($this->_tpldata[\'.\'][0][\'\1\']) ) ? $this->_tpldata[\'.\'][0][\'\1\'] : \'\' ) . \'',$code);
// Break it up into lines.
$code_lines=explode("\n",$code);
$block_nesting_level=0;
$block_names=array();
$block_names[0]=".";
// Second: prepend echo ', append ' . "\n"; to each line.
$line_count=sizeof($code_lines);
for ($i=0; $i < $line_count; $i++)
{
$code_lines[$i]=chop($code_lines[$i]);
if (preg_match('#<!-- BEGIN (.*?) -->#',$code_lines[$i],$m))
{
$n[0]=$m[0];
$n[1]=$m[1];
// Added: dougk_ff7-Keeps templates from bombing if begin is on the same line as end.. I think. :)
if (preg_match('#<!-- END (.*?) -->#',$code_lines[$i],$n))
{
$block_nesting_level++;
$block_names[$block_nesting_level]=$m[1];
if ($block_nesting_level < 2)
{
// Block is not nested.
$code_lines[$i]='$_' . $n[1] . '_count = ( isset($this->_tpldata[\'' . $n[1] . '.\']) ) ? sizeof($this->_tpldata[\'' . $n[1] . '.\']) : 0;';
$code_lines[$i].="\n" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1] . '_count; $_' . $n[1] . '_i++)';
$code_lines[$i].="\n" . '{';
}
else
{
// This block is nested.
/**
* If not already done, load the file for the given handle and populate
* the uncompiled_code[] hash with its code. Do not compile.
*/
public function loadfile($handle)
{
// If the file for this handle is already loaded and compiled, do nothing.
if (isset($this->uncompiled_code[$handle]) && !empty($this->uncompiled_code[$handle])) {
return true;
}
// Generate a namespace string for this block.
$namespace=implode('.',$block_names);
// strip leading period from root level..
$namespace=substr($namespace,2);
// Get a reference to the data array for this block that depends on the
// current indices of all parent blocks.
$varref=$this->generate_block_data_ref($namespace,false);
// Create the for loop code to iterate over this block.
$code_lines[$i]='$_' . $n[1] . '_count = ( isset(' . $varref . ') ) ? sizeof(' . $varref . ') : 0;';
$code_lines[$i].="\n" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1] . '_count; $_' . $n[1] . '_i++)';
$code_lines[$i].="\n" . '{';
}
// We have the end of a block.
unset($block_names[$block_nesting_level]);
$block_nesting_level--;
$code_lines[$i].='} // END ' . $n[1];
$m[0]=$n[0];
$m[1]=$n[1];
}
else
{
// We have the start of a block.
$block_nesting_level++;
$block_names[$block_nesting_level]=$m[1];
if ($block_nesting_level < 2)
{
// Block is not nested.
$code_lines[$i]='$_' . $m[1] . '_count = ( isset($this->_tpldata[\'' . $m[1] . '.\']) ) ? sizeof($this->_tpldata[\'' . $m[1] . '.\']) : 0;';
$code_lines[$i].="\n" . 'for ($_' . $m[1] . '_i = 0; $_' . $m[1] . '_i < $_' . $m[1] . '_count; $_' . $m[1] . '_i++)';
$code_lines[$i].="\n" . '{';
}
else
{
// This block is nested.
// If we don't have a file assigned to this handle, die.
if (!isset($this->files[$handle])) {
die("Template->loadfile(): No file specified for handle $handle");
}
// Generate a namespace string for this block.
$namespace=implode('.',$block_names);
// strip leading period from root level..
$namespace=substr($namespace,2);
// Get a reference to the data array for this block that depends on the
// current indices of all parent blocks.
$varref=$this->generate_block_data_ref($namespace,false);
// Create the for loop code to iterate over this block.
$code_lines[$i]='$_' . $m[1] . '_count = ( isset(' . $varref . ') ) ? sizeof(' . $varref . ') : 0;';
$code_lines[$i].="\n" . 'for ($_' . $m[1] . '_i = 0; $_' . $m[1] . '_i < $_' . $m[1] . '_count; $_' . $m[1] . '_i++)';
$code_lines[$i].="\n" . '{';
}
}
}
else if (preg_match('#<!-- END (.*?) -->#',$code_lines[$i],$m))
{
// We have the end of a block.
unset($block_names[$block_nesting_level]);
$block_nesting_level--;
$code_lines[$i]='} // END ' . $m[1];
}
else
{
// We have an ordinary line of code.
if (!$do_not_echo)
{
$code_lines[$i]='echo \'' . $code_lines[$i] . '\' . "\\n";';
}
else
{
$code_lines[$i]='$' . $retvar . '.= \'' . $code_lines[$i] . '\' . "\\n";';
}
}
}
// Bring it back into a single string of lines of code.
$code=implode("\n",$code_lines);
return $code;
}
/**
* Generates a reference to the given variable inside the given (possibly nested)
* block namespace. This is a string of the form:
* ' . $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['varname'] . '
* It's ready to be inserted into an "echo" line in one of the templates.
* NOTE: expects a trailing "." on the namespace.
*/
function generate_block_varref($namespace, $varname)
{
// Strip the trailing period.
$namespace=substr($namespace,0,strlen($namespace) - 1);
// Get a reference to the data block for this namespace.
$varref=$this->generate_block_data_ref($namespace,true);
// Prepend the necessary code to stick this in an echo line.
$filename = $this->files[$handle];
// Append the variable reference.
$varref.='[\'' . $varname . '\']';
$varref='\' . ( ( isset(' . $varref . ') ) ? ' . $varref . ' : \'\' ) . \'';
return $varref;
}
/**
* Generates a reference to the array of data values for the given
* (possibly nested) block namespace. This is a string of the form:
* $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['$childN']
*
* If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above.
* NOTE: does not expect a trailing "." on the blockname.
*/
function generate_block_data_ref($blockname, $include_last_iterator)
{
// Get an array of the blocks involved.
$blocks=explode(".",$blockname);
$blockcount=sizeof($blocks) - 1;
$varref='$this->_tpldata';
// Build up the string with everything but the last child.
for ($i=0; $i < $blockcount; $i++)
{
$varref.='[\'' . $blocks[$i] . '.\'][$_' . $blocks[$i] . '_i]';
}
// Add the block reference for the last child.
$varref.='[\'' . $blocks[$blockcount] . '.\']';
// Add the iterator for the last child if requried.
if ($include_last_iterator)
{
$varref.='[$_' . $blocks[$blockcount] . '_i]';
}
return $varref;
}
$str = implode("", @file($filename));
if (empty($str)) {
die("Template->loadfile(): File $filename for handle $handle is empty");
}
$this->uncompiled_code[$handle] = $str;
return true;
}
/**
* Compiles the given string of code, and returns
* the result in a string.
* If "do_not_echo" is true, the returned code will not be directly
* executable, but can be used as part of a variable assignment
* for use in assign_code_from_handle().
*/
public function compile($code, $do_not_echo = false, $retvar = '')
{
// replace \ with \\ and then ' with \'.
$code = str_replace('\\', '\\\\', $code);
$code = str_replace('\'', '\\\'', $code);
// change template varrefs into PHP varrefs
// This one will handle varrefs WITH namespaces
$varrefs = array();
preg_match_all('#\{(([a-z0-9\-_]+?\.)+?)([a-z0-9\-_]+?)\}#is', $code, $varrefs);
$varcount = sizeof($varrefs[1]);
for ($i = 0; $i < $varcount; $i++) {
$namespace = $varrefs[1][$i];
$varname = $varrefs[3][$i];
$new = $this->generate_block_varref($namespace, $varname);
$code = str_replace($varrefs[0][$i], $new, $code);
}
// This will handle the remaining root-level varrefs
$code = preg_replace(
'#\{([a-z0-9\-_]*?)\}#is',
'\' . ( ( isset($this->_tpldata[\'.\'][0][\'\1\']) ) ? $this->_tpldata[\'.\'][0][\'\1\'] : \'\' ) . \'',
$code
);
// Break it up into lines.
$code_lines = explode("\n", $code);
$block_nesting_level = 0;
$block_names = array();
$block_names[0] = ".";
// Second: prepend echo ', append ' . "\n"; to each line.
$line_count = sizeof($code_lines);
for ($i = 0; $i < $line_count; $i++) {
$code_lines[$i] = chop($code_lines[$i]);
if (preg_match('#<!-- BEGIN (.*?) -->#', $code_lines[$i], $m)) {
$n[0] = $m[0];
$n[1] = $m[1];
// Added: dougk_ff7-Keeps templates from bombing if begin is on the same line as end.. I think. :)
if (preg_match('#<!-- END (.*?) -->#', $code_lines[$i], $n)) {
$block_nesting_level++;
$block_names[$block_nesting_level] = $m[1];
if ($block_nesting_level < 2) {
// Block is not nested.
$code_lines[$i] = '$_' . $n[1] . '_count = ( isset($this->_tpldata[\'' . $n[1]
. '.\']) ) ? sizeof($this->_tpldata[\'' . $n[1] . '.\']) : 0;';
$code_lines[$i] .= "\n" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1]
. '_count; $_' . $n[1] . '_i++)';
$code_lines[$i] .= "\n" . '{';
} else {
// This block is nested.
// Generate a namespace string for this block.
$namespace = implode('.', $block_names);
// strip leading period from root level..
$namespace = substr($namespace, 2);
// Get a reference to the data array for this block that depends on the
// current indices of all parent blocks.
$varref = $this->generate_block_data_ref($namespace, false);
// Create the for loop code to iterate over this block.
$code_lines[$i] = '$_' . $n[1] . '_count = ( isset(' . $varref . ') ) ? sizeof(' . $varref
. ') : 0;';
$code_lines[$i] .= "\n" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1]
. '_count; $_' . $n[1] . '_i++)';
$code_lines[$i] .= "\n" . '{';
}
// We have the end of a block.
unset($block_names[$block_nesting_level]);
$block_nesting_level--;
$code_lines[$i] .= '} // END ' . $n[1];
$m[0] = $n[0];
$m[1] = $n[1];
} else {
// We have the start of a block.
$block_nesting_level++;
$block_names[$block_nesting_level] = $m[1];
if ($block_nesting_level < 2) {
// Block is not nested.
$code_lines[$i] = '$_' . $m[1] . '_count = ( isset($this->_tpldata[\'' . $m[1]
. '.\']) ) ? sizeof($this->_tpldata[\'' . $m[1] . '.\']) : 0;';
$code_lines[$i] .= "\n" . 'for ($_' . $m[1] . '_i = 0; $_' . $m[1] . '_i < $_' . $m[1]
. '_count; $_' . $m[1] . '_i++)';
$code_lines[$i] .= "\n" . '{';
} else {
// This block is nested.
// Generate a namespace string for this block.
$namespace = implode('.', $block_names);
// strip leading period from root level..
$namespace = substr($namespace, 2);
// Get a reference to the data array for this block that depends on the
// current indices of all parent blocks.
$varref = $this->generate_block_data_ref($namespace, false);
// Create the for loop code to iterate over this block.
$code_lines[$i] = '$_' . $m[1] . '_count = ( isset(' . $varref . ') ) ? sizeof(' . $varref
. ') : 0;';
$code_lines[$i] .= "\n" . 'for ($_' . $m[1] . '_i = 0; $_' . $m[1] . '_i < $_' . $m[1]
. '_count; $_' . $m[1] . '_i++)';
$code_lines[$i] .= "\n" . '{';
}
}
} else {
if (preg_match('#<!-- END (.*?) -->#', $code_lines[$i], $m)) {
// We have the end of a block.
unset($block_names[$block_nesting_level]);
$block_nesting_level--;
$code_lines[$i] = '} // END ' . $m[1];
} else {
// We have an ordinary line of code.
if (!$do_not_echo) {
$code_lines[$i] = 'echo \'' . $code_lines[$i] . '\' . "\\n";';
} else {
$code_lines[$i] = '$' . $retvar . '.= \'' . $code_lines[$i] . '\' . "\\n";';
}
}
}
}
// Bring it back into a single string of lines of code.
$code = implode("\n", $code_lines);
return $code;
}
/**
* Generates a reference to the given variable inside the given (possibly nested)
* block namespace. This is a string of the form:
* ' . $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['varname'] . '
* It's ready to be inserted into an "echo" line in one of the templates.
* NOTE: expects a trailing "." on the namespace.
*/
public function generate_block_varref($namespace, $varname)
{
// Strip the trailing period.
$namespace = substr($namespace, 0, strlen($namespace) - 1);
// Get a reference to the data block for this namespace.
$varref = $this->generate_block_data_ref($namespace, true);
// Prepend the necessary code to stick this in an echo line.
// Append the variable reference.
$varref .= '[\'' . $varname . '\']';
$varref = '\' . ( ( isset(' . $varref . ') ) ? ' . $varref . ' : \'\' ) . \'';
return $varref;
}
/**
* Generates a reference to the array of data values for the given
* (possibly nested) block namespace. This is a string of the form:
* $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['$childN']
*
* If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above.
* NOTE: does not expect a trailing "." on the blockname.
*/
public function generate_block_data_ref($blockname, $include_last_iterator)
{
// Get an array of the blocks involved.
$blocks = explode(".", $blockname);
$blockcount = sizeof($blocks) - 1;
$varref = '$this->_tpldata';
// Build up the string with everything but the last child.
for ($i = 0; $i < $blockcount; $i++) {
$varref .= '[\'' . $blocks[$i] . '.\'][$_' . $blocks[$i] . '_i]';
}
// Add the block reference for the last child.
$varref .= '[\'' . $blocks[$blockcount] . '.\']';
// Add the iterator for the last child if requried.
if ($include_last_iterator) {
$varref .= '[$_' . $blocks[$blockcount] . '_i]';
}
return $varref;
}
}
?>

Datei anzeigen

@ -28,4 +28,4 @@ if (!file_exists("./work/config/mysqldumper.php"))
</frameset>
</html>
<?php
ob_end_flush();
ob_end_flush();

Datei anzeigen

@ -19,6 +19,7 @@ $config['language']=$language;
include ( './language/lang_list.php' );
include ( 'language/' . $language . '/lang_install.php' );
include ( 'language/' . $language . '/lang_main.php' );
include ( 'language/' . $language . '/lang_config_overview.php' );
//Übergabe der Parameter über FORM
if (isset($_POST['dbhost']))
@ -35,7 +36,7 @@ else
// Wenn Connection-String existiert -> Verbindungsdaten aus connstr auslesen
if (isset($connstr) && !empty($connstr))
{
$p=explode("|",$connstr);
$p=explode("|", $connstr);
$dbhost=$config['dbhost']=$p[0];
$dbuser=$config['dbuser']=$p[1];
$dbpass=$config['dbpass']=$p[2];
@ -50,7 +51,7 @@ else
//Variabeln
$phase=( isset($phase) ) ? $phase : 0;
if (isset($_POST['manual_db'])) $manual_db=trim($_POST['manual_db']);
$connstr="$dbhost|$dbuser|$dbpass|$dbport|$dbsocket|$manual_db";
$connstr = "$dbhost|$dbuser|$dbpass|$dbport|$dbsocket|$manual_db";
$connection='';
$delfiles=Array();
@ -135,25 +136,25 @@ echo '<div id="content" align="center"><p class="small"><strong>Version ' . MSD_
switch ($phase)
{
case 0: // Anfang - Sprachauswahl
// da viele ja nicht in die Anleitung schauen -> versuchen die Perldateien automatisch richtig zu chmodden
@chmod('./msd_cron/crondump.pl',0755);
@chmod('./msd_cron/perltest.pl',0755);
@chmod('./msd_cron/simpletest.pl',0755);
echo '<form action="install.php" method="get"><input type="hidden" name="phase" value="1">';
echo '<table class="bdr"><tr class="thead"><th>Language</th><th>Tools</th></tr>';
echo '<tr><td valign="top" width="300"><table>';
echo GetLanguageCombo("radio","radio","language","<tr><td>","</td></tr>");
echo '</table></td><td valign="top">';
foreach ($lang['languages'] as $key)
{
echo ( "\n<div id=\"" . $key . '"><a href="install.php?language=' . $key . '&phase=100">' . $lang['L_TOOLS1'][$key] . '</a><br><br>' );
echo ( "</div>" );
}
echo ( "\n</td></tr><tr><td colspan=\"2\" style=\"padding: 4px\"><input type=\"submit\" name=\"submit\" value=\"Installation\" class=\"Formbutton\"></td></tr></table></form>" );
echo '<script language="JavaScript" type="text/javascript">show_tooldivs("' . $language . '");</script>';
break;
@ -170,7 +171,7 @@ switch ($phase)
{
$tmp=file("config.php");
$stored=0;
if (!isset($_POST['dbconnect']))
{
// Erstaufruf - Daten aus config.php auslesen
@ -214,10 +215,10 @@ switch ($phase)
if ($stored == 6) break;
}
}
if (!isset($config['dbport'])) $config['dbport']="";
if (!isset($config['dbsocket'])) $config['dbsocket']="";
echo '<form action="install.php?language=' . $language . '&phase=' . $phase . '" method="post">';
echo '<table class="bdr" style="width:700px;">';
echo '<tr><td>' . $lang['L_DB_HOST'] . ':</td><td><input type="text" name="dbhost" value="' . $dbhost . '" size="60" maxlength="100"></td></tr>';
@ -227,35 +228,41 @@ switch ($phase)
echo '<tr><td>';
echo $lang['L_PORT'] . ':</td><td><input type="text" name="dbport" value="' . $dbport . '" size="5" maxlength="5">&nbsp;&nbsp;' . $lang['L_INSTALL_HELP_PORT'] . '</td></tr>';
echo '<tr><td>' . $lang['L_SOCKET'] . ':</td><td><input type="text" name="dbsocket" value="' . $dbsocket . '" size="30" maxlength="255">&nbsp;&nbsp;' . $lang['L_INSTALL_HELP_SOCKET'] . '</td></tr>';
echo '<tr><td>' . $lang['L_TESTCONNECTION'] . ':</td><td><input type="submit" name="dbconnect" value="' . $lang['L_CONNECTTOMYSQL'] . '" class="Formbutton"></td></tr>';
if (isset($_POST['dbconnect']))
{
echo '<tr class="thead"><th colspan="2">' . $lang['L_DBCONNECTION'] . '</th></tr>';
echo '<tr><td colspan="2">';
$connection=MSD_mysql_connect();
if ($connection === false)
{
echo '<p class="error">' . $lang['L_CONNECTIONERROR'] . '</p><span>&nbsp;';
}
else
{
$databases = array();
echo '<p class="success">' . $lang['L_CONNECTION_OK'] . '</p><span class="ssmall">';
$connection="ok";
$connstr="$dbhost|$dbuser|$dbpass|$dbport|$dbsocket|$manual_db";
echo '<input type="hidden" name="connstr" value="' . $connstr . '">';
if ($manual_db > '') SearchDatabases(1,$manual_db);
else SearchDatabases(1);
if (!isset($databases['Name']) || !in_array($manual_db, $databases['Name'])) {
// conect to manual db was not successful
$connstr = substr($connstr,0, strlen($connstr)-strlen($manual_db));
$manual_db = '';
}
}
echo '</span></td></tr>';
}
echo '</table></form><br>';
if ($connection == "ok")
{
if (!isset($databases['Name'][0])) echo '<br>' . $lang['L_NO_DB_FOUND_INFO'];
echo '<form action="install.php?language=' . $language . '&phase=' . ( $phase + 1 ) . '" method="post">';
echo '<input type="hidden" name="dbhost" value="' . $config['dbhost'] . '">
<input type="hidden" name="dbuser" value="' . $config['dbuser'] . '">
@ -268,14 +275,13 @@ switch ($phase)
}
}
break;
case 2: //
echo '<h6>MySQLDumper - ' . $lang['L_CONFBASIC'] . '</h6>';
$tmp=@file("config.php");
$stored=0;
for ($i=0; $i < count($tmp); $i++)
{
if (substr($tmp[$i],0,17) == '$config[\'dbhost\']')
{
$tmp[$i]='$config[\'dbhost\'] = \'' . $dbhost . '\';' . "\n";
@ -301,7 +307,7 @@ switch ($phase)
$tmp[$i]='$config[\'dbpass\'] = \'' . $dbpass . '\';' . "\n";
$stored++;
}
if ($stored == 6) break;
}
$ret=true;
@ -330,30 +336,10 @@ switch ($phase)
echo 'document.forms["continue"].submit();';
echo '</script>';
}
break;
case 3: //
if (ini_get('safe_mode') == 1) $nextphase=10;
else $nextphase=$phase + 1;
echo '<h6>' . $lang['L_EDITCONF'] . '</h6>';
echo '<form action="install.php?language=' . $language . '&phase=' . $nextphase . '" method="post">
<textarea name="configfile" rows="20" cols="10" style="width:80%;height:300px;">';
$f=file("config.php");
for ($i=0; $i < count($f); $i++)
{
echo stripslashes($f[$i]);
}
echo '</textarea><br><input class="Formbutton" type="reset" name="reset" value="' . $lang['L_RESET'] . '">&nbsp;&nbsp;
<input class="Formbutton" type="submit" name="submit" value="' . $lang['L_SAVE'] . '">&nbsp;&nbsp;
<input class="Formbutton" type="submit" name="nosave" value="' . $lang['L_OSWEITER'] . '">';
echo '<input type="hidden" name="connstr" value="' . $connstr . '">';
echo '</form>';
break;
case 4: //Verzeichnisse
break;
case 4: //Verzeichnisse
if (isset($_POST['submit']))
{
$ret=true;
@ -364,21 +350,20 @@ switch ($phase)
}
else
$ret=false;
if ($ret == false)
{
echo '<br><strong>' . $lang['L_ERRORMAN'] . ' config.php ' . $lang['L_MANUELL'] . '.';
die();
}
}
echo '<h6>' . $lang['L_CREATEDIRS'] . '</h6>';
$check_dirs=ARRAY(
"work/",
"work/config/",
"work/log/",
"work/",
"work/config/",
"work/log/",
"work/backup/"
);
$msg='';
@ -387,14 +372,14 @@ switch ($phase)
$success=SetFileRechte($d,1,0777);
if ($success != 1) $msg.=$success . '<br>';
}
if ($msg > '') echo '<b>' . $msg . '</b>';
$iw[0]=IsWritable("work");
$iw[1]=IsWritable("work/config");
$iw[2]=IsWritable("work/log");
$iw[3]=IsWritable("work/backup");
/*
// save manual_db
if ($manual_db > '')
{
@ -407,14 +392,14 @@ switch ($phase)
@chmod('./' . $config['files']['dbs_manual'],0777);
}
}
*/
if ($iw[0] && $iw[1] && $iw[2] && $iw[3])
{
echo '<script language="javascript">';
echo 'self.location.href=\'install.php?language=' . $language . '&phase=5&connstr=' . $connstr . '\'';
echo '</script>';
}
echo '<form action="install.php?language=' . $language . '&phase=4" method="post"><table class="bdr"><tr class="thead">';
echo '<th>' . $lang['L_DIR'] . '</th><th>' . $lang['L_RECHTE'] . '</th><th>' . $lang['L_STATUS'] . '</th></tr>';
echo '<tr><td><strong>work</strong></td><td>' . Rechte("work") . '</td><td>' . ( ( $iw[0] ) ? $img_ok : $img_failed ) . '</td></tr>';
@ -427,16 +412,16 @@ switch ($phase)
break;
case 5:
echo '<h6>' . $lang['L_LASTSTEP'] . '</h6>';
echo '<br><h4>' . $lang['L_INSTALLFINISHED'] . '</h4>';
SetDefault(1);
include ( "language/" . $language . "/lang_install.php" );
// direkt zum Start des Dumeprs
echo '<script language="javascript">self.location.href=\'index.php\';</script>';
break;
case 9:
clearstatcache();
$iw[0]=IsWritable("work");
$iw[1]=IsWritable("work/config");
@ -444,16 +429,16 @@ switch ($phase)
$iw[3]=IsWritable("work/backup");
echo '<h6>' . $lang['L_FTPMODE'] . '</h6>';
echo '<p align="left" style="padding-left:100px; padding-right:100px;">' . $lang['L_SAFEMODEDESC'] . '</p>';
echo '<form action="install.php?language=' . $language . '&phase=9" method="post"><input type="hidden" name="connstr" value="' . $connstr . '"><table>';
echo '<tr><td class="hd2" colspan="2">' . $lang['L_IDOMANUAL'] . '</td></tr>';
echo '<tr><td colspan="2">' . $lang['L_DOFROM'] . '<br><div class="small">' . Realpfad('./') . '</div></td></tr>';
echo '<tr><td colspan="2">' . $lang['L_DOFROM'] . '<br><div class="small">' . basePath() . '</div></td></tr>';
echo '<tr><td><strong>work</strong></td><td>' . ( ( $iw[0] ) ? $img_ok : $img_failed ) . '</td></tr>';
echo '<tr><td><strong>work/config</strong></td><td>' . ( ( $iw[1] ) ? $img_ok : $img_failed ) . '</td></tr>';
echo '<tr><td><strong>work/log</strong></td><td>' . ( ( $iw[2] ) ? $img_ok : $img_failed ) . '</td></tr>';
echo '<tr><td><strong>work/backup</strong></td><td>' . ( ( $iw[3] ) ? $img_ok : $img_failed ) . '</td></tr>';
echo '<tr><td colspan="3" align="right"><input type="submit" class="Formbutton" name="dir_check" value=" ' . $lang['L_CHECK_DIRS'] . ' "></td></tr>';
// Wenn Verzeichnisse erstellt wurden - direkt weitermachen
if ($iw[0] && $iw[1] && $iw[2] && $iw[3])
{
@ -462,7 +447,7 @@ switch ($phase)
echo '</script>';
}
echo '</table>';
break;
case 10: //safe_mode FTP
$config['ftp_useSSL']=0;
@ -474,11 +459,11 @@ switch ($phase)
if (!isset($install_ftp_port) || $install_ftp_port < 1) $install_ftp_port=21;
echo '<h6>' . $lang['L_FTPMODE'] . '</h6>';
echo '<p align="left" style="padding-left:100px; padding-right:100px;">' . $lang['L_SAFEMODEDESC'] . '</p>';
echo '<form action="install.php?language=' . $language . '&phase=10" method="post"><input type="hidden" name="connstr" value="' . $connstr . '">
<table width="80%"><tr><td width="50%" valign="top"><table>';
echo '<tr><td class="hd2" colspan="2">' . $lang['L_IDOMANUAL'] . '</td></tr>';
echo '<tr><td colspan="2">' . $lang['L_DOFROM'] . '<br><div class="small">' . Realpfad('./') . '</div></td></tr>';
echo '<tr><td colspan="2">' . $lang['L_DOFROM'] . '<br><div class="small">' . basePath() . '</div></td></tr>';
echo '<tr><td><strong>work</strong></td><td>' . ( ( $iw[0] ) ? $img_ok : $img_failed ) . '</td></tr>';
echo '<tr><td><strong>work/config</strong></td><td>' . ( ( $iw[1] ) ? $img_ok : $img_failed ) . '</td></tr>';
echo '<tr><td><strong>work/log</strong></td><td>' . ( ( $iw[2] ) ? $img_ok : $img_failed ) . '</td></tr>';
@ -514,13 +499,13 @@ switch ($phase)
echo '</td></tr></table>';
}
//echo '</td></tr>';
//echo '</table>';
break;
case 11: //FTP-Create Dirs
echo '<h6>' . $lang['L_FTPMODE'] . '</h6>';
if (CreateDirsFTP() == 1)
@ -547,14 +532,14 @@ switch ($phase)
{
// das Verzeichnis wurde korrekt gelöscht
echo '<p>' . $lang['L_UI6'] . '</p>';
echo $lang['L_UI7'] . "<br>\"" . Realpfad("./") . "\"<br> " . $lang['L_MANUELL'] . ".<br><br>";
echo $lang['L_UI7'] . "<br>\"" . basePath() . "\"<br> " . $lang['L_MANUELL'] . ".<br><br>";
echo '<a href="../">' . $lang['L_UI8'] . '</a>';
}
else
{
echo '<p class="Warnung">' . $lang['L_UI9'] . '"' . $paths[count($paths) - 1] . '"';
}
break;
}
@ -592,7 +577,7 @@ function rec_rmdir($path)
{
return -2;
}
// gehe durch das Verzeichnis
while ($entry=@readdir($dir))
{
@ -644,19 +629,19 @@ function rec_rmdir($path)
return -3; // tut mir schrecklich leid...
}
}
// schliesse nun das Verzeichnis
@closedir($dir);
// versuche nun, das Verzeichnis zu loeschen
$res=@rmdir($path);
// gab's einen Fehler?
if (!$res)
{
return -2; // melde ihn
}
// alles ok
return 0;
}

Datei anzeigen

@ -1,55 +1,55 @@
var NS=(document.layers);var IE=(document.all);function obj_enable(objid)
{var e=document.getElementById(objid);e.disabled=false;}
function obj_disable(objid)
{var e=document.getElementById(objid);e.disabled=true;}
function setactiveMenuFromContent()
{var a=parent.MySQL_Dumper_content.location.href;var menuid=1;if(a.indexOf("config_overview.php")!=-1)menuid=2;if(a.indexOf("filemanagement.php")!=-1)
{if(a.indexOf("action=dump")!=-1)menuid=3;if(a.indexOf("action=restore")!=-1)menuid=4;if(a.indexOf("action=files")!=-1)menuid=5;}
if(a.indexOf("sql.php")!=-1)menuid=6;if(a.indexOf("log.php")!=-1)menuid=7;if(a.indexOf("help.php")!=-1)menuid=8;setMenuActive('m'+menuid);}
function setMenuActive(id){for(var i=1;i<=10;i++){var objid='m'+i;if(id==objid)
{parent.frames[0].document.getElementById(objid).className='active';}
else
{if(parent.frames[0].document.getElementById(objid))parent.frames[0].document.getElementById(objid).className='';}}}
function GetSelectedFilename()
{var a="";var obj=document.getElementsByName("file[]");var anz=0;if(!obj.length)
{if(obj.checked){a+=obj.value;}}
else
{for(i=0;i<obj.length;i++)
{if(obj[i].checked){a+="\n"+obj[i].value;anz++;}}}
return a;}
function Check(i,k)
{var anz=0;var s="";var smp;var ids=document.getElementsByName("file[]");var mp=document.getElementsByName("multipart[]");for(var j=0;j<ids.length;j++){if(ids[j].checked)
{s=ids[j].value;smp=(mp[j].value==0)?"":" (Multipart: "+mp[j].value+" files)";anz++;if(k==0)break;}}
if(anz==0){WP("","gd");}else if(anz==1){WP(s+smp,"gd");}else{WP("> 1","gd");}}
function SelectMD(v,anz)
{for(i=0;i<anz;i++){n="db_multidump_"+i;obj=document.getElementsByName(n)[0];if(obj){obj.checked=v;}}}
function Sel(v)
{var a=document.frm_tbl;if(!a.chk_tbl.length)
{a.chk_tbl.checked=v;}else{for(i=0;i<a.chk_tbl.length;i++){a.chk_tbl[i].checked=v;}}}
function ConfDBSel(v,adb)
{for(i=0;i<adb;i++){var a=document.getElementsByName("db_multidump["+i+"]");if(a)a.checked=v;}}
function chkFormular()
{var a=document.frm_tbl;a.tbl_array.value="";if(!a.chk_tbl.length)
{if(a.chk_tbl.checked==true)
a.tbl_array.value+=a.chk_tbl.value+"|";}else{for(i=0;i<a.chk_tbl.length;i++){if(a.chk_tbl[i].checked==true)
a.tbl_array.value+=a.chk_tbl[i].value+"|";}}
if(a.tbl_array.value==""){alert("Choose tables!");return false;}else{return true;}}
function insertHTA(s,tb)
{if(s==1)ins="AddHandler php-fastcgi .php .php4\nAddhandler cgi-script .cgi .pl\nOptions +ExecCGI";if(s==101)ins="DirectoryIndex /cgi-bin/script.pl"
if(s==102)ins="AddHandler cgi-script .extension";if(s==103)ins="Options +ExecCGI";if(s==104)ins="Options +Indexes";if(s==105)ins="ErrorDocument 400 /errordocument.html";if(s==106)ins="# (macht aus http://domain.de/xyz.html ein\n# http://domain.de/main.php?xyz)\nRewriteEngine on\nRewriteBase /\nRewriteRule ^([a-z]+)\.html$ /main.php?$1 [R,L]";if(s==107)ins="Deny from IPADRESS\nAllow from IPADRESS";if(s==108)ins="Redirect /service http://foo2.bar.com/service";if(s==109)ins="ErrorLog /path/logfile"
tb.value+="\n"+ins;}
function WP(s,obj){document.getElementById(obj).innerHTML=s;}
function resizeSQL(i){var obj=document.getElementById("sqltextarea");var h=0;if(i==0){obj.style.height='4px';}else{if(i==1)h=-20;if(i==2)h=20;var oh=obj.style.height;var s=Number(oh.substring(0,oh.length-2))+h;if(s<24)s=24;obj.style.height=s+'px';}}
function getObj(element,docname){if(document.layers){docname=(docname)?docname:self;if(f.document.layers[element]){return f.document.layers[element];}
for(W=0;i<f.document.layers.length;W++){return(getElement(element,fdocument.layers[W]));}}
if(document.all){return document.all[element];}
return document.getElementById(element);}
function InsertLib(i){var obj=document.getElementsByName('sqllib')[0];if(obj.selectedIndex>0){document.getElementById('sqlstring'+i).value=obj.options[obj.selectedIndex].value;document.getElementById('sqlname'+i).value=obj.options[obj.selectedIndex].text;}}
function DisplayExport(s){document.getElementById("export_working").InnerHTML=s;}
function SelectedTableCount(){var obj=document.getElementsByName('f_export_tables[]')[0];var anz=0;for(var i=0;i<obj.options.length;i++)
{if(obj.options[i].selected){anz++;}}
return anz;}
function SelectTableList(s){var obj=document.getElementsByName('f_export_tables[]')[0];for(var i=0;i<obj.options.length;i++){obj.options[i].selected=s;}}
function hide_csvdivs(i){document.getElementById("csv0").style.display='none';if(i==0){document.getElementById("csv1").style.display='none';document.getElementById("csv4").style.display='none';document.getElementById("csv5").style.display='none';}}
function check_csvdivs(i){hide_csvdivs(i);if(document.getElementById("radio_csv0").checked){document.getElementById("csv0").style.display='block';}
var NS=(document.layers);var IE=(document.all);function obj_enable(objid)
{var e=document.getElementById(objid);e.disabled=false;}
function obj_disable(objid)
{var e=document.getElementById(objid);e.disabled=true;}
function setactiveMenuFromContent()
{var a=parent.MySQL_Dumper_content.location.href;var menuid=1;if(a.indexOf("config_overview.php")!=-1)menuid=2;if(a.indexOf("filemanagement.php")!=-1)
{if(a.indexOf("action=dump")!=-1)menuid=3;if(a.indexOf("action=restore")!=-1)menuid=4;if(a.indexOf("action=files")!=-1)menuid=5;}
if(a.indexOf("sql.php")!=-1)menuid=6;if(a.indexOf("log.php")!=-1)menuid=7;if(a.indexOf("help.php")!=-1)menuid=8;setMenuActive('m'+menuid);}
function setMenuActive(id){for(var i=1;i<=10;i++){var objid='m'+i;if(id==objid)
{parent.frames[0].document.getElementById(objid).className='active';}
else
{if(parent.frames[0].document.getElementById(objid))parent.frames[0].document.getElementById(objid).className='';}}}
function GetSelectedFilename()
{var a="";var obj=document.getElementsByName("file[]");var anz=0;if(!obj.length)
{if(obj.checked){a+=obj.value;}}
else
{for(i=0;i<obj.length;i++)
{if(obj[i].checked){a+="\n"+obj[i].value;anz++;}}}
return a;}
function Check(i,k)
{var anz=0;var s="";var smp;var ids=document.getElementsByName("file[]");var mp=document.getElementsByName("multipart[]");for(var j=0;j<ids.length;j++){if(ids[j].checked)
{s=ids[j].value;smp=(mp[j].value==0)?"":" (Multipart: "+mp[j].value+" files)";anz++;if(k==0)break;}}
if(anz==0){WP("","gd");}else if(anz==1){WP(s+smp,"gd");}else{WP("> 1","gd");}}
function SelectMD(v,anz)
{for(i=0;i<anz;i++){n="db_multidump_"+i;obj=document.getElementsByName(n)[0];if(obj&&!obj.disabled){obj.checked=v;}}}
function Sel(v)
{var a=document.frm_tbl;if(!a.chk_tbl.length)
{a.chk_tbl.checked=v;}else{for(i=0;i<a.chk_tbl.length;i++){a.chk_tbl[i].checked=v;}}}
function ConfDBSel(v,adb)
{for(i=0;i<adb;i++){var a=document.getElementsByName("db_multidump["+i+"]");if(a)a.checked=v;}}
function chkFormular()
{var a=document.frm_tbl;a.tbl_array.value="";if(!a.chk_tbl.length)
{if(a.chk_tbl.checked==true)
a.tbl_array.value+=a.chk_tbl.value+"|";}else{for(i=0;i<a.chk_tbl.length;i++){if(a.chk_tbl[i].checked==true)
a.tbl_array.value+=a.chk_tbl[i].value+"|";}}
if(a.tbl_array.value==""){alert("Choose tables!");return false;}else{return true;}}
function insertHTA(s,tb)
{if(s==1)ins="AddHandler php-fastcgi .php .php4\nAddhandler cgi-script .cgi .pl\nOptions +ExecCGI";if(s==101)ins="DirectoryIndex /cgi-bin/script.pl"
if(s==102)ins="AddHandler cgi-script .extension";if(s==103)ins="Options +ExecCGI";if(s==104)ins="Options +Indexes";if(s==105)ins="ErrorDocument 400 /errordocument.html";if(s==106)ins="# (macht aus http://domain.de/xyz.html ein\n# http://domain.de/main.php?xyz)\nRewriteEngine on\nRewriteBase /\nRewriteRule ^([a-z]+)\.html$ /main.php?$1 [R,L]";if(s==107)ins="Deny from IPADRESS\nAllow from IPADRESS";if(s==108)ins="Redirect /service http://foo2.bar.com/service";if(s==109)ins="ErrorLog /path/logfile"
tb.value+="\n"+ins;}
function WP(s,obj){document.getElementById(obj).innerHTML=s;}
function resizeSQL(i){var obj=document.getElementById("sqltextarea");var h=0;if(i==0){obj.style.height='4px';}else{if(i==1)h=-20;if(i==2)h=20;var oh=obj.style.height;var s=Number(oh.substring(0,oh.length-2))+h;if(s<24)s=24;obj.style.height=s+'px';}}
function getObj(element,docname){if(document.layers){docname=(docname)?docname:self;if(f.document.layers[element]){return f.document.layers[element];}
for(W=0;i<f.document.layers.length;W++){return(getElement(element,fdocument.layers[W]));}}
if(document.all){return document.all[element];}
return document.getElementById(element);}
function InsertLib(i){var obj=document.getElementsByName('sqllib')[0];if(obj.selectedIndex>0){document.getElementById('sqlstring'+i).value=obj.options[obj.selectedIndex].value;document.getElementById('sqlname'+i).value=obj.options[obj.selectedIndex].text;}}
function DisplayExport(s){document.getElementById("export_working").InnerHTML=s;}
function SelectedTableCount(){var obj=document.getElementsByName('f_export_tables[]')[0];var anz=0;for(var i=0;i<obj.options.length;i++)
{if(obj.options[i].selected){anz++;}}
return anz;}
function SelectTableList(s){var obj=document.getElementsByName('f_export_tables[]')[0];for(var i=0;i<obj.options.length;i++){obj.options[i].selected=s;}}
function hide_csvdivs(i){document.getElementById("csv0").style.display='none';if(i==0){document.getElementById("csv1").style.display='none';document.getElementById("csv4").style.display='none';document.getElementById("csv5").style.display='none';}}
function check_csvdivs(i){hide_csvdivs(i);if(document.getElementById("radio_csv0").checked){document.getElementById("csv0").style.display='block';}
if(i==0){if(document.getElementById("radio_csv1").checked){document.getElementById("csv1").style.display='block';}else if(document.getElementById("radio_csv2").checked){document.getElementById("csv1").style.display='block';}else if(document.getElementById("radio_csv4").checked){document.getElementById("csv4").style.display='block';}else if(document.getElementById("radio_csv5").checked){document.getElementById("csv5").style.display='block';}}}

Datei anzeigen

@ -92,10 +92,7 @@ $lang['L_CREATE_DATABASE']="انشاء قاعدة بيانات جديده";
$lang['L_EXPORTFINISHED']="الصيغة النهائية.";
$lang['L_SQL_BROWSER']="SQL-استعرض";
$lang['L_SERVER']="الخادم";
$lang['L_MYSQL_CONNECTION_ENCODING']="معيار الترميز القياسي في MySQL-Server
";
$lang['L_MYSQL_CONNECTION_ENCODING']="معيار الترميز القياسي في MySQL-Server";
$lang['L_TITLE_SHOW_DATA']="Show data";
$lang['L_PRIMARYKEY_CONFIRMDELETE']="Really delete primary key?";
$lang['L_SETPRIMARYKEYSFOR']="Set new primary keys for table";
@ -108,6 +105,8 @@ $lang['L_BACKUPS']="النسخ الاحتياطي";
$lang['L_MINUTES']="Minutes";
$lang['L_PAGE_REFRESHS']="Page refreshs";
$lang['L_MINUTE']="Minute";
$lang['L_SETKEYSFOR']="Set new indexes for table";
$lang['L_KEY_CONFIRMDELETE']="Really delete index?";
?>

Datei anzeigen

@ -104,10 +104,7 @@ $lang['L_CREATE_CONFIGFILE']="انشاء تهيئة جديده للملف";
$lang['L_ERROR_LOADING_CONFIGFILE']="لا يستطيع تحميل ملف التهيئة \"%s\".";
$lang['L_BACKUP_DBS_PHP']="قواعدة البيانات الى النسخ الاحتياطي (PHP)";
$lang['L_BACKUP_DBS_PERL']="قواعد البيانات الى النسخ الاحتياطي (PERL)";
$lang['L_CRON_COMMENT']="ادخل تعليقا
";
$lang['L_CRON_COMMENT']="ادخل تعليقا";
$lang['L_AUTODETECT']="auto detect";

Datei anzeigen

@ -76,6 +76,5 @@ $lang['L_CHOOSE_CHARSET']="MySQLDumper لا يمكن الكشف عن الترم
<br>اذا واجهت اي مشكلة مع بعض الاحرف في الاستعادة يمكنك تكرار عملية النسخ الاحتياطي واختيار مجموعة اخرى.
<br>حظا موفقا. ;)";
$lang['L_DOWNLOAD_FILE']="Download file";
$lang['L_BACKUP_NOT_POSSIBLE'] = "A backup of the system database `%s` is not possible!";
?>

Datei anzeigen

@ -60,7 +60,7 @@ $lang['L_WRONG_RIGHTS']="الملف او الدليل '%s' لايمكن الكت
الحقوق (chmod)ليست المجموعة او ان المكلية غير صحيحة.<br>
استخدم برامج بروتكول FTP-لنقل ملفاتك.<br>
الملف او الدليل من الضروري ان يستعدا %s.<br>";
$lang['L_CANT_CREATE_DIR']="Couldn' لا يستطيع انشاء '%s'.
$lang['L_CANT_CREATE_DIR']="Couldn' لا يستطيع انشاء '%s'.
من فضلك استخدم برامج برتكول FTP-لنقل الملفات.
@ -75,6 +75,7 @@ $lang['L_PHP_VERSION']="PHP-Version";
$lang['L_MAX_EXECUTION_TIME']="Max execution time";
$lang['L_PHP_EXTENSIONS']="PHP-Extensions";
$lang['L_MEMORY']="Memory";
$lang['L_FILE_MISSING']="لا يستطيع ايجاد الملف";
?>

Datei anzeigen

@ -186,6 +186,12 @@ $lang['L_ENGINE']="Engine";
$lang['L_USERNAME']="Username";
$lang['L_PASSWORD']="Password";
$lang['L_PASSWORD_REPEAT']="Password (repeat)";
$lang['L_INFO_SIZE']="الحجم";
$lang['L_TABLE_TYPE']="Type";
$lang['L_KEY_DELETED']="Index deleted";
$lang['L_KEY_DELETEERROR']="Error deleting index";
$lang['L_KEY_ADDED']="Index added";
$lang['L_KEY_ADDERROR']="Error adding index";
?>

Datei anzeigen

@ -105,6 +105,8 @@ $lang['L_BACKUPS']="Backups";
$lang['L_MINUTES']="Minutes";
$lang['L_PAGE_REFRESHS']="Page refreshs";
$lang['L_MINUTE']="Minute";
$lang['L_SETKEYSFOR']="Set new indexes for table";
$lang['L_KEY_CONFIRMDELETE']="Really delete index?";
?>

Datei anzeigen

@ -71,6 +71,5 @@ $lang['L_ENCODING']="Kodierig";
$lang['L_FM_CHOOSE_ENCODING']="Kodierig vo de Backupdatei wähle";
$lang['L_CHOOSE_CHARSET']="Leider hät nöd chöne automatich ermittlet mit welem Zeichesatz diä Backupdatei sinerziit aagleit worde isch.<br> Sie müend diä Kodierig, i dere Zeichechette i dere Datei sind, vo Hand aagäh.<br>Dänn stellt MySQLDumper diä Verbindigskännig zum MySQL-Server uf de usgwählti Zeichesatz und fangt mit de Reschtaurierig vo de Date a.>br>Sötted Si nach de Reschtaurierig Problem mit Sonderzeiche ha, chönd Si probiere, das Backup mit ere andere Zeichesatzuswahl z reschtauriere.<br> Vill Glück. ;)";
$lang['L_DOWNLOAD_FILE']="Download file";
$lang['L_BACKUP_NOT_POSSIBLE'] = "A backup of the system database `%s` is not possible!";
?>

Datei anzeigen

@ -68,6 +68,7 @@ $lang['L_PHP_VERSION']="PHP-Version";
$lang['L_MAX_EXECUTION_TIME']="Max execution time";
$lang['L_PHP_EXTENSIONS']="PHP-Extensions";
$lang['L_MEMORY']="Memory";
$lang['L_FILE_MISSING']="Han diä Datei nöd gfunde";
?>

Datei anzeigen

@ -180,6 +180,12 @@ $lang['L_ENGINE']="Engine";
$lang['L_USERNAME']="Username";
$lang['L_PASSWORD']="Password";
$lang['L_PASSWORD_REPEAT']="Password (repeat)";
$lang['L_INFO_SIZE']="Grössi";
$lang['L_TABLE_TYPE']="Type";
$lang['L_KEY_DELETED']="Index deleted";
$lang['L_KEY_DELETEERROR']="Error deleting index";
$lang['L_KEY_ADDED']="Index added";
$lang['L_KEY_ADDERROR']="Error adding index";
?>

Datei anzeigen

@ -105,6 +105,8 @@ $lang['L_BACKUPS']="Backups";
$lang['L_MINUTES']="Minutes";
$lang['L_PAGE_REFRESHS']="Page refreshs";
$lang['L_MINUTE']="Minute";
$lang['L_SETKEYSFOR']="Set new indexes for table";
$lang['L_KEY_CONFIRMDELETE']="Really delete index?";
?>

Datei anzeigen

@ -67,19 +67,13 @@ $lang['L_CONVERT_FINISHED']="Konvertering afsluttet, '%s' blev skrevet korrekt."
$lang['L_NO_MSD_BACKUPFILE']="Backups af andre scripts";
$lang['L_MAX_UPLOAD_SIZE']="Maksimal filstørrelse";
$lang['L_MAX_UPLOAD_SIZE_INFO']="Hvis din Dumpfil er større end den ovennævnte grænse, skal du uploade den via FTP til folderen \"work/backup\".
Derefter kan du vælge den og begynde genetableringsprocessen.
";
Derefter kan du vælge den og begynde genetableringsprocessen.";
$lang['L_ENCODING']="encoding";
$lang['L_FM_CHOOSE_ENCODING']="Choose encoding of backup file";
$lang['L_CHOOSE_CHARSET']="MySQLDumper couldn't detect the encoding of the backup file automatically.
<br>You must choose the charset with which this backup was saved.
<br>If you discover any problems with some characters after restoring, you can repeat the backup-progress and then choose another character set.
<br>Good luck. ;)
";
<br>Good luck. ;)";
$lang['L_DOWNLOAD_FILE']="Download file";
$lang['L_BACKUP_NOT_POSSIBLE'] = "A backup of the system database `%s` is not possible!";
?>

Datei anzeigen

@ -71,6 +71,7 @@ $lang['L_PHP_VERSION']="PHP-Version";
$lang['L_MAX_EXECUTION_TIME']="Max execution time";
$lang['L_PHP_EXTENSIONS']="PHP-Extensions";
$lang['L_MEMORY']="Memory";
$lang['L_FILE_MISSING']="kunne ikke finde fil";
?>

Datei anzeigen

@ -180,6 +180,12 @@ $lang['L_ENGINE']="Engine";
$lang['L_USERNAME']="Username";
$lang['L_PASSWORD']="Password";
$lang['L_PASSWORD_REPEAT']="Password (repeat)";
$lang['L_INFO_SIZE']="Størrelse";
$lang['L_TABLE_TYPE']="Type";
$lang['L_KEY_DELETED']="Index deleted";
$lang['L_KEY_DELETEERROR']="Error deleting index";
$lang['L_KEY_ADDED']="Index added";
$lang['L_KEY_ADDERROR']="Error adding index";
?>

Datei anzeigen

@ -52,7 +52,7 @@ $lang['L_MAX_BACKUP_FILES_EACH2']="für jede Datenbank";
$lang['L_SAVING_DB_FORM']="Datenbank";
$lang['L_TESTCONNECTION']="Verbindung testen";
$lang['L_BACK_TO_MINISQL']="Datenbank bearbeiten";
$lang['L_CREATE']="anlegen";
$lang['L_CREATE']="Anlegen";
$lang['L_VARIABELN']="Variablen";
$lang['L_STATUSINFORMATIONEN']="Statusinformationen";
$lang['L_VERSIONSINFORMATIONEN']="Versionsinformationen";
@ -61,7 +61,7 @@ $lang['L_BACKUPFILESANZAHL']="Im Backup-Verzeichnis befinden sich";
$lang['L_LASTBACKUP']="Letztes Backup";
$lang['L_NOTAVAIL']="<em>nicht verfügbar</em>";
$lang['L_VOM']="vom";
$lang['L_MYSQLVARS']="MySQL-Variabeln";
$lang['L_MYSQLVARS']="MySQL-Variablen";
$lang['L_MYSQLSYS']="MySQL-Befehle";
$lang['L_STATUS']="Status";
$lang['L_PROZESSE']="Prozesse";
@ -105,6 +105,8 @@ $lang['L_BACKUPS']="Sicherungsdateien";
$lang['L_MINUTES']="Minuten";
$lang['L_PAGE_REFRESHS']="Seitenaufrufe";
$lang['L_MINUTE']="Minute";
$lang['L_SETKEYSFOR']="Setzen neuer Indizes für die Tabelle";
$lang['L_KEY_CONFIRMDELETE']="Index wirklich löschen?";
?>

Datei anzeigen

@ -104,10 +104,7 @@ $lang['L_CREATE_CONFIGFILE']="Eine neue Konfigurationsdatei anlegen";
$lang['L_ERROR_LOADING_CONFIGFILE']="Die Konfigurationsdatei \"%s\" konnte nicht geladen werden.";
$lang['L_BACKUP_DBS_PHP']="zu sichernde DBs (PHP)";
$lang['L_BACKUP_DBS_PERL']="zu sichernde DBs (PERL)";
$lang['L_CRON_COMMENT']="Kommentar eingeben
";
$lang['L_CRON_COMMENT']="Kommentar eingeben";
$lang['L_AUTODETECT']="automatisch ermitteln";

Datei anzeigen

@ -28,8 +28,7 @@ $lang['L_FM_RESTORE']="Wiederherstellen";
$lang['L_FM_ALERTRESTORE1']="Soll die Datenbank ";
$lang['L_FM_ALERTRESTORE2']="mit den Inhalten der Datei";
$lang['L_FM_ALERTRESTORE3']="wiederhergestellt werden?";
$lang['L_FM_DELETE']="Ausgewählte Dateien
löschen";
$lang['L_FM_DELETE']="Ausgewählte Dateien löschen";
$lang['L_FM_ASKDELETE1']="Möchten Sie die Datei(en) ";
$lang['L_FM_ASKDELETE2']="wirklich löschen?";
$lang['L_FM_ASKDELETE3']="Möchten Sie Autodelete nach den eingestellten Regeln jetzt ausführen?";
@ -38,7 +37,7 @@ $lang['L_FM_ASKDELETE5']="Möchten Sie alle Backup-Dateien mit ";
$lang['L_FM_ASKDELETE5_2']="_* jetzt löschen?";
$lang['L_FM_DELETEAUTO']="Autodelete manuell ausführen";
$lang['L_FM_DELETEALL']="Alle Backup-Dateien löschen";
$lang['L_FM_DELETEALLFILTER']="Alle löschen mit";
$lang['L_FM_DELETEALLFILTER']="Alle löschen mit ";
$lang['L_FM_DELETEALLFILTER2']="_*";
$lang['L_FM_STARTDUMP']="Neues Backup starten";
$lang['L_FM_FILEUPLOAD']="Datei hochladen";
@ -75,11 +74,8 @@ $lang['L_CHOOSE_CHARSET']="Leider konnte nicht automatisch ermittelt werden mit
<br>Sie müssen die Kodierung, in der Zeichenketten in dieser Datei vorliegen, manuell angeben.
<br>Danach stellt MySQLDumper die Verbindungskennung zum MySQL-Server auf den ausgewählten Zeichensatz und beginnt mit der Wiederherstellung der Daten.
<br>Sollten Sie nach der Wiederherstellung Probleme mit Sonderzeichen entdecken, so können Sie versuchen, das Backup mit einer anderen Zeichensatzauswahl wiederherzustellen.
<br>Viel Glück. ;)
";
<br>Viel Glück. ;)";
$lang['L_DOWNLOAD_FILE']="Datei herunterladen";
$lang['L_BACKUP_NOT_POSSIBLE'] = "Eine Sicherung der Systemdatenbank `%s` ist nicht möglich!";
?>

Datei anzeigen

@ -29,7 +29,7 @@ $lang['L_HELP_CRONEXECPATH']="Der Ort, an dem die Perlskripte liegen.
Ausgangspunkt ist die HTTP-Adresse (also im Browser).
Erlaubt sind absolute und relative Pfadangaben.";
$lang['L_CRON_EXECPATH']="Pfad der Perlskripte";
$lang['L_HELP_CRONCOMPLETELOG']="Wenn die Funktion aktiviert ist, wird die komplette Ausgabe im complete_log geschrieben.
$lang['L_HELP_CRONCOMPLETELOG']="Wenn die Funktion aktiviert ist, wird die komplette Ausgabe im complete_log geschrieben.
Diese Funktion ist unabhängig von der Textausgabe.";
$lang['L_HELP_FTP_MODE']="Wenn Probleme bei der FTP-Übertragung auftauchen, versuchen Sie den passiven FTP-Modus.

Datei anzeigen

@ -38,7 +38,7 @@ $lang['L_HTACC_CREATE_ERROR']="Es ist ein Fehler bei der Erstellung des Verzeich
$lang['L_HTACC_PROPOSED']="Dringend empfohlen";
$lang['L_HTACC_EDIT']=".htaccess editieren";
$lang['L_HTACCESS18']=".htaccess erstellen in ";
$lang['L_HTACCESS19']="neu laden ";
$lang['L_HTACCESS19']="Neu laden ";
$lang['L_HTACCESS20']="Skript ausführen";
$lang['L_HTACCESS21']="Handler zufügen";
$lang['L_HTACCESS22']="Ausführbar machen";
@ -57,7 +57,7 @@ $lang['L_DISABLEDFUNCTIONS']="Abgeschaltete Funktionen";
$lang['L_NOGZPOSSIBLE']="Da zlib nicht installiert ist, stehen keine GZip-Funktionen zur Verfügung!";
$lang['L_DELETE_HTACCESS']="Verzeichnisschutz entfernen (.htaccess löschen)";
$lang['L_WRONG_RIGHTS']="Die Datei oder das Verzeichnis '%s' ist für mich nicht beschreibbar.<br>
Entweder hat sie den falschen Besitzer (Owner) oder die falschen Rechte (Chmod).<br>
Entweder hat sie den falschen Besitzer (Owner) oder die falschen Rechte (Chmod).<br>
Bitte setzen Sie die richtigen Attribute mit Ihrem FTP-Programm. <br>
Die Datei oder das Verzeichnis benötigt die Rechte %s.<br>";
$lang['L_CANT_CREATE_DIR']="Ich konntes das Verzeichnis '%s' nicht erstellen.
@ -75,6 +75,7 @@ $lang['L_PHP_VERSION']="PHP-Version";
$lang['L_MAX_EXECUTION_TIME']="Maximale Ausführungszeit";
$lang['L_PHP_EXTENSIONS']="PHP-Erweiterungen";
$lang['L_MEMORY']="Speicher";
$lang['L_FILE_MISSING']="konnte Datei nicht finden";
?>

Datei anzeigen

@ -180,6 +180,12 @@ $lang['L_ENGINE']="Typ";
$lang['L_USERNAME']="Benutzername";
$lang['L_PASSWORD']="Kennwort";
$lang['L_PASSWORD_REPEAT']="Kennwort (Wiederholung)";
$lang['L_INFO_SIZE']="Größe";
$lang['L_TABLE_TYPE']="Typ";
$lang['L_KEY_DELETED']="Index gelöscht";
$lang['L_KEY_DELETEERROR']="Fehler beim Löschen des Index";
$lang['L_KEY_ADDED']="Index angelegt";
$lang['L_KEY_ADDERROR']="Fehler beim Anlegen des Index";
?>

Datei anzeigen

@ -52,7 +52,7 @@ $lang['L_MAX_BACKUP_FILES_EACH2']="für jede Datenbank";
$lang['L_SAVING_DB_FORM']="Datenbank";
$lang['L_TESTCONNECTION']="Verbindung testen";
$lang['L_BACK_TO_MINISQL']="Datenbank bearbeiten";
$lang['L_CREATE']="anlegen";
$lang['L_CREATE']="Anlegen";
$lang['L_VARIABELN']="Variablen";
$lang['L_STATUSINFORMATIONEN']="Statusinformationen";
$lang['L_VERSIONSINFORMATIONEN']="Versionsinformationen";
@ -61,7 +61,7 @@ $lang['L_BACKUPFILESANZAHL']="Im Backup-Verzeichnis befinden sich";
$lang['L_LASTBACKUP']="Letztes Backup";
$lang['L_NOTAVAIL']="<em>nicht verfügbar</em>";
$lang['L_VOM']="vom";
$lang['L_MYSQLVARS']="MySQL-Variabeln";
$lang['L_MYSQLVARS']="MySQL-Variablen";
$lang['L_MYSQLSYS']="MySQL-Befehle";
$lang['L_STATUS']="Status";
$lang['L_PROZESSE']="Prozesse";
@ -105,6 +105,8 @@ $lang['L_BACKUPS']="Sicherungsdateien";
$lang['L_MINUTES']="Minuten";
$lang['L_PAGE_REFRESHS']="Seitenaufrufe";
$lang['L_MINUTE']="Minute";
$lang['L_SETKEYSFOR']="Setzen neuer Indizes für die Tabelle";
$lang['L_KEY_CONFIRMDELETE']="Index wirklich löschen?";
?>

Datei anzeigen

@ -52,5 +52,4 @@ $lang['L_NR_TABLES_OPTIMIZED']="<span class=\"small\">%s Tabellen wurden optimie
$lang['L_DUMP_ERRORS']="<p class=\"error\">%s Fehler aufgetreten: <a href=\"log.php?r=3\">anzeigen</a></p>";
$lang['L_FATAL_ERROR_DUMP']="Schwerwiegender Fehler: die CREATE-Anweisung der Tabelle '%s' in der Datenbank '%s' konnte nicht gelesen werden!";
?>

Datei anzeigen

@ -28,8 +28,7 @@ $lang['L_FM_RESTORE']="Wiederherstellen";
$lang['L_FM_ALERTRESTORE1']="Soll die Datenbank ";
$lang['L_FM_ALERTRESTORE2']="mit den Inhalten der Datei";
$lang['L_FM_ALERTRESTORE3']="wiederhergestellt werden?";
$lang['L_FM_DELETE']="Ausgewählte Dateien
löschen";
$lang['L_FM_DELETE']="Ausgewählte Dateien löschen";
$lang['L_FM_ASKDELETE1']="Möchtest du die Datei(en)";
$lang['L_FM_ASKDELETE2']="wirklich löschen?";
$lang['L_FM_ASKDELETE3']="Möchtest du Autodelete nach den eingestellten Regeln jetzt ausführen?";
@ -38,7 +37,7 @@ $lang['L_FM_ASKDELETE5']="Möchtest du alle Backup-Dateien mit ";
$lang['L_FM_ASKDELETE5_2']="_* jetzt löschen?";
$lang['L_FM_DELETEAUTO']="Autodelete manuell ausführen";
$lang['L_FM_DELETEALL']="Alle Backup-Dateien löschen";
$lang['L_FM_DELETEALLFILTER']="Alle löschen mit";
$lang['L_FM_DELETEALLFILTER']="Alle löschen mit ";
$lang['L_FM_DELETEALLFILTER2']="_*";
$lang['L_FM_STARTDUMP']="Neues Backup starten";
$lang['L_FM_FILEUPLOAD']="Datei hochladen";
@ -77,6 +76,5 @@ $lang['L_CHOOSE_CHARSET']="Leider konnte nicht automatisch ermittelt werden mit
<br>Solltest Du nach der Wiederherstellung Probleme mit Sonderzeichen entdecken, so kannst Du versuchen, das Backup mit einer anderen Zeichensatzauswahl wiederherzustellen.
<br>Viel Glück. ;)";
$lang['L_DOWNLOAD_FILE']="Datei herunterladen";
$lang['L_BACKUP_NOT_POSSIBLE'] = "Eine Sicherung der Systemdatenbank `%s` ist nicht möglich!";
?>

Datei anzeigen

@ -29,7 +29,7 @@ $lang['L_HELP_CRONEXECPATH']="Der Ort, an dem die Perlskripte liegen.
Ausgangspunkt ist die HTTP-Adresse (also im Browser).
Erlaubt sind absolute und relative Pfadangaben.";
$lang['L_CRON_EXECPATH']="Pfad der Perlskripte";
$lang['L_HELP_CRONCOMPLETELOG']="Wenn die Funktion aktiviert ist, wird die komplette Ausgabe im complete_log geschrieben.
$lang['L_HELP_CRONCOMPLETELOG']="Wenn die Funktion aktiviert ist, wird die komplette Ausgabe im complete_log geschrieben.
Diese Funktion ist unabhängig von der Textausgabe.";
$lang['L_HELP_FTP_MODE']="Wenn Probleme bei der FTP-Übertragung auftauchen, versuche den passiven FTP-Modus.";

Datei anzeigen

@ -38,7 +38,7 @@ $lang['L_HTACC_CREATE_ERROR']="Es ist ein Fehler bei der Erstellung des Verzeich
$lang['L_HTACC_PROPOSED']="Dringend empfohlen";
$lang['L_HTACC_EDIT']=".htaccess editieren";
$lang['L_HTACCESS18']=".htaccess erstellen in ";
$lang['L_HTACCESS19']="neu laden ";
$lang['L_HTACCESS19']="Neu laden ";
$lang['L_HTACCESS20']="Skript ausführen";
$lang['L_HTACCESS21']="Handler zufügen";
$lang['L_HTACCESS22']="Ausführbar machen";
@ -57,7 +57,7 @@ $lang['L_DISABLEDFUNCTIONS']="Abgeschaltete Funktionen";
$lang['L_NOGZPOSSIBLE']="Da zlib nicht installiert ist, stehen keine GZip-Funktionen zur Verfügung!";
$lang['L_DELETE_HTACCESS']="Verzeichnisschutz entfernen (.htaccess löschen)";
$lang['L_WRONG_RIGHTS']="Die Datei oder das Verzeichnis '%s' ist für mich nicht beschreibbar.<br>
Entweder hat sie/es den falschen Besitzer (Owner) oder die falschen Rechte (Chmod).<br>
Entweder hat sie/es den falschen Besitzer (Owner) oder die falschen Rechte (Chmod).<br>
Bitte setze die richtigen Attribute mit Deinem FTP-Programm. <br>
Die Datei oder das Verzeichnis benötigt die Rechte %s.<br>";
$lang['L_CANT_CREATE_DIR']="Ich konntes das Verzeichnis '%s' nicht erstellen.
@ -72,6 +72,7 @@ $lang['L_PHP_VERSION']="PHP-Version";
$lang['L_MAX_EXECUTION_TIME']="Maximale Ausführungszeit";
$lang['L_PHP_EXTENSIONS']="PHP-Erweiterungen";
$lang['L_MEMORY']="Speicher";
$lang['L_FILE_MISSING']="konnte Datei nicht finden";
?>

Datei anzeigen

@ -180,6 +180,12 @@ $lang['L_ENGINE']="Typ";
$lang['L_USERNAME']="Benutzername";
$lang['L_PASSWORD']="Kennwort";
$lang['L_PASSWORD_REPEAT']="Kennwort (Wiederholung)";
$lang['L_INFO_SIZE']="Größe";
$lang['L_TABLE_TYPE']="Typ";
$lang['L_KEY_DELETED']="Index gelöscht";
$lang['L_KEY_DELETEERROR']="Fehler beim Löschen des Index";
$lang['L_KEY_ADDED']="Index angelegt";
$lang['L_KEY_ADDERROR']="Fehler beim Anlegen des Index";
?>

Datei anzeigen

@ -30,15 +30,15 @@ $lang['L_CHARSET']="Κωδικοποίηση";
$lang['L_COLLATION']="Collation";
$lang['L_CHANGE']="αλλαγή";
$lang['L_IN']="σε";
$lang['L_DO']="Εκτέλεσε";
$lang['L_DO']="Εκτέλεση";
$lang['L_VIEW']="προβολή";
$lang['L_EXISTING']="υπάρχων";
$lang['L_BACK']="πίσω";
$lang['L_DB_HOST']="Ονομα Host";
$lang['L_DB_HOST']="Ονομα Διακομιστή";
$lang['L_DB_USER']="χρήστης";
$lang['L_DB_PASS']="κωδικός";
$lang['L_INFO_SCRIPTDIR']="Κατάλογος του MySQLDumper";
$lang['L_INFO_ACTDB']="Παρούσα Β.Δεδομένων";
$lang['L_INFO_ACTDB']="Επιλεγμένη Β.Δεδομένων";
$lang['L_WRONGCONNECTIONPARS']="Λάθος ή καμία παράμετρος σύνδεσης!";
$lang['L_CONN_NOT_POSSIBLE']="Μη δυνατή σύνδεση !";
$lang['L_SERVERCAPTION']="Προβολή Διακομιστή";
@ -79,7 +79,7 @@ $lang['L_FILE_MANAGE']="Διαχείριση αρχείων";
$lang['L_LOG']="Καταγραφές";
$lang['L_CHOOSE_DB']="Επιλογή Β.Δεδομένων";
$lang['L_CREDITS']="Επαινοι / Βοήθεια";
$lang['L_MULTI_PART']="Multipart Αντίγραφα ασφαλείας";
$lang['L_MULTI_PART']="Αντίγραφα ασφαλείας σε πολλά μέρη";
$lang['L_LOGFILENOTWRITABLE']="Αδυναμία εγγραφής Καταγραφών !";
$lang['L_SQL_ERROR1']="Σφάλμα στο ερώτημα:";
$lang['L_SQL_ERROR2']="Η MySQL λέει:";
@ -89,15 +89,15 @@ $lang['L_OK']="ΟΚ";
$lang['L_CRON_COMPLETELOG']="Εξοδος Καταγραφών πλήρης";
$lang['L_NO']="όχι";
$lang['L_CREATE_DATABASE']="Δημιουργία νέας Β.Δεδομένων";
$lang['L_EXPORTFINISHED']="Εξαγωγή τελειωμένη.";
$lang['L_EXPORTFINISHED']="Η εξαγωγή τελείωσε.";
$lang['L_SQL_BROWSER']="Πλοηγός SQL";
$lang['L_SERVER']="Διακομιστής";
$lang['L_MYSQL_CONNECTION_ENCODING']="Στανταρ κωδικοποίηση του διακομιστή MySQL
$lang['L_MYSQL_CONNECTION_ENCODING']="Προεπιλεγμένη κωδικοποίηση του διακομιστή MySQL
";
$lang['L_TITLE_SHOW_DATA']="Προβολή δεδομένων";
$lang['L_PRIMARYKEY_CONFIRMDELETE']="Διαγραφή πρωτεύον κλειδιού?";
$lang['L_PRIMARYKEY_CONFIRMDELETE']="Διαγραφή πρωτεύοντος κλειδιού;";
$lang['L_SETPRIMARYKEYSFOR']="Ορισμός πρωτεύοντων κλειδιών για πίνακες";
$lang['L_PRIMARYKEY_FIELD']="Πεδίο πρωτεύον κλειδιού";
$lang['L_PRIMARYKEYS_SAVE']="Αποθήκευση πρωτεύοντων κλειδιών";
@ -105,9 +105,11 @@ $lang['L_CANCEL']="άκυρο";
$lang['L_VISIT_HOMEPAGE']="Επισκεφθείτε την Ιστοσελίδα";
$lang['L_SECONDS']="Δευτερόλεπτα";
$lang['L_BACKUPS']="Αντίγραφα Ασφαλείας";
$lang['L_MINUTES']="Minutes";
$lang['L_PAGE_REFRESHS']="Page refreshs";
$lang['L_MINUTE']="Minute";
$lang['L_MINUTES']="Λεπτά";
$lang['L_PAGE_REFRESHS']="Ανανεώσεις σελίδας";
$lang['L_MINUTE']="Λεπτό";
$lang['L_SETKEYSFOR']="Ορισμός νέων index για τον πίνακα";
$lang['L_KEY_CONFIRMDELETE']="Πραγματικά διαγραφή του index;";
?>
?>

Datei anzeigen

@ -104,9 +104,7 @@ $lang['L_CREATE_CONFIGFILE']="Δημιουργία νέου αρχείου ρύ
$lang['L_ERROR_LOADING_CONFIGFILE']="δεν ανοίγει το αρχείο ρύθμισης \"%s\".";
$lang['L_BACKUP_DBS_PHP']="ΒΔ για αντιγ. ασφαλείας (PHP)";
$lang['L_BACKUP_DBS_PERL']="ΒΔ για αντιγ. ασφαλείας (PERL)";
$lang['L_CRON_COMMENT']="Δώστε σχόλιο
";
$lang['L_CRON_COMMENT']="Δώστε σχόλιο";
$lang['L_AUTODETECT']="αυτόματος εντοπισμός";

Datei anzeigen

@ -73,9 +73,7 @@ $lang['L_FM_CHOOSE_ENCODING']="Επιλογή κωδικοποίησης για
$lang['L_CHOOSE_CHARSET']="Το MySQLDumper δε μπόρεσε να αναγνωρίσει αυτόματα την κωδικοποίηση του αντιγράφου ασφαλείας.
<br>Επιλέξτε το σετ χαρακτήρων με το οποίο αποθηκέυθηκε το αντίγραφο ασφαλείας.
<br>Αν παρουσιαστούν προβλήματα με κάποιους χαρακτήρες μετά την επαναφορά, επαναλάβετε την επαναφορά κι επιλέξτε άλλο σετ χαρακτήρων.
<br>Καλή επιτυχία. ;)
";
<br>Καλή επιτυχία. ;)";
$lang['L_DOWNLOAD_FILE']="Μεταφόρτωση αρχείου";
?>
$lang['L_BACKUP_NOT_POSSIBLE'] = "Δεν είναι δυνατή η λήψη αντιγράφου ασφαλείας της βάσης δεδομένων `%s` του συστήματος!";
?>

Datei anzeigen

@ -86,7 +86,7 @@ $lang['L_SAFEMODEDESC']="Επειδή η PHP τρέχει σε ασφαλή λε
";
$lang['L_ENTER_DB_INFO']="First click the button \"Connect to MySQL\". Only if no database could be detected you need to provide a database name here.";
$lang['L_ENTER_DB_INFO']="Πρώτα πατήστε το κουμπί \"Σύνδεση στη MySQL\". Μόνο αν δεν μπορέσει να ανιχνευτεί βάση δεδομένων θα πρέπει να παρέχετε ένα όνομα βάσης δεδομένων εδώ.";
?>
?>

Datei anzeigen

@ -60,7 +60,7 @@ $lang['L_WRONG_RIGHTS']="Το αρχείο ή ο κατάλογος '%s' δεν
Τα δικαιώματα (chmod) δε ρυθμίστηκαν σωστά ή έχουν λάθος ιδιοκτήτη.<br>
Δώστε τις σωστές ιδιότητες χρησιμοποιώντας το πρόγραμμα FTP.<br>
Το αρχείο ή ο κατάλογος πρέπει να ρυθμιστεί σε %s.<br>";
$lang['L_CANT_CREATE_DIR']="Δε δημιουργήθηκε κατάλογος '%s'.
$lang['L_CANT_CREATE_DIR']="Δε δημιουργήθηκε κατάλογος '%s'.
Δημιουργήστε τον χρησιμοποιώντας το πρόγραμμα FTP.
";
@ -74,6 +74,7 @@ $lang['L_PHP_VERSION']="Εκδοση PHP";
$lang['L_MAX_EXECUTION_TIME']="Μεγ. χρόνος εκτέλεσης";
$lang['L_PHP_EXTENSIONS']="Επεκτάσεις PHP";
$lang['L_MEMORY']="Μνήμη";
$lang['L_FILE_MISSING']="δε βρέθηκε το αρχείο";
?>

Datei anzeigen

@ -183,6 +183,12 @@ $lang['L_ENGINE']="Μηχανή";
$lang['L_USERNAME']="Ονομα χρήστη";
$lang['L_PASSWORD']="Κωδικός";
$lang['L_PASSWORD_REPEAT']="Κωδικός (Επανάληψη)";
$lang['L_INFO_SIZE']="Μέγεθος";
$lang['L_TABLE_TYPE']="Τύπος";
$lang['L_KEY_DELETED']="Το index διαγράφηκε";
$lang['L_KEY_DELETEERROR']="Σφάλμα κατά τη διαγραφή του index";
$lang['L_KEY_ADDED']="Το index προστέθηκε";
$lang['L_KEY_ADDERROR']="Σφάλμα κατά την προσθήκη του index";
?>
?>

Datei anzeigen

@ -105,6 +105,8 @@ $lang['L_BACKUPS']="Backups";
$lang['L_MINUTES']="Minutes";
$lang['L_PAGE_REFRESHS']="Page refreshs";
$lang['L_MINUTE']="Minute";
$lang['L_SETKEYSFOR']="Set new indexes for table";
$lang['L_KEY_CONFIRMDELETE']="Really delete index?";
?>

Datei anzeigen

@ -73,10 +73,7 @@ $lang['L_FM_CHOOSE_ENCODING']="Choose encoding of backup file";
$lang['L_CHOOSE_CHARSET']="MySQLDumper couldn't detect the encoding of the backup file automatically.
<br>You must choose the charset with which this backup was saved.
<br>If you discover any problems with some characters after restoring, you can repeat the backup-progress and then choose another character set.
<br>Good luck. ;)
";
<br>Good luck. ;)";
$lang['L_DOWNLOAD_FILE']="Download file";
$lang['L_BACKUP_NOT_POSSIBLE'] = "A backup of the system database `%s` is not possible!";
?>

Datei anzeigen

@ -60,7 +60,7 @@ $lang['L_WRONG_RIGHTS']="The file or the directory '%s' is not writable for me.<
The rights (chmod) are not set properly or it has the wrong owner.<br>
Pleae set the correct attributes using your FTP program.<br>
The file or the directory needs to be set to %s.<br>";
$lang['L_CANT_CREATE_DIR']="Couldn' t create dir '%s'.
$lang['L_CANT_CREATE_DIR']="Couldn' t create dir '%s'.
Please create it using your FTP program.";
$lang['L_TABLE_TYPE']="Type";
$lang['L_CHECK']="check";
@ -72,6 +72,7 @@ $lang['L_PHP_VERSION']="PHP-Version";
$lang['L_MAX_EXECUTION_TIME']="Max execution time";
$lang['L_PHP_EXTENSIONS']="PHP-Extensions";
$lang['L_MEMORY']="Memory";
$lang['L_FILE_MISSING']="couldn't find file";
?>

Datei anzeigen

@ -180,6 +180,12 @@ $lang['L_ENGINE']="Engine";
$lang['L_USERNAME']="Username";
$lang['L_PASSWORD']="Password";
$lang['L_PASSWORD_REPEAT']="Password (repeat)";
$lang['L_INFO_SIZE']="Size";
$lang['L_TABLE_TYPE']="Type";
$lang['L_KEY_DELETED']="Index deleted";
$lang['L_KEY_DELETEERROR']="Error deleting index";
$lang['L_KEY_ADDED']="Index added";
$lang['L_KEY_ADDERROR']="Error adding index";
?>

Datei anzeigen

@ -105,6 +105,8 @@ $lang['L_BACKUPS']="cantidad de copias de seguridad";
$lang['L_MINUTES']="Minutes";
$lang['L_PAGE_REFRESHS']="Page refreshs";
$lang['L_MINUTE']="Minute";
$lang['L_SETKEYSFOR']="Set new indexes for table";
$lang['L_KEY_CONFIRMDELETE']="Really delete index?";
?>

Datei anzeigen

@ -75,6 +75,5 @@ Usted debe elegir el conjunto de caracteres con el que se guardó la copia de se
Si usted descubre algún problema con algunos caracteres después de la restauración, puede repetir la restauración de la copia de seguridad con otro conjunto de caracteres. <br>
Buena suerte. ;)";
$lang['L_DOWNLOAD_FILE']="Descargos ficheros";
?>
$lang['L_BACKUP_NOT_POSSIBLE'] = "¡Una copia de seguridad de la base de datos del sistema `%s` no es posible realizarla!";
?>

Datei anzeigen

@ -8,7 +8,7 @@ $lang['L_UNINSTALL']="Desinstalación";
$lang['L_TOOLS']="Herramientas";
$lang['L_EDITCONF']="modificar configuración";
$lang['L_OSWEITER']="seguir sin guardar";
$lang['L_ERRORMAN']="<strong>Error al escribir la configuración!</strong><br>Por favor, edite Vd. el fichero ";
$lang['L_ERRORMAN']="<strong>Error al escribir la configuración!</b><br>Por favor, edite Vd. el fichero ";
$lang['L_MANUELL']="manualmente";
$lang['L_CREATEDIRS']="Directorios creados";
$lang['L_INSTALL_CONTINUE']="seguir con la instalación";

Datei anzeigen

@ -72,6 +72,7 @@ $lang['L_PHP_VERSION']="PHP-Versión";
$lang['L_MAX_EXECUTION_TIME']="El máximo de ejecución";
$lang['L_PHP_EXTENSIONS']="Extensiones de PHP";
$lang['L_MEMORY']="Memoria";
$lang['L_FILE_MISSING']="no se encuentra el fichero";
?>

Datei anzeigen

@ -182,6 +182,12 @@ $lang['L_ENGINE']="Máquina";
$lang['L_USERNAME']="Nombre de usuario";
$lang['L_PASSWORD']="Contraseña";
$lang['L_PASSWORD_REPEAT']="Contraseña (repetición)";
$lang['L_INFO_SIZE']="Tamaño";
$lang['L_TABLE_TYPE']="Tipo";
$lang['L_KEY_DELETED']="Index deleted";
$lang['L_KEY_DELETEERROR']="Error deleting index";
$lang['L_KEY_ADDED']="Index added";
$lang['L_KEY_ADDERROR']="Error adding index";
?>

Datei anzeigen

@ -1,10 +1,10 @@
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</html>

Datei anzeigen

@ -105,6 +105,8 @@ $lang['L_BACKUPS']="Nombres de sauvegardes";
$lang['L_MINUTES']="Minutes";
$lang['L_PAGE_REFRESHS']="Page refreshs";
$lang['L_MINUTE']="Minute";
$lang['L_SETKEYSFOR']="Set new indexes for table";
$lang['L_KEY_CONFIRMDELETE']="Really delete index?";
?>

Datei anzeigen

@ -28,8 +28,7 @@ $lang['L_FM_RESTORE']="Restauration";
$lang['L_FM_ALERTRESTORE1']="Voulez-vous que la base de données ";
$lang['L_FM_ALERTRESTORE2']="avec le contenu des fichiers";
$lang['L_FM_ALERTRESTORE3']="soit restaurée?";
$lang['L_FM_DELETE']="Supprimer les
fichiers sélectionnés";
$lang['L_FM_DELETE']="Supprimer les fichiers sélectionnés";
$lang['L_FM_ASKDELETE1']="Voulez-vous vraiment supprimer le fichier ";
$lang['L_FM_ASKDELETE2']="really be deleted?";
$lang['L_FM_ASKDELETE3']="Voulez-vous exécuter la suppression automatique d'après les règles sauvegardées?";
@ -38,7 +37,7 @@ $lang['L_FM_ASKDELETE5']="Voulez-vous supprimer toutes les copies de sauvegarde
$lang['L_FM_ASKDELETE5_2']="_* ?";
$lang['L_FM_DELETEAUTO']="Exécuter manuellement\nsuppression automatique";
$lang['L_FM_DELETEALL']="Supprimer toutes les\ncopies de sauvegarde";
$lang['L_FM_DELETEALLFILTER']="Supprimer tout avec";
$lang['L_FM_DELETEALLFILTER']="Supprimer tout avec ";
$lang['L_FM_DELETEALLFILTER2']="_*";
$lang['L_FM_STARTDUMP']="Exécuter une nouvelle\ncopie de sauvegarde";
$lang['L_FM_FILEUPLOAD']="Télécharger un fichier vers le serveur";
@ -72,6 +71,5 @@ $lang['L_ENCODING']="encodage";
$lang['L_FM_CHOOSE_ENCODING']="Choisissez le type d'encodage de la sauvegarde";
$lang['L_CHOOSE_CHARSET']="MySQLDumper n'a pas pu détecter automatiquement le type d'encodage de la sauvegarde <br>Vous devez choisir le jeux de caractères qui a été utilisé pour la sauvegarde<br> Si vous découvrez des problèmes avec quelques caractères suite à la restauration, vous pouvez répéter l'opération en choisissant un autre jeux de caractères.<br>Bonne chance ;-)";
$lang['L_DOWNLOAD_FILE']="Download file";
$lang['L_BACKUP_NOT_POSSIBLE'] = "A backup of the system database `%s` is not possible!";
?>

Datei anzeigen

@ -29,7 +29,7 @@ $lang['L_HELP_CRONEXECPATH']="L'endroit où se trouve les scripts Perl.
Point de départ est l'adresse HTTP (dans le navigateur)
Autorisé sont les chemins absolus et relatifs.";
$lang['L_CRON_EXECPATH']="Chemin du script Perl";
$lang['L_HELP_CRONCOMPLETELOG']="Si la fonction est activée alors la sortie complète est écrite dans le journal 'complete_log'.
$lang['L_HELP_CRONCOMPLETELOG']="Si la fonction est activée alors la sortie complète est écrite dans le journal 'complete_log'.
Cette fonction est indépendante de la fonction sortie de texte.";
$lang['L_HELP_FTP_MODE']="Si vous avez des problèmes durant le transfert FTP, essayez en choisissant passif comme mode de transfert.";

Datei anzeigen

@ -68,6 +68,7 @@ $lang['L_PHP_VERSION']="PHP-Version";
$lang['L_MAX_EXECUTION_TIME']="Max execution time";
$lang['L_PHP_EXTENSIONS']="PHP-Extensions";
$lang['L_MEMORY']="Memory";
$lang['L_FILE_MISSING']="le fichier n'a pas été trouvé";
?>

Datei anzeigen

@ -183,6 +183,12 @@ $lang['L_ENGINE']="Engine";
$lang['L_USERNAME']="Username";
$lang['L_PASSWORD']="Password";
$lang['L_PASSWORD_REPEAT']="Password (repeat)";
$lang['L_INFO_SIZE']="Taille";
$lang['L_TABLE_TYPE']="Type";
$lang['L_KEY_DELETED']="Index deleted";
$lang['L_KEY_DELETEERROR']="Error deleting index";
$lang['L_KEY_ADDED']="Index added";
$lang['L_KEY_ADDERROR']="Error adding index";
?>

Datei anzeigen

@ -105,6 +105,8 @@ $lang['L_BACKUPS']="Backups";
$lang['L_MINUTES']="Minutes";
$lang['L_PAGE_REFRESHS']="Page refreshs";
$lang['L_MINUTE']="Minute";
$lang['L_SETKEYSFOR']="Set new indexes for table";
$lang['L_KEY_CONFIRMDELETE']="Really delete index?";
?>

Datei anzeigen

@ -71,6 +71,5 @@ $lang['L_ENCODING']="codifica";
$lang['L_FM_CHOOSE_ENCODING']="Scegli la codifica del file di backup";
$lang['L_CHOOSE_CHARSET']="MySQLDumper non ha rilevato automaticamente il codice del seti di caratteri utilizzato nel file di backup creato in precedenza.<br> Devi inserire manualmente il set di caratteri standard con cui è stato salvato questo backup.<br> Dopo aver fatto questo, MySQLDumper effettuerà la connessione verso il MySQL-Server contenente il set di caretteri scelto e avvierà il ripristino dei dati. Se dopo il ripristono si presentassero problemi nella visualizzazione dei caratteri speciali, sarà opportuno ripetere la procedura di ripistino scegliendo un altro set di caratteri.<br>Buona fortuna.;)";
$lang['L_DOWNLOAD_FILE']="Scarica file";
$lang['L_BACKUP_NOT_POSSIBLE'] = "A backup of the system database `%s` is not possible!";
?>

Datei anzeigen

@ -24,7 +24,7 @@ $lang['L_HELP_SPEED']="Minima e massima velocità della connessione, lo standard
$lang['L_SPEED']="Controllo velocità";
$lang['L_HELP_CRONEXECPATH']="Il posto in cui si trovano gli script Perl.\nIl punto di partenza iniziale è l`indirizzo HTTP (come gli indirizzi nel Browser)\nSono permessi indirizzi assoluti e relativi.";
$lang['L_CRON_EXECPATH']="Percorso degli script Perl";
$lang['L_HELP_CRONCOMPLETELOG']="Se questa funzione è attivata il dettaglio di tutte le operazioni verrà memorizzato nel file complete_log.
$lang['L_HELP_CRONCOMPLETELOG']="Se questa funzione è attivata il dettaglio di tutte le operazioni verrà memorizzato nel file complete_log.
Questa funzione è indipendente dall`output del testo.";
$lang['L_HELP_FTP_MODE']="Se si verificassero dei problemi con il trasferimento tramite FTP, provare ad usare la modalità passiva.";

Datei anzeigen

@ -68,6 +68,7 @@ $lang['L_PHP_VERSION']="PHP-Version";
$lang['L_MAX_EXECUTION_TIME']="Max execution time";
$lang['L_PHP_EXTENSIONS']="PHP-Extensions";
$lang['L_MEMORY']="Memory";
$lang['L_FILE_MISSING']="impossibile trovare il file";
?>

Datei anzeigen

@ -180,6 +180,12 @@ $lang['L_ENGINE']="Engine";
$lang['L_USERNAME']="Username";
$lang['L_PASSWORD']="Password";
$lang['L_PASSWORD_REPEAT']="Password (repeat)";
$lang['L_INFO_SIZE']="Grandezza";
$lang['L_TABLE_TYPE']="Tipo";
$lang['L_KEY_DELETED']="Index deleted";
$lang['L_KEY_DELETEERROR']="Error deleting index";
$lang['L_KEY_ADDED']="Index added";
$lang['L_KEY_ADDERROR']="Error adding index";
?>

Datei anzeigen

@ -105,6 +105,8 @@ $lang['L_BACKUPS']="Backups";
$lang['L_MINUTES']="Minutes";
$lang['L_PAGE_REFRESHS']="Page refreshs";
$lang['L_MINUTE']="Minute";
$lang['L_SETKEYSFOR']="Set new indexes for table";
$lang['L_KEY_CONFIRMDELETE']="Really delete index?";
?>

Datei anzeigen

@ -73,10 +73,7 @@ $lang['L_FM_CHOOSE_ENCODING']="Choose encoding of backup file";
$lang['L_CHOOSE_CHARSET']="MySQLDumper couldn't detect the encoding of the backup file automatically.
<br>You must choose the charset with which this backup was saved.
<br>If you discover any problems with some characters after restoring, you can repeat the backup-progress and then choose another character set.
<br>Good luck. ;)
";
<br>Good luck. ;)";
$lang['L_DOWNLOAD_FILE']="Download file";
$lang['L_BACKUP_NOT_POSSIBLE'] = "A backup of the system database `%s` is not possible!";
?>

Datei anzeigen

@ -60,7 +60,7 @@ $lang['L_WRONG_RIGHTS']="O arquivo ou o diretório '%s' não tem permissão de e
As permissões (chmod) não estão configuradas apropriadamente ou não privilégios suficientes para este usuário.<br>
Por favor configure corretamente as permissões usando o programa de FTP.<br>
O arquivo ou diretório necessitam de configuração para %s.<br>";
$lang['L_CANT_CREATE_DIR']="Não foi possível criar o diretório '%s'.
$lang['L_CANT_CREATE_DIR']="Não foi possível criar o diretório '%s'.
Por favor utilize seu programa de FTP.";
$lang['L_TABLE_TYPE']="Type";
$lang['L_CHECK']="check";
@ -72,6 +72,7 @@ $lang['L_PHP_VERSION']="PHP-Version";
$lang['L_MAX_EXECUTION_TIME']="Max execution time";
$lang['L_PHP_EXTENSIONS']="PHP-Extensions";
$lang['L_MEMORY']="Memory";
$lang['L_FILE_MISSING']="não pude encontrar o arquivo";
?>

Datei anzeigen

@ -180,6 +180,12 @@ $lang['L_ENGINE']="Engine";
$lang['L_USERNAME']="Username";
$lang['L_PASSWORD']="Password";
$lang['L_PASSWORD_REPEAT']="Password (repeat)";
$lang['L_INFO_SIZE']="tamanho";
$lang['L_TABLE_TYPE']="Type";
$lang['L_KEY_DELETED']="Index deleted";
$lang['L_KEY_DELETEERROR']="Error deleting index";
$lang['L_KEY_ADDED']="Index added";
$lang['L_KEY_ADDERROR']="Error adding index";
?>

Datei anzeigen

@ -105,6 +105,8 @@ $lang['L_BACKUPS']="backup(er)";
$lang['L_MINUTES']="minuter";
$lang['L_PAGE_REFRESHS']="sidvisningar";
$lang['L_MINUTE']="minut";
$lang['L_SETKEYSFOR']="Set new indexes for table";
$lang['L_KEY_CONFIRMDELETE']="Really delete index?";
?>

Datei anzeigen

@ -71,6 +71,5 @@ $lang['L_ENCODING']="Kodering";
$lang['L_FM_CHOOSE_ENCODING']="Välj backupfilens kodering";
$lang['L_CHOOSE_CHARSET']="Tyvärr kunde ej fastställas automatiskt med vilken teckensats denna backupfil har skapats.<br>Du måste ange koderingen manuellt.<br>Därefter ställer MySQLDumper in förbindelseparametrarna till MySQL-servern till den valda teckensatsen och startar återställningen.<br>Om datan återges med fel specialtecken efter återställningen så bör du upprepa återställningen med en annan inställning för teckensatsen.<br>Lycka till.";
$lang['L_DOWNLOAD_FILE']="Ladda hem filen";
$lang['L_BACKUP_NOT_POSSIBLE'] = "A backup of the system database `%s` is not possible!";
?>

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen