16 Commits
1.03 ... 1.05

Author SHA1 Message Date
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
50 changed files with 8695 additions and 4757 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
nbproject nbproject
tmp/* tmp/*
.DS_Store .DS_Store
/img.data/

View File

@@ -67,6 +67,12 @@ class AportaContenido {
* @var array Permisos del usuario * @var array Permisos del usuario
*/ */
private $perfil; private $perfil;
/**
*
* @var array Datos pasados en la URL
*/
private $datosURL = array();
// El constructor necesita saber cuál es la opción actual // El constructor necesita saber cuál es la opción actual
/** /**
@@ -118,14 +124,14 @@ class AportaContenido {
public function __call($metodo, $parametros) { public function __call($metodo, $parametros) {
switch ($metodo) { // Dependiendo del método invocado switch ($metodo) { // Dependiendo del método invocado
case 'titulo': // devolvemos el título case 'titulo': // devolvemos el título
return APLICACION; return PROGRAMA." v".VERSION;
case 'usuario': case 'usuario':
if ($this->registrado) if ($this->registrado)
return "Usuario=$this->usuario"; return "Usuario=$this->usuario";
else else
return ''; return '';
case 'fecha': return $this->fechaActual(); case 'fecha': return $this->fechaActual();
case 'aplicacion': return APLICACION; case 'aplicacion': return PROGRAMA." v".VERSION;
case 'menu': // el menú case 'menu': // el menú
if ($this->registrado) { if ($this->registrado) {
return $this->miMenu->insertaMenu(); return $this->miMenu->insertaMenu();
@@ -149,9 +155,9 @@ class AportaContenido {
case 'ubicaciones': case 'ubicaciones':
case 'usuarios': case 'usuarios':
case 'test': case 'test':
return "Mantenimiento de " . ucfirst($opcion) . "."; return "Mantenimiento de " . ucfirst($opcion);
case 'configuracion': case 'configuracion':
return 'Configuración y Preferencias.'; return 'Configuración y Preferencias';
case 'informeInventario':return "Informe de Inventario"; case 'informeInventario':return "Informe de Inventario";
case 'descuadres':return 'Informe de descuadres'; case 'descuadres':return 'Informe de descuadres';
case 'importacion': return 'Importación de datos'; case 'importacion': return 'Importación de datos';
@@ -181,6 +187,29 @@ class AportaContenido {
case 'ubicaciones': case 'ubicaciones':
case 'test': case 'test':
case 'elementos': case 'elementos':
$this->DatosURL();
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();
$informe->imprimeInforme();
return;
} else {
return $this->mensajePermisos("Informes");
}
}
if ($this->perfil['Consulta']) { if ($this->perfil['Consulta']) {
$ele = new Mantenimiento($this->bdd, $this->perfil, $opcion); $ele = new Mantenimiento($this->bdd, $this->perfil, $opcion);
return $ele->ejecuta(); return $ele->ejecuta();
@@ -189,6 +218,29 @@ class AportaContenido {
} }
case 'usuarios': case 'usuarios':
if ($this->perfil['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();
$informe->imprimeInforme();
return;
} else {
return $this->mensajePermisos("Informes");
}
}
$ele = new Mantenimiento($this->bdd, $this->perfil, $opcion); $ele = new Mantenimiento($this->bdd, $this->perfil, $opcion);
return $ele->ejecuta(); return $ele->ejecuta();
} else { } else {
@@ -232,31 +284,19 @@ class AportaContenido {
} }
case 'copiaseg': case 'copiaseg':
if ($this->perfil['Config']) { if ($this->perfil['Config']) {
$archivo_sql = "tmp/copiaseg.sql"; $copia = new CopiaSeguridad();
$archivo = $archivo_sql . ".gz"; if ($_GET['confirmado'] == "1") {
if (file_exists($archivo)) { if (!$copia->creaCopia()) {
unlink($archivo); $tipo = "danger";
} $cabecera = "ERROR";
$comando = escapeshellcmd(MYSQLDUMP . ' -u ' . USUARIO . ' --password=' . CLAVE . ' --result-file=' . $archivo_sql . ' ' . BASEDATOS); } else {
$comando2 = escapeshellcmd(GZIP . ' -9f ' . $archivo_sql); $tipo = "info";
exec($comando); $cabecera = "INFORMACIÓN";
exec($comando2); }
if (filesize($archivo) < 1024) { return $this->panel($cabecera, $copia->mensaje(), $tipo);
//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";
} else { } else {
$mensaje .= 'Copia de seguridad realizada con &eacute;xito.<br><br>Pulse sobre el siguiente enlace para descargar:<br><br>'; return $copia->dialogo();
$mensaje .= '<a href="' . $archivo . '">Descargar Copia de Seguridad de Datos</a><br>';
$cabecera = "Informaci&oacute;n";
$tipo = "success";
} }
return $this->panel($cabecera,$mensaje,$tipo);
} else { } else {
return $this->mensajePermisos("Copias de seguridad"); return $this->mensajePermisos("Copias de seguridad");
} }
@@ -276,7 +316,15 @@ class AportaContenido {
return "Marca {$metodo} queda sin procesar"; return "Marca {$metodo} queda sin procesar";
} }
} }
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 * @param string $tipo

View File

@@ -1,231 +1,165 @@
<?php <?php
/**
* @package Inventario /**
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez * @package Inventario
* @license http://www.gnu.org/licenses/gpl-3.0.txt * @copyright Copyright (c) 2008, Ricardo Montañana Gómez
* This file is part of Inventario. * @license http://www.gnu.org/licenses/gpl-3.0.txt
* Inventario is free software: you can redistribute it and/or modify * This file is part of Inventario.
* it under the terms of the GNU General Public License as published by * Inventario is free software: you can redistribute it and/or modify
* the Free Software Foundation, either version 3 of the License, or * it under the terms of the GNU General Public License as published by
* (at your option) any later version. * 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 * Inventario is distributed in the hope that it will be useful,
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * but WITHOUT ANY WARRANTY; without even the implied warranty of
* GNU General Public License for more details. * 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/>. * 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; class Configuracion {
private $numFilas; private $configuracion = "inc/configuracion.inc";
private $estilo; private $confNueva = "inc/configuracion.new";
private $servidor; private $confAnterior = "inc/configuracion.ant";
private $baseDatos; private $datosConf;
private $usuario; //Campos del fichero de configuración que se van a editar.
private $clave; private $lista = array('SERVIDOR', 'PUERTO', 'BASEDATOS', 'BASEDATOSTEST', 'USUARIO', 'CLAVE', 'CENTRO', 'NUMFILAS', 'ESTILO', 'PLANTILLA', 'COLORLAT', 'COLORFON', 'MYSQLDUMP', 'GZIP');
private $configuracion="inc/configuracion.inc"; private $campos;
private $confNueva="inc/configuracion.new";
private $confAnterior="inc/configuracion.ant"; public function __construct()
private $plantilla; {
private $colorLateral; $this->campos = implode(",", $this->lista);
private $colorFondo; }
private $mysqldump; //comando mysqldump para la copia de seguridad
private $gzip; //comando gzip para comprimir la copia de seguridad //Hecho público para poder efectuar los tests correspondientes.
public function obtieneFichero()
public function ejecuta() {
{ return file_get_contents($this->configuracion, FILE_TEXT);
$fichero=file_get_contents($this->configuracion,FILE_TEXT); }
$datos=explode("\n",$fichero);
$grabar=isset($_POST['servidor']); public function obtieneLista()
if ($grabar) { {
$fsalida=@fopen($this->confNueva,"wb"); return $this->lista;
} }
foreach($datos as $linea) {
if (stripos($linea,"DEFINE")!==false) { public function obtieneDatos($linea, &$clave, &$valor)
$filtro=str_replace("'","",$linea); {
list($clave,$valor)=explode(",",$filtro); $filtro = str_replace("'", "", $linea);
list($resto,$campo)=explode("(",$clave); list($clave, $valor) = explode(",", $filtro);
list($valor,$resto)=explode(")",$valor); list($resto, $campo) = explode("(", $clave);
//$salida.="[$campo]=[$valor]<br>\n"; list($valor, $resto) = explode(")", $valor);
switch ($campo) { list($resto, $clave) = explode("(", $clave);
case 'CENTRO': $valor = trim($valor);
$this->nombreCentro=$valor; }
if ($grabar) {
$linea=str_replace($valor, $_POST['centro'],$linea); public function ejecuta() {
$this->nombreCentro=$_POST['centro']; $fichero = $this->obtieneFichero();
} $datos = explode("\n", $fichero);
break; $grabar = isset($_POST['SERVIDOR']);
case 'NUMFILAS': if ($grabar) {
$this->numFilas=$valor; $fsalida = @fopen($this->confNueva, "wb");
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;
} }
private function formulario() foreach ($datos as $linea) {
{ if (stripos($linea, "DEFINE") !== false) {
$coloresLateral = array( "Original" => "#C4FAEC", "Verde" => "#7bd148", "Azul marino" => "#5484ed", "Azul" => "#a4bdfc", "Turquesa" => "#46d6db", //Comprueba que tenga una definición correcta
"Verde claro" => "#7ae7bf", "Verde oscuro" => "#51b749", "Amarillo" => "#fbd75b", "Naranja" => "#ffb878", "Morado" => "#6633FF", $this->obtieneDatos($linea, $clave, $valor);
"Rojo oscuro" => "#dc2127", "P&uacute;rpura" => "#dbadff", "Gris" => "#e1e1e1"); $this->datosConf[$clave] = $valor;
$coloresFondo = array( "Verde" => "#7bd148", "Azul marino" => "#5484ed", "Azul" => "#a4bdfc", "Turquesa" => "#46d6db", if ($grabar && stripos($this->campos, $clave) !== false) {
"Verde claro" => "#7ae7bf", "Verde oscuro" => "#51b749", "Amarillo" => "#fbd75b", "Naranja" => "#ffb878", "Rojo" => "#ff887c", $linea = str_replace($valor, $_POST[$clave], $linea);
"Rojo oscuro" => "#dc2127", "P&uacute;rpura" => "#dbadff", "Gris" => "#e1e1e1", "Original" => '#F3FEC8'); $this->datosConf[$clave] = $_POST[$clave];
$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-8 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><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";
} }
$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>'; if ($grabar) {
$salida.='<tr><td style="vertical-align:middle">Color Fondo (bootstrap)</td><td style="vertical-align:middle"><select name="colorFon" id="colorFon" class="form-control">'; $registro = substr($linea, 0, 2) == "?>" ? $linea : $linea . "\n";
foreach ($coloresFondo as $color => $codigo) { fwrite($fsalida, $registro);
$selec = "";
if ($this->colorFondo == $codigo) {
$selec = "selected";
}
$salida.='<option value="'.$codigo.'" '.$selec.' >'.$color.'</option>';
} }
$salida.='</select></td></tr>'; }
$salida.='<th colspan=2 class="danger"><center><b>Base de datos</b></center></th>'; $salida.=$this->formulario();
$salida.='<tr><td>Servidor</td><td><input type="text" name="servidor" value="'.$this->servidor.'" size="30" /></td></tr>'; if ($grabar) {
$salida.='<tr><td>Base de datos</td><td><input type="text" name="baseDatos" value="'.$this->baseDatos.'" size="30" /></td></tr>'; $salida.='<p class="bg-primary">Configuraci&oacute;n guardada correctamente</p>';
$salida.='<tr><td>Usuario</td><td><input type="text" name="usuario" value="'.$this->usuario.'" size="30" /></td></tr>'; fclose($fsalida);
$salida.='<tr><td>Clave</td><td><input type="text" name="clave" value="'.$this->clave.'" size="30" /></td></tr>'; //unlink($this->confAnterior);
$salida.='<tr><td>mysqldump</td><td><input type="text" name="mysqldump" value="'.$this->mysqldump.'" size="30" /></td></tr>'; rename($this->configuracion, $this->confAnterior);
$salida.='<tr><td>gzip</td><td><input type="text" name="gzip" value="'.$this->gzip.'" size="30" /></td></tr>'; rename($this->confNueva, $this->configuracion);
$salida.='<tr align=center><td colspan=2><input type="submit" class="btn btn-primary" align="center" value="Aceptar" name="aceptar" /></td></tr></p>'; unlink($this->confAnterior);
$salida.='</form></div></center>'; }
$salida.="<script> 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' : ' ';
$normal = $this->datosConf['PLANTILLA'] == "normal" ? 'selected' : ' ';
$bootstrap = $this->datosConf['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->datosConf['CENTRO'] . '" size="30" /></td></tr>';
$salida.='<tr><td>N&uacute;mero de filas</td><td><input type="text" name="NUMFILAS" value="' . $this->datosConf['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 (trim($this->datosConf['COLORLAT']) == $codigo) {
$selec = "selected";
}
$salida.='<option value="' . $codigo . '" ' . $selec . ' >' . $color . '</option>';
}
$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 (trim($this->datosConf['COLORFON']) == $codigo) {
$selec = "selected";
}
$salida.='<option value="' . $codigo . '" ' . $selec . ' >' . $color . '</option>';
}
$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->datosConf['SERVIDOR'] . '" size="30" /></td></tr>';
$salida.='<tr><td>Puerto</td><td><input type="text" name="PUERTO" value="' . $this->datosConf['PUERTO'] . '" size="30" /></td></tr>';
$salida.='<tr><td>Base de datos</td><td><input type="text" name="BASEDATOS" value="' . $this->datosConf['BASEDATOS'] . '" size="30" /></td></tr>';
$salida.='<tr><td>Base de datos Tests</td><td><input type="text" name="BASEDATOSTEST" value="' . $this->datosConf['BASEDATOSTEST'] . '" size="30" /></td></tr>';
$salida.='<tr><td>Usuario</td><td><input type="text" name="USUARIO" value="' . $this->datosConf['USUARIO'] . '" size="30" /></td></tr>';
$salida.='<tr><td>Clave</td><td><input type="text" name="CLAVE" value="' . $this->datosConf['CLAVE'] . '" size="30" /></td></tr>';
$salida.='<tr><td>mysqldump</td><td><input type="text" name="MYSQLDUMP" value="' . $this->datosConf['MYSQLDUMP'] . '" size="30" /></td></tr>';
$salida.='<tr><td>gzip</td><td><input type="text" name="GZIP" value="' . $this->datosConf['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>
$(document).ready(function() { $(document).ready(function() {
$('select[name=" .'"colorFon"'. "]').on('change', function() { $('select[name=" . '"COLORFON"' . "]').on('change', function() {
$(document.body).css('background-color', $('select[name=" .'"colorFon"'. "]').val()); $(document.body).css('background-color', $('select[name=" . '"COLORFON"' . "]').val());
$('.main').css('background-color', $('select[name=" .'"colorFon"'. "]').val()); $('.main').css('background-color', $('select[name=" . '"COLORFON"' . "]').val());
}); });
$('select[name=" .'"colorLat"'. "]').on('change', function() { $('select[name=" . '"COLORLAT"' . "]').on('change', function() {
$('.sidebar').css('background-color', $('select[name=" .'"colorLat"'. "]').val()); $('.sidebar').css('background-color', $('select[name=" . '"COLORLAT"' . "]').val());
}); });
$('select[name=". '"colorLat"' ."]').simplecolorpicker({theme: 'glyphicons'}); $('select[name=" . '"COLORLAT"' . "]').simplecolorpicker({theme: 'glyphicons'});
$('select[name=" .'"colorFon"' ."]').simplecolorpicker({theme: 'glyphicons'}); $('select[name=" . '"COLORFON"' . "]').simplecolorpicker({theme: 'glyphicons'});
}); });
</script>"; </script>";
//$salida.="<br>fondo=[$this->colorFondo] lateral=[$this->colorLateral]<br>"; return $salida;
return $salida;
}
} }
}
?> ?>

131
CopiaSeguridad.php Normal file
View File

@@ -0,0 +1,131 @@
<?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 __construct()
{
$opcion = $_GET['opc'];
}
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'" . '">Volver</a>
<a class="btn btn-success btn-lg" role="button" onClick="location.href=' . "'index.php?copiaseg&confirmado=1'" . '">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;
}
}
?>

View File

@@ -70,7 +70,7 @@ class Distribucion {
// if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'],'gzip')) { // if(strstr($_SERVER['HTTP_ACCEPT_ENCODING'],'gzip')) {
// // introducimos la cabecera que indica que el contenido está comprimido // // introducimos la cabecera que indica que el contenido está comprimido
// header('Content-Encoding: gzip'); // 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 gzencode($pagina, 9);
// } // }
return $pagina; // enviamos sin comprimir return $pagina; // enviamos sin comprimir

179
EtiquetasPDF.php Normal file
View File

@@ -0,0 +1,179 @@
<?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 = "tmp/informeEtiquetas.pdf";
/**
* 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';
}
// 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()) {
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 = "tmp/Informe.pdf")
{
$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

170
Imagen.php Normal file
View File

@@ -0,0 +1,170 @@
<?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 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 ($_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 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

@@ -40,12 +40,19 @@ class InformeInventario {
private function listarUbicacion() { private function listarUbicacion() {
$salidaInforme = isset($_POST['salida']) ? $_POST['salida'] : 'pantalla'; $salidaInforme = isset($_POST['salida']) ? $_POST['salida'] : 'pantalla';
if ($salidaInforme == "pantalla") { switch ($salidaInforme) {
$fichero = "xml/inventarioUbicacion.xml"; case "pantalla":
$salida = "tmp/inventarioUbicacion.xml"; $fichero = "xml/inventarioUbicacion.xml";
} else { $salida = "tmp/inventarioUbicacion.xml";
$fichero = "xml/inventarioUbicacionCSV.xml"; break;
$salida = "tmp/inventarioUbicacionCSV.xml"; 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); $plantilla = file_get_contents($fichero) or die('Fallo en la apertura de la plantilla ' . $fichero);
$id = $_POST['id'] == NULL ? $_GET['id'] : $_POST['id']; $id = $_POST['id'] == NULL ? $_GET['id'] : $_POST['id'];
@@ -58,30 +65,47 @@ class InformeInventario {
$plantilla = str_replace("{id}", $id, $plantilla); $plantilla = str_replace("{id}", $id, $plantilla);
$plantilla = str_replace("{Descripcion}", $fila['Descripcion'], $plantilla); $plantilla = str_replace("{Descripcion}", $fila['Descripcion'], $plantilla);
file_put_contents($salida, $plantilla) or die('Fallo en la escritura de la plantilla ' . $salida); file_put_contents($salida, $plantilla) or die('Fallo en la escritura de la plantilla ' . $salida);
if ($salidaInforme == "pantalla") { switch ($salidaInforme) {
$informe = new InformePDF($this->bdd, $salida, true); case "pantalla":
$informe->crea($salida); $informe = new InformePDF($this->bdd, $salida, true);
$informe->cierraPDF(); $informe->crea($salida);
$informe->guardaArchivo("tmp/Informe.pdf"); $informe->cierraPDF();
echo '<script type="text/javascript"> window.open( "tmp/Informe.pdf" ) </script>'; $informe->guardaArchivo("tmp/Informe.pdf");
} else { echo '<script type="text/javascript"> window.open( "tmp/Informe.pdf" ) </script>';
//Genera una hoja de cálculo en formato csv break;
$nombre = "tmp/Ubicacion" . strftime("%Y%m%d") . rand(100, 999) . ".csv"; case "csv":
$hoja = new Csv($this->bdd); //Genera una hoja de cálculo en formato csv
$hoja->crea($nombre); $nombre = "tmp/Ubicacion" . strftime("%Y%m%d") . rand(100, 999) . ".csv";
$hoja->ejecutaConsulta($salida); $hoja = new Csv($this->bdd);
echo '<script type="text/javascript"> window.open( "' . $nombre . '" ) </script>'; $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();
$etiquetas->guardaArchivo("tmp/EtiquetasUbicacion.pdf");
echo '<script type="text/javascript"> window.open( "tmp/EtiquetasUbicacion.pdf" ) </script>';
break;
} }
} }
private function listarArticulo() { private function listarArticulo() {
$salidaInforme = isset($_POST['salida']) ? $_POST['salida'] : 'pantalla'; $salidaInforme = isset($_POST['salida']) ? $_POST['salida'] : 'pantalla';
if ($salidaInforme == "pantalla") { switch ($salidaInforme) {
$fichero = "xml/inventarioArticulo.xml"; case "pantalla":
$salida = "tmp/inventarioArticulo.xml"; $fichero = "xml/inventarioArticulo.xml";
} else { $salida = "tmp/inventarioArticulo.xml";
$fichero = "xml/inventarioArticuloCSV.xml"; break;
$salida = "tmp/inventarioArticuloCSV.xml"; 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); $plantilla = file_get_contents($fichero) or die('Fallo en la apertura de la plantilla ' . $fichero);
$id = $_POST['id'] == NULL ? $_GET['id'] : $_POST['id']; $id = $_POST['id'] == NULL ? $_GET['id'] : $_POST['id'];
@@ -96,21 +120,30 @@ class InformeInventario {
$plantilla = str_replace("{Marca}", $fila['marca'], $plantilla); $plantilla = str_replace("{Marca}", $fila['marca'], $plantilla);
$plantilla = str_replace("{Modelo}", $fila['modelo'], $plantilla); $plantilla = str_replace("{Modelo}", $fila['modelo'], $plantilla);
file_put_contents($salida, $plantilla) or die('Fallo en la escritura de la plantilla ' . $salida); file_put_contents($salida, $plantilla) or die('Fallo en la escritura de la plantilla ' . $salida);
if ($salidaInforme == "pantalla") { switch ($salidaInforme) {
$informe = new InformePDF($this->bdd, $salida, true); case "pantalla":
$informe->crea($salida); $informe = new InformePDF($this->bdd, $salida, true);
$informe->cierraPDF(); $informe->crea($salida);
$informe->guardaArchivo("tmp/Informe.pdf"); $informe->cierraPDF();
echo '<script type="text/javascript"> window.open( "tmp/Informe.pdf" ) </script>'; $informe->guardaArchivo("tmp/Informe.pdf");
} else { echo '<script type="text/javascript"> window.open( "tmp/Informe.pdf" ) </script>';
//Genera una hoja de cálculo en formato csv break;
$nombre = "tmp/Articulo" . strftime("%Y%m%d") . rand(100, 999) . ".csv"; case "csv":
$hoja = new Csv($this->bdd); //Genera una hoja de cálculo en formato csv
$hoja->crea($nombre); $nombre = "tmp/Articulo" . strftime("%Y%m%d") . rand(100, 999) . ".csv";
$hoja->ejecutaConsulta($salida); $hoja = new Csv($this->bdd);
echo '<script type="text/javascript"> window.open( "' . $nombre . '" ) </script>'; $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();
$etiquetas->guardaArchivo("tmp/EtiquetasArticulo.pdf");
echo '<script type="text/javascript"> window.open( "tmp/EtiquetasArticulo.pdf" ) </script>';
break;
} }
//header('Location: index.php');
} }
private function listaUbicaciones() { private function listaUbicaciones() {
@@ -149,6 +182,7 @@ class InformeInventario {
$salida.="<br><br><label for='salida'>Salida del informe por:</label>"; $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="pantalla" checked>Pantalla</label></div>';
$salida.='<div class="radio"><label><input type="radio" name="salida" value="csv">Archivo CSV</label></div>'; $salida.='<div class="radio"><label><input type="radio" name="salida" value="csv">Archivo CSV</label></div>';
$salida.='<div class="radio"><label><input type="radio" name="salida" value="etiquetas">Etiquetas</label></div>';
$salida.="<br><br></fieldset><p>"; $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">Aceptar</button></p><br></div>' . "\n";
return $salida; return $salida;
@@ -192,7 +226,6 @@ class InformeInventario {
$informe->cierraPDF(); $informe->cierraPDF();
$informe->imprimeInforme(); $informe->imprimeInforme();
} }
} }
?> ?>

View File

@@ -55,7 +55,7 @@ class InformePDF {
//echo $def->Titulo.$def->Cabecera; //echo $def->Titulo.$def->Cabecera;
$this->pdf->Open(); $this->pdf->Open();
$this->pdf->setAuthor(AUTOR,true); $this->pdf->setAuthor(AUTOR,true);
$creador = CENTRO . " " . APLICACION; $creador = CENTRO . " " . PROGRAMA.VERSION;
$this->pdf->setCreator(html_entity_decode($creador),true); $this->pdf->setCreator(html_entity_decode($creador),true);
$this->pdf->setSubject($this->def->Titulo,true); $this->pdf->setSubject($this->def->Titulo,true);
$this->pdf->setAutoPageBreak(true, 10); $this->pdf->setAutoPageBreak(true, 10);

View File

@@ -124,22 +124,10 @@ class Inventario {
// Creamos un objeto Distribución facilitándole el // Creamos un objeto Distribución facilitándole el
// nombre del archivo plantilla y el objeto que aportará // nombre del archivo plantilla y el objeto que aportará
// el contenido // el contenido
$opc = $_GET['opc']; $salida = new Distribucion($this->plant, $this->creaContenido());
list($opcion, $parametro) = explode("&", $this->opcActual); echo $salida->procesaPlantilla();
switch ($opc) { break;
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;
}
} }
} }

View File

@@ -206,6 +206,11 @@ class Mantenimiento {
$this->campoBusca = $dato[1]; $this->campoBusca = $dato[1];
$valor = '<a title="Inventario de ' . $valor . '" $target="_blank" href="index.php?informeInventario&opc=listar' . $datoEnlace . '&id=' . $id . '">' . $valor; $valor = '<a title="Inventario de ' . $valor . '" $target="_blank" href="index.php?informeInventario&opc=listar' . $datoEnlace . '&id=' . $id . '">' . $valor;
} }
if (strstr($this->campos[$clave]['Comment'], "imagen") && isset($valor)) {
$msj = '<button class="btn btn-info btn-xs" type="button" data-toggle="modal" data-target="#mensajeModal' . $id .'">Imagen</button>';
$msj .= $this->creaModal($valor, $id);
$valor = $msj;
}
if ($this->campos[$clave]['Type'] == "Boolean(1)") { if ($this->campos[$clave]['Type'] == "Boolean(1)") {
$checked = $valor == '1' ? 'checked' : ''; $checked = $valor == '1' ? 'checked' : '';
$valor = '<input type="checkbox" disabled ' . $checked . '>'; $valor = '<input type="checkbox" disabled ' . $checked . '>';
@@ -255,7 +260,9 @@ class Mantenimiento {
$za = '<a href="' . $za . '"><img alt="desc" title="Orden descendente" src="img/' . ESTILO . '/descendente.png"></a>'; $za = '<a href="' . $za . '"><img alt="desc" title="Orden descendente" src="img/' . ESTILO . '/descendente.png"></a>';
$this->restoreURL(); $this->restoreURL();
if ($this->perfil['Informe']) { if ($this->perfil['Informe']) {
$informe = '<a href="index.php?' . $tabla . '&opc=informe" target="_blank"><img src="img/' . ESTILO . '/informe.png" alt="informe" title="Informe pdf"></a>'; $this->datosURL['opc'] = "informe";
$inf = $this->montaURL();
$informe = '<a href="' . $inf . '" target="_blank"><img src="img/' . ESTILO . '/informe.png" alt="informe" title="Informe pdf"></a>';
} else { } else {
$informe = ""; $informe = "";
} }
@@ -276,7 +283,7 @@ class Mantenimiento {
private function enlaceBusqueda($pagina) private function enlaceBusqueda($pagina)
{ {
$valor = isset($this->cadenaBusqueda) ? 'value="' . $this->cadenaBusqueda . '"' : ''; $valor = isset($this->cadenaBusqueda) ? 'value="' . $this->cadenaBusqueda . '"' : '';
$salida = '<form name="busqueda" method="POST"><div class="col-sm-4 col-lg-6"><div class="input-group"> $salida = '<form name="busqueda" method="POST"><div class="col-xs-6 col-sm-4 col-md-6 col-lg-6"><div class="input-group">
<input type="text" name="buscar" placeholder="Descripci&oacute;n" class="form-control" ' . $valor . '> <input type="text" name="buscar" placeholder="Descripci&oacute;n" class="form-control" ' . $valor . '>
<span class="input-group-btn"><button class="btn btn-primary" type="button">Buscar</button> <span class="input-group-btn"><button class="btn btn-primary" type="button">Buscar</button>
</span></div></div></form>'; </span></div></div></form>';
@@ -295,6 +302,8 @@ class Mantenimiento {
} }
$this->datosURL['opc'] = 'inicial'; $this->datosURL['opc'] = 'inicial';
$this->datosURL['id'] = null; $this->datosURL['id'] = null;
//Comprueba si existe la imagen en datos para borrarla.
Imagen::borraImagenId($this->tabla, $id);
$url = $this->montaURL(); $url = $this->montaURL();
header('Location: ' . $url); header('Location: ' . $url);
return; return;
@@ -305,6 +314,7 @@ class Mantenimiento {
$comando = "insert into " . $this->tabla . " ("; $comando = "insert into " . $this->tabla . " (";
$lista = explode("&", $_POST['listacampos']); $lista = explode("&", $_POST['listacampos']);
$primero = true; $primero = true;
$hayImagen = false;
//Añade la lista de campos //Añade la lista de campos
foreach ($lista as $campo) { foreach ($lista as $campo) {
if ($campo == "") { if ($campo == "") {
@@ -337,7 +347,21 @@ class Mantenimiento {
} }
$valor = $_POST[$campo] == "on" ? '1' : $valor; $valor = $_POST[$campo] == "on" ? '1' : $valor;
} else { } else {
$valor = $_POST[$campo] == "" ? "null" : '"' . $_POST[$campo] . '"'; if (stristr($this->campos[$campo]['Comment'], "imagen")) {
//procesa el envío de la imagen
$imagen = new Imagen();
$accion = $imagen->determinaAccion($campo);
if ($accion != NOHACERNADA) {
$mensaje = "";
if (!$imagen->procesaEnvio($campo, $mensaje)) {
return $this->panelMensaje($mensaje, "danger", "ERROR PROCESANDO IMAGEN");
}
$hayImagen = true;
$campoImagen = $campo;
}
} else {
$valor = $_POST[$campo] == "" ? "null" : '"' . $_POST[$campo] . '"';
}
} }
$comando.="$coma " . $valor; $comando.="$coma " . $valor;
} }
@@ -345,14 +369,25 @@ class Mantenimiento {
if (!$this->bdd->ejecuta($comando)) { if (!$this->bdd->ejecuta($comando)) {
return $this->errorBD($comando); return $this->errorBD($comando);
} }
$id = $this->bdd->ultimoId();
if ($hayImagen) {
//Tiene que recuperar el id del registro insertado y actualizar el archivo de imagen
if (!$imagen->mueveImagenId($this->tabla, $id, $mensaje)) {
return $this->panelMensaje($mensaje, "danger", "ERROR COMPRIMIENDO IMAGEN");
}
$comando = "update " . $this->tabla . " set " . $campoImagen . "='" . $imagen->archivoComprimido . "' where id='" . $id ."';";
if (!$this->bdd->ejecuta($comando)) {
return $this->errorBD($comando);
}
}
$this->datosURL['opc'] = 'inicial'; $this->datosURL['opc'] = 'inicial';
$this->datosURL['id'] = null; $this->datosURL['id'] = null;
$cabecera = "refresh:".PAUSA.";url=".$this->montaURL(); $cabecera = "refresh:".PAUSA.";url=".$this->montaURL();
header($cabecera); header($cabecera);
return $this->panelMensaje("Se ha insertado el registro con la clave " . $this->bdd->ultimoId(), "info", "Informaci&oacute;n"); return $this->panelMensaje("Se ha insertado el registro con la clave " . $id, "info", "Informaci&oacute;n");
//return "<h1><a href=\"".$this->montaURL()."\">Se ha insertado el registro con la clave " . $this->bdd->ultimoId() . "</a></h1>"; //return "<h1><a href=\"".$this->montaURL()."\">Se ha insertado el registro con la clave " . $this->bdd->ultimoId() . "</a></h1>";
} }
protected function modificar() protected function modificar()
{ {
//Los datos a utilizar para actualizar la tupla vienen en $_POST. //Los datos a utilizar para actualizar la tupla vienen en $_POST.
@@ -380,10 +415,34 @@ class Mantenimiento {
$valor = $_POST[$campo] == "on" ? '1' : $valor; $valor = $_POST[$campo] == "on" ? '1' : $valor;
$comando.=$coma . ' ' . $campo . '="' . $valor . '"'; $comando.=$coma . ' ' . $campo . '="' . $valor . '"';
} else { } else {
if (strlen(trim($_POST[$campo])) == 0) { if (stristr($this->campos[$campo]['Comment'], "imagen")) {
$comando.="$coma $campo=null"; $valor = $_POST[$campo];
$imagen = new Imagen();
$accion = $imagen->determinaAccion($campo);
if ($accion != NOHACERNADA) {
if ($accion == HAYQUEGRABAR) {
$mensaje = "";
if (!$imagen->procesaEnvio($campo, $mensaje)) {
return $this->panelMensaje($mensaje, "danger", "ERROR PROCESANDO IMAGEN");
}
$mensaje = "";
if (!$imagen->mueveImagenId($this->tabla, $this->datosURL['id'], $mensaje)) {
return $this->panelMensaje($mensaje, "danger", "ERROR COMPRIMIENDO IMAGEN");
}
$comando .= "$coma $campo='" . $imagen->archivoComprimido . "'";
} else {
//Hay que borrar
Imagen::borraImagenId($this->tabla, $this->datosURL['id']);
$extensiones = array("png", "jpg", "gif");
$comando .= "$coma $campo=null";
}
}
} else { } else {
$comando.=$coma . ' ' . $campo . '="' . $_POST[$campo] . '"'; if (strlen(trim($_POST[$campo])) == 0) {
$comando.="$coma $campo=null";
} else {
$comando.=$coma . ' ' . $campo . '="' . $_POST[$campo] . '"';
}
} }
} }
} }
@@ -530,7 +589,7 @@ class Mantenimiento {
break; break;
} }
$accion = $this->montaURL(); $accion = $this->montaURL();
$salida.='<div class="col-sm-8"><form name="mantenimiento.form" class="form-horizontal" role="form" method="post" action="' . $accion . '">' . "\n"; $salida.='<div class="col-sm-8"><form name="mantenimiento.form" enctype="multipart/form-data" class="form-horizontal" role="form" method="post" action="' . $accion . '">' . "\n";
$salida.="<fieldset style=\"width: 96%;\"><p><legend style=\"color: red;\"><b>$tipo</b></legend>\n"; $salida.="<fieldset style=\"width: 96%;\"><p><legend style=\"color: red;\"><b>$tipo</b></legend>\n";
foreach ($this->campos as $clave => $valor) { foreach ($this->campos as $clave => $valor) {
if ($valor["Editable"] == "no") { if ($valor["Editable"] == "no") {
@@ -592,6 +651,14 @@ class Mantenimiento {
$salida .= '</div></div>'; $salida .= '</div></div>';
continue; continue;
} }
if (stristr($this->campos[$campo]['Comment'], "imagen")) {
$salida .= $this->creaCampoImagen($campo, $valorDato, $tipo);
continue;
}
if (stristr($this->campos[$campo]['Type'], "int")) {
$tipo_campo = "number";
$modoEfectivo .= ' onkeypress = "if ( isNaN(this.value + String.fromCharCode(event.keyCode) )) return false;" ';
}
//Si no es una clave foránea añade un campo de texto normal //Si no es una clave foránea añade un campo de texto normal
$salida.='<input class="form-control" type="' . $tipo_campo . '" name="' . $campo . '" value="' . $valorDato . $salida.='<input class="form-control" type="' . $tipo_campo . '" name="' . $campo . '" value="' . $valorDato .
'" maxlength="' . $tamano . '" size="' . (string) (intval($tamano) + 5) . '" ' . $modoEfectivo . " ><br><br>\n"; '" maxlength="' . $tamano . '" size="' . (string) (intval($tamano) + 5) . '" ' . $modoEfectivo . " ><br><br>\n";
@@ -612,6 +679,58 @@ class Mantenimiento {
$salida .= '<br></center></div>'; $salida .= '<br></center></div>';
return $salida; return $salida;
} }
protected function creaCampoImagen($campo, $valor, $tipoAccion)
{
if (file_exists($valor)) {
//El fichero existe.
$existe = true;
$tipo = "fileinput-exists";
} else {
$tipo = "fileinput-new";
$existe = false;
}
$mensaje = '
<div class="fileinput ' . $tipo . '" data-provides="fileinput">
<div class="fileinput-new thumbnail" style="width: 200px; height: 150px;"><img src="img/sinImagen.gif" /></div>
<div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 150px; line-height: 20px;">';
if ($existe) {
$mensaje .= '<img src="' . $valor . '" onclick="$('."'#mensajeModal1'".').modal();">';
}
$mensaje .= '</div>';
if ($tipoAccion == ANADIR || $tipoAccion == EDICION) {
$mensaje .= '<div>
<span class="btn btn-default btn-file" ><span class="fileinput-new">Añadir</span><span class="fileinput-exists">Cambiar</span><input type="file" name="imagen" /></span>
<a href="#" class="btn btn-default fileinput-exists" data-dismiss="fileinput">Eliminar</a>';
}
if ($existe) {
$mensaje .='<input type="hidden" name="' . $campo . '" value="' . $valor . '">';
}
$mensaje .='</div>';
if ($tipoAccion == ANADIR || $tipoAccion == EDICION) {
$mensaje .= '</div>';
}
$mensaje .= $this->creaModal($valor, 1);
return $mensaje;
}
private function creaModal($valor, $id)
{
$mensaje .= '
<div id="mensajeModal'.$id.'" class="modal fade " tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog text-center">
<div class="modal-content text-center">
<img src="' . $valor . '" class="img-responsive">
<label>Archivo: ' . $valor . '</label>
</div>
</div>
</div>';
return $mensaje;
}
protected function errorBD($comando, $texto = "", $tipo = "danger", $cabecera = "&iexcl;Atenci&oacute;n!") protected function errorBD($comando, $texto = "", $tipo = "danger", $cabecera = "&iexcl;Atenci&oacute;n!")
{ {
@@ -631,7 +750,8 @@ class Mantenimiento {
$mensaje .= '</div>'; $mensaje .= '</div>';
$mensaje .= '</div>'; $mensaje .= '</div>';
return $mensaje; return $mensaje;
} }
} }
?> ?>

View File

@@ -61,7 +61,7 @@ class Pdf_mysql_table extends Fpdf
//Titulo //Titulo
$fecha=strftime("%d-%b-%Y %H:%M"); $fecha=strftime("%d-%b-%Y %H:%M");
$this->SetFont('Arial','',8); $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 . VERSION,ENT_COMPAT | ENT_HTML401,'ISO-8859-1'),0,1,'L');
$this->SetFont('Arial','',18); $this->SetFont('Arial','',18);
$this->Cell(0,6,utf8_decode($this->titulo),0,1,'C'); $this->Cell(0,6,utf8_decode($this->titulo),0,1,'C');
$this->SetFont('Arial','',8); $this->SetFont('Arial','',8);
@@ -161,7 +161,7 @@ class Pdf_mysql_table extends Fpdf
function Table($query,$prop=array()) function Table($query,$prop=array())
{ {
//Issue query //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 //Add all columns if none was specified
if(count($this->aCols)==0) if(count($this->aCols)==0)
{ {

1707
Zebra_Image.php Normal file

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,19 +1,19 @@
<?php <?php
$type = 'Core'; $type = 'Core';
$name = 'Symbol'; $name = 'Symbol';
$up = -100; $up = -100;
$ut = 50; $ut = 50;
$cw = array( $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(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, 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, ','=>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, '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, '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, '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(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(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(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(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(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); 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 <?php
$type = 'Core'; $type = 'Core';
$name = 'Times-Roman'; $name = 'Times-Roman';
$up = -100; $up = -100;
$ut = 50; $ut = 50;
$cw = array( $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(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, 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, ','=>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, '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, '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, '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(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(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(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(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(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); 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 <?php
$type = 'Core'; $type = 'Core';
$name = 'Times-Bold'; $name = 'Times-Bold';
$up = -100; $up = -100;
$ut = 50; $ut = 50;
$cw = array( $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(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, 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, ','=>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, '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, '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, '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(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(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(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(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(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); 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 <?php
$type = 'Core'; $type = 'Core';
$name = 'Times-BoldItalic'; $name = 'Times-BoldItalic';
$up = -100; $up = -100;
$ut = 50; $ut = 50;
$cw = array( $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(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, 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, ','=>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, '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, '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, '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(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(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(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(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(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); 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 <?php
$type = 'Core'; $type = 'Core';
$name = 'Times-Italic'; $name = 'Times-Italic';
$up = -100; $up = -100;
$ut = 50; $ut = 50;
$cw = array( $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(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, 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, ','=>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, '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, '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, '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(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(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(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(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(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); 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 <?php
$type = 'Core'; $type = 'Core';
$name = 'ZapfDingbats'; $name = 'ZapfDingbats';
$up = -100; $up = -100;
$ut = 50; $ut = 50;
$cw = array( $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(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, 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, ','=>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, '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, '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, '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(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(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(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(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(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); 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

BIN
img.data/1424.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

BIN
img/sinImagen.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 B

View File

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

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.05');
?>

View File

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

3312
phpqrcode.php Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -16,15 +16,16 @@
<link href="css/bootstrap-datetimepicker.min.css" 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.css">
<link rel="stylesheet" href="css/jquery.simplecolorpicker-glyphicons.css"> <link rel="stylesheet" href="css/jquery.simplecolorpicker-glyphicons.css">
<link rel="stylesheet" href="css/jasny-bootstrap.min.css">
<style type="text/css"></style> <style type="text/css"></style>
<script type="text/javascript" src="./css/jquery.min.js"></script> <script type="text/javascript" src="./css/jquery.min.js"></script>
</head> </head>
<body> <body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation"> <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container-fluid"> <div class="container-fluid">
<div class="navbar-header"> <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="sr-only">Toggle navigation</span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
@@ -38,7 +39,7 @@
</div> </div>
<div class="navbar-collapse collapse"> <div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right"> <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><a href="#">{fecha}</a></li>
<li>{control}</li> <li>{control}</li>
</ul> </ul>
@@ -88,6 +89,7 @@
<script type="text/javascript" src="./css/moment.min.js"></script> <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.min.js"></script>
<script type="text/javascript" src="./css/bootstrap-datetimepicker.es.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>
</body> </body>
</html> </html>

View File

@@ -28,6 +28,7 @@ CREATE TABLE `Articulos` (
`marca` varchar(20) default NULL COMMENT 'ordenable', `marca` varchar(20) default NULL COMMENT 'ordenable',
`modelo` varchar(20) default NULL COMMENT 'ordenable', `modelo` varchar(20) default NULL COMMENT 'ordenable',
`cantidad` int(11) default NULL COMMENT 'ordenable', `cantidad` int(11) default NULL COMMENT 'ordenable',
`imagen` varchar(45) DEFAULT NULL COMMENT 'imagen',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=785 DEFAULT CHARSET=utf8; ) ENGINE=InnoDB AUTO_INCREMENT=785 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client; SET character_set_client = @saved_cs_client;
@@ -56,6 +57,7 @@ CREATE TABLE `Elementos` (
`numserie` varchar(30) default NULL COMMENT 'ordenable', `numserie` varchar(30) default NULL COMMENT 'ordenable',
`cantidad` int(10) unsigned default NULL COMMENT 'ordenable', `cantidad` int(10) unsigned default NULL COMMENT 'ordenable',
`fechaCompra` date NOT NULL COMMENT 'ordenable', `fechaCompra` date NOT NULL COMMENT 'ordenable',
`imagen` varchar(45) DEFAULT NULL COMMENT 'imagen',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `id` (`id`), KEY `id` (`id`),
KEY `id_Articulo` (`id_Articulo`), KEY `id_Articulo` (`id_Articulo`),
@@ -85,6 +87,7 @@ SET character_set_client = utf8;
CREATE TABLE `Ubicaciones` ( CREATE TABLE `Ubicaciones` (
`id` smallint(5) unsigned NOT NULL auto_increment, `id` smallint(5) unsigned NOT NULL auto_increment,
`Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,link/Ubicacion', `Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,link/Ubicacion',
`imagen` varchar(45) DEFAULT NULL COMMENT 'imagen',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=184 DEFAULT CHARSET=utf8; ) ENGINE=InnoDB AUTO_INCREMENT=184 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client; SET character_set_client = @saved_cs_client;

View File

@@ -27,6 +27,7 @@ CREATE TABLE `Articulos` (
`marca` varchar(20) default NULL COMMENT 'ordenable', `marca` varchar(20) default NULL COMMENT 'ordenable',
`modelo` varchar(20) default NULL COMMENT 'ordenable', `modelo` varchar(20) default NULL COMMENT 'ordenable',
`cantidad` int(11) default NULL COMMENT 'ordenable', `cantidad` int(11) default NULL COMMENT 'ordenable',
`imagen` varchar(45) default NULL COMMENT 'imagen',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=785 DEFAULT CHARSET=utf8; ) ENGINE=InnoDB AUTO_INCREMENT=785 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client; SET character_set_client = @saved_cs_client;
@@ -46,6 +47,7 @@ CREATE TABLE `Elementos` (
`numserie` varchar(30) default NULL COMMENT 'ordenable', `numserie` varchar(30) default NULL COMMENT 'ordenable',
`cantidad` int(10) unsigned default NULL COMMENT 'ordenable', `cantidad` int(10) unsigned default NULL COMMENT 'ordenable',
`fechaCompra` date NOT NULL COMMENT 'ordenable', `fechaCompra` date NOT NULL COMMENT 'ordenable',
`imagen` varchar(45) default NULL COMMENT 'imagen',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `id` (`id`), KEY `id` (`id`),
KEY `id_Articulo` (`id_Articulo`), KEY `id_Articulo` (`id_Articulo`),
@@ -66,6 +68,7 @@ SET character_set_client = utf8;
CREATE TABLE `Ubicaciones` ( CREATE TABLE `Ubicaciones` (
`id` smallint(5) unsigned NOT NULL auto_increment, `id` smallint(5) unsigned NOT NULL auto_increment,
`Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,link/Ubicacion', `Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,link/Ubicacion',
`imagen` varchar(45) DEFAULT NULL COMMENT 'imagen',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=184 DEFAULT CHARSET=utf8; ) ENGINE=InnoDB AUTO_INCREMENT=184 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client; SET character_set_client = @saved_cs_client;

View File

@@ -2,10 +2,10 @@
<Informe> <Informe>
<Titulo Texto="Informe de Artículos" /> <Titulo Texto="Informe de Artículos" />
<Datos> <Datos>
<Consulta>select * from Articulos order by descripcion;</Consulta> <Consulta>select * from Articulos where descripcion like '%{filtro}%' order by {orden};</Consulta>
</Datos> </Datos>
<Pagina Orientacion="P" Formato="A4"> <Pagina Orientacion="P" Formato="A4">
<Cabecera>Relación alfabética</Cabecera> <Cabecera>Relación Artículos</Cabecera>
<Cuerpo> <Cuerpo>
<Col Nombre="id" Ancho="10" Ajuste="D" Titulo="id"/> <Col Nombre="id" Ancho="10" Ajuste="D" Titulo="id"/>
<Col Nombre="descripcion" Ancho="70" Ajuste="I" Titulo="Descripción"/> <Col Nombre="descripcion" Ancho="70" Ajuste="I" Titulo="Descripción"/>

View File

@@ -4,9 +4,9 @@
<Datos> <Datos>
<Consulta> <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, 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 DATE_FORMAT(E.fechacompra, '%d/%m/%Y') as fechaCompra
FROM Elementos E inner join Articulos A on E.id_articulo=A.id inner join 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; Ubicaciones U on E.id_ubicacion=U.id where A.Descripcion like '%{filtro}%' order by {orden};
</Consulta> </Consulta>
</Datos> </Datos>
<Pagina Orientacion="L" Formato="A4"> <Pagina Orientacion="L" Formato="A4">

View File

@@ -2,10 +2,10 @@
<Informe> <Informe>
<Titulo Texto="Informe de Ubicaciones" /> <Titulo Texto="Informe de Ubicaciones" />
<Datos> <Datos>
<Consulta>select * from Ubicaciones order by Descripcion;</Consulta> <Consulta>select * from Ubicaciones where descripcion like '%{filtro}%' order by {orden};</Consulta>
</Datos> </Datos>
<Pagina Orientacion="P" Formato="A4"> <Pagina Orientacion="P" Formato="A4">
<Cabecera>Relación alfabética</Cabecera> <Cabecera>Relación de Ubicaciones</Cabecera>
<Cuerpo> <Cuerpo>
<Col Nombre="id" Ancho="10" Ajuste="D" Titulo="id"/> <Col Nombre="id" Ancho="10" Ajuste="D" Titulo="id"/>
<Col Nombre="Descripcion" Ancho="80" Ajuste="I" Titulo="Descripción"/> <Col Nombre="Descripcion" Ancho="80" Ajuste="I" Titulo="Descripción"/>

View File

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

View File

@@ -3,7 +3,7 @@
<Titulo>Mantenimiento de Elementos</Titulo> <Titulo>Mantenimiento de Elementos</Titulo>
<Consulta> <Consulta>
SELECT SQL_CALC_FOUND_ROWS E.id as id,U.Descripcion as ubicacion,A.Descripcion as articulo,A.Marca as marca,A.Modelo as modelo,E.numserie as numserie, SELECT SQL_CALC_FOUND_ROWS E.id as id,U.Descripcion as ubicacion,A.Descripcion as articulo,A.Marca as marca,A.Modelo as modelo,E.numserie as numserie,
DATE_FORMAT(E.fechacompra, '%d/%m/%Y') as fechaCompra,E.cantidad as cantidad DATE_FORMAT(E.fechacompra, '%d/%m/%Y') as fechaCompra,E.cantidad as cantidad, E.imagen as imagen
FROM Elementos E inner join Articulos A on E.id_articulo=A.id inner join FROM Elementos E inner join Articulos A on E.id_articulo=A.id inner join
Ubicaciones U on E.id_ubicacion=U.id {buscar} {orden} limit {inferior},{superior}; Ubicaciones U on E.id_ubicacion=U.id {buscar} {orden} limit {inferior},{superior};
</Consulta> </Consulta>
@@ -16,5 +16,6 @@
<Col Campo="numserie" Nombre="numserie" Ancho="30" Ajuste="L" Titulo="Nº Serie" Varios="ordenable" Editable="si"/> <Col Campo="numserie" Nombre="numserie" Ancho="30" Ajuste="L" Titulo="Nº Serie" Varios="ordenable" Editable="si"/>
<Col Campo="fechaCompra" Nombre="fechaCompra" Ancho="25" Ajuste="L" Titulo="Compra" Varios="ordenable" Tipo="fecha" Editable="si"/> <Col Campo="fechaCompra" Nombre="fechaCompra" Ancho="25" Ajuste="L" Titulo="Compra" Varios="ordenable" Tipo="fecha" Editable="si"/>
<Col Campo="cantidad" Nombre="cantidad" Ancho="15" Ajuste="D" Titulo="Cant." Tipo="Int(11)" Editable="si"/> <Col Campo="cantidad" Nombre="cantidad" Ancho="15" Ajuste="D" Titulo="Cant." Tipo="Int(11)" Editable="si"/>
<Col Campo="imagen" Nombre="imagen" Ancho="10" Titulo="Imagen" Tipo="imagen" Editable="si" Varios="imagen"/>
</Campos> </Campos>
</Mantenimiento> </Mantenimiento>

View File

@@ -7,7 +7,7 @@
</Consulta> </Consulta>
<Campos> <Campos>
<Col Campo="id" Nombre="id" Ancho="5" Ajuste="D" Titulo="id" Tipo="int(6)"/> <Col Campo="id" Nombre="id" Ancho="5" Ajuste="D" Titulo="id" Tipo="int(6)"/>
<Col Campo="nombre" Nombre="nombre" Ancho="8" Ajuste="L" Titulo="Nombre" Varios="ordenable" Editable="si"/> <Col Campo="nombre" Nombre="nombre" Ancho="8" Ajuste="L" Titulo="Nombre" Varios="ordenable,buscable/nombre" Editable="si"/>
<Col Campo="clave" Nombre="clave" Ancho="16" Ajuste="L" Titulo="Clave" Tipo="Password" Editable="si"/> <Col Campo="clave" Nombre="clave" Ancho="16" Ajuste="L" Titulo="Clave" Tipo="Password" Editable="si"/>
<Col Campo="idSesion" Nombre="idSesion" Ancho="32" Ajuste="L" Titulo="id Sesión" Editable="si"/> <Col Campo="idSesion" Nombre="idSesion" Ancho="32" Ajuste="L" Titulo="id Sesión" Editable="si"/>
<Col Campo="alta" Nombre="alta" Ancho="1" Ajuste="R" Tipo="Boolean" Titulo="Altas" Editable="si"/> <Col Campo="alta" Nombre="alta" Ancho="1" Ajuste="R" Tipo="Boolean" Titulo="Altas" Editable="si"/>