Modificado AportaContenido para incluir el nombre del centro en la pantalla inicial. Corregido también pequeño error en el Readme para poner las líneas en blanco donde corresponden.

This commit is contained in:
2014-03-05 00:27:32 +01:00
parent e6db3c334b
commit c1b4141606
14 changed files with 186 additions and 840 deletions

View File

@@ -176,7 +176,7 @@ class AportaContenido {
switch ($opcion) {
case 'principal': // contenido inicial
return '<br><br><center><img src="img/logo.png" alt="' . PROGRAMA . '">' .
'<br><label>' . PROGRAMA . '</label></center><br><br>' . PIE;
'<br><label>' . CENTRO . '</label></center><br><br>' . PIE;
case 'articulos':
case 'ubicaciones':
case 'test':
@@ -197,7 +197,7 @@ class AportaContenido {
case 'bienvenido': // El usuario quiere iniciar sesión
return 'Bienvenid@ ' . $this->usuario . '<br><br><center><img src="img/codigoBarras.png" alt="' . PROGRAMA . '">' .
'<br><label>' . PROGRAMA . '</label></center><br><br>' . PIE;
'<br><label>' . CENTRO . '</label></center><br><br>' . PIE;
case 'configuracion':
if ($this->perfil['Config']) {
$conf = new Configuracion();

View File

@@ -1,10 +1,11 @@
# Inventario de Centro Educativo
Copyright (c) 2008-2014, Ricardo Montañana Gómez
Inventario2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
Inventario2 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Aplicación de inventario para un centro educativo.

View File

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

View File

@@ -22,7 +22,7 @@
*/
define('AUTOR','Ricardo Montañana Gómez');
define('SERVIDOR','localhost'); //Ubicación del servidor MySQL
define('BASEDATOS','Inventario2'); //Nombre de la base de datos.
define('BASEDATOS','Inventario3'); //Nombre de la base de datos.
define('USUARIO','test'); //Usuario con permisos de lectura/escritura en la base de datos
define('CLAVE','tset'); //contraseña del usuario.
define('VERSION','1.01b');
@@ -34,7 +34,7 @@ define('PAUSA',2);//Nº segundos de pausa para mostrar mensaje id insertado
define('ESTILO','personal'); //Estilo de los iconos de edición (personal, personal, personal)
define('PLANTILLA','bootstrap'); //Estilo de la plantilla y recursos a utilizar
define('COLORLAT', '#7ae7bf'); //Color de la barra de menú lateral
define('COLORFON', '#a4bdfc'); //Color del fondo de la pantalla
define('MYSQLDUMP', '/usr/local/bin/mysqldumpf'); //camino a mysqldump
define('GZIP', '/usr/bin/gzipfr'); //Camino a gzip
define('COLORFON', '#ff887c'); //Color del fondo de la pantalla
define('MYSQLDUMP', '/usr/local/bin/mysqldump'); //camino a mysqldump
define('GZIP', '/usr/bin/gzip'); //Camino a gzip
?>

View File

@@ -34,7 +34,7 @@ define('PAUSA',2);//Nº segundos de pausa para mostrar mensaje id insertado
define('ESTILO','personal'); //Estilo de los iconos de edición (personal, personal, personal)
define('PLANTILLA','bootstrap'); //Estilo de la plantilla y recursos a utilizar
define('COLORLAT', '#7ae7bf'); //Color de la barra de menú lateral
define('COLORFON', '#a4bdfc'); //Color del fondo de la pantalla
define('COLORFON', '#ffb878'); //Color del fondo de la pantalla
define('MYSQLDUMP', '/usr/local/bin/mysqldump'); //camino a mysqldump
define('GZIP', '/usr/bin/gzip'); //Camino a gzip
?>

View File

@@ -1,49 +0,0 @@
<?php
include('../inc/configuracion.inc');
include('../Sql.php');
$bd = new Sql(SERVIDOR, USUARIO, CLAVE, "Inventario2");
$bda = new Sql(SERVIDOR, USUARIO, CLAVE, "Inventario3");
//Convierte Ubicaciones
echo "Actualizando Ubiaciones";
$comando = "select * from Ubicaciones;";
$bd->ejecuta($comando);
while ($fila = $bd->procesaResultado()) {
//echo $fila['Descripcion'];
//$descripcion = utf8_encode($fila['Descripcion']);
$descripcion = $fila['Descripcion'];
$id = $fila['id'];
$comando = "insert into Ubicaciones (id,Descripcion) values ($id,'$descripcion');";
//echo $comando;
//echo $comando."\n";
$bda->ejecuta($comando);
}
//Convierte Artículos
echo "Actualizando la tabla de Artículos...";
$comando = "select * from Articulos;";
$bd->ejecuta($comando);
while ($fila = $bd->procesaResultado()) {
$id = $fila['id'];
$descripcion = $fila['descripcion'];
$marca = $fila['marca'];
$modelo = $fila['modelo'];
$cantidad = $fila['cantidad'];
$comando = "insert into Articulos (id,Descripcion,Marca,Modelo,Cantidad) values ($id,'$descripcion','$marca','$modelo',$cantidad);";
echo $comando."\n";
$bda->ejecuta($comando);
}
//Convierte Elementos
echo "Actualizando la tabla de Elementos...";
$comando = "select * from Elementos";
$bd->ejecuta($comando);
while ($fila = $bd->procesaResultado()) {
$id = $fila['id'];
$id_articulo = $fila['id_Articulo'];
$id_ubicacion = $fila['id_Ubicacion'];
$numserie = $fila['numserie'];
$cantidad = $fila['cantidad'];
$fechaCompra = $fila['fechaCompra'];
$comando = "insert into Elementos (id,id_Articulo,id_Ubicacion,numserie,cantidad,fechaCompra)
values ($id,$id_articulo,$id_ubicacion,'$numserie',$cantidad,'$fechaCompra');";
$bda->ejecuta($comando);
}

View File

@@ -1,24 +0,0 @@
#!/bin/bash
echo "Proceso de conversión de base de datos de ISO-8859-1 a UTF-8"
echo "Sintaxis: " $0 " {usuario} {contraseña} {BaseDatosOrigen} {BaseDatosDestino}"
echo "El usuario debe tener acceso para crear la base de datos destino y acceso a la base de datos de origen"
echo "La base de datos Destino se borrará. Si no estás seguro pulsa control c"
read k
echo "Volcando la base de datos " $1
mysqldump -u $1 --password=$2 --result-file=salida.sql $3
echo "Creando la base de datos " $4
mysql -u $1 --password=$2 <<EOF
drop database $4 if exists
create database $4 charset utf8 collate utf8_spanish_ci;
EOF
echo "Importando los datos en la base de datos " $4
sed "s/latin1/utf8/g" salida.sql >salida2.sql
iconv -f iso-8859-1 -t utf8 salida2.sql >salida.iconv.sql
mysql -u $1 --password=$2 $4 < salida2.iconv.sql
echo "Re-exportando los datos"
mysqldump -u $1 --password=$2 --result-file=salida-final.sql $4
echo "Re-importando los datos"
mysql -u $1 --password=$2 $4 <salida-final.sql
echo "Limpiando la casa"
rm salida.sql salida2.sql salida.iconv.sql salida-final.sql
echo "Proceso terminado"

View File

@@ -84,7 +84,7 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `Ubicaciones` (
`id` smallint(5) unsigned NOT NULL auto_increment,
`Descripcion` varchar(30) NOT NULL COMMENT 'ordenable,link/Ubicacion',
`Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,link/Ubicacion',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=184 DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;

168
sql/inv-utf.sql Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -28,7 +28,7 @@ CREATE TABLE `Articulos` (
`modelo` varchar(20) default NULL COMMENT 'ordenable',
`cantidad` int(11) default NULL COMMENT 'ordenable',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=785 DEFAULT CHARSET=latin1;
) ENGINE=InnoDB AUTO_INCREMENT=785 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
@@ -52,7 +52,7 @@ CREATE TABLE `Elementos` (
KEY `id_Ubicacion` (`id_Ubicacion`),
CONSTRAINT `Elementos_ibfk_1` FOREIGN KEY (`id_Articulo`) REFERENCES `Articulos` (`id`) ON DELETE CASCADE,
CONSTRAINT `Elementos_ibfk_2` FOREIGN KEY (`id_Ubicacion`) REFERENCES `Ubicaciones` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1884 DEFAULT CHARSET=latin1;
) ENGINE=InnoDB AUTO_INCREMENT=1884 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
@@ -65,9 +65,9 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `Ubicaciones` (
`id` smallint(5) unsigned NOT NULL auto_increment,
`Descripcion` varchar(30) NOT NULL COMMENT 'ordenable,link/Ubicacion',
`Descripcion` varchar(50) NOT NULL COMMENT 'ordenable,link/Ubicacion',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=184 DEFAULT CHARSET=latin1;
) ENGINE=InnoDB AUTO_INCREMENT=184 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
@@ -92,7 +92,7 @@ CREATE TABLE `Usuarios` (
`config` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `nombre` (`nombre`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;
--