130 Commits

Author SHA1 Message Date
6829495ca9 *Corregido que no aparecía el mensaje de bienvenida al hacer login en la aplicación 2014-10-23 19:28:38 +02:00
12ff042c1d Merge branch 'release/1.17' into develop
* release/1.17:
  Eliminados los mensajes de aviso de php en todos los archivos php, actualizada la versión y el changelog
2014-07-29 21:41:51 +02:00
37f7e1a6cf Eliminados los mensajes de aviso de php en todos los archivos php, actualizada la versión y el changelog 2014-07-29 21:29:32 +02:00
c42fae0514 Merge branch 'feature/warnings' into develop
* feature/warnings:
  Modificado el README para eliminar los saltos de línea introducidos por el editor online
  Modificado el README para eliminar los saltos de línea introducidos por el editor online
  Modificados los programas para eliminar todos los "warnings" de php

Conflicts:
	README.md
2014-07-29 21:23:52 +02:00
0e38e97ff5 Modificado el README para eliminar los saltos de línea introducidos por el editor online 2014-07-29 21:21:27 +02:00
9105f92c26 Modificado el README para eliminar los saltos de línea introducidos por el editor online 2014-07-29 21:19:28 +02:00
1b64dba9b2 Modificado el README para eliminar los saltos de línea introducidos por el editor online 2014-07-29 21:14:54 +02:00
52ddeee4ba Modificados los programas para eliminar todos los "warnings" de php 2014-07-29 21:12:37 +02:00
c6bc31a275 Merge branch 'release/1.16' into develop 2014-07-29 17:12:26 +02:00
rmontanana
f5577a4119 Fix #41. Corrige las llamadas que se hacían a instalar.php en lugar de a Instalar.php desde Inventario.php y desde Instalar.php 2014-07-28 15:54:29 +02:00
rmontanana
5676f75b97 Actualizado el README para incluir las estadísticas de ohloh 2014-07-28 15:44:17 +02:00
c0b0878a74 Merge branch 'release/1.15' into develop
* release/1.15:
  Actualizado el número de versión a 1.15
2014-06-29 21:22:58 +02:00
9a8ba799c4 Actualizado el número de versión a 1.15 2014-06-29 21:22:20 +02:00
2452d2a9e6 Merge branch 'develop' of bitbucket.org:rmontanana/inventario2 into develop
# By rmontanana
# Via rmontanana
* 'develop' of bitbucket.org:rmontanana/inventario2:
  Corregido codificación/decodificación de la cadena de búsqueda en la URL
  Fix #40 Crear la opción de clonar registro en Mantenimiento. -Crear iconos de clonado en todos los estilos. -Corregido determinaAccion en Imagen para aceptar el clonado
2014-06-29 21:03:00 +02:00
rmontanana
b48b206950 Corregido codificación/decodificación de la cadena de búsqueda en la URL 2014-06-29 21:01:38 +02:00
rmontanana
a72ef244cd Fix #40 Crear la opción de clonar registro en Mantenimiento.
-Crear iconos de clonado en todos los estilos.
-Corregido determinaAccion en Imagen para aceptar el clonado
2014-06-29 09:40:36 +02:00
cc2129e7d9 Corregido que aparezca el código de artículo en las etiquetas qr del inventario de Artículos
Añadida la creación del directorio de imágenes en las instrucciones de instalación del README
2014-06-08 18:25:13 +02:00
14e5767eb1 Merge branch 'release/1.14.1' into develop
* release/1.14.1:
  Actualizado el CHANGELOG
2014-06-02 19:44:52 +02:00
b89fcbd2ec Actualizado el CHANGELOG 2014-06-02 19:44:33 +02:00
068596af7f Merge branch 'hotfix/1.14.1' into develop
* hotfix/1.14.1:
2014-06-02 19:41:22 +02:00
77f766366d Añadido la v para indicar la versión en la cabecera de los informes
Acortado el nombre de la aplicación en la página principal para que en dispositivos pequeños se visualice bien con el icono nuevo del manual
2014-06-01 23:55:13 +02:00
0ab3bf7eb3 Añadidos enlaces a manual y a aplicación de ejemplo en readme.md 2014-06-01 23:15:26 +02:00
db4e283a0d Arreglado que los créditos salgan centrados en lugar de alineados a la derecha 2014-06-01 22:59:49 +02:00
792ca3cb86 Merge branch 'release/1.14'
* release/1.14:
  Versión 1.14
  -Añadido icono de acceso a la documentación en la barra superior en la plantilla -Actualizado CHANGELOG -Corregido un cierre de etiqueta h5 en el pie de los créditos
  Añade la rama git en la pantalla de inicio en caso de que no sea la rama master, con un botón que al pulsarlo salen los créditos
  Fix #39. Devuelve la versión de las bibliotecas/módulos utilizados en la aplicación si el usuario tiene perfil de Configuración, en caso contrario tan sólo el listado de bibliotecas y su licencia.
  Ref #37. Filtra las cadenas de entrada en Mantenimiento Añadido logo QR
  -Corregido el nombre de la clase base en Pdf_mysql para que no haya problemas en sistemas que diferencian mayúsculas/minúsculas -Añadido el botón volver en Configuración
  Fix #36. Añadido límite caracteres en los campos de texto a 35 caracteres en Configuración. Añadido el número de columnas en resoluciones pequeñas y grandes en Configuración.
2014-06-01 19:03:29 +02:00
2b60a418ac Versión 1.14 2014-06-01 18:22:37 +02:00
c0bfedd276 -Añadido icono de acceso a la documentación en la barra superior en la plantilla
-Actualizado CHANGELOG
-Corregido un cierre de etiqueta h5 en el pie de los créditos
2014-05-30 00:14:00 +02:00
7354982f2f Añade la rama git en la pantalla de inicio en caso de que no sea la rama master, con un botón que al pulsarlo salen los créditos 2014-05-27 23:31:03 +02:00
0204f9a3b2 Fix #39. Devuelve la versión de las bibliotecas/módulos utilizados en la aplicación si el usuario tiene perfil de Configuración, en caso contrario tan sólo el listado de bibliotecas y su licencia. 2014-05-27 22:36:45 +02:00
rmontanana
d1a593ff53 Ref #37. Filtra las cadenas de entrada en Mantenimiento
Añadido logo QR
2014-05-07 11:43:22 +02:00
604c01e306 -Corregido el nombre de la clase base en Pdf_mysql para que no haya problemas en sistemas que diferencian mayúsculas/minúsculas
-Añadido el botón volver en Configuración
2014-05-06 22:58:10 +02:00
rmontanana
5e561294b3 Fix #36. Añadido límite caracteres en los campos de texto a 35 caracteres en Configuración. Añadido el número de columnas en resoluciones pequeñas y grandes en Configuración. 2014-05-06 14:53:13 +02:00
bcfe044e63 Merge branch 'release/1.12' into develop 2014-05-06 13:19:00 +02:00
85ce241df7 Merge branch 'release/1.12' 2014-05-06 13:18:59 +02:00
rmontanana
1ff3f6acf2 Añadido valores comunes en los mensajes de ayuda de configuración 2014-05-06 13:18:37 +02:00
rmontanana
da254740cf Añadido valores comunes en los mensajes de ayuda de configuración 2014-05-06 13:17:02 +02:00
rmontanana
7bb740821d -Añadida la columna de cantidad ubicada en mantenimiento de artículos
-Fix #35. Cambiados los informes de Articulos y Ubicaciones para recoger el campo Nº de elementos
-Fix #35. Añadido el campo Nº de elementos en el mantenimiento de Articulos y Ubicaciones a través de archivo xml
-Fix #31. Añadido el directorio temporal en el archivo de configuración
2014-05-05 19:48:30 +02:00
rmontanana
140a554630 -Añadido enlace a inventario de artículo e inventario de ubicación en los id de los mantenimientos de Artículos y Ubicaciones. 2014-04-30 00:29:24 +02:00
rmontanana
75e8c14cf8 -Mantenimiento muestra el 'Titulo' del campo tanto en Consulta como en el formulario de edición.
-Muestra cuadro de búsqueda y mensaje correcto cuando no se encuentra la cadena de búsqueda en Mantenimiento
-Cambiados los informes de Articulos y Ubicaciones para recoger el campo Nº de elementos
-Añadido el campo Nº de elementos en el mantenimiento de Articulos y Ubicaciones a través de archivo xml
-Actualizado CHANGELOG
2014-04-29 14:40:45 +02:00
ebe0d77961 Merge branch 'hotfix/1.11b' 2014-04-26 02:53:23 +02:00
da30f625ed Merge branch 'hotfix/1.11b' into develop 2014-04-26 02:53:23 +02:00
rmontanana
d7bfa748f3 Cambiada la referencia de Apli 2014-04-26 02:52:54 +02:00
a12b289e01 Merge branch 'release/1.11' into develop 2014-04-26 02:20:30 +02:00
5119614455 Merge branch 'release/1.11' 2014-04-26 02:20:29 +02:00
rmontanana
a87e8016fc Actualizada la versión a 1.11 2014-04-26 02:19:44 +02:00
70887f5b62 Merge branch 'feature/Fix32y33' into develop 2014-04-26 02:18:34 +02:00
rmontanana
e7eda6ae01 Añadido un tooltip a los campos ajax para informar que se pueden editar con doble click
Añadido cierre de etiquetas en Importación
2014-04-26 02:17:55 +02:00
2d6514b264 Añadido alineación de campos en la consulta de Mantenimiento a partir de la definición en xml 2014-04-25 18:55:22 +02:00
b28c1e3683 Añadido diálogo antes de realizar el inventario total
Añadido cuadro para resaltar el nombre del centro en la pantalla inicial
Añadidos cambios a CHANGELOG
2014-04-24 23:51:02 +02:00
rmontanana
fce421116d Actualizado CHANGELOG 2014-04-24 14:44:12 +02:00
rmontanana
ce796b3684 Fix#34 Corregido que salga una etiqueta por cada elemento reflejado en cantidad.
Fix#33 Hay que hacer doble click para editar ajax
Fix#32 Añadido mensaje y enlace al tipo de etiquetas que utiliza y corregido mensaje de error de conexión a base de datos de SQL
2014-04-24 12:27:31 +02:00
13e4c12069 Merge branch 'release/1.10' into develop
* release/1.10:
  Cambiado número de versión a 1.10
2014-04-21 03:12:43 +02:00
9a77339af6 Merge branch 'release/1.10'
* release/1.10:
  Cambiado número de versión a 1.10
  Cambiado CHANGELOG y mensaje de usuario/clave incorrecto para que tenga fondo rojo
  Añadidos los botones de acción en Mantenimiento tipo bootstrap y en Configuración se puede seleccionar este estilo.
2014-04-21 03:12:42 +02:00
6668596611 Cambiado número de versión a 1.10 2014-04-21 03:11:31 +02:00
5edee2b517 Merge branch 'feature/iconosBootstrap' into develop
* feature/iconosBootstrap:
  Cambiado CHANGELOG y mensaje de usuario/clave incorrecto para que tenga fondo rojo
  Añadidos los botones de acción en Mantenimiento tipo bootstrap y en Configuración se puede seleccionar este estilo.
2014-04-21 03:07:46 +02:00
b8d071619f Cambiado CHANGELOG y mensaje de usuario/clave incorrecto para que tenga fondo rojo 2014-04-21 03:06:30 +02:00
rmontanana
e7dea5a8a9 Añadidos los botones de acción en Mantenimiento tipo bootstrap y en Configuración se puede seleccionar este estilo. 2014-04-19 01:33:41 +02:00
921d5a36e0 Merge branch 'hotfix/Ajaxminuscula'
* hotfix/Ajaxminuscula:
  Versión 1.091
  -Cambiado el enlace de ajax a Ajax
2014-04-16 00:41:59 +02:00
ec03e8c295 Merge branch 'hotfix/Ajaxminuscula' into develop
* hotfix/Ajaxminuscula:
  Versión 1.091
  -Cambiado el enlace de ajax a Ajax
2014-04-16 00:41:59 +02:00
2d1bbc45e6 Versión 1.091 2014-04-16 00:41:26 +02:00
2853e312f7 -Cambiado el enlace de ajax a Ajax 2014-04-16 00:40:42 +02:00
0151adfb3d Merge branch 'release/1.09'
* release/1.09:
  Versión 1.09
  Corregido un error que permitía poner cantidades negativas en edición ajax
  Corregido error de que se vean los campos idUbicaciones e idArticulos en el mantenimiento de elementos, estos campos son necesarios para que funcione el select en ajax
  Añadido soporte de select2 en la edición ajax
  Añadido el cambio en ChangeLog
  Añadidos los comentarios en instalar y en los archivos de SQL. Quitada la creación de tablas de los archivos inv-iso e inv-utf.
  -Incluido x-editable -Incluido Ajax incluido campos select
  -Incluido x-editable -Incluido Ajax funcionando en cantidad, falta incluir especificación ajax/tipo en tablas y en xml
  Cambiado .gitignore para ignorar las imágenes dentro de img.data Eliminada la imagen de ejemplo
2014-04-16 00:23:52 +02:00
060e52580a Merge branch 'release/1.09' into develop
* release/1.09:
  Versión 1.09
2014-04-16 00:23:52 +02:00
d8ff235af2 Versión 1.09 2014-04-16 00:23:20 +02:00
d474e66776 Merge branch 'feature/AjaxEdit' into develop
* feature/AjaxEdit:
  Corregido un error que permitía poner cantidades negativas en edición ajax
  Corregido error de que se vean los campos idUbicaciones e idArticulos en el mantenimiento de elementos, estos campos son necesarios para que funcione el select en ajax
  Añadido soporte de select2 en la edición ajax
  Añadido el cambio en ChangeLog
  Añadidos los comentarios en instalar y en los archivos de SQL. Quitada la creación de tablas de los archivos inv-iso e inv-utf.
  -Incluido x-editable -Incluido Ajax incluido campos select
  -Incluido x-editable -Incluido Ajax funcionando en cantidad, falta incluir especificación ajax/tipo en tablas y en xml
2014-04-15 23:40:40 +02:00
6ac83883f4 Corregido un error que permitía poner cantidades negativas en edición ajax 2014-04-15 23:34:32 +02:00
d7769e94e4 Corregido error de que se vean los campos idUbicaciones e idArticulos en el mantenimiento de elementos, estos campos son necesarios para que funcione el select en ajax 2014-04-15 23:25:20 +02:00
71b4d3fd00 Añadido soporte de select2 en la edición ajax 2014-04-15 13:52:13 +02:00
2b56798b24 Añadido el cambio en ChangeLog 2014-04-15 02:15:53 +02:00
baeaef02c4 Añadidos los comentarios en instalar y en los archivos de SQL. Quitada la creación de tablas de los archivos inv-iso e inv-utf. 2014-04-15 01:39:57 +02:00
bdf6c6bf88 -Incluido x-editable
-Incluido Ajax incluido campos select
2014-04-14 18:49:14 +02:00
53fa37b2d6 -Incluido x-editable
-Incluido Ajax funcionando en cantidad, falta incluir especificación ajax/tipo en tablas y en xml
2014-04-14 10:47:34 +02:00
bf1c7e4b4b Merge branch 'master' into develop
Conflicts:
	.gitignore
2014-04-13 01:33:27 +02:00
a25e8a6c1a Merge branch 'hotfix/Fix#30BotonBuscarImg.data' 2014-04-09 13:09:29 +02:00
rmontanana
a34058f1c5 Actualización de Changelog y de la versión 2014-04-09 13:09:12 +02:00
rmontanana
91c55fd3f6 Fix #30. Arreglado el que no hacía nada el botón de buscar y cambiado el texto por el icono.
Arreglado un problema con los directorios tmp e img.data que no estaban en git y no se creaban.
2014-04-09 13:06:38 +02:00
a6871606e0 Merge branch 'develop' of https://bitbucket.org/rmontanana/inventario2 into develop
* 'develop' of https://bitbucket.org/rmontanana/inventario2:
  Cambiado .gitignore para ignorar las imágenes dentro de img.data Eliminada la imagen de ejemplo
  -Fix #29. Añade el programa instalar.php en el proceso de instalación en README.md -Fix #29. Añadida la tabla de módulos/bibliotecas utilizados en los créditos. -Fix #28. Corrige que el informe pedido desde matenimiento salga en una ventana nueva.
2014-04-09 09:09:53 +02:00
f45bff57a6 Cambiado .gitignore para ignorar las imágenes dentro de img.data
Eliminada la imagen de ejemplo
2014-04-08 23:28:26 +02:00
25e0264b27 Cambiado .gitignore para ignorar las imágenes dentro de img.data 2014-04-08 23:24:33 +02:00
f0e76f92b5 Eliminada la imagen de ejemplo 2014-04-08 23:16:35 +02:00
f6fec3bdf3 Merge branch 'release/1.081'
* release/1.081:
  -Fix #29. Añade el programa instalar.php en el proceso de instalación en README.md -Fix #29. Añadida la tabla de módulos/bibliotecas utilizados en los créditos. -Fix #28. Corrige que el informe pedido desde matenimiento salga en una ventana nueva.
2014-04-08 22:01:29 +02:00
336cab29ef -Fix #29. Añade el programa instalar.php en el proceso de instalación en README.md
-Fix #29. Añadida la tabla de módulos/bibliotecas utilizados en los créditos.
-Fix #28. Corrige que el informe pedido desde matenimiento salga en una ventana nueva.
2014-04-08 21:06:31 +02:00
46815ed595 Merge branch 'develop' of https://bitbucket.org/rmontanana/inventario2 into develop
# By rmontanana (5) and Ricardo Montañana (2)
# Via rmontanana (5) and Ricardo Montañana (1)
* 'develop' of https://bitbucket.org/rmontanana/inventario2:
  Corregido el problema de que no funciona la impresión de informes desde el mantenimiento. Close #27
  Actualizada la versión
  Quitados los comentarios y el código anteriormente utilizado
  -Los informes aparecen ahora en la pantalla de la aplicación embebidos. -Añadido un calendario al pulsar sobre la fecha en la cabecera de la aplicación. -Corregido pequeño problema de margen en resoluciones pequeñas donde se solapaba parte del menú. -Quitados los logos de GPLv3, MySQL y Apache -Inventario.php llama al instalador si la aplicación no está instalada
  solve #23 Arreglado añadiendo en insertar un valor null en el caso de "NOHACERNADA" Arreglado pequeño problema de formato del grid bootstrap en resoluciones pequeñas.
  Programa de instalación casi terminado. Incluido validador de formularios javascript.
  Primer paso del programa de instalación
2014-04-08 14:17:08 +02:00
4cf4354dbc Merge branch 'hotfix/errorInformeManten#27' 2014-04-07 23:54:10 +02:00
17c907795f Merge branch 'hotfix/errorInformeManten#27' into develop 2014-04-07 23:54:10 +02:00
rmontanana
a8cad22add Corregido el problema de que no funciona la impresión de informes desde el mantenimiento. Close #27 2014-04-07 23:52:38 +02:00
70ee68d14d Merge branch 'release/1.08' 2014-04-07 23:13:10 +02:00
1bfeb891e6 Merge branch 'release/1.08' into develop 2014-04-07 23:13:10 +02:00
rmontanana
4b5c927081 Actualizada la versión 2014-04-07 23:10:23 +02:00
a3a8cd69b2 Merge branch 'feature/instalador' into develop 2014-04-07 23:02:23 +02:00
rmontanana
aa84cabf83 Quitados los comentarios y el código anteriormente utilizado 2014-04-07 23:01:25 +02:00
rmontanana
911af4825f -Los informes aparecen ahora en la pantalla de la aplicación embebidos.
-Añadido un calendario al pulsar sobre la fecha en la cabecera de la aplicación.
-Corregido pequeño problema de margen en resoluciones pequeñas donde se solapaba parte del menú.
-Quitados los logos de GPLv3, MySQL y Apache
-Inventario.php llama al instalador si la aplicación no está instalada
2014-04-07 22:56:09 +02:00
rmontanana
1a5266d201 solve #23 Arreglado añadiendo en insertar un valor null en el caso de "NOHACERNADA"
Arreglado pequeño problema de formato del grid bootstrap en resoluciones pequeñas.
2014-04-06 04:15:32 +02:00
ce08900d13 Programa de instalación casi terminado. Incluido validador de formularios javascript. 2014-04-05 04:33:06 +02:00
50bbd8efad Merge branch 'develop' of https://bitbucket.org/rmontanana/inventario2 into develop
* 'develop' of https://bitbucket.org/rmontanana/inventario2:
  Versión 1.07
  -Añadido bootstrap-select a la solicitud de informes de inventario de esta forma se pueden buscar artículos o ubicaciones en el select -Añadido bootstrap-select al mantenimiento para que en el alta de elementos se puedan buscar artículos o ubicaciones en el el select -Corregido un problema que permitía cambiar fechas en el formulario de bajas
2014-04-02 14:06:13 +02:00
33d8648eff Primer paso del programa de instalación 2014-04-01 01:54:58 +02:00
1a39a4589a Merge branch 'release/1.07'
* release/1.07:
  Versión 1.07
  -Añadido bootstrap-select a la solicitud de informes de inventario de esta forma se pueden buscar artículos o ubicaciones en el select -Añadido bootstrap-select al mantenimiento para que en el alta de elementos se puedan buscar artículos o ubicaciones en el el select -Corregido un problema que permitía cambiar fechas en el formulario de bajas
2014-03-31 18:41:41 +02:00
fce2119543 Versión 1.07 2014-03-31 18:39:54 +02:00
2bab18ec4a -Añadido bootstrap-select a la solicitud de informes de inventario de esta forma se pueden buscar artículos o ubicaciones en el select
-Añadido bootstrap-select al mantenimiento para que en el alta de elementos se puedan buscar artículos o ubicaciones en el el select
-Corregido un problema que permitía cambiar fechas en el formulario de bajas
2014-03-30 19:32:09 +02:00
9edbcbdbae Merge branch 'release/1.06'
* release/1.06:
  Añadido el campo id como ordenable en la creación de la base de datos (articulos y ubicaciones) y en los mantenimientos de usuarios y elementos.
  Actualizada la versión a 1.06
  -img: Cambiadas las flechas de sentido ascendente y descendente (intercambiar) para ser coherente con las indicaciones en la cabecra de la tabla.
  -Configuracion: Añadido icono en el botón de aceptar.                 	  Cambiado el mensaje de éxito en la grabación de los cambios. -CopiaSeguridad: Añadidos iconos en los botones de aceptar y volver. -Csv: Añadidos iconos en los botones de acción. -Importacion: Añadidos iconos en los botones de acción.                        Cambiado el control de subida de fichero por el de Jasny.                        Cambiado el formato para controlar las columnas que ocupa el formulario de subida para que sea 'responsive' -AportaContenido: Quitado 'de' del mensaje de opción actual en Mantenimiento para acortar mensaje. -InformeInventario: Añadidos iconos en los botones de acción.                     	        Cambiado el formato para que sea correcto en todas las resoluciones de pantalla. -Mantenimiento: Añadidos iconos en los botones de acción.                 Añadidas flechas para indicar el campo que marca el orden de visualización. -bootstrap.html: Añadida la opción de cerrar sesión en resolución pequeña.                  	    Añadida una textura al fondo de la cabecera.                  	    Cambios en las dimensiones de los contenedores para mejorar la visualización. -img/fondos: Añadidos algunos ficheros de texturas para poder utilizarlos en el futuro. -CHANGELOG: Añadido este fichero para llevar un registro de cambios entre versiones.
  Revert "Eliminada imagen de ejemplo"
2014-03-29 00:26:32 +01:00
72557aab64 Merge branch 'release/1.06' into develop
* release/1.06:
  Añadido el campo id como ordenable en la creación de la base de datos (articulos y ubicaciones) y en los mantenimientos de usuarios y elementos.
2014-03-29 00:26:32 +01:00
82b4ce3bbf Añadido el campo id como ordenable en la creación de la base de datos (articulos y ubicaciones) y en los mantenimientos de usuarios y elementos. 2014-03-29 00:25:10 +01:00
79dd1c72f2 Merge branch 'feature/patronesFondo' into develop
* feature/patronesFondo:
  Actualizada la versión a 1.06
  -img: Cambiadas las flechas de sentido ascendente y descendente (intercambiar) para ser coherente con las indicaciones en la cabecra de la tabla.
  -Configuracion: Añadido icono en el botón de aceptar.                 	  Cambiado el mensaje de éxito en la grabación de los cambios. -CopiaSeguridad: Añadidos iconos en los botones de aceptar y volver. -Csv: Añadidos iconos en los botones de acción. -Importacion: Añadidos iconos en los botones de acción.                        Cambiado el control de subida de fichero por el de Jasny.                        Cambiado el formato para controlar las columnas que ocupa el formulario de subida para que sea 'responsive' -AportaContenido: Quitado 'de' del mensaje de opción actual en Mantenimiento para acortar mensaje. -InformeInventario: Añadidos iconos en los botones de acción.                     	        Cambiado el formato para que sea correcto en todas las resoluciones de pantalla. -Mantenimiento: Añadidos iconos en los botones de acción.                 Añadidas flechas para indicar el campo que marca el orden de visualización. -bootstrap.html: Añadida la opción de cerrar sesión en resolución pequeña.                  	    Añadida una textura al fondo de la cabecera.                  	    Cambios en las dimensiones de los contenedores para mejorar la visualización. -img/fondos: Añadidos algunos ficheros de texturas para poder utilizarlos en el futuro. -CHANGELOG: Añadido este fichero para llevar un registro de cambios entre versiones.
2014-03-28 23:57:08 +01:00
f947cecb50 Actualizada la versión a 1.06 2014-03-28 23:56:10 +01:00
5d950f5d3e -img: Cambiadas las flechas de sentido ascendente y descendente (intercambiar) para ser coherente con las indicaciones en la cabecra de la tabla. 2014-03-28 22:34:11 +01:00
4d8fc637a8 -Configuracion: Añadido icono en el botón de aceptar.
Cambiado el mensaje de éxito en la grabación de los cambios.
-CopiaSeguridad: Añadidos iconos en los botones de aceptar y volver.
-Csv: Añadidos iconos en los botones de acción.
-Importacion: Añadidos iconos en los botones de acción.
                       Cambiado el control de subida de fichero por el de Jasny.
                       Cambiado el formato para controlar las columnas que ocupa el formulario de subida para que sea 'responsive'
-AportaContenido: Quitado 'de' del mensaje de opción actual en Mantenimiento para acortar mensaje.
-InformeInventario: Añadidos iconos en los botones de acción.
                    	        Cambiado el formato para que sea correcto en todas las resoluciones de pantalla.
-Mantenimiento: Añadidos iconos en los botones de acción.
                Añadidas flechas para indicar el campo que marca el orden de visualización.
-bootstrap.html: Añadida la opción de cerrar sesión en resolución pequeña.
                 	    Añadida una textura al fondo de la cabecera.
                 	    Cambios en las dimensiones de los contenedores para mejorar la visualización.
-img/fondos: Añadidos algunos ficheros de texturas para poder utilizarlos en el futuro.
-CHANGELOG: Añadido este fichero para llevar un registro de cambios entre versiones.
2014-03-28 21:46:15 +01:00
0110adc05f Revert "Eliminada imagen de ejemplo"
This reverts commit 9250cab634.
2014-03-27 20:30:45 +01:00
9250cab634 Eliminada imagen de ejemplo 2014-03-26 23:37:34 +01:00
031c4823cb Merge branch 'master' of bitbucket.org:rmontanana/inventario2 2014-03-26 16:52:28 +01:00
rmontanana
8f82272592 solve #24 Arreglado añadiendo en insertar un valor null en el caso de "NOHACERNADA"
Arreglado pequeño problema de formato del grid bootstrap en resoluciones pequeñas.
 Changes to be committed:
	modified:   Mantenimiento.php
	modified:   plant/bootstrap.html
2014-03-26 16:50:31 +01:00
rmontanana
445f94091a solve #23 Arreglado añadiendo en insertar un valor null en el caso de "NOHACERNADA"
Arreglado pequeño problema de formato del grid bootstrap en resoluciones pequeñas.
2014-03-26 16:31:24 +01:00
fd10368dba Corregido el archivo de carga de datos para incluir los campos en la instrucción de insertar los registros 2014-03-25 00:05:32 +01:00
28dc36ff3b Fusionado #22ImagenElemento con master 2014-03-23 18:30:29 +01:00
acb8cb8bd7 Fusionado #22ImagenElemento con master 2014-03-23 18:29:15 +01:00
6bcd2513d1 ref #22 Añadido el campo imagen también a ubicaciones. 2014-03-23 18:25:28 +01:00
c1841d12de ref #22 Cambiada la realización de la copia de seguridad para incluir un diálogo previo a la realización y para incluir el directorio de imágenes. Empaqueta en un archivo .tar tanto la copia de la base de datos como el archivo comprimido del directorio de imágenes. 2014-03-23 18:16:55 +01:00
58703f0d90 ref #22 Terminada la gestión de imágenes en elementos.
- Añadido un campo imagen a Artículos
- Añadido un control javascript para que no se puedan introducir caracteres en los campos numéricos
- Añadido el directorio donde guardar las imágenes en configuracion.inc (no se puede editar)
- Cambiado setup.sql para que se añadan los campos de imagen en ambas tablas en una instalación inicial
- Versión 1.05 en fichero de configuración.
2014-03-23 03:47:09 +01:00
db43f56c03 ref #22 Terminadas las bajas y las inserciones, faltan las modificaciones 2014-03-22 04:12:03 +01:00
rmontanana
fe638850b1 ref #9 Creada la visualización de imágenes en consulta y en edición.
Realizada la inserción de registros con imágenes.
2014-03-22 02:56:09 +01:00
84f77f6701 Añadido que visualice tanto en la pantalla de consulta como en la de edición y baja la imagen almacenada.
Falta hacer que se inserte el dato de la imagen y se guarde la imagen subida, que admita modificaciones y eliminaciones de imagen y que elimine la imagen en la baja.
2014-03-21 00:06:48 +01:00
e5d43e7eaa Pequeño cambio en los literales de las opciones seleccionadas (se quita el punto final en algunas de ellas). 2014-03-19 13:46:06 +01:00
141efb9506 resolve #1
-Corregido mensaje de error en Pdf_mysql_table
-Los informes de tablas se gestionan ahora en AportaContenido en lugar de en Inventario
-El enlace al informe en Mantenimiento incluye en la URL los datos de filtrado y orden
-Las definiciones de los informes incluyen variables para el orden y el filtrado
-El mantenimiento de usuarios permite buscar usuarios y lo tiene en cuenta para el informe
2014-03-19 13:39:14 +01:00
74fdea8e08 Versión 1.04
- Separado el fichero de configuración del de versión
- Arreglado que el menú de la aplicación colapse en resoluciones pequeñas
- Añadidos los ficheros de fuentes que se habían cambiado
- Arreglado el nombre del fichero FPDF.php para que coincida con el nombre de la clase
- Añadido el puerto a la configuración de MySQL y añadido el puerto y el servidor como parámetros a la copia de seguridad
2014-03-19 03:38:03 +01:00
70cf5eb542 Versión 1.04
- Separado el fichero de configuración del de versión
- Arreglado que el menú de la aplicación colapse en resoluciones pequeñas
- Añadidos los ficheros de fuentes que se habían cambiado
- Arreglado el nombre del fichero FPDF.php para que coincida con el nombre de la clase
2014-03-19 03:26:28 +01:00
b680e3142b problemas con el nombre de FPDF.php 2014-03-19 03:24:56 +01:00
a0dd082434 Versión 1.04
- Separado el fichero de configuración del de versión
- Arreglado que el menú de la aplicación colapse en resoluciones pequeñas
- Añadidos los ficheros de fuentes que se habían cambiado
2014-03-19 03:22:53 +01:00
f6a480f828 #9 Corregido el problema de detectar http y https en el enlace de la url de llamada. 2014-03-17 23:45:13 +01:00
c9a3cd83a5 resolve#9 Creadas las etiquetas de artículos con código qr y paginación. 2014-03-16 21:54:32 +01:00
rmontanana
8ffd97b474 Versión 1.03:
incluye: borrados ficheros innecesarios y recolocado upgrade.php en sql

Terminado el mantenimiento con:
-Control de la url de vuelta
-funcionamiento correcto de la cadena de búsqueda con la ordenación, edición, etc.
-funcionamiento correcto de la paginación y el orden con la edición, borrado, etc.
-mensaje de inserción de registros con nuevo formato y redirección con tiempo.

Arreglado que salía mantenimiento de Artículos cuando se solicitaba Matenimiento de Elementos.
2014-03-12 10:56:53 +01:00
rmontanana
caae389c93 AportaContenido: Arreglado el mensaje de Mantenimiento de Elementos que aparecía de artículos.
Mantenimiento, Sql y *xml: Arreglado el mantenimiento para que gestione bien la URL y trabaje bien el paginador y la cadena de búsqueda coordinado con la edición, las inserciones y el borrado. También se han añadido mensajes mejorados en Mantenimiento.
2014-03-12 09:24:17 +01:00
rmontanana
42eb01c27e Mejora en la visualización de la tabla de Configuración en resoluciones pequeñas. 2014-03-11 13:21:16 +01:00
104 changed files with 17957 additions and 5708 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,2 @@
nbproject
tmp/*
.DS_Store

88
Ajax.php Normal file
View File

@@ -0,0 +1,88 @@
<?php
/**
* @package Inventario
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* This file is part of Inventario.
* Inventario is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Inventario is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Inventario. If not, see <http://www.gnu.org/licenses/>.
*
*/
//Clase encargada de procesar las peticiones ajax
require_once 'inc/configuracion.inc';
require_once 'Sql.php';
$ajax = new Ajax();
echo $ajax->procesa();
class Ajax {
private $sql;
private $tabla;
public function __construct()
{
$this->sql = new Sql(SERVIDOR, USUARIO, CLAVE, BASEDATOS);
if ($this->sql->error()) {
return $this->respuesta($this->mensaje(false, 'Error conectando con la Base de Datos'));
};
$this->tabla = $_GET['tabla'];
}
private function respuesta($mensaje)
{
header('Content-Type: application/json', true, 200);
return $mensaje;
}
public function procesa()
{
$opc = $_GET['opc'];
switch ($opc) {
case "get": return $this->obtiene();
case "put": return $this->actualiza();
}
}
private function mensaje($exito, $texto)
{
return json_encode(array("success" => $exito, "msj" => $texto));
}
private function actualiza()
{
if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
$comando = "update " . mysql_escape_string($this->tabla) . " set " . mysql_escape_string($_POST['name']) . " = '" . mysql_escape_string($_POST['value']) . "' where id = '" . mysql_escape_string($_POST['pk']). "';";
$this->sql->ejecuta($comando);
$exito = !$this->sql->error();
$mensaje = $this->sql->mensajeError();
$resp = $this->mensaje($exito, $mensaje);
return $this->respuesta($resp);
}
}
private function obtiene()
{
if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
$comando = "select id, descripcion from " . $this->tabla . " order by descripcion asc;";
$this->sql->ejecuta($comando);
$exito = !$this->sql->error();
$mensaje = $this->sql->mensajeError();
if (!$exito) {
return $this->respuesta($this->mensaje($exito, $mensaje));
}
$filas = array();
while($r = $this->sql->procesaResultado()) {
$filas[] = array($r['id'] => $r['descripcion']);
}
$resp = json_encode($filas);
return $this->respuesta($resp);
}
}
}
?>

View File

@@ -1,5 +1,4 @@
<?php
/**
* @package Inventario
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez
@@ -25,9 +24,30 @@ define('PIE', '<center><a target="_blank" href="http://www.gnu.org/licenses/gpl-
'<a target="_blank" href="http://www.php.net"><img src="img/php.gif" alt="PHP Language" /></a> </center>');
define('FORMULARIO_ACCESO', '<form name="formulario_acceso" action="index.php?registrarse" method="POST">' .
'Usuario<br><input type="text" name="usuario" value="" size="8" /><br><br>Clave<br><input type="password" name="clave" value="" size="8" />' .
'<br><br><input type="submit" value="Iniciar" name="iniciar" /></form>');
'<br><br><button type="submit" name="iniciar" class="btn btn-primary">Iniciar <span class="glyphicon glyphicon-log-in"></span></button></form>');
define('MENSAJE_DEMO', 'Puede Iniciar sesi&oacute;n con<br>usuario <i><b>demo</b></i><br>contrase&ntilde;a <i>demo</i><br>');
define('USUARIO_INCORRECTO', '<label class="error">Usuario y clave incorrectos!</label><br><br>');
define('USUARIO_INCORRECTO', '<label class="bg-danger">Usuario y clave incorrectos!</label><br><br>');
define('CREDITOS_CABECERA', '<div class="modal fade" tabindex="-1" id="creditos" role="dialog" aria-labelledby="modalCreditos" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4>Créditos</h4>
</div>
<div class="modal-body">
<div class="jumbotron">
<img src="img/qrlogo.png" class="img-responsive img-rounded" style="float:left">
<h1>Inventario2</h1>
<p> Aplicación para controlar el inventario de un centro educativo.</p>
<p>En la aplicación se hace uso de los siguientes módulos y/o bibliotecas</p>');
define('CREDITOS_PIE', ' <p><h5>Copyright &copy; 2008-2014 Ricardo Montañana Gómez</h5>
<h5><small>Esta aplicación se distribuye con licencia <a target="_blank" href="http://www.gnu.org/licenses/gpl-3.0.html">GPLv3 </a></small></h5></p>
</div>
</div>
</div>
</div>
</div>');
// Esta clase aportará el contenido a la plantilla
class AportaContenido {
@@ -68,6 +88,12 @@ class AportaContenido {
*/
private $perfil;
/**
*
* @var array Datos pasados en la URL
*/
private $datosURL = array();
// El constructor necesita saber cuál es la opción actual
/**
* Constructor de la clase.
@@ -77,7 +103,8 @@ class AportaContenido {
* @param array $perfil Permisos de acceso del usuario
* @param String $opcion Opción elegida por el usuario
*/
public function __construct($baseDatos, $registrado, $usuario, $perfil, $opcion) {
public function __construct($baseDatos, $registrado, $usuario, $perfil, $opcion)
{
$this->bdd = $baseDatos;
$this->miMenu = new Menu('inc/inventario.menu');
$this->registrado = $registrado;
@@ -85,6 +112,35 @@ class AportaContenido {
$this->perfil = $perfil;
$this->opcionActual = $opcion;
}
/**
* Devuelve una tabla HTML con el contenido de las bibliotecas/módulos utilizadas en la aplicación
* Si el perfil del usuario es de Configuración devuelve también las versiones de las bibliotecas
* @return string
*/
public function creaTablaAcercaDe()
{
$poner = $this->perfil['Config'];
$tabla = '<table class="table table-condensed">';
$tabla .='<thead><tr><th>Biblioteca/Módulo</th>'.($poner?'<th>Versión</th>':'').'<th>Licencia</th></tr></thead>';
$tabla .='<tbody>';
$tabla .='<tr><td><a href="http://jquery.com/" target="_blank">jquery</a></td>'.($poner?'<td>2.1.0</td>':'').'<td><a target="_blank" href="https://jquery.org/license/">MIT</a></td>';
$tabla .='<tr><td><a href="http://getbootstrap.com/" target="_blank">Twitter Bootstrap</a></td>'.($poner?'<td>3.1.1</td>':'').'<td><a target="_blank" href="https://github.com/twbs/bootstrap/blob/master/LICENSE">MIT</a></td>';
$tabla .='<tr><td><a href="http://www.fpdf.org/" target="_blank">FPDF</a></td>'.($poner?'<td>1.7</td>':'').'<td>Libre</td>';
$tabla .='<tr><td><a href="http://phpqrcode.sourceforge.net/" target="_blank">PHP QR Code Enconder</a></td>'.($poner?'<td>1.1.4</td>':'').'<td><a target="_blank" href="http://www.gnu.org/licenses/lgpl-3.0.txt">LGPL</a></td>';
$tabla .='<tr><td><a href="http://stefangabos.ro/php-libraries/zebra-image/" target="_blank">Zebra_Image</a></td>'.($poner?'<td>2.2.3</td>':'').'<td><a target="_blank" href="http://www.gnu.org/licenses/lgpl-3.0.txt">LGPL</a></td>';
$tabla .='<tr><td><a href="http://jasny.github.io/bootstrap/" target="_blank">Jasny Bootstrap</a></td>'.($poner?'<td>3.1.0</td>':'').'<td><a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a></td>';
$tabla .='<tr><td><a href="http://1000hz.github.io/bootstrap-validator/" target="_blank">Bootstrap Validator</a></td>'.($poner?'<td>0.2.1</td>':'').'<td><a target="_blank" href="https://github.com/1000hz/bootstrap-validator/blob/master/LICENSE">MIT</a></td>';
$tabla .='<tr><td><a href="https://github.com/tkrotoff/jquery-simplecolorpicker" target="_blank">jquery-simplecolorpicker</a></td>'.($poner?'<td>0.3.0</td>':'').'<td><a target="_blank" href="https://github.com/tkrotoff/jquery-simplecolorpicker/blob/master/LICENSE.txt">MIT</a></td>';
$tabla .='<tr><td><a href="http://eonasdan.github.io/bootstrap-datetimepicker/" target="_blank">Bootstrap datetimepicker</a></td>'.($poner?'<td>2.1.32</td>':'').'<td><a target="_blank" href="https://github.com/Eonasdan/bootstrap-datetimepicker/blob/master/src/js/bootstrap-datetimepicker.js">MIT</a></td>';
$tabla .='<tr><td><a href="http://silviomoreto.github.io/bootstrap-select/" target="_blank">Bootstrap-select</a></td>'.($poner?'<td>1.5.4</td>':'').'<td><a target="_blank" href="https://github.com/silviomoreto/bootstrap-select">MIT</a></td>';
$tabla .='<tr><td><a href="https://github.com/vitalets/x-editable" target="_blank">X-editable</a></td>'.($poner?'<td>1.5.1</td>':'').'<td><a target="_blank" href="https://github.com/vitalets/x-editable/blob/master/LICENSE-MIT">MIT</a></td>';
$tabla .='<tr><td><a href="http://momentjs.com/" target="_blank">Moment.js</a></td>'.($poner?'<td>2.5.1</td>':'').'<td><a target="_blank" href="https://github.com/moment/moment/blob/develop/LICENSE">MIT</a></td>';
$tabla .='</tbody>';
$tabla .='</table>';
return $tabla;
}
/**
* Devuelve la fecha actual
@@ -92,7 +148,8 @@ class AportaContenido {
* @param string $idioma idioma para formatear la fecha, p.ej. es_ES
* @return string
*/
public function fechaActual($formato = '', $idioma = 'es_ES') {
public function fechaActual($formato = '', $idioma = 'es_ES')
{
if ($formato == '')
$formato = "%d-%b-%y";
setlocale(LC_TIME, $idioma);
@@ -103,7 +160,8 @@ class AportaContenido {
*
* @return string Mensaje el usuario debe registrarse.
*/
private function mensajeRegistro() {
private function mensajeRegistro()
{
return 'Debe registrarse para acceder a este apartado';
}
@@ -115,17 +173,31 @@ class AportaContenido {
* @param string $parametros Parámetros del método
* @return string Contenido devuelto por el método
*/
public function __call($metodo, $parametros) {
public function __call($metodo, $parametros)
{
switch ($metodo) { // Dependiendo del método invocado
case 'titulo': // devolvemos el título
return APLICACION;
case 'usuario':
if ($this->registrado)
return "Usuario=$this->usuario";
else
return '';
case 'fecha': return $this->fechaActual();
case 'aplicacion': return APLICACION;
case 'fecha':
$script = '<script type="text/javascript">
$(function () {
$(' . "'#fechaCabecera'" . ").datetimepicker({
pick12HourFormat: false,
language: 'es',
pickTime: false
});
});
</script>";
$campo = '<input type="hidden" name="fechaCabecera" id="fechaCabecera" value="' . $this->fechaActual("%d/%m/%Y") . '">';
$etiqueta = '<label for="fechaCabecera" onClick="$(' . "'#fechaCabecera'" . ").data('DateTimePicker').show();" . '">' . $this->fechaActual() . '</label>';
return $etiqueta . $campo . $script;
case 'aplicacion':
$nombre = explode(" ", PROGRAMA);
$nombre = $nombre[2];
return $nombre . " v" . VERSION;
case 'menu': // el menú
if ($this->registrado) {
return $this->miMenu->insertaMenu();
@@ -138,20 +210,24 @@ class AportaContenido {
return $salida;
}
case 'opcion':
list($opcion, $parametro) = explode("&", $this->opcionActual);
if (strstr($this->opcionActual, "&")) {
list($opcion, $parametro) = explode("&", $this->opcionActual);
} else {
$opcion = $this->opcionActual; $parametro = "";
}
switch ($opcion) {
case 'bienvenido':
return "Men&uacute; Principal";
case 'principal':
return "Pantalla Inicial";
case 'elementos':
case 'articulos': $opcion = "art&iacute;culos";
case 'elementos':
case 'ubicaciones':
case 'usuarios':
case 'test':
return "Mantenimiento de " . ucfirst($opcion) . ".";
return "Mantenimiento " . ucfirst($opcion);
case 'configuracion':
return 'Configuraci&oacute;n y Preferencias.';
return 'Configuraci&oacute;n y Preferencias';
case 'informeInventario':return "Informe de Inventario";
case 'descuadres':return 'Informe de descuadres';
case 'importacion': return 'Importaci&oacute;n de datos';
@@ -160,7 +236,7 @@ class AportaContenido {
return '';
case 'control':
if ($this->registrado)
return '<a href="index.php?cerrarSesion">Cerrar Sesi&oacute;n</a>';
return '<a href="index.php?cerrarSesion">Cerrar Sesi&oacute;n <span class="glyphicon glyphicon-log-out"></span></a>';
else
return '';
// Para incluir el contenido central de la página
@@ -172,15 +248,52 @@ class AportaContenido {
// if (!$this->registrado) {
// return $this->mensajeRegistro();
// }
list($opcion, $parametro) = explode("&", $this->opcionActual);
if (strstr($this->opcionActual, "&")) {
list($opcion, $parametro) = explode("&", $this->opcionActual);
} else {
$opcion = $this->opcionActual; $parametro = "";
}
switch ($opcion) {
case 'bienvenido':
$mensaje = '<div class="alert alert-success">';
$mensaje .= 'Bienvenid@ ' . $this->usuario . '</div>';
case 'principal': // contenido inicial
return '<br><br><center><img src="img/logo.png" alt="' . PROGRAMA . '">' .
'<br><label>' . CENTRO . '</label></center><br><br>' . PIE;
if (!isset($mensaje)) {
$mensaje = "";
}
$creditos = "$('#creditos').modal({keyboard: false});";
$centro = '<div class="well well-sm">' . CENTRO . '</div>';
$tabla = $this->creaTablaAcercaDe();
$rama_texto = trim(substr(file_get_contents('.git/HEAD'), 16));
$rama = ($rama_texto != 'master' ? '<br><button class="btn btn-warning btn-xs" type="button"onClick="' . $creditos . '"><span class="glyphicon glyphicon-cog"></span> '.$rama_texto.'</button></center>':'');
return $mensaje . '<br><br><center><img src="img/qrlogo.png" alt="' . PROGRAMA . '" onClick="' . $creditos . '" >' .
'<br><br><label onClick="' . $creditos . '">' . $centro . '</label>' . $rama . '</center>' . CREDITOS_CABECERA . $tabla . CREDITOS_PIE;
case 'articulos':
case 'ubicaciones':
case 'test':
case 'elementos':
$this->cargaDatosURL();
if ($this->datosURL['opc'] == "informe") {
if ($this->perfil['Informe']) {
$this->procesaURL();
$fichero = 'xml/informe' . ucfirst($opcion) . '.xml';
$salida = TMP.'/informe' . ucfirst($opcion) . '.xml';
//Establece los posibles parámetros del listado.
$orden = $this->datosURL['orden'];
$sentido = $this->datosURL['sentido'] == "asc" ? ' ' : ' desc ';
$filtro = isset($this->datosURL['buscar']) ? $this->bdd->filtra($this->datosURL['buscar']) : '';
$plantilla = file_get_contents($fichero) or die('Fallo en la apertura de la plantilla ' . $fichero);
$plantilla = str_replace("{filtro}", $filtro, $plantilla);
$plantilla = str_replace("{orden}", $orden . $sentido, $plantilla);
file_put_contents($salida, $plantilla) or die('Fallo en la escritura de la plantilla ' . $salida);
$informe = new InformePDF($this->bdd, $salida, $this->registrado);
$informe->crea($salida);
$informe->cierraPDF();
return $this->devuelveInforme($informe);
} else {
return $this->mensajePermisos("Informes");
}
}
if ($this->perfil['Consulta']) {
$ele = new Mantenimiento($this->bdd, $this->perfil, $opcion);
return $ele->ejecuta();
@@ -189,15 +302,33 @@ class AportaContenido {
}
case 'usuarios':
if ($this->perfil['Usuarios']) {
$this->cargaDatosURL();
if ($this->datosURL['opc'] == "informe") {
if (!$this->pefil['Informe']) {
$this->procesaURL();
$fichero = 'xml/informe' . ucfirst($opcion) . '.xml';
$salida = TMP.'/informe' . ucfirst($opcion) . '.xml';
//Establece los posibles parámetros del listado.
$orden = $this->datosURL['orden'];
$sentido = $this->datosURL['sentido'] == "asc" ? ' ' : ' desc ';
$filtro = isset($this->datosURL['buscar']) ? $this->bdd->filtra($this->datosURL['buscar']) : '';
$plantilla = file_get_contents($fichero) or die('Fallo en la apertura de la plantilla ' . $fichero);
$plantilla = str_replace("{filtro}", $filtro, $plantilla);
$plantilla = str_replace("{orden}", $orden . $sentido, $plantilla);
file_put_contents($salida, $plantilla) or die('Fallo en la escritura de la plantilla ' . $salida);
$informe = new InformePDF($this->bdd, $salida, $this->registrado);
$informe->crea($salida);
$informe->cierraPDF();
return $this->devuelveInforme($informe);
} else {
return $this->mensajePermisos("Informes");
}
}
$ele = new Mantenimiento($this->bdd, $this->perfil, $opcion);
return $ele->ejecuta();
} else {
return $this->mensajePermisos('Usuarios');
}
case 'bienvenido': // El usuario quiere iniciar sesión
return 'Bienvenid@ ' . $this->usuario . '<br><br><center><img src="img/codigoBarras.png" alt="' . PROGRAMA . '">' .
'<br><label>' . CENTRO . '</label></center><br><br>' . PIE;
case 'configuracion':
if ($this->perfil['Config']) {
$conf = new Configuracion();
@@ -212,17 +343,6 @@ class AportaContenido {
} else {
return $this->mensajePermisos('Informes');
}
case 'descuadres':
if ($this->perfil['Informe']) {
$enlace = 'xml/informe' . ucfirst($opcion) . '.xml';
$informe = new InformePDF($this->bdd, $enlace, $this->registrado);
$informe->crea($enlace);
$informe->cierraPDF();
$informe->imprimeInforme();
return;
} else {
return $this->mensajePermisos('Informes');
}
case 'importacion':
if ($this->perfil['Modificacion'] && $this->perfil['Borrado']) {
$import = new Importacion($this->bdd, $this->registrado);
@@ -232,31 +352,19 @@ class AportaContenido {
}
case 'copiaseg':
if ($this->perfil['Config']) {
$archivo_sql = "tmp/copiaseg.sql";
$archivo = $archivo_sql . ".gz";
if (file_exists($archivo)) {
unlink($archivo);
}
$comando = escapeshellcmd(MYSQLDUMP . ' -u ' . USUARIO . ' --password=' . CLAVE . ' --result-file=' . $archivo_sql . ' ' . BASEDATOS);
$comando2 = escapeshellcmd(GZIP . ' -9f ' . $archivo_sql);
exec($comando);
exec($comando2);
if (filesize($archivo) < 1024) {
//No se ha realizado la copia de seguridad
$mensaje = "La copia de seguridad no se ha realizado correctamente.<br><br>";
$mensaje .= "Compruebe que las rutas a los programas mysqldump y gzip en configuraci&oacute;n est&aacute;n correctamente establecidas ";
$mensaje .= "y que los datos de acceso a la base de datos sean correctos.<br>";
$mensaje .= "mysqldump=[" . MYSQLDUMP . "]<br>";
$mensaje .= "gzip=[" . GZIP . "]";
$cabecera = "ERROR";
$tipo = "danger";
$copia = new CopiaSeguridad();
if (isset($_GET['confirmado']) && $_GET['confirmado'] == "1") {
if (!$copia->creaCopia()) {
$tipo = "danger";
$cabecera = "ERROR";
} else {
$tipo = "info";
$cabecera = "INFORMACIÓN";
}
return $this->panel($cabecera, $copia->mensaje(), $tipo);
} else {
$mensaje .= 'Copia de seguridad realizada con &eacute;xito.<br><br>Pulse sobre el siguiente enlace para descargar:<br><br>';
$mensaje .= '<a href="' . $archivo . '">Descargar Copia de Seguridad de Datos</a><br>';
$cabecera = "Informaci&oacute;n";
$tipo = "success";
return $copia->dialogo();
}
return $this->panel($cabecera,$mensaje,$tipo);
} else {
return $this->mensajePermisos("Copias de seguridad");
}
@@ -277,16 +385,40 @@ class AportaContenido {
}
}
public function cargaDatosURL()
{
$this->datosURL['opc'] = isset($_GET['opc']) ? $_GET['opc'] : 'inicial';
$this->datosURL['orden'] = isset($_GET['orden']) ? $_GET['orden'] : 'id';
$this->datosURL['sentido'] = isset($_GET['sentido']) ? $_GET['sentido'] : 'asc';
$this->datosURL['pag'] = isset($_GET['pag']) ? $_GET['pag'] : '0';
$this->datosURL['buscar'] = isset($_GET['buscar']) ? $_GET['buscar'] : null;
$this->datosURL['id'] = isset($_GET['id']) ? $_GET['id'] : null;
}
/**
*
* @param string $tipo
* @return string
*/
public function mensajePermisos($tipo) {
public function mensajePermisos($tipo)
{
return $this->panel("ERROR", "No tiene permiso para acceder a $tipo", "danger");
}
public function panel($cabecera, $mensaje, $tipo) {
private function devuelveInforme($informe)
{
$letras = "abcefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
$nombre = TMP."/informe" . substr(str_shuffle($letras), 0, 10) . ".pdf";
$informe->guardaArchivo($nombre);
return '<div class="container">
<!--<a href="' . $nombre . '" target="_blank"><span class="glyphicon glyphicon-cloud-download" style="font-size:1.5em;"></span>Descargar Informe</a>-->
<object data="' . $nombre . '" type="application/pdf" width="100%" height="700" style="float:left;">
</object>
</div>';
}
public function panel($cabecera, $mensaje, $tipo)
{
$panel = '<div class="panel panel-' . $tipo . '"><div class="panel-heading">';
$panel .= '<h3 class="panel-title">' . $cabecera . '</h3></div>';
$panel .= '<div class="panel-body">';
@@ -294,7 +426,5 @@ class AportaContenido {
$panel .= '</div>';
return $panel;
}
}
?>
?>

101
CHANGELOG Normal file
View File

@@ -0,0 +1,101 @@
Version 1.17 29-07-2014
-Eliminados los mensajes de aviso de php en todos los archivos php
Versión 1.16 28-07-2014
-Fix #41. Arregla las llamadas a Instalar.php que se hacían desde Inventario.php y desde Instalar.php
Versión 1.15 29-06-2014
-Crear la opción de clonar registro en Mantenimiento.
-Crear iconos de clonado en todos los estilos.
-Corregido determinaAccion en Imagen para aceptar el clonado
-Corregido codificación/decodificación de la cadena de búsqueda en la URL
Versión 1.14.1 02-06-2014
-Añadidos enlaces a manual y a aplicación de ejemplo en readme.md
-Arreglado que los créditos salgan centrados en lugar de alineados a la derecha
-Añadido la 'v' para indicar la versión en la cabecera de los informes
-Acortado el nombre de la aplicación en la página principal para que en dispositivos pequeños se visualice bien con el icono nuevo del manual
Versión 1.14 01-06-2014
-Añadido icono de acceso a la documentación en la barra superior
-Corregido cierre etiqueta h5 en pie de créditos
-Añade la rama git en la pantalla de inicio en caso de que no sea la rama master, con un botón que al pulsarlo salen los créditos
-Fix #39. Devuelve la versión de las bibliotecas/módulos utilizados en la aplicación si el usuario tiene perfil de Configuración, en caso contrario tan sólo el listado de bibliotecas y su licencia.
-Corregido el nombre de la clase base en Pdf_mysql para que no haya problemas en sistemas que diferencian mayúsculas/minúsculas
-Añadido el botón volver en Configuración
-Fix #36. Añadido límite caracteres en los campos de texto a 35 caracteres en Configuración. Añadido el número de columnas en resoluciones pequeñas y grandes en Configuración.
Versión 1.12 06-05-2014
-Mantenimiento muestra el 'Titulo' del campo tanto en Consulta como en el formulario de edición
-Muestra cuadro de búsqueda y mensaje correcto cuando no se encuentra la cadena de búsqueda en Mantenimiento
-Añadidos mensajes de ayuda en los campos de configuración
-Añadida la columna de cantidad ubicada en mantenimiento de artículos
-Fix #35. Cambiados los informes de Articulos y Ubicaciones para recoger el campo Nº de elementos
-Fix #35. Añadido el campo Nº de elementos en el mantenimiento de Articulos y Ubicaciones a través de archivo xml
-Fix #31. Añadido el directorio temporal en el archivo de configuración
Versión 1.11b 26-04-2014
-Cambiada la referencia de etiquetas Apli
Versión 1.11 26-04-2014
-Fix #34 Corregido que salga una etiqueta por cada elemento reflejado en cantidad.
-Fix #33 Hay que hacer doble click para editar ajax
-Fix #32 Añadido mensaje y enlace al tipo de etiquetas que utiliza y corregido mensaje de error de conexión a base de datos de SQL
-Añadido diálogo antes de realizar el inventario total.
-Añadido cuadro para resaltar el nombre del centro en la pantalla inicial.
-Cambiada la alineación de los campos en Mantenimiento para utilizar el atributo Ajuste
Versión 1.10 21-04-2014
-Corregido error en el nombre del archivo de la clase ajax que estaba en minúsculas
-Añadidos botones de acción tipo bootstrap en Mantenimiento y añadido a configuración en estilo
-Informe de inventario de Artículo o Ubicación desde id y edición ajax de la descripción
-Cambiado mensaje de usuario/clave incorrectos para poner un fondo de color rojo
Versión 1.09 16-04-2014
-Añadida la biblioteca X-Edit
-Añadida actualización Ajax en Mantenimiento
Versión 1.082 09-04-2014
-Ahora git tiene en cuenta los directorios tmp e img.data y no tiene en cuenta su contenido
-Fix #30. Arreglado el botón de buscar que no enviaba los datos. Cambiado el texto por la lupa.
Versión 1.081 08-04-2014
-Fix #29. Añade el programa instalar.php en el proceso de instalación en README.md
-Fix #29. Añadida la tabla de módulos/bibliotecas utilizados en los créditos.
-Fix #28. Corrige que el informe pedido desde matenimiento salga en una ventana nueva.
Versión 1.08 07-04-2014
-Los informes aparecen ahora en la pantalla de la aplicación embebidos.
-Añadido un calendario al pulsar sobre la fecha en la cabecera de la aplicación.
-Corregido pequeño problema de margen en resoluciones pequeñas donde se solapaba parte del menú.
-Quitados los logos de GPLv3, MySQL y Apache
-Inventario.php llama al instalador si la aplicación no está instalada
-Añadido dialogo modal de Créditos cuando se pulsa sobre el gráfico de código de barras de la aplicación o sobre el nombre del centro
-Quitados los usuarios de ejemplo en el archivo setup.sql
-Creado el programa instalar.php que permitirá configurar el acceso a la base de datos, comprobar la configuración del servidor y la creación del usuario administrador
-Añadido un parámetro en el archivo configuracion.inc que permite o no ejecutar el programa instalar.php
Versión 1.07 31-03-2014
-Añadido bootstrap-select a la solicitud de informes de inventario de esta forma se pueden buscar artículos o ubicaciones en el select
-Añadido bootstrap-select al mantenimiento para que en el alta de elementos se puedan buscar artículos o ubicaciones en el el select
-Corregido un problema que permitía cambiar fechas en el formulario de bajas
Versión 1.06 28-03-2014
-Configuracion: Añadido icono en el botón de aceptar.
Cambiado el mensaje de éxito en la grabación de los cambios.
-CopiaSeguridad: Añadidos iconos en los botones de aceptar y volver.
-Csv: Añadidos iconos en los botones de acción.
-Importacion: Añadidos iconos en los botones de acción.
Cambiado el control de subida de fichero por el de Jasny.
Cambiado el formato para controlar las columnas que ocupa el formulario de subida para que sea 'responsive'
-AportaContenido: Quitado 'de' del mensaje de opción actual en Mantenimiento para acortar mensaje.
-InformeInventario: Añadidos iconos en los botones de acción.
Cambiado el formato para que sea correcto en todas las resoluciones de pantalla.
-Mantenimiento: Añadidos iconos en los botones de acción.
Añadidas flechas para indicar el campo que marca el orden de visualización.
-bootstrap.html: Añadida la opción de cerrar sesión en resolución pequeña.
Añadida una textura al fondo de la cabecera.
Cambios en las dimensiones de los contenedores para mejorar la visualización.
-img/fondos: Añadidos algunos ficheros de texturas para poder utilizarlos en el futuro.
-CHANGELOG: Añadido este fichero para llevar un registro de cambios entre versiones.
-img: Cambiadas las flechas de sentido ascendente y descendente (intercambiar) para ser coherente con las indicaciones en la cabecra de la tabla.

View File

@@ -1,231 +1,173 @@
<?php
/**
* @package Inventario
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* This file is part of Inventario.
* Inventario is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Inventario is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Inventario. If not, see <http://www.gnu.org/licenses/>.
*
*/
class Configuracion {
private $nombreCentro;
private $numFilas;
private $estilo;
private $servidor;
private $baseDatos;
private $usuario;
private $clave;
private $configuracion="inc/configuracion.inc";
private $confNueva="inc/configuracion.new";
private $confAnterior="inc/configuracion.ant";
private $plantilla;
private $colorLateral;
private $colorFondo;
private $mysqldump; //comando mysqldump para la copia de seguridad
private $gzip; //comando gzip para comprimir la copia de seguridad
public function ejecuta()
{
$fichero=file_get_contents($this->configuracion,FILE_TEXT);
$datos=explode("\n",$fichero);
$grabar=isset($_POST['servidor']);
if ($grabar) {
$fsalida=@fopen($this->confNueva,"wb");
}
foreach($datos as $linea) {
if (stripos($linea,"DEFINE")!==false) {
$filtro=str_replace("'","",$linea);
list($clave,$valor)=explode(",",$filtro);
list($resto,$campo)=explode("(",$clave);
list($valor,$resto)=explode(")",$valor);
//$salida.="[$campo]=[$valor]<br>\n";
switch ($campo) {
case 'CENTRO':
$this->nombreCentro=$valor;
if ($grabar) {
$linea=str_replace($valor, $_POST['centro'],$linea);
$this->nombreCentro=$_POST['centro'];
}
break;
case 'NUMFILAS':
$this->numFilas=$valor;
if ($grabar) {
$linea=str_replace($valor, $_POST['filas'],$linea);
$this->numFilas=$_POST['filas'];
}
break;
case 'ESTILO':
$this->estilo=$valor;
if ($grabar) {
$linea=str_replace($valor, $_POST['estilo'],$linea);
$this->estilo=$_POST['estilo'];
}
break;
case 'PLANTILLA':
$this->plantilla=$valor;
if ($grabar) {
$linea=str_replace($valor, $_POST['plantilla'],$linea);
$this->plantilla=$_POST['plantilla'];
}
break;
case 'SERVIDOR':
$this->servidor=$valor;
if ($grabar) {
$linea=str_replace($valor, $_POST['servidor'],$linea);
$this->servidor=$_POST['servidor'];
}
break;
case 'BASEDATOS':
$this->baseDatos=$valor;
if ($grabar) {
$linea=str_replace($valor, $_POST['baseDatos'],$linea);
$this->baseDatos=$_POST['baseDatos'];
}
break;
case 'USUARIO':
$this->usuario=$valor;
if ($grabar) {
$linea=str_replace($valor, $_POST['usuario'],$linea);
$this->usuario=$_POST['usuario'];
}
break;
case 'CLAVE':
$this->clave=$valor;
if ($grabar) {
$linea=str_replace($valor, $_POST['clave'],$linea);
$this->clave=$_POST['clave'];
}
break;
case 'COLORLAT':
$valor = trim($valor);
$this->colorLateral = $valor;
if ($grabar) {
$linea=str_replace($valor,$_POST['colorLat'],$linea);
$this->colorLateral=$_POST['colorLat'];
}
break;
case 'COLORFON':
$valor = trim($valor);
$this->colorFondo = $valor;
if ($grabar) {
$linea=str_replace($valor,$_POST['colorFon'],$linea);
$this->colorFondo=$_POST['colorFon'];
}
break;
case 'MYSQLDUMP':
$valor = trim($valor);
$this->mysqldump = $valor;
if ($grabar) {
$linea=str_replace($valor,$_POST['mysqldump'],$linea);
$this->mysqldump=$_POST['mysqldump'];
}
break;
case 'GZIP':
$valor = trim($valor);
$this->gzip = $valor;
if ($grabar) {
$linea=str_replace($valor,$_POST['gzip'],$linea);
$this->gzip=$_POST['gzip'];
}
break;
}
}
if ($grabar) {
$registro=substr($linea,0,2)=="?>"?$linea:$linea."\n";
fwrite($fsalida,$registro);
}
}
$salida.=$this->formulario();
if ($grabar) {
//$salida.='<label class="warn">Configuraci&oacute;n guardada correctamente</label>';
$salida.='<p class="bg-primary">Configuraci&oacute;n guardada correctamente</p>';
fclose($fsalida);
//unlink($this->confAnterior);
rename($this->configuracion,$this->confAnterior);
rename($this->confNueva,$this->configuracion);
unlink($this->confAnterior);
}
return $salida;
/**
* @package Inventario
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* This file is part of Inventario.
* Inventario is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Inventario is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Inventario. If not, see <http://www.gnu.org/licenses/>.
*
*/
class Configuracion {
private $configuracion = "inc/configuracion.inc";
private $confNueva = "inc/configuracion.new";
private $confAnterior = "inc/configuracion.ant";
private $datosConf;
//Campos del fichero de configuración que se van a editar.
private $lista = array('SERVIDOR', 'PUERTO', 'BASEDATOS', 'BASEDATOSTEST', 'USUARIO', 'CLAVE', 'CENTRO', 'NUMFILAS', 'ESTILO', 'PLANTILLA', 'COLORLAT', 'COLORFON', 'MYSQLDUMP', 'GZIP', 'TMP');
private $campos;
public function __construct()
{
$this->campos = implode(",", $this->lista);
}
//Hecho público para poder efectuar los tests correspondientes.
public function obtieneFichero()
{
return file_get_contents($this->configuracion, FILE_TEXT);
}
public function obtieneLista()
{
return $this->lista;
}
public function obtieneDatos($linea, &$clave, &$valor)
{
$filtro = str_replace("'", "", $linea);
list($clave, $valor) = explode(",", $filtro);
list($resto, $campo) = explode("(", $clave);
list($valor, $resto) = explode(")", $valor);
list($resto, $clave) = explode("(", $clave);
$valor = trim($valor);
}
private function creaTitulo($titulo, $ayuda)
{
return '<td style="vertical-align:middle"><a class="dato" href="#" data-placement="right" data-content="'.$ayuda.'">'.$titulo.'</a></td>';
}
public function ejecuta() {
$fichero = $this->obtieneFichero();
$datos = explode("\n", $fichero);
$grabar = isset($_POST['SERVIDOR']);
if ($grabar) {
$fsalida = @fopen($this->confNueva, "wb");
}
private function formulario()
{
$coloresLateral = array( "Original" => "#C4FAEC", "Verde" => "#7bd148", "Azul marino" => "#5484ed", "Azul" => "#a4bdfc", "Turquesa" => "#46d6db",
"Verde claro" => "#7ae7bf", "Verde oscuro" => "#51b749", "Amarillo" => "#fbd75b", "Naranja" => "#ffb878", "Morado" => "#6633FF",
"Rojo oscuro" => "#dc2127", "P&uacute;rpura" => "#dbadff", "Gris" => "#e1e1e1");
$coloresFondo = array( "Verde" => "#7bd148", "Azul marino" => "#5484ed", "Azul" => "#a4bdfc", "Turquesa" => "#46d6db",
"Verde claro" => "#7ae7bf", "Verde oscuro" => "#51b749", "Amarillo" => "#fbd75b", "Naranja" => "#ffb878", "Rojo" => "#ff887c",
"Rojo oscuro" => "#dc2127", "P&uacute;rpura" => "#dbadff", "Gris" => "#e1e1e1", "Original" => '#F3FEC8');
$personal=$this->estilo=="personal"?'selected':' ';
$bluecurve=$this->estilo=="bluecurve"?'selected':' ';
$cristal=$this->estilo=="cristal"?'selected':' ';
$normal=$this->plantilla=="normal"? 'selected':' ';
$bootstrap=$this->plantilla=="bootstrap" ? 'selected':' ';
$salida='<center><div class="col-sm-4 col-md-6"><form name="configura" method="post">';
//$salida.='<p align="center"><table border=1 class="tablaDatos"><tbody>';
$salida.='<p align="center"><table border=2 class="table table-hover"><tbody>';
$salida.='<th colspan=2 class="info"><center><b>Preferencias</b></center></th>';
$salida.='<tr><td>Nombre del Centro</td><td><input type="text" name="centro" value="'.$this->nombreCentro.'" size="30" /></td></tr>';
$salida.='<tr><td>N&uacute;mero de filas</td><td><input type="text" name="filas" value="'.$this->numFilas.'" size="3" /></td></tr>';
$salida.='<tr><td style="vertical-align:middle">Plantilla</td><td><select name="plantilla" class="form-control">';
$salida.='<option value="normal" '.$normal.'>normal</option>';
$salida.='<option '.$bootstrap.'>bootstrap</option></select></td></tr>';
$salida.='<tr><td style="vertical-align:middle">Estilo</td><td><select name="estilo" class="form-control">';
$salida.='<option value="personal" '.$personal.'>personal</option>';
$salida.='<option '.$bluecurve.'>bluecurve</option>';
$salida.='<option '.$cristal.'>cristal</option></select></td></tr>';
$salida.='<tr><td style="vertical-align:middle">Color Lateral (bootstrap)</td><td style="vertical-align:middle"><select name="colorLat" id="colorLat" class="form-control">';
foreach ($coloresLateral as $color => $codigo) {
$selec = "";
if ($this->colorLateral == $codigo) {
$selec = "selected";
foreach ($datos as $linea) {
if (stripos($linea, "DEFINE") !== false) {
//Comprueba que tenga una definición correcta
$this->obtieneDatos($linea, $clave, $valor);
$this->datosConf[$clave] = $valor;
if ($grabar && stripos($this->campos, $clave) !== false) {
$linea = str_replace($valor, $_POST[$clave], $linea);
$this->datosConf[$clave] = $_POST[$clave];
}
$salida.='<option value="'.$codigo.'" '.$selec.' >'.$color.'</option>';
//$salida = "DatosConf=".var_export($this->datosConf, true) . "stripos = " . stripos($campos, "GZIP");
//$salida .= "Post=" . var_export($_POST, true);
}
$salida.='</select></td></tr>';
$salida.='<tr><td style="vertical-align:middle">Color Fondo (bootstrap)</td><td style="vertical-align:middle"><select name="colorFon" id="colorFon" class="form-control">';
foreach ($coloresFondo as $color => $codigo) {
$selec = "";
if ($this->colorFondo == $codigo) {
$selec = "selected";
}
$salida.='<option value="'.$codigo.'" '.$selec.' >'.$color.'</option>';
if ($grabar) {
$registro = substr($linea, 0, 2) == "?>" ? $linea : $linea . "\n";
fwrite($fsalida, $registro);
}
$salida.='</select></td></tr>';
$salida.='<th colspan=2 class="danger"><center><b>Base de datos</b></center></th>';
$salida.='<tr><td>Servidor</td><td><input type="text" name="servidor" value="'.$this->servidor.'" size="30" /></td></tr>';
$salida.='<tr><td>Base de datos</td><td><input type="text" name="baseDatos" value="'.$this->baseDatos.'" size="30" /></td></tr>';
$salida.='<tr><td>Usuario</td><td><input type="text" name="usuario" value="'.$this->usuario.'" size="30" /></td></tr>';
$salida.='<tr><td>Clave</td><td><input type="text" name="clave" value="'.$this->clave.'" size="30" /></td></tr>';
$salida.='<tr><td>mysqldump</td><td><input type="text" name="mysqldump" value="'.$this->mysqldump.'" size="30" /></td></tr>';
$salida.='<tr><td>gzip</td><td><input type="text" name="gzip" value="'.$this->gzip.'" size="30" /></td></tr>';
$salida.='<tr align=center><td colspan=2><input type="submit" class="btn btn-primary" align="center" value="Aceptar" name="aceptar" /></td></tr></p>';
$salida.='</form></div></center>';
$salida.="<script>
}
$salida = $this->formulario();
if ($grabar) {
$salida.='<div class="alert alert-success">Configuraci&oacute;n guardada correctamente</div>';
fclose($fsalida);
//unlink($this->confAnterior);
rename($this->configuracion, $this->confAnterior);
rename($this->confNueva, $this->configuracion);
unlink($this->confAnterior);
}
return $salida;
}
private function formulario() {
$coloresLateral = array("Original" => "#C4FAEC", "Verde" => "#7bd148", "Azul marino" => "#5484ed", "Azul" => "#a4bdfc", "Turquesa" => "#46d6db",
"Verde claro" => "#7ae7bf", "Verde oscuro" => "#51b749", "Amarillo" => "#fbd75b", "Naranja" => "#ffb878", "Morado" => "#6633FF",
"Rojo oscuro" => "#dc2127", "P&uacute;rpura" => "#dbadff", "Gris" => "#e1e1e1");
$coloresFondo = array("Verde" => "#7bd148", "Azul marino" => "#5484ed", "Azul" => "#a4bdfc", "Turquesa" => "#46d6db",
"Verde claro" => "#7ae7bf", "Verde oscuro" => "#51b749", "Amarillo" => "#fbd75b", "Naranja" => "#ffb878", "Rojo" => "#ff887c",
"Rojo oscuro" => "#dc2127", "P&uacute;rpura" => "#dbadff", "Gris" => "#e1e1e1", "Original" => '#F3FEC8');
$personal = $this->datosConf['ESTILO'] == "personal" ? 'selected' : ' ';
$bluecurve = $this->datosConf['ESTILO'] == "bluecurve" ? 'selected' : ' ';
$cristal = $this->datosConf['ESTILO'] == "cristal" ? 'selected' : ' ';
$bootst = $this->datosConf['ESTILO'] == "bootstrap" ? 'selected' : ' ';
$normal = $this->datosConf['PLANTILLA'] == "normal" ? 'selected' : ' ';
$bootstrap = $this->datosConf['PLANTILLA'] == "bootstrap" ? 'selected' : ' ';
$salida = '<center><div class="col-sm-4 col-md-8"><form name="configura" method="post">';
//$salida.='<p align="center"><table border=1 class="tablaDatos"><tbody>';
$salida.='<p align="center"><table border=2 class="table table-hover"><tbody>';
$salida.='<th colspan=2 class="info"><center><b>Preferencias</b></center></th>';
$salida.='<tr>'.$this->creaTitulo("Nombre del Centro","Nombre que aparecerá en los informes y en la página principal de la aplicación").'<td><input type="text" name="CENTRO" value="' . $this->datosConf['CENTRO'] . '" maxlength="35" size="35" /></td></tr>';
$salida.='<tr>'.$this->creaTitulo("Número de filas","Número de filas que aparecerán en la pantalla de consulta de los maestros. Valor entre 10 y 25.").'<td><input type="number" max="25" min="10" name="NUMFILAS" value="' . $this->datosConf['NUMFILAS'] . '" size="3" /></td></tr>';
$salida.='<tr>'.$this->creaTitulo("Plantilla","Plantilla html utilizada para mostrar el contenido de la aplicación.").'<td><select name="PLANTILLA" class="form-control">';
$salida.='<option value="normal" ' . $normal . '>normal</option>';
$salida.='<option ' . $bootstrap . '>bootstrap</option></select></td></tr>';
$salida.='<tr>'.$this->creaTitulo("Estilo","Estilo de los botones de control en los mantenimientos de los maestros").'<td><select name="ESTILO" class="form-control">';
$salida.='<option value="personal" ' . $personal . '>personal</option>';
$salida.='<option ' . $bluecurve . '>bluecurve</option>';
$salida.='<option ' . $bootst . '>bootstrap</option>';
$salida.='<option ' . $cristal . '>cristal</option></select></td></tr>';
$salida.='<tr>'.$this->creaTitulo("Color Lateral","Color que se aplicará a la parte izquierda de la aplicación donde aparece el menú").'<td style="vertical-align:middle"><select name="COLORLAT" id="COLORLAT" class="form-control">';
foreach ($coloresLateral as $color => $codigo) {
$selec = "";
if (trim($this->datosConf['COLORLAT']) == $codigo) {
$selec = "selected";
}
$salida.='<option value="' . $codigo . '" ' . $selec . ' >' . $color . '</option>';
}
$salida.='</select></td></tr>';
$salida.='<tr>'.$this->creaTitulo("Color Fondo","Color que aparecerá como fondo en todas las pantallas de la aplicación").'<td style="vertical-align:middle"><select name="COLORFON" id="COLORFON" class="form-control">';
foreach ($coloresFondo as $color => $codigo) {
$selec = "";
if (trim($this->datosConf['COLORFON']) == $codigo) {
$selec = "selected";
}
$salida.='<option value="' . $codigo . '" ' . $selec . ' >' . $color . '</option>';
}
$salida.='</select></td></tr>';
$salida.='<tr>'.$this->creaTitulo("Directorio tmp","Directorio donde se almacenarán los archivos temporales de la aplicación y también los archivos e informes que genera").'<td><input type="text" name="TMP" value="' . $this->datosConf['TMP'] . '" maxlength="35" size="35" /></td></tr>';
$salida.='<th colspan=2 class="danger"><center><b>Base de datos</b></center></th>';
$salida.='<tr>'.$this->creaTitulo("Servidor","Nombre o dirección IP del servidor MySQL. Normalmente localhost").'<td><input type="text" name="SERVIDOR" value="' . $this->datosConf['SERVIDOR'] . '" maxlength="35" size="35" /></td></tr>';
$salida.='<tr>'.$this->creaTitulo("Puerto","Número de puerto donde el servidor admite conexiones MySQL. Normalmente 3306").'<td><input type="text" name="PUERTO" value="' . $this->datosConf['PUERTO'] . '" maxlength="35" size="35" /></td></tr>';
$salida.='<tr>'.$this->creaTitulo("Base de datos","Nombre de la base de datos donde se almacenarán los datos de la aplicación").'<td><input type="text" name="BASEDATOS" value="' . $this->datosConf['BASEDATOS'] . '" maxlength="35" size="35" /></td></tr>';
$salida.='<tr>'.$this->creaTitulo("Base de datos Tests","Nombre de la base de datos donde se almacenarán los datos de prueba de la aplicación").'<td><input type="text" name="BASEDATOSTEST" value="' . $this->datosConf['BASEDATOSTEST'] . '" maxlength="35" size="35" /></td></tr>';
$salida.='<tr>'.$this->creaTitulo("Usuario","Usuario con permisos de lectura/escritura en la base de datos").'<td><input type="text" name="USUARIO" value="' . $this->datosConf['USUARIO'] . '" maxlength="35" size="35" /></td></tr>';
$salida.='<tr>'.$this->creaTitulo("Clave","Contraseña del usuario con permisos sobre la base de datos").'<td><input type="text" name="CLAVE" value="' . $this->datosConf['CLAVE'] . '" maxlength="35" size="35" /></td></tr>';
$salida.='<tr>'.$this->creaTitulo("mysqldump","Ruta completa a la utilidad mysqldump. Este programa es necesario para que se puedan hacer las copias de seguridad de la aplicación").'<td><input type="text" name="MYSQLDUMP" value="' . $this->datosConf['MYSQLDUMP'] . '" maxlength="35" size="35" /></td></tr>';
$salida.='<tr>'.$this->creaTitulo("gzip","Ruta completa a la utilidad gzip. Este programa es necesario para que se puedan comprimir las copias de seguridad de la aplicación").'<td><input type="text" name="GZIP" value="' . $this->datosConf['GZIP'] . '" maxlength="35" size="35" /></td></tr>';
$salida.='<tr align=center><td colspan=2>
<a class="btn btn-info" role="button" onClick="location.href=' . "'index.php'" . '"><span class="glyphicon glyphicon-arrow-left"></span> Volver</a>
<button type="submit" class="btn btn-primary" name="aceptar"><span class="glyphicon glyphicon-ok"></span> Aceptar</td></tr></p>';
$salida.='</form></div></center>';
$salida.="<script>
$(document).ready(function() {
$('select[name=" .'"colorFon"'. "]').on('change', function() {
$(document.body).css('background-color', $('select[name=" .'"colorFon"'. "]').val());
$('.main').css('background-color', $('select[name=" .'"colorFon"'. "]').val());
$('select[name=" . '"COLORFON"' . "]').on('change', function() {
$(document.body).css('background-color', $('select[name=" . '"COLORFON"' . "]').val());
$('.main').css('background-color', $('select[name=" . '"COLORFON"' . "]').val());
});
$('select[name=" .'"colorLat"'. "]').on('change', function() {
$('.sidebar').css('background-color', $('select[name=" .'"colorLat"'. "]').val());
$('select[name=" . '"COLORLAT"' . "]').on('change', function() {
$('.sidebar').css('background-color', $('select[name=" . '"COLORLAT"' . "]').val());
});
$('select[name=". '"colorLat"' ."]').simplecolorpicker({theme: 'glyphicons'});
$('select[name=" .'"colorFon"' ."]').simplecolorpicker({theme: 'glyphicons'});
$('select[name=" . '"COLORLAT"' . "]').simplecolorpicker({theme: 'glyphicons'});
$('select[name=" . '"COLORFON"' . "]').simplecolorpicker({theme: 'glyphicons'});
$('.dato').popover({trigger: 'hover'});
});
</script>";
//$salida.="<br>fondo=[$this->colorFondo] lateral=[$this->colorLateral]<br>";
return $salida;
}
return $salida;
}
}
?>

128
CopiaSeguridad.php Normal file
View File

@@ -0,0 +1,128 @@
<?php
/**
* @package Inventario
* @copyright Copyright (c) 2014, Ricardo Montañana Gómez
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* This file is part of Inventario.
* Inventario is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Inventario is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Inventario. If not, see <http://www.gnu.org/licenses/>.
*
*/
class CopiaSeguridad {
private $mensaje;
private $baseDatos;
private $imagenes;
public function creaCopia()
{
if (!$this->copiaBaseDatos()) {
return false;
}
if (!$this->copiaImagenes()) {
return false;
}
if (!$this->empaqueta()) {
return false;
}
return true;
}
public function dialogo()
{
$dialogo = '<div class="container col-5"><div class="jumbotron">
<h1>Copia de Seguridad</h1>
<p>¿Desea realizar una copia de seguridad de todos los datos de la Base de Datos y de todas las Imágenes?</p>
<p><a class="btn btn-primary btn-lg" role="button" onClick="location.href=' . "'index.php'" . '"><span class="glyphicon glyphicon-arrow-left"></span> Volver</a>
<a class="btn btn-success btn-lg" role="button" onClick="location.href=' . "'index.php?copiaseg&confirmado=1'" . '">
<span class="glyphicon glyphicon-cloud-download"></span> Continuar</a></p>
</div></div>';
return $dialogo;
}
private function copiaBaseDatos()
{
$archivo_sql = TMP."/baseDatos" . BASEDATOS . ".sql";
$baseDatosComprimida = $archivo_sql . ".gz";
$this->baseDatos = $baseDatosComprimida;
if (file_exists($baseDatosComprimida)) {
unlink($baseDatosComprimida);
}
$comando = escapeshellcmd(MYSQLDUMP . ' -h ' . SERVIDOR . ' -P ' . PUERTO . ' -u ' . USUARIO . ' --password=' . CLAVE . ' --result-file=' . $archivo_sql . ' ' . BASEDATOS);
$comando2 = escapeshellcmd(GZIP . ' -9f ' . $archivo_sql);
exec($comando);
exec($comando2);
if (filesize($baseDatosComprimida) < 1024) {
//No se ha realizado la copia de seguridad
$mensaje = "La copia de seguridad no se ha realizado correctamente.<br><br>";
$mensaje .= "Compruebe que las rutas a los programas mysqldump y gzip en configuraci&oacute;n est&aacute;n correctamente establecidas ";
$mensaje .= "y que los datos de acceso a la base de datos sean correctos.<br>";
$mensaje .= "mysqldump=[" . MYSQLDUMP . "]<br>";
$mensaje .= "gzip=[" . GZIP . "]";
$this->mensaje = $mensaje;
$this->error = true;
return false;
}
return true;
}
private function copiaImagenes()
{
$copiaImagenes = TMP."/Imagenes.tbz";
$this->imagenes = $copiaImagenes;
if (file_exists($copiaImagenes)) {
unlink($copiaImagenes);
}
$comando = escapeshellcmd('tar cf ' . $copiaImagenes . ' ' . IMAGEDATA);
exec($comando);
if (filesize($copiaImagenes) == 0) {
$this->error = true;
$mensaje = "No se ha podido comprimir el directorio de las imágenes " . IMAGEDATA . "<br>";
$mensaje .= "Compruebe que la ruta de acceso al programa tar en configuraci&oacute;n est&aacute; correctamente establecida";
$this->mensaje = $mensaje;
return false;
}
return true;
}
private function empaqueta()
{
// Empaqueta los dos archivos en el que va a devolver
$nombreCopia = TMP."/Copia" . BASEDATOS . strftime("%Y%m%d%H%M") . ".tar";
if (file_exists($nombreCopia)) {
unlink($nombreCopia);
}
$comando = escapeshellcmd('tar cf ' . $nombreCopia . ' ' . $this->baseDatos . ' ' . $this->imagenes);
exec($comando);
if (filesize($nombreCopia) ==0 || !file_exists($nombreCopia)) {
$this->error = true;
$mensaje = "No se ha creado el paquete con los archivos de imágenes en [<b>" . $this->imagenes . "</b>] y <br>";
$mensaje .= " con el archivo de Base de Datos [<b>" . $this->baseDatos . "</b>]<br><br>";
$mensaje .= "Compruebe que los datos de configuración están correctamente establecidos <br>";
$mensaje .= "El comando de copia fue [" . $comando . "]<br>";
$mensaje .= "gzip=[" . GZIP . "]";
$this->mensaje = $mensaje;
return false;
}
$this->error = false;
unlink ($this->baseDatos);
unlink ($this->imagenes);
$mensaje = 'Copia de seguridad realizada con &eacute;xito.<br><br>Pulse sobre el siguiente enlace para descargar:<br><br>';
$mensaje .= '<a href="' . $nombreCopia . '">Descargar Copia de Seguridad de Datos</a><br><br>';
$mensaje .= 'El paquete de copia contiene un archivo con la copia de la información de la base de datos y un archivo que contiene el directorio de las fotografías e imágenes asociadas a los datos';
$this->mensaje = $mensaje;
return true;
}
public function mensaje ()
{
return $this->mensaje;
}
}
?>

73
Csv.php
View File

@@ -76,7 +76,8 @@ class Csv {
* Constructor de la clase.
* @param BaseDatos $baseDatos Manejador de la base de datos
*/
public function __construct($baseDatos) {
public function __construct($baseDatos)
{
$this->bdd = $baseDatos;
}
@@ -84,7 +85,8 @@ class Csv {
* Crea un fichero csv con el nombre especificado
* @param String $fichero Nombre del fichero
*/
public function crea($fichero) {
public function crea($fichero)
{
$this->nombre = $fichero;
$this->fichero = fopen($this->nombre, "w") or die("No puedo abrir " . $this->nombre . " para escritura.");
}
@@ -93,15 +95,18 @@ class Csv {
*
* @param array $datos escribe la línea en el archivo
*/
public function escribeLinea($datos) {
public function escribeLinea($datos)
{
fputcsv($this->fichero, $datos, ',', '"') or die("No puedo escribir en el fichero csv");
}
public function __destruct() {
public function __destruct()
{
$this->cierra();
}
public function cierra() {
public function cierra()
{
fclose($this->fichero) or die("No puedo cerrar el archivo csv");
}
@@ -109,7 +114,8 @@ class Csv {
*
* @param String $fichero Archivo xml que contiene la definición de la consulta
*/
public function ejecutaConsulta($fichero) {
public function ejecutaConsulta($fichero)
{
$consulta = simplexml_load_file($fichero) or die("No puedo cargar el fichero xml " . $fichero . " al csv");
// Escribe la cabecera del fichero
$this->escribeLinea(array($consulta->Pagina->Cabecera, $consulta->Titulo['id'], $consulta->Titulo['Texto']));
@@ -132,7 +138,8 @@ class Csv {
*
* @param String $ficheroCSV Nombre del archivo csv
*/
public function cargaCSV($ficheroCSV) {
public function cargaCSV($ficheroCSV)
{
$this->nombre = $ficheroCSV;
$this->fichero = fopen($this->nombre, "r") or die('No puedo abrir el archivo ' . $this->nombre . " para lectura.");
list($archivo, $idCabecera, $cabecera) = fgetcsv($this->fichero);
@@ -149,7 +156,8 @@ class Csv {
* Muestra un resumen de los datos del fichero csv cargado por pantalla
*
*/
public function resumen() {
public function resumen()
{
//$mensaje .=
$mensaje = "<center><h1>Archivo [inventario" . $this->cabecera[0] . "]</h1>";
$mensaje .= "<h2>id=[" . $this->cabecera[1] . "] Descripci&oacute;n=[" . $this->cabecera[2] . "]</h2><br>";
@@ -198,8 +206,8 @@ class Csv {
$mensaje .= $this->panelMensaje('Si se produce cualquier error en el procesamiento del fichero, no se aplicar&aacute; ning&uacute;n cambio en la base de datos.');
$mensaje .= '<form method="post" name="Aceptar" action="index.php?importacion&opc=ejecutar">
<input type="button" name="Cancelar" value="Cancelar" onClick="location.href=' . "'index.php'" . '" class="btn btn-danger">
<input type="submit" name="Aceptar" value="Aceptar" class="btn btn-primary">
<button type="button" name="Cancelar" value="Cancelar" onClick="location.href=' . "'index.php'" . '" class="btn btn-danger"><span class="glyphicon glyphicon-remove"></span> Cancelar</button>
<button type="submit" name="Aceptar" class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span> Aceptar</button>
<input type="hidden" name="ficheroCSV" value="' . $this->nombre . '">
</form></center>';
@@ -211,12 +219,14 @@ class Csv {
* @param $array línea de datos del fichero csv para comprobar las cantidades si se han modificado o no
* @return string
*/
private function compruebaCantidades($i) {
$ultimo = count($datos);
private function compruebaCantidades($i)
{
//$ultimo = count($datos);
return $this->datosFichero[$i][$this->cantidadReal] - $this->datosFichero[$i][$this->cantidad];
}
private function panelMensaje($info, $tipo = "danger", $cabecera = "&iexcl;Atenci&oacute;n!") {
private function panelMensaje($info, $tipo = "danger", $cabecera = "&iexcl;Atenci&oacute;n!")
{
$mensaje = '<div class="panel panel-' . $tipo . '"><div class="panel-heading">';
$mensaje .= '<h3 class="panel-title">' . $cabecera . '</h3></div>';
$mensaje .= '<div class="panel-body">';
@@ -226,36 +236,40 @@ class Csv {
return $mensaje;
}
private function escribeLog($comando) {
$fp = fopen($this->nombre.".log", "a");
$linea = strftime("%Y/%m/%d")."|".$this->nombre."|".$comando;
private function escribeLog($comando)
{
$fp = fopen($this->nombre . ".log", "a");
$linea = strftime("%Y/%m/%d") . "|" . $this->nombre . "|" . $comando;
fputs($fp, $linea . "\n");
fclose($fp);
}
private function bajaElemento($i) {
private function bajaElemento($i)
{
$id = $this->datosFichero[$i][$this->idElemento];
$comando = 'delete from Elementos where id="' . $id . '";';
$this->escribeLog($comando);
if (!$this->bdd->ejecuta($comando)) {
throw new Exception("Baja-".$this->bdd->mensajeError, $this->bdd->error);
throw new Exception("Baja-" . $this->bdd->mensajeError, $this->bdd->error);
}
}
private function modificaElemento($i) {
private function modificaElemento($i)
{
$id = $this->datosFichero[$i][$this->idElemento];
$comando = 'update Elementos set Cantidad=' . $this->datosFichero[$i][$this->cantidadReal] . ' where id="' . $id . '";';
$this->escribeLog($comando);
if (!$this->bdd->ejecuta($comando)) {
throw new Exception("Modifica-".$this->bdd->mensajeError, $this->bdd->error);
if (!$this->bdd->ejecuta($comando)) {
throw new Exception("Modifica-" . $this->bdd->mensajeError, $this->bdd->error);
}
}
private function altaElemento($i) {
private function altaElemento($i)
{
if ($this->cabecera[0] == "Articulo") {
$idUbicacion = $this->datosFichero[$i][$this->idUbicacion];
$idArticulo = $this->cabecera[1];
$comando = 'select id from Ubicaciones where Descripcion="'.$this->datosFichero[$i][$this->desUbicacion].'";';
$comando = 'select id from Ubicaciones where Descripcion="' . $this->datosFichero[$i][$this->desUbicacion] . '";';
} else {
$idUbicacion = $this->cabecera[1];
$idArticulo = $this->datosFichero[$i][$this->idArticulo];
@@ -265,11 +279,12 @@ class Csv {
$comando .= '",' . $this->datosFichero[$i][$this->cantidadReal] . ',"' . $this->datosFichero[$i][$this->fechaCompra] . '");';
$this->escribeLog($comando);
if (!$this->bdd->ejecuta($comando)) {
throw new Exception("Alta-".$this->bdd->mensajeError, $this->bdd->error);
throw new Exception("Alta-" . $this->bdd->mensajeError, $this->bdd->error);
}
}
private function cargaIndices($campos) {
private function cargaIndices($campos)
{
for ($i = 0; $i < count($campos); $i++) {
switch ($campos[$i]) {
case "Cant. Real": $this->cantidadReal = $i;
@@ -295,7 +310,8 @@ class Csv {
/**
* Procesa contra la base de datos todas las acciones del archivo
*/
public function ejecutaFichero() {
public function ejecutaFichero()
{
$this->cargaIndices($this->datosFichero[0]);
//Realiza una transacción para que no se ejecute parcialmente una actualización
try {
@@ -322,7 +338,7 @@ class Csv {
}
$mensaje = "Se han procesado correctamente $acciones acciones en la Base de Datos.";
$this->bdd->confirmaTransaccion();
return $this->panelMensaje($mensaje,"success", "Informaci&oacute;n");
return $this->panelMensaje($mensaje, "success", "Informaci&oacute;n");
} catch (Exception $e) {
$this->bdd->abortaTransaccion();
$mensaje = "Se ha producido el error [" . $e->getMessage() . "]<br>NO se ha realizado ning&uacute;n cambio en la Base de Datos.";
@@ -330,7 +346,8 @@ class Csv {
}
}
private function ejecutaFichero2() {
private function ejecutaFichero2()
{
echo '<script>visualizaProgreso();</script>';
for ($i = 1; $i < 80; $i++) {
//sleep(1);

View File

@@ -70,7 +70,7 @@ class Distribucion {
// if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'],'gzip')) {
// // introducimos la cabecera que indica que el contenido está comprimido
// header('Content-Encoding: gzip');
// // y comprime al m<EFBFBD>ximo la información antes de enviarla
// // y comprime al máximo la información antes de enviarla
// return gzencode($pagina, 9);
// }
return $pagina; // enviamos sin comprimir

182
EtiquetasPDF.php Normal file
View File

@@ -0,0 +1,182 @@
<?php
/**
* genera un documento PDF a partir de una descripción dada en un archivo XML
* @author Ricardo Montañana <rmontanana@gmail.com>
* @version 1.0
* @package Inventario
* @copyright Copyright (c) 2008, Ricardo Montañana
* @package Inventario
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* This file is part of Inventario.
* Inventario is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Inventario is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Inventario. If not, see <http://www.gnu.org/licenses/>.
*
*/
require_once 'phpqrcode.php';
class EtiquetasPDF {
/**
*
* @var basedatos Controlador de la base de datos
*/
private $bdd;
private $docu;
private $pdf;
private $def;
private $nombreFichero;
/**
* El constructor recibe como argumento el nombre del archivo XML con la definición, encargándose de recuperarla y guardar toda la información localmente
* @param basedatos $bdd manejador de la base de datos
* @param string $definicion fichero con la definición del informe en XML
* @param boolean $registrado usuario registrado si/no
* @return ficheroPDF
* todo: cambiar este comentario
*/
public function __construct($bdd, $definicion, $registrado)
{
if (!$registrado) {
return 'Debe registrarse para acceder a este apartado';
}
$this->nombreFichero = TMP."/informeEtiquetas.pdf";
// Recuperamos la definición del informe
$this->def = simplexml_load_file($definicion);
$this->bdd = $bdd;
$this->pdf = new FPDF();
$this->pdf->SetMargins(0.2, 0.2, 0.2);
$this->pdf->SetFont('Arial', '', 11);
$this->pdf->setAutoPageBreak(false);
//echo $def->Titulo.$def->Cabecera;
$this->pdf->setAuthor(AUTOR, true);
$creador = CENTRO . " " . PROGRAMA . VERSION;
$this->pdf->setCreator(html_entity_decode($creador), true);
$this->pdf->setSubject($this->def->Titulo, true);
//$this->pdf->setAutoPageBreak(true, 10);
}
public function crea($definicion)
{
//print_r($def);echo $bdd;die();
// Iniciamos la creación del documento
$this->def = simplexml_load_file($definicion);
//Ejecuta la consulta y prepara las variables de la base de datos.
$this->bdd->ejecuta(trim($this->def->Datos->Consulta));
//Inicializa las variables para el control de las etiquetas.
$this->pdf->AddPage();
$tamLinea = 5;
$fila = -1;
$primero = true; $i = 0;
$url = explode("/", $_SERVER['SCRIPT_NAME']);
$aplicacion = $url[1];
$protocolo = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443 ? "https://" : "http://";
$enlace = $protocolo . $_SERVER['SERVER_NAME'] . "/" . $aplicacion . "/index.php?elementos&opc=editar&id=";
while($tupla = $this->bdd->procesaResultado()) {
for ($j = 0; $j < $tupla['cantidad']; $j++) {
//Hay que generar tantas etiquetas como ponga la cantidad de cada elemento
if ($i % 2) {
//Columna 2
$etiq1 = 136;
$etiq2 = 105;
} else {
//Columna 1
$etiq1 = 30;
$etiq2 = 1;
$fila++;
}
if ($i % 14 == 0) {
if (!$primero) {
$this->pdf->AddPage();
$fila = 0;
}
$primero = false;
}
$py = 6 + 41 * $fila;
$enlace2=$enlace.$tupla['idEl'];
$fichero = TMP."/etiq".rand(1000,9999).".png";
QRcode::png($enlace2, $fichero);
$this->pdf->image($fichero, $etiq2, $py, 30, 30);
unlink($fichero);
$this->pdf->setxy($etiq1, $py);
$this->pdf->Cell(30, 10, utf8_decode($tupla['articulo']));
$py+=$tamLinea;
$this->pdf->setxy($etiq1, $py);
$this->pdf->Cell(30, 10, utf8_decode($tupla['marca']));
$py+=$tamLinea;
$this->pdf->setxy($etiq1, $py);
$this->pdf->Cell(30, 10, utf8_decode($tupla['modelo']));
$py+=$tamLinea;
$this->pdf->setxy($etiq1, $py);
$this->pdf->Cell(30, 10, utf8_decode($tupla['numserie']));
$py+=$tamLinea;
$this->pdf->setxy($etiq1, $py);
$this->pdf->Cell(30, 10, $tupla['fechaCompra']);
$py+=$tamLinea-1;
$this->pdf->setxy($etiq2, $py);
$this->pdf->Cell(30, 10, utf8_decode($tupla['ubicacion']));
$py+=$tamLinea-1;
$this->pdf->setxy($etiq2, $py);
$cadena = "idElemento=" . $tupla['idEl'] . " / idArticulo=" . $tupla['idArt'] . " / idUbicacion=" . $tupla['idUbic'];
$this->pdf->Cell(30, 10, $cadena);
$i++;
}
}
//$this->pdf->MultiCell(0,30,var_export($filas,true));
}
public function cierraPDF()
{
$this->pdf->Close();
$this->docu = $this->pdf->Output('', 'S');
}
public function getContenido()
{
return $this->docu;
}
public function getCabecera()
{
$cabecera = "Content-type: application/pdf";
$cabecera = $cabecera . "Content-length: " . strlen($this->docu);
$cabecera = $cabecera . "Content-Disposition: inline; filename=" . $this->nombreFichero;
return $cabecera;
}
public function guardaArchivo($nombre)
{
$fichero = fopen($nombre, "w");
fwrite($fichero, $this->getCabecera());
fwrite($fichero, $this->getContenido(), strlen($this->getContenido()));
$this->nombreFichero = $nombre;
fclose($fichero);
}
public function enviaCabecera()
{
header("Content-type: application/pdf");
$longitud = strlen($this->docu);
header("Content-length: $longitud");
header("Content-Disposition: inline; filename=" . $this->nombreFichero);
}
public function imprimeInforme()
{
$this->enviaCabecera();
echo $this->docu;
}
}
?>

File diff suppressed because it is too large Load Diff

183
Imagen.php Normal file
View File

@@ -0,0 +1,183 @@
<?php
/**
* @package Inventario
* @copyright Copyright (c) 2014, Ricardo Montañana Gómez
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* This file is part of Inventario.
* Inventario is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Inventario is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Inventario. If not, see <http://www.gnu.org/licenses/>.
*
*/
//Para comprimir las imágenes
require_once('Zebra_Image.php');
define("HAYQUEGRABAR", 1);
define("HAYQUEBORRAR", 2);
define("NOHACERNADA", 3);
class Imagen {
private $archivoSubido;
public $archivoComprimido;
private $extension;
private $dirData;
public $archivoCopiado;
public function __construct()
{
$this->dirData = IMAGEDATA;
}
public function determinaAccion($campo)
{
if (isset($_POST[$campo]) && $_POST[$campo] == "") {
return HAYQUEBORRAR; //Hay que borrar el archivo de imagen
} elseif (isset($_FILES[$campo]['error']) && $_FILES[$campo]['error'] == 0) {
return HAYQUEGRABAR; //Hay que guardar el archivo de imagen enviado
} else {
return NOHACERNADA; //No hay que hacer nada
}
}
public function procesaEnvio($campo, &$mensaje)
{
try {
// Undefined | Multiple Files | $_FILES Corruption Attack
// If this request falls under any of them, treat it invalid.
if (
!isset($_FILES[$campo]['error']) ||
is_array($_FILES[$campo]['error'])
) {
throw new RuntimeException('Parámetros inválidos.');
}
// Check $_FILES['upfile']['error'] value.
switch ($_FILES[$campo]['error']) {
case UPLOAD_ERR_OK:
break;
case UPLOAD_ERR_NO_FILE:
throw new RuntimeException('No se ha enviado ningún fichero.');
case UPLOAD_ERR_INI_SIZE:
case UPLOAD_ERR_FORM_SIZE:
throw new RuntimeException('Se ha excedido el tamaño máximo.');
default:
throw new RuntimeException('Error desconocido.');
}
// DO NOT TRUST $_FILES['upfile']['mime'] VALUE !!
// Check MIME Type by yourself.
$finfo = new finfo(FILEINFO_MIME_TYPE);
if (false === $ext = array_search(
$finfo->file($_FILES[$campo]['tmp_name']),
array(
'jpg' => 'image/jpeg',
'png' => 'image/png',
'gif' => 'image/gif',
),
true
)) {
throw new RuntimeException('Formato de imagen inválido, no es {jpg, png, gif}');
}
$this->extension = $ext;
// You should name it uniquely.
// DO NOT USE $_FILES['upfile']['name'] WITHOUT ANY VALIDATION !!
// On this example, obtain safe unique name from its binary data.
$this->archivoSubido = sprintf('tmp/%s.%s', sha1_file($_FILES[$campo]['tmp_name']), $ext);
if (!move_uploaded_file($_FILES[$campo]['tmp_name'], $this->archivoSubido)) {
throw new RuntimeException('Fallo moviendo el archivo subido.');
}
//Todo ha ido correcto
return true;
} catch (RuntimeException $e) {
$mensaje = $e->getMessage();
return false;
}
}
public static function borraImagenId($tabla, $id)
{
$extensiones = array ("png", "gif", "jpg");
foreach ($extensiones as $extension) {
$archivo = IMAGEDATA . "/" . $tabla . "_" . $id . "." . $extension;
if (file_exists($archivo)) {
unlink ($archivo);
}
}
}
public function copiaImagenId($valorImagen, $tabla, $id, &$mensaje)
{
$extension = strrchr($valorImagen, ".");
$nombre = $this->dirData . "/" . $tabla . "_" . $id . $extension;
if (!@copy($valorImagen, $nombre)) {
$errors= error_get_last();
$mensaje = "No pudo copiar el archivo " . $valorImagen . " en " . $nombre . " Error = [" . $errors['message'] . "]";
return false;
}
$this->archivoCopiado = $nombre;
return true;
}
public function mueveImagenId($tabla, $id, &$mensaje)
{
if (!$this->comprimeArchivo($tabla . "_" . $id, $mensaje)) {
return false;
} else {
return true;
}
}
private function comprimeArchivo($id, &$mensaje)
{
$zebra = new Zebra_Image();
$zebra->source_path = $this->archivoSubido;
$this->archivoComprimido = $this->dirData . "/" . $id . "." . $this->extension;
$zebra->target_path = $this->archivoComprimido;
$zebra->jpeg_quality = 100;
// some additional properties that can be set
// read about them in the documentation
$zebra->preserve_aspect_ratio = true;
$zebra->enlarge_smaller_images = true;
$zebra->preserve_time = true;
// resize the image to exactly 100x100 pixels by using the "crop from center" method
// (read more in the overview section or in the documentation)
// and if there is an error, check what the error is about
if (!$zebra->resize(640, 480, ZEBRA_IMAGE_CROP_CENTER)) {
// if there was an error, let's see what the error is about
switch ($zebra->error) {
case 1: $mensaje = 'El fichero origen no se ha encontrado!';
break;
case 2: $mensaje = 'No se puede leer el archivo origen ' . $this->archivoSubido;
break;
case 3: $mensaje = 'No se pudo escribir el archivo destino ' . $this->archivoComprimido;
break;
case 4: $mensaje = 'Formato de fichero origen no soportado ' . $this->archivoSubido;
break;
case 5: $mensaje = 'Formato de fichero destino no soportado ' . $this->archivoComprimido;
break;
case 6: $mensaje = 'La versión de la biblioteca GD no soporta el formato de destino ' . $this->archivoComprimido;
break;
case 7: $mensaje = 'La biblioteca GD no está instalada';
break;
case 8: $mensaje = 'el comando "chmod" está deshabilitado por configuración';
break;
}
return false;
} else {
//Borra el archivo subido
unlink($this->archivoSubido);
return true;
}
}
}
?>

View File

@@ -44,7 +44,7 @@ class Importacion {
}
private function importarFichero() {
$uploadfile = "tmp/" . basename($_FILES['fichero']['name']);
$uploadfile = TMP."/" . basename($_FILES['fichero']['name']);
if (!move_uploaded_file($_FILES['fichero']['tmp_name'], $uploadfile)) {
die('No se pudo subir el fichero ' . $_FILES['userfile']['tmp_name']);
}
@@ -55,12 +55,32 @@ class Importacion {
private function formulario() {
$accion = "index.php?importacion&opc=importar";
$salida = '<form enctype="multipart/form-data" name="importacion.form" method="post" action="' . $accion . '">' . "\n";
$salida .= "<fieldset style=\"width: 96%;\"><p><legend style=\"color: red;\"><b>Elige Archivo</b></legend>\n";
$salida .= '<input type="file" name="fichero" id="fichero" onChange="seleccionFichero(this);">';
$salida .= '<p align="center"><button class="btn btn-primary" type=submit>Aceptar</button></p><br>' . "\n";
$mensaje = utf8_decode('Sólo se permiten archivos con extensión CSV');
$salida .= "<script type='text/javascript'>
$salida = "";
//$salida .= '<script type="text/javascript" src="css/bootstrap-filestyle.min.js"> </script>';
$salida .='<div class="col-sm-6 col-md-6">';
$salida .= '<form enctype="multipart/form-data" name="importacion.form" method="post" action="' . $accion . '">' . "\n";
$salida .= "<fieldset style=\"width: 96%;\"><p><legend style=\"color: red;\"><b>Elige Archivo</b></legend></p>\n";
//$salida .= '<input type="file" name="fichero" id="fichero" onChange="seleccionFichero(this);" class="filestyle" data-classButton="btn btn-primary">';
//$salida .= '<input type="file" name="fichero" id="fichero" onChange="seleccionFichero(this);">';
//$salida .= '<input type="file" class="filestyle" data-input="false">';
$salida .= '<div class="fileinput fileinput-new" data-provides="fileinput">
<div class="input-group">
<div class="form-control" data-trigger="fileinput">
<i class="glyphicon glyphicon-file fileinput-exists"></i>
<span class="fileinput-filename"></span>
</div>
<span class="input-group-addon btn btn-default btn-file">
<span class="fileinput-new">
<span class="glyphicon glyphicon-folder-open"></span> Selecciona fichero</span>
<span class="fileinput-exists">Cambiar</span><input type="file" name="fichero" id="fichero" onChange="seleccionFichero(this);"></span>
<a href="#" class="input-group-addon btn btn-default fileinput-exists" data-dismiss="fileinput">Eliminar</a>
</div>
</div></fieldset>';
$salida .= '<p align="center"><button class="btn btn-primary" type=submit><span class="glyphicon glyphicon-cloud-upload"></span> Aceptar</button></p><br>' . "\n";
$salida .= '</div>';
$mensaje = 'Sólo se permiten archivos con extensión CSV';
$salida .= "<script type='text/javascript'>"."
function seleccionFichero(obj) {
var filePath = obj.value;

View File

@@ -23,29 +23,62 @@ class InformeInventario {
private $bdd;
public function __construct($baseDatos) {
public function __construct($baseDatos)
{
$this->bdd = $baseDatos;
}
public function ejecuta() {
public function ejecuta()
{
$opc = $_GET['opc'];
switch ($opc) {
case 'Ubicacion':return $this->formularioUbicacion();
case 'listarUbicacion':return $this->listarUbicacion();
case 'listarArticulo':return $this->listarArticulo();
case 'listarTotal': return $this->listarTotal();
case 'Articulo':return $this->formularioArticulo();
case 'Total':return $this->inventarioTotal();
case 'descuadres': return $this->inventarioDescuadres();
}
}
private function listarUbicacion() {
private function inventarioDescuadres()
{
$enlace = 'xml/informeDescuadres.xml';
$informe = new InformePDF($this->bdd, $enlace, true);
$informe->crea($enlace);
$informe->cierraPDF();
return $this->devuelveInforme($informe);
}
private function devuelveInforme($informe)
{
$letras = "abcefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
$nombre = TMP."/informe" . substr(str_shuffle($letras), 0, 10) . ".pdf";
$informe->guardaArchivo($nombre);
return '<div class="container">
<!--<a href="' . $nombre . '" target="_blank"><span class="glyphicon glyphicon-cloud-download" style="font-size:1.5em;"></span>Descargar Informe</a>-->
<object data="' . $nombre . '" type="application/pdf" width="100%" height="700" style="float:left;">
</object>
</div>';
}
private function listarUbicacion()
{
$salidaInforme = isset($_POST['salida']) ? $_POST['salida'] : 'pantalla';
if ($salidaInforme == "pantalla") {
$fichero = "xml/inventarioUbicacion.xml";
$salida = "tmp/inventarioUbicacion.xml";
} else {
$fichero = "xml/inventarioUbicacionCSV.xml";
$salida = "tmp/inventarioUbicacionCSV.xml";
switch ($salidaInforme) {
case "pantalla":
$fichero = "xml/inventarioUbicacion.xml";
$salida = TMP."/inventarioUbicacion.xml";
break;
case "csv":
$fichero = "xml/inventarioUbicacionCSV.xml";
$salida = TMP."/inventarioUbicacionCSV.xml";
break;
case "etiquetas":
$fichero = "xml/inventarioUbicacionEtiquetas.xml";
$salida = TMP."/inventarioUbicacionEtiquetas.xml";
break;
}
$plantilla = file_get_contents($fichero) or die('Fallo en la apertura de la plantilla ' . $fichero);
$id = $_POST['id'] == NULL ? $_GET['id'] : $_POST['id'];
@@ -58,30 +91,44 @@ class InformeInventario {
$plantilla = str_replace("{id}", $id, $plantilla);
$plantilla = str_replace("{Descripcion}", $fila['Descripcion'], $plantilla);
file_put_contents($salida, $plantilla) or die('Fallo en la escritura de la plantilla ' . $salida);
if ($salidaInforme == "pantalla") {
$informe = new InformePDF($this->bdd, $salida, true);
$informe->crea($salida);
$informe->cierraPDF();
$informe->guardaArchivo("tmp/Informe.pdf");
echo '<script type="text/javascript"> window.open( "tmp/Informe.pdf" ) </script>';
} else {
//Genera una hoja de cálculo en formato csv
$nombre = "tmp/Ubicacion" . strftime("%Y%m%d") . rand(100, 999) . ".csv";
$hoja = new Csv($this->bdd);
$hoja->crea($nombre);
$hoja->ejecutaConsulta($salida);
echo '<script type="text/javascript"> window.open( "' . $nombre . '" ) </script>';
switch ($salidaInforme) {
case "pantalla":
$informe = new InformePDF($this->bdd, $salida, true);
$informe->crea($salida);
$informe->cierraPDF();
return $this->devuelveInforme($informe);
case "csv":
//Genera una hoja de cálculo en formato csv
$nombre = TMP."/Ubicacion" . strftime("%Y%m%d") . rand(100, 999) . ".csv";
$hoja = new Csv($this->bdd);
$hoja->crea($nombre);
$hoja->ejecutaConsulta($salida);
echo '<script type="text/javascript"> window.open( "' . $nombre . '" ) </script>';
break;
case "etiquetas":
$etiquetas = new EtiquetasPDF($this->bdd, $salida, true);
$etiquetas->crea($salida);
$etiquetas->cierraPDF();
return $this->devuelveInforme($etiquetas);
}
}
private function listarArticulo() {
private function listarArticulo()
{
$salidaInforme = isset($_POST['salida']) ? $_POST['salida'] : 'pantalla';
if ($salidaInforme == "pantalla") {
$fichero = "xml/inventarioArticulo.xml";
$salida = "tmp/inventarioArticulo.xml";
} else {
$fichero = "xml/inventarioArticuloCSV.xml";
$salida = "tmp/inventarioArticuloCSV.xml";
switch ($salidaInforme) {
case "pantalla":
$fichero = "xml/inventarioArticulo.xml";
$salida = TMP."/inventarioArticulo.xml";
break;
case "csv":
$fichero = "xml/inventarioArticuloCSV.xml";
$salida = TMP."/inventarioArticuloCSV.xml";
break;
case "etiquetas":
$fichero = "xml/inventarioArticuloEtiquetas.xml";
$salida = TMP."/inventarioArticuloEtiquetas.xml";
break;
}
$plantilla = file_get_contents($fichero) or die('Fallo en la apertura de la plantilla ' . $fichero);
$id = $_POST['id'] == NULL ? $_GET['id'] : $_POST['id'];
@@ -96,25 +143,31 @@ class InformeInventario {
$plantilla = str_replace("{Marca}", $fila['marca'], $plantilla);
$plantilla = str_replace("{Modelo}", $fila['modelo'], $plantilla);
file_put_contents($salida, $plantilla) or die('Fallo en la escritura de la plantilla ' . $salida);
if ($salidaInforme == "pantalla") {
$informe = new InformePDF($this->bdd, $salida, true);
$informe->crea($salida);
$informe->cierraPDF();
$informe->guardaArchivo("tmp/Informe.pdf");
echo '<script type="text/javascript"> window.open( "tmp/Informe.pdf" ) </script>';
} else {
//Genera una hoja de cálculo en formato csv
$nombre = "tmp/Articulo" . strftime("%Y%m%d") . rand(100, 999) . ".csv";
$hoja = new Csv($this->bdd);
$hoja->crea($nombre);
$hoja->ejecutaConsulta($salida);
echo '<script type="text/javascript"> window.open( "' . $nombre . '" ) </script>';
switch ($salidaInforme) {
case "pantalla":
$informe = new InformePDF($this->bdd, $salida, true);
$informe->crea($salida);
$informe->cierraPDF();
return $this->devuelveInforme($informe);
case "csv":
//Genera una hoja de cálculo en formato csv
$nombre = TMP."/Articulo" . strftime("%Y%m%d") . rand(100, 999) . ".csv";
$hoja = new Csv($this->bdd);
$hoja->crea($nombre);
$hoja->ejecutaConsulta($salida);
echo '<script type="text/javascript"> window.open( "' . $nombre . '" ) </script>';
break;
case "etiquetas":
$etiquetas = new EtiquetasPDF($this->bdd, $salida, true);
$etiquetas->crea($salida);
$etiquetas->cierraPDF();
return $this->devuelveInforme($etiquetas);
}
//header('Location: index.php');
}
private function listaUbicaciones() {
$salida = "<select class=\"form-control\" name=\"id\">\n";
private function listaUbicaciones()
{
$salida = "<select class=\"selectpicker show-tick\" name=\"id\" data-live-search=\"true\" data-width=\"auto\">\n";
$comando = "select * from Ubicaciones order by Descripcion";
$resultado = $this->bdd->ejecuta($comando);
if (!$resultado) {
@@ -127,8 +180,9 @@ class InformeInventario {
return $salida;
}
private function listaArticulos() {
$salida = "<select class=\"form-control\" name=\"id\">\n";
private function listaArticulos()
{
$salida = "<select class=\"selectpicker show-tick\" name=\"id\" data-live-search=\"true\" data-width=\"auto\">\n";
$comando = "select * from Articulos order by descripcion, marca, modelo";
$resultado = $this->bdd->ejecuta($comando);
if (!$resultado) {
@@ -141,33 +195,57 @@ class InformeInventario {
return $salida;
}
private function formulario($accion, $etiqueta, $lista) {
$salida = '<div class="col-sm-2 col-md-6"><form name="informeInventario.form" method="post" action="' . $accion . '">' . "\n";
private function formulario($accion, $etiqueta, $lista)
{
$salida = '<div class="col-sm-6 col-md-6"><form name="informeInventario.form" method="post" action="' . $accion . '">' . "\n";
$salida.="<fieldset style=\"width: 96%;\"><p><legend style=\"color: red;\"><b>Elige $etiqueta</b></legend>\n";
$salida.="<br><br><label>$etiqueta</label>";
$salida.="<br><br><label>$etiqueta </label>";
$salida.=$lista;
$salida.="<br><br><label for='salida'>Salida del informe por:</label>";
$salida.='<div class="radio"><label><input type="radio" name="salida" value="pantalla" checked>Pantalla</label></div>';
$salida.='<div class="radio"><label><input type="radio" name="salida" value="csv">Archivo CSV</label></div>';
$salida.="<br><br>
<label for='salida'>Salida del informe por:</label>";
$salida.='<div class="radio"><label><input type="radio" name="salida" value="pantalla" checked><span class="glyphicon glyphicon-list-alt"></span> Pantalla</label></div>';
$salida.='<div class="radio"><label><input type="radio" name="salida" value="csv"><span class="glyphicon glyphicon-cloud-download"></span> Archivo CSV</label></div>';
$salida.='<div class="radio"><label><input type="radio" name="salida" value="etiquetas"><span class="glyphicon glyphicon-qrcode"></span> Etiquetas (<a target="_new" href="http://www.apli.es/producto/ficha_producto.aspx?referencia=01275&stype=referencia&referenciaValue=01275&q=01275">Apli 1275</a>)</label></div>';
$salida.="<br><br></fieldset><p>";
$salida.='<p align="center"><button type=submit class="btn btn-primary">Aceptar</button></p><br></div>' . "\n";
$salida.='<p align="center"><button type=submit class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span> Aceptar</button></p><br></div>' . "\n";
$salida.="<script>$('.selectpicker').selectpicker();</script>";
return $salida;
}
private function formularioUbicacion() {
private function formularioUbicacion()
{
//Genera un formulario con las ubicaciones disponibles.
$accion = "index.php?informeInventario&opc=listarUbicacion";
return $this->formulario($accion, 'Ubicaci&oacute;n', $this->listaUbicaciones());
}
private function formularioArticulo() {
private function formularioArticulo()
{
$accion = "index.php?informeInventario&opc=listarArticulo";
return $this->formulario($accion, 'Art&iacute;culo', $this->listaArticulos());
}
private function inventarioTotal()
{
return $this->dialogo();
}
private function inventarioTotal() {
private function dialogo()
{
$dialogo = '<div class="container col-5"><div class="jumbotron">
<h1>Inventario Total</h1>
<p>¿Desea obtener el inventario de todo el centro?</p>
<p><a class="btn btn-primary btn-lg" role="button" onClick="location.href=' . "'index.php'" . '"><span class="glyphicon glyphicon-arrow-left"></span> Volver</a>
<a class="btn btn-success btn-lg" role="button" onClick="location.href=' . "'index.php?informeInventario&opc=listarTotal'" . '">
<span class="glyphicon glyphicon-list-alt"></span> Continuar</a></p>
</div></div>';
return $dialogo;
}
private function listarTotal()
{
$fichero = "xml/inventarioUbicacion.xml";
$salida = "tmp/inventarioUbicacion.xml";
$salida = TMP."/inventarioUbicacion.xml";
$comando = "select * from Ubicaciones ;";
$resultado = $this->bdd->ejecuta($comando);
if (!$resultado) {
@@ -177,7 +255,6 @@ class InformeInventario {
$bdatos = new Sql(SERVIDOR, USUARIO, CLAVE, BASEDATOS);
$primero = true;
while ($fila = $this->bdd->procesaResultado()) {
//$fila=$this->bdd->procesaResultado();
$plantilla = file_get_contents($fichero) or die('Fallo en la apertura de la plantilla ' . $fichero);
$plantilla = str_replace("{id}", $fila['id'], $plantilla);
$plantilla = str_replace("{Descripcion}", $fila['Descripcion'], $plantilla);
@@ -188,9 +265,8 @@ class InformeInventario {
}
$informe->crea($salida);
}
$nombre = "tmp/total.pdf";
$informe->cierraPDF();
$informe->imprimeInforme();
return $this->devuelveInforme($informe);
}
}

View File

@@ -1,147 +0,0 @@
<?php
/**
* @package Inventario
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* This file is part of Inventario.
* Inventario is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Inventario is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Inventario. If not, see <http://www.gnu.org/licenses/>.
*
*/
class InformeInventario {
private $bdd;
public function __construct($baseDatos)
{
$this->bdd=$baseDatos;
}
public function ejecuta()
{
$opc=$_GET['opc'];
switch ($opc) {
case 'Ubicacion':return $this->formularioUbicacion();
case 'listarUbicacion':return $this->listarUbicacion();
case 'listarArticulo':return $this->listarArticulo();
case 'Articulo':return $this->formularioArticulo();
case 'Total':return $this->inventarioTotal();
}
}
private function listarUbicacion()
{
$fichero="xml/inventarioUbicacion.xml";
$salida="tmp/inventarioUbicacion.xml";
$plantilla=file_get_contents($fichero)
or die('Fallo en la apertura de la plantilla '.$fichero);
$comando="select * from Ubicaciones where id='".$_POST['id']."';";
$resultado=$this->bdd->ejecuta($comando);
if (!$resultado) {
return $this->bdd->mensajeError($comando);
}
$fila=$this->bdd->procesaResultado();
$plantilla=str_replace("{id}",$_POST['id'],$plantilla);
$plantilla=str_replace("{Descripcion}",utf8_encode($fila['Descripcion']),$plantilla);
file_put_contents($salida,$plantilla)
or die('Fallo en la escritura de la plantilla '.$salida);
$informe=new InformePDF($this->bdd,$salida,true);
}
private function listarArticulo()
{
$fichero="xml/inventarioArticulo.xml";
$salida="tmp/inventarioArticulo.xml";
$plantilla=file_get_contents($fichero)
or die('Fallo en la apertura de la plantilla '.$fichero);
$comando="select * from Articulos where id='".$_POST['id']."';";
$resultado=$this->bdd->ejecuta($comando);
if (!$resultado) {
return $this->bdd->mensajeError($comando);
}
$fila=$this->bdd->procesaResultado();
$plantilla=str_replace("{id}",$_POST['id'],$plantilla);
$plantilla=str_replace("{Descripcion}",utf8_encode($fila['descripcion']),$plantilla);
$plantilla=str_replace("{Marca}",utf8_encode($fila['marca']),$plantilla);
$plantilla=str_replace("{Modelo}",utf8_encode($fila['modelo']),$plantilla);
file_put_contents($salida,$plantilla)
or die('Fallo en la escritura de la plantilla '.$salida);
$informe=new InformePDF($this->bdd,$salida,true);
}
private function listaUbicaciones()
{
$salida="<select name=\"id\">\n";
$comando="select * from Ubicaciones order by Descripcion";
$resultado=$this->bdd->ejecuta($comando);
if (!$resultado) {
return $this->bdd->mensajeError($comando);
}
while($fila=$this->bdd->procesaResultado()) {
$salida.="<option value=".$fila['id'].">".$fila['Descripcion']."</option><br>\n";
}
$salida.="</select>\n";
return $salida;
}
private function listaArticulos()
{
$salida="<select name=\"id\">\n";
$comando="select * from Articulos order by descripcion, marca, modelo";
$resultado=$this->bdd->ejecuta($comando);
if (!$resultado) {
return $this->bdd->mensajeError($comando);
}
while($fila=$this->bdd->procesaResultado()) {
$salida.="<option value=".$fila['id'].">".$fila['descripcion']."-".$fila['marca']."-".$fila['modelo']."</option><br>\n";
}
$salida.="</select>\n";
return $salida;
}
private function formulario($accion,$etiqueta,$lista)
{
$salida='<form name="mantenimiento.form" method="post" action="'.$accion.'">'."\n";
$salida.="<fieldset style=\"width: 96%;\"><p><legend style=\"color: red;\"><b>Elige $etiqueta</b></legend>\n";
$salida.="<br><br><label>$etiqueta</label>";
$salida.=$lista;
$salida.="<br><br></fieldset><p>";
$salida.='<p align="center"><button type=submit>Aceptar</button></p><br>'."\n";
return $salida;
}
private function formularioUbicacion()
{
//Genera un formulario con las ubicaciones disponibles.
$accion="index.php?informeInventario&opc=listarUbicacion";
return $this->formulario($accion,'Ubicaci&oacute;n',$this->listaUbicaciones());
}
private function formularioArticulo()
{
$accion="index.php?informeInventario&opc=listarArticulo";
return $this->formulario($accion,'Art&iacute;culo',$this->listaArticulos());
}
private function inventarioTotal()
{
$fichero="xml/inventarioUbicacion.xml";
$salida="tmp/inventarioUbicacion.xml";
$comando="select * from Ubicaciones where id='".$_POST['id']."';";
$resultado=$this->bdd->ejecuta($comando);
if (!$resultado) {
return $this->bdd->mensajeError($comando);
}
$salidaTotal='';
while ($fila=$this->bdd->procesaResultado()) {
$plantilla=file_get_contents($fichero)
or die('Fallo en la apertura de la plantilla '.$fichero);
$plantilla=str_replace("{id}",$_POST['id'],$plantilla);
$plantilla=str_replace("{Descripcion}",utf8_encode($fila['Descripcion']),$plantilla);
file_put_contents($salida,$plantilla)
or die('Fallo en la escritura de la plantilla '.$salida);
$salidaTotal+=$salida;
}
$informe=new InformePDF($this->bdd,$salidaTotal,true);
}
}
?>

View File

@@ -1,4 +1,3 @@
<?php
/**
@@ -55,7 +54,7 @@ class InformePDF {
//echo $def->Titulo.$def->Cabecera;
$this->pdf->Open();
$this->pdf->setAuthor(AUTOR,true);
$creador = CENTRO . " " . APLICACION;
$creador = CENTRO . " " . PROGRAMA . " v" . VERSION;
$this->pdf->setCreator(html_entity_decode($creador),true);
$this->pdf->setSubject($this->def->Titulo,true);
$this->pdf->setAutoPageBreak(true, 10);
@@ -94,11 +93,13 @@ class InformePDF {
public function getCabecera() {
$cabecera = "Content-type: application/pdf";
$cabecera = $cabecera . "Content-length: " . strlen($this->docu);
$cabecera = $cabecera . "Content-Disposition: inline; filename=tmp/Informe.pdf";
$cabecera = $cabecera . "Content-Disposition: inline; filename=".TMP."/Informe.pdf";
return $cabecera;
}
public function guardaArchivo($nombre = "tmp/Informe.pdf") {
public function guardaArchivo($nombre) {
if (!isset($nombre))
$nombre = TMP . "/Informe.pdf";
$fichero = fopen($nombre, "w");
fwrite($fichero, $this->getCabecera());
fwrite($fichero, $this->getContenido(), strlen($this->getContenido()));
@@ -109,7 +110,7 @@ class InformePDF {
header("Content-type: application/pdf");
$longitud = strlen($this->docu);
header("Content-length: $longitud");
header("Content-Disposition: inline; filename=tmp/Informe.pdf");
header("Content-Disposition: inline; filename=".TMP."/Informe.pdf");
}
public function imprimeInforme() {

View File

@@ -1,85 +0,0 @@
<?php
/**
* genera un documento PDF a partir de una descripción dada en un archivo XML
* @author Ricardo Montañana <rmontanana@gmail.com>
* @version 1.0
* @package Inventario
* @copyright Copyright (c) 2008, Ricardo Montañana
* @package Inventario
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* This file is part of Inventario.
* Inventario is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Inventario is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Inventario. If not, see <http://www.gnu.org/licenses/>.
*
*/
class InformePDF
{
/**
*
* @var basedatos Controlador de la base de datos
*/
private $bdd;
/**
* El constructor recibe como argumento el nombre del archivo XML con la definición, encargándose de recuperarla y guardar toda la información localmente
* @param basedatos $bdd manejador de la base de datos
* @param string $definicion fichero con la definición del informe en XML
* @param boolean $registrado usuario registrado si/no
* @return ficheroPDF
*/
public function __construct($bdd,$definicion,$registrado)
{
if (!$registrado) {
return 'Debe registrarse para acceder a este apartado';
}
$this->bdd=$bdd;
// Recuperamos la definición del informe
$def=simplexml_load_file($definicion);
//print_r($def);echo $bdd;die();
// Iniciamos la creación del documento
$pdf=new Pdf_mysql_table($this->bdd->obtieneManejador(),(string)$def->Pagina['Orientacion'],
(string)$def->Pagina['Formato'],
(string)$def->Titulo['Texto'],(string)$def->Pagina->Cabecera);
echo $def->Titulo.$def->Cabecera;
$pdf->Open();
$pdf->setAuthor(utf8_decode(AUTOR));
$pdf->setCreator(html_entity_decode(APLICACION));
$pdf->setSubject(utf8_decode($def->Titulo));
$pdf->setAutoPageBreak(true,10);
$this->bdd->ejecuta(trim($def->Datos->Consulta));
$filas=$this->bdd->procesaResultado();
$pdf->AddPage();
// Recuperamos los datos del cuerpo
foreach($def->Pagina->Cuerpo->Col as $columna) {
$pdf->AddCol((string)$columna['Nombre'],(string)$columna['Ancho'],
(string)$columna['Titulo'],(string)$columna['Ajuste'],
(string)$columna['Total']);
}
$prop=array('HeaderColor'=>array(255,150,100),
'color1'=>array(210,245,255),
'color2'=>array(255,255,210),
'padding'=>2);
$pdf->Table($def->Datos->Consulta,$prop);
$pdf->Close();
// Obtenemos el documento y su longitud
$documento=$pdf->Output('','S');
$longitud=strlen($documento);
// y lo enviamos como resultado
header("Content-type: application/pdf");
header("Content-length: $longitud");
header("Content-Disposition: inline; filename=Informe.pdf");
echo $documento;
}
}
?>

558
Instalar.php Normal file
View File

@@ -0,0 +1,558 @@
<?php
/**
* Programa de instalación que genera el entorno de ejecución
* tanto el fichero de configuración como la base de datos
* @package Inventario
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* This file is part of Inventario.
* Inventario is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Inventario is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Inventario. If not, see <http://www.gnu.org/licenses/>.
*
*/
//Se incluyen los módulos necesarios
function __autoload($class_name) {
require_once $class_name . '.php';
}
require_once 'inc/configuracion.inc';
define('NUMPASOS', 3);
//Para el Paso 1
define('MINBYTES', 4096000); // post_max_size y max_upload van con esto
define('CADENAMINBYTES', '4M');
define('CONFIGURACION', 'inc/configuracion.inc');
define('CONFIGTMP', TMP.'/config.tmp');
define('INC', './inc');
$instalar = new Instalar();
if ($instalar->error) {
echo $instalar->panelError();
return;
}
echo $instalar->ejecuta();
class Instalar {
private $contenido;
private $plant;
public $error;
public $error_msj;
public function __construct()
{
//Selecciona la plantilla a utilizar
$this->plant='plant/';
$this->plant.=PLANTILLA;
$this->plant.='.html';
$this->error = false;
$this->eror_msj = '';
if (INSTALADO != 'no') {
$this->error = true;
$this->error_msj = 'El programa ya está instalado';
}
/*if ($this->existenDatos()) {
$this->error = true;
$this->error_msj = "El indicador de instalación tiene 'no' pero la base de datos " . BASEDATOS . " contiene la tabla Articulos.";
}*/
}
private function existenDatos()
{
//Comprueba si existe la tabla Articulos
$sql = new Sql(SERVIDOR, USUARIO, CLAVE, BASEDATOS);
if ($sql->error())
return false;
$sql->ejecuta('select * from Articulos;');
if ($sql->error())
return false;
return true;
}
public function ejecuta()
{
$paso = isset($_GET['paso']) ? $_GET['paso'] : 0;
$paso = $paso > NUMPASOS ? '0' : $paso;
$i=0;
//Si quiere ir a un determinado paso se asegura que estén completos los anteriores
for ($i = 0; $i < $paso; $i++) {
$funcion = "validaPaso" . $i;
if (!$this->$funcion()) {
break;
}
}
$funcion = "paso" . $i;
$this->contenido = $this->$funcion();
$salida = new Distribucion($this->plant, $this);
return $salida->procesaPlantilla();
}
// Cuestiones relacionadas con el servidor
private function paso0()
{
$info = '<ul class="list-group">';
$info .= '<li class="list-group-item list-group-item-info">Configuración de PHP (php.ini)</li>';
// display_errors
$displayErr = ini_get('display_errors');
$displayErr = $displayErr == "1" || $displayErr == "on" ? "on" : "off";
$mensaje = $displayErr == "off" ? $this->retornaLabel(false,'Se debe deshabilitar la impresión de errores') :
$this->retornaLabel(true, 'Se debe deshabilitar la impresión de errores', "warning");
$info .= $this->retornaElemento($mensaje, 'display_errors', $displayErr);
// post_max_size
$postMax = ini_get('post_max_size');
$mensaje = $this->retornaBytes($postMax) >= MINBYTES ? $this->retornaLabel(false, 'Mínimo: ' . CADENAMINBYTES) :
$this->retornaLabel(true, 'Mínimo: ' . CADENAMINBYTES);
$info .= $this->retornaElemento($mensaje, 'post_max_size', $postMax);
// upload_max_filesize
$uploadMax = ini_get('upload_max_filesize');
$mensaje = $this->retornaBytes($uploadMax) >= MINBYTES ? $this->retornaLabel(false, 'Mínimo: ' . CADENAMINBYTES) :
$this->retornaLabel(true, 'Mínimo: ' . CADENAMINBYTES);
$info .= $this->retornaElemento($mensaje, 'upload_max_filesize', $uploadMax);
// mysqli
$mysql = extension_loaded('mysqli');
$mysql = $mysql ? "on" : "off";
$mensaje = $mysql ? $this->retornaLabel(false, 'Tiene que estar cargada la extensión MySQLi para poder funcionar') :
$this->retornaLabel(true, 'Tiene que estar cargada la extensión MySQLi para poder funcionar');
$info .= $this->retornaElemento($mensaje, 'extensión MySQLi', $mysql);
$info .= '<li class="list-group-item list-group-item-info">Configuración de la Aplicación</li>';
// img.dat
$mensaje = is_writable(IMAGEDATA) ? $this->retornaLabel(false, "Se debe poder escribir en el directorio " . IMAGEDATA) :
$this->retornaLabel(true, "Se debe poder escribir en el directorio " . IMAGEDATA);
$valor = is_writable(IMAGEDATA) ? "" : "No";
$info .= $this->retornaElemento($mensaje, 'Se puede escribir en ' . IMAGEDATA, $valor);
// tmp
$mensaje = is_writable(TMP) ? $this->retornaLabel(false, "Se debe poder escribir en el directorio " . TMP) :
$this->retornaLabel(true, "Se debe poder escribir en el directorio " . TMP);
$valor = is_writable(TMP) ? "" : "No";
$info .= $this->retornaElemento($mensaje, 'Se puede escribir en ' . TMP, $valor);
// inc
$mensaje = is_writable(INC) ? $this->retornaLabel(false, "Se debe poder escribir en el directorio " . INC) :
$this->retornaLabel(true, "Se debe poder escribir en el directorio " . INC);
$valor = is_writable(INC) ? "" : "No";
$info .= $this->retornaElemento($mensaje, 'Se puede escribir en ' . INC, $valor);
// configuracion.inc
$mensaje = is_writable(CONFIGURACION) ? $this->retornaLabel(false, "Se debe poder escribir en el fichero de configuración ". CONFIGURACION) :
$this->retornaLabel(true, "Se debe poder escribir en el fichero de configuración ". CONFIGURACION);
$valor = is_writable(CONFIGURACION) ? "" : "No";
$info .= $this->retornaElemento($mensaje, 'Se puede escribir en ' . CONFIGURACION, $valor);
// Final del paso
$info .='</ul>';
$info .= $this->validaPaso0() ? $this->retornaBoton(false, "Instalar.php?paso=1") : $this->retornaBoton(true, "Instalar.php");
$panel = $this->panelMensaje($info, 'primary', 'PASO 1: Configuración del servidor y la aplicación');
return $panel;
}
private function retornaElemento($validacion, $mensaje, $valor)
{
$info = '<li class="list-group-item">';
$info .= $validacion . ' ' . $mensaje . ': <span class="badge">' . $valor . '</span>';
$info .= '</li>';
return $info;
}
private function retornaBoton($error, $paso, $javascript = true)
{
$anadido = $javascript ? 'onclick="location.href=' . "'" . $paso . "'". '"' : '';
if (!$error) {
return '<button ' . $anadido . ' type="submit" class="btn btn-success btn-lg pull-right">Continuar <span class="glyphicon glyphicon-arrow-right"></span></button>';
} else {
return '<button ' . $anadido . ' type="submit" class="btn btn-danger btn-lg pull-right">Comprobar de nuevo <span class="glyphicon glyphicon-repeat"></span></button>';
}
}
private function botonVolver($enlace)
{
$boton = '<button type="button" onClick="location.href=' . "'$enlace'" . '" class="btn btn-success btn-lg pull-left">Paso anterior <span class="glyphicon glyphicon-arrow-left"></span></button>';
return $boton;
}
private function retornaLabel($error, $mensaje, $tipo = "danger")
{
if ($error) {
$nombre1 = $tipo; $nombre2 = "remove";
} else {
$nombre1 = "success"; $nombre2 = "ok";
}
$mensaje = '<a href="#" data-placement="right" data-toggle="popover" data-content="' . $mensaje .
'"><span class="label label-' . $nombre1 . '"><span class="glyphicon glyphicon-' . $nombre2 .
'"></span></a>';
$mensaje .='<script>$(function () { $("[data-toggle=\'popover\']").popover(); });</script>';
return $mensaje;
}
private function retornaBytes($val)
{
$val = trim($val);
$last = strtolower($val[strlen($val)-1]);
switch($last) {
// El modificador 'G' está disponble desde PHP 5.1.0
case 'g':
$val *= 1024;
case 'm':
$val *= 1024;
case 'k':
$val *= 1024;
}
return $val;
}
private function validaPaso0()
{
$validar = true;
$postMax = ini_get('post_max_size');
$uploadMax = ini_get('upload_max_filesize');
$mysql = extension_loaded('mysqli');
$escConfig = is_writable(CONFIGURACION);
$escInc = is_writable(INC);
$escTMP = is_writable(TMP);
$escIMG = is_writable(IMAGEDATA);
if ($this->retornaBytes($postMax) < MINBYTES)
$validar = false;
if ($this->retornaBytes($uploadMax) < MINBYTES)
$validar = false;
if (!$mysql)
$validar = false;
if (!$escConfig)
$validar = false;
if (!$escTMP)
$validar = false;
if (!$escIMG)
$validar = false;
if (!$escInc)
$validar = false;
return $validar;
}
private function actualizaConfiguracion($grabar, $campos, &$datos)
{
$conf = new Configuracion();
$fichero = $conf->obtieneFichero();
$datosFichero = explode("\n", $fichero);
if ($grabar) {
$fsalida = @fopen(CONFIGTMP, "wb");
}
foreach ($datosFichero as $linea) {
if (stripos($linea, "DEFINE") !== false) {
$conf->obtieneDatos($linea, $clave, $valor);
if (stripos($campos, $clave) !== false) {
if ($grabar) {
$linea = str_replace($valor, $datos[$clave], $linea);
$valor = $datos[$clave];
}
}
$datos[$clave] = $valor;
}
$registro = substr($linea, 0, 2) == "?>" ? $linea : $linea . "\n";
if ($grabar) {
fwrite($fsalida, $registro);
}
}
if ($grabar) {
fclose($fsalida);
unlink(CONFIGURACION);
rename(CONFIGTMP, CONFIGURACION);
}
}
// Cuestiones de la base de datos
private function paso1()
{
$grabar = isset($_POST['SERVIDOR']);
$campos = 'SERVIDOR,PUERTO,BASEDATOS,USUARIO,CLAVE';
//Lee y si hace falta actualiza los datos del formulario en el fichero de configuración
if ($grabar) {
foreach ($_POST as $clave => $valor) {
$datos[$clave] = $valor;
}
} else {
$datos = array();
}
$this->actualizaConfiguracion($grabar, $campos, $datos);
if ($grabar && $this->validaPaso1()) {
//Pasa al paso siguiente
return $this->paso2();
}
$info = '<form method="post" name="conf" action="Instalar.php?paso=1">';
$info .= '<ul class="list-group">';
$info .= '<li class="list-group-item list-group-item-info">Datos de configuración</li>';
$info .= '<li class="list-group-item">Servidor <input type="text" name="SERVIDOR" class="form-control" placeholder="Nombre del servidor o dirección IP" value="'. $datos['SERVIDOR'] .'"></li>';
$info .= '<li class="list-group-item">Puerto <input type="text" name="PUERTO" class="form-control" placeholder="Puerto de conexión" value="'. $datos['PUERTO'] .'"></li>';
$info .= '<li class="list-group-item">Base de Datos <input type="text" name="BASEDATOS" class="form-control" placeholder="Nombre de la Base de Datos" value="'. $datos['BASEDATOS'] .'"></li>';
$info .= '<li class="list-group-item">Usuario <input type="text" name="USUARIO" class="form-control" placeholder="Usuario" value="'. $datos['USUARIO'] .'"></li>';
$info .= '<li class="list-group-item">Contraseña <input type="text" name="CLAVE" class="form-control" placeholder="Contraseña" value="'. $datos['CLAVE'] .'"></li>';
$info .= '</ul>';
$info .= $this->botonVolver("Instalar.php");
$info .= $this->validaPaso1() ? $this->retornaBoton(false, "Instalar.php?paso=1", false) : $this->retornaBoton(true, "Instalar.php?paso=1", false);
$info .= '</form>';
$panel = $this->panelMensaje($info, 'primary', 'PASO 2: Configuración de la Base de Datos.');
return $panel;
}
private function validaPaso1()
{
$sql = new Sql(SERVIDOR, USUARIO, CLAVE, '');
if ($sql->error())
return false;
$sql = new Sql(SERVIDOR, USUARIO, CLAVE, BASEDATOS);
if ($sql->error()) {
return false;
}
$comando = 'create table test2 (id int(10));';
$sql->ejecuta($comando);
if ($sql->error()) {
return false;
}
$comando = 'drop table test2;';
$sql->ejecuta($comando);
if ($sql->error()) {
return false;
}
return true;
}
// Usuario administrador
private function paso2()
{
if (isset($_POST['usuario'])) {
//ha enviado el formulario.
//Crea la base de datos
$borra_database = "DROP DATABASE " . BASEDATOS . " ;";
$database = "CREATE DATABASE " . BASEDATOS . " DEFAULT CHARACTER SET utf8;";
$articulos = "CREATE TABLE `Articulos` (
`id` smallint(6) NOT NULL auto_increment COMMENT 'ordenable,link/Articulo',
`descripcion` varchar(60) NOT NULL COMMENT 'ordenable,ajax/text',
`marca` varchar(20) default NULL COMMENT 'ordenable,ajax/text',
`modelo` varchar(20) default NULL COMMENT 'ordenable,ajax/text',
`cantidad` int(11) default NULL COMMENT 'ordenable,ajax/number',
`imagen` varchar(45) default NULL COMMENT 'imagen',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=769 DEFAULT CHARSET=utf8;
";
$ubicaciones = "CREATE TABLE `Ubicaciones` (
`id` smallint(5) unsigned NOT NULL auto_increment COMMENT 'ordenable,link/Ubicacion',
`Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,ajax/text',
`imagen` varchar(45) DEFAULT NULL COMMENT 'imagen',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=179 DEFAULT CHARSET=utf8;
";
$elementos = "CREATE TABLE `Elementos` (
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'ordenable',
`id_Articulo` smallint(6) NOT NULL COMMENT 'foreign(Articulos;id),ordenable',
`id_Ubicacion` smallint(5) unsigned NOT NULL COMMENT 'foreign(Ubicaciones;id),ordenable',
`numserie` varchar(30) default NULL COMMENT 'ordenable,ajax/text',
`cantidad` int(10) unsigned default NULL COMMENT 'ordenable,ajax/number',
`fechaCompra` date NOT NULL COMMENT 'ordenable,ajax/combodate',
`imagen` varchar(45) default NULL COMMENT 'imagen',
PRIMARY KEY (`id`),
KEY `id` (`id`),
KEY `id_Articulo` (`id_Articulo`),
KEY `id_Ubicacion` (`id_Ubicacion`),
CONSTRAINT `Elementos_ibfk_1` FOREIGN KEY (`id_Articulo`) REFERENCES `Articulos` (`id`) ON DELETE CASCADE,
CONSTRAINT `Elementos_ibfk_2` FOREIGN KEY (`id_Ubicacion`) REFERENCES `Ubicaciones` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1789 DEFAULT CHARSET=utf8;
";
$usuarios = "CREATE TABLE `Usuarios` (
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'ordenable',
`nombre` varchar(16) NOT NULL default '' COMMENT 'ajax/text',
`clave` varchar(32) NOT NULL default '' COMMENT 'ajax/text',
`idSesion` varchar(20) NOT NULL default '' COMMENT 'ajax/text',
`alta` tinyint(1) NOT NULL default '0',
`modificacion` tinyint(1) NOT NULL default '0',
`borrado` tinyint(1) NOT NULL default '0',
`consulta` tinyint(1) NOT NULL default '1',
`informe` tinyint(1) NOT NULL default '1',
`usuarios` tinyint(1) NOT NULL default '0',
`config` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `nombre` (`nombre`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
";
$letras = "abcefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
$sesion = substr(str_shuffle($letras), 0, 8);
$usuario = $_POST['usuario'];
$clave = $_POST['clave'];
$administrador = "insert into Usuarios values (null,'$usuario','$clave','$sesion','1','1','1','1','1','1','1');";
@mysqli_query($borra_database);
@mysqli_query($database);
$sql = new Sql(SERVIDOR, USUARIO, CLAVE, BASEDATOS);
$sql->ejecuta($ubicaciones);
if ($sql->error()) {
return $this->panelMensaje($sql->mensajeError(), "danger", "ERROR");
}
$sql->ejecuta($articulos);
if ($sql->error()) {
return $this->panelMensaje($sql->mensajeError(), "danger", "ERROR");
}
$sql->ejecuta($elementos);
if ($sql->error()) {
return $this->panelMensaje($sql->mensajeError(), "danger", "ERROR");
}
$sql->ejecuta($usuarios);
if ($sql->error()) {
return $this->panelMensaje($sql->mensajeError(), "danger", "ERROR");
}
$sql->ejecuta($administrador);
if ($sql->error()) {
return $this->panelMensaje($sql->mensajeError(), "danger", "ERROR");
}
$campos="INSTALADO";
$datos['INSTALADO'] = "";
$this->actualizaConfiguracion(true, $campos, $datos);
return $this->resumen();
}
$info = '
<form data-toggle="validator" role="form" class="form-horizontal" method="post" action="Instalar.php?paso=2">
<div class="form-group">
<label for="usuario" class="control-label col-sm-2">Usuario</label>
<div class="form-group col-sm-10">
<input type="text" class="form-control" id="usuario" name="usuario" placeholder="nombre de usuario" data-minlength="5" data-minlength-error="Mínimo 5 caracteres" required>
<div class="help-block with-errors">Mínimo 5 caracteres</div>
</div>
</div>
<div class="form-group">
<label for="clave" class="control-label col-sm-2">Contraseña</label>
<div class="form-group col-sm-10">
<input type="password" data-toggle="validator" data-minlength="6" class="form-control" id="clave" name="clave" placeholder="Contraseña" data-minlength-error="Mínimo 6 caracteres" required>
<span class="help-block with-errors">Mínimo 6 caracteres</span>
<input type="password" class="form-control" id="claverepetida" data-match="#clave" data-match-error="No coincide" data-minlength-error="Mínimo 6 caracteres" placeholder="Confirmar contraseña" required>
<div class="help-block with-errors">Mínimo 6 caracteres</div>
</div>
</div>
<div class="form-group col-sm-12">
' . $this->botonVolver("Instalar.php?paso=1") . '
<button type="submit" class="btn btn-primary pull-right btn-lg" disabled="disabled">Crear base de datos y usuario <span class="glyphicon glyphicon-arrow-right"></button>
</div>
</div>
</form>
<script type="text/javascript" src="./css/validator.min.js"></script>';
$panel = $this->panelMensaje($info, 'primary', 'PASO 3: Creación de la base de datos y el usuario administrador.');
return $panel;
}
private function validaPaso2()
{
//La validación de este paso se hace con la del formulario en javascript
return true;
}
public function panelMensaje($info, $tipo = "info", $cabecera = "&iexcl;Atenci&oacute;n!") {
$mensaje = '<div class="panel panel-' . $tipo . ' col-sm-6"><div class="panel-heading">';
$mensaje .= '<h3 class="panel-title">' . $cabecera . '</h3></div>';
$mensaje .= '<div class="panel-body">';
$mensaje .= $info;
$mensaje .= '</div>';
$mensaje .= '</div>';
return $mensaje;
}
public function contenido()
{
return $this->contenido;
}
public function menu()
{
return '';
}
public function opcion()
{
return 'INSTALACI&Oacute;N';
}
public function control()
{
return '';
}
public function aplicacion()
{
return PROGRAMA . ' v' . VERSION;
}
public function usuario()
{
return '';
}
public function fecha()
{
$idioma = 'es_ES';
$formato = "%d-%b-%y";
setlocale(LC_TIME, $idioma);
return strftime($formato);
}
public function cabecera()
{
return '<!DOCTYPE html>
<html lang="es">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="Ricardo Montañana">
<link rel="shortcut icon" href="img/tux.ico">
<title>Inventario</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/dashboard.php" rel="stylesheet">
<link href="css/bootstrap-datetimepicker.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/jquery.simplecolorpicker.css">
<link rel="stylesheet" href="css/jquery.simplecolorpicker-glyphicons.css">
<link rel="stylesheet" href="css/jasny-bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-select/bootstrap-select.min.css">
<style type="text/css"></style>
<script type="text/javascript" src="./css/jquery.min.js"></script>
<script type="text/javascript" src="./css/bootstrap-select/bootstrap-select.min.js"></script>
</head>
<body>';
}
public function panelError()
{
$mensaje = $this->cabecera();
$mensaje .= $this->panelMensaje($this->error_msj, "danger", "&iexcl;ERROR!");
$mensaje .= "</body></html>";
return $mensaje;
}
private function resumen()
{
$info = '<ul class="list-group">';
$info .= '<li class="list-group-item list-group-item-info">Paso 1</li>';
$info .= $this->retornaElemento($this->retornaLabel(false, ""), "Configuración de PHP");
$info .= $this->retornaElemento($this->retornaLabel(false, ""), "Configuración de la aplicación");
$info .= '<li class="list-group-item list-group-item-info">Paso 2</li>';
$info .= $this->retornaElemento($this->retornaLabel(false, ""), "Configuración de la base de datos");
$info .= '<li class="list-group-item list-group-item-info">Paso 3</li>';
$info .= $this->retornaElemento($this->retornaLabel(false, ""), "Creación de Base de datos");
$info .= $this->retornaElemento($this->retornaLabel(false, ""), "Creación del usuario administrador");
$info .= '</ul>';
$info .= $this->retornaBoton(false, "index.php", true);
$panel = $this->panelMensaje($info, 'success', 'Instalación finalizada.');
return $panel;
}
}
?>

View File

@@ -40,14 +40,19 @@ class Inventario {
// Analizamos la cadena de solicitud para saber
// qué opción es la actual
$this->opcActual = $_SERVER['QUERY_STRING'] == '' ? 'principal' : $_SERVER['QUERY_STRING'];
//Si el programa no está instalado, llama al instalador.
if (INSTALADO == "no") {
header('location: Instalar.php');
return;
}
// Iniciamos una sesión
session_start();
//Conexión con la base de datos.
$this->bdd = new Sql(SERVIDOR, USUARIO, CLAVE, BASEDATOS);
if ($this->bdd->error()) {
echo '<h1>Fallo al conectar con el servidor MySQL.</h1>';
echo SERVIDOR;
echo "Servidor [ " . SERVIDOR . " ] usuario [" . USUARIO . "] clave [" . CLAVE . "] base [" . BASEDATOS . "]";
echo "Servidor [ " . SERVIDOR . " ] base de datos [" . BASEDATOS . "]";
$this->estado = false;
return;
} else {
@@ -124,22 +129,10 @@ class Inventario {
// Creamos un objeto Distribución facilitándole el
// nombre del archivo plantilla y el objeto que aportará
// el contenido
$opc = $_GET['opc'];
list($opcion, $parametro) = explode("&", $this->opcActual);
switch ($opc) {
case 'informe':
$enlace = 'xml/informe' . ucfirst($opcion) . '.xml';
//$enlace="tmp/inventarioUbicacion.xml";
$informe = new InformePDF($this->bdd, $enlace, $this->registrado);
$informe->crea($enlace);
$informe->cierraPDF();
$informe->imprimeInforme();
return;
default:
$salida = new Distribucion($this->plant, $this->creaContenido());
echo $salida->procesaPlantilla();
break;
}
$salida = new Distribucion($this->plant, $this->creaContenido());
echo $salida->procesaPlantilla();
break;
}
}
@@ -210,7 +203,6 @@ class Inventario {
$_SESSION['Perfil'] = $this->perfil;
}
}
}
?>

File diff suppressed because it is too large Load Diff

View File

@@ -44,7 +44,9 @@ class Menu {
if ($tipo==2)
$salida.='<li class="active"><a href="'.$enlace.'" target="'.$destino.'" title="'.$titulo.'">'.$opcion.'</a><br /></li>';
else
$salida.='<label class="key">'.$opcion.'</label><br/>';
$salida.=
//'<span class="label label-default">'.$opcion.'</span><br>';
'<label class="">'.$opcion.'</label><br/>';
}
return $salida;
}

View File

@@ -20,7 +20,7 @@
*
*/
class Pdf_mysql_table extends Fpdf
class Pdf_mysql_table extends FPDF
{
/**
* Modificado por Ricardo Montañana 05/2008 para añadir la posibilidad de cálculo de totales
@@ -61,7 +61,7 @@ class Pdf_mysql_table extends Fpdf
//Titulo
$fecha=strftime("%d-%b-%Y %H:%M");
$this->SetFont('Arial','',8);
$this->Cell(0,4,html_entity_decode(CENTRO . " " . APLICACION,ENT_COMPAT | ENT_HTML401,'ISO-8859-1'),0,1,'L');
$this->Cell(0,4,html_entity_decode(CENTRO . " " . PROGRAMA . " v" . VERSION,ENT_COMPAT | ENT_HTML401,'ISO-8859-1'),0,1,'L');
$this->SetFont('Arial','',18);
$this->Cell(0,6,utf8_decode($this->titulo),0,1,'C');
$this->SetFont('Arial','',8);
@@ -111,7 +111,8 @@ class Pdf_mysql_table extends Fpdf
if ($this->procesandoTotales) {
$this->SetFont('Arial','B',12);
}
$this->Cell($col['w'],5,utf8_decode($data[$col['f']]),1,0,$alin,$fill);
$dato = isset($data[$col['f']]) ? $data[$col['f']] : "";
$this->Cell($col['w'],5,utf8_decode($dato),1,0,$alin,$fill);
//$this->Cell($col['w'],5,utf8_decode($data[$col['f']]),1,0,$alin,$fill);
//$this->Cell($col['w'],5,utf8_decode($data['proveedor']),1,0,$alin,$fill);
//$this->Write(5,"nombre=".$col['f'].",titulo=".$col['c'].",ancho=".$col['w'].",alin=".$col['a']);
@@ -119,7 +120,10 @@ class Pdf_mysql_table extends Fpdf
//print_r($data);
//print_r($this->aCols);
if ($col['t']=='S' && !$this->procesandoTotales) {
$this->totales[$col['f']]+=$data[$col['f']];
if (isset($this->totales[$col['f']]))
$this->totales[$col['f']] += $data[$col['f']];
else
$this->totales[$col['f']] = $data[$col['f']];
}
}
@@ -161,7 +165,7 @@ class Pdf_mysql_table extends Fpdf
function Table($query,$prop=array())
{
//Issue query
$res=$this->bdd->query($query) or die('Error: '.$this->bdd->mysql_error()."<BR>Query: $query");
$res=$this->bdd->query($query) or die('Error: '.$this->bdd->error."<BR>Query: $query");
//Add all columns if none was specified
if(count($this->aCols)==0)
{

View File

@@ -1,4 +1,4 @@
# Inventario de Centro Educativo
# Inventario de Centro Educativo [![Project Stats](https://www.ohloh.net/p/inventario2/widgets/project_thin_badge.gif)](https://www.ohloh.net/p/inventario2)
Copyright (c) 2008-2014, Ricardo Montañana Gómez
Inventario2 is free software: you can redistribute it and/or modify
@@ -13,6 +13,12 @@ Utiliza:
*MySQL v. 5.1.x
*Apache
[Manual de Usuario](http://rmontanana.gitbooks.io/inventario2/)
[Instalación de ejemplo](http://inventario2.rmontanana.es)
[Estadísticas del proyecto](https://www.ohloh.net/p/inventario2)
##Instalación
Para instalar la aplicación basta con seguir estos pasos:
###1. Copiar los archivos en una ubicación a la que tenga acceso el usuario con el que se ejecuta el servidor Apache (apache, _www, etc.).
@@ -26,7 +32,8 @@ Para instalar la aplicación basta con seguir estos pasos:
###2. Crear un directorio temporal y dar derechos de escritura a los ficheros de configuración.
mkdir tmp
chown apache tmp
mkdir img.data
chown apache tmp img.data
chown apache inc/configuracion.inc
chown apache inc
@@ -38,14 +45,12 @@ Para instalar la aplicación basta con seguir estos pasos:
grant all on Inventario.* to usuario identified by "contraseña";
###5. Crear la estructura de la base de datos para poder comenzar a trabajar:
###5. Conectarse a la aplicación en la url donde se ha instalado:
mysql -u usuario --password=contraseña <sql/setup.sql
http://<url>
Con esto queda instalado el programa. Se crean en este proceso dos usuarios:
Al hacer esto se arrancará automáticamente el programa de instalación con el que terminaremos de configurar la aplicación.
Usuario: admin Usuario: demo
Contraseña: pruebas Contraseña: pruebas
##Modelo de datos
El modelo de datos que se ha utilizado ha sido:

20
Sql.php
View File

@@ -63,10 +63,10 @@ class Sql {
*/
public function __construct($servidor,$usuario,$clave,$baseDatos)
{
$this->bdd=new mysqli($servidor,$usuario,$clave,$baseDatos);
$this->bdd = @new mysqli($servidor,$usuario,$clave,$baseDatos);
if (mysqli_connect_errno()) {
$this->mensajeError='<h1>Fallo al conectar con el servidor MySQL.</h1>';
$this->mensajeError.="Servidor [".$servidor ."] usuario=[".$usuario."] clave [".$clave."] base [".$baseDatos."]";
$this->mensajeError.="Servidor [".$servidor ."] base de datos [".$baseDatos."]";
$this->error=true;
$this->estado=false;
} else {
@@ -152,6 +152,22 @@ class Sql {
public function numeroTuplas() {
return $this->numero;
}
/**
* Devuelve el número de tuplas total si se ha hecho una consulta select
* con SELECT SQL_CALC_FOUND_ROWS * ...
* @return integer Número de tuplas.
*/
public function numeroTotalTuplas()
{
$comando = "select found_rows();";
if (!$peticion=$this->bdd->query($comando)) {
$this->error=true;
$this->mensajeError='No pudo ejecutar la petici&oacute;n: '.$comando;
return false;
}
$numero = $peticion->fetch_row();
return $numero[0] ;
}
/**
* Devuelve la condición de error de la última petición
* @return boolean condición de error.

1707
Zebra_Image.php Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,29 @@
/*
* Translated default messages for bootstrap-select.
* Locale: ES (Spanish)
* Region: CL (Chile)
*/
(function($) {
$.fn.selectpicker.defaults = {
style: 'btn-default',
size: 'auto',
title: null,
selectedTextFormat : 'values',
noneSelectedText : 'No hay selección',
noneResultsText : 'No hay resultados',
countSelectedText : 'Seleccionados {0} de {1}',
maxOptionsText: ['Límite alcanzado ({n} {var} max)', 'Límite del grupo alcanzado({n} {var} max)', ['elementos','element']],
width: false,
container: false,
hideDisabled: false,
showSubtext: false,
showIcon: true,
showContent: true,
dropupAuto: true,
header: false,
liveSearch: false,
multipleSeparator: ', ',
iconBase: 'glyphicon',
tickIcon: 'glyphicon-ok'
};
}(jQuery));

View File

@@ -0,0 +1,6 @@
/*
* Translated default messages for bootstrap-select.
* Locale: ES (Spanish)
* Region: CL (Chile)
*/
(function(e){e.fn.selectpicker.defaults={style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",noneSelectedText:"No hay selección",noneResultsText:"No hay resultados",countSelectedText:"Seleccionados {0} de {1}",maxOptionsText:["Límite alcanzado ({n} {var} max)","Límite del grupo alcanzado({n} {var} max)",["elementos","element"]],width:false,container:false,hideDisabled:false,showSubtext:false,showIcon:true,showContent:true,dropupAuto:true,header:false,liveSearch:false,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok"}})(jQuery)

View File

@@ -0,0 +1,30 @@
/*
* Translated default messages for bootstrap-select.
* Locale: EU (Basque)
* Region:
*/
(function($) {
$.fn.selectpicker.defaults = {
style: 'btn-default',
size: 'auto',
title: null,
selectedTextFormat : 'values',
noneSelectedText : 'Hautapenik ez',
noneResultsText : 'Emaitzarik ez',
countSelectedText : '{1}(e)tik {0} hautatuta',
maxOptionsText: ['Mugara iritsita ({n} {var} gehienez)', 'Taldearen mugara iritsita ({n} {var} gehienez)', ['elementu','elementu']],
width: false,
container: false,
hideDisabled: false,
showSubtext: false,
showIcon: true,
showContent: true,
dropupAuto: true,
header: false,
liveSearch: false,
multipleSeparator: ', ',
iconBase: 'glyphicon',
tickIcon: 'glyphicon-ok'
};
}(jQuery));

View File

@@ -0,0 +1,6 @@
/*
* Translated default messages for bootstrap-select.
* Locale: EU (Basque)
* Region:
*/
(function(e){e.fn.selectpicker.defaults={style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",noneSelectedText:"Hautapenik ez",noneResultsText:"Emaitzarik ez",countSelectedText:"{1}(e)tik {0} hautatuta",maxOptionsText:["Mugara iritsita ({n} {var} gehienez)","Taldearen mugara iritsita ({n} {var} gehienez)",["elementu","elementu"]],width:false,container:false,hideDisabled:false,showSubtext:false,showIcon:true,showContent:true,dropupAuto:true,header:false,liveSearch:false,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok"}})(jQuery)

View File

@@ -0,0 +1,33 @@
/*
* Translated default messages for bootstrap-select.
* Locale: PT (Portuguese; português)
* Region: BR (Brazil; Brasil)
* Author: Rodrigo de Avila <rodrigo@avila.net.br>
*/
(function($) {
$.fn.selectpicker.defaults = {
style: 'btn-default',
size: 'auto',
title: null,
selectedTextFormat : 'values',
noneSelectedText : 'Nada selecionado',
noneResultsText : 'Nada encontrado contendo',
countSelectedText : 'Selecionado {0} de {1}',
maxOptionsText: ['Limite excedido (máx. {n} {var})', 'Limite do grupo excedido (máx. {n} {var})', ['itens','item']],
width: false,
container: false,
hideDisabled: false,
showSubtext: false,
showIcon: true,
showContent: true,
dropupAuto: true,
header: false,
liveSearch: false,
actionsBox: false,
multipleSeparator: ', ',
iconBase: 'glyphicon',
tickIcon: 'glyphicon-ok',
maxOptions: false
};
}(jQuery));

View File

@@ -0,0 +1,7 @@
/*
* Translated default messages for bootstrap-select.
* Locale: PT (Portuguese; português)
* Region: BR (Brazil; Brasil)
* Author: Rodrigo de Avila <rodrigo@avila.net.br>
*/
!function(a){a.fn.selectpicker.defaults={style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",noneSelectedText:"Nada selecionado",noneResultsText:"Nada encontrado contendo",countSelectedText:"Selecionado {0} de {1}",maxOptionsText:["Limite excedido (m\xe1x. {n} {var})","Limite do grupo excedido (m\xe1x. {n} {var})",["itens","item"]],width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,actionsBox:!1,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok",maxOptions:!1}}(jQuery);

View File

@@ -0,0 +1,31 @@
/*
* Translated default messages for bootstrap-select.
* Locale: RU (Russian; русский)
* Region: RU (Russian Federation)
*/
(function($) {
$.fn.selectpicker.defaults = {
style: 'btn-default',
size: 'auto',
title: null,
selectedTextFormat : 'values',
noneSelectedText : 'Ничего не выбрано',
noneResultsText : 'Не нейдено совпадений',
countSelectedText : 'Выбрано {0} из {1}',
maxOptionsText: ['Достигнут предел ({n} {var} максимум)', 'Достигнут предел в группе ({n} {var} максимум)', ['items','item']],
width: false,
container: false,
hideDisabled: false,
showSubtext: false,
showIcon: true,
showContent: true,
dropupAuto: true,
header: false,
liveSearch: false,
actionsBox: false,
multipleSeparator: ', ',
iconBase: 'glyphicon',
tickIcon: 'glyphicon-ok',
maxOptions: false
};
}(jQuery));

View File

@@ -0,0 +1,6 @@
/*
* Translated default messages for bootstrap-select.
* Locale: RU (Russian; русский)
* Region: RU (Russian Federation)
*/
(function(e){e.fn.selectpicker.defaults={style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",noneSelectedText:"Ничего не выбрано",noneResultsText:"Не нейдено совпадений",countSelectedText:"Выбрано {0} из {1}",maxOptionsText:["Достигнут предел ({n} {var} максимум)","Достигнут предел в группе ({n} {var} максимум)",["items","item"]],width:false,container:false,hideDisabled:false,showSubtext:false,showIcon:true,showContent:true,dropupAuto:true,header:false,liveSearch:false,actionsBox:false,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok",maxOptions:false}})(jQuery)

View File

@@ -0,0 +1,663 @@
/*! X-editable - v1.5.1
* In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
* http://github.com/vitalets/x-editable
* Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */
.editableform {
margin-bottom: 0; /* overwrites bootstrap margin */
}
.editableform .control-group {
margin-bottom: 0; /* overwrites bootstrap margin */
white-space: nowrap; /* prevent wrapping buttons on new line */
line-height: 20px; /* overwriting bootstrap line-height. See #133 */
}
/*
BS3 width:1005 for inputs breaks editable form in popup
See: https://github.com/vitalets/x-editable/issues/393
*/
.editableform .form-control {
width: auto;
}
.editable-buttons {
display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
vertical-align: top;
margin-left: 7px;
/* inline-block emulation for IE7*/
zoom: 1;
*display: inline;
}
.editable-buttons.editable-buttons-bottom {
display: block;
margin-top: 7px;
margin-left: 0;
}
.editable-input {
vertical-align: top;
display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
width: auto; /* bootstrap-responsive has width: 100% that breakes layout */
white-space: normal; /* reset white-space decalred in parent*/
/* display-inline emulation for IE7*/
zoom: 1;
*display: inline;
}
.editable-buttons .editable-cancel {
margin-left: 7px;
}
/*for jquery-ui buttons need set height to look more pretty*/
.editable-buttons button.ui-button-icon-only {
height: 24px;
width: 30px;
}
.editableform-loading {
background: url('../img/loading.gif') center center no-repeat;
height: 25px;
width: auto;
min-width: 25px;
}
.editable-inline .editableform-loading {
background-position: left 5px;
}
.editable-error-block {
max-width: 300px;
margin: 5px 0 0 0;
width: auto;
white-space: normal;
}
/*add padding for jquery ui*/
.editable-error-block.ui-state-error {
padding: 3px;
}
.editable-error {
color: red;
}
/* ---- For specific types ---- */
.editableform .editable-date {
padding: 0;
margin: 0;
float: left;
}
/* move datepicker icon to center of add-on button. See https://github.com/vitalets/x-editable/issues/183 */
.editable-inline .add-on .icon-th {
margin-top: 3px;
margin-left: 1px;
}
/* checklist vertical alignment */
.editable-checklist label input[type="checkbox"],
.editable-checklist label span {
vertical-align: middle;
margin: 0;
}
.editable-checklist label {
white-space: nowrap;
}
/* set exact width of textarea to fit buttons toolbar */
.editable-wysihtml5 {
width: 566px;
height: 250px;
}
/* clear button shown as link in date inputs */
.editable-clear {
clear: both;
font-size: 0.9em;
text-decoration: none;
text-align: right;
}
/* IOS-style clear button for text inputs */
.editable-clear-x {
background: url('../img/clear.png') center center no-repeat;
display: block;
width: 13px;
height: 13px;
position: absolute;
opacity: 0.6;
z-index: 100;
top: 50%;
right: 6px;
margin-top: -6px;
}
.editable-clear-x:hover {
opacity: 1;
}
.editable-pre-wrapped {
white-space: pre-wrap;
}
.editable-container.editable-popup {
max-width: none !important; /* without this rule poshytip/tooltip does not stretch */
}
.editable-container.popover {
width: auto; /* without this rule popover does not stretch */
}
.editable-container.editable-inline {
display: inline-block;
vertical-align: middle;
width: auto;
/* inline-block emulation for IE7*/
zoom: 1;
*display: inline;
}
.editable-container.ui-widget {
font-size: inherit; /* jqueryui widget font 1.1em too big, overwrite it */
z-index: 9990; /* should be less than select2 dropdown z-index to close dropdown first when click */
}
.editable-click,
a.editable-click,
a.editable-click:hover {
text-decoration: none;
border-bottom: dashed 1px #0088cc;
}
.editable-click.editable-disabled,
a.editable-click.editable-disabled,
a.editable-click.editable-disabled:hover {
color: #585858;
cursor: default;
border-bottom: none;
}
.editable-empty, .editable-empty:hover, .editable-empty:focus{
font-style: italic;
color: #DD1144;
/* border-bottom: none; */
text-decoration: none;
}
.editable-unsaved {
font-weight: bold;
}
.editable-unsaved:after {
/* content: '*'*/
}
.editable-bg-transition {
-webkit-transition: background-color 1400ms ease-out;
-moz-transition: background-color 1400ms ease-out;
-o-transition: background-color 1400ms ease-out;
-ms-transition: background-color 1400ms ease-out;
transition: background-color 1400ms ease-out;
}
/*see https://github.com/vitalets/x-editable/issues/139 */
.form-horizontal .editable
{
padding-top: 5px;
display:inline-block;
}
/*!
* Datepicker for Bootstrap
*
* Copyright 2012 Stefan Petre
* Improvements by Andrew Rowls
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
*/
.datepicker {
padding: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
direction: ltr;
/*.dow {
border-top: 1px solid #ddd !important;
}*/
}
.datepicker-inline {
width: 220px;
}
.datepicker.datepicker-rtl {
direction: rtl;
}
.datepicker.datepicker-rtl table tr td span {
float: right;
}
.datepicker-dropdown {
top: 0;
left: 0;
}
.datepicker-dropdown:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
border-bottom-color: rgba(0, 0, 0, 0.2);
position: absolute;
top: -7px;
left: 6px;
}
.datepicker-dropdown:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #ffffff;
position: absolute;
top: -6px;
left: 7px;
}
.datepicker > div {
display: none;
}
.datepicker.days div.datepicker-days {
display: block;
}
.datepicker.months div.datepicker-months {
display: block;
}
.datepicker.years div.datepicker-years {
display: block;
}
.datepicker table {
margin: 0;
}
.datepicker td,
.datepicker th {
text-align: center;
width: 20px;
height: 20px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
border: none;
}
.table-striped .datepicker table tr td,
.table-striped .datepicker table tr th {
background-color: transparent;
}
.datepicker table tr td.day:hover {
background: #eeeeee;
cursor: pointer;
}
.datepicker table tr td.old,
.datepicker table tr td.new {
color: #999999;
}
.datepicker table tr td.disabled,
.datepicker table tr td.disabled:hover {
background: none;
color: #999999;
cursor: default;
}
.datepicker table tr td.today,
.datepicker table tr td.today:hover,
.datepicker table tr td.today.disabled,
.datepicker table tr td.today.disabled:hover {
background-color: #fde19a;
background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a));
background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
background-image: linear-gradient(top, #fdd49a, #fdf59a);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0);
border-color: #fdf59a #fdf59a #fbed50;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #000;
}
.datepicker table tr td.today:hover,
.datepicker table tr td.today:hover:hover,
.datepicker table tr td.today.disabled:hover,
.datepicker table tr td.today.disabled:hover:hover,
.datepicker table tr td.today:active,
.datepicker table tr td.today:hover:active,
.datepicker table tr td.today.disabled:active,
.datepicker table tr td.today.disabled:hover:active,
.datepicker table tr td.today.active,
.datepicker table tr td.today:hover.active,
.datepicker table tr td.today.disabled.active,
.datepicker table tr td.today.disabled:hover.active,
.datepicker table tr td.today.disabled,
.datepicker table tr td.today:hover.disabled,
.datepicker table tr td.today.disabled.disabled,
.datepicker table tr td.today.disabled:hover.disabled,
.datepicker table tr td.today[disabled],
.datepicker table tr td.today:hover[disabled],
.datepicker table tr td.today.disabled[disabled],
.datepicker table tr td.today.disabled:hover[disabled] {
background-color: #fdf59a;
}
.datepicker table tr td.today:active,
.datepicker table tr td.today:hover:active,
.datepicker table tr td.today.disabled:active,
.datepicker table tr td.today.disabled:hover:active,
.datepicker table tr td.today.active,
.datepicker table tr td.today:hover.active,
.datepicker table tr td.today.disabled.active,
.datepicker table tr td.today.disabled:hover.active {
background-color: #fbf069 \9;
}
.datepicker table tr td.today:hover:hover {
color: #000;
}
.datepicker table tr td.today.active:hover {
color: #fff;
}
.datepicker table tr td.range,
.datepicker table tr td.range:hover,
.datepicker table tr td.range.disabled,
.datepicker table tr td.range.disabled:hover {
background: #eeeeee;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.datepicker table tr td.range.today,
.datepicker table tr td.range.today:hover,
.datepicker table tr td.range.today.disabled,
.datepicker table tr td.range.today.disabled:hover {
background-color: #f3d17a;
background-image: -moz-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -ms-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3c17a), to(#f3e97a));
background-image: -webkit-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -o-linear-gradient(top, #f3c17a, #f3e97a);
background-image: linear-gradient(top, #f3c17a, #f3e97a);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c17a', endColorstr='#f3e97a', GradientType=0);
border-color: #f3e97a #f3e97a #edde34;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.datepicker table tr td.range.today:hover,
.datepicker table tr td.range.today:hover:hover,
.datepicker table tr td.range.today.disabled:hover,
.datepicker table tr td.range.today.disabled:hover:hover,
.datepicker table tr td.range.today:active,
.datepicker table tr td.range.today:hover:active,
.datepicker table tr td.range.today.disabled:active,
.datepicker table tr td.range.today.disabled:hover:active,
.datepicker table tr td.range.today.active,
.datepicker table tr td.range.today:hover.active,
.datepicker table tr td.range.today.disabled.active,
.datepicker table tr td.range.today.disabled:hover.active,
.datepicker table tr td.range.today.disabled,
.datepicker table tr td.range.today:hover.disabled,
.datepicker table tr td.range.today.disabled.disabled,
.datepicker table tr td.range.today.disabled:hover.disabled,
.datepicker table tr td.range.today[disabled],
.datepicker table tr td.range.today:hover[disabled],
.datepicker table tr td.range.today.disabled[disabled],
.datepicker table tr td.range.today.disabled:hover[disabled] {
background-color: #f3e97a;
}
.datepicker table tr td.range.today:active,
.datepicker table tr td.range.today:hover:active,
.datepicker table tr td.range.today.disabled:active,
.datepicker table tr td.range.today.disabled:hover:active,
.datepicker table tr td.range.today.active,
.datepicker table tr td.range.today:hover.active,
.datepicker table tr td.range.today.disabled.active,
.datepicker table tr td.range.today.disabled:hover.active {
background-color: #efe24b \9;
}
.datepicker table tr td.selected,
.datepicker table tr td.selected:hover,
.datepicker table tr td.selected.disabled,
.datepicker table tr td.selected.disabled:hover {
background-color: #9e9e9e;
background-image: -moz-linear-gradient(top, #b3b3b3, #808080);
background-image: -ms-linear-gradient(top, #b3b3b3, #808080);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b3b3b3), to(#808080));
background-image: -webkit-linear-gradient(top, #b3b3b3, #808080);
background-image: -o-linear-gradient(top, #b3b3b3, #808080);
background-image: linear-gradient(top, #b3b3b3, #808080);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3b3b3', endColorstr='#808080', GradientType=0);
border-color: #808080 #808080 #595959;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker table tr td.selected:hover,
.datepicker table tr td.selected:hover:hover,
.datepicker table tr td.selected.disabled:hover,
.datepicker table tr td.selected.disabled:hover:hover,
.datepicker table tr td.selected:active,
.datepicker table tr td.selected:hover:active,
.datepicker table tr td.selected.disabled:active,
.datepicker table tr td.selected.disabled:hover:active,
.datepicker table tr td.selected.active,
.datepicker table tr td.selected:hover.active,
.datepicker table tr td.selected.disabled.active,
.datepicker table tr td.selected.disabled:hover.active,
.datepicker table tr td.selected.disabled,
.datepicker table tr td.selected:hover.disabled,
.datepicker table tr td.selected.disabled.disabled,
.datepicker table tr td.selected.disabled:hover.disabled,
.datepicker table tr td.selected[disabled],
.datepicker table tr td.selected:hover[disabled],
.datepicker table tr td.selected.disabled[disabled],
.datepicker table tr td.selected.disabled:hover[disabled] {
background-color: #808080;
}
.datepicker table tr td.selected:active,
.datepicker table tr td.selected:hover:active,
.datepicker table tr td.selected.disabled:active,
.datepicker table tr td.selected.disabled:hover:active,
.datepicker table tr td.selected.active,
.datepicker table tr td.selected:hover.active,
.datepicker table tr td.selected.disabled.active,
.datepicker table tr td.selected.disabled:hover.active {
background-color: #666666 \9;
}
.datepicker table tr td.active,
.datepicker table tr td.active:hover,
.datepicker table tr td.active.disabled,
.datepicker table tr td.active.disabled:hover {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker table tr td.active:hover,
.datepicker table tr td.active:hover:hover,
.datepicker table tr td.active.disabled:hover,
.datepicker table tr td.active.disabled:hover:hover,
.datepicker table tr td.active:active,
.datepicker table tr td.active:hover:active,
.datepicker table tr td.active.disabled:active,
.datepicker table tr td.active.disabled:hover:active,
.datepicker table tr td.active.active,
.datepicker table tr td.active:hover.active,
.datepicker table tr td.active.disabled.active,
.datepicker table tr td.active.disabled:hover.active,
.datepicker table tr td.active.disabled,
.datepicker table tr td.active:hover.disabled,
.datepicker table tr td.active.disabled.disabled,
.datepicker table tr td.active.disabled:hover.disabled,
.datepicker table tr td.active[disabled],
.datepicker table tr td.active:hover[disabled],
.datepicker table tr td.active.disabled[disabled],
.datepicker table tr td.active.disabled:hover[disabled] {
background-color: #0044cc;
}
.datepicker table tr td.active:active,
.datepicker table tr td.active:hover:active,
.datepicker table tr td.active.disabled:active,
.datepicker table tr td.active.disabled:hover:active,
.datepicker table tr td.active.active,
.datepicker table tr td.active:hover.active,
.datepicker table tr td.active.disabled.active,
.datepicker table tr td.active.disabled:hover.active {
background-color: #003399 \9;
}
.datepicker table tr td span {
display: block;
width: 23%;
height: 54px;
line-height: 54px;
float: left;
margin: 1%;
cursor: pointer;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.datepicker table tr td span:hover {
background: #eeeeee;
}
.datepicker table tr td span.disabled,
.datepicker table tr td span.disabled:hover {
background: none;
color: #999999;
cursor: default;
}
.datepicker table tr td span.active,
.datepicker table tr td span.active:hover,
.datepicker table tr td span.active.disabled,
.datepicker table tr td span.active.disabled:hover {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker table tr td span.active:hover,
.datepicker table tr td span.active:hover:hover,
.datepicker table tr td span.active.disabled:hover,
.datepicker table tr td span.active.disabled:hover:hover,
.datepicker table tr td span.active:active,
.datepicker table tr td span.active:hover:active,
.datepicker table tr td span.active.disabled:active,
.datepicker table tr td span.active.disabled:hover:active,
.datepicker table tr td span.active.active,
.datepicker table tr td span.active:hover.active,
.datepicker table tr td span.active.disabled.active,
.datepicker table tr td span.active.disabled:hover.active,
.datepicker table tr td span.active.disabled,
.datepicker table tr td span.active:hover.disabled,
.datepicker table tr td span.active.disabled.disabled,
.datepicker table tr td span.active.disabled:hover.disabled,
.datepicker table tr td span.active[disabled],
.datepicker table tr td span.active:hover[disabled],
.datepicker table tr td span.active.disabled[disabled],
.datepicker table tr td span.active.disabled:hover[disabled] {
background-color: #0044cc;
}
.datepicker table tr td span.active:active,
.datepicker table tr td span.active:hover:active,
.datepicker table tr td span.active.disabled:active,
.datepicker table tr td span.active.disabled:hover:active,
.datepicker table tr td span.active.active,
.datepicker table tr td span.active:hover.active,
.datepicker table tr td span.active.disabled.active,
.datepicker table tr td span.active.disabled:hover.active {
background-color: #003399 \9;
}
.datepicker table tr td span.old,
.datepicker table tr td span.new {
color: #999999;
}
.datepicker th.datepicker-switch {
width: 145px;
}
.datepicker thead tr:first-child th,
.datepicker tfoot tr th {
cursor: pointer;
}
.datepicker thead tr:first-child th:hover,
.datepicker tfoot tr th:hover {
background: #eeeeee;
}
.datepicker .cw {
font-size: 10px;
width: 12px;
padding: 0 2px 0 5px;
vertical-align: middle;
}
.datepicker thead tr:first-child th.cw {
cursor: default;
background-color: transparent;
}
.input-append.date .add-on i,
.input-prepend.date .add-on i {
display: block;
cursor: pointer;
width: 16px;
height: 16px;
}
.input-daterange input {
text-align: center;
}
.input-daterange input:first-child {
-webkit-border-radius: 3px 0 0 3px;
-moz-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
}
.input-daterange input:last-child {
-webkit-border-radius: 0 3px 3px 0;
-moz-border-radius: 0 3px 3px 0;
border-radius: 0 3px 3px 0;
}
.input-daterange .add-on {
display: inline-block;
width: auto;
min-width: 16px;
height: 18px;
padding: 4px 5px;
font-weight: normal;
line-height: 18px;
text-align: center;
text-shadow: 0 1px 0 #ffffff;
vertical-align: middle;
background-color: #eeeeee;
border: 1px solid #ccc;
margin-left: -5px;
margin-right: -5px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

6807
css/bootstrap3-editable/js/bootstrap-editable.js vendored Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -3,100 +3,112 @@ include('../inc/configuracion.inc');
header("Content-type: text/css");
?>
/*
* Base structure
*/
* Base structure
*/
/* Move down content because we have a fixed navbar that is 50px tall */
body {
padding-top: 50px;
background-color: <?php echo COLORFON; ?>; /*Fondo*/
padding-top: 50px;
background-color: <?php echo COLORFON; ?>; /*Fondo*/
}
/*
* Global add-ons
*/
* Global add-ons
*/
.sub-header {
padding-bottom: 10px;
border-bottom: 1px solid #eee;
padding-bottom: 10px;
border-bottom: 1px solid #eee;
}
/*
* Sidebar
*/
* Sidebar
*/
/* Hide for mobile, show later */
.sidebar {
display: none;
display: none;
}
@media (max-width: 767px) {
.sidebar {
top: 60px;
bottom: 150px;
background-color: <?php echo COLORLAT; ?>
}
}
@media (min-width: 768px) {
.sidebar {
position: fixed;
top: 51px;
bottom: 0;
left: 0;
z-index: 1000;
display: block;
padding: 5px;
overflow-x: hidden;
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
background-color: <?php echo COLORLAT; ?>;/*Lateral*/
border-right: 1px solid #eee;
}
.sidebar {
position: fixed;
top: 51px;
bottom: 0;
left: 0;
z-index: 1000;
display: block;
padding: 5px;
overflow-x: hidden;
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
background-color: <?php echo COLORLAT; ?>;/*Lateral*/
border-right: 1px solid #eee;
}
}
/* Sidebar navigation */
.nav-sidebar {
margin-right: -6px; /* 20px padding + 1px border */
margin-bottom: 1px;
margin-left: -1px;
margin-right: -6px; /* 20px padding + 1px border */
margin-bottom: 1px;
margin-left: -1px;
}
.nav-sidebar > li > a {
padding-right: 5px;
padding-left: 5px;
padding-right: 5px;
padding-left: 5px;
}
.nav-sidebar > .active > a {
color: #fff;
background-color: #428bca;
color: #fff;
background-color: #428bca;
}
/*
* Main content
*/
* Main content
*/
.main {
padding: 10px;
padding: 10px;
}
@media (max-width: 767px) {
.main{
margin-top: 50px;
}
}
@media (min-width: 768px) {
.main {
padding-right: 20px;
padding-left: 20px;
}
.main {
padding-right: 20px;
padding-left: 20px;
}
}
.main .page-header {
margin-top: 0;
margin-top: 0;
}
/*
* Placeholder dashboard ideas
*/
* Placeholder dashboard ideas
*/
.placeholders {
margin-bottom: 5px;
text-align: center;
margin-bottom: 5px;
text-align: center;
}
.placeholders h4 {
margin-bottom: 0;
margin-bottom: 0;
}
.placeholder {
margin-bottom: 5px;
margin-bottom: 5px;
}
.placeholder img {
display: inline-block;
border-radius: 25%;
display: inline-block;
border-radius: 25%;
}

7
css/jasny-bootstrap.min.css vendored Normal file

File diff suppressed because one or more lines are too long

6
css/jasny-bootstrap.min.js vendored Normal file

File diff suppressed because one or more lines are too long

9
css/validator.min.js vendored Executable file
View File

@@ -0,0 +1,9 @@
/*!
* Validator v0.2.1 for Bootstrap 3, by @1000hz
* Copyright 2014 Spiceworks, Inc.
* Licensed under http://opensource.org/licenses/MIT
*
* https://github.com/1000hz/bootstrap-validator
*/
+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=c,this.toggleSubmit(),this.$element.on("input.bs.validator blur.bs.validator",":input",a.proxy(this.validateInput,this)),this.$element.find("[data-match]").each(function(){var b=a(this),c=b.data("match");a(c).on("input.bs.validator",function(){b.val()&&b.trigger("input")})})};b.DEFAULTS={delay:500,errors:{match:"Does not match",minlength:"Not long enough"}},b.VALIDATORS={"native":function(a){var b=a[0];return b.checkValidity?b.checkValidity():!0},match:function(b){var c=b.data("match");return!b.val()||b.val()===a(c).val()},minlength:function(a){var b=a.data("minlength");return!a.val()||a.val().length>=b}},b.prototype.validateInput=function(b){var c,d=a(b.target),e=d.data("bs.errors");this.$element.trigger(b=a.Event("validate.bs.validator",{relatedTarget:d[0]})),b.isDefaultPrevented()||(d.data("bs.errors",c=this.runValidators(d)),c.length?this.showErrors(d):this.clearErrors(d),e&&c.toString()===e.toString()||(b=c.length?a.Event("invalid.bs.validator",{relatedTarget:d[0],detail:c}):a.Event("valid.bs.validator",{relatedTarget:d[0],detail:e}),this.$element.trigger(b)),this.toggleSubmit(),this.$element.trigger(a.Event("validated.bs.validator",{relatedTarget:d[0]})))},b.prototype.runValidators=function(c){{var d=[];[b.VALIDATORS.native]}return a.each(b.VALIDATORS,a.proxy(function(a,b){if((c.data(a)||"native"==a)&&!b.call(this,c)){var e=c.data(a+"-error")||c.data("error")||"native"==a&&c[0].validationMessage||this.options.errors[a];!~d.indexOf(e)&&d.push(e)}},this)),d},b.prototype.validate=function(){var a=this.options.delay;return this.options.delay=0,this.$element.find(":input").trigger("input"),this.options.delay=a,this},b.prototype.showErrors=function(b){function c(){var c=b.closest(".form-group"),d=c.find(".help-block.with-errors"),e=b.data("bs.errors");e.length&&(e=a("<ul/>").addClass("list-unstyled").append(a.map(e,function(b){return a("<li/>").text(b)})),void 0===d.data("bs.originalContent")&&d.data("bs.originalContent",d.html()),d.empty().append(e),c.addClass("has-error"))}this.options.delay?(window.clearTimeout(b.data("bs.timeout")),b.data("bs.timeout",window.setTimeout(c,this.options.delay))):c()},b.prototype.clearErrors=function(a){var b=a.closest(".form-group"),c=b.find(".help-block.with-errors");c.html(c.data("bs.originalContent")),b.removeClass("has-error")},b.prototype.hasErrors=function(){function b(){return!!(a(this).data("bs.errors")||[]).length}return!!this.$element.find(":input").filter(b).length},b.prototype.isIncomplete=function(){function b(){return""===a.trim(this.value)}return!!this.$element.find("[required]").filter(b).length},b.prototype.toggleSubmit=function(){var a=this.$element.find(":submit");a.attr("disabled",this.isIncomplete()||this.hasErrors())};var c=a.fn.validator;a.fn.validator=function(c){return this.each(function(){var d=a(this),e=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),f=d.data("bs.validator");f||d.data("bs.validator",f=new b(this,e)),"string"==typeof c&&f[c]()})},a.fn.validator.Constructor=b,a.fn.validator.noConflict=function(){return a.fn.validator=c,this},a(window).on("load",function(){a('form[data-toggle="validator"]').each(function(){var b=a(this);b.validator(b.data())})})}(jQuery);

View File

@@ -1,8 +1,8 @@
<?php
$type = 'Core';
$name = 'Courier';
$up = -100;
$ut = 50;
for($i=0;$i<=255;$i++)
$cw[chr($i)] = 600;
?>
<?php
$type = 'Core';
$name = 'Courier';
$up = -100;
$ut = 50;
for($i=0;$i<=255;$i++)
$cw[chr($i)] = 600;
?>

View File

@@ -1,8 +1,8 @@
<?php
$type = 'Core';
$name = 'Courier-Bold';
$up = -100;
$ut = 50;
for($i=0;$i<=255;$i++)
$cw[chr($i)] = 600;
?>
<?php
$type = 'Core';
$name = 'Courier-Bold';
$up = -100;
$ut = 50;
for($i=0;$i<=255;$i++)
$cw[chr($i)] = 600;
?>

View File

@@ -1,8 +1,8 @@
<?php
$type = 'Core';
$name = 'Courier-BoldOblique';
$up = -100;
$ut = 50;
for($i=0;$i<=255;$i++)
$cw[chr($i)] = 600;
?>
<?php
$type = 'Core';
$name = 'Courier-BoldOblique';
$up = -100;
$ut = 50;
for($i=0;$i<=255;$i++)
$cw[chr($i)] = 600;
?>

View File

@@ -1,8 +1,8 @@
<?php
$type = 'Core';
$name = 'Courier-Oblique';
$up = -100;
$ut = 50;
for($i=0;$i<=255;$i++)
$cw[chr($i)] = 600;
?>
<?php
$type = 'Core';
$name = 'Courier-Oblique';
$up = -100;
$ut = 50;
for($i=0;$i<=255;$i++)
$cw[chr($i)] = 600;
?>

View File

@@ -1,19 +1,19 @@
<?php
$type = 'Core';
$name = 'Helvetica';
$up = -100;
$ut = 50;
$cw = array(
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
?>
<?php
$type = 'Core';
$name = 'Helvetica';
$up = -100;
$ut = 50;
$cw = array(
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
?>

View File

@@ -1,19 +1,19 @@
<?php
$type = 'Core';
$name = 'Helvetica-Bold';
$up = -100;
$ut = 50;
$cw = array(
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
?>
<?php
$type = 'Core';
$name = 'Helvetica-Bold';
$up = -100;
$ut = 50;
$cw = array(
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
?>

View File

@@ -1,19 +1,19 @@
<?php
$type = 'Core';
$name = 'Helvetica-BoldOblique';
$up = -100;
$ut = 50;
$cw = array(
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
?>
<?php
$type = 'Core';
$name = 'Helvetica-BoldOblique';
$up = -100;
$ut = 50;
$cw = array(
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
?>

View File

@@ -1,19 +1,19 @@
<?php
$type = 'Core';
$name = 'Helvetica-Oblique';
$up = -100;
$ut = 50;
$cw = array(
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
?>
<?php
$type = 'Core';
$name = 'Helvetica-Oblique';
$up = -100;
$ut = 50;
$cw = array(
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
?>

View File

@@ -1,419 +1,419 @@
<?php
/*******************************************************************************
* Utility to generate font definition files *
* *
* Version: 1.14 *
* Date: 2008-08-03 *
* Author: Olivier PLATHEY *
*******************************************************************************/
function ReadMap($enc)
{
//Read a map file
$file=dirname(__FILE__).'/'.strtolower($enc).'.map';
$a=file($file);
if(empty($a))
die('<b>Error:</b> encoding not found: '.$enc);
$cc2gn=array();
foreach($a as $l)
{
if($l[0]=='!')
{
$e=preg_split('/[ \\t]+/',rtrim($l));
$cc=hexdec(substr($e[0],1));
$gn=$e[2];
$cc2gn[$cc]=$gn;
}
}
for($i=0;$i<=255;$i++)
{
if(!isset($cc2gn[$i]))
$cc2gn[$i]='.notdef';
}
return $cc2gn;
}
function ReadAFM($file, &$map)
{
//Read a font metric file
$a=file($file);
if(empty($a))
die('File not found');
$widths=array();
$fm=array();
$fix=array('Edot'=>'Edotaccent','edot'=>'edotaccent','Idot'=>'Idotaccent','Zdot'=>'Zdotaccent','zdot'=>'zdotaccent',
'Odblacute'=>'Ohungarumlaut','odblacute'=>'ohungarumlaut','Udblacute'=>'Uhungarumlaut','udblacute'=>'uhungarumlaut',
'Gcedilla'=>'Gcommaaccent','gcedilla'=>'gcommaaccent','Kcedilla'=>'Kcommaaccent','kcedilla'=>'kcommaaccent',
'Lcedilla'=>'Lcommaaccent','lcedilla'=>'lcommaaccent','Ncedilla'=>'Ncommaaccent','ncedilla'=>'ncommaaccent',
'Rcedilla'=>'Rcommaaccent','rcedilla'=>'rcommaaccent','Scedilla'=>'Scommaaccent','scedilla'=>'scommaaccent',
'Tcedilla'=>'Tcommaaccent','tcedilla'=>'tcommaaccent','Dslash'=>'Dcroat','dslash'=>'dcroat','Dmacron'=>'Dcroat','dmacron'=>'dcroat',
'combininggraveaccent'=>'gravecomb','combininghookabove'=>'hookabovecomb','combiningtildeaccent'=>'tildecomb',
'combiningacuteaccent'=>'acutecomb','combiningdotbelow'=>'dotbelowcomb','dongsign'=>'dong');
foreach($a as $l)
{
$e=explode(' ',rtrim($l));
if(count($e)<2)
continue;
$code=$e[0];
$param=$e[1];
if($code=='C')
{
//Character metrics
$cc=(int)$e[1];
$w=$e[4];
$gn=$e[7];
if(substr($gn,-4)=='20AC')
$gn='Euro';
if(isset($fix[$gn]))
{
//Fix incorrect glyph name
foreach($map as $c=>$n)
{
if($n==$fix[$gn])
$map[$c]=$gn;
}
}
if(empty($map))
{
//Symbolic font: use built-in encoding
$widths[$cc]=$w;
}
else
{
$widths[$gn]=$w;
if($gn=='X')
$fm['CapXHeight']=$e[13];
}
if($gn=='.notdef')
$fm['MissingWidth']=$w;
}
elseif($code=='FontName')
$fm['FontName']=$param;
elseif($code=='Weight')
$fm['Weight']=$param;
elseif($code=='ItalicAngle')
$fm['ItalicAngle']=(double)$param;
elseif($code=='Ascender')
$fm['Ascender']=(int)$param;
elseif($code=='Descender')
$fm['Descender']=(int)$param;
elseif($code=='UnderlineThickness')
$fm['UnderlineThickness']=(int)$param;
elseif($code=='UnderlinePosition')
$fm['UnderlinePosition']=(int)$param;
elseif($code=='IsFixedPitch')
$fm['IsFixedPitch']=($param=='true');
elseif($code=='FontBBox')
$fm['FontBBox']=array($e[1],$e[2],$e[3],$e[4]);
elseif($code=='CapHeight')
$fm['CapHeight']=(int)$param;
elseif($code=='StdVW')
$fm['StdVW']=(int)$param;
}
if(!isset($fm['FontName']))
die('FontName not found');
if(!empty($map))
{
if(!isset($widths['.notdef']))
$widths['.notdef']=600;
if(!isset($widths['Delta']) && isset($widths['increment']))
$widths['Delta']=$widths['increment'];
//Order widths according to map
for($i=0;$i<=255;$i++)
{
if(!isset($widths[$map[$i]]))
{
echo '<b>Warning:</b> character '.$map[$i].' is missing<br>';
$widths[$i]=$widths['.notdef'];
}
else
$widths[$i]=$widths[$map[$i]];
}
}
$fm['Widths']=$widths;
return $fm;
}
function MakeFontDescriptor($fm, $symbolic)
{
//Ascent
$asc=(isset($fm['Ascender']) ? $fm['Ascender'] : 1000);
$fd="array('Ascent'=>".$asc;
//Descent
$desc=(isset($fm['Descender']) ? $fm['Descender'] : -200);
$fd.=",'Descent'=>".$desc;
//CapHeight
if(isset($fm['CapHeight']))
$ch=$fm['CapHeight'];
elseif(isset($fm['CapXHeight']))
$ch=$fm['CapXHeight'];
else
$ch=$asc;
$fd.=",'CapHeight'=>".$ch;
//Flags
$flags=0;
if(isset($fm['IsFixedPitch']) && $fm['IsFixedPitch'])
$flags+=1<<0;
if($symbolic)
$flags+=1<<2;
if(!$symbolic)
$flags+=1<<5;
if(isset($fm['ItalicAngle']) && $fm['ItalicAngle']!=0)
$flags+=1<<6;
$fd.=",'Flags'=>".$flags;
//FontBBox
if(isset($fm['FontBBox']))
$fbb=$fm['FontBBox'];
else
$fbb=array(0,$desc-100,1000,$asc+100);
$fd.=",'FontBBox'=>'[".$fbb[0].' '.$fbb[1].' '.$fbb[2].' '.$fbb[3]."]'";
//ItalicAngle
$ia=(isset($fm['ItalicAngle']) ? $fm['ItalicAngle'] : 0);
$fd.=",'ItalicAngle'=>".$ia;
//StemV
if(isset($fm['StdVW']))
$stemv=$fm['StdVW'];
elseif(isset($fm['Weight']) && preg_match('/bold|black/i',$fm['Weight']))
$stemv=120;
else
$stemv=70;
$fd.=",'StemV'=>".$stemv;
//MissingWidth
if(isset($fm['MissingWidth']))
$fd.=",'MissingWidth'=>".$fm['MissingWidth'];
$fd.=')';
return $fd;
}
function MakeWidthArray($fm)
{
//Make character width array
$s="array(\n\t";
$cw=$fm['Widths'];
for($i=0;$i<=255;$i++)
{
if(chr($i)=="'")
$s.="'\\''";
elseif(chr($i)=="\\")
$s.="'\\\\'";
elseif($i>=32 && $i<=126)
$s.="'".chr($i)."'";
else
$s.="chr($i)";
$s.='=>'.$fm['Widths'][$i];
if($i<255)
$s.=',';
if(($i+1)%22==0)
$s.="\n\t";
}
$s.=')';
return $s;
}
function MakeFontEncoding($map)
{
//Build differences from reference encoding
$ref=ReadMap('cp1252');
$s='';
$last=0;
for($i=32;$i<=255;$i++)
{
if($map[$i]!=$ref[$i])
{
if($i!=$last+1)
$s.=$i.' ';
$last=$i;
$s.='/'.$map[$i].' ';
}
}
return rtrim($s);
}
function SaveToFile($file, $s, $mode)
{
$f=fopen($file,'w'.$mode);
if(!$f)
die('Can\'t write to file '.$file);
fwrite($f,$s,strlen($s));
fclose($f);
}
function ReadShort($f)
{
$a=unpack('n1n',fread($f,2));
return $a['n'];
}
function ReadLong($f)
{
$a=unpack('N1N',fread($f,4));
return $a['N'];
}
function CheckTTF($file)
{
//Check if font license allows embedding
$f=fopen($file,'rb');
if(!$f)
die('<b>Error:</b> Can\'t open '.$file);
//Extract number of tables
fseek($f,4,SEEK_CUR);
$nb=ReadShort($f);
fseek($f,6,SEEK_CUR);
//Seek OS/2 table
$found=false;
for($i=0;$i<$nb;$i++)
{
if(fread($f,4)=='OS/2')
{
$found=true;
break;
}
fseek($f,12,SEEK_CUR);
}
if(!$found)
{
fclose($f);
return;
}
fseek($f,4,SEEK_CUR);
$offset=ReadLong($f);
fseek($f,$offset,SEEK_SET);
//Extract fsType flags
fseek($f,8,SEEK_CUR);
$fsType=ReadShort($f);
$rl=($fsType & 0x02)!=0;
$pp=($fsType & 0x04)!=0;
$e=($fsType & 0x08)!=0;
fclose($f);
if($rl && !$pp && !$e)
echo '<b>Warning:</b> font license does not allow embedding';
}
/*******************************************************************************
* fontfile: path to TTF file (or empty string if not to be embedded) *
* afmfile: path to AFM file *
* enc: font encoding (or empty string for symbolic fonts) *
* patch: optional patch for encoding *
* type: font type if fontfile is empty *
*******************************************************************************/
function MakeFont($fontfile, $afmfile, $enc='cp1252', $patch=array(), $type='TrueType')
{
//Generate a font definition file
if(get_magic_quotes_runtime())
@set_magic_quotes_runtime(0);
ini_set('auto_detect_line_endings','1');
if($enc)
{
$map=ReadMap($enc);
foreach($patch as $cc=>$gn)
$map[$cc]=$gn;
}
else
$map=array();
if(!file_exists($afmfile))
die('<b>Error:</b> AFM file not found: '.$afmfile);
$fm=ReadAFM($afmfile,$map);
if($enc)
$diff=MakeFontEncoding($map);
else
$diff='';
$fd=MakeFontDescriptor($fm,empty($map));
//Find font type
if($fontfile)
{
$ext=strtolower(substr($fontfile,-3));
if($ext=='ttf')
$type='TrueType';
elseif($ext=='pfb')
$type='Type1';
else
die('<b>Error:</b> unrecognized font file extension: '.$ext);
}
else
{
if($type!='TrueType' && $type!='Type1')
die('<b>Error:</b> incorrect font type: '.$type);
}
//Start generation
$s='<?php'."\n";
$s.='$type=\''.$type."';\n";
$s.='$name=\''.$fm['FontName']."';\n";
$s.='$desc='.$fd.";\n";
if(!isset($fm['UnderlinePosition']))
$fm['UnderlinePosition']=-100;
if(!isset($fm['UnderlineThickness']))
$fm['UnderlineThickness']=50;
$s.='$up='.$fm['UnderlinePosition'].";\n";
$s.='$ut='.$fm['UnderlineThickness'].";\n";
$w=MakeWidthArray($fm);
$s.='$cw='.$w.";\n";
$s.='$enc=\''.$enc."';\n";
$s.='$diff=\''.$diff."';\n";
$basename=substr(basename($afmfile),0,-4);
if($fontfile)
{
//Embedded font
if(!file_exists($fontfile))
die('<b>Error:</b> font file not found: '.$fontfile);
if($type=='TrueType')
CheckTTF($fontfile);
$f=fopen($fontfile,'rb');
if(!$f)
die('<b>Error:</b> Can\'t open '.$fontfile);
$file=fread($f,filesize($fontfile));
fclose($f);
if($type=='Type1')
{
//Find first two sections and discard third one
$header=(ord($file[0])==128);
if($header)
{
//Strip first binary header
$file=substr($file,6);
}
$pos=strpos($file,'eexec');
if(!$pos)
die('<b>Error:</b> font file does not seem to be valid Type1');
$size1=$pos+6;
if($header && ord($file[$size1])==128)
{
//Strip second binary header
$file=substr($file,0,$size1).substr($file,$size1+6);
}
$pos=strpos($file,'00000000');
if(!$pos)
die('<b>Error:</b> font file does not seem to be valid Type1');
$size2=$pos-$size1;
$file=substr($file,0,$size1+$size2);
}
if(function_exists('gzcompress'))
{
$cmp=$basename.'.z';
SaveToFile($cmp,gzcompress($file),'b');
$s.='$file=\''.$cmp."';\n";
echo 'Font file compressed ('.$cmp.')<br>';
}
else
{
$s.='$file=\''.basename($fontfile)."';\n";
echo '<b>Notice:</b> font file could not be compressed (zlib extension not available)<br>';
}
if($type=='Type1')
{
$s.='$size1='.$size1.";\n";
$s.='$size2='.$size2.";\n";
}
else
$s.='$originalsize='.filesize($fontfile).";\n";
}
else
{
//Not embedded font
$s.='$file='."'';\n";
}
$s.="?>\n";
SaveToFile($basename.'.php',$s,'t');
echo 'Font definition file generated ('.$basename.'.php'.')<br>';
}
?>
<?php
/*******************************************************************************
* Utility to generate font definition files *
* *
* Version: 1.14 *
* Date: 2008-08-03 *
* Author: Olivier PLATHEY *
*******************************************************************************/
function ReadMap($enc)
{
//Read a map file
$file=dirname(__FILE__).'/'.strtolower($enc).'.map';
$a=file($file);
if(empty($a))
die('<b>Error:</b> encoding not found: '.$enc);
$cc2gn=array();
foreach($a as $l)
{
if($l[0]=='!')
{
$e=preg_split('/[ \\t]+/',rtrim($l));
$cc=hexdec(substr($e[0],1));
$gn=$e[2];
$cc2gn[$cc]=$gn;
}
}
for($i=0;$i<=255;$i++)
{
if(!isset($cc2gn[$i]))
$cc2gn[$i]='.notdef';
}
return $cc2gn;
}
function ReadAFM($file, &$map)
{
//Read a font metric file
$a=file($file);
if(empty($a))
die('File not found');
$widths=array();
$fm=array();
$fix=array('Edot'=>'Edotaccent','edot'=>'edotaccent','Idot'=>'Idotaccent','Zdot'=>'Zdotaccent','zdot'=>'zdotaccent',
'Odblacute'=>'Ohungarumlaut','odblacute'=>'ohungarumlaut','Udblacute'=>'Uhungarumlaut','udblacute'=>'uhungarumlaut',
'Gcedilla'=>'Gcommaaccent','gcedilla'=>'gcommaaccent','Kcedilla'=>'Kcommaaccent','kcedilla'=>'kcommaaccent',
'Lcedilla'=>'Lcommaaccent','lcedilla'=>'lcommaaccent','Ncedilla'=>'Ncommaaccent','ncedilla'=>'ncommaaccent',
'Rcedilla'=>'Rcommaaccent','rcedilla'=>'rcommaaccent','Scedilla'=>'Scommaaccent','scedilla'=>'scommaaccent',
'Tcedilla'=>'Tcommaaccent','tcedilla'=>'tcommaaccent','Dslash'=>'Dcroat','dslash'=>'dcroat','Dmacron'=>'Dcroat','dmacron'=>'dcroat',
'combininggraveaccent'=>'gravecomb','combininghookabove'=>'hookabovecomb','combiningtildeaccent'=>'tildecomb',
'combiningacuteaccent'=>'acutecomb','combiningdotbelow'=>'dotbelowcomb','dongsign'=>'dong');
foreach($a as $l)
{
$e=explode(' ',rtrim($l));
if(count($e)<2)
continue;
$code=$e[0];
$param=$e[1];
if($code=='C')
{
//Character metrics
$cc=(int)$e[1];
$w=$e[4];
$gn=$e[7];
if(substr($gn,-4)=='20AC')
$gn='Euro';
if(isset($fix[$gn]))
{
//Fix incorrect glyph name
foreach($map as $c=>$n)
{
if($n==$fix[$gn])
$map[$c]=$gn;
}
}
if(empty($map))
{
//Symbolic font: use built-in encoding
$widths[$cc]=$w;
}
else
{
$widths[$gn]=$w;
if($gn=='X')
$fm['CapXHeight']=$e[13];
}
if($gn=='.notdef')
$fm['MissingWidth']=$w;
}
elseif($code=='FontName')
$fm['FontName']=$param;
elseif($code=='Weight')
$fm['Weight']=$param;
elseif($code=='ItalicAngle')
$fm['ItalicAngle']=(double)$param;
elseif($code=='Ascender')
$fm['Ascender']=(int)$param;
elseif($code=='Descender')
$fm['Descender']=(int)$param;
elseif($code=='UnderlineThickness')
$fm['UnderlineThickness']=(int)$param;
elseif($code=='UnderlinePosition')
$fm['UnderlinePosition']=(int)$param;
elseif($code=='IsFixedPitch')
$fm['IsFixedPitch']=($param=='true');
elseif($code=='FontBBox')
$fm['FontBBox']=array($e[1],$e[2],$e[3],$e[4]);
elseif($code=='CapHeight')
$fm['CapHeight']=(int)$param;
elseif($code=='StdVW')
$fm['StdVW']=(int)$param;
}
if(!isset($fm['FontName']))
die('FontName not found');
if(!empty($map))
{
if(!isset($widths['.notdef']))
$widths['.notdef']=600;
if(!isset($widths['Delta']) && isset($widths['increment']))
$widths['Delta']=$widths['increment'];
//Order widths according to map
for($i=0;$i<=255;$i++)
{
if(!isset($widths[$map[$i]]))
{
echo '<b>Warning:</b> character '.$map[$i].' is missing<br>';
$widths[$i]=$widths['.notdef'];
}
else
$widths[$i]=$widths[$map[$i]];
}
}
$fm['Widths']=$widths;
return $fm;
}
function MakeFontDescriptor($fm, $symbolic)
{
//Ascent
$asc=(isset($fm['Ascender']) ? $fm['Ascender'] : 1000);
$fd="array('Ascent'=>".$asc;
//Descent
$desc=(isset($fm['Descender']) ? $fm['Descender'] : -200);
$fd.=",'Descent'=>".$desc;
//CapHeight
if(isset($fm['CapHeight']))
$ch=$fm['CapHeight'];
elseif(isset($fm['CapXHeight']))
$ch=$fm['CapXHeight'];
else
$ch=$asc;
$fd.=",'CapHeight'=>".$ch;
//Flags
$flags=0;
if(isset($fm['IsFixedPitch']) && $fm['IsFixedPitch'])
$flags+=1<<0;
if($symbolic)
$flags+=1<<2;
if(!$symbolic)
$flags+=1<<5;
if(isset($fm['ItalicAngle']) && $fm['ItalicAngle']!=0)
$flags+=1<<6;
$fd.=",'Flags'=>".$flags;
//FontBBox
if(isset($fm['FontBBox']))
$fbb=$fm['FontBBox'];
else
$fbb=array(0,$desc-100,1000,$asc+100);
$fd.=",'FontBBox'=>'[".$fbb[0].' '.$fbb[1].' '.$fbb[2].' '.$fbb[3]."]'";
//ItalicAngle
$ia=(isset($fm['ItalicAngle']) ? $fm['ItalicAngle'] : 0);
$fd.=",'ItalicAngle'=>".$ia;
//StemV
if(isset($fm['StdVW']))
$stemv=$fm['StdVW'];
elseif(isset($fm['Weight']) && preg_match('/bold|black/i',$fm['Weight']))
$stemv=120;
else
$stemv=70;
$fd.=",'StemV'=>".$stemv;
//MissingWidth
if(isset($fm['MissingWidth']))
$fd.=",'MissingWidth'=>".$fm['MissingWidth'];
$fd.=')';
return $fd;
}
function MakeWidthArray($fm)
{
//Make character width array
$s="array(\n\t";
$cw=$fm['Widths'];
for($i=0;$i<=255;$i++)
{
if(chr($i)=="'")
$s.="'\\''";
elseif(chr($i)=="\\")
$s.="'\\\\'";
elseif($i>=32 && $i<=126)
$s.="'".chr($i)."'";
else
$s.="chr($i)";
$s.='=>'.$fm['Widths'][$i];
if($i<255)
$s.=',';
if(($i+1)%22==0)
$s.="\n\t";
}
$s.=')';
return $s;
}
function MakeFontEncoding($map)
{
//Build differences from reference encoding
$ref=ReadMap('cp1252');
$s='';
$last=0;
for($i=32;$i<=255;$i++)
{
if($map[$i]!=$ref[$i])
{
if($i!=$last+1)
$s.=$i.' ';
$last=$i;
$s.='/'.$map[$i].' ';
}
}
return rtrim($s);
}
function SaveToFile($file, $s, $mode)
{
$f=fopen($file,'w'.$mode);
if(!$f)
die('Can\'t write to file '.$file);
fwrite($f,$s,strlen($s));
fclose($f);
}
function ReadShort($f)
{
$a=unpack('n1n',fread($f,2));
return $a['n'];
}
function ReadLong($f)
{
$a=unpack('N1N',fread($f,4));
return $a['N'];
}
function CheckTTF($file)
{
//Check if font license allows embedding
$f=fopen($file,'rb');
if(!$f)
die('<b>Error:</b> Can\'t open '.$file);
//Extract number of tables
fseek($f,4,SEEK_CUR);
$nb=ReadShort($f);
fseek($f,6,SEEK_CUR);
//Seek OS/2 table
$found=false;
for($i=0;$i<$nb;$i++)
{
if(fread($f,4)=='OS/2')
{
$found=true;
break;
}
fseek($f,12,SEEK_CUR);
}
if(!$found)
{
fclose($f);
return;
}
fseek($f,4,SEEK_CUR);
$offset=ReadLong($f);
fseek($f,$offset,SEEK_SET);
//Extract fsType flags
fseek($f,8,SEEK_CUR);
$fsType=ReadShort($f);
$rl=($fsType & 0x02)!=0;
$pp=($fsType & 0x04)!=0;
$e=($fsType & 0x08)!=0;
fclose($f);
if($rl && !$pp && !$e)
echo '<b>Warning:</b> font license does not allow embedding';
}
/*******************************************************************************
* fontfile: path to TTF file (or empty string if not to be embedded) *
* afmfile: path to AFM file *
* enc: font encoding (or empty string for symbolic fonts) *
* patch: optional patch for encoding *
* type: font type if fontfile is empty *
*******************************************************************************/
function MakeFont($fontfile, $afmfile, $enc='cp1252', $patch=array(), $type='TrueType')
{
//Generate a font definition file
if(get_magic_quotes_runtime())
@set_magic_quotes_runtime(0);
ini_set('auto_detect_line_endings','1');
if($enc)
{
$map=ReadMap($enc);
foreach($patch as $cc=>$gn)
$map[$cc]=$gn;
}
else
$map=array();
if(!file_exists($afmfile))
die('<b>Error:</b> AFM file not found: '.$afmfile);
$fm=ReadAFM($afmfile,$map);
if($enc)
$diff=MakeFontEncoding($map);
else
$diff='';
$fd=MakeFontDescriptor($fm,empty($map));
//Find font type
if($fontfile)
{
$ext=strtolower(substr($fontfile,-3));
if($ext=='ttf')
$type='TrueType';
elseif($ext=='pfb')
$type='Type1';
else
die('<b>Error:</b> unrecognized font file extension: '.$ext);
}
else
{
if($type!='TrueType' && $type!='Type1')
die('<b>Error:</b> incorrect font type: '.$type);
}
//Start generation
$s='<?php'."\n";
$s.='$type=\''.$type."';\n";
$s.='$name=\''.$fm['FontName']."';\n";
$s.='$desc='.$fd.";\n";
if(!isset($fm['UnderlinePosition']))
$fm['UnderlinePosition']=-100;
if(!isset($fm['UnderlineThickness']))
$fm['UnderlineThickness']=50;
$s.='$up='.$fm['UnderlinePosition'].";\n";
$s.='$ut='.$fm['UnderlineThickness'].";\n";
$w=MakeWidthArray($fm);
$s.='$cw='.$w.";\n";
$s.='$enc=\''.$enc."';\n";
$s.='$diff=\''.$diff."';\n";
$basename=substr(basename($afmfile),0,-4);
if($fontfile)
{
//Embedded font
if(!file_exists($fontfile))
die('<b>Error:</b> font file not found: '.$fontfile);
if($type=='TrueType')
CheckTTF($fontfile);
$f=fopen($fontfile,'rb');
if(!$f)
die('<b>Error:</b> Can\'t open '.$fontfile);
$file=fread($f,filesize($fontfile));
fclose($f);
if($type=='Type1')
{
//Find first two sections and discard third one
$header=(ord($file[0])==128);
if($header)
{
//Strip first binary header
$file=substr($file,6);
}
$pos=strpos($file,'eexec');
if(!$pos)
die('<b>Error:</b> font file does not seem to be valid Type1');
$size1=$pos+6;
if($header && ord($file[$size1])==128)
{
//Strip second binary header
$file=substr($file,0,$size1).substr($file,$size1+6);
}
$pos=strpos($file,'00000000');
if(!$pos)
die('<b>Error:</b> font file does not seem to be valid Type1');
$size2=$pos-$size1;
$file=substr($file,0,$size1+$size2);
}
if(function_exists('gzcompress'))
{
$cmp=$basename.'.z';
SaveToFile($cmp,gzcompress($file),'b');
$s.='$file=\''.$cmp."';\n";
echo 'Font file compressed ('.$cmp.')<br>';
}
else
{
$s.='$file=\''.basename($fontfile)."';\n";
echo '<b>Notice:</b> font file could not be compressed (zlib extension not available)<br>';
}
if($type=='Type1')
{
$s.='$size1='.$size1.";\n";
$s.='$size2='.$size2.";\n";
}
else
$s.='$originalsize='.filesize($fontfile).";\n";
}
else
{
//Not embedded font
$s.='$file='."'';\n";
}
$s.="?>\n";
SaveToFile($basename.'.php',$s,'t');
echo 'Font definition file generated ('.$basename.'.php'.')<br>';
}
?>

View File

@@ -1,19 +1,19 @@
<?php
$type = 'Core';
$name = 'Symbol';
$up = -100;
$ut = 50;
$cw = array(
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549,
','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722,
'B'=>667,'C'=>722,'D'=>612,'E'=>611,'F'=>763,'G'=>603,'H'=>722,'I'=>333,'J'=>631,'K'=>722,'L'=>686,'M'=>889,'N'=>722,'O'=>722,'P'=>768,'Q'=>741,'R'=>556,'S'=>592,'T'=>611,'U'=>690,'V'=>439,'W'=>768,
'X'=>645,'Y'=>795,'Z'=>611,'['=>333,'\\'=>863,']'=>333,'^'=>658,'_'=>500,'`'=>500,'a'=>631,'b'=>549,'c'=>549,'d'=>494,'e'=>439,'f'=>521,'g'=>411,'h'=>603,'i'=>329,'j'=>603,'k'=>549,'l'=>549,'m'=>576,
'n'=>521,'o'=>549,'p'=>549,'q'=>521,'r'=>549,'s'=>603,'t'=>439,'u'=>576,'v'=>713,'w'=>686,'x'=>493,'y'=>686,'z'=>494,'{'=>480,'|'=>200,'}'=>480,'~'=>549,chr(127)=>0,chr(128)=>0,chr(129)=>0,chr(130)=>0,chr(131)=>0,
chr(132)=>0,chr(133)=>0,chr(134)=>0,chr(135)=>0,chr(136)=>0,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>0,chr(141)=>0,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>750,chr(161)=>620,chr(162)=>247,chr(163)=>549,chr(164)=>167,chr(165)=>713,chr(166)=>500,chr(167)=>753,chr(168)=>753,chr(169)=>753,chr(170)=>753,chr(171)=>1042,chr(172)=>987,chr(173)=>603,chr(174)=>987,chr(175)=>603,
chr(176)=>400,chr(177)=>549,chr(178)=>411,chr(179)=>549,chr(180)=>549,chr(181)=>713,chr(182)=>494,chr(183)=>460,chr(184)=>549,chr(185)=>549,chr(186)=>549,chr(187)=>549,chr(188)=>1000,chr(189)=>603,chr(190)=>1000,chr(191)=>658,chr(192)=>823,chr(193)=>686,chr(194)=>795,chr(195)=>987,chr(196)=>768,chr(197)=>768,
chr(198)=>823,chr(199)=>768,chr(200)=>768,chr(201)=>713,chr(202)=>713,chr(203)=>713,chr(204)=>713,chr(205)=>713,chr(206)=>713,chr(207)=>713,chr(208)=>768,chr(209)=>713,chr(210)=>790,chr(211)=>790,chr(212)=>890,chr(213)=>823,chr(214)=>549,chr(215)=>250,chr(216)=>713,chr(217)=>603,chr(218)=>603,chr(219)=>1042,
chr(220)=>987,chr(221)=>603,chr(222)=>987,chr(223)=>603,chr(224)=>494,chr(225)=>329,chr(226)=>790,chr(227)=>790,chr(228)=>786,chr(229)=>713,chr(230)=>384,chr(231)=>384,chr(232)=>384,chr(233)=>384,chr(234)=>384,chr(235)=>384,chr(236)=>494,chr(237)=>494,chr(238)=>494,chr(239)=>494,chr(240)=>0,chr(241)=>329,
chr(242)=>274,chr(243)=>686,chr(244)=>686,chr(245)=>686,chr(246)=>384,chr(247)=>384,chr(248)=>384,chr(249)=>384,chr(250)=>384,chr(251)=>384,chr(252)=>494,chr(253)=>494,chr(254)=>494,chr(255)=>0);
?>
<?php
$type = 'Core';
$name = 'Symbol';
$up = -100;
$ut = 50;
$cw = array(
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549,
','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722,
'B'=>667,'C'=>722,'D'=>612,'E'=>611,'F'=>763,'G'=>603,'H'=>722,'I'=>333,'J'=>631,'K'=>722,'L'=>686,'M'=>889,'N'=>722,'O'=>722,'P'=>768,'Q'=>741,'R'=>556,'S'=>592,'T'=>611,'U'=>690,'V'=>439,'W'=>768,
'X'=>645,'Y'=>795,'Z'=>611,'['=>333,'\\'=>863,']'=>333,'^'=>658,'_'=>500,'`'=>500,'a'=>631,'b'=>549,'c'=>549,'d'=>494,'e'=>439,'f'=>521,'g'=>411,'h'=>603,'i'=>329,'j'=>603,'k'=>549,'l'=>549,'m'=>576,
'n'=>521,'o'=>549,'p'=>549,'q'=>521,'r'=>549,'s'=>603,'t'=>439,'u'=>576,'v'=>713,'w'=>686,'x'=>493,'y'=>686,'z'=>494,'{'=>480,'|'=>200,'}'=>480,'~'=>549,chr(127)=>0,chr(128)=>0,chr(129)=>0,chr(130)=>0,chr(131)=>0,
chr(132)=>0,chr(133)=>0,chr(134)=>0,chr(135)=>0,chr(136)=>0,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>0,chr(141)=>0,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>750,chr(161)=>620,chr(162)=>247,chr(163)=>549,chr(164)=>167,chr(165)=>713,chr(166)=>500,chr(167)=>753,chr(168)=>753,chr(169)=>753,chr(170)=>753,chr(171)=>1042,chr(172)=>987,chr(173)=>603,chr(174)=>987,chr(175)=>603,
chr(176)=>400,chr(177)=>549,chr(178)=>411,chr(179)=>549,chr(180)=>549,chr(181)=>713,chr(182)=>494,chr(183)=>460,chr(184)=>549,chr(185)=>549,chr(186)=>549,chr(187)=>549,chr(188)=>1000,chr(189)=>603,chr(190)=>1000,chr(191)=>658,chr(192)=>823,chr(193)=>686,chr(194)=>795,chr(195)=>987,chr(196)=>768,chr(197)=>768,
chr(198)=>823,chr(199)=>768,chr(200)=>768,chr(201)=>713,chr(202)=>713,chr(203)=>713,chr(204)=>713,chr(205)=>713,chr(206)=>713,chr(207)=>713,chr(208)=>768,chr(209)=>713,chr(210)=>790,chr(211)=>790,chr(212)=>890,chr(213)=>823,chr(214)=>549,chr(215)=>250,chr(216)=>713,chr(217)=>603,chr(218)=>603,chr(219)=>1042,
chr(220)=>987,chr(221)=>603,chr(222)=>987,chr(223)=>603,chr(224)=>494,chr(225)=>329,chr(226)=>790,chr(227)=>790,chr(228)=>786,chr(229)=>713,chr(230)=>384,chr(231)=>384,chr(232)=>384,chr(233)=>384,chr(234)=>384,chr(235)=>384,chr(236)=>494,chr(237)=>494,chr(238)=>494,chr(239)=>494,chr(240)=>0,chr(241)=>329,
chr(242)=>274,chr(243)=>686,chr(244)=>686,chr(245)=>686,chr(246)=>384,chr(247)=>384,chr(248)=>384,chr(249)=>384,chr(250)=>384,chr(251)=>384,chr(252)=>494,chr(253)=>494,chr(254)=>494,chr(255)=>0);
?>

View File

@@ -1,19 +1,19 @@
<?php
$type = 'Core';
$name = 'Times-Roman';
$up = -100;
$ut = 50;
$cw = array(
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564,
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722,
'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944,
'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>889,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>980,
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333,
chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
chr(220)=>722,chr(221)=>722,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>500);
?>
<?php
$type = 'Core';
$name = 'Times-Roman';
$up = -100;
$ut = 50;
$cw = array(
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564,
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722,
'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944,
'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>889,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>980,
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333,
chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
chr(220)=>722,chr(221)=>722,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>500);
?>

View File

@@ -1,19 +1,19 @@
<?php
$type = 'Core';
$name = 'Times-Bold';
$up = -100;
$ut = 50;
$cw = array(
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722,
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>778,'I'=>389,'J'=>500,'K'=>778,'L'=>667,'M'=>944,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>722,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000,
'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833,
'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>667,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333,
chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
?>
<?php
$type = 'Core';
$name = 'Times-Bold';
$up = -100;
$ut = 50;
$cw = array(
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722,
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>778,'I'=>389,'J'=>500,'K'=>778,'L'=>667,'M'=>944,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>722,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000,
'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833,
'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>667,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333,
chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
?>

View File

@@ -1,19 +1,19 @@
<?php
$type = 'Core';
$name = 'Times-BoldItalic';
$up = -100;
$ut = 50;
$cw = array(
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667,
'B'=>667,'C'=>667,'D'=>722,'E'=>667,'F'=>667,'G'=>722,'H'=>778,'I'=>389,'J'=>500,'K'=>667,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>611,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889,
'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>389,chr(159)=>611,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333,
chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
chr(198)=>944,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
chr(220)=>722,chr(221)=>611,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>444,chr(254)=>500,chr(255)=>444);
?>
<?php
$type = 'Core';
$name = 'Times-BoldItalic';
$up = -100;
$ut = 50;
$cw = array(
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667,
'B'=>667,'C'=>667,'D'=>722,'E'=>667,'F'=>667,'G'=>722,'H'=>778,'I'=>389,'J'=>500,'K'=>667,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>611,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889,
'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>389,chr(159)=>611,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333,
chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
chr(198)=>944,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
chr(220)=>722,chr(221)=>611,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>444,chr(254)=>500,chr(255)=>444);
?>

View File

@@ -1,19 +1,19 @@
<?php
$type = 'Core';
$name = 'Times-Italic';
$up = -100;
$ut = 50;
$cw = array(
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675,
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611,
'B'=>611,'C'=>667,'D'=>722,'E'=>611,'F'=>611,'G'=>722,'H'=>722,'I'=>333,'J'=>444,'K'=>667,'L'=>556,'M'=>833,'N'=>667,'O'=>722,'P'=>611,'Q'=>722,'R'=>611,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833,
'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722,
'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>500,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>556,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>333,chr(153)=>980,
chr(154)=>389,chr(155)=>333,chr(156)=>667,chr(157)=>350,chr(158)=>389,chr(159)=>556,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333,
chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611,
chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
chr(220)=>722,chr(221)=>556,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>500,chr(255)=>444);
?>
<?php
$type = 'Core';
$name = 'Times-Italic';
$up = -100;
$ut = 50;
$cw = array(
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675,
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611,
'B'=>611,'C'=>667,'D'=>722,'E'=>611,'F'=>611,'G'=>722,'H'=>722,'I'=>333,'J'=>444,'K'=>667,'L'=>556,'M'=>833,'N'=>667,'O'=>722,'P'=>611,'Q'=>722,'R'=>611,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833,
'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722,
'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>500,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>556,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>333,chr(153)=>980,
chr(154)=>389,chr(155)=>333,chr(156)=>667,chr(157)=>350,chr(158)=>389,chr(159)=>556,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333,
chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611,
chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
chr(220)=>722,chr(221)=>556,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>500,chr(255)=>444);
?>

View File

@@ -1,19 +1,19 @@
<?php
$type = 'Core';
$name = 'ZapfDingbats';
$up = -100;
$ut = 50;
$cw = array(
chr(0)=>0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0,
chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939,
','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692,
'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776,
'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873,
'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,chr(127)=>0,chr(128)=>390,chr(129)=>390,chr(130)=>317,chr(131)=>317,
chr(132)=>276,chr(133)=>276,chr(134)=>509,chr(135)=>509,chr(136)=>410,chr(137)=>410,chr(138)=>234,chr(139)=>234,chr(140)=>334,chr(141)=>334,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>0,chr(161)=>732,chr(162)=>544,chr(163)=>544,chr(164)=>910,chr(165)=>667,chr(166)=>760,chr(167)=>760,chr(168)=>776,chr(169)=>595,chr(170)=>694,chr(171)=>626,chr(172)=>788,chr(173)=>788,chr(174)=>788,chr(175)=>788,
chr(176)=>788,chr(177)=>788,chr(178)=>788,chr(179)=>788,chr(180)=>788,chr(181)=>788,chr(182)=>788,chr(183)=>788,chr(184)=>788,chr(185)=>788,chr(186)=>788,chr(187)=>788,chr(188)=>788,chr(189)=>788,chr(190)=>788,chr(191)=>788,chr(192)=>788,chr(193)=>788,chr(194)=>788,chr(195)=>788,chr(196)=>788,chr(197)=>788,
chr(198)=>788,chr(199)=>788,chr(200)=>788,chr(201)=>788,chr(202)=>788,chr(203)=>788,chr(204)=>788,chr(205)=>788,chr(206)=>788,chr(207)=>788,chr(208)=>788,chr(209)=>788,chr(210)=>788,chr(211)=>788,chr(212)=>894,chr(213)=>838,chr(214)=>1016,chr(215)=>458,chr(216)=>748,chr(217)=>924,chr(218)=>748,chr(219)=>918,
chr(220)=>927,chr(221)=>928,chr(222)=>928,chr(223)=>834,chr(224)=>873,chr(225)=>828,chr(226)=>924,chr(227)=>924,chr(228)=>917,chr(229)=>930,chr(230)=>931,chr(231)=>463,chr(232)=>883,chr(233)=>836,chr(234)=>836,chr(235)=>867,chr(236)=>867,chr(237)=>696,chr(238)=>696,chr(239)=>874,chr(240)=>0,chr(241)=>874,
chr(242)=>760,chr(243)=>946,chr(244)=>771,chr(245)=>865,chr(246)=>771,chr(247)=>888,chr(248)=>967,chr(249)=>888,chr(250)=>831,chr(251)=>873,chr(252)=>927,chr(253)=>970,chr(254)=>918,chr(255)=>0);
?>
<?php
$type = 'Core';
$name = 'ZapfDingbats';
$up = -100;
$ut = 50;
$cw = array(
chr(0)=>0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0,
chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939,
','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692,
'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776,
'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873,
'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,chr(127)=>0,chr(128)=>390,chr(129)=>390,chr(130)=>317,chr(131)=>317,
chr(132)=>276,chr(133)=>276,chr(134)=>509,chr(135)=>509,chr(136)=>410,chr(137)=>410,chr(138)=>234,chr(139)=>234,chr(140)=>334,chr(141)=>334,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>0,chr(161)=>732,chr(162)=>544,chr(163)=>544,chr(164)=>910,chr(165)=>667,chr(166)=>760,chr(167)=>760,chr(168)=>776,chr(169)=>595,chr(170)=>694,chr(171)=>626,chr(172)=>788,chr(173)=>788,chr(174)=>788,chr(175)=>788,
chr(176)=>788,chr(177)=>788,chr(178)=>788,chr(179)=>788,chr(180)=>788,chr(181)=>788,chr(182)=>788,chr(183)=>788,chr(184)=>788,chr(185)=>788,chr(186)=>788,chr(187)=>788,chr(188)=>788,chr(189)=>788,chr(190)=>788,chr(191)=>788,chr(192)=>788,chr(193)=>788,chr(194)=>788,chr(195)=>788,chr(196)=>788,chr(197)=>788,
chr(198)=>788,chr(199)=>788,chr(200)=>788,chr(201)=>788,chr(202)=>788,chr(203)=>788,chr(204)=>788,chr(205)=>788,chr(206)=>788,chr(207)=>788,chr(208)=>788,chr(209)=>788,chr(210)=>788,chr(211)=>788,chr(212)=>894,chr(213)=>838,chr(214)=>1016,chr(215)=>458,chr(216)=>748,chr(217)=>924,chr(218)=>748,chr(219)=>918,
chr(220)=>927,chr(221)=>928,chr(222)=>928,chr(223)=>834,chr(224)=>873,chr(225)=>828,chr(226)=>924,chr(227)=>924,chr(228)=>917,chr(229)=>930,chr(230)=>931,chr(231)=>463,chr(232)=>883,chr(233)=>836,chr(234)=>836,chr(235)=>867,chr(236)=>867,chr(237)=>696,chr(238)=>696,chr(239)=>874,chr(240)=>0,chr(241)=>874,
chr(242)=>760,chr(243)=>946,chr(244)=>771,chr(245)=>865,chr(246)=>771,chr(247)=>888,chr(248)=>967,chr(249)=>888,chr(250)=>831,chr(251)=>873,chr(252)=>927,chr(253)=>970,chr(254)=>918,chr(255)=>0);
?>

1804
fpdf.php

File diff suppressed because it is too large Load Diff

5
img.data/.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 B

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 769 B

After

Width:  |  Height:  |  Size: 859 B

BIN
img/bluecurve/clonar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 859 B

After

Width:  |  Height:  |  Size: 769 B

BIN
img/clonar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
img/cristal/clonar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 B

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
img/fondos/old_map.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
img/fondos/ricepaper_v3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
img/fondos/tree_bark.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
img/fondos/tweed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
img/personal/clonar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
img/qrlogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
img/sinImagen.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 B

View File

@@ -1,40 +1,45 @@
<?php
/**
* Fichero de configuración donde se introducirán los valores para
* la conexión con el servidor MySQL y otros para personalizar la aplicación.
* @package Inventario
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* This file is part of Inventario.
* Inventario is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Inventario is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Inventario. If not, see <http://www.gnu.org/licenses/>.
*
*/
define('AUTOR','Ricardo Montañana Gómez');
define('SERVIDOR','localhost'); //Ubicación del servidor MySQL
define('BASEDATOS','Inventario4'); //Nombre de la base de datos.
define('USUARIO','test'); //Usuario con permisos de lectura/escritura en la base de datos
define('CLAVE','tset'); //contraseña del usuario.
define('VERSION','1.02');
define('PROGRAMA','Gesti&oacute;n de Inventario.');
define('CENTRO','I.E.S.O. Pascual Serrano');
define('APLICACION',PROGRAMA.VERSION);
define('NUMFILAS',17); // Número de registros a mostrar en las pantallas de consulta iniciales
define('PAUSA',2);//Nº segundos de pausa para mostrar mensaje id insertado
define('ESTILO','personal'); //Estilo de los iconos de edición (personal, personal, personal)
define('PLANTILLA','bootstrap'); //Estilo de la plantilla y recursos a utilizar
define('COLORLAT', '#7ae7bf'); //Color de la barra de menú lateral
define('COLORFON', '#a4bdfc'); //Color del fondo de la pantalla
/**
* Fichero de configuración donde se introducirán los valores para
* la conexión con el servidor MySQL y otros para personalizar la aplicación.
* @package Inventario
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* This file is part of Inventario.
* Inventario is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Inventario is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Inventario. If not, see <http://www.gnu.org/licenses/>.
*
*/
require_once 'version.inc';
define('SERVIDOR', 'localhost'); //Ubicación del servidor MySQL
define('PUERTO', '3306'); //Puerto donde se conecta a MySQL
define('BASEDATOS', 'Inventario2'); //Nombre de la base de datos.
define('BASEDATOSTEST', 'Inventario_test'); //Base de datos para los tests.
define('USUARIO', 'test'); //Usuario con permisos de lectura/escritura en la base de datos
define('CLAVE', 'tset'); //contraseña del usuario.
define('PROGRAMA', 'Gesti&oacute;n de Inventario.');
define('CENTRO', 'I.E.S.O. Pascual Serrano');
define('NUMFILAS', '17'); // Número de registros a mostrar en las pantallas de consulta iniciales
define('PAUSA', '2'); //Nº segundos de pausa para mostrar mensaje id insertado
define('ESTILO', 'bootstrap'); //Estilo de los iconos de edición (bootstrap, bootstrap, bootstrap)
define('PLANTILLA', 'bootstrap'); //Estilo de la plantilla y recursos a utilizar
define('COLORLAT', '#a4bdfc'); //Color de la barra de menú lateral
define('COLORFON', '#ffb878'); //Color del fondo de la pantalla
define('MYSQLDUMP', '/usr/local/bin/mysqldump'); //camino a mysqldump
define('GZIP', '/usr/bin/gzip'); //Camino a gzip
define('IMAGEDATA', 'img.data'); //Directorio donde se almacenarán las imágenes
define('TMP', './tmp'); //Directorio para archivos temporales
define('INSTALADO', 'sí'); //Indicador que permite ejecutar instalar.php
?>

View File

@@ -6,8 +6,8 @@
1|Inventario|||
2|Ubicaci&oacute;n|index.php?informeInventario&opc=Ubicacion|_self|Inventario de una ubicaci&oacute;n
2|Art&iacute;culo|index.php?informeInventario&opc=Articulo|_self|Inventario de un Art&iacute;culo
2|Total|index.php?informeInventario&opc=Total|_blank|Inventario de todas las ubicaciones
2|Descuadres|index.php?descuadres|_blank|Diferencias entre art&iacute;culos y elementos
2|Total|index.php?informeInventario&opc=Total|_self|Inventario de todas las ubicaciones
2|Descuadres|index.php?informeInventario&opc=descuadres|_self|Diferencias entre art&iacute;culos y elementos
1|Varios|||
2|Configuraci&oacute;n|index.php?configuracion|_self|Opciones configurables de la aplicaci&oacute;n
2|Importaci&oacute;n|index.php?importacion&opc=form|_self|Importa datos de una hoja de c&aacute;lculo

27
inc/version.inc Normal file
View File

@@ -0,0 +1,27 @@
<?php
/**
* Fichero de configuración donde se introducirán los valores
* de autor y de la versión
* @package Inventario
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* This file is part of Inventario.
* Inventario is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Inventario is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Inventario. If not, see <http://www.gnu.org/licenses/>.
*
*/
define('AUTOR', 'Ricardo Montañana Gómez');
define('VERSION', '1.17');
?>

View File

@@ -1,94 +1,94 @@
#!/bin/bash
# $Id: makedoc.sh,v 1.2 2007/12/10 01:11:19 ashnazg Exp $
#/**
# * makedoc - PHPDocumentor script to save your settings
# *
# * Put this file inside your PHP project homedir, edit its variables and run whenever you wants to
# * re/make your project documentation.
# *
# * The version of this file is the version of PHPDocumentor it is compatible.
# *
# * It simples run phpdoc with the parameters you set in this file.
# * NOTE: Do not add spaces after bash variables.
# *
# * @copyright makedoc.sh is part of PHPDocumentor project {@link http://freshmeat.net/projects/phpdocu/} and its LGPL
# * @author Roberto Berto <darkelder (inside) users (dot) sourceforge (dot) net>
# * @version Release-1.1.0
# */
##############################
# should be edited
##############################
#/**
# * title of generated documentation, default is 'Generated Documentation'
# *
# * @var string TITLE
# */
TITLE="Inventario"
#/**
# * name to use for the default package. If not specified, uses 'default'
# *
# * @var string PACKAGES
# */
PACKAGES="Inventario"
#/**
# * name of a directory(s) to parse directory1,directory2
# * $PWD is the directory where makedoc.sh
# *
# * @var string PATH_PROJECT
# */
PATH_PROJECT=$PWD
#/**
# * path of PHPDoc executable
# *
# * @var string PATH_PHPDOC
# */
PATH_PHPDOC=/usr/bin/phpdoc
#/**
# * where documentation will be put
# *
# * @var string PATH_DOCS
# */
PATH_DOCS=$PWD/docs
#/**
# * what outputformat to use (html/pdf)
# *
# * @var string OUTPUTFORMAT
# */
OUTPUTFORMAT=HTML
#/**
# * converter to be used
# *
# * @var string CONVERTER
# */
CONVERTER=Smarty
#/**
# * template to use
# *
# * @var string TEMPLATE
# */
TEMPLATE=default
#/**
# * parse elements marked as private
# *
# * @var bool (on/off) PRIVATE
# */
PRIVATE=on
# make documentation
/usr/bin/phpdoc -d "$PATH_PROJECT" -t "$PATH_DOCS" -ti "$TITLE" -dn $PACKAGES \
-o $OUTPUTFORMAT:$CONVERTER:$TEMPLATE -pp $PRIVATE
# vim: set expandtab :
#!/bin/bash
# $Id: makedoc.sh,v 1.2 2007/12/10 01:11:19 ashnazg Exp $
#/**
# * makedoc - PHPDocumentor script to save your settings
# *
# * Put this file inside your PHP project homedir, edit its variables and run whenever you wants to
# * re/make your project documentation.
# *
# * The version of this file is the version of PHPDocumentor it is compatible.
# *
# * It simples run phpdoc with the parameters you set in this file.
# * NOTE: Do not add spaces after bash variables.
# *
# * @copyright makedoc.sh is part of PHPDocumentor project {@link http://freshmeat.net/projects/phpdocu/} and its LGPL
# * @author Roberto Berto <darkelder (inside) users (dot) sourceforge (dot) net>
# * @version Release-1.1.0
# */
##############################
# should be edited
##############################
#/**
# * title of generated documentation, default is 'Generated Documentation'
# *
# * @var string TITLE
# */
TITLE="Inventario"
#/**
# * name to use for the default package. If not specified, uses 'default'
# *
# * @var string PACKAGES
# */
PACKAGES="Inventario"
#/**
# * name of a directory(s) to parse directory1,directory2
# * $PWD is the directory where makedoc.sh
# *
# * @var string PATH_PROJECT
# */
PATH_PROJECT=$PWD
#/**
# * path of PHPDoc executable
# *
# * @var string PATH_PHPDOC
# */
PATH_PHPDOC=/usr/bin/phpdoc
#/**
# * where documentation will be put
# *
# * @var string PATH_DOCS
# */
PATH_DOCS=$PWD/docs
#/**
# * what outputformat to use (html/pdf)
# *
# * @var string OUTPUTFORMAT
# */
OUTPUTFORMAT=HTML
#/**
# * converter to be used
# *
# * @var string CONVERTER
# */
CONVERTER=Smarty
#/**
# * template to use
# *
# * @var string TEMPLATE
# */
TEMPLATE=default
#/**
# * parse elements marked as private
# *
# * @var bool (on/off) PRIVATE
# */
PRIVATE=on
# make documentation
/usr/bin/phpdoc -d "$PATH_PROJECT" -t "$PATH_DOCS" -ti "$TITLE" -dn $PACKAGES \
-o $OUTPUTFORMAT:$CONVERTER:$TEMPLATE -pp $PRIVATE
# vim: set expandtab :

View File

@@ -1,3 +0,0 @@
<?
phpinfo();
?>

3312
phpqrcode.php Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -16,29 +16,34 @@
<link href="css/bootstrap-datetimepicker.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/jquery.simplecolorpicker.css">
<link rel="stylesheet" href="css/jquery.simplecolorpicker-glyphicons.css">
<link rel="stylesheet" href="css/jasny-bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-select/bootstrap-select.min.css">
<style type="text/css"></style>
<script type="text/javascript" src="./css/jquery.min.js"></script>
<script type="text/javascript" src="./css/bootstrap-select/bootstrap-select.min.js"></script>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<!--<body style="background-image:url(img/fondos/old_map.png); background-repeat:repeat">-->
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation" style="background-image: url(img/fondos/bo_play_pattern.png); background-repeat: repeat">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="http://rmontanana.gitbooks.io/Inventario2/" target="_blank" title="Ayuda"><span class="glyphicon glyphicon-book"></span></a>
<a class="navbar-brand" href="index.php">{aplicacion}</a>
</div>
<div class="navbar-brand">
<span class="label label-primary col-sm-14 col-sm-offset-3">{opcion}</span>
<span class="label label-primary col-sm-12 col-sm-offset-2 col-xs-12 col-xs-offset-0">{opcion}</span>
<!--<label class="warn">{opcion}</label>-->
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="#">{usuario}</a></li>
<!--<li><a href="#">{usuario}</a></li>-->
<li><a href="#">{fecha}</a></li>
<li>{control}</li>
</ul>
@@ -46,36 +51,23 @@
<input type="text" class="form-control" placeholder="Buscar...">
</form>-->
</div>
<div class="visible-xs">
<ul class="nav navbar-nav navbar-right">
<li>{control}</li>
</ul>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-sm-2 col-md-1 sidebar">
<div class="col-sm-2 col-md-1 sidebar" >
<!--<ul class="nav nav-sidebar">-->
<ul class="nav nav-sidebar">
<!--<li class="active">{menu}</li>-->
{menu}
</ul>
</div>
<div class="col-sm-10 col-sm-offset-1 col-md-11 col-md-offset-1 main">
<!--<h1 class="page-header">{opcion}</h1>-->
<!--<div id="divBarra" class="progress progress-striped active">
<div class="progress-bar" id="barra" role="progressbar" aria-valuenow="0" aria-valuemin="40" aria-valuemax="100" style="width: 0%">
<span id="barra-valor">0% Completado</span>
</div>
</div>
<script>
function actProgreso(valor) {
$('.progress-bar').width(valor+"%")
$("#barra-valor").text(valor+"% Completado");
}
function visualizaProgreso() {
$('#divBarra').style.visibility = "visible";
}
function escondeProgreso() {
$('#divBara').style.visibility = "hidden";
}
</script>-->
<div class="col-sm-10 col-sm-offset-2 col-md-11 col-md-offset-1 main">
{contenido}
</div>
</div>
@@ -88,6 +80,8 @@
<script type="text/javascript" src="./css/moment.min.js"></script>
<script type="text/javascript" src="./css/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="./css/bootstrap-datetimepicker.es.js"></script>
<script type="text/javascript" src="./css/jquery.simplecolorpicker.js"></script>
<script type="text/javascript" src="./css/jquery.simplecolorpicker.js"></script>
<script type="text/javascript" src="./css/jasny-bootstrap.min.js"></script>
<script src="css/bootstrap3-editable/js/bootstrap-editable.min.js"></script>
</body>
</html>

View File

@@ -15,23 +15,6 @@
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `Articulos`
--
DROP TABLE IF EXISTS `Articulos`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `Articulos` (
`id` smallint(6) NOT NULL auto_increment,
`descripcion` varchar(60) NOT NULL COMMENT 'ordenable,link/Articulo',
`marca` varchar(20) default NULL COMMENT 'ordenable',
`modelo` varchar(20) default NULL COMMENT 'ordenable',
`cantidad` int(11) default NULL COMMENT 'ordenable',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=785 DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `Articulos`
--
@@ -42,29 +25,6 @@ INSERT INTO `Articulos` VALUES (589,'Armario con puertas y cajones','M. E. C.','
/*!40000 ALTER TABLE `Articulos` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `Elementos`
--
DROP TABLE IF EXISTS `Elementos`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `Elementos` (
`id` int(10) unsigned NOT NULL auto_increment,
`id_Articulo` smallint(6) NOT NULL COMMENT 'foreign(Articulos;id),ordenable',
`id_Ubicacion` smallint(5) unsigned NOT NULL COMMENT 'foreign(Ubicaciones;id),ordenable',
`numserie` varchar(30) default NULL COMMENT 'ordenable',
`cantidad` int(10) unsigned default NULL COMMENT 'ordenable',
`fechaCompra` date NOT NULL COMMENT 'ordenable',
PRIMARY KEY (`id`),
KEY `id` (`id`),
KEY `id_Articulo` (`id_Articulo`),
KEY `id_Ubicacion` (`id_Ubicacion`),
CONSTRAINT `Elementos_ibfk_1` FOREIGN KEY (`id_Articulo`) REFERENCES `Articulos` (`id`) ON DELETE CASCADE,
CONSTRAINT `Elementos_ibfk_2` FOREIGN KEY (`id_Ubicacion`) REFERENCES `Ubicaciones` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1884 DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `Elementos`
--
@@ -75,20 +35,6 @@ INSERT INTO `Elementos` VALUES (1414,589,140,'',1,'2004-12-07 00:00:00'),(1415,5
/*!40000 ALTER TABLE `Elementos` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `Ubicaciones`
--
DROP TABLE IF EXISTS `Ubicaciones`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `Ubicaciones` (
`id` smallint(5) unsigned NOT NULL auto_increment,
`Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,link/Ubicacion',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=184 DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `Ubicaciones`
--
@@ -99,30 +45,6 @@ INSERT INTO `Ubicaciones` VALUES (140,'Secretario'),(141,'Aula Althia'),(142,'Al
/*!40000 ALTER TABLE `Ubicaciones` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `Usuarios`
--
DROP TABLE IF EXISTS `Usuarios`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `Usuarios` (
`id` int(10) unsigned NOT NULL auto_increment,
`nombre` varchar(16) NOT NULL default '',
`clave` varchar(32) NOT NULL default '',
`idSesion` varchar(20) NOT NULL default '',
`alta` tinyint(1) NOT NULL default '0',
`modificacion` tinyint(1) NOT NULL default '0',
`borrado` tinyint(1) NOT NULL default '0',
`consulta` tinyint(1) NOT NULL default '1',
`informe` tinyint(1) NOT NULL default '1',
`usuarios` tinyint(1) NOT NULL default '0',
`config` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `nombre` (`nombre`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `Usuarios`
--
@@ -133,28 +55,7 @@ INSERT INTO `Usuarios` VALUES (2,'admin','galeote','s3LUSqxg{s',1,1,1,1,1,1,1),(
/*!40000 ALTER TABLE `Usuarios` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `test`
--
DROP TABLE IF EXISTS `test`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `test` (
`id` smallint(6) NOT NULL auto_increment,
`Descripcion` varchar(30) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;
--
-- Dumping data for table `test`
--
LOCK TABLES `test` WRITE;
/*!40000 ALTER TABLE `test` DISABLE KEYS */;
/*!40000 ALTER TABLE `test` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;

File diff suppressed because one or more lines are too long

View File

@@ -22,11 +22,12 @@ DROP TABLE IF EXISTS `Articulos`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `Articulos` (
`id` smallint(6) NOT NULL auto_increment,
`descripcion` varchar(60) NOT NULL COMMENT 'ordenable,link/Articulo',
`marca` varchar(20) default NULL COMMENT 'ordenable',
`modelo` varchar(20) default NULL COMMENT 'ordenable',
`cantidad` int(11) default NULL COMMENT 'ordenable',
`id` smallint(6) NOT NULL auto_increment COMMENT 'ordenable,link/Articulo',
`descripcion` varchar(60) NOT NULL COMMENT 'ordenable,ajax/text',
`marca` varchar(20) default NULL COMMENT 'ordenable,ajax/text',
`modelo` varchar(20) default NULL COMMENT 'ordenable,ajax/text',
`cantidad` int(11) default NULL COMMENT 'ordenable,ajax/number',
`imagen` varchar(45) default NULL COMMENT 'imagen',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=785 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
@@ -40,12 +41,13 @@ DROP TABLE IF EXISTS `Elementos`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `Elementos` (
`id` int(10) unsigned NOT NULL auto_increment,
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'ordenable',
`id_Articulo` smallint(6) NOT NULL COMMENT 'foreign(Articulos;id),ordenable',
`id_Ubicacion` smallint(5) unsigned NOT NULL COMMENT 'foreign(Ubicaciones;id),ordenable',
`numserie` varchar(30) default NULL COMMENT 'ordenable',
`cantidad` int(10) unsigned default NULL COMMENT 'ordenable',
`fechaCompra` date NOT NULL COMMENT 'ordenable',
`numserie` varchar(30) default NULL COMMENT 'ordenable,ajax/text',
`cantidad` int(10) unsigned default NULL COMMENT 'ordenable,ajax/number',
`fechaCompra` date NOT NULL COMMENT 'ordenable,ajax/combodate',
`imagen` varchar(45) default NULL COMMENT 'imagen',
PRIMARY KEY (`id`),
KEY `id` (`id`),
KEY `id_Articulo` (`id_Articulo`),
@@ -64,8 +66,9 @@ DROP TABLE IF EXISTS `Ubicaciones`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `Ubicaciones` (
`id` smallint(5) unsigned NOT NULL auto_increment,
`Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,link/Ubicacion',
`id` smallint(5) unsigned NOT NULL auto_increment COMMENT 'ordenable,link/Ubicacion',
`Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,ajax/text',
`imagen` varchar(45) DEFAULT NULL COMMENT 'imagen',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=184 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
@@ -79,10 +82,10 @@ DROP TABLE IF EXISTS `Usuarios`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `Usuarios` (
`id` int(10) unsigned NOT NULL auto_increment,
`nombre` varchar(16) NOT NULL default '',
`clave` varchar(32) NOT NULL default '',
`idSesion` varchar(20) NOT NULL default '',
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'ordenable',
`nombre` varchar(16) NOT NULL default '' COMMENT 'ajax/text',
`clave` varchar(32) NOT NULL default '' COMMENT 'ajax/text',
`idSesion` varchar(20) NOT NULL default '' COMMENT 'ajax/text',
`alta` tinyint(1) NOT NULL default '0',
`modificacion` tinyint(1) NOT NULL default '0',
`borrado` tinyint(1) NOT NULL default '0',
@@ -95,15 +98,7 @@ CREATE TABLE `Usuarios` (
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
--
-- Usuarios iniciales
--
LOCK TABLES `Usuarios` WRITE;
/*!40000 ALTER TABLE `Usuarios` DISABLE KEYS */;
INSERT INTO `Usuarios` VALUES (1,'admin','pruebas','s3LUSqxg{s',1,1,1,1,1,1,1),(2,'demo','pruebas','NogP_U0Byi',0,0,0,1,1,0,0);
/*!40000 ALTER TABLE `Usuarios` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

View File

@@ -22,8 +22,8 @@
$host="localhost";
$baseAnt="Inventario";
$baseNueva="Inventario2";
$usuario="root";
$claveUsuario="galeote";
$usuario="test";
$claveUsuario="tset";
$probar=false;

View File

@@ -1,55 +0,0 @@
<?php
/**
* Test de la clase Sql
*/
include 'Sql.php';
$bd=new Sql("localhost","test","tset","Inventario2");
if ($bd->error()) {
die("Error al conectar\n");
}
if (!$bd->ejecuta("select * from Articulos limit 0,10")) {
die("No pudo ejecutar consulta. ".$bd->mensajeError()."\n");
}
echo "Hay ".$bd->numeroTuplas()." registros.<br>\n";
while ($datos=$bd->procesaResultado()) {
foreach($datos as $clave => $valor) {
echo "[$clave]=[$valor] ";
}
echo "<br>\n";
}
$datos=$bd->estructura("Elementos");
for ($i=0;$i<count($datos);$i++) {
$campos[$datos[$i]["Field"]]=$datos[$i];
}
//print_r($datos);
echo "Hay ".count($campos)." tuplas.";
foreach($campos as $clave => $valor) {
$trozos=explode(",",$valor["Comment"]);
//echo "Trozos=";print_r($trozos);//print_r($campos);
foreach($trozos as $trozo) {
if (strstr($trozo,"foreign")) {
$temp=substr($trozo,8,-1);
list($tabla,$atributo)=explode(";",$temp);
$salida[$clave]=$tabla.",".$atributo;
echo "[$clave],[$tabla],[$atributo]<br>\n";
$existen=true;
}
}
}
/*for ($i=0;$i<count($datos);$i++) {
echo $datos[$i]["Field"]."<br>";
/*foreach($datos[$i] as $clave => $valor) {
echo "[$clave]=[$valor] ";
}
echo "<br>\n";
}*/
if ($bd->error()) {
echo $bd->mensajeError();
}
?>

View File

@@ -1,118 +0,0 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
// Timer Bar - Version 1.0
// Author: Brian Gosselin of http://scriptasylum.com
// Script featured on http://www.dynamicdrive.com
var loadedcolor='darkgray' ; // PROGRESS BAR COLOR
var unloadedcolor='lightgrey'; // COLOR OF UNLOADED AREA
var bordercolor='navy'; // COLOR OF THE BORDER
var barheight=15; // HEIGHT OF PROGRESS BAR IN PIXELS
var barwidth=300; // WIDTH OF THE BAR IN PIXELS
var waitTime=5; // NUMBER OF SECONDS FOR PROGRESSBAR
// THE FUNCTION BELOW CONTAINS THE ACTION(S) TAKEN ONCE BAR REACHES 100%.
// IF NO ACTION IS DESIRED, TAKE EVERYTHING OUT FROM BETWEEN THE CURLY BRACES ({})
// BUT LEAVE THE FUNCTION NAME AND CURLY BRACES IN PLACE.
// PRESENTLY, IT IS SET TO DO NOTHING, BUT CAN BE CHANGED EASILY.
// TO CAUSE A REDIRECT TO ANOTHER PAGE, INSERT THE FOLLOWING LINE:
// window.location="http://redirect_page.html";
// JUST CHANGE THE ACTUAL URL OF COURSE :)
// @todo prueba
/**
*@todo prueba
*TODO prueba
*@todo: prueba
*/
var action=function()
{
alert("Welcome to Dynamic Drive!");
//window.location="http://www.dynamicdrive.com
}
//*****************************************************//
//********** DO NOT EDIT BEYOND THIS POINT **********//
//*****************************************************//
var ns4=(document.layers)?true:false;
var ie4=(document.all)?true:false;
var blocksize=(barwidth-2)/waitTime/10;
var loaded=0;
var PBouter;
var PBdone;
var PBbckgnd;
var Pid=0;
var txt='';
if(ns4){
txt+='<table border=0 cellpadding=0 cellspacing=0><tr><td>';
txt+='<ilayer name="PBouter" visibility="hide" height="'+barheight+'" width="'+barwidth+'" onmouseup="hidebar()">';
txt+='<layer width="'+barwidth+'" height="'+barheight+'" bgcolor="'+bordercolor+'" top="0" left="0"></layer>';
txt+='<layer width="'+(barwidth-2)+'" height="'+(barheight-2)+'" bgcolor="'+unloadedcolor+'" top="1" left="1"></layer>';
txt+='<layer name="PBdone" width="'+(barwidth-2)+'" height="'+(barheight-2)+'" bgcolor="'+loadedcolor+'" top="1" left="1"></layer>';
txt+='</ilayer>';
txt+='</td></tr></table>';
}else{
txt+='<div id="PBouter" onmouseup="hidebar()" style="position:relative; visibility:hidden; background-color:'+bordercolor+'; width:'+barwidth+'px; height:'+barheight+'px;">';
txt+='<div style="position:absolute; top:1px; left:1px; width:'+(barwidth-2)+'px; height:'+(barheight-2)+'px; background-color:'+unloadedcolor+'; font-size:1px;"></div>';
txt+='<div id="PBdone" style="position:absolute; top:1px; left:1px; width:0px; height:'+(barheight-2)+'px; background-color:'+loadedcolor+'; font-size:1px;"></div>';
txt+='</div>';
}
document.write(txt);
function incrCount(){
window.status="Loading...";
loaded++;
if(loaded<0)loaded=0;
if(loaded>=waitTime*10){
clearInterval(Pid);
loaded=waitTime*10;
setTimeout('hidebar()',100);
}
resizeEl(PBdone, 0, blocksize*loaded, barheight-2, 0);
}
function hidebar(){
clearInterval(Pid);
window.status='';
//if(ns4)PBouter.visibility="hide";
//else PBouter.style.visibility="hidden";
action();
}
//THIS FUNCTION BY MIKE HALL OF BRAINJAR.COM
function findlayer(name,doc){
var i,layer;
for(i=0;i<doc.layers.length;i++){
layer=doc.layers[i];
if(layer.name==name)return layer;
if(layer.document.layers.length>0)
if((layer=findlayer(name,layer.document))!=null)
return layer;
}
return null;
}
function progressBarInit(){
PBouter=(ns4)?findlayer('PBouter',document):(ie4)?document.all['PBouter']:document.getElementById('PBouter');
PBdone=(ns4)?PBouter.document.layers['PBdone']:(ie4)?document.all['PBdone']:document.getElementById('PBdone');
resizeEl(PBdone,0,0,barheight-2,0);
if(ns4)PBouter.visibility="show";
else PBouter.style.visibility="visible";
Pid=setInterval('incrCount()',95);
}
function resizeEl(id,t,r,b,l){
if(ns4){
id.clip.left=l;
id.clip.top=t;
id.clip.right=r;
id.clip.bottom=b;
}else id.style.width=r+'px';
}
window.onload=progressBarInit;

5
tmp/.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

View File

@@ -2,16 +2,21 @@
<Informe>
<Titulo Texto="Informe de Artículos" />
<Datos>
<Consulta>select * from Articulos order by descripcion;</Consulta>
<Consulta>
select A.id as id,A.descripcion as descripcion, A.marca as marca, A.modelo as modelo, A.cantidad as cantidad,
(select count(E.id) from Elementos E where E.id_Articulo=A.id) as Numero from Articulos A
where A.descripcion like '%{filtro}%' order by {orden};
</Consulta>
</Datos>
<Pagina Orientacion="P" Formato="A4">
<Cabecera>Relación alfabética</Cabecera>
<Cabecera>Relación Artículos</Cabecera>
<Cuerpo>
<Col Nombre="id" Ancho="10" Ajuste="D" Titulo="id"/>
<Col Nombre="descripcion" Ancho="70" Ajuste="I" Titulo="Descripción"/>
<Col Nombre="marca" Ancho="40" Ajuste="I" Titulo="Marca"/>
<Col Nombre="modelo" Ancho="50" Ajuste="I" Titulo="Modelo"/>
<Col Nombre="cantidad" Ancho="20" Ajuste="D" Titulo="cantidad"/>
<Col Nombre="modelo" Ancho="40" Ajuste="I" Titulo="Modelo"/>
<Col Nombre="cantidad" Ancho="20" Ajuste="D" Titulo="Cantidad"/>
<Col Nombre="Numero" Ancho="15" Ajuste="D" Titulo="NºElem"/>
</Cuerpo>
</Pagina>
</Informe>

View File

@@ -4,9 +4,9 @@
<Datos>
<Consulta>
SELECT E.id as id,U.Descripcion as ubicacion,A.Descripcion as articulo,A.Marca as marca,A.Modelo as modelo,E.numserie as numserie,E.cantidad,
DATE_FORMAT(E.fechacompra, '%d/%m/%Y') as fechaCompra
FROM Elementos E inner join Articulos A on E.id_articulo=A.id inner join
Ubicaciones U on E.id_ubicacion=U.id order by ubicacion,articulo,marca,modelo,numserie;
DATE_FORMAT(E.fechacompra, '%d/%m/%Y') as fechaCompra
FROM Elementos E inner join Articulos A on E.id_articulo=A.id inner join
Ubicaciones U on E.id_ubicacion=U.id where A.Descripcion like '%{filtro}%' order by {orden};
</Consulta>
</Datos>
<Pagina Orientacion="L" Formato="A4">

View File

@@ -2,13 +2,16 @@
<Informe>
<Titulo Texto="Informe de Ubicaciones" />
<Datos>
<Consulta>select * from Ubicaciones order by Descripcion;</Consulta>
<Consulta>select U.id as id, U.Descripcion as Descripcion,(select count(E.id) from Elementos E where E.id_Ubicacion=U.id) as Numero
from Ubicaciones U where U.descripcion like '%{filtro}%' order by {orden};
</Consulta>
</Datos>
<Pagina Orientacion="P" Formato="A4">
<Cabecera>Relación alfabética</Cabecera>
<Cabecera>Relación de Ubicaciones</Cabecera>
<Cuerpo>
<Col Nombre="id" Ancho="10" Ajuste="D" Titulo="id"/>
<Col Nombre="Descripcion" Ancho="80" Ajuste="I" Titulo="Descripción"/>
<Col Nombre="Numero" Ancho="15" Ajuste="D" Titulo="Nº Elem"/>
</Cuerpo>
</Pagina>
</Informe>

View File

@@ -2,7 +2,7 @@
<Informe>
<Titulo Texto="Informe de Usuarios" />
<Datos>
<Consulta>select * from Usuarios order by Nombre;</Consulta>
<Consulta>select * from Usuarios where nombre like '%{filtro}%' order by {orden};</Consulta>
</Datos>
<Pagina Orientacion="P" Formato="A4">
<Cabecera>Relación alfabética</Cabecera>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<Informe>
<Titulo Texto="{Descripcion}" id="{id}"/>
<Datos>
<Consulta>
select A.id as idArt, A.Descripcion as articulo, A.Marca as marca, A.Modelo as modelo, E.id as idEl, U.id as idUbic,U.Descripcion as ubicacion,E.numserie as numserie,
E.fechaCompra as fechaCompra,E.Cantidad as cantidad, E.Cantidad as cantReal, 'N' as Baja
from Elementos E, Articulos A, Ubicaciones U where A.id=E.id_Articulo and U.id=E.id_Ubicacion
and A.id='{id}' order by U.Descripcion,numserie;
</Consulta>
</Datos>
<Pagina Orientacion="P" Formato="A4">
<Cabecera>Articulo</Cabecera>
<Cuerpo>
<Col Nombre="Baja" Titulo="Baja"/>
<Col Nombre="idEl" Titulo="idElem"/>
<Col Nombre="idUbic" Titulo="idUbic"/>
<Col Nombre="articulo" Titulo="Articulo"/>
<Col Nombre="ubicacion" Titulo="Ubicación"/>
<Col Nombre="numserie" Titulo="N Serie"/>
<Col Nombre="fechaCompra" Titulo="Fecha C." />
<Col Nombre="cantidad" Titulo="Cantidad"/>
<Col Nombre="cantReal" Titulo="Cant. Real"/>
</Cuerpo>
</Pagina>
</Informe>

View File

@@ -0,0 +1,29 @@
<?xml version="1.0"?>
<Informe>
<Titulo Texto="{Descripcion}" id="{id}"/>
<Datos>
<Consulta>
select A.id as idArt,E.id as idEl,U.id as idUbic,U.Descripcion as ubicacion,A.Marca as marca,A.Modelo as modelo,E.numSerie as numserie,
E.fechaCompra as fechaCompra,A.Descripcion as articulo,E.Cantidad as cantidad, E.Cantidad as cantReal, 'N' as Baja
from Elementos E, Articulos A, Ubicaciones U where A.id=E.id_Articulo and U.id=E.id_Ubicacion
and U.id='{id}' order by A.descripcion;
</Consulta>
</Datos>
<Pagina Horizontal="2" Vertical="7">
<Cabecera>Ubicacion</Cabecera>
<Cuerpo>
<Col Nombre="Qr" Valor="{url}"/>
<Col Nombre="idEl" Titulo="idElem"/>
<Col Nombre="idArt" Titulo="idArt"/>
<Col Nombre="idUbic" Titulo="idUbic"/>
<Col Nombre="ubicacion" Titulo="Ubicacion"/>
<Col Nombre="articulo" Titulo="Artículo"/>
<Col Nombre="marca" Titulo="Marca"/>
<Col Nombre="modelo" Titulo="Modelo"/>
<Col Nombre="numserie" Titulo="N Serie"/>
<Col Nombre="fechaCompra" Titulo="Fecha C." />
<Col Nombre="cantidad" Titulo="Cantidad"/>
<Col Nombre="cantReal" Titulo="Cant. Real"/>
</Cuerpo>
</Pagina>
</Informe>

Some files were not shown because too many files have changed in this diff Show More