mirror of
https://github.com/rmontanana/inventario2.git
synced 2025-08-16 07:56:00 +00:00
Compare commits
28 Commits
Author | SHA1 | Date | |
---|---|---|---|
792ca3cb86 | |||
2b60a418ac | |||
c0bfedd276 | |||
7354982f2f | |||
0204f9a3b2 | |||
|
d1a593ff53 | ||
604c01e306 | |||
|
5e561294b3 | ||
bcfe044e63 | |||
85ce241df7 | |||
|
1ff3f6acf2 | ||
|
da254740cf | ||
|
7bb740821d | ||
|
140a554630 | ||
|
75e8c14cf8 | ||
ebe0d77961 | |||
da30f625ed | |||
|
d7bfa748f3 | ||
a12b289e01 | |||
5119614455 | |||
|
a87e8016fc | ||
70887f5b62 | |||
|
e7eda6ae01 | ||
2d6514b264 | |||
b28c1e3683 | |||
|
fce421116d | ||
|
ce796b3684 | ||
13e4c12069 |
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Inventario
|
||||
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez
|
||||
@@ -28,7 +27,7 @@ define('FORMULARIO_ACCESO', '<form name="formulario_acceso" action="index.php?re
|
||||
'<br><br><button type="submit" name="iniciar" class="btn btn-primary">Iniciar <span class="glyphicon glyphicon-log-in"></span></button></form>');
|
||||
define('MENSAJE_DEMO', 'Puede Iniciar sesión con<br>usuario <i><b>demo</b></i><br>contraseña <i>demo</i><br>');
|
||||
define('USUARIO_INCORRECTO', '<label class="bg-danger">Usuario y clave incorrectos!</label><br><br>');
|
||||
define('CREDITOS', '<div class="modal fade" tabindex="-1" id="creditos" role="dialog" aria-labelledby="modalCreditos" aria-hidden="true">
|
||||
define('CREDITOS_CABECERA', '<div class="modal fade" tabindex="-1" id="creditos" role="dialog" aria-labelledby="modalCreditos" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
@@ -37,26 +36,12 @@ define('CREDITOS', '<div class="modal fade" tabindex="-1" id="creditos" role="di
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="jumbotron">
|
||||
<img src="img/logo.png" class="img-responsive img-rounded" style="float:left">
|
||||
<img src="img/qrlogo.png" class="img-responsive img-rounded" style="float:left">
|
||||
<h1>Inventario2</h1>
|
||||
<p> Aplicación para controlar el inventario de un centro educativo.</p>
|
||||
<p>En la aplicación se hace uso de los siguientes módulos y/o bibliotecas</p>
|
||||
<table class="table table-condensed">
|
||||
<thead><tr><th>Biblioteca/Módulo</th><th>Licencia</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td><a href="http://getbootstrap.com/" target="_blank">Twitter Bootstrap</a></td><td><a target="_blank" href="https://github.com/twbs/bootstrap/blob/master/LICENSE">MIT</a></td>
|
||||
<tr><td><a href="http://www.fpdf.org/" target="_blank">FPDF</a></td><td>Libre</td>
|
||||
<tr><td><a href="http://phpqrcode.sourceforge.net/" target="_blank">PHP QR Code Enconder</a></td><td><a target="_blank" href="http://www.gnu.org/licenses/lgpl-3.0.txt">LGPL</a></td>
|
||||
<tr><td><a href="http://stefangabos.ro/php-libraries/zebra-image/" target="_blank">Zebra_Image</a></td><td><a target="_blank" href="http://www.gnu.org/licenses/lgpl-3.0.txt">LGPL</a></td>
|
||||
<tr><td><a href="http://jasny.github.io/bootstrap/" target="_blank">Jasny Bootstrap</a></td><td><a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a></td>
|
||||
<tr><td><a href="http://1000hz.github.io/bootstrap-validator/" target="_blank">Bootstrap Validator</a></td><td><a target="_blank" href="https://github.com/1000hz/bootstrap-validator/blob/master/LICENSE">MIT</a></td>
|
||||
<tr><td><a href="https://github.com/tkrotoff/jquery-simplecolorpicker" target="_blank">jquery-simplecolorpicker</a></td><td><a target="_blank" href="https://github.com/tkrotoff/jquery-simplecolorpicker/blob/master/LICENSE.txt">MIT</a></td>
|
||||
<tr><td><a href="http://eonasdan.github.io/bootstrap-datetimepicker/" target="_blank">Bootstrap datetimepicker</a></td><td><a target="_blank" href="https://github.com/Eonasdan/bootstrap-datetimepicker/blob/master/src/js/bootstrap-datetimepicker.js">MIT</a></td>
|
||||
<tr><td><a href="http://silviomoreto.github.io/bootstrap-select/" target="_blank">Bootstrap-select</a></td><td><a target="_blank" href="https://github.com/silviomoreto/bootstrap-select">MIT</a></td>
|
||||
<tr><td><a href="https://github.com/vitalets/x-editable" target="_blank">X-editable</a></td><td><a target="_blank" href="https://github.com/vitalets/x-editable/blob/master/LICENSE-MIT">MIT</a></td>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><h5>Copyright © 2008-2014 Ricardo Montañana Gómez</h4>
|
||||
<p>En la aplicación se hace uso de los siguientes módulos y/o bibliotecas</p>');
|
||||
|
||||
define('CREDITOS_PIE', ' <p><h5>Copyright © 2008-2014 Ricardo Montañana Gómez</h5>
|
||||
<h5><small>Esta aplicación se distribuye con licencia <a target="_blank" href="http://www.gnu.org/licenses/gpl-3.0.html">GPLv3 </a></small></h5></p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -127,6 +112,35 @@ class AportaContenido {
|
||||
$this->perfil = $perfil;
|
||||
$this->opcionActual = $opcion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Devuelve una tabla HTML con el contenido de las bibliotecas/módulos utilizadas en la aplicación
|
||||
* Si el perfil del usuario es de Configuración devuelve también las versiones de las bibliotecas
|
||||
* @return string
|
||||
*/
|
||||
public function creaTablaAcercaDe()
|
||||
{
|
||||
|
||||
$poner = $this->perfil['Config'];
|
||||
$tabla = '<table class="table table-condensed">';
|
||||
$tabla .='<thead><tr><th>Biblioteca/Módulo</th>'.($poner?'<th>Versión</th>':'').'<th>Licencia</th></tr></thead>';
|
||||
$tabla .='<tbody>';
|
||||
$tabla .='<tr><td><a href="http://jquery.com/" target="_blank">jquery</a></td>'.($poner?'<td>2.1.0</td>':'').'<td><a target="_blank" href="https://jquery.org/license/">MIT</a></td>';
|
||||
$tabla .='<tr><td><a href="http://getbootstrap.com/" target="_blank">Twitter Bootstrap</a></td>'.($poner?'<td>3.1.1</td>':'').'<td><a target="_blank" href="https://github.com/twbs/bootstrap/blob/master/LICENSE">MIT</a></td>';
|
||||
$tabla .='<tr><td><a href="http://www.fpdf.org/" target="_blank">FPDF</a></td>'.($poner?'<td>1.7</td>':'').'<td>Libre</td>';
|
||||
$tabla .='<tr><td><a href="http://phpqrcode.sourceforge.net/" target="_blank">PHP QR Code Enconder</a></td>'.($poner?'<td>1.1.4</td>':'').'<td><a target="_blank" href="http://www.gnu.org/licenses/lgpl-3.0.txt">LGPL</a></td>';
|
||||
$tabla .='<tr><td><a href="http://stefangabos.ro/php-libraries/zebra-image/" target="_blank">Zebra_Image</a></td>'.($poner?'<td>2.2.3</td>':'').'<td><a target="_blank" href="http://www.gnu.org/licenses/lgpl-3.0.txt">LGPL</a></td>';
|
||||
$tabla .='<tr><td><a href="http://jasny.github.io/bootstrap/" target="_blank">Jasny Bootstrap</a></td>'.($poner?'<td>3.1.0</td>':'').'<td><a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a></td>';
|
||||
$tabla .='<tr><td><a href="http://1000hz.github.io/bootstrap-validator/" target="_blank">Bootstrap Validator</a></td>'.($poner?'<td>0.2.1</td>':'').'<td><a target="_blank" href="https://github.com/1000hz/bootstrap-validator/blob/master/LICENSE">MIT</a></td>';
|
||||
$tabla .='<tr><td><a href="https://github.com/tkrotoff/jquery-simplecolorpicker" target="_blank">jquery-simplecolorpicker</a></td>'.($poner?'<td>0.3.0</td>':'').'<td><a target="_blank" href="https://github.com/tkrotoff/jquery-simplecolorpicker/blob/master/LICENSE.txt">MIT</a></td>';
|
||||
$tabla .='<tr><td><a href="http://eonasdan.github.io/bootstrap-datetimepicker/" target="_blank">Bootstrap datetimepicker</a></td>'.($poner?'<td>2.1.32</td>':'').'<td><a target="_blank" href="https://github.com/Eonasdan/bootstrap-datetimepicker/blob/master/src/js/bootstrap-datetimepicker.js">MIT</a></td>';
|
||||
$tabla .='<tr><td><a href="http://silviomoreto.github.io/bootstrap-select/" target="_blank">Bootstrap-select</a></td>'.($poner?'<td>1.5.4</td>':'').'<td><a target="_blank" href="https://github.com/silviomoreto/bootstrap-select">MIT</a></td>';
|
||||
$tabla .='<tr><td><a href="https://github.com/vitalets/x-editable" target="_blank">X-editable</a></td>'.($poner?'<td>1.5.1</td>':'').'<td><a target="_blank" href="https://github.com/vitalets/x-editable/blob/master/LICENSE-MIT">MIT</a></td>';
|
||||
$tabla .='<tr><td><a href="http://momentjs.com/" target="_blank">Moment.js</a></td>'.($poner?'<td>2.5.1</td>':'').'<td><a target="_blank" href="https://github.com/moment/moment/blob/develop/LICENSE">MIT</a></td>';
|
||||
$tabla .='</tbody>';
|
||||
$tabla .='</table>';
|
||||
return $tabla;
|
||||
}
|
||||
|
||||
/**
|
||||
* Devuelve la fecha actual
|
||||
@@ -162,8 +176,6 @@ class AportaContenido {
|
||||
public function __call($metodo, $parametros)
|
||||
{
|
||||
switch ($metodo) { // Dependiendo del método invocado
|
||||
case 'titulo': // devolvemos el título
|
||||
return PROGRAMA . " v" . VERSION;
|
||||
case 'usuario':
|
||||
if ($this->registrado)
|
||||
return "Usuario=$this->usuario";
|
||||
@@ -237,8 +249,12 @@ class AportaContenido {
|
||||
case 'principal': // contenido inicial
|
||||
|
||||
$creditos = "$('#creditos').modal({keyboard: false});";
|
||||
return $mensaje . '<br><br><center><img src="img/logo.png" alt="' . PROGRAMA . '" onClick="' . $creditos . '" >' .
|
||||
'<br><br><label onClick="' . $creditos . '">' . CENTRO . '</label></center><br><br>' . CREDITOS;
|
||||
$centro = '<div class="well well-sm">' . CENTRO . '</div>';
|
||||
$tabla = $this->creaTablaAcercaDe();
|
||||
$rama_texto = trim(substr(file_get_contents('.git/HEAD'), 16));
|
||||
$rama = ($rama_texto != 'master' ? '<br><button class="btn btn-warning btn-xs" type="button"onClick="' . $creditos . '"><span class="glyphicon glyphicon-cog"></span> '.$rama_texto.'</button></center>':'');
|
||||
return $mensaje . '<br><br><center><img src="img/qrlogo.png" alt="' . PROGRAMA . '" onClick="' . $creditos . '" >' .
|
||||
'<br><br><label onClick="' . $creditos . '">' . $centro . '</label>' . $rama . CREDITOS_CABECERA . $tabla . CREDITOS_PIE;
|
||||
case 'articulos':
|
||||
case 'ubicaciones':
|
||||
case 'test':
|
||||
@@ -248,7 +264,7 @@ class AportaContenido {
|
||||
if (!$this->pefil['Informe']) {
|
||||
$this->procesaURL();
|
||||
$fichero = 'xml/informe' . ucfirst($opcion) . '.xml';
|
||||
$salida = 'tmp/informe' . ucfirst($opcion) . '.xml';
|
||||
$salida = TMP.'/informe' . ucfirst($opcion) . '.xml';
|
||||
//Establece los posibles parámetros del listado.
|
||||
$orden = $this->datosURL['orden'];
|
||||
$sentido = $this->datosURL['sentido'] == "asc" ? ' ' : ' desc ';
|
||||
@@ -278,7 +294,7 @@ class AportaContenido {
|
||||
if (!$this->pefil['Informe']) {
|
||||
$this->procesaURL();
|
||||
$fichero = 'xml/informe' . ucfirst($opcion) . '.xml';
|
||||
$salida = 'tmp/informe' . ucfirst($opcion) . '.xml';
|
||||
$salida = TMP.'/informe' . ucfirst($opcion) . '.xml';
|
||||
//Establece los posibles parámetros del listado.
|
||||
$orden = $this->datosURL['orden'];
|
||||
$sentido = $this->datosURL['sentido'] == "asc" ? ' ' : ' desc ';
|
||||
@@ -379,7 +395,7 @@ class AportaContenido {
|
||||
private function devuelveInforme($informe)
|
||||
{
|
||||
$letras = "abcefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
|
||||
$nombre = "tmp/informe" . substr(str_shuffle($letras), 0, 10) . ".pdf";
|
||||
$nombre = TMP."/informe" . substr(str_shuffle($letras), 0, 10) . ".pdf";
|
||||
$informe->guardaArchivo($nombre);
|
||||
return '<div class="container">
|
||||
<!--<a href="' . $nombre . '" target="_blank"><span class="glyphicon glyphicon-cloud-download" style="font-size:1.5em;"></span>Descargar Informe</a>-->
|
||||
@@ -398,5 +414,4 @@ class AportaContenido {
|
||||
return $panel;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
29
CHANGELOG
29
CHANGELOG
@@ -1,3 +1,32 @@
|
||||
Versión 1.14 01-06-2014
|
||||
-Añadido icono de acceso a la documentación en la barra superior
|
||||
-Corregido cierre etiqueta h5 en pie de créditos
|
||||
-Añade la rama git en la pantalla de inicio en caso de que no sea la rama master, con un botón que al pulsarlo salen los créditos
|
||||
-Fix #39. Devuelve la versión de las bibliotecas/módulos utilizados en la aplicación si el usuario tiene perfil de Configuración, en caso contrario tan sólo el listado de bibliotecas y su licencia.
|
||||
-Corregido el nombre de la clase base en Pdf_mysql para que no haya problemas en sistemas que diferencian mayúsculas/minúsculas
|
||||
-Añadido el botón volver en Configuración
|
||||
-Fix #36. Añadido límite caracteres en los campos de texto a 35 caracteres en Configuración. Añadido el número de columnas en resoluciones pequeñas y grandes en Configuración.
|
||||
|
||||
Versión 1.12 06-05-2014
|
||||
-Mantenimiento muestra el 'Titulo' del campo tanto en Consulta como en el formulario de edición
|
||||
-Muestra cuadro de búsqueda y mensaje correcto cuando no se encuentra la cadena de búsqueda en Mantenimiento
|
||||
-Añadidos mensajes de ayuda en los campos de configuración
|
||||
-Añadida la columna de cantidad ubicada en mantenimiento de artículos
|
||||
-Fix #35. Cambiados los informes de Articulos y Ubicaciones para recoger el campo Nº de elementos
|
||||
-Fix #35. Añadido el campo Nº de elementos en el mantenimiento de Articulos y Ubicaciones a través de archivo xml
|
||||
-Fix #31. Añadido el directorio temporal en el archivo de configuración
|
||||
|
||||
Versión 1.11b 26-04-2014
|
||||
-Cambiada la referencia de etiquetas Apli
|
||||
|
||||
Versión 1.11 26-04-2014
|
||||
-Fix #34 Corregido que salga una etiqueta por cada elemento reflejado en cantidad.
|
||||
-Fix #33 Hay que hacer doble click para editar ajax
|
||||
-Fix #32 Añadido mensaje y enlace al tipo de etiquetas que utiliza y corregido mensaje de error de conexión a base de datos de SQL
|
||||
-Añadido diálogo antes de realizar el inventario total.
|
||||
-Añadido cuadro para resaltar el nombre del centro en la pantalla inicial.
|
||||
-Cambiada la alineación de los campos en Mantenimiento para utilizar el atributo Ajuste
|
||||
|
||||
Versión 1.10 21-04-2014
|
||||
-Corregido error en el nombre del archivo de la clase ajax que estaba en minúsculas
|
||||
-Añadidos botones de acción tipo bootstrap en Mantenimiento y añadido a configuración en estilo
|
||||
|
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Inventario
|
||||
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez
|
||||
@@ -25,7 +24,7 @@ class Configuracion {
|
||||
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 $lista = array('SERVIDOR', 'PUERTO', 'BASEDATOS', 'BASEDATOSTEST', 'USUARIO', 'CLAVE', 'CENTRO', 'NUMFILAS', 'ESTILO', 'PLANTILLA', 'COLORLAT', 'COLORFON', 'MYSQLDUMP', 'GZIP', 'TMP');
|
||||
private $campos;
|
||||
|
||||
public function __construct()
|
||||
@@ -54,6 +53,11 @@ class Configuracion {
|
||||
$valor = trim($valor);
|
||||
}
|
||||
|
||||
private function creaTitulo($titulo, $ayuda)
|
||||
{
|
||||
return '<td style="vertical-align:middle"><a class="dato" href="#" data-placement="right" data-content="'.$ayuda.'">'.$titulo.'</a></td>';
|
||||
}
|
||||
|
||||
public function ejecuta() {
|
||||
$fichero = $this->obtieneFichero();
|
||||
$datos = explode("\n", $fichero);
|
||||
@@ -103,21 +107,21 @@ class Configuracion {
|
||||
$bootst = $this->datosConf['ESTILO'] == "bootstrap" ? 'selected' : ' ';
|
||||
$normal = $this->datosConf['PLANTILLA'] == "normal" ? 'selected' : ' ';
|
||||
$bootstrap = $this->datosConf['PLANTILLA'] == "bootstrap" ? 'selected' : ' ';
|
||||
$salida = '<center><div class="col-sm-4 col-md-6"><form name="configura" method="post">';
|
||||
$salida = '<center><div class="col-sm-4 col-md-8"><form name="configura" method="post">';
|
||||
//$salida.='<p align="center"><table border=1 class="tablaDatos"><tbody>';
|
||||
$salida.='<p align="center"><table border=2 class="table table-hover"><tbody>';
|
||||
$salida.='<th colspan=2 class="info"><center><b>Preferencias</b></center></th>';
|
||||
$salida.='<tr><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.='<tr>'.$this->creaTitulo("Nombre del Centro","Nombre que aparecerá en los informes y en la página principal de la aplicación").'<td><input type="text" name="CENTRO" value="' . $this->datosConf['CENTRO'] . '" maxlength="35" size="35" /></td></tr>';
|
||||
$salida.='<tr>'.$this->creaTitulo("Número de filas","Número de filas que aparecerán en la pantalla de consulta de los maestros. Valor entre 10 y 25.").'<td><input type="number" max="25" min="10" name="NUMFILAS" value="' . $this->datosConf['NUMFILAS'] . '" size="3" /></td></tr>';
|
||||
$salida.='<tr>'.$this->creaTitulo("Plantilla","Plantilla html utilizada para mostrar el contenido de la aplicación.").'<td><select name="PLANTILLA" class="form-control">';
|
||||
$salida.='<option value="normal" ' . $normal . '>normal</option>';
|
||||
$salida.='<option ' . $bootstrap . '>bootstrap</option></select></td></tr>';
|
||||
$salida.='<tr><td style="vertical-align:middle">Estilo</td><td><select name="ESTILO" class="form-control">';
|
||||
$salida.='<tr>'.$this->creaTitulo("Estilo","Estilo de los botones de control en los mantenimientos de los maestros").'<td><select name="ESTILO" class="form-control">';
|
||||
$salida.='<option value="personal" ' . $personal . '>personal</option>';
|
||||
$salida.='<option ' . $bluecurve . '>bluecurve</option>';
|
||||
$salida.='<option ' . $bootst . '>bootstrap</option>';
|
||||
$salida.='<option ' . $cristal . '>cristal</option></select></td></tr>';
|
||||
$salida.='<tr><td style="vertical-align:middle">Color Lateral (bootstrap)</td><td style="vertical-align:middle"><select name="COLORLAT" id="COLORLAT" class="form-control">';
|
||||
$salida.='<tr>'.$this->creaTitulo("Color Lateral","Color que se aplicará a la parte izquierda de la aplicación donde aparece el menú").'<td style="vertical-align:middle"><select name="COLORLAT" id="COLORLAT" class="form-control">';
|
||||
foreach ($coloresLateral as $color => $codigo) {
|
||||
$selec = "";
|
||||
if (trim($this->datosConf['COLORLAT']) == $codigo) {
|
||||
@@ -126,7 +130,7 @@ class Configuracion {
|
||||
$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">';
|
||||
$salida.='<tr>'.$this->creaTitulo("Color Fondo","Color que aparecerá como fondo en todas las pantallas de la aplicación").'<td style="vertical-align:middle"><select name="COLORFON" id="COLORFON" class="form-control">';
|
||||
foreach ($coloresFondo as $color => $codigo) {
|
||||
$selec = "";
|
||||
if (trim($this->datosConf['COLORFON']) == $codigo) {
|
||||
@@ -135,16 +139,19 @@ class Configuracion {
|
||||
$salida.='<option value="' . $codigo . '" ' . $selec . ' >' . $color . '</option>';
|
||||
}
|
||||
$salida.='</select></td></tr>';
|
||||
$salida.='<tr>'.$this->creaTitulo("Directorio tmp","Directorio donde se almacenarán los archivos temporales de la aplicación y también los archivos e informes que genera").'<td><input type="text" name="TMP" value="' . $this->datosConf['TMP'] . '" maxlength="35" size="35" /></td></tr>';
|
||||
$salida.='<th colspan=2 class="danger"><center><b>Base de datos</b></center></th>';
|
||||
$salida.='<tr><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><button type="submit" class="btn btn-primary" name="aceptar"><span class="glyphicon glyphicon-ok"></span> Aceptar</td></tr></p>';
|
||||
$salida.='<tr>'.$this->creaTitulo("Servidor","Nombre o dirección IP del servidor MySQL. Normalmente localhost").'<td><input type="text" name="SERVIDOR" value="' . $this->datosConf['SERVIDOR'] . '" maxlength="35" size="35" /></td></tr>';
|
||||
$salida.='<tr>'.$this->creaTitulo("Puerto","Número de puerto donde el servidor admite conexiones MySQL. Normalmente 3306").'<td><input type="text" name="PUERTO" value="' . $this->datosConf['PUERTO'] . '" maxlength="35" size="35" /></td></tr>';
|
||||
$salida.='<tr>'.$this->creaTitulo("Base de datos","Nombre de la base de datos donde se almacenarán los datos de la aplicación").'<td><input type="text" name="BASEDATOS" value="' . $this->datosConf['BASEDATOS'] . '" maxlength="35" size="35" /></td></tr>';
|
||||
$salida.='<tr>'.$this->creaTitulo("Base de datos Tests","Nombre de la base de datos donde se almacenarán los datos de prueba de la aplicación").'<td><input type="text" name="BASEDATOSTEST" value="' . $this->datosConf['BASEDATOSTEST'] . '" maxlength="35" size="35" /></td></tr>';
|
||||
$salida.='<tr>'.$this->creaTitulo("Usuario","Usuario con permisos de lectura/escritura en la base de datos").'<td><input type="text" name="USUARIO" value="' . $this->datosConf['USUARIO'] . '" maxlength="35" size="35" /></td></tr>';
|
||||
$salida.='<tr>'.$this->creaTitulo("Clave","Contraseña del usuario con permisos sobre la base de datos").'<td><input type="text" name="CLAVE" value="' . $this->datosConf['CLAVE'] . '" maxlength="35" size="35" /></td></tr>';
|
||||
$salida.='<tr>'.$this->creaTitulo("mysqldump","Ruta completa a la utilidad mysqldump. Este programa es necesario para que se puedan hacer las copias de seguridad de la aplicación").'<td><input type="text" name="MYSQLDUMP" value="' . $this->datosConf['MYSQLDUMP'] . '" maxlength="35" size="35" /></td></tr>';
|
||||
$salida.='<tr>'.$this->creaTitulo("gzip","Ruta completa a la utilidad gzip. Este programa es necesario para que se puedan comprimir las copias de seguridad de la aplicación").'<td><input type="text" name="GZIP" value="' . $this->datosConf['GZIP'] . '" maxlength="35" size="35" /></td></tr>';
|
||||
$salida.='<tr align=center><td colspan=2>
|
||||
<a class="btn btn-info" role="button" onClick="location.href=' . "'index.php'" . '"><span class="glyphicon glyphicon-arrow-left"></span> Volver</a>
|
||||
<button type="submit" class="btn btn-primary" name="aceptar"><span class="glyphicon glyphicon-ok"></span> Aceptar</td></tr></p>';
|
||||
$salida.='</form></div></center>';
|
||||
$salida.="<script>
|
||||
$(document).ready(function() {
|
||||
@@ -157,11 +164,10 @@ class Configuracion {
|
||||
});
|
||||
$('select[name=" . '"COLORLAT"' . "]').simplecolorpicker({theme: 'glyphicons'});
|
||||
$('select[name=" . '"COLORFON"' . "]').simplecolorpicker({theme: 'glyphicons'});
|
||||
$('.dato').popover({trigger: 'hover'});
|
||||
});
|
||||
</script>";
|
||||
return $salida;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
@@ -53,7 +53,7 @@ class CopiaSeguridad {
|
||||
}
|
||||
private function copiaBaseDatos()
|
||||
{
|
||||
$archivo_sql = "tmp/baseDatos" . BASEDATOS . ".sql";
|
||||
$archivo_sql = TMP."/baseDatos" . BASEDATOS . ".sql";
|
||||
$baseDatosComprimida = $archivo_sql . ".gz";
|
||||
$this->baseDatos = $baseDatosComprimida;
|
||||
if (file_exists($baseDatosComprimida)) {
|
||||
@@ -78,7 +78,7 @@ class CopiaSeguridad {
|
||||
}
|
||||
private function copiaImagenes()
|
||||
{
|
||||
$copiaImagenes = "tmp/Imagenes.tbz";
|
||||
$copiaImagenes = TMP."/Imagenes.tbz";
|
||||
$this->imagenes = $copiaImagenes;
|
||||
if (file_exists($copiaImagenes)) {
|
||||
unlink($copiaImagenes);
|
||||
@@ -98,7 +98,7 @@ class CopiaSeguridad {
|
||||
private function empaqueta()
|
||||
{
|
||||
// Empaqueta los dos archivos en el que va a devolver
|
||||
$nombreCopia = "tmp/Copia" . BASEDATOS . strftime("%Y%m%d%H%M") . ".tar";
|
||||
$nombreCopia = TMP."/Copia" . BASEDATOS . strftime("%Y%m%d%H%M") . ".tar";
|
||||
if (file_exists($nombreCopia)) {
|
||||
unlink($nombreCopia);
|
||||
}
|
||||
|
@@ -1,4 +1,3 @@
|
||||
|
||||
<?php
|
||||
|
||||
/**
|
||||
@@ -37,7 +36,7 @@ class EtiquetasPDF {
|
||||
private $docu;
|
||||
private $pdf;
|
||||
private $def;
|
||||
private $nombreFichero = "tmp/informeEtiquetas.pdf";
|
||||
private $nombreFichero;
|
||||
|
||||
/**
|
||||
* El constructor recibe como argumento el nombre del archivo XML con la definición, encargándose de recuperarla y guardar toda la información localmente
|
||||
@@ -52,6 +51,7 @@ class EtiquetasPDF {
|
||||
if (!$registrado) {
|
||||
return 'Debe registrarse para acceder a este apartado';
|
||||
}
|
||||
$this->nombreFichero = TMP."/informeEtiquetas.pdf";
|
||||
// Recuperamos la definición del informe
|
||||
$this->def = simplexml_load_file($definicion);
|
||||
$this->bdd = $bdd;
|
||||
@@ -83,52 +83,55 @@ class EtiquetasPDF {
|
||||
$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;
|
||||
while($tupla = $this->bdd->procesaResultado()) {
|
||||
for ($j = 0; $j < $tupla['cantidad']; $j++) {
|
||||
//Hay que generar tantas etiquetas como ponga la cantidad de cada elemento
|
||||
if ($i % 2) {
|
||||
//Columna 2
|
||||
$etiq1 = 136;
|
||||
$etiq2 = 105;
|
||||
} else {
|
||||
//Columna 1
|
||||
$etiq1 = 30;
|
||||
$etiq2 = 1;
|
||||
$fila++;
|
||||
}
|
||||
$primero = false;
|
||||
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++;
|
||||
}
|
||||
$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));
|
||||
}
|
||||
@@ -152,7 +155,7 @@ class EtiquetasPDF {
|
||||
return $cabecera;
|
||||
}
|
||||
|
||||
public function guardaArchivo($nombre = "tmp/Informe.pdf")
|
||||
public function guardaArchivo($nombre)
|
||||
{
|
||||
$fichero = fopen($nombre, "w");
|
||||
fwrite($fichero, $this->getCabecera());
|
||||
|
@@ -44,7 +44,7 @@ class Importacion {
|
||||
}
|
||||
|
||||
private function importarFichero() {
|
||||
$uploadfile = "tmp/" . basename($_FILES['fichero']['name']);
|
||||
$uploadfile = TMP."/" . basename($_FILES['fichero']['name']);
|
||||
if (!move_uploaded_file($_FILES['fichero']['tmp_name'], $uploadfile)) {
|
||||
die('No se pudo subir el fichero ' . $_FILES['userfile']['tmp_name']);
|
||||
}
|
||||
@@ -55,10 +55,10 @@ class Importacion {
|
||||
|
||||
private function formulario() {
|
||||
$accion = "index.php?importacion&opc=importar";
|
||||
$salida .= '<script type="text/javascript" src="css/bootstrap-filestyle.min.js"> </script>';
|
||||
//$salida .= '<script type="text/javascript" src="css/bootstrap-filestyle.min.js"> </script>';
|
||||
$salida .='<div class="col-sm-6 col-md-6">';
|
||||
$salida .= '<form enctype="multipart/form-data" name="importacion.form" method="post" action="' . $accion . '">' . "\n";
|
||||
$salida .= "<fieldset style=\"width: 96%;\"><p><legend style=\"color: red;\"><b>Elige Archivo</b></legend>\n";
|
||||
$salida .= "<fieldset style=\"width: 96%;\"><p><legend style=\"color: red;\"><b>Elige Archivo</b></legend></p>\n";
|
||||
//$salida .= '<input type="file" name="fichero" id="fichero" onChange="seleccionFichero(this);" class="filestyle" data-classButton="btn btn-primary">';
|
||||
//$salida .= '<input type="file" name="fichero" id="fichero" onChange="seleccionFichero(this);">';
|
||||
//$salida .= '<input type="file" class="filestyle" data-input="false">';
|
||||
@@ -74,12 +74,11 @@ class Importacion {
|
||||
<span class="fileinput-exists">Cambiar</span><input type="file" name="fichero" id="fichero" onChange="seleccionFichero(this);"></span>
|
||||
<a href="#" class="input-group-addon btn btn-default fileinput-exists" data-dismiss="fileinput">Eliminar</a>
|
||||
</div>
|
||||
</div>';
|
||||
</div></fieldset>';
|
||||
$salida .= '<p align="center"><button class="btn btn-primary" type=submit><span class="glyphicon glyphicon-cloud-upload"></span> Aceptar</button></p><br>' . "\n";
|
||||
$salida .= '</div>';
|
||||
$mensaje = 'Sólo se permiten archivos con extensión CSV';
|
||||
$salida .= "<script type='text/javascript'>".'
|
||||
//$(":file").filestyle({classButton: "btn btn-primary"});'."
|
||||
$salida .= "<script type='text/javascript'>"."
|
||||
|
||||
function seleccionFichero(obj) {
|
||||
var filePath = obj.value;
|
||||
|
@@ -35,6 +35,7 @@ class InformeInventario {
|
||||
case 'Ubicacion':return $this->formularioUbicacion();
|
||||
case 'listarUbicacion':return $this->listarUbicacion();
|
||||
case 'listarArticulo':return $this->listarArticulo();
|
||||
case 'listarTotal': return $this->listarTotal();
|
||||
case 'Articulo':return $this->formularioArticulo();
|
||||
case 'Total':return $this->inventarioTotal();
|
||||
case 'descuadres': return $this->inventarioDescuadres();
|
||||
@@ -53,7 +54,7 @@ class InformeInventario {
|
||||
private function devuelveInforme($informe)
|
||||
{
|
||||
$letras = "abcefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
|
||||
$nombre = "tmp/informe" . substr(str_shuffle($letras), 0, 10) . ".pdf";
|
||||
$nombre = TMP."/informe" . substr(str_shuffle($letras), 0, 10) . ".pdf";
|
||||
$informe->guardaArchivo($nombre);
|
||||
return '<div class="container">
|
||||
<!--<a href="' . $nombre . '" target="_blank"><span class="glyphicon glyphicon-cloud-download" style="font-size:1.5em;"></span>Descargar Informe</a>-->
|
||||
@@ -68,15 +69,15 @@ class InformeInventario {
|
||||
switch ($salidaInforme) {
|
||||
case "pantalla":
|
||||
$fichero = "xml/inventarioUbicacion.xml";
|
||||
$salida = "tmp/inventarioUbicacion.xml";
|
||||
$salida = TMP."/inventarioUbicacion.xml";
|
||||
break;
|
||||
case "csv":
|
||||
$fichero = "xml/inventarioUbicacionCSV.xml";
|
||||
$salida = "tmp/inventarioUbicacionCSV.xml";
|
||||
$salida = TMP."/inventarioUbicacionCSV.xml";
|
||||
break;
|
||||
case "etiquetas":
|
||||
$fichero = "xml/inventarioUbicacionEtiquetas.xml";
|
||||
$salida = "tmp/inventarioUbicacionEtiquetas.xml";
|
||||
$salida = TMP."/inventarioUbicacionEtiquetas.xml";
|
||||
break;
|
||||
}
|
||||
$plantilla = file_get_contents($fichero) or die('Fallo en la apertura de la plantilla ' . $fichero);
|
||||
@@ -98,7 +99,7 @@ class InformeInventario {
|
||||
return $this->devuelveInforme($informe);
|
||||
case "csv":
|
||||
//Genera una hoja de cálculo en formato csv
|
||||
$nombre = "tmp/Ubicacion" . strftime("%Y%m%d") . rand(100, 999) . ".csv";
|
||||
$nombre = TMP."/Ubicacion" . strftime("%Y%m%d") . rand(100, 999) . ".csv";
|
||||
$hoja = new Csv($this->bdd);
|
||||
$hoja->crea($nombre);
|
||||
$hoja->ejecutaConsulta($salida);
|
||||
@@ -118,15 +119,15 @@ class InformeInventario {
|
||||
switch ($salidaInforme) {
|
||||
case "pantalla":
|
||||
$fichero = "xml/inventarioArticulo.xml";
|
||||
$salida = "tmp/inventarioArticulo.xml";
|
||||
$salida = TMP."/inventarioArticulo.xml";
|
||||
break;
|
||||
case "csv":
|
||||
$fichero = "xml/inventarioArticuloCSV.xml";
|
||||
$salida = "tmp/inventarioArticuloCSV.xml";
|
||||
$salida = TMP."/inventarioArticuloCSV.xml";
|
||||
break;
|
||||
case "etiquetas":
|
||||
$fichero = "xml/inventarioArticuloEtiquetas.xml";
|
||||
$salida = "tmp/inventarioArticuloEtiquetas.xml";
|
||||
$salida = TMP."/inventarioArticuloEtiquetas.xml";
|
||||
break;
|
||||
}
|
||||
$plantilla = file_get_contents($fichero) or die('Fallo en la apertura de la plantilla ' . $fichero);
|
||||
@@ -150,7 +151,7 @@ class InformeInventario {
|
||||
return $this->devuelveInforme($informe);
|
||||
case "csv":
|
||||
//Genera una hoja de cálculo en formato csv
|
||||
$nombre = "tmp/Articulo" . strftime("%Y%m%d") . rand(100, 999) . ".csv";
|
||||
$nombre = TMP."/Articulo" . strftime("%Y%m%d") . rand(100, 999) . ".csv";
|
||||
$hoja = new Csv($this->bdd);
|
||||
$hoja->crea($nombre);
|
||||
$hoja->ejecutaConsulta($salida);
|
||||
@@ -204,7 +205,7 @@ class InformeInventario {
|
||||
<label for='salida'>Salida del informe por:</label>";
|
||||
$salida.='<div class="radio"><label><input type="radio" name="salida" value="pantalla" checked><span class="glyphicon glyphicon-list-alt"></span> Pantalla</label></div>';
|
||||
$salida.='<div class="radio"><label><input type="radio" name="salida" value="csv"><span class="glyphicon glyphicon-cloud-download"></span> Archivo CSV</label></div>';
|
||||
$salida.='<div class="radio"><label><input type="radio" name="salida" value="etiquetas"><span class="glyphicon glyphicon-qrcode"></span> Etiquetas</label></div>';
|
||||
$salida.='<div class="radio"><label><input type="radio" name="salida" value="etiquetas"><span class="glyphicon glyphicon-qrcode"></span> Etiquetas (<a target="_new" href="http://www.apli.es/producto/ficha_producto.aspx?referencia=01275&stype=referencia&referenciaValue=01275&q=01275">Apli 1275</a>)</label></div>';
|
||||
$salida.="<br><br></fieldset><p>";
|
||||
$salida.='<p align="center"><button type=submit class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span> Aceptar</button></p><br></div>' . "\n";
|
||||
$salida.="<script>$('.selectpicker').selectpicker();</script>";
|
||||
@@ -223,11 +224,28 @@ class InformeInventario {
|
||||
$accion = "index.php?informeInventario&opc=listarArticulo";
|
||||
return $this->formulario($accion, 'Artículo', $this->listaArticulos());
|
||||
}
|
||||
|
||||
|
||||
private function inventarioTotal()
|
||||
{
|
||||
return $this->dialogo();
|
||||
}
|
||||
|
||||
private function dialogo()
|
||||
{
|
||||
$dialogo = '<div class="container col-5"><div class="jumbotron">
|
||||
<h1>Inventario Total</h1>
|
||||
<p>¿Desea obtener el inventario de todo el centro?</p>
|
||||
<p><a class="btn btn-primary btn-lg" role="button" onClick="location.href=' . "'index.php'" . '"><span class="glyphicon glyphicon-arrow-left"></span> Volver</a>
|
||||
<a class="btn btn-success btn-lg" role="button" onClick="location.href=' . "'index.php?informeInventario&opc=listarTotal'" . '">
|
||||
<span class="glyphicon glyphicon-list-alt"></span> Continuar</a></p>
|
||||
</div></div>';
|
||||
return $dialogo;
|
||||
}
|
||||
|
||||
private function listarTotal()
|
||||
{
|
||||
$fichero = "xml/inventarioUbicacion.xml";
|
||||
$salida = "tmp/inventarioUbicacion.xml";
|
||||
$salida = TMP."/inventarioUbicacion.xml";
|
||||
$comando = "select * from Ubicaciones ;";
|
||||
$resultado = $this->bdd->ejecuta($comando);
|
||||
if (!$resultado) {
|
||||
|
@@ -1,4 +1,3 @@
|
||||
|
||||
<?php
|
||||
|
||||
/**
|
||||
@@ -94,11 +93,13 @@ class InformePDF {
|
||||
public function getCabecera() {
|
||||
$cabecera = "Content-type: application/pdf";
|
||||
$cabecera = $cabecera . "Content-length: " . strlen($this->docu);
|
||||
$cabecera = $cabecera . "Content-Disposition: inline; filename=tmp/Informe.pdf";
|
||||
$cabecera = $cabecera . "Content-Disposition: inline; filename=".TMP."/Informe.pdf";
|
||||
return $cabecera;
|
||||
}
|
||||
|
||||
public function guardaArchivo($nombre = "tmp/Informe.pdf") {
|
||||
public function guardaArchivo($nombre) {
|
||||
if (!isset($nombre))
|
||||
$nombre = TMP . "/Informe.pdf";
|
||||
$fichero = fopen($nombre, "w");
|
||||
fwrite($fichero, $this->getCabecera());
|
||||
fwrite($fichero, $this->getContenido(), strlen($this->getContenido()));
|
||||
@@ -109,7 +110,7 @@ class InformePDF {
|
||||
header("Content-type: application/pdf");
|
||||
$longitud = strlen($this->docu);
|
||||
header("Content-length: $longitud");
|
||||
header("Content-Disposition: inline; filename=tmp/Informe.pdf");
|
||||
header("Content-Disposition: inline; filename=".TMP."/Informe.pdf");
|
||||
}
|
||||
|
||||
public function imprimeInforme() {
|
||||
|
11
Instalar.php
11
Instalar.php
@@ -31,8 +31,7 @@ define('NUMPASOS', 3);
|
||||
define('MINBYTES', 4096000); // post_max_size y max_upload van con esto
|
||||
define('CADENAMINBYTES', '4M');
|
||||
define('CONFIGURACION', 'inc/configuracion.inc');
|
||||
define('CONFIGTMP', 'tmp/config.tmp');
|
||||
define('TMP', './tmp');
|
||||
define('CONFIGTMP', TMP.'/config.tmp');
|
||||
define('INC', './inc');
|
||||
|
||||
$instalar = new Instalar();
|
||||
@@ -332,8 +331,8 @@ class Instalar {
|
||||
$borra_database = "DROP DATABASE " . BASEDATOS . " ;";
|
||||
$database = "CREATE DATABASE " . BASEDATOS . " DEFAULT CHARACTER SET utf8;";
|
||||
$articulos = "CREATE TABLE `Articulos` (
|
||||
`id` smallint(6) NOT NULL auto_increment COMMENT 'ordenable',
|
||||
`descripcion` varchar(60) NOT NULL COMMENT 'ordenable,link/Articulo',
|
||||
`id` smallint(6) NOT NULL auto_increment COMMENT 'ordenable,link/Articulo',
|
||||
`descripcion` varchar(60) NOT NULL COMMENT 'ordenable,ajax/text',
|
||||
`marca` varchar(20) default NULL COMMENT 'ordenable,ajax/text',
|
||||
`modelo` varchar(20) default NULL COMMENT 'ordenable,ajax/text',
|
||||
`cantidad` int(11) default NULL COMMENT 'ordenable,ajax/number',
|
||||
@@ -342,8 +341,8 @@ class Instalar {
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=769 DEFAULT CHARSET=utf8;
|
||||
";
|
||||
$ubicaciones = "CREATE TABLE `Ubicaciones` (
|
||||
`id` smallint(5) unsigned NOT NULL auto_increment COMMENT 'ordenable',
|
||||
`Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,link/Ubicacion',
|
||||
`id` smallint(5) unsigned NOT NULL auto_increment COMMENT 'ordenable,link/Ubicacion',
|
||||
`Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,ajax/text',
|
||||
`imagen` varchar(45) DEFAULT NULL COMMENT 'imagen',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=179 DEFAULT CHARSET=utf8;
|
||||
|
@@ -161,7 +161,6 @@ class Mantenimiento {
|
||||
$salida = $this->cargaComplementos();
|
||||
//Introduce un botón para hacer búsquedas y el número de la página
|
||||
$salida.= $this->enlaceBusqueda($pagSigte);
|
||||
$salida.= $cabecera;
|
||||
//Consulta paginada de todas las tuplas
|
||||
$comando = str_replace('{inferior}', $pagina * NUMFILAS, $comando);
|
||||
$comando = str_replace('{superior}', NUMFILAS, $comando);
|
||||
@@ -185,12 +184,15 @@ class Mantenimiento {
|
||||
$this->datosURL['pag'] = $totalPags;
|
||||
header('Location: ' . $this->montaURL());
|
||||
} else {
|
||||
$salida = "<p align=\"center\"><center><h2>No hay registros</h2></center></p><br>";
|
||||
$salida .= '<br><br><div class="alert alert-danger">No hay registros</div>';
|
||||
}
|
||||
} else {
|
||||
$salida.= $cabecera;
|
||||
}
|
||||
//$salida.=$comando;
|
||||
//$salida.=var_export($this->campos,true);
|
||||
while ($fila = $this->bdd->procesaResultado()) {
|
||||
$salida.='<tr align="center" bottom="middle">';
|
||||
$salida.='<tr bottom="middle">';
|
||||
foreach ($fila as $clave => $valor) {
|
||||
if ($clave == "id") {
|
||||
$id = $valor;
|
||||
@@ -230,10 +232,19 @@ class Mantenimiento {
|
||||
$cant++;
|
||||
$valor = $this->campoAjax($id, $clave, $tipo, $valor, $cant, $fila);
|
||||
}
|
||||
$salida.="<td>$valor</td>\n";
|
||||
$alineacion = '';
|
||||
if (isset($this->campos[$clave]['Ajuste'])) {
|
||||
switch ($this->campos[$clave]['Ajuste']) {
|
||||
case 'D': $alineacion = 'align="right"'; break;
|
||||
case 'L': $alineacion = 'align="left"'; break;
|
||||
case 'C': $alineacion = 'align="center"'; break;
|
||||
}
|
||||
}
|
||||
$salida.="<td $alineacion >$valor</td>\n";
|
||||
}
|
||||
//Añade los botones de acciones
|
||||
$salida .= '<td align="center">';
|
||||
//Añade el icono de editar
|
||||
$salida .= "<td>";
|
||||
if ($this->perfil['Modificacion']) {
|
||||
//$salida.='<a href="index.php?' . $tabla . '&opc=editar&id=' . $id . "&pag=" . $pagina . $sufijoOrden . $sufijoEnlace .
|
||||
$this->backupURL(); $this->datosURL['opc'] = "editar"; $this->datosURL['id'] = $id;
|
||||
@@ -412,7 +423,7 @@ class Mantenimiento {
|
||||
$valor = "null";
|
||||
}
|
||||
} else {
|
||||
$valor = $_POST[$campo] == "" ? "null" : '"' . $_POST[$campo] . '"';
|
||||
$valor = $_POST[$campo] == "" ? "null" : '"' . $this->bdd->filtra($_POST[$campo]) . '"';
|
||||
}
|
||||
}
|
||||
$comando.="$coma " . $valor;
|
||||
@@ -493,7 +504,7 @@ class Mantenimiento {
|
||||
if (strlen(trim($_POST[$campo])) == 0) {
|
||||
$comando.="$coma $campo=null";
|
||||
} else {
|
||||
$comando.=$coma . ' ' . $campo . '="' . $_POST[$campo] . '"';
|
||||
$comando.=$coma . ' ' . $campo . '="' . $this->bdd->filtra($_POST[$campo]) . '"';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -570,7 +581,9 @@ class Mantenimiento {
|
||||
$def = simplexml_load_file($nombre);
|
||||
foreach ($def->Campos->Col as $columna) {
|
||||
$this->campos[(string) $columna['Nombre']] = array("Field" => (string) $columna['Titulo'], "Comment" => (string) $columna['Varios'],
|
||||
"Type" => (string) $columna['Tipo'] . "(" . $columna['Ancho'] . ")", "Editable" => (string) $columna['Editable'], "Campo" => (string) $columna['Campo'], "Visible" => (string) $columna['Visible']);
|
||||
"Type" => (string) $columna['Tipo'] . "(" . $columna['Ancho'] . ")", "Editable" => (string) $columna['Editable'],
|
||||
"Campo" => (string) $columna['Campo'], "Visible" => (string) $columna['Visible'], "Ajuste" => (string) $columna['Ajuste'],
|
||||
"Titulo" => (string) $columna['Titulo']);
|
||||
}
|
||||
$this->comandoConsulta = $def->Consulta;
|
||||
} else {
|
||||
@@ -581,6 +594,15 @@ class Mantenimiento {
|
||||
$this->campos[$datos[$i]["Field"]] = $this->campos[$datos[$i]["Field"]][0];
|
||||
$this->campos[$datos[$i]["Field"]]["Campo"] = $datos[$i]["Field"];
|
||||
$this->campos[$datos[$i]["Field"]]["Editable"] = "si";
|
||||
if (strstr($datos[$i]["Type"],"int")) {
|
||||
$ajuste = "D";
|
||||
} else if (strstr($datos[$i]["Type"],"char")) {
|
||||
$ajuste = "L";
|
||||
}
|
||||
if (strstr($datos[$i]["Comment"],"imagen")) {
|
||||
$ajuste = "C";
|
||||
}
|
||||
$this->campos[$datos[$i]["Field"]]["Ajuste"] = $ajuste;
|
||||
}
|
||||
$this->comandoConsulta = "select SQL_CALC_FOUND_ROWS * from " . $this->tabla . " {buscar} {orden} limit {inferior},{superior}";
|
||||
}
|
||||
@@ -612,18 +634,20 @@ class Mantenimiento {
|
||||
}
|
||||
}
|
||||
$clave2 = $clave;
|
||||
$clave = str_ireplace("descripcion", "Descripción", $clave);
|
||||
/*$clave = str_ireplace("descripcion", "Descripción", $clave);
|
||||
$clave = str_ireplace("ubicacion", "Ubicación", $clave);
|
||||
$clave = str_ireplace("articulo", "Artículo", $clave);
|
||||
$clave = str_ireplace("articulo", "Artículo", $clave);*/
|
||||
$ordenActual = $this->datosURL['orden'];
|
||||
if ($ordenable) {
|
||||
$this->backupURL();
|
||||
$this->datosURL['orden'] = $clave2;
|
||||
$resFlecha = $clave2 == $ordenActual ? $flecha : '';
|
||||
$salida.="<th><b><a title=\"Establece orden por $clave \" href=\"". $this->montaURL() . "\"> " . ucfirst($clave) . $resFlecha . " </a></b></th>\n";
|
||||
$salida.="<th><b><a title=\"Establece orden por $clave \" href=\"". $this->montaURL() . "\"> " . $datos["Titulo"] . $resFlecha . " </a></b></th>\n";
|
||||
//$salida.="<th><b><a title=\"Establece orden por $clave \" href=\"". $this->montaURL() . "\"> " . ucfirst($clave) . $resFlecha . " </a></b></th>\n";
|
||||
$this->restoreURL();
|
||||
} else {
|
||||
$salida.='<th><b>' . ucfirst($clave) . '</b></th>' . "\n";
|
||||
$salida.='<th><b>' . $datos["Titulo"] . '</b></th>' . "\n";
|
||||
//$salida.='<th><b>' . ucfirst($clave) . '</b></th>' . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -655,6 +679,7 @@ class Mantenimiento {
|
||||
$accion = $this->montaURL();
|
||||
$salida.='<div class="col-sm-8"><form name="mantenimiento.form" enctype="multipart/form-data" class="form-horizontal" role="form" method="post" action="' . $accion . '">' . "\n";
|
||||
$salida.="<fieldset style=\"width: 96%;\"><p><legend style=\"color: red;\"><b>$tipo</b></legend>\n";
|
||||
//$salida.= var_export($datos,true);
|
||||
foreach ($this->campos as $clave => $valor) {
|
||||
if ($valor["Editable"] == "no") {
|
||||
//Se salta los campos que no deben aparecer
|
||||
@@ -664,7 +689,8 @@ class Mantenimiento {
|
||||
$salida .='<div class="form-group">';
|
||||
$campo = $valor['Campo'];
|
||||
$campos.="$campo&";
|
||||
$salida.='<label class="col-sm-2 control-label" for="' . $campo . '">' . ucfirst($clave) . "</label> ";
|
||||
$salida.='<label class="col-sm-2 control-label" for="' . $campo . '">' . $valor['Titulo'] . "</label> ";
|
||||
//$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.
|
||||
$modoEfectivo = $clave == 'id' ? "readonly" : $modo;
|
||||
@@ -843,13 +869,16 @@ class Mantenimiento {
|
||||
$valorSelect = 'data-value="'.$valorDato.'" ';
|
||||
$remoto = $valorSelect . ' data-sourceCache="true" data-sourceError="Error cargando datos" data-source="Ajax.php?opc=get&tabla='.$tabla2.'"';
|
||||
}
|
||||
$mensaje = '<a href="#" title="Modifica '.$titulo.'" id="'.$clave.'" name="'.$clave.$num.'" data-type="'.$tipo.'" data-min="1" data-placement="right" '.$formato.' data-pk="'.$id.'" '.$remoto.' >' . $valor . '</a>
|
||||
$mensaje = '<a href="#" data-toggle="dblclick" data-title="Modifica '.$titulo.'" id="'.$clave.'" name="'.$clave.$num.'" data-type="'.$tipo.
|
||||
'" data-min="1" data-placement="top" '.$formato.' data-pk="'.$id.'" '.$remoto.' >'.
|
||||
'<div title="doble click para editar">' . $valor . '</div></a>
|
||||
<script>
|
||||
$(function(){' . "
|
||||
$('[name=\"".$clave.$num."\"]').editable({
|
||||
url: 'Ajax.php?opc=put&tabla=". $this->tabla . "',
|
||||
|
||||
emptytext: 'Vacío',
|
||||
title: 'lll',
|
||||
mode: 'popup',
|
||||
success: function(respuesta, newValue) {
|
||||
if (respuesta.success === false) {
|
||||
return respuesta.msj; //msj will be shown in editable form
|
||||
|
@@ -20,7 +20,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class Pdf_mysql_table extends Fpdf
|
||||
class Pdf_mysql_table extends FPDF
|
||||
{
|
||||
/**
|
||||
* Modificado por Ricardo Montañana 05/2008 para añadir la posibilidad de cálculo de totales
|
||||
|
2
Sql.php
2
Sql.php
@@ -66,7 +66,7 @@ class Sql {
|
||||
$this->bdd = @new mysqli($servidor,$usuario,$clave,$baseDatos);
|
||||
if (mysqli_connect_errno()) {
|
||||
$this->mensajeError='<h1>Fallo al conectar con el servidor MySQL.</h1>';
|
||||
$this->mensajeError.="Servidor [".$servidor ."] usuario=[".$usuario."] clave [".$clave."] base [".$baseDatos."]";
|
||||
$this->mensajeError.="Servidor [".$servidor ."] base de datos [".$baseDatos."]";
|
||||
$this->error=true;
|
||||
$this->estado=false;
|
||||
} else {
|
||||
|
BIN
img/qrlogo.png
Normal file
BIN
img/qrlogo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
@@ -33,12 +33,13 @@ 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('ESTILO', 'bootstrap'); //Estilo de los iconos de edición (bootstrap, bootstrap, bootstrap)
|
||||
define('PLANTILLA', 'bootstrap'); //Estilo de la plantilla y recursos a utilizar
|
||||
define('COLORLAT', '#a4bdfc'); //Color de la barra de menú lateral
|
||||
define('COLORFON', '#ffb878'); //Color del fondo de la pantalla
|
||||
define('MYSQLDUMP', '/usr/local/bin/mysqldump'); //camino a mysqldump
|
||||
define('GZIP', '/usr/bin/gzip'); //Camino a gzip
|
||||
define('IMAGEDATA', 'img.data'); //Directorio donde se almacenarán las imágenes
|
||||
define('INSTALADO', 'sí') //Indicador que permite ejecutar instalar.php
|
||||
define('TMP', './tmp'); //Directorio para archivos temporales
|
||||
define('INSTALADO', 'sí'); //Indicador que permite ejecutar instalar.php
|
||||
?>
|
||||
|
@@ -23,5 +23,5 @@
|
||||
*/
|
||||
|
||||
define('AUTOR', 'Ricardo Montañana Gómez');
|
||||
define('VERSION', '1.10');
|
||||
define('VERSION', '1.14');
|
||||
?>
|
||||
|
@@ -34,6 +34,7 @@
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="http://rmontanana.gitbooks.io/Inventario2/" target="_blank" title="Ayuda"><span class="glyphicon glyphicon-book"></span></a>
|
||||
<a class="navbar-brand" href="index.php">{aplicacion}</a>
|
||||
</div>
|
||||
<div class="navbar-brand">
|
||||
|
@@ -22,8 +22,8 @@ DROP TABLE IF EXISTS `Articulos`;
|
||||
SET @saved_cs_client = @@character_set_client;
|
||||
SET character_set_client = utf8;
|
||||
CREATE TABLE `Articulos` (
|
||||
`id` smallint(6) NOT NULL auto_increment COMMENT 'ordenable',
|
||||
`descripcion` varchar(60) NOT NULL COMMENT 'ordenable,link/Articulo',
|
||||
`id` smallint(6) NOT NULL auto_increment COMMENT 'ordenable,link/Articulo',
|
||||
`descripcion` varchar(60) NOT NULL COMMENT 'ordenable,ajax/text',
|
||||
`marca` varchar(20) default NULL COMMENT 'ordenable,ajax/text',
|
||||
`modelo` varchar(20) default NULL COMMENT 'ordenable,ajax/text',
|
||||
`cantidad` int(11) default NULL COMMENT 'ordenable,ajax/number',
|
||||
@@ -66,8 +66,8 @@ DROP TABLE IF EXISTS `Ubicaciones`;
|
||||
SET @saved_cs_client = @@character_set_client;
|
||||
SET character_set_client = utf8;
|
||||
CREATE TABLE `Ubicaciones` (
|
||||
`id` smallint(5) unsigned NOT NULL auto_increment COMMENT 'ordenable',
|
||||
`Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,link/Ubicacion',
|
||||
`id` smallint(5) unsigned NOT NULL auto_increment COMMENT 'ordenable,link/Ubicacion',
|
||||
`Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,ajax/text',
|
||||
`imagen` varchar(45) DEFAULT NULL COMMENT 'imagen',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=184 DEFAULT CHARSET=utf8;
|
||||
|
@@ -2,7 +2,11 @@
|
||||
<Informe>
|
||||
<Titulo Texto="Informe de Artículos" />
|
||||
<Datos>
|
||||
<Consulta>select * from Articulos where descripcion like '%{filtro}%' order by {orden};</Consulta>
|
||||
<Consulta>
|
||||
select A.id as id,A.descripcion as descripcion, A.marca as marca, A.modelo as modelo, A.cantidad as cantidad,
|
||||
(select count(E.id) from Elementos E where E.id_Articulo=A.id) as Numero from Articulos A
|
||||
where A.descripcion like '%{filtro}%' order by {orden};
|
||||
</Consulta>
|
||||
</Datos>
|
||||
<Pagina Orientacion="P" Formato="A4">
|
||||
<Cabecera>Relación Artículos</Cabecera>
|
||||
@@ -10,8 +14,9 @@
|
||||
<Col Nombre="id" Ancho="10" Ajuste="D" Titulo="id"/>
|
||||
<Col Nombre="descripcion" Ancho="70" Ajuste="I" Titulo="Descripción"/>
|
||||
<Col Nombre="marca" Ancho="40" Ajuste="I" Titulo="Marca"/>
|
||||
<Col Nombre="modelo" Ancho="50" Ajuste="I" Titulo="Modelo"/>
|
||||
<Col Nombre="cantidad" Ancho="20" Ajuste="D" Titulo="cantidad"/>
|
||||
<Col Nombre="modelo" Ancho="40" Ajuste="I" Titulo="Modelo"/>
|
||||
<Col Nombre="cantidad" Ancho="20" Ajuste="D" Titulo="Cantidad"/>
|
||||
<Col Nombre="Numero" Ancho="15" Ajuste="D" Titulo="NºElem"/>
|
||||
</Cuerpo>
|
||||
</Pagina>
|
||||
</Informe>
|
||||
|
@@ -2,13 +2,16 @@
|
||||
<Informe>
|
||||
<Titulo Texto="Informe de Ubicaciones" />
|
||||
<Datos>
|
||||
<Consulta>select * from Ubicaciones where descripcion like '%{filtro}%' order by {orden};</Consulta>
|
||||
<Consulta>select U.id as id, U.Descripcion as Descripcion,(select count(E.id) from Elementos E where E.id_Ubicacion=U.id) as Numero
|
||||
from Ubicaciones U where U.descripcion like '%{filtro}%' order by {orden};
|
||||
</Consulta>
|
||||
</Datos>
|
||||
<Pagina Orientacion="P" Formato="A4">
|
||||
<Cabecera>Relación de Ubicaciones</Cabecera>
|
||||
<Cuerpo>
|
||||
<Col Nombre="id" Ancho="10" Ajuste="D" Titulo="id"/>
|
||||
<Col Nombre="Descripcion" Ancho="80" Ajuste="I" Titulo="Descripción"/>
|
||||
<Col Nombre="Numero" Ancho="15" Ajuste="D" Titulo="Nº Elem"/>
|
||||
</Cuerpo>
|
||||
</Pagina>
|
||||
</Informe>
|
||||
|
20
xml/mantenimientoArticulos.xml
Normal file
20
xml/mantenimientoArticulos.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0"?>
|
||||
<Mantenimiento>
|
||||
<Titulo>Mantenimiento de Artículos</Titulo>
|
||||
<Consulta>
|
||||
select SQL_CALC_FOUND_ROWS A.id as id,A.descripcion as descripcion, A.marca as marca, A.modelo as modelo, A.cantidad as cantidad,
|
||||
(select sum(E.cantidad) from Elementos E where E.id_Articulo=A.id) as cantubi,
|
||||
(select count(E.id) from Elementos E where E.id_Articulo=A.id) as numero,A.imagen as imagen from Articulos A
|
||||
{buscar} {orden} limit {inferior},{superior};
|
||||
</Consulta>
|
||||
<Campos>
|
||||
<Col Campo="id" Nombre="id" Ancho="5" Ajuste="D" Titulo="id" Tipo="smallint(6)" Varios="ordenable,link/Articulo" Visible="si"/>
|
||||
<Col Campo="descripcion" Nombre="descripcion" Ancho="50" Ajuste="L" Titulo="Descripción" Visible="si" Varios="ordenable,ajax/text" Editable="si"/>
|
||||
<Col Campo="marca" Nombre="marca" Ancho="40" Ajuste="L" Titulo="Marca" Varios="ordenable,ajax/text" Editable="si" Visible="si"/>
|
||||
<Col Campo="modelo" Nombre="modelo" Ancho="40" Ajuste="L" Titulo="Modelo" Varios="ordenable,ajax/text" Editable="si" Visible="si"/>
|
||||
<Col Campo="cantidad" Nombre="cantidad" Ancho="15" Ajuste="D" Titulo="Cantidad" Tipo="Int(11)" Visible="si" Editable="si" Varios="ordenable,ajax/number"/>
|
||||
<Col Campo="cantubi" Nombre="cantubi" Ancho="15" Ajuste="D" Titulo="Cant. ubicada" Editable="no" Varios="ordenable" Visible="si"/>
|
||||
<Col Campo="numero" Nombre="numero" Ancho="15" Ajuste="D" Titulo="Nº Elementos" Editable="no" Varios="ordenable" Visible="si"/>
|
||||
<Col Campo="imagen" Nombre="imagen" Ancho="10" Ajuste="C" Titulo="Imagen" Visible="si" Tipo="imagen" Varios="imagen" Editable="si"/>
|
||||
</Campos>
|
||||
</Mantenimiento>
|
@@ -14,9 +14,9 @@
|
||||
<Col Nombre="marca" Ancho="40" Ajuste="L" Titulo="Marca" Varios="ordenable" Editable="no" Visible="si"/>
|
||||
<Col Nombre="modelo" Ancho="40" Ajuste="L" Titulo="Modelo" Varios="ordenable" Editable="no" Visible="si"/>
|
||||
<Col Campo="numserie" Nombre="numserie" Ancho="30" Ajuste="L" Titulo="Nº Serie" Visible="si" Varios="ordenable,ajax/text" Editable="si"/>
|
||||
<Col Campo="fechaCompra" Nombre="fechaCompra" Ancho="25" Ajuste="L" Titulo="Compra" Visible="si" Varios="ordenable,ajax/combodate" Tipo="fecha" Editable="si"/>
|
||||
<Col Campo="fechaCompra" Nombre="fechaCompra" Ancho="25" Ajuste="C" Titulo="Compra" Visible="si" Varios="ordenable,ajax/combodate" Tipo="fecha" Editable="si"/>
|
||||
<Col Campo="cantidad" Nombre="cantidad" Ancho="15" Ajuste="D" Titulo="Cant." Tipo="Int(11)" Visible="si" Editable="si" Varios="ajax/number"/>
|
||||
<Col Campo="imagen" Nombre="imagen" Ancho="10" Titulo="Imagen" Tipo="imagen" Editable="si" Visible="si" Varios="imagen"/>
|
||||
<Col Campo="imagen" Nombre="imagen" Ancho="10" Titulo="Imagen" Ajuste="C" Tipo="imagen" Editable="si" Visible="si" Varios="imagen"/>
|
||||
<Col Campo="idUbicaciones" Nombre="idUbicaciones" Ancho="10" Titulo="idUbicaciones" Tipo="int" Editable="no" Visible="no" Varios=""/>
|
||||
<Col Campo="idArticulos" Nombre="idArticulos" Ancho="10" Titulo="idArticulos" Tipo="int" Editable="no" Visible="no" Varios=""/>
|
||||
</Campos>
|
||||
|
14
xml/mantenimientoUbicaciones.xml
Normal file
14
xml/mantenimientoUbicaciones.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<Mantenimiento>
|
||||
<Titulo>Mantenimiento de Ubicaciones</Titulo>
|
||||
<Consulta>
|
||||
select SQL_CALC_FOUND_ROWS U.id as id, U.descripcion as Descripcion, U.imagen as imagen, (select count(E.id) from Elementos E where E.id_Ubicacion=U.id) as numero from Ubicaciones U
|
||||
{buscar} {orden} limit {inferior},{superior};
|
||||
</Consulta>
|
||||
<Campos>
|
||||
<Col Campo="id" Nombre="id" Ancho="5" Ajuste="D" Titulo="id" Tipo="smallint(6)" Varios="ordenable,link/Ubicacion" Visible="si"/>
|
||||
<Col Campo="Descripcion" Nombre="Descripcion" Ancho="50" Ajuste="L" Titulo="Descripción" Visible="si" Varios="ordenable,ajax/text" Editable="si"/>
|
||||
<Col Campo="imagen" Nombre="imagen" Ancho="10" Ajuste="C" Titulo="Imagen" Tipo="imagen" Visible="si" Varios="imagen" Editable="si"/>
|
||||
<Col Campo="numero" Nombre="numero" Ancho="10" Ajuste="D" Titulo="Nº Elementos" Varios="ordenable" Editable="no" Visible="si"/>
|
||||
</Campos>
|
||||
</Mantenimiento>
|
@@ -10,12 +10,12 @@
|
||||
<Col Campo="nombre" Nombre="nombre" Ancho="8" Ajuste="L" Titulo="Nombre" Varios="ordenable,buscable/nombre,ajax/text" Editable="si"/>
|
||||
<Col Campo="clave" Nombre="clave" Ancho="16" Ajuste="L" Titulo="Clave" Tipo="Password" Editable="si" Varios="ajax/text"/>
|
||||
<Col Campo="idSesion" Nombre="idSesion" Ancho="32" Ajuste="L" Titulo="id Sesión" Editable="si" Varios="ajax/text"/>
|
||||
<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"/>
|
||||
<Col Campo="alta" Nombre="alta" Ancho="1" Ajuste="C" Tipo="Boolean" Titulo="Altas" Editable="si"/>
|
||||
<Col Campo="modificacion" Nombre="modificacion" Ancho="1" Ajuste="C" Tipo="Boolean" Titulo="Modificaciones" Editable="si"/>
|
||||
<Col Campo="borrado" Nombre="borrado" Ancho="1" Ajuste="C" Tipo="Boolean" Titulo="Borrados" Editable="si"/>
|
||||
<Col Campo="consulta" Nombre="consulta" Ancho="1" Ajuste="C" Tipo="Boolean" Titulo="Consultas" Editable="si"/>
|
||||
<Col Campo="informe" Nombre="informe" Ancho="1" Ajuste="C" Tipo="Boolean" Titulo="Informes" Editable="si"/>
|
||||
<Col Campo="usuarios" Nombre="usuarios" Ancho="1" Ajuste="C" Tipo="Boolean" Titulo="Usuarios" Editable="si"/>
|
||||
<Col Campo="config" Nombre="config" Ancho="1" Ajuste="C" Tipo="Boolean" Titulo="Configuración" Editable="si"/>
|
||||
</Campos>
|
||||
</Mantenimiento>
|
||||
|
Reference in New Issue
Block a user