mirror of
https://github.com/rmontanana/inventario2.git
synced 2025-08-16 07:56:00 +00:00
Compare commits
26 Commits
Author | SHA1 | Date | |
---|---|---|---|
74fdea8e08 | |||
70cf5eb542 | |||
b680e3142b | |||
a0dd082434 | |||
f6a480f828 | |||
c9a3cd83a5 | |||
|
8ffd97b474 | ||
|
caae389c93 | ||
|
42eb01c27e | ||
26048fc889 | |||
a853991146 | |||
|
99a929ec1f | ||
|
8b1ff91491 | ||
c1b4141606 | |||
e6db3c334b | |||
|
a85669a456 | ||
|
14335770df | ||
|
cd9762f4a9 | ||
|
6538402953 | ||
4aa32ff705 | |||
|
2a6680173a | ||
|
5f808b3d12 | ||
|
1441d972ab | ||
5ebd4ecf35 | |||
|
86125e0a79 | ||
3547cf5b2e |
@@ -94,7 +94,7 @@ class AportaContenido {
|
||||
*/
|
||||
public function fechaActual($formato = '', $idioma = 'es_ES') {
|
||||
if ($formato == '')
|
||||
$formato = "%d-%b-%Y %H:%M";
|
||||
$formato = "%d-%b-%y";
|
||||
setlocale(LC_TIME, $idioma);
|
||||
return strftime($formato);
|
||||
}
|
||||
@@ -118,14 +118,14 @@ class AportaContenido {
|
||||
public function __call($metodo, $parametros) {
|
||||
switch ($metodo) { // Dependiendo del método invocado
|
||||
case 'titulo': // devolvemos el título
|
||||
return APLICACION;
|
||||
return PROGRAMA.VERSION;
|
||||
case 'usuario':
|
||||
if ($this->registrado)
|
||||
return "Usuario=$this->usuario";
|
||||
else
|
||||
return '';
|
||||
case 'fecha': return $this->fechaActual();
|
||||
case 'aplicacion': return APLICACION;
|
||||
case 'aplicacion': return PROGRAMA.VERSION;
|
||||
case 'menu': // el menú
|
||||
if ($this->registrado) {
|
||||
return $this->miMenu->insertaMenu();
|
||||
@@ -144,8 +144,8 @@ class AportaContenido {
|
||||
return "Menú Principal";
|
||||
case 'principal':
|
||||
return "Pantalla Inicial";
|
||||
case 'articulos': $opcion = "artículos";
|
||||
case 'elementos':
|
||||
case 'articulos': $opcion="artículos";
|
||||
case 'ubicaciones':
|
||||
case 'usuarios':
|
||||
case 'test':
|
||||
@@ -155,6 +155,7 @@ class AportaContenido {
|
||||
case 'informeInventario':return "Informe de Inventario";
|
||||
case 'descuadres':return 'Informe de descuadres';
|
||||
case 'importacion': return 'Importación de datos';
|
||||
case 'copiaseg': return 'Copia de seguridad de datos';
|
||||
}
|
||||
return '';
|
||||
case 'control':
|
||||
@@ -175,7 +176,7 @@ class AportaContenido {
|
||||
switch ($opcion) {
|
||||
case 'principal': // contenido inicial
|
||||
return '<br><br><center><img src="img/logo.png" alt="' . PROGRAMA . '">' .
|
||||
'<br><label>' . PROGRAMA . '</label></center><br><br>' . PIE;
|
||||
'<br><label>' . CENTRO . '</label></center><br><br>' . PIE;
|
||||
case 'articulos':
|
||||
case 'ubicaciones':
|
||||
case 'test':
|
||||
@@ -196,7 +197,7 @@ class AportaContenido {
|
||||
|
||||
case 'bienvenido': // El usuario quiere iniciar sesión
|
||||
return 'Bienvenid@ ' . $this->usuario . '<br><br><center><img src="img/codigoBarras.png" alt="' . PROGRAMA . '">' .
|
||||
'<br><label>' . PROGRAMA . '</label></center><br><br>' . PIE;
|
||||
'<br><label>' . CENTRO . '</label></center><br><br>' . PIE;
|
||||
case 'configuracion':
|
||||
if ($this->perfil['Config']) {
|
||||
$conf = new Configuracion();
|
||||
@@ -229,6 +230,36 @@ class AportaContenido {
|
||||
} else {
|
||||
return $this->mensajePermisos("Actualización, creación y borrado de elementos");
|
||||
}
|
||||
case 'copiaseg':
|
||||
if ($this->perfil['Config']) {
|
||||
$archivo_sql = "tmp/copiaseg.sql";
|
||||
$archivo = $archivo_sql . ".gz";
|
||||
if (file_exists($archivo)) {
|
||||
unlink($archivo);
|
||||
}
|
||||
$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($archivo) < 1024) {
|
||||
//No se ha realizado la copia de seguridad
|
||||
$mensaje = "La copia de seguridad no se ha realizado correctamente.<br><br>";
|
||||
$mensaje .= "Compruebe que las rutas a los programas mysqldump y gzip en configuración está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 {
|
||||
$mensaje .= 'Copia de seguridad realizada con éxito.<br><br>Pulse sobre el siguiente enlace para descargar:<br><br>';
|
||||
$mensaje .= '<a href="' . $archivo . '">Descargar Copia de Seguridad de Datos</a><br>';
|
||||
$cabecera = "Información";
|
||||
$tipo = "success";
|
||||
}
|
||||
return $this->panel($cabecera,$mensaje,$tipo);
|
||||
} else {
|
||||
return $this->mensajePermisos("Copias de seguridad");
|
||||
}
|
||||
} // Fin del contenido
|
||||
case 'usuario_incorrecto':
|
||||
$this->usuario_inc = true;
|
||||
@@ -252,7 +283,16 @@ class AportaContenido {
|
||||
* @return string
|
||||
*/
|
||||
public function mensajePermisos($tipo) {
|
||||
return "<center><h1>No tiene permiso para acceder a " . $tipo . "</h1></center>";
|
||||
return $this->panel("ERROR", "No tiene permiso para acceder a $tipo", "danger");
|
||||
}
|
||||
|
||||
public function panel($cabecera, $mensaje, $tipo) {
|
||||
$panel = '<div class="panel panel-' . $tipo . '"><div class="panel-heading">';
|
||||
$panel .= '<h3 class="panel-title">' . $cabecera . '</h3></div>';
|
||||
$panel .= '<div class="panel-body">';
|
||||
$panel .= $mensaje;
|
||||
$panel .= '</div>';
|
||||
return $panel;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,154 +1,165 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Inventario
|
||||
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.txt
|
||||
* This file is part of Inventario.
|
||||
* Inventario is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Inventario is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Inventario. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
class Configuracion {
|
||||
private $nombreCentro;
|
||||
private $numFilas;
|
||||
private $estilo;
|
||||
private $servidor;
|
||||
private $baseDatos;
|
||||
private $usuario;
|
||||
private $clave;
|
||||
private $configuracion="inc/configuracion.inc";
|
||||
private $confNueva="inc/configuracion.new";
|
||||
private $confAnterior="inc/configuracion.ant";
|
||||
private $plantilla;
|
||||
|
||||
public function ejecuta()
|
||||
{
|
||||
$fichero=file_get_contents($this->configuracion,FILE_TEXT);
|
||||
$datos=explode("\n",$fichero);
|
||||
$grabar=isset($_POST['servidor']);
|
||||
if ($grabar) {
|
||||
$fsalida=@fopen($this->confNueva,"wb");
|
||||
}
|
||||
foreach($datos as $linea) {
|
||||
if (stripos($linea,"DEFINE")!==false) {
|
||||
$filtro=str_replace("'","",$linea);
|
||||
list($clave,$valor)=explode(",",$filtro);
|
||||
list($resto,$campo)=explode("(",$clave);
|
||||
list($valor,$resto)=explode(")",$valor);
|
||||
//$salida.="[$campo]=[$valor]<br>\n";
|
||||
switch ($campo) {
|
||||
case 'CENTRO':
|
||||
$this->nombreCentro=$valor;
|
||||
if ($grabar) {
|
||||
$linea=str_replace($valor, $_POST['centro'],$linea);
|
||||
$this->nombreCentro=$_POST['centro'];
|
||||
}
|
||||
break;
|
||||
case 'NUMFILAS':
|
||||
$this->numFilas=$valor;
|
||||
if ($grabar) {
|
||||
$linea=str_replace($valor, $_POST['filas'],$linea);
|
||||
$this->numFilas=$_POST['filas'];
|
||||
}
|
||||
break;
|
||||
case 'ESTILO':
|
||||
$this->estilo=$valor;
|
||||
if ($grabar) {
|
||||
$linea=str_replace($valor, $_POST['estilo'],$linea);
|
||||
$this->estilo=$_POST['estilo'];
|
||||
}
|
||||
break;
|
||||
case 'PLANTILLA':
|
||||
$this->plantilla=$valor;
|
||||
if ($grabar) {
|
||||
$linea=str_replace($valor, $_POST['plantilla'],$linea);
|
||||
$this->plantilla=$_POST['plantilla'];
|
||||
}
|
||||
break;
|
||||
case 'SERVIDOR':
|
||||
$this->servidor=$valor;
|
||||
if ($grabar) {
|
||||
$linea=str_replace($valor, $_POST['servidor'],$linea);
|
||||
$this->servidor=$_POST['servidor'];
|
||||
}
|
||||
break;
|
||||
case 'BASEDATOS':
|
||||
$this->baseDatos=$valor;
|
||||
if ($grabar) {
|
||||
$linea=str_replace($valor, $_POST['baseDatos'],$linea);
|
||||
$this->baseDatos=$_POST['baseDatos'];
|
||||
}
|
||||
break;
|
||||
case 'USUARIO':
|
||||
$this->usuario=$valor;
|
||||
if ($grabar) {
|
||||
$linea=str_replace($valor, $_POST['usuario'],$linea);
|
||||
$this->usuario=$_POST['usuario'];
|
||||
}
|
||||
break;
|
||||
case 'CLAVE':
|
||||
$this->clave=$valor;
|
||||
if ($grabar) {
|
||||
$linea=str_replace($valor, $_POST['clave'],$linea);
|
||||
$this->clave=$_POST['clave'];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($grabar) {
|
||||
$registro=substr($linea,0,2)=="?>"?$linea:$linea."\n";
|
||||
fwrite($fsalida,$registro);
|
||||
}
|
||||
}
|
||||
$salida.=$this->formulario();
|
||||
if ($grabar) {
|
||||
//$salida.='<label class="warn">Configuración guardada correctamente</label>';
|
||||
$salida.='<p class="bg-primary">Configuración guardada correctamente</p>';
|
||||
fclose($fsalida);
|
||||
unlink($this->confAnterior);
|
||||
rename($this->configuracion,$this->confAnterior);
|
||||
rename($this->confNueva,$this->configuracion);
|
||||
}
|
||||
return $salida;
|
||||
}
|
||||
private function formulario()
|
||||
{
|
||||
$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-2 col-md-6"><form name="configura" method="post">';
|
||||
//$salida.='<p align="center"><table border=1 class="tablaDatos"><tbody>';
|
||||
$salida.='<p align="center"><table border=2 class="table table-hover"><tbody>';
|
||||
$salida.='<th colspan=2 class="info"><center><b>Preferencias</b></center></th>';
|
||||
$salida.='<tr><td>Nombre del Centro</td><td><input type="text" name="centro" value="'.$this->nombreCentro.'" size="30" /></td></tr>';
|
||||
$salida.='<tr><td>Número de filas</td><td><input type="text" name="filas" value="'.$this->numFilas.'" size="3" /></td></tr>';
|
||||
$salida.='<tr><td>Plantilla</td><td><select name="plantilla">';
|
||||
$salida.='<option value="normal" '.$normal.'>normal</option>';
|
||||
$salida.='<option '.$bootstrap.'>bootstrap</option></select></td></tr>';
|
||||
$salida.='<tr><td>Estilo</td><td><select name="estilo">';
|
||||
$salida.='<option value="personal" '.$personal.'>personal</option>';
|
||||
$salida.='<option '.$bluecurve.'>bluecurve</option>';
|
||||
$salida.='<option '.$cristal.'>cristal</option></select></td></tr>';
|
||||
$salida.='<th colspan=2 class="danger"><center><b>Base de datos</b></center></th>';
|
||||
$salida.='<tr><td>Servidor</td><td><input type="text" name="servidor" value="'.$this->servidor.'" size="30" /></td></tr>';
|
||||
$salida.='<tr><td>Base de datos</td><td><input type="text" name="baseDatos" value="'.$this->baseDatos.'" size="30" /></td></tr>';
|
||||
$salida.='<tr><td>Usuario</td><td><input type="text" name="usuario" value="'.$this->usuario.'" size="30" /></td></tr>';
|
||||
$salida.='<tr><td>Clave</td><td><input type="text" name="clave" value="'.$this->clave.'" size="30" /></td></tr>';
|
||||
$salida.='<tr 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>';
|
||||
return $salida;
|
||||
}
|
||||
|
||||
/**
|
||||
* @package Inventario
|
||||
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.txt
|
||||
* This file is part of Inventario.
|
||||
* Inventario is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Inventario is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Inventario. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
class Configuracion {
|
||||
private $configuracion = "inc/configuracion.inc";
|
||||
private $confNueva = "inc/configuracion.new";
|
||||
private $confAnterior = "inc/configuracion.ant";
|
||||
private $datosConf;
|
||||
//Campos del fichero de configuración que se van a editar.
|
||||
private $lista = array('SERVIDOR', 'PUERTO', 'BASEDATOS', 'BASEDATOSTEST', 'USUARIO', 'CLAVE', 'CENTRO', 'NUMFILAS', 'ESTILO', 'PLANTILLA', 'COLORLAT', 'COLORFON', 'MYSQLDUMP', 'GZIP');
|
||||
private $campos;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->campos = implode(",", $this->lista);
|
||||
}
|
||||
?>
|
||||
|
||||
//Hecho público para poder efectuar los tests correspondientes.
|
||||
public function obtieneFichero()
|
||||
{
|
||||
return file_get_contents($this->configuracion, FILE_TEXT);
|
||||
}
|
||||
|
||||
public function obtieneLista()
|
||||
{
|
||||
return $this->lista;
|
||||
}
|
||||
|
||||
public function obtieneDatos($linea, &$clave, &$valor)
|
||||
{
|
||||
$filtro = str_replace("'", "", $linea);
|
||||
list($clave, $valor) = explode(",", $filtro);
|
||||
list($resto, $campo) = explode("(", $clave);
|
||||
list($valor, $resto) = explode(")", $valor);
|
||||
list($resto, $clave) = explode("(", $clave);
|
||||
$valor = trim($valor);
|
||||
}
|
||||
|
||||
public function ejecuta() {
|
||||
$fichero = $this->obtieneFichero();
|
||||
$datos = explode("\n", $fichero);
|
||||
$grabar = isset($_POST['SERVIDOR']);
|
||||
if ($grabar) {
|
||||
$fsalida = @fopen($this->confNueva, "wb");
|
||||
}
|
||||
foreach ($datos as $linea) {
|
||||
if (stripos($linea, "DEFINE") !== false) {
|
||||
//Comprueba que tenga una definición correcta
|
||||
$this->obtieneDatos($linea, $clave, $valor);
|
||||
$this->datosConf[$clave] = $valor;
|
||||
if ($grabar && stripos($this->campos, $clave) !== false) {
|
||||
$linea = str_replace($valor, $_POST[$clave], $linea);
|
||||
$this->datosConf[$clave] = $_POST[$clave];
|
||||
}
|
||||
//$salida = "DatosConf=".var_export($this->datosConf, true) . "stripos = " . stripos($campos, "GZIP");
|
||||
//$salida .= "Post=" . var_export($_POST, true);
|
||||
}
|
||||
if ($grabar) {
|
||||
$registro = substr($linea, 0, 2) == "?>" ? $linea : $linea . "\n";
|
||||
fwrite($fsalida, $registro);
|
||||
}
|
||||
}
|
||||
$salida.=$this->formulario();
|
||||
if ($grabar) {
|
||||
$salida.='<p class="bg-primary">Configuració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() {
|
||||
$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ú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ú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ú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() {
|
||||
$('select[name=" . '"COLORFON"' . "]').on('change', function() {
|
||||
$(document.body).css('background-color', $('select[name=" . '"COLORFON"' . "]').val());
|
||||
$('.main').css('background-color', $('select[name=" . '"COLORFON"' . "]').val());
|
||||
});
|
||||
$('select[name=" . '"COLORLAT"' . "]').on('change', function() {
|
||||
$('.sidebar').css('background-color', $('select[name=" . '"COLORLAT"' . "]').val());
|
||||
});
|
||||
$('select[name=" . '"COLORLAT"' . "]').simplecolorpicker({theme: 'glyphicons'});
|
||||
$('select[name=" . '"COLORFON"' . "]').simplecolorpicker({theme: 'glyphicons'});
|
||||
});
|
||||
</script>";
|
||||
return $salida;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
6
Csv.php
6
Csv.php
@@ -114,7 +114,7 @@ class Csv {
|
||||
// Escribe la cabecera del fichero
|
||||
$this->escribeLinea(array($consulta->Pagina->Cabecera, $consulta->Titulo['id'], $consulta->Titulo['Texto']));
|
||||
foreach ($consulta->Pagina->Cuerpo->Col as $campo) {
|
||||
$campos[] = utf8_decode($campo['Titulo']);
|
||||
$campos[] = $campo['Titulo'];
|
||||
}
|
||||
$this->escribeLinea($campos);
|
||||
// Escribe los datos de los campos
|
||||
@@ -151,8 +151,8 @@ class Csv {
|
||||
*/
|
||||
public function resumen() {
|
||||
//$mensaje .=
|
||||
$mensaje = "<center><h1>Archivo [inventario" . utf8_decode($this->cabecera[0]) . "]</h1>";
|
||||
$mensaje .= "<h2>id=[" . $this->cabecera[1] . "] Descripción=[" . utf8_decode($this->cabecera[2]) . "]</h2><br>";
|
||||
$mensaje = "<center><h1>Archivo [inventario" . $this->cabecera[0] . "]</h1>";
|
||||
$mensaje .= "<h2>id=[" . $this->cabecera[1] . "] Descripción=[" . $this->cabecera[2] . "]</h2><br>";
|
||||
$mensaje .= '<table border=1 class="table table-striped table-bordered table-condensed table-hover"><theader>';
|
||||
foreach ($this->datosFichero[0] as $campo) {
|
||||
$dato = $campo;
|
||||
|
179
EtiquetasPDF.php
Normal file
179
EtiquetasPDF.php
Normal 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;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
3608
Fpdf.php → FPDF.php
3608
Fpdf.php → FPDF.php
File diff suppressed because it is too large
Load Diff
@@ -40,12 +40,19 @@ class InformeInventario {
|
||||
|
||||
private function listarUbicacion() {
|
||||
$salidaInforme = isset($_POST['salida']) ? $_POST['salida'] : 'pantalla';
|
||||
if ($salidaInforme == "pantalla") {
|
||||
$fichero = "xml/inventarioUbicacion.xml";
|
||||
$salida = "tmp/inventarioUbicacion.xml";
|
||||
} else {
|
||||
$fichero = "xml/inventarioUbicacionCSV.xml";
|
||||
$salida = "tmp/inventarioUbicacionCSV.xml";
|
||||
switch ($salidaInforme) {
|
||||
case "pantalla":
|
||||
$fichero = "xml/inventarioUbicacion.xml";
|
||||
$salida = "tmp/inventarioUbicacion.xml";
|
||||
break;
|
||||
case "csv":
|
||||
$fichero = "xml/inventarioUbicacionCSV.xml";
|
||||
$salida = "tmp/inventarioUbicacionCSV.xml";
|
||||
break;
|
||||
case "etiquetas":
|
||||
$fichero = "xml/inventarioUbicacionEtiquetas.xml";
|
||||
$salida = "tmp/inventarioUbicacionEtiquetas.xml";
|
||||
break;
|
||||
}
|
||||
$plantilla = file_get_contents($fichero) or die('Fallo en la apertura de la plantilla ' . $fichero);
|
||||
$id = $_POST['id'] == NULL ? $_GET['id'] : $_POST['id'];
|
||||
@@ -56,32 +63,49 @@ class InformeInventario {
|
||||
}
|
||||
$fila = $this->bdd->procesaResultado();
|
||||
$plantilla = str_replace("{id}", $id, $plantilla);
|
||||
$plantilla = str_replace("{Descripcion}", utf8_encode($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);
|
||||
if ($salidaInforme == "pantalla") {
|
||||
$informe = new InformePDF($this->bdd, $salida, true);
|
||||
$informe->crea($salida);
|
||||
$informe->cierraPDF();
|
||||
$informe->guardaArchivo("tmp/Informe.pdf");
|
||||
echo '<script type="text/javascript"> window.open( "tmp/Informe.pdf" ) </script>';
|
||||
} else {
|
||||
//Genera una hoja de cálculo en formato csv
|
||||
$nombre = "tmp/Ubicacion" . strftime("%Y%m%d") . rand(100, 999) . ".csv";
|
||||
$hoja = new Csv($this->bdd);
|
||||
$hoja->crea($nombre);
|
||||
$hoja->ejecutaConsulta($salida);
|
||||
echo '<script type="text/javascript"> window.open( "' . $nombre . '" ) </script>';
|
||||
switch ($salidaInforme) {
|
||||
case "pantalla":
|
||||
$informe = new InformePDF($this->bdd, $salida, true);
|
||||
$informe->crea($salida);
|
||||
$informe->cierraPDF();
|
||||
$informe->guardaArchivo("tmp/Informe.pdf");
|
||||
echo '<script type="text/javascript"> window.open( "tmp/Informe.pdf" ) </script>';
|
||||
break;
|
||||
case "csv":
|
||||
//Genera una hoja de cálculo en formato csv
|
||||
$nombre = "tmp/Ubicacion" . strftime("%Y%m%d") . rand(100, 999) . ".csv";
|
||||
$hoja = new Csv($this->bdd);
|
||||
$hoja->crea($nombre);
|
||||
$hoja->ejecutaConsulta($salida);
|
||||
echo '<script type="text/javascript"> window.open( "' . $nombre . '" ) </script>';
|
||||
break;
|
||||
case "etiquetas":
|
||||
$etiquetas = new EtiquetasPDF($this->bdd, $salida, true);
|
||||
$etiquetas->crea($salida);
|
||||
$etiquetas->cierraPDF();
|
||||
$etiquetas->guardaArchivo("tmp/EtiquetasUbicacion.pdf");
|
||||
echo '<script type="text/javascript"> window.open( "tmp/EtiquetasUbicacion.pdf" ) </script>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private function listarArticulo() {
|
||||
$salidaInforme = isset($_POST['salida']) ? $_POST['salida'] : 'pantalla';
|
||||
if ($salidaInforme == "pantalla") {
|
||||
$fichero = "xml/inventarioArticulo.xml";
|
||||
$salida = "tmp/inventarioArticulo.xml";
|
||||
} else {
|
||||
$fichero = "xml/inventarioArticuloCSV.xml";
|
||||
$salida = "tmp/inventarioArticuloCSV.xml";
|
||||
switch ($salidaInforme) {
|
||||
case "pantalla":
|
||||
$fichero = "xml/inventarioArticulo.xml";
|
||||
$salida = "tmp/inventarioArticulo.xml";
|
||||
break;
|
||||
case "csv":
|
||||
$fichero = "xml/inventarioArticuloCSV.xml";
|
||||
$salida = "tmp/inventarioArticuloCSV.xml";
|
||||
break;
|
||||
case "etiquetas":
|
||||
$fichero = "xml/inventarioArticuloEtiquetas.xml";
|
||||
$salida = "tmp/inventarioArticuloEtiquetas.xml";
|
||||
break;
|
||||
}
|
||||
$plantilla = file_get_contents($fichero) or die('Fallo en la apertura de la plantilla ' . $fichero);
|
||||
$id = $_POST['id'] == NULL ? $_GET['id'] : $_POST['id'];
|
||||
@@ -92,25 +116,34 @@ class InformeInventario {
|
||||
}
|
||||
$fila = $this->bdd->procesaResultado();
|
||||
$plantilla = str_replace("{id}", $id, $plantilla);
|
||||
$plantilla = str_replace("{Descripcion}", utf8_encode($fila['descripcion']), $plantilla);
|
||||
$plantilla = str_replace("{Marca}", utf8_encode($fila['marca']), $plantilla);
|
||||
$plantilla = str_replace("{Modelo}", utf8_encode($fila['modelo']), $plantilla);
|
||||
$plantilla = str_replace("{Descripcion}", $fila['descripcion'], $plantilla);
|
||||
$plantilla = str_replace("{Marca}", $fila['marca'], $plantilla);
|
||||
$plantilla = str_replace("{Modelo}", $fila['modelo'], $plantilla);
|
||||
file_put_contents($salida, $plantilla) or die('Fallo en la escritura de la plantilla ' . $salida);
|
||||
if ($salidaInforme == "pantalla") {
|
||||
$informe = new InformePDF($this->bdd, $salida, true);
|
||||
$informe->crea($salida);
|
||||
$informe->cierraPDF();
|
||||
$informe->guardaArchivo("tmp/Informe.pdf");
|
||||
echo '<script type="text/javascript"> window.open( "tmp/Informe.pdf" ) </script>';
|
||||
} else {
|
||||
//Genera una hoja de cálculo en formato csv
|
||||
$nombre = "tmp/Articulo" . strftime("%Y%m%d") . rand(100, 999) . ".csv";
|
||||
$hoja = new Csv($this->bdd);
|
||||
$hoja->crea($nombre);
|
||||
$hoja->ejecutaConsulta($salida);
|
||||
echo '<script type="text/javascript"> window.open( "' . $nombre . '" ) </script>';
|
||||
switch ($salidaInforme) {
|
||||
case "pantalla":
|
||||
$informe = new InformePDF($this->bdd, $salida, true);
|
||||
$informe->crea($salida);
|
||||
$informe->cierraPDF();
|
||||
$informe->guardaArchivo("tmp/Informe.pdf");
|
||||
echo '<script type="text/javascript"> window.open( "tmp/Informe.pdf" ) </script>';
|
||||
break;
|
||||
case "csv":
|
||||
//Genera una hoja de cálculo en formato csv
|
||||
$nombre = "tmp/Articulo" . strftime("%Y%m%d") . rand(100, 999) . ".csv";
|
||||
$hoja = new Csv($this->bdd);
|
||||
$hoja->crea($nombre);
|
||||
$hoja->ejecutaConsulta($salida);
|
||||
echo '<script type="text/javascript"> window.open( "' . $nombre . '" ) </script>';
|
||||
break;
|
||||
case "etiquetas":
|
||||
$etiquetas = new EtiquetasPDF($this->bdd, $salida, true);
|
||||
$etiquetas->crea($salida);
|
||||
$etiquetas->cierraPDF();
|
||||
$etiquetas->guardaArchivo("tmp/EtiquetasArticulo.pdf");
|
||||
echo '<script type="text/javascript"> window.open( "tmp/EtiquetasArticulo.pdf" ) </script>';
|
||||
break;
|
||||
}
|
||||
//header('Location: index.php');
|
||||
}
|
||||
|
||||
private function listaUbicaciones() {
|
||||
@@ -149,6 +182,7 @@ class InformeInventario {
|
||||
$salida.="<br><br><label for='salida'>Salida del informe por:</label>";
|
||||
$salida.='<div class="radio"><label><input type="radio" name="salida" value="pantalla" checked>Pantalla</label></div>';
|
||||
$salida.='<div class="radio"><label><input type="radio" name="salida" value="csv">Archivo CSV</label></div>';
|
||||
$salida.='<div class="radio"><label><input type="radio" name="salida" value="etiquetas">Etiquetas</label></div>';
|
||||
$salida.="<br><br></fieldset><p>";
|
||||
$salida.='<p align="center"><button type=submit class="btn btn-primary">Aceptar</button></p><br></div>' . "\n";
|
||||
return $salida;
|
||||
@@ -180,7 +214,7 @@ class InformeInventario {
|
||||
//$fila=$this->bdd->procesaResultado();
|
||||
$plantilla = file_get_contents($fichero) or die('Fallo en la apertura de la plantilla ' . $fichero);
|
||||
$plantilla = str_replace("{id}", $fila['id'], $plantilla);
|
||||
$plantilla = str_replace("{Descripcion}", utf8_encode($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);
|
||||
if ($primero) {
|
||||
$primero = false;
|
||||
@@ -192,7 +226,6 @@ class InformeInventario {
|
||||
$informe->cierraPDF();
|
||||
$informe->imprimeInforme();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
@@ -1,147 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Inventario
|
||||
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.txt
|
||||
* This file is part of Inventario.
|
||||
* Inventario is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Inventario is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Inventario. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
class InformeInventario {
|
||||
private $bdd;
|
||||
public function __construct($baseDatos)
|
||||
{
|
||||
$this->bdd=$baseDatos;
|
||||
}
|
||||
public function ejecuta()
|
||||
{
|
||||
$opc=$_GET['opc'];
|
||||
switch ($opc) {
|
||||
case 'Ubicacion':return $this->formularioUbicacion();
|
||||
case 'listarUbicacion':return $this->listarUbicacion();
|
||||
case 'listarArticulo':return $this->listarArticulo();
|
||||
case 'Articulo':return $this->formularioArticulo();
|
||||
case 'Total':return $this->inventarioTotal();
|
||||
}
|
||||
}
|
||||
private function listarUbicacion()
|
||||
{
|
||||
$fichero="xml/inventarioUbicacion.xml";
|
||||
$salida="tmp/inventarioUbicacion.xml";
|
||||
$plantilla=file_get_contents($fichero)
|
||||
or die('Fallo en la apertura de la plantilla '.$fichero);
|
||||
$comando="select * from Ubicaciones where id='".$_POST['id']."';";
|
||||
$resultado=$this->bdd->ejecuta($comando);
|
||||
if (!$resultado) {
|
||||
return $this->bdd->mensajeError($comando);
|
||||
}
|
||||
$fila=$this->bdd->procesaResultado();
|
||||
$plantilla=str_replace("{id}",$_POST['id'],$plantilla);
|
||||
$plantilla=str_replace("{Descripcion}",utf8_encode($fila['Descripcion']),$plantilla);
|
||||
file_put_contents($salida,$plantilla)
|
||||
or die('Fallo en la escritura de la plantilla '.$salida);
|
||||
$informe=new InformePDF($this->bdd,$salida,true);
|
||||
}
|
||||
private function listarArticulo()
|
||||
{
|
||||
$fichero="xml/inventarioArticulo.xml";
|
||||
$salida="tmp/inventarioArticulo.xml";
|
||||
$plantilla=file_get_contents($fichero)
|
||||
or die('Fallo en la apertura de la plantilla '.$fichero);
|
||||
$comando="select * from Articulos where id='".$_POST['id']."';";
|
||||
$resultado=$this->bdd->ejecuta($comando);
|
||||
if (!$resultado) {
|
||||
return $this->bdd->mensajeError($comando);
|
||||
}
|
||||
$fila=$this->bdd->procesaResultado();
|
||||
$plantilla=str_replace("{id}",$_POST['id'],$plantilla);
|
||||
$plantilla=str_replace("{Descripcion}",utf8_encode($fila['descripcion']),$plantilla);
|
||||
$plantilla=str_replace("{Marca}",utf8_encode($fila['marca']),$plantilla);
|
||||
$plantilla=str_replace("{Modelo}",utf8_encode($fila['modelo']),$plantilla);
|
||||
file_put_contents($salida,$plantilla)
|
||||
or die('Fallo en la escritura de la plantilla '.$salida);
|
||||
$informe=new InformePDF($this->bdd,$salida,true);
|
||||
}
|
||||
private function listaUbicaciones()
|
||||
{
|
||||
$salida="<select name=\"id\">\n";
|
||||
$comando="select * from Ubicaciones order by Descripcion";
|
||||
$resultado=$this->bdd->ejecuta($comando);
|
||||
if (!$resultado) {
|
||||
return $this->bdd->mensajeError($comando);
|
||||
}
|
||||
while($fila=$this->bdd->procesaResultado()) {
|
||||
$salida.="<option value=".$fila['id'].">".$fila['Descripcion']."</option><br>\n";
|
||||
}
|
||||
$salida.="</select>\n";
|
||||
return $salida;
|
||||
}
|
||||
private function listaArticulos()
|
||||
{
|
||||
$salida="<select name=\"id\">\n";
|
||||
$comando="select * from Articulos order by descripcion, marca, modelo";
|
||||
$resultado=$this->bdd->ejecuta($comando);
|
||||
if (!$resultado) {
|
||||
return $this->bdd->mensajeError($comando);
|
||||
}
|
||||
while($fila=$this->bdd->procesaResultado()) {
|
||||
$salida.="<option value=".$fila['id'].">".$fila['descripcion']."-".$fila['marca']."-".$fila['modelo']."</option><br>\n";
|
||||
}
|
||||
$salida.="</select>\n";
|
||||
return $salida;
|
||||
}
|
||||
private function formulario($accion,$etiqueta,$lista)
|
||||
{
|
||||
$salida='<form name="mantenimiento.form" method="post" action="'.$accion.'">'."\n";
|
||||
$salida.="<fieldset style=\"width: 96%;\"><p><legend style=\"color: red;\"><b>Elige $etiqueta</b></legend>\n";
|
||||
$salida.="<br><br><label>$etiqueta</label>";
|
||||
$salida.=$lista;
|
||||
$salida.="<br><br></fieldset><p>";
|
||||
$salida.='<p align="center"><button type=submit>Aceptar</button></p><br>'."\n";
|
||||
return $salida;
|
||||
}
|
||||
private function formularioUbicacion()
|
||||
{
|
||||
//Genera un formulario con las ubicaciones disponibles.
|
||||
$accion="index.php?informeInventario&opc=listarUbicacion";
|
||||
return $this->formulario($accion,'Ubicación',$this->listaUbicaciones());
|
||||
}
|
||||
private function formularioArticulo()
|
||||
{
|
||||
$accion="index.php?informeInventario&opc=listarArticulo";
|
||||
return $this->formulario($accion,'Artículo',$this->listaArticulos());
|
||||
}
|
||||
private function inventarioTotal()
|
||||
{
|
||||
$fichero="xml/inventarioUbicacion.xml";
|
||||
$salida="tmp/inventarioUbicacion.xml";
|
||||
$comando="select * from Ubicaciones where id='".$_POST['id']."';";
|
||||
$resultado=$this->bdd->ejecuta($comando);
|
||||
if (!$resultado) {
|
||||
return $this->bdd->mensajeError($comando);
|
||||
}
|
||||
$salidaTotal='';
|
||||
while ($fila=$this->bdd->procesaResultado()) {
|
||||
$plantilla=file_get_contents($fichero)
|
||||
or die('Fallo en la apertura de la plantilla '.$fichero);
|
||||
$plantilla=str_replace("{id}",$_POST['id'],$plantilla);
|
||||
$plantilla=str_replace("{Descripcion}",utf8_encode($fila['Descripcion']),$plantilla);
|
||||
file_put_contents($salida,$plantilla)
|
||||
or die('Fallo en la escritura de la plantilla '.$salida);
|
||||
$salidaTotal+=$salida;
|
||||
}
|
||||
$informe=new InformePDF($this->bdd,$salidaTotal,true);
|
||||
}
|
||||
}
|
||||
?>
|
@@ -51,12 +51,13 @@ class InformePDF {
|
||||
// Recuperamos la definición del informe
|
||||
$this->def = simplexml_load_file($definicion);
|
||||
$this->bdd = $bdd;
|
||||
$this->pdf = new Pdf_mysql_table($this->bdd->obtieneManejador(), (string) $this->def->Pagina['Orientacion'], (string) $this->def->Pagina['Formato'], (string) $this->def->Titulo['Texto'], (string) $this->def->Pagina->Cabecera);
|
||||
$this->pdf = new Pdf_mysql_table($this->bdd->obtieneManejador(), (string) $this->def->Pagina['Orientacion'], (string) $this->def->Pagina['Formato'], (string) utf8_decode($this->def->Titulo['Texto']), (string) $this->def->Pagina->Cabecera);
|
||||
//echo $def->Titulo.$def->Cabecera;
|
||||
$this->pdf->Open();
|
||||
$this->pdf->setAuthor(utf8_decode(AUTOR));
|
||||
$this->pdf->setCreator(html_entity_decode(APLICACION));
|
||||
$this->pdf->setSubject(utf8_decode($this->def->Titulo));
|
||||
$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);
|
||||
}
|
||||
|
||||
|
@@ -1,85 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* genera un documento PDF a partir de una descripción dada en un archivo XML
|
||||
* @author Ricardo Montañana <rmontanana@gmail.com>
|
||||
* @version 1.0
|
||||
* @package Inventario
|
||||
* @copyright Copyright (c) 2008, Ricardo Montañana
|
||||
* @package Inventario
|
||||
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.txt
|
||||
* This file is part of Inventario.
|
||||
* Inventario is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Inventario is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Inventario. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
class InformePDF
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @var basedatos Controlador de la base de datos
|
||||
*/
|
||||
private $bdd;
|
||||
/**
|
||||
* El constructor recibe como argumento el nombre del archivo XML con la definición, encargándose de recuperarla y guardar toda la información localmente
|
||||
* @param basedatos $bdd manejador de la base de datos
|
||||
* @param string $definicion fichero con la definición del informe en XML
|
||||
* @param boolean $registrado usuario registrado si/no
|
||||
* @return ficheroPDF
|
||||
*/
|
||||
public function __construct($bdd,$definicion,$registrado)
|
||||
{
|
||||
if (!$registrado) {
|
||||
return 'Debe registrarse para acceder a este apartado';
|
||||
}
|
||||
$this->bdd=$bdd;
|
||||
// Recuperamos la definición del informe
|
||||
$def=simplexml_load_file($definicion);
|
||||
//print_r($def);echo $bdd;die();
|
||||
// Iniciamos la creación del documento
|
||||
$pdf=new Pdf_mysql_table($this->bdd->obtieneManejador(),(string)$def->Pagina['Orientacion'],
|
||||
(string)$def->Pagina['Formato'],
|
||||
(string)$def->Titulo['Texto'],(string)$def->Pagina->Cabecera);
|
||||
echo $def->Titulo.$def->Cabecera;
|
||||
$pdf->Open();
|
||||
$pdf->setAuthor(utf8_decode(AUTOR));
|
||||
$pdf->setCreator(html_entity_decode(APLICACION));
|
||||
$pdf->setSubject(utf8_decode($def->Titulo));
|
||||
$pdf->setAutoPageBreak(true,10);
|
||||
$this->bdd->ejecuta(trim($def->Datos->Consulta));
|
||||
$filas=$this->bdd->procesaResultado();
|
||||
$pdf->AddPage();
|
||||
// Recuperamos los datos del cuerpo
|
||||
foreach($def->Pagina->Cuerpo->Col as $columna) {
|
||||
$pdf->AddCol((string)$columna['Nombre'],(string)$columna['Ancho'],
|
||||
(string)$columna['Titulo'],(string)$columna['Ajuste'],
|
||||
(string)$columna['Total']);
|
||||
}
|
||||
$prop=array('HeaderColor'=>array(255,150,100),
|
||||
'color1'=>array(210,245,255),
|
||||
'color2'=>array(255,255,210),
|
||||
'padding'=>2);
|
||||
$pdf->Table($def->Datos->Consulta,$prop);
|
||||
$pdf->Close();
|
||||
// Obtenemos el documento y su longitud
|
||||
$documento=$pdf->Output('','S');
|
||||
$longitud=strlen($documento);
|
||||
// y lo enviamos como resultado
|
||||
header("Content-type: application/pdf");
|
||||
header("Content-length: $longitud");
|
||||
header("Content-Disposition: inline; filename=Informe.pdf");
|
||||
echo $documento;
|
||||
}
|
||||
}
|
||||
?>
|
@@ -29,7 +29,6 @@ class Mantenimiento {
|
||||
private $descripcion;
|
||||
protected $bdd;
|
||||
protected $url;
|
||||
protected $cabecera;
|
||||
protected $tabla;
|
||||
protected $cadenaBusqueda;
|
||||
protected $campos = array();
|
||||
@@ -37,39 +36,85 @@ class Mantenimiento {
|
||||
protected $campoBusca = "Descripcion";
|
||||
protected $comandoConsulta = "";
|
||||
protected $perfil;
|
||||
protected $datosURL = array();
|
||||
protected $datosURLb = array(); //para hacer una copia
|
||||
|
||||
public function __construct($baseDatos, $perfil, $nombre) {
|
||||
public function __construct($baseDatos, $perfil, $nombre)
|
||||
{
|
||||
$this->bdd = $baseDatos;
|
||||
$this->url = "index.php?$nombre&opc=inicial";
|
||||
$this->cabecera = 'Location: ' . $this->url;
|
||||
$this->url = "index.php?$nombre";
|
||||
//$this->datosURL['']
|
||||
$this->tabla = ucfirst($nombre);
|
||||
$this->perfil = $perfil;
|
||||
$this->cargaDatosURL();
|
||||
}
|
||||
|
||||
public function ejecuta() {
|
||||
$opc = $_GET['opc'];
|
||||
$id = $_GET['id'];
|
||||
$orden = isset($_GET['orden']) ? $_GET['orden'] : '';
|
||||
$sentido = isset($_GET['sentido']) ? $_GET['sentido'] : 'asc';
|
||||
//Sólo tiene sentido para las modificaciones.
|
||||
//Es la página donde estaba el registro
|
||||
$pag = isset($_GET['pag']) ? $_GET['pag'] : '0';
|
||||
$this->cadenaBusqueda = $_GET['buscar'];
|
||||
/**
|
||||
* Carga en los atributos de la clase los datos de la URL
|
||||
* Los datos constantes en la URL son:
|
||||
* - opc = {inicial, editar, eliminar, nuevo, insertar, modificar, borrar}
|
||||
* - orden = {id, ... } nombre del campo por el que se ordena la visualización
|
||||
* - sentido = {asc, desc}
|
||||
* - pag = nº página 0, 1, 2, ...
|
||||
* Los datos opcionales de la URL son:
|
||||
* - buscar = cadena de búsqueda
|
||||
* - id = nº de la clave necesario para la edición o el borrado
|
||||
*/
|
||||
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->cadenaBusqueda = isset($_GET['buscar']) ? $_GET['buscar'] : null;
|
||||
$this->cadenaBusqueda = isset($_POST['buscar']) ? $_POST['buscar'] : $this->cadenaBusqueda;
|
||||
$this->datosURL['buscar'] = $this->cadenaBusqueda;
|
||||
$this->datosURL['id'] = isset($_GET['id']) ? $_GET['id'] : null;
|
||||
}
|
||||
|
||||
public function backupURL()
|
||||
{
|
||||
$this->datosURLb = $this->datosURL;
|
||||
}
|
||||
|
||||
public function restoreURL()
|
||||
{
|
||||
$this->datosURL = $this->datosURLb;
|
||||
}
|
||||
|
||||
//Monta una URL con los datos cargados en los atributos de la clase
|
||||
private function montaURL()
|
||||
{
|
||||
//Primero los datos obligatorios
|
||||
$opc = "&opc=" . $this->datosURL['opc'];
|
||||
$orden = "&orden=" . $this->datosURL['orden'];
|
||||
$sentido = "&sentido=" . $this->datosURL['sentido'];
|
||||
$pag = "&pag=" . $this->datosURL['pag'];
|
||||
//Ahora los datos opcionales
|
||||
$buscar = isset($this->cadenaBusqueda) ? "&buscar=$this->cadenaBusqueda" : null;
|
||||
$id = isset($this->datosURL['id']) ? "&id=" . $this->datosURL['id'] : null;
|
||||
$enlace = $this->url . $opc . $orden . $sentido . $pag . $buscar . $id;
|
||||
return $enlace;
|
||||
}
|
||||
|
||||
public function ejecuta()
|
||||
{
|
||||
$this->obtenerCampos();
|
||||
$this->obtieneClavesForaneas();
|
||||
switch ($opc) {
|
||||
case 'inicial':return $this->consulta($id, $orden, $sentido);
|
||||
case 'editar':return $this->muestra($id, EDICION, $pag, $orden, $sentido);
|
||||
case 'eliminar':return $this->muestra($id, BORRADO);
|
||||
case 'nuevo':return $this->muestra(null, ANADIR);
|
||||
switch ($this->datosURL['opc']) {
|
||||
case 'inicial':return $this->consulta();
|
||||
case 'editar':return $this->muestra(EDICION);
|
||||
case 'eliminar':return $this->muestra(BORRADO);
|
||||
case 'nuevo':return $this->muestra(ANADIR);
|
||||
case 'insertar':return $this->insertar();
|
||||
case 'modificar':return $this->modificar($id, $pag, $orden, $sentido);
|
||||
case 'borrar':return $this->borrar($id);
|
||||
default:return 'La clase Mantenimiento No entiende lo solicitado.';
|
||||
case 'modificar':return $this->modificar();
|
||||
case 'borrar':return $this->borrar();
|
||||
default: return "La clase Mantenimiento No entiende lo solicitado [" . $this->datosURL['opc'] . "]";
|
||||
}
|
||||
}
|
||||
|
||||
protected function obtieneClavesForaneas() {
|
||||
protected function obtieneClavesForaneas()
|
||||
{
|
||||
$salida = null;
|
||||
foreach ($this->campos as $clave => $valor) {
|
||||
$trozos = explode(",", $valor["Comment"]);
|
||||
@@ -87,20 +132,21 @@ class Mantenimiento {
|
||||
$this->foraneas = $salida;
|
||||
}
|
||||
|
||||
private function consulta($pagina, $orden, $sentido) {
|
||||
private function consulta()
|
||||
{
|
||||
$orden = $this->datosURL['orden'];
|
||||
$sentido = $this->datosURL['sentido'];
|
||||
//Calcula los números de página anterior y siguiente.
|
||||
$pagina = $pagina + 0;
|
||||
$pagina = $this->datosURL['pag'];
|
||||
$pagSigte = $pagina <= 0 ? 1 : $pagina + 1;
|
||||
$pagAnt = $pagSigte - 2;
|
||||
$pagAnt = $pagSigte - 2 < 0 ? 0 : $pagSigte -2;
|
||||
$pagFwd = $pagSigte + 3;
|
||||
$pagRew = $pagAnt - 3 < 0 ? $pagAnt : $pagAnt - 3;
|
||||
$pagRew = $pagAnt - 3 < 0 ? 0 : $pagAnt - 3;
|
||||
//Tengo que procesar la cabecera antes de lo de la cadena de búsqueda por el tema de las búsquedas
|
||||
$cabecera = $this->cabeceraTabla();
|
||||
//Trata con la cadena de búsqueda
|
||||
$this->cadenaBusqueda = isset($_POST['buscar']) ? $_POST['buscar'] : $this->cadenaBusqueda;
|
||||
//Trata con la cadena de búsqueda si viene del post debe quedarse con ella sino con la del get y si no está definida => vacía
|
||||
if (isset($this->cadenaBusqueda) && strlen($this->cadenaBusqueda)) {
|
||||
$sufijo = " where $this->campoBusca like '%" . $this->bdd->filtra($this->cadenaBusqueda) . "%'";
|
||||
$sufijoEnlace = "&buscar=" . $this->cadenaBusqueda;
|
||||
$comando = str_replace('{buscar}', $sufijo, $this->comandoConsulta);
|
||||
} else {
|
||||
$comando = str_replace('{buscar}', '', $this->comandoConsulta);
|
||||
@@ -114,33 +160,33 @@ class Mantenimiento {
|
||||
}
|
||||
//Introduce un botón para hacer búsquedas y el número de la página
|
||||
$salida = $this->enlaceBusqueda($pagSigte);
|
||||
//Esta orden de centrado se cierra en el pie de la tabla
|
||||
//$salida.='<center><h4>Página ' . $pagSigte . '</h4>';
|
||||
// $salida .='<div class="nav-bar navbar-fixed"><ul class="nav nav-pills nav-stacked">
|
||||
// <li class="active">
|
||||
// <a href="#">
|
||||
// <span class="badge pull-right">' . $pagSigte . '</span>
|
||||
// Página
|
||||
// </a>
|
||||
// </li>
|
||||
// </ul></div>';
|
||||
$salida.= $cabecera;
|
||||
//Consulta paginada de todas las tuplas
|
||||
$comando = str_replace('{inferior}', ($pagAnt + 1) * NUMFILAS, $comando);
|
||||
$comando = str_replace('{inferior}', $pagina * NUMFILAS, $comando);
|
||||
$comando = str_replace('{superior}', NUMFILAS, $comando);
|
||||
//$salida.=$comando;
|
||||
$tabla = strtolower($this->tabla);
|
||||
$this->bdd->ejecuta($comando);
|
||||
$numRegistros = $this->bdd->numeroTotalTuplas();
|
||||
//Si el número de la página fwd es mayor que el total de páginas lo establece a éste
|
||||
if (NUMFILAS > 0) {
|
||||
$totalPags = (int) ($numRegistros / NUMFILAS) - 1;
|
||||
if ($numRegistros % NUMFILAS) {
|
||||
$totalPags++;
|
||||
}
|
||||
} else {
|
||||
$totalPags = 0;
|
||||
}
|
||||
$pagFwd = $pagFwd > $totalPags ? $totalPags : $pagFwd;
|
||||
if ($this->bdd->numeroTuplas() == 0) {
|
||||
if ($pagSigte > 1) {
|
||||
// Si no hay datos en la consulta y no es la primera página,
|
||||
// carga la página inicial
|
||||
header('Location: ' . $this->url);
|
||||
// carga la página final
|
||||
$this->datosURL['pag'] = $totalPags;
|
||||
header('Location: ' . $this->montaURL());
|
||||
} else {
|
||||
$salida = "<p align=\"center\"><center><h2>No hay registros</h2></center></p><br>";
|
||||
}
|
||||
}
|
||||
//$salida.=print_r($this->perfil);
|
||||
//$salida.=$comando;
|
||||
while ($fila = $this->bdd->procesaResultado()) {
|
||||
$salida.='<tr align="center" bottom="middle">';
|
||||
@@ -160,41 +206,64 @@ class Mantenimiento {
|
||||
$this->campoBusca = $dato[1];
|
||||
$valor = '<a title="Inventario de ' . $valor . '" $target="_blank" href="index.php?informeInventario&opc=listar' . $datoEnlace . '&id=' . $id . '">' . $valor;
|
||||
}
|
||||
if ($this->campos[$clave]['Type'] == "Boolean(1)") {
|
||||
$checked = $valor == '1' ? 'checked' : '';
|
||||
$valor = '<input type="checkbox" disabled ' . $checked . '>';
|
||||
}
|
||||
$salida.="<td>$valor</td>\n";
|
||||
}
|
||||
//Añade el icono de editar
|
||||
if ($this->perfil['Modificacion']) {
|
||||
$salida.='<td><a href="index.php?' . $tabla . '&opc=editar&id=' . $id . "&pag=" . $pagina . $sufijoOrden .
|
||||
//$salida.='<td><a href="index.php?' . $tabla . '&opc=editar&id=' . $id . "&pag=" . $pagina . $sufijoOrden . $sufijoEnlace .
|
||||
$this->backupURL(); $this->datosURL['opc'] = "editar"; $this->datosURL['id'] = $id;
|
||||
$salida.='<td><a href="' . $this->montaURL() .
|
||||
'"><img title="Editar" src="img/' . ESTILO . '/editar.png" alt="editar"></a>';
|
||||
$this->restoreURL();
|
||||
}
|
||||
//Añade el icono de eliminar
|
||||
if ($this->perfil['Borrado']) {
|
||||
$salida.=' <a href="index.php?' . $tabla . '&opc=eliminar&id=' . $id .
|
||||
//$salida.=' <a href="index.php?' . $tabla . '&opc=eliminar&id=' . $id . $sufijoEnlace .
|
||||
$this->backupURL(); $this->datosURL['opc'] = "eliminar"; $this->datosURL['id'] = $id;
|
||||
$salida.=' <a href="' . $this->montaURL() .
|
||||
'"><img title="Eliminar" src="img/' . ESTILO . '/eliminar.png" alt="eliminar"></a></td></tr>' . "\n";
|
||||
$this->restoreURL();
|
||||
}
|
||||
}
|
||||
$salida.="</tbody></table></center></p>";
|
||||
//Añade botones de comandos
|
||||
$enlace = '<a href="' . $this->url . $sufijoOrden . '&id=';
|
||||
if ($this->bdd->numeroTuplas()) {
|
||||
$anterior = $enlace . $pagAnt . $sufijoEnlace . "\"><img title=\"Pag. Anterior\" alt=\"anterior\" src=\"img/" . ESTILO . "/anterior.png\"></a>\n";
|
||||
$siguiente = $enlace . $pagSigte . $sufijoEnlace . "\"><img title=\"Pag. Siguiente\" alt=\"siguiente\" src=\"img/" . ESTILO . "/siguiente.png\"></a>\n";
|
||||
$fwd = $enlace . $pagFwd . $sufijoEnlace . "\"><img title=\"+5 Pags.\" alt=\"mas5p\" src=\"img/" . ESTILO . "/fwd.png\"></a>\n";
|
||||
$rew = $enlace . $pagRew . $sufijoEnlace . "\"><img title=\"-5 Pags.\" alt=\"menos5p\" src=\"img/" . ESTILO . "/rew.png\"></a>\n";
|
||||
if (strlen($orden) > 0) {
|
||||
$az = '<a href="' . $this->url . '&orden=' . $orden . '&sentido=asc"><img alt="asc" title="Orden ascendente" src="img/' . ESTILO . '/ascendente.png"></a>';
|
||||
$za = '<a href="' . $this->url . '&orden=' . $orden . '&sentido=desc"><img alt="desc" title="Orden descendente" src="img/' . ESTILO . '/descendente.png"></a>';
|
||||
} else {
|
||||
$az = $za = '';
|
||||
}
|
||||
|
||||
if ($numRegistros) {
|
||||
$this->backupURL();
|
||||
$this->datosURL['pag'] = $pagAnt;
|
||||
$anterior = $this->montaURL();
|
||||
$this->datosURL['pag'] = $pagSigte;
|
||||
$siguiente = $this->montaURL();
|
||||
$this->datosURL['pag'] = $pagFwd;
|
||||
$fwd = $this->montaURL();
|
||||
$this->datosURL['pag'] = $pagRew;
|
||||
$rew = $this->montaURL();
|
||||
$anterior = '<a href="' . $anterior . "\"><img title=\"Pag. Anterior\" alt=\"anterior\" src=\"img/" . ESTILO . "/anterior.png\"></a>\n";
|
||||
$siguiente = '<a href="' . $siguiente . "\"><img title=\"Pag. Siguiente\" alt=\"siguiente\" src=\"img/" . ESTILO . "/siguiente.png\"></a>\n";
|
||||
$fwd = '<a href="' . $fwd . "\"><img title=\"+4 Pags.\" alt=\"mas4pags\" src=\"img/" . ESTILO . "/fwd.png\"></a>\n";
|
||||
$rew = '<a href="' . $rew . "\"><img title=\"-4 Pags.\" alt=\"menos4pags\" src=\"img/" . ESTILO . "/rew.png\"></a>\n";
|
||||
$this->restoreURL();
|
||||
$this->datosURL['sentido'] = "asc";
|
||||
$az = $this->montaURL();
|
||||
$az = '<a href="' . $az . '"><img alt="asc" title="Orden ascendente" src="img/' . ESTILO . '/ascendente.png"></a>';
|
||||
$this->datosURL['sentido'] = "desc";
|
||||
$za = $this->montaURL();
|
||||
$za = '<a href="' . $za . '"><img alt="desc" title="Orden descendente" src="img/' . ESTILO . '/descendente.png"></a>';
|
||||
$this->restoreURL();
|
||||
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>';
|
||||
} else {
|
||||
$informe = "";
|
||||
}
|
||||
$this->restoreURL();
|
||||
}
|
||||
if ($this->perfil['Alta']) {
|
||||
$anadir = '<a href="index.php?' . $tabla . '&opc=nuevo">' .
|
||||
$this->datosURL['opc'] = 'nuevo';
|
||||
$anadir = '<a href="' . $this->montaURL() . '">' .
|
||||
'<img title="Añadir registro" alt="nuevo" src="img/' . ESTILO . '/nuevo.png"></a>';
|
||||
} else {
|
||||
$anadir = "";
|
||||
@@ -204,39 +273,35 @@ class Mantenimiento {
|
||||
return $salida;
|
||||
}
|
||||
|
||||
private function enlaceBusqueda($pagina) {
|
||||
//$salida = '<p align="center">';
|
||||
//$salida .='<center><form name="busqueda" method="POST"><input type="text" class="form-control" name="buscar"';
|
||||
//$salida .='value="' . $this->cadenaBusqueda . '" size="40" /><input type="submit" class="btn btn-primary" value="Buscar" name=';
|
||||
//$salida .='"Buscar" />';
|
||||
//$salida .= '</form></center>';
|
||||
//$salida.='</p>';
|
||||
$salida = '<form name="busqueda" method="POST"><div class="col-lg-6"><div class="input-group">
|
||||
<input type="text" name="buscar" placeholder="Descripción" class="form-control">
|
||||
private function enlaceBusqueda($pagina)
|
||||
{
|
||||
$valor = isset($this->cadenaBusqueda) ? 'value="' . $this->cadenaBusqueda . '"' : '';
|
||||
$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ón" class="form-control" ' . $valor . '>
|
||||
<span class="input-group-btn"><button class="btn btn-primary" type="button">Buscar</button>
|
||||
</span></div></div></form>';
|
||||
//$salida .= '<div class="col-lg-1 pull-right"><ul class="nav nav-pills nav-stacked "><li class="active">
|
||||
// <a href="#"><span class="badge pull-right">'.$pagina.'</span>Página</a></li></ul></div>';
|
||||
$salida .= '<button class="btn btn-info pull-right" type="button">Página <span class="badge">'
|
||||
. $pagina . '</span></button>';
|
||||
// $salida .= '<div class="progress progress-striped">
|
||||
// <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
|
||||
// Página 5 de 6<span class="sr-only">20% Complete</span>
|
||||
// </div>
|
||||
//</div>';
|
||||
return $salida;
|
||||
}
|
||||
|
||||
protected function borrar($id) {
|
||||
protected function borrar()
|
||||
{
|
||||
//@todo hay que tener en cuenta aquí la cadena de búsqueda y la página en la url
|
||||
$id = $this->datosURL['id'];
|
||||
$comando = "delete from " . $this->tabla . " where id=\"$id\"";
|
||||
if (!$this->bdd->ejecuta($comando)) {
|
||||
return $this->errorBD($comando);
|
||||
}
|
||||
header('Location: ' . $this->url);
|
||||
$this->datosURL['opc'] = 'inicial';
|
||||
$this->datosURL['id'] = null;
|
||||
$url = $this->montaURL();
|
||||
header('Location: ' . $url);
|
||||
return;
|
||||
}
|
||||
|
||||
protected function insertar() {
|
||||
protected function insertar()
|
||||
{
|
||||
$comando = "insert into " . $this->tabla . " (";
|
||||
$lista = explode("&", $_POST['listacampos']);
|
||||
$primero = true;
|
||||
@@ -265,23 +330,36 @@ class Mantenimiento {
|
||||
} else {
|
||||
$coma = ",";
|
||||
}
|
||||
$valor = $_POST[$campo] == "" ? "null" : '"' . $_POST[$campo] . '"';
|
||||
if ($this->campos[$campo]['Type'] == 'Boolean(1)') {
|
||||
$valor = "";
|
||||
if (empty($_POST[$campo])) {
|
||||
$valor = "0";
|
||||
}
|
||||
$valor = $_POST[$campo] == "on" ? '1' : $valor;
|
||||
} else {
|
||||
$valor = $_POST[$campo] == "" ? "null" : '"' . $_POST[$campo] . '"';
|
||||
}
|
||||
$comando.="$coma " . $valor;
|
||||
}
|
||||
$comando.=")";
|
||||
if (!$this->bdd->ejecuta($comando)) {
|
||||
return $this->errorBD($comando);
|
||||
}
|
||||
list($enlace, $resto) = explode("&", $this->url);
|
||||
$enlace.="&opc=inicial";
|
||||
return "<h1><a href=\"$enlace\">Se ha insertado el registro con la clave " . $this->bdd->ultimoId() . "</a></h1>";
|
||||
$this->datosURL['opc'] = 'inicial';
|
||||
$this->datosURL['id'] = null;
|
||||
$cabecera = "refresh:".PAUSA.";url=".$this->montaURL();
|
||||
header($cabecera);
|
||||
return $this->panelMensaje("Se ha insertado el registro con la clave " . $this->bdd->ultimoId(), "info", "Información");
|
||||
//return "<h1><a href=\"".$this->montaURL()."\">Se ha insertado el registro con la clave " . $this->bdd->ultimoId() . "</a></h1>";
|
||||
}
|
||||
|
||||
protected function modificar($id, $pag, $orden, $sentido) {
|
||||
protected function modificar()
|
||||
{
|
||||
//Los datos a utilizar para actualizar la tupla vienen en $_POST.
|
||||
//La lista de atributos de la tupla viene en el campo oculto listacampos
|
||||
//print_r($_GET);
|
||||
//echo "id=$id pag=$pag orden=$orden sentido=$sentido";die();
|
||||
//@todo hay que tener en cuenta aquí la página en la que se encuentra y la cadena de búsqueda
|
||||
$comando = "update " . $this->tabla . " set ";
|
||||
$lista = explode("&", $_POST['listacampos']);
|
||||
$primero = true;
|
||||
@@ -291,27 +369,38 @@ class Mantenimiento {
|
||||
if ($primero) {
|
||||
$primero = false;
|
||||
$coma = " ";
|
||||
}
|
||||
else
|
||||
} else {
|
||||
$coma = ",";
|
||||
if (strlen(trim($_POST[$campo])) == 0)
|
||||
$comando.="$coma $campo=null";
|
||||
else
|
||||
$comando.=$coma . ' ' . $campo . '="' . $_POST[$campo] . '"';
|
||||
}
|
||||
if ($this->campos[$campo]['Type'] == 'Boolean(1)') {
|
||||
$valor = "";
|
||||
if (empty($_POST[$campo])) {
|
||||
$valor = "0";
|
||||
}
|
||||
$valor = $_POST[$campo] == "on" ? '1' : $valor;
|
||||
$comando.=$coma . ' ' . $campo . '="' . $valor . '"';
|
||||
} else {
|
||||
if (strlen(trim($_POST[$campo])) == 0) {
|
||||
$comando.="$coma $campo=null";
|
||||
} else {
|
||||
$comando.=$coma . ' ' . $campo . '="' . $_POST[$campo] . '"';
|
||||
}
|
||||
}
|
||||
}
|
||||
$comando.=" where id=\"$id\"";
|
||||
$comando.=" where id=\"" . $this->datosURL['id'] . "\"";
|
||||
if (!$this->bdd->ejecuta($comando)) {
|
||||
return $this->errorBD($comando);
|
||||
}
|
||||
|
||||
list($enlace, $resto) = explode("&", $this->url);
|
||||
$enlace.="&opc=inicial&orden=" . $orden . "&sentido=" . $sentido . "&id=" . $pag;
|
||||
header('Location: ' . $enlace);
|
||||
$this->datosURL['id'] = null;
|
||||
$this->datosURL['opc'] = inicial;
|
||||
header('Location: ' . $this->montaURL());
|
||||
return;
|
||||
}
|
||||
|
||||
protected function muestra($id, $tipoAccion, $pag = "", $orden = "", $sentido = "") {
|
||||
if (isset($id)) {
|
||||
protected function muestra($tipoAccion)
|
||||
{
|
||||
$id = $this->datosURL['id'];
|
||||
if ($tipoAccion != ANADIR) {
|
||||
$comando = "select * from " . $this->tabla . " where id='$id'";
|
||||
$resultado = $this->bdd->ejecuta($comando);
|
||||
if (!$resultado) {
|
||||
@@ -321,29 +410,14 @@ class Mantenimiento {
|
||||
} else {
|
||||
$fila = null;
|
||||
}
|
||||
//list($tipo,$valor)=explode($columna["Type"]);
|
||||
$accion = "index.php?" . strtolower($this->tabla) . "&id=$id&opc=";
|
||||
switch ($tipoAccion) {
|
||||
case EDICION:
|
||||
$accion.="modificar";
|
||||
$accion.=isset($pag) ? "&pag=$pag" : '';
|
||||
$accion.=isset($orden) ? "&orden=$orden" : '';
|
||||
$accion.=isset($sentido) ? "&sentido=$sentido" : '';
|
||||
break;
|
||||
case BORRADO:
|
||||
$accion.="borrar";
|
||||
break;
|
||||
case ANADIR:
|
||||
$accion.="insertar";
|
||||
break;
|
||||
}
|
||||
//Genera un formulario con los datos de la tupla seleccionada.
|
||||
return $this->formularioCampos($accion, $tipoAccion, $fila);
|
||||
return $this->formularioCampos($tipoAccion, $fila);
|
||||
}
|
||||
|
||||
//Función que genera un campo de lista con los valores de descripción de la
|
||||
//tabla a la cual pertenece la clave foránea.
|
||||
protected function generaLista($datos, $campo, $valorInicial, $modo) {
|
||||
protected function generaLista($datos, $campo, $valorInicial, $modo)
|
||||
{
|
||||
$salida = "<select class=\"form-control\" name=\"$campo\">\n";
|
||||
list($tabla, $atributos) = explode(",", $datos);
|
||||
$atributos = str_replace("/", ",", $atributos);
|
||||
@@ -376,7 +450,8 @@ class Mantenimiento {
|
||||
return $salida;
|
||||
}
|
||||
|
||||
private function obtenerCampos() {
|
||||
private function obtenerCampos()
|
||||
{
|
||||
//Si hay un fichero de descripción xml lo utiliza.
|
||||
$nombre = "xml/mantenimiento" . $this->tabla . ".xml";
|
||||
if (file_exists($nombre)) {
|
||||
@@ -395,11 +470,12 @@ class Mantenimiento {
|
||||
$this->campos[$datos[$i]["Field"]]["Campo"] = $datos[$i]["Field"];
|
||||
$this->campos[$datos[$i]["Field"]]["Editable"] = "si";
|
||||
}
|
||||
$this->comandoConsulta = "select * from " . $this->tabla . " {buscar} {orden} limit {inferior},{superior}";
|
||||
$this->comandoConsulta = "select SQL_CALC_FOUND_ROWS * from " . $this->tabla . " {buscar} {orden} limit {inferior},{superior}";
|
||||
}
|
||||
}
|
||||
|
||||
private function cabeceraTabla() {
|
||||
private function cabeceraTabla()
|
||||
{
|
||||
//$salida = '<p align="center"><table border=1 class="tablaDatos"><tbody>';
|
||||
$salida = '<p align="center"><table border=1 class="table table-striped table-bordered table-condensed table-hover"><tbody>';
|
||||
foreach ($this->campos as $clave => $datos) {
|
||||
@@ -419,7 +495,10 @@ class Mantenimiento {
|
||||
$clave = str_ireplace("ubicacion", "Ubicación", $clave);
|
||||
$clave = str_ireplace("articulo", "Artículo", $clave);
|
||||
if ($ordenable) {
|
||||
$salida.="<th><b><a title=\"Establece orden por $clave \" href=\"$this->url&orden=" . strtolower($clave2) . "\"> " . ucfirst($clave) . " </a></b></th>\n";
|
||||
$this->backupURL();
|
||||
$this->datosURL['orden'] = $clave2;
|
||||
$salida.="<th><b><a title=\"Establece orden por $clave \" href=\"". $this->montaURL() . "\"> " . ucfirst($clave) . " </a></b></th>\n";
|
||||
$this->restoreURL();
|
||||
} else {
|
||||
$salida.='<th><b>' . ucfirst($clave) . '</b></th>' . "\n";
|
||||
}
|
||||
@@ -431,14 +510,26 @@ class Mantenimiento {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $accion URL de la acción del POST
|
||||
* @param string $tipo ANADIR,EDITAR,BORRADO
|
||||
* @param string $tipo ANADIR,EDICION,BORRADO
|
||||
* @param array $datos Vector con los datos del registro
|
||||
* @return array lista de campos y formulario de entrada
|
||||
*/
|
||||
private function formularioCampos($accion, $tipo, $datos) {
|
||||
private function formularioCampos($tipo, $datos)
|
||||
{
|
||||
$modo = $tipo == BORRADO ? "readonly" : "";
|
||||
$nfechas = 0;
|
||||
switch ($tipo) {
|
||||
case ANADIR:
|
||||
$this->datosURL['opc'] = "insertar"; $this->datosURL['id'] = null;
|
||||
break;
|
||||
case EDICION:
|
||||
$this->datosURL['opc'] = "modificar";
|
||||
break;
|
||||
case BORRADO:
|
||||
$this->datosURL['opc'] = "borrar";
|
||||
break;
|
||||
}
|
||||
$accion = $this->montaURL();
|
||||
$salida.='<div class="col-sm-8"><form name="mantenimiento.form" 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";
|
||||
foreach ($this->campos as $clave => $valor) {
|
||||
@@ -446,8 +537,10 @@ class Mantenimiento {
|
||||
//Se salta los campos que no deben aparecer
|
||||
continue;
|
||||
}
|
||||
//Genera una lista con los campos que intervienen en el formulario.
|
||||
$salida .='<div class="form-group">';
|
||||
$campo = $valor['Campo'];
|
||||
$campos.="$campo&";
|
||||
$salida.='<label class="col-sm-2 control-label" for="' . $campo . '">' . ucfirst($clave) . "</label> ";
|
||||
$salida.='<div class="col-sm-5">';
|
||||
//Se asegura que el id no se pueda modificar.
|
||||
@@ -460,8 +553,8 @@ class Mantenimiento {
|
||||
$tipoCampo = $valor['Type'];
|
||||
//Si es un campo fecha u hora y está insertando pone la fecha actual o la hora actual
|
||||
if ($tipo == ANADIR) {
|
||||
if (stripos($tipoCampo, "echa") || stripos($tipoCampo, "ate")) {
|
||||
$valorDato = strftime("%d/%m/%Y");
|
||||
if (stripos($tipoCampo, "echa") <> 0 || stripos($tipoCampo, "ate") <> 0) {
|
||||
$valorDato = strftime("%Y/%m/%d");
|
||||
}
|
||||
}
|
||||
// Calcula el tamaño y el tipo
|
||||
@@ -470,16 +563,13 @@ class Mantenimiento {
|
||||
$tamano = "19";
|
||||
$tipo_campo = "datetime";
|
||||
$nfechas++;
|
||||
//
|
||||
//Prueba
|
||||
//
|
||||
$salida .= '<div class="input-group date" id="datetimepicker'.$nfechas.'">
|
||||
<input type="text" $name ="'.$campo.'" data-format="YYYY/MM/DD" value="'.$valorDato.'" '. $modoEfectivo. ' class="form-control" />
|
||||
$salida .= '<div class="input-group date" id="datetimepicker' . $nfechas . '">
|
||||
<input type="text" name="' . $campo . '" data-format="YYYY/MM/DD" value="' . $valorDato . '" ' . $modoEfectivo . ' class="form-control" />
|
||||
<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
|
||||
</div>';
|
||||
$salida .= '<script type="text/javascript">
|
||||
$(function () {
|
||||
$('."'#datetimepicker".$nfechas."').datetimepicker({
|
||||
$(' . "'#datetimepicker" . $nfechas . "').datetimepicker({
|
||||
pick12HourFormat: false,
|
||||
language: 'es',
|
||||
pickTime: false
|
||||
@@ -495,6 +585,13 @@ class Mantenimiento {
|
||||
if ($tipoCampo == "Password") {
|
||||
$tipo_campo = "password";
|
||||
}
|
||||
if ($tipoCampo == "Boolean(1)") {
|
||||
$checked = $valorDato == '1' ? 'checked' : '';
|
||||
$modocheck = $modoEfectivo == "readonly" ? 'onclick="javascript: return false;" readonly ' : '';
|
||||
$salida .= '<input type="checkbox" name="' . $campo . '" ' . $checked . ' ' . $modocheck . ' class="form-control">';
|
||||
$salida .= '</div></div>';
|
||||
continue;
|
||||
}
|
||||
//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 .
|
||||
'" maxlength="' . $tamano . '" size="' . (string) (intval($tamano) + 5) . '" ' . $modoEfectivo . " ><br><br>\n";
|
||||
@@ -503,28 +600,38 @@ class Mantenimiento {
|
||||
$salida.=$this->generaLista($this->foraneas[$campo], $campo, $valorDato, $modoEfectivo);
|
||||
$salida.="</div></div>";
|
||||
}
|
||||
//Genera una lista con los campos que intervienen en el formulario.
|
||||
$campos.="$campo&";
|
||||
}
|
||||
//genera un campo oculto con la lista de campos a modificar.
|
||||
$salida .= '<input name="listacampos" type="hidden" value="' . $campos . "\">\n";
|
||||
$salida .= "</fieldset><p>";
|
||||
$salida .= '<center>';
|
||||
$salida .= '<button type="button" onClick="location.href=' . "'$this->url'" . '" class="btn btn-info">Volver</button>';
|
||||
$this->datosURL['opc'] = 'inicial';
|
||||
$salida .= '<button type="button" onClick="location.href=' . "'" . $this->montaURL() . "'" . '" class="btn btn-info">Volver</button>';
|
||||
$salida .= ' <button type="reset" class="btn btn-danger">Cancelar</button>';
|
||||
$salida .= ' <button type=submit class="btn btn-primary">Aceptar</button>';
|
||||
$salida .= '<br></center></div>';
|
||||
return $salida;
|
||||
}
|
||||
|
||||
protected function errorBD($comando, $mensaje = "") {
|
||||
if (!$mensaje) {
|
||||
return "<h1>No pudo ejecutar correctamente el comando $comando error=" . $this->bdd->mensajeError() . " </h1>";
|
||||
protected function errorBD($comando, $texto = "", $tipo = "danger", $cabecera = "¡Atención!")
|
||||
{
|
||||
if (!$texto) {
|
||||
$texto = "No pudo ejecutar correctamente el comando $comando error=" . $this->bdd->mensajeError();
|
||||
} else {
|
||||
return "<h1>$mensaje error=" . $this->bdd->mensajeError() . "</h1>";
|
||||
$texto = "$texto error=" . $this->bdd->mensajeError();
|
||||
}
|
||||
return $this->panelMensaje($texto, "danger", $cabecera="¡Error!");
|
||||
}
|
||||
|
||||
|
||||
private function panelMensaje($info, $tipo = "danger", $cabecera = "¡Atención!") {
|
||||
$mensaje = '<div class="panel panel-' . $tipo . '"><div class="panel-heading">';
|
||||
$mensaje .= '<h3 class="panel-title">' . $cabecera . '</h3></div>';
|
||||
$mensaje .= '<div class="panel-body">';
|
||||
$mensaje .= $info;
|
||||
$mensaje .= '</div>';
|
||||
$mensaje .= '</div>';
|
||||
return $mensaje;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@@ -61,7 +61,7 @@ class Pdf_mysql_table extends Fpdf
|
||||
//Titulo
|
||||
$fecha=strftime("%d-%b-%Y %H:%M");
|
||||
$this->SetFont('Arial','',8);
|
||||
$this->Cell(0,4,html_entity_decode(APLICACION),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->Cell(0,6,utf8_decode($this->titulo),0,1,'C');
|
||||
$this->SetFont('Arial','',8);
|
||||
@@ -111,7 +111,7 @@ class Pdf_mysql_table extends Fpdf
|
||||
if ($this->procesandoTotales) {
|
||||
$this->SetFont('Arial','B',12);
|
||||
}
|
||||
$this->Cell($col['w'],5,$data[$col['f']],1,0,$alin,$fill);
|
||||
$this->Cell($col['w'],5,utf8_decode($data[$col['f']]),1,0,$alin,$fill);
|
||||
//$this->Cell($col['w'],5,utf8_decode($data[$col['f']]),1,0,$alin,$fill);
|
||||
//$this->Cell($col['w'],5,utf8_decode($data['proveedor']),1,0,$alin,$fill);
|
||||
//$this->Write(5,"nombre=".$col['f'].",titulo=".$col['c'].",ancho=".$col['w'].",alin=".$col['a']);
|
||||
|
71
README.md
71
README.md
@@ -1,8 +1,73 @@
|
||||
Inventario2
|
||||
# Inventario de Centro Educativo
|
||||
Copyright (c) 2008-2014, Ricardo Montañana Gómez
|
||||
|
||||
Inventario2 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.
|
||||
|
||||
Aplicación de inventario para un centro educativo.
|
||||
|
||||
Utiliza:
|
||||
*PHP v. 5.x
|
||||
*MySQL v. 5.x
|
||||
*PHP v. 5.3.x
|
||||
*MySQL v. 5.1.x
|
||||
*Apache
|
||||
|
||||
##Instalación
|
||||
Para instalar la aplicación basta con seguir estos pasos:
|
||||
###1. Copiar los archivos en una ubicación a la que tenga acceso el usuario con el que se ejecuta el servidor Apache (apache, _www, etc.).
|
||||
|
||||
mkdir Inventario
|
||||
cd Inventario
|
||||
unizp ../1.02.zip
|
||||
o
|
||||
tar xvzf ../1.02.tgz
|
||||
|
||||
###2. Crear un directorio temporal y dar derechos de escritura a los ficheros de configuración.
|
||||
|
||||
mkdir tmp
|
||||
chown apache tmp
|
||||
chown apache inc/configuracion.inc
|
||||
chown apache inc
|
||||
|
||||
###3. Crear una base de datos en MySQL con el siguiente comando
|
||||
|
||||
create database Inventario character set utf8 collate utf8_spanish_ci;
|
||||
|
||||
###4. Dar todos los derechos de acceso a esa base de datos a un usuario:
|
||||
|
||||
grant all on Inventario.* to usuario identified by "contraseña";
|
||||
|
||||
###5. Crear la estructura de la base de datos para poder comenzar a trabajar:
|
||||
|
||||
mysql -u usuario --password=contraseña <sql/setup.sql
|
||||
|
||||
Con esto queda instalado el programa. Se crean en este proceso dos usuarios:
|
||||
|
||||
Usuario: admin Usuario: demo
|
||||
Contraseña: pruebas Contraseña: pruebas
|
||||
|
||||
##Modelo de datos
|
||||
El modelo de datos que se ha utilizado ha sido:
|
||||

|
||||
|
||||
###Procedimiento de actualización de ISO-8859-1 a UTF-8 en MySQL
|
||||
Para actualizar la base de datos tan sólo hay que modificar el tipo de la base de datos y de las tablas a utf8 mediante workbench o mediante el comando:
|
||||
|
||||
use Inventario2;
|
||||
alter database Inventario2 character set utf8 collate utf8_spanish_ci;
|
||||
alter table Articulos convert to character set utf8 collate utf8_spanish_ci;
|
||||
alter table Ubicaciones convert to character set utf8 collate utf8_spanish_ci;
|
||||
alter table Elementos convert to character set utf8 collate utf8_spanish_ci;
|
||||
alter table Usuarios convert to character set utf8 collate utf8_spanish_ci;
|
||||
|
||||
Una vez hecho esto hay que asegurarse que el charset con el que trabaja el servidor MySQL es utf8 para eso se entra en mysql y mediante el comando status se averigua. Se puede cambiar en my.cnf o mediante workbench crear/modificar el fichero de configuración.
|
||||
|
||||
Contenido mínimo del fichero /etc/my.cnf
|
||||
|
||||
[mysqld]
|
||||
character-set-server = utf8
|
||||
collation-server = utf8_spanish_ci
|
||||
|
||||
[client]
|
||||
default-character-set=utf8
|
22
Sql.php
22
Sql.php
@@ -80,9 +80,9 @@ class Sql {
|
||||
public function __destruct()
|
||||
{
|
||||
//Libera la memoria de una posible consulta.
|
||||
if ($this->peticion) {
|
||||
$this->peticion->free_result();
|
||||
}
|
||||
//if ($this->peticion) {
|
||||
// $this->peticion->free_result();
|
||||
//}
|
||||
// Si estaba conectada la base de datos la cierra.
|
||||
if ($this->estado) {
|
||||
$this->bdd->close();
|
||||
@@ -152,6 +152,22 @@ class Sql {
|
||||
public function numeroTuplas() {
|
||||
return $this->numero;
|
||||
}
|
||||
/**
|
||||
* Devuelve el número de tuplas total si se ha hecho una consulta select
|
||||
* con SELECT SQL_CALC_FOUND_ROWS * ...
|
||||
* @return integer Número de tuplas.
|
||||
*/
|
||||
public function numeroTotalTuplas()
|
||||
{
|
||||
$comando = "select found_rows();";
|
||||
if (!$peticion=$this->bdd->query($comando)) {
|
||||
$this->error=true;
|
||||
$this->mensajeError='No pudo ejecutar la petición: '.$comando;
|
||||
return false;
|
||||
}
|
||||
$numero = $peticion->fetch_row();
|
||||
return $numero[0] ;
|
||||
}
|
||||
/**
|
||||
* Devuelve la condición de error de la última petición
|
||||
* @return boolean condición de error.
|
||||
|
@@ -1,101 +0,0 @@
|
||||
/*
|
||||
* Base structure
|
||||
*/
|
||||
|
||||
/* Move down content because we have a fixed navbar that is 50px tall */
|
||||
body {
|
||||
padding-top: 50px;
|
||||
background-color: #F3FEC8;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Global add-ons
|
||||
*/
|
||||
|
||||
.sub-header {
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Sidebar
|
||||
*/
|
||||
|
||||
/* Hide for mobile, show later */
|
||||
.sidebar {
|
||||
display: none;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
top: 51px;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
display: block;
|
||||
padding: 5px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
|
||||
background-color: #C4FAEC;/*#f5f5f5;*/
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
}
|
||||
|
||||
/* Sidebar navigation */
|
||||
.nav-sidebar {
|
||||
margin-right: -6px; /* 20px padding + 1px border */
|
||||
margin-bottom: 1px;
|
||||
margin-left: -1px;
|
||||
}
|
||||
.nav-sidebar > li > a {
|
||||
padding-right: 5px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.nav-sidebar > .active > a {
|
||||
color: #fff;
|
||||
background-color: #428bca;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Main content
|
||||
*/
|
||||
|
||||
.main {
|
||||
padding: 10px;
|
||||
background-color: #F3FEC8;
|
||||
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.main {
|
||||
padding-right: 20px;
|
||||
padding-left: 20px;
|
||||
background-color: #F3FEC8;
|
||||
|
||||
}
|
||||
}
|
||||
.main .page-header {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Placeholder dashboard ideas
|
||||
*/
|
||||
|
||||
.placeholders {
|
||||
margin-bottom: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
.placeholders h4 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.placeholder {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.placeholder img {
|
||||
display: inline-block;
|
||||
border-radius: 25%;
|
||||
}
|
114
css/dashboard.php
Normal file
114
css/dashboard.php
Normal file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
include('../inc/configuracion.inc');
|
||||
header("Content-type: text/css");
|
||||
?>
|
||||
/*
|
||||
* Base structure
|
||||
*/
|
||||
|
||||
/* Move down content because we have a fixed navbar that is 50px tall */
|
||||
body {
|
||||
padding-top: 50px;
|
||||
background-color: <?php echo COLORFON; ?>; /*Fondo*/
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Global add-ons
|
||||
*/
|
||||
|
||||
.sub-header {
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Sidebar
|
||||
*/
|
||||
|
||||
/* Hide for mobile, show later */
|
||||
.sidebar {
|
||||
display: none;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.sidebar {
|
||||
top: 50px;
|
||||
bottom: 150px;
|
||||
background-color: <?php echo COLORLAT; ?>
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
top: 51px;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
display: block;
|
||||
padding: 5px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
|
||||
background-color: <?php echo COLORLAT; ?>;/*Lateral*/
|
||||
border-right: 1px solid #eee;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* Sidebar navigation */
|
||||
.nav-sidebar {
|
||||
margin-right: -6px; /* 20px padding + 1px border */
|
||||
margin-bottom: 1px;
|
||||
margin-left: -1px;
|
||||
}
|
||||
.nav-sidebar > li > a {
|
||||
padding-right: 5px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.nav-sidebar > .active > a {
|
||||
color: #fff;
|
||||
background-color: #428bca;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Main content
|
||||
*/
|
||||
|
||||
.main {
|
||||
padding: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.main{
|
||||
margin-top: 50px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.main {
|
||||
padding-right: 20px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
}
|
||||
.main .page-header {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Placeholder dashboard ideas
|
||||
*/
|
||||
|
||||
.placeholders {
|
||||
margin-bottom: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
.placeholders h4 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.placeholder {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.placeholder img {
|
||||
display: inline-block;
|
||||
border-radius: 25%;
|
||||
}
|
13
css/jquery.simplecolorpicker-glyphicons.css
Executable file
13
css/jquery.simplecolorpicker-glyphicons.css
Executable file
@@ -0,0 +1,13 @@
|
||||
.simplecolorpicker.glyphicons span.color[data-selected]:after {
|
||||
/* Taken from glyphicon class. */
|
||||
position: relative;
|
||||
top: 1px;
|
||||
font-family: 'Glyphicons Halflings';
|
||||
line-height: .9;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
|
||||
content: '\e013'; /* Ok/check mark */
|
||||
|
||||
margin-right: 1px;
|
||||
margin-left: 1px;
|
||||
}
|
87
css/jquery.simplecolorpicker.css
Executable file
87
css/jquery.simplecolorpicker.css
Executable file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Very simple jQuery Color Picker
|
||||
* https://github.com/tkrotoff/jquery-simplecolorpicker
|
||||
*
|
||||
* Copyright (C) 2012-2013 Tanguy Krotoff <tkrotoff@gmail.com>
|
||||
*
|
||||
* Licensed under the MIT license
|
||||
*/
|
||||
|
||||
/**
|
||||
* Inspired by Bootstrap Twitter.
|
||||
* See https://github.com/twbs/bootstrap/blob/master/less/navbar.less
|
||||
* See https://github.com/twbs/bootstrap/blob/master/less/dropdowns.less
|
||||
*/
|
||||
|
||||
.simplecolorpicker.picker {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
z-index: 1051; /* Above Bootstrap modal (@zindex-modal = 1050) */
|
||||
display: none;
|
||||
float: left;
|
||||
|
||||
min-width: 160px;
|
||||
max-width: 283px; /* @popover-max-width = 276px + 7 */
|
||||
|
||||
padding: 5px 0 0 5px;
|
||||
margin: 2px 0 0;
|
||||
list-style: none;
|
||||
background-color: #fff; /* @dropdown-bg */
|
||||
|
||||
border: 1px solid #ccc; /* @dropdown-fallback-border */
|
||||
border: 1px solid rgba(0, 0, 0, .15); /* @dropdown-border */
|
||||
|
||||
-webkit-border-radius: 4px; /* @border-radius-base */
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
|
||||
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
|
||||
-moz-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
|
||||
box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
|
||||
|
||||
-webkit-background-clip: padding-box;
|
||||
-moz-background-clip: padding;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
.simplecolorpicker.inline {
|
||||
display: inline-block;
|
||||
padding: 6px 0;
|
||||
}
|
||||
|
||||
.simplecolorpicker span {
|
||||
margin: 0 5px 5px 0;
|
||||
}
|
||||
|
||||
.simplecolorpicker.icon,
|
||||
.simplecolorpicker span.color {
|
||||
display: inline-block;
|
||||
|
||||
cursor: pointer;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.simplecolorpicker.icon:after,
|
||||
.simplecolorpicker span.color:after {
|
||||
content: '\00a0\00a0\00a0\00a0'; /* Spaces */
|
||||
}
|
||||
|
||||
.simplecolorpicker span.color[data-disabled]:hover {
|
||||
cursor: not-allowed;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.simplecolorpicker span.color:hover,
|
||||
.simplecolorpicker span.color[data-selected],
|
||||
.simplecolorpicker span.color[data-selected]:hover {
|
||||
border: 1px solid #222; /* @gray-dark */
|
||||
}
|
||||
.simplecolorpicker span.color[data-selected]:after {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Vertical separator, replaces optgroup. */
|
||||
.simplecolorpicker span.vr {
|
||||
border-left: 1px solid #222; /* @gray-dark */
|
||||
}
|
235
css/jquery.simplecolorpicker.js
Executable file
235
css/jquery.simplecolorpicker.js
Executable file
@@ -0,0 +1,235 @@
|
||||
/*
|
||||
* Very simple jQuery Color Picker
|
||||
* https://github.com/tkrotoff/jquery-simplecolorpicker
|
||||
*
|
||||
* Copyright (C) 2012-2013 Tanguy Krotoff <tkrotoff@gmail.com>
|
||||
*
|
||||
* Licensed under the MIT license
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
var SimpleColorPicker = function(select, options) {
|
||||
this.init('simplecolorpicker', select, options);
|
||||
};
|
||||
|
||||
/**
|
||||
* SimpleColorPicker class.
|
||||
*/
|
||||
SimpleColorPicker.prototype = {
|
||||
constructor: SimpleColorPicker,
|
||||
|
||||
init: function(type, select, options) {
|
||||
var self = this;
|
||||
|
||||
self.type = type;
|
||||
|
||||
self.$select = $(select);
|
||||
self.$select.hide();
|
||||
|
||||
self.options = $.extend({}, $.fn.simplecolorpicker.defaults, options);
|
||||
|
||||
self.$colorList = null;
|
||||
|
||||
if (self.options.picker === true) {
|
||||
var selectText = self.$select.find('> option:selected').text();
|
||||
self.$icon = $('<span class="simplecolorpicker icon"'
|
||||
+ ' title="' + selectText + '"'
|
||||
+ ' style="background-color: ' + self.$select.val() + ';"'
|
||||
+ ' role="button" tabindex="0">'
|
||||
+ '</span>').insertAfter(self.$select);
|
||||
self.$icon.on('click.' + self.type, $.proxy(self.showPicker, self));
|
||||
|
||||
self.$picker = $('<span class="simplecolorpicker picker ' + self.options.theme + '"></span>').appendTo(document.body);
|
||||
self.$colorList = self.$picker;
|
||||
|
||||
// Hide picker when clicking outside
|
||||
$(document).on('mousedown.' + self.type, $.proxy(self.hidePicker, self));
|
||||
self.$picker.on('mousedown.' + self.type, $.proxy(self.mousedown, self));
|
||||
} else {
|
||||
self.$inline = $('<span class="simplecolorpicker inline ' + self.options.theme + '"></span>').insertAfter(self.$select);
|
||||
self.$colorList = self.$inline;
|
||||
}
|
||||
|
||||
// Build the list of colors
|
||||
// <span class="color selected" title="Green" style="background-color: #7bd148;" role="button"></span>
|
||||
self.$select.find('> option').each(function() {
|
||||
var $option = $(this);
|
||||
var color = $option.val();
|
||||
|
||||
var isSelected = $option.is(':selected');
|
||||
var isDisabled = $option.is(':disabled');
|
||||
|
||||
var selected = '';
|
||||
if (isSelected === true) {
|
||||
selected = ' data-selected';
|
||||
}
|
||||
|
||||
var disabled = '';
|
||||
if (isDisabled === true) {
|
||||
disabled = ' data-disabled';
|
||||
}
|
||||
|
||||
var title = '';
|
||||
if (isDisabled === false) {
|
||||
title = ' title="' + $option.text() + '"';
|
||||
}
|
||||
|
||||
var role = '';
|
||||
if (isDisabled === false) {
|
||||
role = ' role="button" tabindex="0"';
|
||||
}
|
||||
|
||||
var $colorSpan = $('<span class="color"'
|
||||
+ title
|
||||
+ ' style="background-color: ' + color + ';"'
|
||||
+ ' data-color="' + color + '"'
|
||||
+ selected
|
||||
+ disabled
|
||||
+ role + '>'
|
||||
+ '</span>');
|
||||
|
||||
self.$colorList.append($colorSpan);
|
||||
$colorSpan.on('click.' + self.type, $.proxy(self.colorSpanClicked, self));
|
||||
|
||||
var $next = $option.next();
|
||||
if ($next.is('optgroup') === true) {
|
||||
// Vertical break, like hr
|
||||
self.$colorList.append('<span class="vr"></span>');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Changes the selected color.
|
||||
*
|
||||
* @param color the hexadecimal color to select, ex: '#fbd75b'
|
||||
*/
|
||||
selectColor: function(color) {
|
||||
var self = this;
|
||||
|
||||
var $colorSpan = self.$colorList.find('> span.color').filter(function() {
|
||||
return $(this).data('color').toLowerCase() === color.toLowerCase();
|
||||
});
|
||||
|
||||
if ($colorSpan.length > 0) {
|
||||
self.selectColorSpan($colorSpan);
|
||||
} else {
|
||||
console.error("The given color '" + color + "' could not be found");
|
||||
}
|
||||
},
|
||||
|
||||
showPicker: function() {
|
||||
var pos = this.$icon.offset();
|
||||
this.$picker.css({
|
||||
// Remove some pixels to align the picker icon with the icons inside the dropdown
|
||||
left: pos.left - 6,
|
||||
top: pos.top + this.$icon.outerHeight()
|
||||
});
|
||||
|
||||
this.$picker.show(this.options.pickerDelay);
|
||||
},
|
||||
|
||||
hidePicker: function() {
|
||||
this.$picker.hide(this.options.pickerDelay);
|
||||
},
|
||||
|
||||
/**
|
||||
* Selects the given span inside $colorList.
|
||||
*
|
||||
* The given span becomes the selected one.
|
||||
* It also changes the HTML select value, this will emit the 'change' event.
|
||||
*/
|
||||
selectColorSpan: function($colorSpan) {
|
||||
var color = $colorSpan.data('color');
|
||||
var title = $colorSpan.prop('title');
|
||||
|
||||
// Mark this span as the selected one
|
||||
$colorSpan.siblings().removeAttr('data-selected');
|
||||
$colorSpan.attr('data-selected', '');
|
||||
|
||||
if (this.options.picker === true) {
|
||||
this.$icon.css('background-color', color);
|
||||
this.$icon.prop('title', title);
|
||||
this.hidePicker();
|
||||
}
|
||||
|
||||
// Change HTML select value
|
||||
this.$select.val(color);
|
||||
},
|
||||
|
||||
/**
|
||||
* The user clicked on a color inside $colorList.
|
||||
*/
|
||||
colorSpanClicked: function(e) {
|
||||
// When a color is clicked, make it the new selected one (unless disabled)
|
||||
if ($(e.target).is('[data-disabled]') === false) {
|
||||
this.selectColorSpan($(e.target));
|
||||
this.$select.trigger('change');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Prevents the mousedown event from "eating" the click event.
|
||||
*/
|
||||
mousedown: function(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
if (this.options.picker === true) {
|
||||
this.$icon.off('.' + this.type);
|
||||
this.$icon.remove();
|
||||
$(document).off('.' + this.type);
|
||||
}
|
||||
|
||||
this.$colorList.off('.' + this.type);
|
||||
this.$colorList.remove();
|
||||
|
||||
this.$select.removeData(this.type);
|
||||
this.$select.show();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Plugin definition.
|
||||
* How to use: $('#id').simplecolorpicker()
|
||||
*/
|
||||
$.fn.simplecolorpicker = function(option) {
|
||||
var args = $.makeArray(arguments);
|
||||
args.shift();
|
||||
|
||||
// For HTML element passed to the plugin
|
||||
return this.each(function() {
|
||||
var $this = $(this),
|
||||
data = $this.data('simplecolorpicker'),
|
||||
options = typeof option === 'object' && option;
|
||||
if (data === undefined) {
|
||||
$this.data('simplecolorpicker', (data = new SimpleColorPicker(this, options)));
|
||||
}
|
||||
if (typeof option === 'string') {
|
||||
data[option].apply(data, args);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Default options.
|
||||
*/
|
||||
$.fn.simplecolorpicker.defaults = {
|
||||
// No theme by default
|
||||
theme: '',
|
||||
|
||||
// Show the picker or make it inline
|
||||
picker: false,
|
||||
|
||||
// Animation delay in milliseconds
|
||||
pickerDelay: 0
|
||||
};
|
||||
|
||||
})(jQuery);
|
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Courier';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
for($i=0;$i<=255;$i++)
|
||||
$cw[chr($i)] = 600;
|
||||
?>
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Courier';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
for($i=0;$i<=255;$i++)
|
||||
$cw[chr($i)] = 600;
|
||||
?>
|
||||
|
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Courier-Bold';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
for($i=0;$i<=255;$i++)
|
||||
$cw[chr($i)] = 600;
|
||||
?>
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Courier-Bold';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
for($i=0;$i<=255;$i++)
|
||||
$cw[chr($i)] = 600;
|
||||
?>
|
||||
|
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Courier-BoldOblique';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
for($i=0;$i<=255;$i++)
|
||||
$cw[chr($i)] = 600;
|
||||
?>
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Courier-BoldOblique';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
for($i=0;$i<=255;$i++)
|
||||
$cw[chr($i)] = 600;
|
||||
?>
|
||||
|
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Courier-Oblique';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
for($i=0;$i<=255;$i++)
|
||||
$cw[chr($i)] = 600;
|
||||
?>
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Courier-Oblique';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
for($i=0;$i<=255;$i++)
|
||||
$cw[chr($i)] = 600;
|
||||
?>
|
||||
|
@@ -1,19 +1,19 @@
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Helvetica';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
|
||||
chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Helvetica';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
|
||||
chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
||||
|
@@ -1,19 +1,19 @@
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Helvetica-Bold';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
|
||||
?>
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Helvetica-Bold';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
|
||||
?>
|
||||
|
@@ -1,19 +1,19 @@
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Helvetica-BoldOblique';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
|
||||
?>
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Helvetica-BoldOblique';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
|
||||
?>
|
||||
|
@@ -1,19 +1,19 @@
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Helvetica-Oblique';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
|
||||
chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Helvetica-Oblique';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
|
||||
chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
||||
|
@@ -1,419 +1,419 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Utility to generate font definition files *
|
||||
* *
|
||||
* Version: 1.14 *
|
||||
* Date: 2008-08-03 *
|
||||
* Author: Olivier PLATHEY *
|
||||
*******************************************************************************/
|
||||
|
||||
function ReadMap($enc)
|
||||
{
|
||||
//Read a map file
|
||||
$file=dirname(__FILE__).'/'.strtolower($enc).'.map';
|
||||
$a=file($file);
|
||||
if(empty($a))
|
||||
die('<b>Error:</b> encoding not found: '.$enc);
|
||||
$cc2gn=array();
|
||||
foreach($a as $l)
|
||||
{
|
||||
if($l[0]=='!')
|
||||
{
|
||||
$e=preg_split('/[ \\t]+/',rtrim($l));
|
||||
$cc=hexdec(substr($e[0],1));
|
||||
$gn=$e[2];
|
||||
$cc2gn[$cc]=$gn;
|
||||
}
|
||||
}
|
||||
for($i=0;$i<=255;$i++)
|
||||
{
|
||||
if(!isset($cc2gn[$i]))
|
||||
$cc2gn[$i]='.notdef';
|
||||
}
|
||||
return $cc2gn;
|
||||
}
|
||||
|
||||
function ReadAFM($file, &$map)
|
||||
{
|
||||
//Read a font metric file
|
||||
$a=file($file);
|
||||
if(empty($a))
|
||||
die('File not found');
|
||||
$widths=array();
|
||||
$fm=array();
|
||||
$fix=array('Edot'=>'Edotaccent','edot'=>'edotaccent','Idot'=>'Idotaccent','Zdot'=>'Zdotaccent','zdot'=>'zdotaccent',
|
||||
'Odblacute'=>'Ohungarumlaut','odblacute'=>'ohungarumlaut','Udblacute'=>'Uhungarumlaut','udblacute'=>'uhungarumlaut',
|
||||
'Gcedilla'=>'Gcommaaccent','gcedilla'=>'gcommaaccent','Kcedilla'=>'Kcommaaccent','kcedilla'=>'kcommaaccent',
|
||||
'Lcedilla'=>'Lcommaaccent','lcedilla'=>'lcommaaccent','Ncedilla'=>'Ncommaaccent','ncedilla'=>'ncommaaccent',
|
||||
'Rcedilla'=>'Rcommaaccent','rcedilla'=>'rcommaaccent','Scedilla'=>'Scommaaccent','scedilla'=>'scommaaccent',
|
||||
'Tcedilla'=>'Tcommaaccent','tcedilla'=>'tcommaaccent','Dslash'=>'Dcroat','dslash'=>'dcroat','Dmacron'=>'Dcroat','dmacron'=>'dcroat',
|
||||
'combininggraveaccent'=>'gravecomb','combininghookabove'=>'hookabovecomb','combiningtildeaccent'=>'tildecomb',
|
||||
'combiningacuteaccent'=>'acutecomb','combiningdotbelow'=>'dotbelowcomb','dongsign'=>'dong');
|
||||
foreach($a as $l)
|
||||
{
|
||||
$e=explode(' ',rtrim($l));
|
||||
if(count($e)<2)
|
||||
continue;
|
||||
$code=$e[0];
|
||||
$param=$e[1];
|
||||
if($code=='C')
|
||||
{
|
||||
//Character metrics
|
||||
$cc=(int)$e[1];
|
||||
$w=$e[4];
|
||||
$gn=$e[7];
|
||||
if(substr($gn,-4)=='20AC')
|
||||
$gn='Euro';
|
||||
if(isset($fix[$gn]))
|
||||
{
|
||||
//Fix incorrect glyph name
|
||||
foreach($map as $c=>$n)
|
||||
{
|
||||
if($n==$fix[$gn])
|
||||
$map[$c]=$gn;
|
||||
}
|
||||
}
|
||||
if(empty($map))
|
||||
{
|
||||
//Symbolic font: use built-in encoding
|
||||
$widths[$cc]=$w;
|
||||
}
|
||||
else
|
||||
{
|
||||
$widths[$gn]=$w;
|
||||
if($gn=='X')
|
||||
$fm['CapXHeight']=$e[13];
|
||||
}
|
||||
if($gn=='.notdef')
|
||||
$fm['MissingWidth']=$w;
|
||||
}
|
||||
elseif($code=='FontName')
|
||||
$fm['FontName']=$param;
|
||||
elseif($code=='Weight')
|
||||
$fm['Weight']=$param;
|
||||
elseif($code=='ItalicAngle')
|
||||
$fm['ItalicAngle']=(double)$param;
|
||||
elseif($code=='Ascender')
|
||||
$fm['Ascender']=(int)$param;
|
||||
elseif($code=='Descender')
|
||||
$fm['Descender']=(int)$param;
|
||||
elseif($code=='UnderlineThickness')
|
||||
$fm['UnderlineThickness']=(int)$param;
|
||||
elseif($code=='UnderlinePosition')
|
||||
$fm['UnderlinePosition']=(int)$param;
|
||||
elseif($code=='IsFixedPitch')
|
||||
$fm['IsFixedPitch']=($param=='true');
|
||||
elseif($code=='FontBBox')
|
||||
$fm['FontBBox']=array($e[1],$e[2],$e[3],$e[4]);
|
||||
elseif($code=='CapHeight')
|
||||
$fm['CapHeight']=(int)$param;
|
||||
elseif($code=='StdVW')
|
||||
$fm['StdVW']=(int)$param;
|
||||
}
|
||||
if(!isset($fm['FontName']))
|
||||
die('FontName not found');
|
||||
if(!empty($map))
|
||||
{
|
||||
if(!isset($widths['.notdef']))
|
||||
$widths['.notdef']=600;
|
||||
if(!isset($widths['Delta']) && isset($widths['increment']))
|
||||
$widths['Delta']=$widths['increment'];
|
||||
//Order widths according to map
|
||||
for($i=0;$i<=255;$i++)
|
||||
{
|
||||
if(!isset($widths[$map[$i]]))
|
||||
{
|
||||
echo '<b>Warning:</b> character '.$map[$i].' is missing<br>';
|
||||
$widths[$i]=$widths['.notdef'];
|
||||
}
|
||||
else
|
||||
$widths[$i]=$widths[$map[$i]];
|
||||
}
|
||||
}
|
||||
$fm['Widths']=$widths;
|
||||
return $fm;
|
||||
}
|
||||
|
||||
function MakeFontDescriptor($fm, $symbolic)
|
||||
{
|
||||
//Ascent
|
||||
$asc=(isset($fm['Ascender']) ? $fm['Ascender'] : 1000);
|
||||
$fd="array('Ascent'=>".$asc;
|
||||
//Descent
|
||||
$desc=(isset($fm['Descender']) ? $fm['Descender'] : -200);
|
||||
$fd.=",'Descent'=>".$desc;
|
||||
//CapHeight
|
||||
if(isset($fm['CapHeight']))
|
||||
$ch=$fm['CapHeight'];
|
||||
elseif(isset($fm['CapXHeight']))
|
||||
$ch=$fm['CapXHeight'];
|
||||
else
|
||||
$ch=$asc;
|
||||
$fd.=",'CapHeight'=>".$ch;
|
||||
//Flags
|
||||
$flags=0;
|
||||
if(isset($fm['IsFixedPitch']) && $fm['IsFixedPitch'])
|
||||
$flags+=1<<0;
|
||||
if($symbolic)
|
||||
$flags+=1<<2;
|
||||
if(!$symbolic)
|
||||
$flags+=1<<5;
|
||||
if(isset($fm['ItalicAngle']) && $fm['ItalicAngle']!=0)
|
||||
$flags+=1<<6;
|
||||
$fd.=",'Flags'=>".$flags;
|
||||
//FontBBox
|
||||
if(isset($fm['FontBBox']))
|
||||
$fbb=$fm['FontBBox'];
|
||||
else
|
||||
$fbb=array(0,$desc-100,1000,$asc+100);
|
||||
$fd.=",'FontBBox'=>'[".$fbb[0].' '.$fbb[1].' '.$fbb[2].' '.$fbb[3]."]'";
|
||||
//ItalicAngle
|
||||
$ia=(isset($fm['ItalicAngle']) ? $fm['ItalicAngle'] : 0);
|
||||
$fd.=",'ItalicAngle'=>".$ia;
|
||||
//StemV
|
||||
if(isset($fm['StdVW']))
|
||||
$stemv=$fm['StdVW'];
|
||||
elseif(isset($fm['Weight']) && preg_match('/bold|black/i',$fm['Weight']))
|
||||
$stemv=120;
|
||||
else
|
||||
$stemv=70;
|
||||
$fd.=",'StemV'=>".$stemv;
|
||||
//MissingWidth
|
||||
if(isset($fm['MissingWidth']))
|
||||
$fd.=",'MissingWidth'=>".$fm['MissingWidth'];
|
||||
$fd.=')';
|
||||
return $fd;
|
||||
}
|
||||
|
||||
function MakeWidthArray($fm)
|
||||
{
|
||||
//Make character width array
|
||||
$s="array(\n\t";
|
||||
$cw=$fm['Widths'];
|
||||
for($i=0;$i<=255;$i++)
|
||||
{
|
||||
if(chr($i)=="'")
|
||||
$s.="'\\''";
|
||||
elseif(chr($i)=="\\")
|
||||
$s.="'\\\\'";
|
||||
elseif($i>=32 && $i<=126)
|
||||
$s.="'".chr($i)."'";
|
||||
else
|
||||
$s.="chr($i)";
|
||||
$s.='=>'.$fm['Widths'][$i];
|
||||
if($i<255)
|
||||
$s.=',';
|
||||
if(($i+1)%22==0)
|
||||
$s.="\n\t";
|
||||
}
|
||||
$s.=')';
|
||||
return $s;
|
||||
}
|
||||
|
||||
function MakeFontEncoding($map)
|
||||
{
|
||||
//Build differences from reference encoding
|
||||
$ref=ReadMap('cp1252');
|
||||
$s='';
|
||||
$last=0;
|
||||
for($i=32;$i<=255;$i++)
|
||||
{
|
||||
if($map[$i]!=$ref[$i])
|
||||
{
|
||||
if($i!=$last+1)
|
||||
$s.=$i.' ';
|
||||
$last=$i;
|
||||
$s.='/'.$map[$i].' ';
|
||||
}
|
||||
}
|
||||
return rtrim($s);
|
||||
}
|
||||
|
||||
function SaveToFile($file, $s, $mode)
|
||||
{
|
||||
$f=fopen($file,'w'.$mode);
|
||||
if(!$f)
|
||||
die('Can\'t write to file '.$file);
|
||||
fwrite($f,$s,strlen($s));
|
||||
fclose($f);
|
||||
}
|
||||
|
||||
function ReadShort($f)
|
||||
{
|
||||
$a=unpack('n1n',fread($f,2));
|
||||
return $a['n'];
|
||||
}
|
||||
|
||||
function ReadLong($f)
|
||||
{
|
||||
$a=unpack('N1N',fread($f,4));
|
||||
return $a['N'];
|
||||
}
|
||||
|
||||
function CheckTTF($file)
|
||||
{
|
||||
//Check if font license allows embedding
|
||||
$f=fopen($file,'rb');
|
||||
if(!$f)
|
||||
die('<b>Error:</b> Can\'t open '.$file);
|
||||
//Extract number of tables
|
||||
fseek($f,4,SEEK_CUR);
|
||||
$nb=ReadShort($f);
|
||||
fseek($f,6,SEEK_CUR);
|
||||
//Seek OS/2 table
|
||||
$found=false;
|
||||
for($i=0;$i<$nb;$i++)
|
||||
{
|
||||
if(fread($f,4)=='OS/2')
|
||||
{
|
||||
$found=true;
|
||||
break;
|
||||
}
|
||||
fseek($f,12,SEEK_CUR);
|
||||
}
|
||||
if(!$found)
|
||||
{
|
||||
fclose($f);
|
||||
return;
|
||||
}
|
||||
fseek($f,4,SEEK_CUR);
|
||||
$offset=ReadLong($f);
|
||||
fseek($f,$offset,SEEK_SET);
|
||||
//Extract fsType flags
|
||||
fseek($f,8,SEEK_CUR);
|
||||
$fsType=ReadShort($f);
|
||||
$rl=($fsType & 0x02)!=0;
|
||||
$pp=($fsType & 0x04)!=0;
|
||||
$e=($fsType & 0x08)!=0;
|
||||
fclose($f);
|
||||
if($rl && !$pp && !$e)
|
||||
echo '<b>Warning:</b> font license does not allow embedding';
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* fontfile: path to TTF file (or empty string if not to be embedded) *
|
||||
* afmfile: path to AFM file *
|
||||
* enc: font encoding (or empty string for symbolic fonts) *
|
||||
* patch: optional patch for encoding *
|
||||
* type: font type if fontfile is empty *
|
||||
*******************************************************************************/
|
||||
function MakeFont($fontfile, $afmfile, $enc='cp1252', $patch=array(), $type='TrueType')
|
||||
{
|
||||
//Generate a font definition file
|
||||
if(get_magic_quotes_runtime())
|
||||
@set_magic_quotes_runtime(0);
|
||||
ini_set('auto_detect_line_endings','1');
|
||||
if($enc)
|
||||
{
|
||||
$map=ReadMap($enc);
|
||||
foreach($patch as $cc=>$gn)
|
||||
$map[$cc]=$gn;
|
||||
}
|
||||
else
|
||||
$map=array();
|
||||
if(!file_exists($afmfile))
|
||||
die('<b>Error:</b> AFM file not found: '.$afmfile);
|
||||
$fm=ReadAFM($afmfile,$map);
|
||||
if($enc)
|
||||
$diff=MakeFontEncoding($map);
|
||||
else
|
||||
$diff='';
|
||||
$fd=MakeFontDescriptor($fm,empty($map));
|
||||
//Find font type
|
||||
if($fontfile)
|
||||
{
|
||||
$ext=strtolower(substr($fontfile,-3));
|
||||
if($ext=='ttf')
|
||||
$type='TrueType';
|
||||
elseif($ext=='pfb')
|
||||
$type='Type1';
|
||||
else
|
||||
die('<b>Error:</b> unrecognized font file extension: '.$ext);
|
||||
}
|
||||
else
|
||||
{
|
||||
if($type!='TrueType' && $type!='Type1')
|
||||
die('<b>Error:</b> incorrect font type: '.$type);
|
||||
}
|
||||
//Start generation
|
||||
$s='<?php'."\n";
|
||||
$s.='$type=\''.$type."';\n";
|
||||
$s.='$name=\''.$fm['FontName']."';\n";
|
||||
$s.='$desc='.$fd.";\n";
|
||||
if(!isset($fm['UnderlinePosition']))
|
||||
$fm['UnderlinePosition']=-100;
|
||||
if(!isset($fm['UnderlineThickness']))
|
||||
$fm['UnderlineThickness']=50;
|
||||
$s.='$up='.$fm['UnderlinePosition'].";\n";
|
||||
$s.='$ut='.$fm['UnderlineThickness'].";\n";
|
||||
$w=MakeWidthArray($fm);
|
||||
$s.='$cw='.$w.";\n";
|
||||
$s.='$enc=\''.$enc."';\n";
|
||||
$s.='$diff=\''.$diff."';\n";
|
||||
$basename=substr(basename($afmfile),0,-4);
|
||||
if($fontfile)
|
||||
{
|
||||
//Embedded font
|
||||
if(!file_exists($fontfile))
|
||||
die('<b>Error:</b> font file not found: '.$fontfile);
|
||||
if($type=='TrueType')
|
||||
CheckTTF($fontfile);
|
||||
$f=fopen($fontfile,'rb');
|
||||
if(!$f)
|
||||
die('<b>Error:</b> Can\'t open '.$fontfile);
|
||||
$file=fread($f,filesize($fontfile));
|
||||
fclose($f);
|
||||
if($type=='Type1')
|
||||
{
|
||||
//Find first two sections and discard third one
|
||||
$header=(ord($file[0])==128);
|
||||
if($header)
|
||||
{
|
||||
//Strip first binary header
|
||||
$file=substr($file,6);
|
||||
}
|
||||
$pos=strpos($file,'eexec');
|
||||
if(!$pos)
|
||||
die('<b>Error:</b> font file does not seem to be valid Type1');
|
||||
$size1=$pos+6;
|
||||
if($header && ord($file[$size1])==128)
|
||||
{
|
||||
//Strip second binary header
|
||||
$file=substr($file,0,$size1).substr($file,$size1+6);
|
||||
}
|
||||
$pos=strpos($file,'00000000');
|
||||
if(!$pos)
|
||||
die('<b>Error:</b> font file does not seem to be valid Type1');
|
||||
$size2=$pos-$size1;
|
||||
$file=substr($file,0,$size1+$size2);
|
||||
}
|
||||
if(function_exists('gzcompress'))
|
||||
{
|
||||
$cmp=$basename.'.z';
|
||||
SaveToFile($cmp,gzcompress($file),'b');
|
||||
$s.='$file=\''.$cmp."';\n";
|
||||
echo 'Font file compressed ('.$cmp.')<br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$s.='$file=\''.basename($fontfile)."';\n";
|
||||
echo '<b>Notice:</b> font file could not be compressed (zlib extension not available)<br>';
|
||||
}
|
||||
if($type=='Type1')
|
||||
{
|
||||
$s.='$size1='.$size1.";\n";
|
||||
$s.='$size2='.$size2.";\n";
|
||||
}
|
||||
else
|
||||
$s.='$originalsize='.filesize($fontfile).";\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
//Not embedded font
|
||||
$s.='$file='."'';\n";
|
||||
}
|
||||
$s.="?>\n";
|
||||
SaveToFile($basename.'.php',$s,'t');
|
||||
echo 'Font definition file generated ('.$basename.'.php'.')<br>';
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Utility to generate font definition files *
|
||||
* *
|
||||
* Version: 1.14 *
|
||||
* Date: 2008-08-03 *
|
||||
* Author: Olivier PLATHEY *
|
||||
*******************************************************************************/
|
||||
|
||||
function ReadMap($enc)
|
||||
{
|
||||
//Read a map file
|
||||
$file=dirname(__FILE__).'/'.strtolower($enc).'.map';
|
||||
$a=file($file);
|
||||
if(empty($a))
|
||||
die('<b>Error:</b> encoding not found: '.$enc);
|
||||
$cc2gn=array();
|
||||
foreach($a as $l)
|
||||
{
|
||||
if($l[0]=='!')
|
||||
{
|
||||
$e=preg_split('/[ \\t]+/',rtrim($l));
|
||||
$cc=hexdec(substr($e[0],1));
|
||||
$gn=$e[2];
|
||||
$cc2gn[$cc]=$gn;
|
||||
}
|
||||
}
|
||||
for($i=0;$i<=255;$i++)
|
||||
{
|
||||
if(!isset($cc2gn[$i]))
|
||||
$cc2gn[$i]='.notdef';
|
||||
}
|
||||
return $cc2gn;
|
||||
}
|
||||
|
||||
function ReadAFM($file, &$map)
|
||||
{
|
||||
//Read a font metric file
|
||||
$a=file($file);
|
||||
if(empty($a))
|
||||
die('File not found');
|
||||
$widths=array();
|
||||
$fm=array();
|
||||
$fix=array('Edot'=>'Edotaccent','edot'=>'edotaccent','Idot'=>'Idotaccent','Zdot'=>'Zdotaccent','zdot'=>'zdotaccent',
|
||||
'Odblacute'=>'Ohungarumlaut','odblacute'=>'ohungarumlaut','Udblacute'=>'Uhungarumlaut','udblacute'=>'uhungarumlaut',
|
||||
'Gcedilla'=>'Gcommaaccent','gcedilla'=>'gcommaaccent','Kcedilla'=>'Kcommaaccent','kcedilla'=>'kcommaaccent',
|
||||
'Lcedilla'=>'Lcommaaccent','lcedilla'=>'lcommaaccent','Ncedilla'=>'Ncommaaccent','ncedilla'=>'ncommaaccent',
|
||||
'Rcedilla'=>'Rcommaaccent','rcedilla'=>'rcommaaccent','Scedilla'=>'Scommaaccent','scedilla'=>'scommaaccent',
|
||||
'Tcedilla'=>'Tcommaaccent','tcedilla'=>'tcommaaccent','Dslash'=>'Dcroat','dslash'=>'dcroat','Dmacron'=>'Dcroat','dmacron'=>'dcroat',
|
||||
'combininggraveaccent'=>'gravecomb','combininghookabove'=>'hookabovecomb','combiningtildeaccent'=>'tildecomb',
|
||||
'combiningacuteaccent'=>'acutecomb','combiningdotbelow'=>'dotbelowcomb','dongsign'=>'dong');
|
||||
foreach($a as $l)
|
||||
{
|
||||
$e=explode(' ',rtrim($l));
|
||||
if(count($e)<2)
|
||||
continue;
|
||||
$code=$e[0];
|
||||
$param=$e[1];
|
||||
if($code=='C')
|
||||
{
|
||||
//Character metrics
|
||||
$cc=(int)$e[1];
|
||||
$w=$e[4];
|
||||
$gn=$e[7];
|
||||
if(substr($gn,-4)=='20AC')
|
||||
$gn='Euro';
|
||||
if(isset($fix[$gn]))
|
||||
{
|
||||
//Fix incorrect glyph name
|
||||
foreach($map as $c=>$n)
|
||||
{
|
||||
if($n==$fix[$gn])
|
||||
$map[$c]=$gn;
|
||||
}
|
||||
}
|
||||
if(empty($map))
|
||||
{
|
||||
//Symbolic font: use built-in encoding
|
||||
$widths[$cc]=$w;
|
||||
}
|
||||
else
|
||||
{
|
||||
$widths[$gn]=$w;
|
||||
if($gn=='X')
|
||||
$fm['CapXHeight']=$e[13];
|
||||
}
|
||||
if($gn=='.notdef')
|
||||
$fm['MissingWidth']=$w;
|
||||
}
|
||||
elseif($code=='FontName')
|
||||
$fm['FontName']=$param;
|
||||
elseif($code=='Weight')
|
||||
$fm['Weight']=$param;
|
||||
elseif($code=='ItalicAngle')
|
||||
$fm['ItalicAngle']=(double)$param;
|
||||
elseif($code=='Ascender')
|
||||
$fm['Ascender']=(int)$param;
|
||||
elseif($code=='Descender')
|
||||
$fm['Descender']=(int)$param;
|
||||
elseif($code=='UnderlineThickness')
|
||||
$fm['UnderlineThickness']=(int)$param;
|
||||
elseif($code=='UnderlinePosition')
|
||||
$fm['UnderlinePosition']=(int)$param;
|
||||
elseif($code=='IsFixedPitch')
|
||||
$fm['IsFixedPitch']=($param=='true');
|
||||
elseif($code=='FontBBox')
|
||||
$fm['FontBBox']=array($e[1],$e[2],$e[3],$e[4]);
|
||||
elseif($code=='CapHeight')
|
||||
$fm['CapHeight']=(int)$param;
|
||||
elseif($code=='StdVW')
|
||||
$fm['StdVW']=(int)$param;
|
||||
}
|
||||
if(!isset($fm['FontName']))
|
||||
die('FontName not found');
|
||||
if(!empty($map))
|
||||
{
|
||||
if(!isset($widths['.notdef']))
|
||||
$widths['.notdef']=600;
|
||||
if(!isset($widths['Delta']) && isset($widths['increment']))
|
||||
$widths['Delta']=$widths['increment'];
|
||||
//Order widths according to map
|
||||
for($i=0;$i<=255;$i++)
|
||||
{
|
||||
if(!isset($widths[$map[$i]]))
|
||||
{
|
||||
echo '<b>Warning:</b> character '.$map[$i].' is missing<br>';
|
||||
$widths[$i]=$widths['.notdef'];
|
||||
}
|
||||
else
|
||||
$widths[$i]=$widths[$map[$i]];
|
||||
}
|
||||
}
|
||||
$fm['Widths']=$widths;
|
||||
return $fm;
|
||||
}
|
||||
|
||||
function MakeFontDescriptor($fm, $symbolic)
|
||||
{
|
||||
//Ascent
|
||||
$asc=(isset($fm['Ascender']) ? $fm['Ascender'] : 1000);
|
||||
$fd="array('Ascent'=>".$asc;
|
||||
//Descent
|
||||
$desc=(isset($fm['Descender']) ? $fm['Descender'] : -200);
|
||||
$fd.=",'Descent'=>".$desc;
|
||||
//CapHeight
|
||||
if(isset($fm['CapHeight']))
|
||||
$ch=$fm['CapHeight'];
|
||||
elseif(isset($fm['CapXHeight']))
|
||||
$ch=$fm['CapXHeight'];
|
||||
else
|
||||
$ch=$asc;
|
||||
$fd.=",'CapHeight'=>".$ch;
|
||||
//Flags
|
||||
$flags=0;
|
||||
if(isset($fm['IsFixedPitch']) && $fm['IsFixedPitch'])
|
||||
$flags+=1<<0;
|
||||
if($symbolic)
|
||||
$flags+=1<<2;
|
||||
if(!$symbolic)
|
||||
$flags+=1<<5;
|
||||
if(isset($fm['ItalicAngle']) && $fm['ItalicAngle']!=0)
|
||||
$flags+=1<<6;
|
||||
$fd.=",'Flags'=>".$flags;
|
||||
//FontBBox
|
||||
if(isset($fm['FontBBox']))
|
||||
$fbb=$fm['FontBBox'];
|
||||
else
|
||||
$fbb=array(0,$desc-100,1000,$asc+100);
|
||||
$fd.=",'FontBBox'=>'[".$fbb[0].' '.$fbb[1].' '.$fbb[2].' '.$fbb[3]."]'";
|
||||
//ItalicAngle
|
||||
$ia=(isset($fm['ItalicAngle']) ? $fm['ItalicAngle'] : 0);
|
||||
$fd.=",'ItalicAngle'=>".$ia;
|
||||
//StemV
|
||||
if(isset($fm['StdVW']))
|
||||
$stemv=$fm['StdVW'];
|
||||
elseif(isset($fm['Weight']) && preg_match('/bold|black/i',$fm['Weight']))
|
||||
$stemv=120;
|
||||
else
|
||||
$stemv=70;
|
||||
$fd.=",'StemV'=>".$stemv;
|
||||
//MissingWidth
|
||||
if(isset($fm['MissingWidth']))
|
||||
$fd.=",'MissingWidth'=>".$fm['MissingWidth'];
|
||||
$fd.=')';
|
||||
return $fd;
|
||||
}
|
||||
|
||||
function MakeWidthArray($fm)
|
||||
{
|
||||
//Make character width array
|
||||
$s="array(\n\t";
|
||||
$cw=$fm['Widths'];
|
||||
for($i=0;$i<=255;$i++)
|
||||
{
|
||||
if(chr($i)=="'")
|
||||
$s.="'\\''";
|
||||
elseif(chr($i)=="\\")
|
||||
$s.="'\\\\'";
|
||||
elseif($i>=32 && $i<=126)
|
||||
$s.="'".chr($i)."'";
|
||||
else
|
||||
$s.="chr($i)";
|
||||
$s.='=>'.$fm['Widths'][$i];
|
||||
if($i<255)
|
||||
$s.=',';
|
||||
if(($i+1)%22==0)
|
||||
$s.="\n\t";
|
||||
}
|
||||
$s.=')';
|
||||
return $s;
|
||||
}
|
||||
|
||||
function MakeFontEncoding($map)
|
||||
{
|
||||
//Build differences from reference encoding
|
||||
$ref=ReadMap('cp1252');
|
||||
$s='';
|
||||
$last=0;
|
||||
for($i=32;$i<=255;$i++)
|
||||
{
|
||||
if($map[$i]!=$ref[$i])
|
||||
{
|
||||
if($i!=$last+1)
|
||||
$s.=$i.' ';
|
||||
$last=$i;
|
||||
$s.='/'.$map[$i].' ';
|
||||
}
|
||||
}
|
||||
return rtrim($s);
|
||||
}
|
||||
|
||||
function SaveToFile($file, $s, $mode)
|
||||
{
|
||||
$f=fopen($file,'w'.$mode);
|
||||
if(!$f)
|
||||
die('Can\'t write to file '.$file);
|
||||
fwrite($f,$s,strlen($s));
|
||||
fclose($f);
|
||||
}
|
||||
|
||||
function ReadShort($f)
|
||||
{
|
||||
$a=unpack('n1n',fread($f,2));
|
||||
return $a['n'];
|
||||
}
|
||||
|
||||
function ReadLong($f)
|
||||
{
|
||||
$a=unpack('N1N',fread($f,4));
|
||||
return $a['N'];
|
||||
}
|
||||
|
||||
function CheckTTF($file)
|
||||
{
|
||||
//Check if font license allows embedding
|
||||
$f=fopen($file,'rb');
|
||||
if(!$f)
|
||||
die('<b>Error:</b> Can\'t open '.$file);
|
||||
//Extract number of tables
|
||||
fseek($f,4,SEEK_CUR);
|
||||
$nb=ReadShort($f);
|
||||
fseek($f,6,SEEK_CUR);
|
||||
//Seek OS/2 table
|
||||
$found=false;
|
||||
for($i=0;$i<$nb;$i++)
|
||||
{
|
||||
if(fread($f,4)=='OS/2')
|
||||
{
|
||||
$found=true;
|
||||
break;
|
||||
}
|
||||
fseek($f,12,SEEK_CUR);
|
||||
}
|
||||
if(!$found)
|
||||
{
|
||||
fclose($f);
|
||||
return;
|
||||
}
|
||||
fseek($f,4,SEEK_CUR);
|
||||
$offset=ReadLong($f);
|
||||
fseek($f,$offset,SEEK_SET);
|
||||
//Extract fsType flags
|
||||
fseek($f,8,SEEK_CUR);
|
||||
$fsType=ReadShort($f);
|
||||
$rl=($fsType & 0x02)!=0;
|
||||
$pp=($fsType & 0x04)!=0;
|
||||
$e=($fsType & 0x08)!=0;
|
||||
fclose($f);
|
||||
if($rl && !$pp && !$e)
|
||||
echo '<b>Warning:</b> font license does not allow embedding';
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* fontfile: path to TTF file (or empty string if not to be embedded) *
|
||||
* afmfile: path to AFM file *
|
||||
* enc: font encoding (or empty string for symbolic fonts) *
|
||||
* patch: optional patch for encoding *
|
||||
* type: font type if fontfile is empty *
|
||||
*******************************************************************************/
|
||||
function MakeFont($fontfile, $afmfile, $enc='cp1252', $patch=array(), $type='TrueType')
|
||||
{
|
||||
//Generate a font definition file
|
||||
if(get_magic_quotes_runtime())
|
||||
@set_magic_quotes_runtime(0);
|
||||
ini_set('auto_detect_line_endings','1');
|
||||
if($enc)
|
||||
{
|
||||
$map=ReadMap($enc);
|
||||
foreach($patch as $cc=>$gn)
|
||||
$map[$cc]=$gn;
|
||||
}
|
||||
else
|
||||
$map=array();
|
||||
if(!file_exists($afmfile))
|
||||
die('<b>Error:</b> AFM file not found: '.$afmfile);
|
||||
$fm=ReadAFM($afmfile,$map);
|
||||
if($enc)
|
||||
$diff=MakeFontEncoding($map);
|
||||
else
|
||||
$diff='';
|
||||
$fd=MakeFontDescriptor($fm,empty($map));
|
||||
//Find font type
|
||||
if($fontfile)
|
||||
{
|
||||
$ext=strtolower(substr($fontfile,-3));
|
||||
if($ext=='ttf')
|
||||
$type='TrueType';
|
||||
elseif($ext=='pfb')
|
||||
$type='Type1';
|
||||
else
|
||||
die('<b>Error:</b> unrecognized font file extension: '.$ext);
|
||||
}
|
||||
else
|
||||
{
|
||||
if($type!='TrueType' && $type!='Type1')
|
||||
die('<b>Error:</b> incorrect font type: '.$type);
|
||||
}
|
||||
//Start generation
|
||||
$s='<?php'."\n";
|
||||
$s.='$type=\''.$type."';\n";
|
||||
$s.='$name=\''.$fm['FontName']."';\n";
|
||||
$s.='$desc='.$fd.";\n";
|
||||
if(!isset($fm['UnderlinePosition']))
|
||||
$fm['UnderlinePosition']=-100;
|
||||
if(!isset($fm['UnderlineThickness']))
|
||||
$fm['UnderlineThickness']=50;
|
||||
$s.='$up='.$fm['UnderlinePosition'].";\n";
|
||||
$s.='$ut='.$fm['UnderlineThickness'].";\n";
|
||||
$w=MakeWidthArray($fm);
|
||||
$s.='$cw='.$w.";\n";
|
||||
$s.='$enc=\''.$enc."';\n";
|
||||
$s.='$diff=\''.$diff."';\n";
|
||||
$basename=substr(basename($afmfile),0,-4);
|
||||
if($fontfile)
|
||||
{
|
||||
//Embedded font
|
||||
if(!file_exists($fontfile))
|
||||
die('<b>Error:</b> font file not found: '.$fontfile);
|
||||
if($type=='TrueType')
|
||||
CheckTTF($fontfile);
|
||||
$f=fopen($fontfile,'rb');
|
||||
if(!$f)
|
||||
die('<b>Error:</b> Can\'t open '.$fontfile);
|
||||
$file=fread($f,filesize($fontfile));
|
||||
fclose($f);
|
||||
if($type=='Type1')
|
||||
{
|
||||
//Find first two sections and discard third one
|
||||
$header=(ord($file[0])==128);
|
||||
if($header)
|
||||
{
|
||||
//Strip first binary header
|
||||
$file=substr($file,6);
|
||||
}
|
||||
$pos=strpos($file,'eexec');
|
||||
if(!$pos)
|
||||
die('<b>Error:</b> font file does not seem to be valid Type1');
|
||||
$size1=$pos+6;
|
||||
if($header && ord($file[$size1])==128)
|
||||
{
|
||||
//Strip second binary header
|
||||
$file=substr($file,0,$size1).substr($file,$size1+6);
|
||||
}
|
||||
$pos=strpos($file,'00000000');
|
||||
if(!$pos)
|
||||
die('<b>Error:</b> font file does not seem to be valid Type1');
|
||||
$size2=$pos-$size1;
|
||||
$file=substr($file,0,$size1+$size2);
|
||||
}
|
||||
if(function_exists('gzcompress'))
|
||||
{
|
||||
$cmp=$basename.'.z';
|
||||
SaveToFile($cmp,gzcompress($file),'b');
|
||||
$s.='$file=\''.$cmp."';\n";
|
||||
echo 'Font file compressed ('.$cmp.')<br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$s.='$file=\''.basename($fontfile)."';\n";
|
||||
echo '<b>Notice:</b> font file could not be compressed (zlib extension not available)<br>';
|
||||
}
|
||||
if($type=='Type1')
|
||||
{
|
||||
$s.='$size1='.$size1.";\n";
|
||||
$s.='$size2='.$size2.";\n";
|
||||
}
|
||||
else
|
||||
$s.='$originalsize='.filesize($fontfile).";\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
//Not embedded font
|
||||
$s.='$file='."'';\n";
|
||||
}
|
||||
$s.="?>\n";
|
||||
SaveToFile($basename.'.php',$s,'t');
|
||||
echo 'Font definition file generated ('.$basename.'.php'.')<br>';
|
||||
}
|
||||
?>
|
||||
|
@@ -1,19 +1,19 @@
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Symbol';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549,
|
||||
','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722,
|
||||
'B'=>667,'C'=>722,'D'=>612,'E'=>611,'F'=>763,'G'=>603,'H'=>722,'I'=>333,'J'=>631,'K'=>722,'L'=>686,'M'=>889,'N'=>722,'O'=>722,'P'=>768,'Q'=>741,'R'=>556,'S'=>592,'T'=>611,'U'=>690,'V'=>439,'W'=>768,
|
||||
'X'=>645,'Y'=>795,'Z'=>611,'['=>333,'\\'=>863,']'=>333,'^'=>658,'_'=>500,'`'=>500,'a'=>631,'b'=>549,'c'=>549,'d'=>494,'e'=>439,'f'=>521,'g'=>411,'h'=>603,'i'=>329,'j'=>603,'k'=>549,'l'=>549,'m'=>576,
|
||||
'n'=>521,'o'=>549,'p'=>549,'q'=>521,'r'=>549,'s'=>603,'t'=>439,'u'=>576,'v'=>713,'w'=>686,'x'=>493,'y'=>686,'z'=>494,'{'=>480,'|'=>200,'}'=>480,'~'=>549,chr(127)=>0,chr(128)=>0,chr(129)=>0,chr(130)=>0,chr(131)=>0,
|
||||
chr(132)=>0,chr(133)=>0,chr(134)=>0,chr(135)=>0,chr(136)=>0,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>0,chr(141)=>0,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
|
||||
chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>750,chr(161)=>620,chr(162)=>247,chr(163)=>549,chr(164)=>167,chr(165)=>713,chr(166)=>500,chr(167)=>753,chr(168)=>753,chr(169)=>753,chr(170)=>753,chr(171)=>1042,chr(172)=>987,chr(173)=>603,chr(174)=>987,chr(175)=>603,
|
||||
chr(176)=>400,chr(177)=>549,chr(178)=>411,chr(179)=>549,chr(180)=>549,chr(181)=>713,chr(182)=>494,chr(183)=>460,chr(184)=>549,chr(185)=>549,chr(186)=>549,chr(187)=>549,chr(188)=>1000,chr(189)=>603,chr(190)=>1000,chr(191)=>658,chr(192)=>823,chr(193)=>686,chr(194)=>795,chr(195)=>987,chr(196)=>768,chr(197)=>768,
|
||||
chr(198)=>823,chr(199)=>768,chr(200)=>768,chr(201)=>713,chr(202)=>713,chr(203)=>713,chr(204)=>713,chr(205)=>713,chr(206)=>713,chr(207)=>713,chr(208)=>768,chr(209)=>713,chr(210)=>790,chr(211)=>790,chr(212)=>890,chr(213)=>823,chr(214)=>549,chr(215)=>250,chr(216)=>713,chr(217)=>603,chr(218)=>603,chr(219)=>1042,
|
||||
chr(220)=>987,chr(221)=>603,chr(222)=>987,chr(223)=>603,chr(224)=>494,chr(225)=>329,chr(226)=>790,chr(227)=>790,chr(228)=>786,chr(229)=>713,chr(230)=>384,chr(231)=>384,chr(232)=>384,chr(233)=>384,chr(234)=>384,chr(235)=>384,chr(236)=>494,chr(237)=>494,chr(238)=>494,chr(239)=>494,chr(240)=>0,chr(241)=>329,
|
||||
chr(242)=>274,chr(243)=>686,chr(244)=>686,chr(245)=>686,chr(246)=>384,chr(247)=>384,chr(248)=>384,chr(249)=>384,chr(250)=>384,chr(251)=>384,chr(252)=>494,chr(253)=>494,chr(254)=>494,chr(255)=>0);
|
||||
?>
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Symbol';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549,
|
||||
','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722,
|
||||
'B'=>667,'C'=>722,'D'=>612,'E'=>611,'F'=>763,'G'=>603,'H'=>722,'I'=>333,'J'=>631,'K'=>722,'L'=>686,'M'=>889,'N'=>722,'O'=>722,'P'=>768,'Q'=>741,'R'=>556,'S'=>592,'T'=>611,'U'=>690,'V'=>439,'W'=>768,
|
||||
'X'=>645,'Y'=>795,'Z'=>611,'['=>333,'\\'=>863,']'=>333,'^'=>658,'_'=>500,'`'=>500,'a'=>631,'b'=>549,'c'=>549,'d'=>494,'e'=>439,'f'=>521,'g'=>411,'h'=>603,'i'=>329,'j'=>603,'k'=>549,'l'=>549,'m'=>576,
|
||||
'n'=>521,'o'=>549,'p'=>549,'q'=>521,'r'=>549,'s'=>603,'t'=>439,'u'=>576,'v'=>713,'w'=>686,'x'=>493,'y'=>686,'z'=>494,'{'=>480,'|'=>200,'}'=>480,'~'=>549,chr(127)=>0,chr(128)=>0,chr(129)=>0,chr(130)=>0,chr(131)=>0,
|
||||
chr(132)=>0,chr(133)=>0,chr(134)=>0,chr(135)=>0,chr(136)=>0,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>0,chr(141)=>0,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
|
||||
chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>750,chr(161)=>620,chr(162)=>247,chr(163)=>549,chr(164)=>167,chr(165)=>713,chr(166)=>500,chr(167)=>753,chr(168)=>753,chr(169)=>753,chr(170)=>753,chr(171)=>1042,chr(172)=>987,chr(173)=>603,chr(174)=>987,chr(175)=>603,
|
||||
chr(176)=>400,chr(177)=>549,chr(178)=>411,chr(179)=>549,chr(180)=>549,chr(181)=>713,chr(182)=>494,chr(183)=>460,chr(184)=>549,chr(185)=>549,chr(186)=>549,chr(187)=>549,chr(188)=>1000,chr(189)=>603,chr(190)=>1000,chr(191)=>658,chr(192)=>823,chr(193)=>686,chr(194)=>795,chr(195)=>987,chr(196)=>768,chr(197)=>768,
|
||||
chr(198)=>823,chr(199)=>768,chr(200)=>768,chr(201)=>713,chr(202)=>713,chr(203)=>713,chr(204)=>713,chr(205)=>713,chr(206)=>713,chr(207)=>713,chr(208)=>768,chr(209)=>713,chr(210)=>790,chr(211)=>790,chr(212)=>890,chr(213)=>823,chr(214)=>549,chr(215)=>250,chr(216)=>713,chr(217)=>603,chr(218)=>603,chr(219)=>1042,
|
||||
chr(220)=>987,chr(221)=>603,chr(222)=>987,chr(223)=>603,chr(224)=>494,chr(225)=>329,chr(226)=>790,chr(227)=>790,chr(228)=>786,chr(229)=>713,chr(230)=>384,chr(231)=>384,chr(232)=>384,chr(233)=>384,chr(234)=>384,chr(235)=>384,chr(236)=>494,chr(237)=>494,chr(238)=>494,chr(239)=>494,chr(240)=>0,chr(241)=>329,
|
||||
chr(242)=>274,chr(243)=>686,chr(244)=>686,chr(245)=>686,chr(246)=>384,chr(247)=>384,chr(248)=>384,chr(249)=>384,chr(250)=>384,chr(251)=>384,chr(252)=>494,chr(253)=>494,chr(254)=>494,chr(255)=>0);
|
||||
?>
|
||||
|
@@ -1,19 +1,19 @@
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Times-Roman';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722,
|
||||
'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944,
|
||||
'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
|
||||
'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>889,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>980,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>722,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>500);
|
||||
?>
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Times-Roman';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722,
|
||||
'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944,
|
||||
'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
|
||||
'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>889,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>980,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>722,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>500);
|
||||
?>
|
||||
|
@@ -1,19 +1,19 @@
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Times-Bold';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>778,'I'=>389,'J'=>500,'K'=>778,'L'=>667,'M'=>944,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>722,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000,
|
||||
'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833,
|
||||
'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>667,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Times-Bold';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>778,'I'=>389,'J'=>500,'K'=>778,'L'=>667,'M'=>944,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>722,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000,
|
||||
'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833,
|
||||
'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>667,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
||||
|
@@ -1,19 +1,19 @@
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Times-BoldItalic';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667,
|
||||
'B'=>667,'C'=>667,'D'=>722,'E'=>667,'F'=>667,'G'=>722,'H'=>778,'I'=>389,'J'=>500,'K'=>667,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>611,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889,
|
||||
'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
|
||||
'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>389,chr(159)=>611,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>944,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>611,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>444,chr(254)=>500,chr(255)=>444);
|
||||
?>
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Times-BoldItalic';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667,
|
||||
'B'=>667,'C'=>667,'D'=>722,'E'=>667,'F'=>667,'G'=>722,'H'=>778,'I'=>389,'J'=>500,'K'=>667,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>611,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889,
|
||||
'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
|
||||
'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>389,chr(159)=>611,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>944,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>611,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>444,chr(254)=>500,chr(255)=>444);
|
||||
?>
|
||||
|
@@ -1,19 +1,19 @@
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Times-Italic';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611,
|
||||
'B'=>611,'C'=>667,'D'=>722,'E'=>611,'F'=>611,'G'=>722,'H'=>722,'I'=>333,'J'=>444,'K'=>667,'L'=>556,'M'=>833,'N'=>667,'O'=>722,'P'=>611,'Q'=>722,'R'=>611,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833,
|
||||
'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722,
|
||||
'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>500,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>556,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>333,chr(153)=>980,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>667,chr(157)=>350,chr(158)=>389,chr(159)=>556,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611,
|
||||
chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>556,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>500,chr(255)=>444);
|
||||
?>
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'Times-Italic';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611,
|
||||
'B'=>611,'C'=>667,'D'=>722,'E'=>611,'F'=>611,'G'=>722,'H'=>722,'I'=>333,'J'=>444,'K'=>667,'L'=>556,'M'=>833,'N'=>667,'O'=>722,'P'=>611,'Q'=>722,'R'=>611,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833,
|
||||
'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722,
|
||||
'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>500,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>556,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>333,chr(153)=>980,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>667,chr(157)=>350,chr(158)=>389,chr(159)=>556,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611,
|
||||
chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>556,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>500,chr(255)=>444);
|
||||
?>
|
||||
|
@@ -1,19 +1,19 @@
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'ZapfDingbats';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0,
|
||||
chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939,
|
||||
','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692,
|
||||
'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776,
|
||||
'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873,
|
||||
'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,chr(127)=>0,chr(128)=>390,chr(129)=>390,chr(130)=>317,chr(131)=>317,
|
||||
chr(132)=>276,chr(133)=>276,chr(134)=>509,chr(135)=>509,chr(136)=>410,chr(137)=>410,chr(138)=>234,chr(139)=>234,chr(140)=>334,chr(141)=>334,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
|
||||
chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>0,chr(161)=>732,chr(162)=>544,chr(163)=>544,chr(164)=>910,chr(165)=>667,chr(166)=>760,chr(167)=>760,chr(168)=>776,chr(169)=>595,chr(170)=>694,chr(171)=>626,chr(172)=>788,chr(173)=>788,chr(174)=>788,chr(175)=>788,
|
||||
chr(176)=>788,chr(177)=>788,chr(178)=>788,chr(179)=>788,chr(180)=>788,chr(181)=>788,chr(182)=>788,chr(183)=>788,chr(184)=>788,chr(185)=>788,chr(186)=>788,chr(187)=>788,chr(188)=>788,chr(189)=>788,chr(190)=>788,chr(191)=>788,chr(192)=>788,chr(193)=>788,chr(194)=>788,chr(195)=>788,chr(196)=>788,chr(197)=>788,
|
||||
chr(198)=>788,chr(199)=>788,chr(200)=>788,chr(201)=>788,chr(202)=>788,chr(203)=>788,chr(204)=>788,chr(205)=>788,chr(206)=>788,chr(207)=>788,chr(208)=>788,chr(209)=>788,chr(210)=>788,chr(211)=>788,chr(212)=>894,chr(213)=>838,chr(214)=>1016,chr(215)=>458,chr(216)=>748,chr(217)=>924,chr(218)=>748,chr(219)=>918,
|
||||
chr(220)=>927,chr(221)=>928,chr(222)=>928,chr(223)=>834,chr(224)=>873,chr(225)=>828,chr(226)=>924,chr(227)=>924,chr(228)=>917,chr(229)=>930,chr(230)=>931,chr(231)=>463,chr(232)=>883,chr(233)=>836,chr(234)=>836,chr(235)=>867,chr(236)=>867,chr(237)=>696,chr(238)=>696,chr(239)=>874,chr(240)=>0,chr(241)=>874,
|
||||
chr(242)=>760,chr(243)=>946,chr(244)=>771,chr(245)=>865,chr(246)=>771,chr(247)=>888,chr(248)=>967,chr(249)=>888,chr(250)=>831,chr(251)=>873,chr(252)=>927,chr(253)=>970,chr(254)=>918,chr(255)=>0);
|
||||
?>
|
||||
<?php
|
||||
$type = 'Core';
|
||||
$name = 'ZapfDingbats';
|
||||
$up = -100;
|
||||
$ut = 50;
|
||||
$cw = array(
|
||||
chr(0)=>0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0,
|
||||
chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939,
|
||||
','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692,
|
||||
'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776,
|
||||
'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873,
|
||||
'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,chr(127)=>0,chr(128)=>390,chr(129)=>390,chr(130)=>317,chr(131)=>317,
|
||||
chr(132)=>276,chr(133)=>276,chr(134)=>509,chr(135)=>509,chr(136)=>410,chr(137)=>410,chr(138)=>234,chr(139)=>234,chr(140)=>334,chr(141)=>334,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
|
||||
chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>0,chr(161)=>732,chr(162)=>544,chr(163)=>544,chr(164)=>910,chr(165)=>667,chr(166)=>760,chr(167)=>760,chr(168)=>776,chr(169)=>595,chr(170)=>694,chr(171)=>626,chr(172)=>788,chr(173)=>788,chr(174)=>788,chr(175)=>788,
|
||||
chr(176)=>788,chr(177)=>788,chr(178)=>788,chr(179)=>788,chr(180)=>788,chr(181)=>788,chr(182)=>788,chr(183)=>788,chr(184)=>788,chr(185)=>788,chr(186)=>788,chr(187)=>788,chr(188)=>788,chr(189)=>788,chr(190)=>788,chr(191)=>788,chr(192)=>788,chr(193)=>788,chr(194)=>788,chr(195)=>788,chr(196)=>788,chr(197)=>788,
|
||||
chr(198)=>788,chr(199)=>788,chr(200)=>788,chr(201)=>788,chr(202)=>788,chr(203)=>788,chr(204)=>788,chr(205)=>788,chr(206)=>788,chr(207)=>788,chr(208)=>788,chr(209)=>788,chr(210)=>788,chr(211)=>788,chr(212)=>894,chr(213)=>838,chr(214)=>1016,chr(215)=>458,chr(216)=>748,chr(217)=>924,chr(218)=>748,chr(219)=>918,
|
||||
chr(220)=>927,chr(221)=>928,chr(222)=>928,chr(223)=>834,chr(224)=>873,chr(225)=>828,chr(226)=>924,chr(227)=>924,chr(228)=>917,chr(229)=>930,chr(230)=>931,chr(231)=>463,chr(232)=>883,chr(233)=>836,chr(234)=>836,chr(235)=>867,chr(236)=>867,chr(237)=>696,chr(238)=>696,chr(239)=>874,chr(240)=>0,chr(241)=>874,
|
||||
chr(242)=>760,chr(243)=>946,chr(244)=>771,chr(245)=>865,chr(246)=>771,chr(247)=>888,chr(248)=>967,chr(249)=>888,chr(250)=>831,chr(251)=>873,chr(252)=>927,chr(253)=>970,chr(254)=>918,chr(255)=>0);
|
||||
?>
|
||||
|
21
fpdf.css
21
fpdf.css
@@ -1,21 +0,0 @@
|
||||
body {font-family:"Times New Roman",serif}
|
||||
h1 {font:bold 135% Arial,sans-serif; color:#4000A0; margin-bottom:0.9em}
|
||||
h2 {font:bold 95% Arial,sans-serif; color:#900000; margin-top:1.5em; margin-bottom:1em}
|
||||
dl.param dt {text-decoration:underline}
|
||||
dl.param dd {margin-top:1em; margin-bottom:1em}
|
||||
dl.param ul {margin-top:1em; margin-bottom:1em}
|
||||
tt, code, kbd {font-family:"Courier New",Courier,monospace; font-size:82%}
|
||||
div.source {margin-top:1.4em; margin-bottom:1.3em}
|
||||
div.source pre {display:table; border:1px solid #24246A; width:100%; margin:0em; font-family:inherit; font-size:100%}
|
||||
div.source code {display:block; border:1px solid #C5C5EC; background-color:#F0F5FF; padding:6px; color:#000000}
|
||||
div.doc-source {margin-top:1.4em; margin-bottom:1.3em}
|
||||
div.doc-source pre {display:table; width:100%; margin:0em; font-family:inherit; font-size:100%}
|
||||
div.doc-source code {display:block; background-color:#E0E0E0; padding:4px}
|
||||
.kw {color:#000080; font-weight:bold}
|
||||
.str {color:#CC0000}
|
||||
.cmt {color:#008000}
|
||||
p.demo {text-align:center; margin-top:-0.9em}
|
||||
a.demo {text-decoration:none; font-weight:bold; color:#0000CC}
|
||||
a.demo:link {text-decoration:none; font-weight:bold; color:#0000CC}
|
||||
a.demo:hover {text-decoration:none; font-weight:bold; color:#0000FF}
|
||||
a.demo:active {text-decoration:none; font-weight:bold; color:#0000FF}
|
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Fichero de configuración donde se introducirán los valores para
|
||||
* la conexión con el servidor MySQL y otros para personalizar la aplicación.
|
||||
* @package Inventario
|
||||
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.txt
|
||||
* This file is part of Inventario.
|
||||
* Inventario is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Inventario is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Inventario. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
define('AUTOR','Ricardo Montañana Gómez');
|
||||
define('SERVIDOR','localhost'); //Ubicación del servidor MySQL
|
||||
define('BASEDATOS','Inventario2'); //Nombre de la base de datos.
|
||||
define('USUARIO','test'); //Usuario con permisos de lectura/escritura en la base de datos
|
||||
define('CLAVE','tset'); //contraseña del usuario.
|
||||
define('VERSION','0.97 Beta');
|
||||
define('PROGRAMA','Gestión de Inventario.');
|
||||
define('CENTRO','I.E.S.O. Pascual Serrano');
|
||||
define('APLICACION',CENTRO.' '.PROGRAMA.VERSION);
|
||||
define('NUMFILAS',17); // Número de registros a mostrar en las pantallas de consulta iniciales
|
||||
define('PAUSA',2);//Nº segundos de pausa para mostrar mensaje id insertado
|
||||
define('ESTILO','personal'); //Estilo de los iconos de edición (personal, personal, personal)
|
||||
define('PLANTILLA','bootstrap'); //Estilo de la plantilla y recursos a utilizar
|
||||
?>
|
@@ -1,36 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* Fichero de configuración donde se introducirán los valores para
|
||||
* la conexión con el servidor MySQL y otros para personalizar la aplicación.
|
||||
* @package Inventario
|
||||
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.txt
|
||||
* This file is part of Inventario.
|
||||
* Inventario is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Inventario is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Inventario. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
define('AUTOR','Ricardo Montañana Gómez');
|
||||
define('SERVIDOR','localhost'); //Ubicación del servidor MySQL
|
||||
define('BASEDATOS','Inventario2'); //Nombre de la base de datos.
|
||||
define('USUARIO','test'); //Usuario con permisos de lectura/escritura en la base de datos
|
||||
define('CLAVE','tset'); //contraseña del usuario.
|
||||
define('VERSION','1.00 Beta');
|
||||
define('PROGRAMA','Gestión de Inventario.');
|
||||
define('CENTRO','I.E.S.O. Pascual Serrano');
|
||||
define('APLICACION',CENTRO.' '.PROGRAMA.VERSION);
|
||||
define('NUMFILAS',17); // Número de registros a mostrar en las pantallas de consulta iniciales
|
||||
define('PAUSA',2);//Nº segundos de pausa para mostrar mensaje id insertado
|
||||
define('ESTILO','personal'); //Estilo de los iconos de edición (personal, personal, personal)
|
||||
define('PLANTILLA','bootstrap'); //Estilo de la plantilla y recursos a utilizar
|
||||
|
||||
/**
|
||||
* Fichero de configuración donde se introducirán los valores para
|
||||
* la conexión con el servidor MySQL y otros para personalizar la aplicación.
|
||||
* @package Inventario
|
||||
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.txt
|
||||
* This file is part of Inventario.
|
||||
* Inventario is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Inventario is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Inventario. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
require_once 'version.inc';
|
||||
|
||||
define('SERVIDOR', 'localhost'); //Ubicación del servidor MySQL
|
||||
define('PUERTO', '3306'); //Puerto donde se conecta a MySQL
|
||||
define('BASEDATOS', 'Inventario2'); //Nombre de la base de datos.
|
||||
define('BASEDATOSTEST', 'Inventario_test'); //Base de datos para los tests.
|
||||
define('USUARIO', 'test'); //Usuario con permisos de lectura/escritura en la base de datos
|
||||
define('CLAVE', 'tset'); //contraseña del usuario.
|
||||
define('PROGRAMA', 'Gestión de Inventario.');
|
||||
define('CENTRO', 'I.E.S.O. Pascual Serrano');
|
||||
define('NUMFILAS', '17'); // Número de registros a mostrar en las pantallas de consulta iniciales
|
||||
define('PAUSA', '2'); //Nº segundos de pausa para mostrar mensaje id insertado
|
||||
define('ESTILO', '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('MYSQLDUMP', '/usr/local/bin/mysqldump'); //camino a mysqldump
|
||||
define('GZIP', '/usr/bin/gzip'); //Camino a gzip
|
||||
?>
|
||||
|
@@ -10,4 +10,5 @@
|
||||
2|Descuadres|index.php?descuadres|_blank|Diferencias entre artículos y elementos
|
||||
1|Varios|||
|
||||
2|Configuración|index.php?configuracion|_self|Opciones configurables de la aplicación
|
||||
2|Importación|index.php?importacion&opc=form|_self|Importa datos de una hoja de cálculo
|
||||
2|Importación|index.php?importacion&opc=form|_self|Importa datos de una hoja de cálculo
|
||||
2|Copia Datos|index.php?copiaseg|_self|Realiza una copia de seguridad de los datos de la aplicación
|
27
inc/version.inc
Normal file
27
inc/version.inc
Normal 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.04');
|
||||
?>
|
188
makedoc.sh
188
makedoc.sh
@@ -1,94 +1,94 @@
|
||||
#!/bin/bash
|
||||
# $Id: makedoc.sh,v 1.2 2007/12/10 01:11:19 ashnazg Exp $
|
||||
|
||||
#/**
|
||||
# * makedoc - PHPDocumentor script to save your settings
|
||||
# *
|
||||
# * Put this file inside your PHP project homedir, edit its variables and run whenever you wants to
|
||||
# * re/make your project documentation.
|
||||
# *
|
||||
# * The version of this file is the version of PHPDocumentor it is compatible.
|
||||
# *
|
||||
# * It simples run phpdoc with the parameters you set in this file.
|
||||
# * NOTE: Do not add spaces after bash variables.
|
||||
# *
|
||||
# * @copyright makedoc.sh is part of PHPDocumentor project {@link http://freshmeat.net/projects/phpdocu/} and its LGPL
|
||||
# * @author Roberto Berto <darkelder (inside) users (dot) sourceforge (dot) net>
|
||||
# * @version Release-1.1.0
|
||||
# */
|
||||
|
||||
|
||||
##############################
|
||||
# should be edited
|
||||
##############################
|
||||
|
||||
#/**
|
||||
# * title of generated documentation, default is 'Generated Documentation'
|
||||
# *
|
||||
# * @var string TITLE
|
||||
# */
|
||||
TITLE="Inventario"
|
||||
|
||||
#/**
|
||||
# * name to use for the default package. If not specified, uses 'default'
|
||||
# *
|
||||
# * @var string PACKAGES
|
||||
# */
|
||||
PACKAGES="Inventario"
|
||||
|
||||
#/**
|
||||
# * name of a directory(s) to parse directory1,directory2
|
||||
# * $PWD is the directory where makedoc.sh
|
||||
# *
|
||||
# * @var string PATH_PROJECT
|
||||
# */
|
||||
PATH_PROJECT=$PWD
|
||||
|
||||
#/**
|
||||
# * path of PHPDoc executable
|
||||
# *
|
||||
# * @var string PATH_PHPDOC
|
||||
# */
|
||||
PATH_PHPDOC=/usr/bin/phpdoc
|
||||
|
||||
#/**
|
||||
# * where documentation will be put
|
||||
# *
|
||||
# * @var string PATH_DOCS
|
||||
# */
|
||||
PATH_DOCS=$PWD/docs
|
||||
|
||||
#/**
|
||||
# * what outputformat to use (html/pdf)
|
||||
# *
|
||||
# * @var string OUTPUTFORMAT
|
||||
# */
|
||||
OUTPUTFORMAT=HTML
|
||||
|
||||
#/**
|
||||
# * converter to be used
|
||||
# *
|
||||
# * @var string CONVERTER
|
||||
# */
|
||||
CONVERTER=Smarty
|
||||
|
||||
#/**
|
||||
# * template to use
|
||||
# *
|
||||
# * @var string TEMPLATE
|
||||
# */
|
||||
TEMPLATE=default
|
||||
|
||||
#/**
|
||||
# * parse elements marked as private
|
||||
# *
|
||||
# * @var bool (on/off) PRIVATE
|
||||
# */
|
||||
PRIVATE=on
|
||||
|
||||
# make documentation
|
||||
/usr/bin/phpdoc -d "$PATH_PROJECT" -t "$PATH_DOCS" -ti "$TITLE" -dn $PACKAGES \
|
||||
-o $OUTPUTFORMAT:$CONVERTER:$TEMPLATE -pp $PRIVATE
|
||||
|
||||
|
||||
# vim: set expandtab :
|
||||
#!/bin/bash
|
||||
# $Id: makedoc.sh,v 1.2 2007/12/10 01:11:19 ashnazg Exp $
|
||||
|
||||
#/**
|
||||
# * makedoc - PHPDocumentor script to save your settings
|
||||
# *
|
||||
# * Put this file inside your PHP project homedir, edit its variables and run whenever you wants to
|
||||
# * re/make your project documentation.
|
||||
# *
|
||||
# * The version of this file is the version of PHPDocumentor it is compatible.
|
||||
# *
|
||||
# * It simples run phpdoc with the parameters you set in this file.
|
||||
# * NOTE: Do not add spaces after bash variables.
|
||||
# *
|
||||
# * @copyright makedoc.sh is part of PHPDocumentor project {@link http://freshmeat.net/projects/phpdocu/} and its LGPL
|
||||
# * @author Roberto Berto <darkelder (inside) users (dot) sourceforge (dot) net>
|
||||
# * @version Release-1.1.0
|
||||
# */
|
||||
|
||||
|
||||
##############################
|
||||
# should be edited
|
||||
##############################
|
||||
|
||||
#/**
|
||||
# * title of generated documentation, default is 'Generated Documentation'
|
||||
# *
|
||||
# * @var string TITLE
|
||||
# */
|
||||
TITLE="Inventario"
|
||||
|
||||
#/**
|
||||
# * name to use for the default package. If not specified, uses 'default'
|
||||
# *
|
||||
# * @var string PACKAGES
|
||||
# */
|
||||
PACKAGES="Inventario"
|
||||
|
||||
#/**
|
||||
# * name of a directory(s) to parse directory1,directory2
|
||||
# * $PWD is the directory where makedoc.sh
|
||||
# *
|
||||
# * @var string PATH_PROJECT
|
||||
# */
|
||||
PATH_PROJECT=$PWD
|
||||
|
||||
#/**
|
||||
# * path of PHPDoc executable
|
||||
# *
|
||||
# * @var string PATH_PHPDOC
|
||||
# */
|
||||
PATH_PHPDOC=/usr/bin/phpdoc
|
||||
|
||||
#/**
|
||||
# * where documentation will be put
|
||||
# *
|
||||
# * @var string PATH_DOCS
|
||||
# */
|
||||
PATH_DOCS=$PWD/docs
|
||||
|
||||
#/**
|
||||
# * what outputformat to use (html/pdf)
|
||||
# *
|
||||
# * @var string OUTPUTFORMAT
|
||||
# */
|
||||
OUTPUTFORMAT=HTML
|
||||
|
||||
#/**
|
||||
# * converter to be used
|
||||
# *
|
||||
# * @var string CONVERTER
|
||||
# */
|
||||
CONVERTER=Smarty
|
||||
|
||||
#/**
|
||||
# * template to use
|
||||
# *
|
||||
# * @var string TEMPLATE
|
||||
# */
|
||||
TEMPLATE=default
|
||||
|
||||
#/**
|
||||
# * parse elements marked as private
|
||||
# *
|
||||
# * @var bool (on/off) PRIVATE
|
||||
# */
|
||||
PRIVATE=on
|
||||
|
||||
# make documentation
|
||||
/usr/bin/phpdoc -d "$PATH_PROJECT" -t "$PATH_DOCS" -ti "$TITLE" -dn $PACKAGES \
|
||||
-o $OUTPUTFORMAT:$CONVERTER:$TEMPLATE -pp $PRIVATE
|
||||
|
||||
|
||||
# vim: set expandtab :
|
||||
|
@@ -1,3 +0,0 @@
|
||||
<?
|
||||
phpinfo();
|
||||
?>
|
3312
phpqrcode.php
Normal file
3312
phpqrcode.php
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,30 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- saved from url=(0043)http://getbootstrap.com/examples/dashboard/ -->
|
||||
<html lang="en">
|
||||
<html lang="es">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta charset="iso-8859-1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="Ricardo Monta<EFBFBD>ana">
|
||||
<meta name="author" content="Ricardo Montañana">
|
||||
<link rel="shortcut icon" href="img/tux.ico">
|
||||
<title>Inventario</title>
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="css/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="css/dashboard.css" rel="stylesheet">
|
||||
<link href="css/dashboard.php" rel="stylesheet">
|
||||
<link href="css/bootstrap-datetimepicker.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="css/jquery.simplecolorpicker.css">
|
||||
<link rel="stylesheet" href="css/jquery.simplecolorpicker-glyphicons.css">
|
||||
<style type="text/css"></style>
|
||||
<style id="clearly_highlighting_css" type="text/css">/* selection */ html.clearly_highlighting_enabled ::-moz-selection { background: rgba(246, 238, 150, 0.99); } html.clearly_highlighting_enabled ::selection { background: rgba(246, 238, 150, 0.99); } /* cursor */ html.clearly_highlighting_enabled { /* cursor and hot-spot position -- requires a default cursor, after the URL one */ cursor: url("chrome-extension://pioclpoplcdbaefihamjohnefbikjilc/clearly/images/highlight--cursor.png") 14 16, text; } /* highlight tag */ em.clearly_highlight_element { font-style: inherit !important; font-weight: inherit !important; background-image: url("chrome-extension://pioclpoplcdbaefihamjohnefbikjilc/clearly/images/highlight--yellow.png"); background-repeat: repeat-x; background-position: top left; background-size: 100% 100%; } /* the delete-buttons are positioned relative to this */ em.clearly_highlight_element.clearly_highlight_first { position: relative; } /* delete buttons */ em.clearly_highlight_element a.clearly_highlight_delete_element { display: none; cursor: pointer; padding: 0; margin: 0; line-height: 0; position: absolute; width: 34px; height: 34px; left: -17px; top: -17px; background-image: url("chrome-extension://pioclpoplcdbaefihamjohnefbikjilc/clearly/images/highlight--delete-sprite.png"); background-repeat: no-repeat; background-position: 0px 0px; } em.clearly_highlight_element a.clearly_highlight_delete_element:hover { background-position: -34px 0px; } /* retina */ @media (min--moz-device-pixel-ratio: 2), (-webkit-min-device-pixel-ratio: 2), (min-device-pixel-ratio: 2) { em.clearly_highlight_element { background-image: url("chrome-extension://pioclpoplcdbaefihamjohnefbikjilc/clearly/images/highlight--yellow@2x.png"); } em.clearly_highlight_element a.clearly_highlight_delete_element { background-image: url("chrome-extension://pioclpoplcdbaefihamjohnefbikjilc/clearly/images/highlight--delete-sprite@2x.png"); background-size: 68px 34px; } } </style><style id="holderjs-style" type="text/css"></style><style>[touch-action="none"]{ -ms-touch-action: none; touch-action: none; }[touch-action="pan-x"]{ -ms-touch-action: pan-x; touch-action: pan-x; }[touch-action="pan-y"]{ -ms-touch-action: pan-y; touch-action: pan-y; }[touch-action="scroll"],[touch-action="pan-x pan-y"],[touch-action="pan-y pan-x"]{ -ms-touch-action: pan-x pan-y; touch-action: pan-x pan-y; }
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="./css/jquery.min.js"></script>
|
||||
</head>
|
||||
<body bgcolor="#C4FAEC">
|
||||
<body>
|
||||
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="#">{usuario}</a></li>
|
||||
<!--<li><a href="#">{usuario}</a></li>-->
|
||||
<li><a href="#">{fecha}</a></li>
|
||||
<li>{control}</li>
|
||||
</ul>
|
||||
@@ -88,5 +88,6 @@
|
||||
<script type="text/javascript" src="./css/moment.min.js"></script>
|
||||
<script type="text/javascript" src="./css/bootstrap-datetimepicker.min.js"></script>
|
||||
<script type="text/javascript" src="./css/bootstrap-datetimepicker.es.js"></script>
|
||||
<script type="text/javascript" src="./css/jquery.simplecolorpicker.js"></script>
|
||||
</body>
|
||||
</html>
|
@@ -1,7 +1,7 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" >
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" >
|
||||
<title>Gestión de Inventario</title>
|
||||
<link rel="stylesheet" href="css/estilo.css" type="text/css">
|
||||
<link rel="shortcut icon" href="img/tux.ico">
|
||||
|
@@ -84,7 +84,7 @@ SET @saved_cs_client = @@character_set_client;
|
||||
SET character_set_client = utf8;
|
||||
CREATE TABLE `Ubicaciones` (
|
||||
`id` smallint(5) unsigned NOT NULL auto_increment,
|
||||
`Descripcion` varchar(30) NOT NULL COMMENT 'ordenable,link/Ubicacion',
|
||||
`Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,link/Ubicacion',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=184 DEFAULT CHARSET=latin1;
|
||||
SET character_set_client = @saved_cs_client;
|
168
sql/inv-utf.sql
Normal file
168
sql/inv-utf.sql
Normal file
File diff suppressed because one or more lines are too long
@@ -28,7 +28,7 @@ CREATE TABLE `Articulos` (
|
||||
`modelo` varchar(20) default NULL COMMENT 'ordenable',
|
||||
`cantidad` int(11) default NULL COMMENT 'ordenable',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=785 DEFAULT CHARSET=latin1;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=785 DEFAULT CHARSET=utf8;
|
||||
SET character_set_client = @saved_cs_client;
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ CREATE TABLE `Elementos` (
|
||||
KEY `id_Ubicacion` (`id_Ubicacion`),
|
||||
CONSTRAINT `Elementos_ibfk_1` FOREIGN KEY (`id_Articulo`) REFERENCES `Articulos` (`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `Elementos_ibfk_2` FOREIGN KEY (`id_Ubicacion`) REFERENCES `Ubicaciones` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1884 DEFAULT CHARSET=latin1;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1884 DEFAULT CHARSET=utf8;
|
||||
SET character_set_client = @saved_cs_client;
|
||||
|
||||
|
||||
@@ -65,9 +65,9 @@ SET @saved_cs_client = @@character_set_client;
|
||||
SET character_set_client = utf8;
|
||||
CREATE TABLE `Ubicaciones` (
|
||||
`id` smallint(5) unsigned NOT NULL auto_increment,
|
||||
`Descripcion` varchar(30) NOT NULL COMMENT 'ordenable,link/Ubicacion',
|
||||
`Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,link/Ubicacion',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=184 DEFAULT CHARSET=latin1;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=184 DEFAULT CHARSET=utf8;
|
||||
SET character_set_client = @saved_cs_client;
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ CREATE TABLE `Usuarios` (
|
||||
`config` tinyint(1) NOT NULL default '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `nombre` (`nombre`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
|
||||
SET character_set_client = @saved_cs_client;
|
||||
|
||||
--
|
||||
@@ -101,7 +101,7 @@ SET character_set_client = @saved_cs_client;
|
||||
|
||||
LOCK TABLES `Usuarios` WRITE;
|
||||
/*!40000 ALTER TABLE `Usuarios` DISABLE KEYS */;
|
||||
INSERT INTO `Usuarios` VALUES (1,'admin','galeote','s3LUSqxg{s',1,1,1,1,1,1,1),(2,'demo','demo','NogP_U0Byi',0,0,0,1,1,0,0);
|
||||
INSERT INTO `Usuarios` VALUES (1,'admin','pruebas','s3LUSqxg{s',1,1,1,1,1,1,1),(2,'demo','pruebas','NogP_U0Byi',0,0,0,1,1,0,0);
|
||||
/*!40000 ALTER TABLE `Usuarios` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
@@ -22,8 +22,8 @@
|
||||
$host="localhost";
|
||||
$baseAnt="Inventario";
|
||||
$baseNueva="Inventario2";
|
||||
$usuario="root";
|
||||
$claveUsuario="galeote";
|
||||
$usuario="test";
|
||||
$claveUsuario="tset";
|
||||
$probar=false;
|
||||
|
||||
|
55
testbd.php
55
testbd.php
@@ -1,55 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Test de la clase Sql
|
||||
*/
|
||||
include 'Sql.php';
|
||||
$bd=new Sql("localhost","test","tset","Inventario2");
|
||||
if ($bd->error()) {
|
||||
die("Error al conectar\n");
|
||||
}
|
||||
if (!$bd->ejecuta("select * from Articulos limit 0,10")) {
|
||||
die("No pudo ejecutar consulta. ".$bd->mensajeError()."\n");
|
||||
|
||||
}
|
||||
echo "Hay ".$bd->numeroTuplas()." registros.<br>\n";
|
||||
while ($datos=$bd->procesaResultado()) {
|
||||
|
||||
foreach($datos as $clave => $valor) {
|
||||
echo "[$clave]=[$valor] ";
|
||||
}
|
||||
echo "<br>\n";
|
||||
|
||||
}
|
||||
$datos=$bd->estructura("Elementos");
|
||||
for ($i=0;$i<count($datos);$i++) {
|
||||
$campos[$datos[$i]["Field"]]=$datos[$i];
|
||||
}
|
||||
//print_r($datos);
|
||||
echo "Hay ".count($campos)." tuplas.";
|
||||
foreach($campos as $clave => $valor) {
|
||||
$trozos=explode(",",$valor["Comment"]);
|
||||
//echo "Trozos=";print_r($trozos);//print_r($campos);
|
||||
foreach($trozos as $trozo) {
|
||||
if (strstr($trozo,"foreign")) {
|
||||
$temp=substr($trozo,8,-1);
|
||||
list($tabla,$atributo)=explode(";",$temp);
|
||||
$salida[$clave]=$tabla.",".$atributo;
|
||||
echo "[$clave],[$tabla],[$atributo]<br>\n";
|
||||
$existen=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*for ($i=0;$i<count($datos);$i++) {
|
||||
echo $datos[$i]["Field"]."<br>";
|
||||
|
||||
/*foreach($datos[$i] as $clave => $valor) {
|
||||
echo "[$clave]=[$valor] ";
|
||||
}
|
||||
echo "<br>\n";
|
||||
}*/
|
||||
if ($bd->error()) {
|
||||
echo $bd->mensajeError();
|
||||
}
|
||||
|
||||
|
||||
?>
|
118
timerbar.js
118
timerbar.js
@@ -1,118 +0,0 @@
|
||||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
// Timer Bar - Version 1.0
|
||||
// Author: Brian Gosselin of http://scriptasylum.com
|
||||
// Script featured on http://www.dynamicdrive.com
|
||||
|
||||
var loadedcolor='darkgray' ; // PROGRESS BAR COLOR
|
||||
var unloadedcolor='lightgrey'; // COLOR OF UNLOADED AREA
|
||||
var bordercolor='navy'; // COLOR OF THE BORDER
|
||||
var barheight=15; // HEIGHT OF PROGRESS BAR IN PIXELS
|
||||
var barwidth=300; // WIDTH OF THE BAR IN PIXELS
|
||||
var waitTime=5; // NUMBER OF SECONDS FOR PROGRESSBAR
|
||||
|
||||
// THE FUNCTION BELOW CONTAINS THE ACTION(S) TAKEN ONCE BAR REACHES 100%.
|
||||
// IF NO ACTION IS DESIRED, TAKE EVERYTHING OUT FROM BETWEEN THE CURLY BRACES ({})
|
||||
// BUT LEAVE THE FUNCTION NAME AND CURLY BRACES IN PLACE.
|
||||
// PRESENTLY, IT IS SET TO DO NOTHING, BUT CAN BE CHANGED EASILY.
|
||||
// TO CAUSE A REDIRECT TO ANOTHER PAGE, INSERT THE FOLLOWING LINE:
|
||||
// window.location="http://redirect_page.html";
|
||||
// JUST CHANGE THE ACTUAL URL OF COURSE :)
|
||||
// @todo prueba
|
||||
/**
|
||||
*@todo prueba
|
||||
*TODO prueba
|
||||
*@todo: prueba
|
||||
*/
|
||||
|
||||
var action=function()
|
||||
{
|
||||
alert("Welcome to Dynamic Drive!");
|
||||
//window.location="http://www.dynamicdrive.com
|
||||
}
|
||||
|
||||
//*****************************************************//
|
||||
//********** DO NOT EDIT BEYOND THIS POINT **********//
|
||||
//*****************************************************//
|
||||
|
||||
var ns4=(document.layers)?true:false;
|
||||
var ie4=(document.all)?true:false;
|
||||
var blocksize=(barwidth-2)/waitTime/10;
|
||||
var loaded=0;
|
||||
var PBouter;
|
||||
var PBdone;
|
||||
var PBbckgnd;
|
||||
var Pid=0;
|
||||
var txt='';
|
||||
if(ns4){
|
||||
txt+='<table border=0 cellpadding=0 cellspacing=0><tr><td>';
|
||||
txt+='<ilayer name="PBouter" visibility="hide" height="'+barheight+'" width="'+barwidth+'" onmouseup="hidebar()">';
|
||||
txt+='<layer width="'+barwidth+'" height="'+barheight+'" bgcolor="'+bordercolor+'" top="0" left="0"></layer>';
|
||||
txt+='<layer width="'+(barwidth-2)+'" height="'+(barheight-2)+'" bgcolor="'+unloadedcolor+'" top="1" left="1"></layer>';
|
||||
txt+='<layer name="PBdone" width="'+(barwidth-2)+'" height="'+(barheight-2)+'" bgcolor="'+loadedcolor+'" top="1" left="1"></layer>';
|
||||
txt+='</ilayer>';
|
||||
txt+='</td></tr></table>';
|
||||
}else{
|
||||
txt+='<div id="PBouter" onmouseup="hidebar()" style="position:relative; visibility:hidden; background-color:'+bordercolor+'; width:'+barwidth+'px; height:'+barheight+'px;">';
|
||||
txt+='<div style="position:absolute; top:1px; left:1px; width:'+(barwidth-2)+'px; height:'+(barheight-2)+'px; background-color:'+unloadedcolor+'; font-size:1px;"></div>';
|
||||
txt+='<div id="PBdone" style="position:absolute; top:1px; left:1px; width:0px; height:'+(barheight-2)+'px; background-color:'+loadedcolor+'; font-size:1px;"></div>';
|
||||
txt+='</div>';
|
||||
}
|
||||
|
||||
document.write(txt);
|
||||
|
||||
function incrCount(){
|
||||
window.status="Loading...";
|
||||
loaded++;
|
||||
if(loaded<0)loaded=0;
|
||||
if(loaded>=waitTime*10){
|
||||
clearInterval(Pid);
|
||||
loaded=waitTime*10;
|
||||
setTimeout('hidebar()',100);
|
||||
}
|
||||
resizeEl(PBdone, 0, blocksize*loaded, barheight-2, 0);
|
||||
}
|
||||
|
||||
function hidebar(){
|
||||
clearInterval(Pid);
|
||||
window.status='';
|
||||
//if(ns4)PBouter.visibility="hide";
|
||||
//else PBouter.style.visibility="hidden";
|
||||
action();
|
||||
}
|
||||
|
||||
//THIS FUNCTION BY MIKE HALL OF BRAINJAR.COM
|
||||
function findlayer(name,doc){
|
||||
var i,layer;
|
||||
for(i=0;i<doc.layers.length;i++){
|
||||
layer=doc.layers[i];
|
||||
if(layer.name==name)return layer;
|
||||
if(layer.document.layers.length>0)
|
||||
if((layer=findlayer(name,layer.document))!=null)
|
||||
return layer;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function progressBarInit(){
|
||||
PBouter=(ns4)?findlayer('PBouter',document):(ie4)?document.all['PBouter']:document.getElementById('PBouter');
|
||||
PBdone=(ns4)?PBouter.document.layers['PBdone']:(ie4)?document.all['PBdone']:document.getElementById('PBdone');
|
||||
resizeEl(PBdone,0,0,barheight-2,0);
|
||||
if(ns4)PBouter.visibility="show";
|
||||
else PBouter.style.visibility="visible";
|
||||
Pid=setInterval('incrCount()',95);
|
||||
}
|
||||
|
||||
function resizeEl(id,t,r,b,l){
|
||||
if(ns4){
|
||||
id.clip.left=l;
|
||||
id.clip.top=t;
|
||||
id.clip.right=r;
|
||||
id.clip.bottom=b;
|
||||
}else id.style.width=r+'px';
|
||||
}
|
||||
|
||||
window.onload=progressBarInit;
|
26
xml/inventarioArticuloEtiquetas.xml
Normal file
26
xml/inventarioArticuloEtiquetas.xml
Normal 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>
|
29
xml/inventarioUbicacionEtiquetas.xml
Normal file
29
xml/inventarioUbicacionEtiquetas.xml
Normal 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>
|
@@ -2,7 +2,7 @@
|
||||
<Mantenimiento>
|
||||
<Titulo>Mantenimiento de Elementos</Titulo>
|
||||
<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,
|
||||
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
|
||||
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};
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<Mantenimiento>
|
||||
<Titulo>Mantenimiento de Usuarios</Titulo>
|
||||
<Consulta>
|
||||
SELECT id, nombre, clave, idSesion, alta, modificacion, borrado, consulta, informe, usuarios, config
|
||||
SELECT SQL_CALC_FOUND_ROWS id, nombre, clave, idSesion, alta, modificacion, borrado, consulta, informe, usuarios, config
|
||||
FROM Usuarios {buscar} {orden} limit {inferior}, {superior};
|
||||
</Consulta>
|
||||
<Campos>
|
||||
@@ -10,12 +10,12 @@
|
||||
<Col Campo="nombre" Nombre="nombre" Ancho="8" Ajuste="L" Titulo="Nombre" Varios="ordenable" 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="alta" Nombre="Alta" Ancho="1" Ajuste="R" Titulo="Altas" Editable="si"/>
|
||||
<Col Campo="modificacion" Nombre="modificacion" Ancho="1" Ajuste="R" Titulo="Modificaciones" Editable="si"/>
|
||||
<Col Campo="borrado" Nombre="borrado" Ancho="1" Ajuste="R" Titulo="Borrados" Editable="si"/>
|
||||
<Col Campo="consulta" Nombre="consulta" Ancho="1" Ajuste="R" Titulo="Consultas" Editable="si"/>
|
||||
<Col Campo="informe" Nombre="informe" Ancho="1" Ajuste="R" Titulo="Informes" Editable="si"/>
|
||||
<Col Campo="usuarios" Nombre="usuarios" Ancho="1" Ajuste="R" Titulo="Usuarios" Editable="si"/>
|
||||
<Col Campo="config" Nombre="config" Ancho="1" Ajuste="R" Titulo="Configuración" Editable="si"/>
|
||||
<Col Campo="alta" Nombre="alta" Ancho="1" Ajuste="R" Tipo="Boolean" Titulo="Altas" Editable="si"/>
|
||||
<Col Campo="modificacion" Nombre="modificacion" Ancho="1" Ajuste="R" Tipo="Boolean" Titulo="Modificaciones" Editable="si"/>
|
||||
<Col Campo="borrado" Nombre="borrado" Ancho="1" Ajuste="R" Tipo="Boolean" Titulo="Borrados" Editable="si"/>
|
||||
<Col Campo="consulta" Nombre="consulta" Ancho="1" Ajuste="R" Tipo="Boolean" Titulo="Consultas" Editable="si"/>
|
||||
<Col Campo="informe" Nombre="informe" Ancho="1" Ajuste="R" Tipo="Boolean" Titulo="Informes" Editable="si"/>
|
||||
<Col Campo="usuarios" Nombre="usuarios" Ancho="1" Ajuste="R" Tipo="Boolean" Titulo="Usuarios" Editable="si"/>
|
||||
<Col Campo="config" Nombre="config" Ancho="1" Ajuste="R" Tipo="Boolean" Titulo="Configuración" Editable="si"/>
|
||||
</Campos>
|
||||
</Mantenimiento>
|
||||
|
Reference in New Issue
Block a user