1
0
Fork 0

Commits vergleichen

...

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

46 geänderte Dateien mit 2766 neuen und 2380 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.

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

@ -11,7 +11,7 @@ $config['dbsocket'] = '';
// Username
$config['dbuser'] = 'root';
//User-Pass. For no Password leave empty
$config['dbpass'] = 'mysql';
$config['dbpass'] = '';
//Speed Values between 50 and 1000000
//use low values if you have bad connection or slow machines
@ -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
@ -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

@ -355,7 +355,7 @@ 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)
{
$databases['Name'][] = $to_add;
@ -1002,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

@ -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)

Datei anzeigen

@ -307,8 +307,8 @@ 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";

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-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

@ -276,23 +276,23 @@ 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?
// 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;
@ -302,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.'`,';
}
@ -316,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;
}

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,15 +79,15 @@ function SQL_ComboBox()
function Table_ComboBox()
{
global $db,$config,$lang,$nl;
$tabellen=mysql_query('SHOW TABLES FROM `' . $db . '`',$config['dbconnection']);
$tabellen=mysqli_query($config['dbconnection'], 'SHOW TABLES FROM `' . $db . '`');
$num_tables = 0;
if (is_resource($tabellen)) {
$num_tables=mysql_num_rows($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;
@ -97,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;
@ -113,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))
{
@ -134,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];
}
@ -207,16 +207,16 @@ function DB_Copy($source, $destination, $drop_source=0, $insert_data=1)
}
}
$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);
if ($res)
{
$row=mysql_fetch_row($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";
@ -226,7 +226,7 @@ function DB_Copy($source, $destination, $drop_source=0, $insert_data=1)
return false;
}
}
mysql_select_db($destination);
mysqli_select_db($GLOBALS["___mysqli_ston"], $destination);
$res=MSD_DoSQL($SQL_Array);
if ($drop_source == 1 && $res) MSD_query("DROP DATABASE `$source`;");
return $res;
@ -239,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);
@ -483,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));
}
@ -533,7 +533,7 @@ function correct_post_index($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="">';
@ -587,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>';
}
}
@ -608,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))
@ -634,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'] : '';
@ -840,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();
@ -867,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
@ -898,7 +898,7 @@ 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'] : '';
@ -947,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
@ -997,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'] : '';
@ -1077,7 +1077,7 @@ 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['name'][]=$row['Column_name'];
@ -1105,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'];
}

Datei anzeigen

@ -1,23 +1,32 @@
<?php
$msd_path=realpath(dirname(__FILE__) . '/../') . '/';
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

@ -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_query('SHOW TABLES FROM `'.$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>';
@ -63,7 +63,7 @@ for ($i=0; $i<count($databases['Name']); $i++)
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,
@ -73,9 +73,9 @@ for ($i=0; $i<count($databases['Name']); $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),
@ -101,9 +101,9 @@ if (isset($_GET['dbid']))
$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]),
@ -120,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;
@ -131,7 +131,7 @@ 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';
}
@ -163,16 +163,16 @@ if (isset($_GET['dbid']))
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());
@ -186,10 +186,10 @@ if (isset($_GET['dbid']))
if ($enableKeys==$row['Name'] || $enableKeys=="ALL")
{
$sSql= "ALTER TABLE `".$databases['Name'][$dbid]."`.`".$row['Name']."` ENABLE KEYS";
$tmp_res=mysql_query($sSql);
$tmp_res=mysqli_query($GLOBALS["___mysqli_ston"], $sSql);
}
$res3=mysql_query('SHOW INDEX FROM `'.$databases['Name'][$dbid]."`.`".$row['Name']."`");
WHILE ($row3 = mysql_fetch_array($res3, MYSQL_ASSOC))
$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;

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>

Binäre Datei nicht angezeigt.

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

@ -252,24 +252,24 @@ function MSD_mysql_connect($encoding='utf8', $keycheck_off=false, $actual_table=
if (isset($config['dbconnection']) && is_resource($config['dbconnection'])) {
return $config['dbconnection'];
}
$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("Error establishing a database connection!", mysql_error()));
$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) {
// only called with this param when restoring
mysql_query('SET FOREIGN_KEY_CHECKS=0',$config['dbconnection']);
mysqli_query($config['dbconnection'], 'SET FOREIGN_KEY_CHECKS=0');
// also set SQL-Mode NO_AUTO_VALUE_ON_ZERO for magento users
mysql_query('SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"', $config['dbconnection']);
mysqli_query( $config['dbconnection'], 'SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"');
}
return $config['dbconnection'];
}
@ -277,7 +277,7 @@ function MSD_mysql_connect($encoding='utf8', $keycheck_off=false, $actual_table=
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);
@ -293,8 +293,8 @@ 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;
}
@ -366,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) . ')';
@ -383,14 +383,14 @@ 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']);
@ -403,11 +403,11 @@ function getDBInfos()
}
if ($config['optimize_tables_beforedump'] == 1 && $dump['table_offset'] == -1
&& $databases['Name'][$dump['dbindex']]!='information_schema') {
mysql_select_db($databases['Name'][$dump['dbindex']]);
mysqli_select_db($GLOBALS["___mysqli_ston"], $databases['Name'][$dump['dbindex']]);
$opt = 'OPTIMIZE TABLE `' . $row['Name'] . '`';
$res = mysql_query('OPTIMIZE TABLE `' . $row['Name'] . '`');
$res = mysqli_query($GLOBALS["___mysqli_ston"], 'OPTIMIZE TABLE `' . $row['Name'] . '`');
if ($res === false) {
die("Error in ".$opt." -> ".mysql_error());
die("Error in ".$opt." -> ".((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));
}
}
@ -436,10 +436,10 @@ function getDBInfos()
// 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)
@ -449,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,7 +1,7 @@
<?php
error_reporting(E_ALL);
if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
error_reporting(E_ALL & ~E_DEPRECATED);
error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);
}
if (function_exists("date_default_timezone_set")) date_default_timezone_set(@date_default_timezone_get());
@ -13,7 +13,7 @@ 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/';

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

@ -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];
}
@ -70,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;
}
@ -130,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)

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

@ -86,21 +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
{
$sql_temp="SELECT count(*) as anzahl FROM (".$sql_temp.") as query;";
// 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;
}
@ -116,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;
@ -149,7 +152,7 @@ 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'];
@ -159,7 +162,7 @@ if ($numrowsabs > 0 && $Anzahl_SQLs <= 1)
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);
}
@ -214,14 +217,14 @@ if ($numrowsabs > 0 && $Anzahl_SQLs <= 1)
$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
@ -358,4 +361,4 @@ if ($numrowsabs > 0 && $Anzahl_SQLs <= 1)
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

@ -9,7 +9,7 @@ $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

@ -278,10 +278,10 @@ if (isset($_POST['newfield_posted']))
$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">';
@ -299,7 +299,7 @@ else
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>';
@ -310,7 +310,7 @@ 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";
@ -462,7 +462,7 @@ if ($table_edit_name!="")
</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>';
@ -471,7 +471,7 @@ if ($table_edit_name!="")
{
for ($i=0; $i<$num; $i++)
{
$row=mysql_fetch_array($res,MYSQL_ASSOC);
$row=mysqli_fetch_array($res, MYSQLI_ASSOC);
if (!isset($row['Comment'])) {
$row['Comment'] = '';
}
@ -535,7 +535,7 @@ if ($table_edit_name!="")
//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>';
@ -554,7 +554,7 @@ if ($table_edit_name!="")
echo '<table class="bdr">';
echo '<tr class="thead"><th>#</th><th>'.$lang['L_PRIMARYKEY_FIELD'].'</th><th>'.$lang['L_INFO_SIZE'].'</th>';
while ($row=mysql_fetch_array($res, MYSQL_ASSOC))
while ($row=mysqli_fetch_array($res, MYSQLI_ASSOC))
{
$feldArray[$row['Field']]=$row['Type'];
}
@ -592,4 +592,4 @@ if ($table_edit_name!="")
echo '<br><input name="setNewKeys" type="submit" value="'.$lang['L_SAVE'].'" class="Formbutton">';
echo '</form>';
}
}
}

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

@ -432,7 +432,7 @@ switch ($phase)
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>';
@ -463,7 +463,7 @@ switch ($phase)
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>';
@ -532,7 +532,7 @@ 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>';
}

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,11 +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_SETKEYSFOR']="Set new indexes for table";
$lang['L_KEY_CONFIRMDELETE']="Really delete index?";
$lang['L_MINUTES']="Λεπτά";
$lang['L_PAGE_REFRESHS']="Ανανεώσεις σελίδας";
$lang['L_MINUTE']="Λεπτό";
$lang['L_SETKEYSFOR']="Ορισμός νέων index για τον πίνακα";
$lang['L_KEY_CONFIRMDELETE']="Πραγματικά διαγραφή του index;";
?>
?>

Datei anzeigen

@ -75,5 +75,5 @@ $lang['L_CHOOSE_CHARSET']="Το MySQLDumper δε μπόρεσε να αναγν
<br>Αν παρουσιαστούν προβλήματα με κάποιους χαρακτήρες μετά την επαναφορά, επαναλάβετε την επαναφορά κι επιλέξτε άλλο σετ χαρακτήρων.
<br>Καλή επιτυχία. ;)";
$lang['L_DOWNLOAD_FILE']="Μεταφόρτωση αρχείου";
$lang['L_BACKUP_NOT_POSSIBLE'] = "A backup of the system database `%s` is not possible!";
?>
$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

@ -185,10 +185,10 @@ $lang['L_PASSWORD']="Κωδικός";
$lang['L_PASSWORD_REPEAT']="Κωδικός (Επανάληψη)";
$lang['L_INFO_SIZE']="Μέγεθος";
$lang['L_TABLE_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";
$lang['L_KEY_DELETED']="Το index διαγράφηκε";
$lang['L_KEY_DELETEERROR']="Σφάλμα κατά τη διαγραφή του index";
$lang['L_KEY_ADDED']="Το index προστέθηκε";
$lang['L_KEY_ADDERROR']="Σφάλμα κατά την προσθήκη του index";
?>
?>

Datei anzeigen

@ -75,5 +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'] = "A backup of the system database `%s` is not possible!";
?>
$lang['L_BACKUP_NOT_POSSIBLE'] = "¡Una copia de seguridad de la base de datos del sistema `%s` no es posible realizarla!";
?>

Datei anzeigen

@ -80,7 +80,7 @@ echo "\n" . $errorbutton . "\n" . $perlbutton . "\n" . $perlbutton2 . "\n";
echo '</tr></table><br>';
//Status Logfiles
echo '<div align="left"><table class="bdr"><tr><td><table><tr><td valign="top"><strong>' . $lang['L_LOGFILEFORMAT'] . '</strong><br><br>' . ( ( $config['logcompression'] == 1 ) ? '<img src="' . $config['files']['iconpath'] . 'gz.gif" width="32" height="32" alt="compressed" align="left">' : '<img src="' . $config['files']['iconpath'] . 'blank.gif" width="32" height="32" alt="" align="left">' );
echo '<div align="left"><table class="bdr"><tr><td><table><tr><td valign="top"><strong>' . $lang['L_LOGFILEFORMAT'] . '</strong><br><br>' . ( ( $config['logcompression'] == 1 ) ? '<img src="' . $config['files']['iconpath'] . 'gz.gif" width="32" height="32" alt="compressed" align="left">' : '<img src="' . $icon['blank'].'" width="32" height="32" alt="" align="left">' );
echo '' . ( ( $config['logcompression'] == 1 ) ? $lang['L_COMPRESSED'] : $lang['L_NOTCOMPRESSED'] ) . '</td>';
echo '<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td valign="top" align="right">';
echo '<a href="' . $loginfo['log'] . '">' . substr($loginfo['log'],strrpos($loginfo['log'],"/") + 1) . '</a><br>';

Datei anzeigen

@ -10,10 +10,10 @@
# This file is part of MySQLDumper released under the GNU/GPL 2 license
# http://www.mysqldumper.net
# @package MySQLDumper
# @version $Rev$
# @author $Author$
# @lastmodified $Date$
# @filesource $URL$
# @version $Rev: 1371 $
# @author $Author: dsb1971 $
# @lastmodified $Date: 2011-01-24 21:15:21 +0100 (Mo, 24. Jan 2011) $
# @filesource $URL: https://mysqldumper.svn.sourceforge.net/svnroot/mysqldumper/branches/msd1.24.3/msd_cron/crondump.pl $
#
########################################################################################
# Script-Version
@ -269,6 +269,7 @@ if($mod_mime==1) {
#try writing to logfile
write_log("***********************************************************************\n");
write_log("Starting backup using Perlscript version $pcd_version (using perl ".GetPerlVersion().")\n");
PrintOut("Starting backup using Perlscript version $pcd_version (using perl ".GetPerlVersion().")\n");
write_log("Using configuration $conffile\n");
#now do the dump

Datei anzeigen

@ -2,10 +2,10 @@
# This file is part of MySQLDumper released under the GNU/GPL 2 license
# http://www.mysqldumper.net
# @package MySQLDumper
# @version $Rev$
# @author $Author$
# @lastmodified $Date$
# @filesource $URL$
# @version $Rev: 1351 $
# @author $Author: jtietz $
# @lastmodified $Date: 2011-01-16 20:55:42 +0100 (So, 16. Jan 2011) $
# @filesource $URL: https://mysqldumper.svn.sourceforge.net/svnroot/mysqldumper/branches/msd1.24.3/msd_cron/perltest.pl $
use strict;
use Socket;

Datei anzeigen

@ -17,10 +17,10 @@
# This file is part of MySQLDumper released under the GNU/GPL 2 license
# http://www.mysqldumper.net
# @package MySQLDumper
# @version $Rev$
# @author $Author$
# @lastmodified $Date$
# @filesource $URL$
# @version $Rev: 1351 $
# @author $Author: jtietz $
# @lastmodified $Date: 2011-01-16 20:55:42 +0100 (So, 16. Jan 2011) $
# @filesource $URL: https://mysqldumper.svn.sourceforge.net/svnroot/mysqldumper/branches/msd1.24.3/msd_cron/simpletest.pl $
use strict;
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);

Datei anzeigen

@ -1,26 +1,64 @@
<?php
// Konfigurationsdateien, die aktualisiert werden sollen
// configurations to update
// mehrere Dateien so angeben | enter more than one configurationsfile like this
// $configurationfiles=array('mysqldumper','db2');
/////////////////////////////////////////////////////////////////////////
$configurationfiles=array(
'mysqldumper'
/**
* Loads all configuration files and refreshes the database list.
*
* Add configuration file names to array $excludedConfigurationFiles to skip configurations.
*/
error_reporting(E_ALL & ~E_NOTICE);
$verbose = true;
/**
* Build exclude array with configuration files that should be skipped
*/
$excludedConfigurationFiles = array(
//'mysqldumper',
//add more excluded files by adding their name
);
define('APPLICATION_PATH',realpath(dirname(__FILE__)));
chdir(APPLICATION_PATH);
include_once ( APPLICATION_PATH . '/inc/header.php' );
include_once ( APPLICATION_PATH . '/inc/functions.php' );
$config['language']='en';
$config['theme']="msd";
$config['files']['iconpath']='css/' . $config['theme'] . '/icons/';
foreach ($configurationfiles as $conf)
{
$config['config_file']=$conf;
include ( $config['paths']['config'] . $conf . '.php' );
GetLanguageArray();
SetDefault();
$verbose = true;
if (PHP_SAPI === 'cli' || empty($_SERVER['REMOTE_ADDR'])) {
// called via cli - check verbose param
define('NEWLINE', "\n");
$options = getopt('v::', array('verbose::'));
$verbose = isset($options['verbose']) || isset($options['v']) ? true : false;
} else {
define('NEWLINE', '<br />');
}
date_default_timezone_set('Europe/Berlin');
define('APPLICATION_PATH', __DIR__);
chdir(APPLICATION_PATH);
include(APPLICATION_PATH . '/inc/functions.php');
include(APPLICATION_PATH . '/inc/mysql.php');
include('language/en/lang.php');
// load default configuration
include('work/config/mysqldumper.php');
GetLanguageArray();
$configFiles = get_config_filenames();
foreach ($configFiles as $configFile) {
if (in_array($configFile, $excludedConfigurationFiles)) {
continue;
}
output('Refreshing database list for configuration file: ' . $configFile, $verbose);
$config['config_file'] = $configFile;
include($config['paths']['config'] . $configFile . '.php');
$out = '';
if (isset($config['dbconnection']) && is_resource($config['dbconnection'])) {
((is_null($___mysqli_res = mysqli_close($config['dbconnection']))) ? false : $___mysqli_res);
$config['dbconnection'] = false;
}
SetDefault();
output($out, $verbose);
}
/**
* @param string $message
* @param boolean $verbose
*/
function output($message, $verbose)
{
if ($verbose) {
$message = str_replace("\n", NEWLINE, $message);
echo $message . NEWLINE;
}
}
?>

Datei anzeigen

@ -78,7 +78,7 @@ $pageheader=MSDheader().headline($lang['L_RESTORE']);
$aus1=$page_parameter='';
$RestoreFertig=$eingetragen=$dauer=$filegroesse=0;
MSD_mysql_connect($restore['dump_encoding'],true,$restore['actual_table']);
@mysql_select_db($databases['db_actual']) or die($lang['L_DB_SELECT_ERROR'].$databases['db_actual'].$lang['L_DB_SELECT_ERROR2']);
@mysqli_select_db($GLOBALS["___mysqli_ston"], $databases['db_actual']) or die($lang['L_DB_SELECT_ERROR'].$databases['db_actual'].$lang['L_DB_SELECT_ERROR2']);
// open backup file
$restore['filehandle']=($restore['compressed']==1) ? gzopen($config['paths']['backup'].$restore['filename'],'r') : fopen($config['paths']['backup'].$restore['filename'],'r');
@ -118,9 +118,9 @@ if ($restore['filehandle'])
// Disable Keys of actual table to speed up restoring
if (is_array($restore['tables_to_restore'])&&sizeof($restore['tables_to_restore'])>0&&in_array($restore['actual_table'],$restore['tables_to_restore']))
{
@mysql_query('/*!40000 ALTER TABLE `'.$restore['actual_table'].'` DISABLE KEYS */;',$config['dbconnection']);
@mysqli_query($config['dbconnection'], '/*!40000 ALTER TABLE `'.$restore['actual_table'].'` DISABLE KEYS */;');
}
elseif (sizeof($restore['tables_to_restore'])==0&&($restore['actual_table']>''&&$restore['actual_table']!='unbekannt')) @mysql_query('/*!40000 ALTER TABLE `'.$restore['actual_table'].'` DISABLE KEYS */;',$config['dbconnection']);
elseif ((!is_array($restore['tables_to_restore'])||sizeof($restore['tables_to_restore'])==0)&&($restore['actual_table']>''&&$restore['actual_table']!='unbekannt')) @mysqli_query($config['dbconnection'], '/*!40000 ALTER TABLE `'.$restore['actual_table'].'` DISABLE KEYS */;');
WHILE (($a<$restore['anzahl_zeilen'])&&(!$restore['fileEOF'])&&($dauer<$restore['max_zeit'])&&!$restore['EOB'])
{
@ -128,22 +128,22 @@ if ($restore['filehandle'])
if ($sql_command>'')
{
//WriteLog(htmlspecialchars($sql_command));
$res=mysql_query($sql_command,$config['dbconnection']);
$res=mysqli_query($config['dbconnection'], $sql_command);
if (!$res===false)
{
$anzsql=mysql_affected_rows($config['dbconnection']);
$anzsql=mysqli_affected_rows($config['dbconnection']);
// Anzahl der eingetragenen Datensaetze ermitteln (Indexaktionen nicht zaehlen)
$command=strtoupper(substr($sql_command,0,7));
if ($command=='INSERT ')
{
$anzsql=mysql_affected_rows($config['dbconnection']);
$anzsql=mysqli_affected_rows($config['dbconnection']);
if ($anzsql>0) $restore['eintraege_ready']+=$anzsql;
}
}
else
{
// Bei MySQL-Fehlern sofort abbrechen und Info ausgeben
$meldung=@mysql_error($config['dbconnection']);
$meldung=@((is_object($config['dbconnection'])) ? mysqli_error($config['dbconnection']) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false));
if ($meldung!='')
{
if (strtolower(substr($meldung,0,15))=='duplicate entry')
@ -306,4 +306,4 @@ else
}
echo $complete_page;
ob_end_flush();
?>
?>

Datei anzeigen

@ -124,7 +124,7 @@ if ($sql_to_display_data==1)
if (isset($_POST['tableselect'])&&$_POST['tableselect']!='1') $tablename=$_POST['tableselect'];
MSD_mysql_connect();
mysql_select_db($db,$config['dbconnection']);
mysqli_select_db($config['dbconnection'], $db);
///*** EDIT / UPDATES / INSERTS ***///
///*** ***///
@ -295,4 +295,4 @@ function FormHiddenParams()
$s.='<input type="hidden" name="order" value="'.$order.'">';
$s.='<input type="hidden" name="orderdir" value="'.$orderdir.'">';
return $s;
}
}