mirror of
https://github.com/rmontanana/inventario2.git
synced 2025-08-17 16:35:58 +00:00
Compare commits
55 Commits
Author | SHA1 | Date | |
---|---|---|---|
85ce241df7 | |||
|
1ff3f6acf2 | ||
|
da254740cf | ||
|
7bb740821d | ||
|
140a554630 | ||
|
75e8c14cf8 | ||
ebe0d77961 | |||
da30f625ed | |||
|
d7bfa748f3 | ||
a12b289e01 | |||
5119614455 | |||
|
a87e8016fc | ||
70887f5b62 | |||
|
e7eda6ae01 | ||
2d6514b264 | |||
b28c1e3683 | |||
|
fce421116d | ||
|
ce796b3684 | ||
13e4c12069 | |||
9a77339af6 | |||
6668596611 | |||
5edee2b517 | |||
b8d071619f | |||
|
e7dea5a8a9 | ||
921d5a36e0 | |||
ec03e8c295 | |||
2d1bbc45e6 | |||
2853e312f7 | |||
0151adfb3d | |||
060e52580a | |||
d8ff235af2 | |||
d474e66776 | |||
6ac83883f4 | |||
d7769e94e4 | |||
71b4d3fd00 | |||
2b56798b24 | |||
baeaef02c4 | |||
bdf6c6bf88 | |||
53fa37b2d6 | |||
bf1c7e4b4b | |||
a25e8a6c1a | |||
|
a34058f1c5 | ||
|
91c55fd3f6 | ||
a6871606e0 | |||
f45bff57a6 | |||
25e0264b27 | |||
f0e76f92b5 | |||
f6fec3bdf3 | |||
336cab29ef | |||
46815ed595 | |||
4cf4354dbc | |||
17c907795f | |||
|
a8cad22add | ||
1bfeb891e6 | |||
50bbd8efad |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,4 +1,2 @@
|
|||||||
nbproject
|
nbproject
|
||||||
tmp/*
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
/img.data/
|
|
88
Ajax.php
Normal file
88
Ajax.php
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Inventario
|
||||||
|
* @copyright Copyright (c) 2008, Ricardo Montañana Gómez
|
||||||
|
* @license http://www.gnu.org/licenses/gpl-3.0.txt
|
||||||
|
* This file is part of Inventario.
|
||||||
|
* Inventario is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Inventario is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with Inventario. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//Clase encargada de procesar las peticiones ajax
|
||||||
|
require_once 'inc/configuracion.inc';
|
||||||
|
require_once 'Sql.php';
|
||||||
|
|
||||||
|
$ajax = new Ajax();
|
||||||
|
echo $ajax->procesa();
|
||||||
|
|
||||||
|
class Ajax {
|
||||||
|
private $sql;
|
||||||
|
private $tabla;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->sql = new Sql(SERVIDOR, USUARIO, CLAVE, BASEDATOS);
|
||||||
|
if ($this->sql->error()) {
|
||||||
|
return $this->respuesta($this->mensaje(false, 'Error conectando con la Base de Datos'));
|
||||||
|
};
|
||||||
|
$this->tabla = $_GET['tabla'];
|
||||||
|
}
|
||||||
|
private function respuesta($mensaje)
|
||||||
|
{
|
||||||
|
header('Content-Type: application/json', true, 200);
|
||||||
|
return $mensaje;
|
||||||
|
}
|
||||||
|
public function procesa()
|
||||||
|
{
|
||||||
|
$opc = $_GET['opc'];
|
||||||
|
switch ($opc) {
|
||||||
|
case "get": return $this->obtiene();
|
||||||
|
case "put": return $this->actualiza();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private function mensaje($exito, $texto)
|
||||||
|
{
|
||||||
|
return json_encode(array("success" => $exito, "msj" => $texto));
|
||||||
|
}
|
||||||
|
private function actualiza()
|
||||||
|
{
|
||||||
|
if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
|
||||||
|
$comando = "update " . mysql_escape_string($this->tabla) . " set " . mysql_escape_string($_POST['name']) . " = '" . mysql_escape_string($_POST['value']) . "' where id = '" . mysql_escape_string($_POST['pk']). "';";
|
||||||
|
$this->sql->ejecuta($comando);
|
||||||
|
$exito = !$this->sql->error();
|
||||||
|
$mensaje = $this->sql->mensajeError();
|
||||||
|
$resp = $this->mensaje($exito, $mensaje);
|
||||||
|
return $this->respuesta($resp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private function obtiene()
|
||||||
|
{
|
||||||
|
if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
|
||||||
|
$comando = "select id, descripcion from " . $this->tabla . " order by descripcion asc;";
|
||||||
|
$this->sql->ejecuta($comando);
|
||||||
|
$exito = !$this->sql->error();
|
||||||
|
$mensaje = $this->sql->mensajeError();
|
||||||
|
if (!$exito) {
|
||||||
|
return $this->respuesta($this->mensaje($exito, $mensaje));
|
||||||
|
}
|
||||||
|
$filas = array();
|
||||||
|
while($r = $this->sql->procesaResultado()) {
|
||||||
|
$filas[] = array($r['id'] => $r['descripcion']);
|
||||||
|
}
|
||||||
|
$resp = json_encode($filas);
|
||||||
|
return $this->respuesta($resp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
@@ -27,7 +27,7 @@ define('FORMULARIO_ACCESO', '<form name="formulario_acceso" action="index.php?re
|
|||||||
'Usuario<br><input type="text" name="usuario" value="" size="8" /><br><br>Clave<br><input type="password" name="clave" value="" size="8" />' .
|
'Usuario<br><input type="text" name="usuario" value="" size="8" /><br><br>Clave<br><input type="password" name="clave" value="" size="8" />' .
|
||||||
'<br><br><button type="submit" name="iniciar" class="btn btn-primary">Iniciar <span class="glyphicon glyphicon-log-in"></span></button></form>');
|
'<br><br><button type="submit" name="iniciar" class="btn btn-primary">Iniciar <span class="glyphicon glyphicon-log-in"></span></button></form>');
|
||||||
define('MENSAJE_DEMO', 'Puede Iniciar sesión con<br>usuario <i><b>demo</b></i><br>contraseña <i>demo</i><br>');
|
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="error">Usuario y clave incorrectos!</label><br><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', '<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-dialog modal-lg">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
@@ -39,9 +39,25 @@ define('CREDITOS', '<div class="modal fade" tabindex="-1" id="creditos" role="di
|
|||||||
<div class="jumbotron">
|
<div class="jumbotron">
|
||||||
<img src="img/logo.png" class="img-responsive img-rounded" style="float:left">
|
<img src="img/logo.png" class="img-responsive img-rounded" style="float:left">
|
||||||
<h1>Inventario2</h1>
|
<h1>Inventario2</h1>
|
||||||
<p> Aplicación para controlar el inventario de un centro educativo.</p><br><br><br><br><br><br>
|
<p> Aplicación para controlar el inventario de un centro educativo.</p>
|
||||||
<p><small>Copyright (C) 2008-2014 Ricardo Montañana Gómez<br>
|
<p>En la aplicación se hace uso de los siguientes módulos y/o bibliotecas</p>
|
||||||
Esta aplicación se distribuye con licencia <a target="_blank" href="http://www.gnu.org/licenses/gpl-3.0.html">GPLv3 </a></small></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>
|
||||||
|
<h5><small>Esta aplicación se distribuye con licencia <a target="_blank" href="http://www.gnu.org/licenses/gpl-3.0.html">GPLv3 </a></small></h5></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -102,7 +118,8 @@ class AportaContenido {
|
|||||||
* @param array $perfil Permisos de acceso del usuario
|
* @param array $perfil Permisos de acceso del usuario
|
||||||
* @param String $opcion Opción elegida por el usuario
|
* @param String $opcion Opción elegida por el usuario
|
||||||
*/
|
*/
|
||||||
public function __construct($baseDatos, $registrado, $usuario, $perfil, $opcion) {
|
public function __construct($baseDatos, $registrado, $usuario, $perfil, $opcion)
|
||||||
|
{
|
||||||
$this->bdd = $baseDatos;
|
$this->bdd = $baseDatos;
|
||||||
$this->miMenu = new Menu('inc/inventario.menu');
|
$this->miMenu = new Menu('inc/inventario.menu');
|
||||||
$this->registrado = $registrado;
|
$this->registrado = $registrado;
|
||||||
@@ -117,7 +134,8 @@ class AportaContenido {
|
|||||||
* @param string $idioma idioma para formatear la fecha, p.ej. es_ES
|
* @param string $idioma idioma para formatear la fecha, p.ej. es_ES
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function fechaActual($formato = '', $idioma = 'es_ES') {
|
public function fechaActual($formato = '', $idioma = 'es_ES')
|
||||||
|
{
|
||||||
if ($formato == '')
|
if ($formato == '')
|
||||||
$formato = "%d-%b-%y";
|
$formato = "%d-%b-%y";
|
||||||
setlocale(LC_TIME, $idioma);
|
setlocale(LC_TIME, $idioma);
|
||||||
@@ -128,7 +146,8 @@ class AportaContenido {
|
|||||||
*
|
*
|
||||||
* @return string Mensaje el usuario debe registrarse.
|
* @return string Mensaje el usuario debe registrarse.
|
||||||
*/
|
*/
|
||||||
private function mensajeRegistro() {
|
private function mensajeRegistro()
|
||||||
|
{
|
||||||
return 'Debe registrarse para acceder a este apartado';
|
return 'Debe registrarse para acceder a este apartado';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,10 +159,9 @@ class AportaContenido {
|
|||||||
* @param string $parametros Parámetros del método
|
* @param string $parametros Parámetros del método
|
||||||
* @return string Contenido devuelto por el método
|
* @return string Contenido devuelto por el método
|
||||||
*/
|
*/
|
||||||
public function __call($metodo, $parametros) {
|
public function __call($metodo, $parametros)
|
||||||
|
{
|
||||||
switch ($metodo) { // Dependiendo del método invocado
|
switch ($metodo) { // Dependiendo del método invocado
|
||||||
case 'titulo': // devolvemos el título
|
|
||||||
return PROGRAMA." v".VERSION;
|
|
||||||
case 'usuario':
|
case 'usuario':
|
||||||
if ($this->registrado)
|
if ($this->registrado)
|
||||||
return "Usuario=$this->usuario";
|
return "Usuario=$this->usuario";
|
||||||
@@ -159,10 +177,10 @@ class AportaContenido {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>";
|
</script>";
|
||||||
$campo = '<input type="hidden" name="fechaCabecera" id="fechaCabecera" value="'.$this->fechaActual("%d/%m/%Y").'">';
|
$campo = '<input type="hidden" name="fechaCabecera" id="fechaCabecera" value="' . $this->fechaActual("%d/%m/%Y") . '">';
|
||||||
$etiqueta = '<label for="fechaCabecera" onClick="$(' . "'#fechaCabecera'" . ").data('DateTimePicker').show();" . '">' . $this->fechaActual() . '</label>';
|
$etiqueta = '<label for="fechaCabecera" onClick="$(' . "'#fechaCabecera'" . ").data('DateTimePicker').show();" . '">' . $this->fechaActual() . '</label>';
|
||||||
return $etiqueta . $campo . $script;
|
return $etiqueta . $campo . $script;
|
||||||
case 'aplicacion': return PROGRAMA." v".VERSION;
|
case 'aplicacion': return PROGRAMA . " v" . VERSION;
|
||||||
case 'menu': // el menú
|
case 'menu': // el menú
|
||||||
if ($this->registrado) {
|
if ($this->registrado) {
|
||||||
return $this->miMenu->insertaMenu();
|
return $this->miMenu->insertaMenu();
|
||||||
@@ -217,18 +235,19 @@ class AportaContenido {
|
|||||||
case 'principal': // contenido inicial
|
case 'principal': // contenido inicial
|
||||||
|
|
||||||
$creditos = "$('#creditos').modal({keyboard: false});";
|
$creditos = "$('#creditos').modal({keyboard: false});";
|
||||||
|
$centro = '<div class="well well-sm">' . CENTRO . '</div>';
|
||||||
return $mensaje . '<br><br><center><img src="img/logo.png" alt="' . PROGRAMA . '" onClick="' . $creditos . '" >' .
|
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;
|
'<br><br><label onClick="' . $creditos . '">' . $centro . '</label></center><br><br>' . CREDITOS;
|
||||||
case 'articulos':
|
case 'articulos':
|
||||||
case 'ubicaciones':
|
case 'ubicaciones':
|
||||||
case 'test':
|
case 'test':
|
||||||
case 'elementos':
|
case 'elementos':
|
||||||
$this->DatosURL();
|
$this->cargaDatosURL();
|
||||||
if ($this->datosURL['opc'] == "informe") {
|
if ($this->datosURL['opc'] == "informe") {
|
||||||
if (!$this->pefil['Informe']) {
|
if (!$this->pefil['Informe']) {
|
||||||
$this->procesaURL();
|
$this->procesaURL();
|
||||||
$fichero = 'xml/informe' . ucfirst($opcion) . '.xml';
|
$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.
|
//Establece los posibles parámetros del listado.
|
||||||
$orden = $this->datosURL['orden'];
|
$orden = $this->datosURL['orden'];
|
||||||
$sentido = $this->datosURL['sentido'] == "asc" ? ' ' : ' desc ';
|
$sentido = $this->datosURL['sentido'] == "asc" ? ' ' : ' desc ';
|
||||||
@@ -240,8 +259,7 @@ class AportaContenido {
|
|||||||
$informe = new InformePDF($this->bdd, $salida, $this->registrado);
|
$informe = new InformePDF($this->bdd, $salida, $this->registrado);
|
||||||
$informe->crea($salida);
|
$informe->crea($salida);
|
||||||
$informe->cierraPDF();
|
$informe->cierraPDF();
|
||||||
$informe->imprimeInforme();
|
return $this->devuelveInforme($informe);
|
||||||
return;
|
|
||||||
} else {
|
} else {
|
||||||
return $this->mensajePermisos("Informes");
|
return $this->mensajePermisos("Informes");
|
||||||
}
|
}
|
||||||
@@ -259,7 +277,7 @@ class AportaContenido {
|
|||||||
if (!$this->pefil['Informe']) {
|
if (!$this->pefil['Informe']) {
|
||||||
$this->procesaURL();
|
$this->procesaURL();
|
||||||
$fichero = 'xml/informe' . ucfirst($opcion) . '.xml';
|
$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.
|
//Establece los posibles parámetros del listado.
|
||||||
$orden = $this->datosURL['orden'];
|
$orden = $this->datosURL['orden'];
|
||||||
$sentido = $this->datosURL['sentido'] == "asc" ? ' ' : ' desc ';
|
$sentido = $this->datosURL['sentido'] == "asc" ? ' ' : ' desc ';
|
||||||
@@ -271,8 +289,7 @@ class AportaContenido {
|
|||||||
$informe = new InformePDF($this->bdd, $salida, $this->registrado);
|
$informe = new InformePDF($this->bdd, $salida, $this->registrado);
|
||||||
$informe->crea($salida);
|
$informe->crea($salida);
|
||||||
$informe->cierraPDF();
|
$informe->cierraPDF();
|
||||||
$informe->imprimeInforme();
|
return $this->devuelveInforme($informe);
|
||||||
return;
|
|
||||||
} else {
|
} else {
|
||||||
return $this->mensajePermisos("Informes");
|
return $this->mensajePermisos("Informes");
|
||||||
}
|
}
|
||||||
@@ -296,17 +313,6 @@ class AportaContenido {
|
|||||||
} else {
|
} else {
|
||||||
return $this->mensajePermisos('Informes');
|
return $this->mensajePermisos('Informes');
|
||||||
}
|
}
|
||||||
// case 'descuadres':
|
|
||||||
// if ($this->perfil['Informe']) {
|
|
||||||
// $enlace = 'xml/informe' . ucfirst($opcion) . '.xml';
|
|
||||||
// $informe = new InformePDF($this->bdd, $enlace, $this->registrado);
|
|
||||||
// $informe->crea($enlace);
|
|
||||||
// $informe->cierraPDF();
|
|
||||||
// $informe->imprimeInforme();
|
|
||||||
// return;
|
|
||||||
// } else {
|
|
||||||
// return $this->mensajePermisos('Informes');
|
|
||||||
// }
|
|
||||||
case 'importacion':
|
case 'importacion':
|
||||||
if ($this->perfil['Modificacion'] && $this->perfil['Borrado']) {
|
if ($this->perfil['Modificacion'] && $this->perfil['Borrado']) {
|
||||||
$import = new Importacion($this->bdd, $this->registrado);
|
$import = new Importacion($this->bdd, $this->registrado);
|
||||||
@@ -348,6 +354,7 @@ class AportaContenido {
|
|||||||
return "Marca {$metodo} queda sin procesar";
|
return "Marca {$metodo} queda sin procesar";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function cargaDatosURL()
|
public function cargaDatosURL()
|
||||||
{
|
{
|
||||||
$this->datosURL['opc'] = isset($_GET['opc']) ? $_GET['opc'] : 'inicial';
|
$this->datosURL['opc'] = isset($_GET['opc']) ? $_GET['opc'] : 'inicial';
|
||||||
@@ -357,16 +364,31 @@ class AportaContenido {
|
|||||||
$this->datosURL['buscar'] = isset($_GET['buscar']) ? $_GET['buscar'] : null;
|
$this->datosURL['buscar'] = isset($_GET['buscar']) ? $_GET['buscar'] : null;
|
||||||
$this->datosURL['id'] = isset($_GET['id']) ? $_GET['id'] : null;
|
$this->datosURL['id'] = isset($_GET['id']) ? $_GET['id'] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param string $tipo
|
* @param string $tipo
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function mensajePermisos($tipo) {
|
public function mensajePermisos($tipo)
|
||||||
|
{
|
||||||
return $this->panel("ERROR", "No tiene permiso para acceder a $tipo", "danger");
|
return $this->panel("ERROR", "No tiene permiso para acceder a $tipo", "danger");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function panel($cabecera, $mensaje, $tipo) {
|
private function devuelveInforme($informe)
|
||||||
|
{
|
||||||
|
$letras = "abcefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
|
||||||
|
$nombre = TMP."/informe" . substr(str_shuffle($letras), 0, 10) . ".pdf";
|
||||||
|
$informe->guardaArchivo($nombre);
|
||||||
|
return '<div class="container">
|
||||||
|
<!--<a href="' . $nombre . '" target="_blank"><span class="glyphicon glyphicon-cloud-download" style="font-size:1.5em;"></span>Descargar Informe</a>-->
|
||||||
|
<object data="' . $nombre . '" type="application/pdf" width="100%" height="700" style="float:left;">
|
||||||
|
</object>
|
||||||
|
</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function panel($cabecera, $mensaje, $tipo)
|
||||||
|
{
|
||||||
$panel = '<div class="panel panel-' . $tipo . '"><div class="panel-heading">';
|
$panel = '<div class="panel panel-' . $tipo . '"><div class="panel-heading">';
|
||||||
$panel .= '<h3 class="panel-title">' . $cabecera . '</h3></div>';
|
$panel .= '<h3 class="panel-title">' . $cabecera . '</h3></div>';
|
||||||
$panel .= '<div class="panel-body">';
|
$panel .= '<div class="panel-body">';
|
||||||
@@ -374,7 +396,6 @@ class AportaContenido {
|
|||||||
$panel .= '</div>';
|
$panel .= '</div>';
|
||||||
return $panel;
|
return $panel;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
39
CHANGELOG
39
CHANGELOG
@@ -1,3 +1,42 @@
|
|||||||
|
Versión 1.12 06-05-2014
|
||||||
|
-Mantenimiento muestra el 'Titulo' del campo tanto en Consulta como en el formulario de edición
|
||||||
|
-Muestra cuadro de búsqueda y mensaje correcto cuando no se encuentra la cadena de búsqueda en Mantenimiento
|
||||||
|
-Añadidos mensajes de ayuda en los campos de configuración
|
||||||
|
-Añadida la columna de cantidad ubicada en mantenimiento de artículos
|
||||||
|
-Fix #35. Cambiados los informes de Articulos y Ubicaciones para recoger el campo Nº de elementos
|
||||||
|
-Fix #35. Añadido el campo Nº de elementos en el mantenimiento de Articulos y Ubicaciones a través de archivo xml
|
||||||
|
-Fix #31. Añadido el directorio temporal en el archivo de configuración
|
||||||
|
|
||||||
|
Versión 1.11b 26-04-2014
|
||||||
|
-Cambiada la referencia de etiquetas Apli
|
||||||
|
|
||||||
|
Versión 1.11 26-04-2014
|
||||||
|
-Fix #34 Corregido que salga una etiqueta por cada elemento reflejado en cantidad.
|
||||||
|
-Fix #33 Hay que hacer doble click para editar ajax
|
||||||
|
-Fix #32 Añadido mensaje y enlace al tipo de etiquetas que utiliza y corregido mensaje de error de conexión a base de datos de SQL
|
||||||
|
-Añadido diálogo antes de realizar el inventario total.
|
||||||
|
-Añadido cuadro para resaltar el nombre del centro en la pantalla inicial.
|
||||||
|
-Cambiada la alineación de los campos en Mantenimiento para utilizar el atributo Ajuste
|
||||||
|
|
||||||
|
Versión 1.10 21-04-2014
|
||||||
|
-Corregido error en el nombre del archivo de la clase ajax que estaba en minúsculas
|
||||||
|
-Añadidos botones de acción tipo bootstrap en Mantenimiento y añadido a configuración en estilo
|
||||||
|
-Informe de inventario de Artículo o Ubicación desde id y edición ajax de la descripción
|
||||||
|
-Cambiado mensaje de usuario/clave incorrectos para poner un fondo de color rojo
|
||||||
|
|
||||||
|
Versión 1.09 16-04-2014
|
||||||
|
-Añadida la biblioteca X-Edit
|
||||||
|
-Añadida actualización Ajax en Mantenimiento
|
||||||
|
|
||||||
|
Versión 1.082 09-04-2014
|
||||||
|
-Ahora git tiene en cuenta los directorios tmp e img.data y no tiene en cuenta su contenido
|
||||||
|
-Fix #30. Arreglado el botón de buscar que no enviaba los datos. Cambiado el texto por la lupa.
|
||||||
|
|
||||||
|
Versión 1.081 08-04-2014
|
||||||
|
-Fix #29. Añade el programa instalar.php en el proceso de instalación en README.md
|
||||||
|
-Fix #29. Añadida la tabla de módulos/bibliotecas utilizados en los créditos.
|
||||||
|
-Fix #28. Corrige que el informe pedido desde matenimiento salga en una ventana nueva.
|
||||||
|
|
||||||
Versión 1.08 07-04-2014
|
Versión 1.08 07-04-2014
|
||||||
-Los informes aparecen ahora en la pantalla de la aplicación embebidos.
|
-Los informes aparecen ahora en la pantalla de la aplicación embebidos.
|
||||||
-Añadido un calendario al pulsar sobre la fecha en la cabecera de la aplicación.
|
-Añadido un calendario al pulsar sobre la fecha en la cabecera de la aplicación.
|
||||||
|
@@ -25,7 +25,7 @@ class Configuracion {
|
|||||||
private $confAnterior = "inc/configuracion.ant";
|
private $confAnterior = "inc/configuracion.ant";
|
||||||
private $datosConf;
|
private $datosConf;
|
||||||
//Campos del fichero de configuración que se van a editar.
|
//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;
|
private $campos;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
@@ -54,6 +54,11 @@ class Configuracion {
|
|||||||
$valor = trim($valor);
|
$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() {
|
public function ejecuta() {
|
||||||
$fichero = $this->obtieneFichero();
|
$fichero = $this->obtieneFichero();
|
||||||
$datos = explode("\n", $fichero);
|
$datos = explode("\n", $fichero);
|
||||||
@@ -100,22 +105,24 @@ class Configuracion {
|
|||||||
$personal = $this->datosConf['ESTILO'] == "personal" ? 'selected' : ' ';
|
$personal = $this->datosConf['ESTILO'] == "personal" ? 'selected' : ' ';
|
||||||
$bluecurve = $this->datosConf['ESTILO'] == "bluecurve" ? 'selected' : ' ';
|
$bluecurve = $this->datosConf['ESTILO'] == "bluecurve" ? 'selected' : ' ';
|
||||||
$cristal = $this->datosConf['ESTILO'] == "cristal" ? 'selected' : ' ';
|
$cristal = $this->datosConf['ESTILO'] == "cristal" ? 'selected' : ' ';
|
||||||
|
$bootst = $this->datosConf['ESTILO'] == "bootstrap" ? 'selected' : ' ';
|
||||||
$normal = $this->datosConf['PLANTILLA'] == "normal" ? 'selected' : ' ';
|
$normal = $this->datosConf['PLANTILLA'] == "normal" ? 'selected' : ' ';
|
||||||
$bootstrap = $this->datosConf['PLANTILLA'] == "bootstrap" ? '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-6"><form name="configura" method="post">';
|
||||||
//$salida.='<p align="center"><table border=1 class="tablaDatos"><tbody>';
|
//$salida.='<p align="center"><table border=1 class="tablaDatos"><tbody>';
|
||||||
$salida.='<p align="center"><table border=2 class="table table-hover"><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.='<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>'.$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'] . '" 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>'.$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><td style="vertical-align:middle">Plantilla</td><td><select name="PLANTILLA" class="form-control">';
|
$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 value="normal" ' . $normal . '>normal</option>';
|
||||||
$salida.='<option ' . $bootstrap . '>bootstrap</option></select></td></tr>';
|
$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 value="personal" ' . $personal . '>personal</option>';
|
||||||
$salida.='<option ' . $bluecurve . '>bluecurve</option>';
|
$salida.='<option ' . $bluecurve . '>bluecurve</option>';
|
||||||
|
$salida.='<option ' . $bootst . '>bootstrap</option>';
|
||||||
$salida.='<option ' . $cristal . '>cristal</option></select></td></tr>';
|
$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) {
|
foreach ($coloresLateral as $color => $codigo) {
|
||||||
$selec = "";
|
$selec = "";
|
||||||
if (trim($this->datosConf['COLORLAT']) == $codigo) {
|
if (trim($this->datosConf['COLORLAT']) == $codigo) {
|
||||||
@@ -124,7 +131,7 @@ class Configuracion {
|
|||||||
$salida.='<option value="' . $codigo . '" ' . $selec . ' >' . $color . '</option>';
|
$salida.='<option value="' . $codigo . '" ' . $selec . ' >' . $color . '</option>';
|
||||||
}
|
}
|
||||||
$salida.='</select></td></tr>';
|
$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) {
|
foreach ($coloresFondo as $color => $codigo) {
|
||||||
$selec = "";
|
$selec = "";
|
||||||
if (trim($this->datosConf['COLORFON']) == $codigo) {
|
if (trim($this->datosConf['COLORFON']) == $codigo) {
|
||||||
@@ -133,15 +140,16 @@ class Configuracion {
|
|||||||
$salida.='<option value="' . $codigo . '" ' . $selec . ' >' . $color . '</option>';
|
$salida.='<option value="' . $codigo . '" ' . $selec . ' >' . $color . '</option>';
|
||||||
}
|
}
|
||||||
$salida.='</select></td></tr>';
|
$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'] . '" size="30" /></td></tr>';
|
||||||
$salida.='<th colspan=2 class="danger"><center><b>Base de datos</b></center></th>';
|
$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>'.$this->creaTitulo("Servidor","Nombre o dirección IP del servidor MySQL. Normalmente localhost").'<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>'.$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'] . '" 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>'.$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'] . '" 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>'.$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'] . '" 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>'.$this->creaTitulo("Usuario","Usuario con permisos de lectura/escritura en la base de datos").'<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>'.$this->creaTitulo("Clave","Contraseña del usuario con permisos sobre la base de datos").'<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>'.$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'] . '" 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>'.$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'] . '" 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 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.='</form></div></center>';
|
$salida.='</form></div></center>';
|
||||||
$salida.="<script>
|
$salida.="<script>
|
||||||
@@ -155,6 +163,7 @@ class Configuracion {
|
|||||||
});
|
});
|
||||||
$('select[name=" . '"COLORLAT"' . "]').simplecolorpicker({theme: 'glyphicons'});
|
$('select[name=" . '"COLORLAT"' . "]').simplecolorpicker({theme: 'glyphicons'});
|
||||||
$('select[name=" . '"COLORFON"' . "]').simplecolorpicker({theme: 'glyphicons'});
|
$('select[name=" . '"COLORFON"' . "]').simplecolorpicker({theme: 'glyphicons'});
|
||||||
|
$('.dato').popover({trigger: 'hover'});
|
||||||
});
|
});
|
||||||
</script>";
|
</script>";
|
||||||
return $salida;
|
return $salida;
|
||||||
|
@@ -53,7 +53,7 @@ class CopiaSeguridad {
|
|||||||
}
|
}
|
||||||
private function copiaBaseDatos()
|
private function copiaBaseDatos()
|
||||||
{
|
{
|
||||||
$archivo_sql = "tmp/baseDatos" . BASEDATOS . ".sql";
|
$archivo_sql = TMP."/baseDatos" . BASEDATOS . ".sql";
|
||||||
$baseDatosComprimida = $archivo_sql . ".gz";
|
$baseDatosComprimida = $archivo_sql . ".gz";
|
||||||
$this->baseDatos = $baseDatosComprimida;
|
$this->baseDatos = $baseDatosComprimida;
|
||||||
if (file_exists($baseDatosComprimida)) {
|
if (file_exists($baseDatosComprimida)) {
|
||||||
@@ -78,7 +78,7 @@ class CopiaSeguridad {
|
|||||||
}
|
}
|
||||||
private function copiaImagenes()
|
private function copiaImagenes()
|
||||||
{
|
{
|
||||||
$copiaImagenes = "tmp/Imagenes.tbz";
|
$copiaImagenes = TMP."/Imagenes.tbz";
|
||||||
$this->imagenes = $copiaImagenes;
|
$this->imagenes = $copiaImagenes;
|
||||||
if (file_exists($copiaImagenes)) {
|
if (file_exists($copiaImagenes)) {
|
||||||
unlink($copiaImagenes);
|
unlink($copiaImagenes);
|
||||||
@@ -98,7 +98,7 @@ class CopiaSeguridad {
|
|||||||
private function empaqueta()
|
private function empaqueta()
|
||||||
{
|
{
|
||||||
// Empaqueta los dos archivos en el que va a devolver
|
// 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)) {
|
if (file_exists($nombreCopia)) {
|
||||||
unlink($nombreCopia);
|
unlink($nombreCopia);
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -37,7 +36,7 @@ class EtiquetasPDF {
|
|||||||
private $docu;
|
private $docu;
|
||||||
private $pdf;
|
private $pdf;
|
||||||
private $def;
|
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
|
* 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) {
|
if (!$registrado) {
|
||||||
return 'Debe registrarse para acceder a este apartado';
|
return 'Debe registrarse para acceder a este apartado';
|
||||||
}
|
}
|
||||||
|
$this->nombreFichero = TMP."/informeEtiquetas.pdf";
|
||||||
// Recuperamos la definición del informe
|
// Recuperamos la definición del informe
|
||||||
$this->def = simplexml_load_file($definicion);
|
$this->def = simplexml_load_file($definicion);
|
||||||
$this->bdd = $bdd;
|
$this->bdd = $bdd;
|
||||||
@@ -84,51 +84,54 @@ class EtiquetasPDF {
|
|||||||
$protocolo = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443 ? "https://" : "http://";
|
$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=";
|
$enlace = $protocolo . $_SERVER['SERVER_NAME'] . "/" . $aplicacion . "/index.php?elementos&opc=editar&id=";
|
||||||
while($tupla = $this->bdd->procesaResultado()) {
|
while($tupla = $this->bdd->procesaResultado()) {
|
||||||
if ($i % 2) {
|
for ($j = 0; $j < $tupla['cantidad']; $j++) {
|
||||||
//Columna 2
|
//Hay que generar tantas etiquetas como ponga la cantidad de cada elemento
|
||||||
$etiq1 = 136;
|
if ($i % 2) {
|
||||||
$etiq2 = 105;
|
//Columna 2
|
||||||
} else {
|
$etiq1 = 136;
|
||||||
//Columna 1
|
$etiq2 = 105;
|
||||||
$etiq1 = 30;
|
} else {
|
||||||
$etiq2 = 1;
|
//Columna 1
|
||||||
$fila++;
|
$etiq1 = 30;
|
||||||
}
|
$etiq2 = 1;
|
||||||
if ($i % 14 == 0) {
|
$fila++;
|
||||||
if (!$primero) {
|
|
||||||
$this->pdf->AddPage();
|
|
||||||
$fila = 0;
|
|
||||||
}
|
}
|
||||||
$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));
|
//$this->pdf->MultiCell(0,30,var_export($filas,true));
|
||||||
}
|
}
|
||||||
@@ -152,7 +155,7 @@ class EtiquetasPDF {
|
|||||||
return $cabecera;
|
return $cabecera;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function guardaArchivo($nombre = "tmp/Informe.pdf")
|
public function guardaArchivo($nombre)
|
||||||
{
|
{
|
||||||
$fichero = fopen($nombre, "w");
|
$fichero = fopen($nombre, "w");
|
||||||
fwrite($fichero, $this->getCabecera());
|
fwrite($fichero, $this->getCabecera());
|
||||||
|
@@ -44,7 +44,7 @@ class Importacion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function importarFichero() {
|
private function importarFichero() {
|
||||||
$uploadfile = "tmp/" . basename($_FILES['fichero']['name']);
|
$uploadfile = TMP."/" . basename($_FILES['fichero']['name']);
|
||||||
if (!move_uploaded_file($_FILES['fichero']['tmp_name'], $uploadfile)) {
|
if (!move_uploaded_file($_FILES['fichero']['tmp_name'], $uploadfile)) {
|
||||||
die('No se pudo subir el fichero ' . $_FILES['userfile']['tmp_name']);
|
die('No se pudo subir el fichero ' . $_FILES['userfile']['tmp_name']);
|
||||||
}
|
}
|
||||||
@@ -55,10 +55,10 @@ class Importacion {
|
|||||||
|
|
||||||
private function formulario() {
|
private function formulario() {
|
||||||
$accion = "index.php?importacion&opc=importar";
|
$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 .='<div class="col-sm-6 col-md-6">';
|
||||||
$salida .= '<form enctype="multipart/form-data" name="importacion.form" method="post" action="' . $accion . '">' . "\n";
|
$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);" class="filestyle" data-classButton="btn btn-primary">';
|
||||||
//$salida .= '<input type="file" name="fichero" id="fichero" onChange="seleccionFichero(this);">';
|
//$salida .= '<input type="file" name="fichero" id="fichero" onChange="seleccionFichero(this);">';
|
||||||
//$salida .= '<input type="file" class="filestyle" data-input="false">';
|
//$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>
|
<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>
|
<a href="#" class="input-group-addon btn btn-default fileinput-exists" data-dismiss="fileinput">Eliminar</a>
|
||||||
</div>
|
</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 .= '<p align="center"><button class="btn btn-primary" type=submit><span class="glyphicon glyphicon-cloud-upload"></span> Aceptar</button></p><br>' . "\n";
|
||||||
$salida .= '</div>';
|
$salida .= '</div>';
|
||||||
$mensaje = 'Sólo se permiten archivos con extensión CSV';
|
$mensaje = 'Sólo se permiten archivos con extensión CSV';
|
||||||
$salida .= "<script type='text/javascript'>".'
|
$salida .= "<script type='text/javascript'>"."
|
||||||
//$(":file").filestyle({classButton: "btn btn-primary"});'."
|
|
||||||
|
|
||||||
function seleccionFichero(obj) {
|
function seleccionFichero(obj) {
|
||||||
var filePath = obj.value;
|
var filePath = obj.value;
|
||||||
|
@@ -35,6 +35,7 @@ class InformeInventario {
|
|||||||
case 'Ubicacion':return $this->formularioUbicacion();
|
case 'Ubicacion':return $this->formularioUbicacion();
|
||||||
case 'listarUbicacion':return $this->listarUbicacion();
|
case 'listarUbicacion':return $this->listarUbicacion();
|
||||||
case 'listarArticulo':return $this->listarArticulo();
|
case 'listarArticulo':return $this->listarArticulo();
|
||||||
|
case 'listarTotal': return $this->listarTotal();
|
||||||
case 'Articulo':return $this->formularioArticulo();
|
case 'Articulo':return $this->formularioArticulo();
|
||||||
case 'Total':return $this->inventarioTotal();
|
case 'Total':return $this->inventarioTotal();
|
||||||
case 'descuadres': return $this->inventarioDescuadres();
|
case 'descuadres': return $this->inventarioDescuadres();
|
||||||
@@ -53,7 +54,7 @@ class InformeInventario {
|
|||||||
private function devuelveInforme($informe)
|
private function devuelveInforme($informe)
|
||||||
{
|
{
|
||||||
$letras = "abcefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
|
$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);
|
$informe->guardaArchivo($nombre);
|
||||||
return '<div class="container">
|
return '<div class="container">
|
||||||
<!--<a href="' . $nombre . '" target="_blank"><span class="glyphicon glyphicon-cloud-download" style="font-size:1.5em;"></span>Descargar Informe</a>-->
|
<!--<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) {
|
switch ($salidaInforme) {
|
||||||
case "pantalla":
|
case "pantalla":
|
||||||
$fichero = "xml/inventarioUbicacion.xml";
|
$fichero = "xml/inventarioUbicacion.xml";
|
||||||
$salida = "tmp/inventarioUbicacion.xml";
|
$salida = TMP."/inventarioUbicacion.xml";
|
||||||
break;
|
break;
|
||||||
case "csv":
|
case "csv":
|
||||||
$fichero = "xml/inventarioUbicacionCSV.xml";
|
$fichero = "xml/inventarioUbicacionCSV.xml";
|
||||||
$salida = "tmp/inventarioUbicacionCSV.xml";
|
$salida = TMP."/inventarioUbicacionCSV.xml";
|
||||||
break;
|
break;
|
||||||
case "etiquetas":
|
case "etiquetas":
|
||||||
$fichero = "xml/inventarioUbicacionEtiquetas.xml";
|
$fichero = "xml/inventarioUbicacionEtiquetas.xml";
|
||||||
$salida = "tmp/inventarioUbicacionEtiquetas.xml";
|
$salida = TMP."/inventarioUbicacionEtiquetas.xml";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$plantilla = file_get_contents($fichero) or die('Fallo en la apertura de la plantilla ' . $fichero);
|
$plantilla = file_get_contents($fichero) or die('Fallo en la apertura de la plantilla ' . $fichero);
|
||||||
@@ -98,7 +99,7 @@ class InformeInventario {
|
|||||||
return $this->devuelveInforme($informe);
|
return $this->devuelveInforme($informe);
|
||||||
case "csv":
|
case "csv":
|
||||||
//Genera una hoja de cálculo en formato 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 = new Csv($this->bdd);
|
||||||
$hoja->crea($nombre);
|
$hoja->crea($nombre);
|
||||||
$hoja->ejecutaConsulta($salida);
|
$hoja->ejecutaConsulta($salida);
|
||||||
@@ -118,15 +119,15 @@ class InformeInventario {
|
|||||||
switch ($salidaInforme) {
|
switch ($salidaInforme) {
|
||||||
case "pantalla":
|
case "pantalla":
|
||||||
$fichero = "xml/inventarioArticulo.xml";
|
$fichero = "xml/inventarioArticulo.xml";
|
||||||
$salida = "tmp/inventarioArticulo.xml";
|
$salida = TMP."/inventarioArticulo.xml";
|
||||||
break;
|
break;
|
||||||
case "csv":
|
case "csv":
|
||||||
$fichero = "xml/inventarioArticuloCSV.xml";
|
$fichero = "xml/inventarioArticuloCSV.xml";
|
||||||
$salida = "tmp/inventarioArticuloCSV.xml";
|
$salida = TMP."/inventarioArticuloCSV.xml";
|
||||||
break;
|
break;
|
||||||
case "etiquetas":
|
case "etiquetas":
|
||||||
$fichero = "xml/inventarioArticuloEtiquetas.xml";
|
$fichero = "xml/inventarioArticuloEtiquetas.xml";
|
||||||
$salida = "tmp/inventarioArticuloEtiquetas.xml";
|
$salida = TMP."/inventarioArticuloEtiquetas.xml";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$plantilla = file_get_contents($fichero) or die('Fallo en la apertura de la plantilla ' . $fichero);
|
$plantilla = file_get_contents($fichero) or die('Fallo en la apertura de la plantilla ' . $fichero);
|
||||||
@@ -150,7 +151,7 @@ class InformeInventario {
|
|||||||
return $this->devuelveInforme($informe);
|
return $this->devuelveInforme($informe);
|
||||||
case "csv":
|
case "csv":
|
||||||
//Genera una hoja de cálculo en formato 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 = new Csv($this->bdd);
|
||||||
$hoja->crea($nombre);
|
$hoja->crea($nombre);
|
||||||
$hoja->ejecutaConsulta($salida);
|
$hoja->ejecutaConsulta($salida);
|
||||||
@@ -204,7 +205,7 @@ class InformeInventario {
|
|||||||
<label for='salida'>Salida del informe por:</label>";
|
<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="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="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.="<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.='<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>";
|
$salida.="<script>$('.selectpicker').selectpicker();</script>";
|
||||||
@@ -225,9 +226,26 @@ class InformeInventario {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function inventarioTotal()
|
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";
|
$fichero = "xml/inventarioUbicacion.xml";
|
||||||
$salida = "tmp/inventarioUbicacion.xml";
|
$salida = TMP."/inventarioUbicacion.xml";
|
||||||
$comando = "select * from Ubicaciones ;";
|
$comando = "select * from Ubicaciones ;";
|
||||||
$resultado = $this->bdd->ejecuta($comando);
|
$resultado = $this->bdd->ejecuta($comando);
|
||||||
if (!$resultado) {
|
if (!$resultado) {
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -94,11 +93,13 @@ class InformePDF {
|
|||||||
public function getCabecera() {
|
public function getCabecera() {
|
||||||
$cabecera = "Content-type: application/pdf";
|
$cabecera = "Content-type: application/pdf";
|
||||||
$cabecera = $cabecera . "Content-length: " . strlen($this->docu);
|
$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;
|
return $cabecera;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function guardaArchivo($nombre = "tmp/Informe.pdf") {
|
public function guardaArchivo($nombre) {
|
||||||
|
if (!isset($nombre))
|
||||||
|
$nombre = TMP . "/Informe.pdf";
|
||||||
$fichero = fopen($nombre, "w");
|
$fichero = fopen($nombre, "w");
|
||||||
fwrite($fichero, $this->getCabecera());
|
fwrite($fichero, $this->getCabecera());
|
||||||
fwrite($fichero, $this->getContenido(), strlen($this->getContenido()));
|
fwrite($fichero, $this->getContenido(), strlen($this->getContenido()));
|
||||||
@@ -109,7 +110,7 @@ class InformePDF {
|
|||||||
header("Content-type: application/pdf");
|
header("Content-type: application/pdf");
|
||||||
$longitud = strlen($this->docu);
|
$longitud = strlen($this->docu);
|
||||||
header("Content-length: $longitud");
|
header("Content-length: $longitud");
|
||||||
header("Content-Disposition: inline; filename=tmp/Informe.pdf");
|
header("Content-Disposition: inline; filename=".TMP."/Informe.pdf");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function imprimeInforme() {
|
public function imprimeInforme() {
|
||||||
|
29
Instalar.php
29
Instalar.php
@@ -31,8 +31,7 @@ define('NUMPASOS', 3);
|
|||||||
define('MINBYTES', 4096000); // post_max_size y max_upload van con esto
|
define('MINBYTES', 4096000); // post_max_size y max_upload van con esto
|
||||||
define('CADENAMINBYTES', '4M');
|
define('CADENAMINBYTES', '4M');
|
||||||
define('CONFIGURACION', 'inc/configuracion.inc');
|
define('CONFIGURACION', 'inc/configuracion.inc');
|
||||||
define('CONFIGTMP', 'tmp/config.tmp');
|
define('CONFIGTMP', TMP.'/config.tmp');
|
||||||
define('TMP', './tmp');
|
|
||||||
define('INC', './inc');
|
define('INC', './inc');
|
||||||
|
|
||||||
$instalar = new Instalar();
|
$instalar = new Instalar();
|
||||||
@@ -332,18 +331,18 @@ class Instalar {
|
|||||||
$borra_database = "DROP DATABASE " . BASEDATOS . " ;";
|
$borra_database = "DROP DATABASE " . BASEDATOS . " ;";
|
||||||
$database = "CREATE DATABASE " . BASEDATOS . " DEFAULT CHARACTER SET utf8;";
|
$database = "CREATE DATABASE " . BASEDATOS . " DEFAULT CHARACTER SET utf8;";
|
||||||
$articulos = "CREATE TABLE `Articulos` (
|
$articulos = "CREATE TABLE `Articulos` (
|
||||||
`id` smallint(6) NOT NULL auto_increment COMMENT 'ordenable',
|
`id` smallint(6) NOT NULL auto_increment COMMENT 'ordenable,link/Articulo',
|
||||||
`descripcion` varchar(60) NOT NULL COMMENT 'ordenable,link/Articulo',
|
`descripcion` varchar(60) NOT NULL COMMENT 'ordenable,ajax/text',
|
||||||
`marca` varchar(20) default NULL COMMENT 'ordenable',
|
`marca` varchar(20) default NULL COMMENT 'ordenable,ajax/text',
|
||||||
`modelo` varchar(20) default NULL COMMENT 'ordenable',
|
`modelo` varchar(20) default NULL COMMENT 'ordenable,ajax/text',
|
||||||
`cantidad` int(11) default NULL COMMENT 'ordenable',
|
`cantidad` int(11) default NULL COMMENT 'ordenable,ajax/number',
|
||||||
`imagen` varchar(45) default NULL COMMENT 'imagen',
|
`imagen` varchar(45) default NULL COMMENT 'imagen',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=769 DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB AUTO_INCREMENT=769 DEFAULT CHARSET=utf8;
|
||||||
";
|
";
|
||||||
$ubicaciones = "CREATE TABLE `Ubicaciones` (
|
$ubicaciones = "CREATE TABLE `Ubicaciones` (
|
||||||
`id` smallint(5) unsigned NOT NULL auto_increment COMMENT 'ordenable',
|
`id` smallint(5) unsigned NOT NULL auto_increment COMMENT 'ordenable,link/Ubicacion',
|
||||||
`Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,link/Ubicacion',
|
`Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,ajax/text',
|
||||||
`imagen` varchar(45) DEFAULT NULL COMMENT 'imagen',
|
`imagen` varchar(45) DEFAULT NULL COMMENT 'imagen',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=179 DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB AUTO_INCREMENT=179 DEFAULT CHARSET=utf8;
|
||||||
@@ -352,9 +351,9 @@ class Instalar {
|
|||||||
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'ordenable',
|
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'ordenable',
|
||||||
`id_Articulo` smallint(6) NOT NULL COMMENT 'foreign(Articulos;id),ordenable',
|
`id_Articulo` smallint(6) NOT NULL COMMENT 'foreign(Articulos;id),ordenable',
|
||||||
`id_Ubicacion` smallint(5) unsigned NOT NULL COMMENT 'foreign(Ubicaciones;id),ordenable',
|
`id_Ubicacion` smallint(5) unsigned NOT NULL COMMENT 'foreign(Ubicaciones;id),ordenable',
|
||||||
`numserie` varchar(30) default NULL COMMENT 'ordenable',
|
`numserie` varchar(30) default NULL COMMENT 'ordenable,ajax/text',
|
||||||
`cantidad` int(10) unsigned default NULL COMMENT 'ordenable',
|
`cantidad` int(10) unsigned default NULL COMMENT 'ordenable,ajax/number',
|
||||||
`fechaCompra` date NOT NULL COMMENT 'ordenable',
|
`fechaCompra` date NOT NULL COMMENT 'ordenable,ajax/combodate',
|
||||||
`imagen` varchar(45) default NULL COMMENT 'imagen',
|
`imagen` varchar(45) default NULL COMMENT 'imagen',
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `id` (`id`),
|
KEY `id` (`id`),
|
||||||
@@ -366,9 +365,9 @@ class Instalar {
|
|||||||
";
|
";
|
||||||
$usuarios = "CREATE TABLE `Usuarios` (
|
$usuarios = "CREATE TABLE `Usuarios` (
|
||||||
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'ordenable',
|
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'ordenable',
|
||||||
`nombre` varchar(16) NOT NULL default '',
|
`nombre` varchar(16) NOT NULL default '' COMMENT 'ajax/text',
|
||||||
`clave` varchar(32) NOT NULL default '',
|
`clave` varchar(32) NOT NULL default '' COMMENT 'ajax/text',
|
||||||
`idSesion` varchar(20) NOT NULL default '',
|
`idSesion` varchar(20) NOT NULL default '' COMMENT 'ajax/text',
|
||||||
`alta` tinyint(1) NOT NULL default '0',
|
`alta` tinyint(1) NOT NULL default '0',
|
||||||
`modificacion` tinyint(1) NOT NULL default '0',
|
`modificacion` tinyint(1) NOT NULL default '0',
|
||||||
`borrado` tinyint(1) NOT NULL default '0',
|
`borrado` tinyint(1) NOT NULL default '0',
|
||||||
|
@@ -158,9 +158,9 @@ class Mantenimiento {
|
|||||||
} else {
|
} else {
|
||||||
$comando = str_replace('{orden}', ' ', $comando);
|
$comando = str_replace('{orden}', ' ', $comando);
|
||||||
}
|
}
|
||||||
|
$salida = $this->cargaComplementos();
|
||||||
//Introduce un botón para hacer búsquedas y el número de la página
|
//Introduce un botón para hacer búsquedas y el número de la página
|
||||||
$salida = $this->enlaceBusqueda($pagSigte);
|
$salida.= $this->enlaceBusqueda($pagSigte);
|
||||||
$salida.= $cabecera;
|
|
||||||
//Consulta paginada de todas las tuplas
|
//Consulta paginada de todas las tuplas
|
||||||
$comando = str_replace('{inferior}', $pagina * NUMFILAS, $comando);
|
$comando = str_replace('{inferior}', $pagina * NUMFILAS, $comando);
|
||||||
$comando = str_replace('{superior}', NUMFILAS, $comando);
|
$comando = str_replace('{superior}', NUMFILAS, $comando);
|
||||||
@@ -184,16 +184,22 @@ class Mantenimiento {
|
|||||||
$this->datosURL['pag'] = $totalPags;
|
$this->datosURL['pag'] = $totalPags;
|
||||||
header('Location: ' . $this->montaURL());
|
header('Location: ' . $this->montaURL());
|
||||||
} else {
|
} 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.=$comando;
|
||||||
|
//$salida.=var_export($this->campos,true);
|
||||||
while ($fila = $this->bdd->procesaResultado()) {
|
while ($fila = $this->bdd->procesaResultado()) {
|
||||||
$salida.='<tr align="center" bottom="middle">';
|
$salida.='<tr bottom="middle">';
|
||||||
foreach ($fila as $clave => $valor) {
|
foreach ($fila as $clave => $valor) {
|
||||||
if ($clave == "id") {
|
if ($clave == "id") {
|
||||||
$id = $valor;
|
$id = $valor;
|
||||||
}
|
}
|
||||||
|
if ($this->campos[$clave]['Visible'] == "no") {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
// Comprueba si tiene que añadir el enlace de inventario
|
// Comprueba si tiene que añadir el enlace de inventario
|
||||||
if (strstr($this->campos[$clave]['Comment'], "link")) {
|
if (strstr($this->campos[$clave]['Comment'], "link")) {
|
||||||
$comen = explode(",", $this->campos[$clave]['Comment']);
|
$comen = explode(",", $this->campos[$clave]['Comment']);
|
||||||
@@ -215,24 +221,54 @@ class Mantenimiento {
|
|||||||
$checked = $valor == '1' ? 'checked' : '';
|
$checked = $valor == '1' ? 'checked' : '';
|
||||||
$valor = '<input type="checkbox" disabled ' . $checked . '>';
|
$valor = '<input type="checkbox" disabled ' . $checked . '>';
|
||||||
}
|
}
|
||||||
$salida.="<td>$valor</td>\n";
|
if (strstr($this->campos[$clave]['Comment'], "ajax") && $this->perfil['Modificacion']) {
|
||||||
|
$comen = explode(",", $this->campos[$clave]['Comment']);
|
||||||
|
foreach ($comen as $co) {
|
||||||
|
if (strstr($co, "ajax")) {
|
||||||
|
$tmpco = explode("/", $co);
|
||||||
|
$tipo = $tmpco[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$cant++;
|
||||||
|
$valor = $this->campoAjax($id, $clave, $tipo, $valor, $cant, $fila);
|
||||||
|
}
|
||||||
|
$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
|
//Añade el icono de editar
|
||||||
if ($this->perfil['Modificacion']) {
|
if ($this->perfil['Modificacion']) {
|
||||||
//$salida.='<td><a href="index.php?' . $tabla . '&opc=editar&id=' . $id . "&pag=" . $pagina . $sufijoOrden . $sufijoEnlace .
|
//$salida.='<a href="index.php?' . $tabla . '&opc=editar&id=' . $id . "&pag=" . $pagina . $sufijoOrden . $sufijoEnlace .
|
||||||
$this->backupURL(); $this->datosURL['opc'] = "editar"; $this->datosURL['id'] = $id;
|
$this->backupURL(); $this->datosURL['opc'] = "editar"; $this->datosURL['id'] = $id;
|
||||||
$salida.='<td><a href="' . $this->montaURL() .
|
if (ESTILO == 'bootstrap') {
|
||||||
'"><img title="Editar" src="img/' . ESTILO . '/editar.png" alt="editar"></a>';
|
$salida.='<a href="'.$this->montaURL() . '" title="Editar"><span class="glyphicon glyphicon-pencil"></span></a>';
|
||||||
|
} else {
|
||||||
|
$salida.='<a href="' . $this->montaURL() .
|
||||||
|
'"><img title="Editar" src="img/' . ESTILO . '/editar.png" alt="editar"></a>';
|
||||||
|
}
|
||||||
$this->restoreURL();
|
$this->restoreURL();
|
||||||
}
|
}
|
||||||
//Añade el icono de eliminar
|
//Añade el icono de eliminar
|
||||||
if ($this->perfil['Borrado']) {
|
if ($this->perfil['Borrado']) {
|
||||||
//$salida.=' <a href="index.php?' . $tabla . '&opc=eliminar&id=' . $id . $sufijoEnlace .
|
//$salida.=' <a href="index.php?' . $tabla . '&opc=eliminar&id=' . $id . $sufijoEnlace .
|
||||||
$this->backupURL(); $this->datosURL['opc'] = "eliminar"; $this->datosURL['id'] = $id;
|
$this->backupURL(); $this->datosURL['opc'] = "eliminar"; $this->datosURL['id'] = $id;
|
||||||
$salida.=' <a href="' . $this->montaURL() .
|
if (ESTILO == 'bootstrap') {
|
||||||
'"><img title="Eliminar" src="img/' . ESTILO . '/eliminar.png" alt="eliminar"></a></td></tr>' . "\n";
|
$salida.=' <a href="'. $this->montaURL() . '" title="Eliminar"><span class="glyphicon glyphicon-remove"></span></a>';
|
||||||
|
} else {
|
||||||
|
$salida.=' <a href="' . $this->montaURL() .
|
||||||
|
'"><img title="Eliminar" src="img/' . ESTILO . '/eliminar.png" alt="eliminar"></a>' . "\n";
|
||||||
|
}
|
||||||
$this->restoreURL();
|
$this->restoreURL();
|
||||||
}
|
}
|
||||||
|
$salida .= "</td></tr>";
|
||||||
}
|
}
|
||||||
$salida.="</tbody></table></center></p>";
|
$salida.="</tbody></table></center></p>";
|
||||||
//Añade botones de comandos
|
//Añade botones de comandos
|
||||||
@@ -247,22 +283,42 @@ class Mantenimiento {
|
|||||||
$fwd = $this->montaURL();
|
$fwd = $this->montaURL();
|
||||||
$this->datosURL['pag'] = $pagRew;
|
$this->datosURL['pag'] = $pagRew;
|
||||||
$rew = $this->montaURL();
|
$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->restoreURL();
|
||||||
$this->datosURL['sentido'] = "asc";
|
$this->datosURL['sentido'] = "asc";
|
||||||
$az = $this->montaURL();
|
$az = $this->montaURL();
|
||||||
$az = '<a href="' . $az . '"><img alt="asc" title="Orden ascendente" src="img/' . ESTILO . '/ascendente.png"></a>';
|
//
|
||||||
|
//$az = '<a href="' . $az . '" title="Orden ascendente"><h1><span class="glyphicon glyphicon-sort-by-alphabet"></span></h1></a>';
|
||||||
$this->datosURL['sentido'] = "desc";
|
$this->datosURL['sentido'] = "desc";
|
||||||
$za = $this->montaURL();
|
$za = $this->montaURL();
|
||||||
$za = '<a href="' . $za . '"><img alt="desc" title="Orden descendente" src="img/' . ESTILO . '/descendente.png"></a>';
|
//
|
||||||
|
//$za = '<a href="' . $za . '" title="Orden descendente"><h1><span class="glyphicon glyphicon-sort-by-alphabet-alt"></span></h1></a>';
|
||||||
|
if (ESTILO == 'bootstrap') {
|
||||||
|
$anterior = '<button type="button" class="btn btn-default btn-lg" title="Pag. anterior" onClick="location.href='."'$anterior'".'"><span class="glyphicon glyphicon-chevron-left"></span></button>';
|
||||||
|
$siguiente = '<button type="button" class="btn btn-default btn-lg" title="Pag. siguiente" onClick="location.href='."'$siguiente'".'"><span class="glyphicon glyphicon-chevron-right"></span></button>';
|
||||||
|
$fwd = '<button type="button" class="btn btn-default btn-lg" title="+4 páginas" onClick="location.href='."'$fwd'".'"><span class="glyphicon glyphicon-forward"></span></button>';
|
||||||
|
$rew = '<button type="button" class="btn btn-default btn-lg" title="-4 páginas" onClick="location.href='."'$rew'".'"><span class="glyphicon glyphicon-backward"></span></button>';
|
||||||
|
$az = '<button type="button" class="btn btn-default btn-lg" title="Orden ascendente" onClick="location.href='."'$az'".'"><span class="glyphicon glyphicon-sort-by-alphabet"></span></button>';
|
||||||
|
$za = '<button type="button" class="btn btn-default btn-lg" title="Orden descendente" onClick="location.href='."'$za'".'"><span class="glyphicon glyphicon-sort-by-alphabet-alt"></span></button>';
|
||||||
|
} else {
|
||||||
|
$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";
|
||||||
|
$az = '<a href="' . $az . '"><img alt="asc" title="Orden ascendente" src="img/' . ESTILO . '/ascendente.png"></a>';
|
||||||
|
$za = '<a href="' . $za . '"><img alt="desc" title="Orden descendente" src="img/' . ESTILO . '/descendente.png"></a>';
|
||||||
|
}
|
||||||
$this->restoreURL();
|
$this->restoreURL();
|
||||||
if ($this->perfil['Informe']) {
|
if ($this->perfil['Informe']) {
|
||||||
$this->datosURL['opc'] = "informe";
|
$this->datosURL['opc'] = "informe";
|
||||||
$inf = $this->montaURL();
|
$inf = $this->montaURL();
|
||||||
$informe = '<a href="' . $inf . '" target="_blank"><img src="img/' . ESTILO . '/informe.png" alt="informe" title="Informe pdf"></a>';
|
if (ESTILO == 'bootstrap') {
|
||||||
|
$informe = '<button type="button" class="btn btn-default btn-lg" title="Informe de '.$this->tabla.'" onClick="location.href='."'$inf.'".'"><span class="glyphicon glyphicon-list-alt"></span></button>';
|
||||||
|
} else {
|
||||||
|
$informe = '<a href="' . $inf . '"><img src="img/' . ESTILO . '/informe.png" alt="informe" title="Informe pdf"></a>';
|
||||||
|
}
|
||||||
|
//
|
||||||
|
|
||||||
|
//$informe = '<a href="'.$inf.'" title="Informe de '.$this->tabla.'"><h1><span class="glyphicon glyphicon-list-alt"></span></h1></a>';
|
||||||
} else {
|
} else {
|
||||||
$informe = "";
|
$informe = "";
|
||||||
}
|
}
|
||||||
@@ -270,8 +326,13 @@ class Mantenimiento {
|
|||||||
}
|
}
|
||||||
if ($this->perfil['Alta']) {
|
if ($this->perfil['Alta']) {
|
||||||
$this->datosURL['opc'] = 'nuevo';
|
$this->datosURL['opc'] = 'nuevo';
|
||||||
$anadir = '<a href="' . $this->montaURL() . '">' .
|
if (ESTILO == 'bootstrap') {
|
||||||
|
$anadir = '<button type="button" class="btn btn-default btn-lg" title="Añade '.$this->tabla.'" onClick="location.href='."'".$this->montaURL()."'".'"><span class="glyphicon glyphicon-plus-sign"></span></button>';
|
||||||
|
} else {
|
||||||
|
$anadir = '<a href="' . $this->montaURL() . '">' .
|
||||||
'<img title="Añadir registro" alt="nuevo" src="img/' . ESTILO . '/nuevo.png"></a>';
|
'<img title="Añadir registro" alt="nuevo" src="img/' . ESTILO . '/nuevo.png"></a>';
|
||||||
|
}
|
||||||
|
//$anadir = '<a href="'.$this->montaURL() . '"title="Añade '.$this->tabla.'"><h1><span class="glyphicon glyphicon-plus-sign"></span></h1></a>';
|
||||||
} else {
|
} else {
|
||||||
$anadir = "";
|
$anadir = "";
|
||||||
}
|
}
|
||||||
@@ -285,7 +346,7 @@ class Mantenimiento {
|
|||||||
$valor = isset($this->cadenaBusqueda) ? 'value="' . $this->cadenaBusqueda . '"' : '';
|
$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">
|
$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 . '>
|
<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 class="input-group-btn"><button class="btn btn-primary" type="submit"><span class="glyphicon glyphicon-search"></span></button>
|
||||||
</span></div></div></form>';
|
</span></div></div></form>';
|
||||||
$salida .= '<button class="btn btn-info pull-right" type="button">Página <span class="badge">'
|
$salida .= '<button class="btn btn-info pull-right" type="button">Página <span class="badge">'
|
||||||
. $pagina . '</span></button>';
|
. $pagina . '</span></button>';
|
||||||
@@ -520,7 +581,9 @@ class Mantenimiento {
|
|||||||
$def = simplexml_load_file($nombre);
|
$def = simplexml_load_file($nombre);
|
||||||
foreach ($def->Campos->Col as $columna) {
|
foreach ($def->Campos->Col as $columna) {
|
||||||
$this->campos[(string) $columna['Nombre']] = array("Field" => (string) $columna['Titulo'], "Comment" => (string) $columna['Varios'],
|
$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']);
|
"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;
|
$this->comandoConsulta = $def->Consulta;
|
||||||
} else {
|
} else {
|
||||||
@@ -531,6 +594,15 @@ class Mantenimiento {
|
|||||||
$this->campos[$datos[$i]["Field"]] = $this->campos[$datos[$i]["Field"]][0];
|
$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"]]["Campo"] = $datos[$i]["Field"];
|
||||||
$this->campos[$datos[$i]["Field"]]["Editable"] = "si";
|
$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}";
|
$this->comandoConsulta = "select SQL_CALC_FOUND_ROWS * from " . $this->tabla . " {buscar} {orden} limit {inferior},{superior}";
|
||||||
}
|
}
|
||||||
@@ -547,6 +619,9 @@ class Mantenimiento {
|
|||||||
}
|
}
|
||||||
$flecha = '<span class="glyphicon glyphicon-chevron-'.$sentidoFlecha.'"></span>';
|
$flecha = '<span class="glyphicon glyphicon-chevron-'.$sentidoFlecha.'"></span>';
|
||||||
foreach ($this->campos as $clave => $datos) {
|
foreach ($this->campos as $clave => $datos) {
|
||||||
|
if ($this->campos[$clave]['Visible'] == "no") {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$comen = explode(",", $datos["Comment"]);
|
$comen = explode(",", $datos["Comment"]);
|
||||||
$ordenable = false;
|
$ordenable = false;
|
||||||
foreach ($comen as $co) {
|
foreach ($comen as $co) {
|
||||||
@@ -559,18 +634,20 @@ class Mantenimiento {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$clave2 = $clave;
|
$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("ubicacion", "Ubicación", $clave);
|
||||||
$clave = str_ireplace("articulo", "Artículo", $clave);
|
$clave = str_ireplace("articulo", "Artículo", $clave);*/
|
||||||
$ordenActual = $this->datosURL['orden'];
|
$ordenActual = $this->datosURL['orden'];
|
||||||
if ($ordenable) {
|
if ($ordenable) {
|
||||||
$this->backupURL();
|
$this->backupURL();
|
||||||
$this->datosURL['orden'] = $clave2;
|
$this->datosURL['orden'] = $clave2;
|
||||||
$resFlecha = $clave2 == $ordenActual ? $flecha : '';
|
$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();
|
$this->restoreURL();
|
||||||
} else {
|
} 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";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -602,6 +679,7 @@ class Mantenimiento {
|
|||||||
$accion = $this->montaURL();
|
$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.='<div class="col-sm-8"><form name="mantenimiento.form" enctype="multipart/form-data" class="form-horizontal" role="form" method="post" action="' . $accion . '">' . "\n";
|
||||||
$salida.="<fieldset style=\"width: 96%;\"><p><legend style=\"color: red;\"><b>$tipo</b></legend>\n";
|
$salida.="<fieldset style=\"width: 96%;\"><p><legend style=\"color: red;\"><b>$tipo</b></legend>\n";
|
||||||
|
//$salida.= var_export($datos,true);
|
||||||
foreach ($this->campos as $clave => $valor) {
|
foreach ($this->campos as $clave => $valor) {
|
||||||
if ($valor["Editable"] == "no") {
|
if ($valor["Editable"] == "no") {
|
||||||
//Se salta los campos que no deben aparecer
|
//Se salta los campos que no deben aparecer
|
||||||
@@ -611,7 +689,8 @@ class Mantenimiento {
|
|||||||
$salida .='<div class="form-group">';
|
$salida .='<div class="form-group">';
|
||||||
$campo = $valor['Campo'];
|
$campo = $valor['Campo'];
|
||||||
$campos.="$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">';
|
$salida.='<div class="col-sm-5">';
|
||||||
//Se asegura que el id no se pueda modificar.
|
//Se asegura que el id no se pueda modificar.
|
||||||
$modoEfectivo = $clave == 'id' ? "readonly" : $modo;
|
$modoEfectivo = $clave == 'id' ? "readonly" : $modo;
|
||||||
@@ -745,14 +824,15 @@ class Mantenimiento {
|
|||||||
return $mensaje;
|
return $mensaje;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function errorBD($comando, $texto = "", $tipo = "danger", $cabecera = "¡Atención!")
|
protected function errorBD($comando, $texto = "")
|
||||||
{
|
{
|
||||||
if (!$texto) {
|
if (!$texto) {
|
||||||
$texto = "No pudo ejecutar correctamente el comando $comando error=" . $this->bdd->mensajeError();
|
$texto = "No pudo ejecutar correctamente el comando $comando error=" . $this->bdd->mensajeError();
|
||||||
} else {
|
} else {
|
||||||
$texto = "$texto error=" . $this->bdd->mensajeError();
|
$texto = "$texto error=" . $this->bdd->mensajeError();
|
||||||
}
|
}
|
||||||
return $this->panelMensaje($texto, "danger", $cabecera="¡Error!");
|
$cabecera="¡Error!";
|
||||||
|
return $this->panelMensaje($texto, "danger", $cabecera);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function panelMensaje($info, $tipo = "danger", $cabecera = "¡Atención!") {
|
private function panelMensaje($info, $tipo = "danger", $cabecera = "¡Atención!") {
|
||||||
@@ -765,6 +845,55 @@ class Mantenimiento {
|
|||||||
return $mensaje;
|
return $mensaje;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function cargaComplementos()
|
||||||
|
{
|
||||||
|
$mensaje = '<link href="css/bootstrap3-editable/css/bootstrap-editable.css" rel="stylesheet"/>';
|
||||||
|
//$mensaje .= '<script src="css/bootstrap3-editable/js/bootstrap-editable.min.js"></script>';
|
||||||
|
return $mensaje;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function campoAjax($id, $clave, $tipo, $valor, $num, $datosFila)
|
||||||
|
{
|
||||||
|
//url: 'ajax.php?tabla=". $this->tabla . "',
|
||||||
|
//url: '" . $this->montaURL() . "&tabla=" . $this->tabla "',
|
||||||
|
$formato = $tipo == "combodate" ? 'data-format="YYYY-MM-DD" data-viewformat="DD/MM/YYYY"' : '';
|
||||||
|
$remoto = ""; $select2 = "";
|
||||||
|
$titulo = $clave;
|
||||||
|
if (strstr($tipo, "select")) {
|
||||||
|
$datos = explode("-", $tipo);
|
||||||
|
$tipo = $datos[0];
|
||||||
|
$tabla2 = $datos[1];
|
||||||
|
$clave = "id_".$clave;
|
||||||
|
$indice = "id".$tabla2;
|
||||||
|
$valorDato = $datosFila[$indice];
|
||||||
|
$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="#" 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
|
||||||
|
}
|
||||||
|
},
|
||||||
|
validate: function(value) {
|
||||||
|
if($.trim(value) == '') {
|
||||||
|
return 'No se puede dejar vacío';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>";
|
||||||
|
return $mensaje;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
@@ -38,14 +38,12 @@ Para instalar la aplicación basta con seguir estos pasos:
|
|||||||
|
|
||||||
grant all on Inventario.* to usuario identified by "contraseña";
|
grant all on Inventario.* to usuario identified by "contraseña";
|
||||||
|
|
||||||
###5. Crear la estructura de la base de datos para poder comenzar a trabajar:
|
###5. Conectarse a la aplicación en la url donde se ha instalado:
|
||||||
|
|
||||||
mysql -u usuario --password=contraseña <sql/setup.sql
|
http://<url>
|
||||||
|
|
||||||
Con esto queda instalado el programa. Se crean en este proceso dos usuarios:
|
Al hacer esto se arrancará automáticamente el programa de instalación con el que terminaremos de configurar la aplicación.
|
||||||
|
|
||||||
Usuario: admin Usuario: demo
|
|
||||||
Contraseña: pruebas Contraseña: pruebas
|
|
||||||
|
|
||||||
##Modelo de datos
|
##Modelo de datos
|
||||||
El modelo de datos que se ha utilizado ha sido:
|
El modelo de datos que se ha utilizado ha sido:
|
||||||
|
2
Sql.php
2
Sql.php
@@ -66,7 +66,7 @@ class Sql {
|
|||||||
$this->bdd = @new mysqli($servidor,$usuario,$clave,$baseDatos);
|
$this->bdd = @new mysqli($servidor,$usuario,$clave,$baseDatos);
|
||||||
if (mysqli_connect_errno()) {
|
if (mysqli_connect_errno()) {
|
||||||
$this->mensajeError='<h1>Fallo al conectar con el servidor MySQL.</h1>';
|
$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->error=true;
|
||||||
$this->estado=false;
|
$this->estado=false;
|
||||||
} else {
|
} else {
|
||||||
|
663
css/bootstrap3-editable/css/bootstrap-editable.css
vendored
Executable file
663
css/bootstrap3-editable/css/bootstrap-editable.css
vendored
Executable file
@@ -0,0 +1,663 @@
|
|||||||
|
/*! X-editable - v1.5.1
|
||||||
|
* In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
|
||||||
|
* http://github.com/vitalets/x-editable
|
||||||
|
* Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */
|
||||||
|
.editableform {
|
||||||
|
margin-bottom: 0; /* overwrites bootstrap margin */
|
||||||
|
}
|
||||||
|
|
||||||
|
.editableform .control-group {
|
||||||
|
margin-bottom: 0; /* overwrites bootstrap margin */
|
||||||
|
white-space: nowrap; /* prevent wrapping buttons on new line */
|
||||||
|
line-height: 20px; /* overwriting bootstrap line-height. See #133 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
BS3 width:1005 for inputs breaks editable form in popup
|
||||||
|
See: https://github.com/vitalets/x-editable/issues/393
|
||||||
|
*/
|
||||||
|
.editableform .form-control {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-buttons {
|
||||||
|
display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
|
||||||
|
vertical-align: top;
|
||||||
|
margin-left: 7px;
|
||||||
|
/* inline-block emulation for IE7*/
|
||||||
|
zoom: 1;
|
||||||
|
*display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-buttons.editable-buttons-bottom {
|
||||||
|
display: block;
|
||||||
|
margin-top: 7px;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-input {
|
||||||
|
vertical-align: top;
|
||||||
|
display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
|
||||||
|
width: auto; /* bootstrap-responsive has width: 100% that breakes layout */
|
||||||
|
white-space: normal; /* reset white-space decalred in parent*/
|
||||||
|
/* display-inline emulation for IE7*/
|
||||||
|
zoom: 1;
|
||||||
|
*display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-buttons .editable-cancel {
|
||||||
|
margin-left: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*for jquery-ui buttons need set height to look more pretty*/
|
||||||
|
.editable-buttons button.ui-button-icon-only {
|
||||||
|
height: 24px;
|
||||||
|
width: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editableform-loading {
|
||||||
|
background: url('../img/loading.gif') center center no-repeat;
|
||||||
|
height: 25px;
|
||||||
|
width: auto;
|
||||||
|
min-width: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-inline .editableform-loading {
|
||||||
|
background-position: left 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-error-block {
|
||||||
|
max-width: 300px;
|
||||||
|
margin: 5px 0 0 0;
|
||||||
|
width: auto;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*add padding for jquery ui*/
|
||||||
|
.editable-error-block.ui-state-error {
|
||||||
|
padding: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-error {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---- For specific types ---- */
|
||||||
|
|
||||||
|
.editableform .editable-date {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* move datepicker icon to center of add-on button. See https://github.com/vitalets/x-editable/issues/183 */
|
||||||
|
.editable-inline .add-on .icon-th {
|
||||||
|
margin-top: 3px;
|
||||||
|
margin-left: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* checklist vertical alignment */
|
||||||
|
.editable-checklist label input[type="checkbox"],
|
||||||
|
.editable-checklist label span {
|
||||||
|
vertical-align: middle;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-checklist label {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* set exact width of textarea to fit buttons toolbar */
|
||||||
|
.editable-wysihtml5 {
|
||||||
|
width: 566px;
|
||||||
|
height: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* clear button shown as link in date inputs */
|
||||||
|
.editable-clear {
|
||||||
|
clear: both;
|
||||||
|
font-size: 0.9em;
|
||||||
|
text-decoration: none;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* IOS-style clear button for text inputs */
|
||||||
|
.editable-clear-x {
|
||||||
|
background: url('../img/clear.png') center center no-repeat;
|
||||||
|
display: block;
|
||||||
|
width: 13px;
|
||||||
|
height: 13px;
|
||||||
|
position: absolute;
|
||||||
|
opacity: 0.6;
|
||||||
|
z-index: 100;
|
||||||
|
|
||||||
|
top: 50%;
|
||||||
|
right: 6px;
|
||||||
|
margin-top: -6px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-clear-x:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-pre-wrapped {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
.editable-container.editable-popup {
|
||||||
|
max-width: none !important; /* without this rule poshytip/tooltip does not stretch */
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-container.popover {
|
||||||
|
width: auto; /* without this rule popover does not stretch */
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-container.editable-inline {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
width: auto;
|
||||||
|
/* inline-block emulation for IE7*/
|
||||||
|
zoom: 1;
|
||||||
|
*display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-container.ui-widget {
|
||||||
|
font-size: inherit; /* jqueryui widget font 1.1em too big, overwrite it */
|
||||||
|
z-index: 9990; /* should be less than select2 dropdown z-index to close dropdown first when click */
|
||||||
|
}
|
||||||
|
.editable-click,
|
||||||
|
a.editable-click,
|
||||||
|
a.editable-click:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
border-bottom: dashed 1px #0088cc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-click.editable-disabled,
|
||||||
|
a.editable-click.editable-disabled,
|
||||||
|
a.editable-click.editable-disabled:hover {
|
||||||
|
color: #585858;
|
||||||
|
cursor: default;
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-empty, .editable-empty:hover, .editable-empty:focus{
|
||||||
|
font-style: italic;
|
||||||
|
color: #DD1144;
|
||||||
|
/* border-bottom: none; */
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-unsaved {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-unsaved:after {
|
||||||
|
/* content: '*'*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.editable-bg-transition {
|
||||||
|
-webkit-transition: background-color 1400ms ease-out;
|
||||||
|
-moz-transition: background-color 1400ms ease-out;
|
||||||
|
-o-transition: background-color 1400ms ease-out;
|
||||||
|
-ms-transition: background-color 1400ms ease-out;
|
||||||
|
transition: background-color 1400ms ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*see https://github.com/vitalets/x-editable/issues/139 */
|
||||||
|
.form-horizontal .editable
|
||||||
|
{
|
||||||
|
padding-top: 5px;
|
||||||
|
display:inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Datepicker for Bootstrap
|
||||||
|
*
|
||||||
|
* Copyright 2012 Stefan Petre
|
||||||
|
* Improvements by Andrew Rowls
|
||||||
|
* Licensed under the Apache License v2.0
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
.datepicker {
|
||||||
|
padding: 4px;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
direction: ltr;
|
||||||
|
/*.dow {
|
||||||
|
border-top: 1px solid #ddd !important;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
}
|
||||||
|
.datepicker-inline {
|
||||||
|
width: 220px;
|
||||||
|
}
|
||||||
|
.datepicker.datepicker-rtl {
|
||||||
|
direction: rtl;
|
||||||
|
}
|
||||||
|
.datepicker.datepicker-rtl table tr td span {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.datepicker-dropdown {
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
.datepicker-dropdown:before {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
border-left: 7px solid transparent;
|
||||||
|
border-right: 7px solid transparent;
|
||||||
|
border-bottom: 7px solid #ccc;
|
||||||
|
border-bottom-color: rgba(0, 0, 0, 0.2);
|
||||||
|
position: absolute;
|
||||||
|
top: -7px;
|
||||||
|
left: 6px;
|
||||||
|
}
|
||||||
|
.datepicker-dropdown:after {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
border-left: 6px solid transparent;
|
||||||
|
border-right: 6px solid transparent;
|
||||||
|
border-bottom: 6px solid #ffffff;
|
||||||
|
position: absolute;
|
||||||
|
top: -6px;
|
||||||
|
left: 7px;
|
||||||
|
}
|
||||||
|
.datepicker > div {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.datepicker.days div.datepicker-days {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.datepicker.months div.datepicker-months {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.datepicker.years div.datepicker-years {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.datepicker table {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.datepicker td,
|
||||||
|
.datepicker th {
|
||||||
|
text-align: center;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
.table-striped .datepicker table tr td,
|
||||||
|
.table-striped .datepicker table tr th {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.day:hover {
|
||||||
|
background: #eeeeee;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.old,
|
||||||
|
.datepicker table tr td.new {
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.disabled,
|
||||||
|
.datepicker table tr td.disabled:hover {
|
||||||
|
background: none;
|
||||||
|
color: #999999;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.today,
|
||||||
|
.datepicker table tr td.today:hover,
|
||||||
|
.datepicker table tr td.today.disabled,
|
||||||
|
.datepicker table tr td.today.disabled:hover {
|
||||||
|
background-color: #fde19a;
|
||||||
|
background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
|
||||||
|
background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
|
||||||
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a));
|
||||||
|
background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
|
||||||
|
background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
|
||||||
|
background-image: linear-gradient(top, #fdd49a, #fdf59a);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0);
|
||||||
|
border-color: #fdf59a #fdf59a #fbed50;
|
||||||
|
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.today:hover,
|
||||||
|
.datepicker table tr td.today:hover:hover,
|
||||||
|
.datepicker table tr td.today.disabled:hover,
|
||||||
|
.datepicker table tr td.today.disabled:hover:hover,
|
||||||
|
.datepicker table tr td.today:active,
|
||||||
|
.datepicker table tr td.today:hover:active,
|
||||||
|
.datepicker table tr td.today.disabled:active,
|
||||||
|
.datepicker table tr td.today.disabled:hover:active,
|
||||||
|
.datepicker table tr td.today.active,
|
||||||
|
.datepicker table tr td.today:hover.active,
|
||||||
|
.datepicker table tr td.today.disabled.active,
|
||||||
|
.datepicker table tr td.today.disabled:hover.active,
|
||||||
|
.datepicker table tr td.today.disabled,
|
||||||
|
.datepicker table tr td.today:hover.disabled,
|
||||||
|
.datepicker table tr td.today.disabled.disabled,
|
||||||
|
.datepicker table tr td.today.disabled:hover.disabled,
|
||||||
|
.datepicker table tr td.today[disabled],
|
||||||
|
.datepicker table tr td.today:hover[disabled],
|
||||||
|
.datepicker table tr td.today.disabled[disabled],
|
||||||
|
.datepicker table tr td.today.disabled:hover[disabled] {
|
||||||
|
background-color: #fdf59a;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.today:active,
|
||||||
|
.datepicker table tr td.today:hover:active,
|
||||||
|
.datepicker table tr td.today.disabled:active,
|
||||||
|
.datepicker table tr td.today.disabled:hover:active,
|
||||||
|
.datepicker table tr td.today.active,
|
||||||
|
.datepicker table tr td.today:hover.active,
|
||||||
|
.datepicker table tr td.today.disabled.active,
|
||||||
|
.datepicker table tr td.today.disabled:hover.active {
|
||||||
|
background-color: #fbf069 \9;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.today:hover:hover {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.today.active:hover {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.range,
|
||||||
|
.datepicker table tr td.range:hover,
|
||||||
|
.datepicker table tr td.range.disabled,
|
||||||
|
.datepicker table tr td.range.disabled:hover {
|
||||||
|
background: #eeeeee;
|
||||||
|
-webkit-border-radius: 0;
|
||||||
|
-moz-border-radius: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.range.today,
|
||||||
|
.datepicker table tr td.range.today:hover,
|
||||||
|
.datepicker table tr td.range.today.disabled,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover {
|
||||||
|
background-color: #f3d17a;
|
||||||
|
background-image: -moz-linear-gradient(top, #f3c17a, #f3e97a);
|
||||||
|
background-image: -ms-linear-gradient(top, #f3c17a, #f3e97a);
|
||||||
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3c17a), to(#f3e97a));
|
||||||
|
background-image: -webkit-linear-gradient(top, #f3c17a, #f3e97a);
|
||||||
|
background-image: -o-linear-gradient(top, #f3c17a, #f3e97a);
|
||||||
|
background-image: linear-gradient(top, #f3c17a, #f3e97a);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c17a', endColorstr='#f3e97a', GradientType=0);
|
||||||
|
border-color: #f3e97a #f3e97a #edde34;
|
||||||
|
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||||
|
-webkit-border-radius: 0;
|
||||||
|
-moz-border-radius: 0;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.range.today:hover,
|
||||||
|
.datepicker table tr td.range.today:hover:hover,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover:hover,
|
||||||
|
.datepicker table tr td.range.today:active,
|
||||||
|
.datepicker table tr td.range.today:hover:active,
|
||||||
|
.datepicker table tr td.range.today.disabled:active,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover:active,
|
||||||
|
.datepicker table tr td.range.today.active,
|
||||||
|
.datepicker table tr td.range.today:hover.active,
|
||||||
|
.datepicker table tr td.range.today.disabled.active,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover.active,
|
||||||
|
.datepicker table tr td.range.today.disabled,
|
||||||
|
.datepicker table tr td.range.today:hover.disabled,
|
||||||
|
.datepicker table tr td.range.today.disabled.disabled,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover.disabled,
|
||||||
|
.datepicker table tr td.range.today[disabled],
|
||||||
|
.datepicker table tr td.range.today:hover[disabled],
|
||||||
|
.datepicker table tr td.range.today.disabled[disabled],
|
||||||
|
.datepicker table tr td.range.today.disabled:hover[disabled] {
|
||||||
|
background-color: #f3e97a;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.range.today:active,
|
||||||
|
.datepicker table tr td.range.today:hover:active,
|
||||||
|
.datepicker table tr td.range.today.disabled:active,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover:active,
|
||||||
|
.datepicker table tr td.range.today.active,
|
||||||
|
.datepicker table tr td.range.today:hover.active,
|
||||||
|
.datepicker table tr td.range.today.disabled.active,
|
||||||
|
.datepicker table tr td.range.today.disabled:hover.active {
|
||||||
|
background-color: #efe24b \9;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.selected,
|
||||||
|
.datepicker table tr td.selected:hover,
|
||||||
|
.datepicker table tr td.selected.disabled,
|
||||||
|
.datepicker table tr td.selected.disabled:hover {
|
||||||
|
background-color: #9e9e9e;
|
||||||
|
background-image: -moz-linear-gradient(top, #b3b3b3, #808080);
|
||||||
|
background-image: -ms-linear-gradient(top, #b3b3b3, #808080);
|
||||||
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b3b3b3), to(#808080));
|
||||||
|
background-image: -webkit-linear-gradient(top, #b3b3b3, #808080);
|
||||||
|
background-image: -o-linear-gradient(top, #b3b3b3, #808080);
|
||||||
|
background-image: linear-gradient(top, #b3b3b3, #808080);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3b3b3', endColorstr='#808080', GradientType=0);
|
||||||
|
border-color: #808080 #808080 #595959;
|
||||||
|
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||||
|
}
|
||||||
|
.datepicker table tr td.selected:hover,
|
||||||
|
.datepicker table tr td.selected:hover:hover,
|
||||||
|
.datepicker table tr td.selected.disabled:hover,
|
||||||
|
.datepicker table tr td.selected.disabled:hover:hover,
|
||||||
|
.datepicker table tr td.selected:active,
|
||||||
|
.datepicker table tr td.selected:hover:active,
|
||||||
|
.datepicker table tr td.selected.disabled:active,
|
||||||
|
.datepicker table tr td.selected.disabled:hover:active,
|
||||||
|
.datepicker table tr td.selected.active,
|
||||||
|
.datepicker table tr td.selected:hover.active,
|
||||||
|
.datepicker table tr td.selected.disabled.active,
|
||||||
|
.datepicker table tr td.selected.disabled:hover.active,
|
||||||
|
.datepicker table tr td.selected.disabled,
|
||||||
|
.datepicker table tr td.selected:hover.disabled,
|
||||||
|
.datepicker table tr td.selected.disabled.disabled,
|
||||||
|
.datepicker table tr td.selected.disabled:hover.disabled,
|
||||||
|
.datepicker table tr td.selected[disabled],
|
||||||
|
.datepicker table tr td.selected:hover[disabled],
|
||||||
|
.datepicker table tr td.selected.disabled[disabled],
|
||||||
|
.datepicker table tr td.selected.disabled:hover[disabled] {
|
||||||
|
background-color: #808080;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.selected:active,
|
||||||
|
.datepicker table tr td.selected:hover:active,
|
||||||
|
.datepicker table tr td.selected.disabled:active,
|
||||||
|
.datepicker table tr td.selected.disabled:hover:active,
|
||||||
|
.datepicker table tr td.selected.active,
|
||||||
|
.datepicker table tr td.selected:hover.active,
|
||||||
|
.datepicker table tr td.selected.disabled.active,
|
||||||
|
.datepicker table tr td.selected.disabled:hover.active {
|
||||||
|
background-color: #666666 \9;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.active,
|
||||||
|
.datepicker table tr td.active:hover,
|
||||||
|
.datepicker table tr td.active.disabled,
|
||||||
|
.datepicker table tr td.active.disabled:hover {
|
||||||
|
background-color: #006dcc;
|
||||||
|
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
|
||||||
|
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
|
||||||
|
border-color: #0044cc #0044cc #002a80;
|
||||||
|
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||||
|
}
|
||||||
|
.datepicker table tr td.active:hover,
|
||||||
|
.datepicker table tr td.active:hover:hover,
|
||||||
|
.datepicker table tr td.active.disabled:hover,
|
||||||
|
.datepicker table tr td.active.disabled:hover:hover,
|
||||||
|
.datepicker table tr td.active:active,
|
||||||
|
.datepicker table tr td.active:hover:active,
|
||||||
|
.datepicker table tr td.active.disabled:active,
|
||||||
|
.datepicker table tr td.active.disabled:hover:active,
|
||||||
|
.datepicker table tr td.active.active,
|
||||||
|
.datepicker table tr td.active:hover.active,
|
||||||
|
.datepicker table tr td.active.disabled.active,
|
||||||
|
.datepicker table tr td.active.disabled:hover.active,
|
||||||
|
.datepicker table tr td.active.disabled,
|
||||||
|
.datepicker table tr td.active:hover.disabled,
|
||||||
|
.datepicker table tr td.active.disabled.disabled,
|
||||||
|
.datepicker table tr td.active.disabled:hover.disabled,
|
||||||
|
.datepicker table tr td.active[disabled],
|
||||||
|
.datepicker table tr td.active:hover[disabled],
|
||||||
|
.datepicker table tr td.active.disabled[disabled],
|
||||||
|
.datepicker table tr td.active.disabled:hover[disabled] {
|
||||||
|
background-color: #0044cc;
|
||||||
|
}
|
||||||
|
.datepicker table tr td.active:active,
|
||||||
|
.datepicker table tr td.active:hover:active,
|
||||||
|
.datepicker table tr td.active.disabled:active,
|
||||||
|
.datepicker table tr td.active.disabled:hover:active,
|
||||||
|
.datepicker table tr td.active.active,
|
||||||
|
.datepicker table tr td.active:hover.active,
|
||||||
|
.datepicker table tr td.active.disabled.active,
|
||||||
|
.datepicker table tr td.active.disabled:hover.active {
|
||||||
|
background-color: #003399 \9;
|
||||||
|
}
|
||||||
|
.datepicker table tr td span {
|
||||||
|
display: block;
|
||||||
|
width: 23%;
|
||||||
|
height: 54px;
|
||||||
|
line-height: 54px;
|
||||||
|
float: left;
|
||||||
|
margin: 1%;
|
||||||
|
cursor: pointer;
|
||||||
|
-webkit-border-radius: 4px;
|
||||||
|
-moz-border-radius: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.datepicker table tr td span:hover {
|
||||||
|
background: #eeeeee;
|
||||||
|
}
|
||||||
|
.datepicker table tr td span.disabled,
|
||||||
|
.datepicker table tr td span.disabled:hover {
|
||||||
|
background: none;
|
||||||
|
color: #999999;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
.datepicker table tr td span.active,
|
||||||
|
.datepicker table tr td span.active:hover,
|
||||||
|
.datepicker table tr td span.active.disabled,
|
||||||
|
.datepicker table tr td span.active.disabled:hover {
|
||||||
|
background-color: #006dcc;
|
||||||
|
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
|
||||||
|
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-image: linear-gradient(top, #0088cc, #0044cc);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
|
||||||
|
border-color: #0044cc #0044cc #002a80;
|
||||||
|
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||||
|
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||||
|
}
|
||||||
|
.datepicker table tr td span.active:hover,
|
||||||
|
.datepicker table tr td span.active:hover:hover,
|
||||||
|
.datepicker table tr td span.active.disabled:hover,
|
||||||
|
.datepicker table tr td span.active.disabled:hover:hover,
|
||||||
|
.datepicker table tr td span.active:active,
|
||||||
|
.datepicker table tr td span.active:hover:active,
|
||||||
|
.datepicker table tr td span.active.disabled:active,
|
||||||
|
.datepicker table tr td span.active.disabled:hover:active,
|
||||||
|
.datepicker table tr td span.active.active,
|
||||||
|
.datepicker table tr td span.active:hover.active,
|
||||||
|
.datepicker table tr td span.active.disabled.active,
|
||||||
|
.datepicker table tr td span.active.disabled:hover.active,
|
||||||
|
.datepicker table tr td span.active.disabled,
|
||||||
|
.datepicker table tr td span.active:hover.disabled,
|
||||||
|
.datepicker table tr td span.active.disabled.disabled,
|
||||||
|
.datepicker table tr td span.active.disabled:hover.disabled,
|
||||||
|
.datepicker table tr td span.active[disabled],
|
||||||
|
.datepicker table tr td span.active:hover[disabled],
|
||||||
|
.datepicker table tr td span.active.disabled[disabled],
|
||||||
|
.datepicker table tr td span.active.disabled:hover[disabled] {
|
||||||
|
background-color: #0044cc;
|
||||||
|
}
|
||||||
|
.datepicker table tr td span.active:active,
|
||||||
|
.datepicker table tr td span.active:hover:active,
|
||||||
|
.datepicker table tr td span.active.disabled:active,
|
||||||
|
.datepicker table tr td span.active.disabled:hover:active,
|
||||||
|
.datepicker table tr td span.active.active,
|
||||||
|
.datepicker table tr td span.active:hover.active,
|
||||||
|
.datepicker table tr td span.active.disabled.active,
|
||||||
|
.datepicker table tr td span.active.disabled:hover.active {
|
||||||
|
background-color: #003399 \9;
|
||||||
|
}
|
||||||
|
.datepicker table tr td span.old,
|
||||||
|
.datepicker table tr td span.new {
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
.datepicker th.datepicker-switch {
|
||||||
|
width: 145px;
|
||||||
|
}
|
||||||
|
.datepicker thead tr:first-child th,
|
||||||
|
.datepicker tfoot tr th {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.datepicker thead tr:first-child th:hover,
|
||||||
|
.datepicker tfoot tr th:hover {
|
||||||
|
background: #eeeeee;
|
||||||
|
}
|
||||||
|
.datepicker .cw {
|
||||||
|
font-size: 10px;
|
||||||
|
width: 12px;
|
||||||
|
padding: 0 2px 0 5px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.datepicker thead tr:first-child th.cw {
|
||||||
|
cursor: default;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
.input-append.date .add-on i,
|
||||||
|
.input-prepend.date .add-on i {
|
||||||
|
display: block;
|
||||||
|
cursor: pointer;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
.input-daterange input {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.input-daterange input:first-child {
|
||||||
|
-webkit-border-radius: 3px 0 0 3px;
|
||||||
|
-moz-border-radius: 3px 0 0 3px;
|
||||||
|
border-radius: 3px 0 0 3px;
|
||||||
|
}
|
||||||
|
.input-daterange input:last-child {
|
||||||
|
-webkit-border-radius: 0 3px 3px 0;
|
||||||
|
-moz-border-radius: 0 3px 3px 0;
|
||||||
|
border-radius: 0 3px 3px 0;
|
||||||
|
}
|
||||||
|
.input-daterange .add-on {
|
||||||
|
display: inline-block;
|
||||||
|
width: auto;
|
||||||
|
min-width: 16px;
|
||||||
|
height: 18px;
|
||||||
|
padding: 4px 5px;
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 18px;
|
||||||
|
text-align: center;
|
||||||
|
text-shadow: 0 1px 0 #ffffff;
|
||||||
|
vertical-align: middle;
|
||||||
|
background-color: #eeeeee;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
margin-left: -5px;
|
||||||
|
margin-right: -5px;
|
||||||
|
}
|
BIN
css/bootstrap3-editable/img/clear.png
Executable file
BIN
css/bootstrap3-editable/img/clear.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 509 B |
BIN
css/bootstrap3-editable/img/loading.gif
Executable file
BIN
css/bootstrap3-editable/img/loading.gif
Executable file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
6807
css/bootstrap3-editable/js/bootstrap-editable.js
vendored
Executable file
6807
css/bootstrap3-editable/js/bootstrap-editable.js
vendored
Executable file
File diff suppressed because it is too large
Load Diff
7
css/bootstrap3-editable/js/bootstrap-editable.min.js
vendored
Executable file
7
css/bootstrap3-editable/js/bootstrap-editable.min.js
vendored
Executable file
File diff suppressed because one or more lines are too long
5
img.data/.gitignore
vendored
Normal file
5
img.data/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# Ignore everything in this directory
|
||||||
|
*
|
||||||
|
# Except this file
|
||||||
|
!.gitignore
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 210 KiB |
@@ -33,12 +33,13 @@ define('PROGRAMA', 'Gestión de Inventario.');
|
|||||||
define('CENTRO', 'I.E.S.O. Pascual Serrano');
|
define('CENTRO', 'I.E.S.O. Pascual Serrano');
|
||||||
define('NUMFILAS', '17'); // Número de registros a mostrar en las pantallas de consulta iniciales
|
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('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('PLANTILLA', 'bootstrap'); //Estilo de la plantilla y recursos a utilizar
|
||||||
define('COLORLAT', '#a4bdfc'); //Color de la barra de menú lateral
|
define('COLORLAT', '#a4bdfc'); //Color de la barra de menú lateral
|
||||||
define('COLORFON', '#ffb878'); //Color del fondo de la pantalla
|
define('COLORFON', '#ffb878'); //Color del fondo de la pantalla
|
||||||
define('MYSQLDUMP', '/usr/local/bin/mysqldump'); //camino a mysqldump
|
define('MYSQLDUMP', '/usr/local/bin/mysqldump'); //camino a mysqldump
|
||||||
define('GZIP', '/usr/bin/gzip'); //Camino a gzip
|
define('GZIP', '/usr/bin/gzip'); //Camino a gzip
|
||||||
define('IMAGEDATA', 'img.data'); //Directorio donde se almacenarán las imágenes
|
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('AUTOR', 'Ricardo Montañana Gómez');
|
||||||
define('VERSION', '1.08');
|
define('VERSION', '1.12');
|
||||||
?>
|
?>
|
||||||
|
@@ -81,5 +81,6 @@
|
|||||||
<script type="text/javascript" src="./css/bootstrap-datetimepicker.es.js"></script>
|
<script type="text/javascript" src="./css/bootstrap-datetimepicker.es.js"></script>
|
||||||
<script type="text/javascript" src="./css/jquery.simplecolorpicker.js"></script>
|
<script type="text/javascript" src="./css/jquery.simplecolorpicker.js"></script>
|
||||||
<script type="text/javascript" src="./css/jasny-bootstrap.min.js"></script>
|
<script type="text/javascript" src="./css/jasny-bootstrap.min.js"></script>
|
||||||
|
<script src="css/bootstrap3-editable/js/bootstrap-editable.min.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@@ -15,23 +15,6 @@
|
|||||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `Articulos`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `Articulos`;
|
|
||||||
SET @saved_cs_client = @@character_set_client;
|
|
||||||
SET character_set_client = utf8;
|
|
||||||
CREATE TABLE `Articulos` (
|
|
||||||
`id` smallint(6) NOT NULL auto_increment,
|
|
||||||
`descripcion` varchar(60) NOT NULL COMMENT 'ordenable,link/Articulo',
|
|
||||||
`marca` varchar(20) default NULL COMMENT 'ordenable',
|
|
||||||
`modelo` varchar(20) default NULL COMMENT 'ordenable',
|
|
||||||
`cantidad` int(11) default NULL COMMENT 'ordenable',
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=785 DEFAULT CHARSET=latin1;
|
|
||||||
SET character_set_client = @saved_cs_client;
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `Articulos`
|
-- Dumping data for table `Articulos`
|
||||||
--
|
--
|
||||||
@@ -42,29 +25,6 @@ INSERT INTO `Articulos` VALUES (589,'Armario con puertas y cajones','M. E. C.','
|
|||||||
/*!40000 ALTER TABLE `Articulos` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `Articulos` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `Elementos`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `Elementos`;
|
|
||||||
SET @saved_cs_client = @@character_set_client;
|
|
||||||
SET character_set_client = utf8;
|
|
||||||
CREATE TABLE `Elementos` (
|
|
||||||
`id` int(10) unsigned NOT NULL auto_increment,
|
|
||||||
`id_Articulo` smallint(6) NOT NULL COMMENT 'foreign(Articulos;id),ordenable',
|
|
||||||
`id_Ubicacion` smallint(5) unsigned NOT NULL COMMENT 'foreign(Ubicaciones;id),ordenable',
|
|
||||||
`numserie` varchar(30) default NULL COMMENT 'ordenable',
|
|
||||||
`cantidad` int(10) unsigned default NULL COMMENT 'ordenable',
|
|
||||||
`fechaCompra` date NOT NULL COMMENT 'ordenable',
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
KEY `id` (`id`),
|
|
||||||
KEY `id_Articulo` (`id_Articulo`),
|
|
||||||
KEY `id_Ubicacion` (`id_Ubicacion`),
|
|
||||||
CONSTRAINT `Elementos_ibfk_1` FOREIGN KEY (`id_Articulo`) REFERENCES `Articulos` (`id`) ON DELETE CASCADE,
|
|
||||||
CONSTRAINT `Elementos_ibfk_2` FOREIGN KEY (`id_Ubicacion`) REFERENCES `Ubicaciones` (`id`) ON UPDATE CASCADE
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=1884 DEFAULT CHARSET=latin1;
|
|
||||||
SET character_set_client = @saved_cs_client;
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `Elementos`
|
-- Dumping data for table `Elementos`
|
||||||
--
|
--
|
||||||
@@ -75,20 +35,6 @@ INSERT INTO `Elementos` VALUES (1414,589,140,'',1,'2004-12-07 00:00:00'),(1415,5
|
|||||||
/*!40000 ALTER TABLE `Elementos` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `Elementos` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `Ubicaciones`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `Ubicaciones`;
|
|
||||||
SET @saved_cs_client = @@character_set_client;
|
|
||||||
SET character_set_client = utf8;
|
|
||||||
CREATE TABLE `Ubicaciones` (
|
|
||||||
`id` smallint(5) unsigned NOT NULL auto_increment,
|
|
||||||
`Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,link/Ubicacion',
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=184 DEFAULT CHARSET=latin1;
|
|
||||||
SET character_set_client = @saved_cs_client;
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `Ubicaciones`
|
-- Dumping data for table `Ubicaciones`
|
||||||
--
|
--
|
||||||
@@ -99,30 +45,6 @@ INSERT INTO `Ubicaciones` VALUES (140,'Secretario'),(141,'Aula Althia'),(142,'Al
|
|||||||
/*!40000 ALTER TABLE `Ubicaciones` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `Ubicaciones` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `Usuarios`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `Usuarios`;
|
|
||||||
SET @saved_cs_client = @@character_set_client;
|
|
||||||
SET character_set_client = utf8;
|
|
||||||
CREATE TABLE `Usuarios` (
|
|
||||||
`id` int(10) unsigned NOT NULL auto_increment,
|
|
||||||
`nombre` varchar(16) NOT NULL default '',
|
|
||||||
`clave` varchar(32) NOT NULL default '',
|
|
||||||
`idSesion` varchar(20) NOT NULL default '',
|
|
||||||
`alta` tinyint(1) NOT NULL default '0',
|
|
||||||
`modificacion` tinyint(1) NOT NULL default '0',
|
|
||||||
`borrado` tinyint(1) NOT NULL default '0',
|
|
||||||
`consulta` tinyint(1) NOT NULL default '1',
|
|
||||||
`informe` tinyint(1) NOT NULL default '1',
|
|
||||||
`usuarios` tinyint(1) NOT NULL default '0',
|
|
||||||
`config` tinyint(1) NOT NULL default '0',
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
KEY `nombre` (`nombre`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
|
|
||||||
SET character_set_client = @saved_cs_client;
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `Usuarios`
|
-- Dumping data for table `Usuarios`
|
||||||
--
|
--
|
||||||
@@ -133,28 +55,7 @@ INSERT INTO `Usuarios` VALUES (2,'admin','galeote','s3LUSqxg{s',1,1,1,1,1,1,1),(
|
|||||||
/*!40000 ALTER TABLE `Usuarios` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `Usuarios` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `test`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `test`;
|
|
||||||
SET @saved_cs_client = @@character_set_client;
|
|
||||||
SET character_set_client = utf8;
|
|
||||||
CREATE TABLE `test` (
|
|
||||||
`id` smallint(6) NOT NULL auto_increment,
|
|
||||||
`Descripcion` varchar(30) NOT NULL,
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
||||||
SET character_set_client = @saved_cs_client;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `test`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `test` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `test` DISABLE KEYS */;
|
|
||||||
/*!40000 ALTER TABLE `test` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||||
|
103
sql/inv-utf.sql
103
sql/inv-utf.sql
@@ -15,24 +15,6 @@
|
|||||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `Articulos`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `Articulos`;
|
|
||||||
SET @saved_cs_client = @@character_set_client;
|
|
||||||
SET character_set_client = utf8;
|
|
||||||
CREATE TABLE `Articulos` (
|
|
||||||
`id` smallint(6) NOT NULL auto_increment COMMENT 'ordenable',
|
|
||||||
`descripcion` varchar(60) NOT NULL COMMENT 'ordenable,link/Articulo',
|
|
||||||
`marca` varchar(20) default NULL COMMENT 'ordenable',
|
|
||||||
`modelo` varchar(20) default NULL COMMENT 'ordenable',
|
|
||||||
`cantidad` int(11) default NULL COMMENT 'ordenable',
|
|
||||||
`imagen` varchar(45) DEFAULT NULL COMMENT 'imagen',
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=785 DEFAULT CHARSET=utf8;
|
|
||||||
SET character_set_client = @saved_cs_client;
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `Articulos`
|
-- Dumping data for table `Articulos`
|
||||||
--
|
--
|
||||||
@@ -43,30 +25,6 @@ INSERT INTO `Articulos` (id, descripcion, marca, modelo, cantidad) VALUES (589,'
|
|||||||
/*!40000 ALTER TABLE `Articulos` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `Articulos` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `Elementos`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `Elementos`;
|
|
||||||
SET @saved_cs_client = @@character_set_client;
|
|
||||||
SET character_set_client = utf8;
|
|
||||||
CREATE TABLE `Elementos` (
|
|
||||||
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'ordenable',
|
|
||||||
`id_Articulo` smallint(6) NOT NULL COMMENT 'foreign(Articulos;id),ordenable',
|
|
||||||
`id_Ubicacion` smallint(5) unsigned NOT NULL COMMENT 'foreign(Ubicaciones;id),ordenable',
|
|
||||||
`numserie` varchar(30) default NULL COMMENT 'ordenable',
|
|
||||||
`cantidad` int(10) unsigned default NULL COMMENT 'ordenable',
|
|
||||||
`fechaCompra` date NOT NULL COMMENT 'ordenable',
|
|
||||||
`imagen` varchar(45) DEFAULT NULL COMMENT 'imagen',
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
KEY `id` (`id`),
|
|
||||||
KEY `id_Articulo` (`id_Articulo`),
|
|
||||||
KEY `id_Ubicacion` (`id_Ubicacion`),
|
|
||||||
CONSTRAINT `Elementos_ibfk_1` FOREIGN KEY (`id_Articulo`) REFERENCES `Articulos` (`id`) ON DELETE CASCADE,
|
|
||||||
CONSTRAINT `Elementos_ibfk_2` FOREIGN KEY (`id_Ubicacion`) REFERENCES `Ubicaciones` (`id`) ON UPDATE CASCADE
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=1884 DEFAULT CHARSET=utf8;
|
|
||||||
SET character_set_client = @saved_cs_client;
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `Elementos`
|
-- Dumping data for table `Elementos`
|
||||||
--
|
--
|
||||||
@@ -77,21 +35,6 @@ INSERT INTO `Elementos` (id, id_Articulo, id_Ubicacion, numserie, cantidad, fech
|
|||||||
/*!40000 ALTER TABLE `Elementos` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `Elementos` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `Ubicaciones`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `Ubicaciones`;
|
|
||||||
SET @saved_cs_client = @@character_set_client;
|
|
||||||
SET character_set_client = utf8;
|
|
||||||
CREATE TABLE `Ubicaciones` (
|
|
||||||
`id` smallint(5) unsigned NOT NULL auto_increment COMMENT 'ordenable',
|
|
||||||
`Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,link/Ubicacion',
|
|
||||||
`imagen` varchar(45) DEFAULT NULL COMMENT 'imagen',
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=184 DEFAULT CHARSET=utf8;
|
|
||||||
SET character_set_client = @saved_cs_client;
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `Ubicaciones`
|
-- Dumping data for table `Ubicaciones`
|
||||||
--
|
--
|
||||||
@@ -102,30 +45,6 @@ INSERT INTO `Ubicaciones` (id,descripcion) VALUES (140,'Secretario'),(141,'Aula
|
|||||||
/*!40000 ALTER TABLE `Ubicaciones` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `Ubicaciones` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `Usuarios`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `Usuarios`;
|
|
||||||
SET @saved_cs_client = @@character_set_client;
|
|
||||||
SET character_set_client = utf8;
|
|
||||||
CREATE TABLE `Usuarios` (
|
|
||||||
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'ordenable',
|
|
||||||
`nombre` varchar(16) NOT NULL default '',
|
|
||||||
`clave` varchar(32) NOT NULL default '',
|
|
||||||
`idSesion` varchar(20) NOT NULL default '',
|
|
||||||
`alta` tinyint(1) NOT NULL default '0',
|
|
||||||
`modificacion` tinyint(1) NOT NULL default '0',
|
|
||||||
`borrado` tinyint(1) NOT NULL default '0',
|
|
||||||
`consulta` tinyint(1) NOT NULL default '1',
|
|
||||||
`informe` tinyint(1) NOT NULL default '1',
|
|
||||||
`usuarios` tinyint(1) NOT NULL default '0',
|
|
||||||
`config` tinyint(1) NOT NULL default '0',
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
KEY `nombre` (`nombre`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
|
|
||||||
SET character_set_client = @saved_cs_client;
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `Usuarios`
|
-- Dumping data for table `Usuarios`
|
||||||
--
|
--
|
||||||
@@ -136,28 +55,6 @@ INSERT INTO `Usuarios` VALUES (2,'admin','galeote','s3LUSqxg{s',1,1,1,1,1,1,1),(
|
|||||||
/*!40000 ALTER TABLE `Usuarios` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `Usuarios` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
|
||||||
-- Table structure for table `test`
|
|
||||||
--
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `test`;
|
|
||||||
SET @saved_cs_client = @@character_set_client;
|
|
||||||
SET character_set_client = utf8;
|
|
||||||
CREATE TABLE `test` (
|
|
||||||
`id` smallint(6) NOT NULL auto_increment,
|
|
||||||
`Descripcion` varchar(30) NOT NULL,
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
||||||
SET character_set_client = @saved_cs_client;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Dumping data for table `test`
|
|
||||||
--
|
|
||||||
|
|
||||||
LOCK TABLES `test` WRITE;
|
|
||||||
/*!40000 ALTER TABLE `test` DISABLE KEYS */;
|
|
||||||
/*!40000 ALTER TABLE `test` ENABLE KEYS */;
|
|
||||||
UNLOCK TABLES;
|
|
||||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||||
|
@@ -22,11 +22,11 @@ DROP TABLE IF EXISTS `Articulos`;
|
|||||||
SET @saved_cs_client = @@character_set_client;
|
SET @saved_cs_client = @@character_set_client;
|
||||||
SET character_set_client = utf8;
|
SET character_set_client = utf8;
|
||||||
CREATE TABLE `Articulos` (
|
CREATE TABLE `Articulos` (
|
||||||
`id` smallint(6) NOT NULL auto_increment COMMENT 'ordenable',
|
`id` smallint(6) NOT NULL auto_increment COMMENT 'ordenable,link/Articulo',
|
||||||
`descripcion` varchar(60) NOT NULL COMMENT 'ordenable,link/Articulo',
|
`descripcion` varchar(60) NOT NULL COMMENT 'ordenable,ajax/text',
|
||||||
`marca` varchar(20) default NULL COMMENT 'ordenable',
|
`marca` varchar(20) default NULL COMMENT 'ordenable,ajax/text',
|
||||||
`modelo` varchar(20) default NULL COMMENT 'ordenable',
|
`modelo` varchar(20) default NULL COMMENT 'ordenable,ajax/text',
|
||||||
`cantidad` int(11) default NULL COMMENT 'ordenable',
|
`cantidad` int(11) default NULL COMMENT 'ordenable,ajax/number',
|
||||||
`imagen` varchar(45) default NULL COMMENT 'imagen',
|
`imagen` varchar(45) default NULL COMMENT 'imagen',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=785 DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB AUTO_INCREMENT=785 DEFAULT CHARSET=utf8;
|
||||||
@@ -44,9 +44,9 @@ CREATE TABLE `Elementos` (
|
|||||||
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'ordenable',
|
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'ordenable',
|
||||||
`id_Articulo` smallint(6) NOT NULL COMMENT 'foreign(Articulos;id),ordenable',
|
`id_Articulo` smallint(6) NOT NULL COMMENT 'foreign(Articulos;id),ordenable',
|
||||||
`id_Ubicacion` smallint(5) unsigned NOT NULL COMMENT 'foreign(Ubicaciones;id),ordenable',
|
`id_Ubicacion` smallint(5) unsigned NOT NULL COMMENT 'foreign(Ubicaciones;id),ordenable',
|
||||||
`numserie` varchar(30) default NULL COMMENT 'ordenable',
|
`numserie` varchar(30) default NULL COMMENT 'ordenable,ajax/text',
|
||||||
`cantidad` int(10) unsigned default NULL COMMENT 'ordenable',
|
`cantidad` int(10) unsigned default NULL COMMENT 'ordenable,ajax/number',
|
||||||
`fechaCompra` date NOT NULL COMMENT 'ordenable',
|
`fechaCompra` date NOT NULL COMMENT 'ordenable,ajax/combodate',
|
||||||
`imagen` varchar(45) default NULL COMMENT 'imagen',
|
`imagen` varchar(45) default NULL COMMENT 'imagen',
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `id` (`id`),
|
KEY `id` (`id`),
|
||||||
@@ -66,8 +66,8 @@ DROP TABLE IF EXISTS `Ubicaciones`;
|
|||||||
SET @saved_cs_client = @@character_set_client;
|
SET @saved_cs_client = @@character_set_client;
|
||||||
SET character_set_client = utf8;
|
SET character_set_client = utf8;
|
||||||
CREATE TABLE `Ubicaciones` (
|
CREATE TABLE `Ubicaciones` (
|
||||||
`id` smallint(5) unsigned NOT NULL auto_increment COMMENT 'ordenable',
|
`id` smallint(5) unsigned NOT NULL auto_increment COMMENT 'ordenable,link/Ubicacion',
|
||||||
`Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,link/Ubicacion',
|
`Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,ajax/text',
|
||||||
`imagen` varchar(45) DEFAULT NULL COMMENT 'imagen',
|
`imagen` varchar(45) DEFAULT NULL COMMENT 'imagen',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=184 DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB AUTO_INCREMENT=184 DEFAULT CHARSET=utf8;
|
||||||
@@ -83,9 +83,9 @@ SET @saved_cs_client = @@character_set_client;
|
|||||||
SET character_set_client = utf8;
|
SET character_set_client = utf8;
|
||||||
CREATE TABLE `Usuarios` (
|
CREATE TABLE `Usuarios` (
|
||||||
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'ordenable',
|
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'ordenable',
|
||||||
`nombre` varchar(16) NOT NULL default '',
|
`nombre` varchar(16) NOT NULL default '' COMMENT 'ajax/text',
|
||||||
`clave` varchar(32) NOT NULL default '',
|
`clave` varchar(32) NOT NULL default '' COMMENT 'ajax/text',
|
||||||
`idSesion` varchar(20) NOT NULL default '',
|
`idSesion` varchar(20) NOT NULL default '' COMMENT 'ajax/text',
|
||||||
`alta` tinyint(1) NOT NULL default '0',
|
`alta` tinyint(1) NOT NULL default '0',
|
||||||
`modificacion` tinyint(1) NOT NULL default '0',
|
`modificacion` tinyint(1) NOT NULL default '0',
|
||||||
`borrado` tinyint(1) NOT NULL default '0',
|
`borrado` tinyint(1) NOT NULL default '0',
|
||||||
|
5
tmp/.gitignore
vendored
Normal file
5
tmp/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# Ignore everything in this directory
|
||||||
|
*
|
||||||
|
# Except this file
|
||||||
|
!.gitignore
|
||||||
|
|
@@ -2,7 +2,11 @@
|
|||||||
<Informe>
|
<Informe>
|
||||||
<Titulo Texto="Informe de Artículos" />
|
<Titulo Texto="Informe de Artículos" />
|
||||||
<Datos>
|
<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>
|
</Datos>
|
||||||
<Pagina Orientacion="P" Formato="A4">
|
<Pagina Orientacion="P" Formato="A4">
|
||||||
<Cabecera>Relación Artículos</Cabecera>
|
<Cabecera>Relación Artículos</Cabecera>
|
||||||
@@ -10,8 +14,9 @@
|
|||||||
<Col Nombre="id" Ancho="10" Ajuste="D" Titulo="id"/>
|
<Col Nombre="id" Ancho="10" Ajuste="D" Titulo="id"/>
|
||||||
<Col Nombre="descripcion" Ancho="70" Ajuste="I" Titulo="Descripción"/>
|
<Col Nombre="descripcion" Ancho="70" Ajuste="I" Titulo="Descripción"/>
|
||||||
<Col Nombre="marca" Ancho="40" Ajuste="I" Titulo="Marca"/>
|
<Col Nombre="marca" Ancho="40" Ajuste="I" Titulo="Marca"/>
|
||||||
<Col Nombre="modelo" Ancho="50" Ajuste="I" Titulo="Modelo"/>
|
<Col Nombre="modelo" Ancho="40" Ajuste="I" Titulo="Modelo"/>
|
||||||
<Col Nombre="cantidad" Ancho="20" Ajuste="D" Titulo="cantidad"/>
|
<Col Nombre="cantidad" Ancho="20" Ajuste="D" Titulo="Cantidad"/>
|
||||||
|
<Col Nombre="Numero" Ancho="15" Ajuste="D" Titulo="NºElem"/>
|
||||||
</Cuerpo>
|
</Cuerpo>
|
||||||
</Pagina>
|
</Pagina>
|
||||||
</Informe>
|
</Informe>
|
||||||
|
@@ -2,13 +2,16 @@
|
|||||||
<Informe>
|
<Informe>
|
||||||
<Titulo Texto="Informe de Ubicaciones" />
|
<Titulo Texto="Informe de Ubicaciones" />
|
||||||
<Datos>
|
<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>
|
</Datos>
|
||||||
<Pagina Orientacion="P" Formato="A4">
|
<Pagina Orientacion="P" Formato="A4">
|
||||||
<Cabecera>Relación de Ubicaciones</Cabecera>
|
<Cabecera>Relación de Ubicaciones</Cabecera>
|
||||||
<Cuerpo>
|
<Cuerpo>
|
||||||
<Col Nombre="id" Ancho="10" Ajuste="D" Titulo="id"/>
|
<Col Nombre="id" Ancho="10" Ajuste="D" Titulo="id"/>
|
||||||
<Col Nombre="Descripcion" Ancho="80" Ajuste="I" Titulo="Descripción"/>
|
<Col Nombre="Descripcion" Ancho="80" Ajuste="I" Titulo="Descripción"/>
|
||||||
|
<Col Nombre="Numero" Ancho="15" Ajuste="D" Titulo="Nº Elem"/>
|
||||||
</Cuerpo>
|
</Cuerpo>
|
||||||
</Pagina>
|
</Pagina>
|
||||||
</Informe>
|
</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>
|
@@ -3,19 +3,21 @@
|
|||||||
<Titulo>Mantenimiento de Elementos</Titulo>
|
<Titulo>Mantenimiento de Elementos</Titulo>
|
||||||
<Consulta>
|
<Consulta>
|
||||||
SELECT SQL_CALC_FOUND_ROWS E.id as id,U.Descripcion as ubicacion,A.Descripcion as articulo,A.Marca as marca,A.Modelo as modelo,E.numserie as numserie,
|
SELECT SQL_CALC_FOUND_ROWS E.id as id,U.Descripcion as ubicacion,A.Descripcion as articulo,A.Marca as marca,A.Modelo as modelo,E.numserie as numserie,
|
||||||
DATE_FORMAT(E.fechacompra, '%d/%m/%Y') as fechaCompra,E.cantidad as cantidad, E.imagen as imagen
|
DATE_FORMAT(E.fechacompra, '%d/%m/%Y') as fechaCompra,E.cantidad as cantidad, E.imagen as imagen, A.id as idArticulos, U.id as idUbicaciones
|
||||||
FROM Elementos E inner join Articulos A on E.id_articulo=A.id inner join
|
FROM Elementos E inner join Articulos A on E.id_articulo=A.id inner join
|
||||||
Ubicaciones U on E.id_ubicacion=U.id {buscar} {orden} limit {inferior},{superior};
|
Ubicaciones U on E.id_ubicacion=U.id {buscar} {orden} limit {inferior},{superior};
|
||||||
</Consulta>
|
</Consulta>
|
||||||
<Campos>
|
<Campos>
|
||||||
<Col Campo="id" Nombre="id" Ancho="5" Ajuste="D" Titulo="id" Tipo="smallint(6)" Varios="ordenable"/>
|
<Col Campo="id" Nombre="id" Ancho="5" Ajuste="D" Titulo="id" Tipo="smallint(6)" Varios="ordenable" Visible="si"/>
|
||||||
<Col Campo="id_Ubicacion" Nombre="ubicacion" Ancho="40" Ajuste="L" Titulo="Ubicación" Varios="ordenable,foreign(Ubicaciones->id;{Descripcion})" Editable="si"/>
|
<Col Campo="id_Ubicacion" Nombre="ubicacion" Ancho="40" Ajuste="L" Titulo="Ubicación" Visible="si" Varios="ordenable,foreign(Ubicaciones->id;{Descripcion}),ajax/select-Ubicaciones" Editable="si"/>
|
||||||
<Col Campo="id_Articulo" Nombre="articulo" Ancho="40" Ajuste="L" Titulo="Artículo" Varios="ordenable,buscable/A.Descripcion,foreign(Articulos->id;{Descripcion/Marca/Modelo})" Editable="si"/>
|
<Col Campo="id_Articulo" Nombre="articulo" Ancho="40" Ajuste="L" Titulo="Artículo" Visible="si" Varios="ordenable,buscable/A.Descripcion,foreign(Articulos->id;{Descripcion/Marca/Modelo}),ajax/select-Articulos" Editable="si"/>
|
||||||
<Col Nombre="marca" Ancho="40" Ajuste="L" Titulo="Marca" Varios="ordenable" Editable="no"/>
|
<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"/>
|
<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" Varios="ordenable" Editable="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" Varios="ordenable" 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)" 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" 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>
|
</Campos>
|
||||||
</Mantenimiento>
|
</Mantenimiento>
|
||||||
|
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>
|
@@ -7,15 +7,15 @@
|
|||||||
</Consulta>
|
</Consulta>
|
||||||
<Campos>
|
<Campos>
|
||||||
<Col Campo="id" Nombre="id" Ancho="5" Ajuste="D" Titulo="id" Tipo="int(6)" Varios="ordenable"/>
|
<Col Campo="id" Nombre="id" Ancho="5" Ajuste="D" Titulo="id" Tipo="int(6)" Varios="ordenable"/>
|
||||||
<Col Campo="nombre" Nombre="nombre" Ancho="8" Ajuste="L" Titulo="Nombre" Varios="ordenable,buscable/nombre" Editable="si"/>
|
<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"/>
|
<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"/>
|
<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="alta" Nombre="alta" Ancho="1" Ajuste="C" Tipo="Boolean" Titulo="Altas" Editable="si"/>
|
||||||
<Col Campo="modificacion" Nombre="modificacion" Ancho="1" Ajuste="R" Tipo="Boolean" Titulo="Modificaciones" 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="R" Tipo="Boolean" Titulo="Borrados" 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="R" Tipo="Boolean" Titulo="Consultas" 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="R" Tipo="Boolean" Titulo="Informes" 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="R" Tipo="Boolean" Titulo="Usuarios" 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="R" Tipo="Boolean" Titulo="Configuración" Editable="si"/>
|
<Col Campo="config" Nombre="config" Ancho="1" Ajuste="C" Tipo="Boolean" Titulo="Configuración" Editable="si"/>
|
||||||
</Campos>
|
</Campos>
|
||||||
</Mantenimiento>
|
</Mantenimiento>
|
||||||
|
Reference in New Issue
Block a user