summaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2018-02-22 13:08:39 +0000
committerramon <ramongomez@us.es>2018-02-22 13:08:39 +0000
commitf37adcd1c0240361a38438a6349b09e1b81a729a (patch)
tree91a36c35b1efed0e4398049df4bd7dce48b1da0b /admin
parent96f39d04c96256fcb5368bca55d93d504300dd1e (diff)
#730: Integrar versión OpenGnsys 1.1.0 en rama principal.
git-svn-id: https://opengnsys.es/svn/trunk@5606 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin')
-rw-r--r--admin/Database/ogAdmBD-1.0.6a-1.0.6b.sql8
-rw-r--r--admin/Database/ogAdmBD-1.0.6b-1.1.0.sql161
-rw-r--r--admin/Database/ogAdmBD-1.1.0-postinst.sql (renamed from admin/Database/ogAdmBD-1.0.6b-postinst.sql)10
-rw-r--r--admin/Database/ogAdmBD-1.1.0pre-1.1.0.sql270
-rw-r--r--admin/Database/ogAdmBD.sql443
-rwxr-xr-xadmin/Interface/CambiarAcceso8
-rwxr-xr-xadmin/Interface/Configurar4
-rwxr-xr-xadmin/Interface/CrearImagen18
-rwxr-xr-xadmin/Interface/getConfiguration45
-rw-r--r--admin/Sources/Clients/README.es.txt9
-rw-r--r--admin/Sources/Clients/ogAdmClient/Makefile6
-rw-r--r--admin/Sources/Clients/ogAdmClient/sources/ogAdmClient.c92
-rw-r--r--admin/Sources/Clients/ogAdmLnxClient/Makefile34
-rw-r--r--admin/Sources/Clients/ogAdmLnxClient/ogAdmLnxClient.cfg4
-rw-r--r--admin/Sources/Clients/ogAdmLnxClient/sources/ogAdmLnxClient.c499
-rw-r--r--admin/Sources/Clients/ogAdmLnxClient/sources/ogAdmLnxClient.h54
-rw-r--r--admin/Sources/Clients/ogAdmWinClient/Readme25
-rw-r--r--admin/Sources/Clients/ogAdmWinClient/sources/ogAdmWinClient.cpp713
-rw-r--r--admin/Sources/Clients/ogAdmWinClient/sources/ogAdmWinClient.h60
-rw-r--r--admin/Sources/Clients/ogAdmWinClient/sources/servicio.c628
-rw-r--r--admin/Sources/Clients/ogAdmWinClient/sources/servicio.h153
-rw-r--r--admin/Sources/Clients/ogagent/INSTALL.es.txt89
-rw-r--r--admin/Sources/Clients/ogagent/linux/Makefile72
-rwxr-xr-xadmin/Sources/Clients/ogagent/linux/build-packages.sh35
-rw-r--r--admin/Sources/Clients/ogagent/linux/debian/changelog12
-rw-r--r--admin/Sources/Clients/ogagent/linux/debian/compat1
-rw-r--r--admin/Sources/Clients/ogagent/linux/debian/control15
-rw-r--r--admin/Sources/Clients/ogagent/linux/debian/copyright26
-rw-r--r--admin/Sources/Clients/ogagent/linux/debian/docs1
-rw-r--r--admin/Sources/Clients/ogagent/linux/debian/ogagent.init23
-rw-r--r--admin/Sources/Clients/ogagent/linux/debian/ogagent.links2
-rw-r--r--admin/Sources/Clients/ogagent/linux/debian/ogagent.postinst21
-rw-r--r--admin/Sources/Clients/ogagent/linux/debian/ogagent.postinst.debhelper5
-rw-r--r--admin/Sources/Clients/ogagent/linux/debian/ogagent.postrm10
-rw-r--r--admin/Sources/Clients/ogagent/linux/debian/ogagent.postrm.debhelper12
-rw-r--r--admin/Sources/Clients/ogagent/linux/debian/ogagent.substvars2
-rwxr-xr-xadmin/Sources/Clients/ogagent/linux/debian/rules44
-rw-r--r--admin/Sources/Clients/ogagent/linux/debian/source/format1
-rw-r--r--admin/Sources/Clients/ogagent/linux/desktop/OGAgentTool.desktop12
-rw-r--r--admin/Sources/Clients/ogagent/linux/ogagent-template.spec65
-rw-r--r--admin/Sources/Clients/ogagent/linux/policy/org.openuds.pkexec.UDSActorConfig.policy20
-rw-r--r--admin/Sources/Clients/ogagent/linux/readme.txt3
-rw-r--r--admin/Sources/Clients/ogagent/linux/scripts/OGAgentTool6
-rw-r--r--admin/Sources/Clients/ogagent/linux/scripts/OGAgentTool-startup10
-rw-r--r--admin/Sources/Clients/ogagent/linux/scripts/ogagent6
-rwxr-xr-xadmin/Sources/Clients/ogagent/macos/build-pkg.sh87
-rw-r--r--admin/Sources/Clients/ogagent/macos/scripts/es.opengnsys.ogagent.plist15
-rwxr-xr-xadmin/Sources/Clients/ogagent/macos/scripts/ogagent6
-rwxr-xr-xadmin/Sources/Clients/ogagent/macos/scripts/postinstall17
-rw-r--r--admin/Sources/Clients/ogagent/requires.txt3
-rw-r--r--admin/Sources/Clients/ogagent/src/OGAServiceHelper.py57
-rw-r--r--admin/Sources/Clients/ogagent/src/OGAgent.manifest17
-rw-r--r--admin/Sources/Clients/ogagent/src/OGAgent.qrc5
-rw-r--r--admin/Sources/Clients/ogagent/src/OGAgentUser.py358
-rw-r--r--admin/Sources/Clients/ogagent/src/OGAgent_rc.py289
-rw-r--r--admin/Sources/Clients/ogagent/src/VERSION1
-rw-r--r--admin/Sources/Clients/ogagent/src/about-dialog.ui244
-rw-r--r--admin/Sources/Clients/ogagent/src/cfg/ogagent.cfg21
-rw-r--r--admin/Sources/Clients/ogagent/src/cfg/ogclient.cfg11
-rw-r--r--admin/Sources/Clients/ogagent/src/img/oga-48x48.icobin0 -> 9662 bytes
-rw-r--r--admin/Sources/Clients/ogagent/src/img/oga-512.pngbin0 -> 44217 bytes
-rw-r--r--admin/Sources/Clients/ogagent/src/img/oga.icobin0 -> 9662 bytes
-rw-r--r--admin/Sources/Clients/ogagent/src/img/oga.pngbin0 -> 3906 bytes
-rw-r--r--admin/Sources/Clients/ogagent/src/license.txt27
-rw-r--r--admin/Sources/Clients/ogagent/src/message-dialog.ui89
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/RESTApi.py160
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/__init__.py57
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/certs.py101
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/config.py59
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/httpserver.py150
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/ipc.py423
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/linux/OGAgentService.py147
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/linux/__init__.py32
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/linux/daemon.py182
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/linux/log.py80
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/linux/operations.py286
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/linux/renamer/__init__.py61
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/linux/renamer/debian.py68
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/linux/renamer/opensuse.py66
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/linux/renamer/redhat.py74
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/loader.py111
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/log.py103
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/macos/__init__.py32
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/macos/operations.py255
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/modules/__init__.py0
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/modules/client/OpenGnSys/__init__.py63
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/modules/client/__init__.py0
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/modules/server/OpenGnSys/__init__.py250
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/modules/server/__init__.py0
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/operations.py50
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/scriptThread.py51
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/service.py249
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/utils.py72
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/windows/OGAgentService.py124
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/windows/__init__.py39
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/windows/log.py77
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/windows/operations.py261
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/workers/__init__.py2
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/workers/client_worker.py114
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/workers/server_worker.py186
-rw-r--r--admin/Sources/Clients/ogagent/src/prototypes/threaded_server.py170
-rw-r--r--admin/Sources/Clients/ogagent/src/setup.py136
-rw-r--r--admin/Sources/Clients/ogagent/src/test_modules/__init__.py0
-rw-r--r--admin/Sources/Clients/ogagent/src/test_modules/client/Sample1/__init__.py38
-rw-r--r--admin/Sources/Clients/ogagent/src/test_modules/client/__init__.py0
-rw-r--r--admin/Sources/Clients/ogagent/src/test_modules/server/Sample1/__init__.py2
-rw-r--r--admin/Sources/Clients/ogagent/src/test_modules/server/Sample1/sample1.py40
-rw-r--r--admin/Sources/Clients/ogagent/src/test_modules/server/Sample1/sample_pkg/__init__.py36
-rw-r--r--admin/Sources/Clients/ogagent/src/test_modules/server/__init__.py0
-rw-r--r--admin/Sources/Clients/ogagent/src/test_rest_server.py210
-rwxr-xr-xadmin/Sources/Clients/ogagent/src/update.sh41
-rwxr-xr-xadmin/Sources/Clients/ogagent/windows/build-windows.sh5
-rw-r--r--admin/Sources/Clients/ogagent/windows/build.bat6
-rw-r--r--admin/Sources/Clients/ogagent/windows/ogagent.nsi192
-rwxr-xr-xadmin/Sources/Clients/ogagent/windows/py2exe-wine-linux.sh71
-rw-r--r--admin/Sources/Includes/Database.cpp5
-rw-r--r--admin/Sources/Includes/Database.h1
-rw-r--r--admin/Sources/Services/ogAdmAgent/sources/ogAdmAgent.h2
-rw-r--r--admin/Sources/Services/ogAdmRepo/ogAdmRepo.cfg1
-rw-r--r--admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp162
-rw-r--r--admin/Sources/Services/ogAdmServer/sources/ogAdmServer.h2
-rwxr-xr-xadmin/Sources/Services/ogAdmServerAux7
-rw-r--r--admin/Sources/Services/opengnsys.default4
-rwxr-xr-xadmin/Sources/Services/opengnsys.init8
-rw-r--r--admin/WebConsole/asistentes/AsistenteCloneRemotePartition.php12
-rw-r--r--admin/WebConsole/asistentes/AsistenteDeployImage.php11
-rw-r--r--admin/WebConsole/asistentes/AsistenteParticionado.php10
-rw-r--r--admin/WebConsole/asistentes/AsistenteUpdateCache.php10
-rw-r--r--admin/WebConsole/asistentes/gestores/gestor_Comandos.php5
-rw-r--r--admin/WebConsole/asistentes/includes/asistentes/AyudanteFormularios.php915
-rw-r--r--admin/WebConsole/asistentes/includes/asistentes/formCloneRemotePartition.php14
-rw-r--r--admin/WebConsole/asistentes/includes/asistentes/formDeployImage.php19
-rw-r--r--admin/WebConsole/asistentes/includes/asistentes/formParticionado_gpt.php7
-rw-r--r--admin/WebConsole/asistentes/includes/asistentes/formParticionado_msdos.php3
-rw-r--r--admin/WebConsole/asistentes/includes/capturaacciones.php2
-rw-r--r--admin/WebConsole/asistentes/includes/formularioacciones.php18
-rw-r--r--admin/WebConsole/asistentes/includes/opcionesacciones.php38
-rw-r--r--admin/WebConsole/asistentes/jscripts/EjecutarScripts.js2
-rw-r--r--admin/WebConsole/asistentes/jscripts/asistentes.js199
-rw-r--r--admin/WebConsole/asistentes/xajax.server.php4
-rw-r--r--admin/WebConsole/barramenu.php38
-rw-r--r--admin/WebConsole/clases/AdoPhp.php13
-rw-r--r--admin/WebConsole/clases/ArbolVistaXML.php2
-rw-r--r--admin/WebConsole/clases/XmlPhp.php2
-rw-r--r--admin/WebConsole/comandos/Apagar.php6
-rw-r--r--admin/WebConsole/comandos/Arrancar.php4
-rw-r--r--admin/WebConsole/comandos/Comando.php6
-rw-r--r--admin/WebConsole/comandos/Configurar.php37
-rw-r--r--admin/WebConsole/comandos/CrearImagen.php58
-rw-r--r--admin/WebConsole/comandos/CrearImagenBasica.php28
-rw-r--r--admin/WebConsole/comandos/CrearSoftIncremental.php34
-rw-r--r--admin/WebConsole/comandos/EjecutarScripts.php21
-rw-r--r--admin/WebConsole/comandos/EliminarImagenCache.php68
-rw-r--r--admin/WebConsole/comandos/EliminarImagenRepositorio.php402
-rw-r--r--admin/WebConsole/comandos/EnviarMensaje.php97
-rw-r--r--admin/WebConsole/comandos/IniciarSesion.php8
-rw-r--r--admin/WebConsole/comandos/InventarioHardware.php6
-rw-r--r--admin/WebConsole/comandos/InventarioSoftware.php10
-rw-r--r--admin/WebConsole/comandos/Reiniciar.php6
-rw-r--r--admin/WebConsole/comandos/RestaurarImagen.php65
-rw-r--r--admin/WebConsole/comandos/RestaurarImagenBasica.php43
-rw-r--r--admin/WebConsole/comandos/RestaurarSoftIncremental.php41
-rw-r--r--admin/WebConsole/comandos/gestores/gestor_Comandos.php120
-rw-r--r--admin/WebConsole/comandos/gestores/wakeonlan_repo.php85
-rw-r--r--admin/WebConsole/comandos/includes/FiltradoAmbito.php126
-rw-r--r--admin/WebConsole/comandos/includes/capturaacciones.php2
-rw-r--r--admin/WebConsole/comandos/includes/formularioacciones.php18
-rw-r--r--admin/WebConsole/comandos/includes/opcionesacciones.php40
-rw-r--r--admin/WebConsole/comandos/jscripts/Configurar.js35
-rw-r--r--admin/WebConsole/comandos/jscripts/CrearImagen.js6
-rw-r--r--admin/WebConsole/comandos/jscripts/EjecutarScripts.js6
-rw-r--r--admin/WebConsole/comandos/jscripts/EnviarMensaje.js49
-rw-r--r--admin/WebConsole/comandos/jscripts/RestaurarImagen.js40
-rw-r--r--admin/WebConsole/controlacceso.php1
-rw-r--r--admin/WebConsole/controlpostacceso.php6
-rw-r--r--admin/WebConsole/descargas/README.es.html85
-rw-r--r--admin/WebConsole/descargas/index.php68
-rw-r--r--admin/WebConsole/estilos.css12
-rw-r--r--admin/WebConsole/gestores/gestor_accionmenu.php2
-rw-r--r--admin/WebConsole/gestores/gestor_administradores_centros.php2
-rw-r--r--admin/WebConsole/gestores/gestor_administradores_usuarios.php2
-rw-r--r--admin/WebConsole/gestores/gestor_aulas.php40
-rw-r--r--admin/WebConsole/gestores/gestor_centros.php13
-rw-r--r--admin/WebConsole/gestores/gestor_componentehardwares.php2
-rw-r--r--admin/WebConsole/gestores/gestor_componentesoftwares.php2
-rw-r--r--admin/WebConsole/gestores/gestor_entidades.php10
-rw-r--r--admin/WebConsole/gestores/gestor_entornos.php8
-rw-r--r--admin/WebConsole/gestores/gestor_gruposordenadores.php6
-rw-r--r--admin/WebConsole/gestores/gestor_imagenes.php25
-rw-r--r--admin/WebConsole/gestores/gestor_inclusionacciones.php2
-rw-r--r--admin/WebConsole/gestores/gestor_ordenadores.php99
-rw-r--r--admin/WebConsole/gestores/gestor_ordenadorestandar.php6
-rw-r--r--admin/WebConsole/gestores/gestor_perfilcomponente_hard.php2
-rw-r--r--admin/WebConsole/gestores/gestor_perfilcomponente_soft.php2
-rw-r--r--admin/WebConsole/gestores/gestor_perfilsoftwares.php2
-rw-r--r--admin/WebConsole/gestores/gestor_procedimientos.php2
-rw-r--r--admin/WebConsole/gestores/gestor_procedimientoscomandos.php2
-rw-r--r--admin/WebConsole/gestores/gestor_programaciones.php2
-rw-r--r--admin/WebConsole/gestores/gestor_repositorios.php14
-rw-r--r--admin/WebConsole/gestores/gestor_reservas.php2
-rw-r--r--admin/WebConsole/gestores/gestor_tareas.php2
-rw-r--r--admin/WebConsole/gestores/gestor_tareascomandos.php2
-rw-r--r--admin/WebConsole/gestores/gestor_tipohardwares.php2
-rw-r--r--admin/WebConsole/gestores/gestor_universidades.php6
-rw-r--r--admin/WebConsole/gestores/gestor_usuarios.php17
-rw-r--r--admin/WebConsole/gestores/relaciones/aulas_eliminacion.php2
-rw-r--r--admin/WebConsole/gestores/relaciones/centros_eliminacion.php2
-rw-r--r--admin/WebConsole/gestores/relaciones/entidades_eliminacion.php2
-rw-r--r--admin/WebConsole/gestores/relaciones/gruposordenadores_eliminacion.php2
-rw-r--r--admin/WebConsole/gestores/relaciones/hardwares_eliminacion.php2
-rw-r--r--admin/WebConsole/gestores/relaciones/imagenes_eliminacion.php2
-rw-r--r--admin/WebConsole/gestores/relaciones/incrementales_eliminacion.php2
-rw-r--r--admin/WebConsole/gestores/relaciones/menus_eliminacion.php2
-rw-r--r--admin/WebConsole/gestores/relaciones/perfileshard_eliminacion.php2
-rw-r--r--admin/WebConsole/gestores/relaciones/perfilessoft_eliminacion.php2
-rw-r--r--admin/WebConsole/gestores/relaciones/procedimientos_eliminacion.php2
-rw-r--r--admin/WebConsole/gestores/relaciones/repositorios_eliminacion.php2
-rw-r--r--admin/WebConsole/gestores/relaciones/reservas_eliminacion.php2
-rw-r--r--admin/WebConsole/gestores/relaciones/softwares_eliminacion.php2
-rw-r--r--admin/WebConsole/gestores/relaciones/tareas_eliminacion.php2
-rw-r--r--admin/WebConsole/gestores/relaciones/trabajos_eliminacion.php2
-rw-r--r--admin/WebConsole/gestores/relaciones/usuarios_eliminacion.php2
-rw-r--r--admin/WebConsole/idiomas/javascripts/cat/asistentes_cat.js10
-rw-r--r--admin/WebConsole/idiomas/javascripts/cat/comandos/comunescomandos_cat.js1
-rw-r--r--admin/WebConsole/idiomas/javascripts/cat/comandos/configurar_cat.js3
-rw-r--r--admin/WebConsole/idiomas/javascripts/cat/comandos/enviarmensaje_cat.js9
-rw-r--r--admin/WebConsole/idiomas/javascripts/cat/comandos/restaurarimagen_cat.js3
-rw-r--r--admin/WebConsole/idiomas/javascripts/cat/propiedades_aulas_cat.js3
-rw-r--r--admin/WebConsole/idiomas/javascripts/cat/propiedades_centros_cat.js7
-rw-r--r--admin/WebConsole/idiomas/javascripts/cat/propiedades_entidades_cat.js5
-rw-r--r--admin/WebConsole/idiomas/javascripts/cat/propiedades_ordenadores_cat.js4
-rw-r--r--admin/WebConsole/idiomas/javascripts/cat/propiedades_usuarios_cat.js3
-rw-r--r--admin/WebConsole/idiomas/javascripts/eng/asistentes_eng.js10
-rw-r--r--admin/WebConsole/idiomas/javascripts/eng/comandos/comunescomandos_eng.js1
-rw-r--r--admin/WebConsole/idiomas/javascripts/eng/comandos/configurar_eng.js3
-rw-r--r--admin/WebConsole/idiomas/javascripts/eng/comandos/enviarmensaje_eng.js9
-rw-r--r--admin/WebConsole/idiomas/javascripts/eng/comandos/restaurarimagen_eng.js9
-rw-r--r--admin/WebConsole/idiomas/javascripts/eng/propiedades_aulas_eng.js3
-rw-r--r--admin/WebConsole/idiomas/javascripts/eng/propiedades_centros_eng.js6
-rw-r--r--admin/WebConsole/idiomas/javascripts/eng/propiedades_entidades_eng.js5
-rw-r--r--admin/WebConsole/idiomas/javascripts/eng/propiedades_ordenadores_eng.js6
-rw-r--r--admin/WebConsole/idiomas/javascripts/eng/propiedades_usuarios_eng.js2
-rw-r--r--admin/WebConsole/idiomas/javascripts/esp/asistentes_esp.js10
-rw-r--r--admin/WebConsole/idiomas/javascripts/esp/comandos/comunescomandos_esp.js1
-rw-r--r--admin/WebConsole/idiomas/javascripts/esp/comandos/configurar_esp.js2
-rw-r--r--admin/WebConsole/idiomas/javascripts/esp/comandos/enviarmensaje_esp.js9
-rw-r--r--admin/WebConsole/idiomas/javascripts/esp/comandos/restaurarimagen_esp.js8
-rw-r--r--admin/WebConsole/idiomas/javascripts/esp/propiedades_aulas_esp.js3
-rw-r--r--admin/WebConsole/idiomas/javascripts/esp/propiedades_centros_esp.js5
-rw-r--r--admin/WebConsole/idiomas/javascripts/esp/propiedades_entidades_esp.js5
-rw-r--r--admin/WebConsole/idiomas/javascripts/esp/propiedades_ordenadores_esp.js4
-rw-r--r--admin/WebConsole/idiomas/javascripts/esp/propiedades_usuarios_esp.js3
-rw-r--r--admin/WebConsole/idiomas/php/cat/acceso_cat.php4
-rw-r--r--admin/WebConsole/idiomas/php/cat/acciones_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/accionmenu_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/acercade_cat.php6
-rw-r--r--admin/WebConsole/idiomas/php/cat/actualizar_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/administracion_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/administradores_centros_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/administradores_usuarios_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/aulas_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/avisos_cat.php5
-rw-r--r--admin/WebConsole/idiomas/php/cat/barramenu_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/boot_grub4dos_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/buscar_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/clases/Almanaque_cat.php28
-rw-r--r--admin/WebConsole/idiomas/php/cat/clases/Calendario_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/colasacciones_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/colasreservas_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/apagar_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/arrancar_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/comando_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/configurar_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/conmutar_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/crearimagen_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/crearimagenbasica_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/crearperfilsoftware_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/crearsoftincremental_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/ejecutarscripts_cat.php7
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/eliminarimagencache_cat.php10
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/eliminarimagenrepo_cat.php5
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/enviarmensaje_cat.php23
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/gestor_ejecutarscripts_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/mensajes_cat.php1
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/opcionesacciones_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/particionaryformatear_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/reiniciar_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/rembooffline_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/restaurarimagen_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/restaurarimagenbasica_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/restaurarsoftincremental_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/comandos/tomaconfiguracion_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/configuraciones_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/conmutar_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/consolaremota_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/descargas_cat.php13
-rw-r--r--admin/WebConsole/idiomas/php/cat/ecoremoto_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/ejecutaracciones_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/estados_cat.php7
-rw-r--r--admin/WebConsole/idiomas/php/cat/gestor_ordenadores_cat.php10
-rw-r--r--admin/WebConsole/idiomas/php/cat/hardwares_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/iconos_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/imagenes_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/imagenincremental_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/inclusionacciones_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/incrementalcomponente_soft_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/informacion_acciones_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/informacion_imagenes_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/informacion_incrementales_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/informacion_menus_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/informacion_perfileshard_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/informacion_perfilessoft_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/informacion_procedimientos_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/informacion_tareas_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/menucliente_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/menus_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/msgbrowser_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/nada_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/perfilcomponente_hard_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/perfilcomponente_soft_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/pintaParticiones_cat.php11
-rw-r--r--admin/WebConsole/idiomas/php/cat/procedimientoscomandos_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/programaciones_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/programacionesaulas_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/programacionesreservas_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/propiedades_aulas_cat.php16
-rw-r--r--admin/WebConsole/idiomas/php/cat/propiedades_centros_cat.php6
-rw-r--r--admin/WebConsole/idiomas/php/cat/propiedades_componentehardwares_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/propiedades_componentesoftwares_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/propiedades_entidades_cat.php5
-rw-r--r--admin/WebConsole/idiomas/php/cat/propiedades_entornos_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/propiedades_grupos_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/propiedades_imagenes_cat.php9
-rw-r--r--admin/WebConsole/idiomas/php/cat/propiedades_menus_cat.php1
-rw-r--r--admin/WebConsole/idiomas/php/cat/propiedades_ordenadores_cat.php26
-rw-r--r--admin/WebConsole/idiomas/php/cat/propiedades_ordenadorestandar_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/propiedades_perfilsoftwares_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/propiedades_procedimientos_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/propiedades_repositorios_cat.php13
-rw-r--r--admin/WebConsole/idiomas/php/cat/propiedades_reservas_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/propiedades_tareas_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/propiedades_tipohardwares_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/propiedades_universidades_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/propiedades_usuarios_cat.php14
-rw-r--r--admin/WebConsole/idiomas/php/cat/purgar_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/repositorios_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/reservas_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/softwares_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/sondeo_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/tareascomandos_cat.php2
-rw-r--r--admin/WebConsole/idiomas/php/cat/tiposhardwares_cat.php27
-rw-r--r--admin/WebConsole/idiomas/php/eng/acceso_eng.php4
-rw-r--r--admin/WebConsole/idiomas/php/eng/acciones_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/accionmenu_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/acercade_eng.php6
-rw-r--r--admin/WebConsole/idiomas/php/eng/actualizar_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/administracion_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/administradores_centros_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/administradores_usuarios_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/aulas_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/avisos_eng.php9
-rw-r--r--admin/WebConsole/idiomas/php/eng/barramenu_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/boot_grub4dos_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/buscar_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/clases/Almanaque_eng.php28
-rw-r--r--admin/WebConsole/idiomas/php/eng/clases/Calendario_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/colasacciones_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/colasreservas_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/apagar_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/arrancar_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/configurar_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/conmutar_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/crearimagen_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/crearimagenbasica_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/crearperfilsoftware_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/crearsoftincremental_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/ejecutarscripts_eng.php9
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/eliminarimagencache_eng.php12
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/eliminarimagenrepo_eng.php5
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/enviarmensaje_eng.php24
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/gestor_ejecutarscripts_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/mensajes_eng.php1
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/opcionesacciones_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/particionaryformatear_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/reiniciar_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/rembooffline_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/restaurarimagen_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/restaurarimagenbasica_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/restaurarsoftincremental_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/comandos/tomaconfiguracion_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/configuraciones_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/conmutar_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/consolaremota_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/descargas_eng.php12
-rw-r--r--admin/WebConsole/idiomas/php/eng/ecoremoto_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/ejecutaracciones_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/estados_eng.php7
-rw-r--r--admin/WebConsole/idiomas/php/eng/gestor_ordenadores_eng.php10
-rw-r--r--admin/WebConsole/idiomas/php/eng/hardwares_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/iconos_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/imagenes_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/imagenincremental_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/inclusionacciones_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/incrementalcomponente_soft_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/informacion_acciones_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/informacion_imagenes_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/informacion_incrementales_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/informacion_menus_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/informacion_perfileshard_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/informacion_perfilessoft_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/informacion_procedimientos_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/informacion_repositorio_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/informacion_tareas_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/menucliente_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/menus_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/msgbrowser_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/nada_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/perfilcomponente_hard_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/perfilcomponente_soft_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/pintaParticiones_eng.php49
-rw-r--r--admin/WebConsole/idiomas/php/eng/procedimientoscomandos_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/programaciones_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/programacionesaulas_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/programacionesreservas_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/propiedades_aulas_eng.php26
-rw-r--r--admin/WebConsole/idiomas/php/eng/propiedades_centros_eng.php4
-rw-r--r--admin/WebConsole/idiomas/php/eng/propiedades_componentehardwares_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/propiedades_componentesoftwares_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/propiedades_entidades_eng.php3
-rw-r--r--admin/WebConsole/idiomas/php/eng/propiedades_entornos_eng.php6
-rw-r--r--admin/WebConsole/idiomas/php/eng/propiedades_grupos_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/propiedades_imagenes_eng.php9
-rw-r--r--admin/WebConsole/idiomas/php/eng/propiedades_menus_eng.php1
-rw-r--r--admin/WebConsole/idiomas/php/eng/propiedades_ordenadores_eng.php9
-rw-r--r--admin/WebConsole/idiomas/php/eng/propiedades_ordenadorestandar_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/propiedades_perfilsoftwares_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/propiedades_procedimientos_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/propiedades_repositorios_eng.php13
-rw-r--r--admin/WebConsole/idiomas/php/eng/propiedades_reservas_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/propiedades_tareas_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/propiedades_tipohardwares_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/propiedades_universidades_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/propiedades_usuarios_eng.php10
-rw-r--r--admin/WebConsole/idiomas/php/eng/purgar_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/repositorios_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/reservas_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/softwares_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/sondeo_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/tareascomandos_eng.php2
-rw-r--r--admin/WebConsole/idiomas/php/eng/tiposhardwares_eng.php5
-rw-r--r--admin/WebConsole/idiomas/php/esp/acceso_esp.php4
-rw-r--r--admin/WebConsole/idiomas/php/esp/acciones_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/accionmenu_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/acercade_esp.php6
-rw-r--r--admin/WebConsole/idiomas/php/esp/actualizar_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/administracion_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/administradores_centros_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/administradores_usuarios_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/aulas_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/avisos_esp.php3
-rw-r--r--admin/WebConsole/idiomas/php/esp/barramenu_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/boot_grub4dos_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/buscar_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/clases/Almanaque_esp.php34
-rw-r--r--admin/WebConsole/idiomas/php/esp/clases/Calendario_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/colasacciones_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/colasreservas_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/apagar_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/arrancar_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/comando_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/configurar_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/conmutar_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/crearimagen_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/crearimagenbasica_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/crearperfilsoftware_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/crearsoftincremental_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/ejecutarscripts_esp.php7
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/eliminarimagencache_esp.php10
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/eliminarimagenrepo_esp.php3
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/enviarmensaje_esp.php24
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/gestor_ejecutarscripts_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/mensajes_esp.php8
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/opcionesacciones_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/particionaryformatear_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/reiniciar_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/rembooffline_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/restaurarimagen_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/restaurarimagenbasica_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/restaurarsoftincremental_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/comandos/tomaconfiguracion_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/configuraciones_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/conmutar_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/consolaremota_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/descargas_esp.php13
-rw-r--r--admin/WebConsole/idiomas/php/esp/ecoremoto_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/ejecutaracciones_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/estados_esp.php7
-rw-r--r--admin/WebConsole/idiomas/php/esp/gestor_ordenadores_esp.php10
-rw-r--r--admin/WebConsole/idiomas/php/esp/hardwares_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/iconos_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/imagenes_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/imagenincremental_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/inclusionacciones_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/incrementalcomponente_soft_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/informacion_acciones_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/informacion_imagenes_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/informacion_incrementales_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/informacion_menus_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/informacion_perfileshard_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/informacion_perfilessoft_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/informacion_procedimientos_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/informacion_tareas_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/menucliente_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/menus_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/msgbrowser_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/nada_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/perfilcomponente_hard_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/perfilcomponente_soft_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/pintaParticiones_esp.php11
-rw-r--r--admin/WebConsole/idiomas/php/esp/procedimientoscomandos_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/programaciones_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/programacionesaulas_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/programacionesreservas_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/propiedades_aulas_esp.php16
-rw-r--r--admin/WebConsole/idiomas/php/esp/propiedades_centros_esp.php5
-rw-r--r--admin/WebConsole/idiomas/php/esp/propiedades_componentehardwares_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/propiedades_componentesoftwares_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/propiedades_entidades_esp.php4
-rw-r--r--admin/WebConsole/idiomas/php/esp/propiedades_entornos_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/propiedades_grupos_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/propiedades_imagenes_esp.php29
-rw-r--r--admin/WebConsole/idiomas/php/esp/propiedades_menus_esp.php3
-rw-r--r--admin/WebConsole/idiomas/php/esp/propiedades_ordenadores_esp.php8
-rw-r--r--admin/WebConsole/idiomas/php/esp/propiedades_ordenadorestandar_esp.php4
-rw-r--r--admin/WebConsole/idiomas/php/esp/propiedades_perfilsoftwares_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/propiedades_procedimientos_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/propiedades_repositorios_esp.php13
-rw-r--r--admin/WebConsole/idiomas/php/esp/propiedades_reservas_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/propiedades_tareas_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/propiedades_tipohardwares_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/propiedades_universidades_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/propiedades_usuarios_esp.php11
-rw-r--r--admin/WebConsole/idiomas/php/esp/purgar_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/repositorios_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/reservas_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/softwares_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/sondeo_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/tareascomandos_esp.php2
-rw-r--r--admin/WebConsole/idiomas/php/esp/tiposhardwares_esp.php5
-rw-r--r--admin/WebConsole/images/L_Iconos.php36
-rw-r--r--admin/WebConsole/images/M_Iconos.php66
-rw-r--r--admin/WebConsole/images/iconos/almacenamiento.pngbin0 -> 448 bytes
-rw-r--r--admin/WebConsole/images/iconos/arranque.pngbin0 -> 532 bytes
-rw-r--r--admin/WebConsole/images/ordenador_BSY.gifbin811 -> 0 bytes
-rw-r--r--admin/WebConsole/images/ordenador_BSY.pngbin0 -> 762 bytes
-rw-r--r--admin/WebConsole/images/ordenador_INI.gifbin1117 -> 0 bytes
-rw-r--r--admin/WebConsole/images/ordenador_INI.pngbin0 -> 1065 bytes
-rw-r--r--admin/WebConsole/images/ordenador_LNX.gifbin801 -> 0 bytes
-rw-r--r--admin/WebConsole/images/ordenador_LNX.pngbin0 -> 746 bytes
-rw-r--r--admin/WebConsole/images/ordenador_LNXS.pngbin0 -> 729 bytes
-rw-r--r--admin/WebConsole/images/ordenador_OFF.gifbin810 -> 0 bytes
-rw-r--r--admin/WebConsole/images/ordenador_OFF.pngbin0 -> 778 bytes
-rw-r--r--admin/WebConsole/images/ordenador_OPG.gifbin1060 -> 0 bytes
-rw-r--r--admin/WebConsole/images/ordenador_OPG.pngbin0 -> 756 bytes
-rw-r--r--admin/WebConsole/images/ordenador_OSX.pngbin0 -> 901 bytes
-rw-r--r--admin/WebConsole/images/ordenador_W2K.gifbin804 -> 0 bytes
-rw-r--r--admin/WebConsole/images/ordenador_W95.gifbin798 -> 0 bytes
-rw-r--r--admin/WebConsole/images/ordenador_W98.gifbin808 -> 0 bytes
-rw-r--r--admin/WebConsole/images/ordenador_WIN.pngbin0 -> 747 bytes
-rw-r--r--admin/WebConsole/images/ordenador_WINS.pngbin0 -> 733 bytes
-rw-r--r--admin/WebConsole/images/ordenador_WML.gifbin804 -> 0 bytes
-rw-r--r--admin/WebConsole/images/ordenador_WXP.gifbin801 -> 0 bytes
-rw-r--r--admin/WebConsole/images/ver.php2
-rw-r--r--admin/WebConsole/includes/ConfiguracionesParticiones.php161
-rw-r--r--admin/WebConsole/includes/CreaComando.php2
-rw-r--r--admin/WebConsole/includes/CreaTablaParametros.php2
-rw-r--r--admin/WebConsole/includes/HTMLCTEMULSELECT.php2
-rw-r--r--admin/WebConsole/includes/HTMLMULSELECT.php2
-rw-r--r--admin/WebConsole/includes/HTMLSELECT.php2
-rw-r--r--admin/WebConsole/includes/InvFecha.php6
-rw-r--r--admin/WebConsole/includes/RecopilaIpesMacs.php25
-rw-r--r--admin/WebConsole/includes/RedireccionaError.php2
-rw-r--r--admin/WebConsole/includes/TomaDato.php2
-rw-r--r--admin/WebConsole/includes/TomanDatos.php2
-rw-r--r--admin/WebConsole/includes/comunes.php20
-rw-r--r--admin/WebConsole/includes/cuestionacciones.php2
-rw-r--r--admin/WebConsole/includes/cuestionaccionescab.php2
-rw-r--r--admin/WebConsole/includes/opciones.php2
-rw-r--r--admin/WebConsole/includes/opcionesbotones.php4
-rw-r--r--admin/WebConsole/includes/opcionesbotonesop.php2
-rw-r--r--admin/WebConsole/includes/opcionesprotocolos.php22
-rw-r--r--admin/WebConsole/includes/pintaParticiones.php103
-rw-r--r--admin/WebConsole/includes/pintaTablaConfiguraciones.php13
-rw-r--r--admin/WebConsole/includes/restfunctions.php72
-rw-r--r--admin/WebConsole/includes/tftputils.php100
-rw-r--r--admin/WebConsole/index.php24
-rw-r--r--admin/WebConsole/jscripts/aula.js39
-rw-r--r--admin/WebConsole/jscripts/aulas.js5
-rw-r--r--admin/WebConsole/jscripts/comunes.js1
-rw-r--r--admin/WebConsole/jscripts/propiedades_aulas.js1
-rw-r--r--admin/WebConsole/jscripts/propiedades_centros.js18
-rw-r--r--admin/WebConsole/jscripts/propiedades_entidades.js24
-rw-r--r--admin/WebConsole/jscripts/propiedades_imagenes.js1
-rw-r--r--admin/WebConsole/jscripts/propiedades_ordenadores.js4
-rw-r--r--admin/WebConsole/jscripts/propiedades_usuarios.js10
-rw-r--r--admin/WebConsole/jscripts/validators.js3
-rw-r--r--admin/WebConsole/menus/examplemenu.php (renamed from admin/WebConsole/menus/examplemenu.html)39
-rw-r--r--admin/WebConsole/menus/menuejemplo.php (renamed from admin/WebConsole/menus/menuejemplo.html)18
-rw-r--r--admin/WebConsole/menus/privatemenu.php46
-rw-r--r--admin/WebConsole/pagerror.php4
-rw-r--r--admin/WebConsole/principal/acciones.php10
-rw-r--r--admin/WebConsole/principal/acercade.php19
-rw-r--r--admin/WebConsole/principal/actualizar.php2
-rw-r--r--admin/WebConsole/principal/administracion.php11
-rw-r--r--admin/WebConsole/principal/aula.php34
-rw-r--r--admin/WebConsole/principal/aulas.php32
-rw-r--r--admin/WebConsole/principal/boot_grub4dos.php10
-rw-r--r--admin/WebConsole/principal/boot_grub4dos_crear.php126
-rw-r--r--admin/WebConsole/principal/boot_grub4dos_tabla.php30
-rw-r--r--admin/WebConsole/principal/boot_pxelinux.php217
-rw-r--r--admin/WebConsole/principal/colasacciones.php48
-rw-r--r--admin/WebConsole/principal/colasreservas.php10
-rw-r--r--admin/WebConsole/principal/comandos.php16
-rw-r--r--admin/WebConsole/principal/configuraciones.php78
-rw-r--r--admin/WebConsole/principal/consolaremota.php24
-rw-r--r--admin/WebConsole/principal/ecoconsola.php2
-rw-r--r--admin/WebConsole/principal/ecoremoto.php20
-rw-r--r--admin/WebConsole/principal/hardwares.php10
-rw-r--r--admin/WebConsole/principal/imagenes.php18
-rw-r--r--admin/WebConsole/principal/menus.php10
-rw-r--r--admin/WebConsole/principal/programacionesaulas.php10
-rw-r--r--admin/WebConsole/principal/programacionesreservas.php10
-rw-r--r--admin/WebConsole/principal/purgar.php2
-rw-r--r--admin/WebConsole/principal/repositorios.php8
-rw-r--r--admin/WebConsole/principal/reservas.php10
-rw-r--r--admin/WebConsole/principal/shellconsola.php2
-rw-r--r--admin/WebConsole/principal/softwares.php10
-rw-r--r--admin/WebConsole/principal/sondeo.php32
-rw-r--r--admin/WebConsole/principal/verlog.php6
-rw-r--r--admin/WebConsole/principal/verlogseguimiento.php6
-rw-r--r--admin/WebConsole/propiedades/propiedades_aulas.php254
-rw-r--r--admin/WebConsole/propiedades/propiedades_centros.php60
-rw-r--r--admin/WebConsole/propiedades/propiedades_componentehardwares.php26
-rw-r--r--admin/WebConsole/propiedades/propiedades_componentesoftwares.php32
-rw-r--r--admin/WebConsole/propiedades/propiedades_entidades.php57
-rw-r--r--admin/WebConsole/propiedades/propiedades_entornos.php28
-rw-r--r--admin/WebConsole/propiedades/propiedades_grupos.php24
-rw-r--r--admin/WebConsole/propiedades/propiedades_imagenes.php314
-rw-r--r--admin/WebConsole/propiedades/propiedades_menus.php47
-rw-r--r--admin/WebConsole/propiedades/propiedades_ordenadores.php100
-rw-r--r--admin/WebConsole/propiedades/propiedades_ordenadorestandar.php44
-rw-r--r--admin/WebConsole/propiedades/propiedades_perfilhardwares.php36
-rw-r--r--admin/WebConsole/propiedades/propiedades_perfilsoftwares.php30
-rw-r--r--admin/WebConsole/propiedades/propiedades_procedimientos.php26
-rw-r--r--admin/WebConsole/propiedades/propiedades_repositorios.php191
-rw-r--r--admin/WebConsole/propiedades/propiedades_reservas.php62
-rw-r--r--admin/WebConsole/propiedades/propiedades_tareas.php36
-rw-r--r--admin/WebConsole/propiedades/propiedades_tipohardwares.php26
-rw-r--r--admin/WebConsole/propiedades/propiedades_universidades.php24
-rw-r--r--admin/WebConsole/propiedades/propiedades_usuarios.php126
-rw-r--r--admin/WebConsole/rest/common.php292
-rw-r--r--admin/WebConsole/rest/index.php75
-rw-r--r--admin/WebConsole/rest/ogagent.php272
-rw-r--r--admin/WebConsole/rest/opengnsys-api.yml1300
-rw-r--r--admin/WebConsole/rest/remotepc.php553
-rw-r--r--admin/WebConsole/rest/repository.php215
-rw-r--r--admin/WebConsole/rest/server.php1041
-rw-r--r--admin/WebConsole/validacion/html/close.php2
-rw-r--r--admin/WebConsole/validacion/html/login_prueba.php4
-rw-r--r--admin/WebConsole/validacion/html/validacion_ldap.php2
-rw-r--r--admin/WebConsole/validacion/html/validacion_prueba.php2
-rw-r--r--admin/WebConsole/validacion/html/validacion_template.php2
-rw-r--r--admin/WebConsole/varios/acceso_operador.php4
-rw-r--r--admin/WebConsole/varios/accesoperadores.php4
-rw-r--r--admin/WebConsole/varios/accionmenu.php28
-rw-r--r--admin/WebConsole/varios/administradores_centros.php14
-rw-r--r--admin/WebConsole/varios/administradores_usuarios.php14
-rw-r--r--admin/WebConsole/varios/calendario_ventana.php10
-rw-r--r--admin/WebConsole/varios/consulta_programaciones.php2
-rw-r--r--admin/WebConsole/varios/desplegablesambitos.php2
-rw-r--r--admin/WebConsole/varios/ejecutaracciones.php16
-rw-r--r--admin/WebConsole/varios/ejecutaritem.php2
-rw-r--r--admin/WebConsole/varios/horareser_ventana.php4
-rw-r--r--admin/WebConsole/varios/horario_ventana.php4
-rw-r--r--admin/WebConsole/varios/incluiracciones.php38
-rw-r--r--admin/WebConsole/varios/inclusionacciones.php18
-rw-r--r--admin/WebConsole/varios/incorporaordenadores.php76
-rw-r--r--admin/WebConsole/varios/incrementalcomponente_soft.php22
-rw-r--r--admin/WebConsole/varios/informacion_acciones.php2
-rw-r--r--admin/WebConsole/varios/informacion_imagenes.php29
-rw-r--r--admin/WebConsole/varios/informacion_menus.php20
-rw-r--r--admin/WebConsole/varios/informacion_perfileshardware.php12
-rw-r--r--admin/WebConsole/varios/informacion_perfilessoftware.php24
-rw-r--r--admin/WebConsole/varios/informacion_procedimientos.php12
-rw-r--r--admin/WebConsole/varios/informacion_repositorios.php8
-rw-r--r--admin/WebConsole/varios/informacion_tareas.php6
-rw-r--r--admin/WebConsole/varios/menubrowser.php4
-rw-r--r--admin/WebConsole/varios/msgbrowser.php4
-rw-r--r--admin/WebConsole/varios/perfilcomponente_hard.php35
-rw-r--r--admin/WebConsole/varios/perfilcomponente_soft.php31
-rw-r--r--admin/WebConsole/varios/procedimientoscomandos.php22
-rw-r--r--admin/WebConsole/varios/programaciones.php42
-rw-r--r--admin/WebConsole/varios/tareascomandos.php22
-rw-r--r--admin/WebConsole/varios/toma_mes.php2
-rw-r--r--admin/slim-2.6.1.zipbin0 -> 58715 bytes
-rw-r--r--admin/swagger-ui-2.2.5.zipbin0 -> 955075 bytes
706 files changed, 16424 insertions, 5864 deletions
diff --git a/admin/Database/ogAdmBD-1.0.6a-1.0.6b.sql b/admin/Database/ogAdmBD-1.0.6a-1.0.6b.sql
index f5fa8b19..c772ee3e 100644
--- a/admin/Database/ogAdmBD-1.0.6a-1.0.6b.sql
+++ b/admin/Database/ogAdmBD-1.0.6a-1.0.6b.sql
@@ -1,12 +1,12 @@
+### Fichero de actualización de la base de datos.
# OpenGnSys 1.0.6, 1.0.6a - 1.0.6b
#use ogAdmBD
-ALTER TABLE ordenadores
- ADD INDEX idaulaip (idaula ASC, ip ASC);
-
-# Añadir nuevos sistemas de ficheros (ticket #758)
INSERT INTO sistemasficheros (idsistemafichero, nemonico, descripcion) VALUES
(19, 'LINUX-SWAP', 'LINUX-SWAP')
ON DUPLICATE KEY UPDATE
idsistemafichero=VALUES(idsistemafichero), nemonico=VALUES(nemonico), descripcion=VALUES(descripcion);
+ALTER TABLE ordenadores
+ ADD INDEX idaulaip (idaula ASC, ip ASC);
+
diff --git a/admin/Database/ogAdmBD-1.0.6b-1.1.0.sql b/admin/Database/ogAdmBD-1.0.6b-1.1.0.sql
new file mode 100644
index 00000000..6b7ad95e
--- /dev/null
+++ b/admin/Database/ogAdmBD-1.0.6b-1.1.0.sql
@@ -0,0 +1,161 @@
+### Fichero de actualización de la base de datos.
+# OpenGnSys 1.0.6b - OpenGnsys 1.1.0
+#use ogAdmBD
+
+### NOTA: la configuración de MySQL solo puede modificarla el usuario "root".
+# Soportar cláusuloas GROUP BY especiales para configuración de equipos.
+#SET GLOBAL sql_mode = TRIM(BOTH ',' FROM REPLACE(@@sql_mode, 'ONLY_FULL_GROUP_BY', ''));
+# Activar calendario de eventos de MySQL.
+#SET GLOBAL event_scheduler = ON;
+
+# Nuevos tipos de particiones y de sistemas de ficheros (ticket #758).
+INSERT INTO tipospar (codpar, tipopar, clonable) VALUES
+ (CONV('A9',16,10), 'NETBSD', 1),
+ (CONV('2700',16,10), 'WIN-RECOV', 1),
+ (CONV('8302',16,10), 'LINUX', 1),
+ (CONV('A504',16,10), 'FREEBSD', 1),
+ (CONV('A901',16,10), 'NETBSD-SWAP', 0),
+ (CONV('A902',16,10), 'NETBSD', 1),
+ (CONV('A903',16,10), 'NETBSD', 1),
+ (CONV('A904',16,10), 'NETBSD', 1),
+ (CONV('A905',16,10), 'NETBSD', 1),
+ (CONV('A906',16,10), 'NETBSD-RAID', 1),
+ (CONV('AF02',16,10), 'HFS-RAID', 1),
+ (CONV('FB00',16,10), 'VMFS', 1),
+ (CONV('FB01',16,10), 'VMFS-RESERV', 1),
+ (CONV('FB02',16,10), 'VMFS-KRN', 1),
+ (CONV('10000',16,10), 'LVM-LV', 1),
+ (CONV('10010',16,10), 'ZFS-VOL', 1)
+ ON DUPLICATE KEY UPDATE
+ codpar=VALUES(codpar), tipopar=VALUES(tipopar), clonable=VALUES(clonable);
+INSERT INTO sistemasficheros (idsistemafichero, nemonico, descripcion) VALUES
+ (20, 'F2FS', 'F2FS'),
+ (21, 'NILFS2', 'NILFS2')
+ ON DUPLICATE KEY UPDATE
+ idsistemafichero=VALUES(idsistemafichero), nemonico=VALUES(nemonico), descripcion=VALUES(descripcion);
+
+# Eliminar campos sin uso (ticket #730).
+# Añadir campos para aulas: servidor NTP e inclusión en proyecto Remote PC (tickets #725 y #708).
+ALTER TABLE aulas
+ DROP cuadro_x,
+ DROP cuadro_y,
+ ADD ntp VARCHAR(30) AFTER proxy,
+ ADD inremotepc TINYINT DEFAULT 0;
+# Añadir campos para nº de revisión de imágenes y su inclusión en proyecto Remote PC (tickets #737 y #708).
+ALTER TABLE imagenes
+ ADD revision SMALLINT UNSIGNED NOT NULL DEFAULT 0 AFTER nombreca,
+ ADD inremotepc TINYINT DEFAULT 0;
+
+# Adaptar campo para codificar claves de usuarios (ticket #778),
+# eliminar campo sin uso (ticket #730),
+# añadir clave de acceso a la API REST (tickets #708).
+ALTER TABLE usuarios
+ MODIFY pasguor VARCHAR(56) NOT NULL DEFAULT '',
+ ADD apikey VARCHAR(32) NOT NULL DEFAULT '';
+# Preparar generación de clave de acceso a la API REST para el usuario principal (ticket #708).
+UPDATE usuarios
+ SET apikey = 'APIKEY'
+ WHERE idusuario = 1 AND apikey = '';
+# Codificar claves de usuarios (ticket #)
+INSERT INTO usuarios (idusuario, pasguor)
+ SELECT idusuario, pasguor FROM usuarios
+ ON DUPLICATE KEY UPDATE
+ idusuario=VALUES(idusuario), pasguor=SHA2(VALUES(pasguor),224);
+
+# Añadir nº de revisión de imagen restaurada (ticket #737),
+# añadir porcentaje de uso de sistema de ficheros (ticket #711),
+# evitar errores "TEXT NOT NULL" y "NO_ZERO_DATE" (ticket #730).
+ALTER TABLE ordenadores_particiones
+ MODIFY cache TEXT,
+ ADD revision SMALLINT UNSIGNED NOT NULL DEFAULT 0 AFTER idimagen,
+ ADD uso TINYINT NOT NULL DEFAULT 0;
+ALTER TABLE acciones
+ MODIFY restrambito TEXT,
+ MODIFY fechahorareg DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00',
+ MODIFY fechahorafin DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00';
+ALTER TABLE parametros
+ MODIFY descripcion TEXT;
+ALTER TABLE tareas
+ MODIFY restrambito TEXT;
+
+# Actualizar componentes hardware y añadir nº de serie, clave de acceso a API REST de OGAgent y directorio de ogLive(tickets #713, #718 y #768)
+ALTER TABLE tipohardwares
+ DROP pci;
+INSERT INTO tipohardwares (idtipohardware, descripcion, urlimg, nemonico) VALUES
+ (17, 'Chasis del Sistema', '', 'cha'),
+ (18, 'Controladores de almacenamiento', '../images/iconos/almacenamiento.png', 'sto'),
+ (19, 'Tipo de proceso de arranque', '../images/iconos/arranque.png', 'boo');
+ALTER TABLE ordenadores
+ ADD numserie VARCHAR(25) DEFAULT NULL AFTER nombreordenador,
+ ADD agentkey VARCHAR(32) DEFAULT NULL,
+ ADD oglivedir VARCHAR(50) NOT NULL DEFAULT 'ogLive';
+
+# Directorios en repo para distintas UO (ticket #678).
+ALTER TABLE entidades
+ ADD ogunit TINYINT(1) NOT NULL DEFAULT 0;
+ALTER TABLE centros
+ ADD directorio VARCHAR(50) DEFAULT '';
+
+# Incluir campo ID sistema operativo en el perfil de software (tickets #738 #713)
+ALTER TABLE perfilessoft
+ ADD idnombreso SMALLINT UNSIGNED AFTER idperfilsoft;
+
+# Añadir campo y generar clave de acceso a la API REST del repositorio (ticket #743).
+ALTER TABLE repositorios
+ ADD apikey VARCHAR(32) NOT NULL DEFAULT '';
+UPDATE repositorios
+ SET apikey = 'REPOKEY'
+ WHERE idrepositorio = 1 AND apikey = '';
+
+# Número de puestos del aula permite valores hasta 32768 (ticket #747)
+ALTER TABLE aulas
+ MODIFY puestos smallint DEFAULT NULL;
+
+# Nuevas tablas para datos del proyecto Remote PC y operaciones de OGAgent (ticket #708).
+CREATE TABLE IF NOT EXISTS remotepc (
+ id INT(11) NOT NULL,
+ reserved DATETIME DEFAULT NULL,
+ urllogin VARCHAR(100),
+ urllogout VARCHAR(100),
+ PRIMARY KEY (id)
+ ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE IF NOT EXISTS ogagent_queue (
+ id INT(11) NOT NULL AUTO_INCREMENT,
+ clientid INT(11) NOT NULL,
+ exectime DATETIME DEFAULT NULL,
+ operation VARCHAR(25),
+ PRIMARY KEY (id)
+ ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+
+# Nuevo comando "Enviar mensaje" (ticket #779)
+INSERT INTO comandos (idcomando, descripcion, pagina, gestor, funcion, urlimg,
+ aplicambito, visuparametros, parametros, comentarios, activo, submenu) VALUES
+ (16, 'Enviar mensaje', '../comandos/EnviarMensaje.php', '../comandos/gestores/gestor_Comandos.php', 'EnviarMensaje', '',
+ 31, 'tit;msj', 'nfn;iph;tit;msj', '', 1, '' );
+INSERT INTO parametros (idparametro, nemonico, descripcion, nomidentificador, nomtabla, nomliteral, tipopa, visual) VALUES
+ (39, 'tit', 'Título', '', '', '', 0, 1),
+ (40, 'msj', 'Contenido', '', '', '', 0, 1);
+
+# Crear tabla de log para la cola de acciones (ticket #782)
+CREATE TABLE IF NOT EXISTS acciones_log LIKE acciones;
+ALTER TABLE acciones_log ADD fecha_borrado DATETIME;
+DELIMITER //
+CREATE TRIGGER registrar_acciones BEFORE DELETE ON acciones FOR EACH ROW BEGIN
+ INSERT INTO acciones_log VALUES
+ (OLD.idaccion, OLD.tipoaccion, OLD.idtipoaccion, OLD.descriaccion,
+ OLD.idordenador, OLD.ip, OLD.sesion, OLD.idcomando, OLD.parametros,
+ OLD.fechahorareg, OLD.fechahorafin, OLD.estado, OLD.resultado,
+ OLD.descrinotificacion, OLD.ambito, OLD.idambito, OLD.restrambito,
+ OLD.idprocedimiento, OLD.idtarea, OLD.idcentro, OLD.idprogramacion, NOW());
+END//
+DELIMITER ;
+
+# Ampliar programación de tareas hasta 2025 (ticket #732).
+ALTER TABLE programaciones
+ MODIFY annos SMALLINT DEFAULT NULL,
+ MODIFY meses SMALLINT DEFAULT NULL;
+
+# Eliminar tabla sin uso (ticket #730).
+DROP TABLE IF EXISTS campus;
+
diff --git a/admin/Database/ogAdmBD-1.0.6b-postinst.sql b/admin/Database/ogAdmBD-1.1.0-postinst.sql
index 81cb77ab..7ebbfd14 100644
--- a/admin/Database/ogAdmBD-1.0.6b-postinst.sql
+++ b/admin/Database/ogAdmBD-1.1.0-postinst.sql
@@ -1,5 +1,5 @@
### Procedimiento para actualización de la base de datos.
-# Postinstalación de OpenGnSys 1.0.5+
+# Postinstalación de OpenGnsys 1.1.0
#use ogAdmBD
# Nota: retocar el fichero para sustituir KERNELVERSION por la versión del
@@ -11,12 +11,16 @@ UPDATE menus
WHEN 'uvesafb:1152x864-16' THEN '355'
WHEN 'uvesafb:800x600-16' THEN '788'
WHEN 'uvesafb:800x600-24' THEN '789'
+ WHEN 'uvesafb:800x600-32' THEN '814'
WHEN 'uvesafb:1024x768-16' THEN '791'
WHEN 'uvesafb:1024x768-24' THEN '792'
+ WHEN 'uvesafb:1024x768-32' THEN '824'
WHEN 'uvesafb:1280x1024-16' THEN '794'
WHEN 'uvesafb:1280x1024-24' THEN '795'
+ WHEN 'uvesafb:1280x1024-32' THEN '829'
WHEN 'uvesafb:1600x1200-16' THEN '798'
WHEN 'uvesafb:1600x1200-24' THEN '799'
+ WHEN 'uvesafb:1600x1200-32' THEN '834'
WHEN NULL or '0' THEN '788'
ELSE resolucion
END
@@ -34,6 +38,10 @@ UPDATE menus
WHEN '795' THEN 'uvesafb:1280x1024-24'
WHEN '798' THEN 'uvesafb:1600x1200-16'
WHEN '799' THEN 'uvesafb:1600x1200-24'
+ WHEN '814' THEN 'uvesafb:800x600-32'
+ WHEN '824' THEN 'uvesafb:1024x768-32'
+ WHEN '829' THEN 'uvesafb:1280x1024-32'
+ WHEN '834' THEN 'uvesafb:1600x1200-32'
WHEN NULL or '0' THEN 'uvesafb:800x600-16'
ELSE resolucion
END
diff --git a/admin/Database/ogAdmBD-1.1.0pre-1.1.0.sql b/admin/Database/ogAdmBD-1.1.0pre-1.1.0.sql
new file mode 100644
index 00000000..ed296e44
--- /dev/null
+++ b/admin/Database/ogAdmBD-1.1.0pre-1.1.0.sql
@@ -0,0 +1,270 @@
+### Fichero de actualización de la base de datos.
+# OpenGnsys 1.1.0pre - 1.1.0
+#use ogAdmBD
+
+### NOTA: la configuración de MySQL solo puede modificarla el usuario "root".
+# Soportar cláusuloas GROUP BY especiales para configuración de equipos.
+#SET GLOBAL sql_mode = TRIM(BOTH ',' FROM REPLACE(@@sql_mode, 'ONLY_FULL_GROUP_BY', ''));
+# Activar calendario de eventos de MySQL.
+#SET GLOBAL event_scheduler = ON;
+
+# Eliminar procedimiento y disparador para evitar errores de ejecución.
+DROP PROCEDURE IF EXISTS addcols;
+DROP TRIGGER IF EXISTS registrar_acciones;
+# Procedimiento para actualización condicional de tablas.
+DELIMITER '//'
+CREATE PROCEDURE addcols() BEGIN
+ # Añadir campo para incluir aulas en proyecto Remote PC (ticket #708).
+ IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS
+ WHERE COLUMN_NAME='inremotepc' AND TABLE_NAME='aulas' AND TABLE_SCHEMA=DATABASE())
+ THEN
+ ALTER TABLE aulas
+ ADD inremotepc TINYINT DEFAULT 0;
+ END IF;
+ # Añadir campo para incluir imágenes en proyecto Remote PC (ticket #708).
+ IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS
+ WHERE COLUMN_NAME='inremotepc' AND TABLE_NAME='imagenes' AND TABLE_SCHEMA=DATABASE())
+ THEN
+ ALTER TABLE imagenes
+ ADD inremotepc TINYINT DEFAULT 0;
+ END IF;
+ # Añadir campo para clave de acceso a la API REST (ticket #708).
+ IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS
+ WHERE COLUMN_NAME='apikey' AND TABLE_NAME='usuarios' AND TABLE_SCHEMA=DATABASE())
+ THEN
+ ALTER TABLE usuarios
+ ADD apikey VARCHAR(32) NOT NULL DEFAULT '';
+ END IF;
+ # Añadir porcentaje de uso de sistema de ficheros (ticket #711)
+ IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS
+ WHERE COLUMN_NAME='uso' AND TABLE_NAME='ordenadores_particiones' AND TABLE_SCHEMA=DATABASE())
+ THEN
+ ALTER TABLE ordenadores_particiones
+ ADD uso TINYINT NOT NULL DEFAULT 0;
+ END IF;
+ # Añadir nº de serie (ticket #713)
+ IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS
+ WHERE COLUMN_NAME='numserie' AND TABLE_NAME='ordenadores' AND TABLE_SCHEMA=DATABASE())
+ THEN
+ ALTER TABLE ordenadores
+ ADD numserie varchar(25) DEFAULT NULL AFTER nombreordenador;
+ END IF;
+ # Añadir campo para clave de acceso a la API REST de OGAgent (ticket #718).
+ IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS
+ WHERE COLUMN_NAME='agentkey' AND TABLE_NAME='ordenadores' AND TABLE_SCHEMA=DATABASE())
+ THEN
+ ALTER TABLE ordenadores
+ ADD agentkey VARCHAR(32) DEFAULT NULL;
+ END IF;
+ # Añadir índice para mostrar correctamente el formulario de estado.
+ IF NOT EXISTS (SELECT * FROM information_schema.STATISTICS
+ WHERE INDEX_NAME='idaulaip' AND TABLE_NAME='ordenadores' AND TABLE_SCHEMA=DATABASE())
+ THEN
+ ALTER TABLE ordenadores
+ ADD KEY idaulaip (idaula ASC, ip ASC);
+ END IF;
+ # Añadir campo para directorio de ogLive asociado al cliente (ticket #768).
+ IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS
+ WHERE COLUMN_NAME='oglivedir' AND TABLE_NAME='ordenadores' AND TABLE_SCHEMA=DATABASE())
+ THEN
+ ALTER TABLE ordenadores
+ ADD oglivedir VARCHAR(50) NOT NULL DEFAULT 'ogLive';
+ END IF;
+ # Añadir campo para directorio de ogLive asociado al cliente (ticket #768).
+ IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS
+ WHERE COLUMN_NAME='oglivedir' AND TABLE_NAME='aulas' AND TABLE_SCHEMA=DATABASE())
+ THEN
+ ALTER TABLE aulas
+ ADD oglivedir VARCHAR(50) NOT NULL DEFAULT 'ogLive';
+ END IF;
+ # Eliminar campos sin uso en aulas (ticket #730).
+ IF EXISTS (SELECT * FROM information_schema.COLUMNS
+ WHERE COLUMN_NAME='cuadro_x' AND TABLE_NAME='aulas' AND TABLE_SCHEMA=DATABASE())
+ THEN
+ ALTER TABLE aulas
+ DROP cuadro_x,
+ DROP cuadro_y;
+ END IF;
+ # Eliminar campos no usado en inventario de hardware (ticket #713).
+ IF EXISTS (SELECT * FROM information_schema.COLUMNS
+ WHERE COLUMN_NAME='pci' AND TABLE_NAME='tipohardwares' AND TABLE_SCHEMA=DATABASE())
+ THEN
+ ALTER TABLE tipohardwares
+ DROP pci;
+ END IF;
+ # Añadir servidor de sincronización horaria NTP (ticket #725).
+ IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS
+ WHERE COLUMN_NAME='ntp' AND TABLE_NAME='aulas' AND TABLE_SCHEMA=DATABASE())
+ THEN
+ ALTER TABLE aulas
+ ADD ntp VARCHAR(30) AFTER proxy;
+ END IF;
+ # Directorios en repo para distintas UO (ticket #678).
+ IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS
+ WHERE COLUMN_NAME='ogunit' AND TABLE_NAME='entidades' AND TABLE_SCHEMA=DATABASE())
+ THEN
+ ALTER TABLE entidades
+ ADD ogunit TINYINT(1) NOT NULL DEFAULT 0;
+ END IF;
+ IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS
+ WHERE COLUMN_NAME='directorio' AND TABLE_NAME='centros' AND TABLE_SCHEMA=DATABASE())
+ THEN
+ ALTER TABLE centros
+ ADD directorio VARCHAR(50) DEFAULT '';
+ END IF;
+ # Nº de revisión de imagen (ticket #737).
+ IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS
+ WHERE COLUMN_NAME='revision' AND TABLE_NAME='imagenes' AND TABLE_SCHEMA=DATABASE())
+ THEN
+ ALTER TABLE imagenes
+ ADD revision SMALLINT UNSIGNED NOT NULL DEFAULT 0 AFTER nombreca;
+ END IF;
+ IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS
+ WHERE COLUMN_NAME='revision' AND TABLE_NAME='ordenadores_particiones' AND TABLE_SCHEMA=DATABASE())
+ THEN
+ ALTER TABLE ordenadores_particiones
+ ADD revision SMALLINT UNSIGNED NOT NULL DEFAULT 0 AFTER idimagen;
+ END IF;
+ # Incluir campo sistema operativo en el perfil de software (tickets #738 #713)
+ IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS
+ WHERE COLUMN_NAME='idnombreso' AND TABLE_NAME='perfilessoft' AND TABLE_SCHEMA=DATABASE())
+ THEN
+ ALTER TABLE perfilessoft
+ ADD idnombreso SMALLINT UNSIGNED AFTER idperfilsoft;
+ END IF;
+ # Añadir campo para clave de acceso a la API REST del repositorio (ticket #743).
+ IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS
+ WHERE COLUMN_NAME='apikey' AND TABLE_NAME='repositorios' AND TABLE_SCHEMA=DATABASE())
+ THEN
+ ALTER TABLE repositorios
+ ADD apikey VARCHAR(32) NOT NULL DEFAULT '';
+ END IF;
+ # Codificar claves de los usuarios, si fuese necesario (ticket #778)
+ IF ((SELECT CHARACTER_MAXIMUM_LENGTH FROM information_schema.COLUMNS
+ WHERE COLUMN_NAME='pasguor' AND TABLE_NAME='usuarios' AND TABLE_SCHEMA=DATABASE()) != 56)
+ THEN
+ ALTER TABLE usuarios
+ MODIFY pasguor VARCHAR(56) NOT NULL DEFAULT '';
+ INSERT INTO usuarios (idusuario, pasguor)
+ SELECT idusuario, pasguor FROM usuarios
+ ON DUPLICATE KEY UPDATE
+ pasguor=SHA2(VALUES(pasguor),224);
+ END IF;
+ # Crear tabla de log para la cola de acciones (ticket #782)
+ IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS
+ WHERE TABLE_NAME='acciones_log' AND TABLE_SCHEMA=DATABASE())
+ THEN
+ CREATE TABLE acciones_log LIKE acciones;
+ ALTER TABLE acciones_log ADD fecha_borrado DATETIME;
+ END IF;
+END//
+# Disparador para mover acciones borradas a la tabla de registro de acciones.
+CREATE TRIGGER registrar_acciones BEFORE DELETE ON acciones FOR EACH ROW
+BEGIN
+ INSERT INTO acciones_log VALUES
+ (OLD.idaccion, OLD.tipoaccion, OLD.idtipoaccion, OLD.descriaccion,
+ OLD.idordenador, OLD.ip, OLD.sesion, OLD.idcomando, OLD.parametros,
+ OLD.fechahorareg, OLD.fechahorafin, OLD.estado, OLD.resultado,
+ OLD.descrinotificacion, OLD.ambito, OLD.idambito, OLD.restrambito,
+ OLD.idprocedimiento, OLD.idtarea, OLD.idcentro, OLD.idprogramacion,
+ NOW());
+END//
+# Ejecutar actualización condicional.
+DELIMITER ';'
+CALL addcols();
+DROP PROCEDURE addcols;
+
+# Nuevos tipos de particiones y de sistemas de ficheros.
+INSERT INTO tipospar (codpar, tipopar, clonable) VALUES
+ (CONV('A9',16,10), 'NETBSD', 1),
+ (CONV('2700',16,10), 'WIN-RECOV', 1),
+ (CONV('8302',16,10), 'LINUX', 1),
+ (CONV('A504',16,10), 'FREEBSD', 1),
+ (CONV('A901',16,10), 'NETBSD-SWAP', 0),
+ (CONV('A902',16,10), 'NETBSD', 1),
+ (CONV('A903',16,10), 'NETBSD', 1),
+ (CONV('A904',16,10), 'NETBSD', 1),
+ (CONV('A905',16,10), 'NETBSD', 1),
+ (CONV('A906',16,10), 'NETBSD-RAID', 1),
+ (CONV('AF02',16,10), 'HFS-RAID', 1),
+ (CONV('FB00',16,10), 'VMFS', 1),
+ (CONV('FB01',16,10), 'VMFS-RESERV', 1),
+ (CONV('FB02',16,10), 'VMFS-KRN', 1),
+ (CONV('10000',16,10), 'LVM-LV', 1),
+ (CONV('10010',16,10), 'ZFS-VOL', 1)
+ ON DUPLICATE KEY UPDATE
+ codpar=VALUES(codpar), tipopar=VALUES(tipopar), clonable=VALUES(clonable);
+INSERT INTO sistemasficheros (idsistemafichero, nemonico, descripcion) VALUES
+ (19, 'LINUX-SWAP', 'LINUX-SWAP'),
+ (20, 'F2FS', 'F2FS'),
+ (21, 'NILFS2', 'NILFS2')
+ ON DUPLICATE KEY UPDATE
+ idsistemafichero=VALUES(idsistemafichero), nemonico=VALUES(nemonico), descripcion=VALUES(descripcion);
+
+
+# Preparar generación de claves de acceso a la API REST para el usuario principal y a la del repositorio principal (tickets #708 y #743).
+UPDATE usuarios
+ SET apikey = 'APIKEY'
+ WHERE idusuario = 1 AND apikey = '';
+UPDATE repositorios
+ SET apikey = 'REPOKEY'
+ WHERE idrepositorio = 1 AND apikey = '';
+
+# Nuevos componentes hardware (ticket #713)
+INSERT INTO tipohardwares (idtipohardware, descripcion, urlimg, nemonico) VALUES
+ (17, 'Chasis del Sistema', '', 'cha'),
+ (18, 'Controladores de almacenamiento', '../images/iconos/almacenamiento.png', 'sto'),
+ (19, 'Tipo de proceso de arranque', '../images/iconos/arranque.png', 'boo')
+ ON DUPLICATE KEY UPDATE
+ descripcion=VALUES(descripcion), urlimg=VALUES(urlimg), nemonico=VALUES(nemonico);
+
+# Número de puestos del aula permite valores hasta 32768 (ticket #747)
+ALTER TABLE aulas
+ MODIFY puestos SMALLINT DEFAULT NULL;
+
+# Nuevas tablas para datos del proyecto Remote PC y operaciones de OGAgent (ticket #708).
+DROP TABLE IF EXISTS remotepc;
+CREATE TABLE remotepc (
+ id INT(11) NOT NULL,
+ reserved DATETIME DEFAULT NULL,
+ urllogin VARCHAR(100),
+ urllogout VARCHAR(100),
+ language VARCHAR(5),
+ PRIMARY KEY (id)
+ ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+DROP TABLE IF EXISTS ogagent_queue;
+CREATE TABLE ogagent_queue (
+ id INT(11) NOT NULL AUTO_INCREMENT,
+ clientid INT(11) NOT NULL,
+ exectime DATETIME DEFAULT NULL,
+ operation VARCHAR(25),
+ PRIMARY KEY (id)
+ ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+# Nuevo comando "Enviar mensaje" (ticket #779)
+INSERT INTO comandos (idcomando, descripcion, pagina, gestor, funcion, urlimg,
+ aplicambito, visuparametros, parametros, comentarios, activo, submenu) VALUES
+ (16, 'Enviar mensaje', '../comandos/EnviarMensaje.php', '../comandos/gestores/gestor_Comandos.php', 'EnviarMensaje', '', 31, '', '', '', 1, '' )
+ ON DUPLICATE KEY UPDATE
+ descripcion=VALUES(descripcion), pagina=VALUES(pagina),
+ gestor=VALUES(gestor), funcion=VALUES(funcion),
+ aplicambito=VALUES(aplicambito), activo=VALUES(activo);
+INSERT INTO parametros (idparametro, nemonico, descripcion, nomidentificador, nomtabla, nomliteral, tipopa, visual) VALUES
+ (39, 'tit', 'Título', '', '', '', 0, 1),
+ (40, 'msj', 'Contenido', '', '', '', 0, 1)
+ ON DUPLICATE KEY UPDATE
+ nemonico=VALUES(nemonico), descripcion=VALUES(descripcion),
+ tipopa=VALUES(tipopa), visual=VALUES(visual);
+
+# Evitar error de MySQL con modo NO_ZERO_DATE (ticket #730).
+ALTER TABLE acciones
+ MODIFY fechahorareg DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00',
+ MODIFY fechahorafin DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00';
+
+# Ampliar programación de tareas hasta 2025 (ticket #732).
+ALTER TABLE programaciones
+ MODIFY annos SMALLINT DEFAULT NULL;
+
+# Eliminar tabla sin uso (ticket #730).
+DROP TABLE IF EXISTS campus;
+
diff --git a/admin/Database/ogAdmBD.sql b/admin/Database/ogAdmBD.sql
index 06ca3e08..c126f63c 100644
--- a/admin/Database/ogAdmBD.sql
+++ b/admin/Database/ogAdmBD.sql
@@ -1,6 +1,8 @@
-- Fichero de instalación de la base de datos.
-SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
+SET sql_mode = "NO_AUTO_VALUE_ON_ZERO";
+SET GLOBAL sql_mode = TRIM(BOTH ',' FROM REPLACE(@@sql_mode, 'ONLY_FULL_GROUP_BY', ''));
+SET GLOBAL event_scheduler = ON;
--
-- Base de datos: `ogAdmBD`
@@ -12,24 +14,25 @@ SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
-- Estructura de tabla para la tabla `acciones`
--
-CREATE TABLE IF NOT EXISTS `acciones` (
+DROP TABLE IF EXISTS `acciones`;
+CREATE TABLE `acciones` (
`idaccion` int(11) NOT NULL AUTO_INCREMENT,
- `tipoaccion` smallint(6) NOT NULL,
- `idtipoaccion` int(11) NOT NULL,
- `descriaccion` varchar(250) NOT NULL,
- `idordenador` int(11) NOT NULL,
- `ip` varchar(50) NOT NULL,
- `sesion` int(11) NOT NULL,
- `idcomando` int(11) NOT NULL,
+ `tipoaccion` smallint(6) NOT NULL DEFAULT '0',
+ `idtipoaccion` int(11) NOT NULL DEFAULT '0',
+ `descriaccion` varchar(250) NOT NULL DEFAULT '',
+ `idordenador` int(11) NOT NULL DEFAULT '0',
+ `ip` varchar(50) NOT NULL DEFAULT '',
+ `sesion` int(11) NOT NULL DEFAULT '0',
+ `idcomando` int(11) NOT NULL DEFAULT '0',
`parametros` text,
- `fechahorareg` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `fechahorafin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `fechahorareg` datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
+ `fechahorafin` datetime NOT NULL DEFAULT '1970-01-01 00:00:00',
`estado` tinyint(1) NOT NULL DEFAULT '0',
`resultado` tinyint(1) NOT NULL DEFAULT '0',
`descrinotificacion` varchar(256) DEFAULT NULL,
`ambito` smallint(6) NOT NULL DEFAULT '0',
`idambito` int(11) NOT NULL DEFAULT '0',
- `restrambito` text NOT NULL,
+ `restrambito` text,
`idprocedimiento` int(11) NOT NULL DEFAULT '0',
`idtarea` int(11) NOT NULL DEFAULT '0',
`idcentro` int(11) NOT NULL DEFAULT '0',
@@ -44,10 +47,32 @@ CREATE TABLE IF NOT EXISTS `acciones` (
-- --------------------------------------------------------
--
+-- Estructura de tabla para la tabla `acciones_log`
+--
+
+DROP TABLE IF EXISTS `acciones_log`;
+CREATE TABLE acciones_log LIKE acciones;
+ALTER TABLE acciones_log ADD fecha_borrado DATETIME;
+DELIMITER //
+-- Trigger para guardar acciones antes de ser borradas.
+CREATE TRIGGER registrar_acciones BEFORE DELETE ON acciones FOR EACH ROW BEGIN
+ INSERT INTO acciones_log VALUES
+ (OLD.idaccion, OLD.tipoaccion, OLD.idtipoaccion, OLD.descriaccion,
+ OLD.idordenador, OLD.ip, OLD.sesion, OLD.idcomando, OLD.parametros,
+ OLD.fechahorareg, OLD.fechahorafin, OLD.estado, OLD.resultado,
+ OLD.descrinotificacion, OLD.ambito, OLD.idambito, OLD.restrambito,
+ OLD.idprocedimiento, OLD.idtarea, OLD.idcentro, OLD.idprogramacion, NOW());
+END//
+DELIMITER ;
+
+-- --------------------------------------------------------
+
+--
-- Estructura de tabla para la tabla `acciones_menus`
--
-CREATE TABLE IF NOT EXISTS `acciones_menus` (
+DROP TABLE IF EXISTS `acciones_menus`;
+CREATE TABLE `acciones_menus` (
`idaccionmenu` int(11) NOT NULL AUTO_INCREMENT,
`tipoaccion` tinyint(4) NOT NULL DEFAULT '0',
`idtipoaccion` int(11) NOT NULL DEFAULT '0',
@@ -65,7 +90,8 @@ CREATE TABLE IF NOT EXISTS `acciones_menus` (
-- Estructura de tabla para la tabla `administradores_centros`
--
-CREATE TABLE IF NOT EXISTS `administradores_centros` (
+DROP TABLE IF EXISTS `administradores_centros`;
+CREATE TABLE `administradores_centros` (
`idadministradorcentro` int(11) NOT NULL AUTO_INCREMENT,
`idusuario` int(11) NOT NULL DEFAULT '0',
`idcentro` int(11) NOT NULL DEFAULT '0',
@@ -81,34 +107,36 @@ INSERT INTO `administradores_centros` (`idadministradorcentro`, `idusuario`, `id
-- Estructura de tabla para la tabla `aulas`
--
-CREATE TABLE IF NOT EXISTS `aulas` (
+DROP TABLE IF EXISTS `aulas`;
+CREATE TABLE `aulas` (
`idaula` int(11) NOT NULL AUTO_INCREMENT,
`nombreaula` varchar(100) NOT NULL DEFAULT '',
`idcentro` int(11) NOT NULL DEFAULT '0',
`urlfoto` varchar(250) DEFAULT NULL,
- `cuadro_y` char(3) DEFAULT NULL,
- `cuadro_x` char(3) DEFAULT NULL,
`cagnon` tinyint(1) DEFAULT NULL,
`pizarra` tinyint(1) DEFAULT NULL,
`grupoid` int(11) DEFAULT NULL,
`ubicacion` varchar(255) DEFAULT NULL,
`comentarios` text,
- `puestos` tinyint(4) DEFAULT NULL,
+ `puestos` smallint DEFAULT NULL,
`horaresevini` tinyint(4) DEFAULT NULL,
`horaresevfin` tinyint(4) DEFAULT NULL,
- `modomul` tinyint(4) NOT NULL,
- `ipmul` varchar(16) NOT NULL,
- `pormul` int(11) NOT NULL,
+ `modomul` tinyint(4) NOT NULL DEFAULT '0',
+ `ipmul` varchar(16) NOT NULL DEFAULT '',
+ `pormul` int(11) NOT NULL DEFAULT '0',
`velmul` smallint(6) NOT NULL DEFAULT '70',
`router` varchar( 30 ),
`netmask` varchar( 30 ),
`dns` varchar (30),
`proxy` varchar (30),
+ `ntp` varchar (30),
`modp2p` enum('seeder','peer','leecher') DEFAULT 'peer',
`timep2p` int(11) NOT NULL DEFAULT '60',
`validacion` tinyint(1) DEFAULT '0',
`paginalogin` varchar(100),
`paginavalidacion` varchar(100),
+ `inremotepc` tinyint DEFAULT '0',
+ `oglivedir` varchar(50) NOT NULL DEFAULT 'ogLive',
PRIMARY KEY (`idaula`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
@@ -117,18 +145,19 @@ CREATE TABLE IF NOT EXISTS `aulas` (
-- Estructura de tabla para la tabla `asistentes`
--
-CREATE TABLE IF NOT EXISTS `asistentes` (
+DROP TABLE IF EXISTS `asistentes`;
+CREATE TABLE `asistentes` (
`idcomando` int(11) NOT NULL AUTO_INCREMENT,
`descripcion` varchar(250) NOT NULL DEFAULT '',
- `pagina` varchar(256) NOT NULL,
- `gestor` varchar(256) NOT NULL,
- `funcion` varchar(64) NOT NULL,
+ `pagina` varchar(256) NOT NULL DEFAULT '',
+ `gestor` varchar(256) NOT NULL DEFAULT '',
+ `funcion` varchar(64) NOT NULL DEFAULT '',
`urlimg` varchar(250) DEFAULT NULL,
`aplicambito` tinyint(4) DEFAULT NULL,
`visuparametros` varchar(250) DEFAULT NULL,
`parametros` varchar(250) DEFAULT NULL,
`comentarios` text,
- `activo` tinyint(1) NOT NULL,
+ `activo` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY ( `idcomando` , `descripcion` )
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;
@@ -141,39 +170,19 @@ INSERT INTO `asistentes` (`idcomando`, `descripcion`, `pagina`, `gestor`, `funci
('8', 'Asistente Particionado', '../asistentes/AsistenteParticionado.php', '../asistentes/gestores/gestor_Comandos.php', 'EjecutarScript', ' ', '31', 'iph;tis;dcr;dsp', 'nfn;iph;tis;dcr;scp', ' ', '1');
-
--- --------------------------------------------------------
-
---
--- Estructura de tabla para la tabla `campus`
---
-
-CREATE TABLE IF NOT EXISTS `campus` (
- `idcampus` int(11) NOT NULL AUTO_INCREMENT,
- `nombrecampus` varchar(100) NOT NULL DEFAULT '',
- `iduniversidad` int(11) DEFAULT NULL,
- `urlmapa` varchar(255) DEFAULT NULL,
- `cuadro_y` tinyint(3) DEFAULT NULL,
- `cuadro_x` tinyint(3) DEFAULT NULL,
- PRIMARY KEY (`idcampus`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-
---
--- Volcar la base de datos para la tabla `campus`
---
-
-
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `centros`
--
-CREATE TABLE IF NOT EXISTS `centros` (
+DROP TABLE IF EXISTS `centros`;
+CREATE TABLE `centros` (
`idcentro` int(11) NOT NULL AUTO_INCREMENT,
`nombrecentro` varchar(100) NOT NULL DEFAULT '',
`identidad` int(11) DEFAULT NULL,
`comentarios` text,
+ `directorio` varchar(50) DEFAULT '',
PRIMARY KEY (`idcentro`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
@@ -182,7 +191,7 @@ CREATE TABLE IF NOT EXISTS `centros` (
-- Volcar la base de datos para la tabla `centros`
--
INSERT INTO `centros` (`idcentro`,`nombrecentro`,`identidad`,`comentarios`) VALUES
- (1,'Unidad Organizativa (Default)',1,'Esta Unidad Organizativa se crea automáticamente en el proceso de instalación de OpenGnSys');
+ (1,'Unidad Organizativa (Default)',1,'Esta Unidad Organizativa se crea automáticamente en el proceso de instalación de OpenGnsys');
-- --------------------------------------------------------
@@ -191,18 +200,19 @@ INSERT INTO `centros` (`idcentro`,`nombrecentro`,`identidad`,`comentarios`) VALU
-- Estructura de tabla para la tabla `comandos`
--
-CREATE TABLE IF NOT EXISTS `comandos` (
+DROP TABLE IF EXISTS `comandos`;
+CREATE TABLE `comandos` (
`idcomando` int(11) NOT NULL AUTO_INCREMENT,
`descripcion` varchar(250) NOT NULL DEFAULT '',
- `pagina` varchar(256) NOT NULL,
- `gestor` varchar(256) NOT NULL,
- `funcion` varchar(64) NOT NULL,
+ `pagina` varchar(256) NOT NULL DEFAULT '',
+ `gestor` varchar(256) NOT NULL DEFAULT '',
+ `funcion` varchar(64) NOT NULL DEFAULT '',
`urlimg` varchar(250) DEFAULT NULL,
`aplicambito` tinyint(4) DEFAULT NULL,
`visuparametros` varchar(250) DEFAULT NULL,
`parametros` varchar(250) DEFAULT NULL,
`comentarios` text,
- `activo` tinyint(1) NOT NULL,
+ `activo` tinyint(1) NOT NULL DEFAULT '0',
`submenu` varchar(50) NOT NULL DEFAULT '',
PRIMARY KEY (`idcomando`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=13 ;
@@ -226,7 +236,8 @@ INSERT INTO `comandos` (`idcomando`, `descripcion`, `pagina`, `gestor`, `funcion
(12, 'Crear Imagen Basica', '../comandos/CrearImagenBasica.php', '../comandos/gestores/gestor_Comandos.php', 'CrearImagenBasica', '', 16, 'dsk;par;cpt;idi;nci;ipr;iph;bpi;cpc;bpc;rti;nba', 'nfn;dsk;par;cpt;idi;nci;ipr;iph;bpi;cpc;bpc;rti;nba', '', 1, 'Sincronizacion'),
(13, 'Restaurar Imagen Basica', '../comandos/RestaurarImagenBasica.php', '../comandos/gestores/gestor_Comandos.php', 'RestaurarImagenBasica', '', 28, 'dsk;par;idi;nci;ipr;iph;bpi;cpc;bpc;rti;nba;met', 'nfn;dsk;par;idi;nci;ipr;iph;bpi;cpc;bpc;rti;nba;met', '', 1, 'Sincronizacion'),
(14, 'Crear Software Incremental', '../comandos/CrearSoftIncremental.php', '../comandos/gestores/gestor_Comandos.php', 'CrearSoftIncremental', '', 16, 'dsk;par;idi;nci;ipr;idf;ncf;bpi;cpc;bpc;iph;rti;nba', 'nfn;dsk;par;idi;nci;ipr;idf;ncf;bpi;cpc;bpc;iph;rti;nba', '', 1, 'Sincronizacion'),
-(15, 'Restaurar Software Incremental', '../comandos/RestaurarSoftIncremental.php', '../comandos/gestores/gestor_Comandos.php', 'RestaurarSoftIncremental', '', 28, 'dsk;par;idi;nci;ipr;idf;ncf;bpi;cpc;bpc;iph;rti;met;nba', 'nfn;dsk;par;idi;nci;ipr;idf;ncf;bpi;cpc;bpc;iph;rti;met;nba', '', 1, 'Sincronizacion');
+(15, 'Restaurar Software Incremental', '../comandos/RestaurarSoftIncremental.php', '../comandos/gestores/gestor_Comandos.php', 'RestaurarSoftIncremental', '', 28, 'dsk;par;idi;nci;ipr;idf;ncf;bpi;cpc;bpc;iph;rti;met;nba', 'nfn;dsk;par;idi;nci;ipr;idf;ncf;bpi;cpc;bpc;iph;rti;met;nba', '', 1, 'Sincronizacion'),
+(16, 'Enviar mensaje', '../comandos/EnviarMensaje.php', '../comandos/gestores/gestor_Comandos.php', 'EnviarMensaje', '', 31, 'tit;msj', 'nfn;iph;tit;msj', '', 1, '');
@@ -236,12 +247,14 @@ INSERT INTO `comandos` (`idcomando`, `descripcion`, `pagina`, `gestor`, `funcion
-- Estructura de tabla para la tabla `entidades`
--
-CREATE TABLE IF NOT EXISTS `entidades` (
+DROP TABLE IF EXISTS `entidades`;
+CREATE TABLE `entidades` (
`identidad` int(11) NOT NULL AUTO_INCREMENT,
`nombreentidad` varchar(200) NOT NULL DEFAULT '',
`comentarios` text,
`iduniversidad` int(11) DEFAULT NULL,
`grupoid` int(11) DEFAULT NULL,
+ `ogunit` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`identidad`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
@@ -250,7 +263,7 @@ CREATE TABLE IF NOT EXISTS `entidades` (
--
INSERT INTO `entidades` (`identidad`, `nombreentidad`, `comentarios`, `iduniversidad`, `grupoid`) VALUES
-(1, 'Entidad (Default)', 'Esta Entidad se crea automáticamente en el proceso de instalación de OpenGnSys', 1, 0);
+(1, 'Entidad (Default)', 'Esta Entidad se crea automáticamente en el proceso de instalación de OpenGnsys', 1, 0);
-- --------------------------------------------------------
@@ -258,11 +271,12 @@ INSERT INTO `entidades` (`identidad`, `nombreentidad`, `comentarios`, `idunivers
-- Estructura de tabla para la tabla `entornos`
--
-CREATE TABLE IF NOT EXISTS `entornos` (
+DROP TABLE IF EXISTS `entornos`;
+CREATE TABLE `entornos` (
`identorno` int(11) NOT NULL AUTO_INCREMENT,
- `ipserveradm` varchar(50) NOT NULL,
- `portserveradm` int(20) NOT NULL,
- `protoclonacion` varchar(50) NOT NULL,
+ `ipserveradm` varchar(50) NOT NULL DEFAULT '',
+ `portserveradm` int(20) NOT NULL DEFAULT 2008,
+ `protoclonacion` varchar(50) NOT NULL DEFAULT '',
PRIMARY KEY (`identorno`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
@@ -279,7 +293,8 @@ INSERT INTO `entornos` (`identorno`, `ipserveradm`, `portserveradm`, `protoclona
-- Estructura de tabla para la tabla `estatus`
--
-CREATE TABLE IF NOT EXISTS `estatus` (
+DROP TABLE IF EXISTS `estatus`;
+CREATE TABLE `estatus` (
`idestatus` int(11) NOT NULL AUTO_INCREMENT,
`descripcion` varchar(250) NOT NULL DEFAULT '',
PRIMARY KEY (`idestatus`)
@@ -302,7 +317,8 @@ INSERT INTO `estatus` (`idestatus`, `descripcion`) VALUES
-- Estructura de tabla para la tabla `grupos`
--
-CREATE TABLE IF NOT EXISTS `grupos` (
+DROP TABLE IF EXISTS `grupos`;
+CREATE TABLE `grupos` (
`idgrupo` int(11) NOT NULL AUTO_INCREMENT,
`nombregrupo` varchar(250) NOT NULL DEFAULT '',
`grupoid` int(11) NOT NULL DEFAULT '0',
@@ -319,7 +335,8 @@ CREATE TABLE IF NOT EXISTS `grupos` (
-- Estructura de tabla para la tabla `gruposordenadores`
--
-CREATE TABLE IF NOT EXISTS `gruposordenadores` (
+DROP TABLE IF EXISTS `gruposordenadores`;
+CREATE TABLE `gruposordenadores` (
`idgrupo` int(11) NOT NULL AUTO_INCREMENT,
`nombregrupoordenador` varchar(250) NOT NULL DEFAULT '',
`idaula` int(11) NOT NULL DEFAULT '0',
@@ -334,7 +351,8 @@ CREATE TABLE IF NOT EXISTS `gruposordenadores` (
-- Estructura de tabla para la tabla `hardwares`
--
-CREATE TABLE IF NOT EXISTS `hardwares` (
+DROP TABLE IF EXISTS `hardwares`;
+CREATE TABLE `hardwares` (
`idhardware` int(11) NOT NULL AUTO_INCREMENT,
`idtipohardware` int(11) NOT NULL DEFAULT '0',
`descripcion` varchar(250) NOT NULL DEFAULT '',
@@ -350,7 +368,8 @@ CREATE TABLE IF NOT EXISTS `hardwares` (
-- Estructura de tabla para la tabla `iconos`
--
-CREATE TABLE IF NOT EXISTS `iconos` (
+DROP TABLE IF EXISTS `iconos`;
+CREATE TABLE `iconos` (
`idicono` int(11) NOT NULL AUTO_INCREMENT,
`urlicono` varchar(200) DEFAULT NULL,
`idtipoicono` int(11) DEFAULT NULL,
@@ -384,7 +403,8 @@ INSERT INTO `iconos` (`idicono`, `urlicono`, `idtipoicono`, `descripcion`) VALUE
-- Estructura de tabla para la tabla `idiomas`
--
-CREATE TABLE IF NOT EXISTS `idiomas` (
+DROP TABLE IF EXISTS `idiomas`;
+CREATE TABLE `idiomas` (
`ididioma` int(11) NOT NULL AUTO_INCREMENT,
`descripcion` varchar(100) DEFAULT NULL,
`nemonico` char(3) DEFAULT NULL,
@@ -406,23 +426,26 @@ INSERT INTO `idiomas` (`ididioma`, `descripcion`, `nemonico`) VALUES
-- Estructura de tabla para la tabla `imagenes`
--
-CREATE TABLE IF NOT EXISTS `imagenes` (
+DROP TABLE IF EXISTS `imagenes`;
+CREATE TABLE `imagenes` (
`idimagen` int(11) NOT NULL AUTO_INCREMENT,
- `nombreca` varchar(50) NOT NULL,
+ `nombreca` varchar(50) NOT NULL DEFAULT '',
+ `revision` smallint UNSIGNED NOT NULL DEFAULT '0',
`descripcion` varchar(250) NOT NULL DEFAULT '',
`idperfilsoft` int(11) DEFAULT NULL,
`idcentro` int(11) DEFAULT NULL,
`comentarios` text,
`grupoid` int(11) DEFAULT NULL,
- `idrepositorio` int(11) NOT NULL DEFAULT 0,
- `idordenador` int(11) NOT NULL DEFAULT 0,
- `numdisk` smallint NOT NULL DEFAULT 0,
- `numpar` smallint NOT NULL DEFAULT 0,
- `codpar` int(8) NOT NULL DEFAULT 0,
+ `idrepositorio` int(11) NOT NULL DEFAULT '0',
+ `idordenador` int(11) NOT NULL DEFAULT '0',
+ `numdisk` smallint NOT NULL DEFAULT '0',
+ `numpar` smallint NOT NULL DEFAULT '0',
+ `codpar` int(8) NOT NULL DEFAULT '0',
`tipo` tinyint NULL,
- `imagenid` int NOT NULL DEFAULT 0,
+ `imagenid` int NOT NULL DEFAULT '0',
`ruta` varchar(250) NULL,
`fechacreacion` datetime DEFAULT NULL,
+ `inremotepc` tinyint DEFAULT '0',
PRIMARY KEY (`idimagen`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
@@ -432,7 +455,8 @@ CREATE TABLE IF NOT EXISTS `imagenes` (
-- Estructura de tabla para la tabla `menus`
--
-CREATE TABLE IF NOT EXISTS `menus` (
+DROP TABLE IF EXISTS `menus`;
+CREATE TABLE `menus` (
`idmenu` int(11) NOT NULL AUTO_INCREMENT,
`descripcion` varchar(250) NOT NULL DEFAULT '',
`idcentro` int(11) NOT NULL DEFAULT '0',
@@ -454,9 +478,10 @@ CREATE TABLE IF NOT EXISTS `menus` (
-- Estructura de tabla para la tabla `nombresos`
--
-CREATE TABLE IF NOT EXISTS `nombresos` (
+DROP TABLE IF EXISTS `nombresos`;
+CREATE TABLE `nombresos` (
`idnombreso` smallint(11) NOT NULL AUTO_INCREMENT,
- `nombreso` varchar(250) NOT NULL,
+ `nombreso` varchar(250) NOT NULL DEFAULT '',
`idtiposo` int(11) DEFAULT '0',
PRIMARY KEY (`idnombreso`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
@@ -464,13 +489,31 @@ CREATE TABLE IF NOT EXISTS `nombresos` (
-- --------------------------------------------------------
--
+-- Estructura de tabla para la tabla `ogagent_queue`
+--
+
+DROP TABLE IF EXISTS `ogagent_queue`;
+CREATE TABLE `ogagent_queue` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `clientid` int(11) NOT NULL,
+ `exectime` datetime DEFAULT NULL,
+ `operation` varchar(25),
+-- `parameters` varchar(100),
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
-- Estructura de tabla para la tabla `ordenadores`
--
-CREATE TABLE IF NOT EXISTS `ordenadores` (
+DROP TABLE IF EXISTS `ordenadores`;
+CREATE TABLE `ordenadores` (
`idordenador` int(11) NOT NULL AUTO_INCREMENT,
`nombreordenador` varchar(100) DEFAULT NULL,
- `ip` varchar(16) NOT NULL,
+ `numserie` varchar(25) DEFAULT NULL,
+ `ip` varchar(16) NOT NULL DEFAULT '',
`mac` varchar(12) DEFAULT NULL,
`idaula` int(11) DEFAULT NULL,
`idperfilhard` int(11) DEFAULT NULL,
@@ -478,16 +521,18 @@ CREATE TABLE IF NOT EXISTS `ordenadores` (
`grupoid` int(11) DEFAULT NULL,
`idmenu` int(11) DEFAULT NULL,
`cache` int(11) DEFAULT NULL,
- `router` varchar(16) NOT NULL,
- `mascara` varchar(16) NOT NULL,
- `idproautoexec` int(11) NOT NULL DEFAULT 0,
- `arranque` VARCHAR( 30 ) NOT NULL DEFAULT '00unknown',
+ `router` varchar(16) NOT NULL DEFAULT '',
+ `mascara` varchar(16) NOT NULL DEFAULT '',
+ `idproautoexec` int(11) NOT NULL DEFAULT '0',
+ `arranque` varchar(30) NOT NULL DEFAULT '00unknown',
`netiface` enum('eth0','eth1','eth2') DEFAULT 'eth0',
- `netdriver` varchar( 30 ) NOT NULL DEFAULT 'generic',
- `fotoord` varchar( 250 ) NOT NULL DEFAULT 'fotoordenador.gif',
+ `netdriver` varchar(30) NOT NULL DEFAULT 'generic',
+ `fotoord` varchar(250) NOT NULL DEFAULT 'fotoordenador.gif',
`validacion` tinyint(1) DEFAULT '0',
`paginalogin` varchar(100),
`paginavalidacion` varchar(100),
+ `agentkey` varchar(32),
+ `oglivedir` varchar(50) NOT NULL DEFAULT 'ogLive',
PRIMARY KEY (`idordenador`),
KEY `idaulaip` (`idaula` ASC, `ip` ASC)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
@@ -500,18 +545,21 @@ CREATE TABLE IF NOT EXISTS `ordenadores` (
-- Estructura de tabla para la tabla `ordenadores_particiones`
--
-CREATE TABLE IF NOT EXISTS `ordenadores_particiones` (
- `idordenador` int(11) NOT NULL,
- `numdisk` smallint NOT NULL,
- `numpar` smallint NOT NULL,
- `codpar` int(8) NOT NULL,
- `tamano` int(11) NOT NULL,
- `idsistemafichero` smallint(11) NOT NULL,
- `idnombreso` smallint(11) NOT NULL,
- `idimagen` int(11) NOT NULL,
- `idperfilsoft` int(11) NOT NULL,
+DROP TABLE IF EXISTS `ordenadores_particiones`;
+CREATE TABLE `ordenadores_particiones` (
+ `idordenador` int(11) NOT NULL DEFAULT '0',
+ `numdisk` smallint NOT NULL DEFAULT '0',
+ `numpar` smallint NOT NULL DEFAULT '0',
+ `codpar` int(8) NOT NULL DEFAULT '0',
+ `tamano` int(11) NOT NULL DEFAULT '0',
+ `uso` tinyint NOT NULL DEFAULT '0',
+ `idsistemafichero` smallint(11) NOT NULL DEFAULT '0',
+ `idnombreso` smallint(11) NOT NULL DEFAULT '0',
+ `idimagen` int(11) NOT NULL DEFAULT '0',
+ `revision` smallint UNSIGNED NOT NULL DEFAULT '0',
+ `idperfilsoft` int(11) NOT NULL DEFAULT '0',
`fechadespliegue` datetime NULL,
- `cache` text NOT NULL,
+ `cache` text,
UNIQUE KEY `idordenadornumdisknumpar` (`idordenador`,`numdisk`,`numpar`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
@@ -521,13 +569,14 @@ CREATE TABLE IF NOT EXISTS `ordenadores_particiones` (
-- Estructura de tabla para la tabla `parametros`
--
-CREATE TABLE IF NOT EXISTS `parametros` (
+DROP TABLE IF EXISTS `parametros`;
+CREATE TABLE `parametros` (
`idparametro` int(11) NOT NULL AUTO_INCREMENT,
- `nemonico` char(3) NOT NULL,
- `descripcion` text NOT NULL,
- `nomidentificador` varchar(64) NOT NULL,
- `nomtabla` varchar(64) NOT NULL,
- `nomliteral` varchar(64) NOT NULL,
+ `nemonico` char(3) NOT NULL DEFAULT '',
+ `descripcion` text,
+ `nomidentificador` varchar(64) NOT NULL DEFAULT '',
+ `nomtabla` varchar(64) NOT NULL DEFAULT '',
+ `nomliteral` varchar(64) NOT NULL DEFAULT '',
`tipopa` tinyint(1) DEFAULT '0',
`visual` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`idparametro`),
@@ -575,7 +624,9 @@ INSERT INTO `parametros` (`idparametro`, `nemonico`, `descripcion`, `nomidentifi
(35, 'bpc', 'Borrado previo de la imagen en cache', '', '', '', 5, 1),
(36, 'rti', 'Ruta de origen', '', '', '', 0, 1),
(37, 'met', 'Método clonación', ';', '', 'Desde caché; Desde repositorio', 3, 1),
-(38, 'nba', 'No borrar archivos en destino', '', '', '', 0, 1);
+(38, 'nba', 'No borrar archivos en destino', '', '', '', 0, 1),
+(39, 'tit', 'Título', '', '', '', 0, 1),
+(40, 'msj', 'Contenido', '', '', '', 0, 1);
-- --------------------------------------------------------
@@ -584,12 +635,13 @@ INSERT INTO `parametros` (`idparametro`, `nemonico`, `descripcion`, `nomidentifi
--
-CREATE TABLE IF NOT EXISTS `perfileshard` (
+DROP TABLE IF EXISTS `perfileshard`;
+CREATE TABLE `perfileshard` (
`idperfilhard` int(11) NOT NULL AUTO_INCREMENT,
`descripcion` varchar(250) NOT NULL DEFAULT '',
`comentarios` text,
`grupoid` int(11) DEFAULT NULL,
- `idcentro` int(11) NOT NULL,
+ `idcentro` int(11) NOT NULL DEFAULT '0',
`winboot` enum( 'reboot', 'kexec' ) NOT NULL DEFAULT 'reboot',
PRIMARY KEY (`idperfilhard`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
@@ -601,7 +653,8 @@ CREATE TABLE IF NOT EXISTS `perfileshard` (
-- Estructura de tabla para la tabla `perfileshard_hardwares`
--
-CREATE TABLE IF NOT EXISTS `perfileshard_hardwares` (
+DROP TABLE IF EXISTS `perfileshard_hardwares`;
+CREATE TABLE `perfileshard_hardwares` (
`idperfilhard` int(11) NOT NULL DEFAULT '0',
`idhardware` int(11) NOT NULL DEFAULT '0',
KEY `idperfilhard` (`idperfilhard`)
@@ -613,12 +666,14 @@ CREATE TABLE IF NOT EXISTS `perfileshard_hardwares` (
-- Estructura de tabla para la tabla `perfilessoft`
--
-CREATE TABLE IF NOT EXISTS `perfilessoft` (
+DROP TABLE IF EXISTS `perfilessoft`;
+CREATE TABLE `perfilessoft` (
`idperfilsoft` int(11) NOT NULL AUTO_INCREMENT,
+ `idnombreso` smallint(5) unsigned DEFAULT NULL,
`descripcion` varchar(250) NOT NULL DEFAULT '',
`comentarios` text,
`grupoid` int(11) DEFAULT NULL,
- `idcentro` int(11) NOT NULL,
+ `idcentro` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`idperfilsoft`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
@@ -628,7 +683,8 @@ CREATE TABLE IF NOT EXISTS `perfilessoft` (
-- Estructura de tabla para la tabla `perfilessoft_softwares`
--
-CREATE TABLE IF NOT EXISTS `perfilessoft_softwares` (
+DROP TABLE IF EXISTS `perfilessoft_softwares`;
+CREATE TABLE `perfilessoft_softwares` (
`idperfilsoft` int(11) NOT NULL DEFAULT '0',
`idsoftware` int(11) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
@@ -639,9 +695,10 @@ CREATE TABLE IF NOT EXISTS `perfilessoft_softwares` (
-- Estructura de tabla para la tabla `plataformas`
--
-CREATE TABLE IF NOT EXISTS `plataformas` (
+DROP TABLE IF EXISTS `plataformas`;
+CREATE TABLE `plataformas` (
`idplataforma` int(11) NOT NULL AUTO_INCREMENT,
- `plataforma` varchar(250) NOT NULL,
+ `plataforma` varchar(250) NOT NULL DEFAULT '',
PRIMARY KEY (`idplataforma`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=18 ;
@@ -662,7 +719,8 @@ INSERT INTO `plataformas` (`idplataforma`, `plataforma`) VALUES
-- Estructura de tabla para la tabla `procedimientos`
--
-CREATE TABLE IF NOT EXISTS `procedimientos` (
+DROP TABLE IF EXISTS `procedimientos`;
+CREATE TABLE `procedimientos` (
`idprocedimiento` int(11) NOT NULL AUTO_INCREMENT,
`descripcion` varchar(250) NOT NULL DEFAULT '',
`urlimg` varchar(250) DEFAULT NULL,
@@ -678,13 +736,14 @@ CREATE TABLE IF NOT EXISTS `procedimientos` (
-- Estructura de tabla para la tabla `procedimientos_acciones`
--
-CREATE TABLE IF NOT EXISTS `procedimientos_acciones` (
+DROP TABLE IF EXISTS `procedimientos_acciones`;
+CREATE TABLE `procedimientos_acciones` (
`idprocedimientoaccion` int(11) NOT NULL AUTO_INCREMENT,
`idprocedimiento` int(11) NOT NULL DEFAULT '0',
`orden` smallint(4) DEFAULT NULL,
`idcomando` int(11) NOT NULL DEFAULT '0',
`parametros` text,
- `procedimientoid` int(11) NOT NULL,
+ `procedimientoid` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`idprocedimientoaccion`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
@@ -694,13 +753,14 @@ CREATE TABLE IF NOT EXISTS `procedimientos_acciones` (
-- Estructura de tabla para la tabla `programaciones`
--
-CREATE TABLE IF NOT EXISTS `programaciones` (
+DROP TABLE IF EXISTS `programaciones`;
+CREATE TABLE `programaciones` (
`idprogramacion` int(11) NOT NULL AUTO_INCREMENT,
`tipoaccion` int(11) DEFAULT NULL,
`identificador` int(11) DEFAULT NULL,
`nombrebloque` varchar(255) DEFAULT NULL,
- `annos` tinyint(4) DEFAULT NULL,
- `meses` smallint(4) DEFAULT NULL,
+ `annos` smallint DEFAULT NULL,
+ `meses` smallint DEFAULT NULL,
`diario` int(11) DEFAULT NULL,
`dias` tinyint(4) DEFAULT NULL,
`semanas` tinyint(4) DEFAULT NULL,
@@ -715,30 +775,48 @@ CREATE TABLE IF NOT EXISTS `programaciones` (
`ampmfin` tinyint(1) DEFAULT NULL,
`minutosfin` tinyint(4) DEFAULT NULL,
`suspendida` tinyint(1) DEFAULT NULL,
- `sesion` int(11) NOT NULL,
+ `sesion` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`idprogramacion`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
+-- Estructura de tabla para la tabla `remotepc`
+--
+
+DROP TABLE IF EXISTS `remotepc`;
+CREATE TABLE `remotepc` (
+ `id` int(11) NOT NULL,
+ `reserved` datetime DEFAULT NULL,
+ `urllogin` varchar(100),
+ `urllogout` varchar(100),
+ `language` varchar(5),
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
-- Estructura de tabla para la tabla `repositorios`
--
-CREATE TABLE IF NOT EXISTS `repositorios` (
+DROP TABLE IF EXISTS `repositorios`;
+CREATE TABLE `repositorios` (
`idrepositorio` int(11) NOT NULL AUTO_INCREMENT,
- `nombrerepositorio` varchar(250) NOT NULL,
+ `nombrerepositorio` varchar(250) NOT NULL DEFAULT '',
`ip` varchar(15) NOT NULL DEFAULT '',
`passguor` varchar(50) NOT NULL DEFAULT '',
`idcentro` int(11) DEFAULT NULL,
`grupoid` int(11) DEFAULT NULL,
`comentarios` text,
- `puertorepo` int(11) NOT NULL,
+ `puertorepo` int(11) NOT NULL DEFAULT '0',
+ `apikey` varchar(32) NOT NULL DEFAULT '',
PRIMARY KEY (`idrepositorio`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-INSERT INTO `repositorios` (`idrepositorio`,`nombrerepositorio`,`ip`,`passguor`,`idcentro`,`grupoid`,`comentarios`,`puertorepo`) VALUES
- (1,'Repositorio (Default)','SERVERIP','',1,0,'',2002);
+INSERT INTO `repositorios` (`idrepositorio`,`nombrerepositorio`,`ip`,`passguor`,`idcentro`,`grupoid`,`comentarios`,`puertorepo`,`apikey`) VALUES
+ (1,'Repositorio (Default)','SERVERIP','',1,0,'',2002,'REPOKEY');
-- --------------------------------------------------------
@@ -747,11 +825,12 @@ INSERT INTO `repositorios` (`idrepositorio`,`nombrerepositorio`,`ip`,`passguor`,
-- Estructura de tabla para la tabla `sistemasficheros`
--
-CREATE TABLE IF NOT EXISTS `sistemasficheros` (
+DROP TABLE IF EXISTS `sistemasficheros`;
+CREATE TABLE `sistemasficheros` (
`idsistemafichero` smallint(11) NOT NULL AUTO_INCREMENT,
`descripcion` varchar(50) NOT NULL DEFAULT '',
`nemonico` varchar(16) DEFAULT NULL,
- `codpar` int(8) NOT NULL,
+ `codpar` int(8) NOT NULL DEFAULT '0',
PRIMARY KEY (`idsistemafichero`),
UNIQUE KEY (`descripcion`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
@@ -774,7 +853,9 @@ INSERT INTO `sistemasficheros` (`idsistemafichero`, `descripcion`, `nemonico`, `
(16, 'UFS', 'UFS', 0),
(17, 'XFS', 'XFS', 0),
(18, 'EXFAT', 'EXFAT', 0),
- (19, 'LINUX-SWAP', 'LINUX-SWAP', 0);
+ (19, 'LINUX-SWAP', 'LINUX-SWAP', 0),
+ (20, 'F2FS', 'F2FS', 0),
+ (21, 'NILFS2', 'NILFS2', 0);
-- --------------------------------------------------------
@@ -783,7 +864,8 @@ INSERT INTO `sistemasficheros` (`idsistemafichero`, `descripcion`, `nemonico`, `
-- Estructura de tabla para la tabla `softwares`
--
-CREATE TABLE IF NOT EXISTS `softwares` (
+DROP TABLE IF EXISTS `softwares`;
+CREATE TABLE `softwares` (
`idsoftware` int(11) NOT NULL AUTO_INCREMENT,
`idtiposoftware` int(11) NOT NULL DEFAULT '0',
`descripcion` varchar(250) NOT NULL DEFAULT '',
@@ -800,14 +882,15 @@ CREATE TABLE IF NOT EXISTS `softwares` (
-- Estructura de tabla para la tabla `tareas`
--
-CREATE TABLE IF NOT EXISTS `tareas` (
+DROP TABLE IF EXISTS `tareas`;
+CREATE TABLE `tareas` (
`idtarea` int(11) NOT NULL AUTO_INCREMENT,
`descripcion` varchar(250) NOT NULL DEFAULT '',
`urlimg` varchar(250) DEFAULT NULL,
`idcentro` int(11) NOT NULL DEFAULT '0',
`ambito` smallint(6) NOT NULL DEFAULT '0',
`idambito` int(11) NOT NULL DEFAULT '0',
- `restrambito` text NOT NULL,
+ `restrambito` text,
`comentarios` text,
`grupoid` int(11) DEFAULT '0',
PRIMARY KEY (`idtarea`)
@@ -819,7 +902,8 @@ CREATE TABLE IF NOT EXISTS `tareas` (
-- Estructura de tabla para la tabla `tareas_acciones`
--
-CREATE TABLE IF NOT EXISTS `tareas_acciones` (
+DROP TABLE IF EXISTS `tareas_acciones`;
+CREATE TABLE `tareas_acciones` (
`idtareaaccion` int(11) NOT NULL AUTO_INCREMENT,
`idtarea` int(11) NOT NULL DEFAULT '0',
`orden` smallint(6) NOT NULL DEFAULT '0',
@@ -834,12 +918,12 @@ CREATE TABLE IF NOT EXISTS `tareas_acciones` (
-- Estructura de tabla para la tabla `tipohardwares`
--
-CREATE TABLE IF NOT EXISTS `tipohardwares` (
+DROP TABLE IF EXISTS `tipohardwares`;
+CREATE TABLE `tipohardwares` (
`idtipohardware` int(11) NOT NULL AUTO_INCREMENT,
`descripcion` varchar(250) NOT NULL DEFAULT '',
`urlimg` varchar(250) NOT NULL DEFAULT '',
- `nemonico` char(3) NOT NULL,
- `pci` tinyint(1) NOT NULL,
+ `nemonico` char(3) NOT NULL DEFAULT '',
PRIMARY KEY (`idtipohardware`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=17 ;
@@ -847,22 +931,25 @@ CREATE TABLE IF NOT EXISTS `tipohardwares` (
-- Volcar la base de datos para la tabla `tipohardwares`
--
-INSERT INTO `tipohardwares` (`idtipohardware`, `descripcion`, `urlimg`, `nemonico`, `pci`) VALUES
-(1, 'Placas', '../images/iconos/placabase.gif', 'boa', 0),
-(2, 'Dispositivos Multimedia', '../images/iconos/tsonido.gif', 'mul', 0),
-(3, 'Tarjetas de Red', '../images/iconos/nic.gif', 'net', 0),
-(4, 'Microprocesadores', '../images/iconos/micro.gif', 'cpu', 0),
-(5, 'Memorias', '../images/iconos/confihard.gif', 'mem', 0),
-(7, 'Tarjetas gráficas', '../images/iconos/vga.gif', 'vga', 0),
-(8, 'Discos', '../images/iconos/discoduro.gif', 'dis', 0),
-(9, 'Dispositivos de sonido', '../images/iconos/audio.gif', 'aud', 0),
-(10, 'Marca y modelo del equipo', '../images/iconos/confihard.gif', 'mod', 0),
-(11, 'Modelo y version de la bios', '../images/iconos/confihard.gif', 'bio', 0),
-(12, 'Modelo de grabadora o grabadora de CD/DVD', '../images/iconos/dvdcd.gif', 'cdr', 0),
-(13, 'Controladores IDE', '../images/iconos/ide.gif', 'ide', 0),
-(14, 'Controladores FireWire', '../images/iconos/confihard.gif', 'fir', 0),
-(15, 'Controladores USB', '../images/iconos/usb.gif', 'usb', 0),
-(16, 'Bus del Sistema', '../images/iconos/confihard.gif', 'bus', 0);
+INSERT INTO `tipohardwares` (`idtipohardware`, `descripcion`, `urlimg`, `nemonico`) VALUES
+(1, 'Placas', '../images/iconos/placabase.gif', 'boa'),
+(2, 'Dispositivos Multimedia', '../images/iconos/tsonido.gif', 'mul'),
+(3, 'Tarjetas de Red', '../images/iconos/nic.gif', 'net'),
+(4, 'Microprocesadores', '../images/iconos/micro.gif', 'cpu'),
+(5, 'Memorias', '../images/iconos/confihard.gif', 'mem'),
+(7, 'Tarjetas gráficas', '../images/iconos/vga.gif', 'vga'),
+(8, 'Discos', '../images/iconos/discoduro.gif', 'dis'),
+(9, 'Dispositivos de sonido', '../images/iconos/audio.gif', 'aud'),
+(10, 'Marca y modelo del equipo', '../images/iconos/confihard.gif', 'mod'),
+(11, 'Modelo y version de la bios', '../images/iconos/confihard.gif', 'bio'),
+(12, 'Modelo de grabadora o grabadora de CD/DVD', '../images/iconos/dvdcd.gif', 'cdr'),
+(13, 'Controladores IDE', '../images/iconos/ide.gif', 'ide'),
+(14, 'Controladores FireWire', '../images/iconos/confihard.gif', 'fir'),
+(15, 'Controladores USB', '../images/iconos/usb.gif', 'usb'),
+(16, 'Bus del Sistema', '../images/iconos/confihard.gif', 'bus'),
+(17, 'Chasis del Sistema', '', 'cha'),
+(18, 'Controladores de almacenamiento', '../images/iconos/almacenamiento.png', 'sto'),
+(19, 'Tipo de proceso de arranque', '../images/iconos/arranque.png', 'boo');
-- --------------------------------------------------------
@@ -870,7 +957,8 @@ INSERT INTO `tipohardwares` (`idtipohardware`, `descripcion`, `urlimg`, `nemonic
-- Estructura de tabla para la tabla `tiposoftwares`
--
-CREATE TABLE IF NOT EXISTS `tiposoftwares` (
+DROP TABLE IF EXISTS `tiposoftwares`;
+CREATE TABLE `tiposoftwares` (
`idtiposoftware` int(11) NOT NULL AUTO_INCREMENT,
`descripcion` varchar(250) NOT NULL DEFAULT '',
`urlimg` varchar(250) NOT NULL DEFAULT '',
@@ -892,10 +980,11 @@ INSERT INTO `tiposoftwares` (`idtiposoftware`, `descripcion`, `urlimg`) VALUES
-- Estructura de tabla para la tabla `tiposos`
--
-CREATE TABLE IF NOT EXISTS `tiposos` (
+DROP TABLE IF EXISTS `tiposos`;
+CREATE TABLE `tiposos` (
`idtiposo` int(11) NOT NULL AUTO_INCREMENT,
- `tiposo` varchar(250) NOT NULL,
- `idplataforma` int(11) NOT NULL,
+ `tiposo` varchar(250) NOT NULL DEFAULT '',
+ `idplataforma` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`idtiposo`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=21 ;
@@ -920,10 +1009,11 @@ INSERT INTO `tiposos` (`idtiposo`, `tiposo`, `idplataforma`) VALUES
-- Estructura de tabla para la tabla `tipospar`
--
-CREATE TABLE IF NOT EXISTS `tipospar` (
+DROP TABLE IF EXISTS `tipospar`;
+CREATE TABLE `tipospar` (
`codpar` int(8) NOT NULL,
- `tipopar` varchar(250) NOT NULL,
- `clonable` tinyint(4) NOT NULL,
+ `tipopar` varchar(250) NOT NULL DEFAULT '',
+ `clonable` tinyint(4) NOT NULL DEFAULT '0',
UNIQUE KEY `codpar` (`codpar`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
@@ -947,6 +1037,7 @@ INSERT INTO `tipospar` (`codpar`, `tipopar`, `clonable`) VALUES
(CONV('8E',16,10), 'LINUX-LVM', 1),
(CONV('A5',16,10), 'FREEBSD', 1),
(CONV('A6',16,10), 'OPENBSD', 1),
+(CONV('A9',16,10), 'NETBSD', 1),
(CONV('AF',16,10), 'HFS', 1),
(CONV('BE',16,10), 'SOLARIS-BOOT', 1),
(CONV('BF',16,10), 'SOLARIS', 1),
@@ -958,20 +1049,30 @@ INSERT INTO `tipospar` (`codpar`, `tipopar`, `clonable`) VALUES
(CONV('FD',16,10), 'LINUX-RAID', 1),
(CONV('0700',16,10), 'WINDOWS', 1),
(CONV('0C01',16,10), 'WIN-RESERV', 1),
+(CONV('2700',16,10), 'WIN-RECOV', 1),
(CONV('7F00',16,10), 'CHROMEOS-KRN', 1),
(CONV('7F01',16,10), 'CHROMEOS', 1),
(CONV('7F02',16,10), 'CHROMEOS-RESERV', 1),
(CONV('8200',16,10), 'LINUX-SWAP', 0),
(CONV('8300',16,10), 'LINUX', 1),
(CONV('8301',16,10), 'LINUX-RESERV', 1),
+(CONV('8302',16,10), 'LINUX', 1),
(CONV('8E00',16,10), 'LINUX-LVM', 1),
(CONV('A500',16,10), 'FREEBSD-DISK', 0),
(CONV('A501',16,10), 'FREEBSD-BOOT', 1),
(CONV('A502',16,10), 'FREEBSD-SWAP', 0),
(CONV('A503',16,10), 'FREEBSD', 1),
+(CONV('A504',16,10), 'FREEBSD', 1),
+(CONV('A901',16,10), 'NETBSD-SWAP', 0),
+(CONV('A902',16,10), 'NETBSD', 1),
+(CONV('A903',16,10), 'NETBSD', 1),
+(CONV('A904',16,10), 'NETBSD', 1),
+(CONV('A905',16,10), 'NETBSD', 1),
+(CONV('A906',16,10), 'NETBSD-RAID', 1),
(CONV('AB00',16,10), 'HFS-BOOT', 1),
(CONV('AF00',16,10), 'HFS', 1),
(CONV('AF01',16,10), 'HFS-RAID', 1),
+(CONV('AF02',16,10), 'HFS-RAID', 1),
(CONV('BE00',16,10), 'SOLARIS-BOOT', 1),
(CONV('BF00',16,10), 'SOLARIS', 1),
(CONV('BF01',16,10), 'SOLARIS', 1),
@@ -983,8 +1084,14 @@ INSERT INTO `tipospar` (`codpar`, `tipopar`, `clonable`) VALUES
(CONV('EF00',16,10), 'EFI', 1),
(CONV('EF01',16,10), 'MBR', 0),
(CONV('EF02',16,10), 'BIOS-BOOT', 0),
+(CONV('FB00',16,10), 'VMFS', 1),
+(CONV('FB01',16,10), 'VMFS-RESERV', 1),
+(CONV('FB02',16,10), 'VMFS-KRN', 1),
(CONV('FD00',16,10), 'LINUX-RAID', 1),
-(CONV('FFFF',16,10), 'UNKNOWN', 1);
+(CONV('FFFF',16,10), 'UNKNOWN', 1),
+(CONV('10000',16,10), 'LVM-LV', 1),
+(CONV('10010',16,10), 'ZFS-VOL', 1);
+
-- --------------------------------------------------------
@@ -992,7 +1099,8 @@ INSERT INTO `tipospar` (`codpar`, `tipopar`, `clonable`) VALUES
-- Estructura de tabla para la tabla `universidades`
--
-CREATE TABLE IF NOT EXISTS `universidades` (
+DROP TABLE IF EXISTS `universidades`;
+CREATE TABLE `universidades` (
`iduniversidad` int(11) NOT NULL AUTO_INCREMENT,
`nombreuniversidad` varchar(200) NOT NULL DEFAULT '',
`comentarios` text,
@@ -1004,7 +1112,7 @@ CREATE TABLE IF NOT EXISTS `universidades` (
--
INSERT INTO `universidades` (`iduniversidad`, `nombreuniversidad`, `comentarios`) VALUES
-(1, 'Universidad (Default)', 'Esta Universidad se crea automáticamentese en el proceso de instalación de OpenGnSys');
+(1, 'Universidad (Default)', 'Esta Universidad se crea automáticamentese en el proceso de instalación de OpenGnsys');
-- --------------------------------------------------------
@@ -1012,7 +1120,8 @@ INSERT INTO `universidades` (`iduniversidad`, `nombreuniversidad`, `comentarios`
-- Estructura de tabla para la tabla `urlimagesitems`
--
-CREATE TABLE IF NOT EXISTS `urlimagesitems` (
+DROP TABLE IF EXISTS `urlimagesitems`;
+CREATE TABLE `urlimagesitems` (
`idurlimagesitems` int(11) NOT NULL AUTO_INCREMENT,
`descripcion` varchar(250) NOT NULL DEFAULT '',
PRIMARY KEY (`idurlimagesitems`)
@@ -1029,14 +1138,16 @@ CREATE TABLE IF NOT EXISTS `urlimagesitems` (
-- Estructura de tabla para la tabla `usuarios`
--
-CREATE TABLE IF NOT EXISTS `usuarios` (
+DROP TABLE IF EXISTS `usuarios`;
+CREATE TABLE `usuarios` (
`idusuario` int(11) NOT NULL AUTO_INCREMENT,
`usuario` varchar(50) NOT NULL DEFAULT '',
- `pasguor` varchar(50) NOT NULL DEFAULT '',
+ `pasguor` varchar(56) NOT NULL DEFAULT '',
`nombre` varchar(200) DEFAULT NULL,
`email` varchar(200) DEFAULT NULL,
`ididioma` int(11) DEFAULT NULL,
`idtipousuario` tinyint(4) DEFAULT NULL,
+ `apikey` varchar(32) NOT NULL DEFAULT '',
PRIMARY KEY (`idusuario`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
@@ -1044,7 +1155,7 @@ CREATE TABLE IF NOT EXISTS `usuarios` (
-- Volcar la base de datos para la tabla `usuarios`
--
-INSERT INTO `usuarios` (`idusuario`, `usuario`, `pasguor`, `nombre`, `email`, `ididioma`, `idtipousuario`) VALUES
-(1, 'DBUSER', 'DBPASSWORD', 'Usuario de la base de datos MySql', '', 1, 1);
+INSERT INTO `usuarios` (`idusuario`, `usuario`, `pasguor`, `nombre`, `email`, `ididioma`, `idtipousuario`, `apikey`) VALUES
+(1, 'DBUSER', SHA2('DBPASSWORD', 224), 'Usuario de la base de datos MySql', '', 1, 1, 'APIKEY');
diff --git a/admin/Interface/CambiarAcceso b/admin/Interface/CambiarAcceso
index 50df9b49..b57cfcd2 100755
--- a/admin/Interface/CambiarAcceso
+++ b/admin/Interface/CambiarAcceso
@@ -6,7 +6,7 @@
# $1 modo (admin, user)
#______________________________________
-# Error si llamada no se realliza desde OpenGnSys Client.
+# Error si llamada no se realliza desde OpenGnsys Client.
PROG=$(basename $0)
CALLER=$(ogGetCaller)
if ! $(ogCheckStringInGroup "$CALLER" "CrearImagen ConsolaRemota CrearImagenBasica CrearSoftIncremental"); then
@@ -41,12 +41,14 @@ esac
# Desmontar repositorio y volver a montarlo con el modo adecuado.
umount $OGIMG
+# Unidad organizativa
+[ "$ogunit" != "" ] && OGUNIT="/$ogunit"
ogEcho info "$PROG: Montar repositorio $REPO por $PROTO en modo $1"
case "$PROTO" in
- nfs) mount -t nfs $REPOIP:$OGIMG $OGIMG -o $MODE ;;
+ nfs) mount -t nfs $REPOIP:$OGIMG$OGUNIT $OGIMG -o $MODE ;;
smb) PASS=$(grep "^[ ]*\(export \)\?OPTIONS=" /scripts/ogfunctions 2>&1 | \
sed 's/\(.*\)pass=\(\w*\)\(.*\)/\2/')
PASS=${PASS:-"og"}
- mount.cifs //$REPOIP/ogimages $OGIMG -o $MODE,serverino,acl,username=opengnsys,password=$PASS
+ mount.cifs //$REPOIP/ogimages$OGUNIT $OGIMG -o $MODE,serverino,acl,username=opengnsys,password=$PASS
esac
diff --git a/admin/Interface/Configurar b/admin/Interface/Configurar
index fcf77b95..554e52c9 100755
--- a/admin/Interface/Configurar
+++ b/admin/Interface/Configurar
@@ -12,7 +12,7 @@ echo " " > $OGLOGSESSION; echo " " > $OGLOGCOMMAND; echo " " > ${OGLOGCOMMAND}.t
# Registro de inicio de ejecución
ogEcho log session "$MSG_INTERFACE_START $0 $*"
-# Solo ejecutable por OpenGnSys Client.
+# Solo ejecutable por OpenGnsys Client.
PATH=$PATH:$(dirname $0)
PROG=$(basename $0)
@@ -78,7 +78,7 @@ for ((i=0; i<${#TBPRM[@]}; i++)); do
# Si se activa operación de formatear, componer datos de formateo.
if [ "$ope" == 1 ]; then
# Comprobamos que la particion y el s.f sean validos.
- ogCheckStringInGroup $cpt "EMPTY EXTENDED LINUX-LVM"
+ ogCheckStringInGroup $cpt "EMPTY EXTENDED LINUX-LVM LVM ZPOOL"
[ $? -ne 0 ] && TBF[par]="$sfi"
fi
# Obtener la partición mayor.
diff --git a/admin/Interface/CrearImagen b/admin/Interface/CrearImagen
index c3fa9b45..e3b21c7a 100755
--- a/admin/Interface/CrearImagen
+++ b/admin/Interface/CrearImagen
@@ -42,7 +42,7 @@ echo " " > $OGLOGSESSION; echo " " > $OGLOGCOMMAND; echo " " > ${OGLOGCOMMAND}.t
# Registro de inicio de ejecución
ogEcho log session "$MSG_INTERFACE_START $0 $*"
-# Solo ejecutable por OpenGnSys Client.
+# Solo ejecutable por OpenGnsys Client.
PATH=$PATH:$(dirname $0)
PROG=$(basename $0)
CALLER=$(ogGetCaller)
@@ -53,9 +53,16 @@ fi
# Valor por defecto para el repositorio.
REPO=${4:-"REPO"}
-[ "$REPO" == "$(ogGetRepoIp)" ] && REPO="REPO"
[ "$REPO" == "$(ogGetIpAddress)" ] && REPO="CACHE"
-[ "$REPO" == "CACHE" ] && REPO="CACHE"
+# Si es una ip y es distinta a la del recurso samba cambiamos de REPO.
+ogCheckIpAddress $REPO
+if [ $? == 0 -o $REPO == "REPO" ] ; then
+ # Unidad organizativa
+ [ "$ogunit" != "" ] && OGUNIT="$ogunit"
+ # Si falla el cambio -> salimos con error repositorio no valido
+ ogChangeRepo $REPO $OGUNIT || exit $(ogRaiseError $OG_ERR_NOTFOUND '$REPO'; echo $?)
+ REPO="REPO"
+fi
# Si el destino es REPO y el cliente no está en modo "admin"; activar repositorio para escritura,
if [ "$REPO" == "REPO" -a "$boot" != "admin" ]
@@ -65,11 +72,12 @@ then
[ $RETVAL -gt 0 ] && exit $RETVAL
fi
+ogEcho createImage "$1" "$2" "$4" /"$3"
# Si existe, ejecuta script personalizado "createImageCustom"; si no, llama al genérico "createImage".
if which createImageCustom &>/dev/null; then
- createImageCustom "$1" "$2" "$REPO" /"$3" &>> $OGLOGCOMMAND
+ createImageCustom "$1" "$2" "$4" /"$3" &>> $OGLOGCOMMAND
else
- createImage "$1" "$2" "$REPO" /"$3" &>> $OGLOGCOMMAND
+ createImage "$1" "$2" "$4" /"$3" &>> $OGLOGCOMMAND
fi
RETVAL=$?
diff --git a/admin/Interface/getConfiguration b/admin/Interface/getConfiguration
index 0979986d..ddfc3821 100755
--- a/admin/Interface/getConfiguration
+++ b/admin/Interface/getConfiguration
@@ -7,6 +7,10 @@
#_______________________________________________________________________________________________________________________________
+# No registrar los errores.
+export DEBUG="no"
+
+ser=$(ogGetSerialNumber)
cfg=""
disks=$(ogDiskToDev | wc -w)
for ((dsk=1; dsk<=$disks; dsk++)); do
@@ -18,10 +22,11 @@ for ((dsk=1; dsk<=$disks; dsk++)); do
MSDOS) ptt=1 ;;
GPT) ptt=2 ;;
LVM) ptt=3 ;;
+ ZPOOL) ptt=4 ;;
*) ptt=0 ;;
esac
# Información de disco (partición 0)
- cfg="$cfg$dsk:0:$ptt:::$(ogGetDiskSize $dsk);"
+ cfg="$cfg$dsk:0:$ptt:::$(ogGetDiskSize $dsk):0;"
for ((par=1;par<=$particiones;par++)); do
# Código del identificador de tipo de partición
cod=$(ogGetPartitionId $dsk $par 2>/dev/null)
@@ -33,14 +38,23 @@ for ((dsk=1; dsk<=$disks; dsk++)); do
tam=${tam:-"0"}
# Sistema operativo instalado
case "$fsi" in
- ""|EMPTY|CACHE|LINUX-SWAP|LINUX-LVM)
- soi="" ;;
- *) soi=$(getOsVersion $dsk $par 2>/dev/null | cut -f2 -d:)
- # Sistema de archivos para datos (sistema operativo "DATA")
- [ -z "$soi" -a "$fsi" != "EMPTY" -a "$fsi" != "CACHE" ] && soi="DATA"
+ ""|EMPTY|LINUX-SWAP|LINUX-LVM|ZVOL)
+ soi=""; uso=0 ;;
+ *) if [ -n "$(ogMount $dsk $par 2>/dev/null)" ]; then
+ soi=$(getOsVersion $dsk $par 2>/dev/null | cut -f2 -d:)
+ # Hacer un 2º intento para algunos casos especiales.
+ [ -z "$soi" ] && soi=$(getOsVersion $dsk $par 2>/dev/null | cut -f2 -d:)
+ # Sistema de archivos para datos (sistema operativo "DATA")
+ [ -z "$soi" -a "$fsi" != "EMPTY" -a "$fsi" != "CACHE" ] && soi="DATA"
+ # Obtener porcentaje de uso.
+ uso=$(df $(ogGetMountPoint $dsk $par) | awk '{getline; printf "%d",$5}')
+ uso=${uso:0}
+ else
+ soi=""; uso=0
+ fi
;;
esac
- cfg="$cfg$dsk:$par:$cod:$fsi:$soi:$tam;"
+ cfg="$cfg$dsk:$par:$cod:$fsi:$soi:$tam:$uso;"
done
done
@@ -49,7 +63,7 @@ done
# Guardar salida en fichero temporal.
cfgfile=/tmp/getconfig
-echo $cfg > $cfgfile
+echo "${ser:+$ser;}$cfg" > $cfgfile
# Crear el menú por defecto a partir del fichero generado (no dar ninguna salida).
generateMenuDefault &>/dev/null
@@ -57,9 +71,18 @@ generateMenuDefault &>/dev/null
# Componer salida formateada.
awk '{ n=split($0,sep,";");
for (i=1; i<n; i++){
- split (sep[i],dua,":");
- printf ("disk=%s\tpar=%s\tcpt=%s\tfsi=%s\tsoi=%s\ttam=%s\n",
- dua[1],dua[2],dua[3],dua[4],dua[5],dua[6]);
+ c=split (sep[i],dua,":");
+ if (i==1 && c==1)
+ printf ("ser=%s\n", dua[1]);
+ else
+ printf ("disk=%s\tpar=%s\tcpt=%s\tfsi=%s\tsoi=%s\ttam=%s\tuso=%s\n",
+ dua[1],dua[2],dua[3],dua[4],dua[5],dua[6],dua[7]);
}
}' $cfgfile
+# Borramos marcas de arranque de Windows
+rm -f /mnt/*/ogboot.* /mnt/*/*/ogboot.*
+
+# Volver a registrar los errores.
+unset DEBUG
+
diff --git a/admin/Sources/Clients/README.es.txt b/admin/Sources/Clients/README.es.txt
new file mode 100644
index 00000000..56900d80
--- /dev/null
+++ b/admin/Sources/Clients/README.es.txt
@@ -0,0 +1,9 @@
+OpenGnsys Services for Clients README
+=======================================
+
+
+Este directorio contiene el código fuente de los servicios OpenGnsys específicos para clientes.
+
+- ogAdmClient servicio para cliente ogLive que atiende peticiones de OpenGnsys Server
+- ogagent OGAgent: agente modular para sistemas operativos con API REST
+
diff --git a/admin/Sources/Clients/ogAdmClient/Makefile b/admin/Sources/Clients/ogAdmClient/Makefile
index d3628c9d..df458ae2 100644
--- a/admin/Sources/Clients/ogAdmClient/Makefile
+++ b/admin/Sources/Clients/ogAdmClient/Makefile
@@ -8,8 +8,8 @@ DIRS :=
LIBS := -static
# Opciones de compilacion
-OPCS := -m32 -O0 -g -Wall # Depuracion
-#OPCS := -m32 -O3 -Wall # Optimizacion
+#OPCS := -m32 -O0 -g -Wall # Depuracion
+OPCS := -m32 -O3 -Wall # Optimizacion
# Ficheros objetos
OBJS := sources/ogAdmClient.o
@@ -18,7 +18,7 @@ all: $(PROYECTO)
$(PROYECTO): $(OBJS)
gcc $(OPCS) $(DIRS) $(LIBS) $(OBJS) -o $(PROYECTO)
-# strip $(PROYECTO) # Optimizacion
+ strip $(PROYECTO) # Optimizacion
clean:
rm -f $(PROYECTO) $(OBJS)
diff --git a/admin/Sources/Clients/ogAdmClient/sources/ogAdmClient.c b/admin/Sources/Clients/ogAdmClient/sources/ogAdmClient.c
index 64d5cc6e..9035e81a 100644
--- a/admin/Sources/Clients/ogAdmClient/sources/ogAdmClient.c
+++ b/admin/Sources/Clients/ogAdmClient/sources/ogAdmClient.c
@@ -634,6 +634,7 @@ char* LeeConfiguracion()
{
char* parametroscfg;
char modulo[] = "LeeConfiguracion()";
+ int herrorcfg;
// Reservar memoria para los datos de cofiguracin.
parametroscfg=(char*)reservaMemoria(LONGITUD_SCRIPTSALIDA);
@@ -643,9 +644,9 @@ char* LeeConfiguracion()
}
// Ejecutar script y obtener datos.
sprintf(interface,"%s/%s",pathinterface,"getConfiguration");
- herror=interfaceAdmin(interface,NULL,parametroscfg);
+ herrorcfg=interfaceAdmin(interface,NULL,parametroscfg);
- if(herror){ // No se puede recuperar la configuracin del cliente
+ if(herrorcfg){ // No se puede recuperar la configuracin del cliente
liberaMemoria(parametroscfg);
errorLog(modulo,36,FALSE);
return(NULL);
@@ -1286,8 +1287,8 @@ BOOLEAN CrearImagenBasica(TRAMA* ptrTrama)
bpc=copiaParametro("bpc",ptrTrama); // Borrarla de la cache antes de copiarla en ella
nba=copiaParametro("nba",ptrTrama); // No borrar archivos en destino
- //muestraMensaje(7,NULL); // Creando Inventario Software
- //if(InventariandoSoftware(ptrTrama,FALSE,"InventarioSoftware")){ // Crea inventario Software previamente
+ muestraMensaje(7,NULL); // Creando Inventario Software
+ if(InventariandoSoftware(ptrTrama,FALSE,"InventarioSoftware")){ // Crea inventario Software previamente
muestraMensaje(30,NULL);// Creando Imagen Bsica, por favor espere...
sprintf(interface,"%s/%s",pathinterface,nfn);
sprintf(parametros,"%s %s %s %s %s %s%s%s %s%s%s%s %s %s",nfn,dsk,par,nci,ipr,whl,eli,cmp,bpi,cpc,bpc,nba,msy,rti);
@@ -1299,11 +1300,11 @@ BOOLEAN CrearImagenBasica(TRAMA* ptrTrama)
}
else
muestraMensaje(28,NULL);// El proceso de creacin de imagen bsica ha terminado correctamente
- //}
- //else{
- // sprintf(msglog,"%s:%s",tbErrores[86],nfn);
- // errorInfo(modulo,msglog);
- //}
+ }
+ else{
+ sprintf(msglog,"%s:%s",tbErrores[86],nfn);
+ errorInfo(modulo,msglog);
+ }
ids=copiaParametro("ids",ptrTrama); // Identificador de la sesin
@@ -1386,8 +1387,8 @@ BOOLEAN CrearSoftIncremental(TRAMA* ptrTrama)
bpc=copiaParametro("bpc",ptrTrama); // Borrarla de la cache antes de copiarla en ella
nba=copiaParametro("nba",ptrTrama); // No borrar archivos en destino
-// muestraMensaje(7,NULL); // Creando Inventario Software
-// if(InventariandoSoftware(ptrTrama,FALSE,"InventarioSoftware")){ // Crea inventario Software previamente
+ muestraMensaje(7,NULL); // Creando Inventario Software
+ if(InventariandoSoftware(ptrTrama,FALSE,"InventarioSoftware")){ // Crea inventario Software previamente
muestraMensaje(25,NULL);// Creando Imagen Incremental, por favor espere...
sprintf(interface,"%s/%s",pathinterface,nfn);
sprintf(parametros,"%s %s %s %s %s %s %s%s%s %s%s%s%s %s %s",nfn,dsk,par,nci,ipr,ncf,whl,eli,cmp,bpi,cpc,bpc,nba,msy,rti);
@@ -1400,11 +1401,11 @@ BOOLEAN CrearSoftIncremental(TRAMA* ptrTrama)
}
else
muestraMensaje(26,NULL);// El proceso de creacin de imagen incremental ha terminado correctamente
-// }
-// else{
-// sprintf(msglog,"%s:%s",tbErrores[86],nfn);
-// errorInfo(modulo,msglog);
-// }
+ }
+ else{
+ sprintf(msglog,"%s:%s",tbErrores[86],nfn);
+ errorInfo(modulo,msglog);
+ }
ids=copiaParametro("ids",ptrTrama); // Identificador de la sesin
@@ -1453,7 +1454,7 @@ BOOLEAN CrearSoftIncremental(TRAMA* ptrTrama)
BOOLEAN RestaurarImagen(TRAMA* ptrTrama)
{
int lon;
- char *nfn,*dsk,*par,*idi,*ipr,*ifs,*nci,*ids,*ptc,msglog[LONSTD];
+ char *nfn,*dsk,*par,*idi,*ipr,*ifs,*cfg,*nci,*ids,*ptc,msglog[LONSTD];
char modulo[] = "RestaurarImagen()";
if (ndebug>=DEBUG_MAXIMO) {
@@ -1483,6 +1484,11 @@ BOOLEAN RestaurarImagen(TRAMA* ptrTrama)
else
muestraMensaje(11,NULL);
+ /* Obtener nueva configuracin */
+ cfg=LeeConfiguracion();
+ if(!cfg){ // No se puede recuperar la configuracin del cliente
+ errorLog(modulo,36,FALSE);
+ }
/* Envia respuesta de ejecucin de la funcin de interface */
initParametros(ptrTrama,0);
@@ -1491,6 +1497,7 @@ BOOLEAN RestaurarImagen(TRAMA* ptrTrama)
lon+=sprintf(ptrTrama->parametros+lon,"dsk=%s\r",dsk); // Nmero de disco
lon+=sprintf(ptrTrama->parametros+lon,"par=%s\r",par); // Nmero de particin
lon+=sprintf(ptrTrama->parametros+lon,"ifs=%s\r",ifs); // Identificador del perfil software
+ lon+=sprintf(ptrTrama->parametros+lon,"cfg=%s\r",cfg); // Configuracin de discos
respuestaEjecucionComando(ptrTrama,herror,ids);
liberaMemoria(nfn);
@@ -1500,6 +1507,7 @@ BOOLEAN RestaurarImagen(TRAMA* ptrTrama)
liberaMemoria(nci);
liberaMemoria(ipr);
liberaMemoria(ifs);
+ liberaMemoria(cfg);
liberaMemoria(ptc);
liberaMemoria(ids);
@@ -1521,7 +1529,7 @@ BOOLEAN RestaurarImagen(TRAMA* ptrTrama)
BOOLEAN RestaurarImagenBasica(TRAMA* ptrTrama)
{
int lon;
- char *nfn,*dsk,*par,*idi,*ipr,*met,*nci,*rti,*ifs,*msy,*whl,*eli,*cmp,*tpt,*bpi,*cpc,*bpc,*nba,*ids,msglog[LONSTD];
+ char *nfn,*dsk,*par,*idi,*ipr,*met,*nci,*rti,*ifs,*cfg,*msy,*whl,*eli,*cmp,*tpt,*bpi,*cpc,*bpc,*nba,*ids,msglog[LONSTD];
char modulo[] = "RestaurarImagenBasica()";
if (ndebug>=DEBUG_MAXIMO) {
@@ -1544,8 +1552,6 @@ BOOLEAN RestaurarImagenBasica(TRAMA* ptrTrama)
eli=copiaParametro("eli",ptrTrama); // Elimiar archivos en destino que no estn en origen
cmp=copiaParametro("cmp",ptrTrama); // Comprimir antes de enviar
-
-
bpi=copiaParametro("bpi",ptrTrama); // Borrar la imagen antes de crearla
cpc=copiaParametro("cpc",ptrTrama); // Copiar tambin imagen a la cache
bpc=copiaParametro("bpc",ptrTrama); // Borrarla de la cache antes de copiarla en ella
@@ -1565,6 +1571,12 @@ BOOLEAN RestaurarImagenBasica(TRAMA* ptrTrama)
else
muestraMensaje(32,NULL);
+ /* Obtener nueva configuracin */
+ cfg=LeeConfiguracion();
+ if(!cfg){ // No se puede recuperar la configuracin del cliente
+ errorLog(modulo,36,FALSE);
+ }
+
/* Envia respuesta de ejecucin de la funcin de interface */
initParametros(ptrTrama,0);
lon=sprintf(ptrTrama->parametros,"nfn=%s\r","RESPUESTA_RestaurarImagenBasica");
@@ -1572,33 +1584,35 @@ BOOLEAN RestaurarImagenBasica(TRAMA* ptrTrama)
lon+=sprintf(ptrTrama->parametros+lon,"dsk=%s\r",dsk); // Nmero de disco
lon+=sprintf(ptrTrama->parametros+lon,"par=%s\r",par); // Nmero de particin
lon+=sprintf(ptrTrama->parametros+lon,"ifs=%s\r",ifs); // Identificador del perfil software
+ lon+=sprintf(ptrTrama->parametros+lon,"cfg=%s\r",cfg); // Configuracin de discos
respuestaEjecucionComando(ptrTrama,herror,ids);
-
- liberaMemoria(nfn);
- liberaMemoria(dsk);
- liberaMemoria(par);
- liberaMemoria(idi);
- liberaMemoria(nci);
- liberaMemoria(rti);
- liberaMemoria(ifs);
- liberaMemoria(ipr);
+
+ liberaMemoria(nfn);
+ liberaMemoria(dsk);
+ liberaMemoria(par);
+ liberaMemoria(idi);
+ liberaMemoria(nci);
+ liberaMemoria(rti);
+ liberaMemoria(ifs);
+ liberaMemoria(cfg);
+ liberaMemoria(ipr);
liberaMemoria(met);
- liberaMemoria(tpt);
- liberaMemoria(msy);
+ liberaMemoria(tpt);
+ liberaMemoria(msy);
- liberaMemoria(whl);
- liberaMemoria(eli);
- liberaMemoria(cmp);
+ liberaMemoria(whl);
+ liberaMemoria(eli);
+ liberaMemoria(cmp);
- liberaMemoria(bpi);
- liberaMemoria(cpc);
- liberaMemoria(bpc);
+ liberaMemoria(bpi);
+ liberaMemoria(cpc);
+ liberaMemoria(bpc);
liberaMemoria(nba);
- liberaMemoria(ids);
+ liberaMemoria(ids);
muestraMenu();
-
+
return(TRUE);
}
//______________________________________________________________________________________________________
diff --git a/admin/Sources/Clients/ogAdmLnxClient/Makefile b/admin/Sources/Clients/ogAdmLnxClient/Makefile
deleted file mode 100644
index bc2fe3a9..00000000
--- a/admin/Sources/Clients/ogAdmLnxClient/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-# makefile
-
-# Nombre del proyecto
-PROYECTO := ogAdmLnxClient
-
-# Directorios y librerias
-DIRS :=
-LIBS := -static
-
-# Opciones de compilacion
-#OPCS := -m32 -O0 -g -Wall # Depuracion
-OPCS := -m32 -O3 -Wall # Optimizacion
-
-# Ficheros objetos
-OBJS := sources/ogAdmLnxClient.o
-
-all: $(PROYECTO)
-
-$(PROYECTO): $(OBJS)
- g++ $(OPCS) $(DIRS) $(LIBS) $(OBJS) -o $(PROYECTO)
- strip $(PROYECTO) # Optimizacion
-
-clean:
- rm $(PROYECTO) $(OBJS)
-
-sources/%.o: sources/%.cpp
- g++ $(OPCS) -c -o"$@" "$<"
-
-sources/%.o: sources/%.c
- gcc $(OPCS) -I ../../Includes -c -o"$@" "$<"
-
-
-
-
diff --git a/admin/Sources/Clients/ogAdmLnxClient/ogAdmLnxClient.cfg b/admin/Sources/Clients/ogAdmLnxClient/ogAdmLnxClient.cfg
deleted file mode 100644
index 80d69686..00000000
--- a/admin/Sources/Clients/ogAdmLnxClient/ogAdmLnxClient.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-ServidorAdm=Direccin IP del servidor de administracin
-PUERTO=Puerto del servidor de administracin
-IPLOCAL=Direccin IP local
-
diff --git a/admin/Sources/Clients/ogAdmLnxClient/sources/ogAdmLnxClient.c b/admin/Sources/Clients/ogAdmLnxClient/sources/ogAdmLnxClient.c
deleted file mode 100644
index 0c4c431e..00000000
--- a/admin/Sources/Clients/ogAdmLnxClient/sources/ogAdmLnxClient.c
+++ /dev/null
@@ -1,499 +0,0 @@
-// ********************************************************************************************************
-// Cliernte: ogAdmLnxClient
-// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
-// Fecha Creación: Febrero-2012
-// Fecha Última modificación: Febrero-2012
-// Nombre del fichero: ogAdmLnxClient.c
-// Descripción :Este fichero implementa el cliente windows del sistema
-// ********************************************************************************************************
-#include "ogAdmLnxClient.h"
-#include "ogAdmLib.c"
-
-// ________________________________________________________________________________________________________
-// Función: EjecutarScript
-//
-// Descripción:
-// Ejecuta código de script
-// Parámetros:
-// ptrTrama: contenido del mensaje
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algún error
-//______________________________________________________________________________________________________
-BOOLEAN EjecutarScript(TRAMA* ptrTrama)
-{
- int lon,resul,res;
- char *nfn,*ids,*cod,*scp,msglog[LONSTD];
- char modulo[] = "EjecutarScript()";
-
-
- if (ndebug>=DEBUG_MAXIMO) {
- sprintf(msglog, "%s:%s",tbMensajes[21],modulo);
- infoDebug(msglog);
- }
-
- nfn=copiaParametro("nfn",ptrTrama);
- ids=copiaParametro("ids",ptrTrama);
-
- scp=copiaParametro("scp",ptrTrama);
- cod=URLDecode(scp);
-
- res=0;
- /* Nombre del archivo de script */
- char filescript[LONPRM];
- sprintf(filescript,"/tmp/_script_%s",IPlocal);
- if(!escribeArchivo(filescript,cod)){
- errorLog(modulo, 52, FALSE);
- res=52; // Error al crear fichero de comandos
- }
-
- if(res==0){
- sprintf(filescript,"chmod 0777 /tmp/_script_%s",IPlocal);
-
- resul=system(filescript);
- if (resul==0) {
- sprintf(filescript,"/tmp/_script_%s",IPlocal);
- resul=system(filescript);
- if (resul>0) {
- errorLog(modulo, 86, FALSE);
- }
- }
- }
-
- initParametros(ptrTrama,0);
- lon=sprintf(ptrTrama->parametros,"nfn=%s\r","RESPUESTA_EjecutarScript");
- respuestaEjecucionComando(ptrTrama,resul,ids);
- return(TRUE);
-}
-//________________________________________________________________________________________________________
-// Función: tomaConfiguracion
-//
-// Descripción:
-// Lee el fichero de configuración del servicio
-// Parámetros:
-// filecfg : Ruta completa al fichero de configuración
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algún error
-//________________________________________________________________________________________________________
-BOOLEAN tomaConfiguracion(char* filecfg)
-{
- char modulo[] = "tomaConfiguracion()";
-
- if (filecfg == NULL || strlen(filecfg) == 0) {
- errorLog(modulo, 1, FALSE); // Fichero de configuración del cliente vacío
- return (FALSE);
- }
- FILE *fcfg;
- int lSize;
- char * buffer, *lineas[MAXPRM], *dualparametro[2];
- int i, numlin, resul;
-
- fcfg = fopen(filecfg, "rt");
- if (fcfg == NULL) {
- errorLog(modulo, 2, FALSE); // No existe fichero de configuración del cliente
- return (FALSE);
- }
-
- fseek(fcfg, 0, SEEK_END);
- lSize = ftell(fcfg); // Obtiene tamaño del fichero.
- rewind(fcfg);
- buffer = (char*) reservaMemoria(lSize+1); // Toma memoria para el buffer de lectura.
- if (buffer == NULL) { // No hay memoria suficiente para el buffer
- errorLog(modulo, 3, FALSE);
- return (FALSE);
- }
- lSize=fread(buffer, 1, lSize, fcfg); // Lee contenido del fichero
- buffer[lSize]=CHARNULL;
- fclose(fcfg);
-
- /* Inicializar variables globales */
- servidoradm[0]=CHARNULL;
- puerto[0] = CHARNULL;
- IPlocal[0]=CHARNULL;
-
- numlin = splitCadena(lineas, buffer, '\n');
- for (i = 0; i < numlin; i++){
- splitCadena(dualparametro, lineas[i], '=');
-
- resul = strcmp(StrToUpper(dualparametro[0]), "SERVIDORADM");
- if (resul == 0)
- strcpy(servidoradm, dualparametro[1]);
-
- resul = strcmp(StrToUpper(dualparametro[0]), "PUERTO");
- if (resul == 0)
- strcpy(puerto, dualparametro[1]);
-
- resul = strcmp(StrToUpper(dualparametro[0]), "IPLOCAL");
- if (resul == 0)
- strcpy(IPlocal, dualparametro[1]);
- }
-
- if (servidoradm[0] == CHARNULL) {
- errorLog(modulo,4, FALSE); // Falta parámetro SERVIDORADM
- return (FALSE);
- }
-
- if (puerto[0] == CHARNULL) {
- errorLog(modulo,5, FALSE); // Falta parámetro PUERTO
- return (FALSE);
- }
- if (IPlocal[0] == CHARNULL) {
- errorLog(modulo, 92, FALSE); // Falta parámetro IPLOCAL
- return (FALSE);
- }
- return (TRUE);
-}
-//______________________________________________________________________________________________________
-// Función: InclusionClienteWinLnx
-// Descripción:
-// Abre una sesión en el servidor de administración y registra al cliente en el sistema
-// Parámetros:
-// Ninguno
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algún error
-//______________________________________________________________________________________________________
-BOOLEAN InclusionClienteWinLnx(TRAMA* ptrTrama)
-{
- int lon;
- SOCKET socket_c;
- char modulo[] = "InclusionClienteWinLnx()";
-
- initParametros(ptrTrama,0);
- lon=sprintf(ptrTrama->parametros,"nfn=InclusionClienteWinLnx\r"); // Nombre de la función a ejecutar en el servidor
-
- if(!enviaMensajeServidor(&socket_c,ptrTrama,MSG_PETICION)){
- errorLog(modulo,37,FALSE);
- return(FALSE);
- }
- ptrTrama=recibeMensaje(&socket_c);
- if(!ptrTrama){
- errorLog(modulo,22,FALSE);
- return(FALSE);
- }
- close(socket_c);
-
- if(!gestionaTrama(ptrTrama)){ // Análisis de la trama
- errorLog(modulo,39,FALSE);
- return(FALSE);
- }
-
- return(TRUE);
-}
-//______________________________________________________________________________________________________
-// Función: RESPUESTA_InclusionClienteWinLnx
-//
-// Descripción:
-// Respuesta del servidor de administración a la petición de inicio
-// enviando los datos identificativos del cliente
-// Parámetros:
-// - ptrTrama: Trama recibida por el servidor con el contenido y los parámetros
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algún error
-//______________________________________________________________________________________________________
-BOOLEAN RESPUESTA_InclusionClienteWinLnx(TRAMA* ptrTrama)
-{
- char* res;
- char modulo[] = "RESPUESTA_InclusionClienteWinLnx()";
- int err;
-
- res=copiaParametro("res",ptrTrama); // Resultado del proceso de inclusión
- err=(int)atoi(res); // Código de error devuelto por el servidor
- if(err>0){ // Error en el proceso de inclusión
- errorLog(modulo,41,FALSE);
- errorLog(modulo,err,FALSE);
- return (FALSE);
- }
- strcpy(idordenador,copiaParametro("ido",ptrTrama)); // Identificador del ordenador
- strcpy(nombreordenador,copiaParametro("npc",ptrTrama)); // Nombre del ordenador
-
- if(idordenador==NULL || nombreordenador==NULL){
- errorLog(modulo,40,FALSE);
- return (FALSE);
- }
- return(TRUE);
-}
-//______________________________________________________________________________________________________
-// Función: ProcesaComandos
-//
-// Descripción:
-// Espera comando desde el Servidor de Administración para ejecutarlos
-// Parámetros:
-// Ninguno
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algún error
-// ________________________________________________________________________________________________________
-void procesaComandos(TRAMA* ptrTrama)
-{
- int lon;
- SOCKET socket_c;
- char modulo[] = "procesaComandos()";
-
- initParametros(ptrTrama,0);
- while(TRUE){
- lon=sprintf(ptrTrama->parametros,"nfn=DisponibilidadComandos\r");
- lon+=sprintf(ptrTrama->parametros+lon,"tpc=%s\r",CLIENTE_LNX); // Activar disponibilidad
- if(!enviaMensajeServidor(&socket_c,ptrTrama,MSG_INFORMACION)){
- errorLog(modulo,43,FALSE);
- return;
- }
- infoLog(19); // Disponibilidad de cliente activada
- ptrTrama=recibeMensaje(&socket_c);
- if(!ptrTrama){
- errorLog(modulo,46,FALSE);
- return;
- }
-
- close(socket_c);
-
- if(!gestionaTrama(ptrTrama)){ // Análisis de la trama
- errorLog(modulo,39,FALSE);
- return;
- }
- }
-}
-//_____________________________________________________________________________________________________
-// Función: Apagar
-//
-// Descripción:
-// Apaga el cliente
-// Parámetros:
-// ptrTrama: contenido del mensaje
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algún error
-//_____________________________________________________________________________________________________
-BOOLEAN Apagar(TRAMA* ptrTrama)
-{
- int lon;
- char *ids,msglog[LONSTD];
- char modulo[] = "Apagar()";
-
- if (ndebug>=DEBUG_MAXIMO) {
- sprintf(msglog, "%s:%s",tbMensajes[21],modulo);
- infoDebug(msglog);
- }
- ids=copiaParametro("ids",ptrTrama);
-
- initParametros(ptrTrama,0);
- lon=sprintf(ptrTrama->parametros,"nfn=%s\r","RESPUESTA_Apagar");
- respuestaEjecucionComando(ptrTrama,0,ids);
-
- system("shutdown -h now");
- return(TRUE);
-}
-//_____________________________________________________________________________________________________
-// Función: Reiniciar
-//
-// Descripción:
-// Apaga el cliente
-// Parámetros:
-// ptrTrama: contenido del mensaje
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algún errorservidoradm
-//_____________________________________________________________________________________________________
-BOOLEAN Reiniciar(TRAMA* ptrTrama)
-{
- int lon;
- char *ids,msglog[LONSTD];
- char modulo[] = "Reiniciar()";
-
- if (ndebug>=DEBUG_MAXIMO) {
- sprintf(msglog, "%s:%s",tbMensajes[21],modulo);
- infoDebug(msglog);
- }
- ids=copiaParametro("ids",ptrTrama);
-
- initParametros(ptrTrama,0);
- lon=sprintf(ptrTrama->parametros,"nfn=%s\r","RESPUESTA_Reiniciar");
- respuestaEjecucionComando(ptrTrama,0,ids);
-
- system("shutdown -r now");
-
- return(TRUE);
-}
-//______________________________________________________________________________________________________
-// Función: Sondeo
-//
-// Descripción:
-// Envía al servidor una confirmación de que está dentro del sistema
-// Parámetros:
-// ptrTrama: contenido del mensajede
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algún error
-//______________________________________________________________________________________________________
-BOOLEAN Sondeo(TRAMA* ptrTrama)
-{
- return(TRUE);
-}
-//______________________________________________________________________________________________________
-// Función: respuestaEjecucionComando
-//
-// Descripción:
-// Envia una respuesta a una ejecucion de comando al servidor de Administración
-// Parámetros:
-// - ptrTrama: contenido del mensaje
-// - res: Resultado de la ejecución (Código de error devuelto por el script ejecutado)
-// - ids: Identificador de la sesion (En caso de no haber seguimiento es NULO)
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algún error
-// ________________________________________________________________________________________________________
-BOOLEAN respuestaEjecucionComando(TRAMA* ptrTrama,int res,char *ids)
-{
- int lon;
- SOCKET socket_c;
- char modulo[] = "respuestaEjecucionComando()";
-
- lon=strlen(ptrTrama->parametros);
- if(ids){ // Existe seguimiento
- lon+=sprintf(ptrTrama->parametros+lon,"ids=%s\r",ids); // Añade identificador de la sesión
- }
- if (res==0){ // Resultado satisfactorio
- lon+=sprintf(ptrTrama->parametros+lon,"res=%s\r","1");
- lon+=sprintf(ptrTrama->parametros+lon,"der=%s\r","");
- }
- else{ // Algún error
- lon+=sprintf(ptrTrama->parametros+lon,"res=%s\r","2");
- lon+=sprintf(ptrTrama->parametros+lon,"der=(Errno:%d)-%s\r",res,tbErrores[res]);// Descripción del error
- }
- if(!(enviaMensajeServidor(&socket_c,ptrTrama,MSG_NOTIFICACION))){
- errorLog(modulo,44,FALSE);
- return(FALSE);
- }
- close(socket_c);
- return(TRUE);
-}
-// ________________________________________________________________________________________________________
-// Función: gestionaTrama
-//
-// Descripción:
-// Procesa las tramas recibidas.servidoradm
-// Parametros:
-// ptrTrama: contenido del mensaje
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algún error
-// ________________________________________________________________________________________________________
-BOOLEAN gestionaTrama(TRAMA *ptrTrama)
-{
- int i, res;
- char *nfn;
- char modulo[] = "gestionaTrama()";
-
- INTROaFINCAD(ptrTrama);
- nfn = copiaParametro("nfn", ptrTrama); // Toma nombre de función
-
- for (i = 0; i < MAXIMAS_FUNCIONES; i++) { // Recorre funciones que procesan las tramas
- res = strcmp(tbfuncionesClient[i].nf, nfn);
- if (res == 0) { // Encontrada la función que procesa el mensaje
- return(tbfuncionesClient[i].fptr(ptrTrama)); // Invoca la función
- }
- }
- errorLog(modulo, 18, FALSE);
- return (FALSE);
-}
-//______________________________________________________________________________________________________
-// Función: enviaMensajeServidor
-//
-// Descripción:
-// Envia un mensaje al servidor de Administración
-// Parámetros:
-// - socket_c: (Salida) Socket utilizado para el envío
-// - ptrTrama: contenido del mensaje
-// - tipo: Tipo de mensaje
-// C=Comando, N=Respuesta a un comando, P=Peticion,R=Respuesta a una petición, I=Informacion
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algún error
-// ________________________________________________________________________________________________________
-BOOLEAN enviaMensajeServidor(SOCKET *socket_c,TRAMA *ptrTrama,char tipo)
-{
- int lon;
- char modulo[] = "enviaMensajeServidor()";
-
- *socket_c=abreConexion();
- if(*socket_c==INVALID_SOCKET){
- errorLog(modulo,38,FALSE); // Error de conexión con el servidor
- return(FALSE);
- }
- ptrTrama->arroba='@'; // Cabecera de la trama
- strncpy(ptrTrama->identificador,"JMMLCAMDJ_MCDJ",14); // identificador de la trama
- ptrTrama->tipo=tipo; // Tipo de mensaje
- lon=strlen(ptrTrama->parametros); // Compone la trama
- lon+=sprintf(ptrTrama->parametros+lon,"iph=%s\r",IPlocal); // Ip del ordenador
- lon+=sprintf(ptrTrama->parametros+lon,"ido=%s\r",idordenador); // Identificador del ordenador
- lon+=sprintf(ptrTrama->parametros+lon,"npc=%s\r",nombreordenador); // Nombre del ordenador
-
- if (!mandaTrama(socket_c,ptrTrama)) {
- errorLog(modulo,26,FALSE);
- return (FALSE);
- }
- return(TRUE);
-}
-// ********************************************************************************************************
-// PROGRAMA PRINCIPAL (CLIENTE)
-// ********************************************************************************************************
-int main(int argc, char *argv[])
-{
- TRAMA *ptrTrama;
- char modulo[] = "main()";
-
- ptrTrama=(TRAMA *)reservaMemoria(sizeof(TRAMA));
- if (ptrTrama == NULL) { // No hay memoria suficiente para el bufer de las tramas
- errorLog(modulo, 3, FALSE);
- exit(EXIT_FAILURE);
- }
- /*--------------------------------------------------------------------------------------------------------
- Validación de parámetros de ejecución y fichero de configuración
- ---------------------------------------------------------------------------------------------------------*/
- /*--------------------------------------------------------------------------------------------------------
- Validación de parámetros de ejecución y fichero de configuración
- ---------------------------------------------------------------------------------------------------------*/
- if (!validacionParametros(argc, argv,7)) // Valida parámetros de ejecución
- exit(EXIT_FAILURE);
-
- if (!tomaConfiguracion(szPathFileCfg)) // Toma parametros de configuración
- exit(EXIT_FAILURE);
-
- /*--------------------------------------------------------------------------------------------------------
- Carga catálogo de funciones que procesan las tramas
- ---------------------------------------------------------------------------------------------------------*/
- int cf = 0;
-
- strcpy(tbfuncionesClient[cf].nf, "RESPUESTA_InclusionClienteWinLnx");
- tbfuncionesClient[cf++].fptr = &RESPUESTA_InclusionClienteWinLnx;
-
- strcpy(tbfuncionesClient[cf].nf, "Apagar");
- tbfuncionesClient[cf++].fptr = &Apagar;
-
- strcpy(tbfuncionesClient[cf].nf, "Reiniciar");
- tbfuncionesClient[cf++].fptr = &Reiniciar;
-
- strcpy(tbfuncionesClient[cf].nf, "Sondeo");
- tbfuncionesClient[cf++].fptr = &Sondeo;
-
- strcpy(tbfuncionesClient[cf].nf, "EjecutarScript");
- tbfuncionesClient[cf++].fptr = &EjecutarScript;
-
- /*--------------------------------------------------------------------------------------------------------
- Inicio de sesión
- ---------------------------------------------------------------------------------------------------------*/
- infoLog(1); // Inicio de sesión
- infoLog(3); // Abriendo sesión en el servidor de Administración;
- /*--------------------------------------------------------------------------------------------------------
- Inclusión del cliente en el sistema
- ---------------------------------------------------------------------------------------------------------*/
- if(!InclusionClienteWinLnx(ptrTrama)){ // Ha habido algún problema al abrir sesión
- errorLog(modulo,0,FALSE);
- exit(EXIT_FAILURE);
- }
- infoLog(4); // Cliente iniciado
- procesaComandos(ptrTrama); // Bucle para procesar comandos interactivos
- exit(EXIT_SUCCESS);
-}
diff --git a/admin/Sources/Clients/ogAdmLnxClient/sources/ogAdmLnxClient.h b/admin/Sources/Clients/ogAdmLnxClient/sources/ogAdmLnxClient.h
deleted file mode 100644
index 8371d2e4..00000000
--- a/admin/Sources/Clients/ogAdmLnxClient/sources/ogAdmLnxClient.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// ********************************************************************************************************
-// Cliernte: ogAdmLnxClient
-// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
-// Fecha Creación: Marzo-2010
-// Fecha Última modificación: Marzo-2010
-// Nombre del fichero: ogAdmLnxClient.h
-// Descripción :Este fichero implementa el cliente general del sistema
-// ********************************************************************************************************
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-#include <unistd.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/wait.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <signal.h>
-#include "ogAdmLib.h"
-// ________________________________________________________________________________________________________
-// Variables globales
-// ________________________________________________________________________________________________________
-char idordenador[LONPRM]; // Identificador del ordenador
-char nombreordenador[LONPRM]; // Nombre del ordenador
-
-char servidoradm[LONPRM]; // Dirección IP del servidor de administración
-char puerto[LONPRM]; // Puerto de comunicación
-char IPlocal[LONPRM]; // Path donde está la interface entre la administración y el módulo de clonación
-
-
-typedef struct{ // Estructura usada para referenciar las funciones que procesan las tramas
- char nf[LONFUN]; // Nombre de la función
- BOOLEAN (*fptr)(TRAMA*); // Puntero a la función que procesa la trama
-}MSGFUN;
-MSGFUN tbfuncionesClient[MAXIMAS_FUNCIONES];
-// ________________________________________________________________________________________________________
-// Prototipo de funciones
-// ________________________________________________________________________________________________________
-
-void procesaComandos(TRAMA*);
-BOOLEAN gestionaTrama(TRAMA *);
-BOOLEAN InclusionClienteWinLnx();
-BOOLEAN RESPUESTA_InclusionClienteWinLnx(TRAMA *);
-BOOLEAN respuestaEjecucionComando(TRAMA *,int,char*);
-
-BOOLEAN Apagar(TRAMA *);
-BOOLEAN Reiniciar(TRAMA *);
-BOOLEAN Sondeo(TRAMA *);
-
-BOOLEAN enviaMensajeServidor(SOCKET *,TRAMA *,char);
-
diff --git a/admin/Sources/Clients/ogAdmWinClient/Readme b/admin/Sources/Clients/ogAdmWinClient/Readme
deleted file mode 100644
index 6585e818..00000000
--- a/admin/Sources/Clients/ogAdmWinClient/Readme
+++ /dev/null
@@ -1,25 +0,0 @@
- El cliente opengnsys para Windows es una aplicacin que se instala como un servicio, de esta manera, no es necesario
- abrir sesin en este sistema operativo para que la mquina cliente se comunique con el administrador de opengnsys.
- Actualmente slo responde a los comandos "Apagar" y "Reiniciar".
-
-
-Para INSTALAR esta aplicacin como un servicio windows hay que seguir los siguentes pasos:
-
-1) Copiar el ejecutable ogAdmWinClient.exe en una carpeta cualquiera --se aconseja la carpeta c:\Windows\system32\opengnsys, crendola previamente--.
-2) Abrir una consola y posicionarse en la carpeta seleccionada
-3) Teclear:
- c>ogAdmClient t -install -s [IP servidor Opengnsys] -p [puerto] -i [IP local usada para comunicaciones con el servidor]
-
-Este servicio se da de alta en la base de datos de servicios de Windows con estado "detenido" y "manual" por lo que es necesario abrir la consola
-del administrador de servicios de Windows para iniciarlos y modificar las propiedades para que arranquen automticamente al iniciarse Windows.
-
-
- Para DESINTALAR esta aplicacin una vez que se ha instalado como servicio hay que hacer:
- 1) Abrir una consola y posicionarse en la carpeta donde est el ejecutable del servicio
- 2) Teclear:
- c>ogAdmClient t -remove
-
-
-
-*** El fichero de log del servicio se llama por defecto ogAdmWinClient.log y estar en el caso de que la carpeta del ejecutable sea c:\Windows\system32\opengnsys,
- este archivo estar en c:\Windows\system32\
diff --git a/admin/Sources/Clients/ogAdmWinClient/sources/ogAdmWinClient.cpp b/admin/Sources/Clients/ogAdmWinClient/sources/ogAdmWinClient.cpp
deleted file mode 100644
index 2f164d41..00000000
--- a/admin/Sources/Clients/ogAdmWinClient/sources/ogAdmWinClient.cpp
+++ /dev/null
@@ -1,713 +0,0 @@
-// ********************************************************************************************************
-// Cliente: ogAdmWinClient
-// Autor: Jos Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
-// Fecha Creacin: Febrero-2012
-// Fecha ltima modificacin: Febrero-2012
-// Nombre del fichero: ogAdmWinClient.cpp
-// Descripcin :Este fichero implementa el cliente windows del sistema
-// ********************************************************************************************************
-#include "ogAdmWinClient.h"
-#include "ogAdmLib.c"
-#include "registrow.c"
-//________________________________________________________________________________________________________
-// Funcin: tomaConfiguracion
-//
-// Descripcin:
-// Lee el fichero de configuracin del servicio
-// Parmetros:
-// filecfg : Ruta completa al fichero de configuracin
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algn error
-//________________________________________________________________________________________________________
-BOOLEAN tomaConfiguracion(char* filecfg)
-{
- char modulo[] = "tomaConfiguracion()";
-
- if (filecfg == NULL || strlen(filecfg) == 0) {
- errorLog(modulo, 1, FALSE); // Fichero de configuracin del cliente vaco
- return (FALSE);
- }
- FILE *fcfg;
- int lSize;
- char * buffer, *lineas[MAXPRM], *dualparametro[2];
- int i, numlin, resul;
-
- fcfg = fopen(filecfg, "rt");
- if (fcfg == NULL) {
- errorLog(modulo, 2, FALSE); // No existe fichero de configuracin del cliente
- return (FALSE);
- }
-
- fseek(fcfg, 0, SEEK_END);
- lSize = ftell(fcfg); // Obtiene tamao del fichero.
- rewind(fcfg);
- buffer = (char*) reservaMemoria(lSize+1); // Toma memoria para el buffer de lectura.
- if (buffer == NULL) { // No hay memoria suficiente para el buffer
- errorLog(modulo, 3, FALSE);
- return (FALSE);
- }
- lSize=fread(buffer, 1, lSize, fcfg); // Lee contenido del fichero
- buffer[lSize]=CHARNULL;
- fclose(fcfg);
-
- /* Inicializar variables globales */
- servidoradm[0]=CHARNULL;
- puerto[0] = CHARNULL;
- IPlocal[0]=CHARNULL;
-
- numlin = splitCadena(lineas, buffer, '\n');
- for (i = 0; i < numlin; i++){
- splitCadena(dualparametro, lineas[i], '=');
-
- resul = strcmp(StrToUpper(dualparametro[0]), "SERVIDORADM");
- if (resul == 0)
- strcpy(servidoradm, dualparametro[1]);
-
- resul = strcmp(StrToUpper(dualparametro[0]), "PUERTO");
- if (resul == 0)
- strcpy(puerto, dualparametro[1]);
-
- resul = strcmp(StrToUpper(dualparametro[0]), "IPLOCAL");
- if (resul == 0)
- strcpy(IPlocal, dualparametro[1]);
- }
-
- if (servidoradm[0] == CHARNULL) {
- errorLog(modulo,4, FALSE); // Falta parmetro SERVIDORADM
- return (FALSE);
- }
-
- if (puerto[0] == CHARNULL) {
- errorLog(modulo,5, FALSE); // Falta parmetro PUERTO
- return (FALSE);
- }
- if (IPlocal[0] == CHARNULL) {
- errorLog(modulo, 92, FALSE); // Falta parmetro IPLOCAL
- return (FALSE);
- }
- return (TRUE);
-}
-//______________________________________________________________________________________________________
-// Funcin: InclusionClienteWinLnx
-// Descripcin:
-// Abre una sesin en el servidor de administracin y registra al cliente en el sistema
-// Parmetros:
-// Ninguno
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algn error
-//______________________________________________________________________________________________________
-BOOLEAN InclusionClienteWinLnx(TRAMA* ptrTrama)
-{
- int lon;
- SOCKET socket_c;
- char modulo[] = "InclusionClienteWinLnx()";
-
- initParametros(ptrTrama,0);
- lon=sprintf(ptrTrama->parametros,"nfn=InclusionClienteWinLnx\r"); // Nombre de la funcin a ejecutar en el servidor
-
- if(!enviaMensajeServidor(&socket_c,ptrTrama,MSG_PETICION)){
- errorLog(modulo,37,FALSE);
- return(FALSE);
- }
- ptrTrama=recibeMensaje(&socket_c);
- if(!ptrTrama){
- errorLog(modulo,22,FALSE);
- return(FALSE);
- }
- closesocket(socket_c);
-
- if(!gestionaTrama(ptrTrama)){ // Anlisis de la trama
- errorLog(modulo,39,FALSE);
- return(FALSE);
- }
-
- return(TRUE);
-}
-//______________________________________________________________________________________________________
-// Funcin: RESPUESTA_InclusionClienteWinLnx
-//
-// Descripcin:
-// Respuesta del servidor de administracin a la peticin de inicio
-// enviando los datos identificativos del cliente
-// Parmetros:
-// - ptrTrama: Trama recibida por el servidor con el contenido y los parmetros
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algn error
-//______________________________________________________________________________________________________
-BOOLEAN RESPUESTA_InclusionClienteWinLnx(TRAMA* ptrTrama)
-{
- char* res;
- char modulo[] = "RESPUESTA_InclusionClienteWinLnx()";
- int err;
-
- res=copiaParametro("res",ptrTrama); // Resultado del proceso de inclusin
- err=(int)atoi(res); // Cdigo de error devuelto por el servidor
- if(err>0){ // Error en el proceso de inclusin
- errorLog(modulo,41,FALSE);
- errorLog(modulo,err,FALSE);
- return (FALSE);
- }
- strcpy(idordenador,copiaParametro("ido",ptrTrama)); // Identificador del ordenador
- strcpy(nombreordenador,copiaParametro("npc",ptrTrama)); // Nombre del ordenador
-
- if(idordenador==NULL || nombreordenador==NULL){
- errorLog(modulo,40,FALSE);
- return (FALSE);
- }
- return(TRUE);
-}
-//______________________________________________________________________________________________________
-// Funcin: ProcesaComandos
-//
-// Descripcin:
-// Espera comando desde el Servidor de Administracin para ejecutarlos
-// Parmetros:
-// Ninguno
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algn error
-// ________________________________________________________________________________________________________
-void procesaComandos(TRAMA* ptrTrama)
-{
- int lon;
- SOCKET socket_c;
- char modulo[] = "procesaComandos()";
-
- initParametros(ptrTrama,0);
- while(TRUE){
- lon=sprintf(ptrTrama->parametros,"nfn=DisponibilidadComandos\r");
- lon+=sprintf(ptrTrama->parametros+lon,"tpc=%s\r",CLIENTE_WIN); // Activar disponibilidad
- if(!enviaMensajeServidor(&socket_c,ptrTrama,MSG_INFORMACION)){
- errorLog(modulo,43,FALSE);
- return;
- }
- infoLog(19); // Disponibilidad de cliente activada
- ptrTrama=recibeMensaje(&socket_c);
- if(!ptrTrama){
- errorLog(modulo,46,FALSE);
- return;
- }
-
- closesocket(socket_c);
-
- if(!gestionaTrama(ptrTrama)){ // Anlisis de la trama
- errorLog(modulo,39,FALSE);
- return;
- }
- }
-}
-//_____________________________________________________________________________________________________
-// Funcin: Apagar
-//
-// Descripcin:
-// Apaga el cliente
-// Parmetros:
-// ptrTrama: contenido del mensaje
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algn error
-//_____________________________________________________________________________________________________
-BOOLEAN Apagar(TRAMA* ptrTrama)
-{
- int lon;
- char *ids,msglog[LONSTD];
- char modulo[] = "Apagar()";
-
- if (ndebug>=DEBUG_MAXIMO) {
- sprintf(msglog, "%s:%s",tbMensajes[21],modulo);
- infoDebug(msglog);
- }
- ids=copiaParametro("ids",ptrTrama);
-
- initParametros(ptrTrama,0);
- lon=sprintf(ptrTrama->parametros,"nfn=%s\r","RESPUESTA_Apagar");
- respuestaEjecucionComando(ptrTrama,0,ids);
-
- if(versionWin<5)
- ApagarReiniciar(EWX_POWEROFF | EWX_FORCE,ids,0);
- else
- ApagarReiniciar(EWX_SHUTDOWN | EWX_FORCE,ids,0);
- return(TRUE);
-}
-//_____________________________________________________________________________________________________
-// Funcin: Reiniciar
-//
-// Descripcin:
-// Apaga el cliente
-// Parmetros:
-// ptrTrama: contenido del mensaje
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algn errorservidoradm
-//_____________________________________________________________________________________________________
-BOOLEAN Reiniciar(TRAMA* ptrTrama)
-{
- int lon;
- char *ids,msglog[LONSTD];
- char modulo[] = "Reiniciar()";
-
- if (ndebug>=DEBUG_MAXIMO) {
- sprintf(msglog, "%s:%s",tbMensajes[21],modulo);
- infoDebug(msglog);
- }
- ids=copiaParametro("ids",ptrTrama);
-
- initParametros(ptrTrama,0);
- lon=sprintf(ptrTrama->parametros,"nfn=%s\r","RESPUESTA_Reiniciar");
- respuestaEjecucionComando(ptrTrama,0,ids);
-
- if(versionWin<5)
- ApagarReiniciar(EWX_REBOOT | EWX_FORCE,ids,1);
- else
- ApagarReiniciar(EWX_REBOOT | EWX_FORCE,ids,1);
-
- return(TRUE);
-}
-// _____________________________________________________________________________________________________________
-//
-// Funcin: ApagarReiniciar
-//
-// Descripcin:
-// Apaga o reinicia el ordenador o bien hace logout del usuario
-//
-// Parmetros:
-// - uFlags : Especifica el tipo de shutdown
-// _____________________________________________________________________________________________________________
-BOOLEAN ApagarReiniciar(UINT uFlags,char *ids,int sw)
-{
- HANDLE hToken;
- TOKEN_PRIVILEGES tkp;
- char modulo[] = "Reiniciar()";
-
- if (versionWin>4){
- if (!ExitWindowsEx(uFlags, 0)) {
- errorLog(modulo,86,FALSE);
- return(FALSE);
- }
- return TRUE;
- }
- // Get a token for this process.
- if (!OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken)) {
- errorLog(modulo,86,FALSE);
- return(FALSE);
- }
-
- // Get the LUID for the shutdown privilege.
- LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME,&tkp.Privileges[0].Luid);
-
- tkp.PrivilegeCount = 1; // one privilege to set
- tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
-
- // Get the shutdown privilege for this process.
- AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, (PTOKEN_PRIVILEGES)NULL, 0);
-
- if (GetLastError() != ERROR_SUCCESS) {
- errorLog(modulo,86,FALSE);
- return(FALSE);
- }
-
- // Shut down the system and force all applications to close.
- if (!ExitWindowsEx(uFlags, 0)) {
- errorLog(modulo,86,FALSE);
- return(FALSE);
- }
-
- return TRUE;
-}
-// _____________________________________________________________________________________________________________
-//
-// Funcin: TomaVersionWindows
-//
-// Descripcin:
-// Toma la versin del sistema operativo
-//
-// Valores de retorno:
-// 1.- Microsoft Windows Server 2003
-// 2.- Microsoft Windows XP
-// 3.- Microsoft Windows 2000
-// 4.- Microsoft Windows NT
-// 5.- Microsoft Windows 95
-// 6.- Microsoft Windows 98
-// 7.- Microsoft Windows Millennium Edition
-// _____________________________________________________________________________________________________________
-int TomaVersionWindows()
-{
- OSVERSIONINFOEX osvi;
- BOOL bOsVersionInfoEx;
-
- // Intenta tomar la version usando la estructura OSVERSIONINFOEX
- // Si falla lo intentausando la estructura OSVERSIONINFO.
-
- ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
- osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
-
- if( !(bOsVersionInfoEx = GetVersionEx ((OSVERSIONINFO *) &osvi)) ){
- osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
- if (! GetVersionEx ( (OSVERSIONINFO *) &osvi) )
- return -1;
- }
- switch (osvi.dwPlatformId){
- // Test for the Windows NT product family.
- case VER_PLATFORM_WIN32_NT:
- if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2 )
- return(1); // Microsoft Windows Server 2003
- if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1 )
- return(2); // Microsoft Windows XP
- if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0 )
- return(3); // Microsoft Windows 2000
- if ( osvi.dwMajorVersion <= 4 )
- return(4); // Microsoft Windows NT
- break;
-
- // Test for the Windows Me/98/95.
- case VER_PLATFORM_WIN32_WINDOWS:
- if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 0)
- return(5); // Microsoft Windows 95
- if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 10)
- return(6); // Microsoft Windows 98
- if (osvi.dwMajorVersion == 4 && osvi.dwMinorVersion == 90)
- return(7); // Microsoft Windows Millennium Edition
- break;
- }
- return -1;
-}
-//______________________________________________________________________________________________________
-// Funcin: Sondeo
-//
-// Descripcin:
-// Enva al servidor una confirmacin de que est dentro del sistema
-// Parmetros:
-// ptrTrama: contenido del mensajede
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algn error
-//______________________________________________________________________________________________________
-BOOLEAN Sondeo(TRAMA* ptrTrama)
-{
- return(TRUE);
-}
-//______________________________________________________________________________________________________
-// Funcin: Actualizar
-//
-// Descripcin:
-// Enva al servidor una confirmacin de que est dentro del sistema
-// Parmetros:
-// ptrTrama: contenido del mensajede
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algn error
-//______________________________________________________________________________________________________
-BOOLEAN Actualizar(TRAMA* ptrTrama)
-{
- return(TRUE);
-}
-//______________________________________________________________________________________________________
-// Funcin: respuestaEjecucionComando
-//
-// Descripcin:
-// Envia una respuesta a una ejecucion de comando al servidor de Administracin
-// Parmetros:
-// - ptrTrama: contenido del mensaje
-// - res: Resultado de la ejecucin (Cdigo de error devuelto por el script ejecutado)
-// - ids: Identificador de la sesion (En caso de no haber seguimiento es NULO)
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algn error
-// ________________________________________________________________________________________________________
-BOOLEAN respuestaEjecucionComando(TRAMA* ptrTrama,int res,char *ids)
-{
- int lon;
- SOCKET socket_c;
- char modulo[] = "respuestaEjecucionComando()";
-
- lon=strlen(ptrTrama->parametros);
- if(ids){ // Existe seguimiento
- lon+=sprintf(ptrTrama->parametros+lon,"ids=%s\r",ids); // Aade identificador de la sesin
- }
- if (res==0){ // Resultado satisfactorio
- lon+=sprintf(ptrTrama->parametros+lon,"res=%s\r","1");
- lon+=sprintf(ptrTrama->parametros+lon,"der=%s\r","");
- }
- else{ // Algn error
- lon+=sprintf(ptrTrama->parametros+lon,"res=%s\r","2");
- lon+=sprintf(ptrTrama->parametros+lon,"der=%s\r",tbErrores[res]);// Descripcin del error
- }
- if(!(enviaMensajeServidor(&socket_c,ptrTrama,MSG_NOTIFICACION))){
- errorLog(modulo,44,FALSE);
- return(FALSE);
- }
- closesocket(socket_c);
- return(TRUE);
-}
-// ________________________________________________________________________________________________________
-// Funcin: gestionaTrama
-//
-// Descripcin:
-// Procesa las tramas recibidas.servidoradm
-// Parametros:
-// ptrTrama: contenido del mensaje
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algn error
-// ________________________________________________________________________________________________________
-BOOLEAN gestionaTrama(TRAMA *ptrTrama)
-{
- int i, res;
- char *nfn;
- char modulo[] = "gestionaTrama()";
-
- INTROaFINCAD(ptrTrama);
- nfn = copiaParametro("nfn", ptrTrama); // Toma nombre de funcin
- for (i = 0; i < MAXIMAS_FUNCIONES; i++) { // Recorre funciones que procesan las tramas
- res = strcmp(tbfuncionesClient[i].nf, nfn);
- if (res == 0) { // Encontrada la funcin que procesa el mensaje
- return(tbfuncionesClient[i].fptr(ptrTrama)); // Invoca la funcin
- }
- }
- errorLog(modulo, 18, FALSE);
- return (FALSE);
-}
-//______________________________________________________________________________________________________
-// Funcin: enviaMensajeServidor
-//
-// Descripcin:
-// Envia un mensaje al servidor de Administracin
-// Parmetros:
-// - socket_c: (Salida) Socket utilizado para el envo
-// - ptrTrama: contenido del mensaje
-// - tipo: Tipo de mensaje
-// C=Comando, N=Respuesta a un comando, P=Peticion,R=Respuesta a una peticin, I=Informacion
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algn error
-// ________________________________________________________________________________________________________
-BOOLEAN enviaMensajeServidor(SOCKET *socket_c,TRAMA *ptrTrama,char tipo)
-{
- int lon;
- char modulo[] = "enviaMensajeServidor()";
-
- *socket_c=abreConexion();
- if(*socket_c==INVALID_SOCKET){
- errorLog(modulo,38,FALSE); // Error de conexin con el servidor
- return(FALSE);
- }
- ptrTrama->arroba='@'; // Cabecera de la trama
- strncpy(ptrTrama->identificador,"JMMLCAMDJ_MCDJ",14); // identificador de la trama
- ptrTrama->tipo=tipo; // Tipo de mensaje
- lon=strlen(ptrTrama->parametros); // Compone la trama
- lon+=sprintf(ptrTrama->parametros+lon,"iph=%s\r",IPlocal); // Ip del ordenador
- lon+=sprintf(ptrTrama->parametros+lon,"ido=%s\r",idordenador); // Identificador del ordenador
- lon+=sprintf(ptrTrama->parametros+lon,"npc=%s\r",nombreordenador); // Nombre del ordenador
-
- if (!mandaTrama(socket_c,ptrTrama)) {
- errorLog(modulo,26,FALSE);
- return (FALSE);
- }
- return(TRUE);
-}
-// _____________________________________________________________________________________________________________
-// Funcin: TomaParametrosReg
-//
-// Descripcin:
-// Toma los parmetros de conexin del registro
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algn error
-// _____________________________________________________________________________________________________________
-BOOLEAN TomaParametrosReg()
-{
- if(!ReadRegistryString(HIVE,BASE,"servidoradm",servidoradm,20))
- return(FALSE);
-
- if(!ReadRegistryString(HIVE,BASE,"puerto",puerto,20))
- return(FALSE);
-
- if(!ReadRegistryString(HIVE,BASE,"Iplocal",IPlocal,20))
- return(FALSE);
-
- return(TRUE);
-}
-//______________________________________________________________________________________________________
-// Funcin: TomaIP
-//
-// Descripcin:
-// Recupera la ip de la mquina
-// Parmetros:
-// Ninguno
-// Devuelve:
-// TRUE: Si el proceso es correcto
-// FALSE: En caso de ocurrir algn error
-// ________________________________________________________________________________________________________
-BOOLEAN TomaIP(char* ip)
-{
- char ac[80];
- struct in_addr addr;
- BOOLEAN ipv;
-
- if (gethostname(ac, sizeof(ac)) == SOCKET_ERROR) {
- return (FALSE);
- }
- struct hostent *phe = gethostbyname(ac);
- if (phe == 0) {
- return (FALSE);
- }
- ipv=FALSE;
- for (int i = 0; phe->h_addr_list[i] != 0 && !ipv; ++i) {
- memcpy(&addr, phe->h_addr_list[i], sizeof(struct in_addr));
- strcpy(ip,inet_ntoa(addr));
- if(strcmp(IPlocal,"127.0.0.1")==0)
- ipv=FALSE;
- else{
- ipv=true; // IP vlida distinta a loop
- break;
- }
- }
-
- return(ipv);
-}
-// ********************************************************************************************************
-// PROGRAMA PRINCIPAL (CLIENTE)
-// ********************************************************************************************************
-//int main(int argc, char *argv[])
-VOID ServiceStart (DWORD dwArgc, LPTSTR *lpszArgv)
- {
- //___________________________________________________________
- //
- // Service initialization (Report the status to the service control manager)
- //___________________________________________________________
- //
- if (!ReportStatusToSCMgr(
- SERVICE_START_PENDING, // service state
- NO_ERROR, // exit code
- 3000)) // wait hint
- return;
- //__________________________________________
-
- TRAMA *ptrTrama;
- char modulo[] = "main()";
-
- strcpy(szPathFileLog, "ogAdmWinClient.log"); // de configuracin y de logs
-
-
- WSADATA wsd;
- if (WSAStartup(MAKEWORD(2,2),&wsd)!=0){ // Carga librera Winsock
- errorLog(modulo, 93, FALSE);
- exit(EXIT_FAILURE);
- }
-
- ptrTrama=(TRAMA *)reservaMemoria(sizeof(TRAMA));
- if (ptrTrama == NULL) { // No hay memoria suficiente para el bufer de las tramas
- errorLog(modulo, 3, FALSE);
- exit(EXIT_FAILURE);
- }
- /*--------------------------------------------------------------------------------------------------------
- Validacin de parmetros de ejecucin y fichero de configuracin
- ---------------------------------------------------------------------------------------------------------*/
- if(!TomaParametrosReg()) // Toma parametros de configuracion
- exit(EXIT_FAILURE);
-
- //___________________________________________________________
- //
- // Service initialization (Report the status to the service control manager)
- //___________________________________________________________
- //
- if (!ReportStatusToSCMgr(
- SERVICE_START_PENDING, // service state
- NO_ERROR, // exit code
- 3000)) // wait hint
- return;
- //__________________________________________
- //
- // Toma IP local
- //___________________________________________
- //
- // Toma la ip tambin del registro
- /*if(!TomaIP(IPlocal)){
- errorLog(modulo,85,FALSE);
- exit(EXIT_FAILURE);
- }
- */
- versionWin=TomaVersionWindows(); // Toma versin de windows
-
- /*--------------------------------------------------------------------------------------------------------
- Carga catlogo de funciones que procesan las tramas
- ---------------------------------------------------------------------------------------------------------*/
- int cf = 0;
-
- strcpy(tbfuncionesClient[cf].nf, "RESPUESTA_InclusionClienteWinLnx");
- tbfuncionesClient[cf++].fptr = &RESPUESTA_InclusionClienteWinLnx;
-
- strcpy(tbfuncionesClient[cf].nf, "Apagar");
- tbfuncionesClient[cf++].fptr = &Apagar;
-
- strcpy(tbfuncionesClient[cf].nf, "Reiniciar");
- tbfuncionesClient[cf++].fptr = &Reiniciar;
-
- strcpy(tbfuncionesClient[cf].nf, "Sondeo");
- tbfuncionesClient[cf++].fptr = &Sondeo;
-
- strcpy(tbfuncionesClient[cf].nf, "Actualizar");
- tbfuncionesClient[cf++].fptr = &Actualizar;
-
- /*--------------------------------------------------------------------------------------------------------
- Inicio de sesin
- ---------------------------------------------------------------------------------------------------------*/
- infoLog(1); // Inicio de sesin
- infoLog(3); // Abriendo sesin en el servidor de Administracin;
- /*--------------------------------------------------------------------------------------------------------
- Inclusin del cliente en el sistema
- ---------------------------------------------------------------------------------------------------------*/
- if(!InclusionClienteWinLnx(ptrTrama)){ // Ha habido algn problema al abrir sesin
- errorLog(modulo,0,FALSE);
- exit(EXIT_FAILURE);
- }
- infoLog(4); // Cliente iniciado
-
- //__________________________________________
- // El servicio est instalado y debe ser iniciado
- // -- report the status to the service control manager.--
- //
- if (!ReportStatusToSCMgr(
- SERVICE_RUNNING, // service state
- NO_ERROR, // exit code
- 0)) // wait hint
- return;
- // End of initialization
- //__________________________________________
-
- //
- // Service is now running, perform work until shutdown
- //
- while (ssStatus.dwCurrentState == SERVICE_RUNNING) { // Bucle para escuchar peticiones de clientes
- procesaComandos(ptrTrama); // Bucle para procesar comandos interactivos
- }
- WSACleanup();
- // El servicio de detiene
-}
-/* _____________________________________________________________________________________________________________
- FUNCTION: ServiceStop
-
- PURPOSE: Stops the service
- PARAMETERS:
- none
-
- RETURN VALUE:
- none
-
- COMMENTS:
-
- If a ServiceStop procedure is going to
- take longer than 3 seconds to execute,
- it should spawn a thread to execute the
- stop code, and return. Otherwise, the
- ServiceControlManager will believe that
- the service has stopped responding.
- _____________________________________________________________________________________________________________*/
-VOID ServiceStop()
-{
- // Incluir aqu el cdigo necesario antes de parar el servicio
- ReportStatusToSCMgr(SERVICE_STOPPED, NO_ERROR, 0);
-} \ No newline at end of file
diff --git a/admin/Sources/Clients/ogAdmWinClient/sources/ogAdmWinClient.h b/admin/Sources/Clients/ogAdmWinClient/sources/ogAdmWinClient.h
deleted file mode 100644
index 55e33ad8..00000000
--- a/admin/Sources/Clients/ogAdmWinClient/sources/ogAdmWinClient.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// ********************************************************************************************************
-// Cliente: ogAdmWinClient
-// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
-// Fecha Creación: Febrero-2012
-// Fecha Última modificación: Febrero-2012
-// Nombre del fichero: ogAdmWinClient.h
-// Descripción :Este fichero implementa el cliente general del sistema
-// ********************************************************************************************************
-#define __WINDOWS__
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-#include <time.h>
-#include <signal.h>
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#include <winreg.h>
-
-#include "registrow.h"
-#include "ogAdmLib.h"
-#include "servicio.h"
-// ________________________________________________________________________________________________________
-// Variables globales
-// ________________________________________________________________________________________________________
-//
-int versionWin;
-char idordenador[LONPRM]; // Identificador del ordenador
-char nombreordenador[LONPRM]; // Nombre del ordenador
-
-char servidoradm[LONPRM]; // Dirección IP del servidor de administración
-char puerto[LONPRM]; // Puerto de comunicación
-char IPlocal[LONPRM]; // Ip local por donde se van a enviar las comunicaciones
-
-
-typedef struct{ // Estructura usada para referenciar las funciones que procesan las tramas
- char nf[LONFUN]; // Nombre de la función
- BOOLEAN (*fptr)(TRAMA*); // Puntero a la función que procesa la trama
-}MSGFUN;
-MSGFUN tbfuncionesClient[MAXIMAS_FUNCIONES];
-// ________________________________________________________________________________________________________
-// Prototipo de funciones
-// ________________________________________________________________________________________________________
-
-void procesaComandos(TRAMA*);
-BOOLEAN gestionaTrama(TRAMA *);
-BOOLEAN InclusionClienteWinLnx();
-BOOLEAN RESPUESTA_InclusionClienteWinLnx(TRAMA *);
-BOOLEAN respuestaEjecucionComando(TRAMA *,int,char*);
-
-BOOLEAN Apagar(TRAMA *);
-BOOLEAN Reiniciar(TRAMA *);
-BOOLEAN Sondeo(TRAMA *);
-
-BOOLEAN enviaMensajeServidor(SOCKET *,TRAMA *,char);
-BOOLEAN ApagarReiniciar(UINT,char *,int sw);
-
-SOCKADDR_IN *GetIPInterfaceList(SOCKET , int *); \ No newline at end of file
diff --git a/admin/Sources/Clients/ogAdmWinClient/sources/servicio.c b/admin/Sources/Clients/ogAdmWinClient/sources/servicio.c
deleted file mode 100644
index 773ac883..00000000
--- a/admin/Sources/Clients/ogAdmWinClient/sources/servicio.c
+++ /dev/null
@@ -1,628 +0,0 @@
-// ******************************************************************************************************************************************************************************
-// Aplicacin HIDRA
-// Copyright 2003-2005 Jos Manuel Alonso. Todos los derechos reservados.
-// Fichero: servicio.c
-// Descripcin:
-// Este proyecto implementa el servicio hidra en un ordenador con plataforma windows NT. Este fichero aporta las funciones para crear el servicio
-// ******************************************************************************************************************************************************************************
-//____________________________________________________________________________________________________________________________
-// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
-// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
-// PARTICULAR PURPOSE.
-//
-// Copyright (C) 1993-1997 Microsoft Corporation. All Rights Reserved.
-//
-// MODULE: service.c
-// PURPOSE: Implements functions required by all services windows.
-//
-// FUNCTIONS:
-// main(int argc, char **argv);
-// service_ctrl(DWORD dwCtrlCode);
-// service_main(DWORD dwArgc, LPTSTR *lpszArgv);
-// CmdInstallService();
-// CmdRemoveService();
-// CmdDebugService(int argc, char **argv);
-// ControlHandler ( DWORD dwCtrlType );
-// GetLastErrorText( LPTSTR lpszBuf, DWORD dwSize );
-//
-// COMMENTS:
-// AUTHOR: Craig Link - Microsoft Developer Support
-//____________________________________________________________________________________________________________________________
-#include "servicio.h"
-//____________________________________________________________________________________________________________________________
-// internal variables
-DWORD dwErr = 0;
-BOOL bDebug = FALSE;
-TCHAR szErr[256];
-
-// internal function prototypes
-VOID WINAPI service_ctrl(DWORD dwCtrlCode);
-VOID WINAPI service_main(DWORD dwArgc, LPTSTR *lpszArgv);
-VOID CmdInstallService();
-VOID CmdRemoveService();
-VOID CmdDebugService(int argc, char **argv);
-BOOL WINAPI ControlHandler ( DWORD dwCtrlType );
-LPTSTR GetLastErrorText( LPTSTR lpszBuf, DWORD dwSize );
-//____________________________________________________________________________________________________________________________
-//
-// FUNCTION: tomarestoparametros
-//
-// Descripcin:
-//
-// Toma los parametros de conexin de la linea de comando y los graba en el Registro
-//____________________________________________________________________________________________________________________________
-int tomarestoparametros(int argc, char **argv)
-{
- int i,lon;
- char servidorhidra[20];
- char puerto[10];
- char iplocal[20];
-
- strcpy(servidorhidra,SERVIDOR_DEFAULT);
- strcpy(puerto,PUERTO_DEFAULT);
- strcpy(iplocal,IPLOCAL_DEFAULT);
-
- for(i=2;i<argc;i++){
- lon=strlen(argv[i]);
- if ((argv[i][0]=='-')||(argv[i][0]=='/') && argv[i][2]==' ') {
- switch (tolower(argv[i][1])){
- case 's': // Ip del servidor hidra
- //strcpy(servidorhidra,&argv[i][3]);
- TOMAPARAMSTR(servidorhidra);
- break;
- case 'p': // Puerto
- TOMAPARAMSTR(puerto);
- break;
- case 'i': // Ip local
- TOMAPARAMSTR(iplocal);
- break;
- default:
- printf("\nSintaxis: -install\n\n");
- printf(" -s IP del servidor\n -p puerto\n -i IP local\n");
- return(FALSE);
- break;
- }
- }
- }
- if(strcmp(servidorhidra,SERVIDOR_DEFAULT)==0
- || strcmp(puerto,PUERTO_DEFAULT)==0
- || strcmp(iplocal,IPLOCAL_DEFAULT)==0) {
- printf("\nSintaxis: -install\n\n");
- printf(" -s IP del servidor\n -p puerto\n -i IP local\n");
- return(FALSE);
- }
-
- CHKREGISTRY(WriteRegistryString(HIVE,BASE,"servidoradm",servidorhidra));
- CHKREGISTRY(WriteRegistryString(HIVE,BASE,"puerto",puerto));
- CHKREGISTRY(WriteRegistryString(HIVE,BASE,"iplocal",iplocal));
- return(TRUE);
-}
-//____________________________________________________________________________________________________________________________
-//
-// FUNCTION: borraparametros
-//
-// Descripcin:
-//
-// Elimina la clave y subclave donde estn los parmetros de conexin
-//____________________________________________________________________________________________________________________________
-int borraparametros()
-{
- RMVREGISTRY(DeleteRegistryKey(HIVE,BASE)); // Borra la subclave completa
- RMVREGISTRY(DeleteRegistryKey(HIVE,BASEKEY)); // Borra la clave completa
- return(TRUE);
-}
-//____________________________________________________________________________________________________________________________
-//
-// FUNCTION: main
-//
-// PURPOSE: entrypoint for service
-//
-// PARAMETERS:
-// argc - number of command line arguments
-// argv - array of command line arguments
-//
-// RETURN VALUE:
-// none
-//
-// COMMENTS:
-// main() either performs the command line task, or
-// call StartServiceCtrlDispatcher to register the
-// main service thread. When the this call returns,
-// the service has stopped, so exit.
-//
-//____________________________________________________________________________________________________________________________
-void _CRTAPI1 main(int argc, char **argv)
-{
- SERVICE_TABLE_ENTRY dispatchTable[] =
- {
- { TEXT(SZSERVICENAME), (LPSERVICE_MAIN_FUNCTION)service_main },
- { NULL, NULL }
- };
-
- if ( (argc > 1) &&
- ((*argv[1] == '-') || (*argv[1] == '/')) )
- {
- if ( _stricmp( "install", argv[1]+1 ) == 0 )
- {
- if (!tomarestoparametros(argc,argv))
- exit(1);
- CmdInstallService();
- }
- else if ( _stricmp( "remove", argv[1]+1 ) == 0 )
- {
- borraparametros();
- CmdRemoveService();
- }
- else if ( _stricmp( "debug", argv[1]+1 ) == 0 )
- {
- bDebug = TRUE;
- CmdDebugService(argc, argv);
- }
- else
- {
- goto dispatch;
- }
- exit(0);
- }
- // if it doesn't match any of the above parameters
- // the service control manager may be starting the service
- // so we must call StartServiceCtrlDispatcher
- dispatch:
- // this is just to be friendly
- printf( "%s -install to install the service\n", SZAPPNAME );
- printf( "%s -remove to remove the service\n", SZAPPNAME );
- printf( "%s -debug <params> to run as a console app for debugging\n", SZAPPNAME );
- printf( "\nStartServiceCtrlDispatcher being called.\n" );
- printf( "This may take several seconds. Please wait.\n" );
-
- if (!StartServiceCtrlDispatcher(dispatchTable))
- AddToMessageLog(TEXT("StartServiceCtrlDispatcher failed."));
-}
-//____________________________________________________________________________________________________________________________
-// FUNCTION: service_main
-//
-// PURPOSE: To perform actual initialization of the service
-//
-// PARAMETERS:
-// dwArgc - number of command line arguments
-// lpszArgv - array of command line arguments
-//
-// RETURN VALUE:
-// none
-//
-// COMMENTS:
-// This routine performs the service initialization and then calls
-// the user defined ServiceStart() routine to perform majority
-// of the work.
-//
-//____________________________________________________________________________________________________________________________
-void WINAPI service_main(DWORD dwArgc, LPTSTR *lpszArgv)
-{
- // register our service control handler:
- //
- sshStatusHandle = RegisterServiceCtrlHandler( TEXT(SZSERVICENAME), service_ctrl);
-
- if (!sshStatusHandle)
- goto cleanup;
-
- // SERVICE_STATUS members that don't change in example
- //
- ssStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
- ssStatus.dwServiceSpecificExitCode = 0;
-
-
- // report the status to the service control manager.
- //
- if (!ReportStatusToSCMgr(
- SERVICE_START_PENDING, // service state
- NO_ERROR, // exit code
- 3000)) // wait hint
- goto cleanup;
-
- ServiceStart( dwArgc, lpszArgv );
-
-cleanup:
-
- // try to report the stopped status to the service control manager.
- //
- if (sshStatusHandle)
- (VOID)ReportStatusToSCMgr(
- SERVICE_STOPPED,
- dwErr,
- 0);
- return;
-}
-//____________________________________________________________________________________________________________________________
-//
-// FUNCTION: service_ctrl
-//
-// PURPOSE: This function is called by the SCM whenever
-// ControlService() is called on this service.
-//
-// PARAMETERS:
-// dwCtrlCode - type of control requested
-//
-// RETURN VALUE:
-// none
-//
-// COMMENTS:
-//
-//____________________________________________________________________________________________________________________________
-VOID WINAPI service_ctrl(DWORD dwCtrlCode)
-{
- // Handle the requested control code.
- //
- switch(dwCtrlCode)
- {
- // Stop the service.
- //
- // SERVICE_STOP_PENDING should be reported before
- // setting the Stop Event - hServerStopEvent - in
- // ServiceStop(). This avoids a race condition
- // which may result in a 1053 - The Service did not respond...
- // error.
- case SERVICE_CONTROL_STOP:
- ReportStatusToSCMgr(SERVICE_STOP_PENDING, NO_ERROR, 0);
- ServiceStop();
- return;
-
- // Update the service status.
- //
- case SERVICE_CONTROL_INTERROGATE:
- break;
-
- // invalid control code
- //
- default:
- break;
-
- }
- ReportStatusToSCMgr(ssStatus.dwCurrentState, NO_ERROR, 0);
-}
-//____________________________________________________________________________________________________________________________
-//
-// FUNCTION: ReportStatusToSCMgr()
-//
-// PURPOSE: Sets the current status of the service and
-// reports it to the Service Control Manager
-//
-// PARAMETERS:
-// dwCurrentState - the state of the service
-// dwWin32ExitCode - error code to report
-// dwWaitHint - worst case estimate to next checkpoint
-//
-// RETURN VALUE:
-// TRUE - success
-// FALSE - failure
-//
-// COMMENTS:
-//
-//____________________________________________________________________________________________________________________________
-BOOL ReportStatusToSCMgr(DWORD dwCurrentState,DWORD dwWin32ExitCode,DWORD dwWaitHint)
-{
- static DWORD dwCheckPoint = 1;
- BOOL fResult = TRUE;
-
-
- if ( !bDebug ) // when debugging we don't report to the SCM
- {
- if (dwCurrentState == SERVICE_START_PENDING)
- ssStatus.dwControlsAccepted = 0;
- else
- ssStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP;
-
- ssStatus.dwCurrentState = dwCurrentState;
- ssStatus.dwWin32ExitCode = dwWin32ExitCode;
- ssStatus.dwWaitHint = dwWaitHint;
-
- if ( ( dwCurrentState == SERVICE_RUNNING ) ||
- ( dwCurrentState == SERVICE_STOPPED ) )
- ssStatus.dwCheckPoint = 0;
- else
- ssStatus.dwCheckPoint = dwCheckPoint++;
-
- // Report the status of the service to the service control manager.
- //
- if (!(fResult = SetServiceStatus( sshStatusHandle, &ssStatus))) {
- AddToMessageLog(TEXT("SetServiceStatus"));
- }
- }
- return fResult;
-}
-//____________________________________________________________________________________________________________________________
-//
-// FUNCTION: AddToMessageLog(LPTSTR lpszMsg)
-//
-// PURPOSE: Allows any thread to log an error message
-//
-// PARAMETERS:
-// lpszMsg - text for message
-//
-// RETURN VALUE:
-// none
-//
-// COMMENTS:
-//
-//____________________________________________________________________________________________________________________________
-VOID AddToMessageLog(LPTSTR lpszMsg)
-{
- TCHAR szMsg[256];
- HANDLE hEventSource;
- LPTSTR lpszStrings[2];
-
- if ( !bDebug )
- {
- dwErr = GetLastError();
-
- // Use event logging to log the error.
- //
- hEventSource = RegisterEventSource(NULL, TEXT(SZSERVICENAME));
-
- _stprintf(szMsg, TEXT("%s error: %d"), TEXT(SZSERVICENAME), dwErr);
- lpszStrings[0] = szMsg;
- lpszStrings[1] = lpszMsg;
-
- if (hEventSource != NULL) {
- ReportEvent(hEventSource, // handle of event source
- EVENTLOG_ERROR_TYPE, // event type
- 0, // event category
- 0, // event ID
- NULL, // current user's SID
- 2, // strings in lpszStrings
- 0, // no bytes of raw data
- lpszStrings, // array of error strings
- NULL); // no raw data
-
- (VOID) DeregisterEventSource(hEventSource);
- }
- }
-}
-//____________________________________________________________________________________________________________________________
-//
-// The following code handles service installation and removal
-//
-//____________________________________________________________________________________________________________________________
-//
-// FUNCTION: CmdInstallService()
-//
-// PURPOSE: Installs the service
-// PARAMETERS:
-// none
-//
-// RETURN VALUE:
-// none
-//
-// COMMENTS:
-//____________________________________________________________________________________________________________________________
-void CmdInstallService()
-{
- SC_HANDLE schService;
- SC_HANDLE schSCManager;
-
- TCHAR szPath[512];
-
- if ( GetModuleFileName( NULL, szPath, 512 ) == 0 )
- {
- _tprintf(TEXT("Unable to install %s - %s\n"), TEXT(SZSERVICEDISPLAYNAME), GetLastErrorText(szErr, 256));
- return;
- }
- schSCManager = OpenSCManager(
- NULL, // machine (NULL == local)
- NULL, // database (NULL == default)
- SC_MANAGER_ALL_ACCESS // access required
- );
- if ( schSCManager )
- {
- schService = CreateService(
- schSCManager, // SCManager database
- TEXT(SZSERVICENAME), // name of service
- TEXT(SZSERVICEDISPLAYNAME), // name to display
- SERVICE_ALL_ACCESS, // desired access
- SERVICE_WIN32_OWN_PROCESS, // service type
- SERVICE_AUTO_START, // start type
- SERVICE_ERROR_NORMAL, // error control type
- szPath, // service's binary
- NULL, // no load ordering group
- NULL, // no tag identifier
- TEXT(SZDEPENDENCIES), // dependencies
- NULL, // LocalSystem account
- NULL); // no password
-
- if ( schService )
- {
- _tprintf(TEXT("%s installed.\n"), TEXT(SZSERVICEDISPLAYNAME) );
- CloseServiceHandle(schService);
- }
- else
- {
- _tprintf(TEXT("CreateService failed - %s\n"), GetLastErrorText(szErr, 256));
- }
-
- CloseServiceHandle(schSCManager);
- }
- else
- _tprintf(TEXT("OpenSCManager failed - %s\n"), GetLastErrorText(szErr,256));
-}
-//____________________________________________________________________________________________________________________________
-//
-// FUNCTION: CmdRemoveService()
-//
-// PURPOSE: Stops and removes the service
-//
-// PARAMETERS:
-// none
-//
-// RETURN VALUE:
-// none
-//
-// COMMENTS:
-//
-//____________________________________________________________________________________________________________________________
-void CmdRemoveService()
-{
- SC_HANDLE schService;
- SC_HANDLE schSCManager;
-
- schSCManager = OpenSCManager(
- NULL, // machine (NULL == local)
- NULL, // database (NULL == default)
- SC_MANAGER_ALL_ACCESS // access required
- );
- if ( schSCManager )
- {
- schService = OpenService(schSCManager, TEXT(SZSERVICENAME), SERVICE_ALL_ACCESS);
-
- if (schService)
- {
- // try to stop the service
- if ( ControlService( schService, SERVICE_CONTROL_STOP, &ssStatus ) )
- {
- _tprintf(TEXT("Stopping %s."), TEXT(SZSERVICEDISPLAYNAME));
- Sleep( 1000 );
-
- while( QueryServiceStatus( schService, &ssStatus ) )
- {
- if ( ssStatus.dwCurrentState == SERVICE_STOP_PENDING )
- {
- _tprintf(TEXT("."));
- Sleep( 1000 );
- }
- else
- break;
- }
-
- if ( ssStatus.dwCurrentState == SERVICE_STOPPED )
- _tprintf(TEXT("\n%s stopped.\n"), TEXT(SZSERVICEDISPLAYNAME) );
- else
- _tprintf(TEXT("\n%s failed to stop.\n"), TEXT(SZSERVICEDISPLAYNAME) );
-
- }
-
- // now remove the service
- if( DeleteService(schService) )
- _tprintf(TEXT("%s removed.\n"), TEXT(SZSERVICEDISPLAYNAME) );
- else
- _tprintf(TEXT("DeleteService failed - %s\n"), GetLastErrorText(szErr,256));
-
-
- CloseServiceHandle(schService);
- }
- else
- _tprintf(TEXT("OpenService failed - %s\n"), GetLastErrorText(szErr,256));
-
- CloseServiceHandle(schSCManager);
- }
- else
- _tprintf(TEXT("OpenSCManager failed - %s\n"), GetLastErrorText(szErr,256));
-}
-//____________________________________________________________________________________________________________________________
-//
-// The following code is for running the service as a console app
-//
-//
-// FUNCTION: CmdDebugService(int argc, char ** argv)
-//
-// PURPOSE: Runs the service as a console application
-//
-// PARAMETERS:
-// argc - number of command line arguments
-// argv - array of command line arguments
-//
-// RETURN VALUE:
-// none
-//
-// COMMENTS:
-//
-//____________________________________________________________________________________________________________________________
-void CmdDebugService(int argc, char ** argv)
-{
- DWORD dwArgc;
- LPTSTR *lpszArgv;
-
-#ifdef UNICODE
- lpszArgv = CommandLineToArgvW(GetCommandLineW(), &(dwArgc) );
-#else
- dwArgc = (DWORD) argc;
- lpszArgv = argv;
-#endif
-
- _tprintf(TEXT("Debugging %s.\n"), TEXT(SZSERVICEDISPLAYNAME));
-
- SetConsoleCtrlHandler( ControlHandler, TRUE );
-
- ServiceStart( dwArgc, lpszArgv );
-}
-//____________________________________________________________________________________________________________________________
-//
-// FUNCTION: ControlHandler ( DWORD dwCtrlType )
-//
-// PURPOSE: Handled console control events
-//
-// PARAMETERS:
-// dwCtrlType - type of control event
-//
-// RETURN VALUE:
-// True - handled
-// False - unhandled
-//
-// COMMENTS:
-//
-//____________________________________________________________________________________________________________________________
-BOOL WINAPI ControlHandler ( DWORD dwCtrlType )
-{
- switch( dwCtrlType )
- {
- case CTRL_BREAK_EVENT: // use Ctrl+C or Ctrl+Break to simulate
- case CTRL_C_EVENT: // SERVICE_CONTROL_STOP in debug mode
- _tprintf(TEXT("Stopping %s.\n"), TEXT(SZSERVICEDISPLAYNAME));
- ServiceStop();
- return TRUE;
- break;
-
- }
- return FALSE;
-}
-//____________________________________________________________________________________________________________________________
-//
-// FUNCTION: GetLastErrorText
-//
-// PURPOSE: copies error message text to string
-//
-// PARAMETERS:
-// lpszBuf - destination buffer
-// dwSize - size of buffer
-//
-// RETURN VALUE:
-// destination buffer
-//
-// COMMENTS:
-//
-//____________________________________________________________________________________________________________________________
-LPTSTR GetLastErrorText( LPTSTR lpszBuf, DWORD dwSize )
-{
- DWORD dwRet;
- LPTSTR lpszTemp = NULL;
-
- dwRet = FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |FORMAT_MESSAGE_ARGUMENT_ARRAY,
- NULL,
- GetLastError(),
- LANG_NEUTRAL,
- (LPTSTR)&lpszTemp,
- 0,
- NULL );
-
- // supplied buffer is not long enough
- if ( !dwRet || ( (long)dwSize < (long)dwRet+14 ) )
- lpszBuf[0] = TEXT('\0');
- else
- {
- lpszTemp[lstrlen(lpszTemp)-2] = TEXT('\0'); //remove cr and newline character
- _stprintf( lpszBuf, TEXT("%s (0x%x)"), lpszTemp, GetLastError() );
- }
-
- if ( lpszTemp )
- LocalFree((HLOCAL) lpszTemp );
-
- return lpszBuf;
-}
diff --git a/admin/Sources/Clients/ogAdmWinClient/sources/servicio.h b/admin/Sources/Clients/ogAdmWinClient/sources/servicio.h
deleted file mode 100644
index 760d2c1a..00000000
--- a/admin/Sources/Clients/ogAdmWinClient/sources/servicio.h
+++ /dev/null
@@ -1,153 +0,0 @@
-// ******************************************************************************************************************************************************************************
-// Aplicacin HIDRA
-// Copyright 2003-2005 Jos Manuel Alonso. Todos los derechos reservados.
-// Fichero: servicio.h
-// Descripcin:
-// Este proyecto implementa el servicio hidra en un ordenador con plataforma windows NT. Este fichero aporta las funciones para crear el servicio
-// ******************************************************************************************************************************************************************************
-//____________________________________________________________________________________________________________________________
-// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
-// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
-// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
-// PARTICULAR PURPOSE.
-//
-// Copyright (C) 1993-1997 Microsoft Corporation. All Rights Reserved.
-//
-// MODULE: service.h
-// AUTHOR: Craig Link
-//
-// Comments: The use of this header file and the accompanying service.c
-// file simplifies the process of writting a service. You as a developer
-// simply need to follow the TODO's outlined in this header file, and
-// implement the ServiceStart() and ServiceStop() functions.
-//
-// There is no need to modify the code in service.c. Just add service.c
-// to your project and link with the following libraries...
-//
-// libcmt.lib kernel32.lib advapi.lib shell32.lib
-//
-// This code also supports unicode. Be sure to compile both service.c and
-// and code #include "service.h" with the same Unicode setting.
-//
-// Upon completion, your code will have the following command line interface
-//
-// <service exe> -? to display this list
-// <service exe> -install to install the service
-// <service exe> -remove to remove the service
-// <service exe> -debug <params> to run as a console app for debugging
-//
-// Note: This code also implements Ctrl+C and Ctrl+Break handlers
-// when using the debug option. These console events cause
-// your ServiceStop routine to be called
-//
-// Also, this code only handles the OWN_SERVICE service type
-// running in the LOCAL_SYSTEM security context.
-//
-// To control your service ( start, stop, etc ) you may use the
-// Services control panel applet or the NET.EXE program.
-//
-// To aid in writing/debugging service, the
-// SDK contains a utility (MSTOOLS\BIN\SC.EXE) that
-// can be used to control, configure, or obtain service status.
-// SC displays complete status for any service/driver
-// in the service database, and allows any of the configuration
-// parameters to be easily changed at the command line.
-// For more information on SC.EXE, type SC at the command line.
-//
-//____________________________________________________________________________________________________________________________
-#include <windows.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <process.h>
-#include <tchar.h>
-#include "registrow.h"
-
-#ifndef _SERVICE_H
-#define _SERVICE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// name of the executable
-#define SZAPPNAME "ogAdmWinClient"
-// internal name of the service
-#define SZSERVICENAME "Cliente Opengnsys"
-// displayed name of the service
-#define SZSERVICEDISPLAYNAME "Cliente Opengnsys"
-// list of service dependencies - "dep1\0dep2\0\0"
-#define SZDEPENDENCIES ""
-
-#define SERVIDOR_DEFAULT "0.0.0.0"
-#define PUERTO_DEFAULT "2003"
-#define IPLOCAL_DEFAULT "0.0.0.0"
-
-#define CHKREGISTRY(f) if (!(f)) { return 0;}
-#define RMVREGISTRY(f) if (!(f)) { return 0;}
-#define TOMAPARAMINT(p) p=atoi(&argv[i][3]);
-#define TOMAPARAMSTR(p) strcpy(p,&argv[i][3]);
-
-#define HIVE HKEY_LOCAL_MACHINE // Rama del registro donde estarn los parametros de conexin
-#define BASEKEY "SOFTWARE\\opengnsys" // Key del registro para parametros de conexin
-#define BASE "SOFTWARE\\opengnsys\\cliente" // SubKey del registro para parametros de conexin
-
-//____________________________________________________________________________________________________________________________
-//
-SERVICE_STATUS ssStatus; // current status of the service
-SERVICE_STATUS_HANDLE sshStatusHandle;
-//
-//____________________________________________________________________________________________________________________________
-// ServiceStart()must be defined by in your code.
-// The service should use ReportStatusToSCMgr to indicate
-// progress. This routine must also be used by StartService()
-// to report to the SCM when the service is running.
-//
-// If a ServiceStop procedure is going to take longer than
-// 3 seconds to execute, it should spawn a thread to
-// execute the stop code, and return. Otherwise, the
-// ServiceControlManager will believe that the service has
-// stopped responding
-//
-//____________________________________________________________________________________________________________________________
-VOID ServiceStart(DWORD dwArgc, LPTSTR *lpszArgv);
-VOID ServiceStop();
-//____________________________________________________________________________________________________________________________
-// The following are procedures which
-// may be useful to call within the above procedures,
-// but require no implementation by the user.
-// They are implemented in service.c
-//
-// FUNCTION: ReportStatusToSCMgr()
-//
-// PURPOSE: Sets the current status of the service and
-// reports it to the Service Control Manager
-//
-// PARAMETERS:
-// dwCurrentState - the state of the service
-// dwWin32ExitCode - error code to report
-// dwWaitHint - worst case estimate to next checkpoint
-//
-// RETURN VALUE:
-// TRUE - success
-// FALSE - failure
-//____________________________________________________________________________________________________________________________
-BOOL ReportStatusToSCMgr(DWORD dwCurrentState, DWORD dwWin32ExitCode, DWORD dwWaitHint);
-//____________________________________________________________________________________________________________________________
-// FUNCTION: AddToMessageLog(LPTSTR lpszMsg)
-//
-// PURPOSE: Allows any thread to log an error message
-//
-// PARAMETERS:
-// lpszMsg - text for message
-//
-// RETURN VALUE:
-// none
-//____________________________________________________________________________________________________________________________
-void AddToMessageLog(LPTSTR lpszMsg);
-//____________________________________________________________________________________________________________________________
-//
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/admin/Sources/Clients/ogagent/INSTALL.es.txt b/admin/Sources/Clients/ogagent/INSTALL.es.txt
new file mode 100644
index 00000000..3f43206f
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/INSTALL.es.txt
@@ -0,0 +1,89 @@
+OGAgent: agente OpenGnsys para sistemas operativos INSTALL.es.txt
+====================================================================
+
+
+Requisitos de creación
+----------------------
+Sisitema operativo Linux con los siguientes paquetes instalados:
+- Subversion
+- GNU C++, Python, librerías PyQt4
+- Creación de instalador Exe (Wine 32 bits, Wine Gecko, Wine Mono, Samba Winbind, Cabextrct)
+- Creación de paquetes Deb (debhelper, dpkg-dev)
+- Creación de paquetes RPM (rpm-build)
+- Creación de paquetes Pkg (xar, bomutils)
+
+
+Crear instaladores de OGAgent
+-----------------------------
+- Paso previo: actaulizar componentes gráficos de PyQt para OGAgnet:
+ src/update.sh
+
+- Crear paquetes Deb y RPM para distribuciones Linux (requiere permisos de "root"):
+ sudo linux/build-packages.sh
+
+- Crear paquete Pkg para sistemas operativos macOS X:
+ sudo macos/build-pkg.sh
+
+- Crear el programa instalador para sistemas operativos Windows:
+ windows/build-windows.sh
+
+- Subir los nuevos ficheros .deb, .rpm, .pkg y .exe generados al directorio
+/opt/opengnsys/www/descargas del servidor OpenGnsys.
+
+
+Instalar OGAgent en cliente modelo
+----------------------------------
+- Descargar el fichero correspondiente en el sistema operativo del cliente.
+
+- Ubuntu, Debian y derivados:
+ - Instalar dependencias (NOTA: revisar dependencias para Ubuntu 12.04):
+ sudo apt-get install -y libxss1 policykit-1 python python-requests python-qt4 python-six python-prctl
+ - Descargar e instalar el agente:
+ sudo dpkg -i ogagent_Version_all.deb
+ - Configurar el agente:
+ sudo sed -i "0,/remote=/ s,remote=.*,remote=https://IPServidorOpenGnsys/opengnsys/rest/," /usr/share/OGAgent/cfg/ogagent.cfg
+ - Iniciar el servicio (se iniciará automáticamente en el proceso de arranque):
+ sudo service ogagent start
+
+- Red Hat, Fedora y derivados (como root):
+ - Descargar e instalar el agente:
+ yum install ogagent-Version.noarch.rpm (Red Hat/CentOS)
+ dnf install ogagent-Version.noarch.rpm (Fedora)
+ - Configurar el agente:
+ sed -i "0,/remote=/ s,remote=.*,remote=https://IPServidorOpenGnsys/opengnsys/rest/," /usr/share/OGAgent/cfg/ogagent.cfg
+ - Puede ser necesario corregir permisos antes de iniciar el servicio:
+ chmod +x /etc/init.d/ogagent
+ - Iniciar el servicio (se iniciará automáticamente en el proceso de arranque):
+ service ogagent start
+
+- OpenSuSE:
+ (en preparación)
+
+- Windows (como usuario administrador):
+ - Descargar e instalar el agente ejecutando:
+ OGAgentSetup-Version.exe
+ - Seguir las instrucciones del instalador.
+ - Editar el fichero de configuación "C:\Program Files\OGAgent\cfg\ogagent.cfg" (o C:\Archivos de programa\OGAgent\cfg\ogagent.cfg) y modificar el valor de la cláusula "remote" de la sección [OGAgent] inclyendo la dirección IP del servidor OpenGnsys.
+ - Iniciar el servicio (se iniciará automáticamente en el proceso de arranque):
+ NET START OGAgent
+
+- macOS:
+ - Instalar dependencias:
+ sudo easy_install pip
+ sudo pip install netifaces requests six
+ - Descargar e instalar el agente:
+ sudo installer -pkg OGAgentInstaller-Version.pkg -target /
+ - Descargar el paquete y usar Finder pulsando sobre el fichero para instalarlo.
+ - Configurar el agente:
+ sed -i "0,/remote=/ s,remote=.*,remote=https://IPServidorOpenGnsys/opengnsys/rest/," /Applications/OGAgent.app/cfg/ogagent.cfg
+ - Iniciar el servicio (se iniciará automáticamente en el proceso de arranque):
+ sudo ogagent start
+
+
+Postconfiguración para clientes clonados
+----------------------------------------
+- Ejecutar manualmente o configurar automáticamente OGAgent en los clientes clonados
+en el script de postconfiguración tras restuarar imagen:
+ ogConfigureOgagent NDisco Npart
+
+
diff --git a/admin/Sources/Clients/ogagent/linux/Makefile b/admin/Sources/Clients/ogagent/linux/Makefile
new file mode 100644
index 00000000..6ada91f5
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/Makefile
@@ -0,0 +1,72 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Directories
+SOURCEDIR := ../src
+LIBDIR := $(DESTDIR)/usr/share/OGAgent
+BINDIR := $(DESTDIR)/usr/bin
+SBINDIR = $(DESTDIR)/usr/sbin
+APPSDIR := $(DESTDIR)/usr/share/applications
+CFGDIR := $(DESTDIR)/etc/ogagent
+INITDIR := $(DESTDIR)/etc/init.d
+XDGAUTOSTARTDIR := $(DESTDIR)/etc/xdg/autostart
+KDEAUTOSTARTDIR := $(DESTDIR)/usr/share/autostart
+
+PYC := $(shell find $(SOURCEDIR) -name '*.py[co]')
+CACHES := $(shell find $(SOURCEDIR) -name '__pycache__')
+
+clean:
+ rm -rf $(PYC) $(CACHES) $(DESTDIR)
+install-ogagent:
+ rm -rf $(DESTDIR)
+ mkdir -p $(LIBDIR)
+ mkdir -p $(BINDIR)
+ mkdir -p $(SBINDIR)
+ mkdir -p $(APPSDIR)
+ mkdir -p $(CFGDIR)
+ mkdir -p $(XDGAUTOSTARTDIR)
+ mkdir -p $(KDEAUTOSTARTDIR)
+
+ mkdir $(LIBDIR)/img
+
+ # Cleans up .pyc and cache folders
+ rm -f $(PYC) $(CACHES)
+
+ cp -r $(SOURCEDIR)/opengnsys $(LIBDIR)/opengnsys
+ cp -r $(SOURCEDIR)/cfg $(LIBDIR)/cfg
+ cp $(SOURCEDIR)/img/oga.png $(LIBDIR)/img
+
+ cp $(SOURCEDIR)/OGAgentUser.py $(LIBDIR)
+ # QT Dialogs & resources
+ cp $(SOURCEDIR)/*_ui.py $(LIBDIR)
+ cp $(SOURCEDIR)/OGAgent_rc.py $(LIBDIR)
+
+ # Autostart elements for gnome/kde
+ cp desktop/OGAgentTool.desktop $(XDGAUTOSTARTDIR)
+ cp desktop/OGAgentTool.desktop $(KDEAUTOSTARTDIR)
+
+ # scripts
+ cp scripts/ogagent $(BINDIR)
+ cp scripts/OGAgentTool-startup $(BINDIR)
+ cp scripts/OGAgentTool $(BINDIR)
+
+ # Fix permissions
+ chmod 755 $(BINDIR)/ogagent
+ chmod 755 $(BINDIR)/OGAgentTool-startup
+ chmod 755 $(LIBDIR)/OGAgentUser.py
+ chmod 600 $(LIBDIR)/cfg/ogagent.cfg
+
+ # If for red hat based, copy init.d
+ifeq ($(DISTRO),rh)
+ mkdir -p $(INITDIR)
+ cp debian/ogagent.init $(INITDIR)/ogagent
+ chmod +x $(INITDIR)/ogagent
+ ln -fs /usr/share/OGAgent/cfg/ogagent.cfg $(CFGDIR)
+ ln -fs /usr/share/OGAgent/cfg/ogclient.cfg $(CFGDIR)
+endif
+
+ # chmod 0755 $(BINDIR)/ogagent
+uninstall:
+ rm -rf $(LIBDIR)
+ # rm -f $(BINDIR)/ogagent
+ rm -rf $(CFGDIR)
diff --git a/admin/Sources/Clients/ogagent/linux/build-packages.sh b/admin/Sources/Clients/ogagent/linux/build-packages.sh
new file mode 100755
index 00000000..b4f11077
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/build-packages.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+VERSION=1.1.0
+RELEASE=1
+
+cd $(dirname "$0")
+top=`pwd`
+
+# Debian based
+dpkg-buildpackage -b -d
+
+cat ogagent-template.spec |
+ sed -e s/"version 0.0.0"/"version ${VERSION}"/g |
+ sed -e s/"release 1"/"release ${RELEASE}"/g > ogagent-$VERSION.spec
+
+# Now fix dependencies for opensuse
+cat ogagent-template.spec |
+ sed -e s/"version 0.0.0"/"version ${VERSION}"/g |
+ sed -e s/"name ogagent"/"name ogagent-opensuse"/g |
+ sed -e s/"PyQt4"/"python-qt4"/g |
+ sed -e s/"libXScrnSaver"/"libXss1"/g > ogagent-opensuse-$VERSION.spec
+
+
+# Right now, ogagent-xrdp-1.7.0.spec is not needed
+for pkg in ogagent-$VERSION.spec ogagent-opensuse-$VERSION.spec; do
+
+ rm -rf rpm
+ for folder in SOURCES BUILD RPMS SPECS SRPMS; do
+ mkdir -p rpm/$folder
+ done
+
+ rpmbuild -v -bb --clean --buildroot=$top/rpm/BUILD/$pkg-root --target noarch $pkg 2>&1
+done
+
+#rm ogagent-$VERSION
diff --git a/admin/Sources/Clients/ogagent/linux/debian/changelog b/admin/Sources/Clients/ogagent/linux/debian/changelog
new file mode 100644
index 00000000..01fd564d
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/debian/changelog
@@ -0,0 +1,12 @@
+ogagent (1.1.0) stable; urgency=medium
+
+ * Functional OpenGnsys Agent interacting with OpenGnsys Server 1.1.0
+
+ -- Ramón M. Gómez <ramongomez@us.es> Tue, 13 Oct 2016 17:00:00 +0200
+
+ogagent (1.0.0) stable; urgency=medium
+
+ * Initial release for OpenGnsys Agent
+
+ -- Adolfo Gómez García <agomez@virtualcable.es> Tue, 18 Jul 2015 03:18:22 +0200
+
diff --git a/admin/Sources/Clients/ogagent/linux/debian/compat b/admin/Sources/Clients/ogagent/linux/debian/compat
new file mode 100644
index 00000000..f11c82a4
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/debian/compat
@@ -0,0 +1 @@
+9 \ No newline at end of file
diff --git a/admin/Sources/Clients/ogagent/linux/debian/control b/admin/Sources/Clients/ogagent/linux/debian/control
new file mode 100644
index 00000000..34d25de7
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/debian/control
@@ -0,0 +1,15 @@
+Source: ogagent
+Section: admin
+Priority: optional
+Maintainer: Ramón M. Gómez <ramongomez@us.es>
+Build-Depends: debhelper (>= 7), po-debconf
+Standards-Version: 3.9.2
+Homepage: https://opengnsys.es
+
+Package: ogagent
+Section: admin
+Priority: optional
+Architecture: all
+Depends: policykit-1(>=0.100), python-requests (>=0.8.2), python-qt4 (>=4.9), python-six(>=1.1), python-prctl(>=1.1.1), python (>=2.7), libxss1, ${misc:Depends}
+Description: OpenGnsys Agent for Operating Systems
+ This package provides the required components to allow this machine to work on an environment managed by OpenGnsys.
diff --git a/admin/Sources/Clients/ogagent/linux/debian/copyright b/admin/Sources/Clients/ogagent/linux/debian/copyright
new file mode 100644
index 00000000..7b6ef31b
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/debian/copyright
@@ -0,0 +1,26 @@
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
+Name: ogagent
+Maintainer: Ramón M. Gómez
+Source: https://opengnsys.es
+
+Copyright: 2014 Virtual Cable S.L.U.
+License: BSD-3-clause
+
+License: GPL-2+
+This program 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 2 of the License, or
+(at your option) any later version.
+.
+This program 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 this program; if not, write to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+.
+On Debian systems, the full text of the GNU General Public
+License version 2 can be found in the file
+`/usr/share/common-licenses/GPL-2'.
diff --git a/admin/Sources/Clients/ogagent/linux/debian/docs b/admin/Sources/Clients/ogagent/linux/debian/docs
new file mode 100644
index 00000000..b2b2a781
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/debian/docs
@@ -0,0 +1 @@
+readme.txt
diff --git a/admin/Sources/Clients/ogagent/linux/debian/ogagent.init b/admin/Sources/Clients/ogagent/linux/debian/ogagent.init
new file mode 100644
index 00000000..3eee35c1
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/debian/ogagent.init
@@ -0,0 +1,23 @@
+#!/bin/sh -e
+### BEGIN INIT INFO
+# Provides: ogagent
+# Required-Start: $local_fs $remote_fs $network $syslog $named
+# Required-Stop: $local_fs $remote_fs $network $syslog $named
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: OpenGnsys Agent Service
+### END INIT INFO
+#
+
+# . /lib/lsb/init-functions
+
+case "$1" in
+ start|stop|restart)
+ /usr/bin/ogagent $1
+ ;;
+ force-reload)
+ /usr/bin/ogagent restart
+ ;;
+ *) echo "Usage: $0 {start|stop|restart|force-reload}" >&2; exit 1 ;;
+esac
+
diff --git a/admin/Sources/Clients/ogagent/linux/debian/ogagent.links b/admin/Sources/Clients/ogagent/linux/debian/ogagent.links
new file mode 100644
index 00000000..9b970d7b
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/debian/ogagent.links
@@ -0,0 +1,2 @@
+/usr/share/OGAgent/cfg/ogagent.cfg /etc/ogagent/ogagent.cfg
+/usr/share/OGAgent/cfg/ogclient.cfg /etc/ogagent/ogclient.cfg
diff --git a/admin/Sources/Clients/ogagent/linux/debian/ogagent.postinst b/admin/Sources/Clients/ogagent/linux/debian/ogagent.postinst
new file mode 100644
index 00000000..b59cfa6f
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/debian/ogagent.postinst
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+. /usr/share/debconf/confmodule
+
+set -e
+case "$1" in
+ configure)
+ chmod 600 /usr/share/OGAgent/cfg/ogagent.cfg
+ ;;
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/admin/Sources/Clients/ogagent/linux/debian/ogagent.postinst.debhelper b/admin/Sources/Clients/ogagent/linux/debian/ogagent.postinst.debhelper
new file mode 100644
index 00000000..e75924dc
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/debian/ogagent.postinst.debhelper
@@ -0,0 +1,5 @@
+# Automatically added by dh_installinit
+if [ -x "/etc/init.d/ogagent" ]; then
+ update-rc.d ogagent defaults >/dev/null || exit $?
+fi
+# End automatically added section
diff --git a/admin/Sources/Clients/ogagent/linux/debian/ogagent.postrm b/admin/Sources/Clients/ogagent/linux/debian/ogagent.postrm
new file mode 100644
index 00000000..a46fa487
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/debian/ogagent.postrm
@@ -0,0 +1,10 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule
+
+set -e
+
+if [ "$1" = "purge" ] ; then
+ rm -rf /usr/share/OGAgent || true > /dev/null 2>&1
+fi
+
diff --git a/admin/Sources/Clients/ogagent/linux/debian/ogagent.postrm.debhelper b/admin/Sources/Clients/ogagent/linux/debian/ogagent.postrm.debhelper
new file mode 100644
index 00000000..3167f1f8
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/debian/ogagent.postrm.debhelper
@@ -0,0 +1,12 @@
+# Automatically added by dh_installinit
+if [ "$1" = "purge" ] ; then
+ update-rc.d ogagent remove >/dev/null
+fi
+
+
+# In case this system is running systemd, we make systemd reload the unit files
+# to pick up changes.
+if [ -d /run/systemd/system ] ; then
+ systemctl --system daemon-reload >/dev/null || true
+fi
+# End automatically added section
diff --git a/admin/Sources/Clients/ogagent/linux/debian/ogagent.substvars b/admin/Sources/Clients/ogagent/linux/debian/ogagent.substvars
new file mode 100644
index 00000000..978fc8b5
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/debian/ogagent.substvars
@@ -0,0 +1,2 @@
+misc:Depends=
+misc:Pre-Depends=
diff --git a/admin/Sources/Clients/ogagent/linux/debian/rules b/admin/Sources/Clients/ogagent/linux/debian/rules
new file mode 100755
index 00000000..fbe82e67
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/debian/rules
@@ -0,0 +1,44 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ touch configure-stamp
+build: build-arch build-indep
+build-arch: build-stamp
+build-indep: build-stamp
+build-stamp: configure-stamp
+ dh_testdir
+ $(MAKE)
+ touch $@
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+ dh_clean
+install: build
+ dh_testdir
+ dh_testroot
+ dh_prep
+ dh_installdirs
+ $(MAKE) DESTDIR=$(CURDIR)/debian/ogagent install-ogagent
+binary-arch: build install
+ # emptyness
+binary-indep: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installdebconf
+ dh_installinit --no-start
+ dh_python2=python
+ dh_compress
+ dh_link
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+binary: binary-indep
+.PHONY: build clean binary-indep binary install configure
diff --git a/admin/Sources/Clients/ogagent/linux/debian/source/format b/admin/Sources/Clients/ogagent/linux/debian/source/format
new file mode 100644
index 00000000..9f674278
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/debian/source/format
@@ -0,0 +1 @@
+3.0 (native) \ No newline at end of file
diff --git a/admin/Sources/Clients/ogagent/linux/desktop/OGAgentTool.desktop b/admin/Sources/Clients/ogagent/linux/desktop/OGAgentTool.desktop
new file mode 100644
index 00000000..fd3867d3
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/desktop/OGAgentTool.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Name=OpenGnsys Agent Tools
+Comment=OpenGnsys Userspace tools
+Exec=/usr/bin/OGAgentTool-startup
+Icon=/usr/share/OGAgent/img/oga.png
+Terminal=false
+Type=Application
+NoDisplay=true
+X-KDE-autostart-after=panel
+X-KDE-StartupNotify=false
+X-DBUS-StartupType=Unique
+X-KDE-UniqueApplet=true
diff --git a/admin/Sources/Clients/ogagent/linux/ogagent-template.spec b/admin/Sources/Clients/ogagent/linux/ogagent-template.spec
new file mode 100644
index 00000000..1368cccb
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/ogagent-template.spec
@@ -0,0 +1,65 @@
+%define _topdir %(echo $PWD)/rpm
+%define name ogagent
+%define version 0.0.0
+%define release 1
+%define buildroot %{_topdir}/%{name}-%{version}-%{release}-root
+
+BuildRoot: %{buildroot}
+Name: %{name}
+Version: %{version}
+Release: %{release}
+Summary: OpenGnsys Agent & tools
+License: BSD3
+Group: Admin
+Requires: python-six python-requests PyQt4 libXScrnSaver
+Vendor: OpenGnsys Project
+URL: https://opengnsys.es
+Provides: ogagent
+
+%define _rpmdir ../
+%define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
+
+
+%install
+curdir=`pwd`
+cd ../..
+make DESTDIR=$RPM_BUILD_ROOT DISTRO=rh install-ogagent
+cd $curdir
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+curdir=`pwd`
+cd ../..
+make DESTDIR=$RPM_BUILD_ROOT DISTRO=rh clean
+cd $curdir
+
+
+%post
+systemctl enable ogagent.service > /dev/null 2>&1
+
+%preun
+systemctl disable ogagent.service > /dev/null 2>&1
+systemctl stop ogagent.service > /dev/null 2>&1
+
+%postun
+# $1 == 0 on uninstall, == 1 on upgrade for preun and postun (just a reminder for me... :) )
+if [ $1 -eq 0 ]; then
+ rm -rf /etc/ogagent
+ rm /var/log/ogagent.log
+fi
+# And, posibly, the .pyc leaved behind on /usr/share/OGAgent
+rm -rf /usr/share/OGAgent > /dev/null 2>&1
+
+%description
+This package provides the required components to allow this machine to work on an environment managed by OpenGnsys.
+
+%files
+%defattr(-,root,root)
+/etc/ogagent
+/etc/xdg/autostart/OGAgentTool.desktop
+/etc/init.d/ogagent
+/usr/bin/OGAgentTool-startup
+/usr/bin/ogagent
+/usr/bin/OGAgentTool
+/usr/share/OGAgent/*
+/usr/share/autostart/OGAgentTool.desktop
diff --git a/admin/Sources/Clients/ogagent/linux/policy/org.openuds.pkexec.UDSActorConfig.policy b/admin/Sources/Clients/ogagent/linux/policy/org.openuds.pkexec.UDSActorConfig.policy
new file mode 100644
index 00000000..9afd775a
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/policy/org.openuds.pkexec.UDSActorConfig.policy
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+ "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
+
+<policyconfig>
+
+ <action id="org.freedesktop.policykit.pkexec.run-UDSActorConfig">
+ <description>Run UDS Actor Configuration Program</description>
+ <message>Authentication is required to run UDS Actor Configuration</message>
+ <defaults>
+ <allow_any>no</allow_any>
+ <allow_inactive>no</allow_inactive>
+ <allow_active>auth_admin_keep</allow_active>
+ </defaults>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/UDSActorConfig</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">TRUE</annotate>
+ </action>
+
+</policyconfig> \ No newline at end of file
diff --git a/admin/Sources/Clients/ogagent/linux/readme.txt b/admin/Sources/Clients/ogagent/linux/readme.txt
new file mode 100644
index 00000000..a2771def
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/readme.txt
@@ -0,0 +1,3 @@
+OGAgent is the agent intended for OpengGnsys interaction.
+
+Please, visit https://opengnsys.es for more information
diff --git a/admin/Sources/Clients/ogagent/linux/scripts/OGAgentTool b/admin/Sources/Clients/ogagent/linux/scripts/OGAgentTool
new file mode 100644
index 00000000..5b300523
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/scripts/OGAgentTool
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+FOLDER=/usr/share/OGAgent
+
+cd $FOLDER
+python OGAgentUser.py $@
diff --git a/admin/Sources/Clients/ogagent/linux/scripts/OGAgentTool-startup b/admin/Sources/Clients/ogagent/linux/scripts/OGAgentTool-startup
new file mode 100644
index 00000000..bb3a848e
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/scripts/OGAgentTool-startup
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Simple hack to wait for systray to be present
+# Exec tool if not already runned by session manager
+ps -ef | grep "$USER" | grep -v grep | grep -v OGAgentTool-startup | grep 'OGAgentTool' -q
+# If not already running
+if [ $? -eq 1 ]; then
+ sleep 5
+ exec /usr/bin/OGAgentTool
+fi \ No newline at end of file
diff --git a/admin/Sources/Clients/ogagent/linux/scripts/ogagent b/admin/Sources/Clients/ogagent/linux/scripts/ogagent
new file mode 100644
index 00000000..1bcc29b0
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/linux/scripts/ogagent
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+FOLDER=/usr/share/OGAgent
+
+cd $FOLDER
+python -m opengnsys.linux.OGAgentService $@
diff --git a/admin/Sources/Clients/ogagent/macos/build-pkg.sh b/admin/Sources/Clients/ogagent/macos/build-pkg.sh
new file mode 100755
index 00000000..500da58e
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/macos/build-pkg.sh
@@ -0,0 +1,87 @@
+#!/bin/bash
+# Create macOS installation packages.
+# Based on bomutils tutorail: http://bomutils.dyndns.org/tutorial.html
+
+VERSION=1.1.0
+AUTHOR="OpenGnsys Project"
+
+# Create empty directories.
+cd $(dirname $0)
+rm -fr build
+mkdir -p build && cd build
+mkdir -p flat/base.pkg flat/Resources/en.lproj
+mkdir -p root/Applications
+
+# Copy application and script files.
+cp -a ../../src root/Applications/OGAgent.app
+cp -a ../scripts .
+
+# Create plist file.
+cat << EOT > root/Applications/OGAgent.app/OGAgent.plist
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>BuildAliasOf</key>
+ <string>OGAgent</string>
+ <key>BuildVersion</key>
+ <value>$VERSION</value>
+ <author>$AUTHOR</author>
+</dict>
+</plist>
+EOT
+
+# Add files in the base package.
+( cd root && find . | cpio -o --format odc --owner 0:80 | gzip -c ) > flat/base.pkg/Payload
+
+# Create PackageInfo file.
+cat << EOT > flat/base.pkg/PackageInfo
+<pkg-info format-version="2" identifier="es.opengnsys.ogagent.base.pkg" version="$VERSION" install-location="/" auth="root">
+<payload installKBytes="$(du -k -s root)" numberOfFiles="$(find root | wc -l)"/>
+ <scripts>
+ <postinstall file="./postinstall"/>
+ </scripts>
+<bundle-version>
+ <bundle id="es.opengnsys.ogagent" CFBundleIdentifier="es.opengnsys.ogagent" path="./Applications/OGAgent.app" CFBundleVersion="$VERSION"/>
+</bundle-version>
+</pkg-info>
+EOT
+
+# Compress the scripts folder.
+( cd scripts && find . | cpio -o --format odc --owner 0:80 | gzip -c ) > flat/base.pkg/Scripts
+
+# Create BOM file.
+mkbom -u 0 -g 80 root flat/base.pkg/Bom
+
+# Create Distribution file.
+cat << EOT > flat/Distribution
+<?xml version="1.0" encoding="utf-8"?>
+<installer-script minSpecVersion="1.000000" authoringTool="com.apple.PackageMaker" authoringToolVersion="3.0.3" authoringToolBuild="174">
+ <title>OGAgent 1.1.0</title>
+ <options customize="never" allow-external-scripts="no"/>
+ <domains enable_anywhere="true"/>
+ <installation-check script="pm_install_check();"/>
+ <script>function pm_install_check() {
+ if(!(system.compareVersions(system.version.ProductVersion,'10.5') >= 0)) {
+ my.result.title = 'Failure';
+ my.result.message = 'You need at least Mac OS X 10.5 to install OGAgent.';
+ my.result.type = 'Fatal';
+ return false;
+ }
+ return true;
+}
+</script>
+ <choices-outline>
+ <line choice="choice1"/>
+ </choices-outline>
+ <choice id="choice1" title="base">
+ <pkg-ref id="es.opengnsys.ogagent.base.pkg"/>
+ </choice>
+ <pkg-ref id="es.opengnsys.ogagent.base.pkg" installKBytes="$(du -k -s root)" version="$VERSION" auth="Root">#base.pkg</pkg-ref>
+</installer-script>
+EOT
+
+# Create new Xar application archive.
+rm -f ../../../OGAgentInstaller-$VERSION.pkg
+( cd flat && xar --compression none -cf "../../../OGAgentInstaller-$VERSION.pkg" * )
+
diff --git a/admin/Sources/Clients/ogagent/macos/scripts/es.opengnsys.ogagent.plist b/admin/Sources/Clients/ogagent/macos/scripts/es.opengnsys.ogagent.plist
new file mode 100644
index 00000000..5ec11fa5
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/macos/scripts/es.opengnsys.ogagent.plist
@@ -0,0 +1,15 @@
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+ <dict>
+ <key>Label</key>
+ <string>es.opengnsys.ogagent</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>/usr/bin/ogagent</string>
+ <string>start</string>
+ </array>
+ <key>RunAtLoad</key>
+ <true/>
+ </dict>
+</plist>
+
diff --git a/admin/Sources/Clients/ogagent/macos/scripts/ogagent b/admin/Sources/Clients/ogagent/macos/scripts/ogagent
new file mode 100755
index 00000000..b139d7f2
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/macos/scripts/ogagent
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+FOLDER=/Applications/OGAgent.app
+
+cd $FOLDER
+python -m opengnsys.linux.OGAgentService $@
diff --git a/admin/Sources/Clients/ogagent/macos/scripts/postinstall b/admin/Sources/Clients/ogagent/macos/scripts/postinstall
new file mode 100755
index 00000000..ebb2ca48
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/macos/scripts/postinstall
@@ -0,0 +1,17 @@
+#!/usr/bin/env sh
+
+# Directories
+SRCDIR=$(dirname "$0")
+BINDIR=/usr/bin
+INITDIR=/Library/LaunchDaemons
+
+# Check if it needs to install Python dependencies:
+if ! which pip &>/dev/null; then
+ easy_install pip
+ pip install netifaces requests six
+fi
+
+# Copying files.
+cp $SRCDIR/ogagent $BINDIR
+cp $SRCDIR/es.opengnsys.ogagent.plist $INITDIR
+
diff --git a/admin/Sources/Clients/ogagent/requires.txt b/admin/Sources/Clients/ogagent/requires.txt
new file mode 100644
index 00000000..07ce387c
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/requires.txt
@@ -0,0 +1,3 @@
+six
+requests
+
diff --git a/admin/Sources/Clients/ogagent/src/OGAServiceHelper.py b/admin/Sources/Clients/ogagent/src/OGAServiceHelper.py
new file mode 100644
index 00000000..79a6c81d
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/OGAServiceHelper.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+
+import win32service
+import win32serviceutil
+
+svc_name = "UDSActor"
+
+try:
+ hscm = win32service.OpenSCManager(None, None, win32service.SC_MANAGER_ALL_ACCESS)
+
+ try:
+ hs = win32serviceutil.SmartOpenService(hscm, svc_name, win32service.SERVICE_ALL_ACCESS)
+ service_failure_actions = {
+ 'ResetPeriod': 864000, # Time in ms after which to reset the failure count to zero.
+ 'RebootMsg': u'', # Not using reboot option
+ 'Command': u'', # Not using run-command option
+ 'Actions': [
+ (win32service.SC_ACTION_RESTART, 5000), # action, delay in ms
+ (win32service.SC_ACTION_RESTART, 5000)
+ ]
+ }
+ win32service.ChangeServiceConfig2(hs, win32service.SERVICE_CONFIG_FAILURE_ACTIONS, service_failure_actions)
+ finally:
+ win32service.CloseServiceHandle(hs)
+finally:
+ win32service.CloseServiceHandle(hscm)
diff --git a/admin/Sources/Clients/ogagent/src/OGAgent.manifest b/admin/Sources/Clients/ogagent/src/OGAgent.manifest
new file mode 100644
index 00000000..0e5ff974
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/OGAgent.manifest
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <assemblyIdentity
+ type="win32"
+ name="UDSActorService"
+ version="1.6.0.0"
+ processorArchitecture="x86"
+ />
+ <description>Description</description>
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+</assembly>
diff --git a/admin/Sources/Clients/ogagent/src/OGAgent.qrc b/admin/Sources/Clients/ogagent/src/OGAgent.qrc
new file mode 100644
index 00000000..59177668
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/OGAgent.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="images">
+ <file>img/oga.png</file>
+ </qresource>
+</RCC>
diff --git a/admin/Sources/Clients/ogagent/src/OGAgentUser.py b/admin/Sources/Clients/ogagent/src/OGAgentUser.py
new file mode 100644
index 00000000..1c9bf30e
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/OGAgentUser.py
@@ -0,0 +1,358 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+
+import sys
+import time
+import signal
+import json
+import six
+import atexit
+from PyQt4 import QtGui
+from PyQt4 import QtCore
+
+from opengnsys import ipc
+from opengnsys import utils
+from opengnsys.log import logger
+from opengnsys.service import IPC_PORT
+from opengnsys import operations
+from about_dialog_ui import Ui_OGAAboutDialog
+from message_dialog_ui import Ui_OGAMessageDialog
+from opengnsys.scriptThread import ScriptExecutorThread
+from opengnsys import VERSION
+from opengnsys.config import readConfig
+from opengnsys.loader import loadModules
+
+# Set default characters encoding to UTF-8
+reload(sys)
+if hasattr(sys, 'setdefaultencoding'):
+ sys.setdefaultencoding('utf-8')
+
+trayIcon = None
+
+def sigAtExit():
+ if trayIcon:
+ trayIcon.quit()
+
+#def sigTerm(sigNo, stackFrame):
+# logger.debug("Exec sigTerm")
+# if trayIcon:
+# trayIcon.quit()
+
+# About dialog
+class OGAAboutDialog(QtGui.QDialog):
+ def __init__(self, parent=None):
+ QtGui.QDialog.__init__(self, parent)
+ self.ui = Ui_OGAAboutDialog()
+ self.ui.setupUi(self)
+ self.ui.VersionLabel.setText("Version " + VERSION)
+
+ def closeDialog(self):
+ self.hide()
+
+
+class OGAMessageDialog(QtGui.QDialog):
+ def __init__(self, parent=None):
+ QtGui.QDialog.__init__(self, parent)
+ self.ui = Ui_OGAMessageDialog()
+ self.ui.setupUi(self)
+
+ def message(self, message):
+ self.ui.message.setText(message)
+ self.show()
+
+ def closeDialog(self):
+ self.hide()
+
+
+class MessagesProcessor(QtCore.QThread):
+
+ logoff = QtCore.pyqtSignal(name='logoff')
+ message = QtCore.pyqtSignal(tuple, name='message')
+ script = QtCore.pyqtSignal(QtCore.QString, name='script')
+ exit = QtCore.pyqtSignal(name='exit')
+
+ def __init__(self, port):
+ super(self.__class__, self).__init__()
+ # Retries connection for a while
+ for _ in range(10):
+ try:
+ self.ipc = ipc.ClientIPC(port)
+ self.ipc.start()
+ break
+ except Exception:
+ logger.debug('IPC Server is not reachable')
+ self.ipc = None
+ time.sleep(2)
+
+ self.running = False
+
+ def stop(self):
+ self.running = False
+ if self.ipc:
+ self.ipc.stop()
+
+ def isAlive(self):
+ return self.ipc is not None
+
+ def sendLogin(self, userName, language):
+ if self.ipc:
+ self.ipc.sendLogin(userName, language)
+
+ def sendLogout(self, userName):
+ if self.ipc:
+ self.ipc.sendLogout(userName)
+
+ def run(self):
+ if self.ipc is None:
+ return
+ self.running = True
+
+ # Wait a bit so we ensure IPC thread is running...
+ time.sleep(2)
+
+ while self.running and self.ipc.running:
+ try:
+ msg = self.ipc.getMessage()
+ if msg is None:
+ break
+ msgId, data = msg
+ logger.debug('Got Message on User Space: {}:{}'.format(msgId, data))
+ if msgId == ipc.MSG_MESSAGE:
+ module, message, data = data.split('\0')
+ self.message.emit((module, message, data))
+ elif msgId == ipc.MSG_LOGOFF:
+ self.logoff.emit()
+ elif msgId == ipc.MSG_SCRIPT:
+ self.script.emit(QtCore.QString.fromUtf8(data))
+ except Exception as e:
+ try:
+ logger.error('Got error on IPC thread {}'.format(utils.exceptionToMessage(e)))
+ except:
+ logger.error('Got error on IPC thread (an unicode error??)')
+
+ if self.ipc.running is False and self.running is True:
+ logger.warn('Lost connection with Service, closing program')
+
+ self.exit.emit()
+
+
+class OGASystemTray(QtGui.QSystemTrayIcon):
+ def __init__(self, app_, parent=None):
+ self.app = app_
+ self.config = readConfig(client=True)
+
+ # Get opengnsys section as dict
+ cfg = dict(self.config.items('opengnsys'))
+
+ # Set up log level
+ logger.setLevel(cfg.get('log', 'INFO'))
+
+ self.ipcport = int(cfg.get('ipc_port', IPC_PORT))
+
+ # style = app.style()
+ # icon = QtGui.QIcon(style.standardPixmap(QtGui.QStyle.SP_ComputerIcon))
+ icon = QtGui.QIcon(':/images/img/oga.png')
+
+ QtGui.QSystemTrayIcon.__init__(self, icon, parent)
+ self.menu = QtGui.QMenu(parent)
+ exitAction = self.menu.addAction("About")
+ exitAction.triggered.connect(self.about)
+ self.setContextMenu(self.menu)
+ self.ipc = MessagesProcessor(self.ipcport)
+
+ if self.ipc.isAlive() is False:
+ raise Exception('No connection to service, exiting.')
+
+ self.timer = QtCore.QTimer()
+ self.timer.timeout.connect(self.timerFnc)
+
+
+ self.stopped = False
+
+ self.ipc.message.connect(self.message)
+ self.ipc.exit.connect(self.quit)
+ self.ipc.script.connect(self.executeScript)
+ self.ipc.logoff.connect(self.logoff)
+
+ self.aboutDlg = OGAAboutDialog()
+ self.msgDlg = OGAMessageDialog()
+
+ self.timer.start(1000) # Launch idle checking every 1 seconds
+
+ self.ipc.start()
+
+ def initialize(self):
+ # Load modules and activate them
+ # Also, sends "login" event to service
+ self.modules = loadModules(self, client=True)
+ logger.debug('Modules: {}'.format(list(v.name for v in self.modules)))
+
+ # Send init to all modules
+ validMods = []
+ for mod in self.modules:
+ try:
+ logger.debug('Activating module {}'.format(mod.name))
+ mod.activate()
+ validMods.append(mod)
+ except Exception as e:
+ logger.exception()
+ logger.error("Activation of {} failed: {}".format(mod.name, utils.exceptionToMessage(e)))
+
+ self.modules[:] = validMods # copy instead of assignment
+
+ # If this is running, it's because he have logged in, inform service of this fact
+ self.ipc.sendLogin(operations.getCurrentUser(), operations.getSessionLanguage())
+
+ def deinitialize(self):
+ for mod in reversed(self.modules): # Deinitialize reversed of initialization
+ try:
+ logger.debug('Deactivating module {}'.format(mod.name))
+ mod.deactivate()
+ except Exception as e:
+ logger.exception()
+ logger.error("Deactivation of {} failed: {}".format(mod.name, utils.exceptionToMessage(e)))
+
+ def timerFnc(self):
+ pass
+
+ def message(self, msg):
+ '''
+ Processes the message sent asynchronously, msg is an QString
+ '''
+ try:
+ logger.debug('msg: {}, {}'.format(type(msg), msg))
+ module, message, data = msg
+ except Exception as e:
+ logger.error('Got exception {} processing message {}'.format(e, msg))
+ return
+
+ for v in self.modules:
+ if v.name == module: # Case Sensitive!!!!
+ try:
+ logger.debug('Notifying message {} to module {} with json data {}'.format(message, v.name, data))
+ v.processMessage(message, json.loads(data))
+ return
+ except Exception as e:
+ logger.error('Got exception {} processing generic message on {}'.format(e, v.name))
+
+ logger.error('Module {} not found, messsage {} not sent'.format(module, message))
+
+ def executeScript(self, script):
+ logger.debug('Executing script')
+ script = six.text_type(script.toUtf8()).decode('base64')
+ th = ScriptExecutorThread(script)
+ th.start()
+
+ def logoff(self):
+ logger.debug('Logoff invoked')
+ operations.logoff() # Invoke log off
+
+ def about(self):
+ self.aboutDlg.exec_()
+
+ def cleanup(self):
+ logger.debug('Quit invoked')
+ if self.stopped is False:
+ self.stopped = True
+ try:
+ self.deinitialize()
+ except Exception:
+ logger.exception()
+ logger.error('Got exception deinitializing modules')
+
+ try:
+ # If we close Client, send Logoff to Broker
+ self.ipc.sendLogout(operations.getCurrentUser())
+ time.sleep(1)
+ self.timer.stop()
+ self.ipc.stop()
+ except Exception:
+ # May we have lost connection with server, simply log and exit in that case
+ logger.exception()
+ logger.exception("Got an exception, processing quit")
+
+ try:
+ # operations.logoff() # Uncomment this after testing to logoff user
+ pass
+ except Exception:
+ pass
+
+ def quit(self):
+ #logger.debug("Exec quit {}".format(self.stopped))
+ if self.stopped is False:
+ self.cleanup()
+ self.app.quit()
+
+ def closeEvent(self, event):
+ logger.debug("Exec closeEvent")
+ event.accept()
+ self.quit()
+
+if __name__ == '__main__':
+ app = QtGui.QApplication(sys.argv)
+
+ if not QtGui.QSystemTrayIcon.isSystemTrayAvailable():
+ # QtGui.QMessageBox.critical(None, "Systray", "I couldn't detect any system tray on this system.")
+ sys.exit(1)
+
+ # This is important so our app won't close on messages windows (alerts, etc...)
+ QtGui.QApplication.setQuitOnLastWindowClosed(False)
+
+ try:
+ trayIcon = OGASystemTray(app)
+ except Exception as e:
+ logger.exception()
+ logger.error('OGA Service is not running, or it can\'t contact with OGA Server. User Tools stopped: {}'.format(utils.exceptionToMessage(e)))
+ sys.exit(1)
+
+ try:
+ trayIcon.initialize() # Initialize modules, etc..
+ except Exception as e:
+ logger.exception()
+ logger.error('Exception initializing OpenGnsys User Agent {}'.format(utils.exceptionToMessage(e)))
+ trayIcon.quit()
+ sys.exit(1)
+
+ app.aboutToQuit.connect(trayIcon.cleanup)
+ trayIcon.show()
+
+ # Catch kill and logout user :)
+ #signal.signal(signal.SIGTERM, sigTerm)
+ atexit.register(sigAtExit)
+
+ res = app.exec_()
+
+ logger.debug('Exiting')
+ trayIcon.quit()
+
+ sys.exit(res)
diff --git a/admin/Sources/Clients/ogagent/src/OGAgent_rc.py b/admin/Sources/Clients/ogagent/src/OGAgent_rc.py
new file mode 100644
index 00000000..867ca2ab
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/OGAgent_rc.py
@@ -0,0 +1,289 @@
+# -*- coding: utf-8 -*-
+
+# Resource object code
+#
+# Created by: The Resource Compiler for PyQt4 (Qt v4.8.6)
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt4 import QtCore
+
+qt_resource_data = b"\
+\x00\x00\x0f\x42\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x30\x00\x00\x00\x30\x08\x06\x00\x00\x01\x20\x05\xc9\x11\
+\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0e\xc7\x00\x00\x0e\xc7\
+\x01\x38\x92\x2f\x76\x00\x00\x0e\xf4\x49\x44\x41\x54\x78\xda\xc5\
+\x59\x07\x58\x53\xd9\x12\xbe\x29\xd4\x84\x12\x21\xf4\x22\x08\x08\
+\x02\x22\xa2\x22\x22\x22\x8a\xa0\xa0\x14\x1b\xae\x62\x05\xac\xb8\
+\x76\xd7\xde\xd6\xde\x15\xf5\xd9\x7b\x17\x51\x41\x50\x14\x10\x04\
+\x44\x94\x8e\xd2\x25\x80\x80\x48\xef\x24\xb4\xbc\x39\x59\x6e\x4c\
+\x42\xe2\x0a\xea\x7b\xf3\x7d\xe1\xde\x7b\xca\xcc\x9c\x73\xe6\xcc\
+\xfc\x33\x90\xd9\x6c\x36\x86\xe8\xe8\xe9\x9b\xe9\xab\x97\x79\x9a\
+\x62\x5d\x44\x46\x7f\xd6\x6f\x3f\xc1\xb6\xb7\x1d\xf6\xf7\xc3\xc0\
+\xf0\xf3\x53\x5c\xc6\x2e\xe4\x74\x9c\xbe\x78\xff\xcd\xc1\x9d\x2b\
+\x08\xf8\x48\x34\x48\x55\x85\x9e\x4a\x5e\xe6\x3d\x7d\x04\xfa\x40\
+\x8d\xd3\xdd\xc6\x6d\x73\x1c\x6b\x55\xd8\xd9\xd1\xf9\x88\xc3\x0a\
+\x9f\x11\x19\x93\xc8\x4e\x4e\xcb\xce\x5e\xeb\x3b\x7b\x07\x19\xe3\
+\xa1\xd1\x23\x2d\x08\xd0\x91\xcc\x91\x81\x6b\x15\x15\x9b\xb4\xd6\
+\xd6\x7a\xf0\x61\xae\x56\x1b\x77\x9d\x62\xed\xdb\xe6\x2b\x11\xfc\
+\x22\xfa\x10\x5f\x47\x47\x47\x87\x38\xc6\x4f\x6c\xee\x3a\x0e\x9f\
+\xba\x91\xd1\xa5\x00\x6a\x24\x30\x99\x2c\x39\x32\xef\x1a\x10\xed\
+\x3e\x7c\x91\xb5\x65\xad\xb7\x38\x9f\x56\x57\x6f\x3f\x79\xda\xd9\
+\xc9\x76\xae\xaa\xae\xd5\xe7\x6a\x85\x2f\x12\x71\x40\xef\x82\x9c\
+\xba\xed\xe1\x9c\x19\x13\x27\x9b\x18\xf5\x7b\x84\x77\xf8\x07\x86\
+\x5f\x98\xea\x32\xd6\x07\xbd\x57\xd7\xd4\xe9\xef\x3f\x7e\x35\x47\
+\x4d\x85\xde\x40\x3e\x70\xe2\x6a\x1e\x6a\xec\xec\xec\xe4\x4c\x6e\
+\x6f\xef\x90\x44\x4f\x34\xf8\xaf\x1d\x27\xd8\x07\x76\xac\xc0\x52\
+\xd3\x73\x36\x4d\x18\x67\x1d\x6a\x37\x72\x88\x23\xf9\xaf\x15\xf3\
+\xf4\xf8\x44\x92\x49\x4c\xa4\xce\xd5\xdb\x81\x9c\xc1\x70\x58\x71\
+\x70\x2e\xfb\x22\x5e\xbf\xdb\xcb\x55\x49\x18\x95\x55\xd4\xb4\xc0\
+\x43\x0a\x06\x5b\x9d\xba\x70\xaf\xc8\xd7\xc7\x03\xdb\xb0\xd3\xaf\
+\x43\xe4\x84\x0d\x2b\xe6\x4a\x27\xa5\x64\xb2\x07\x0f\x32\xc2\x5c\
+\x27\xd8\x6a\xc2\xc9\xb4\xed\xdf\xbe\x5c\x9c\xbb\x4b\x88\x92\xd3\
+\xb2\x66\xdd\x79\x18\x7a\x53\xd4\x0e\x71\x55\x82\x3d\x26\x6d\xd8\
+\x79\xb2\x7d\xa9\xd7\x34\x9b\x95\x4b\x66\x9a\xff\xeb\xb6\xa2\xc1\
+\x5b\xd7\xf9\xa8\xca\x50\xa5\xcb\xf0\xf3\x10\x29\x01\x1f\x80\x06\
+\xa3\xe7\xd0\xc1\xc6\x97\xdf\x27\x7d\x5c\xc0\x3b\x68\xdf\xb1\xcb\
+\x0d\x34\x79\x39\xaa\x89\xa1\xee\xca\x6e\x8b\xd6\xd3\xd1\x88\xc0\
+\x27\x7c\x29\xab\x1c\x25\x2f\x27\x13\x45\xa5\x50\x72\x86\x0e\x32\
+\x32\xa0\x50\xa4\x8f\x77\x9b\x80\x16\xbd\x69\xf5\x02\xed\xd6\xd6\
+\x36\x8a\xaa\x8a\x62\x14\xd8\x6b\xd6\xf2\x85\x1e\x46\x99\xd9\x05\
+\xec\x80\xa7\xaf\x0a\xc9\x72\xb2\xd4\xe2\xba\xfa\x46\x0d\x5c\x35\
+\xdd\xbe\xea\x51\xc0\xb5\x28\xe8\xf9\x6b\xf6\xa4\xf1\xa3\x30\x65\
+\xba\xc2\x01\xd4\x2e\x21\x21\x6e\xeb\x3e\xd1\x4e\x86\xbc\x79\x8d\
+\x97\xa6\xb0\xc5\xa1\xc1\x88\x86\x98\x0f\xb8\xfa\x22\x22\x2e\xc8\
+\x61\x8c\xd5\xc4\x80\xa0\x08\x86\xd0\x83\xcb\xc9\x2b\x74\x34\xd0\
+\xd3\xe6\x7e\x9b\x9b\x19\x4d\x44\xcf\xf8\xc4\xf4\xbe\x42\x27\xc0\
+\xe0\x50\xde\x2b\x95\x5f\x50\x82\xd1\x15\xe4\x31\xb0\x2d\xa2\x48\
+\xd3\x68\x6a\x6e\xa1\x1f\x3e\x75\x93\xb1\x75\xad\x17\xcd\xd2\xc2\
+\xb8\xcd\xef\xfc\xbd\x42\x58\xbc\x68\xe3\xcb\x67\x14\x8f\xd9\xbe\
+\xde\x87\xfa\x24\x24\xaa\xcd\xd5\xc9\x16\xf3\x99\xe3\x66\xc6\xe7\
+\x07\x78\xe9\xdc\xd5\x87\x11\x9f\x18\xc5\x76\xf8\xb7\xa6\xba\xf2\
+\xfb\xe5\x0b\x67\x0c\xc3\x7a\x41\x7c\x1a\xf1\x9a\x11\x5a\x1f\x81\
+\x80\xb1\x13\x53\x32\xe7\xdc\x7b\xf4\xe2\x1a\xde\xb7\x78\xfe\xd4\
+\xd1\xe8\xa8\x7a\x24\x20\x2a\x36\x71\x5d\xf0\x8b\x98\x83\xe8\x5d\
+\x52\x52\xa2\x6e\xd7\xc6\xc5\xf2\xf8\x00\x8b\x41\x46\xd7\x91\x00\
+\xfc\x1b\x8d\xed\x91\x80\xbc\xfc\xcf\x63\x71\xe6\x88\x78\x99\xe3\
+\xb4\x68\xfe\x14\xbb\x73\x57\x1e\xbe\xfa\xc7\xf6\x07\x5c\xe6\xf3\
+\x92\x6c\x36\x71\xcb\x9e\x33\x6d\xfa\xba\x5a\xc4\xd9\x1e\xce\x18\
+\x89\x44\xe4\xf1\x7e\x81\x35\xe4\xf3\xd7\x02\xc2\x04\x27\x10\x08\
+\x84\x4e\x3e\x73\xf7\x7f\x7e\x0b\x3d\x89\x44\x62\xbb\x89\x91\x5e\
+\x00\x7a\x2f\x2a\x2e\x73\x3a\x7b\xc5\x3f\x78\xef\x56\x5f\x6c\xcf\
+\x96\x65\xd8\xf6\xfd\x67\xeb\xd3\x3e\xe6\x2c\x95\x92\x92\x6c\xaf\
+\xab\x6f\xba\x0b\x96\x81\xa9\xa9\x2a\x7d\x21\x7b\xcf\x76\x1b\x7f\
+\xf1\xc6\xe3\xe7\x5c\xcf\xb2\xd3\xaf\xed\xc0\x8e\x3f\x49\x82\xe7\
+\x62\xa8\xdf\x37\x64\x81\xa7\xab\x33\xde\x06\xde\x06\x43\xcc\xbb\
+\xbe\x91\x3b\x96\xe3\x84\xb2\x33\x37\xd9\x43\x06\x0d\xa8\xdd\xba\
+\xe7\x0c\x79\xc3\xca\x79\xa3\xc9\xc8\x88\x91\x33\x89\x8e\x4b\x5e\
+\x05\xf7\xeb\x28\x5a\x01\xce\x14\x1d\xf2\x8a\xc5\x33\x07\xab\xab\
+\xd2\x93\x79\x05\xc2\x78\x5e\xc3\xc0\x78\x9d\x51\x7f\x3d\xed\xa0\
+\xa7\xa1\xd1\x93\xf4\x74\x34\xb1\xf8\x84\x8f\xe5\x5c\x2b\xb2\xb1\
+\x32\x3f\x86\x7e\xdf\x3b\xb0\x82\xa2\x52\x6b\xfb\xd1\x96\x22\xfb\
+\x71\x37\xef\xec\x60\xc3\x15\x4e\xee\x89\x4d\xab\x2a\xd3\xd3\xc2\
+\xa3\xde\xf3\xb5\x59\x5a\x98\x60\x17\xae\x3d\xea\xd4\xd6\x54\x21\
+\xcc\xfd\x63\x12\x8f\x7f\xce\xae\x9a\x60\x3f\xe2\x48\x8f\x04\x48\
+\x48\x88\x35\x8c\xb2\x1e\x3c\xee\xef\x43\x17\x43\x60\x7f\xc5\xc4\
+\xc4\xc8\x10\xbd\x87\x74\x1c\xf2\xbb\xce\xae\xad\xab\xaf\xb6\xb6\
+\x1c\xa4\xd4\x15\xc4\xc0\xb1\x7c\x48\x5f\x3c\x7f\xca\x3e\x72\x4f\
+\x6f\xa6\xbe\xae\x66\x18\xc4\x22\x83\x0b\xd7\x1f\x31\x1c\xc7\x58\
+\x61\xe9\x19\xb9\x24\x63\xc3\x7e\xfe\x39\x9f\x0a\xa7\x52\x28\x52\
+\x1c\xe6\x7b\x8f\x5e\x29\xdd\xb2\xd6\xcb\xee\xbb\x81\xed\x7b\xd4\
+\x87\x26\x5b\x00\x91\xfd\x6b\x42\x4a\x46\x2b\xf8\x4f\xcd\xe6\x66\
+\xe6\x54\x3b\x1b\x8b\x57\x87\xfd\xae\xab\x8d\xb7\xb7\xde\x08\xcc\
+\xb9\x31\x5b\xa8\x2f\x42\x04\x93\x14\x82\x42\x5f\x1f\x49\xfb\x98\
+\x3b\x8d\x4c\x22\xb5\xee\xdc\xb8\x98\xf6\xd3\xbe\x88\x13\x92\xbf\
+\x56\x9a\x1e\x3d\x73\x2b\x8d\xb7\x0d\xc5\x47\xac\x97\xc4\x27\xe0\
+\xc1\x93\xb0\x4b\x78\x44\x43\xb6\x8f\xee\x00\x7a\x87\xd8\x1f\x07\
+\x37\x77\xb8\xcb\x04\xdb\x15\x23\x87\x0f\x3a\xd9\x2b\x01\x8f\x9e\
+\xbe\x3a\x83\x33\x47\x0e\xce\xc3\xdd\x61\xae\xa0\x87\x0d\x7c\x16\
+\x75\xa2\x57\x02\x8a\x4b\xcb\x2d\xe2\xde\xa7\x2d\x41\xef\x52\x92\
+\x12\xb5\x38\xf3\x5f\x41\x1c\x01\x27\xcf\xdd\x49\xc0\x1b\x04\xa3\
+\xae\x9b\xd3\xe8\xe5\x8f\x43\x22\xfd\x7a\x2d\x20\x3c\xea\xdd\x16\
+\xde\x06\x71\x71\xb1\x46\xde\xef\x11\x96\x66\xa7\x7e\x44\x40\xc8\
+\xcb\xd8\x07\x1f\x33\x3f\xb9\x56\x54\xd5\x88\x71\x6e\xbd\x0a\x3d\
+\x6f\xd5\x92\x99\xfa\xe4\xd0\x88\xb8\xbf\xf1\x41\x70\x33\x5b\x7a\
+\xaa\xe1\xeb\x37\x49\x67\x82\x43\xa3\x97\x78\x7a\x38\x61\x4e\xe3\
+\xac\xb9\xed\x8d\x8d\x2d\x7a\x27\xcf\xde\x49\xe0\xb3\x22\x8a\xb4\
+\x54\xc5\xf7\x98\xa9\x28\x2b\xa6\xf3\x7e\xef\x39\x72\x89\xa9\xa3\
+\xad\x2e\x71\x00\xbc\x6b\x65\x55\x6d\x33\x18\x84\xb4\x9a\x32\xbd\
+\x73\xe5\xd2\x99\x44\x2a\x55\x0a\x6b\x6d\x6f\x97\xe1\x13\xd0\xd0\
+\xd8\xa4\x2a\xc8\x14\x07\xc7\x88\x16\xcc\x72\x71\xc6\xdf\xc1\xc1\
+\x35\xb9\x39\xdb\x49\x18\x1b\xea\x62\xe5\x15\xd5\x0d\xc7\xfe\x73\
+\x5b\x02\xb9\xed\x93\xe7\xef\x72\xad\x8e\x2a\x2d\x55\xc6\x27\xa0\
+\xa3\xa3\x53\x4c\x50\x00\x4a\x17\xba\xb6\xaf\x19\x30\xd9\x67\xf4\
+\x7e\xe4\xf4\xcd\xba\x31\x36\x43\xa4\x11\x73\x8e\xb0\xeb\x01\xf5\
+\x90\x88\x68\x7c\xcb\x34\x30\xec\xfe\xe3\x97\x59\x66\x03\x0d\xee\
+\x74\xbb\xc9\x9f\x4b\xbe\x0e\x45\x30\xa5\x6b\x7f\x57\xc3\xd2\xf5\
+\x39\x29\xc7\xe6\x65\xd4\x2e\x58\xe6\x29\x21\x2e\x26\x6b\x3e\xd0\
+\x90\x33\x1e\x00\x41\xb6\xfb\xc4\x31\xeb\xd1\x7b\x62\x6a\xe6\x5e\
+\x2a\x45\x1a\xbb\x7c\x2b\x30\xbd\xae\xbe\xa1\x13\x32\xab\xb3\x1c\
+\x30\x08\x7b\xf9\x19\x17\xe0\x77\xfe\xee\x3b\x04\x6e\x11\xf2\x42\
+\x50\x1a\xb5\x21\x3f\x84\xa2\x1b\x7a\x87\xf0\x7a\x83\x37\xa2\x01\
+\xac\xe9\x0f\xf7\x26\x90\x83\x3c\xb5\xd5\xcf\x41\x40\xcf\x30\x32\
+\xd0\x09\x2a\xfd\x5a\x69\xd6\xd8\xd8\xac\xc4\x81\xa7\x28\xcf\x82\
+\xcc\x24\x1f\x60\xaa\xfa\x3f\x67\xd1\xac\xc2\xc1\x84\xfd\xb4\x5e\
+\x78\xcf\x71\x77\xc4\x99\x65\xe5\x16\x4c\x1b\x31\xcc\x8c\xcb\xbc\
+\xbc\xb2\x06\x1b\x64\xda\xff\x0e\xfe\x2d\x29\x21\x51\xff\x30\x28\
+\xe2\x9a\x96\x9a\x32\xb1\xbf\x7e\x5f\x2c\x3c\x22\x21\x9a\xb3\x45\
+\x24\xf0\x96\xb0\x12\x8d\x7f\x33\xc9\x98\xf8\x94\x63\xde\x9e\x6e\
+\xdc\xef\xac\x1c\x46\xae\xf5\x70\x33\xee\x1d\xb9\xf7\xf8\x65\xf5\
+\xce\x0d\x8b\x10\x3f\xce\x77\xf0\xcb\x18\x9b\x1e\xc5\x83\x9c\xdc\
+\x42\x75\xde\x6f\x70\x2b\xc5\xb5\xb5\x0d\x5a\xda\x1a\xaa\x71\x57\
+\x6e\x05\x66\x8f\xb2\xb6\xe0\x32\xaf\xad\x6b\xc0\x10\xc4\x21\xff\
+\x8c\x9f\xa9\x6f\x68\x1a\x06\xfb\xbd\xa6\xa9\xa9\x45\xad\xb0\xf8\
+\x8b\x41\xbf\xbe\xdf\xe4\x83\xf3\xcc\x07\xc4\xbf\xb2\x47\x02\xe8\
+\x8a\xb4\x6a\x14\xd0\xbe\x21\x91\xc1\x94\x4b\x37\x1f\x27\x12\xe1\
+\x64\xb7\xad\x5b\xc8\x37\x36\x33\x87\xa1\x3b\x5f\xce\xe5\x73\x8f\
+\x04\x8c\xb2\x1a\xbc\xf1\x55\x74\xc2\x39\x3b\x9b\x21\x5d\x7e\x8b\
+\x8c\x2d\x59\x30\x95\xc0\x62\xb5\xb2\xf7\x1f\xbf\x4c\xd8\xb4\xda\
+\xab\xeb\xc2\x36\x63\xda\x9a\xaa\x6f\x7a\x1c\x93\x2d\x87\x98\x9c\
+\xdf\xb4\xeb\x94\x9f\xa4\xb8\xb8\xb8\x95\xe5\x40\x4e\x5b\x58\x64\
+\x7c\xea\xcb\xc8\x78\x53\x49\x09\x71\x2e\xf8\xba\x1b\x10\x9a\xe6\
+\x33\xc7\xdd\xa1\x57\x41\x7f\x2f\x98\x34\x30\xdd\xb6\x69\xf7\xa9\
+\x8d\x04\x36\x81\x34\xc5\x65\xec\x11\x40\x19\x0c\xd8\x92\x68\x7c\
+\x0c\xe4\x16\x03\xc0\x2b\x37\xf5\x1a\x55\xa4\x7e\xcc\x5d\xa4\xad\
+\xa1\x26\xe9\x3d\xdb\x1d\xdb\xb8\xeb\xe4\x75\x45\x05\x5a\xdd\xea\
+\xa5\xb3\x38\x7d\x37\xef\x3f\x7b\xb7\x7a\x99\xe7\x5c\x91\x41\xff\
+\x47\x48\xa1\x8f\x9c\xfc\xbc\x2e\x14\xb7\x6f\xdb\x72\xec\xdc\xb5\
+\x00\x39\x48\xfc\x31\x46\x61\x49\x45\x51\xf1\x17\x55\x25\x45\x5a\
+\xd6\x4f\x09\xb0\x1e\x66\xe6\x76\xe6\xd2\xfd\x13\x0e\x76\x23\x34\
+\x5a\x98\x4c\x19\x27\xfb\x11\xf5\x00\x9e\x1f\x46\xc6\x24\x4c\x80\
+\xa4\x5b\x8b\x2f\xa2\x89\xc2\x45\xc2\xe8\x53\x41\xf1\xe8\x98\xb8\
+\x94\x15\x59\xb9\x0c\x67\x61\x9e\x17\x05\x2c\x2f\x4f\xb7\x09\x3d\
+\xc9\x80\x7e\x49\xcc\xff\x1e\xa1\xb4\xe1\x59\x58\xec\xbe\xf6\xf6\
+\x0e\x89\x6e\x01\x4e\x49\xe1\x83\xa9\xb1\xbe\x3f\x84\x85\x27\x6a\
+\x2a\xf4\x14\xd8\x0b\x42\x76\x5e\xc1\xf8\xd0\xf0\xb8\xdd\xda\x5a\
+\xaa\xb1\x90\xb3\x3c\xfb\xbf\x2c\x00\x45\x81\x3b\x0f\x9f\xdf\x4a\
+\xfd\x90\xe3\x21\xd8\x87\x20\xd9\x94\x49\x63\x17\x82\xcd\xb0\xf0\
+\xb6\xf8\x84\x0f\x0b\x01\xfb\xbd\x15\x5c\x24\x44\xf8\xca\x2d\x6b\
+\xbd\xd5\x20\x2d\x6c\xfb\x9f\x2d\x20\xe6\x6d\xca\x9f\x08\x1f\x76\
+\x4f\x0a\xb4\xc2\xbc\x20\x5b\x04\xaf\xd6\xc1\xdb\x8e\x83\x56\x11\
+\xc5\x08\x45\x74\x82\xa3\x47\x5a\x1c\xfc\xed\x0b\x40\x36\x7d\xfc\
+\xec\xed\xe4\xaf\xe5\x55\xc6\x82\x83\x20\xcf\xda\x64\x67\x33\x74\
+\x9f\x30\x06\x28\x05\x3e\x70\xf2\x5a\x2e\xc4\x03\xba\xb0\x7e\xb8\
+\xd5\xc3\x7f\xbb\x09\xb5\x30\x59\xf2\xfb\x8f\x5d\x61\xa0\x67\x37\
+\xef\x6c\x61\x72\x41\x94\xf2\x78\x59\x63\xd3\xaa\x05\xda\x00\x4a\
+\x8a\x9b\x5b\x98\x7d\xba\x8f\x20\xb0\x7b\xab\x5c\x45\x65\xad\x41\
+\x69\x59\xb9\x65\x6d\x5d\xa3\xa1\x18\x99\xc4\x6c\xef\xe8\x60\x2a\
+\xd1\x69\x19\xba\xda\x1a\x91\x5c\x47\x8d\xec\x1d\xd5\xb0\x85\x29\
+\x8f\x08\x52\xee\x9d\xff\x26\x08\x79\x9f\x49\xe3\x47\xad\x06\xf8\
+\x75\x55\xb0\x4f\x5d\x8d\x9e\xf4\x23\xca\x02\x3c\xe8\x17\x1b\x9f\
+\x72\x36\x3a\x2e\xc5\x1e\xe5\xa8\x70\x7f\x50\xb9\x11\xa3\xc9\xcb\
+\x00\x1a\x56\x40\xd0\x02\x83\x0d\x42\xe8\x17\x8b\x7e\x9b\xca\x66\
+\xb6\xb0\xb2\x2d\xcc\x0c\x4f\x93\x43\x5e\xc6\x1c\x44\x05\x41\x61\
+\x4c\x11\x1a\x83\x5f\xc9\x8f\x28\x40\xa3\xc9\x32\x84\xb5\x0f\x35\
+\x37\xbe\x22\x6a\x0e\x04\x6d\xcd\xdb\xfe\xcf\x62\x21\xf4\x69\xca\
+\xca\x50\xb0\x89\x8e\x36\x9c\xc0\x02\xf0\x11\x4c\xba\x03\x7b\x9f\
+\x94\x91\x99\x99\xcb\xc0\xc0\xbb\x19\x59\x0f\x1b\x84\x2a\x31\x70\
+\x19\x31\x0c\xf2\x37\x42\xf4\x9b\x64\x03\x94\xb0\x90\x01\xa8\xce\
+\x16\x25\x00\xee\x85\xf8\x8f\x1e\x37\xca\xa3\x05\xdb\x1c\xc6\x58\
+\x6d\x03\xc5\x4a\x85\x14\x53\xdc\x01\x18\xfb\xb7\xb6\xb6\x12\x27\
+\x3a\x8e\xc2\x16\xcd\x9b\xc2\xed\x2b\x2e\xfd\x5a\x7d\xf1\xfa\x63\
+\x12\x84\xdf\x4c\x4d\x75\xa5\xf7\x03\x8d\xf5\x13\x60\x21\x57\x5a\
+\x5b\x59\x44\x5e\x1e\xb2\xb2\x14\xe4\x05\xa5\xc8\x4c\x66\xab\x9c\
+\x28\xa5\x1a\x9b\x9a\x95\xe0\x68\xb5\x50\x89\xf6\x7b\xca\xa7\xa4\
+\xe7\xcc\x78\x13\x9f\xea\x2b\xe8\x6e\xd1\x7f\x51\x78\xdb\xaa\xaa\
+\x6b\x4d\x4f\x5d\xbc\x9f\x04\x32\xc9\x0b\x3c\x5d\x51\xb9\x83\xdb\
+\xd7\xda\xda\x86\x9d\xbd\xe2\xff\xa9\xe4\x4b\xb9\xee\x8c\xc9\x8e\
+\xb3\x21\x2b\xe0\x14\xd7\xb2\x73\x0b\xd6\x80\x1e\xc4\xc6\x26\x26\
+\x77\x2c\x93\xc9\x62\x07\x3e\x7b\xdd\x02\x9b\x53\x4b\x36\x33\xd1\
+\xbf\x9f\x94\x9a\xe5\x29\x4a\xb9\xa0\xe7\xd1\x47\x66\x7b\x38\x4d\
+\x13\xd5\x8f\x5c\x2e\x72\xbd\x02\xe5\xe5\xd5\x82\x25\x2d\xff\x27\
+\x61\x31\xef\x92\x3e\x5a\x83\x4b\x85\x14\x71\x24\x1f\x0f\xb0\xeb\
+\xd6\x23\xa7\x6f\x10\x15\x68\x72\x6d\x7b\xb6\xf8\x4a\xe1\x31\x06\
+\xcc\x48\x02\x92\x80\x7d\x80\x17\x61\x43\x0c\x51\x7c\xc2\x9e\x85\
+\xc5\x64\x15\x7d\x2e\xab\xea\x43\x93\x25\x2e\x9e\x3f\xd5\x96\xec\
+\xe1\xee\x38\xa7\xae\xae\x51\x03\xc1\x04\x61\x0a\xa6\x67\xe4\x4e\
+\xdd\x7d\xf8\x62\x29\xda\x15\x3d\x5d\xcd\x70\x3c\x2b\x81\xe8\xbc\
+\x37\x21\x39\x63\x3e\xef\x58\x0d\x35\xe5\x84\x85\x73\xdd\xed\x91\
+\x67\xe2\x75\xcf\xe0\x24\x60\xf3\xeb\x64\xd6\xf8\xce\xc6\x94\xe9\
+\x7d\x04\x61\x39\x1b\x92\xb8\x0f\x06\x7a\x7d\x8b\xe7\xcf\x9c\xe4\
+\xca\xdb\xf7\x34\x34\xe6\x04\x91\x4d\xac\x01\x07\xa3\x04\xe9\x54\
+\x2c\x89\x48\x68\xd7\xd1\xd6\x78\x0d\xf1\xe8\x20\x9e\xc4\x93\x51\
+\xbe\x85\x8a\xad\xd5\x35\xf5\x3a\x37\xee\x3d\x7d\x58\xf2\xa5\xc2\
+\x5c\x08\xf6\x57\x15\xac\xa9\x72\x9d\x24\x81\xd0\x39\x6a\xc4\xe0\
+\x23\xe3\xc7\x8e\xd8\x2c\x18\x71\x51\xd5\x12\x32\xd3\x2a\x29\x49\
+\x71\x99\xcd\x6b\xbc\x31\x2a\x45\x4a\x58\x6d\xbc\x02\xf8\xeb\x6f\
+\x5b\xe7\xd3\xad\x4c\xe4\xea\x64\xbb\x18\xfd\x5a\x5a\x58\x34\xb8\
+\xab\x9b\xe0\xee\x38\x47\x44\xbf\xdb\x12\x9f\x98\xbe\x59\x49\x51\
+\xa1\x91\x4a\x95\x7c\x41\xe6\xa9\x8c\x31\xf0\x92\x10\xda\xb5\xdc\
+\xfc\x22\x7b\xb0\xbf\x09\x5f\xca\x2a\xcd\xea\x1a\x1a\xd5\x11\xce\
+\x41\xee\x52\xb1\x8f\x5c\x9e\x96\x86\xea\x5b\x93\x01\xfd\x02\xe8\
+\x0a\xb4\x9c\xef\xdd\x8d\x07\x4f\xc2\xa2\x60\xeb\x65\x56\x2c\xfe\
+\x43\xa8\xf2\xef\x12\x33\xea\xc0\x5d\xe6\x3a\xd8\x59\xf9\xa1\xd4\
+\x5b\xa0\xc8\xa6\x88\xee\x04\x89\x48\x92\x6d\x61\xb1\x50\xa5\x15\
+\x9b\x3c\x69\x0c\xe6\x39\xdd\x89\xb3\x6f\xc9\x69\xd9\x84\xc4\xd4\
+\x2c\xaa\x50\x2c\x84\x76\x12\x01\xb1\x9f\x01\x63\xb0\xab\x6a\x60\
+\x62\x23\xcd\x4c\x0c\x30\x75\x55\x25\xa1\x63\x5a\x98\x2d\x79\xa8\
+\xbc\xeb\x60\x37\x7c\x3b\x6f\xfb\x97\xaf\x95\x56\xfe\x81\x61\x51\
+\x10\x43\xc4\xa6\xb9\x3a\x60\x00\x5f\xba\xcd\x85\xac\xa4\x05\xa0\
+\xca\x30\xf2\xef\x0a\xf1\xa0\x84\x29\x28\xde\x01\xf7\x86\x24\xba\
+\xb2\x2b\x4e\xfc\x67\x21\x4c\x6e\x09\x13\x4e\x7e\xd6\xbd\x80\x17\
+\x37\x54\x94\x15\x09\x1e\xdf\x92\x7e\x3e\x8a\x4f\xfc\x50\x51\x51\
+\x55\xa3\x04\xa0\x72\xd1\x6f\x5b\x00\x95\x22\x5d\x0e\x2e\x91\x54\
+\x59\x55\x23\x7a\x10\x9b\x68\x0e\xc9\x74\xc9\xe7\xe2\x72\x6b\x22\
+\x81\x44\x09\x7f\x1d\x7f\x1c\x2e\xa7\xfc\xe8\x91\x43\x21\x58\x99\
+\x09\x9d\x82\x3c\xd2\x93\x90\x48\x39\x0d\x35\xa5\x44\x94\x84\xfe\
+\xb6\x05\xa0\x32\x2b\x78\xa5\xcc\x37\xef\xd2\x8c\xc6\xd8\x58\x62\
+\x52\x52\xdd\x63\xe2\xf0\xa1\xc6\x90\x09\x1b\xab\x17\x14\x95\xac\
+\xac\xa9\x6b\xc0\xa6\xbb\x39\x40\x6e\x2f\x0f\x59\xef\x0b\x80\x16\
+\xf5\x9c\xc8\x2c\x48\xb7\x1e\x3c\xfb\x04\xee\x55\x17\xee\xc2\xf4\
+\x5e\xa7\x7c\x3f\x4a\x8b\xe6\x4d\xb6\x3c\xe4\x77\x3d\xef\xf2\xad\
+\xc7\x34\xf0\x26\x62\xb0\x20\x21\x5e\x0c\xc3\x74\xb4\xd5\x31\xc9\
+\xb2\xca\xfa\x9b\xf7\x83\xeb\xcb\x2b\x6b\x38\xb0\x66\xde\x4c\x97\
+\x6e\x63\x23\x5e\xbf\x67\x64\xe5\x16\xf4\x9b\xe6\x6a\xef\xd5\x87\
+\x26\x97\xff\xdb\x17\x00\x36\xde\x00\x09\x8d\x32\xa4\xfc\xce\x90\
+\xa5\x2d\xcf\xce\x2b\x74\xd4\xd3\xd5\xca\x07\x08\x41\x55\x52\xec\
+\x53\x0d\xb0\x41\x16\x14\x56\x42\xa5\x65\x9a\x1c\xb5\xc8\xd5\xc9\
+\x6e\xfd\xad\x07\x21\x21\x14\x8a\x94\xf8\x80\xfe\x3a\xfc\x99\xfe\
+\x87\xdc\xca\xe7\xe1\x6f\x74\x00\x07\x9d\x40\xff\x53\xfe\xa9\xa4\
+\xbb\xa7\x64\x64\xa0\x13\x8c\x7e\x2c\x56\x1b\x35\x22\xfa\xfd\xc5\
+\x9c\xbc\xc2\xc9\x48\x71\x0d\xf0\x4e\x54\xaa\x74\xbe\x32\x5d\x21\
+\x04\xa2\xf7\xca\x97\x91\x6f\xaf\x01\xe2\x14\xf7\x98\xec\x20\x58\
+\x06\xaa\x84\x85\x29\x9a\x0f\xec\x7f\xdb\x65\x82\xed\xca\x1e\xe5\
+\xc4\xbf\x8a\x62\xe3\x53\xd7\x31\x0a\x4b\xf6\xd3\x15\xe4\x89\xbe\
+\x3e\xd3\xb9\x55\xb6\xb6\xb6\x76\xdd\xab\xb7\x83\x7c\x37\xec\x3c\
+\xe9\xdb\x85\xa1\xd0\x82\xb9\xf3\x22\x63\x12\xf2\x42\x5e\xc6\xea\
+\x41\x1c\x38\x0e\x8b\x5c\xd5\xe3\xa4\xfe\x57\xd1\x40\x63\xbd\x1b\
+\x99\xd9\x0c\x97\xe2\xd2\x0a\xd3\x8c\x6c\x86\x9c\xe9\x00\x3d\x3c\
+\x97\xc0\x7c\xe6\xba\xe3\x48\x14\xc3\xef\xc9\xe7\x92\xaf\x99\x37\
+\xee\x05\xcb\x4b\x4b\x4b\x36\x2c\xf5\x9a\x36\xb2\xaf\x96\x5a\x6c\
+\xaf\xaa\x12\xbf\x8a\x64\xa8\x94\x32\xef\x39\x6e\x36\xa8\x26\xfd\
+\x28\xf8\xd5\x19\x00\x81\x86\x60\x52\xb2\x4c\x16\x4b\x16\xb0\x53\
+\x23\x20\x4c\x4e\x8d\x1a\xd5\xaf\xc5\xc4\xc4\x9a\xca\x2b\xaa\x07\
+\xfc\x31\xc5\x71\xa6\x7e\x3f\xad\xf0\xef\xf1\xfd\x2f\x9a\x21\xe5\
+\x2e\x6b\x8c\x93\x5e\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\
+\x82\
+"
+
+qt_resource_name = b"\
+\x00\x06\
+\x07\x03\x7d\xc3\
+\x00\x69\
+\x00\x6d\x00\x61\x00\x67\x00\x65\x00\x73\
+\x00\x03\
+\x00\x00\x70\x37\
+\x00\x69\
+\x00\x6d\x00\x67\
+\x00\x07\
+\x05\xd4\x57\xa7\
+\x00\x6f\
+\x00\x67\x00\x61\x00\x2e\x00\x70\x00\x6e\x00\x67\
+"
+
+qt_resource_struct = b"\
+\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
+\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
+\x00\x00\x00\x12\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\
+\x00\x00\x00\x1e\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
+"
+
+def qInitResources():
+ QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
+
+def qCleanupResources():
+ QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
+
+qInitResources()
diff --git a/admin/Sources/Clients/ogagent/src/VERSION b/admin/Sources/Clients/ogagent/src/VERSION
new file mode 100644
index 00000000..9084fa2f
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/VERSION
@@ -0,0 +1 @@
+1.1.0
diff --git a/admin/Sources/Clients/ogagent/src/about-dialog.ui b/admin/Sources/Clients/ogagent/src/about-dialog.ui
new file mode 100644
index 00000000..ab0cac1d
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/about-dialog.ui
@@ -0,0 +1,244 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>OGAAboutDialog</class>
+ <widget class="QDialog" name="OGAAboutDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>466</width>
+ <height>402</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Verdana</family>
+ <pointsize>9</pointsize>
+ </font>
+ </property>
+ <property name="windowTitle">
+ <string>About OGAgent</string>
+ </property>
+ <property name="locale">
+ <locale language="English" country="UnitedStates"/>
+ </property>
+ <property name="modal">
+ <bool>true</bool>
+ </property>
+ <layout class="QVBoxLayout">
+ <property name="spacing">
+ <number>9</number>
+ </property>
+ <property name="margin">
+ <number>9</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="LogoLabel">
+ <property name="text">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/images/img/oga.png&quot;/&gt;OpenGnsys Agent Tools&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>5</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="TitleLabel">
+ <property name="text">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:600;&quot;&gt;OpenGnsys Agent&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="VersionLabel">
+ <property name="text">
+ <string>Version 1.1.0</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>5</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="aboutTab">
+ <attribute name="title">
+ <string>&amp;About</string>
+ </attribute>
+ <layout class="QVBoxLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>9</number>
+ </property>
+ <item>
+ <widget class="QTextBrowser" name="aboutBrowser">
+ <property name="html">
+ <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Verdana'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-weight:600;&quot;&gt;OpenGnsys Agent for Operating Systems (OGAgent) is based on UDS Actor from Virtual Cable S.L.U.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:5px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-weight:600;&quot;&gt;UDS Actor is (c) 2014, Virtual Cable S.L.U.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-style:italic;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif'; font-size:8pt; color:#000000;&quot;&gt;More info:&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:10px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;https://opengnsys.es/&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;OpenGnsys Project&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:10px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;https://github.com/dkmstr/openuds/tree/master&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;openuds on GitHub&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="openExternalLinks">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="authorsTab">
+ <attribute name="title">
+ <string>A&amp;uthors</string>
+ </attribute>
+ <layout class="QVBoxLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>9</number>
+ </property>
+ <item>
+ <widget class="QTextBrowser" name="authorsBrowser">
+ <property name="html">
+ <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Verdana'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:5px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif';&quot;&gt;OGAgent developer: Ramón M. Gómez &amp;lt;ramongomez@us.es&amp;gt;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Sans Serif';&quot;&gt;UDS Actor developer: Adolfo Gómez García &amp;lt;agomez@virtualcable.es&amp;gt;&lt;/span&gt;&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="openExternalLinks">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="licenseTab">
+ <attribute name="title">
+ <string>&amp;License Agreement</string>
+ </attribute>
+ <layout class="QVBoxLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <property name="margin">
+ <number>9</number>
+ </property>
+ <item>
+ <widget class="QTextBrowser" name="licenseBrowser">
+ <property name="html">
+ <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Verdana'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;Copyright (c) 2014 Virtual Cable S.L.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;All rights reserved.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;Redistribution and use in source and binary forms, with or without modification,&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;are permitted provided that the following conditions are met:&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt; * Redistributions of source code must retain the above copyright notice,&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt; this list of conditions and the following disclaimer.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt; * Redistributions in binary form must reproduce the above copyright notice,&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt; this list of conditions and the following disclaimer in the documentation&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt; and/or other materials provided with the distribution.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt; * Neither the name of Virtual Cable S.L. nor the names of its contributors&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt; may be used to endorse or promote products derived from this software&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt; without specific prior written permission.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &amp;quot;AS IS&amp;quot;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Close</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources>
+ <include location="OGAgent.qrc"/>
+ </resources>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>clicked(QAbstractButton*)</signal>
+ <receiver>OGAAboutDialog</receiver>
+ <slot>closeDialog()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>432</x>
+ <y>381</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>282</x>
+ <y>362</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+ <slots>
+ <slot>closeDialog()</slot>
+ </slots>
+</ui>
diff --git a/admin/Sources/Clients/ogagent/src/cfg/ogagent.cfg b/admin/Sources/Clients/ogagent/src/cfg/ogagent.cfg
new file mode 100644
index 00000000..8888e88a
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/cfg/ogagent.cfg
@@ -0,0 +1,21 @@
+[opengnsys]
+# Listen address & port of REST
+address=0.0.0.0
+port=8000
+
+# This is a comma separated list of paths where to look for modules to load
+path=test_modules/server
+
+# Remote OpenGnsys Service
+remote=https://192.168.2.10/opengnsys/rest
+
+# Log Level, if ommited, will be set to INFO
+log=DEBUG
+
+# Module specific
+# The sections must match the module name
+# This section will be passes on activation to module
+#[Sample1]
+#value1=Mariete
+#value2=Yo
+#remote=https://172.27.0.1:9999/rest
diff --git a/admin/Sources/Clients/ogagent/src/cfg/ogclient.cfg b/admin/Sources/Clients/ogagent/src/cfg/ogclient.cfg
new file mode 100644
index 00000000..d39fc965
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/cfg/ogclient.cfg
@@ -0,0 +1,11 @@
+[opengnsys]
+# Log Level, if ommited, will be set to INFO
+log=DEBUG
+
+# Module specific
+# The sections must match the module name
+# This section will be passes on activation to module
+#[Sample1]
+#value1=Mariete
+#value2=Yo
+#remote=https://172.27.0.1:9999/rest
diff --git a/admin/Sources/Clients/ogagent/src/img/oga-48x48.ico b/admin/Sources/Clients/ogagent/src/img/oga-48x48.ico
new file mode 100644
index 00000000..37ded487
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/img/oga-48x48.ico
Binary files differ
diff --git a/admin/Sources/Clients/ogagent/src/img/oga-512.png b/admin/Sources/Clients/ogagent/src/img/oga-512.png
new file mode 100644
index 00000000..37a0dbe4
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/img/oga-512.png
Binary files differ
diff --git a/admin/Sources/Clients/ogagent/src/img/oga.ico b/admin/Sources/Clients/ogagent/src/img/oga.ico
new file mode 100644
index 00000000..37ded487
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/img/oga.ico
Binary files differ
diff --git a/admin/Sources/Clients/ogagent/src/img/oga.png b/admin/Sources/Clients/ogagent/src/img/oga.png
new file mode 100644
index 00000000..70db4564
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/img/oga.png
Binary files differ
diff --git a/admin/Sources/Clients/ogagent/src/license.txt b/admin/Sources/Clients/ogagent/src/license.txt
new file mode 100644
index 00000000..bdb7d25d
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/license.txt
@@ -0,0 +1,27 @@
+Copyright (c) 2012-2015 Virtual Cable S.L.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ * Neither the name of Virtual Cable S.L. nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/admin/Sources/Clients/ogagent/src/message-dialog.ui b/admin/Sources/Clients/ogagent/src/message-dialog.ui
new file mode 100644
index 00000000..75137037
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/message-dialog.ui
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>OGAMessageDialog</class>
+ <widget class="QDialog" name="OGAMessageDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>339</width>
+ <height>188</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font">
+ <font>
+ <family>Verdana</family>
+ <pointsize>10</pointsize>
+ </font>
+ </property>
+ <property name="windowTitle">
+ <string>UDS Actor</string>
+ </property>
+ <widget class="QWidget" name="verticalLayoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>10</y>
+ <width>321</width>
+ <height>171</height>
+ </rect>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QTextBrowser" name="message"/>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>15</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>clicked(QAbstractButton*)</signal>
+ <receiver>OGAMessageDialog</receiver>
+ <slot>closeDialog()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>203</x>
+ <y>161</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>337</x>
+ <y>125</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+ <slots>
+ <slot>closeDialog()</slot>
+ </slots>
+</ui>
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/RESTApi.py b/admin/Sources/Clients/ogagent/src/opengnsys/RESTApi.py
new file mode 100644
index 00000000..5caaf8c4
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/RESTApi.py
@@ -0,0 +1,160 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 201 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+
+# pylint: disable-msg=E1101,W0703
+
+from __future__ import unicode_literals
+
+import requests
+import logging
+import json
+import warnings
+
+from .log import logger
+
+from .utils import exceptionToMessage
+
+VERIFY_CERT = False
+
+
+class RESTError(Exception):
+ ERRCODE = 0
+
+
+class ConnectionError(RESTError):
+ ERRCODE = -1
+
+
+# Disable warnings log messages
+try:
+ import urllib3 # @UnusedImport
+except Exception:
+ from requests.packages import urllib3 # @Reimport
+
+try:
+ urllib3.disable_warnings() # @UndefinedVariable
+ warnings.simplefilter("ignore")
+except Exception:
+ pass # In fact, isn't too important, but wil log warns to logging file
+
+class REST(object):
+ '''
+ Simple interface to remote REST apis.
+ The constructor expects the "base url" as parameter, that is, the url that will be common on all REST requests
+ Remember that this is a helper for "easy of use". You can provide your owns using requests lib for example.
+ Examples:
+ v = REST('https://example.com/rest/v1/') (Can omit trailing / if desired)
+ v.sendMessage('hello?param1=1&param2=2')
+ This will generate a GET message to https://example.com/rest/v1/hello?param1=1&param2=2, and return the deserialized JSON result or an exception
+ v.sendMessage('hello?param1=1&param2=2', {'name': 'mario' })
+ This will generate a POST message to https://example.com/rest/v1/hello?param1=1&param2=2, with json encoded body {'name': 'mario' }, and also returns
+ the deserialized JSON result or raises an exception in case of error
+ '''
+ def __init__(self, url):
+ '''
+ Initializes the REST helper
+ url is the full url of the REST API Base, as for example "https://example.com/rest/v1".
+ @param url The url of the REST API Base. The trailing '/' can be included or omitted, as desired.
+ '''
+ self.endpoint = url
+
+ if self.endpoint[-1] != '/':
+ self.endpoint += '/'
+
+ # Some OSs ships very old python requests lib implementations, workaround them...
+ try:
+ self.newerRequestLib = requests.__version__.split('.')[0] >= '1'
+ except Exception:
+ self.newerRequestLib = False # I no version, guess this must be an old requests
+
+ # Disable logging requests messages except for errors, ...
+ logging.getLogger("requests").setLevel(logging.CRITICAL)
+ # Tries to disable all warnings
+ try:
+ warnings.simplefilter("ignore") # Disables all warnings
+ except Exception:
+ pass
+
+ def _getUrl(self, method):
+ '''
+ Internal method
+ Composes the URL based on "method"
+ @param method: Method to append to base url for composition
+ '''
+ url = self.endpoint + method
+
+ return url
+
+ def _request(self, url, data=None):
+ '''
+ Launches the request
+ @param url: The url to obtain
+ @param data: if None, the request will be sent as a GET request. If != None, the request will be sent as a POST, with data serialized as JSON in the body.
+ '''
+ try:
+ if data is None:
+ logger.debug('Requesting using GET (no data provided) {}'.format(url))
+ # Old requests version does not support verify, but they do not checks ssl certificate by default
+ if self.newerRequestLib:
+ r = requests.get(url, verify=VERIFY_CERT)
+ else:
+ r = requests.get(url)
+ else: # POST
+ logger.debug('Requesting using POST {}, data: {}'.format(url, data))
+ if self.newerRequestLib:
+ r = requests.post(url, data=data, headers={'content-type': 'application/json'}, verify=VERIFY_CERT)
+ else:
+ r = requests.post(url, data=data, headers={'content-type': 'application/json'})
+
+ r = json.loads(r.content) # Using instead of r.json() to make compatible with oooold rquests lib versions
+ except requests.exceptions.RequestException as e:
+ raise ConnectionError(e)
+ except Exception as e:
+ raise ConnectionError(exceptionToMessage(e))
+
+ return r
+
+ def sendMessage(self, msg, data=None, processData=True):
+ '''
+ Sends a message to remote REST server
+ @param data: if None or omitted, message will be a GET, else it will send a POST
+ @param processData: if True, data will be serialized to json before sending, else, data will be sent as "raw"
+ '''
+ logger.debug('Invoking post message {} with data {}'.format(msg, data))
+
+ if processData and data is not None:
+ data = json.dumps(data)
+
+ url = self._getUrl(msg)
+ logger.debug('Requesting {}'.format(url))
+
+ return self._request(url, data)
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/__init__.py b/admin/Sources/Clients/ogagent/src/opengnsys/__init__.py
new file mode 100644
index 00000000..48453fb7
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/__init__.py
@@ -0,0 +1,57 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+
+# On centos, old six release does not includes byte2int, nor six.PY2
+import six
+
+import modules
+from RESTApi import REST, RESTError
+
+VERSION = '1.1.0'
+
+__title__ = 'OpenGnsys Agent'
+__version__ = VERSION
+__build__ = 0x010750
+__author__ = 'Adolfo Gómez'
+__license__ = "BSD 3-clause"
+__copyright__ = "Copyright VirtualCable S.L.U."
+
+
+if not hasattr(six, 'byte2int'):
+ if six.PY3:
+ import operator
+ six.byte2int = operator.itemgetter(0)
+ else:
+ def _byte2int(bs):
+ return ord(bs[0])
+ six.byte2int = _byte2int
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/certs.py b/admin/Sources/Clients/ogagent/src/opengnsys/certs.py
new file mode 100644
index 00000000..e4c070e8
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/certs.py
@@ -0,0 +1,101 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+
+from tempfile import gettempdir
+from os.path import exists, join
+
+CERTFILE = 'OGAgent.pem'
+
+
+def createSelfSignedCert(force=False):
+
+ certFile = join(gettempdir(), CERTFILE)
+
+ if exists(certFile) and not force:
+ return certFile
+
+ certData = '''-----BEGIN PRIVATE KEY-----
+MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCb50K3mIznNklz
+yVAD7xSQOSJQ6+NPXj7U9/4zLZ+TvmbQ7RqUUsxbfxHbeRnoYTWV2nKk4+tHqmvz
+ujLSS/loFhTSMqtrLn7rowSYJoQhKOUkAiQlWkqCfItWgL5pJopDpNHFul9Rn3ds
+PMWQTiGeUNR4Y3RnBhr1Q1BsqAzf4m6zFUmgLPPmVLdF4uJ3Tuz8TSy2gWLs5aSr
+5do4WamwUfYjRSVMJECmwjUM4rQ8SQgg0sHBeBuDUGNBvBQFac1G7qUcMReeu8Zr
+DUtMsXma/l4rA8NB5CRmTrQbTBF4l+jb2BDFebDqDUK1Oqs9X35yOQfDOAFYHiix
+PX0IsXOZAgMBAAECggEBAJi3000RrIUZUp6Ph0gzPMuCjDEEwWiQA7CPNX1gpb8O
+dp0WhkDhUroWIaICYPSXtOwUTtVjRqivMoxPy1Thg3EIoGC/rdeSdlXRHMEGicwJ
+yVyalFnatr5Xzg5wkxVh4XMd0zeDt7e3JD7s0QLo5lm1CEzd77qz6lhzFic5/1KX
+bzdULtTlq60dazg2hEbcS4OmM1UMCtRVDAsOIUIZPL0M9j1C1d1iEdYnh2xshKeG
+/GOfo95xsgdMlGjtv3hUT5ryKVoEsu+36rGb4VfhPfUvvoVbRx5QZpW+QvxaYh5E
+Fi0JEROozFwG31Y++8El7J3yQko8cFBa1lYYUwwpNAECgYEAykT+GiM2YxJ4uVF1
+OoKiE9BD53i0IG5j87lGPnWqzEwYBwnqjEKDTou+uzMGz3MDV56UEFNho7wUWh28
+LpEkjJB9QgbsugjxIBr4JoL/rYk036e/6+U8I95lvYWrzb+rBMIkRDYI7kbQD/mQ
+piYUpuCkTymNAu2RisK6bBzJslkCgYEAxVE23OQvkCeOV8hJNPZGpJ1mDS+TiOow
+oOScMZmZpail181eYbAfMsCr7ri812lSj98NvA2GNVLpddil6LtS1cQ5p36lFBtV
+xQUMZiFz4qVbEak+izL+vPaev/mXXsOcibAIQ+qI/0txFpNhJjpaaSy6vRCBYFmc
+8pgSoBnBI0ECgYAUKCn2atnpp5aWSTLYgNosBU4vDA1PShD14dnJMaqyr0aZtPhF
+v/8b3btFJoGgPMLxgWEZ+2U4ju6sSFhPf7FXvLJu2QfQRkHZRDbEh7t5DLpTK4Fp
+va9vl6Ml7uM/HsGpOLuqfIQJUs87OFCc7iCSvMJDDU37I7ekT2GKkpfbCQKBgBrE
+0NeY0WcSJrp7/oqD2sOcYurpCG/rrZs2SIZmGzUhMxaa0vIXzbO59dlWELB8pmnE
+Tf20K//x9qA5OxDe0PcVPukdQlH+/1zSOYNliG44FqnHtyd1TJ/gKVtMBiAiE4uO
+aSClod5Yosf4SJbCFd/s5Iyfv52NqsAyp1w3Aj/BAoGAVCnEiGUfyHlIR+UH4zZW
+GXJMeqdZLfcEIszMxLePkml4gUQhoq9oIs/Kw+L1DDxUwzkXN4BNTlFbOSu9gzK1
+dhuIUGfS6RPL88U+ivC3A0y2jT43oUMqe3hiRt360UQ1GXzp2dMnR9odSRB1wHoO
+IOjEBZ8341/c9ZHc5PCGAG8=
+-----END PRIVATE KEY-----
+-----BEGIN CERTIFICATE-----
+MIID7zCCAtegAwIBAgIJAIrEIthCfxUCMA0GCSqGSIb3DQEBCwUAMIGNMQswCQYD
+VQQGEwJFUzEPMA0GA1UECAwGTWFkcmlkMREwDwYDVQQHDAhBbGNvcmNvbjEMMAoG
+A1UECgwDVURTMQ4wDAYDVQQLDAVBY3RvcjESMBAGA1UEAwwJVURTIEFjdG9yMSgw
+JgYJKoZIhvcNAQkBFhlzdXBwb3J0QHVkc2VudGVycHJpc2UuY29tMB4XDTE0MTAy
+NjIzNDEyNFoXDTI0MTAyMzIzNDEyNFowgY0xCzAJBgNVBAYTAkVTMQ8wDQYDVQQI
+DAZNYWRyaWQxETAPBgNVBAcMCEFsY29yY29uMQwwCgYDVQQKDANVRFMxDjAMBgNV
+BAsMBUFjdG9yMRIwEAYDVQQDDAlVRFMgQWN0b3IxKDAmBgkqhkiG9w0BCQEWGXN1
+cHBvcnRAdWRzZW50ZXJwcmlzZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
+ggEKAoIBAQCb50K3mIznNklzyVAD7xSQOSJQ6+NPXj7U9/4zLZ+TvmbQ7RqUUsxb
+fxHbeRnoYTWV2nKk4+tHqmvzujLSS/loFhTSMqtrLn7rowSYJoQhKOUkAiQlWkqC
+fItWgL5pJopDpNHFul9Rn3dsPMWQTiGeUNR4Y3RnBhr1Q1BsqAzf4m6zFUmgLPPm
+VLdF4uJ3Tuz8TSy2gWLs5aSr5do4WamwUfYjRSVMJECmwjUM4rQ8SQgg0sHBeBuD
+UGNBvBQFac1G7qUcMReeu8ZrDUtMsXma/l4rA8NB5CRmTrQbTBF4l+jb2BDFebDq
+DUK1Oqs9X35yOQfDOAFYHiixPX0IsXOZAgMBAAGjUDBOMB0GA1UdDgQWBBRShS90
+5lJTNvYPIEqP3GxWwG5iiDAfBgNVHSMEGDAWgBRShS905lJTNvYPIEqP3GxWwG5i
+iDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAU0Sp4gXhQmRVzq+7+
+vRFUkQuPj4Ga/d9r5Wrbg3hck3+5pwe9/7APoq0P/M0DBhQpiJKjrD6ydUevC+Y/
+43ZOJPhMlNw0o6TdQxOkX6FDwQanLLs7sfvJvqtVzYn3nuRFKT3dvl7Zg44QMw2M
+ay42q59fAcpB4LaDx/i7gOYSS5eca3lYW7j7YSr/+ozXK2KlgUkuCUHN95lOq+dF
+trmV9mjzM4CNPZqKSE7kpHRywgrXGPCO000NvEGSYf82AtgRSFKiU8NWLQSEPdcB
+k//2dsQZw2cRZ8DrC2B6Tb3M+3+CA6wVyqfqZh1SZva3LfGvq/C+u+ItguzPqNpI
+xtvM
+-----END CERTIFICATE-----'''
+ with open(certFile, "wt") as f:
+ f.write(certData)
+
+ return certFile
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/config.py b/admin/Sources/Clients/ogagent/src/opengnsys/config.py
new file mode 100644
index 00000000..c86c6979
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/config.py
@@ -0,0 +1,59 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+# pylint: disable=unused-wildcard-import, wildcard-import
+from __future__ import unicode_literals
+
+from ConfigParser import SafeConfigParser
+from .log import logger
+
+config = None
+
+def readConfig(client=False):
+ '''
+ Reads configuration file
+ If client is False, will read ogagent.cfg as configuration
+ If client is True, will read ogclient.cfg as configuration
+
+ This is this way so we can protect ogagent.cfg against reading for non admin users on all platforms.
+ '''
+ cfg = SafeConfigParser()
+ if client is True:
+ fname = 'ogclient.cfg'
+ else:
+ fname = 'ogagent.cfg'
+
+ if len(cfg.read('cfg/{}'.format(fname))) == 0:
+ # No configuration found
+ return None
+
+ return cfg
+ \ No newline at end of file
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/httpserver.py b/admin/Sources/Clients/ogagent/src/opengnsys/httpserver.py
new file mode 100644
index 00000000..a06ae6bb
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/httpserver.py
@@ -0,0 +1,150 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2015 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+# pylint: disable=unused-wildcard-import,wildcard-import
+from __future__ import unicode_literals, print_function
+
+# Pydev can't parse "six.moves.xxxx" because it is loaded lazy
+import six
+from six.moves.socketserver import ThreadingMixIn # @UnresolvedImport
+from six.moves.BaseHTTPServer import BaseHTTPRequestHandler # @UnresolvedImport
+from six.moves.BaseHTTPServer import HTTPServer # @UnresolvedImport
+from six.moves.urllib.parse import unquote # @UnresolvedImport
+
+import json
+import threading
+import ssl
+
+from .utils import exceptionToMessage
+from .certs import createSelfSignedCert
+from .log import logger
+
+class HTTPServerHandler(BaseHTTPRequestHandler):
+ service = None
+ protocol_version = 'HTTP/1.0'
+ server_version = 'OpenGnsys Agent Server'
+ sys_version = ''
+
+ def sendJsonError(self, code, message):
+ self.send_response(code)
+ self.send_header('Content-type', 'application/json')
+ self.end_headers()
+ self.wfile.write(json.dumps({'error': message}))
+ return
+
+ def sendJsonResponse(self, data):
+ self.send_response(200)
+ data = json.dumps(data)
+ self.send_header('Content-type', 'application/json')
+ self.send_header('Content-Length', len(data))
+ self.end_headers()
+ # Send the html message
+ self.wfile.write(data)
+
+
+ # parseURL
+ def parseUrl(self):
+ # Very simple path & params splitter
+ path = self.path.split('?')[0][1:].split('/')
+
+ try:
+ params = dict((v[0], unquote(v[1])) for v in (v.split('=') for v in self.path.split('?')[1].split('&')))
+ except Exception:
+ params = {}
+
+ for v in self.service.modules:
+ if v.name == path[0]: # Case Sensitive!!!!
+ return (v, path[1:], params)
+
+ return (None, path, params)
+
+ def notifyMessage(self, module, path, getParams, postParams):
+ '''
+ Locates witch module will process the message based on path (first folder on url path)
+ '''
+ try:
+ data = module.processServerMessage(path, getParams, postParams, self)
+ self.sendJsonResponse(data)
+ except Exception as e:
+ logger.exception()
+ self.sendJsonError(500, exceptionToMessage(e))
+
+ def do_GET(self):
+ module, path, params = self.parseUrl()
+
+ self.notifyMessage(module, path, params, None)
+
+ def do_POST(self):
+ module, path, getParams = self.parseUrl()
+
+ # Tries to get JSON content (UTF-8 encoded)
+ try:
+ length = int(self.headers.getheader('content-length'))
+ content = self.rfile.read(length).decode('utf-8')
+ logger.debug('length: {}, content >>{}<<'.format(length, content))
+ postParams = json.loads(content)
+ except Exception as e:
+ self.sendJsonError(500, exceptionToMessage(e))
+
+ self.notifyMessage(module, path, getParams, postParams)
+
+
+ def log_error(self, fmt, *args):
+ logger.error('HTTP ' + fmt % args)
+
+ def log_message(self, fmt, *args):
+ logger.info('HTTP ' + fmt % args)
+
+
+class HTTPThreadingServer(ThreadingMixIn, HTTPServer):
+ pass
+
+class HTTPServerThread(threading.Thread):
+ def __init__(self, address, service):
+ super(self.__class__, self).__init__()
+
+ HTTPServerHandler.service = service # Keep tracking of service so we can intercact with it
+
+ self.certFile = createSelfSignedCert()
+ self.server = HTTPThreadingServer(address, HTTPServerHandler)
+ self.server.socket = ssl.wrap_socket(self.server.socket, certfile=self.certFile, server_side=True)
+
+ logger.debug('Initialized HTTPS Server thread on {}'.format(address))
+
+ def getServerUrl(self):
+ return 'https://{}:{}/'.format(self.server.server_address[0], self.server.server_address[1])
+
+ def stop(self):
+ self.server.shutdown()
+
+ def run(self):
+ self.server.serve_forever()
+
+
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/ipc.py b/admin/Sources/Clients/ogagent/src/opengnsys/ipc.py
new file mode 100644
index 00000000..dd3663df
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/ipc.py
@@ -0,0 +1,423 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+
+import socket
+import threading
+import six
+import traceback
+import json
+
+from opengnsys.utils import toUnicode
+from opengnsys.log import logger
+
+# The IPC Server will wait for connections from clients
+# Clients will open socket, and wait for data from server
+# The messages sent (from server) will be the following (subject to future changes):
+# Message_id Data Action
+# ------------ -------- --------------------------
+# MSG_LOGOFF None Logout user from session
+# MSG_MESSAGE message,level Display a message with level (INFO, WARN, ERROR, FATAL) # TODO: Include level, right now only has message
+# MSG_POPUP title,message Display a popup box with a title
+# MSG_SCRIPT python script Execute an specific python script INSIDE CLIENT environment (this messages is not sent right now)
+# The messages received (sent from client) will be the following:
+# Message_id Data Action
+# ------------ -------- --------------------------
+# REQ_LOGOUT Logout user from session
+# REQ_INFORMATION None Request information from ipc server (maybe configuration parameters in a near future)
+# REQ_LOGIN python script Execute an specific python script INSIDE CLIENT environment (this messages is not sent right now)
+#
+# All messages are in the form:
+# BYTE
+# 0 1-2 3 4 ...
+# MSG_ID DATA_LENGTH (little endian) Data (can be 0 length)
+# With a previos "MAGIC" header in fron of each message
+
+# Client messages
+MSG_LOGOFF = 0xA1 # Request log off from an user
+MSG_MESSAGE = 0xB2
+MSG_POPUP = 0xB3
+MSG_SCRIPT = 0xC3
+
+# Request messages
+REQ_MESSAGE = 0xD4
+REQ_POPUP = 0xD5
+REQ_LOGIN = 0xE5
+REQ_LOGOUT = 0xF6
+
+# Reverse msgs dict for debugging
+REV_DICT = {
+ MSG_LOGOFF: 'MSG_LOGOFF',
+ MSG_MESSAGE: 'MSG_MESSAGE',
+ MSG_POPUP: 'MSG_POPUP',
+ MSG_SCRIPT: 'MSG_SCRIPT',
+ REQ_LOGIN: 'REQ_LOGIN',
+ REQ_LOGOUT: 'REQ_LOGOUT',
+ REQ_MESSAGE: 'REQ_MESSAGE'
+}
+
+MAGIC = b'\x4F\x47\x41\x00' # OGA in hexa with a padded 0 to the right
+
+
+# States for client processor
+ST_SECOND_BYTE = 0x01
+ST_RECEIVING = 0x02
+ST_PROCESS_MESSAGE = 0x02
+
+
+class ClientProcessor(threading.Thread):
+ def __init__(self, parent, clientSocket):
+ super(self.__class__, self).__init__()
+ self.parent = parent
+ self.clientSocket = clientSocket
+ self.running = False
+ self.messages = six.moves.queue.Queue(32) # @UndefinedVariable
+
+ def stop(self):
+ logger.debug('Stoping client processor')
+ self.running = False
+
+ def processRequest(self, msg, data):
+ logger.debug('Got Client message {}={}'.format(msg, REV_DICT.get(msg)))
+ if self.parent.clientMessageProcessor is not None:
+ self.parent.clientMessageProcessor(msg, data)
+
+ def run(self):
+ self.running = True
+ self.clientSocket.setblocking(0)
+
+ state = None
+ recv_msg = None
+ recv_data = None
+ while self.running:
+ try:
+ counter = 1024
+ while counter > 0: # So we process at least the incoming queue every XX bytes readed
+ counter -= 1
+ b = self.clientSocket.recv(1)
+ if b == b'':
+ # Client disconnected
+ self.running = False
+ break
+ buf = six.byte2int(b) # Empty buffer, this is set as non-blocking
+ if state is None:
+ if buf in (REQ_MESSAGE, REQ_LOGIN, REQ_LOGOUT):
+ logger.debug('State set to {}'.format(buf))
+ state = buf
+ recv_msg = buf
+ continue # Get next byte
+ else:
+ logger.debug('Got unexpected data {}'.format(buf))
+ elif state in (REQ_MESSAGE, REQ_LOGIN, REQ_LOGOUT):
+ logger.debug('First length byte is {}'.format(buf))
+ msg_len = buf
+ state = ST_SECOND_BYTE
+ continue
+ elif state == ST_SECOND_BYTE:
+ msg_len += buf << 8
+ logger.debug('Second length byte is {}, len is {}'.format(buf, msg_len))
+ if msg_len == 0:
+ self.processRequest(recv_msg, None)
+ state = None
+ break
+ state = ST_RECEIVING
+ recv_data = b''
+ continue
+ elif state == ST_RECEIVING:
+ recv_data += six.int2byte(buf)
+ msg_len -= 1
+ if msg_len == 0:
+ self.processRequest(recv_msg, recv_data)
+ recv_data = None
+ state = None
+ break
+ else:
+ logger.debug('Got invalid message from request: {}, state: {}'.format(buf, state))
+ except socket.error as e:
+ # If no data is present, no problem at all, pass to check messages
+ pass
+ except Exception as e:
+ tb = traceback.format_exc()
+ logger.error('Error: {}, trace: {}'.format(e, tb))
+
+ if self.running is False:
+ break
+
+ try:
+ msg = self.messages.get(block=True, timeout=1)
+ except six.moves.queue.Empty: # No message got in time @UndefinedVariable
+ continue
+
+ logger.debug('Got message {}={}'.format(msg, REV_DICT.get(msg[0])))
+
+ try:
+ m = msg[1] if msg[1] is not None else b''
+ l = len(m)
+ data = MAGIC + six.int2byte(msg[0]) + six.int2byte(l & 0xFF) + six.int2byte(l >> 8) + m
+ try:
+ self.clientSocket.sendall(data)
+ except socket.error as e:
+ # Send data error
+ logger.debug('Socket connection is no more available: {}'.format(e.args))
+ self.running = False
+ except Exception as e:
+ logger.error('Invalid message in queue: {}'.format(e))
+
+ logger.debug('Client processor stopped')
+ try:
+ self.clientSocket.close()
+ except Exception:
+ pass # If can't close, nothing happens, just end thread
+
+
+class ServerIPC(threading.Thread):
+
+ def __init__(self, listenPort, clientMessageProcessor=None):
+ super(self.__class__, self).__init__()
+ self.port = listenPort
+ self.running = False
+ self.serverSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ self.serverSocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
+ self.threads = []
+ self.clientMessageProcessor = clientMessageProcessor
+
+ def stop(self):
+ logger.debug('Stopping Server IPC')
+ self.running = False
+ for t in self.threads:
+ t.stop()
+ socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect(('localhost', self.port))
+ self.serverSocket.close()
+
+ for t in self.threads:
+ t.join()
+
+ def sendMessage(self, msgId, msgData):
+ '''
+ Notify message to all listening threads
+ '''
+ logger.debug('Sending message {}({}),{} to all clients'.format(msgId, REV_DICT.get(msgId), msgData))
+
+ # Convert to bytes so length is correctly calculated
+ if isinstance(msgData, six.text_type):
+ msgData = msgData.encode('utf8')
+
+ for t in self.threads:
+ if t.isAlive():
+ logger.debug('Sending to {}'.format(t))
+ t.messages.put((msgId, msgData))
+
+ def sendLoggofMessage(self):
+ self.sendMessage(MSG_LOGOFF, '')
+
+ def sendMessageMessage(self, message):
+ self.sendMessage(MSG_MESSAGE, message)
+
+ def sendPopupMessage(self, title, message):
+ self.sendMessage(MSG_POPUP, {'title':title, 'message':message})
+
+ def sendScriptMessage(self, script):
+ self.sendMessage(MSG_SCRIPT, script)
+
+ def cleanupFinishedThreads(self):
+ '''
+ Cleans up current threads list
+ '''
+ aliveThreads = []
+ for t in self.threads:
+ if t.isAlive():
+ logger.debug('Thread {} is alive'.format(t))
+ aliveThreads.append(t)
+ self.threads[:] = aliveThreads
+
+ def run(self):
+ self.running = True
+
+ self.serverSocket.bind(('localhost', self.port))
+ self.serverSocket.setblocking(1)
+ self.serverSocket.listen(4)
+
+ while True:
+ try:
+ (clientSocket, address) = self.serverSocket.accept()
+ # Stop processing if thread is mean to stop
+ if self.running is False:
+ break
+ logger.debug('Got connection from {}'.format(address))
+
+ self.cleanupFinishedThreads() # House keeping
+
+ logger.debug('Starting new thread, current: {}'.format(self.threads))
+ t = ClientProcessor(self, clientSocket)
+ self.threads.append(t)
+ t.start()
+ except Exception as e:
+ logger.error('Got an exception on Server ipc thread: {}'.format(e))
+
+
+class ClientIPC(threading.Thread):
+ def __init__(self, listenPort):
+ super(ClientIPC, self).__init__()
+ self.port = listenPort
+ self.running = False
+ self.clientSocket = None
+ self.messages = six.moves.queue.Queue(32) # @UndefinedVariable
+
+ self.connect()
+
+ def stop(self):
+ self.running = False
+
+ def getMessage(self):
+ while self.running:
+ try:
+ return self.messages.get(timeout=1)
+ except six.moves.queue.Empty: # @UndefinedVariable
+ continue
+
+ return None
+
+ def sendRequestMessage(self, msg, data=None):
+ logger.debug('Sending request for msg: {}({}), {}'.format(msg, REV_DICT.get(msg), data))
+ if data is None:
+ data = b''
+
+ if isinstance(data, six.text_type): # Convert to bytes if necessary
+ data = data.encode('utf-8')
+
+ l = len(data)
+ msg = six.int2byte(msg) + six.int2byte(l & 0xFF) + six.int2byte(l >> 8) + data
+ self.clientSocket.sendall(msg)
+
+ def sendLogin(self, username, language):
+ self.sendRequestMessage(REQ_LOGIN, username+','+language)
+
+ def sendLogout(self, username):
+ self.sendRequestMessage(REQ_LOGOUT, username)
+
+ def sendMessage(self, module, message, data=None):
+ '''
+ Sends a message "message" with data (data will be encoded as json, so ensure that it is serializable)
+ @param module: Module that will receive this message
+ @param message: Message to send. This message is "customized", and understand by modules
+ @param data: Data to be send as message companion
+ '''
+ msg = '\0'.join((module, message, json.dumps(data)))
+ self.sendRequestMessage(REQ_MESSAGE, msg)
+
+ def messageReceived(self):
+ '''
+ Override this method to automatically get notified on new message
+ received. Message is at self.messages queue
+ '''
+ pass
+
+ def receiveBytes(self, number):
+ msg = b''
+ while self.running and len(msg) < number:
+ try:
+ buf = self.clientSocket.recv(number - len(msg))
+ if buf == b'':
+ logger.debug('Buf {}, msg {}({})'.format(buf, msg, REV_DICT.get(msg)))
+ self.running = False
+ break
+ msg += buf
+ except socket.timeout:
+ pass
+
+ if self.running is False:
+ logger.debug('Not running, returning None')
+ return None
+ return msg
+
+ def connect(self):
+ self.clientSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ self.clientSocket.connect(('localhost', self.port))
+ self.clientSocket.settimeout(2) # Static, custom socket timeout of 2 seconds for local connection (no network)
+
+ def run(self):
+ self.running = True
+
+ while self.running:
+ try:
+ msg = b''
+ # We look for magic message header
+ while self.running: # Wait for MAGIC
+ try:
+ buf = self.clientSocket.recv(len(MAGIC) - len(msg))
+ if buf == b'':
+ self.running = False
+ break
+ msg += buf
+ if len(msg) != len(MAGIC):
+ continue # Do not have message
+ if msg != MAGIC: # Skip first byte an continue searchong
+ msg = msg[1:]
+ continue
+ break
+ except socket.timeout: # Timeout is here so we can get stop thread
+ continue
+
+ if self.running is False:
+ break
+
+ # Now we get message basic data (msg + datalen)
+ msg = bytearray(self.receiveBytes(3))
+
+ # We have the magic header, here comes the message itself
+ if msg is None:
+ continue
+
+ msgId = msg[0]
+ dataLen = msg[1] + (msg[2] << 8)
+ if msgId not in (MSG_LOGOFF, MSG_MESSAGE, MSG_SCRIPT):
+ raise Exception('Invalid message id: {}'.format(msgId))
+
+ data = self.receiveBytes(dataLen)
+ if data is None:
+ continue
+
+ self.messages.put((msgId, data))
+ self.messageReceived()
+
+ except socket.error as e:
+ logger.error('Communication with server got an error: {}'.format(toUnicode(e.strerror)))
+ self.running = False
+ return
+ except Exception as e:
+ tb = traceback.format_exc()
+ logger.error('Error: {}, trace: {}'.format(e, tb))
+
+ try:
+ self.clientSocket.close()
+ except Exception:
+ pass # If can't close, nothing happens, just end thread
+
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/linux/OGAgentService.py b/admin/Sources/Clients/ogagent/src/opengnsys/linux/OGAgentService.py
new file mode 100644
index 00000000..29a238da
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/linux/OGAgentService.py
@@ -0,0 +1,147 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+
+from opengnsys.service import CommonService
+from opengnsys.service import IPC_PORT
+from opengnsys import ipc
+
+from opengnsys.log import logger
+
+from opengnsys.linux.daemon import Daemon
+
+import sys
+import signal
+import json
+
+try:
+ from prctl import set_proctitle # @UnresolvedImport
+except Exception: # Platform may not include prctl, so in case it's not available, we let the "name" as is
+ def set_proctitle(_):
+ pass
+
+
+class OGAgentSvc(Daemon, CommonService):
+ def __init__(self, args=None):
+ Daemon.__init__(self, '/var/run/opengnsys-agent.pid')
+ CommonService.__init__(self)
+
+ def run(self):
+ logger.debug('** Running Daemon **')
+ set_proctitle('OGAgent')
+
+ self.initialize()
+
+ # Call modules initialization
+ # They are called in sequence, no threading is done at this point, so ensure modules onActivate always returns
+
+
+ # *********************
+ # * Main Service loop *
+ # *********************
+ # Counter used to check ip changes only once every 10 seconds, for
+ # example
+ try:
+ while self.isAlive:
+ # In milliseconds, will break
+ self.doWait(1000)
+ except (KeyboardInterrupt, SystemExit) as e:
+ logger.error('Requested exit of main loop')
+ except Exception as e:
+ logger.exception()
+ logger.error('Caught exception on main loop: {}'.format(e))
+
+ self.terminate()
+
+ self.notifyStop()
+
+ def signal_handler(self, signal, frame):
+ self.isAlive = False
+ sys.stderr.write("signal handler: {}".format(signal))
+
+
+def usage():
+ sys.stderr.write("usage: {} start|stop|restart|fg|login 'username'|logout 'username'|message 'module' 'message' 'json'\n".format(sys.argv[0]))
+ sys.exit(2)
+
+if __name__ == '__main__':
+ logger.setLevel('INFO')
+
+ if len(sys.argv) == 5 and sys.argv[1] == 'message':
+ logger.debug('Running client opengnsys')
+ client = None
+ try:
+ client = ipc.ClientIPC(IPC_PORT)
+ client.sendMessage(sys.argv[2], sys.argv[3], json.loads(sys.argv[4]))
+ sys.exit(0)
+ except Exception as e:
+ logger.error(e)
+
+
+ if len(sys.argv) == 3 and sys.argv[1] in ('login', 'logout'):
+ logger.debug('Running client opengnsys')
+ client = None
+ try:
+ client = ipc.ClientIPC(IPC_PORT)
+ if 'login' == sys.argv[1]:
+ client.sendLogin(sys.argv[2])
+ sys.exit(0)
+ elif 'logout' == sys.argv[1]:
+ client.sendLogout(sys.argv[2])
+ sys.exit(0)
+ else:
+ usage()
+ except Exception as e:
+ logger.error(e)
+ elif len(sys.argv) != 2:
+ usage()
+
+ logger.debug('Executing actor')
+ daemon = OGAgentSvc()
+
+ signal.signal(signal.SIGTERM, daemon.signal_handler)
+ signal.signal(signal.SIGINT, daemon.signal_handler)
+
+ if len(sys.argv) == 2:
+ if 'start' == sys.argv[1]:
+ daemon.start()
+ elif 'stop' == sys.argv[1]:
+ daemon.stop()
+ elif 'restart' == sys.argv[1]:
+ daemon.restart()
+ elif 'fg' == sys.argv[1]:
+ daemon.run()
+ else:
+ usage()
+ sys.exit(0)
+ else:
+ usage()
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/linux/__init__.py b/admin/Sources/Clients/ogagent/src/opengnsys/linux/__init__.py
new file mode 100644
index 00000000..3a98c780
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/linux/__init__.py
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/linux/daemon.py b/admin/Sources/Clients/ogagent/src/opengnsys/linux/daemon.py
new file mode 100644
index 00000000..3753808a
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/linux/daemon.py
@@ -0,0 +1,182 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+'''
+@author: : http://www.jejik.com/authors/sander_marechal/
+@see: : http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/
+'''
+
+from __future__ import unicode_literals
+import sys
+import os
+import time
+import atexit
+from opengnsys.log import logger
+
+from signal import SIGTERM
+
+
+class Daemon:
+ """
+ A generic daemon class.
+
+ Usage: subclass the Daemon class and override the run() method
+ """
+ def __init__(self, pidfile, stdin='/dev/null', stdout='/dev/null', stderr='/dev/null'):
+ self.stdin = stdin
+ self.stdout = stdout
+ self.stderr = stderr
+ self.pidfile = pidfile
+
+ def daemonize(self):
+ """
+ do the UNIX double-fork magic, see Stevens' "Advanced
+ Programming in the UNIX Environment" for details (ISBN 0201563177)
+ http://www.erlenstar.demon.co.uk/unix/faq_2.html#SEC16
+ """
+ try:
+ pid = os.fork()
+ if pid > 0:
+ # exit first parent
+ sys.exit(0)
+ except OSError as e:
+ logger.error("fork #1 error: {}".format(e))
+ sys.stderr.write("fork #1 failed: {}\n".format(e))
+ sys.exit(1)
+
+ # decouple from parent environment
+ os.chdir("/")
+ os.setsid()
+ os.umask(0)
+
+ # do second fork
+ try:
+ pid = os.fork()
+ if pid > 0:
+ # exit from second parent
+ sys.exit(0)
+ except OSError as e:
+ logger.error("fork #2 error: {}".format(e))
+ sys.stderr.write("fork #2 failed: {}\n".format(e))
+ sys.exit(1)
+
+ # redirect standard file descriptors
+ sys.stdout.flush()
+ sys.stderr.flush()
+ si = open(self.stdin, 'r')
+ so = open(self.stdout, 'a+')
+ se = open(self.stderr, 'a+', 0)
+ os.dup2(si.fileno(), sys.stdin.fileno())
+ os.dup2(so.fileno(), sys.stdout.fileno())
+ os.dup2(se.fileno(), sys.stderr.fileno())
+
+ # write pidfile
+ atexit.register(self.delpid)
+ pid = str(os.getpid())
+ with open(self.pidfile, 'w+') as f:
+ f.write("{}\n".format(pid))
+
+ def delpid(self):
+ try:
+ os.remove(self.pidfile)
+ except Exception:
+ # Not found/not permissions or whatever...
+ pass
+
+ def start(self):
+ """
+ Start the daemon
+ """
+ logger.debug('Starting daemon')
+ # Check for a pidfile to see if the daemon already runs
+ try:
+ pf = open(self.pidfile, 'r')
+ pid = int(pf.read().strip())
+ pf.close()
+ except IOError:
+ pid = None
+
+ if pid:
+ message = "pidfile {} already exist. Daemon already running?\n".format(pid)
+ logger.error(message)
+ sys.stderr.write(message)
+ sys.exit(1)
+
+ # Start the daemon
+ self.daemonize()
+ try:
+ self.run()
+ except Exception as e:
+ logger.error('Exception running process: {}'.format(e))
+
+ if os.path.exists(self.pidfile):
+ os.remove(self.pidfile)
+
+ def stop(self):
+ """
+ Stop the daemon
+ """
+ # Get the pid from the pidfile
+ try:
+ pf = open(self.pidfile, 'r')
+ pid = int(pf.read().strip())
+ pf.close()
+ except IOError:
+ pid = None
+
+ if pid is None:
+ message = "pidfile {} does not exist. Daemon not running?\n".format(self.pidfile)
+ logger.info(message)
+ # sys.stderr.write(message)
+ return # not an error in a restart
+
+ # Try killing the daemon process
+ try:
+ for i in range(10):
+ os.kill(pid, SIGTERM)
+ time.sleep(1)
+ except OSError as err:
+ if err.errno == 3: # No such process
+ if os.path.exists(self.pidfile):
+ os.remove(self.pidfile)
+ else:
+ sys.stderr.write(err)
+ sys.exit(1)
+
+ def restart(self):
+ """
+ Restart the daemon
+ """
+ self.stop()
+ self.start()
+
+ # Overridables
+ def run(self):
+ """
+ You should override this method when you subclass Daemon. It will be called after the process has been
+ daemonized by start() or restart().
+ """
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/linux/log.py b/admin/Sources/Clients/ogagent/src/opengnsys/linux/log.py
new file mode 100644
index 00000000..dc54e198
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/linux/log.py
@@ -0,0 +1,80 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+
+import logging
+import os
+import tempfile
+import six
+
+# Valid logging levels, from UDS Broker (uds.core.utils.log)
+OTHER, DEBUG, INFO, WARN, ERROR, FATAL = (10000 * (x + 1) for x in six.moves.xrange(6)) # @UndefinedVariable
+
+
+class LocalLogger(object):
+ def __init__(self):
+ # tempdir is different for "user application" and "service"
+ # service wil get c:\windows\temp, while user will get c:\users\XXX\temp
+ # Try to open logger at /var/log path
+ # If it fails (access denied normally), will try to open one at user's home folder, and if
+ # agaim it fails, open it at the tmpPath
+
+ for logDir in ('/var/log', os.path.expanduser('~'), tempfile.gettempdir()):
+ try:
+ fname = os.path.join(logDir, 'opengnsys.log')
+ logging.basicConfig(
+ filename=fname,
+ filemode='a',
+ format='%(levelname)s %(asctime)s %(message)s',
+ level=logging.DEBUG
+ )
+ self.logger = logging.getLogger('opengnsys')
+ os.chmod(fname, 0o0600)
+ return
+ except Exception:
+ pass
+
+ # Logger can't be set
+ self.logger = None
+
+ def log(self, level, message):
+ # Debug messages are logged to a file
+ # our loglevels are 10000 (other), 20000 (debug), ....
+ # logging levels are 10 (debug), 20 (info)
+ # OTHER = logging.NOTSET
+ self.logger.log(int(level / 1000) - 10, message)
+
+ def isWindows(self):
+ return False
+
+ def isLinux(self):
+ return True
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/linux/operations.py b/admin/Sources/Clients/ogagent/src/opengnsys/linux/operations.py
new file mode 100644
index 00000000..f9534d6a
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/linux/operations.py
@@ -0,0 +1,286 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+
+import socket
+import platform
+import fcntl
+import os
+import locale
+import ctypes # @UnusedImport
+import ctypes.util
+import subprocess
+import struct
+import array
+import six
+from opengnsys import utils
+from .renamer import rename
+
+
+def _getMacAddr(ifname):
+ '''
+ Returns the mac address of an interface
+ Mac is returned as unicode utf-8 encoded
+ '''
+ if isinstance(ifname, list):
+ return dict([(name, _getMacAddr(name)) for name in ifname])
+ if isinstance(ifname, six.text_type):
+ ifname = ifname.encode('utf-8') # If unicode, convert to bytes (or str in python 2.7)
+ try:
+ s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+ info = bytearray(fcntl.ioctl(s.fileno(), 0x8927, struct.pack(str('256s'), ifname[:15])))
+ return six.text_type(''.join(['%02x:' % char for char in info[18:24]])[:-1])
+ except Exception:
+ return None
+
+
+def _getIpAddr(ifname):
+ '''
+ Returns the ip address of an interface
+ Ip is returned as unicode utf-8 encoded
+ '''
+ if isinstance(ifname, list):
+ return dict([(name, _getIpAddr(name)) for name in ifname])
+ if isinstance(ifname, six.text_type):
+ ifname = ifname.encode('utf-8') # If unicode, convert to bytes (or str in python 2.7)
+ try:
+ s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+ return six.text_type(socket.inet_ntoa(fcntl.ioctl(
+ s.fileno(),
+ 0x8915, # SIOCGIFADDR
+ struct.pack(str('256s'), ifname[:15])
+ )[20:24]))
+ except Exception:
+ return None
+
+
+def _getInterfaces():
+ '''
+ Returns a list of interfaces names coded in utf-8
+ '''
+ max_possible = 128 # arbitrary. raise if needed.
+ space = max_possible * 16
+ if platform.architecture()[0] == '32bit':
+ offset, length = 32, 32
+ elif platform.architecture()[0] == '64bit':
+ offset, length = 16, 40
+ else:
+ raise OSError('Unknown arquitecture {0}'.format(platform.architecture()[0]))
+
+ s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+ names = array.array(str('B'), b'\0' * space)
+ outbytes = struct.unpack(str('iL'), fcntl.ioctl(
+ s.fileno(),
+ 0x8912, # SIOCGIFCONF
+ struct.pack(str('iL'), space, names.buffer_info()[0])
+ ))[0]
+ namestr = names.tostring()
+ # return namestr, outbytes
+ return [namestr[i:i + offset].split(b'\0', 1)[0].decode('utf-8') for i in range(0, outbytes, length)]
+
+
+def _getIpAndMac(ifname):
+ ip, mac = _getIpAddr(ifname), _getMacAddr(ifname)
+ return (ip, mac)
+
+
+def getComputerName():
+ '''
+ Returns computer name, with no domain
+ '''
+ return socket.gethostname().split('.')[0]
+
+
+def getNetworkInfo():
+ '''
+ Obtains a list of network interfaces
+ @return: A "generator" of elements, that are dict-as-object, with this elements:
+ name: Name of the interface
+ mac: mac of the interface
+ ip: ip of the interface
+ '''
+ for ifname in _getInterfaces():
+ ip, mac = _getIpAndMac(ifname)
+ if mac != '00:00:00:00:00:00': # Skips local interfaces
+ yield utils.Bunch(name=ifname, mac=mac, ip=ip)
+
+
+def getDomainName():
+ return ''
+
+
+def getLinuxVersion():
+ lv = platform.linux_distribution()
+ return lv[0] + ', ' + lv[1]
+
+
+def reboot(flags=0):
+ '''
+ Simple reboot using os command
+ '''
+ # Workaround for dummy thread
+ if six.PY3 is False:
+ import threading
+ threading._DummyThread._Thread__stop = lambda x: 42
+
+ # Check for OpenGnsys Client or GNU/Linux distribution.
+ if os.path.exists('/scripts/oginit'):
+ subprocess.call('source /opt/opengnsys/etc/preinit/loadenviron.sh; /opt/opengnsys/scripts/reboot', shell=True)
+ else:
+ subprocess.call(['/sbin/reboot'])
+
+
+def poweroff(flags=0):
+ '''
+ Simple poweroff using os command
+ '''
+ # Workaround for dummy thread
+ if six.PY3 is False:
+ import threading
+ threading._DummyThread._Thread__stop = lambda x: 42
+
+ # Check for OpenGnsys Client or GNU/Linux distribution.
+ if os.path.exists('/scripts/oginit'):
+ subprocess.call('source /opt/opengnsys/etc/preinit/loadenviron.sh; /opt/opengnsys/scripts/poweroff', shell=True)
+ else:
+ subprocess.call(['/sbin/poweroff'])
+
+
+def logoff():
+ '''
+ Kills all curent user processes, which must send a logogof
+ caveat: If the user has other sessions, will also disconnect from them
+ '''
+ # Workaround for dummy thread
+ if six.PY3 is False:
+ import threading
+ threading._DummyThread._Thread__stop = lambda x: 42
+
+ subprocess.call(['/usr/bin/pkill', '-u', os.environ['USER']])
+
+
+def renameComputer(newName):
+ rename(newName)
+
+
+def joinDomain(domain, ou, account, password, executeInOneStep=False):
+ pass
+
+
+def changeUserPassword(user, oldPassword, newPassword):
+ '''
+ Simple password change for user using command line
+ '''
+ os.system('echo "{1}\n{1}" | /usr/bin/passwd {0} 2> /dev/null'.format(user, newPassword))
+
+
+class XScreenSaverInfo(ctypes.Structure):
+ _fields_ = [('window', ctypes.c_long),
+ ('state', ctypes.c_int),
+ ('kind', ctypes.c_int),
+ ('til_or_since', ctypes.c_ulong),
+ ('idle', ctypes.c_ulong),
+ ('eventMask', ctypes.c_ulong)]
+
+# Initialize xlib & xss
+try:
+ xlibPath = ctypes.util.find_library('X11')
+ xssPath = ctypes.util.find_library('Xss')
+ xlib = ctypes.cdll.LoadLibrary(xlibPath)
+ xss = ctypes.cdll.LoadLibrary(xssPath)
+
+ # Fix result type to XScreenSaverInfo Structure
+ xss.XScreenSaverQueryExtension.restype = ctypes.c_int
+ xss.XScreenSaverAllocInfo.restype = ctypes.POINTER(XScreenSaverInfo) # Result in a XScreenSaverInfo structure
+except Exception: # Libraries not accesible, not found or whatever..
+ xlib = xss = None
+
+
+def initIdleDuration(atLeastSeconds):
+ '''
+ On linux we set the screensaver to at least required seconds, or we never will get "idle"
+ '''
+ # Workaround for dummy thread
+ if six.PY3 is False:
+ import threading
+ threading._DummyThread._Thread__stop = lambda x: 42
+
+ subprocess.call(['/usr/bin/xset', 's', '{}'.format(atLeastSeconds + 30)])
+ # And now reset it
+ subprocess.call(['/usr/bin/xset', 's', 'reset'])
+
+
+def getIdleDuration():
+ '''
+ Returns idle duration, in seconds
+ '''
+ if xlib is None or xss is None:
+ return 0 # Libraries not available
+
+ # production code might want to not hardcode the offset 16...
+ display = xlib.XOpenDisplay(None)
+
+ event_base = ctypes.c_int()
+ error_base = ctypes.c_int()
+
+ available = xss.XScreenSaverQueryExtension(display, ctypes.byref(event_base), ctypes.byref(error_base))
+ if available != 1:
+ return 0 # No screen saver is available, no way of getting idle
+
+ info = xss.XScreenSaverAllocInfo()
+ xss.XScreenSaverQueryInfo(display, xlib.XDefaultRootWindow(display), info)
+
+ if info.contents.state != 0:
+ return 3600 * 100 * 1000 # If screen saver is active, return a high enough value
+
+ return info.contents.idle / 1000.0
+
+
+def getCurrentUser():
+ '''
+ Returns current logged in user
+ '''
+ return os.environ['USER']
+
+
+def getSessionLanguage():
+ '''
+ Returns the user's session language
+ '''
+ return locale.getdefaultlocale()[0]
+
+
+def showPopup(title, message):
+ '''
+ Displays a message box on user's session (during 1 min).
+ '''
+ return subprocess.call('zenity --info --timeout 60 --title "{}" --text "{}"'.format(title, message), shell=True)
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/linux/renamer/__init__.py b/admin/Sources/Clients/ogagent/src/opengnsys/linux/renamer/__init__.py
new file mode 100644
index 00000000..27198dcf
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/linux/renamer/__init__.py
@@ -0,0 +1,61 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+
+import platform
+import os
+import sys
+import pkgutil
+
+from opengnsys.log import logger
+
+renamers = {}
+
+
+# Renamers now are for IPv4 only addresses
+def rename(newName):
+ distribution = platform.linux_distribution()[0].lower().strip()
+ if distribution in renamers:
+ return renamers[distribution](newName)
+
+ # Try Debian renamer, simplest one
+ logger.info('Renamer for platform "{0}" not found, tryin debian renamer'.format(distribution))
+ return renamers['debian'](newName)
+
+
+# Do load of packages
+def _init():
+ pkgpath = os.path.dirname(sys.modules[__name__].__file__)
+ for _, name, _ in pkgutil.iter_modules([pkgpath]):
+ __import__(__name__ + '.' + name, globals(), locals())
+
+_init() \ No newline at end of file
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/linux/renamer/debian.py b/admin/Sources/Clients/ogagent/src/opengnsys/linux/renamer/debian.py
new file mode 100644
index 00000000..be55e003
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/linux/renamer/debian.py
@@ -0,0 +1,68 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+
+from opengnsys.linux.renamer import renamers
+from opengnsys.log import logger
+
+import os
+
+
+def rename(newName):
+ '''
+ Debian renamer
+ Expects new host name on newName
+ Host does not needs to be rebooted after renaming
+ '''
+ logger.debug('using Debian renamer')
+
+ with open('/etc/hostname', 'w') as hostname:
+ hostname.write(newName)
+
+ # Force system new name
+ os.system('/bin/hostname %s' % newName)
+
+ # add name to "hosts"
+ with open('/etc/hosts', 'r') as hosts:
+ lines = hosts.readlines()
+ with open('/etc/hosts', 'w') as hosts:
+ hosts.write("127.0.1.1\t%s\n" % newName)
+ for l in lines:
+ if l[:9] == '127.0.1.1': # Skips existing 127.0.1.1. if it already exists
+ continue
+ hosts.write(l)
+
+ return True
+
+# All names in lower case
+renamers['debian'] = rename
+renamers['ubuntu'] = rename
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/linux/renamer/opensuse.py b/admin/Sources/Clients/ogagent/src/opengnsys/linux/renamer/opensuse.py
new file mode 100644
index 00000000..a2d29a5c
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/linux/renamer/opensuse.py
@@ -0,0 +1,66 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+
+from opengnsys.linux.renamer import renamers
+from opengnsys.log import logger
+
+import os
+
+
+def rename(newName):
+ '''
+ RH, Centos, Fedora Renamer
+ Expects new host name on newName
+ Host does not needs to be rebooted after renaming
+ '''
+ logger.debug('using SUSE renamer')
+
+ with open('/etc/hostname', 'w') as hostname:
+ hostname.write(newName)
+
+ # Force system new name
+ os.system('/bin/hostname %s' % newName)
+
+ # add name to "hosts"
+ with open('/etc/hosts', 'r') as hosts:
+ lines = hosts.readlines()
+ with open('/etc/hosts', 'w') as hosts:
+ hosts.write("127.0.1.1\t{}\n".format(newName))
+ for l in lines:
+ if l[:9] != '127.0.1.1': # Skips existing 127.0.1.1. if it already exists
+ hosts.write(l)
+
+ return True
+
+# All names in lower case
+renamers['opensuse'] = rename
+renamers['suse'] = rename
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/linux/renamer/redhat.py b/admin/Sources/Clients/ogagent/src/opengnsys/linux/renamer/redhat.py
new file mode 100644
index 00000000..8821a81c
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/linux/renamer/redhat.py
@@ -0,0 +1,74 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+
+from opengnsys.linux.renamer import renamers
+from opengnsys.log import logger
+
+import os
+
+
+def rename(newName):
+ '''
+ RH, Centos, Fedora Renamer
+ Expects new host name on newName
+ Host does not needs to be rebooted after renaming
+ '''
+ logger.debug('using RH renamer')
+
+ with open('/etc/hostname', 'w') as hostname:
+ hostname.write(newName)
+
+ # Force system new name
+ os.system('/bin/hostname %s' % newName)
+
+ # add name to "hosts"
+ with open('/etc/hosts', 'r') as hosts:
+ lines = hosts.readlines()
+ with open('/etc/hosts', 'w') as hosts:
+ hosts.write("127.0.1.1\t{}\n".format(newName))
+ for l in lines:
+ if l[:9] != '127.0.1.1': # Skips existing 127.0.1.1. if it already exists
+ hosts.write(l)
+
+ with open('/etc/sysconfig/network', 'r') as net:
+ lines = net.readlines()
+ with open('/etc/sysconfig/network', 'w') as net:
+ net.write('HOSTNAME={}\n'.format(newName))
+ for l in lines:
+ if l[:8] != 'HOSTNAME':
+ net.write(l)
+
+ return True
+
+# All names in lower case
+renamers['centos linux'] = rename
+renamers['fedora'] = rename
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/loader.py b/admin/Sources/Clients/ogagent/src/opengnsys/loader.py
new file mode 100644
index 00000000..23988fca
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/loader.py
@@ -0,0 +1,111 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+# pylint: disable=unused-wildcard-import,wildcard-import
+
+# This is a simple module loader, so we can add "external opengnsys" modules as addons
+# Modules under "opengsnsys/modules" are always autoloaded
+from __future__ import unicode_literals
+
+import pkgutil
+import os.path
+
+from opengnsys.workers import ServerWorker
+from opengnsys.workers import ClientWorker
+from .log import logger
+
+
+def loadModules(controller, client=False):
+ '''
+ Load own provided modules plus the modules that are in the configuration path.
+ The loading order is not defined (they are loaded as found, because modules MUST be "standalone" modules
+ @param service: The service that:
+ * Holds the configuration
+ * Will be used to initialize modules.
+ '''
+
+ ogModules = []
+
+ if client is False:
+ from opengnsys.modules.server import OpenGnSys # @UnusedImport
+ from .modules import server # @UnusedImport, just used to ensure opengnsys modules are initialized
+ modPath = 'opengnsys.modules.server'
+ modType = ServerWorker
+ else:
+ from opengnsys.modules.client import OpenGnSys # @UnusedImport @Reimport
+ from .modules import client # @UnusedImport, just used to ensure opengnsys modules are initialized
+ modPath = 'opengnsys.modules.client'
+ modType = ClientWorker
+
+ def addCls(cls):
+ logger.debug('Found module class {}'.format(cls))
+ try:
+ if cls.name is None:
+ # Error, cls has no name
+ # Log the issue and
+ logger.error('Class {} has no name attribute'.format(cls))
+ return
+ ogModules.append(cls(controller))
+ except Exception as e:
+ logger.error('Error loading module {}'.format(e))
+
+ def recursiveAdd(p):
+ subcls = p.__subclasses__()
+
+ if len(subcls) == 0:
+ addCls(p)
+ else:
+ for c in subcls:
+ recursiveAdd(c)
+
+ def doLoad(paths):
+ for (module_loader, name, ispkg) in pkgutil.iter_modules(paths, modPath + '.'):
+ if ispkg:
+ logger.debug('Found module package {}'.format(name))
+ module_loader.find_module(name).load_module(name)
+
+
+ if controller.config.has_option('opengnsys', 'path') is True:
+ paths = tuple(os.path.abspath(v) for v in controller.config.get('opengnsys', 'path').split(','))
+ else:
+ paths = ()
+
+ # paths += (os.path.dirname(sys.modules[modPath].__file__),)
+
+ logger.debug('Loading modules from {}'.format(paths))
+
+ # Load modules
+ doLoad(paths)
+
+ # Add to list of available modules
+ recursiveAdd(modType)
+
+ return ogModules
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/log.py b/admin/Sources/Clients/ogagent/src/opengnsys/log.py
new file mode 100644
index 00000000..e34c0874
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/log.py
@@ -0,0 +1,103 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+
+import traceback
+import sys
+import six
+
+if sys.platform == 'win32':
+ from opengnsys.windows.log import LocalLogger # @UnusedImport
+else:
+ from opengnsys.linux.log import LocalLogger # @Reimport
+
+# Valid logging levels, from UDS Broker (uds.core.utils.log)
+OTHER, DEBUG, INFO, WARN, ERROR, FATAL = (10000 * (x + 1) for x in six.moves.xrange(6)) # @UndefinedVariable
+
+_levelName = {
+ 'OTHER': OTHER,
+ 'DEBUG': DEBUG,
+ 'INFO': INFO,
+ 'WARN': WARN,
+ 'ERROR': ERROR,
+ 'FATAL': FATAL
+}
+
+class Logger(object):
+ def __init__(self):
+ self.logLevel = INFO
+ self.logger = LocalLogger()
+
+ def setLevel(self, level):
+ '''
+ Sets log level filter (minimum level required for a log message to be processed)
+ :param level: Any message with a level below this will be filtered out
+ '''
+ if isinstance(level, six.string_types):
+ level = _levelName.get(level, INFO)
+
+ self.logLevel = level # Ensures level is an integer or fails
+
+ def log(self, level, message):
+ if level < self.logLevel: # Skip not wanted messages
+ return
+
+ self.logger.log(level, message)
+
+ def debug(self, message):
+ self.log(DEBUG, message)
+
+ def warn(self, message):
+ self.log(WARN, message)
+
+ def info(self, message):
+ self.log(INFO, message)
+
+ def error(self, message):
+ self.log(ERROR, message)
+
+ def fatal(self, message):
+ self.log(FATAL, message)
+
+ def exception(self):
+ try:
+ tb = traceback.format_exc()
+ except Exception:
+ tb = '(could not get traceback!)'
+
+ self.log(DEBUG, tb)
+
+ def flush(self):
+ pass
+
+
+logger = Logger()
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/macos/__init__.py b/admin/Sources/Clients/ogagent/src/opengnsys/macos/__init__.py
new file mode 100644
index 00000000..ee5ba4c2
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/macos/__init__.py
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Ramón M. Gómez, ramongomez at us dot es
+'''
+from __future__ import unicode_literals
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/macos/operations.py b/admin/Sources/Clients/ogagent/src/opengnsys/macos/operations.py
new file mode 100644
index 00000000..ea835cea
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/macos/operations.py
@@ -0,0 +1,255 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+
+import socket
+import platform
+import fcntl
+import os
+import locale
+import ctypes # @UnusedImport
+import ctypes.util
+import subprocess
+import struct
+import array
+import six
+from opengnsys import utils
+import netifaces
+
+
+def _getMacAddr(ifname):
+ '''
+ Returns the mac address of an interface
+ Mac is returned as unicode utf-8 encoded
+ '''
+ if isinstance(ifname, list):
+ return dict([(name, _getMacAddr(name)) for name in ifname])
+ if isinstance(ifname, six.text_type):
+ ifname = ifname.encode('utf-8') # If unicode, convert to bytes (or str in python 2.7)
+ try:
+ return netifaces.ifaddresses(ifname)[18][0]['addr']
+ except Exception:
+ return None
+
+
+def _getIpAddr(ifname):
+ '''
+ Returns the IP address of an interface
+ IP is returned as unicode utf-8 encoded
+ '''
+ if isinstance(ifname, list):
+ return dict([(name, _getIpAddr(name)) for name in ifname])
+ if isinstance(ifname, six.text_type):
+ ifname = ifname.encode('utf-8') # If unicode, convert to bytes (or str in python 2.7)
+ try:
+ return netifaces.ifaddresses(ifname)[2][0]['addr']
+ except Exception:
+ return None
+
+
+def _getInterfaces():
+ '''
+ Returns a list of interfaces names
+ '''
+ return netifaces.interfaces()
+
+
+def _getIpAndMac(ifname):
+ ip, mac = _getIpAddr(ifname), _getMacAddr(ifname)
+ return (ip, mac)
+
+
+def getComputerName():
+ '''
+ Returns computer name, with no domain
+ '''
+ return socket.gethostname().split('.')[0]
+
+
+def getNetworkInfo():
+ '''
+ Obtains a list of network interfaces
+ @return: A "generator" of elements, that are dict-as-object, with this elements:
+ name: Name of the interface
+ mac: mac of the interface
+ ip: ip of the interface
+ '''
+ for ifname in _getInterfaces():
+ ip, mac = _getIpAndMac(ifname)
+ if mac != None and ip != None: # Skips local interfaces
+ yield utils.Bunch(name=ifname, mac=mac, ip=ip)
+
+
+def getDomainName():
+ return ''
+
+
+def getMacosVersion():
+ return 'macOS {}'.format(platform.mac_ver()[0])
+
+
+def reboot(flags=0):
+ '''
+ Simple reboot command
+ '''
+ # Workaround for dummy thread
+ if six.PY3 is False:
+ import threading
+ threading._DummyThread._Thread__stop = lambda x: 42
+
+ # Exec reboot command
+ subprocess.call('/sbin/shutdown -r now', shell=True)
+
+
+def poweroff(flags=0):
+ '''
+ Simple poweroff command
+ '''
+ # Workaround for dummy thread
+ if six.PY3 is False:
+ import threading
+ threading._DummyThread._Thread__stop = lambda x: 42
+
+ # Exec shutdown command
+ subprocess.call('/sbin/shutdown -h now', shell=True)
+
+
+def logoff():
+ '''
+ Simple logout using AppleScript
+ '''
+ # Workaround for dummy thread
+ if six.PY3 is False:
+ import threading
+ threading._DummyThread._Thread__stop = lambda x: 42
+
+ # Exec logout using AppleSctipt
+ subprocess.call('/usr/bin/osascript -e \'tell app "System Events" to «event aevtrlgo»\'', shell=True)
+
+
+def renameComputer(newName):
+ rename(newName)
+
+
+def joinDomain(domain, ou, account, password, executeInOneStep=False):
+ pass
+
+
+def changeUserPassword(user, oldPassword, newPassword):
+ '''
+ Simple password change for user using command line
+ '''
+ os.system('echo "{1}\n{1}" | /usr/bin/passwd {0} 2> /dev/null'.format(user, newPassword))
+
+
+class XScreenSaverInfo(ctypes.Structure):
+ _fields_ = [('window', ctypes.c_long),
+ ('state', ctypes.c_int),
+ ('kind', ctypes.c_int),
+ ('til_or_since', ctypes.c_ulong),
+ ('idle', ctypes.c_ulong),
+ ('eventMask', ctypes.c_ulong)]
+
+# Initialize xlib & xss
+try:
+ xlibPath = ctypes.util.find_library('X11')
+ xssPath = ctypes.util.find_library('Xss')
+ xlib = ctypes.cdll.LoadLibrary(xlibPath)
+ xss = ctypes.cdll.LoadLibrary(xssPath)
+
+ # Fix result type to XScreenSaverInfo Structure
+ xss.XScreenSaverQueryExtension.restype = ctypes.c_int
+ xss.XScreenSaverAllocInfo.restype = ctypes.POINTER(XScreenSaverInfo) # Result in a XScreenSaverInfo structure
+except Exception: # Libraries not accesible, not found or whatever..
+ xlib = xss = None
+
+
+def initIdleDuration(atLeastSeconds):
+ '''
+ On linux we set the screensaver to at least required seconds, or we never will get "idle"
+ '''
+ # Workaround for dummy thread
+ if six.PY3 is False:
+ import threading
+ threading._DummyThread._Thread__stop = lambda x: 42
+
+ subprocess.call(['/usr/bin/xset', 's', '{}'.format(atLeastSeconds + 30)])
+ # And now reset it
+ subprocess.call(['/usr/bin/xset', 's', 'reset'])
+
+
+def getIdleDuration():
+ '''
+ Returns idle duration, in seconds
+ '''
+ if xlib is None or xss is None:
+ return 0 # Libraries not available
+
+ # production code might want to not hardcode the offset 16...
+ display = xlib.XOpenDisplay(None)
+
+ event_base = ctypes.c_int()
+ error_base = ctypes.c_int()
+
+ available = xss.XScreenSaverQueryExtension(display, ctypes.byref(event_base), ctypes.byref(error_base))
+ if available != 1:
+ return 0 # No screen saver is available, no way of getting idle
+
+ info = xss.XScreenSaverAllocInfo()
+ xss.XScreenSaverQueryInfo(display, xlib.XDefaultRootWindow(display), info)
+
+ if info.contents.state != 0:
+ return 3600 * 100 * 1000 # If screen saver is active, return a high enough value
+
+ return info.contents.idle / 1000.0
+
+
+def getCurrentUser():
+ '''
+ Returns current logged in user
+ '''
+ return os.environ['USER']
+
+
+def getSessionLanguage():
+ '''
+ Returns the user's session language
+ '''
+ return locale.getdefaultlocale()[0]
+
+
+def showPopup(title, message):
+ '''
+ Displays a message box on user's session (during 1 min).
+ '''
+ # Show a dialog using AppleSctipt
+ return subprocess.call('/usr/bin/osascript -e \'display notification "{}" with title "{}"\''.format(message, title), shell=True)
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/modules/__init__.py b/admin/Sources/Clients/ogagent/src/opengnsys/modules/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/modules/__init__.py
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/modules/client/OpenGnSys/__init__.py b/admin/Sources/Clients/ogagent/src/opengnsys/modules/client/OpenGnSys/__init__.py
new file mode 100644
index 00000000..b840d929
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/modules/client/OpenGnSys/__init__.py
@@ -0,0 +1,63 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+'''
+@author: Ramón M. Gómez, ramongomez at us dot es
+'''
+from __future__ import unicode_literals
+
+from opengnsys.workers import ClientWorker
+
+from opengnsys import operations
+from opengnsys.log import logger
+from opengnsys.scriptThread import ScriptExecutorThread
+
+class OpenGnSysWorker(ClientWorker):
+ name = 'opengnsys'
+
+ def onActivation(self):
+ logger.debug('Activate invoked')
+
+ def onDeactivation(self):
+ logger.debug('Deactivate invoked')
+
+ # Processes script execution
+ def process_script(self, jsonParams):
+ logger.debug('Processed message: script({})'.format(jsonParams))
+ thr = ScriptExecutorThread(jsonParams['code'])
+ thr.start()
+ #self.sendServerMessage('script', {'op', 'launched'})
+
+ def process_logoff(self, jsonParams):
+ logger.debug('Processed message: logoff({})'.format(jsonParams))
+ operations.logoff()
+
+ def process_popup(self, jsonParams):
+ logger.debug('Processed message: popup({})'.format(jsonParams))
+ ret = operations.showPopup(jsonParams['title'], jsonParams['message'])
+ #self.sendServerMessage('popup', {'op', ret})
+
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/modules/client/__init__.py b/admin/Sources/Clients/ogagent/src/opengnsys/modules/client/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/modules/client/__init__.py
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/modules/server/OpenGnSys/__init__.py b/admin/Sources/Clients/ogagent/src/opengnsys/modules/server/OpenGnSys/__init__.py
new file mode 100644
index 00000000..1438e469
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/modules/server/OpenGnSys/__init__.py
@@ -0,0 +1,250 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+'''
+@author: Ramón M. Gómez, ramongomez at us dot es
+'''
+from __future__ import unicode_literals
+
+import subprocess
+import threading
+import thread
+import os
+import platform
+import time
+import random
+import string
+import urllib
+
+from opengnsys.workers import ServerWorker
+from opengnsys import REST, RESTError
+from opengnsys import operations
+from opengnsys.log import logger
+from opengnsys.scriptThread import ScriptExecutorThread
+
+# Error handler decorator.
+def catchBackgroundError(fnc):
+ def wrapper(*args, **kwargs):
+ this = args[0]
+ try:
+ fnc(*args, **kwargs)
+ except Exception as e:
+ this.REST.sendMessage('error?id={}'.format(kwargs.get('requestId', 'error')), {'error': '{}'.format(e)})
+ return wrapper
+
+class OpenGnSysWorker(ServerWorker):
+ name = 'opengnsys'
+ interface = None # Binded interface for OpenGnsys
+ loggedin = False # User session flag
+ locked = {}
+ random = None # Random string for secure connections
+ length = 32 # Random string length
+
+ def checkSecret(self, server):
+ '''
+ Checks for received secret key and raise exception if it isn't valid.
+ '''
+ try:
+ if self.random != server.headers['Authorization']:
+ raise Exception('Unauthorized operation')
+ except Exception as e:
+ logger.error(e)
+ raise Exception(e)
+
+ def onActivation(self):
+ '''
+ Sends OGAgent activation notification to OpenGnsys server
+ '''
+ self.cmd = None
+ # Ensure cfg has required configuration variables or an exception will be thrown
+ self.REST = REST(self.service.config.get('opengnsys', 'remote'))
+ # Get network interfaces until they are active or timeout (5 minutes)
+ for t in range(0, 300):
+ try:
+ self.interface = list(operations.getNetworkInfo())[0] # Get first network interface
+ except Exception as e:
+ # Wait 1 sec. and retry
+ time.sleep(1)
+ finally:
+ # Exit loop if interface is active
+ if self.interface:
+ if t > 0:
+ logger.debug("Fetch connection data after {} tries".format(t))
+ break
+ # Raise error after timeout
+ if not self.interface:
+ raise e
+ # Delete marking files
+ for f in ['ogboot.me', 'ogboot.firstboot', 'ogboot.secondboot']:
+ try:
+ os.remove(os.sep + f)
+ except OSError:
+ pass
+ # Generate random secret to send on activation
+ self.random = ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(self.length))
+ # Send initalization message
+ self.REST.sendMessage('ogagent/started', {'mac': self.interface.mac, 'ip': self.interface.ip, 'secret': self.random, 'ostype': operations.osType, 'osversion': operations.osVersion})
+
+ def onDeactivation(self):
+ '''
+ Sends OGAgent stopping notification to OpenGnsys server
+ '''
+ logger.debug('onDeactivation')
+ self.REST.sendMessage('ogagent/stopped', {'mac': self.interface.mac, 'ip': self.interface.ip, 'ostype': operations.osType, 'osversion': operations.osVersion})
+
+ def processClientMessage(self, message, data):
+ logger.debug('Got OpenGnsys message from client: {}, data {}'.format(message, data))
+
+ def onLogin(self, userData):
+ '''
+ Sends session login notification to OpenGnsys server
+ '''
+ user, sep, language = userData.partition(',')
+ logger.debug('Received login for {} with language {}'.format(user, language))
+ self.loggedin = True
+ self.REST.sendMessage('ogagent/loggedin', {'ip': self.interface.ip, 'user': user, 'language': language, 'ostype': operations.osType, 'osversion': operations.osVersion})
+
+ def onLogout(self, user):
+ '''
+ Sends session logout notification to OpenGnsys server
+ '''
+ logger.debug('Received logout for {}'.format(user))
+ self.loggedin = False
+ self.REST.sendMessage('ogagent/loggedout', {'ip': self.interface.ip, 'user': user})
+
+ def process_ogclient(self, path, getParams, postParams, server):
+ '''
+ This method can be overriden to provide your own message proccessor, or better you can
+ implement a method that is called exactly as "process_" + path[0] (module name has been removed from path array) and this default processMessage will invoke it
+ * Example:
+ Imagine this invocation url (no matter if GET or POST): http://example.com:9999/Sample/mazinger/Z
+ The HTTP Server will remove "Sample" from path, parse arguments and invoke this method as this:
+ module.processMessage(["mazinger","Z"], getParams, postParams)
+
+ This method will process "mazinger", and look for a "self" method that is called "process_mazinger", and invoke it this way:
+ return self.process_mazinger(["Z"], getParams, postParams)
+
+ In the case path is empty (that is, the path is composed only by the module name, like in "http://example.com/Sample", the "process" method
+ will be invoked directly
+
+ The methods must return data that can be serialized to json (i.e. Ojects are not serializable to json, basic type are)
+ '''
+ if not path:
+ return "ok"
+ try:
+ operation = getattr(self, 'ogclient_' + path[0])
+ except Exception:
+ raise Exception('Message processor for "{}" not found'.format(path[0]))
+ return operation(path[1:], getParams, postParams)
+
+ def process_status(self, path, getParams, postParams, server):
+ '''
+ Returns client status.
+ '''
+ res = {'status': '', 'loggedin': self.loggedin}
+ if platform.system() == 'Linux': # GNU/Linux
+ # Check if it's OpenGnsys Client.
+ if os.path.exists('/scripts/oginit'):
+ # Check if OpenGnsys Client is busy.
+ if self.locked:
+ res['status'] = 'BSY'
+ else:
+ res['status'] = 'OPG'
+ else:
+ # Check if there is an active session.
+ res['status'] = 'LNX'
+ elif platform.system() == 'Windows': # Windows
+ # Check if there is an active session.
+ res['status'] = 'WIN'
+ elif platform.system() == 'Darwin': # Mac OS X ??
+ res['status'] = 'OSX'
+ return res
+
+ def process_reboot(self, path, getParams, postParams, server):
+ '''
+ Launches a system reboot operation.
+ '''
+ logger.debug('Received reboot operation')
+ self.checkSecret(server)
+ # Rebooting thread.
+ def rebt():
+ operations.reboot()
+ threading.Thread(target=rebt).start()
+ return {'op': 'launched'}
+
+ def process_poweroff(self, path, getParams, postParams, server):
+ '''
+ Launches a system power off operation.
+ '''
+ logger.debug('Received poweroff operation')
+ self.checkSecret(server)
+ # Powering off thread.
+ def pwoff():
+ time.sleep(2)
+ operations.poweroff()
+ threading.Thread(target=pwoff).start()
+ return {'op': 'launched'}
+
+ def process_script(self, path, getParams, postParams, server):
+ '''
+ Processes an script execution (script should be encoded in base64)
+ '''
+ logger.debug('Processing script request')
+ self.checkSecret(server)
+ # Decoding script.
+ script = urllib.unquote(postParams.get('script').decode('base64')).decode('utf8')
+ script = 'import subprocess; subprocess.check_output("""{}""",shell=True)'.format(script)
+ # Executing script.
+ if postParams.get('client', 'false') == 'false':
+ thr = ScriptExecutorThread(script)
+ thr.start()
+ else:
+ self.sendClientMessage('script', {'code': script})
+ return {'op': 'launched'}
+
+ def process_logoff(self, path, getParams, postParams, server):
+ '''
+ Closes user session.
+ '''
+ logger.debug('Received logoff operation')
+ self.checkSecret(server)
+ # Sending log off message to OGAgent client.
+ self.sendClientMessage('logoff', {})
+ return {'op': 'sended to client'}
+
+ def process_popup(self, path, getParams, postParams, server):
+ '''
+ Shows a message popup on the user's session.
+ '''
+ logger.debug('Received message operation')
+ self.checkSecret(server)
+ # Sending popup message to OGAgent client.
+ self.sendClientMessage('popup', postParams)
+ return {'op': 'launched'}
+
+ def process_client_popup(self, params):
+ self.REST.sendMessage('popup_done', params)
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/modules/server/__init__.py b/admin/Sources/Clients/ogagent/src/opengnsys/modules/server/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/modules/server/__init__.py
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/operations.py b/admin/Sources/Clients/ogagent/src/opengnsys/operations.py
new file mode 100644
index 00000000..dcfa40cb
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/operations.py
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+# pylint: disable=unused-wildcard-import,wildcard-import
+
+from __future__ import unicode_literals
+
+import sys
+# Importing platform operations and getting operating system data.
+if sys.platform == 'win32':
+ from .windows.operations import * # @UnusedWildImport
+ osType = 'Windows'
+ osVersion = getWindowsVersion()
+else:
+ if sys.platform == 'darwin':
+ from .macos.operations import * # @UnusedWildImport
+ osType = 'MacOS'
+ osVersion = getMacosVersion().replace(',','')
+ else:
+ from .linux.operations import * # @UnusedWildImport
+ osType = 'Linux'
+ osVersion = getLinuxVersion().replace(',','')
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/scriptThread.py b/admin/Sources/Clients/ogagent/src/opengnsys/scriptThread.py
new file mode 100644
index 00000000..2a6779b4
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/scriptThread.py
@@ -0,0 +1,51 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 201 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+
+# pylint: disable-msg=E1101,W0703
+
+from opengnsys.log import logger
+
+import threading
+import six
+
+
+class ScriptExecutorThread(threading.Thread):
+ def __init__(self, script):
+ super(ScriptExecutorThread, self).__init__()
+ self.script = script
+
+ def run(self):
+ try:
+ logger.debug('Executing script: {}'.format(self.script))
+ six.exec_(self.script, globals(), None)
+ except Exception as e:
+ logger.error('Error executing script: {}'.format(e))
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/service.py b/admin/Sources/Clients/ogagent/src/opengnsys/service.py
new file mode 100644
index 00000000..4a44028e
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/service.py
@@ -0,0 +1,249 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+
+from .log import logger
+from .config import readConfig
+from .utils import exceptionToMessage
+
+from . import ipc
+from . import httpserver
+from .loader import loadModules
+
+import socket
+import time
+import json
+import six
+
+IPC_PORT = 10398
+
+
+class CommonService(object):
+ isAlive = True
+ ipc = None
+ httpServer = None
+ modules = None
+
+ def __init__(self):
+ logger.info('----------------------------------------')
+ logger.info('Initializing OpenGnsys Agent')
+
+ # Read configuration file before proceding & ensures minimal config is there
+
+ self.config = readConfig()
+
+ # Get opengnsys section as dict
+ cfg = dict(self.config.items('opengnsys'))
+
+ # Set up log level
+ logger.setLevel(cfg.get('log', 'INFO'))
+
+
+ logger.debug('Loaded configuration from opengnsys.cfg:')
+ for section in self.config.sections():
+ logger.debug('Section {} = {}'.format(section, self.config.items(section)))
+
+
+ if logger.logger.isWindows():
+ # Logs will also go to windows event log for services
+ logger.logger.serviceLogger = True
+
+ self.address = (cfg.get('address', '0.0.0.0'), int(cfg.get('port', '10997')))
+ self.ipcport = int(cfg.get('ipc_port', IPC_PORT))
+
+ self.timeout = int(cfg.get('timeout', '20'))
+
+ logger.debug('Socket timeout: {}'.format(self.timeout))
+ socket.setdefaulttimeout(self.timeout)
+
+ # Now load modules
+ self.modules = loadModules(self)
+ logger.debug('Modules: {}'.format(list(v.name for v in self.modules)))
+
+ def stop(self):
+ '''
+ Requests service termination
+ '''
+ self.isAlive = False
+
+ # ********************************
+ # * Internal messages processors *
+ # ********************************
+ def notifyLogin(self, username):
+ for v in self.modules:
+ try:
+ logger.debug('Notifying login of user {} to module {}'.format(username, v.name))
+ v.onLogin(username)
+ except Exception as e:
+ logger.error('Got exception {} processing login message on {}'.format(e, v.name))
+
+ def notifyLogout(self, username):
+ for v in self.modules:
+ try:
+ logger.debug('Notifying logout of user {} to module {}'.format(username, v.name))
+ v.onLogout(username)
+ except Exception as e:
+ logger.error('Got exception {} processing logout message on {}'.format(e, v.name))
+
+ def notifyMessage(self, data):
+ module, message, data = data.split('\0')
+ for v in self.modules:
+ if v.name == module: # Case Sensitive!!!!
+ try:
+ logger.debug('Notifying message {} to module {} with json data {}'.format(message, v.name, data))
+ v.processClientMessage(message, json.loads(data))
+ return
+ except Exception as e:
+ logger.error('Got exception {} processing generic message on {}'.format(e, v.name))
+
+ logger.error('Module {} not found, messsage {} not sent'.format(module, message))
+
+
+ def clientMessageProcessor(self, msg, data):
+ '''
+ Callback, invoked from IPC, on its own thread (not the main thread).
+ This thread will "block" communication with agent untill finished, but this should be no problem
+ '''
+ logger.debug('Got message {}'.format(msg))
+
+ if msg == ipc.REQ_LOGIN:
+ self.notifyLogin(data)
+ elif msg == ipc.REQ_LOGOUT:
+ self.notifyLogout(data)
+ elif msg == ipc.REQ_MESSAGE:
+ self.notifyMessage(data)
+
+ def initialize(self):
+ # ******************************************
+ # * Initialize listeners, modules, etc...
+ # ******************************************
+
+ if six.PY3 is False:
+ import threading
+ threading._DummyThread._Thread__stop = lambda x: 42
+
+ logger.debug('Starting IPC listener at {}'.format(IPC_PORT))
+ self.ipc = ipc.ServerIPC(self.ipcport, clientMessageProcessor=self.clientMessageProcessor)
+ self.ipc.start()
+
+ # And http threaded server
+ self.httpServer = httpserver.HTTPServerThread(self.address, self)
+ self.httpServer.start()
+
+ # And lastly invoke modules activation
+ validMods = []
+ for mod in self.modules:
+ try:
+ logger.debug('Activating module {}'.format(mod.name))
+ mod.activate()
+ validMods.append(mod)
+ except Exception as e:
+ logger.exception()
+ logger.error("Activation of {} failed: {}".format(mod.name, exceptionToMessage(e)))
+
+ self.modules[:] = validMods # copy instead of assignment
+
+ logger.debug('Modules after activation: {}'.format(list(v.name for v in self.modules)))
+
+ def terminate(self):
+ # First invoke deactivate on modules
+ for mod in reversed(self.modules):
+ try:
+ logger.debug('Deactivating module {}'.format(mod.name))
+ mod.deactivate()
+ except Exception as e:
+ logger.exception()
+ logger.error("Deactivation of {} failed: {}".format(mod.name, exceptionToMessage(e)))
+
+ # Remove IPC threads
+ if self.ipc is not None:
+ try:
+ self.ipc.stop()
+ except Exception:
+ logger.error('Couln\'t stop ipc server')
+
+ if self.httpServer is not None:
+ try:
+ self.httpServer.stop()
+ except Exception:
+ logger.error('Couln\'t stop RESTApi server')
+
+ self.notifyStop()
+
+ # ****************************************
+ # Methods that CAN BE overridden by agents
+ # ****************************************
+ def doWait(self, miliseconds):
+ '''
+ Invoked to wait a bit
+ CAN be OVERRIDDEN
+ '''
+ time.sleep(float(miliseconds) / 1000)
+
+ def notifyStop(self):
+ '''
+ Overridden to log stop
+ '''
+ logger.info('Service is being stopped')
+
+ # ***************************************************
+ # * Helpers, convenient methods to facilitate comms *
+ # ***************************************************
+ def sendClientMessage(self, toModule, message, data):
+ '''
+ Sends a message to the clients using IPC
+ The data is converted to json, so ensure that it is serializable.
+ All IPC is asynchronous, so if you expect a response, this will be sent by client using another message
+
+ @param toModule: Module that will receive this message
+ @param message: Message to send
+ @param data: data to send
+ '''
+ self.ipc.sendMessageMessage('\0'.join((toModule, message, json.dumps(data))))
+
+ def sendScriptMessage(self, script):
+ '''
+ Sends an script to be executed by client
+ '''
+ self.ipc.sendScriptMessage(script)
+
+ def sendLogoffMessage(self):
+ '''
+ Sends a logoff message to client
+ '''
+ self.ipc.sendLoggofMessage()
+
+ def sendPopupMessage(self, title, message):
+ '''
+ Sends a poup box to be displayed by client
+ '''
+ self.ipc.sendPopupMessage(title, message)
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/utils.py b/admin/Sources/Clients/ogagent/src/opengnsys/utils.py
new file mode 100644
index 00000000..9480a6ab
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/utils.py
@@ -0,0 +1,72 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+
+import sys
+import six
+
+if sys.platform == 'win32':
+ _fromEncoding = 'windows-1250'
+else:
+ _fromEncoding = 'utf-8'
+
+
+def toUnicode(msg):
+ try:
+ if not isinstance(msg, six.text_type):
+ if isinstance(msg, six.binary_type):
+ return msg.decode(_fromEncoding, 'ignore')
+ return six.text_type(msg)
+ else:
+ return msg
+ except Exception:
+ try:
+ return six.text_type(msg)
+ except Exception:
+ return ''
+
+
+def exceptionToMessage(e):
+ msg = ''
+ for arg in e.args:
+ if isinstance(arg, Exception):
+ msg = msg + exceptionToMessage(arg)
+ else:
+ msg = msg + toUnicode(arg) + '. '
+ return msg
+
+
+class Bunch(dict):
+ def __init__(self, **kw):
+ dict.__init__(self, kw)
+ self.__dict__ = self
+
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/windows/OGAgentService.py b/admin/Sources/Clients/ogagent/src/opengnsys/windows/OGAgentService.py
new file mode 100644
index 00000000..71716d78
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/windows/OGAgentService.py
@@ -0,0 +1,124 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+# pylint: disable=unused-wildcard-import, wildcard-import
+
+import win32serviceutil # @UnresolvedImport, pylint: disable=import-error
+import win32service # @UnresolvedImport, pylint: disable=import-error
+import win32security # @UnresolvedImport, pylint: disable=import-error
+import win32net # @UnresolvedImport, pylint: disable=import-error
+import win32event # @UnresolvedImport, pylint: disable=import-error
+import win32com.client # @UnresolvedImport, @UnusedImport, pylint: disable=import-error
+import pythoncom # @UnresolvedImport, pylint: disable=import-error
+import servicemanager # @UnresolvedImport, pylint: disable=import-error
+import os
+
+from opengnsys import operations
+from opengnsys.service import CommonService
+
+from opengnsys.log import logger
+
+class OGAgentSvc(win32serviceutil.ServiceFramework, CommonService):
+ '''
+ This class represents a Windows Service for managing Agent interactions
+ with OpenGnsys Server
+ '''
+ _svc_name_ = "OGAgent"
+ _svc_display_name_ = "OpenGnsys Agent Service"
+ _svc_description_ = "OpenGnsys Agent for Operating Systems"
+ # 'System Event Notification' is the SENS service
+ _svc_deps_ = ['EventLog']
+
+ def __init__(self, args):
+ win32serviceutil.ServiceFramework.__init__(self, args)
+ CommonService.__init__(self)
+ self.hWaitStop = win32event.CreateEvent(None, 1, 0, None)
+ self._user = None
+
+ def SvcStop(self):
+ self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
+ self.isAlive = False
+ win32event.SetEvent(self.hWaitStop)
+
+ SvcShutdown = SvcStop
+
+ def notifyStop(self):
+ servicemanager.LogMsg(servicemanager.EVENTLOG_INFORMATION_TYPE,
+ servicemanager.PYS_SERVICE_STOPPED,
+ (self._svc_name_, ''))
+
+ def doWait(self, miliseconds):
+ win32event.WaitForSingleObject(self.hWaitStop, miliseconds)
+
+ def SvcDoRun(self):
+ '''
+ Main service loop
+ '''
+ try:
+ logger.debug('running SvcDoRun')
+ servicemanager.LogMsg(servicemanager.EVENTLOG_INFORMATION_TYPE,
+ servicemanager.PYS_SERVICE_STARTED,
+ (self._svc_name_, ''))
+
+ # call the CoInitialize to allow the registration to run in an other
+ # thread
+ logger.debug('Initializing com...')
+ pythoncom.CoInitialize()
+
+ # Initialize remaining service data
+ self.initialize()
+ except Exception: # Any init exception wil be caught, service must be then restarted
+ logger.exception()
+ logger.debug('Exiting service with failure status')
+ os._exit(-1) # pylint: disable=protected-access
+
+ # *********************
+ # * Main Service loop *
+ # *********************
+ try:
+ while self.isAlive:
+ # Pumps & processes any waiting messages
+ pythoncom.PumpWaitingMessages()
+ win32event.WaitForSingleObject(self.hWaitStop, 1000)
+ except Exception as e:
+ logger.error('Caught exception on main loop: {}'.format(e))
+
+ logger.debug('Exited main loop, deregistering SENS')
+
+ self.terminate() # Ends IPC servers
+
+ self.notifyStop()
+
+
+if __name__ == '__main__':
+
+ win32serviceutil.HandleCommandLine(OGAgentSvc)
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/windows/__init__.py b/admin/Sources/Clients/ogagent/src/opengnsys/windows/__init__.py
new file mode 100644
index 00000000..e662942e
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/windows/__init__.py
@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+
+import os
+import sys
+
+# Change to application directory.
+os.chdir(os.path.dirname(sys.argv[0]))
+
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/windows/log.py b/admin/Sources/Clients/ogagent/src/opengnsys/windows/log.py
new file mode 100644
index 00000000..745fd03f
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/windows/log.py
@@ -0,0 +1,77 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+
+import servicemanager # @UnresolvedImport, pylint: disable=import-error
+import logging
+import os
+import tempfile
+
+# Valid logging levels, from UDS Broker (uds.core.utils.log)
+OTHER, DEBUG, INFO, WARN, ERROR, FATAL = (10000 * (x + 1) for x in range(6))
+
+
+class LocalLogger(object):
+ def __init__(self):
+ # tempdir is different for "user application" and "service"
+ # service wil get c:\windows\temp, while user will get c:\users\XXX\temp
+ logging.basicConfig(
+ filename=os.path.join(tempfile.gettempdir(), 'opengnsys.log'),
+ filemode='a',
+ format='%(levelname)s %(asctime)s %(message)s',
+ level=logging.DEBUG
+ )
+ self.logger = logging.getLogger('opengnsys')
+ self.serviceLogger = False
+
+ def log(self, level, message):
+ # Debug messages are logged to a file
+ # our loglevels are 10000 (other), 20000 (debug), ....
+ # logging levels are 10 (debug), 20 (info)
+ # OTHER = logging.NOTSET
+ self.logger.log(level / 1000 - 10, message)
+
+ if level < INFO or self.serviceLogger is False: # Only information and above will be on event log
+ return
+
+ if level < WARN: # Info
+ servicemanager.LogInfoMsg(message)
+ elif level < ERROR: # WARN
+ servicemanager.LogWarningMsg(message)
+ else: # Error & Fatal
+ servicemanager.LogErrorMsg(message)
+
+ def isWindows(self):
+ return True
+
+ def isLinux(self):
+ return False
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/windows/operations.py b/admin/Sources/Clients/ogagent/src/opengnsys/windows/operations.py
new file mode 100644
index 00000000..aa83c943
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/windows/operations.py
@@ -0,0 +1,261 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+
+import os
+import locale
+import subprocess
+import ctypes
+from ctypes.wintypes import DWORD, LPCWSTR
+import win32com.client # @UnresolvedImport, pylint: disable=import-error
+import win32net # @UnresolvedImport, pylint: disable=import-error
+import win32security # @UnresolvedImport, pylint: disable=import-error
+import win32api # @UnresolvedImport, pylint: disable=import-error
+import win32con # @UnresolvedImport, pylint: disable=import-error
+
+from opengnsys import utils
+from opengnsys.log import logger
+
+
+def getErrorMessage(res=0):
+ msg = win32api.FormatMessage(res)
+ return msg.decode('windows-1250', 'ignore')
+
+
+def getComputerName():
+ return win32api.GetComputerNameEx(win32con.ComputerNamePhysicalDnsHostname)
+
+
+def getNetworkInfo():
+ '''
+ Obtains a list of network interfaces
+ @return: A "generator" of elements, that are dict-as-object, with this elements:
+ name: Name of the interface
+ mac: mac of the interface
+ ip: ip of the interface
+ '''
+ obj = win32com.client.Dispatch("WbemScripting.SWbemLocator")
+ wmobj = obj.ConnectServer("localhost", "root\cimv2")
+ adapters = wmobj.ExecQuery("Select * from Win32_NetworkAdapterConfiguration where IpEnabled=True")
+ try:
+ for obj in adapters:
+ if obj.DefaultIPGateway is None: # Skip adapters without default router
+ continue
+ for ip in obj.IPAddress:
+ if ':' in ip: # Is IPV6, skip this
+ continue
+ if ip is None or ip == '' or ip.startswith('169.254') or ip.startswith('0.'): # If single link ip, or no ip
+ continue
+ logger.debug('Net config found: {}=({}, {})'.format(obj.Caption, obj.MACAddress, ip))
+ yield utils.Bunch(name=obj.Caption, mac=obj.MACAddress, ip=ip)
+ except Exception:
+ return
+
+
+def getDomainName():
+ '''
+ Will return the domain name if we belong a domain, else None
+ (if part of a network group, will also return None)
+ '''
+ # Status:
+ # 0 = Unknown
+ # 1 = Unjoined
+ # 2 = Workgroup
+ # 3 = Domain
+ domain, status = win32net.NetGetJoinInformation()
+ if status != 3:
+ domain = None
+
+ return domain
+
+
+def getWindowsVersion():
+ '''
+ Returns Windows version.
+ '''
+ import _winreg
+ reg = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion')
+ try:
+ data = '{} {}'.format(_winreg.QueryValueEx(reg, 'ProductName')[0], _winreg.QueryValueEx(reg, 'ReleaseId')[0])
+ except Exception:
+ data = '{} {}'.format(_winreg.QueryValueEx(reg, 'ProductName')[0], _winreg.QueryValueEx(reg, 'CurrentBuildNumber')[0])
+ reg.Close()
+ return data
+
+
+EWX_LOGOFF = 0x00000000
+EWX_SHUTDOWN = 0x00000001
+EWX_REBOOT = 0x00000002
+EWX_FORCE = 0x00000004
+EWX_POWEROFF = 0x00000008
+EWX_FORCEIFHUNG = 0x00000010
+
+
+def reboot(flags=EWX_FORCEIFHUNG | EWX_REBOOT):
+ hproc = win32api.GetCurrentProcess()
+ htok = win32security.OpenProcessToken(hproc, win32security.TOKEN_ADJUST_PRIVILEGES | win32security.TOKEN_QUERY)
+ privs = ((win32security.LookupPrivilegeValue(None, win32security.SE_SHUTDOWN_NAME), win32security.SE_PRIVILEGE_ENABLED),)
+ win32security.AdjustTokenPrivileges(htok, 0, privs)
+ win32api.ExitWindowsEx(flags, 0)
+
+def poweroff(flags=0):
+ '''
+ Simple poweroff command.
+ '''
+ reboot(flags=EWX_FORCEIFHUNG | EWX_SHUTDOWN)
+
+def logoff():
+ win32api.ExitWindowsEx(EWX_LOGOFF)
+
+
+def renameComputer(newName):
+ # Needs admin privileges to work
+ if ctypes.windll.kernel32.SetComputerNameExW(DWORD(win32con.ComputerNamePhysicalDnsHostname), LPCWSTR(newName)) == 0: # @UndefinedVariable
+ # win32api.FormatMessage -> returns error string
+ # win32api.GetLastError -> returns error code
+ # (just put this comment here to remember to log this when logger is available)
+ error = getErrorMessage()
+ computerName = win32api.GetComputerNameEx(win32con.ComputerNamePhysicalDnsHostname)
+ raise Exception('Error renaming computer from {} to {}: {}'.format(computerName, newName, error))
+
+
+NETSETUP_JOIN_DOMAIN = 0x00000001
+NETSETUP_ACCT_CREATE = 0x00000002
+NETSETUP_ACCT_DELETE = 0x00000004
+NETSETUP_WIN9X_UPGRADE = 0x00000010
+NETSETUP_DOMAIN_JOIN_IF_JOINED = 0x00000020
+NETSETUP_JOIN_UNSECURE = 0x00000040
+NETSETUP_MACHINE_PWD_PASSED = 0x00000080
+NETSETUP_JOIN_WITH_NEW_NAME = 0x00000400
+NETSETUP_DEFER_SPN_SET = 0x1000000
+
+
+def joinDomain(domain, ou, account, password, executeInOneStep=False):
+ '''
+ Joins machine to a windows domain
+ :param domain: Domain to join to
+ :param ou: Ou that will hold machine
+ :param account: Account used to join domain
+ :param password: Password of account used to join domain
+ :param executeInOneStep: If true, means that this machine has been renamed and wants to add NETSETUP_JOIN_WITH_NEW_NAME to request so we can do rename/join in one step.
+ '''
+ # If account do not have domain, include it
+ if '@' not in account and '\\' not in account:
+ if '.' in domain:
+ account = account + '@' + domain
+ else:
+ account = domain + '\\' + account
+
+ # Do log
+ flags = NETSETUP_ACCT_CREATE | NETSETUP_DOMAIN_JOIN_IF_JOINED | NETSETUP_JOIN_DOMAIN
+
+ if executeInOneStep:
+ flags |= NETSETUP_JOIN_WITH_NEW_NAME
+
+ flags = DWORD(flags)
+
+ domain = LPCWSTR(domain)
+
+ # Must be in format "ou=.., ..., dc=...,"
+ ou = LPCWSTR(ou) if ou is not None and ou != '' else None
+ account = LPCWSTR(account)
+ password = LPCWSTR(password)
+
+ res = ctypes.windll.netapi32.NetJoinDomain(None, domain, ou, account, password, flags)
+ # Machine found in another ou, use it and warn this on log
+ if res == 2224:
+ flags = DWORD(NETSETUP_DOMAIN_JOIN_IF_JOINED | NETSETUP_JOIN_DOMAIN)
+ res = ctypes.windll.netapi32.NetJoinDomain(None, domain, None, account, password, flags)
+ if res != 0:
+ # Log the error
+ error = getErrorMessage(res)
+ if res == 1355:
+ error = "DC Is not reachable"
+ print('{} {}'.format(res, error))
+ raise Exception('Error joining domain {}, with credentials {}/*****{}: {}, {}'.format(domain.value, account.value, ', under OU {}'.format(ou.value) if ou.value is not None else '', res, error))
+
+
+def changeUserPassword(user, oldPassword, newPassword):
+ computerName = LPCWSTR(getComputerName())
+ user = LPCWSTR(user)
+ oldPassword = LPCWSTR(oldPassword)
+ newPassword = LPCWSTR(newPassword)
+
+ res = ctypes.windll.netapi32.NetUserChangePassword(computerName, user, oldPassword, newPassword)
+
+ if res != 0:
+ # Log the error, and raise exception to parent
+ error = getErrorMessage()
+ raise Exception('Error changing password for user {}: {}'.format(user.value, error))
+
+
+class LASTINPUTINFO(ctypes.Structure):
+ _fields_ = [
+ ('cbSize', ctypes.c_uint),
+ ('dwTime', ctypes.c_uint),
+ ]
+
+
+def initIdleDuration(atLeastSeconds):
+ '''
+ In windows, there is no need to set screensaver
+ '''
+ pass
+
+
+def getIdleDuration():
+ lastInputInfo = LASTINPUTINFO()
+ lastInputInfo.cbSize = ctypes.sizeof(lastInputInfo)
+ ctypes.windll.user32.GetLastInputInfo(ctypes.byref(lastInputInfo))
+ millis = ctypes.windll.kernel32.GetTickCount() - lastInputInfo.dwTime # @UndefinedVariable
+ return millis / 1000.0
+
+
+def getCurrentUser():
+ '''
+ Returns current logged in username
+ '''
+ return os.environ['USERNAME']
+
+
+def getSessionLanguage():
+ '''
+ Returns the user's session language
+ '''
+ return locale.getdefaultlocale()[0]
+
+
+def showPopup(title, message):
+ '''
+ Displays a message box on user's session (during 1 min).
+ '''
+ return subprocess.call('mshta "javascript:var sh=new ActiveXObject(\'WScript.Shell\'); sh.Popup( \'{}\', 60, \'{}\', 64); close()"'.format(message.encode('unicode_escape'), title.encode('unicode_escape')), shell=True)
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/workers/__init__.py b/admin/Sources/Clients/ogagent/src/opengnsys/workers/__init__.py
new file mode 100644
index 00000000..f2bcd7d2
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/workers/__init__.py
@@ -0,0 +1,2 @@
+from .server_worker import ServerWorker
+from .client_worker import ClientWorker
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/workers/client_worker.py b/admin/Sources/Clients/ogagent/src/opengnsys/workers/client_worker.py
new file mode 100644
index 00000000..6a083804
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/workers/client_worker.py
@@ -0,0 +1,114 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+# pylint: disable=unused-wildcard-import,wildcard-import
+from __future__ import unicode_literals
+
+class ClientWorker(object):
+ '''
+ A ServerWorker is a server module that "works" for service
+ Most method are invoked inside their own thread, except onActivation & onDeactivation.
+ This two methods are invoked inside main service thread, take that into account when creating them
+
+ * You must provide a module name (override name on your class), so we can identify the module by a "valid" name.
+ A valid name is like a valid python variable (do not use spaces, etc...)
+ * The name of the module is used as REST message destination id:
+ https://sampleserver:8888/[name]/....
+ Remember that module names and REST path are case sensitive!!!
+
+ '''
+ name = None
+ service = None
+
+ def __init__(self, service):
+ self.service = service
+
+ def activate(self):
+ '''
+ Convenient method to wrap onActivation, so we can include easyly custom common logic for activation in a future
+ '''
+ self.onActivation()
+
+ def deactivate(self):
+ '''
+ Convenient method to wrap onActivation, so we can include easyly custom common logic for deactivation in a future
+ '''
+ self.onDeactivation()
+
+ def processMessage(self, message, params):
+ '''
+ This method can be overriden to provide your own message proccessor, or better you can
+ implement a method that is called "process_" + message and this default processMessage will invoke it
+ * Example:
+ We got a message from OGAgent "Mazinger", with json params
+ module.processMessage("mazinger", jsonParams)
+
+ This method will process "mazinguer", and look for a "self" method that is called "process_mazinger", and invoke it this way:
+ return self.process_mazinger(jsonParams)
+
+ The methods must return data that can be serialized to json (i.e. Ojects are not serializable to json, basic type are)
+ '''
+ try:
+ operation = getattr(self, 'process_' + message)
+ except Exception:
+ raise Exception('Message processor for "{}" not found'.format(message))
+
+ return operation(params)
+
+ def onActivation(self):
+ '''
+ Invoked by Service for activation.
+ This MUST be overridden by modules!
+ This method is invoked inside main thread, so if it "hangs", complete service will hang
+ This should be no problem, but be advised about this
+ '''
+ pass
+
+ def onDeactivation(self):
+ '''
+ Invoked by Service before unloading service
+ This MUST be overridden by modules!
+ This method is invoked inside main thread, so if it "hangs", complete service will hang
+ This should be no problem, but be advised about this
+ '''
+ pass
+
+ # *************************************
+ # * Helper, convenient helper methods *
+ # *************************************
+ def sendServerMessage(self, message, data):
+ '''
+ Sends a message to connected ipc clients
+ By convenience, it uses the "current" moduel name as destination module name also.
+ If you need to send a message to a different module, you can use self.service.sendClientMessage(module, message, data) instead
+ og this helmer
+ '''
+ self.service.ipc.sendMessage(self.name, message, data)
+ \ No newline at end of file
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/workers/server_worker.py b/admin/Sources/Clients/ogagent/src/opengnsys/workers/server_worker.py
new file mode 100644
index 00000000..141d657c
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/workers/server_worker.py
@@ -0,0 +1,186 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+# pylint: disable=unused-wildcard-import,wildcard-import
+from __future__ import unicode_literals
+
+class ServerWorker(object):
+ '''
+ A ServerWorker is a server module that "works" for service
+ Most method are invoked inside their own thread, except onActivation & onDeactivation.
+ This two methods are invoked inside main service thread, take that into account when creating them
+
+ * You must provide a module name (override name on your class), so we can identify the module by a "valid" name.
+ A valid name is like a valid python variable (do not use spaces, etc...)
+ * The name of the module is used as REST message destination id:
+ https://sampleserver:8888/[name]/....
+ Remember that module names and REST path are case sensitive!!!
+
+ '''
+ name = None
+ service = None
+ locked = False
+
+ def __init__(self, service):
+ self.service = service
+
+ def activate(self):
+ '''
+ Convenient method to wrap onActivation, so we can include easyly custom common logic for activation in a future
+ '''
+ self.onActivation()
+
+ def deactivate(self):
+ '''
+ Convenient method to wrap onActivation, so we can include easyly custom common logic for deactivation in a future
+ '''
+ self.onDeactivation()
+
+ def process(self, getParams, postParams, server):
+ '''
+ This method is invoked on a message received with an empty path (that means a message with only the module name, like in "http://example.com/Sample"
+ Override it if you expect messages with that pattern
+
+ Overriden method must return data that can be serialized to json (i.e. Ojects are not serializable to json, basic type are)
+ '''
+ raise NotImplementedError('Generic message processor is not supported')
+
+ def processServerMessage(self, path, getParams, postParams, server):
+ '''
+ This method can be overriden to provide your own message proccessor, or better you can
+ implement a method that is called exactly as "process_" + path[0] (module name has been removed from path array) and this default processMessage will invoke it
+ * Example:
+ Imagine this invocation url (no matter if GET or POST): http://example.com:9999/Sample/mazinger/Z
+ The HTTP Server will remove "Sample" from path, parse arguments and invoke this method as this:
+ module.processMessage(["mazinger","Z"], getParams, postParams)
+
+ This method will process "mazinguer", and look for a "self" method that is called "process_mazinger", and invoke it this way:
+ return self.process_mazinger(["Z"], getParams, postParams)
+
+ In the case path is empty (that is, the path is composed only by the module name, like in "http://example.com/Sample", the "process" method
+ will be invoked directly
+
+ The methods must return data that can be serialized to json (i.e. Ojects are not serializable to json, basic type are)
+ '''
+ if self.locked is True:
+ raise Exception('system is busy')
+
+ if len(path) == 0:
+ return self.process(getParams, postParams, server)
+ try:
+ operation = getattr(self, 'process_' + path[0])
+ except Exception:
+ raise Exception('Message processor for "{}" not found'.format(path[0]))
+
+ return operation(path[1:], getParams, postParams, server)
+
+
+ def processClientMessage(self, message, data):
+ '''
+ Invoked by Service when a client message is received (A message from user space Agent)
+
+ This method can be overriden to provide your own message proccessor, or better you can
+ implement a method that is called exactly "process_client_" + message (module name has been removed from path) and this default processMessage will invoke it
+ * Example:
+ We got a message from OGAgent "Mazinger", with json params
+ module.processClientMessage("mazinger", jsonParams)
+
+ This method will process "mazinguer", and look for a "self" method that is called "process_client_mazinger", and invoke it this way:
+ self.process_client_mazinger(jsonParams)
+
+ The methods returns nothing (client communications are done asynchronously)
+ '''
+ try:
+ operation = getattr(self, 'process_client_' + message)
+ except Exception:
+ raise Exception('Message processor for "{}" not found'.format(message))
+
+ operation(data)
+
+ # raise NotImplementedError('Got a client message but no proccessor is implemented')
+
+
+ def onActivation(self):
+ '''
+ Invoked by Service for activation.
+ This MUST be overridden by modules!
+ This method is invoked inside main thread, so if it "hangs", complete service will hang
+ This should be no problem, but be advised about this
+ '''
+ pass
+
+ def onDeactivation(self):
+ '''
+ Invoked by Service before unloading service
+ This MUST be overridden by modules!
+ This method is invoked inside main thread, so if it "hangs", complete service will hang
+ This should be no problem, but be advised about this
+ '''
+ pass
+
+
+ def onLogin(self, user):
+ '''
+ Invoked by Service when an user login is detected
+ This CAN be overridden by modules
+ This method is invoked whenever the client (user space agent) notifies the server (Service) that a user has logged in.
+ This method is run on its own thread
+ '''
+ pass
+
+ def onLogout(self, user):
+ '''
+ Invoked by Service when an user login is detected
+ This CAN be overridden by modules
+ This method is invoked whenever the client (user space agent) notifies the server (Service) that a user has logged in.
+ This method is run on its own thread
+ '''
+ pass
+
+ # *************************************
+ # * Helper, convenient helper methods *
+ # *************************************
+ def sendClientMessage(self, message, data):
+ '''
+ Sends a message to connected ipc clients
+ By convenience, it uses the "current" moduel name as destination module name also.
+ If you need to send a message to a different module, you can use self.service.sendClientMessage(module, message, data) instead
+ og this helmer
+ '''
+ self.service.sendClientMessage(self.name, message, data)
+
+ def sendScriptMessage(self, script):
+ self.service.sendScriptMessage(script)
+
+ def sendLogoffMessage(self):
+ self.service.sendLogoffMessage()
+
+ def sendPopupMessage(self):
+ self.service.sendPopupMessage()
diff --git a/admin/Sources/Clients/ogagent/src/prototypes/threaded_server.py b/admin/Sources/Clients/ogagent/src/prototypes/threaded_server.py
new file mode 100644
index 00000000..ed5583bf
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/prototypes/threaded_server.py
@@ -0,0 +1,170 @@
+'''
+Created on Jul 9, 2015
+
+@author: dkmaster
+'''
+from __future__ import unicode_literals, print_function
+
+# Pydev can't parse "six.moves.xxxx" because it is loaded lazy
+from six.moves.socketserver import ThreadingMixIn # @UnresolvedImport
+from six.moves.SimpleHTTPServer import SimpleHTTPRequestHandler # @UnresolvedImport
+from six.moves.BaseHTTPServer import HTTPServer # @UnresolvedImport
+from six.moves.urllib.parse import unquote # @UnresolvedImport
+
+import json
+import threading
+import ssl
+
+import os.path
+import tempfile
+
+# For testing
+# --------------------
+CERTFILE = 'UDSActor.pem'
+
+
+def createSelfSignedCert(force=False):
+
+ certFile = os.path.join(tempfile.gettempdir(), CERTFILE)
+
+ if os.path.exists(certFile) and not force:
+ return certFile
+
+ certData = '''-----BEGIN PRIVATE KEY-----
+MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCb50K3mIznNklz
+yVAD7xSQOSJQ6+NPXj7U9/4zLZ+TvmbQ7RqUUsxbfxHbeRnoYTWV2nKk4+tHqmvz
+ujLSS/loFhTSMqtrLn7rowSYJoQhKOUkAiQlWkqCfItWgL5pJopDpNHFul9Rn3ds
+PMWQTiGeUNR4Y3RnBhr1Q1BsqAzf4m6zFUmgLPPmVLdF4uJ3Tuz8TSy2gWLs5aSr
+5do4WamwUfYjRSVMJECmwjUM4rQ8SQgg0sHBeBuDUGNBvBQFac1G7qUcMReeu8Zr
+DUtMsXma/l4rA8NB5CRmTrQbTBF4l+jb2BDFebDqDUK1Oqs9X35yOQfDOAFYHiix
+PX0IsXOZAgMBAAECggEBAJi3000RrIUZUp6Ph0gzPMuCjDEEwWiQA7CPNX1gpb8O
+dp0WhkDhUroWIaICYPSXtOwUTtVjRqivMoxPy1Thg3EIoGC/rdeSdlXRHMEGicwJ
+yVyalFnatr5Xzg5wkxVh4XMd0zeDt7e3JD7s0QLo5lm1CEzd77qz6lhzFic5/1KX
+bzdULtTlq60dazg2hEbcS4OmM1UMCtRVDAsOIUIZPL0M9j1C1d1iEdYnh2xshKeG
+/GOfo95xsgdMlGjtv3hUT5ryKVoEsu+36rGb4VfhPfUvvoVbRx5QZpW+QvxaYh5E
+Fi0JEROozFwG31Y++8El7J3yQko8cFBa1lYYUwwpNAECgYEAykT+GiM2YxJ4uVF1
+OoKiE9BD53i0IG5j87lGPnWqzEwYBwnqjEKDTou+uzMGz3MDV56UEFNho7wUWh28
+LpEkjJB9QgbsugjxIBr4JoL/rYk036e/6+U8I95lvYWrzb+rBMIkRDYI7kbQD/mQ
+piYUpuCkTymNAu2RisK6bBzJslkCgYEAxVE23OQvkCeOV8hJNPZGpJ1mDS+TiOow
+oOScMZmZpail181eYbAfMsCr7ri812lSj98NvA2GNVLpddil6LtS1cQ5p36lFBtV
+xQUMZiFz4qVbEak+izL+vPaev/mXXsOcibAIQ+qI/0txFpNhJjpaaSy6vRCBYFmc
+8pgSoBnBI0ECgYAUKCn2atnpp5aWSTLYgNosBU4vDA1PShD14dnJMaqyr0aZtPhF
+v/8b3btFJoGgPMLxgWEZ+2U4ju6sSFhPf7FXvLJu2QfQRkHZRDbEh7t5DLpTK4Fp
+va9vl6Ml7uM/HsGpOLuqfIQJUs87OFCc7iCSvMJDDU37I7ekT2GKkpfbCQKBgBrE
+0NeY0WcSJrp7/oqD2sOcYurpCG/rrZs2SIZmGzUhMxaa0vIXzbO59dlWELB8pmnE
+Tf20K//x9qA5OxDe0PcVPukdQlH+/1zSOYNliG44FqnHtyd1TJ/gKVtMBiAiE4uO
+aSClod5Yosf4SJbCFd/s5Iyfv52NqsAyp1w3Aj/BAoGAVCnEiGUfyHlIR+UH4zZW
+GXJMeqdZLfcEIszMxLePkml4gUQhoq9oIs/Kw+L1DDxUwzkXN4BNTlFbOSu9gzK1
+dhuIUGfS6RPL88U+ivC3A0y2jT43oUMqe3hiRt360UQ1GXzp2dMnR9odSRB1wHoO
+IOjEBZ8341/c9ZHc5PCGAG8=
+-----END PRIVATE KEY-----
+-----BEGIN CERTIFICATE-----
+MIID7zCCAtegAwIBAgIJAIrEIthCfxUCMA0GCSqGSIb3DQEBCwUAMIGNMQswCQYD
+VQQGEwJFUzEPMA0GA1UECAwGTWFkcmlkMREwDwYDVQQHDAhBbGNvcmNvbjEMMAoG
+A1UECgwDVURTMQ4wDAYDVQQLDAVBY3RvcjESMBAGA1UEAwwJVURTIEFjdG9yMSgw
+JgYJKoZIhvcNAQkBFhlzdXBwb3J0QHVkc2VudGVycHJpc2UuY29tMB4XDTE0MTAy
+NjIzNDEyNFoXDTI0MTAyMzIzNDEyNFowgY0xCzAJBgNVBAYTAkVTMQ8wDQYDVQQI
+DAZNYWRyaWQxETAPBgNVBAcMCEFsY29yY29uMQwwCgYDVQQKDANVRFMxDjAMBgNV
+BAsMBUFjdG9yMRIwEAYDVQQDDAlVRFMgQWN0b3IxKDAmBgkqhkiG9w0BCQEWGXN1
+cHBvcnRAdWRzZW50ZXJwcmlzZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
+ggEKAoIBAQCb50K3mIznNklzyVAD7xSQOSJQ6+NPXj7U9/4zLZ+TvmbQ7RqUUsxb
+fxHbeRnoYTWV2nKk4+tHqmvzujLSS/loFhTSMqtrLn7rowSYJoQhKOUkAiQlWkqC
+fItWgL5pJopDpNHFul9Rn3dsPMWQTiGeUNR4Y3RnBhr1Q1BsqAzf4m6zFUmgLPPm
+VLdF4uJ3Tuz8TSy2gWLs5aSr5do4WamwUfYjRSVMJECmwjUM4rQ8SQgg0sHBeBuD
+UGNBvBQFac1G7qUcMReeu8ZrDUtMsXma/l4rA8NB5CRmTrQbTBF4l+jb2BDFebDq
+DUK1Oqs9X35yOQfDOAFYHiixPX0IsXOZAgMBAAGjUDBOMB0GA1UdDgQWBBRShS90
+5lJTNvYPIEqP3GxWwG5iiDAfBgNVHSMEGDAWgBRShS905lJTNvYPIEqP3GxWwG5i
+iDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAU0Sp4gXhQmRVzq+7+
+vRFUkQuPj4Ga/d9r5Wrbg3hck3+5pwe9/7APoq0P/M0DBhQpiJKjrD6ydUevC+Y/
+43ZOJPhMlNw0o6TdQxOkX6FDwQanLLs7sfvJvqtVzYn3nuRFKT3dvl7Zg44QMw2M
+ay42q59fAcpB4LaDx/i7gOYSS5eca3lYW7j7YSr/+ozXK2KlgUkuCUHN95lOq+dF
+trmV9mjzM4CNPZqKSE7kpHRywgrXGPCO000NvEGSYf82AtgRSFKiU8NWLQSEPdcB
+k//2dsQZw2cRZ8DrC2B6Tb3M+3+CA6wVyqfqZh1SZva3LfGvq/C+u+ItguzPqNpI
+xtvM
+-----END CERTIFICATE-----'''
+ with open(certFile, "wt") as f:
+ f.write(certData)
+
+ return certFile
+# --------------
+
+
+class HTTPServerHandler(SimpleHTTPRequestHandler):
+ service = None
+ protocol_version = 'HTTP/1.1'
+ server_version = 'OpenGnsys Agent Server'
+ sys_version = ''
+
+ def sendJsonError(self, code, message):
+ self.send_response(code)
+ self.send_header('Content-type', 'application/json')
+ self.end_headers()
+ self.wfile.write(json.dumps({'error': message}))
+ return
+
+ def sendJsonResponse(self, data):
+ self.send_response(200)
+ data = json.dumps(data)
+ self.send_header('Content-type', 'application/json')
+ self.send_header('Content-Length', len(data))
+ self.end_headers()
+ # Send the html message
+ self.wfile.write(data)
+
+
+ # parseURL
+ def parseUrl(self):
+ # Very simple path & params splitter
+ path = self.path.split('?')[0][1:].split('/')
+
+ try:
+ params = dict((v[0], unquote(v[1])) for v in (v.split('=') for v in self.path.split('?')[1].split('&')))
+ except Exception:
+ params = {}
+
+ return (path, params)
+
+
+ def do_GET(self):
+ path, params = self.parseUrl()
+
+ self.sendJsonResponse({'path': path, 'params': params})
+
+ def do_POST(self):
+ path, getParams = self.parseUrl()
+
+ # Now post parameters, that are in JSON format
+
+
+
+
+
+class HTTPThreadingServer(ThreadingMixIn, HTTPServer):
+ pass
+
+class HTTPServerThread(threading.Thread):
+ def __init__(self, address, service):
+ super(self.__class__, self).__init__()
+
+ HTTPServerHandler.service = service
+
+ self.certFile = createSelfSignedCert()
+ self.server = HTTPThreadingServer(address, HTTPServerHandler)
+ self.server.socket = ssl.wrap_socket(self.server.socket, certfile=self.certFile, server_side=True)
+
+ def getServerUrl(self):
+ return 'https://{}:{}/{}'.format(self.server.server_address[0], self.server.server_address[1], HTTPServerHandler.uuid)
+
+ def stop(self):
+ self.server.shutdown()
+
+ def run(self):
+ self.server.serve_forever()
+
+
+if __name__ == '__main__':
+ thr = HTTPServerThread(('0.0.0.0', 8000), None)
+ print('Server started: {}'.format(thr))
+ thr.start()
+
+ \ No newline at end of file
diff --git a/admin/Sources/Clients/ogagent/src/setup.py b/admin/Sources/Clients/ogagent/src/setup.py
new file mode 100644
index 00000000..f80bf33b
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/setup.py
@@ -0,0 +1,136 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+@author: Ramón M. Gómez, ramongomez at us dot es
+'''
+
+VERSION = '1.1.0'
+
+# ModuleFinder can't handle runtime changes to __path__, but win32com uses them
+try:
+ # py2exe 0.6.4 introduced a replacement modulefinder.
+ # This means we have to add package paths there, not to the built-in
+ # one. If this new modulefinder gets integrated into Python, then
+ # we might be able to revert this some day.
+ # if this doesn't work, try import modulefinder
+ try:
+ import py2exe.mf as modulefinder
+ except ImportError:
+ import modulefinder
+ import win32com, sys
+ for p in win32com.__path__[1:]:
+ modulefinder.AddPackagePath("win32com", p)
+ for extra in ["win32com.shell"]: # ,"win32com.mapi"
+ __import__(extra)
+ m = sys.modules[extra]
+ for p in m.__path__[1:]:
+ modulefinder.AddPackagePath(extra, p)
+except ImportError:
+ # no build path setup, no worries.
+ pass
+
+from distutils.core import setup
+import py2exe
+import sys
+import os
+
+sys.argv.append('py2exe')
+
+def get_requests_cert_file():
+ """Add Python requests or certifi .pem file for installers."""
+ import requests
+ f = os.path.join(os.path.dirname(requests.__file__), 'cacert.pem')
+ if not os.path.exists(f):
+ import certifi
+ f = os.path.join(os.path.dirname(certifi.__file__), 'cacert.pem')
+ return f
+
+
+class Target:
+
+ def __init__(self, **kw):
+ self.__dict__.update(kw)
+ # for the versioninfo resources
+ self.version = VERSION
+ self.name = 'OGAgentService'
+ self.description = 'OpenGnsys Agent Service'
+ self.author = 'Adolfo Gomez'
+ self.url = 'https://opengnsys.es/'
+ self.company_name = "OpenGnsys Project"
+ self.copyright = "(c) 2014 VirtualCable S.L.U."
+ self.name = "OpenGnsys Agent"
+
+# Now you need to pass arguments to setup
+# windows is a list of scripts that have their own UI and
+# thus don't need to run in a console.
+
+
+udsservice = Target(
+ description='OpenGnsys Agent Service',
+ modules=['opengnsys.windows.OGAgentService'],
+ icon_resources=[(0, 'img\\oga.ico'), (1, 'img\\oga.ico')],
+ cmdline_style='pywin32'
+)
+
+# Some test_modules are hidden to py2exe by six, we ensure that they appear on "includes"
+HIDDEN_BY_SIX = ['SocketServer', 'SimpleHTTPServer', 'urllib']
+
+setup(
+ windows=[
+ {
+ 'script': 'OGAgentUser.py',
+ 'icon_resources': [(0, 'img\\oga.ico'), (1, 'img\\oga.ico')]
+ },
+ ],
+ console=[
+ {
+ 'script': 'OGAServiceHelper.py'
+ }
+ ],
+ service=[udsservice],
+ data_files=[('', [get_requests_cert_file()]),('cfg', ['cfg/ogagent.cfg', 'cfg/ogclient.cfg'])],
+ options={
+ 'py2exe': {
+ 'bundle_files': 3,
+ 'compressed': True,
+ 'optimize': 2,
+ 'includes': ['sip', 'PyQt4', 'win32com.shell', 'requests', 'encodings', 'encodings.utf_8'] + HIDDEN_BY_SIX,
+ 'excludes': ['doctest', 'unittest'],
+ 'dll_excludes': ['msvcp90.dll'],
+ 'dist_dir': '..\\bin',
+ }
+ },
+ name='OpenGnsys Agent',
+ version=VERSION,
+ description='OpenGnsys Agent',
+ author='Adolfo Gomez',
+ author_email='agomez@virtualcable.es',
+ zipfile='OGAgent.zip',
+)
diff --git a/admin/Sources/Clients/ogagent/src/test_modules/__init__.py b/admin/Sources/Clients/ogagent/src/test_modules/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/test_modules/__init__.py
diff --git a/admin/Sources/Clients/ogagent/src/test_modules/client/Sample1/__init__.py b/admin/Sources/Clients/ogagent/src/test_modules/client/Sample1/__init__.py
new file mode 100644
index 00000000..db174f0e
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/test_modules/client/Sample1/__init__.py
@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+
+from opengnsys.workers import ClientWorker
+
+class Sample1(ClientWorker):
+ name = 'Sample1'
+
diff --git a/admin/Sources/Clients/ogagent/src/test_modules/client/__init__.py b/admin/Sources/Clients/ogagent/src/test_modules/client/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/test_modules/client/__init__.py
diff --git a/admin/Sources/Clients/ogagent/src/test_modules/server/Sample1/__init__.py b/admin/Sources/Clients/ogagent/src/test_modules/server/Sample1/__init__.py
new file mode 100644
index 00000000..189957e6
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/test_modules/server/Sample1/__init__.py
@@ -0,0 +1,2 @@
+# Module must be imported on package, so we can initialize and load it
+from sample1 import Sample1 \ No newline at end of file
diff --git a/admin/Sources/Clients/ogagent/src/test_modules/server/Sample1/sample1.py b/admin/Sources/Clients/ogagent/src/test_modules/server/Sample1/sample1.py
new file mode 100644
index 00000000..61e405ec
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/test_modules/server/Sample1/sample1.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+
+from opengnsys.workers import ServerWorker
+
+from .sample_pkg import test
+
+class Sample1(ServerWorker):
+ name='Sample1'
+
diff --git a/admin/Sources/Clients/ogagent/src/test_modules/server/Sample1/sample_pkg/__init__.py b/admin/Sources/Clients/ogagent/src/test_modules/server/Sample1/sample_pkg/__init__.py
new file mode 100644
index 00000000..19365721
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/test_modules/server/Sample1/sample_pkg/__init__.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+from __future__ import unicode_literals
+
+
+def test():
+ return 'Test' \ No newline at end of file
diff --git a/admin/Sources/Clients/ogagent/src/test_modules/server/__init__.py b/admin/Sources/Clients/ogagent/src/test_modules/server/__init__.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/test_modules/server/__init__.py
diff --git a/admin/Sources/Clients/ogagent/src/test_rest_server.py b/admin/Sources/Clients/ogagent/src/test_rest_server.py
new file mode 100644
index 00000000..ad1aede6
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/test_rest_server.py
@@ -0,0 +1,210 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2015 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+'''
+@author: Adolfo Gómez, dkmaster at dkmon dot com
+'''
+# pylint: disable=unused-wildcard-import,wildcard-import
+from __future__ import unicode_literals, print_function
+
+# Pydev can't parse "six.moves.xxxx" because it is loaded lazy
+from six.moves.socketserver import ThreadingMixIn # @UnresolvedImport
+from six.moves.BaseHTTPServer import BaseHTTPRequestHandler # @UnresolvedImport
+from six.moves.BaseHTTPServer import HTTPServer # @UnresolvedImport
+from six.moves.urllib.parse import unquote # @UnresolvedImport
+
+import json
+import threading
+import ssl
+
+import logging
+from tempfile import gettempdir
+from os.path import exists, join
+
+logger = logging.getLogger(__name__)
+
+
+CERTFILE = 'OGTestServer.pem'
+
+
+def createSelfSignedCert(force=False):
+
+ certFile = join(gettempdir(), CERTFILE)
+
+ if exists(certFile) and not force:
+ return certFile
+
+ certData = '''-----BEGIN PRIVATE KEY-----
+MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCb50K3mIznNklz
+yVAD7xSQOSJQ6+NPXj7U9/4zLZ+TvmbQ7RqUUsxbfxHbeRnoYTWV2nKk4+tHqmvz
+ujLSS/loFhTSMqtrLn7rowSYJoQhKOUkAiQlWkqCfItWgL5pJopDpNHFul9Rn3ds
+PMWQTiGeUNR4Y3RnBhr1Q1BsqAzf4m6zFUmgLPPmVLdF4uJ3Tuz8TSy2gWLs5aSr
+5do4WamwUfYjRSVMJECmwjUM4rQ8SQgg0sHBeBuDUGNBvBQFac1G7qUcMReeu8Zr
+DUtMsXma/l4rA8NB5CRmTrQbTBF4l+jb2BDFebDqDUK1Oqs9X35yOQfDOAFYHiix
+PX0IsXOZAgMBAAECggEBAJi3000RrIUZUp6Ph0gzPMuCjDEEwWiQA7CPNX1gpb8O
+dp0WhkDhUroWIaICYPSXtOwUTtVjRqivMoxPy1Thg3EIoGC/rdeSdlXRHMEGicwJ
+yVyalFnatr5Xzg5wkxVh4XMd0zeDt7e3JD7s0QLo5lm1CEzd77qz6lhzFic5/1KX
+bzdULtTlq60dazg2hEbcS4OmM1UMCtRVDAsOIUIZPL0M9j1C1d1iEdYnh2xshKeG
+/GOfo95xsgdMlGjtv3hUT5ryKVoEsu+36rGb4VfhPfUvvoVbRx5QZpW+QvxaYh5E
+Fi0JEROozFwG31Y++8El7J3yQko8cFBa1lYYUwwpNAECgYEAykT+GiM2YxJ4uVF1
+OoKiE9BD53i0IG5j87lGPnWqzEwYBwnqjEKDTou+uzMGz3MDV56UEFNho7wUWh28
+LpEkjJB9QgbsugjxIBr4JoL/rYk036e/6+U8I95lvYWrzb+rBMIkRDYI7kbQD/mQ
+piYUpuCkTymNAu2RisK6bBzJslkCgYEAxVE23OQvkCeOV8hJNPZGpJ1mDS+TiOow
+oOScMZmZpail181eYbAfMsCr7ri812lSj98NvA2GNVLpddil6LtS1cQ5p36lFBtV
+xQUMZiFz4qVbEak+izL+vPaev/mXXsOcibAIQ+qI/0txFpNhJjpaaSy6vRCBYFmc
+8pgSoBnBI0ECgYAUKCn2atnpp5aWSTLYgNosBU4vDA1PShD14dnJMaqyr0aZtPhF
+v/8b3btFJoGgPMLxgWEZ+2U4ju6sSFhPf7FXvLJu2QfQRkHZRDbEh7t5DLpTK4Fp
+va9vl6Ml7uM/HsGpOLuqfIQJUs87OFCc7iCSvMJDDU37I7ekT2GKkpfbCQKBgBrE
+0NeY0WcSJrp7/oqD2sOcYurpCG/rrZs2SIZmGzUhMxaa0vIXzbO59dlWELB8pmnE
+Tf20K//x9qA5OxDe0PcVPukdQlH+/1zSOYNliG44FqnHtyd1TJ/gKVtMBiAiE4uO
+aSClod5Yosf4SJbCFd/s5Iyfv52NqsAyp1w3Aj/BAoGAVCnEiGUfyHlIR+UH4zZW
+GXJMeqdZLfcEIszMxLePkml4gUQhoq9oIs/Kw+L1DDxUwzkXN4BNTlFbOSu9gzK1
+dhuIUGfS6RPL88U+ivC3A0y2jT43oUMqe3hiRt360UQ1GXzp2dMnR9odSRB1wHoO
+IOjEBZ8341/c9ZHc5PCGAG8=
+-----END PRIVATE KEY-----
+-----BEGIN CERTIFICATE-----
+MIID7zCCAtegAwIBAgIJAIrEIthCfxUCMA0GCSqGSIb3DQEBCwUAMIGNMQswCQYD
+VQQGEwJFUzEPMA0GA1UECAwGTWFkcmlkMREwDwYDVQQHDAhBbGNvcmNvbjEMMAoG
+A1UECgwDVURTMQ4wDAYDVQQLDAVBY3RvcjESMBAGA1UEAwwJVURTIEFjdG9yMSgw
+JgYJKoZIhvcNAQkBFhlzdXBwb3J0QHVkc2VudGVycHJpc2UuY29tMB4XDTE0MTAy
+NjIzNDEyNFoXDTI0MTAyMzIzNDEyNFowgY0xCzAJBgNVBAYTAkVTMQ8wDQYDVQQI
+DAZNYWRyaWQxETAPBgNVBAcMCEFsY29yY29uMQwwCgYDVQQKDANVRFMxDjAMBgNV
+BAsMBUFjdG9yMRIwEAYDVQQDDAlVRFMgQWN0b3IxKDAmBgkqhkiG9w0BCQEWGXN1
+cHBvcnRAdWRzZW50ZXJwcmlzZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
+ggEKAoIBAQCb50K3mIznNklzyVAD7xSQOSJQ6+NPXj7U9/4zLZ+TvmbQ7RqUUsxb
+fxHbeRnoYTWV2nKk4+tHqmvzujLSS/loFhTSMqtrLn7rowSYJoQhKOUkAiQlWkqC
+fItWgL5pJopDpNHFul9Rn3dsPMWQTiGeUNR4Y3RnBhr1Q1BsqAzf4m6zFUmgLPPm
+VLdF4uJ3Tuz8TSy2gWLs5aSr5do4WamwUfYjRSVMJECmwjUM4rQ8SQgg0sHBeBuD
+UGNBvBQFac1G7qUcMReeu8ZrDUtMsXma/l4rA8NB5CRmTrQbTBF4l+jb2BDFebDq
+DUK1Oqs9X35yOQfDOAFYHiixPX0IsXOZAgMBAAGjUDBOMB0GA1UdDgQWBBRShS90
+5lJTNvYPIEqP3GxWwG5iiDAfBgNVHSMEGDAWgBRShS905lJTNvYPIEqP3GxWwG5i
+iDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAU0Sp4gXhQmRVzq+7+
+vRFUkQuPj4Ga/d9r5Wrbg3hck3+5pwe9/7APoq0P/M0DBhQpiJKjrD6ydUevC+Y/
+43ZOJPhMlNw0o6TdQxOkX6FDwQanLLs7sfvJvqtVzYn3nuRFKT3dvl7Zg44QMw2M
+ay42q59fAcpB4LaDx/i7gOYSS5eca3lYW7j7YSr/+ozXK2KlgUkuCUHN95lOq+dF
+trmV9mjzM4CNPZqKSE7kpHRywgrXGPCO000NvEGSYf82AtgRSFKiU8NWLQSEPdcB
+k//2dsQZw2cRZ8DrC2B6Tb3M+3+CA6wVyqfqZh1SZva3LfGvq/C+u+ItguzPqNpI
+xtvM
+-----END CERTIFICATE-----'''
+ with open(certFile, "wt") as f:
+ f.write(certData)
+
+ return certFile
+
+class HTTPServerHandler(BaseHTTPRequestHandler):
+ service = None
+ protocol_version = 'HTTP/1.0'
+ server_version = 'OpenGnsys Test REST Server'
+ sys_version = ''
+
+ def sendJsonError(self, code, message):
+ self.send_response(code)
+ self.send_header('Content-type', 'application/json')
+ self.end_headers()
+ self.wfile.write(json.dumps({'error': message}))
+ return
+
+ def sendJsonResponse(self, data):
+ self.send_response(200)
+ data = json.dumps(data)
+ self.send_header('Content-type', 'application/json')
+ self.send_header('Content-Length', len(data))
+ self.end_headers()
+ # Send the html message
+ self.wfile.write(data)
+
+
+ # parseURL
+ def parseUrl(self):
+ # Very simple path & params splitter
+ path = self.path.split('?')[0][1:].split('/')
+
+ try:
+ params = dict((v[0], unquote(v[1])) for v in (v.split('=') for v in self.path.split('?')[1].split('&')))
+ except Exception:
+ params = {}
+
+ return (path, params)
+
+
+ def do_GET(self):
+ path, params = self.parseUrl()
+
+ self.sendJsonResponse({'path': path, 'params': params})
+
+ def do_POST(self):
+ path, getParams = self.parseUrl()
+
+ # Now post parameters, that are in JSON format
+ self.sendJsonResponse({'path': path, 'params': getParams})
+
+ def log_error(self, fmt, *args):
+ logger.error('HTTP ' + fmt % args)
+
+ def log_message(self, fmt, *args):
+ logger.info('HTTP ' + fmt % args)
+
+
+class HTTPThreadingServer(ThreadingMixIn, HTTPServer):
+ pass
+
+class HTTPServerThread(threading.Thread):
+ def __init__(self, address, service):
+ super(self.__class__, self).__init__()
+
+ HTTPServerHandler.service = service
+
+ self.certFile = createSelfSignedCert()
+ self.server = HTTPThreadingServer(address, HTTPServerHandler)
+ self.server.socket = ssl.wrap_socket(self.server.socket, certfile=self.certFile, server_side=True)
+
+ logger.info('Initialized HTTPS Server thread on {}'.format(address))
+
+ def getServerUrl(self):
+ return 'https://{}:{}/{}'.format(self.server.server_address[0], self.server.server_address[1], HTTPServerHandler.uuid)
+
+ def stop(self):
+ self.server.shutdown()
+
+ def run(self):
+ self.server.serve_forever()
+
+
+
+if __name__ == '__main__':
+ logging.basicConfig(
+ filename='/tmp/restserver.log',
+ filemode='w',
+ format='%(levelname)s %(asctime)s %(message)s',
+ level=logging.DEBUG
+ )
+
+ thr = HTTPServerThread(('0.0.0.0', 9999), None)
+ print('Server started: {}'.format(thr))
+ thr.run()
+ \ No newline at end of file
diff --git a/admin/Sources/Clients/ogagent/src/update.sh b/admin/Sources/Clients/ogagent/src/update.sh
new file mode 100755
index 00000000..1019ea85
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/src/update.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+#
+# Copyright (c) 2014 Virtual Cable S.L.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Virtual Cable S.L. nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+function process {
+ pyuic4 about-dialog.ui -o about_dialog_ui.py -x
+ pyuic4 message-dialog.ui -o message_dialog_ui.py -x
+}
+
+cd $(dirname "$0")
+pyrcc4 -py3 OGAgent.qrc -o OGAgent_rc.py
+
+
+# process current directory ui's
+process
+
diff --git a/admin/Sources/Clients/ogagent/windows/build-windows.sh b/admin/Sources/Clients/ogagent/windows/build-windows.sh
new file mode 100755
index 00000000..d7248ab7
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/windows/build-windows.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+export WINEARCH=win32
+export WINEPREFIX=$(realpath $(dirname $0)/wine)
+wine cmd /c c:\\ogagent\\build.bat
+chmod -x $(dirname $0)/../OGAgentSetup*.exe
diff --git a/admin/Sources/Clients/ogagent/windows/build.bat b/admin/Sources/Clients/ogagent/windows/build.bat
new file mode 100644
index 00000000..2c444741
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/windows/build.bat
@@ -0,0 +1,6 @@
+C:
+CD \ogagent\src
+python setup.py
+CD ..
+"C:\Program Files\NSIS\makensis.exe" ogagent.nsi
+
diff --git a/admin/Sources/Clients/ogagent/windows/ogagent.nsi b/admin/Sources/Clients/ogagent/windows/ogagent.nsi
new file mode 100644
index 00000000..88c9ab2f
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/windows/ogagent.nsi
@@ -0,0 +1,192 @@
+# We need http://nsis.sourceforge.net/NSIS_Simple_Firewall_Plugin
+# Copy inside the two x86_xxxxx folders inside nsis plugins folder
+Name "OpenGnsys Agent"
+
+# OpenGnsys Actor version
+!define /file OGA_VERSION "src\VERSION"
+
+# General Symbol Definitions
+!define REGKEY "SOFTWARE\OGAgent"
+!define VERSION ${OGA_VERSION}.0
+!define COMPANY "OpenGnsys Project"
+!define URL https://opengnsys.es
+
+# MultiUser Symbol Definitions
+!define MULTIUSER_EXECUTIONLEVEL Admin
+#!define MULTIUSER_INSTALLMODE_DEFAULT_CURRENTUSER
+!define MULTIUSER_INSTALLMODE_COMMANDLINE
+!define MULTIUSER_INSTALLMODE_INSTDIR OGAgent
+!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY "${REGKEY}"
+!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUE "Path"
+
+# MUI Symbol Definitions
+!define MUI_ICON "src\img\oga.ico"
+!define MUI_FINISHPAGE_NOAUTOCLOSE
+!define MUI_UNICON "src\img\oga.ico"
+!define MUI_UNFINISHPAGE_NOAUTOCLOSE
+!define MUI_LANGDLL_REGISTRY_ROOT HKLM
+!define MUI_LANGDLL_REGISTRY_KEY ${REGKEY}
+!define MUI_LANGDLL_REGISTRY_VALUENAME InstallerLanguage
+
+# Included files
+!include MultiUser.nsh
+!include Sections.nsh
+!include MUI2.nsh
+
+# Reserved Files
+!insertmacro MUI_RESERVEFILE_LANGDLL
+
+# Variables
+Var StartMenuGroup
+
+# Installer pages
+!insertmacro MUI_PAGE_WELCOME
+!insertmacro MUI_PAGE_LICENSE src\license.txt
+!insertmacro MUI_PAGE_DIRECTORY
+!insertmacro MUI_PAGE_INSTFILES
+!insertmacro MUI_PAGE_FINISH
+!insertmacro MUI_UNPAGE_CONFIRM
+!insertmacro MUI_UNPAGE_INSTFILES
+
+# Installer languages
+!insertmacro MUI_LANGUAGE English
+!insertmacro MUI_LANGUAGE Spanish
+!insertmacro MUI_LANGUAGE French
+!insertmacro MUI_LANGUAGE German
+
+# Installer attributes
+BrandingText "OpenGnsys"
+OutFile OGAgentSetup-${OGA_VERSION}.exe
+InstallDir OGAgent
+CRCCheck on
+XPStyle on
+ShowInstDetails hide
+VIProductVersion "${VERSION}.0.0"
+VIAddVersionKey /LANG=${LANG_ENGLISH} ProductName "OGAgent"
+VIAddVersionKey /LANG=${LANG_ENGLISH} ProductVersion "${VERSION}"
+VIAddVersionKey /LANG=${LANG_ENGLISH} CompanyName "${COMPANY}"
+VIAddVersionKey /LANG=${LANG_ENGLISH} CompanyWebsite "${URL}"
+VIAddVersionKey /LANG=${LANG_ENGLISH} FileVersion "${VERSION}"
+VIAddVersionKey /LANG=${LANG_ENGLISH} FileDescription "OpenGnsys Agent installer"
+VIAddVersionKey /LANG=${LANG_ENGLISH} LegalCopyright "(c) 2015 Virtual Cable S.L.U."
+InstallDirRegKey HKLM "${REGKEY}" Path
+ShowUninstDetails show
+
+# Installer sections
+Section -Main SEC0000
+ SetShellVarContext all
+ SetOutPath $INSTDIR
+ SetOverwrite on
+ File /r bin\*.*
+ File vcredist_x86.exe
+ WriteRegStr HKLM "${REGKEY}\Components" Main 1
+SectionEnd
+
+Section -post SEC0001
+ SetShellVarContext current
+ WriteRegStr HKLM "${REGKEY}" Path $INSTDIR
+ SetOutPath $INSTDIR
+ WriteUninstaller $INSTDIR\OGAgentUninstaller.exe
+ SetOutPath $SMPROGRAMS\$StartMenuGroup
+ CreateShortcut "$SMPROGRAMS\$StartMenuGroup\$(^UninstallLink).lnk" $INSTDIR\OGAgentUninstaller.exe
+ WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)"
+ WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "${VERSION}"
+ WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher "${COMPANY}"
+ WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" URLInfoAbout "${URL}"
+ WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon $INSTDIR\OGAgentUninstaller.exe
+ WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString $INSTDIR\OGAgentUninstaller.exe
+ WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" OGAgentTool $INSTDIR\OGAgentUser.exe
+ WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify 1
+ WriteRegDWORD HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 1
+ ExecWait '"$INSTDIR\vcredist_x86.exe" /passive /norestart'
+ # Add the application to the firewall exception list - All Networks - All IP Version - Enabled
+ # SimpleFC::AddApplication "OpenGnsys Agent Service" "$INSTDIR\OGAgentService.exe" 0 2 "" 1
+ # SimpleFC::AdvAddRule [name] [description] [protocol] [direction]
+ # [status] [profile] [action] [application] [service_name] [icmp_types_and_codes]
+ # [group] [local_ports] [remote_ports] [local_address] [remote_address]
+ #
+ SimpleFC::AdvAddRule "OpenGnsys Agent Firewall rules" "Firewall rules for OpenGnsys Agent interaction with broker." "6" "1" \
+ "1" "7" "1" "$INSTDIR\OGAgentService.exe" "" "" \
+ "" "" "" "" ""
+ Pop $0 ; return error(1)/success(0)
+ # Disable fast boot on Windows 10, if registry key exists.
+ ReadRegDWORD $0 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Power" HiberbootEnabled
+ IfErrors 0 +2
+ WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Power" HiberbootEnabled 0
+ # Install service
+ nsExec::Exec /OEM "$INSTDIR\OGAgentService.exe --startup auto install" # Add service after installation
+ # Update recovery options
+ nsExec::Exec /OEM "$INSTDIR\OGAServiceHelper.exe"
+SectionEnd
+
+# Macro for selecting uninstaller sections
+!macro SELECT_UNSECTION SECTION_NAME UNSECTION_ID
+ Push $R0
+ ReadRegStr $R0 HKLM "${REGKEY}\Components" "${SECTION_NAME}"
+ StrCmp $R0 1 0 next${UNSECTION_ID}
+ !insertmacro SelectSection "${UNSECTION_ID}"
+ GoTo done${UNSECTION_ID}
+next${UNSECTION_ID}:
+ !insertmacro UnselectSection "${UNSECTION_ID}"
+done${UNSECTION_ID}:
+ Pop $R0
+!macroend
+
+# Uninstaller sections
+Section /o -un.Main UNSEC0000
+ nsExec::Exec /OEM "$INSTDIR\OGAgentService.exe stop" # Stops the service prior uninstall
+ nsExec::Exec /OEM "$INSTDIR\OGAgentService.exe remove" # Removes the service prior uninstall
+ Delete /REBOOTOK "$INSTDIR\*.*"
+ DeleteRegValue HKLM "${REGKEY}\Components" Main
+ DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" OGAgentTool
+SectionEnd
+
+Section -un.post UNSEC0001
+ # Remove application from the firewall exception list
+ # SimpleFC::RemoveApplication "$INSTDIR\OGAgentService.exe"
+ SimpleFC::AdvRemoveRule "OpenGnsys Agent Firewall rules"
+ Pop $0 ; return error(1)/success(0)
+
+ SetShellVarContext current
+ StrCpy $StartMenuGroup "OpenGnsys Agent"
+ DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)"
+ Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\$(^UninstallLink).lnk"
+ Delete /REBOOTOK $INSTDIR\OGAgentUninstaller.exe
+ DeleteRegValue HKLM "${REGKEY}" Path
+ DeleteRegKey /IfEmpty HKLM "${REGKEY}\Components"
+ DeleteRegKey /IfEmpty HKLM "${REGKEY}"
+ RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup
+ SetShellVarContext all
+ RmDir /REBOOTOK $INSTDIR
+ SetRebootFlag true
+ MessageBox MB_YESNO "$(^RebootMessage)" IDNO donotreboot
+ Reboot # Reboot is needed after uninstalling, so new installs works fine
+ donotreboot:
+SectionEnd
+
+# Installer functions
+Function .onInit
+ InitPluginsDir
+ StrCpy $StartMenuGroup "OpenGnsys Agent"
+
+ !insertmacro MUI_LANGDLL_DISPLAY
+ !insertmacro MULTIUSER_INIT
+FunctionEnd
+
+# Uninstaller functions
+Function un.onInit
+ StrCpy $StartMenuGroup "OpenGnsys Agent"
+ !insertmacro MUI_UNGETLANGUAGE
+ !insertmacro MULTIUSER_UNINIT
+ !insertmacro SELECT_UNSECTION Main ${UNSEC0000}
+FunctionEnd
+
+# Installer Language Strings
+LangString ^UninstallLink ${LANG_ENGLISH} "Uninstall $(^Name)"
+LangString ^UninstallLink ${LANG_SPANISH} "Desinstalar $(^Name)"
+LangString ^UninstallLink ${LANG_FRENCH} "D�sinstaller $(^Name)"
+LangString ^UninstallLink ${LANG_GERMAN} "deinstallieren $(^Name)"
+LangString ^RebootMessage ${LANG_ENGLISH} "Reboot the system to complete uninstall process?$\nNote: for a new $(^Name) installation, you will need to reboot."
+LangString ^RebootMessage ${LANG_SPANISH} "¿Reiniciar el sistema para completar el proceso?$\nNota: es necesario reiniciar para instalar un nuevo $(^Name)."
+LangString ^RebootMessage ${LANG_FRENCH} "Reboot the system to complete uninstall process?$\nNote: for a new $(^Name) installation, you will ned to reboot."
+LangString ^RebootMessage ${LANG_GERMAN} "Reboot the system to complete uninstall process?$\nNote: for a new $(^Name) installation, you will ned to reboot."
diff --git a/admin/Sources/Clients/ogagent/windows/py2exe-wine-linux.sh b/admin/Sources/Clients/ogagent/windows/py2exe-wine-linux.sh
new file mode 100755
index 00000000..17fbbbc7
--- /dev/null
+++ b/admin/Sources/Clients/ogagent/windows/py2exe-wine-linux.sh
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+# We need:
+# * Wine (32 bit)
+# * winetricks (in some distributions)
+
+export WINEARCH=win32 WINEPREFIX=$PWD/wine WINEDEBUG=fixme-all
+WINE=wine
+
+download() {
+ mkdir downloads
+ # Get needed software
+ cd downloads
+ wget -nd https://www.python.org/ftp/python/2.7.14/python-2.7.14.msi -O python-2.7.msi
+ wget -nd http://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi
+ wget -nd https://bootstrap.pypa.io/get-pip.py
+ wget -nd http://sourceforge.net/projects/pywin32/files/pywin32/Build%20221/pywin32-221.win32-py2.7.exe/download -O pywin32-install.exe
+ wget -nd http://sourceforge.net/projects/py2exe/files/py2exe/0.6.9/py2exe-0.6.9.win32-py2.7.exe/download -O py2exe-install.exe
+ wget -nd http://prdownloads.sourceforge.net/nsis/nsis-3.0rc1-setup.exe?download -O nsis-install.exe
+ wget -nd http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.4/PyQt4-4.11.4-gpl-Py2.7-Qt4.8.7-x32.exe/download -O pyqt-install.exe
+ wget -nd http://nsis.sourceforge.net/mediawiki/images/d/d7/NSIS_Simple_Firewall_Plugin_1.20.zip
+ cd ..
+}
+
+install_python() {
+ if which winetricks &>/dev/null; then
+ echo "Setting up wine prefix (using winetricks)"
+ winetricks
+ fi
+
+ cd downloads
+ echo "Installing python"
+ $WINE msiexec /qn /i python-2.7.msi
+ echo "Installing vc for python"
+ $WINE msiexec /qn /i VCForPython27.msi
+
+ echo "Installing pywin32 (needs X)"
+ $WINE pywin32-install.exe
+ echo "Installing py2exe (needs X)"
+ $WINE py2exe-install.exe
+ echo "Installing pyqt"
+ $WINE pyqt-install.exe
+ echo "Installing nsis (needs X?)"
+ $WINE nsis-install.exe
+
+ cd ..
+}
+
+setup_pip() {
+ echo "Seting up pip..."
+ $WINE C:\\Python27\\python -m pip install --upgrade pip
+}
+
+install_packages() {
+ echo "Installing required packages"
+ $WINE C:\\Python27\\python -m pip install requests
+ $WINE C:\\Python27\\python -m pip install six
+ # Using easy_install instead of pip to install pycrypto
+ $WINE C:\\Python27\\Scripts\\easy_install http://www.voidspace.org.uk/python/pycrypto-2.6.1/pycrypto-2.6.1.win32-py2.7.exe
+ # Copy nsis required NSIS_Simple_Firewall_Plugin_1
+ echo "Copying simple firewall plugin for nsis installer"
+ unzip -o downloads/NSIS_Simple_Firewall_Plugin_1.20.zip SimpleFC.dll -d $WINEPREFIX/drive_c/Program\ Files/NSIS/Plugins/x86-ansi/
+ unzip -o downloads/NSIS_Simple_Firewall_Plugin_1.20.zip SimpleFC.dll -d $WINEPREFIX/drive_c/Program\ Files/NSIS/Plugins/x86-unicode/
+}
+
+download
+install_python
+setup_pip
+install_packages
+
+
diff --git a/admin/Sources/Includes/Database.cpp b/admin/Sources/Includes/Database.cpp
index 0d1ddcc5..84add9ce 100644
--- a/admin/Sources/Includes/Database.cpp
+++ b/admin/Sources/Includes/Database.cpp
@@ -106,6 +106,11 @@ bool Database::Execute(char* CmdStr, Table& Tbl)
return (true);
}
// __________________________________________________________________________
+void Database::liberaResult (Table& Tbl) {
+ //Free resources after mysql_store_result
+ mysql_free_result(Tbl.m_Rec);
+}
+// __________________________________________________________________________
Table::Table()
{
m_Rec=NULL;
diff --git a/admin/Sources/Includes/Database.h b/admin/Sources/Includes/Database.h
index 0af1561b..ae318bdb 100644
--- a/admin/Sources/Includes/Database.h
+++ b/admin/Sources/Includes/Database.h
@@ -25,6 +25,7 @@ public:
bool Close(void);
bool Execute(char* CmdStr);
bool Execute(char* CmdStr, Table& Tbl);
+ void liberaResult(Table& Tbl);
void GetErrorErrStr(char* ErrStr);
};
// __________________________________________________________________________
diff --git a/admin/Sources/Services/ogAdmAgent/sources/ogAdmAgent.h b/admin/Sources/Services/ogAdmAgent/sources/ogAdmAgent.h
index a2f7deef..b1c429bb 100644
--- a/admin/Sources/Services/ogAdmAgent/sources/ogAdmAgent.h
+++ b/admin/Sources/Services/ogAdmAgent/sources/ogAdmAgent.h
@@ -27,7 +27,7 @@
// Valores hexadecimales para consultas
// ________________________________________________________________________________________________________
-BYTE HEX_annos[]={0,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};
+WORD HEX_annos[]={0,0x0001,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,0x0200,0x0400,0x0800,0x1000,0x2000,0x4000,0x8000};
WORD HEX_meses[]={0,0x0001,0x0002,0x0004,0x0008,0x0010,0x0020,0x0040,0x0080,0x0100,0x0200,0x0400,0x0800};
int HEX_dias[]={0,0x00000001,0x00000002,0x00000004,0x00000008,0x00000010,0x00000020,0x00000040,0x00000080,0x00000100,0x00000200,
0x00000400,0x00000800,0x00001000,0x00002000,0x00004000,0x00008000,0x00010000,0x00020000,0x00040000,0x00080000,
diff --git a/admin/Sources/Services/ogAdmRepo/ogAdmRepo.cfg b/admin/Sources/Services/ogAdmRepo/ogAdmRepo.cfg
index b916411d..1a8f289d 100644
--- a/admin/Sources/Services/ogAdmRepo/ogAdmRepo.cfg
+++ b/admin/Sources/Services/ogAdmRepo/ogAdmRepo.cfg
@@ -1,2 +1,3 @@
IPlocal=SERVERIP
Puerto=2002
+ApiToken=REPOKEY
diff --git a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp
index 19503065..6b6b7d72 100644
--- a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp
+++ b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp
@@ -147,11 +147,14 @@ BOOLEAN gestionaTrama(SOCKET *socket_c)
if (res == 0) { // Encontrada la función que procesa el mensaje
liberaMemoria(nfn);
res=tbfuncionesServer[i].fptr(socket_c, ptrTrama); // Invoca la función
- liberaMemoria((char*)ptrTrama);
+ liberaMemoria(ptrTrama->parametros);
+ liberaMemoria(ptrTrama);
return(res);
}
}
-
+ liberaMemoria(nfn);
+ liberaMemoria(ptrTrama->parametros);
+ liberaMemoria(ptrTrama);
/*
Sólo puede ser un comando personalizado o su notificación
if (ptrTrama->tipo == MSG_COMANDO)
@@ -215,6 +218,7 @@ BOOLEAN respuestaSondeo(SOCKET *socket_c, TRAMA* ptrTrama) {
lSize = strlen(iph); // Calcula longitud de la cadena de direccion/es IPE/S
Ipes = (char*) reservaMemoria(lSize + 1);
if (Ipes == NULL) {
+ liberaMemoria(iph);
errorLog(modulo, 3, FALSE);
return (FALSE);
}
@@ -348,6 +352,7 @@ BOOLEAN EcoConsola(SOCKET *socket_c, TRAMA* ptrTrama)
// Lee archivo de eco de consola
iph = copiaParametro("iph",ptrTrama); // Toma dirección ip del cliente
sprintf(fileco,"/tmp/_Seconsola_%s",iph); // Nombre del archivo en el Servidor
+ liberaMemoria(iph);
lSize=lonArchivo(fileco);
if(lSize>0){ // Si el fichero tiene contenido...
initParametros(ptrTrama,lSize+LONGITUD_PARAMETROS);
@@ -504,6 +509,7 @@ BOOLEAN procesoInclusionClienteWinLnx(SOCKET *socket_c, TRAMA *ptrTrama,int *ido
iph = copiaParametro("iph",ptrTrama); // Toma ip
if (!db.Open(usuario, pasguor, datasource, catalog)) { // Error de conexión con la BD
+ liberaMemoria(iph);
errorLog(modulo, 20, FALSE);
db.GetErrorErrStr(msglog);
errorInfo(modulo, msglog);
@@ -516,14 +522,19 @@ BOOLEAN procesoInclusionClienteWinLnx(SOCKET *socket_c, TRAMA *ptrTrama,int *ido
" WHERE ordenadores.ip = '%s'", iph);
if (!db.Execute(sqlstr, tbl)) { // Error al recuperar los datos
+ liberaMemoria(iph);
errorLog(modulo, 21, FALSE);
db.GetErrorErrStr(msglog);
errorInfo(modulo, msglog);
+ db.Close();
return (21);
}
if (tbl.ISEOF()) { // Si no existe el cliente
+ liberaMemoria(iph);
errorLog(modulo, 22, FALSE);
+ db.liberaResult(tbl);
+ db.Close();
return (22);
}
@@ -532,15 +543,22 @@ BOOLEAN procesoInclusionClienteWinLnx(SOCKET *socket_c, TRAMA *ptrTrama,int *ido
infoDebug(msglog);
}
if (!tbl.Get("idordenador", *idordenador)) {
+ liberaMemoria(iph);
+ db.liberaResult(tbl);
tbl.GetErrorErrStr(msglog);
errorInfo(modulo, msglog);
+ db.Close();
return (FALSE);
}
if (!tbl.Get("nombreordenador", nombreordenador)) {
+ liberaMemoria(iph);
+ db.liberaResult(tbl);
tbl.GetErrorErrStr(msglog);
errorInfo(modulo, msglog);
+ db.Close();
return (FALSE);
}
+ db.liberaResult(tbl);
db.Close();
if (!registraCliente(iph)) { // Incluyendo al cliente en la tabla de sokets
@@ -604,6 +622,8 @@ BOOLEAN procesoInclusionCliente(SOCKET *socket_c, TRAMA *ptrTrama) {
cfg = copiaParametro("cfg",ptrTrama); // Toma configuracion
if (!db.Open(usuario, pasguor, datasource, catalog)) { // Error de conexión con la BD
+ liberaMemoria(iph);
+ liberaMemoria(cfg);
errorLog(modulo, 20, FALSE);
db.GetErrorErrStr(msglog);
errorInfo(modulo, msglog);
@@ -732,14 +752,35 @@ BOOLEAN actualizaConfiguracion(Database db, Table tbl, char* cfg, int ido)
char msglog[LONSTD], sqlstr[LONSQL];
int lon, p, c,i, dato, swu, idsoi, idsfi,k;
char *ptrPar[MAXPAR], *ptrCfg[6], *ptrDual[2], tbPar[LONSTD];
- char *disk, *par, *cpt, *sfi, *soi, *tam; // Parametros que definen una partición
+ char *ser, *disk, *par, *cpt, *sfi, *soi, *tam, *uso; // Parametros de configuración.
char modulo[] = "actualizaConfiguracion()";
lon = 0;
p = splitCadena(ptrPar, cfg, '\n');
for (i = 0; i < p; i++) {
c = splitCadena(ptrCfg, ptrPar[i], '\t');
- disk = par = cpt = sfi = soi = tam = NULL;
+
+ // Si la 1ª línea solo incluye el número de serie del equipo; actualizar BD.
+ if (i == 0 && c == 1) {
+ splitCadena(ptrDual, ptrCfg[0], '=');
+ ser = ptrDual[1];
+ if (strlen(ser) > 0) {
+ // Solo actualizar si número de serie no existía.
+ sprintf(sqlstr, "UPDATE ordenadores SET numserie='%s'"
+ " WHERE idordenador=%d AND numserie IS NULL",
+ ser, ido);
+ if (!db.Execute(sqlstr, tbl)) { // Error al insertar
+ db.GetErrorErrStr(msglog);
+ errorInfo(modulo, msglog);
+ return (FALSE);
+ }
+ }
+ continue;
+ }
+
+ // Distribución de particionado.
+ disk = par = cpt = sfi = soi = tam = uso = NULL;
+
splitCadena(ptrDual, ptrCfg[0], '=');
disk = ptrDual[1]; // Número de disco
@@ -750,7 +791,7 @@ BOOLEAN actualizaConfiguracion(Database db, Table tbl, char* cfg, int ido)
if(k==2){
cpt = ptrDual[1]; // Código de partición
}else{
- cpt = "0";
+ cpt = (char*)"0";
}
k=splitCadena(ptrDual, ptrCfg[3], '=');
@@ -774,10 +815,14 @@ BOOLEAN actualizaConfiguracion(Database db, Table tbl, char* cfg, int ido)
splitCadena(ptrDual, ptrCfg[5], '=');
tam = ptrDual[1]; // Tamaño de la partición
+ splitCadena(ptrDual, ptrCfg[6], '=');
+ uso = ptrDual[1]; // Porcentaje de uso del S.F.
+
lon += sprintf(tbPar + lon, "(%s, %s),", disk, par);
- sprintf(sqlstr, "SELECT numdisk,numpar,codpar,tamano,idsistemafichero,idnombreso"
- " FROM ordenadores_particiones WHERE idordenador=%d AND numdisk=%s AND numpar=%s",
+ sprintf(sqlstr, "SELECT numdisk, numpar, codpar, tamano, uso, idsistemafichero, idnombreso"
+ " FROM ordenadores_particiones"
+ " WHERE idordenador=%d AND numdisk=%s AND numpar=%s",
ido, disk, par);
@@ -788,9 +833,9 @@ BOOLEAN actualizaConfiguracion(Database db, Table tbl, char* cfg, int ido)
return (FALSE);
}
if (tbl.ISEOF()) { // Si no existe el registro
- sprintf(sqlstr, "INSERT INTO ordenadores_particiones(idordenador,numdisk,numpar,codpar,tamano,idsistemafichero,idnombreso,idimagen)"
- " VALUES(%d,%s,%s,0x%s,%s,%d,%d,0)",
- ido, disk, par, cpt, tam, idsfi, idsoi);
+ sprintf(sqlstr, "INSERT INTO ordenadores_particiones(idordenador,numdisk,numpar,codpar,tamano,uso,idsistemafichero,idnombreso,idimagen)"
+ " VALUES(%d,%s,%s,0x%s,%s,%s,%d,%d,0)",
+ ido, disk, par, cpt, tam, uso, idsfi, idsoi);
if (!db.Execute(sqlstr, tbl)) { // Error al insertar
@@ -833,19 +878,25 @@ BOOLEAN actualizaConfiguracion(Database db, Table tbl, char* cfg, int ido)
sprintf(sqlstr, "UPDATE ordenadores_particiones SET "
" codpar=0x%s,"
" tamano=%s,"
+ " uso=%s,"
" idsistemafichero=%d,"
" idnombreso=%d,"
" idimagen=0,"
" idperfilsoft=0,"
" fechadespliegue=NULL"
" WHERE idordenador=%d AND numdisk=%s AND numpar=%s",
- cpt, tam, idsfi, idsoi, ido, disk, par);
- if (!db.Execute(sqlstr, tbl)) { // Error al recuperar los datos
- errorLog(modulo, 21, FALSE);
- db.GetErrorErrStr(msglog);
- errorInfo(modulo, msglog);
- return (FALSE);
- }
+ cpt, tam, uso, idsfi, idsoi, ido, disk, par);
+ } else { // Actualizar porcentaje de uso.
+ sprintf(sqlstr, "UPDATE ordenadores_particiones SET "
+ " uso=%s"
+ " WHERE idordenador=%d AND numdisk=%s AND numpar=%s",
+ uso, ido, disk, par);
+ }
+ if (!db.Execute(sqlstr, tbl)) { // Error al recuperar los datos
+ errorLog(modulo, 21, FALSE);
+ db.GetErrorErrStr(msglog);
+ errorInfo(modulo, msglog);
+ return (FALSE);
}
}
}
@@ -2033,9 +2084,11 @@ BOOLEAN actualizaCreacionImagen(Database db, Table tbl, char* idi, char* dsk,
/* Actualizar los datos de la imagen */
snprintf(sqlstr, LONSQL,
- "UPDATE imagenes"
- " SET idordenador=%s, numdisk=%s, numpar=%s, codpar=%s, idperfilsoft=%d, idrepositorio=%d, fechacreacion=NOW()"
- " WHERE idimagen=%s", ido, dsk, par, cpt, ifs, idr, idi);
+ "UPDATE imagenes"
+ " SET idordenador=%s, numdisk=%s, numpar=%s, codpar=%s,"
+ " idperfilsoft=%d, idrepositorio=%d,"
+ " fechacreacion=NOW(), revision=revision+1"
+ " WHERE idimagen=%s", ido, dsk, par, cpt, ifs, idr, idi);
if (!db.Execute(sqlstr, tbl)) { // Error al recuperar los datos
errorLog(modulo, 21, FALSE);
@@ -2043,6 +2096,19 @@ BOOLEAN actualizaCreacionImagen(Database db, Table tbl, char* idi, char* dsk,
errorInfo(modulo, msglog);
return (FALSE);
}
+ /* Actualizar los datos en el cliente */
+ snprintf(sqlstr, LONSQL,
+ "UPDATE ordenadores_particiones"
+ " SET idimagen=%s, revision=(SELECT revision FROM imagenes WHERE idimagen=%s),"
+ " fechadespliegue=NOW()"
+ " WHERE idordenador=%s AND numdisk=%s AND numpar=%s",
+ idi, idi, ido, dsk, par);
+ if (!db.Execute(sqlstr, tbl)) { // Error al recuperar los datos
+ errorLog(modulo, 21, FALSE);
+ db.GetErrorErrStr(msglog);
+ errorInfo(modulo, msglog);
+ return (FALSE);
+ }
return (TRUE);
}
// ________________________________________________________________________________________________________
@@ -2321,7 +2387,7 @@ BOOLEAN RESPUESTA_RestaurarImagen(SOCKET *socket_c, TRAMA* ptrTrama)
Database db;
Table tbl;
BOOLEAN res;
- char *iph, *ido, *idi, *dsk, *par, *ifs;
+ char *iph, *ido, *idi, *dsk, *par, *ifs, *cfg;
char modulo[] = "RESPUESTA_RestaurarImagen()";
if (!db.Open(usuario, pasguor, datasource, catalog)) { // Error de conexion
@@ -2346,11 +2412,15 @@ BOOLEAN RESPUESTA_RestaurarImagen(SOCKET *socket_c, TRAMA* ptrTrama)
dsk = copiaParametro("dsk",ptrTrama); // Número de disco
par = copiaParametro("par",ptrTrama); // Número de partición
ifs = copiaParametro("ifs",ptrTrama); // Identificador del perfil software contenido
-
+ cfg = copiaParametro("cfg",ptrTrama); // Configuración de discos
+ if(cfg){
+ actualizaConfiguracion(db, tbl, cfg, atoi(ido)); // Actualiza la configuración del ordenador
+ liberaMemoria(cfg);
+ }
res=actualizaRestauracionImagen(db, tbl, idi, dsk, par, ido, ifs);
liberaMemoria(iph);
- liberaMemoria(ido);
+ liberaMemoria(ido);
liberaMemoria(idi);
liberaMemoria(par);
liberaMemoria(ifs);
@@ -2421,8 +2491,10 @@ BOOLEAN actualizaRestauracionImagen(Database db, Table tbl, char* idi,
/* Actualizar los datos de la imagen */
snprintf(sqlstr, LONSQL,
"UPDATE ordenadores_particiones"
- " SET idimagen=%s, idperfilsoft=%s, fechadespliegue=NOW()"
- " WHERE idordenador=%s AND numdisk=%s AND numpar=%s", idi, ifs, ido, dsk, par);
+ " SET idimagen=%s, idperfilsoft=%s, fechadespliegue=NOW(),"
+ " revision=(SELECT revision FROM imagenes WHERE idimagen=%s),"
+ " idnombreso=(SELECT idnombreso FROM perfilessoft WHERE idperfilsoft=%s)"
+ " WHERE idordenador=%s AND numdisk=%s AND numpar=%s", idi, ifs, idi, ifs, ido, dsk, par);
if (!db.Execute(sqlstr, tbl)) { // Error al recuperar los datos
errorLog(modulo, 21, FALSE);
@@ -2554,7 +2626,6 @@ BOOLEAN RESPUESTA_EjecutarScript(SOCKET *socket_c, TRAMA* ptrTrama)
Database db;
Table tbl;
char *iph, *ido,*cfg;
- int res;
char modulo[] = "RESPUESTA_EjecutarScript()";
@@ -2576,9 +2647,8 @@ BOOLEAN RESPUESTA_EjecutarScript(SOCKET *socket_c, TRAMA* ptrTrama)
}
cfg = copiaParametro("cfg",ptrTrama); // Toma configuración de particiones
-
if(cfg){
- res=actualizaConfiguracion(db, tbl, cfg, atoi(ido)); // Actualiza la configuración del ordenador
+ actualizaConfiguracion(db, tbl, cfg, atoi(ido)); // Actualiza la configuración del ordenador
liberaMemoria(cfg);
}
@@ -3070,10 +3140,12 @@ BOOLEAN RESPUESTA_InventarioSoftware(SOCKET *socket_c, TRAMA* ptrTrama) {
// Devuelve:
// TRUE: Si el proceso es correcto
// FALSE: En caso de ocurrir algún error
+//
+// Versión 1.1.0: Se incluye el sistema operativo. Autora: Irina Gómez - ETSII Universidad Sevilla
// ________________________________________________________________________________________________________
BOOLEAN actualizaSoftware(Database db, Table tbl, char* sft, char* par,char* ido, char* npc, char* idc)
{
- int i, j, lon, aux, idperfilsoft;
+ int i, j, lon, aux, idperfilsoft, idnombreso;
bool retval;
char *wsft;
int tbidsoftware[MAXSOFTWARE];
@@ -3121,6 +3193,12 @@ BOOLEAN actualizaSoftware(Database db, Table tbl, char* sft, char* par,char* ido
lon = MAXSOFTWARE; // Limita el número de componentes software
for (i = 0; i < lon; i++) {
+ // Primera línea es el sistema operativo: se obtiene identificador
+ if (i == 0) {
+ idnombreso = checkDato(db, tbl, rTrim(tbSoftware[i]), "nombresos", "nombreso", "idnombreso");
+ continue;
+ }
+
sprintf(sqlstr,
"SELECT idsoftware FROM softwares WHERE descripcion ='%s'",
rTrim(tbSoftware[i]));
@@ -3189,7 +3267,7 @@ BOOLEAN actualizaSoftware(Database db, Table tbl, char* sft, char* par,char* ido
aux += sprintf(idsoftwares + aux, ",%d", tbidsoftware[i]);
// Comprueba existencia de perfil software y actualización de éste para el ordenador
- if (!cuestionPerfilSoftware(db, tbl, idc, ido, idperfilsoft, idsoftwares,
+ if (!cuestionPerfilSoftware(db, tbl, idc, ido, idperfilsoft, idnombreso, idsoftwares,
npc, par, tbidsoftware, lon)) {
errorLog(modulo, 83, FALSE);
errorInfo(modulo, msglog);
@@ -3210,6 +3288,7 @@ BOOLEAN actualizaSoftware(Database db, Table tbl, char* sft, char* par,char* ido
// - tbl: Objeto tabla
// - idcentro: Identificador del centro en la tabla
// - ido: Identificador del ordenador del cliente en la tabla
+// - idnombreso: Identificador del sistema operativo
// - idsoftwares: Cadena con los identificadores de componentes software separados por comas
// - npc: Nombre del ordenador del cliente
// - particion: Número de la partición
@@ -3218,9 +3297,11 @@ BOOLEAN actualizaSoftware(Database db, Table tbl, char* sft, char* par,char* ido
// Devuelve:
// TRUE: Si el proceso es correcto
// FALSE: En caso de ocurrir algún error
-//________________________________________________________________________________________________________/
+//
+// Versión 1.1.0: Se incluye el sistema operativo. Autora: Irina Gómez - ETSII Universidad Sevilla
+//_________________________________________________________________________________________________________
BOOLEAN cuestionPerfilSoftware(Database db, Table tbl, char* idc, char* ido,
- int idperfilsoftware, char *idsoftwares, char *npc, char *par,
+ int idperfilsoftware, int idnombreso, char *idsoftwares, char *npc, char *par,
int *tbidsoftware, int lon) {
char *sqlstr, msglog[LONSTD];
int i, nwidperfilsoft;
@@ -3248,8 +3329,8 @@ BOOLEAN cuestionPerfilSoftware(Database db, Table tbl, char* idc, char* ido,
return (false);
}
if (tbl.ISEOF()) { // No existe un perfil software con esos componentes de componentes software, lo crea
- sprintf(sqlstr, "INSERT perfilessoft (descripcion,idcentro,grupoid)"
- " VALUES('Perfil Software (%s, Part:%s) ',%s,0)", npc, par, idc);
+ sprintf(sqlstr, "INSERT perfilessoft (descripcion, idcentro, grupoid, idnombreso)"
+ " VALUES('Perfil Software (%s, Part:%s) ',%s,0,%i)", npc, par, idc,idnombreso);
if (!db.Execute(sqlstr, tbl)) { // Error al insertar
db.GetErrorErrStr(msglog);
errorInfo(modulo, msglog);
@@ -3409,7 +3490,7 @@ BOOLEAN recibeArchivo(SOCKET *socket_c, TRAMA *ptrTrama) {
BOOLEAN envioProgramacion(SOCKET *socket_c, TRAMA *ptrTrama)
{
char sqlstr[LONSQL], msglog[LONSTD];
- char *idp,*mar,iph[LONIP],mac[LONMAC];
+ char *idp,iph[LONIP],mac[LONMAC];
Database db;
Table tbl;
int idx,idcomando;
@@ -3464,24 +3545,19 @@ BOOLEAN envioProgramacion(SOCKET *socket_c, TRAMA *ptrTrama)
return (FALSE);
}
- //mar = copiaParametro("mar",ptrTrama); // Toma modo de arranque si el comando es Arrancar
-
// Se manda por broadcast y por unicast
- if (!Levanta(iph,mac,"1")) {
+ if (!Levanta(iph, mac, (char*)"1")) {
sprintf(msglog, "%s:%s", tbErrores[32], modulo);
errorInfo(modulo, msglog);
- liberaMemoria(mar);
return (FALSE);
}
- if (!Levanta(iph,mac,"2")) {
+ if (!Levanta(iph, mac, (char*)"2")) {
sprintf(msglog, "%s:%s", tbErrores[32], modulo);
errorInfo(modulo, msglog);
- liberaMemoria(mar);
return (FALSE);
}
- liberaMemoria(mar);
}
if (clienteDisponible(iph, &idx)) { // Si el cliente puede recibir comandos
strcpy(tbsockets[idx].estado, CLIENTE_OCUPADO); // Actualiza el estado del cliente
@@ -3505,6 +3581,7 @@ int main(int argc, char *argv[]) {
socklen_t iAddrSize;
struct sockaddr_in local, cliente;
char modulo[] = "main()";
+ int activo=1;
/*--------------------------------------------------------------------------------------------------------
Validación de parámetros de ejecución y lectura del fichero de configuración del servicio
@@ -3642,6 +3719,7 @@ int main(int argc, char *argv[]) {
Creación y configuración del socket del servicio
---------------------------------------------------------------------------------------------------------*/
socket_s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); // Crea socket del servicio
+ setsockopt(socket_s, SOL_SOCKET, SO_REUSEPORT, &activo, sizeof(int));
if (socket_s == SOCKET_ERROR) { // Error al crear el socket del servicio
errorLog(modulo, 13, TRUE);
exit(EXIT_FAILURE);
diff --git a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.h b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.h
index cf2930a8..48f0be3a 100644
--- a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.h
+++ b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.h
@@ -117,7 +117,7 @@ BOOLEAN RESPUESTA_InventarioHardware(SOCKET *,TRAMA *);
BOOLEAN actualizaHardware(Database, Table,char* ,char*,char*,char*);
BOOLEAN cuestionPerfilHardware(Database,Table,char*,char*,int,char*,char*,int *,int);
BOOLEAN actualizaSoftware(Database , Table , char* , char* , char*,char*,char*);
-BOOLEAN cuestionPerfilSoftware(Database, Table, char*, char*,int,char*,char*,char*,int *,int);
+BOOLEAN cuestionPerfilSoftware(Database, Table, char*, char*,int,int,char*,char*,char*,int *,int);
BOOLEAN enviaArchivo(SOCKET *, TRAMA *);
BOOLEAN recibeArchivo(SOCKET *, TRAMA *);
diff --git a/admin/Sources/Services/ogAdmServerAux b/admin/Sources/Services/ogAdmServerAux
index fdc98bf2..65bea5cb 100755
--- a/admin/Sources/Services/ogAdmServerAux
+++ b/admin/Sources/Services/ogAdmServerAux
@@ -28,10 +28,15 @@ case "$PARM1" in
#1 SET_CLIENTMODE
#2 template
#3 pc_name o group_pc
+#4 modo temporal o permanente
+
TEMPLATE="$PARM2"
PC="$PARM3"
+#incluyo parametro de MODO
+ MODO="$PARM4"
echolog "Ejecutar $(which setclientmode) $FILE $MCASTOPT"
- setclientmode $TEMPLATE $PC &>> $SERVERLOG
+#incluyo parametro de MODO
+ setclientmode $TEMPLATE $PC $MODO &>> $SERVERLOG
exit $?
;;
default)
diff --git a/admin/Sources/Services/opengnsys.default b/admin/Sources/Services/opengnsys.default
index f998ccfb..644f516a 100644
--- a/admin/Sources/Services/opengnsys.default
+++ b/admin/Sources/Services/opengnsys.default
@@ -1,5 +1,5 @@
-# RUN_OGADMSERVER run OpenGnSys Admin service.
-# RUN_OGADMREPO run OpenGnSys Repository Manager service.
+# RUN_OGADMSERVER run OpenGnsys Admin service.
+# RUN_OGADMREPO run OpenGnsys Repository Manager service.
# RUN_BTTRACKER run Bittorrent Tracker
# RUN_BTSEEDER starts seeding of selected torrent files
# RUN_CRON run Cron script to check started processes
diff --git a/admin/Sources/Services/opengnsys.init b/admin/Sources/Services/opengnsys.init
index 2912811e..548843fa 100755
--- a/admin/Sources/Services/opengnsys.init
+++ b/admin/Sources/Services/opengnsys.init
@@ -6,8 +6,8 @@
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 1
-# Short-Description: Servicios del sistema OpenGnSys
-# Description: Servicios del sistema OpenGnSys
+# Short-Description: Servicios del sistema OpenGnsys
+# Description: Servicios del sistema OpenGnsys
### END INIT INFO
#
@@ -19,7 +19,7 @@ IMAGEDIR=$BASEDIR/images
CLIENTLOGDIR=$BASEDIR/log/clients
#
-# Servidor de OpenGnSys
+# Servidor de OpenGnsys
#
SERVERNAME=ogAdmServer
SERVERDAEMON=$BASEDIR/sbin/$SERVERNAME
@@ -126,7 +126,7 @@ config() {
}
arranca_demonios() {
- # Comprobar que está instalado OpenGnSys.
+ # Comprobar que está instalado OpenGnsys.
if [ ! -d $BASEDIR ]; then
$ACTIONMSG "ERROR: No existe el directorio $BASEDIR"
$FAILMSG
diff --git a/admin/WebConsole/asistentes/AsistenteCloneRemotePartition.php b/admin/WebConsole/asistentes/AsistenteCloneRemotePartition.php
index 5bef96ea..f0481d5b 100644
--- a/admin/WebConsole/asistentes/AsistenteCloneRemotePartition.php
+++ b/admin/WebConsole/asistentes/AsistenteCloneRemotePartition.php
@@ -40,8 +40,8 @@ if (!$cmd)
<SCRIPT language="javascript" src="./jscripts/EjecutarScripts.js"></SCRIPT>
<SCRIPT language="javascript" src="../comandos/jscripts/comunescomandos.js"></SCRIPT>
<SCRIPT language="javascript" src="./jscripts/asistentes.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/ejecutarscripts_'.$idioma.'.js"></SCRIPT>'?>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/ejecutarscripts_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
<?php
//indicamos al objeto xajax se encargue de generar el javascript de las funciones registradas por ejm: ListarParticionesXip
$xajax->printJavascript('../xajax/');
@@ -50,7 +50,7 @@ $xajax->printJavascript('../xajax/');
<body>
-<?
+<?php
switch($ambito){
case $AMBITO_CENTROS :
$urlimg='../images/iconos/centros.gif';
@@ -85,7 +85,7 @@ switch($ambito){
<table align=center class=tabla_datos border="0" cellpadding="0" cellspacing="1">
- <?
+ <?php
include_once("./includes/asistentes/AyudanteFormularios.php");
include_once("./includes/asistentes/formCloneRemotePartition.php");
?>
@@ -93,13 +93,13 @@ switch($ambito){
<tr>
- <th><INPUT TYPE="button" NAME="GenerarInstruccion" Value="<? echo $TbMsg["WDI12"] ?>" onClick="codeCloneRemotePartition(this.form)"> </th>
+ <th><INPUT TYPE="button" NAME="GenerarInstruccion" Value="<?php echo $TbMsg["WDI12"] ?>" onClick="codeCloneRemotePartition(this.form)"> </th>
<td colspan="5"><textarea class="cajatexto" name="codigo" id="codigo" cols="70" rows="7"></textarea></td>
</tr>
</table>
</form>
-<?
+<?php
//________________________________________________________________________________________________________
include_once("./includes/formularioacciones.php");
//________________________________________________________________________________________________________
diff --git a/admin/WebConsole/asistentes/AsistenteDeployImage.php b/admin/WebConsole/asistentes/AsistenteDeployImage.php
index 45ac35f3..84215eb7 100644
--- a/admin/WebConsole/asistentes/AsistenteDeployImage.php
+++ b/admin/WebConsole/asistentes/AsistenteDeployImage.php
@@ -4,9 +4,6 @@
// Autor:
// Baso en Codigo Comando.php de : Jose Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
// Xajax
-// version 1.1: El asistente guarda información de la imagen en la configuración del equipo (ticket #757)
-// autor: Irina Gomez, ETSII Universidad de Sevilla
-// fecha: 2016-10-27
// *************************************************************************************************************************************************
@@ -109,13 +106,13 @@ switch($ambito){
<tr>
<th >
- <INPUT TYPE="button" NAME="GenerarInstruccion" Value="<? echo $TbMsg["WDI12"] ?>" onClick="codeDeployImage(this.form)">
- <INPUT TYPE="button" NAME="ModificarCodigo" Value="<? echo $TbMsg["WDI10"] ?>" onClick="modificarCodigo()">
+ <INPUT TYPE="button" NAME="GenerarInstruccion" Value="<?php echo $TbMsg["WDI12"] ?>" onClick="codeDeployImage(this.form)">
+ <INPUT TYPE="button" NAME="ModificarCodigo" Value="<?php echo $TbMsg["WDI10"] ?>" onClick="modificarCodigo()">
</th>
<td colspan="5"><textarea class="cajatexto" name="codigo" id="codigo" cols="70" rows="7" disabled></textarea></td>
</tr>
- <tr>
- <th colspan="4"><? echo $TbMsg["WDI31"] ?></th>
+ <tr>
+ <th colspan="4"><?php echo $TbMsg["WDI31"] ?></th>
</tr>
</table>
</form>
diff --git a/admin/WebConsole/asistentes/AsistenteParticionado.php b/admin/WebConsole/asistentes/AsistenteParticionado.php
index 917b832e..f1ecc803 100644
--- a/admin/WebConsole/asistentes/AsistenteParticionado.php
+++ b/admin/WebConsole/asistentes/AsistenteParticionado.php
@@ -4,6 +4,9 @@
// Autor: Antonio J. Doblas Viso
// Baso en Codigo Comando.php de : Jose Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
// Xajax
+// version 1.1: Se incluye aviso para particiones GTP.
+// autor: Irina Gomez, ETSII Universidad de Sevilla
+// fecha: 2016-06-21
// *************************************************************************************************************************************************
@@ -52,6 +55,7 @@ if (!$cmd)
<SCRIPT language="javascript" src="./jscripts/asistentes.js"></SCRIPT>
<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/ejecutarscripts_'.$idioma.'.js"></SCRIPT>'?>
<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/asistentes_'.$idioma.'.js"></SCRIPT>'?>
<?php
@@ -61,6 +65,7 @@ $xajax->printJavascript('../xajax/');
<script>
function doOnload(){
calculateFreeDisk(document.fdatos);
+ getMaxCacheSize();
}
</script>
@@ -97,7 +102,7 @@ function doOnload(){
echo '<IMG src="'.$urlimg.'">&nbsp;&nbsp;<span align=center class=subcabeceras><U>'.$TbMsg[1].'
: '.$textambito.'</U></span>&nbsp;&nbsp;</span></p>';
- $sws=0x11111; // Mostrar todas las configuraciones diferentes.
+ $sws=bindec('0x11111'); // Mostrar todas las configuraciones diferentes.
$configuraciones = pintaConfiguraciones($cmd,$idambito,$ambito,7,$sws,false);
global $tbKeys; // Tabla contenedora de claves de configuración
global $conKeys; // Contador de claves de configuración
@@ -154,6 +159,9 @@ function doOnload(){
</tr>
<tr> <th colspan="3"><?php echo $TbMsg["WARN_DISKSIZE"]; ?></th> </tr>
<tr> <th colspan="3"><?php echo $TbMsg["WARN_REBOOTAFTER"]; ?></th> </tr>
+ <tr id="warngpt" style="display:none">
+ <th colspan="3" ><?php echo $TbMsg["WARN_GPT"]; ?></th>
+ </tr>
</table>
</form>
diff --git a/admin/WebConsole/asistentes/AsistenteUpdateCache.php b/admin/WebConsole/asistentes/AsistenteUpdateCache.php
index 86a867b1..4d6d0f61 100644
--- a/admin/WebConsole/asistentes/AsistenteUpdateCache.php
+++ b/admin/WebConsole/asistentes/AsistenteUpdateCache.php
@@ -50,8 +50,8 @@ if (!$cmd)
<SCRIPT language="javascript" src="./jscripts/EjecutarScripts.js"></SCRIPT>
<SCRIPT language="javascript" src="../comandos/jscripts/comunescomandos.js"></SCRIPT>
<SCRIPT language="javascript" src="./jscripts/asistentes.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/ejecutarscripts_'.$idioma.'.js"></SCRIPT>'?>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/ejecutarscripts_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
<?php
@@ -62,7 +62,7 @@ $xajax->printJavascript('../xajax/');
<body>
-<?
+<?php
# ambito: 4->aulas 16->ordenadores
# idambito: id de los elementos en su correspondiente tabla-ambito (aulas, ordenadores...)
# nombreambito: nombre del elemento.
@@ -108,7 +108,7 @@ switch($ambito){
<table class=tabla_datos border="0" cellpadding="0" cellspacing="1">
- <?
+ <?php
include_once("./includes/asistentes/formDeployImage.php");
?>
@@ -119,7 +119,7 @@ switch($ambito){
</table>
</form>
-<?
+<?php
//________________________________________________________________________________________________________
include_once("./includes/formularioacciones.php");
//________________________________________________________________________________________________________
diff --git a/admin/WebConsole/asistentes/gestores/gestor_Comandos.php b/admin/WebConsole/asistentes/gestores/gestor_Comandos.php
index 58e2f3b0..b309647c 100644
--- a/admin/WebConsole/asistentes/gestores/gestor_Comandos.php
+++ b/admin/WebConsole/asistentes/gestores/gestor_Comandos.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -23,6 +23,7 @@ include_once("../includes/capturaacciones.php");
// Recoge parametros de seguimiento
$sw_ejya="";
$sw_seguimiento="";
+$sw_ejprg="";
$sw_mkprocedimiento="";
$nombreprocedimiento="";
@@ -72,7 +73,7 @@ $atributos=str_replace('$',chr(9),$atributos);
<BODY>
<SCRIPT language="javascript" src="../../comandos/jscripts/comunescomandos.js"></SCRIPT>
<?php echo '<SCRIPT language="javascript" src="../../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
-<?
+<?php
/* Recopila identificadore ,ipes y macs para envío de comandos */
$cadenaid="";
diff --git a/admin/WebConsole/asistentes/includes/asistentes/AyudanteFormularios.php b/admin/WebConsole/asistentes/includes/asistentes/AyudanteFormularios.php
index be675c6e..486eed9f 100644
--- a/admin/WebConsole/asistentes/includes/asistentes/AyudanteFormularios.php
+++ b/admin/WebConsole/asistentes/includes/asistentes/AyudanteFormularios.php
@@ -1,454 +1,461 @@
-<?php
-// version 1.1: htmlOPTION_images: se modifica el valor de la imagen iprepo_nombreca_idimagen_idperfilsoft (ticket #757)
-// autor: Irina Gomez, ETSII Universidad de Sevilla
-// fecha: 2016-10-27
-
-/// funciones php
-
-#devuelve los elementos [texto] multicast para un formulario.
-#$ambito (aula=4 y ordenadores=16)
-function htmlForm_mcast($cmd,$ambito,$idambito)
-{
-global $TbMsg;
-
-//if (isset($_GET["idambito"])) $idambito=$_GET["idambito"];
-if ($ambito == 4)
-{
-$cmd->texto='SELECT aulas.pormul,aulas.ipmul,aulas.modomul,aulas.velmul,aulas.modp2p,aulas.timep2p FROM aulas where aulas.idaula=' . $idambito ;
-}
-
-if ($ambito == 8)
-{
-$cmd->texto='SELECT aulas.pormul,aulas.ipmul,aulas.modomul,aulas.velmul,aulas.modp2p,aulas.timep2p FROM aulas JOIN gruposordenadores ON aulas.idaula=gruposordenadores.idaula where gruposordenadores.idgrupo=' . $idambito ;
-}
-
-if ($ambito == 16)
-{
-$cmd->texto='SELECT aulas.pormul,aulas.ipmul,aulas.modomul,aulas.velmul,aulas.modp2p,aulas.timep2p FROM aulas JOIN ordenadores ON ordenadores.idaula=aulas.idaula where ordenadores.idordenador=' . $idambito ;
-}
-
- $rs=new Recordset;
- $rs->Comando=&$cmd;
-if ($rs->Abrir()){
- $rs->Primero();
- $SelectHtml = $TbMsg["WDI24"] . ':<input type="text" size="3" name="mcastpuerto" value="'.$rs->campos["pormul"] . '" /> <br />';
- $rs->Siguiente();
- $SelectHtml.= $TbMsg["WDI25"] . ':<input type="text" size="15" maxlength="15" name="mcastdireccion" value="'.$rs->campos["ipmul"] . '" /> <br />';
- $rs->Siguiente();
- switch ($rs->campos["modomul"])
- {
- case 1:
- $modomulticast="half-duplex";
- break;
- default:
- $modomulticast="full-duplex";
- break;
- }
- $SelectHtml.= $TbMsg["WDI26"] . ':<input type="text" size="8" name="mcastmodo" value="'.$modomulticast. '" /> <br />';
- $rs->Siguiente();
- $SelectHtml.= $TbMsg["WDI27"] . ':<input type="text" size="6" name="mcastvelocidad" value="'.$rs->campos["velmul"] . '" /> <br />';
-
- $rs->Cerrar();
- }
- $SelectHtml.= $TbMsg["WDI28"] . ':<input type="text" size="8" name="mcastnclien" value="50" /> <br />';
- $SelectHtml.= $TbMsg["WDI29"] . ' :<input type="text" size="8" name="mcastseg" value="60" /> <br />';
-
- return($SelectHtml);
-}
-
-
-#devuelve los elementos [texto] p2p para un formulario.
-#$ambito (aula=4 y ordenadores=16)
-function htmlForm_p2p($cmd,$ambito,$idambito)
-{
-global $TbMsg;
-//if (isset($_GET["idambito"])) $idambito=$_GET["idambito"];
-if ($ambito == 4)
-{
-$cmd->texto='SELECT aulas.modp2p,aulas.timep2p FROM aulas where aulas.idaula=' . $idambito ;
-}
-if ($ambito == 8)
-{
-$cmd->texto='SELECT aulas.modp2p,aulas.timep2p FROM aulas JOIN gruposordenadores ON aulas.idaula=gruposordenadores.idaula where gruposordenadores.idgrupo=' . $idambito ;
-}
-
-
-if ($ambito == 16)
-{
-$cmd->texto='SELECT aulas.modp2p,aulas.timep2p FROM aulas JOIN ordenadores ON ordenadores.idaula=aulas.idaula where ordenadores.idordenador=' . $idambito ;
-}
-
- $SelectHtml="";
- $rs=new Recordset;
- $rs->Comando=&$cmd;
- if ($rs->Abrir()){
- $rs->Primero();
- $SelectHtml.= $TbMsg["WDI26"] . ' :<input type="text" size="10" name="modp2p" value="'.$rs->campos["modp2p"] . '" /> <br />';
- $rs->Siguiente();
- $SelectHtml.= $TbMsg["WDI30"] . ' :<input type="text" size="10" maxlength="15" name="timep2p" value="'.$rs->campos["timep2p"] . '" /> <br />';
- $rs->Siguiente();
- $rs->Cerrar();
- }
-
-return($SelectHtml);
-}
-
-
-function htmlForm_unicast($cmd,$ambito,$idambito)
-{
-global $TbMsg;
-//if (isset($_GET["idambito"])) $idambito=$_GET["idambito"];
-if ($ambito == 4)
-{
-$cmd->texto='SELECT nombreordenador,idordenador,ip FROM ordenadores where idaula=' . $idambito ;
-}
-
-if ($ambito == 8)
-{
-$cmd->texto='SELECT nombreordenador,idordenador,ip FROM ordenadores where grupoid=' . $idambito ;
-}
-if ($ambito == 16)
-{
-$cmd->texto='SELECT nombreordenador,idordenador,ip FROM ordenadores where idaula=' . $idambito ;
-}
-
- $SelectHtml="";
- $rs=new Recordset;
- $rs->Comando=&$cmd;
-
- if ($rs->Abrir()){
- $rs->Primero();
- $ucastclient="";
- while (!$rs->EOF){
- $ucastclient.= $rs->campos["ip"] . ":" ;
- $rs->Siguiente();
- }
- $rs->Cerrar();
- }
- $SelectHtml.= $TbMsg["WDI24"] . ' :<input type="text" size="8" name="ucastport" value="8000" /> <br />';
- $SelectHtml.= $TbMsg["WDI28"] . ' :<input type="text" size="98" name="ucastclient" value="' . $ucastclient . '" /> <br />';
-
- return($SelectHtml);
-}
-
-
-
-function htmlOPTION_equipos($cmd,$ambito,$idambito)
-{
-
-//if (isset($_GET["idambito"])) $idambito=$_GET["idambito"];
-if ($ambito == 4)
-{
-$cmd->texto='SELECT nombreordenador,idordenador,ip FROM ordenadores where idaula=' . $idambito ;
-}
-
-if ($ambito == 8)
-{
-$cmd->texto='SELECT nombreordenador,idordenador,ip FROM ordenadores where grupoid=' . $idambito ;
-}
-if ($ambito == 16)
-{
-$cmd->texto='SELECT nombreordenador,idordenador,ip FROM ordenadores where idaula=' . $idambito ;
-}
-
- $SelectHtml="";
- $rs=new Recordset;
- $rs->Comando=&$cmd;
-
- if ($rs->Abrir()){
- $rs->Primero();
- while (!$rs->EOF){
- $SelectHtml.='<OPTION value="'.$rs->campos["ip"] . '" ';
- $SelectHtml.='>';
- $SelectHtml.= $rs->campos["nombreordenador"] .'</OPTION>';
- $rs->Siguiente();
- }
- $rs->Cerrar();
- }
- //$SelectHtml.= '</SELECT>';
- return($SelectHtml);
-}
-
-
-
-
-
-
-function htmlOPTION_images($cmd,$ambito,$idambito)
-{
-if ($ambito == 4)
-{
-$subconsultarepo='SELECT DISTINCT idrepositorio from ordenadores where idaula=' . $idambito ;
-}
-if ($ambito == 8)
-{
-$subconsultarepo='SELECT DISTINCT idrepositorio FROM ordenadores where grupoid=' . $idambito ;
-}
-if ($ambito == 16)
-{
-$subconsultarepo='SELECT idrepositorio FROM ordenadores where idordenador=' . $idambito ;
-}
-
-
- $SelectHtml="";
- // 1.0.5 imagenes.tipo =1 para que solo muestre las monoloticas.
- $cmd->texto="SELECT *,repositorios.ip as iprepositorio FROM imagenes
- INNER JOIN repositorios ON repositorios.idrepositorio=imagenes.idrepositorio AND repositorios.idrepositorio=(" . $subconsultarepo . ") WHERE imagenes.tipo=1";
- $rs=new Recordset;
- $rs->Comando=&$cmd;
-
- if ($rs->Abrir()){
- $rs->Primero();
- while (!$rs->EOF){
- $SelectHtml.='<OPTION value="'.$rs->campos["iprepositorio"] ."_".$rs->campos["nombreca"]."_".$rs->campos["idimagen"].'_'.$rs->campos["idperfilsoft"].'" ';
- //$SelectHtml.='<OPTION value="'.$rs->campos["nombreca"] . '" ';
- $SelectHtml.='>';
- $SelectHtml.= $rs->campos["descripcion"] .'</OPTION>';
- $rs->Siguiente();
- }
- $rs->Cerrar();
- }
- else
- {
- $SelectHtml.='<option value=""> ERROR: Ambito con multiples Repositorios --</option>';
-
- }
- return($SelectHtml);
-}
-
-
-
-function HTMLSELECT_imagenes($cmd,$idimagen,$numpar,$codpar,$icp,$sw)
-{
- $SelectHtml="";
- $cmd->texto="SELECT *,repositorios.ip as iprepositorio FROM imagenes
- INNER JOIN repositorios ON repositorios.idrepositorio=imagenes.idrepositorio";
- if($sw) // Imágenes con el mismo tipo de partición
- $cmd->texto.= " WHERE imagenes.codpar=".$codpar;
- else
- $cmd->texto.= " WHERE imagenes.codpar<>".$codpar;
-
- $cmd->texto.=" AND imagenes.numpar>0 AND imagenes.codpar>0 AND imagenes.idrepositorio>0"; // La imagene debe existir y estar creada
- $rs=new Recordset;
- $rs->Comando=&$cmd;
- if($sw) $des=1; else $des=0;
- $SelectHtml.= '<SELECT class="formulariodatos" id="despleimagen_'.$icp.'_'.$des.'" style="WIDTH:220">';
- $SelectHtml.= ' <OPTION value="0"></OPTION>';
-
- if ($rs->Abrir()){
- $rs->Primero();
- while (!$rs->EOF){
- $SelectHtml.='<OPTION value="'.$rs->campos["idimagen"]."_".$rs->campos["nombreca"]."_".$rs->campos["iprepositorio"]."_".$rs->campos["idperfilsoft"].'"';
- if($idimagen==$rs->campos["idimagen"]) $SelectHtml.=" selected ";
- $SelectHtml.='>';
- $SelectHtml.= $rs->campos["descripcion"].'</OPTION>';
- $rs->Siguiente();
- }
- $rs->Cerrar();
- }
- $SelectHtml.= '</SELECT>';
- return($SelectHtml);
-}
-
-
-
-function htmlOPTION_typepartnotcache($cmd)
-{
- $SelectHtml="";
- $cmd->texto='SELECT tipopar FROM tipospar WHERE NOT tipopar = "CACHE"';
- $rs=new Recordset;
- $rs->Comando=&$cmd;
- //$SelectHtml.= '<SELECT class="formulariodatos" name="nombre" id="identificador" style="WIDTH:220" ;" >';
- //$SelectHtml.= ' <OPTION value="0"></OPTION>';
-
- if ($rs->Abrir()){
- $rs->Primero();
- while (!$rs->EOF){
- $SelectHtml.='<OPTION value="'.$rs->campos["tipopar"] . '" ';
- $SelectHtml.='>';
- $SelectHtml.= $rs->campos["tipopar"] .'</OPTION>';
- $rs->Siguiente();
- }
- $rs->Cerrar();
- }
- //$SelectHtml.= '</SELECT>';
- return($SelectHtml);
-}
-
-
-function htmlForm_typepart($cmd,$numpar)
-{
- $SelectHtml="";
- $cmd->texto='SELECT DISTINCT tipopar FROM tipospar
- JOIN ordenadores_particiones ON ordenadores_particiones.codpar = tipospar.codpar
- WHERE numpar = ' .$numpar;
- $rs=new Recordset;
- $rs->Comando=&$cmd;
-
- if ($rs->Abrir()){
- $rs->Primero();
- while (!$rs->EOF){
- $valor=$rs->campos["tipopar"];
- $SelectHtml.='<option value="'.$valor.'"> '.$valor.' </option>';
- $rs->Siguiente();
- }
- $rs->Cerrar();
- }
- return($SelectHtml);
-}
-
-
-function htmlForm_typepartnotcacheEngine10($npart)
-{
-$SelectHtml="";
-if ($npart == 4) {
- $SelectHtml.='<OPTION value="CACHE"> CACHE </OPTION>';
-}
-$SelectHtml.='<OPTION value="NTFS"> NTFS </OPTION>';
-$SelectHtml.='<OPTION value="FAT32"> FAT32 </OPTION>';
-$SelectHtml.='<OPTION value="FAT16"> FAT16 </OPTION>';
-$SelectHtml.='<OPTION value="FAT12"> FAT12 </OPTION>';
-$SelectHtml.='<OPTION value="HNTFS"> Hidden NTFS </OPTION>';
-$SelectHtml.='<OPTION value="HFAT32"> Hidden FAT32 </OPTION>';
-$SelectHtml.='<OPTION value="HFAT16"> Hidden FAT16 </OPTION>';
-$SelectHtml.='<OPTION value="HFAT12"> Hidden FAT12 </OPTION>';
-$SelectHtml.='<OPTION value="LINUX"> LINUX </OPTION>';
-$SelectHtml.='<OPTION value="LINUX-SWAP"> LINUX-SWAP </OPTION>';
-$SelectHtml.='<OPTION value="LINUX-RAID"> LINUX-RAID </OPTION>';
-$SelectHtml.='<OPTION value="LINUX-LVM"> LINUX-LVM </OPTION>';
-$SelectHtml.='<OPTION value="HFS"> HFS </OPTION>';
-$SelectHtml.='<OPTION value="FREEBSD"> FREEBSD </OPTION>';
-$SelectHtml.='<OPTION value="OPENBSD"> OPENBSD </OPTION>';
-$SelectHtml.='<OPTION value="SOLARIS"> SOLARIS </OPTION>';
-$SelectHtml.='<OPTION value="SOLARIS-BOOT"> SOLARIS-BOOT </OPTION>';
-$SelectHtml.='<OPTION value="VMFS"> VMFS </OPTION>';
-$SelectHtml.='<OPTION value="DATA"> DATA </OPTION>';
-$SelectHtml.='<OPTION value="EFI"> EFI </OPTION>';
-$SelectHtml.='<OPTION value="GPT"> GPT </OPTION>';
-if ($npart <= 4) {
- $SelectHtml.='<OPTION value="EXTENDED"> EXTENDED </OPTION>';
-}
-return($SelectHtml);
-}
-
-function htmlForm_typepartnotcacheGPT($npart)
-{
-$SelectHtml="";
-if ($npart == 4) {
- $SelectHtml.='<OPTION value="CACHE"> CACHE </OPTION>';
-}
-$SelectHtml.='<OPTION value="WINDOWS"> Windows </OPTION>';
-$SelectHtml.='<OPTION value="WIN-RESERV"> Windows Reserved </OPTION>';
-$SelectHtml.='<OPTION value="LINUX"> Linux </OPTION>';
-$SelectHtml.='<OPTION value="LINUX-RESERV"> Linux Reserved </OPTION>';
-$SelectHtml.='<OPTION value="LINUX-SWAP"> Linux Swap </OPTION>';
-$SelectHtml.='<OPTION value="LINUX-RAID"> Linux RAID </OPTION>';
-$SelectHtml.='<OPTION value="LINUX-LVM"> Linux LVM </OPTION>';
-$SelectHtml.='<OPTION value="CHROMEOS"> ChromeOS </OPTION>';
-$SelectHtml.='<OPTION value="CHROMEOS-KRN"> ChromeOS Kernel </OPTION>';
-$SelectHtml.='<OPTION value="CHROMEOS-RESERV"> ChromeOS Reserved </OPTION>';
-$SelectHtml.='<OPTION value="HFS"> MacOS HFS </OPTION>';
-$SelectHtml.='<OPTION value="HFS-BOOT"> MacOS HFS Boot </OPTION>';
-$SelectHtml.='<OPTION value="HFS-RAID"> MacOS HFS RAID </OPTION>';
-$SelectHtml.='<OPTION value="FREEBSD"> FreeBSD </OPTION>';
-$SelectHtml.='<OPTION value="FREEBSD-DISK"> FreeBSD Disk </OPTION>';
-$SelectHtml.='<OPTION value="FREEBSD-BOOT"> FreeBSD Boot </OPTION>';
-$SelectHtml.='<OPTION value="FREEBSD-SWAP"> FreeBSD Swap </OPTION>';
-$SelectHtml.='<OPTION value="SOLARIS"> Solaris </OPTION>';
-$SelectHtml.='<OPTION value="SOLARIS-DISK"> Solaris Disk </OPTION>';
-$SelectHtml.='<OPTION value="SOLARIS-BOOT"> Solaris Boot </OPTION>';
-$SelectHtml.='<OPTION value="SOLARIS-SWAP"> Solaris Swap </OPTION>';
-$SelectHtml.='<OPTION value="EFI"> EFI </OPTION>';
-$SelectHtml.='<OPTION value="MBR"> MBR </OPTION>';
-$SelectHtml.='<OPTION value="BIOS-BOOT"> BIOS Boot </OPTION>';
-return($SelectHtml);
-}
-
-function htmlForm_sizepart($cmd,$numpar)
-{
- $SelectHtml="";
- $cmd->texto='SELECT DISTINCT tamano FROM ordenadores_particiones WHERE numpar = ' .$numpar . ' AND NOT tamano = 0';
- $rs=new Recordset;
- $rs->Comando=&$cmd;
-
- if ($rs->Abrir()){
- $rs->Primero();
- while (!$rs->EOF){
- $SelectHtml.='<OPTION value="'.$rs->campos["tamano"] . '" ';
- $SelectHtml.='>';
- $SelectHtml.= $rs->campos["tamano"] .'</OPTION>';
- $rs->Siguiente();
- }
- $rs->Cerrar();
- }
- return($SelectHtml);
-}
-
-
-function pintaParticionesAsistenteDeployImage($cmd,$configuraciones,$idordenadores,$cc)
-{
- global $tbKeys; // Tabla contenedora de claves de configuración
- global $conKeys; // Contador de claves de configuración
- global $TbMsg;
-
- $colums=7;
- echo '<TR height=16>';
- echo '<TH align=center>&nbsp;'.$TbMsg[20].'&nbsp;</TH>'; // Número de partición
- echo '<TH align=center>&nbsp;'.$TbMsg[24].'&nbsp;</TH>'; // Tipo de partición
- echo '<TH align=center>&nbsp;'.$TbMsg[27].'&nbsp;</TH>'; // Sistema de ficheros
- echo '<TH align=center>&nbsp;'.$TbMsg[21].'&nbsp;</TH>'; // Sistema Operativo Instalado
- echo '<TH align=center>&nbsp;'.$TbMsg[22].'&nbsp;</TH>'; // Tamaño
- echo '<TH align=center>&nbsp;'.$TbMsg[25].'&nbsp;</TH>'; // Imagen instalada
- echo '<TH align=center>&nbsp;'.$TbMsg[26].'&nbsp;</TH>'; // Perfil software
- echo '</TR>';
-
- $auxCfg=split("@",$configuraciones); // Crea lista de particiones
- for($i=0;$i<sizeof($auxCfg);$i++){
- $auxKey=split(";",$auxCfg[$i]); // Toma clave de configuracion
- for($k=0;$k<$conKeys;$k++){ // Busca los literales para las claves de esa partición
- if($tbKeys[$k]["cfg"]==$auxCfg[$i]){ // Claves encontradas
- if ($tbKeys[$k]["numpar"] == 0) { // Info del disco (umpart=0)
- $disksize = tomaTamano($tbKeys[$k]["numpar"],$idordenadores);
- }
- else { // Información de partición (numpart>0)
- echo'<TR height=16>'.chr(13);
- echo'<TD align=center>&nbsp;'.$tbKeys[$k]["numpar"].'&nbsp;</TD>'.chr(13);
- echo'<TD align=center>&nbsp;'.$tbKeys[$k]["tipopar"].'&nbsp;</TD>'.chr(13);
-
- //echo'<TD align=center>&nbsp;'.$tbKeys[$k]["sistemafichero"].'&nbsp;</TD>'.chr(13);
- echo'<TD align=center>&nbsp;'.tomaSistemasFicheros($tbKeys[$k]["numpar"],$idordenadores).'&nbsp;</TD>'.chr(13);
-
- //echo '<TD>&nbsp;'.$tbKeys[$k]["nombreso"].'&nbsp;</TD>'.chr(13);
- echo '<TD align=center>&nbsp;'.tomaNombresSO($tbKeys[$k]["numpar"],$idordenadores).'&nbsp;</TD>'.chr(13);
-
- //echo'<TD align=rigth>&nbsp;'.formatomiles($tbKeys[$k]["tamano"]).'&nbsp;</TD>'.chr(13);
- echo'<TD align=right>&nbsp;'.tomaTamano($tbKeys[$k]["numpar"],$idordenadores).'&nbsp;</TD>'.chr(13);
-
- //echo'<TD>&nbsp;'.$tbKeys[$k]["imagen"].'&nbsp;</TD>'.chr(13);
- echo'<TD align=center>&nbsp;'.tomaImagenes($tbKeys[$k]["numpar"],$idordenadores).'&nbsp;</TD>'.chr(13);
-
- //echo'<TD>&nbsp;'.$tbKeys[$k]["perfilsoft"].'&nbsp;</TD>'.chr(13);
- echo'<TD align=center>&nbsp;'.tomaPerfiles($tbKeys[$k]["numpar"],$idordenadores).'&nbsp;</TD>'.chr(13);
-
- echo'</TR>'.chr(13);
- break;
- }
- }
- }
- }
- // Mostrar información del disco, si se ha obtenido.
- if (!empty ($disksize)) {
- echo'<tr height="16">'.chr(13);
- echo'<td align="center">&nbsp;'.$TbMsg[35].'&nbsp;</td>'.chr(13);
- echo'<td></td>'.chr(13);
- echo'<td></td>'.chr(13);
- echo'<td></td>'.chr(13);
- echo'<td name="disksize" id="disksize" align="right">&nbsp;'.$disksize.'&nbsp;</td>'.chr(13);
- echo'<td></td>'.chr(13);
- echo'<td></td>'.chr(13);
- echo'</tr>'.chr(13);
- }
- echo '<TR height=5><TD colspan='.$colums.' style="BORDER-TOP: #999999 1px solid;BACKGROUND-COLOR: #FFFFFF;">&nbsp;</TD></TR>';
-}
-
-?>
+<?php
+// version 1.1: cliente con varios repositorios - htmlOPTION_images: Imagenes de todos los repositorios de la UO.
+// autor: Irina Gomez, Universidad de Sevilla
+// fecha 2015-06-17
+// version 1.1: htmlOPTION_images: se modifica el valor de la imagen iprepo_nombreca_idimagen_idperfilsoft (ticket #757)
+// autor: Irina Gomez, ETSII Universidad de Sevilla
+// fecha: 2016-10-27
+
+
+/// funciones php
+
+#devuelve los elementos [texto] multicast para un formulario.
+#$ambito (aula=4 y ordenadores=16)
+function htmlForm_mcast($cmd,$ambito,$idambito)
+{
+global $TbMsg;
+
+//if (isset($_GET["idambito"])) $idambito=$_GET["idambito"];
+if ($ambito == 4)
+{
+$cmd->texto='SELECT aulas.pormul,aulas.ipmul,aulas.modomul,aulas.velmul,aulas.modp2p,aulas.timep2p FROM aulas where aulas.idaula=' . $idambito ;
+}
+
+if ($ambito == 8)
+{
+$cmd->texto='SELECT aulas.pormul,aulas.ipmul,aulas.modomul,aulas.velmul,aulas.modp2p,aulas.timep2p FROM aulas JOIN gruposordenadores ON aulas.idaula=gruposordenadores.idaula where gruposordenadores.idgrupo=' . $idambito ;
+}
+
+if ($ambito == 16)
+{
+$cmd->texto='SELECT aulas.pormul,aulas.ipmul,aulas.modomul,aulas.velmul,aulas.modp2p,aulas.timep2p FROM aulas JOIN ordenadores ON ordenadores.idaula=aulas.idaula where ordenadores.idordenador=' . $idambito ;
+}
+
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+if ($rs->Abrir()){
+ $rs->Primero();
+ $SelectHtml = $TbMsg["WDI24"] . ':<input type="text" size="3" name="mcastpuerto" value="'.$rs->campos["pormul"] . '" /> <br />';
+ $rs->Siguiente();
+ $SelectHtml.= $TbMsg["WDI25"] . ':<input type="text" size="15" maxlength="15" name="mcastdireccion" value="'.$rs->campos["ipmul"] . '" /> <br />';
+ $rs->Siguiente();
+ switch ($rs->campos["modomul"])
+ {
+ case 1:
+ $modomulticast="half-duplex";
+ break;
+ default:
+ $modomulticast="full-duplex";
+ break;
+ }
+ $SelectHtml.= $TbMsg["WDI26"] . ':<input type="text" size="8" name="mcastmodo" value="'.$modomulticast. '" /> <br />';
+ $rs->Siguiente();
+ $SelectHtml.= $TbMsg["WDI27"] . ':<input type="text" size="6" name="mcastvelocidad" value="'.$rs->campos["velmul"] . '" /> <br />';
+
+ $rs->Cerrar();
+ }
+ $SelectHtml.= $TbMsg["WDI28"] . ':<input type="text" size="8" name="mcastnclien" value="50" /> <br />';
+ $SelectHtml.= $TbMsg["WDI29"] . ' :<input type="text" size="8" name="mcastseg" value="60" /> <br />';
+
+ return($SelectHtml);
+}
+
+
+#devuelve los elementos [texto] p2p para un formulario.
+#$ambito (aula=4 y ordenadores=16)
+function htmlForm_p2p($cmd,$ambito,$idambito)
+{
+global $TbMsg;
+//if (isset($_GET["idambito"])) $idambito=$_GET["idambito"];
+if ($ambito == 4)
+{
+$cmd->texto='SELECT aulas.modp2p,aulas.timep2p FROM aulas where aulas.idaula=' . $idambito ;
+}
+if ($ambito == 8)
+{
+$cmd->texto='SELECT aulas.modp2p,aulas.timep2p FROM aulas JOIN gruposordenadores ON aulas.idaula=gruposordenadores.idaula where gruposordenadores.idgrupo=' . $idambito ;
+}
+
+
+if ($ambito == 16)
+{
+$cmd->texto='SELECT aulas.modp2p,aulas.timep2p FROM aulas JOIN ordenadores ON ordenadores.idaula=aulas.idaula where ordenadores.idordenador=' . $idambito ;
+}
+
+ $SelectHtml="";
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if ($rs->Abrir()){
+ $rs->Primero();
+ $SelectHtml.= $TbMsg["WDI26"] . ' :<input type="text" size="10" name="modp2p" value="'.$rs->campos["modp2p"] . '" /> <br />';
+ $rs->Siguiente();
+ $SelectHtml.= $TbMsg["WDI30"] . ' :<input type="text" size="10" maxlength="15" name="timep2p" value="'.$rs->campos["timep2p"] . '" /> <br />';
+ $rs->Siguiente();
+ $rs->Cerrar();
+ }
+
+return($SelectHtml);
+}
+
+
+function htmlForm_unicast($cmd,$ambito,$idambito)
+{
+global $TbMsg;
+//if (isset($_GET["idambito"])) $idambito=$_GET["idambito"];
+if ($ambito == 4)
+{
+$cmd->texto='SELECT nombreordenador,idordenador,ip FROM ordenadores where idaula=' . $idambito ;
+}
+
+if ($ambito == 8)
+{
+$cmd->texto='SELECT nombreordenador,idordenador,ip FROM ordenadores where grupoid=' . $idambito ;
+}
+if ($ambito == 16)
+{
+$cmd->texto='SELECT nombreordenador,idordenador,ip FROM ordenadores where idaula=' . $idambito ;
+}
+
+ $SelectHtml="";
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+
+ if ($rs->Abrir()){
+ $rs->Primero();
+ $ucastclient="";
+ while (!$rs->EOF){
+ $ucastclient.= $rs->campos["ip"] . ":" ;
+ $rs->Siguiente();
+ }
+ $rs->Cerrar();
+ }
+ $SelectHtml.= $TbMsg["WDI24"] . ' :<input type="text" size="8" name="ucastport" value="8000" /> <br />';
+ $SelectHtml.= $TbMsg["WDI28"] . ' :<input type="text" size="98" name="ucastclient" value="' . $ucastclient . '" /> <br />';
+
+ return($SelectHtml);
+}
+
+
+
+function htmlOPTION_equipos($cmd,$ambito,$idambito)
+{
+
+//if (isset($_GET["idambito"])) $idambito=$_GET["idambito"];
+if ($ambito == 4)
+{
+$cmd->texto='SELECT nombreordenador,idordenador,ip FROM ordenadores where idaula=' . $idambito ;
+}
+
+if ($ambito == 8)
+{
+$cmd->texto='SELECT nombreordenador,idordenador,ip FROM ordenadores where grupoid=' . $idambito ;
+}
+if ($ambito == 16)
+{
+$cmd->texto='SELECT nombreordenador,idordenador,ip FROM ordenadores where idaula=' . $idambito ;
+}
+
+ $SelectHtml="";
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+
+ if ($rs->Abrir()){
+ $rs->Primero();
+ while (!$rs->EOF){
+ $SelectHtml.='<OPTION value="'.$rs->campos["ip"] . '" ';
+ $SelectHtml.='>';
+ $SelectHtml.= $rs->campos["nombreordenador"] .'</OPTION>';
+ $rs->Siguiente();
+ }
+ $rs->Cerrar();
+ }
+ //$SelectHtml.= '</SELECT>';
+ return($SelectHtml);
+}
+
+
+
+
+
+
+function htmlOPTION_images($cmd,$ambito,$idambito)
+{
+// 1.1 Imagenes de todos los repositorios de la UO.
+if ($ambito == 4)
+{
+// ambito aulas
+$subconsultarepo='select idrepositorio from repositorios INNER JOIN aulas where repositorios.idcentro=aulas.idcentro AND idaula='.$idambito;
+}
+if ($ambito == 8)
+{
+$subconsultarepo='select idrepositorio from repositorios INNER JOIN aulas INNER JOIN gruposordenadores where repositorios.idcentro=aulas.idcentro AND aulas.idaula=gruposordenadores.idaula AND idgrupo='.$idambito;
+}
+if ($ambito == 16)
+{
+$subconsultarepo='select repositorios.idrepositorio from repositorios INNER JOIN aulas INNER JOIN ordenadores where repositorios.idcentro=aulas.idcentro AND aulas.idaula=ordenadores.idaula AND idordenador='.$idambito;
+}
+
+
+ $SelectHtml="";
+ // 1.0.5 imagenes.tipo =1 para que solo muestre las monoloticas.
+ $cmd->texto="SELECT *,repositorios.ip as iprepositorio, repositorios.nombrerepositorio as nombrerepo FROM imagenes
+ INNER JOIN repositorios ON repositorios.idrepositorio=imagenes.idrepositorio
+ AND repositorios.idrepositorio IN (" . $subconsultarepo . ") WHERE imagenes.tipo=1 ORDER BY imagenes.descripcion";
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+
+ if ($rs->Abrir()){
+ $rs->Primero();
+ while (!$rs->EOF){
+ $SelectHtml.='<OPTION value="'.$rs->campos["iprepositorio"] ."_".$rs->campos["nombreca"]."_".$rs->campos["idimagen"].'_'.$rs->campos["idperfilsoft"].'" ';
+ //$SelectHtml.='<OPTION value="'.$rs->campos["nombreca"] . '" ';
+ $SelectHtml.='>';
+ $SelectHtml.= $rs->campos["descripcion"] .' ('.$rs->campos["nombrerepo"].') </OPTION>';
+ $rs->Siguiente();
+ }
+ $rs->Cerrar();
+ }
+ else
+ {
+ $SelectHtml.='<option value=""> ERROR: Ambito con multiples Repositorios --</option>';
+
+ }
+ return($SelectHtml);
+}
+
+
+
+function HTMLSELECT_imagenes($cmd,$idimagen,$numpar,$codpar,$icp,$sw)
+{
+ $SelectHtml="";
+ $cmd->texto="SELECT *,repositorios.ip as iprepositorio FROM imagenes
+ INNER JOIN repositorios ON repositorios.idrepositorio=imagenes.idrepositorio";
+ if($sw) // Imágenes con el mismo tipo de partición
+ $cmd->texto.= " WHERE imagenes.codpar=".$codpar;
+ else
+ $cmd->texto.= " WHERE imagenes.codpar<>".$codpar;
+
+ $cmd->texto.=" AND imagenes.numpar>0 AND imagenes.codpar>0 AND imagenes.idrepositorio>0"; // La imagene debe existir y estar creada
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if($sw) $des=1; else $des=0;
+ $SelectHtml.= '<SELECT class="formulariodatos" id="despleimagen_'.$icp.'_'.$des.'" style="WIDTH:220">';
+ $SelectHtml.= ' <OPTION value="0"></OPTION>';
+
+ if ($rs->Abrir()){
+ $rs->Primero();
+ while (!$rs->EOF){
+ $SelectHtml.='<OPTION value="'.$rs->campos["idimagen"]."_".$rs->campos["nombreca"]."_".$rs->campos["iprepositorio"]."_".$rs->campos["idperfilsoft"].'"';
+ if($idimagen==$rs->campos["idimagen"]) $SelectHtml.=" selected ";
+ $SelectHtml.='>';
+ $SelectHtml.= $rs->campos["descripcion"].'</OPTION>';
+ $rs->Siguiente();
+ }
+ $rs->Cerrar();
+ }
+ $SelectHtml.= '</SELECT>';
+ return($SelectHtml);
+}
+
+
+
+function htmlOPTION_typepartnotcache($cmd)
+{
+ $SelectHtml="";
+ $cmd->texto='SELECT tipopar FROM tipospar WHERE NOT tipopar = "CACHE"';
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ //$SelectHtml.= '<SELECT class="formulariodatos" name="nombre" id="identificador" style="WIDTH:220" ;" >';
+ //$SelectHtml.= ' <OPTION value="0"></OPTION>';
+
+ if ($rs->Abrir()){
+ $rs->Primero();
+ while (!$rs->EOF){
+ $SelectHtml.='<OPTION value="'.$rs->campos["tipopar"] . '" ';
+ $SelectHtml.='>';
+ $SelectHtml.= $rs->campos["tipopar"] .'</OPTION>';
+ $rs->Siguiente();
+ }
+ $rs->Cerrar();
+ }
+ //$SelectHtml.= '</SELECT>';
+ return($SelectHtml);
+}
+
+
+function htmlForm_typepart($cmd,$numpar)
+{
+ $SelectHtml="";
+ $cmd->texto='SELECT DISTINCT tipopar FROM tipospar
+ JOIN ordenadores_particiones ON ordenadores_particiones.codpar = tipospar.codpar
+ WHERE numpar = ' .$numpar;
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+
+ if ($rs->Abrir()){
+ $rs->Primero();
+ while (!$rs->EOF){
+ $valor=$rs->campos["tipopar"];
+ $SelectHtml.='<option value="'.$valor.'"> '.$valor.' </option>';
+ $rs->Siguiente();
+ }
+ $rs->Cerrar();
+ }
+ return($SelectHtml);
+}
+
+
+function htmlForm_typepartnotcacheEngine10($npart)
+{
+$SelectHtml="";
+if ($npart == 4) {
+ $SelectHtml.='<OPTION value="CACHE"> CACHE </OPTION>';
+}
+$SelectHtml.='<OPTION value="NTFS"> NTFS </OPTION>';
+$SelectHtml.='<OPTION value="FAT32"> FAT32 </OPTION>';
+$SelectHtml.='<OPTION value="FAT16"> FAT16 </OPTION>';
+$SelectHtml.='<OPTION value="FAT12"> FAT12 </OPTION>';
+$SelectHtml.='<OPTION value="HNTFS"> Hidden NTFS </OPTION>';
+$SelectHtml.='<OPTION value="HFAT32"> Hidden FAT32 </OPTION>';
+$SelectHtml.='<OPTION value="HFAT16"> Hidden FAT16 </OPTION>';
+$SelectHtml.='<OPTION value="HFAT12"> Hidden FAT12 </OPTION>';
+$SelectHtml.='<OPTION value="LINUX"> LINUX </OPTION>';
+$SelectHtml.='<OPTION value="LINUX-SWAP"> LINUX-SWAP </OPTION>';
+$SelectHtml.='<OPTION value="LINUX-RAID"> LINUX-RAID </OPTION>';
+$SelectHtml.='<OPTION value="LINUX-LVM"> LINUX-LVM </OPTION>';
+$SelectHtml.='<OPTION value="HFS"> HFS </OPTION>';
+$SelectHtml.='<OPTION value="FREEBSD"> FREEBSD </OPTION>';
+$SelectHtml.='<OPTION value="OPENBSD"> OPENBSD </OPTION>';
+$SelectHtml.='<OPTION value="SOLARIS"> SOLARIS </OPTION>';
+$SelectHtml.='<OPTION value="SOLARIS-BOOT"> SOLARIS-BOOT </OPTION>';
+$SelectHtml.='<OPTION value="VMFS"> VMFS </OPTION>';
+$SelectHtml.='<OPTION value="DATA"> DATA </OPTION>';
+$SelectHtml.='<OPTION value="EFI"> EFI </OPTION>';
+$SelectHtml.='<OPTION value="GPT"> GPT </OPTION>';
+if ($npart <= 4) {
+ $SelectHtml.='<OPTION value="EXTENDED"> EXTENDED </OPTION>';
+}
+return($SelectHtml);
+}
+
+function htmlForm_typepartnotcacheGPT($npart)
+{
+$SelectHtml="";
+if ($npart == 4) {
+ $SelectHtml.='<OPTION value="CACHE"> CACHE </OPTION>';
+}
+$SelectHtml.='<OPTION value="WINDOWS"> Windows </OPTION>';
+$SelectHtml.='<OPTION value="WIN-RESERV"> Windows Reserved </OPTION>';
+$SelectHtml.='<OPTION value="LINUX"> Linux </OPTION>';
+$SelectHtml.='<OPTION value="LINUX-RESERV"> Linux Reserved </OPTION>';
+$SelectHtml.='<OPTION value="LINUX-SWAP"> Linux Swap </OPTION>';
+$SelectHtml.='<OPTION value="LINUX-RAID"> Linux RAID </OPTION>';
+$SelectHtml.='<OPTION value="LINUX-LVM"> Linux LVM </OPTION>';
+$SelectHtml.='<OPTION value="CHROMEOS"> ChromeOS </OPTION>';
+$SelectHtml.='<OPTION value="CHROMEOS-KRN"> ChromeOS Kernel </OPTION>';
+$SelectHtml.='<OPTION value="CHROMEOS-RESERV"> ChromeOS Reserved </OPTION>';
+$SelectHtml.='<OPTION value="HFS"> MacOS HFS </OPTION>';
+$SelectHtml.='<OPTION value="HFS-BOOT"> MacOS HFS Boot </OPTION>';
+$SelectHtml.='<OPTION value="HFS-RAID"> MacOS HFS RAID </OPTION>';
+$SelectHtml.='<OPTION value="FREEBSD"> FreeBSD </OPTION>';
+$SelectHtml.='<OPTION value="FREEBSD-DISK"> FreeBSD Disk </OPTION>';
+$SelectHtml.='<OPTION value="FREEBSD-BOOT"> FreeBSD Boot </OPTION>';
+$SelectHtml.='<OPTION value="FREEBSD-SWAP"> FreeBSD Swap </OPTION>';
+$SelectHtml.='<OPTION value="SOLARIS"> Solaris </OPTION>';
+$SelectHtml.='<OPTION value="SOLARIS-DISK"> Solaris Disk </OPTION>';
+$SelectHtml.='<OPTION value="SOLARIS-BOOT"> Solaris Boot </OPTION>';
+$SelectHtml.='<OPTION value="SOLARIS-SWAP"> Solaris Swap </OPTION>';
+$SelectHtml.='<OPTION value="EFI"> EFI </OPTION>';
+$SelectHtml.='<OPTION value="MBR"> MBR </OPTION>';
+$SelectHtml.='<OPTION value="BIOS-BOOT"> BIOS Boot </OPTION>';
+return($SelectHtml);
+}
+
+function htmlForm_sizepart($cmd,$numpar)
+{
+ $SelectHtml="";
+ $cmd->texto='SELECT DISTINCT tamano FROM ordenadores_particiones WHERE numpar = ' .$numpar . ' AND NOT tamano = 0';
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+
+ if ($rs->Abrir()){
+ $rs->Primero();
+ while (!$rs->EOF){
+ $SelectHtml.='<OPTION value="'.$rs->campos["tamano"] . '" ';
+ $SelectHtml.='>';
+ $SelectHtml.= $rs->campos["tamano"] .'</OPTION>';
+ $rs->Siguiente();
+ }
+ $rs->Cerrar();
+ }
+ return($SelectHtml);
+}
+
+
+function pintaParticionesAsistenteDeployImage($cmd,$configuraciones,$idordenadores,$cc)
+{
+ global $tbKeys; // Tabla contenedora de claves de configuración
+ global $conKeys; // Contador de claves de configuración
+ global $TbMsg;
+
+ $colums=7;
+ echo '<TR height=16>';
+ echo '<TH align=center>&nbsp;'.$TbMsg[20].'&nbsp;</TH>'; // Número de partición
+ echo '<TH align=center>&nbsp;'.$TbMsg[24].'&nbsp;</TH>'; // Tipo de partición
+ echo '<TH align=center>&nbsp;'.$TbMsg[27].'&nbsp;</TH>'; // Sistema de ficheros
+ echo '<TH align=center>&nbsp;'.$TbMsg[21].'&nbsp;</TH>'; // Sistema Operativo Instalado
+ echo '<TH align=center>&nbsp;'.$TbMsg[22].'&nbsp;</TH>'; // Tamaño
+ echo '<TH align=center>&nbsp;'.$TbMsg[25].'&nbsp;</TH>'; // Imagen instalada
+ echo '<TH align=center>&nbsp;'.$TbMsg[26].'&nbsp;</TH>'; // Perfil software
+ echo '</TR>';
+
+ $auxCfg=split("@",$configuraciones); // Crea lista de particiones
+ for($i=0;$i<sizeof($auxCfg);$i++){
+ $auxKey=split(";",$auxCfg[$i]); // Toma clave de configuracion
+ for($k=0;$k<$conKeys;$k++){ // Busca los literales para las claves de esa partición
+ if($tbKeys[$k]["cfg"]==$auxCfg[$i]){ // Claves encontradas
+ if ($tbKeys[$k]["numpar"] == 0) { // Info del disco (umpart=0)
+ $disksize = tomaTamano($tbKeys[$k]["numpar"],$idordenadores);
+ }
+ else { // Información de partición (numpart>0)
+ echo'<TR height=16>'.chr(13);
+ echo'<TD align=center>&nbsp;'.$tbKeys[$k]["numpar"].'&nbsp;</TD>'.chr(13);
+ echo'<TD align=center>&nbsp;'.$tbKeys[$k]["tipopar"].'&nbsp;</TD>'.chr(13);
+
+ //echo'<TD align=center>&nbsp;'.$tbKeys[$k]["sistemafichero"].'&nbsp;</TD>'.chr(13);
+ echo'<TD align=center>&nbsp;'.tomaSistemasFicheros($tbKeys[$k]["numpar"],$idordenadores).'&nbsp;</TD>'.chr(13);
+
+ //echo '<TD>&nbsp;'.$tbKeys[$k]["nombreso"].'&nbsp;</TD>'.chr(13);
+ echo '<TD align=center>&nbsp;'.tomaNombresSO($tbKeys[$k]["numpar"],$idordenadores).'&nbsp;</TD>'.chr(13);
+
+ //echo'<TD align=rigth>&nbsp;'.formatomiles($tbKeys[$k]["tamano"]).'&nbsp;</TD>'.chr(13);
+ echo'<TD align=right>&nbsp;'.tomaTamano($tbKeys[$k]["numpar"],$idordenadores).'&nbsp;</TD>'.chr(13);
+
+ //echo'<TD>&nbsp;'.$tbKeys[$k]["imagen"].'&nbsp;</TD>'.chr(13);
+ echo'<TD align=center>&nbsp;'.tomaImagenes($tbKeys[$k]["numpar"],$idordenadores).'&nbsp;</TD>'.chr(13);
+
+ //echo'<TD>&nbsp;'.$tbKeys[$k]["perfilsoft"].'&nbsp;</TD>'.chr(13);
+ echo'<TD align=center>&nbsp;'.tomaPerfiles($tbKeys[$k]["numpar"],$idordenadores).'&nbsp;</TD>'.chr(13);
+
+ echo'</TR>'.chr(13);
+ break;
+ }
+ }
+ }
+ }
+ // Mostrar información del disco, si se ha obtenido.
+ if (!empty ($disksize)) {
+ echo'<tr height="16">'.chr(13);
+ echo'<td align="center">&nbsp;'.$TbMsg[35].'&nbsp;</td>'.chr(13);
+ echo'<td></td>'.chr(13);
+ echo'<td></td>'.chr(13);
+ echo'<td></td>'.chr(13);
+ echo'<td name="disksize" id="disksize" align="right">&nbsp;'.$disksize.'&nbsp;</td>'.chr(13);
+ echo'<td></td>'.chr(13);
+ echo'<td></td>'.chr(13);
+ echo'</tr>'.chr(13);
+ }
+ echo '<TR height=5><TD colspan='.$colums.' style="BORDER-TOP: #999999 1px solid;BACKGROUND-COLOR: #FFFFFF;">&nbsp;</TD></TR>';
+}
+
+?>
diff --git a/admin/WebConsole/asistentes/includes/asistentes/formCloneRemotePartition.php b/admin/WebConsole/asistentes/includes/asistentes/formCloneRemotePartition.php
index 4cf3fead..d9b1cfa1 100644
--- a/admin/WebConsole/asistentes/includes/asistentes/formCloneRemotePartition.php
+++ b/admin/WebConsole/asistentes/includes/asistentes/formCloneRemotePartition.php
@@ -3,17 +3,17 @@
<tr>
<td class="op_basic">
- <?echo $TbMsg["WCRP32"] ?>
+ <?php echo $TbMsg["WCRP32"] ?>
<select name="ipMaster" id="ipMaster" style="width:220" onChange="xajax_ListarOrigenMaster(this.value);">
- <option value=""> -- <?echo $TbMsg["WCRP32"] ?> -- </option>
+ <option value=""> -- <?php echo $TbMsg["WCRP32"] ?> -- </option>
<?php echo ''.htmlOPTION_equipos($cmd,$ambito,$idambito).''; ?>
</select>
<br />
<!--DIV donde se mostrara la respuesta AJAX sobre las particiones clonables del equipo-->
- <?echo $TbMsg["WCRP33"] ?>
+ <?php echo $TbMsg["WCRP33"] ?>
<div id="divListado"></div>
<br />
- <?echo $TbMsg["WCRP34"] ?>
+ <?php echo $TbMsg["WCRP34"] ?>
<select name="targetpart" id="targetpart" style="width:220;">
<option value="1 1"> 1er disco - 1ª particion </option>
<option value="1 2"> 1er disco - 2ª particion </option>
@@ -21,19 +21,19 @@
<option value="1 4"> 1er disco - 4ª particion </option>
</select>
<br />
- <?echo $TbMsg["WCRP35"] ?>
+ <?php echo $TbMsg["WCRP35"] ?>
<select name="idmetodo" id="idmetodo" style="width:220;">
<option value="MULTICAST"> MULTICAST </option>
<option value="UNICAST"> UNICAST </option>
</select>
<br />
- <?echo $TbMsg["WCRP36"] ?>
+ <?php echo $TbMsg["WCRP36"] ?>
<select name="tool" id="tool" style="width:220;">
<option value="partclone"> partclone </option>
<!-- <option value="partimage"> partimage </option> -->
</select>
<br />
- <?echo $TbMsg["WCRP37"] ?>
+ <?php echo $TbMsg["WCRP37"] ?>
<select name="compresor" id="compresor" style="width:220;">
<option value="lzop"> lzop </option>
<option value="gzip"> gzip </option>
diff --git a/admin/WebConsole/asistentes/includes/asistentes/formDeployImage.php b/admin/WebConsole/asistentes/includes/asistentes/formDeployImage.php
index dfdd34d2..4aece176 100644
--- a/admin/WebConsole/asistentes/includes/asistentes/formDeployImage.php
+++ b/admin/WebConsole/asistentes/includes/asistentes/formDeployImage.php
@@ -2,7 +2,6 @@
// version 1.1: se incluye el atributo atrib_restore (ticket #757)
// autor: Irina Gomez, ETSII Universidad de Sevilla
// fecha: 2016-10-27
-
$disksPartitions = array();
$diskPartIndex = 0;
// Recorremos todas las configuraciones y vamos creando un array con disco - particion
@@ -15,17 +14,17 @@ for($cfgIndex = 0; $cfgIndex < $conKeys; $cfgIndex++){
}
?>
- <input type="hidden" name="atrib_restore" value="">
-<? echo $TbMsg["WDI13"] ?> <br>
- <input type="radio" name="modo" value="deployImage" onClick="enableDirect(this.form)" checked ><? echo $TbMsg["WDI14"] ?> <br>
- <input type="radio" name="modo" value="updateCache" onClick="disableDirect(this.form)" > <? echo $TbMsg["WDI15"] ?> <br>
+<input type="hidden" name="atrib_restore" value="">
+<?php echo $TbMsg["WDI13"] ?> <br>
+ <input type="radio" name="modo" value="deployImage" onClick="enableDirect(this.form)" checked ><?php echo $TbMsg["WDI14"] ?> <br>
+ <input type="radio" name="modo" value="updateCache" onClick="disableDirect(this.form)" > <?php echo $TbMsg["WDI15"] ?> <br>
-<tr> <td> <? echo $TbMsg["WDI16"] ?> </td> <td> <? echo $TbMsg["WDI17"] ?> </td> <td> <? echo $TbMsg["WDI18"] ?> </td> <td> <? echo $TbMsg["WDI19"] ?> </td></tr>
+<tr> <td> <?php echo $TbMsg["WDI16"] ?> </td> <td> <?php echo $TbMsg["WDI17"] ?> </td> <td> <?php echo $TbMsg["WDI18"] ?> </td> <td> <?php echo $TbMsg["WDI19"] ?> </td></tr>
<tr>
<td class="op_basic">
- <? echo $TbMsg["WDI20"] ?>
+ <?php echo $TbMsg["WDI20"] ?>
<select name="idparticion" id="idparticion" style="WIDTH:220">
<?php
foreach($disksPartitions as $diskPartition){
@@ -39,13 +38,13 @@ for($cfgIndex = 0; $cfgIndex < $conKeys; $cfgIndex++){
-->
</select>
<br />
- <? echo $TbMsg["WDI21"] ?>
+ <?php echo $TbMsg["WDI21"] ?>
<select name="idimagen" id="idimagen" style="WIDTH:220">
- <option value=""> <? echo $TbMsg["WDI22"] ?></option>
+ <option value=""> <?php echo $TbMsg["WDI22"] ?></option>
<?php echo ''. htmlOPTION_images($cmd,$ambito,$idambito) .''; ?>
</select>
<br />
- <? echo $TbMsg["WDI23"] ?>
+ <?php echo $TbMsg["WDI23"] ?>
<br />
<select name="idmetodo" id="idmetodo" style="WIDTH:220;">
diff --git a/admin/WebConsole/asistentes/includes/asistentes/formParticionado_gpt.php b/admin/WebConsole/asistentes/includes/asistentes/formParticionado_gpt.php
index 2bfa3938..9069815f 100644
--- a/admin/WebConsole/asistentes/includes/asistentes/formParticionado_gpt.php
+++ b/admin/WebConsole/asistentes/includes/asistentes/formParticionado_gpt.php
@@ -13,7 +13,7 @@ for ($p=1; $p<4; $p++) {
echo '
<tr id="trPartition'.$p.'">
<td>
-<input type="checkbox" name="checkGPT'.$p.'" value="checkGPT'.$p.'" onclick="clickPartitionCheckbox(this.form, '.$p.',true);" /> '.$TbMsg[20].' '.$p.'</td>
+<input type="checkbox" id="checkGPT'.$p.'" name="checkGPT'.$p.'" value="checkGPT'.$p.'" onclick="clickPartitionCheckbox(this.form, '.$p.',true);" /> '.$TbMsg[20].' '.$p.'</td>
<td>
<select name="partGPT'.$p.'" id="partGPT'.$p.'" style="width:220" disabled="true" onclick="
//if (this.form.part'.$p.'.options[this.form.part'.$p.'.selectedIndex].value == \'CUSTOM\') {
@@ -37,7 +37,7 @@ for ($p=1; $p<4; $p++) {
<option value="CUSTOM"> '.$TbMsg[39].'</option>
</select>
<br />
-<input type="text" style="width:100" name="sizeGPT'.$p.'custom" value="0" disabled="true" onchange="calculateFreeDisk(this.form);" />
+<input type="text" style="width:100" id="sizeGPT'.$p.'custom" name="sizeGPT'.$p.'custom" value="0" disabled="true" onchange="calculateFreeDisk(this.form);" />
</td>
</tr>
';
@@ -47,7 +47,7 @@ for ($p=1; $p<4; $p++) {
<tr id="trPartition4">
<td><input type="checkbox" name="checkGPT4" value="checkGPT4" onclick="clickPartitionCheckbox(this.form, 4,true);" /> <?php echo $TbMsg[20].' '.$p;?> </td>
<td>
-<select name="partGPT4" id="partGPT4" style="width:220" disabled="true" onchange="checkExtendedPartition(form);"><? echo htmlForm_typepartnotcacheGPT(4) ?></select>
+<select name="partGPT4" id="partGPT4" style="width:220" disabled="true" onchange="checkExtendedPartition(form);"><?php echo htmlForm_typepartnotcacheGPT(4) ?></select>
</td>
<td><select name="sizeGPT4" id="sizeGPT4" style="width:220" disabled="true" onclick="if (this.form.sizeGPT4.options[this.form.sizeGPT4.selectedIndex].value == 'CUSTOM') { this.form.sizeGPT4custom.disabled=false } else { this.form.sizeGPT4custom.disabled=true }" onchange="calculateFreeGPTDisk(this.form);" />
<option value="0"> <?php echo $TbMsg[40];?> </option>
@@ -71,6 +71,7 @@ for ($p=1; $p<4; $p++) {
<th>
<input type="hidden" id="numGPTpartitions" value="4"/>
<input type="hidden" id="minsizeGPT" />
+<input type="hidden" id="maxcachesize" />
<?php echo $TbMsg[38];?>: <input type="text" id="freediskGPT" width="15" disabled="true" />
</th>
</tr>
diff --git a/admin/WebConsole/asistentes/includes/asistentes/formParticionado_msdos.php b/admin/WebConsole/asistentes/includes/asistentes/formParticionado_msdos.php
index 01b17917..b1d6b079 100644
--- a/admin/WebConsole/asistentes/includes/asistentes/formParticionado_msdos.php
+++ b/admin/WebConsole/asistentes/includes/asistentes/formParticionado_msdos.php
@@ -59,7 +59,7 @@ for ($p=1; $p<4; $p++) {
</select>
<br />
-->
-<select name="part4" id="part4" style="width:220" disabled="true" onchange="checkExtendedPartition(form);"><? echo htmlForm_typepartnotcacheEngine10(4) ?></select>
+<select name="part4" id="part4" style="width:220" disabled="true" onchange="checkExtendedPartition(form);"><?php echo htmlForm_typepartnotcacheEngine10(4) ?></select>
</td>
<td><select name="size4" id="size4" style="width:220" disabled="true" onclick="if (this.form.size4.options[this.form.size4.selectedIndex].value == 'CUSTOM') { this.form.size4custom.disabled=false } else { this.form.size4custom.disabled=true }" onchange="calculateFreeDisk(this.form);" />
<option value="0"> <?php echo $TbMsg[40];?> </option>
@@ -128,6 +128,7 @@ for ($p=5; $p<=9; $p++) {
<tr>
<th>
<input type="hidden" id="minsize" />
+<input type="hidden" id="maxcachesize" />
<?php echo $TbMsg[38];?>: <input type="text" id="freedisk" width="15" disabled="true" />
</th>
</tr>
diff --git a/admin/WebConsole/asistentes/includes/capturaacciones.php b/admin/WebConsole/asistentes/includes/capturaacciones.php
index e26e38e6..a6fa089d 100644
--- a/admin/WebConsole/asistentes/includes/capturaacciones.php
+++ b/admin/WebConsole/asistentes/includes/capturaacciones.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/asistentes/includes/formularioacciones.php b/admin/WebConsole/asistentes/includes/formularioacciones.php
index 4f8d401e..ab61879d 100644
--- a/admin/WebConsole/asistentes/includes/formularioacciones.php
+++ b/admin/WebConsole/asistentes/includes/formularioacciones.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -9,12 +9,12 @@
// Formulario para paso de parametros comunes para la ejecución de comandos
// *************************************************************************************************************************************************
?>
-<FORM align=center name="fdatosejecucion" action="<? echo $gestor?>" method="post">
- <INPUT type="hidden" name="idcomando" value="<? echo $idcomando?>">
- <INPUT type="hidden" name="descricomando" value="<? echo $descricomando?>">
- <INPUT type="hidden" name="ambito" value="<? echo $ambito?>">
- <INPUT type="hidden" name="idambito" value="<? echo $idambito?>">
- <INPUT type="hidden" name="funcion" value="<? echo $funcion?>">
- <INPUT type="hidden" name="atributos" value="<? echo $atributos?>">
- <INPUT type="hidden" name="gestor" value="<? echo $gestor?>">
+<FORM align=center name="fdatosejecucion" action="<?php echo $gestor?>" method="post">
+ <INPUT type="hidden" name="idcomando" value="<?php echo $idcomando?>">
+ <INPUT type="hidden" name="descricomando" value="<?php echo $descricomando?>">
+ <INPUT type="hidden" name="ambito" value="<?php echo $ambito?>">
+ <INPUT type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <INPUT type="hidden" name="funcion" value="<?php echo $funcion?>">
+ <INPUT type="hidden" name="atributos" value="<?php echo $atributos?>">
+ <INPUT type="hidden" name="gestor" value="<?php echo $gestor?>">
diff --git a/admin/WebConsole/asistentes/includes/opcionesacciones.php b/admin/WebConsole/asistentes/includes/opcionesacciones.php
index 2eeaf1ab..a598b090 100644
--- a/admin/WebConsole/asistentes/includes/opcionesacciones.php
+++ b/admin/WebConsole/asistentes/includes/opcionesacciones.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -9,84 +9,84 @@
// Opciones comunes para la ejecución de comandos
// *************************************************************************************************************************************************
?>
-<P align=center><span align=center class=subcabeceras><? echo $TbMsgAux[0] ?></span></P>
+<P align=center><span align=center class=subcabeceras><?php echo $TbMsgAux[0] ?></span></P>
-<?if($idcomando!=10){?>
+<?php if($idcomando!=10){?>
<TABLE align=center>
<TR>
- <TD><IMG border=0 style="cursor:pointer" src="../images/boton_aceptar_<?echo $idioma ?>.gif" onclick="confirmar()" ></TD>
+ <TD><IMG border=0 style="cursor:pointer" src="../images/boton_aceptar_<?php echo $idioma ?>.gif" onclick="confirmar()" ></TD>
</TR>
</TABLE>
<BR>
-<?}?>
+<?php }?>
<TABLE align=center class=opciones_ejecucion BORDER=0>
<TR>
<TD><INPUT name=sw_ejya type=checkbox checked></TD>
- <TD colspan=3> <? echo $TbMsgAux[1] ?> &nbsp; </TD>
+ <TD colspan=3> <?php echo $TbMsgAux[1] ?> &nbsp; </TD>
</TR>
<TR>
<TD>&nbsp; </TD>
- <TD><INPUT name=sw_seguimiento type=radio value=1></TD><TD><? echo $TbMsgAux[2] ?>&nbsp;</TD>
+ <TD><INPUT name=sw_seguimiento type=radio value=1></TD><TD><?php echo $TbMsgAux[2] ?>&nbsp;</TD>
</TR>
<TR>
<TD>&nbsp; </TD>
- <TD><INPUT checked name=sw_seguimiento type=radio value=0></TD><TD><? echo $TbMsgAux[3] ?>&nbsp;</TD>
+ <TD><INPUT checked name=sw_seguimiento type=radio value=0></TD><TD><?php echo $TbMsgAux[3] ?>&nbsp;</TD>
</TR>
<!-------------------------------------------------------------------------------------------------------------------------------->
<TR HEIGHT=5><TD colspan=4><HR></TD></TR>
<!-------------------------------------------------------------------------------------------------------------------------------->
<TR>
<TD><INPUT name=sw_ejprg type=checkbox></TD>
- <TD colspan=3><? echo $TbMsgAux[4] ?>&nbsp;</TD>
+ <TD colspan=3><?php echo $TbMsgAux[4] ?>&nbsp;</TD>
</TR>
<!-------------------------------------------------------------------------------------------------------------------------------->
<TR HEIGHT=5><TD colspan=4><HR></TD></TR>
<!-------------------------------------------------------------------------------------------------------------------------------->
<TR>
<TD><INPUT onclick="clic_mkprocedimiento(this)" name=sw_mkprocedimiento type=checkbox></TD>
- <TD colspan=3><? echo $TbMsgAux[5] ?>&nbsp;</TD></TR>
+ <TD colspan=3><?php echo $TbMsgAux[5] ?>&nbsp;</TD></TR>
<TR>
<TD>&nbsp; </TD>
<TD><INPUT onclick="clic_nwprocedimiento(this)" name=sw_procedimiento type=radio value=0></TD>
- <TD><? echo $TbMsgAux[6] ?>&nbsp; </TD>
+ <TD><?php echo $TbMsgAux[6] ?>&nbsp; </TD>
<TD><INPUT onclick="clic_nomprocedimiento(this)" style="FONT-FAMILY:Arial, Helvetica, sans-serif;FONT-SIZE: 11px" name=nombreprocedimiento style="HEIGHT: 22px; WIDTH: 275px"></TD></TR>
<TR>
<TD>&nbsp; </TD>
<TD><INPUT onclick="clic_exprocedimiento(this)" name=sw_procedimiento type=radio value=1></TD>
- <TD><? echo $TbMsgAux[7] ?>&nbsp;</TD>
- <TD><?echo HTMLSELECT($cmd,$idcentro,'procedimientos',0,'idprocedimiento','descripcion',275,"procedimientoexistente");?></TD></TR>
+ <TD><?php echo $TbMsgAux[7] ?>&nbsp;</TD>
+ <TD><?php echo HTMLSELECT($cmd,$idcentro,'procedimientos',0,'idprocedimiento','descripcion',275,"procedimientoexistente");?></TD></TR>
<TR>
<TD>&nbsp; </TD>
<TD>&nbsp; </TD>
- <TD><? echo $TbMsgAux[8] ?>&nbsp;</TD>
+ <TD><?php echo $TbMsgAux[8] ?>&nbsp;</TD>
<TD><INPUT maxlength=3 style="FONT-FAMILY:Arial, Helvetica, sans-serif;FONT-SIZE: 11px;WIDTH:30" name=ordprocedimiento type=text value=""></TD></TR>
<!-------------------------------------------------------------------------------------------------------------------------------->
<TR HEIGHT=10><TD colspan=4>&nbsp; <HR></TD></TR>
<!-------------------------------------------------------------------------------------------------------------------------------->
<TR>
<TD><INPUT onclick="clic_mktarea(this)" name=sw_mktarea type=checkbox></TD>
- <TD colspan=3><? echo $TbMsgAux[9] ?>&nbsp;</TD></TR>
+ <TD colspan=3><?php echo $TbMsgAux[9] ?>&nbsp;</TD></TR>
<TR>
<TD>&nbsp; </TD>
<TD><INPUT onclick="clic_nwtarea(this)" name=sw_tarea type=radio value=0></TD>
- <TD><? echo $TbMsgAux[10] ?>&nbsp;</TD>
+ <TD><?php echo $TbMsgAux[10] ?>&nbsp;</TD>
<TD><INPUT onclick="clic_nomtarea(this)" style="FONT-FAMILY:Arial, Helvetica, sans-serif;FONT-SIZE: 11px" name=nombretarea style="HEIGHT: 22px; WIDTH: 275px"></TD></TR>
<TR>
<TD>&nbsp; </TD>
<TD><INPUT onclick="clic_extarea(this)" name=sw_tarea type=radio value=1></TD>
- <TD><? echo $TbMsgAux[11] ?>&nbsp;</TD>
- <TD><?echo HTMLSELECT($cmd,$idcentro,'tareas',0,'idtarea','descripcion',275,"tareaexistente");?></TD></TR>
+ <TD><?php echo $TbMsgAux[11] ?>&nbsp;</TD>
+ <TD><?php echo HTMLSELECT($cmd,$idcentro,'tareas',0,'idtarea','descripcion',275,"tareaexistente");?></TD></TR>
<TR>
<TD>&nbsp; </TD>
<TD>&nbsp; </TD>
- <TD><? echo $TbMsgAux[12] ?>&nbsp;</TD>
+ <TD><?php echo $TbMsgAux[12] ?>&nbsp;</TD>
<TD><INPUT maxlength=3 style="FONT-FAMILY:Arial, Helvetica, sans-serif;FONT-SIZE: 11px;WIDTH:30" name=ordtarea type=text value=""></TD></TR>
<!-------------------------------------------------------------------------------------------------------------------------------->
</TABLE>
diff --git a/admin/WebConsole/asistentes/jscripts/EjecutarScripts.js b/admin/WebConsole/asistentes/jscripts/EjecutarScripts.js
index 616bc470..5452cf97 100644
--- a/admin/WebConsole/asistentes/jscripts/EjecutarScripts.js
+++ b/admin/WebConsole/asistentes/jscripts/EjecutarScripts.js
@@ -17,7 +17,7 @@
// Pedir confirmación si clonación masiva por Unicast.
if (document.fdatosejecucion.ambito.value!=16 && document.fdatos.idmetodo !== undefined &&
- (document.fdatos.idmetodo.value=="UNICAST" || document.fdatos.idmetodo.value=="UNICAST-DIRECT")) {
+ (document.fdatos.idmetodo.value=="UNICAST" || document.fdatos.idmetodo.value=="UNICAST-DIRECT")) {
if (confirm(TbMsg[4]) !== true) {
cancelar();
return false;
diff --git a/admin/WebConsole/asistentes/jscripts/asistentes.js b/admin/WebConsole/asistentes/jscripts/asistentes.js
index 1e9e3d95..b47e888b 100644
--- a/admin/WebConsole/asistentes/jscripts/asistentes.js
+++ b/admin/WebConsole/asistentes/jscripts/asistentes.js
@@ -6,12 +6,15 @@
// Nombre del fichero: asistentes.js
// Descripción :
// Este fichero implementa las funciones javascript del fichero AsistentesEjecutarScripts.php (Comandos)
-// version 1.0.6b y 1.1: codeDeployImage: Compone atributo para el comando restaurar imagen (ticket #757)
+// version 1.1: cliente con varios repositorios - Imagenes de todos los repositorios de la UO.
+// autor: Irina Gomez, Universidad de Sevilla
+// fecha 2015-06-17
+// version 1.1: showPartitionForm: Se incluye aviso para particiones GTP.
// autor: Irina Gomez, ETSII Universidad de Sevilla
-// fecha: 2016-10-27
-// versión 1.0.6b: Si existe Cache al crear las particiones reservamos la cuarta libre (ticket #753)
+// fecha: 2016-06-21
+// version 1.1: codeDeployImage: Compone atributo para el comando restaurar imagen (ticket #757)
// autor: Irina Gomez, ETSII Universidad de Sevilla
-// fecha: 2016-12-15
+// fecha: 2016-10-27
// ***********************************************************************************************************
function codeCloneRemotePartition(form){
@@ -67,13 +70,16 @@ switch (form.idmetodo.value)
protocol="UNICAST-DIRECT";
break;
}
+
// Datos imagen
var imagen = form.idimagen.value.split("_");
+
//form.codigo.value="deployImage REPO /";
if (form.modo[0].checked)
{
// UHU - Distinguimos entre disco y particion, el valor de idparticion sera disco;particion. eje. 1;1
var diskPart = form.idparticion.value.split(";");
+ var imagen = form.idimagen.value.split("_");
command="deployImage " + imagen[0] + " /" + imagen[1] + " "+diskPart[0]+" " + diskPart[1] + " " + protocol ;
form.codigo.value="\
ogEcho log session \"[0] $MSG_SCRIPTS_TASK_START " + command + "\"\n \ " +
@@ -82,11 +88,11 @@ command + " \n";
// Atributos para comando RestaurarImagen
form.atrib_restore.value = "dsk=" + diskPart[0] + "@par="+ diskPart[1] +"@idi=" +imagen[2] +
"@nci="+imagen[1] + "@ipr="+ imagen[0] +"@ifs=" +imagen[3] +
- "@ptc="+protocol +"@";
+ "@ptc="+protocol +"@";
}
else
{
- command="updateCache REPO /" + imagen[1] + ".img" + " " + protocol ;
+ command="updateCache REPO /" + imagen[1] + ".img" + " " + protocol ;
form.codigo.value="\
ogEcho log session \"[0] $MSG_SCRIPTS_TASK_START " + command +"\"\n \ " +
command + " \n";
@@ -101,29 +107,36 @@ function modificarCodigo() {
}
function codeParticionado(form){
- var errorMsg = "¡El espacio libre en disco no puede ser menor que 0!";
var n_disk = form.n_disk.value;
var tipo_part_table = form.tipo_part_table.value;
// Comprobamos si la opcion elejida es GPT o MSDOS para llamar a una funcion u otra
if(tipo_part_table == "GPT"){
+ var freediskGPT = parseInt(document.getElementById("freediskGPT").value);
// Comprobamos que el espacio libre en el disco no sea negativo, si lo es, dar aviso
- if(parseInt(document.getElementById("freediskGPT").value) < 0){
- alert(errorMsg);
+ if(freediskGPT < 0){
+ alert(TbMsg['NODISKSIZE']);
+ }
+ else if (!validaCache(freediskGPT)) {
+ alert(TbMsg['NOCACHESIZE']);
}
else{
codeParticionadoGPT(form);
}
}
else{
+ var freedisk = parseInt(document.getElementById("freedisk").value);
// Comprobamos que el espacio libre en el disco no sea negativo, si lo es, dar aviso
- if(parseInt(document.getElementById("freedisk").value) < 0){
- alert(errorMsg);
+ if(freedisk < 0){
+ alert(TbMsg['NODISKSIZE']);
+ }
+ else if (!validaCache(freedisk)) {
+ alert(TbMsg['NOCACHESIZE']);
}
else{
codeParticionadoMSDOS(form);
}
}
-
+
}
@@ -131,26 +144,18 @@ function codeParticionadoMSDOS (form) {
var partCode="";
var logicalCode="";
var sizecacheCode="";
- // cacheCode: codigo para preparar la particion cache
- var cacheCode="";
- // cacheInit: codigo para crear la particion cache, al final de todo el proceso
- var cacheInit="";
+ var cacheCode;
var cacheSize;
var extended=false;
var n_disk = form.n_disk.value;
var tipo_part_table = form.tipo_part_table.value;
var maxParts = 4;
- var emptyCache = "";
+ var swapPart = new Array();
+ var swapCode = "";
// Comprobamos si esta seleccionada la cuarta particion y no es CACHE
- if(form.check4.checked) {
- if (form.part4.value == "CACHE") {
- // Si existe Cache al crear las particiones reservamos la cuarta libre
- emptyCache = " EMPTY:0";
- } else {
- maxParts = 5;
- }
- }
+ if(form.check4.checked && form.part4.value != "CACHE")
+ maxParts = 5;
for (var nPart=1; nPart<maxParts; nPart++) {
var partCheck=eval("form.check"+nPart);
@@ -159,13 +164,24 @@ function codeParticionadoMSDOS (form) {
if (partType.value == "CUSTOM" ) {
var partTypeCustom=eval("form.part"+nPart+"custom");
partCode += " " + partTypeCustom.value;
- if (partTypeCustom.value == "EXTENDED") {
+ switch(partTypeCustom.value) {
+ case "EXTENDED":
extended=true;
+ break;
+ case "LINUX-SWAP":
+ swapPart.push(nPart);
+ break;
}
+
} else {
partCode += " " + partType.value;
- if (partType.value == "EXTENDED") {
+ switch(partType.value) {
+ case "EXTENDED":
extended=true;
+ break;
+ case "LINUX-SWAP":
+ swapPart.push(nPart);
+ break;
}
}
var partSize=eval("form.size"+nPart);
@@ -175,12 +191,11 @@ function codeParticionadoMSDOS (form) {
} else {
partCode += ":" + partSize.value;
}
- // En la partición 4 dejo espacio libre para la Cache
- if (nPart == 3) partCode += emptyCache;
} else {
partCode += " EMPTY:0";
}
}
+ var cacheCode="";
// Si se selecciono la particion 4 y es CACHE
if(form.part4.value == "CACHE"){
@@ -188,29 +203,34 @@ function codeParticionadoMSDOS (form) {
if (form.size4.value == "0") {
sizecacheCode="\
ogEcho session \"[20] $MSG_HELP_ogGetCacheSize\"\n \
-sizecache=`ogGetCacheSize` \n";
- cacheInit="initCache "+n_disk+" $sizecache &>/dev/null | tee -a $OGLOGCOMMAND \n ";
+sizecache=`ogGetCacheSize` \n ";
cacheCode="\
ogEcho session \"[30] $MSG_HELP_ogUpdatePartitionTable "+n_disk+"\"\n \
+ogCreatePartitionTable "+n_disk+" "+tipo_part_table +" \n \
ogDeletePartitionTable "+n_disk+" \n \
-ogExecAndLog command ogUpdatePartitionTable "+n_disk+" \n \ ";
+ogExecAndLog command ogUpdatePartitionTable "+n_disk+" \n \
+ogEcho session \"[50] $MSG_HELP_ogCreateCache\"\n \
+initCache "+n_disk+" $sizecache NOMOUNT &>/dev/null \n ";
} else {
if (form.size4.value == "CUSTOM") {
cacheSize = form.size4custom.value;
} else {
cacheSize = form.size4.value;
}
- cacheInit="initCache " + n_disk + " " + cacheSize + " &>/dev/null | tee -a $OGLOGCOMMAND \n ";
cacheCode="\
ogEcho session \"[30] $MSG_HELP_ogUpdatePartitionTable "+n_disk+"\"\n \
+ogCreatePartitionTable "+n_disk+" "+tipo_part_table +" \n \
ogDeletePartitionTable "+n_disk+" \n \
-ogUpdatePartitionTable "+n_disk+" \n \ ";
+ogUpdatePartitionTable "+n_disk+" \n \
+ogEcho session \"[50] $MSG_HELP_ogCreateCache\"\n \
+initCache " + n_disk + " " + cacheSize + " NOMOUNT &>/dev/null";
}
} else {
cacheCode="\
ogEcho session \"[30] $MSG_HELP_ogUpdatePartitionTable "+n_disk+"\"\n \
+ogCreatePartitionTable "+n_disk+" "+tipo_part_table +" \n \
ogDeletePartitionTable "+n_disk+" \n \
-ogUpdatePartitionTable "+n_disk+" \n \ ";
+ogUpdatePartitionTable "+n_disk+" \n";
partCode += " EMPTY:0";
}
}
@@ -230,8 +250,14 @@ partCode += " EMPTY:0";
if (partType.value == "CUSTOM" ) {
var partTypeCustom=eval("form.part"+nPart+"custom");
logicalCode += " " + partTypeCustom.value;
+ // Partición swap
+ if (partTypeCustom.value == "LINUX-SWAP")
+ swapPart.push(nPart);
} else {
logicalCode += " " + partType.value;
+ // Partición swap
+ if (partType.value == "LINUX-SWAP")
+ swapPart.push(nPart);
}
var partSize=eval("form.size"+nPart);
if (partSize.value == "CUSTOM" ) {
@@ -247,25 +273,36 @@ partCode += " EMPTY:0";
partCode += logicalCode;
}
+ // Formateo de la partición swap
+ if (swapPart.length > 0) {
+ for (var i=0; i < swapPart.length; i++) {
+ swapCode += "ogEcho session log \"$MSG_HELP_ogFormat "+n_disk+" "+swapPart[i]+" LINUX-SWAP \" \n " ;
+ swapCode += "ogExecAndLog command session log ogFormat "+n_disk+" "+swapPart[i]+" LINUX-SWAP \n ";
+ }
+
+ }
+
form.codigo.value="\
-" + sizecacheCode + " \
-ogCreatePartitionTable "+n_disk+" "+tipo_part_table +" \n \
-ogEcho log session \"[0] $MSG_HELP_ogCreatePartitions \"\n \
+" + sizecacheCode + " \n \
ogEcho session \"[10] $MSG_HELP_ogUnmountAll "+n_disk+"\"\n \
-ogUnmountAll "+n_disk+" 2>/dev/null\n \
+ogUnmountAll "+n_disk+" 2>/dev/null \n \
ogUnmountCache \n \
-" + cacheCode + " \
+" + cacheCode + " \n \
ogEcho session \"[60] $MSG_HELP_ogListPartitions "+n_disk+"\"\n \
ogExecAndLog command session ogListPartitions "+n_disk+" \n \
ogEcho session \"[70] $MSG_HELP_ogCreatePartitions " + partCode + "\"\n \
-ogExecAndLog command ogCreatePartitions "+n_disk+" " + partCode + " \n \
-ogEcho session \"[80] $MSG_HELP_ogSetPartitionActive "+n_disk+" 1\"\n \
-ogSetPartitionActive "+n_disk+" 1 \n \
-ogEcho log session \"[100] $MSG_HELP_ogListPartitions "+n_disk+"\"\n \
-ogUpdatePartitionTable "+n_disk+" \n \
-ms-sys /dev/sda | grep unknow && ms-sys /dev/sda \n \
-" + cacheInit + " \
-ogExecAndLog command session log ogListPartitions "+n_disk+" \n";
+if ogExecAndLog command session ogCreatePartitions "+n_disk+" " + partCode + "; then \n \
+ ogEcho session \"[80] $MSG_HELP_ogSetPartitionActive "+n_disk+" 1\"\n \
+ ogSetPartitionActive "+n_disk+" 1 \n \
+ ogEcho log session \"[100] $MSG_HELP_ogListPartitions "+n_disk+"\"\n \
+ ogUpdatePartitionTable "+n_disk+" \n \
+ ms-sys /dev/sda | grep unknow && ms-sys /dev/sda \n \
+ ogExecAndLog command session log ogListPartitions "+n_disk+" \n \
+ "+ swapCode +"\
+else \n \
+ ogEcho session log \"[100] ERROR: $MSG_HELP_ogCreatePartitions\" \n \
+ sleep 5 \n \
+fi";
}
@@ -278,6 +315,9 @@ function codeParticionadoGPT (form) {
var extended=false;
var n_disk = form.n_disk.value;
var tipo_part_table = form.tipo_part_table.value;
+ var swapPart = new Array();
+ var swapCode = "";
+
numParts=document.getElementById("numGPTpartitions").value;
for (var nPart=1; nPart <= numParts; nPart++) {
@@ -287,15 +327,15 @@ function codeParticionadoGPT (form) {
// Solo tratamos la particion 4 como cache, si se selecciono este tipo
if(nPart == 4 && form.partGPT4.value == "CACHE") {
if (form.sizeGPT4.value == "0") {
- sizecacheCode="\
+ sizecacheCode="\
ogEcho session \"[20] $MSG_HELP_ogGetCacheSize\"\n \
-sizecache=`ogGetCacheSize` \n";
+sizecache=`ogGetCacheSize` \n ";
cacheCode="\
ogEcho session \"[30] $MSG_HELP_ogUpdatePartitionTable "+n_disk+"\"\n \
ogDeletePartitionTable "+n_disk+" \n \
ogExecAndLog command ogUpdatePartitionTable "+n_disk+" \n \
ogEcho session \"[50] $MSG_HELP_ogCreateCache\"\n \
-initCache "+ n_disk +" $sizecache &>/dev/null \n ";
+initCache "+ n_disk +" $sizecache NOMOUNT &>/dev/null \n ";
} else {
if (form.sizeGPT4.value == "CUSTOM") {
cacheSize = form.sizeGPT4custom.value;
@@ -307,15 +347,21 @@ ogEcho session \"[30] $MSG_HELP_ogUpdatePartitionTable "+n_disk+"\"\n \
ogDeletePartitionTable "+n_disk+" \n \
ogUpdatePartitionTable "+n_disk+" \n \
ogEcho session \"[50] $MSG_HELP_ogCreateCache\"\n \
-initCache " + n_disk +" "+ cacheSize + " &>/dev/null";
+initCache " + n_disk +" "+ cacheSize + " NOMOUNT &>/dev/null";
}
} else{
var partType=eval("form.partGPT"+nPart);
if (partType.value == "CUSTOM" ) {
var partTypeCustom=eval("form.partGPT"+nPart+"custom");
partCode += " " + partTypeCustom.value;
+ // Partición swap
+ if (partTypeCustom.value == "LINUX-SWAP")
+ swapPart.push(nPart);
} else {
partCode += " " + partType.value;
+ // Partición swap
+ if (partType.value == "LINUX-SWAP")
+ swapPart.push(nPart);
}
var partSize=eval("form.sizeGPT"+nPart);
if (partSize.value == "CUSTOM" ) {
@@ -337,6 +383,14 @@ partCode += " EMPTY:0";
}
}
}
+ // Formateo de la partición swap
+ if (swapPart.length > 0) {
+ for (var i=0; i < swapPart.length; i++) {
+ swapCode += " ogEcho session log \"$MSG_HELP_ogFormat "+n_disk+" "+swapPart[i]+" LINUX-SWAP \" \n" ;
+ swapCode += " ogExecAndLog command session log ogFormat "+n_disk+" "+swapPart[i]+" LINUX-SWAP \n";
+ }
+ }
+
form.codigo.value="\
" + sizecacheCode + " \n \
ogCreatePartitionTable "+n_disk+" "+tipo_part_table +" \n \
@@ -354,7 +408,10 @@ ogSetPartitionActive "+n_disk+" 1 \n \
ogEcho log session \"[100] $MSG_HELP_ogListPartitions "+n_disk+"\"\n \
ogUpdatePartitionTable "+n_disk+" \n \
ms-sys /dev/sda | grep unknow && ms-sys /dev/sda \n \
-ogExecAndLog command session log ogListPartitions "+n_disk+" \n";
+ogExecAndLog command session log ogListPartitions "+n_disk+" \n";
+
+// Formateo de la swap
+form.codigo.value += swapCode;
}
@@ -363,8 +420,19 @@ function showPartitionForm (tipo_table_part) {
if(tipo_table_part == "MSDOS"){
// De los dos tipos, se oculta el otro
document.getElementById("formGPT").style.display="none";
+ document.getElementById("warngpt").style.display="none";
} else{
document.getElementById("formMSDOS").style.display="none";
+ // Para GPT obliga que primera partición sea EFI
+ document.getElementById("checkGPT1").checked=true;
+ document.getElementById("checkGPT1").disabled=true;
+ document.getElementById("partGPT1").value="CUSTOM";
+ document.getElementById("partGPT1custom").value="EFI";
+ document.getElementById("sizeGPT1").value="CUSTOM";
+ document.getElementById("sizeGPT1").disabled=false;
+ document.getElementById("sizeGPT1custom").value="512000";
+ document.getElementById("sizeGPT1custom").disabled=false;
+ document.getElementById("warngpt").style.display="table-row";
}
}
@@ -430,6 +498,30 @@ function getMinDiskSize(disk){
return (minSize > 1024 ? minSize - 1024 : minSize)
}
+// Calcula el tamaño de la mayor cache y lo guarda en un campo oculto
+function getMaxCacheSize() {
+ var cacheSizeArray = document.getElementsByName("cachesize");
+ var maxSize = cacheSizeArray[0].value;
+ for(var i= 1; i < cacheSizeArray.length; i++){
+ if(maxSize < cacheSizeArray[i].value)
+ maxSize = cacheSizeArray[i].value;
+ }
+ document.getElementById("maxcachesize").value = maxSize;
+ return
+
+}
+
+
+// Comprueba que la cache quepa en el espacio libre del disco
+function validaCache (freedisk) {
+ var form = document.fdatos;
+ var maxcachesize = parseInt(document.getElementById("maxcachesize").value);
+ if(form.part4.value == "CACHE" && form.check4.checked && form.size4.value == 0 ){
+ return (freedisk - maxcachesize > 0 ? true : false);
+ }
+ return true;
+}
+
// Código para calcular el espacio libre del disco.
function calculateFreeDisk(form) {
// Si esta seleccionada la opcion GPT, se llama a la funcion correspondiente
@@ -616,3 +708,4 @@ function checkExtendedPartition(form) {
}
}
+
diff --git a/admin/WebConsole/asistentes/xajax.server.php b/admin/WebConsole/asistentes/xajax.server.php
index 6f93f685..b4f26585 100644
--- a/admin/WebConsole/asistentes/xajax.server.php
+++ b/admin/WebConsole/asistentes/xajax.server.php
@@ -87,7 +87,7 @@ function ListarOrigenMaster($ip){
//Tercera consulta: Imagenes del REPO, que el MASTER se encargara de enivarlas
$cmd->texto='SELECT *,repositorios.ip as iprepositorio FROM imagenes
INNER JOIN repositorios ON repositorios.idrepositorio=imagenes.idrepositorio
-where repositorios.idrepositorio=(select idrepositorio from ordenadores where ordenadores.ip="' .$ip .'")';
+where repositorios.idrepositorio=(select idrepositorio from ordenadores where ordenadores.ip="' .$ip .'") ORDER BY imagenes.descripcion';
$rs->Comando=&$cmd;
@@ -98,7 +98,7 @@ where repositorios.idrepositorio=(select idrepositorio from ordenadores where or
while (!$rs->EOF){
$SelectHtml.='<OPTION value=" REPO /'.$rs->campos["nombreca"].'"';
$SelectHtml.='>';
- $SelectHtml.='IMG-REPO: ' . $rs->campos["nombreca"].'</OPTION>';
+ $SelectHtml.='IMG-REPO: ' . $rs->campos["descripcion"].'</OPTION>';
$rs->Siguiente();
}
}
diff --git a/admin/WebConsole/barramenu.php b/admin/WebConsole/barramenu.php
index f7a669e7..36bf2e1e 100644
--- a/admin/WebConsole/barramenu.php
+++ b/admin/WebConsole/barramenu.php
@@ -177,71 +177,71 @@ if (!$cmd)
<TABLE class=menupral align=left cellPadding=1 cellSpacing=0 >
<TR valign=baseline>
<TD width=10><IMG src="./images/iconos/pomo.gif"></TD>
- <? if($idtipousuario!=$SUPERADMINISTRADOR){?>
+ <?php if($idtipousuario!=$SUPERADMINISTRADOR){?>
<TD onclick=eleccion(this,1) onmouseout=desresaltar(this) onmouseover=resaltar(this) >
- &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/centros.gif">&nbsp;<SPAN class="menupral"><?echo $TbMsg[0]?></SPAN></A>&nbsp;</TD>
+ &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/centros.gif">&nbsp;<SPAN class="menupral"><?php echo $TbMsg[0]?></SPAN></A>&nbsp;</TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD onclick=eleccion(this,2) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
- &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/acciones.gif">&nbsp;<SPAN class=menupral ><?echo $TbMsg[1]?></SPAN></A>&nbsp;</TD>
+ &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/acciones.gif">&nbsp;<SPAN class=menupral ><?php echo $TbMsg[1]?></SPAN></A>&nbsp;</TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD onclick=eleccion(this,3) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
- &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/imagenes.gif">&nbsp;<SPAN class=menupral ><?echo $TbMsg[2]?></SPAN></A>&nbsp;</TD>
+ &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/imagenes.gif">&nbsp;<SPAN class=menupral ><?php echo $TbMsg[2]?></SPAN></A>&nbsp;</TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD onclick=eleccion(this,4) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
- &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/confihard.gif">&nbsp;<SPAN class=menupral ><?echo $TbMsg[3] ?></SPAN></A>&nbsp;</TD>
+ &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/confihard.gif">&nbsp;<SPAN class=menupral ><?php echo $TbMsg[3] ?></SPAN></A>&nbsp;</TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD onclick=eleccion(this,5) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
- &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/confisoft.gif">&nbsp;<SPAN class=menupral ><?echo $TbMsg[4] ?></SPAN></A>&nbsp;</TD>
+ &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/confisoft.gif">&nbsp;<SPAN class=menupral ><?php echo $TbMsg[4] ?></SPAN></A>&nbsp;</TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD onclick=eleccion(this,6) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
- &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/repositorio.gif">&nbsp;<SPAN class=menupral ><?echo $TbMsg[5] ?></SPAN></A>&nbsp;</TD>
+ &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/repositorio.gif">&nbsp;<SPAN class=menupral ><?php echo $TbMsg[5] ?></SPAN></A>&nbsp;</TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD onclick=eleccion(this,7) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
- &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/menus.gif">&nbsp;<SPAN class=menupral ><?echo $TbMsg[6] ?></SPAN></A>&nbsp;</TD>
+ &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/menus.gif">&nbsp;<SPAN class=menupral ><?php echo $TbMsg[6] ?></SPAN></A>&nbsp;</TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<td onclick="eleccion(this,14)" onmouseout="desresaltar(this)" onmouseover="resaltar(this)" align="middle">
- &nbsp;<a href="#" style="text-decoration: none"><img border="0" src="./images/iconos/busquedas.gif">&nbsp;<span class="menupral"><?echo $TbMsg[14] ?></span></a>&nbsp;</td>
+ &nbsp;<a href="#" style="text-decoration: none"><img border="0" src="./images/iconos/busquedas.gif">&nbsp;<span class="menupral"><?php echo $TbMsg[14] ?></span></a>&nbsp;</td>
<td width="4" align="middle"><img src="./images/iconos/separitem.gif"></td>
<!--TD onclick=eleccion(this,8) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
- &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/reservas.gif">&nbsp;<SPAN class=menupral ><?echo $TbMsg[7] ?></SPAN></A>&nbsp;</TD>
+ &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/reservas.gif">&nbsp;<SPAN class=menupral ><?php echo $TbMsg[7] ?></SPAN></A>&nbsp;</TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD-->
- <? }
+ <?php }
else{
if($idtipousuario==$SUPERADMINISTRADOR){?>
<TD onclick=eleccion(this,9) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>&nbsp;
<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/administracion.gif">
- <SPAN class=menupral ><?echo $TbMsg[8] ?></SPAN></A>&nbsp;</TD>
+ <SPAN class=menupral ><?php echo $TbMsg[8] ?></SPAN></A>&nbsp;</TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD onclick=eleccion(this,10) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>&nbsp;
<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/iconos.gif">
- <SPAN class=menupral ><?echo $TbMsg[9] ?></SPAN></A>&nbsp;</TD>
+ <SPAN class=menupral ><?php echo $TbMsg[9] ?></SPAN></A>&nbsp;</TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD onclick=eleccion(this,11) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>&nbsp;
<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/tablas.gif">
- <SPAN class=menupral ><?echo $TbMsg[15] ?></SPAN></A>&nbsp;</TD>
+ <SPAN class=menupral ><?php echo $TbMsg[15] ?></SPAN></A>&nbsp;</TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
- <?}?>
- <?}?>
+ <?php }?>
+ <?php }?>
<TD onclick=eleccion(this,22) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
- &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/ayuda.gif">&nbsp;<SPAN class=menupral ><?echo $TbMsg[11] ?></SPAN></A>&nbsp;</TD>
+ &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/ayuda.gif">&nbsp;<SPAN class=menupral ><?php echo $TbMsg[11] ?></SPAN></A>&nbsp;</TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD onclick=eleccion(this,23) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
- &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/logocirculos.png">&nbsp;<SPAN class=menupral ><?echo $TbMsg[17] ?></SPAN></A>&nbsp;</TD>
+ &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/logocirculos.png">&nbsp;<SPAN class=menupral ><?php echo $TbMsg[17] ?></SPAN></A>&nbsp;</TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
<TD onclick=eleccion(this,21) onmouseout=desresaltar(this) onmouseover=resaltar(this) align=middle>
- &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/usuarioslog.gif">&nbsp;<SPAN class=menupral ><?echo $TbMsg[10] ?></SPAN></A>&nbsp;</TD>
+ &nbsp;<A href="#" style="text-decoration: none"><IMG border=0 src="./images/iconos/usuarioslog.gif">&nbsp;<SPAN class=menupral ><?php echo $TbMsg[10] ?></SPAN></A>&nbsp;</TD>
<TD width=4 align=middle><IMG src="./images/iconos/separitem.gif"></TD>
diff --git a/admin/WebConsole/clases/AdoPhp.php b/admin/WebConsole/clases/AdoPhp.php
index b48032d1..e7daad17 100644
--- a/admin/WebConsole/clases/AdoPhp.php
+++ b/admin/WebConsole/clases/AdoPhp.php
@@ -332,17 +332,19 @@ class Comando{
tipo = tipo de parametro:
0: El valor del par�etro debe ir encerrado entre comillas simples
1: El valor del par�etro no necesita ir entre comillas simples
-
+ Versión 1.1: Al incluir los valores se escapan caracteres especiales (ticket #777)
+ Autor: Irina Gómez - ETSII, Universidad de Sevilla
+ Fecha: 2017-03-30
---------------------------------------------------------------------------------------------*/
function CreaParametro($nombre,$valor,$tipo){
for($i=0;$i<sizeof($this->parametros);$i++){
if($this->parametros[$i]["nombre"]==$nombre){
- $this->parametros[$i]["valor"]=$valor;
+ $this->parametros[$i]["valor"]=mysql_real_escape_string($valor);
return;
}
}
- $p = new parametro($nombre,$valor,$tipo);
+ $p = new parametro($nombre,mysql_real_escape_string($valor),$tipo);
$this->AddParametro($p);
}
@@ -351,11 +353,14 @@ class Comando{
Par�etros de entrada:
nombre: El nombre del par�etro
valor : El nuevo valor del par�etro
+ Versión 1.1: Al incluir los valores se escapan caracteres especiales (ticket #777)
+ Autor: Irina Gómez - ETSII, Universidad de Sevilla
+ Fecha: 2017-03-30
---------------------------------------------------------------------------------------------*/
function ParamSetValor($nombre,$valor){
for($i=0;$i<sizeof($this->parametros);$i++){
if($this->parametros[$i]["nombre"]==$nombre)
- $this->parametros[$i]["valor"]=$valor;
+ $this->parametros[$i]["valor"]=mysql_real_escape_string($valor);
}
}
/* -------------------------------------------------------------------------------------------
diff --git a/admin/WebConsole/clases/ArbolVistaXML.php b/admin/WebConsole/clases/ArbolVistaXML.php
index 6de54069..3da6bb83 100644
--- a/admin/WebConsole/clases/ArbolVistaXML.php
+++ b/admin/WebConsole/clases/ArbolVistaXML.php
@@ -1,4 +1,4 @@
-<?
+<?php
include_once("XmlPhp.php");
/*===============================================================
Esta clase implementa la apariencia y comportamiento de un treeview en código HTML y javascript.
diff --git a/admin/WebConsole/clases/XmlPhp.php b/admin/WebConsole/clases/XmlPhp.php
index 0e84d0f7..5ee3e9a9 100644
--- a/admin/WebConsole/clases/XmlPhp.php
+++ b/admin/WebConsole/clases/XmlPhp.php
@@ -1,4 +1,4 @@
-<?
+<?php
/*================================================================================
Esta clase implementa funciones de utilidad para tratar ficheros XML
diff --git a/admin/WebConsole/comandos/Apagar.php b/admin/WebConsole/comandos/Apagar.php
index dbf9e50e..284b9cd0 100644
--- a/admin/WebConsole/comandos/Apagar.php
+++ b/admin/WebConsole/comandos/Apagar.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -34,10 +34,10 @@ if (!$cmd)
<SCRIPT language="javascript" src="./jscripts/Apagar.js"></SCRIPT>
<SCRIPT language="javascript" src="./jscripts/comunescomandos.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
-<?
+<?php
echo '<p align=center><span class=cabeceras>'.$TbMsg[5].'&nbsp;</span><br>';
//________________________________________________________________________________________________________
//
diff --git a/admin/WebConsole/comandos/Arrancar.php b/admin/WebConsole/comandos/Arrancar.php
index 09c0b673..a73e2d7f 100644
--- a/admin/WebConsole/comandos/Arrancar.php
+++ b/admin/WebConsole/comandos/Arrancar.php
@@ -34,7 +34,7 @@ if (!$cmd)
<SCRIPT language="javascript" src="./jscripts/Arrancar.js"></SCRIPT>
<SCRIPT language="javascript" src="./jscripts/comunescomandos.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<?php
@@ -43,7 +43,7 @@ if (!$cmd)
//
include_once("./includes/FiltradoAmbito.php");
?>
- <P align=center><SPAN align=center class=subcabeceras><? echo $TbMsg[7] ?></SPAN></p>
+ <P align=center><SPAN align=center class=subcabeceras><?php echo $TbMsg[7] ?></SPAN></p>
</BR>
<TABLE id="tabla_conf" align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<TR>
diff --git a/admin/WebConsole/comandos/Comando.php b/admin/WebConsole/comandos/Comando.php
index f9c53257..d4e7eff8 100644
--- a/admin/WebConsole/comandos/Comando.php
+++ b/admin/WebConsole/comandos/Comando.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -33,10 +33,10 @@ if (!$cmd)
<LINK rel="stylesheet" type="text/css" href="../estilos.css">
<SCRIPT language="javascript" src="./jscripts/Comando.js"></SCRIPT>
<SCRIPT language="javascript" src="./jscripts/comunescomandos.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
-<?
+<?php
switch($ambito){
case $AMBITO_CENTROS :
$urlimg='../images/iconos/centros.gif';
diff --git a/admin/WebConsole/comandos/Configurar.php b/admin/WebConsole/comandos/Configurar.php
index c6d3cd73..6ce89cfa 100644
--- a/admin/WebConsole/comandos/Configurar.php
+++ b/admin/WebConsole/comandos/Configurar.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -17,6 +17,7 @@ include_once("../includes/HTMLSELECT.php");
include_once("../includes/HTMLCTESELECT.php");
include_once("../includes/TomaDato.php");
include_once("../includes/RecopilaIpesMacs.php");
+include_once("../idiomas/php/".$idioma."/avisos_".$idioma.".php");
include_once("../idiomas/php/".$idioma."/comandos/configurar_".$idioma.".php");
include_once("../idiomas/php/".$idioma."/comandos/opcionesacciones_".$idioma.".php");
include_once("../includes/ConfiguracionesParticiones.php");
@@ -61,11 +62,11 @@ if (isset($_POST["fk_nombreSO"])) $fk_nombreSO=$_POST["fk_nombreSO"];
<SCRIPT language="javascript" src="./jscripts/comunescomandos.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/configurar_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/configurar_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
-<?
+<?php
echo '<p align=center><span class=cabeceras>'.$TbMsg[5].'&nbsp;</span><br>';
//________________________________________________________________________________________________________
//
@@ -82,24 +83,24 @@ if (isset($_POST["fk_nombreSO"])) $fk_nombreSO=$_POST["fk_nombreSO"];
?>
<FORM action="Configurar.php" name="fdatos" method="POST">
- <INPUT type="hidden" name="idambito" value="<? echo $idambito?>">
- <INPUT type="hidden" name="ambito" value="<? echo $ambito?>">
- <INPUT type="hidden" name="cadenaid" value="<? echo $cadenaid?>">
+ <INPUT type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <INPUT type="hidden" name="ambito" value="<?php echo $ambito?>">
+ <INPUT type="hidden" name="cadenaid" value="<?php echo $cadenaid?>">
<TABLE class="tabla_busquedas" align=center border=0 cellPadding=0 cellSpacing=0>
<TR>
- <TH height=15 align="center" colspan=14><? echo $TbMsg[18]?></TH>
+ <TH height=15 align="center" colspan=14><?php echo $TbMsg[18]?></TH>
</TR>
<TR>
- <TD align=right><? echo $TbMsg[30]?></TD>
- <TD align=center><INPUT type="checkbox" value="<? echo $msk_sysFi?>" name="fk_sysFi" <? if($fk_sysFi==$msk_sysFi) echo " checked "?>></TD>
+ <TD align=right><?php echo $TbMsg[30]?></TD>
+ <TD align=center><INPUT type="checkbox" value="<?php echo $msk_sysFi?>" name="fk_sysFi" <?php if($fk_sysFi==$msk_sysFi) echo " checked "?>></TD>
<TD width="20" align=center>&nbsp;</TD>
- <TD align=right><? echo $TbMsg[32]?></TD>
- <TD align=center><INPUT type="checkbox" value="<? echo $msk_tamano?>" name="fk_tamano" <? if($fk_tamano==$msk_tamano) echo " checked "?>></TD>
+ <TD align=right><?php echo $TbMsg[32]?></TD>
+ <TD align=center><INPUT type="checkbox" value="<?php echo $msk_tamano?>" name="fk_tamano" <?php if($fk_tamano==$msk_tamano) echo " checked "?>></TD>
<TD width="20" align=center>&nbsp;</TD>
- <TD align=right><? echo $TbMsg[31]?></TD>
- <TD align=center><INPUT type="checkbox" value="<? echo $msk_nombreSO?>" name="fk_nombreSO" <? if($fk_nombreSO==$msk_nombreSO) echo " checked "?>></TD>
+ <TD align=right><?php echo $TbMsg[31]?></TD>
+ <TD align=center><INPUT type="checkbox" value="<?php echo $msk_nombreSO?>" name="fk_nombreSO" <?php if($fk_nombreSO==$msk_nombreSO) echo " checked "?>></TD>
<TD width="20" align=center>&nbsp;</TD>
</TR>
<TR>
@@ -108,11 +109,11 @@ if (isset($_POST["fk_nombreSO"])) $fk_nombreSO=$_POST["fk_nombreSO"];
<TR>
<TD height=20 align="center" colspan=14>
<A href=#>
- <IMG border=0 src="../images/boton_confirmar_<? echo $idioma ?>.gif" onclick="document.fdatos.submit()"></A></TD>
+ <IMG border=0 src="../images/boton_confirmar_<?php echo $idioma ?>.gif" onclick="document.fdatos.submit()"></A></TD>
</TR>
</TABLE>
</FORM>
-<?
+<?php
}
$sws=$fk_sysFi | $fk_tamano | $fk_nombreSO;
@@ -138,7 +139,7 @@ if (isset($_POST["fk_nombreSO"])) $fk_nombreSO=$_POST["fk_nombreSO"];
?>
</BODY>
</HTML>
-<?
+<?php
/*________________________________________________________________________________________________________
Crea la etiqueta html <SELECT> de los número de particiones
@@ -149,7 +150,7 @@ function HTMLSELECT_particiones($p)
$SelectHtml="";
$opciones="";
- for($i=0;$i<8;$i++)
+ for($i=0;$i<9;$i++)
$opciones.="$i=$i".chr(13);
$opciones.="$i=$i";
$SelectHtml.=HTMLCTESELECT($opciones,"particiones","estilodesple","",$p,40,"");
diff --git a/admin/WebConsole/comandos/CrearImagen.php b/admin/WebConsole/comandos/CrearImagen.php
index 8e741bac..37a43128 100644
--- a/admin/WebConsole/comandos/CrearImagen.php
+++ b/admin/WebConsole/comandos/CrearImagen.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -33,18 +33,18 @@ if (!$resul){
//________________________________________________________________________________________________________
?>
<HTML>
-<TITLE>Administración web de aulas</TITLE>
<HEAD>
+<TITLE>Administración web de aulas</TITLE>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<LINK rel="stylesheet" type="text/css" href="../estilos.css">
<SCRIPT language="javascript" src="./jscripts/CrearImagen.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/crearimagen_'.$idioma.'.js"></SCRIPT>'?>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/crearimagen_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
<SCRIPT language="javascript" src="./jscripts/comunescomandos.js"></SCRIPT>
</HEAD>
<BODY>
-<?
+<?php
$urlimg='../images/iconos/ordenador.gif';
$textambito=$TbMsg[15];
@@ -52,13 +52,13 @@ if (!$resul){
echo '<IMG src="'.$urlimg.'">&nbsp;&nbsp;<span align=center class=subcabeceras>
<U>'.$TbMsg[14].': '.$textambito.','.$nombreambito.'</U></span>&nbsp;&nbsp;</span></p>';
?>
-<P align=center><SPAN align=center class=subcabeceras><? echo $TbMsg[6] ?></SPAN></P>
+<P align=center><SPAN align=center class=subcabeceras><?php echo $TbMsg[6] ?></SPAN></P>
<FORM align=center name="fdatos">
- <? echo tablaConfiguracionesCrearImagen($cmd,$idambito,$idrepositorio); ?>
+ <?php echo tablaConfiguracionesCrearImagen($cmd,$idambito,$idrepositorio); ?>
</FORM>
-<?
+<?php
//________________________________________________________________________________________________________
include_once("./includes/formularioacciones.php");
//________________________________________________________________________________________________________
@@ -68,7 +68,7 @@ if (!$resul){
?>
</BODY>
</HTML>
-<?
+<?php
/**************************************************************************************************************************************************
Recupera los datos de un ordenador
Parametros:
@@ -108,11 +108,12 @@ function HTMLSELECT_imagenes($cmd,$idrepositorio,$idperfilsoft,$disk,$particion,
{
global $IMAGENES_MONOLITICAS;
$SelectHtml="";
- $cmd->texto="SELECT imagenes.idimagen,imagenes.descripcion,imagenes.nombreca,
- imagenes.idperfilsoft, repositorios.nombrerepositorio
- FROM imagenes INNER JOIN repositorios on imagenes.idrepositorio = repositorios.idrepositorio
- WHERE imagenes.tipo=".$IMAGENES_MONOLITICAS."
- AND imagenes.idrepositorio=".$idrepositorio ." OR repositorios.ip='" .$masterip ."'";
+ $cmd->texto="SELECT DISTINCT imagenes.idimagen,imagenes.descripcion,imagenes.nombreca,
+ imagenes.idperfilsoft, repositorios.nombrerepositorio, repositorios.ip
+ FROM imagenes INNER JOIN repositorios USING (idrepositorio)
+ WHERE repositorios.idrepositorio = (SELECT idrepositorio FROM ordenadores WHERE ordenadores.ip='".$masterip."')
+ OR repositorios.ip='".$masterip."' ORDER BY imagenes.descripcion";
+
$rs=new Recordset;
$rs->Comando=&$cmd;
$SelectHtml.= '<SELECT class="formulariodatos" id="despleimagen_'.$disk."_".$particion.'" style="WIDTH: 300">';
@@ -120,7 +121,7 @@ function HTMLSELECT_imagenes($cmd,$idrepositorio,$idperfilsoft,$disk,$particion,
if ($rs->Abrir()){
$rs->Primero();
while (!$rs->EOF){
- $SelectHtml.='<OPTION value="'.$rs->campos["idimagen"]."_".$rs->campos["nombreca"]."_".$rs->campos["nombreca"].'"';
+ $SelectHtml.='<OPTION value="'.$rs->campos["idimagen"]."_".$rs->campos["nombreca"]."_".$rs->campos["ip"].'"';
if($idperfilsoft==$rs->campos["idperfilsoft"]) $SelectHtml.=" selected ";
$SelectHtml.='>';
$SelectHtml.= $rs->campos["descripcion"]. ' -- '. $rs->campos['nombrerepositorio'] . '</OPTION>';
@@ -131,31 +132,4 @@ function HTMLSELECT_imagenes($cmd,$idrepositorio,$idperfilsoft,$disk,$particion,
$SelectHtml.= '</SELECT>';
return($SelectHtml);
}
-
-/*________________________________________________________________________________________________________
- Crea la etiqueta html <SELECT> de los repositorios
- UHU - 2013/05/17 - Ahora las imagenes pueden ser en cualquier disco
-________________________________________________________________________________________________________*/
-function HTMLSELECT_repositorios($cmd,$idcentro,$idrepositorio,$disk,$particion,$masterip){
- $SelectHtml="";
- $rs=new Recordset;
- $cmd->texto='SELECT idrepositorio, nombrerepositorio, ip FROM repositorios WHERE idrepositorio="'.$idrepositorio .'" OR ip="'.$masterip.'"';
- $rs->Comando=&$cmd;
-
- if (!$rs->Abrir()) return($SelectHtml); // Error al abrir recordset
- $SelectHtml.= '<SELECT class="formulariodatos" id="desplerepositorios_'.$disk."_".$particion.'" style="WIDTH: 250">';
- $rs->Primero();
- while (!$rs->EOF){
- $SelectHtml.='<OPTION value="'.$rs->campos["ip"].'"';
- if($rs->campos["idrepositorio"]==$idrepositorio) $SelectHtml.=" selected ";
- $SelectHtml.='>';
- $SelectHtml.= $rs->campos["nombrerepositorio"];
- $SelectHtml.='</OPTION>';
- $rs->Siguiente();
- }
- $SelectHtml.= '</SELECT>';
- $rs->Cerrar();
- return($SelectHtml);
-}
-
?>
diff --git a/admin/WebConsole/comandos/CrearImagenBasica.php b/admin/WebConsole/comandos/CrearImagenBasica.php
index f9937f66..875aeb40 100644
--- a/admin/WebConsole/comandos/CrearImagenBasica.php
+++ b/admin/WebConsole/comandos/CrearImagenBasica.php
@@ -49,30 +49,30 @@ if (!$resul){
<!------------------------------------------------------------------------------------------
Cabecera
------------------------------------------------------------------------------------------->
- <P align=center class=cabeceras><? echo $TbMsg[0] ?><P>
+ <P align=center class=cabeceras><?php echo $TbMsg[0] ?><P>
<P align=center>
- <SPAN align=center class=subcabeceras><? echo $TbMsg[1] ?></SPAN>
+ <SPAN align=center class=subcabeceras><?php echo $TbMsg[1] ?></SPAN>
</BR>
<TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<TR>
- <TH align=center>&nbsp;<? echo $TbMsg[2] ?>&nbsp;</TD>
- <? echo '<TD>'.$nombreordenador.'</TD>';?>
+ <TH align=center>&nbsp;<?php echo $TbMsg[2] ?>&nbsp;</TD>
+ <?php echo '<TD>'.$nombreordenador.'</TD>';?>
<TD colspan=2 valign=top align=left rowspan=3><IMG border=2 style="border-color:#63676b" src="../images/fotoordenador.gif"></TD>
</TR>
<TR>
- <TH align=center>&nbsp;<? echo $TbMsg[3] ?>&nbsp;</TD>
- <? echo '<TD>'.$ip.'</TD>';?>
+ <TH align=center>&nbsp;<?php echo $TbMsg[3] ?>&nbsp;</TD>
+ <?php echo '<TD>'.$ip.'</TD>';?>
</TR>
<TR>
- <TH align=center>&nbsp;<? echo $TbMsg[4] ?>&nbsp;</TD>
- <? echo '<TD>'.$mac.'</TD>';?>
+ <TH align=center>&nbsp;<?php echo $TbMsg[4] ?>&nbsp;</TD>
+ <?php echo '<TD>'.$mac.'</TD>';?>
</TR>
</TABLE>
</P>
<!------------------------------------------------------------------------------------------
Subcabecera
------------------------------------------------------------------------------------------->
- <P align=center><SPAN align=center class=subcabeceras><? echo $TbMsg[6] ?></SPAN></p>
+ <P align=center><SPAN align=center class=subcabeceras><?php echo $TbMsg[6] ?></SPAN></p>
<FORM align=center name="fdatos">
<TABLE width=90% align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<TR>
@@ -88,17 +88,17 @@ if (!$resul){
<!------------------------------------------------------------------------------------------
Detalle
------------------------------------------------------------------------------------------->
- <?
+ <?php
$tbPar=tablaConfiguracionesSincronizacion1($idambito);
?>
</TABLE>
- <input type=hidden id="cadPar" value="<? echo $tbPar ?>">
+ <input type=hidden id="cadPar" value="<?php echo $tbPar ?>">
<br>
- <?
+ <?php
opcionesAdicionales();
?>
</FORM>
-<?
+<?php
//---------------------------------------------------------------------------------------------
// Pie
//----------------------------------------------------------------------------------------------
@@ -107,7 +107,7 @@ if (!$resul){
?>
</BODY>
</HTML>
-<?
+<?php
//*********************************************************************************************
// FUNCIONES
//*********************************************************************************************
diff --git a/admin/WebConsole/comandos/CrearSoftIncremental.php b/admin/WebConsole/comandos/CrearSoftIncremental.php
index 69022ed3..87c3cb69 100644
--- a/admin/WebConsole/comandos/CrearSoftIncremental.php
+++ b/admin/WebConsole/comandos/CrearSoftIncremental.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicaci�n WEB: ogAdmWebCon
// Autor: Jos� Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -42,38 +42,38 @@ if (!$resul){
<LINK rel="stylesheet" type="text/css" href="../estilos.css">
<SCRIPT language="javascript" src="./jscripts/CrearSoftIncremental.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/crearsoftincremental_'.$idioma.'.js"></SCRIPT>'?>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/crearsoftincremental_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
<SCRIPT language="javascript" src="./jscripts/comunescomandos.js"></SCRIPT>
</HEAD>
<BODY>
<!------------------------------------------------------------------------------------------
Cabecera
------------------------------------------------------------------------------------------->
- <P align=center class=cabeceras><? echo $TbMsg[0] ?><P>
+ <P align=center class=cabeceras><?php echo $TbMsg[0] ?><P>
<P align=center>
- <SPAN align=center class=subcabeceras><? echo $TbMsg[1] ?></SPAN>
+ <SPAN align=center class=subcabeceras><?php echo $TbMsg[1] ?></SPAN>
</BR>
<TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<TR>
- <TH align=center>&nbsp;<? echo $TbMsg[2] ?>&nbsp;</TD>
- <? echo '<TD>'.$nombreordenador.'</TD>';?>
+ <TH align=center>&nbsp;<?php echo $TbMsg[2] ?>&nbsp;</TD>
+ <?php echo '<TD>'.$nombreordenador.'</TD>';?>
<TD colspan=2 valign=top align=left rowspan=3><IMG border=2 style="border-color:#63676b" src="../images/fotoordenador.gif"></TD>
</TR>
<TR>
- <TH align=center>&nbsp;<? echo $TbMsg[3] ?>&nbsp;</TD>
- <? echo '<TD>'.$ip.'</TD>';?>
+ <TH align=center>&nbsp;<?php echo $TbMsg[3] ?>&nbsp;</TD>
+ <?php echo '<TD>'.$ip.'</TD>';?>
</TR>
<TR>
- <TH align=center>&nbsp;<? echo $TbMsg[4] ?>&nbsp;</TD>
- <? echo '<TD>'.$mac.'</TD>';?>
+ <TH align=center>&nbsp;<?php echo $TbMsg[4] ?>&nbsp;</TD>
+ <?php echo '<TD>'.$mac.'</TD>';?>
</TR>
</TABLE>
</P>
<!------------------------------------------------------------------------------------------
Subcabecera
------------------------------------------------------------------------------------------->
- <P align=center><SPAN align=center class=subcabeceras><? echo $TbMsg[6] ?></SPAN></p>
+ <P align=center><SPAN align=center class=subcabeceras><?php echo $TbMsg[6] ?></SPAN></p>
<FORM align=center name="fdatos">
<TABLE width=90% align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<TR>
@@ -89,17 +89,17 @@ if (!$resul){
<!------------------------------------------------------------------------------------------
Detalle
------------------------------------------------------------------------------------------->
- <?
+ <?php
$tbPar=tablaConfiguracionesSincronizacion1($idambito);
?>
</TABLE>
- <input type=hidden id="cadPar" value="<? echo $tbPar ?>">
+ <input type=hidden id="cadPar" value="<?php echo $tbPar ?>">
<br>
- <?
+ <?php
opcionesAdicionales();
?>
</FORM>
-<?
+<?php
//---------------------------------------------------------------------------------------------
// Pie
//----------------------------------------------------------------------------------------------
@@ -108,7 +108,7 @@ if (!$resul){
?>
</BODY>
</HTML>
-<?
+<?php
//*********************************************************************************************
// FUNCIONES
//*********************************************************************************************
diff --git a/admin/WebConsole/comandos/EjecutarScripts.php b/admin/WebConsole/comandos/EjecutarScripts.php
index 7ffba2e2..539e78c4 100644
--- a/admin/WebConsole/comandos/EjecutarScripts.php
+++ b/admin/WebConsole/comandos/EjecutarScripts.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -33,11 +33,11 @@ if (!$cmd)
<SCRIPT language="javascript" src="./jscripts/EjecutarScripts.js"></SCRIPT>
<SCRIPT language="javascript" src="./jscripts/comunescomandos.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/ejecutarscripts_'.$idioma.'.js"></SCRIPT>'?>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/ejecutarscripts_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
-<?
+<?php
echo '<p align=center><span class=cabeceras>'.$TbMsg[5].'&nbsp;</span><br>';
//________________________________________________________________________________________________________
//
@@ -45,15 +45,22 @@ if (!$cmd)
//________________________________________________________________________________________________________
?>
<P align=center>
- <SPAN align=center class=subcabeceras><? echo $TbMsg[10] ?></SPAN>
+ <SPAN align=center class=subcabeceras><?php echo $TbMsg[10] ?></SPAN>
<form align=center name="fdatos">
<table align=center class=tabla_datos border="0" cellpadding="0" cellspacing="1">
+ <tr>
+ <th><?php echo $TbMsg[12] ?></th>
+ <td><input type="radio" name="modoejecucion" value="false"><?php echo $TbMsg[13] ?>
+ <input type="radio" name="modoejecucion" value="true" checked><?php echo $TbMsg[14] ?>
+ </td>
+ </tr>
<tr>
- <th>&nbsp;<? echo $TbMsg[9]?>&nbsp;</th>
+ <th>&nbsp;<?php echo $TbMsg[9]?>&nbsp;</th>
<td><textarea class="cajatexto" name="codigo" cols="70" rows="18"></textarea></td></tr>
+ <tr> <th align=center colspan="3"><?php echo $TbMsg[15] ?></th></tr>
</table>
</form>
- <?
+ <?php
//________________________________________________________________________________________________________
include_once("./includes/formularioacciones.php");
//________________________________________________________________________________________________________
diff --git a/admin/WebConsole/comandos/EliminarImagenCache.php b/admin/WebConsole/comandos/EliminarImagenCache.php
index 3a825a0c..5854dc6f 100644
--- a/admin/WebConsole/comandos/EliminarImagenCache.php
+++ b/admin/WebConsole/comandos/EliminarImagenCache.php
@@ -18,7 +18,7 @@ include_once("../idiomas/php/".$idioma."/comandos/eliminarimagencache_".$idioma.
include_once("../idiomas/php/".$idioma."/comandos/opcionesacciones_".$idioma.".php");
//________________________________________________________________________________________________________
include_once("./includes/capturaacciones.php");
-$funcion=EjecutarScript;
+$funcion="EjecutarScript";
$idc=$_SESSION["widcentro"];
$ipservidor=$_SERVER['SERVER_ADDR'];
//________________________________________________________________________________________________________
@@ -34,8 +34,8 @@ if (!$cmd)
<LINK rel="stylesheet" type="text/css" href="../estilos.css">
<SCRIPT language="javascript" src="./jscripts/EliminarImagenCache.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/eliminarimagencache_'.$idioma.'.js"></SCRIPT>'?>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/eliminarimagencache_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
<SCRIPT language="javascript" src="./jscripts/comunescomandos.js"></SCRIPT>
</HEAD>
<BODY>
@@ -49,6 +49,10 @@ switch($ambito){
case $AMBITO_GRUPOSAULAS :
$urlimg='../images/iconos/carpeta.gif';
$textambito=$TbMsg[1];
+ $cmd->texto="SELECT DISTINCT ordenadores.idrepositorio
+ FROM aulas
+ LEFT JOIN ordenadores ON ordenadores.idaula=aulas.idaula
+ WHERE aulas.idaula=$idambito";
break;
case $AMBITO_AULAS :
$urlimg='../images/iconos/aula.gif';
@@ -136,7 +140,7 @@ switch($ambito){
}
echo '<p align=center><span class=cabeceras>'.$TbMsg[5].'&nbsp;</span><br>';
- echo '<IMG src="'.$urlimg.'">&nbsp;&nbsp;<span align=center class=subcabeceras><U>'.$TbMsg[6].': '.$textambito.','.$nombreambito.'</U></span>&nbsp;&nbsp;</span></p>';
+ echo '<img src="'.$urlimg.'">&nbsp;&nbsp;<span align=center class=subcabeceras><u>'.$textambito.': '.$nombreambito.'</u></span>&nbsp;&nbsp;</span></p>';
?>
<!-- //#agp-->
<?php
@@ -145,7 +149,7 @@ switch($ambito){
<TABLE id="tabla" align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<TR>
<TH align=center >&nbsp;
- <? if ($ambito==16){
+ <?php if ($ambito==16){
echo $TbMsg[17]."</br>".$nombreambito.$TbMsg[16]."</br>".$TbMsg[18];
}else{
echo $TbMsg[17]."</br>".$nombreambito.$TbMsg[15]."</br>".$TbMsg[18]; }
@@ -156,7 +160,7 @@ switch($ambito){
<!-- //#agp-->
<P align=center>
- <SPAN align=center class=subcabeceras><? echo $TbMsg[7] ?></SPAN>
+ <SPAN align=center class=subcabeceras><?php echo $TbMsg[7] ?></SPAN>
</P>
<form align=center name="fdatos">
@@ -282,65 +286,51 @@ function tabla_configuraciones($cmd,$idambito){
switch($ambito){
case $AMBITO_CENTROS :
$urlimg='../images/iconos/centros.gif';
- //echo "ambito - ".$ambito."<br>";
- //echo "idcentro - ".$idc;
break;
case $AMBITO_GRUPOSAULAS :
-
- $cmd->texto="SELECT * FROM grupos WHERE nombregrupo='$nombreambito' AND idcentro='$idc'";
- $rs=new Recordset;
- $rs->Comando=&$cmd;
- if (!$rs->Abrir()) return(true); // Error al abrir recordset
- $rs->Primero();
- if (!$rs->EOF){
- $identificadorgrupo=$rs->campos["idgrupo"];
- }
- $rs->Cerrar();
-
- $cmd->texto="SELECT * FROM aulas,grupos
- WHERE grupos.nombregrupo='$nombreambito'
- AND aulas.idcentro='$idc'
- AND aulas.grupoid='$identificadorgrupo'
- AND aulas.grupoid=grupos.idgrupo";
-
-
+ $cmd->texto="SELECT * FROM ordenadores,aulas,ordenadores_particiones
+ JOIN grupos USING(idgrupo)
+ JOIN sistemasficheros USING(idsistemafichero)
+ WHERE ordenadores_particiones.idordenador=ordenadores.idordenador
+ AND ordenadores.idaula=aulas.idaula
+ AND grupos.nombregrupo='$nombreambito'
+ AND grupos.idcentro='$idc'
+ AND sistemasficheros.nemonico='CACHE'";
break;
case $AMBITO_AULAS :
$cmd->texto="SELECT * FROM ordenadores,aulas,ordenadores_particiones
+ JOIN sistemasficheros USING(idsistemafichero)
WHERE ordenadores_particiones.idordenador=ordenadores.idordenador
AND ordenadores.idaula=aulas.idaula
AND aulas.nombreaula='$nombreambito'
- AND aulas.idcentro='$idc'
- AND ordenadores_particiones.numpar=4
- GROUP BY ordenadores_particiones.cache";
-
+ AND aulas.idcentro='$idc'
+ AND sistemasficheros.nemonico='CACHE'";
break;
case $AMBITO_GRUPOSORDENADORES :
$cmd->texto="SELECT * FROM ordenadores,aulas,ordenadores_particiones,gruposordenadores
+ JOIN sistemasficheros USING(idsistemafichero)
WHERE ordenadores_particiones.idordenador=ordenadores.idordenador
AND ordenadores.idaula=aulas.idaula
- AND gruposordenadores.idaula=aulas.idaula
- AND aulas.idcentro='$idc'
- AND ordenadores_particiones.numpar=4
- AND ordenadores.grupoid='$idambito'
- GROUP BY ordenadores_particiones.cache";
-
+ AND gruposordenadores.idaula=aulas.idaula
+ AND aulas.idcentro='$idc'
+ AND sistemasficheros.nemonico='CACHE'
+ AND ordenadores.grupoid='$idambito'";
break;
+
case $AMBITO_ORDENADORES :
$cmd->texto="SELECT * FROM ordenadores,ordenadores_particiones
+ JOIN sistemasficheros USING(idsistemafichero)
WHERE ordenadores_particiones.idordenador=ordenadores.idordenador
AND ordenadores.nombreordenador='$nombreambito'
- AND ordenadores_particiones.numpar=4
- GROUP BY ordenadores_particiones.cache";
+ AND sistemasficheros.nemonico='CACHE'";
break;
}
$tablaHtml="";
-
$rs->Comando=&$cmd;
$rs=new Recordset;
$rs->Comando=&$cmd;
diff --git a/admin/WebConsole/comandos/EliminarImagenRepositorio.php b/admin/WebConsole/comandos/EliminarImagenRepositorio.php
index d33cb377..a95b4f78 100644
--- a/admin/WebConsole/comandos/EliminarImagenRepositorio.php
+++ b/admin/WebConsole/comandos/EliminarImagenRepositorio.php
@@ -20,7 +20,7 @@ if (isset($_POST["opcion"])) {$opcion=$_POST["opcion"];}else{$opcion;} // Recoge
//$opcion=$_POST["opcion"]; // Recoge parametros
if (isset($_POST["idrepositorio"])) {$idrepositorio=$_POST["idrepositorio"];}else{$idrepositorio;}
//$idrepositorio=$_POST["idrepositorio"];
-if (isset($_POST["grupoid"])) {$grupoid=$_POST["grupoid"];}else{$grupoid;}
+if (isset($_POST["grupoid"])) {$grupoid=$_POST["grupoid"];}else{$grupoid='';}
//$grupoid=$_POST["grupoid"];
$idcentro=$_SESSION["widcentro"];
if (isset($_GET["opcion"])) $opcion=$_GET["opcion"]; // Recoge parametros
@@ -86,19 +86,38 @@ if (!$rs->Abrir()) return(true); // Error al abrir recordset
}
$rs->Cerrar();
-if ($iprepositorio == $ipservidor)
-{
-
-$cmd->texto="SELECT * FROM repositorios WHERE ip='$iprepositorio'";
+// Compruebo si se separan directorio de unidades organizativas
+$cmd->texto="SELECT ogunit FROM entidades INNER JOIN centros USING(identidad) where idcentro=$idcentro";
$rs=new Recordset;
-$rs->Comando=&$cmd;
+$rs->Comando=&$cmd;
if (!$rs->Abrir()) return(true); // Error al abrir recordset
- $rs->Primero();
- if (!$rs->EOF)
+$rs->Primero();
+if (!$rs->EOF)
+{
+ $separarogunit=$rs->campos["ogunit"]; // 1 -> si, 0 -> no
+}
+$rs->Cerrar();
+
+// Directorios de las imágenes, si separo por unidades organizativas leo la BD
+$dircentros= array();
+$dircentros[0]='/'; // Incluimos /opt/opengnsys/images
+if ($separarogunit == 1 ) {
+ $cmd->texto="SELECT idcentro, directorio FROM centros ORDER BY idcentro";
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(true); // Error al abrir recordset
+ $rs->Primero();
+ while (!$rs->EOF)
{
- $idrepodefault=$rs->campos["idrepositorio"];
+ $dircentros[$rs->campos["idcentro"]]="/".$rs->campos["directorio"];
+ $rs->Siguiente();
}
- $rs->Cerrar();
+}
+
+if ($iprepositorio == $ipservidor)
+{
+
+
//#########################################################################
$repolocal="si";
@@ -106,19 +125,24 @@ $repolocal="si";
// LEYENDO EL DIRECTORIO local en el server
// /opt/opengnsys/images/
//#########################################################################
- $dirtemplates="/opt/opengnsys/images/";
- $directorio=dir($dirtemplates);
$imarepo= array();//pila de nombres
- //bucle para llenar las pilas :P
- while ($archivo = $directorio->read())
- {
+ foreach ( array_unique($dircentros) as $subdir) {
+ $dirtemplates="/opt/opengnsys/images/$subdir";
+ $directorio=dir($dirtemplates);
+ // quitamos la barra inicial
+ $subdir = ($subdir == "/") ? '' : substr($subdir,1).':';
+ //bucle para llenar las pilas :P
+ while ($archivo = $directorio->read())
+ {
//no mostrar ni "." ni ".." ni "pxe"
if(($archivo!=".")&&($archivo!="..")&&($archivo!="mount")&&($archivo!="lost+found"))
{
- array_push($imarepo, $archivo);
+ array_push($imarepo, $subdir.$archivo);
}
+ }
+ $directorio->close();
}
- $directorio->close();
+
sort($imarepo); // Ordenamos el Array
if (isset($_POST["contar"])) {$cuantos=$_POST["contar"];}else{$cuantos=0;$contar;}
@@ -170,19 +194,15 @@ $repolocal="si";
if ($checkboxobjeto == "si")
{
//#########################################################################
- $cmd->texto="SELECT * FROM imagenes WHERE nombreca='$nombre' AND idcentro='$idcentroimg'";
+ // Si la imagen tiene directorio lo elimino
+ $cmd->texto="SELECT * FROM imagenes WHERE nombreca='".preg_replace('/^\w*:/','',$nombre)."' AND idcentro='$idcentroimg'";
$rs=new Recordset;
$rs->Comando=&$cmd;
if (!$rs->Abrir()) return(0); // Error al abrir recordset
$rs->Primero();
if (!$rs->EOF){
- $idimagen=$rs->campos["idimagen"];
- $nombrecanonico=$rs->campos["nombreca"];
- $centroimagen=$rs->campos["idcentro"];
- $idimagen=$rs->campos["idimagen"];
- //$cmd->texto="DELETE FROM imagenes WHERE idimagen='$idimagen'";
- //$resul=$cmd->Ejecutar();
- }
+ $idimagen=$rs->campos["idimagen"];
+ }
$rs->Cerrar();
EliminaImagenes($cmd,$idimagen,"idimagen");// Eliminación en cascada
@@ -222,12 +242,12 @@ $repolocal="no";
?>
<HTML>
-<TITLE>Administración web de aulas</TITLE>
+<TITLE>Administración web de aulas</TITLE>
<HEAD>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<LINK rel="stylesheet" type="text/css" href="../estilos.css">
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
<SCRIPT language="javascript" src="./jscripts/comunescomandos.js"></SCRIPT>
<script type="text/javascript">
function confirmeliminar() {var mensaje="<?php echo $TbMsg[17];?>";if(confirm(mensaje)) {document.eliimarepo.submit();}}
@@ -235,7 +255,7 @@ function confirmeliminar() {var mensaje="<?php echo $TbMsg[17];?>";if(confirm(me
</script>
</HEAD>
<BODY>
-<?
+<?php
$urlimg='../images/iconos/repositorio.gif';
$textambito=$TbMsg[0];
@@ -249,20 +269,20 @@ function confirmeliminar() {var mensaje="<?php echo $TbMsg[17];?>";if(confirm(me
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<?php if ($espaciorepo != ""){?>
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[18]?>&nbsp;</TD>
- <TH align=center>&nbsp;<?echo $TbMsg[19]?>&nbsp;</TD>
- <TH align=center>&nbsp;<?echo $TbMsg[20]?>&nbsp;</TD>
- <TH align=center>&nbsp;<?echo $TbMsg[21]?>&nbsp;</TD>
+ <TH align=center>&nbsp;<?php echo $TbMsg[18]?>&nbsp;</TD>
+ <TH align=center>&nbsp;<?php echo $TbMsg[19]?>&nbsp;</TD>
+ <TH align=center>&nbsp;<?php echo $TbMsg[20]?>&nbsp;</TD>
+ <TH align=center>&nbsp;<?php echo $TbMsg[21]?>&nbsp;</TD>
</TR>
<TR>
- <TD align=center width=110>&nbsp;<?echo $totalrepo?>&nbsp;</TD>
- <TD align=center width=120>&nbsp;<?echo $ocupadorepo?>&nbsp;</TD>
- <TD align=center width=120>&nbsp;<?echo $librerepo?>&nbsp;</TD>
- <TD align=center width=101>&nbsp;<?echo $porcentajerepo?>&nbsp;</TD>
+ <TD align=center width=110>&nbsp;<?php echo $totalrepo?>&nbsp;</TD>
+ <TD align=center width=120>&nbsp;<?php echo $ocupadorepo?>&nbsp;</TD>
+ <TD align=center width=120>&nbsp;<?php echo $librerepo?>&nbsp;</TD>
+ <TD align=center width=101>&nbsp;<?php echo $porcentajerepo?>&nbsp;</TD>
</TR>
<?php }else {?>
<TR>
- <TH align=center width=485>&nbsp;<?echo $TbMsg[22]?>&nbsp;</TD>
+ <TH align=center width=485>&nbsp;<?php echo $TbMsg[22]?>&nbsp;</TD>
</TR>
<?php } ?>
@@ -270,13 +290,13 @@ function confirmeliminar() {var mensaje="<?php echo $TbMsg[17];?>";if(confirm(me
</TABLE>
<P align=center>
- <div align=center class=subcabeceras><? echo $TbMsg[7] ?>
+ <div align=center class=subcabeceras><?php echo $TbMsg[7] ?>
<form align="center" name="modoadmin" action="./EliminarImagenRepositorio.php" method="post">
- <INPUT type="hidden" name="opcion" value="<? echo $opcion?>">
- <INPUT type="hidden" name="idrepositorio" value="<? echo $idrepositorio?>">
- <INPUT type="hidden" name="grupoid" value="<? echo $grupoid ?>">
+ <INPUT type="hidden" name="opcion" value="<?php echo $opcion?>">
+ <INPUT type="hidden" name="idrepositorio" value="<?php echo $idrepositorio?>">
+ <INPUT type="hidden" name="grupoid" value="<?php echo $grupoid ?>">
<?php if ($modov == "0"){?>
<INPUT type="hidden" name="modov" value="1">
<input type=button onclick=submit() value="<?php echo $TbMsg[28]; ?>"/>
@@ -295,31 +315,33 @@ function confirmeliminar() {var mensaje="<?php echo $TbMsg[17];?>";if(confirm(me
<TABLE id="tabla_conf" align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<TR>
<TD align=center>&nbsp;</TD>
- <TH align=center>&nbsp;<? echo $TbMsg[27] ?>&nbsp;</TH>
- <TH align=center>&nbsp;<? echo "F => ".$TbMsg[31]; ?>&nbsp;</TH>
+ <TH align=center>&nbsp;<?php echo $TbMsg[27] ?>&nbsp;</TH>
+ <TH align=center>&nbsp;<?php echo "F => ".$TbMsg[31]; ?>&nbsp;</TH>
<TD align=center>&nbsp;</TD>
<TD align=center>&nbsp;</TD>
- <TH align=center>&nbsp;<? echo "D => ".$TbMsg[32]; ?>&nbsp;</TH>
+ <TH align=center>&nbsp;<?php echo "D => ".$TbMsg[32]; ?>&nbsp;</TH>
<TD align=center>&nbsp;</TD>
<TD align=center>&nbsp;</TD>
- <TH align=center>&nbsp;<? echo "B => Backup" ?>&nbsp;</TH>
+ <TH align=center>&nbsp;<?php echo "B => Backup" ?>&nbsp;</TH>
<TD align=center>&nbsp;</TD>
</TR>
</TABLE>
<TABLE id="tabla_conf" align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<TR>
- <TH align=center>&nbsp;<? echo $TbMsg[11] ?>&nbsp;</TH>
- <TH align=center>&nbsp;<? echo $TbMsg[12] ?>&nbsp;</TH>
- <TH align=center>&nbsp;<? echo $TbMsg[27] ?>&nbsp;</TH>
- <TH align=center>&nbsp;<? echo $TbMsg[10] ?>&nbsp;</TH>
- <TH align=center>&nbsp;<? echo $TbMsg[13] ?>&nbsp;</TH>
- <TH align=center>&nbsp;<? echo $TbMsg[26] ?>&nbsp;</TH>
- <?php if ($modov == 1){ ?><TH align=center>&nbsp;<? echo $TbMsg[30] ?>&nbsp;</TH><?php } ?>
+ <TH align=center>&nbsp;<?php echo $TbMsg[11] ?>&nbsp;</TH>
+ <TH align=center>&nbsp;<?php echo $TbMsg[12] ?>&nbsp;</TH>
+ <TH align=center>&nbsp;<?php echo $TbMsg[27] ?>&nbsp;</TH>
+ <TH align=center>&nbsp;<?php echo $TbMsg[10] ?>&nbsp;</TH>
+ <TH align=center>&nbsp;<?php echo $TbMsg[13] ?>&nbsp;</TH>
+ <TH align=center>&nbsp;<?php echo $TbMsg[26] ?>&nbsp;</TH>
+ <?php if ($modov == 1){ // Vista Repositorio Completo ?>
+ <TH align=center>&nbsp;<?php echo $TbMsg[30] ?>&nbsp;</TH>
+ <?php } ?>
</TR>
- <?
+ <?php
//echo tabla_configuraciones($cmd,$idambito);
@@ -353,7 +375,7 @@ function confirmeliminar() {var mensaje="<?php echo $TbMsg[17];?>";if(confirm(me
}
}else{
// Compruebo si es un directorio
- $buscodir="/opt/opengnsys/images/".$imarepo[$x];
+ $buscodir="/opt/opengnsys/images/".str_replace(":","/",$imarepo[$x]);
$buscopengnsys=$buscodir."/.marcimg";
if(is_dir($buscodir) && file_exists($buscopengnsys)){
$imarepo[$x]=trim($imarepo[$x]);
@@ -374,16 +396,24 @@ function confirmeliminar() {var mensaje="<?php echo $TbMsg[17];?>";if(confirm(me
$contar=1;
foreach($sin_duplicados as $value) //imprimimos $sin_duplicados
{ //Llave Forach
+ // Guardo los valores del directorio y el nombre imagen
+ // Si no se separan los directorios queda igual
+ $arrayname=explode(':', $value);
+ if (sizeof( $arrayname) == 1){
+ $imgdir="";
+ $imgname=$arrayname[0];
+ } else {
+ $imgdir=$arrayname[0];
+ $imgname=$arrayname[1];
+ }
//Buscamos tamano de fichero
- //Buscamos .torrent y .sum con lock
- $gensum=$value.".img.sum.lock";
- $gentor=$value.".img.lock";
+ //Buscamos si existe fichero de bloqueo
+ $gentor=str_replace(":","/",$value).".img.lock";
if(ereg(".diff",$value))$gendif=$value.".img.diff";
// ########### Buscando si existe fichero imagen #####################
- $buscando="find /opt/opengnsys/images/ -maxdepth 1 -name ".$gentor." -print";
- $generando="Generando .torrent";
+ $buscando="ls /opt/opengnsys/images/$gentor";
$bustor=exec($buscando);
if(ereg(".diff",$value))
{
@@ -401,204 +431,48 @@ function confirmeliminar() {var mensaje="<?php echo $TbMsg[17];?>";if(confirm(me
$nombrefichero=$value.'.img';$marcadif=0;
}
-
- if ($modov != 1){
-
- // ####################################################################################
- // ########## Si el nombre imagen existe en la Unidad Organizativa ####################
- // ####################################################################################
- //echo $value." - ".$idcentro."</br>";
-
- $cmd->texto="SELECT * FROM imagenes WHERE nombreca='$value' ";//AND idcentro='$idcentro'";
- $rs=new Recordset;
- $rs->Comando=&$cmd;
- if (!$rs->Abrir()) return(0); // Error al abrir recordset
- $rs->Primero();
- if (!$rs->EOF){
- $nombrecacentro=$rs->campos["nombreca"];
- $nombrecaidcentro=$rs->campos["idcentro"];
- }
- if ($nombrecacentro != $value){$nombrecaidcentro=0;}
- $rs->Cerrar();
-
- if($nombrecaidcentro == $idcentro || $nombrecaidcentro==0)
- { //Comienzo de Condicion si es nombrecaidcentro
- //echo "Value - ".$value."/ - Id Centro - ".$idc." /Nombrecacentro - ".$nombrecacentro." /Base ID Centro ".$nombrecaidcentro."</br>";
-
- // ####################################################################################
// ####################################################################################
// ########## Buscando si existe objeto imagen ########################################
- // ########## Si el Nombre contiene .diff lo quitamos para buscar objeto imagen
- if(ereg(".diff",$value)){ $valuediff=$value; $value = str_replace(".diff", "", $value);} //quitar todos los .diff y continuamos
// ####################################################################################
+ $encontradoobjetoimagen='';
+ // Version anterior tomaba nombrecentro donde $nombrecaidcentro=$idrepodefault
+ $nombrecaidcentro=0; // No afecta a vista unidad organizativa
+ $nombrecentro=''; // No afecta a vista unidad organizativa
+ // ########## Si el Nombre contiene .diff lo quitamos para buscar objeto imagen
+ if(ereg(".diff",$imgname)){ $imgname = str_replace(".diff", "", $imgname);}
- $encontradoobjetoimagen="";
- $cmd->texto="SELECT * FROM imagenes WHERE nombreca='$value' AND idcentro='$idcentro'";
+ $cmd->texto="SELECT idcentro, nombrecentro, nombreca FROM imagenes LEFT JOIN centros USING(idcentro) WHERE nombreca='$imgname' ";
$rs=new Recordset;
$rs->Comando=&$cmd;
if (!$rs->Abrir()) return(0); // Error al abrir recordset
$rs->Primero();
if (!$rs->EOF){
- $encontradoobjetoimagen=$rs->campos["nombreca"];
- }
- if($encontradoobjetoimagen == $value){$encontradoobjetoimagen;}else{$encontradoobjetoimagen="";}
- $idcentroimgpost=$rs->campos["idcentro"];
- $rs->Cerrar();
- // ####################################################################################
-
- // ########################## VARIABLES FICHERO DELETE ################################
- $nombredirectorio="/opt/opengnsys/images/".$value;
- // ####################################################################################
- if ($tipo[$contandotipo] == "D")
- {
- $nombrefichero=str_replace(".img", "", $nombrefichero);
- $ficherodelete="../tmp/".$nombrefichero.".delete";
- }else{
- $ficherodelete="../tmp/".$nombrefichero.".delete";
- }
- // ########################## VARIABLES FICHERO DELETE ################################
- // ####################################################################################
- // ######## TAMAÑO DEL FICHERO Y DIRECTORIO ##########################
- if (is_dir ($nombredirectorio) && $tipo[$contandotipo] == "D")
- {
- $tamanofich=exec("ls -lah ".$nombredirectorio." | awk 'NR==1 {print $2}'");
- }
- elseif (ereg(".ant",$nombrefichero))
- {
- $nombreficheroant=str_replace(".ant", "", $nombrefichero); //quitar todos los .ant y continuamos
-
- $nombreficheroant=$nombreficheroant.".ant";
- $tamanofich=exec("du -h --max-depth=1 /opt/opengnsys/images/$nombreficheroant");
- $tamanofich=split("/",$tamanofich);//////////////////////////////////////////echo $nombrefichero."</br>";
- }else{
- $tamanofich=exec("du -h --max-depth=1 /opt/opengnsys/images/$nombrefichero");
- $tamanofich=split("/",$tamanofich);//////////////////////////////////////////echo $nombrefichero."</br>";
- }
- // ######## TAMAÑO DEL FICHERO Y DIRECTORIO ##########################
-
- $todo=".delete";
- $ruta='touch%20/opt/opengnsys/images/'.$value.$todo;//////////////////////////////////////echo $value;//
-
- echo '<TR>'.chr(13);
-
- // ########## Nº ######################################################################
- echo '<TD align=center>&nbsp;'.$contar.'&nbsp;</TD>'.chr(13);
-
- // ########## Marcar ##################################################################
-
- if ($bustor<>"")
- {
- echo '<TD align=center><font color=red><strong>&nbsp;'.$TbMsg[14].'</strong></TD>'.chr(13);
- }
- elseif (file_exists($ficherodelete))
- {
- echo '<TD align=center><font color=red><strong>&nbsp;'.$TbMsg[15].'</strong></TD>'.chr(13);}
- else
- {
- echo '<TD align=center ><input type="checkbox" name="checkbox'.$contar.'" value="si"></TD>'.chr(13);
- }
-
- // ########## Tipo ####################################################################
- if ($tipo[$contandotipo]=="D")
- {
- echo '<TD align=center ><font color=blue>'.$tipo[$contandotipo].'</TD>'.chr(13);
- }
- elseif ($tipo[$contandotipo]=="B")
- {
- echo '<TD align=center><font color=red>&nbsp;'.$tipo[$contandotipo].'&nbsp;</TD>'.chr(13);
- }else{
- echo '<TD align=center >'.$tipo[$contandotipo].'</TD>'.chr(13);
+ $encontradoobjetoimagen=(is_null($rs->campos["nombreca"]))? '': $rs->campos["nombreca"];
+ $nombrecaidcentro=(is_null($rs->campos["idcentro"]))? 0 :$rs->campos["idcentro"];
+ $nombrecentro=(is_null($rs->campos["nombrecentro"]))? '' : $rs->campos["nombrecentro"];
}
+ $rs->Cerrar();
- echo '<input type="hidden" name="nombre'.$contar.'" value='.$value.'></TD>'.chr(13);;
- echo '<input type="hidden" name="contar" value='.$contar.'></TD>'.chr(13);;
- echo '<input type="hidden" name="marcadif'.$contar.'" value='.$marcadif.'></TD>'.chr(13);;
- echo '<input type="hidden" name="tipoimg'.$contar.'" value='.$tipo[$contandotipo].'></TD>'.chr(13);;
-
- // ########## Nombre de Imagen ########################################################
- if ($tipo[$contandotipo]=="D")
- {
- echo '<TD align=center><font color=blue>&nbsp;'.$value.'&nbsp;</TD>'.chr(13);
- }
- else
- {
-
- echo '<TD align=center>&nbsp;'.$value.'&nbsp;</TD>'.chr(13);
+ // Sobre: si devuelve una imagen tiene que coincidir
+ if($encontradoobjetoimagen == $imgname) {
+ $encontradoobjetoimagen=$value;
}
- // ########## Tamaño de Imagen ########################################################
- if (is_dir ($nombredirectorio) && $tipo[$contandotipo] == "D")
- {echo '<TD align=center>&nbsp;'.$tamanofich.'</TD>'.chr(13);}
- else{echo '<TD align=center>&nbsp;'.$tamanofich[0].'</TD>'.chr(13);}
+ if ($modov != 1){ //VISTA UNIDAD ORGANIZATIVA
+ // Si la imagen no es del centro no la muestro
+ if ($nombrecaidcentro != $idcentro && $nombrecaidcentro != 0) {
+ $contandotipo++;
+ continue;
+ }
+ // si ogunit con dir separados -> si la imagen no es del dir del centro no la muestro
+ if ($separarogunit == 1 and ! ereg($dircentros[$idcentro], "/".$value)) {
+ $contandotipo++;
+ continue;
+ };
- // ########## Objeto Imagen ###########################################################
- if($encontradoobjetoimagen<>"")
- {
- echo '<TD align=center ><input type="checkbox" name="checkboxobjeto'.$contar.'" value="si"></TD>'.chr(13);
- echo '<input type="hidden" name="idcentroimg'.$contar.'" value="'.$idcentroimgpost.'">'.chr(13);
- }
- elseif (ereg(".ant",$nombrefichero))
- {
- echo '<TD align=center><font color=red>&nbsp;------</strong></TD>'.chr(13);
- }else{
- echo '<TD align=center><font color=red>&nbsp;'.$TbMsg[25].'</strong></TD>'.chr(13);
}
- // #####################################################################################
- echo '</TR>'.chr(13);
- $contar++;
- $contandotipo++;
- }else{$contandotipo++;}//Fin de Condicion si es nombrecaidcentro
-
- }
-
- else{
-
-
- $nombrecaidcentro=$idrepodefault;
- //echo $value." - ".$idcentro."</br>";
- $cmd->texto="SELECT * FROM imagenes WHERE nombreca='$value' ";
- $rs=new Recordset;
- $rs->Comando=&$cmd;
- if (!$rs->Abrir()) return(0); // Error al abrir recordset
- $rs->Primero();
- if (!$rs->EOF){
- $nombrecacentro=$rs->campos["nombreca"];
- $nombrecaidcentro=$rs->campos["idcentro"];
- }
- $rs->Cerrar();
-
- $cmd->texto="SELECT * FROM centros WHERE idcentro='$nombrecaidcentro' ";
- $rs=new Recordset;
- $rs->Comando=&$cmd;
- if (!$rs->Abrir()) return(0); // Error al abrir recordset
- $rs->Primero();
- if (!$rs->EOF){
- $nombrecentro=$rs->campos["nombrecentro"];
- }
- $rs->Cerrar();
-
-
- // ####################################################################################
- // ####################################################################################
- // ########## Buscando si existe objeto imagen ########################################
- // ########## Si el Nombre contiene .diff lo quitamos para buscar objeto imagen
- if(ereg(".diff",$value)){ $valuediff=$value; $value = str_replace(".diff", "", $value);} //quitar todos los .diff y continuamos
- // ####################################################################################
-
- $encontradoobjetoimagen="";
- $cmd->texto="SELECT * FROM imagenes WHERE nombreca='$value'";// AND idcentro='$idcentro'";
- $rs=new Recordset;
- $rs->Comando=&$cmd;
- if (!$rs->Abrir()) return(0); // Error al abrir recordset
- $rs->Primero();
- if (!$rs->EOF){
- $encontradoobjetoimagen=$rs->campos["nombreca"];
- }
- if($encontradoobjetoimagen == $value){$encontradoobjetoimagen;}else{$encontradoobjetoimagen="";}
- $rs->Cerrar();
// ####################################################################################
-
// ########################## VARIABLES FICHERO DELETE ################################
$nombredirectorio="/opt/opengnsys/images/".$value;
// ####################################################################################
@@ -610,6 +484,8 @@ function confirmeliminar() {var mensaje="<?php echo $TbMsg[17];?>";if(confirm(me
$ficherodelete="../tmp/".$nombrefichero.".delete";
}
// ########################## VARIABLES FICHERO DELETE ################################
+ $nombredirectorio=str_replace(":","/",$nombredirectorio);
+ $nombrefichero=str_replace(":","/",$nombrefichero);
// ####################################################################################
// ######## TAMAÑO DEL FICHERO Y DIRECTORIO ##########################
@@ -639,6 +515,7 @@ function confirmeliminar() {var mensaje="<?php echo $TbMsg[17];?>";if(confirm(me
echo '<TD align=center>&nbsp;'.$contar.'&nbsp;</TD>'.chr(13);
// ########## Marcar ##################################################################
+
if ($bustor<>"")
{
echo '<TD align=center><font color=red><strong>&nbsp;'.$TbMsg[14].'</strong></TD>'.chr(13);
@@ -669,14 +546,26 @@ function confirmeliminar() {var mensaje="<?php echo $TbMsg[17];?>";if(confirm(me
echo '<input type="hidden" name="tipoimg'.$contar.'" value='.$tipo[$contandotipo].'></TD>'.chr(13);;
echo '<input type="hidden" name="idcentroimg'.$contar.'" value='.$nombrecaidcentro.'></TD>'.chr(13);;
+ // ########## Aviso si directorio distinto al del centro - en vista repositorio ##########
+ $aviso='';
+ if ($separarogunit == 1) {
+ if ( $nombrecaidcentro != 0 and "/".$imgdir != $dircentros[$nombrecaidcentro]){
+ $aviso="<font color=red> * </font>";
+ $textoaviso="<tr>\n <th colspan='7' align='center'>".
+ "&nbsp;<sup>*</sup> $TbMsg[33] &nbsp;</th>\n".
+ "</tr>\n";
+ }
+ }
+
// ########## Nombre de Imagen ########################################################
if ($tipo[$contandotipo]=="D")
{
- echo '<TD align=center><font color=blue>&nbsp;'.$value.'&nbsp;</TD>'.chr(13);
+ echo '<TD align=center><font color=blue>&nbsp;'.str_replace(":"," / ",$value).' '.$aviso.'&nbsp;</TD>'.chr(13);
}
else
{
- echo '<TD align=center>&nbsp;'.$value.'&nbsp;</TD>'.chr(13);
+
+ echo '<TD align=center>&nbsp;'.str_replace(":"," / ",$value).' '.$aviso.'&nbsp;</TD>'.chr(13);
}
// ########## Tamaño de Imagen ########################################################
@@ -695,30 +584,30 @@ function confirmeliminar() {var mensaje="<?php echo $TbMsg[17];?>";if(confirm(me
}else{
echo '<TD align=center><font color=red>&nbsp;'.$TbMsg[25].'</strong></TD>'.chr(13);
}
- // #####################################################################################
- // ########## Unidad Organizativa ######################################################
+ // VISTA REPOSITORIO COMPLETO
+ if ($modov == 1){
+ // #####################################################################################
+ // ########## Unidad Organizativa ######################################################
+
+ echo '<TD align=center >'.$nombrecentro.'</TD>'.chr(13);
- echo '<TD align=center >'.$nombrecentro.'</TD>'.chr(13);
+ // #####################################################################################
+ }
// #####################################################################################
echo '</TR>'.chr(13);
$contar++;
$contandotipo++;
-// }else{$contandotipo++;}//Fin de Condicion si es nombrecaidcentro
-
- }
-
-
-
} //Fin Llave Forach
+ if (isset ($textoaviso)) echo $textoaviso;
?>
- <INPUT type="hidden" name="opcion" value="<? echo $opcion?>">
- <INPUT type="hidden" name="idrepositorio" value="<? echo $idrepositorio?>">
- <INPUT type="hidden" name="grupoid" value="<? echo $grupoid ?>">
+ <INPUT type="hidden" name="opcion" value="<?php echo $opcion?>">
+ <INPUT type="hidden" name="idrepositorio" value="<?php echo $idrepositorio?>">
+ <INPUT type="hidden" name="grupoid" value="<?php echo $grupoid ?>">
<INPUT type="hidden" name="modov" value="<?php echo $modov; ?>">
</TABLE><BR/>
@@ -729,7 +618,7 @@ function confirmeliminar() {var mensaje="<?php echo $TbMsg[17];?>";if(confirm(me
</TR>
<TR>
<TD></TD>
- <TD align=center><A href=#><IMG border=0 src="../images/boton_confirmar_<? echo $idioma ?>.gif" onclick="javascript:confirmeliminar()" ></A></TD>
+ <TD align=center><A href=#><IMG border=0 src="../images/boton_confirmar_<?php echo $idioma ?>.gif" onclick="javascript:confirmeliminar()" ></A></TD>
</TR>
</TABLE>
</FORM>
@@ -738,6 +627,5 @@ function confirmeliminar() {var mensaje="<?php echo $TbMsg[17];?>";if(confirm(me
</BODY>
</HTML>
-<?php }
+<?php } ?>
- ?>
diff --git a/admin/WebConsole/comandos/EnviarMensaje.php b/admin/WebConsole/comandos/EnviarMensaje.php
new file mode 100644
index 00000000..15e9237a
--- /dev/null
+++ b/admin/WebConsole/comandos/EnviarMensaje.php
@@ -0,0 +1,97 @@
+<?php
+// *************************************************************************************************************************************************
+// Aplicación WEB: ogAdmWebCon
+// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
+// Fecha Creación: Año 2009-2010
+// Fecha Última modificación: Agosto-2010
+// Nombre del fichero: Comando.php
+// Descripción :
+// Implementación del comando "EjecutarScripts"
+// *************************************************************************************************************************************************
+include_once("../includes/ctrlacc.php");
+include_once("../clases/AdoPhp.php");
+include_once("../includes/constantes.php");
+include_once("../includes/comunes.php");
+include_once("../includes/CreaComando.php");
+include_once("../includes/HTMLSELECT.php");
+include_once("../idiomas/php/".$idioma."/comandos/enviarmensaje_".$idioma.".php");
+include_once("../idiomas/php/".$idioma."/comandos/opcionesacciones_".$idioma.".php");
+//________________________________________________________________________________________________________
+include_once("./includes/capturaacciones.php");
+//________________________________________________________________________________________________________
+//________________________________________________________________________________________________________
+$cmd=CreaComando($cadenaconexion);
+if (!$cmd)
+ Header('Location: '.$pagerror.'?herror=2'); // Error de conexión con servidor B.D.
+//________________________________________________________________________________________________________
+?>
+<HTML>
+<TITLE>Administración web de aulas</TITLE>
+<HEAD>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+ <LINK rel="stylesheet" type="text/css" href="../estilos.css">
+ <SCRIPT language="javascript" src="./jscripts/EnviarMensaje.js"></SCRIPT>
+ <SCRIPT language="javascript" src="./jscripts/comunescomandos.js"></SCRIPT>
+ <SCRIPT language="javascript" src="../jscripts/validators.js"></SCRIPT>
+ <SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/enviarmensaje_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
+</HEAD>
+<BODY>
+<?php
+ echo '<p align=center><span class=cabeceras>'.$TbMsg[5].'&nbsp;</span><br>';
+ //________________________________________________________________________________________________________
+ //
+ include_once("./includes/FiltradoAmbito.php");
+ //________________________________________________________________________________________________________
+?>
+ <P align=center>
+ <SPAN align=center class=subcabeceras><?php echo $TbMsg[10] ?></SPAN>
+ <form align=center name="fdatos">
+
+ <table align=center class=tabla_datos border="0" cellpadding="0" cellspacing="1">
+ <tr>
+ <th>&nbsp;<?php echo $TbMsg[7]?>&nbsp;</th>
+ <td><input type="text" name="titulo"></td></tr>
+ <tr>
+ <th>&nbsp;<?php echo $TbMsg[9]?>&nbsp;</th>
+ <td><textarea class="cajatexto" name="mensaje" cols="70" rows="18"></textarea></td></tr>
+ <tr> <th align=center colspan="3"><?php echo $TbMsg["OGAGENT"] ?></th></tr>
+ <tr> <th align=center colspan="3"><?php echo $TbMsg["OPTION"] ?></th></tr>
+ </table>
+ </form>
+ <?php
+ //________________________________________________________________________________________________________
+ include_once("./includes/formularioacciones.php");
+ //________________________________________________________________________________________________________
+ // Sólo permite ejecutar inmediantemente como opción de ejecución
+ // include_once("./includes/opcionesacciones.php")
+ ?>
+ <P align=center><span align=center class=subcabeceras>Opciones de Ejecución</span></P>
+ <table align=center>
+ <tr>
+ <td><img border=0 style="cursor:pointer" src="../images/boton_aceptar_esp.gif" onclick="confirmar()" ></td>
+ </tr>
+ </table>
+ <BR>
+ <table class=opciones_ejecucion align=center>
+ <tr>
+ <td><input name=sw_ejya type=checkbox checked readonly></td>
+ <td colspan=3> Ejecutar inmediatamente &nbsp; </td>
+ </tr>
+ <tr>
+ <td>&nbsp; </td>
+ <td><input name=sw_seguimiento type=radio value=1 readonly></td><td>Incluirlo en Cola de Acciones&nbsp;</td>
+ </tr>
+ <tr>
+ <td>&nbsp; </td>
+ <td><input checked name=sw_seguimiento type=radio value=0 readonly></td><td>No incluirlo en Cola de Acciones&nbsp;</td>
+ </tr>
+ </table>
+
+ </FORM>
+<SCRIPT language="javascript">
+ Sondeo();
+</SCRIPT>
+</BODY>
+</HTML>
diff --git a/admin/WebConsole/comandos/IniciarSesion.php b/admin/WebConsole/comandos/IniciarSesion.php
index 3ef3b9c5..404a004d 100644
--- a/admin/WebConsole/comandos/IniciarSesion.php
+++ b/admin/WebConsole/comandos/IniciarSesion.php
@@ -59,12 +59,12 @@ if (!$cmd)
?>
<P align=center>
- <SPAN align=center class=subcabeceras><? echo $TbMsg[7] ?></SPAN>
+ <SPAN align=center class=subcabeceras><?php echo $TbMsg[7] ?></SPAN>
</BR>
<form align=center name="fdatos" method="POST">
- <INPUT type="hidden" name="idambito" value="<? echo $idambito?>">
- <INPUT type="hidden" name="ambito" value="<? echo $ambito?>">
- <INPUT type="hidden" name="cadenaid" value="<? echo $cadenaid?>">
+ <INPUT type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <INPUT type="hidden" name="ambito" value="<?php echo $ambito?>">
+ <INPUT type="hidden" name="cadenaid" value="<?php echo $cadenaid?>">
</form>
<?php } // fin if $ambito!=$AMBITO_ORDENADORES
diff --git a/admin/WebConsole/comandos/InventarioHardware.php b/admin/WebConsole/comandos/InventarioHardware.php
index f494876d..afba8f2d 100644
--- a/admin/WebConsole/comandos/InventarioHardware.php
+++ b/admin/WebConsole/comandos/InventarioHardware.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -34,10 +34,10 @@ if (!$cmd)
<SCRIPT language="javascript" src="./jscripts/InventarioHardware.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
<SCRIPT language="javascript" src="./jscripts/comunescomandos.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
-<?
+<?php
switch($ambito){
case $AMBITO_CENTROS :
$urlimg='../images/iconos/centros.gif';
diff --git a/admin/WebConsole/comandos/InventarioSoftware.php b/admin/WebConsole/comandos/InventarioSoftware.php
index 3f154134..b8756ec9 100644
--- a/admin/WebConsole/comandos/InventarioSoftware.php
+++ b/admin/WebConsole/comandos/InventarioSoftware.php
@@ -33,8 +33,8 @@ if (!$cmd)
<SCRIPT language="javascript" src="./jscripts/InventarioSoftware.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
<SCRIPT language="javascript" src="./jscripts/comunescomandos.js"></SCRIPT>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/inventariosoftware_'.$idioma.'.js"></SCRIPT>'?>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/inventariosoftware_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<?php
@@ -65,12 +65,12 @@ switch($ambito){
?>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<P align=center>
- <SPAN align=center class=subcabeceras><? echo $TbMsg[7] ?></SPAN>
+ <SPAN align=center class=subcabeceras><?php echo $TbMsg[7] ?></SPAN>
</p>
<?php echo tablaConfiguracionesInventarioSoftware($cmd,$idambito); ?>
</BR>
-<?
+<?php
//________________________________________________________________________________________________________
include_once("./includes/formularioacciones.php");
//________________________________________________________________________________________________________
@@ -80,7 +80,7 @@ switch($ambito){
?>
</BODY>
</HTML>
-<?
+<?php
/*________________________________________________________________________________________________________
Particiones
________________________________________________________________________________________________________*/
diff --git a/admin/WebConsole/comandos/Reiniciar.php b/admin/WebConsole/comandos/Reiniciar.php
index ecaee6d7..0f759e20 100644
--- a/admin/WebConsole/comandos/Reiniciar.php
+++ b/admin/WebConsole/comandos/Reiniciar.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -34,10 +34,10 @@ if (!$cmd)
<SCRIPT language="javascript" src="./jscripts/Reiniciar.js"></SCRIPT>
<SCRIPT language="javascript" src="./jscripts/comunescomandos.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
-<?
+<?php
echo '<p align=center><span class=cabeceras>'.$TbMsg[5].'&nbsp;</span><br>';
//________________________________________________________________________________________________________
//
diff --git a/admin/WebConsole/comandos/RestaurarImagen.php b/admin/WebConsole/comandos/RestaurarImagen.php
index e75b2f82..047f6174 100644
--- a/admin/WebConsole/comandos/RestaurarImagen.php
+++ b/admin/WebConsole/comandos/RestaurarImagen.php
@@ -7,6 +7,10 @@
// Nombre del fichero: RestaurarImagenOrdenador.php
// Descripción :
// Implementación del comando "RestaurarImagen" (Ordenadores)
+// version 1.1: cliente con varios repositorios
+// HTMLSELECT_imagenes: Imagenes de todos los repositorios de la UO - Cambia parametro idordenadores por idambito
+// autor: Irina Gomez, Universidad de Sevilla
+// fecha 2015-06-17
// *************************************************************************************************************************************************
include_once("../includes/ctrlacc.php");
include_once("../clases/AdoPhp.php");
@@ -63,7 +67,7 @@ if (isset($_POST["fk_nombreSO"])) $fk_nombreSO=$_POST["fk_nombreSO"];
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
<SCRIPT language="javascript" src="./jscripts/comunescomandos.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
-<SCRIPT language="javascript" src="../jscripts/arrays.js"></SCRIPT>
+<SCRIPT language="javascript" src="../jscripts/arrays.js"></SCRIPT>
<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/restaurarimagen_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
@@ -83,24 +87,24 @@ if (isset($_POST["fk_nombreSO"])) $fk_nombreSO=$_POST["fk_nombreSO"];
RecopilaIpesMacs($cmd,$ambito,$idambito);
?>
<FORM action="RestaurarImagen.php" name="fdatos" method="POST">
- <INPUT type="hidden" name="idambito" value="<? echo $idambito?>">
- <INPUT type="hidden" name="ambito" value="<? echo $ambito?>">
- <INPUT type="hidden" name="cadenaid" value="<? echo $cadenaid?>">
+ <INPUT type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <INPUT type="hidden" name="ambito" value="<?php echo $ambito?>">
+ <INPUT type="hidden" name="cadenaid" value="<?php echo $cadenaid?>">
<TABLE class="tabla_busquedas" align=center border=0 cellPadding=0 cellSpacing=0>
<TR>
- <TH height=15 align="center" colspan=14><? echo $TbMsg[18]?></TH>
+ <TH height=15 align="center" colspan=14><?php echo $TbMsg[18]?></TH>
</TR>
<TR>
- <TD align=right><? echo $TbMsg[30]?></TD>
- <TD align=center><INPUT type="checkbox" value="<? echo $msk_sysFi?>" name="fk_sysFi" <? if($fk_sysFi==$msk_sysFi) echo " checked "?>></TD>
+ <TD align=right><?php echo $TbMsg[30]?></TD>
+ <TD align=center><INPUT type="checkbox" value="<?php echo $msk_sysFi?>" name="fk_sysFi" <?php if($fk_sysFi==$msk_sysFi) echo " checked "?>></TD>
<TD width="20" align=center>&nbsp;</TD>
- <TD align=right><? echo $TbMsg[32]?></TD>
- <TD align=center><INPUT type="checkbox" value="<? echo $msk_tamano?>" name="fk_tamano" <? if($fk_tamano==$msk_tamano) echo " checked "?>></TD>
+ <TD align=right><?php echo $TbMsg[32]?></TD>
+ <TD align=center><INPUT type="checkbox" value="<?php echo $msk_tamano?>" name="fk_tamano" <?php if($fk_tamano==$msk_tamano) echo " checked "?>></TD>
<TD width="20" align=center>&nbsp;</TD>
- <TD align=right><? echo $TbMsg[31]?></TD>
- <TD align=center><INPUT type="checkbox" value="<? echo $msk_nombreSO?>" name="fk_nombreSO" <? if($fk_nombreSO==$msk_nombreSO) echo " checked "?>></TD>
+ <TD align=right><?php echo $TbMsg[31]?></TD>
+ <TD align=center><INPUT type="checkbox" value="<?php echo $msk_nombreSO?>" name="fk_nombreSO" <?php if($fk_nombreSO==$msk_nombreSO) echo " checked "?>></TD>
<TD width="20" align=center>&nbsp;</TD>
</TR>
<TR>
@@ -109,12 +113,14 @@ if (isset($_POST["fk_nombreSO"])) $fk_nombreSO=$_POST["fk_nombreSO"];
<TR>
<TD height=20 align="center" colspan=14>
<A href=#>
- <IMG border=0 src="../images/boton_confirmar_<? echo $idioma ?>.gif" onclick="document.fdatos.submit()"></A></TD>
+ <IMG border=0 src="../images/boton_confirmar_<?php echo $idioma ?>.gif" onclick="document.fdatos.submit()"></A></TD>
</TR>
</TABLE>
</FORM>
<?php
}
+
+
$sws=$fk_sysFi | $fk_tamano | $fk_nombreSO;
pintaConfiguraciones($cmd,$idambito,$ambito,9,$sws,false,"pintaParticionesRestaurarImagen","ipordenador");
//________________________________________________________________________________________________________
@@ -136,27 +142,37 @@ if (isset($_POST["fk_nombreSO"])) $fk_nombreSO=$_POST["fk_nombreSO"];
// Version 0.1: En consulta SQL se quita imagenes.numpar>0. las imágenes recien creadas tienen numpar=0.
// US ETSII - Irina Gomez - 2014-11-11
________________________________________________________________________________________________________*/
-function HTMLSELECT_imagenes($cmd,$idimagen,$numpar,$codpar,$icp,$sw,$idordenadores,$ambito)
+function HTMLSELECT_imagenes($cmd,$idimagen,$numpar,$codpar,$icp,$sw,$idambito,$ambito)
{
global $IMAGENES_MONOLITICAS;
$SelectHtml="";
- $cmd->texto="SELECT *,repositorios.ip as iprepositorio FROM imagenes
+ $cmd->texto="SELECT *,repositorios.ip as iprepositorio, repositorios.nombrerepositorio as nombrerepo FROM imagenes
INNER JOIN repositorios ON repositorios.idrepositorio=imagenes.idrepositorio";
if($sw) // Imágenes con el mismo tipo de partición
- $cmd->texto.= " WHERE imagenes.codpar=".$codpar;
+ $cmd->texto.= " WHERE imagenes.codpar=".$codpar;
else
- $cmd->texto.= " WHERE imagenes.codpar<>".$codpar;
+ $cmd->texto.= " WHERE imagenes.codpar<>".$codpar;
- $cmd->texto.=" AND imagenes.codpar>0 AND imagenes.idrepositorio>0 "; // La imagene debe existir y
+ $cmd->texto.=" AND imagenes.idrepositorio>0"; // La imagene debe existir en el repositorio.
$cmd->texto.=" AND imagenes.tipo=".$IMAGENES_MONOLITICAS;
- $idordenador1 = explode(",",$idordenadores);
- $idordenador=$idordenador1[0];
- if ($ambito == 16)
- $cmd->texto.=" AND repositorios.idrepositorio=(select idrepositorio from ordenadores where ordenadores.idordenador=" .$idordenador .") OR repositorios.ip=(select ip from ordenadores where ordenadores.idordenador=". $idordenador .")";
- else
- $cmd->texto.=" AND repositorios.idrepositorio=(select idrepositorio from ordenadores where ordenadores.idordenador=" .$idordenador .")";
+ // 1.1 Imagenes de todos los repositorios de la UO.
+ switch ($ambito) {
+ case 16:
+ // ambito ordenador
+ $selectrepo='select repositorios.idrepositorio from repositorios INNER JOIN aulas INNER JOIN ordenadores where repositorios.idcentro=aulas.idcentro AND aulas.idaula=ordenadores.idaula AND idordenador='.$idambito;
+ break;
+ case 8:
+ // ambito grupo ordenadores
+ $selectrepo='select idrepositorio from repositorios INNER JOIN aulas INNER JOIN gruposordenadores where repositorios.idcentro=aulas.idcentro AND aulas.idaula=gruposordenadores.idaula AND idgrupo='.$idambito;
+ break;
+ case 4:
+ // ambito aulas
+ $selectrepo='select idrepositorio from repositorios INNER JOIN aulas where repositorios.idcentro=aulas.idcentro AND idaula='.$idambito;
+ break;
+ }
+ $cmd->texto.=" AND repositorios.idrepositorio IN (".$selectrepo.") ORDER BY imagenes.descripcion";
$rs=new Recordset;
$rs->Comando=&$cmd;
@@ -170,7 +186,8 @@ function HTMLSELECT_imagenes($cmd,$idimagen,$numpar,$codpar,$icp,$sw,$idordenado
$SelectHtml.='<OPTION value="'.$rs->campos["idimagen"]."_".$rs->campos["nombreca"]."_".$rs->campos["iprepositorio"]."_".$rs->campos["idperfilsoft"].'"';
if($idimagen==$rs->campos["idimagen"]) $SelectHtml.=" selected ";
$SelectHtml.='>';
- $SelectHtml.= $rs->campos["descripcion"].'</OPTION>';
+ $SelectHtml.= $rs->campos["descripcion"].' ('.$rs->campos["nombrerepo"].') </OPTION>';
+
$rs->Siguiente();
}
$rs->Cerrar();
diff --git a/admin/WebConsole/comandos/RestaurarImagenBasica.php b/admin/WebConsole/comandos/RestaurarImagenBasica.php
index 7b431c67..d7be1eec 100644
--- a/admin/WebConsole/comandos/RestaurarImagenBasica.php
+++ b/admin/WebConsole/comandos/RestaurarImagenBasica.php
@@ -1,4 +1,4 @@
-<?
+<?php
// ********************************************************************************************************
// Aplicaci�n WEB: ogAdmWebCon
// Autor: Jos� Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -67,11 +67,11 @@ if (isset($_POST["fk_nombreSO"])) $fk_nombreSO=$_POST["fk_nombreSO"];
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
<SCRIPT language="javascript" src="./jscripts/comunescomandos.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/restaurarimagenbasica_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/restaurarimagenbasica_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
-<?
+<?php
//________________________________________________________________________________________________________
//
@@ -95,24 +95,24 @@ if (isset($_POST["fk_nombreSO"])) $fk_nombreSO=$_POST["fk_nombreSO"];
RecopilaIpesMacs($cmd,$ambito,$idambito);
?>
<FORM action="RestaurarImagenBasica.php" name="fdatos" method="POST">
- <INPUT type="hidden" name="idambito" value="<? echo $idambito?>">
- <INPUT type="hidden" name="ambito" value="<? echo $ambito?>">
- <INPUT type="hidden" name="cadenaid" value="<? echo $cadenaid?>">
+ <INPUT type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <INPUT type="hidden" name="ambito" value="<?php echo $ambito?>">
+ <INPUT type="hidden" name="cadenaid" value="<?php echo $cadenaid?>">
<TABLE class="tabla_busquedas" align=center border=0 cellPadding=0 cellSpacing=0>
<TR>
- <TH height=15 align="center" colspan=14><? echo $TbMsg[18]?></TH>
+ <TH height=15 align="center" colspan=14><?php echo $TbMsg[18]?></TH>
</TR>
<TR>
- <TD align=right><? echo $TbMsg[30]?></TD>
- <TD align=center><INPUT onclick="document.fdatos.submit()" type="checkbox" value="<? echo $msk_sysFi?>" name="fk_sysFi" <? if($fk_sysFi==$msk_sysFi) echo " checked "?>></TD>
+ <TD align=right><?php echo $TbMsg[30]?></TD>
+ <TD align=center><INPUT onclick="document.fdatos.submit()" type="checkbox" value="<?php echo $msk_sysFi?>" name="fk_sysFi" <?php if($fk_sysFi==$msk_sysFi) echo " checked "?>></TD>
<TD width="20" align=center>&nbsp;</TD>
- <TD align=right><? echo $TbMsg[32]?></TD>
- <TD align=center><INPUT onclick="document.fdatos.submit()" type="checkbox" value="<? echo $msk_tamano?>" name="fk_tamano" <? if($fk_tamano==$msk_tamano) echo " checked "?>></TD>
+ <TD align=right><?php echo $TbMsg[32]?></TD>
+ <TD align=center><INPUT onclick="document.fdatos.submit()" type="checkbox" value="<?php echo $msk_tamano?>" name="fk_tamano" <?php if($fk_tamano==$msk_tamano) echo " checked "?>></TD>
<TD width="20" align=center>&nbsp;</TD>
- <TD align=right><? echo $TbMsg[31]?></TD>
- <TD align=center><INPUT onclick="document.fdatos.submit()" type="checkbox" value="<? echo $msk_nombreSO?>" name="fk_nombreSO" <? if($fk_nombreSO==$msk_nombreSO) echo " checked "?>></TD>
+ <TD align=right><?php echo $TbMsg[31]?></TD>
+ <TD align=center><INPUT onclick="document.fdatos.submit()" type="checkbox" value="<?php echo $msk_nombreSO?>" name="fk_nombreSO" <?php if($fk_nombreSO==$msk_nombreSO) echo " checked "?>></TD>
<TD width="20" align=center>&nbsp;</TD>
</TR>
<TR>
@@ -120,7 +120,7 @@ if (isset($_POST["fk_nombreSO"])) $fk_nombreSO=$_POST["fk_nombreSO"];
</TR>
</TABLE>
</FORM>
-<?
+<?php
}
$sws=$fk_sysFi | $fk_tamano | $fk_nombreSO;
pintaConfiguraciones($cmd,$idambito,$ambito,9,$sws,true,"pintaParticionesRestaurarImagenSincronizacion1");
@@ -138,7 +138,7 @@ if (isset($_POST["fk_nombreSO"])) $fk_nombreSO=$_POST["fk_nombreSO"];
</SCRIPT>
</BODY>
</HTML>
-<?
+<?php
/*________________________________________________________________________________________________________
@@ -153,15 +153,8 @@ function HTMLSELECT_imagenes($cmd,$idimagen,$numpar,$codpar,$icp,$sw,$idordenado
$SelectHtml="";
$cmd->texto="SELECT imagenes.*,repositorios.ip as iprepositorio,repositorios.nombrerepositorio
FROM imagenes
- INNER JOIN repositorios ON repositorios.idrepositorio=imagenes.idrepositorio";
-
- if($sw) // Im�genes con el mismo tipo de partici�n
- $cmd->texto.= " WHERE imagenes.codpar=".$codpar;
- else
- $cmd->texto.= " WHERE imagenes.codpar<>".$codpar;
-
- $cmd->texto.=" AND imagenes.tipo=".$IMAGENES_BASICAS."
- AND imagenes.codpar>0
+ INNER JOIN repositorios ON repositorios.idrepositorio=imagenes.idrepositorio
+ AND imagenes.tipo=".$IMAGENES_BASICAS."
AND imagenes.idrepositorio>0";
//AND imagenes.idperfilsoft>0"; // La imagene debe existir y estar creada
diff --git a/admin/WebConsole/comandos/RestaurarSoftIncremental.php b/admin/WebConsole/comandos/RestaurarSoftIncremental.php
index b030ce2b..3075819d 100644
--- a/admin/WebConsole/comandos/RestaurarSoftIncremental.php
+++ b/admin/WebConsole/comandos/RestaurarSoftIncremental.php
@@ -1,4 +1,4 @@
-<?
+<?php
// ********************************************************************************************************
// Aplicaci�n WEB: ogAdmWebCon
// Autor: Jos� Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -67,11 +67,11 @@ if (isset($_POST["fk_nombreSO"])) $fk_nombreSO=$_POST["fk_nombreSO"];
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
<SCRIPT language="javascript" src="./jscripts/comunescomandos.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/restaurarsoftincremental_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/restaurarsoftincremental_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
-<?
+<?php
//________________________________________________________________________________________________________
//
@@ -92,24 +92,24 @@ if (isset($_POST["fk_nombreSO"])) $fk_nombreSO=$_POST["fk_nombreSO"];
RecopilaIpesMacs($cmd,$ambito,$idambito);
?>
<FORM action="RestaurarSoftIncremental.php" name="fdatos" method="POST">
- <INPUT type="hidden" name="idambito" value="<? echo $idambito?>">
- <INPUT type="hidden" name="ambito" value="<? echo $ambito?>">
- <INPUT type="hidden" name="cadenaid" value="<? echo $cadenaid?>">
+ <INPUT type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <INPUT type="hidden" name="ambito" value="<?php echo $ambito?>">
+ <INPUT type="hidden" name="cadenaid" value="<?php echo $cadenaid?>">
<TABLE class="tabla_busquedas" align=center border=0 cellPadding=0 cellSpacing=0>
<TR>
- <TH height=15 align="center" colspan=14><? echo $TbMsg[18]?></TH>
+ <TH height=15 align="center" colspan=14><?php echo $TbMsg[18]?></TH>
</TR>
<TR>
- <TD align=right><? echo $TbMsg[30]?></TD>
- <TD align=center><INPUT onclick="document.fdatos.submit()" type="checkbox" value="<? echo $msk_sysFi?>" name="fk_sysFi" <? if($fk_sysFi==$msk_sysFi) echo " checked "?>></TD>
+ <TD align=right><?php echo $TbMsg[30]?></TD>
+ <TD align=center><INPUT onclick="document.fdatos.submit()" type="checkbox" value="<?php echo $msk_sysFi?>" name="fk_sysFi" <?php if($fk_sysFi==$msk_sysFi) echo " checked "?>></TD>
<TD width="20" align=center>&nbsp;</TD>
- <TD align=right><? echo $TbMsg[32]?></TD>
- <TD align=center><INPUT onclick="document.fdatos.submit()" type="checkbox" value="<? echo $msk_tamano?>" name="fk_tamano" <? if($fk_tamano==$msk_tamano) echo " checked "?>></TD>
+ <TD align=right><?php echo $TbMsg[32]?></TD>
+ <TD align=center><INPUT onclick="document.fdatos.submit()" type="checkbox" value="<?php echo $msk_tamano?>" name="fk_tamano" <?php if($fk_tamano==$msk_tamano) echo " checked "?>></TD>
<TD width="20" align=center>&nbsp;</TD>
- <TD align=right><? echo $TbMsg[31]?></TD>
- <TD align=center><INPUT onclick="document.fdatos.submit()" type="checkbox" value="<? echo $msk_nombreSO?>" name="fk_nombreSO" <? if($fk_nombreSO==$msk_nombreSO) echo " checked "?>></TD>
+ <TD align=right><?php echo $TbMsg[31]?></TD>
+ <TD align=center><INPUT onclick="document.fdatos.submit()" type="checkbox" value="<?php echo $msk_nombreSO?>" name="fk_nombreSO" <?php if($fk_nombreSO==$msk_nombreSO) echo " checked "?>></TD>
<TD width="20" align=center>&nbsp;</TD>
</TR>
<TR>
@@ -117,7 +117,7 @@ if (isset($_POST["fk_nombreSO"])) $fk_nombreSO=$_POST["fk_nombreSO"];
</TR>
</TABLE>
</FORM>
-<?
+<?php
}
$sws=$fk_sysFi | $fk_tamano | $fk_nombreSO;
pintaConfiguraciones($cmd,$idambito,$ambito,9,$sws,true,"pintaParticionesRestaurarImagenSincronizacion1");
@@ -135,7 +135,7 @@ if (isset($_POST["fk_nombreSO"])) $fk_nombreSO=$_POST["fk_nombreSO"];
</SCRIPT>
</BODY>
</HTML>
-<?
+<?php
/*________________________________________________________________________________________________________
@@ -152,13 +152,8 @@ function HTMLSELECT_imagenes($cmd,$idimagen,$numpar,$codpar,$icp,$sw,$idordenado
imagenes.nombreca as nombrecainc,imagenes.descripcion as descripcioninc
FROM imagenes
INNER JOIN imagenes as imagesbas on imagesbas.idimagen = imagenes.imagenid
- INNER JOIN repositorios ON repositorios.idrepositorio=imagesbas.idrepositorio";
- if($sw) // Im�genes con el mismo tipo de partici�n
- $cmd->texto.= " WHERE imagesbas.codpar=".$codpar;
- else
- $cmd->texto.= " WHERE imagesbas.codpar<>".$codpar;
-
- $cmd->texto.=" AND imagenes.tipo=".$IMAGENES_INCREMENTALES;
+ INNER JOIN repositorios ON repositorios.idrepositorio=imagesbas.idrepositorio
+ AND imagenes.tipo=".$IMAGENES_INCREMENTALES;
// AND imagenes.idperfilsoft>=0"; // La imagene debe existir y estar creada
$idordenador1 = explode(",",$idordenadores);
diff --git a/admin/WebConsole/comandos/gestores/gestor_Comandos.php b/admin/WebConsole/comandos/gestores/gestor_Comandos.php
index 7e22d431..dd06022d 100644
--- a/admin/WebConsole/comandos/gestores/gestor_Comandos.php
+++ b/admin/WebConsole/comandos/gestores/gestor_Comandos.php
@@ -9,6 +9,7 @@
// Gestor de todos los comandos
// *************************************************************************************************************************************************
include_once("../../includes/ctrlacc.php");
+include_once("../../includes/restfunctions.php");
include_once("../../clases/AdoPhp.php");
include_once("../../clases/SockHidra.php");
include_once("../../includes/constantes.php");
@@ -19,8 +20,7 @@ include_once("../../includes/RecopilaIpesMacs.php");
//________________________________________________________________________________________________________
include_once("../includes/capturaacciones.php");
//________________________________________________________________________________________________________
-
- // Recoge parametros de seguimiento
+// Recoge parametros de seguimiento
$sw_ejya="";
$sw_seguimiento="";
$sw_ejprg="";
@@ -28,6 +28,7 @@ $sw_mkprocedimiento="";
$nombreprocedimiento="";
$idprocedimiento="";
$ordprocedimiento=0;
+$avisoRepo=false;
$sw_mktarea="";
$nombretarea="";
@@ -74,18 +75,7 @@ $atributos=str_replace('$',chr(9),$atributos);
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<BODY>
<SCRIPT language="javascript" src="../jscripts/comunescomandos.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
- <? echo '<SCRIPT language="javascript" src="../../idiomas/javascripts/'.$idioma.'/comandos/ejecutarscripts_'.$idioma.'.js"></SCRIPT>'?>
-<?php
-//##################################################################
-if ( ereg("ptc=UNICAST", $atributos) & $ambito!=16) { ?>
- <SCRIPT language="javascript">
- if (confirm(TbMsg[4]) == false) {
- alert(CTbMsg[0]);
- location.href="../../nada.php"
- }
- </SCRIPT>
-<?php } ?>
+ <?php echo '<SCRIPT language="javascript" src="../../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?>
<?php
//##################################################################
@@ -93,6 +83,7 @@ if ( ereg("ptc=UNICAST", $atributos) & $ambito!=16) { ?>
$cadenaid="";
$cadenaip="";
$cadenamac="";
+$cadenaoga=""; // Clave de acceso a la API REST de OGAgent.
if(!empty($filtro)){ // Ambito restringido a un subconjuto de ordenadores
if(substr($filtro,strlen($cadenaid)-1,1)==";") // Si el último caracter es una coma
@@ -124,6 +115,11 @@ $cmd->CreaParametro("@restrambito","",0);
$cmd->CreaParametro("@ordprocedimiento",0,1);
$cmd->CreaParametro("@ordtarea",0,1);
+/* PARCHE UHU heredado de la version 1.1.0: Si la accion a realizar es Arrancar incluimos una pagina para arrancar desde el repo */
+if($funcion == "nfn=Arrancar".chr(13))
+ include("wakeonlan_repo.php");
+/**/
+
if($ambito==0){ // Ambito restringido a un subconjuto de ordenadores con formato (idordenador1,idordenador2,etc)
$cmd->ParamSetValor("@restrambito",$idambito);
$idambito=0;
@@ -166,7 +162,6 @@ if($sw_ejya=='on' || $sw_ejprg=="on" ){
VALUES (@idordenador,@tipoaccion,@idtipoaccion,@descriaccion,@ip,
@sesion,@idcomando,@parametros,@fechahorareg,@estado,@resultado,@ambito,@idambito,@restrambito,@idcentro)";
$resul=$cmd->Ejecutar();
- //echo "<br>".$cmd->texto;
}
$acciones=chr(13)."ids=".$sesion.chr(13); // Para seguimiento
}
@@ -176,13 +171,16 @@ if($sw_ejya=='on' || $sw_ejprg=="on" ){
echo '</SCRIPT>';
}
else{
+ $ValorParametros=extrae_parametros($parametros,chr(13),'=');
+ $script=@urldecode($ValorParametros["scp"]);
if($sw_ejya=='on'){
- // Envio al servidor
- $shidra=new SockHidra($servidorhidra,$hidraport);
- if ($shidra->conectar()){ // Se ha establecido la conexión con el servidor hidra
+ // comando 16 sólo agente nuevo
+ if ($idcomando != 16){
+ // Envio al servidor
+ $shidra=new SockHidra($servidorhidra,$hidraport);
+ if ($shidra->conectar()){ // Se ha establecido la conexión con el servidor hidra
$parametros.=$aplicacion;
$parametros.=$acciones;
- //die($parametros);
$resul=$shidra->envia_comando($parametros);
if($resul)
$trama=$shidra->recibe_respuesta();
@@ -193,15 +191,95 @@ if($sw_ejya=='on' || $sw_ejprg=="on" ){
$resul=$ValorParametros["res"];
}
$shidra->desconectar();
+ }
+ // Guardamos resultado de ogAgent original
+ $resulhidra = $resul;
+ } else {
+ // En agente nuevo devuelvo siempre correcto
+ $resulhidra = 1;
+ }
+
+ // Comprobamos si el comando es soportado por el nuevo ogAgent
+ $numip=0;
+ $ogAgentNuevo = false;
+ switch ($idcomando) {
+ case 2:
+ // Apagar
+ $urlcomando = 'poweroff';
+ $ogAgentNuevo = true;
+ break;
+ case 5:
+ // Reiniciar
+ $urlcomando = 'reboot';
+ $ogAgentNuevo = true;
+ break;
+ case 8:
+ // Ejecutar script
+ $urlcomando = 'script';
+ $ogAgentNuevo = true;
+ $client = (isset ($_POST['modoejecucion']) && $_POST['modoejecucion'] != '' ) ? $_POST['modoejecucion'] : 'true';
+ $paramsPost = '{"script":"'.base64_encode($script).'","client":"'.$client.'"}';
+ break;
+ case 16:
+ // Enviar mensaje
+ $urlcomando = 'popup';
+ $ogAgentNuevo = true;
+ $paramsPost = '{"title":"'.$_POST['titulo'].'","message":"'.$_POST['mensaje'].'"}';
+ break;
+ }
+
+ // Se envía acción al nuevo ogAgent
+ if ( $ogAgentNuevo ) {
+ // Send REST requests to new OGAgent clients.
+ $urls = array();
+ $ipsuccess = '';
+ // Compose array of REST URLs.
+ $auxIp = explode(';', $cadenaip);
+ $auxKey = explode(";", $cadenaoga);
+ $i = 0;
+ foreach ($auxIp as $ip) {
+ $urls[$ip]['url'] = "https://$ip:8000/opengnsys/$urlcomando";
+ if (isset($auxKey[$i])) $urls[$ip]['header'] = Array("Authorization: ".$auxKey[$i]);
+ if (isset($paramsPost)) $urls[$ip]['post'] = $paramsPost;
+
+ $i++;
+ }
+ // Launch concurrent requests.
+ $responses = multiRequest($urls);
+ // Process responses array (IP as array index).
+ foreach ($responses as $ip => $resp) {
+ // Check if response code is OK (200).
+ if ($resp['code'] == 200) {
+ $ipsuccess .= "'".$ip."',";
+ $numip++;
+ }
+ }
+ // quitamos último carácter ','
+ $ipsuccess=substr($ipsuccess, 0, -1);
+
+ // Actualizamos la cola de acciones con los que no dan error
+ if ( $numip >> 0 ) {
+ $fin= date ("Y-m-d H:i:s");
+ $cmd->texto="UPDATE acciones SET resultado='1', estado='3', ".
+ " descrinotificacion='', fechahorafin='".$fin."' ".
+ " WHERE ip IN ($ipsuccess) AND idcomando='$idcomando' ".
+ " ORDER BY idaccion DESC LIMIT $numip";
+ $resul=$cmd->Ejecutar();
+ }
}
- if (!$resul){
+ // Mostramos mensaje con resultado
+ if (!$resulhidra && $numip == 0){
echo '<SCRIPT language="javascript">';
echo 'resultado_comando(1);'.chr(13);
echo '</SCRIPT>';
}
else{
echo '<SCRIPT language="javascript">'.chr(13);
- echo 'resultado_comando(2);'.chr(13);
+ if ($avisoRepo) {
+ echo 'resultado_comando(17);'.chr(13);
+ } else {
+ echo 'resultado_comando(2);'.chr(13);
+ }
echo '</SCRIPT>'.chr(13);
}
}
diff --git a/admin/WebConsole/comandos/gestores/wakeonlan_repo.php b/admin/WebConsole/comandos/gestores/wakeonlan_repo.php
new file mode 100644
index 00000000..b2929d48
--- /dev/null
+++ b/admin/WebConsole/comandos/gestores/wakeonlan_repo.php
@@ -0,0 +1,85 @@
+<?php
+// Fichero con funciones para trabajar con el webservice
+include_once("../../includes/restfunctions.php");
+
+/**
+ En este punto disponemos de tres variables indicando las ips, las macs y las ids de los
+ ordenadores, este script obtiene cual es el repositorio
+ $cadenaid
+ $cadenaip
+ $cadenamac
+
+*/
+// Capturamos todas las ids
+$macs = explode(";",$cadenamac);
+// Recorremos las ids y vemos cual es la ip del repositorio
+$repos = array();
+$reposAndMacs = array();
+foreach($macs as $mac){
+ $cmd->texto="SELECT repo.ip, repo.apikey FROM ordenadores o,repositorios repo WHERE o.mac=\"".$mac."\" AND o.idrepositorio=repo.idrepositorio";
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir())
+ return; // Error al abrir recordset
+ while (!$rs->EOF){
+ $repo = $rs->campos["ip"];
+ if(!existREPO($repo, $repos)){
+ $repos[count($repos)]=$repo;
+ }
+ // Una vez creado el repo se asigna la mac del pc a su lista
+ if(empty($reposAndMacs[$repo])){
+ $reposAndMacs[$repo] = array();
+ $reposAndMacs[$repo]["apikey"] = $rs->campos["apikey"];
+ }
+ // Modificar la mac añadiendo ":" cada dos caracteres
+ $tmp = substr_replace($mac, ":", 2, 0);
+ $tmp = substr_replace($tmp, ":", 5, 0);
+ $tmp = substr_replace($tmp, ":", 8, 0);
+ $tmp = substr_replace($tmp, ":", 11, 0);
+ $tmp = substr_replace($tmp, ":", 14, 0);
+
+ $reposAndMacs[$repo][count($reposAndMacs[$repo])] = $tmp;
+ $rs->Siguiente();
+ }
+ $rs->Cerrar();
+}
+// En este punto tenemos un array con todos los repos y cada uno de ellos con una lista de todas las macs que deben arrancar
+// Recorremos cada uno de ellos
+foreach($reposAndMacs as $repo => $macs){
+ // En el array de $macs tenemos la clave "apikey"
+ if($macs["apikey"] !== ""){
+ $apiKeyRepo = $macs["apikey"];
+ unset($macs["apikey"]);
+ // Componer datos de conexión para el repositorio.
+ $urls[$repo]['url'] = "https://$repo/opengnsys/rest/repository/poweron";
+ $urls[$repo]['header'] = array('Authorization: '. $apiKeyRepo);
+ $urls[$repo]['post'] = '{"macs": ["' . implode('","', $macs) . '"]}';
+ }
+ else{
+ $avisoRepo = true;
+ }
+}
+// Enviar petición múltiple a los repositorios afectados.
+if (isset($urls)) {
+ $result = multiRequest($urls);
+ // Comprobar respuesta.
+ foreach ($result as $repo => $res) {
+ if ($res['code'] != 200) {
+ $avisoRepo = true;
+ }
+ }
+}
+
+
+function existREPO($repo, $repos){
+ $found=false;
+ $index = 0;
+ while(!$found && $index < count($repos)){
+ $r = $repos[$index];
+ if($r == $repo)
+ $found=true;
+ }
+ return $found;
+}
+
+?>
diff --git a/admin/WebConsole/comandos/includes/FiltradoAmbito.php b/admin/WebConsole/comandos/includes/FiltradoAmbito.php
index 62b12952..6bc524df 100644
--- a/admin/WebConsole/comandos/includes/FiltradoAmbito.php
+++ b/admin/WebConsole/comandos/includes/FiltradoAmbito.php
@@ -173,13 +173,24 @@ function RecorriendoOrdenadores($cmd)
<TD align="center">'.$TbMsg["STATUS_OPG"].'</TD>
<TD><INPUT type="checkbox" checked onclick="selector(this,3,'.$cid.')"></TD>
+</TR>
-<TD align="center">'.$TbMsg["STATUS_WXP"].'</TD>
+<TR>
+<TD align="center">'.$TbMsg["STATUS_WIN"].'</TD>
<TD><INPUT type="checkbox" checked onclick="selector(this,4,'.$cid.')"></TD>
-<TD align="center">'.$TbMsg["STATUS_LNX"].'</TD>
+<TD align="center">'.$TbMsg["STATUS_WINS"].'</TD>
<TD><INPUT type="checkbox" checked onclick="selector(this,5,'.$cid.')"></TD>
+<TD align="center">'.$TbMsg["STATUS_LNX"].'</TD>
+<TD><INPUT type="checkbox" checked onclick="selector(this,6,'.$cid.')"></TD>
+
+<TD align="center">'.$TbMsg["STATUS_LNXS"].'</TD>
+<TD><INPUT type="checkbox" checked onclick="selector(this,7,'.$cid.')"></TD>
+
+<TD align="center">'.$TbMsg["STATUS_OSX"].'</TD>
+<TD><INPUT type="checkbox" checked onclick="selector(this,8,'.$cid.')"></TD>
+
</TR>
</TABLE>';
@@ -193,7 +204,7 @@ function RecorriendoOrdenadores($cmd)
$ip=$rs->campos["ip"];
$cadenaip.=$ip.";";
$htmlCode.='<TABLE cellspacing=1 cellpadding=0>';
- $htmlCode.=' <TR><TD align="center"><img sondeo="ordenador_OFF.gif" id="img-'.$ip.'" width=24 src="../images/ordenador_OFF.gif"></TD></TR>';
+ $htmlCode.=' <TR><TD align="center"><img sondeo="ordenador_OFF.png" id="img-'.$ip.'" width=24 src="../images/ordenador_OFF.png"></TD></TR>';
$htmlCode.=' <TR><TD align="center"><SPAN style="FONT-SIZE:9px; COLOR: #4f4f4f;">'.$nombreordenador.'</SPAN></TD></TR>';
$htmlCode.=' <TR><TD align="center"><SPAN style="FONT-SIZE:8px; COLOR: #4f4f4f;">'.$ip.'</SPAN></TD></TR>';
$htmlCode.=' <TR><TD align="center"><INPUT id="chk-'.$ip.'" type="checkbox" checked></TD></TR>';
@@ -219,8 +230,8 @@ echo '</SCRIPT>';
?>
<SCRIPT language="javascript">
function Sondeo(){
- var ambito=<? echo $ambito?>;
- var idambito=<? echo $idambito?>;
+ var ambito=<?php echo $ambito?>;
+ var idambito=<?php echo $idambito?>;
var wurl="../principal/sondeo.php";
var prm="ambito="+ambito+"&idambito="+idambito+"&sw=1";
CallPage(wurl,prm,"retornoSondeo","POST");
@@ -235,8 +246,8 @@ function retornoSondeo(resul)
//________________________________________________________________________________________________________
//
function respuestaSondeo(){
- var ambito=<? echo $ambito?>;
- var idambito=<? echo $idambito?>;
+ var ambito=<?php echo $ambito?>;
+ var idambito=<?php echo $idambito?>;
var wurl="../principal/sondeo.php";
var prm="ambito="+ambito+"&idambito="+idambito+"&sw=2";
CallPage(wurl,prm,"retornorespuestaSondeo","POST");
@@ -276,45 +287,34 @@ function soIMG(so)
{
var MimgOrdenador="";
switch(so){
- case 'INI':
- MimgOrdenador="ordenador_INI.gif"; // Cliente ocupado
- break;
- case 'BSY':
- MimgOrdenador="ordenador_BSY.gif"; // Cliente ocupado
- break;
- case 'OPG':
- MimgOrdenador="ordenador_OPG.gif"; // Cliente Rembo
- break;
- case 'WS2':
- MimgOrdenador="ordenador_WS2.gif"; // Windows Server 2003
- break;
- case 'W2K':
- MimgOrdenador="ordenador_W2K.gif"; // Windows 2000
- break;
- case 'WXP':
- MimgOrdenador="ordenador_WXP.gif"; // Windows XP
- break;
- case 'WNT':
- MimgOrdenador="ordenador_WNT.gif"; // Windows NT
- break;
- case 'W95':
- MimgOrdenador="ordenador_W95.gif"; // Windows 95
- break;
- case 'W98':
- MimgOrdenador="ordenador_W98.gif"; // Windows 98
- break;
- case 'WML':
- MimgOrdenador="ordenador_WML.gif"; // Windows Millenium
- break;
- case 'WIN':
- MimgOrdenador="ordenador_WXP.gif"; // Windows
- break;
- case 'LNX':
- MimgOrdenador="ordenador_LNX.gif"; // Linux
- break;
- default:
- MimgOrdenador="ordenador_OFF.gif"; // Apagado
- break;
+ case 'INI':
+ MimgOrdenador="ordenador_INI.png"; // Cliente iniciando
+ break;
+ case 'BSY':
+ MimgOrdenador="ordenador_BSY.png"; // Cliente ocupado
+ break;
+ case 'OPG':
+ MimgOrdenador="ordenador_OPG.png"; // Cliente OpenGnsys
+ break;
+ case 'WIN':
+ case 'WXP':
+ MimgOrdenador="ordenador_WIN.png"; // Windows
+ break;
+ case 'WINS':
+ MimgOrdenador="ordenador_WINS.png"; // Sesin Windows
+ break;
+ case 'LNX':
+ MimgOrdenador="ordenador_LNX.png"; // Linux
+ break;
+ case 'LNXS':
+ MimgOrdenador="ordenador_LNXS.png"; // Sesin Linux
+ break;
+ case 'OSX':
+ MimgOrdenador="ordenador_OSX.png"; // macOS
+ break;
+ default:
+ MimgOrdenador="ordenador_OFF.png"; // Apagado
+ break;
}
return(MimgOrdenador);
}
@@ -334,32 +334,38 @@ function selector(oSLCT,op,id)
var oCHK = document.getElementById('chk-'+ip); // Recupera checkbox
switch(parseInt(op)){
- case 1: // Apagados
- if(estado=="ordenador_OFF.gif")
+ case 1: // Apagados
+ if(estado=="ordenador_OFF.png")
oCHK.checked=sw;
break;
-
case 2: // Ocupados
- if(estado=="ordenador_BSY.gif")
+ if(estado=="ordenador_BSY.png")
oCHK.checked=sw;
break;
-
- case 3: // Opengnsys
- if(estado=="ordenador_OPG.gif")
+ case 3: // OpenGnsys
+ if(estado=="ordenador_OPG.png")
oCHK.checked=sw;
break;
-
case 4: // Windows
- if(estado=="ordenador_WXP.gif")
+ if(estado=="ordenador_WIN.png")
oCHK.checked=sw;
break;
-
- case 5: // Linux
- if(estado=="ordenador_LNX.gif")
+ case 5: // Sesin Windows
+ if(estado=="ordenador_WINS.png")
+ oCHK.checked=sw;
+ break;
+ case 6: // Linux
+ if(estado=="ordenador_LNX.png")
+ oCHK.checked=sw;
+ break;
+ case 7: // Sesin Linux
+ if(estado=="ordenador_LNXS.png")
+ oCHK.checked=sw;
+ break;
+ case 8: // macOS
+ if(estado=="ordenador_OSX.png")
oCHK.checked=sw;
break;
-
-
}
}
}
diff --git a/admin/WebConsole/comandos/includes/capturaacciones.php b/admin/WebConsole/comandos/includes/capturaacciones.php
index 97ec8435..1941b428 100644
--- a/admin/WebConsole/comandos/includes/capturaacciones.php
+++ b/admin/WebConsole/comandos/includes/capturaacciones.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/comandos/includes/formularioacciones.php b/admin/WebConsole/comandos/includes/formularioacciones.php
index ffefa10c..90c5de3c 100644
--- a/admin/WebConsole/comandos/includes/formularioacciones.php
+++ b/admin/WebConsole/comandos/includes/formularioacciones.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -9,13 +9,13 @@
// Formulario para paso de parametros comunes para la ejecución de comandos
// *************************************************************************************************************************************************
?>
-<FORM align=center name="fdatosejecucion" action="<? echo $gestor?>" method="post">
- <INPUT type="hidden" name="idcomando" value="<? echo $idcomando?>">
- <INPUT type="hidden" name="descricomando" value="<? echo $descricomando?>">
- <INPUT type="hidden" name="ambito" value="<? echo $ambito?>">
- <INPUT type="hidden" name="idambito" value="<? echo $idambito?>">
- <INPUT type="hidden" name="funcion" value="<? echo $funcion?>">
- <INPUT type="hidden" name="atributos" value="<? echo $atributos?>">
- <INPUT type="hidden" name="gestor" value="<? echo $gestor?>">
+<FORM align=center name="fdatosejecucion" action="<?php echo $gestor?>" method="post">
+ <INPUT type="hidden" name="idcomando" value="<?php echo $idcomando?>">
+ <INPUT type="hidden" name="descricomando" value="<?php echo $descricomando?>">
+ <INPUT type="hidden" name="ambito" value="<?php echo $ambito?>">
+ <INPUT type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <INPUT type="hidden" name="funcion" value="<?php echo $funcion?>">
+ <INPUT type="hidden" name="atributos" value="<?php echo $atributos?>">
+ <INPUT type="hidden" name="gestor" value="<?php echo $gestor?>">
<INPUT type="hidden" name="filtro" value="">
diff --git a/admin/WebConsole/comandos/includes/opcionesacciones.php b/admin/WebConsole/comandos/includes/opcionesacciones.php
index c973a691..c8f9ea6a 100644
--- a/admin/WebConsole/comandos/includes/opcionesacciones.php
+++ b/admin/WebConsole/comandos/includes/opcionesacciones.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -9,85 +9,85 @@
// Opciones comunes para la ejecución de comandos
// *************************************************************************************************************************************************
?>
-<P align=center><span align=center class=subcabeceras><? echo $TbMsgAux[0] ?></span></P>
+<P align=center><span align=center class=subcabeceras><?php echo $TbMsgAux[0] ?></span></P>
<?php if ($ambito !=16 ){ ?>
- <INPUT type="hidden" name="ambito" value="<? echo $ambito?>">
+ <INPUT type="hidden" name="ambito" value="<?php echo $ambito?>">
<?php } ?>
-<?if($idcomando!=10){?>
+<?php if($idcomando!=10){?>
<TABLE align=center>
<TR>
- <TD><IMG border=0 style="cursor:pointer" src="../images/boton_aceptar_<? echo $idioma ?>.gif" onclick="confirmar()" ></TD>
+ <TD><IMG border=0 style="cursor:pointer" src="../images/boton_aceptar_<?php echo $idioma ?>.gif" onclick="confirmar()" ></TD>
</TR>
</TABLE>
<BR>
-<?}?>
+<?php }?>
<TABLE align=center class=opciones_ejecucion BORDER=0>
<TR>
<TD><INPUT name=sw_ejya type=checkbox checked></TD>
- <TD colspan=3> <? echo $TbMsgAux[1] ?> &nbsp; </TD>
+ <TD colspan=3> <?php echo $TbMsgAux[1] ?> &nbsp; </TD>
</TR>
<TR>
<TD>&nbsp; </TD>
- <TD><INPUT name=sw_seguimiento type=radio value=1></TD><TD><? echo $TbMsgAux[2] ?>&nbsp;</TD>
+ <TD><INPUT name=sw_seguimiento type=radio value=1></TD><TD><?php echo $TbMsgAux[2] ?>&nbsp;</TD>
</TR>
<TR>
<TD>&nbsp; </TD>
- <TD><INPUT checked name=sw_seguimiento type=radio value=0></TD><TD><? echo $TbMsgAux[3] ?>&nbsp;</TD>
+ <TD><INPUT checked name=sw_seguimiento type=radio value=0></TD><TD><?php echo $TbMsgAux[3] ?>&nbsp;</TD>
</TR>
<!-------------------------------------------------------------------------------------------------------------------------------->
<TR HEIGHT=5><TD colspan=4><HR></TD></TR>
<!-------------------------------------------------------------------------------------------------------------------------------->
<TR>
<TD><INPUT name=sw_ejprg type=checkbox></TD>
- <TD colspan=3><? echo $TbMsgAux[4] ?>&nbsp;</TD>
+ <TD colspan=3><?php echo $TbMsgAux[4] ?>&nbsp;</TD>
</TR>
<!-------------------------------------------------------------------------------------------------------------------------------->
<TR HEIGHT=5><TD colspan=4><HR></TD></TR>
<!-------------------------------------------------------------------------------------------------------------------------------->
<TR>
<TD><INPUT onclick="clic_mkprocedimiento(this)" name=sw_mkprocedimiento type=checkbox></TD>
- <TD colspan=3><? echo $TbMsgAux[5] ?>&nbsp;</TD></TR>
+ <TD colspan=3><?php echo $TbMsgAux[5] ?>&nbsp;</TD></TR>
<TR>
<TD>&nbsp; </TD>
<TD><INPUT onclick="clic_nwprocedimiento(this)" name=sw_procedimiento type=radio value=0></TD>
- <TD><? echo $TbMsgAux[6] ?>&nbsp; </TD>
+ <TD><?php echo $TbMsgAux[6] ?>&nbsp; </TD>
<TD><INPUT onclick="clic_nomprocedimiento(this)" style="FONT-FAMILY:Arial, Helvetica, sans-serif;FONT-SIZE: 11px" name=nombreprocedimiento style="HEIGHT: 22px; WIDTH: 275px"></TD></TR>
<TR>
<TD>&nbsp; </TD>
<TD><INPUT onclick="clic_exprocedimiento(this)" name=sw_procedimiento type=radio value=1></TD>
- <TD><? echo $TbMsgAux[7] ?>&nbsp;</TD>
- <TD><?echo HTMLSELECT($cmd,$idcentro,'procedimientos',0,'idprocedimiento','descripcion',275,"procedimientoexistente");?></TD></TR>
+ <TD><?php echo $TbMsgAux[7] ?>&nbsp;</TD>
+ <TD><?php echo HTMLSELECT($cmd,$idcentro,'procedimientos',0,'idprocedimiento','descripcion',275,"procedimientoexistente");?></TD></TR>
<TR>
<TD>&nbsp; </TD>
<TD>&nbsp; </TD>
- <TD><? echo $TbMsgAux[8] ?>&nbsp;</TD>
+ <TD><?php echo $TbMsgAux[8] ?>&nbsp;</TD>
<TD><INPUT maxlength=3 style="FONT-FAMILY:Arial, Helvetica, sans-serif;FONT-SIZE: 11px;WIDTH:30" name=ordprocedimiento type=text value=""></TD></TR>
<!-------------------------------------------------------------------------------------------------------------------------------->
<TR HEIGHT=10><TD colspan=4>&nbsp; <HR></TD></TR>
<!-------------------------------------------------------------------------------------------------------------------------------->
<TR>
<TD><INPUT onclick="clic_mktarea(this)" name=sw_mktarea type=checkbox></TD>
- <TD colspan=3><? echo $TbMsgAux[9] ?>&nbsp;</TD></TR>
+ <TD colspan=3><?php echo $TbMsgAux[9] ?>&nbsp;</TD></TR>
<TR>
<TD>&nbsp; </TD>
<TD><INPUT onclick="clic_nwtarea(this)" name=sw_tarea type=radio value=0></TD>
- <TD><? echo $TbMsgAux[10] ?>&nbsp;</TD>
+ <TD><?php echo $TbMsgAux[10] ?>&nbsp;</TD>
<TD><INPUT onclick="clic_nomtarea(this)" style="FONT-FAMILY:Arial, Helvetica, sans-serif;FONT-SIZE: 11px" name=nombretarea style="HEIGHT: 22px; WIDTH: 275px"></TD></TR>
<TR>
<TD>&nbsp; </TD>
<TD><INPUT onclick="clic_extarea(this)" name=sw_tarea type=radio value=1></TD>
- <TD><? echo $TbMsgAux[11] ?>&nbsp;</TD>
- <TD><?echo HTMLSELECT($cmd,$idcentro,'tareas',0,'idtarea','descripcion',275,"tareaexistente");?></TD></TR>
+ <TD><?php echo $TbMsgAux[11] ?>&nbsp;</TD>
+ <TD><?php echo HTMLSELECT($cmd,$idcentro,'tareas',0,'idtarea','descripcion',275,"tareaexistente");?></TD></TR>
<TR>
<TD>&nbsp; </TD>
<TD>&nbsp; </TD>
- <TD><? echo $TbMsgAux[12] ?>&nbsp;</TD>
+ <TD><?php echo $TbMsgAux[12] ?>&nbsp;</TD>
<TD><INPUT maxlength=3 style="FONT-FAMILY:Arial, Helvetica, sans-serif;FONT-SIZE: 11px;WIDTH:30" name=ordtarea type=text value=""></TD></TR>
<!-------------------------------------------------------------------------------------------------------------------------------->
</TABLE>
diff --git a/admin/WebConsole/comandos/jscripts/Configurar.js b/admin/WebConsole/comandos/jscripts/Configurar.js
index 2b7e5f29..38f17a15 100644
--- a/admin/WebConsole/comandos/jscripts/Configurar.js
+++ b/admin/WebConsole/comandos/jscripts/Configurar.js
@@ -121,15 +121,23 @@ function comprobarDatos(cc)
var npar; // Partición en formato integer
var tch=0; // Tamaño de la caché
+ var allpartsize=0; // Tamaño total de todas las particiones.
+ var extsize=0; // Tamaño partición "EXTENDED"
+ var allextsize=0; // Tamaño total de las particiones extendidas.
+
+ var hdsize = document.getElementById("hdsize"+cc).value;
+
var trCfg = document.getElementById("TR_"+cc); // Recupera primer <TR> de la configuración
trCfg=trCfg.nextSibling; // Primera fila de particiones
while(trCfg.id!="TRIMG_"+cc){
var tama=trCfg.childNodes[itama].childNodes[0].value; // Tamaño de partición
+
var par=tomavalorDesple(trCfg.childNodes[ipar].childNodes[0]); // Partición
npar=parseInt(par);
if(maxpar<npar) maxpar=npar; // Guarda partición de mayor orden
+
if (npar==4){
swc=true; // Se especifica partición caché
tch=tama;
@@ -155,7 +163,17 @@ function comprobarDatos(cc)
return(false);
}
- if(codpar=="EXTENDED") swe=true;
+ if(codpar=="EXTENDED") {
+ swe=true;
+ extsize=tama;
+ } else {
+ if (npar<=4){
+ allpartsize+=parseInt(tama);
+ } else {
+ allextsize+=parseInt(tama);
+ }
+ }
+
if(codpar=="CACHE" && npar!=4){
alert(TbMsg[6]);
trCfg.childNodes[icodpar].childNodes[0].focus();
@@ -196,6 +214,21 @@ function comprobarDatos(cc)
}
}
+ // Alerta si las particiones lógicas son mayores que la extendida
+ if(swe){
+ if (allextsize>extsize) {
+ alert(TbMsg["EXTSIZE"]);
+ return(false);
+ }
+ allpartsize+=parseInt(extsize);
+ }
+ // Alerta si tamaño del disco menor que las particiones
+ if (hdsize<allpartsize) {
+ alert(TbMsg["HDSIZE"]);
+ return(false);
+
+ }
+
/* Compone cadena de particiones (Deja fuera la cache,
si se especificó) ya que va en parametro aparte
*/
diff --git a/admin/WebConsole/comandos/jscripts/CrearImagen.js b/admin/WebConsole/comandos/jscripts/CrearImagen.js
index 00283885..1e9f4ef0 100644
--- a/admin/WebConsole/comandos/jscripts/CrearImagen.js
+++ b/admin/WebConsole/comandos/jscripts/CrearImagen.js
@@ -28,11 +28,9 @@
var despleimagen=document.getElementById("despleimagen_"+parcod[0]+"_"+parcod[1]);
var imgcan=despleimagen.value.split("_");
atributos+="idi="+imgcan[0]+RC; // Identificador de la imagen
- atributos+="nci="+imgcan[1]+RC; // Nonbre canónico
+ atributos+="nci="+imgcan[1]+RC; // Nombre canónico
+ atributos+="ipr="+imgcan[2]+RC; // Ip repositorio
- var desplerepositorios=document.getElementById("desplerepositorios_"+parcod[0]+"_"+parcod[1]);
- var idx=desplerepositorios.selectedIndex;
- atributos+="ipr="+desplerepositorios.options[idx].value+RC;
break;
}
}
diff --git a/admin/WebConsole/comandos/jscripts/EjecutarScripts.js b/admin/WebConsole/comandos/jscripts/EjecutarScripts.js
index 9dc8100e..878ea770 100644
--- a/admin/WebConsole/comandos/jscripts/EjecutarScripts.js
+++ b/admin/WebConsole/comandos/jscripts/EjecutarScripts.js
@@ -13,6 +13,12 @@
document.fdatos.codigo.value+="\n";
document.fdatosejecucion.atributos.value="scp="+escape(document.fdatos.codigo.value+"\n")+RC;
filtrado();
+ // Incluimos el modo de ejecución en fdatosejecucion.
+ var modoejecucion=document.createElement('input');
+ modoejecucion.name="modoejecucion";
+ modoejecucion.value=document.fdatos.modoejecucion.value;
+ document.fdatosejecucion.appendChild(modoejecucion);
+
document.fdatosejecucion.submit();
}
}
diff --git a/admin/WebConsole/comandos/jscripts/EnviarMensaje.js b/admin/WebConsole/comandos/jscripts/EnviarMensaje.js
new file mode 100644
index 00000000..8a11f694
--- /dev/null
+++ b/admin/WebConsole/comandos/jscripts/EnviarMensaje.js
@@ -0,0 +1,49 @@
+// ***********************************************************************************************************
+// Libreria de scripts de Javascript
+// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
+// Fecha Creación: 2009-2010
+// Fecha Última modificación: Agosto-2010
+// Nombre del fichero: EjecutarScripts.js
+// Descripción :
+// Este fichero implementa las funciones javascript del fichero EjecutarScripts.php (Comandos)
+// ***********************************************************************************************************
+ function confirmar(){
+ if (comprobar_datos()){
+ var RC='@';
+ var atributos='';
+ atributos +='tit='+document.fdatos.titulo.value+RC;
+ atributos +='msj='+document.fdatos.mensaje.value+RC;
+ document.fdatosejecucion.atributos.value=atributos;
+
+ // Incluimos titulo y mensaje en fdatosejecucion.
+ document.fdatosejecucion.appendChild(document.fdatos.titulo);
+ document.fdatosejecucion.appendChild(document.fdatos.mensaje);
+
+ filtrado();
+ document.fdatosejecucion.submit();
+ }
+ }
+//________________________________________________________________________________________________________
+
+ function cancelar()
+{
+ alert(CTbMsg[0]);
+ location.href="../nada.php"
+ }
+//________________________________________________________________________________________________________
+// No comprobamos datos de ejecución porque son obligatorios
+ function comprobar_datos()
+{
+ function validate (field, validator, msgi) {
+ if (!validator (field.value)) {
+ alert(TbMsg[msgi]);
+ validation_highlight (field);
+ return false;
+ }
+ return true;
+ }
+ // Escapamos los saltos de línea para evitar error con curl
+ fdatos.mensaje.value=fdatos.mensaje.value.split("\n").join("\\n");
+ return validate (fdatos.titulo, validate_text_notnull, 1) &&
+ validate (fdatos.mensaje, validate_text_notnull, 2)
+}
diff --git a/admin/WebConsole/comandos/jscripts/RestaurarImagen.js b/admin/WebConsole/comandos/jscripts/RestaurarImagen.js
index 7d8ca817..6b060b26 100644
--- a/admin/WebConsole/comandos/jscripts/RestaurarImagen.js
+++ b/admin/WebConsole/comandos/jscripts/RestaurarImagen.js
@@ -40,26 +40,37 @@
document.fdatosejecucion.atributos.value=atributos;
var cc=ochecks[i].getAttribute('idcfg'); // Toma identificador del bloque de configuración
- var tbOrd=document.getElementById("tbOrd_"+cc);
- var iptabla=tbOrd.getAttribute('value'); // Toma identificadores de los ordenadores
+ var tbOrd=document.getElementById("tbOrd_"+cc);
+ var iptabla=tbOrd.getAttribute('value'); // Toma identificadores de los ordenadores
filtrado();
- var ipfiltro=document.fdatosejecucion.filtro.value;
+ var ipfiltro=document.fdatosejecucion.filtro.value;
- // Elimino los ordenadores del filtro que no estén en la tabla
- if (ipfiltro!=''){
+ // Elimino los ordenadores del filtro que no estén en la tabla.
+ if (ipfiltro!=''){
var arraytabla = iptabla.split(",");
var arrayfiltro =ipfiltro.split(";");
- arrayfiltro = array_interset (arrayfiltro.sort(), arraytabla.sort());
- ipfiltro = arrayfiltro.join(";");
- if (ipfiltro ==''){
- alert(TbMsg["FILTER"]);
- return(false);
+ arrayfiltro = array_interset (arrayfiltro.sort(), arraytabla.sort());
+ ipfiltro = arrayfiltro.join(";");
+ if (ipfiltro ==''){
+ alert(TbMsg["FILTER"]);
+ return(false);
}
- } else {
- ipfiltro=iptabla.replace(/,/g, ";");
+ numequipos=arrayfiltro.length;
+ }
+ else {
+ ipfiltro=iptabla.replace(/,/g, ";");
+ numequipos=iptabla.split(",").length;
}
- document.fdatosejecucion.filtro.value=ipfiltro;
+ // Mensaje de aviso si protocolo UNICAST y más de un ordenador
+ if ( ( protoclonacion.value=="UNICAST" || protoclonacion.value=="UNICAST-DIRECT") && numequipos > 1 ) {
+ if (confirm(TbMsg["UNICAST"]) != true) {
+ cancelar();
+ return(false);
+ }
+ }
+
+ document.fdatosejecucion.filtro.value=ipfiltro;
document.fdatosejecucion.submit();
}
}
@@ -67,7 +78,7 @@
}
//________________________________________________________________________________________________________
function cancelar(){
- alert(TbMsg[0]);
+ alert(CTbMsg[0]);
location.href="../nada.php"
}
//________________________________________________________________________________________________________
@@ -104,3 +115,4 @@
}
return(comprobar_datosejecucion())
}
+
diff --git a/admin/WebConsole/controlacceso.php b/admin/WebConsole/controlacceso.php
index de3b8b41..3e2f74ce 100644
--- a/admin/WebConsole/controlacceso.php
+++ b/admin/WebConsole/controlacceso.php
@@ -17,4 +17,3 @@
$idi="esp"; // Idioma por defecto
//========================================================================================================
?>
-
diff --git a/admin/WebConsole/controlpostacceso.php b/admin/WebConsole/controlpostacceso.php
index bc02e4af..08e6d3f2 100644
--- a/admin/WebConsole/controlpostacceso.php
+++ b/admin/WebConsole/controlpostacceso.php
@@ -1,4 +1,4 @@
-<?
+<?php
// ********************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -110,7 +110,7 @@ if ($idc != 0)
INNER JOIN idiomas ON usuarios.ididioma=idiomas.ididioma
WHERE idtipousuario <> 3
AND usuarios.usuario='".$usuario."'
- AND usuarios.pasguor='".$pasguor."'
+ AND usuarios.pasguor=SHA2('".$pasguor."', 224)
AND administradores_centros.idcentro=".$idcentro;
}
else{
@@ -119,7 +119,7 @@ if ($idc != 0)
INNER JOIN idiomas ON usuarios.ididioma=idiomas.ididioma
WHERE idtipousuario <> 3
AND usuarios.usuario='".$usuario."'
- AND usuarios.pasguor='".$pasguor."'";
+ AND usuarios.pasguor=SHA2('".$pasguor."', 224)";
}
$rs->Comando=&$cmd;
if (!$rs->Abrir()) return($false); // Error al abrir recordset
diff --git a/admin/WebConsole/descargas/README.es.html b/admin/WebConsole/descargas/README.es.html
new file mode 100644
index 00000000..65560da7
--- /dev/null
+++ b/admin/WebConsole/descargas/README.es.html
@@ -0,0 +1,85 @@
+<html lang="es">
+<head>
+ <meta charset="utf-8">
+ <title>OGAgent</title>
+</head>
+<body>
+<h1>OGAgent: agentes OpenGnsys para sistemas operativos</h1>
+
+<p>Ficheros disponibles para descarga de agente OGAgent:</p>
+<dl>
+ <li><code>ogagent_<em>Version</em>_all.deb</code>: OGAgent para sistemas Ubuntu, Debian y derivados
+ <li><code>ogagent-<em>Version</em>.noarch.rpm</code>: OGAgent para sistemas Red Hat, Fedora y derivados
+ <li><code>ogagent-opensuse-<em>Version</em>.noarch.rpm</code>: OGAgent para sistemas SuSE y OpenSuSE
+ <li><code>OGAgentInstaller-<em>Version</em>.pkg</code>: OGAgent para sistemas macOS X
+ <li><code>OGAgentSetup-<em>Version</em>.exe</code>: OGAgent para sistemas Windows
+</dl>
+
+<h2>Instalar los agentes</h2>
+
+<h3>Ubuntu, Debian y derivados:</h3>
+<dl>
+ <li>Ejecutar los comandos desde una terminal.</li>
+ <li>Descargar el fichero e instalar el agente con sus dependencias:
+ <pre>
+ sudo dpkg -i ogagent_<em>Version</em>_all.deb
+ sudo apt-get update
+ sudo apt-get install -fy</pre></li>
+ <li>Configurar el agente:
+ <pre> sudo sed -i "0,/remote=/ s,remote=.*,remote=https://<em>IPServidorOpenGnsys</em>/opengnsys/rest/," /usr/share/OGAgent/cfg/ogagent.cfg</pre></li>
+ <li>Reiniciar el equipo o ejecutar el servicio <em>(se iniciará automáticamente en el proceso de arranque)</em>:
+ <pre> sudo service ogagent start</pre></li>
+</dl>
+
+<h3>Red Hat, Fedora y derivados (como root):</h3>
+<dl>
+ <li>Ejecutar los comandos desde una terminal.</li>
+ <li>Descargar el fichero e instalar el agente con sus dependencias:
+ <pre> yum install ogagent-<em>Version</em>.noarch.rpm</pre></li>
+ <li>Configurar el agente:
+ <pre> sed -i "0,/remote=/ s,remote=.*,remote=https://<em>IPServidorOpenGnsys</em>/opengnsys/rest/," /usr/share/OGAgent/cfg/ogagent.cfg</pre></li>
+ <li>Puede ser necesario corregir permisos antes de iniciar el servicio:</li>
+ <pre> chmod +x /etc/init.d/ogagent</pre></li>
+ <li>Reiniciar el equipo o ejecutar el servicio <em>(se iniciará automáticamente en el proceso de arranque)</em>:
+ <pre> service ogagent start</pre></li>
+</dl>
+
+<h3>OpenSuSE:</h3>
+<p><em>(en preparación)</em></p>
+
+<h3>macOS X:</h3>
+<dl>
+ <li>Ejecutar los comandos desde una terminal.</li>
+ <li>Instalar dependencias <em>(la instalación puebe realizar estas operaciones)</em>:
+ <pre>
+ sudo easy_install pip
+ sudo pip install netifaces requests six</pre></li>
+ <li>Descargar el fichero e instalar el agente:
+ <pre> sudo installer -pkg OGAgentInstaller-<em>Version</em>.pkg -target /</pre></li>
+ <li>Configurar el agente:
+ <pre>
+ sudo sed "/remote=/ s,remote=.*,remote=https://<em>IPServidorOpenGnsys</em>/opengnsys/rest/," /Applications/OGAgent.app/cfg/ogagent.cfg &gt; /tmp/ogagent.cfg
+ sudo mv /tmp/ogagent.cfg /Applications/OGAgent.app/cfg/ogagent.cfg</pre></li>
+ <li>Reiniciar el equipo o ejecutar el servicio <em>(se iniciará automáticamente en el proceso de arranque)</em>:
+ <pre> sudo ogagent start</pre></li>
+</dl>
+
+<h3>Windows (como usuario administrador):</h3>
+<dl>
+ <li>Descargar el fichero e instalar el agente ejecutando el fichero <code>OGAgentSetup-<em>Version</em>.exe</code></li>
+ <li>Seguir las instrucciones del instalador.</li>
+ <li>Editar el fichero de configuación <code>C:\Program Files\OGAgent\cfg\ogagent.cfg</code> (o <code>C:\Archivos de programa\OGAgent\cfg\ogagent.cfg</code>) y modificar el valor de la cláusula <code>remote</code> de la sección <code>[OGAgent]</code> inclyendo la dirección IP del servidor OpenGnsys.</li>
+ <li>Reiniciar el equipo o ejecutar el servicio <em>(se iniciará automáticamente en el proceso de arranque)</em>:
+ <pre> NET START OGAgent</pre></li>
+</dl>
+
+
+<h2>Desinstalar los agentes</h2>
+<p>Usar el método estándar del sistema operativo para desinstalar paquetes o aplicaciones.</p>
+
+
+<h2>Actualizar los agentes</h2>
+<p>Se recomienda desinstalar el agente OGAgent, reiniciar el equipo e instalar una nueva versión del programa.</p>
+
+</body>
+</html>
diff --git a/admin/WebConsole/descargas/index.php b/admin/WebConsole/descargas/index.php
new file mode 100644
index 00000000..bb434bee
--- /dev/null
+++ b/admin/WebConsole/descargas/index.php
@@ -0,0 +1,68 @@
+<?php
+// Warning: Don't left any character outside PHP code.
+//
+// Choose a file on this directory to download via Apache.
+
+include_once("../includes/ctrlacc.php");
+include_once("../clases/AdoPhp.php");
+include_once("../includes/CreaComando.php");
+include_once("../idiomas/php/".$idioma."/descargas_".$idioma.".php");
+$cmd=CreaComando($cadenaconexion); // Crea objeto comando
+if (!$cmd)
+ header('Location: '.$pagerror.'?herror=2'); // Error de conexión con servidor B.D.
+
+// Security tip: change to local directory.
+$oldpwd=getcwd();
+chdir(dirname(__FILE__));
+if (isset($_POST['file'])) {
+ // Send file.
+ sendFile ($_POST['file']);
+} else {
+ // Show list of files.
+ echo '<!DOCTYPE html>'."\n";
+ echo '<html><head>'."\n";
+ echo ' <link rel="stylesheet" type="text/css" href="../estilos.css" />'."\n";
+ echo '</head><body>'."\n";
+ echo '<div align="center" class="tabla_datos">'."\n";
+ echo '<form action="'.$_SERVER['PHP_SELF'].'" method="post">'."\n";
+ echo ' <table>'."\n";
+ echo ' <tr><th>'.$TbMsg['DOWNLOADS'].':</th></tr>'."\n";
+ $filelist = glob("*");
+ $data = "";
+ foreach ($filelist as $f) {
+ // Get only readable files, except this one.
+ if ($f !== basename(__FILE__) and is_file($f) and is_readable($f)) {
+ $data .= ' <option value="'.$f.'">'.$f.'</option>'."\n";
+ }
+ }
+ if (empty($data)) {
+ // Show warning message if there is no files to download.
+ echo ' <tr><td>'.$TbMsg['NOFILES'].'</td></tr>'."\n";
+ } else {
+ // Show available files.
+ echo ' <tr><td><select name="file">'."\n";
+ echo $data;
+ echo ' </select>'."\n";
+ echo ' <input type="submit" value="" style="width:20px; background:url(../images/boton_confirmar.gif);"></td></tr>'."\n";
+ }
+ echo '</table>'."\n";
+ echo '</form>'."\n";
+ echo '</body></html>'."\n";
+}
+// Change again to source directory.
+chdir($oldpwd);
+
+
+// Send a file.
+function sendFile($file) {
+ // Check if file exists in current directory and it isn't this file.
+ if (file_exists($file) and strpos($file,"/") === false and $file !== basename(__FILE__)) {
+ header('Content-Type: ' . mime_content_type($file));
+ header('Content-Length: ' . filesize($file));
+ header('Content-Disposition: attachment; filename="' . $file . '"');
+ readfile($file);
+ }
+}
+
+// Warning: Don't left any character outside PHP code.
+?>
diff --git a/admin/WebConsole/estilos.css b/admin/WebConsole/estilos.css
index f64d969d..b7bc1a52 100644
--- a/admin/WebConsole/estilos.css
+++ b/admin/WebConsole/estilos.css
@@ -31,24 +31,24 @@
margin-left: 350px;
border: none;
}
-.acceso label {
+.acceso div {
margin-top: 20px;
- height: 20px;
+ height: 25px;
+}
+.acceso label {
float: left;
}
.acceso input {
- margin-top: 20px;
+ float: right;
margin-right: 50px;
width: 100px;
- height: 20px;
- float: right;
}
.acceso button {
margin-left: 100px;
}
.pie {
margin: 0px auto;
- padding: 0px 10px;
+ padding: 2px 10px;
width: 580px;
font: normal normal 10px sans-serif;
}
diff --git a/admin/WebConsole/gestores/gestor_accionmenu.php b/admin/WebConsole/gestores/gestor_accionmenu.php
index 41a7a213..3ed5b331 100644
--- a/admin/WebConsole/gestores/gestor_accionmenu.php
+++ b/admin/WebConsole/gestores/gestor_accionmenu.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicaci�n WEB: ogAdmWebCon
// Autor: Jos� Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/gestor_administradores_centros.php b/admin/WebConsole/gestores/gestor_administradores_centros.php
index f21988ca..b6588752 100644
--- a/admin/WebConsole/gestores/gestor_administradores_centros.php
+++ b/admin/WebConsole/gestores/gestor_administradores_centros.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/gestor_administradores_usuarios.php b/admin/WebConsole/gestores/gestor_administradores_usuarios.php
index 319503ad..14de0c41 100644
--- a/admin/WebConsole/gestores/gestor_administradores_usuarios.php
+++ b/admin/WebConsole/gestores/gestor_administradores_usuarios.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/gestor_aulas.php b/admin/WebConsole/gestores/gestor_aulas.php
index e584dd29..6201cc54 100644
--- a/admin/WebConsole/gestores/gestor_aulas.php
+++ b/admin/WebConsole/gestores/gestor_aulas.php
@@ -26,6 +26,7 @@ $idaula=0;
$nombreaula="";
$grupoid=0;
$urlfoto="";
+$inremotepc=false;
$cagnon=false;
$pizarra=false;
$ubicacion="";
@@ -36,6 +37,8 @@ $horaresevfin=0;
$idmenu=0;
$idproautoexec=0;
$idrepositorio=0;
+### AGP
+$oglive="ogLive";
$idperfilhard=0;
$modomul=0;
$ipmul="";
@@ -47,6 +50,7 @@ $netmask=0;
$modp2p=0;
$timep2p=0;
############ Ramón
+$ntp="";
$dns="";
$proxy="";
############ UHU
@@ -72,6 +76,7 @@ if (isset($_POST["identificador"])) $idaula=$_POST["identificador"];
if (isset($_POST["nombreaula"])) $nombreaula=$_POST["nombreaula"];
if (isset($_POST["urlfoto"])) $urlfoto=$_POST["urlfoto"];
+if (isset($_POST["inremotepc"])) $inremotepc=$_POST["inremotepc"];
if (isset($_POST["cagnon"])) $cagnon=$_POST["cagnon"];
if (isset($_POST["pizarra"])) $pizarra=$_POST["pizarra"];
if (isset($_POST["ubicacion"])) $ubicacion=$_POST["ubicacion"];
@@ -82,6 +87,7 @@ if (isset($_POST["horaresevfin"])) $horaresevfin=$_POST["horaresevfin"];
if (isset($_POST["idmenu"])) $idmenu=$_POST["idmenu"];
if (isset($_POST["idprocedimiento"])) $idproautoexec=$_POST["idprocedimiento"];
if (isset($_POST["idrepositorio"])) $idrepositorio=$_POST["idrepositorio"];
+if (isset($_POST["oglive"])) $oglive=$_POST["oglive"];
if (isset($_POST["idperfilhard"])) $idperfilhard=$_POST["idperfilhard"];
if (isset($_POST["modomul"])) $modomul=$_POST["modomul"];
if (isset($_POST["ipmul"])) $ipmul=$_POST["ipmul"];
@@ -93,6 +99,7 @@ if (isset($_POST["netmask"])) $netmask=$_POST["netmask"];
if (isset($_POST["modp2p"])) $modp2p=$_POST["modp2p"];
if (isset($_POST["timep2p"])) $timep2p=$_POST["timep2p"];
################# Ramón
+if (isset($_POST["ntp"])) $ntp=$_POST["ntp"];
if (isset($_POST["dns"])) $dns=$_POST["dns"];
if (isset($_POST["proxy"])) $proxy=$_POST["proxy"];
################# UHU
@@ -174,6 +181,7 @@ function Gestiona(){
global $idaula;
global $nombreaula;
global $urlfoto;
+ global $inremotepc;
global $cagnon;
global $pizarra;
global $ubicacion;
@@ -185,6 +193,7 @@ function Gestiona(){
global $idmenu;
global $idproautoexec;
global $idrepositorio;
+ global $oglive;
global $idperfilhard;
global $gidmenu;
@@ -202,6 +211,7 @@ function Gestiona(){
global $modp2p;
global $timep2p;
########################## Ramón
+ global $ntp;
global $dns;
global $proxy;
global $idioma;
@@ -223,6 +233,7 @@ function Gestiona(){
$cmd->CreaParametro("@idaula",$idaula,1);
$cmd->CreaParametro("@nombreaula",$nombreaula,0);
$cmd->CreaParametro("@urlfoto",$urlfoto,0);
+ $cmd->CreaParametro("@inremotepc",$inremotepc,1);
$cmd->CreaParametro("@cagnon",$cagnon,1);
$cmd->CreaParametro("@pizarra",$pizarra,1);
$cmd->CreaParametro("@ubicacion",$ubicacion,0);
@@ -233,7 +244,9 @@ function Gestiona(){
$cmd->CreaParametro("@idmenu",$idmenu,1);
$cmd->CreaParametro("@idproautoexec",$idproautoexec,1);
$cmd->CreaParametro("@idrepositorio",$idrepositorio,1);
+ $cmd->CreaParametro("@oglivedir",$oglive,0);
$cmd->CreaParametro("@idperfilhard",$idperfilhard,1);
+ $cmd->CreaParametro("@ntp",$ntp,0);
$cmd->CreaParametro("@dns",$dns,0);
$cmd->CreaParametro("@proxy",$proxy,0);
$cmd->CreaParametro("@modomul",$modomul,1);
@@ -255,16 +268,16 @@ function Gestiona(){
switch($opcion){
case $op_alta :
$cmd->texto="INSERT INTO aulas
- (idcentro, grupoid, nombreaula, urlfoto, cagnon,
- pizarra, ubicacion, comentarios, puestos,
+ (idcentro, grupoid, nombreaula, urlfoto, inremotepc,
+ cagnon, pizarra, ubicacion, comentarios, puestos,
horaresevini, horaresevfin, router, netmask,
- dns, proxy, modomul, ipmul, pormul, velmul,
- modp2p, timep2p, validacion, paginalogin, paginavalidacion)
- VALUES (@idcentro, @grupoid, @nombreaula, @urlfoto, @cagnon,
- @pizarra, @ubicacion, @comentarios, @puestos,
+ ntp, dns, proxy, modomul, ipmul, pormul, velmul,
+ modp2p, timep2p, validacion, paginalogin, paginavalidacion, oglivedir)
+ VALUES (@idcentro, @grupoid, @nombreaula, @urlfoto, @inremotepc,
+ @cagnon, @pizarra, @ubicacion, @comentarios, @puestos,
@horaresevini, @horaresevfin, @router, @netmask,
- @dns, @proxy, @modomul, @ipmul, @pormul, @velmul,
- @modp2p, @timep2p, @validacion, @paginalogin, @paginavalidacion)";
+ @ntp, @dns, @proxy, @modomul, @ipmul, @pormul, @velmul,
+ @modp2p, @timep2p, @validacion, @paginalogin, @paginavalidacion, @oglivedir)";
$resul=$cmd->Ejecutar();
if ($resul){ // Crea una tabla nodo para devolver a la página que llamó ésta
$idaula=$cmd->Autonumerico();
@@ -277,14 +290,15 @@ function Gestiona(){
break;
case $op_modificacion:
$cmd->texto="UPDATE aulas SET
- nombreaula=@nombreaula, urlfoto=@urlfoto, cagnon=@cagnon,
- pizarra=@pizarra, ubicacion=@ubicacion,
+ nombreaula=@nombreaula, urlfoto=@urlfoto, inremotepc=@inremotepc,
+ cagnon=@cagnon, pizarra=@pizarra, ubicacion=@ubicacion,
comentarios=@comentarios, puestos=@puestos,
horaresevini=@horaresevini, horaresevfin=@horaresevfin,
- router=@router,netmask=@netmask, dns=@dns, proxy=@proxy,
+ router=@router,netmask=@netmask, ntp=@ntp, dns=@dns, proxy=@proxy,
modomul=@modomul, ipmul=@ipmul, pormul=@pormul, velmul=@velmul,
modp2p=@modp2p, timep2p=@timep2p, validacion=@validacion,
- paginalogin=@paginalogin, paginavalidacion=@paginavalidacion
+ paginalogin=@paginalogin, paginavalidacion=@paginavalidacion,
+ oglivedir=IF(@oglivedir='0',oglivedir,@oglivedir)
WHERE idaula=@idaula";
$resul=$cmd->Ejecutar();
if ($resul){ // Crea una tabla nodo para devolver a la página que llamó ésta
@@ -295,6 +309,8 @@ function Gestiona(){
$clsUpdate.="idproautoexec=@idproautoexec,";
if($idrepositorio>0 || $gidrepositorio>0)
$clsUpdate.="idrepositorio=@idrepositorio,";
+ if($oglive != "0")
+ $clsUpdate .="oglivedir=@oglivedir,";
if($idperfilhard>0 || $gidperfilhard>0)
$clsUpdate.="idperfilhard=@idperfilhard,";
// UHU - Actualiza la validacion en los ordenadores
diff --git a/admin/WebConsole/gestores/gestor_centros.php b/admin/WebConsole/gestores/gestor_centros.php
index e758d066..7bf5100b 100644
--- a/admin/WebConsole/gestores/gestor_centros.php
+++ b/admin/WebConsole/gestores/gestor_centros.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -35,6 +35,7 @@ if (isset($_POST["idcentro"])) $idcentro=$_POST["idcentro"];
if (isset($_POST["identificador"])) $idcentro=$_POST["identificador"];
if (isset($_POST["nombrecentro"])) $nombrecentro=$_POST["nombrecentro"];
if (isset($_POST["comentarios"])) $comentarios=$_POST["comentarios"];
+if (isset($_POST["directorio"])) $directorio=$_POST["directorio"];
$tablanodo=""; // Arbol para nodos insertados
@@ -52,7 +53,7 @@ if ($cmd){
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<BODY>
<SCRIPT language="javascript" src="../jscripts/propiedades_centros.js"></SCRIPT>
-<?
+<?php
$literal="";
switch($opcion){
case $op_alta :
@@ -90,7 +91,7 @@ else{
?>
</BODY>
</HTML>
-<?
+<?php
/*________________________________________________________________________________________________________
Inserta, modifica o elimina datos en la tabla centros
________________________________________________________________________________________________________*/
@@ -101,6 +102,7 @@ function Gestiona(){
global $idcentro;
global $nombrecentro;
global $comentarios;
+ global $directorio;
global $identidad;
global $op_alta;
@@ -113,10 +115,11 @@ function Gestiona(){
$cmd->CreaParametro("@idcentro",$idcentro,1);
$cmd->CreaParametro("@nombrecentro",$nombrecentro,0);
$cmd->CreaParametro("@comentarios",$comentarios,0);
+ $cmd->CreaParametro("@directorio",$directorio,0);
switch($opcion){
case $op_alta :
- $cmd->texto="INSERT INTO centros(nombrecentro,comentarios,identidad) VALUES (@nombrecentro,@comentarios,@identidad)";
+ $cmd->texto="INSERT INTO centros(nombrecentro,comentarios,directorio,identidad) VALUES (@nombrecentro,@comentarios,@directorio,@identidad)";
$resul=$cmd->Ejecutar();
if ($resul){ // Crea una tabla nodo para devolver a la página que llamó ésta
$idcentro=$cmd->Autonumerico();
@@ -128,7 +131,7 @@ function Gestiona(){
}
break;
case $op_modificacion:
- $cmd->texto="UPDATE centros SET nombrecentro=@nombrecentro,comentarios=@comentarios WHERE idcentro=@idcentro";
+ $cmd->texto="UPDATE centros SET nombrecentro=@nombrecentro,comentarios=@comentarios,directorio=@directorio WHERE idcentro=@idcentro";
$resul=$cmd->Ejecutar();
break;
case $op_eliminacion :
diff --git a/admin/WebConsole/gestores/gestor_componentehardwares.php b/admin/WebConsole/gestores/gestor_componentehardwares.php
index 5710f5f3..00fec28c 100644
--- a/admin/WebConsole/gestores/gestor_componentehardwares.php
+++ b/admin/WebConsole/gestores/gestor_componentehardwares.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/gestor_componentesoftwares.php b/admin/WebConsole/gestores/gestor_componentesoftwares.php
index bb6c1c95..03483715 100644
--- a/admin/WebConsole/gestores/gestor_componentesoftwares.php
+++ b/admin/WebConsole/gestores/gestor_componentesoftwares.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/gestor_entidades.php b/admin/WebConsole/gestores/gestor_entidades.php
index 93584b11..d37f41e0 100644
--- a/admin/WebConsole/gestores/gestor_entidades.php
+++ b/admin/WebConsole/gestores/gestor_entidades.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -37,6 +37,7 @@ if (isset($_POST["identidad"])) $identidad=$_POST["identidad"];
if (isset($_POST["identificador"])) $identidad=$_POST["identificador"];
if (isset($_POST["nombreentidad"])) $nombreentidad=$_POST["nombreentidad"];
if (isset($_POST["comentarios"])) $comentarios=$_POST["comentarios"];
+if (isset($_POST["ogunit"])) $ogunit=$_POST["ogunit"];
$tablanodo=""; // Arbol para nodos insertados
@@ -51,6 +52,7 @@ if($opcion!=$op_movida){
echo '<HTML>';
echo '<HEAD>';
echo ' <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">';
+ echo '</HEAD>';
echo '<BODY>';
echo '<P><SPAN style="visibility:hidden" id="arbol_nodo">'.$tablanodo.'</SPAN></P>';
echo ' <SCRIPT language="javascript" src="../jscripts/propiedades_entidades.js"></SCRIPT>';
@@ -102,6 +104,7 @@ function Gestiona(){
global $identidad;
global $nombreentidad;
global $comentarios;
+ global $ogunit;
global $grupoid;
global $iduniversidad;
@@ -116,10 +119,11 @@ function Gestiona(){
$cmd->CreaParametro("@identidad",$identidad,1);
$cmd->CreaParametro("@nombreentidad",$nombreentidad,0);
$cmd->CreaParametro("@comentarios",$comentarios,0);
+ $cmd->CreaParametro("@ogunit",$ogunit,0);
switch($opcion){
case $op_alta :
- $cmd->texto="INSERT INTO entidades(nombreentidad,comentarios,iduniversidad,grupoid) VALUES (@nombreentidad,@comentarios,@iduniversidad,@grupoid)";
+ $cmd->texto="INSERT INTO entidades(nombreentidad,comentarios,ogunit,iduniversidad,grupoid) VALUES (@nombreentidad,@comentarios,@ogunit,@iduniversidad,@grupoid)";
$resul=$cmd->Ejecutar();
if ($resul){ // Crea una tabla nodo para devolver a la página que llamó ésta
$identidad=$cmd->Autonumerico();
@@ -131,7 +135,7 @@ function Gestiona(){
}
break;
case $op_modificacion:
- $cmd->texto="UPDATE entidades SET nombreentidad=@nombreentidad,comentarios=@comentarios WHERE identidad=@identidad";
+ $cmd->texto="UPDATE entidades SET nombreentidad=@nombreentidad,comentarios=@comentarios,ogunit=@ogunit WHERE identidad=@identidad";
$resul=$cmd->Ejecutar();
break;
case $op_eliminacion :
diff --git a/admin/WebConsole/gestores/gestor_entornos.php b/admin/WebConsole/gestores/gestor_entornos.php
index 6836db45..9a8683b6 100644
--- a/admin/WebConsole/gestores/gestor_entornos.php
+++ b/admin/WebConsole/gestores/gestor_entornos.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -39,9 +39,9 @@ if ($cmd){
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<BODY>
<SCRIPT language="javascript" src="../jscripts/propiedades_entornos.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
-<?
+<?php
$literal="resultado_modificar_entornos";
@@ -60,7 +60,7 @@ else{
?>
</BODY>
</HTML>
-<?
+<?php
/**************************************************************************************************************************************************
Inserta, modifica o elimina datos en la tabla entornos
________________________________________________________________________________________________________*/
diff --git a/admin/WebConsole/gestores/gestor_gruposordenadores.php b/admin/WebConsole/gestores/gestor_gruposordenadores.php
index f301f283..3316ee06 100644
--- a/admin/WebConsole/gestores/gestor_gruposordenadores.php
+++ b/admin/WebConsole/gestores/gestor_gruposordenadores.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -49,7 +49,7 @@ if ($cmd){
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<BODY>
<SCRIPT language="javascript" src="../jscripts/propiedades_grupos.js"></SCRIPT>
-<?
+<?php
$literal="";
switch($opcion){
case $op_alta :
@@ -84,7 +84,7 @@ else{
?>
</BODY>
</HTML>
-<?
+<?php
/**************************************************************************************************************************************************
Busca identificador del aula cuando el grupo a crear está pertenece a otro grupo
________________________________________________________________________________________________________*/
diff --git a/admin/WebConsole/gestores/gestor_imagenes.php b/admin/WebConsole/gestores/gestor_imagenes.php
index 95d2d97f..a0706725 100644
--- a/admin/WebConsole/gestores/gestor_imagenes.php
+++ b/admin/WebConsole/gestores/gestor_imagenes.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -26,6 +26,7 @@ $descripcion="";
$grupoid=0;
$idperfilsoft=0;
$comentarios="";
+$inremotepc=false;
$numpar=0;
$codpar=0;
$idrepositorio=0;
@@ -42,6 +43,7 @@ if (isset($_POST["descripcion"])) $descripcion=$_POST["descripcion"];
if (isset($_POST["grupoid"])) $grupoid=$_POST["grupoid"];
if (isset($_POST["idperfilsoft"])) $idperfilsoft=$_POST["idperfilsoft"];
if (isset($_POST["comentarios"])) $comentarios=$_POST["comentarios"];
+if (isset($_POST["inremotepc"])) $inremotepc=$_POST["inremotepc"];
if (isset($_POST["identificador"])) $idimagen=$_POST["identificador"];
if (isset($_POST["numpar"])) $numpar=$_POST["numpar"];
if (isset($_POST["codpar"])) $codpar=$_POST["codpar"];
@@ -117,6 +119,7 @@ function Gestiona(){
global $descripcion;
global $grupoid;
global $comentarios;
+ global $inremotepc;
global $numpar;
global $codpar;
global $idrepositorio;
@@ -140,6 +143,7 @@ function Gestiona(){
$cmd->CreaParametro("@grupoid",$grupoid,1);
$cmd->CreaParametro("@idperfilsoft",$idperfilsoft,1);
$cmd->CreaParametro("@comentarios",$comentarios,0);
+ $cmd->CreaParametro("@inremotepc",$inremotepc,1);
$cmd->CreaParametro("@numpar",$numpar,1);
$cmd->CreaParametro("@codpar",$codpar,1);
$cmd->CreaParametro("@idrepositorio",$idrepositorio,1);
@@ -148,8 +152,13 @@ function Gestiona(){
switch($opcion){
case $op_alta :
- $cmd->texto="INSERT INTO imagenes (nombreca,ruta,descripcion,idperfilsoft,comentarios,numpar,codpar,idrepositorio,imagenid,idcentro,grupoid,tipo)
- VALUES (@nombreca,@ruta,@descripcion,@idperfilsoft,@comentarios,@numpar,@codpar,@idrepositorio,@imagenid,@idcentro,@grupoid,@tipo)";
+ $cmd->texto="INSERT INTO imagenes
+ (nombreca, ruta, descripcion, idperfilsoft,
+ comentarios, inremotepc, numpar, codpar,
+ idrepositorio, imagenid, idcentro, grupoid, tipo)
+ VALUES (@nombreca, @ruta, @descripcion, @idperfilsoft,
+ @comentarios, @inremotepc, @numpar, @codpar,
+ @idrepositorio, @imagenid, @idcentro, @grupoid, @tipo)";
$resul=$cmd->Ejecutar();
if ($resul){ // Crea una tabla nodo para devolver a la página que llamó ésta
$idimagen=$cmd->Autonumerico();
@@ -161,10 +170,12 @@ function Gestiona(){
}
break;
case $op_modificacion:
- $cmd->texto="UPDATE imagenes SET nombreca=@nombreca,ruta=@ruta,descripcion=@descripcion,idperfilsoft=@idperfilsoft,
- comentarios=@comentarios,numpar=@numpar,codpar=@codpar,idrepositorio=@idrepositorio,
- imagenid=@imagenid
- WHERE idimagen=@idimagen";
+ $cmd->texto="UPDATE imagenes SET
+ nombreca=@nombreca, ruta=@ruta, descripcion=@descripcion,
+ idperfilsoft=@idperfilsoft, comentarios=@comentarios,
+ inremotepc=@inremotepc, numpar=@numpar,codpar=@codpar,
+ idrepositorio=@idrepositorio, imagenid=@imagenid
+ WHERE idimagen=@idimagen";
$resul=$cmd->Ejecutar();
break;
case $op_eliminacion :
diff --git a/admin/WebConsole/gestores/gestor_inclusionacciones.php b/admin/WebConsole/gestores/gestor_inclusionacciones.php
index 6d28f513..964158e8 100644
--- a/admin/WebConsole/gestores/gestor_inclusionacciones.php
+++ b/admin/WebConsole/gestores/gestor_inclusionacciones.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *********************************************************************************************************
// Aplicaci�n WEB: ogAdmWebCon
// Autor: Jos� Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/gestor_ordenadores.php b/admin/WebConsole/gestores/gestor_ordenadores.php
index d89e7fe1..d2b74482 100644
--- a/admin/WebConsole/gestores/gestor_ordenadores.php
+++ b/admin/WebConsole/gestores/gestor_ordenadores.php
@@ -7,6 +7,9 @@
// Nombre del fichero: gestor_ordenadores.php
// Descripción :
// Gestiona el mantenimiento de la tabla de ordenadores
+// Versión 1.1.0: Al insertar ordenador se comprueba que no existen duplicados nombre, ip y mac
+// Autor: Irina Gómez - ETSII, Universidad de Sevilla
+// Fecha: 2016-03-04
// *************************************************************************************************************************************************
include_once("../includes/ctrlacc.php");
include_once("../clases/AdoPhp.php");
@@ -17,6 +20,8 @@ include_once("../includes/constantes.php");
include_once("./relaciones/ordenadores_eliminacion.php");
include_once("../includes/tftputils.php");
include_once("../includes/opciones.php");
+include_once("../idiomas/php/".$idioma."/gestor_ordenadores_".$idioma.".php");
+
//________________________________________________________________________________________________________
$opcion=0; // Inicializa parametros
@@ -25,13 +30,17 @@ $grupoid=0;
$idaula=0;
$idordenador=0;
$nombreordenador="";
+$numserie="";
$ip="";
$mac="";
$idperfilhard=0;
$idrepositorio=0;
+### AGP
+$oglive="ogLive";
$idmenu=0;
$idprocedimiento=0;
$idimagen=0;
+$colocar="";
#### ADV
$netiface="";
$netdriver="";
@@ -41,6 +50,8 @@ $paginalogin="";
$paginavalidacion="";
### Ramón
$arranque="";
+### Irina
+$datosduplicados="";
//##agp
if (isset($_FILES['archivo'])) {
@@ -59,10 +70,12 @@ if (isset($_POST["idaula"])) $idaula=$_POST["idaula"];
if (isset($_POST["idordenador"])) $idordenador=$_POST["idordenador"];
if (isset($_POST["identificador"])) $idordenador=$_POST["identificador"];
if (isset($_POST["nombreordenador"])) $nombreordenador=$_POST["nombreordenador"];
+if (isset($_POST["numserie"])) $numserie=$_POST["numserie"];
if (isset($_POST["ip"])) $ip=$_POST["ip"];
if (isset($_POST["mac"])) $mac=str_replace(":","",$_POST["mac"]);
if (isset($_POST["idperfilhard"])) $idperfilhard=$_POST["idperfilhard"];
if (isset($_POST["idrepositorio"])) $idrepositorio=$_POST["idrepositorio"];
+if (isset($_POST["seleoglive"])) $oglive=$_POST["seleoglive"];
if (isset($_POST["idmenu"])) $idmenu=$_POST["idmenu"];
if (isset($_POST["idprocedimiento"])) $idprocedimiento=$_POST["idprocedimiento"];
@@ -74,7 +87,23 @@ if (isset($_POST["paginalogin"])) $paginalogin=$_POST["paginalogin"];
if (isset($_POST["paginavalidacion"])) $paginavalidacion=$_POST["paginavalidacion"];
######## Ramón
if (isset($_POST["arranque"])) $arranque=$_POST["arranque"];
-
+######## AGP
+if (isset($_POST["coloc"])) $colocar=$_POST["coloc"];
+ if ($colocar=="s"){
+
+ $cmd=CreaComando($cadenaconexion); // Crea objeto comando
+ $rs=new Recordset;
+ $cmd->texto="SELECT * FROM ordenadores WHERE idordenador=".$idordenador;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(false); // Error al abrir recordset
+ $rs->Primero();
+ if (!$rs->EOF){
+ $arranque=$rs->campos["arranque"];
+ $rs->Cerrar();
+ }
+ }
+######## AGP
+
$tablanodo=""; // Arbol para nodos insertados
//________________________________________________________________________________________________________
$cmd=CreaComando($cadenaconexion); // Crea objeto comando
@@ -118,8 +147,13 @@ if($opcion!=$op_movida){
break;
}
if ($resul){
- if ($opcion==$op_alta )
+ if ($opcion==$op_alta ) {
+ if ( $datosduplicados != '') {
+ echo $literal."(0,'".$TbMsg["DUPLICADO"].$datosduplicados." ',".$idordenador.",o.innerHTML);".chr(13);
+ } else {
echo $literal."(1,'".$cmd->DescripUltimoError()." ',".$idordenador.",o.innerHTML);".chr(13);
+ }
+ }
else
echo $literal."(1,'".$cmd->DescripUltimoError()." ','".$nombreordenador."');".chr(13);
}
@@ -157,11 +191,13 @@ function Gestiona(){
global $grupoid;
global $idordenador;
global $nombreordenador;
+ global $numserie;
global $ip;
global $mac;
global $idaula;
global $idperfilhard;
global $idrepositorio;
+ global $oglive;
global $idmenu;
global $idprocedimiento;
global $netiface;
@@ -180,15 +216,20 @@ function Gestiona(){
global $op_movida;
global $tablanodo;
+####################### Irina
+ global $datosduplicados;
+
$cmd->CreaParametro("@grupoid",$grupoid,1);
$cmd->CreaParametro("@idaula",$idaula,1);
$cmd->CreaParametro("@idordenador",$idordenador,1);
$cmd->CreaParametro("@nombreordenador",$nombreordenador,0);
+ $cmd->CreaParametro("@numserie",$numserie,0);
$cmd->CreaParametro("@ip",$ip,0);
$cmd->CreaParametro("@mac",$mac,0);
$cmd->CreaParametro("@idperfilhard",$idperfilhard,1);
$cmd->CreaParametro("@idrepositorio",$idrepositorio,1);
+ $cmd->CreaParametro("@oglivedir",$oglive,0);
$cmd->CreaParametro("@idmenu",$idmenu,1);
$cmd->CreaParametro("@idprocedimiento",$idprocedimiento,1);
$cmd->CreaParametro("@netiface",$netiface,0);
@@ -203,27 +244,49 @@ function Gestiona(){
switch($opcion){
case $op_alta :
- //Insertar fotoord con Values @fotoordenador
- $cmd->texto="INSERT INTO ordenadores(nombreordenador,ip,mac,idperfilhard,idrepositorio,
- idmenu,idproautoexec,idaula,grupoid,netiface,netdriver,fotoord,validacion,paginalogin,paginavalidacion) VALUES (@nombreordenador,@ip,@mac,@idperfilhard,@idrepositorio,
- @idmenu,@idprocedimiento,@idaula,@grupoid,@netiface,@netdriver,@fotoordenador,@validacion,@paginalogin,@paginavalidacion)";
+ // Comprueba que no existan duplicados
+ $ipduplicada='no';
+ $nombreduplicado='no';
+ $macduplicada='no';
+ $cmd->texto="SELECT nombreordenador,ip,mac FROM ordenadores
+ WHERE nombreordenador=@nombreordenador OR ip=@ip OR mac=@mac";
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(0); // Error al abrir recordset
+ $rs->Primero();
+ while (!$rs->EOF){
+ if ( $nombreordenador == $rs->campos["nombreordenador"]) $datosduplicados ="nombre: $nombreordenador,";
+ if ( $ip == $rs->campos["ip"]) $datosduplicados .=" ip: $ip,";
+ if ( $mac == $rs->campos["mac"]) $datosduplicados .=" mac: $mac,";
+ $rs->Siguiente();
+ }
+ $rs->Cerrar();
+ // quitamos última coma
+ $datosduplicados = trim($datosduplicados, ',');
+ // Si no hay datos duplicados insertamos el ordenador;
+ if ( $datosduplicados == "" ) {
+ //Insertar fotoord con Values @fotoordenador
+ $cmd->texto="INSERT INTO ordenadores(nombreordenador,numserie,ip,mac,idperfilhard,idrepositorio,oglivedir,
+ idmenu,idproautoexec,idaula,grupoid,netiface,netdriver,fotoord,validacion,paginalogin,paginavalidacion) VALUES (@nombreordenador,@numserie,@ip,@mac,@idperfilhard,@idrepositorio,@oglivedir,
+ @idmenu,@idprocedimiento,@idaula,@grupoid,@netiface,@netdriver,@fotoordenador,@validacion,@paginalogin,@paginavalidacion)";
+ }
$resul=$cmd->Ejecutar();
- //echo $cmd->texto;
if ($resul){ // Crea una tabla nodo para devolver a la página que llamó ésta
- $idordenador=$cmd->Autonumerico();
- $arbolXML=SubarbolXML_ordenadores($idordenador,$nombreordenador);
- $baseurlimg="../images/signos"; // Url de las imagenes de signo
- $clasedefault="texto_arbol"; // Hoja de estilo (Clase por defecto) del árbol
- $arbol=new ArbolVistaXML($arbolXML,0,$baseurlimg,$clasedefault);
- $tablanodo=$arbol->CreaArbolVistaXML();
+ $idordenador=$cmd->Autonumerico();
+ // Crear fichero TFTP/PXE por defecto para el nuevo ordenador.
+ createBootMode ($cmd, "", $idordenador, $idioma);
+ // Insertar datos en el árbol de configuración.
+ $arbolXML=SubarbolXML_ordenadores($idordenador,$nombreordenador);
+ $baseurlimg="../images/signos"; // Url de las imagenes de signo
+ $clasedefault="texto_arbol"; // Hoja de estilo (Clase por defecto) del árbol
+ $arbol=new ArbolVistaXML($arbolXML,0,$baseurlimg,$clasedefault);
+ $tablanodo=$arbol->CreaArbolVistaXML();
}
- // Crear fichero TFTP/PXE por defecto para el nuevo ordenador.
- createBootMode ($cmd, "", $idordenador, $idioma);
break;
case $op_modificacion:
- $cmd->texto="UPDATE ordenadores SET nombreordenador=@nombreordenador,ip=@ip,mac=@mac,idperfilhard=@idperfilhard,
- idrepositorio=@idrepositorio,idmenu=@idmenu,idproautoexec=@idprocedimiento,netiface=@netiface,netdriver=@netdriver,fotoord=@fotoordenador,validacion=@validacion,paginalogin=@paginalogin,paginavalidacion=@paginavalidacion
+ $cmd->texto="UPDATE ordenadores SET nombreordenador=@nombreordenador,numserie=@numserie,ip=@ip,mac=@mac,idperfilhard=@idperfilhard,
+ idrepositorio=@idrepositorio,oglivedir=@oglivedir,idmenu=@idmenu,idproautoexec=@idprocedimiento,netiface=@netiface,netdriver=@netdriver,fotoord=@fotoordenador,validacion=@validacion,paginalogin=@paginalogin,paginavalidacion=@paginavalidacion
WHERE idordenador=@idordenador";
$resul=$cmd->Ejecutar();
// Actualizar fichero TFTP/PXE a partir de la plantilla asociada.
@@ -237,6 +300,8 @@ function Gestiona(){
case $op_movida :
$cmd->texto="UPDATE ordenadores SET idaula=@idaula, grupoid=@grupoid WHERE idordenador=@idordenador";
$resul=$cmd->Ejecutar();
+ // Actualizar fichero TFTP/PXE a partir de la plantilla asociada.
+ createBootMode ($cmd, $arranque, $idordenador, $idioma);
break;
default:
break;
diff --git a/admin/WebConsole/gestores/gestor_ordenadorestandar.php b/admin/WebConsole/gestores/gestor_ordenadorestandar.php
index ddefd72e..d7eeb4d7 100644
--- a/admin/WebConsole/gestores/gestor_ordenadorestandar.php
+++ b/admin/WebConsole/gestores/gestor_ordenadorestandar.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -47,7 +47,7 @@ if ($cmd){
<HEAD>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<BODY>
-<?
+<?php
$literal="resultado_ordenadorestandar";
if ($resul){
echo '<SCRIPT language="javascript">'.chr(13);
@@ -65,7 +65,7 @@ else{
?>
</BODY>
</HTML>
-<?
+<?php
// *************************************************************************************************************************************************
function Gestiona(){
global $cmd;
diff --git a/admin/WebConsole/gestores/gestor_perfilcomponente_hard.php b/admin/WebConsole/gestores/gestor_perfilcomponente_hard.php
index e4e5bdd2..6682b748 100644
--- a/admin/WebConsole/gestores/gestor_perfilcomponente_hard.php
+++ b/admin/WebConsole/gestores/gestor_perfilcomponente_hard.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/gestor_perfilcomponente_soft.php b/admin/WebConsole/gestores/gestor_perfilcomponente_soft.php
index 389d5df2..baef269a 100644
--- a/admin/WebConsole/gestores/gestor_perfilcomponente_soft.php
+++ b/admin/WebConsole/gestores/gestor_perfilcomponente_soft.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/gestor_perfilsoftwares.php b/admin/WebConsole/gestores/gestor_perfilsoftwares.php
index a5155287..b50b4252 100644
--- a/admin/WebConsole/gestores/gestor_perfilsoftwares.php
+++ b/admin/WebConsole/gestores/gestor_perfilsoftwares.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/gestor_procedimientos.php b/admin/WebConsole/gestores/gestor_procedimientos.php
index 5e5d93c0..449c5120 100644
--- a/admin/WebConsole/gestores/gestor_procedimientos.php
+++ b/admin/WebConsole/gestores/gestor_procedimientos.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/gestor_procedimientoscomandos.php b/admin/WebConsole/gestores/gestor_procedimientoscomandos.php
index 71eae65b..f89f6f2e 100644
--- a/admin/WebConsole/gestores/gestor_procedimientoscomandos.php
+++ b/admin/WebConsole/gestores/gestor_procedimientoscomandos.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/gestor_programaciones.php b/admin/WebConsole/gestores/gestor_programaciones.php
index 2fc91cb8..bd9e0ba7 100644
--- a/admin/WebConsole/gestores/gestor_programaciones.php
+++ b/admin/WebConsole/gestores/gestor_programaciones.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/gestor_repositorios.php b/admin/WebConsole/gestores/gestor_repositorios.php
index 88727394..7008d6d5 100644
--- a/admin/WebConsole/gestores/gestor_repositorios.php
+++ b/admin/WebConsole/gestores/gestor_repositorios.php
@@ -1,4 +1,4 @@
-<?
+<?php
// ******************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -15,6 +15,7 @@ include_once("../clases/ArbolVistaXML.php");
include_once("../includes/CreaComando.php");
include_once("../includes/constantes.php");
include_once("../includes/opciones.php");
+include_once("../includes/tftputils.php");
include_once("./relaciones/repositorios_eliminacion.php");
//________________________________________________________________________________________________________
$opcion=0; // Inicializa parametros
@@ -26,6 +27,7 @@ $passguor="";
$grupoid=0;
$puertorepo="";
+$apiKeyRepo="";
$comentarios="";
if (isset($_POST["opcion"])) $opcion=$_POST["opcion"]; // Recoge parametros
@@ -38,6 +40,7 @@ if (isset($_POST["nombrerepositorio"])) $nombrerepositorio=$_POST["nombrereposit
if (isset($_POST["ip"])) $ip=$_POST["ip"];
if (isset($_POST["passguor"])) $passguor=$_POST["passguor"];
if (isset($_POST["puertorepo"])) $puertorepo=$_POST["puertorepo"];
+if (isset($_POST["apiKeyRepo"])) $apiKeyRepo=$_POST["apiKeyRepo"];
if (isset($_POST["comentarios"])) $comentarios=$_POST["comentarios"];
$tablanodo=""; // Arbol para nodos insertados
@@ -109,6 +112,7 @@ function Gestiona(){
global $ip;
global $passguor;
global $puertorepo;
+ global $apiKeyRepo;
global $comentarios;
global $op_alta;
@@ -126,11 +130,12 @@ function Gestiona(){
$cmd->CreaParametro("@ip",$ip,0);
$cmd->CreaParametro("@passguor",$passguor,0);
$cmd->CreaParametro("@puertorepo",$puertorepo,0);
+ $cmd->CreaParametro("@apiKeyRepo",$apiKeyRepo,0);
$cmd->CreaParametro("@comentarios",$comentarios,0);
switch($opcion){
case $op_alta :
- $cmd->texto="INSERT INTO repositorios(idcentro,grupoid,nombrerepositorio,ip,passguor,puertorepo,comentarios) VALUES (@idcentro,@grupoid,@nombrerepositorio,@ip,@passguor,@puertorepo,@comentarios)";
+ $cmd->texto="INSERT INTO repositorios(idcentro,grupoid,nombrerepositorio,ip,passguor,puertorepo,comentarios,apikey) VALUES (@idcentro,@grupoid,@nombrerepositorio,@ip,@passguor,@puertorepo,@comentarios,@apiKeyRepo)";
$resul=$cmd->Ejecutar();
if ($resul){ // Crea una tabla nodo para devolver a la p�gina que llam� �sta
$idrepositorio=$cmd->Autonumerico();
@@ -142,8 +147,11 @@ function Gestiona(){
}
break;
case $op_modificacion:
- $cmd->texto="UPDATE repositorios SET nombrerepositorio=@nombrerepositorio,ip=@ip,passguor=@passguor,puertorepo=@puertorepo,comentarios=@comentarios WHERE idrepositorio=@idrepositorio";
+ $cmd->texto="UPDATE repositorios SET nombrerepositorio=@nombrerepositorio,ip=@ip,passguor=@passguor,puertorepo=@puertorepo,comentarios=@comentarios, apikey=@apiKeyRepo WHERE idrepositorio=@idrepositorio";
$resul=$cmd->Ejecutar();
+ if ($resul) {
+ updateBootRepo($cmd, $idrepositorio);
+ }
break;
case $op_eliminacion :
$resul=Eliminarepositorios($cmd,$idrepositorio,"idrepositorio");
diff --git a/admin/WebConsole/gestores/gestor_reservas.php b/admin/WebConsole/gestores/gestor_reservas.php
index 5150a42b..b983ecee 100644
--- a/admin/WebConsole/gestores/gestor_reservas.php
+++ b/admin/WebConsole/gestores/gestor_reservas.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/gestor_tareas.php b/admin/WebConsole/gestores/gestor_tareas.php
index d13e7259..b96805dd 100644
--- a/admin/WebConsole/gestores/gestor_tareas.php
+++ b/admin/WebConsole/gestores/gestor_tareas.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/gestor_tareascomandos.php b/admin/WebConsole/gestores/gestor_tareascomandos.php
index 3064728b..c7f88ccd 100644
--- a/admin/WebConsole/gestores/gestor_tareascomandos.php
+++ b/admin/WebConsole/gestores/gestor_tareascomandos.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/gestor_tipohardwares.php b/admin/WebConsole/gestores/gestor_tipohardwares.php
index a48757d2..81e1f992 100644
--- a/admin/WebConsole/gestores/gestor_tipohardwares.php
+++ b/admin/WebConsole/gestores/gestor_tipohardwares.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/gestor_universidades.php b/admin/WebConsole/gestores/gestor_universidades.php
index 21f883d5..70b642ab 100644
--- a/admin/WebConsole/gestores/gestor_universidades.php
+++ b/admin/WebConsole/gestores/gestor_universidades.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -43,7 +43,7 @@ if ($cmd){
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<BODY>
<SCRIPT language="javascript" src="../jscripts/propiedades_universidades.js"></SCRIPT>
-<?
+<?php
$literal="";
switch($opcion){
case $op_modificacion:
@@ -65,7 +65,7 @@ else{
?>
</BODY>
</HTML>
-<?
+<?php
/**************************************************************************************************************************************************
Inserta, modifica o elimina datos en la tabla iduniversidades
________________________________________________________________________________________________________*/
diff --git a/admin/WebConsole/gestores/gestor_usuarios.php b/admin/WebConsole/gestores/gestor_usuarios.php
index 4463074b..12aa67fd 100644
--- a/admin/WebConsole/gestores/gestor_usuarios.php
+++ b/admin/WebConsole/gestores/gestor_usuarios.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *******************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -55,7 +55,7 @@ if ($cmd){
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<BODY>
<SCRIPT language="javascript" src="../jscripts/propiedades_usuarios.js"></SCRIPT>
-<?
+<?php
$literal="";
switch($opcion){
case $op_alta :
@@ -93,7 +93,7 @@ else{
?>
</BODY>
</HTML>
-<?
+<?php
/*________________________________________________________________________________________________________
Inserta, modifica o elimina datos en la tabla usuarios
________________________________________________________________________________________________________*/
@@ -126,10 +126,13 @@ function Gestiona(){
$cmd->CreaParametro("@idambito",$idambito,1);
$cmd->CreaParametro("@ididioma",$ididioma,1);
$cmd->CreaParametro("@idtipousuario",$idtipousuario,1);
+ // Generar clave de acceso a la API REST.
+ $apikey=md5(uniqid(rand(), true));
+ $cmd->CreaParametro("@apikey",$apikey,0);
switch($opcion){
case $op_alta :
- $cmd->texto="INSERT INTO usuarios (usuario,pasguor,nombre,email,ididioma,idtipousuario ) VALUES (@usuario,@pasguor,@nombre,@email,@ididioma,@idtipousuario);";
+ $cmd->texto="INSERT INTO usuarios (usuario,pasguor,nombre,email,ididioma,idtipousuario,apikey) VALUES (@usuario,SHA2(@pasguor,224),@nombre,@email,@ididioma,@idtipousuario,@apikey);";
$resul=$cmd->Ejecutar();
if ($resul){ // Crea una tabla nodo para devolver a la página que llamó ésta
$idusuario=$cmd->Autonumerico();
@@ -141,7 +144,7 @@ function Gestiona(){
}
break;
case $op_modificacion:
- $cmd->texto="UPDATE usuarios SET usuario=@usuario,pasguor=@pasguor,nombre=@nombre,email=@email,ididioma=@ididioma WHERE idusuario=@idusuario";
+ $cmd->texto="UPDATE usuarios SET usuario=@usuario,pasguor=SHA2(@pasguor,224),nombre=@nombre,email=@email,ididioma=@ididioma WHERE idusuario=@idusuario";
$resul=$cmd->Ejecutar();
break;
case $op_eliminacion :
@@ -160,18 +163,16 @@ function Gestiona(){
________________________________________________________________________________________________________*/
function toma_usuario($cmd,$idusuario){
global $usuario;
- global $pasguor;
global $idambito;
global $idtipousuario;
$rs=new Recordset;
- $cmd->texto="SELECT usuario, pasguor,idambito,idtipousuario FROM usuarios WHERE idusuario=".$idusuario;
+ $cmd->texto="SELECT usuario, idambito, idtipousuario FROM usuarios WHERE idusuario=".$idusuario;
$rs->Comando=&$cmd;
if (!$rs->Abrir()) return(0); // Error al abrir recordset
$rs->Primero();
if (!$rs->EOF){
$usuario=$rs->campos["usuario"];
- $pasguor=$rs->campos["pasguor"];
$idambito=$rs->campos["idambito"];
$idtipousuario=$rs->campos["idtipousuario"];
return(true);
diff --git a/admin/WebConsole/gestores/relaciones/aulas_eliminacion.php b/admin/WebConsole/gestores/relaciones/aulas_eliminacion.php
index a9d2bc10..f42c6744 100644
--- a/admin/WebConsole/gestores/relaciones/aulas_eliminacion.php
+++ b/admin/WebConsole/gestores/relaciones/aulas_eliminacion.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/relaciones/centros_eliminacion.php b/admin/WebConsole/gestores/relaciones/centros_eliminacion.php
index aad93185..10ec2a06 100644
--- a/admin/WebConsole/gestores/relaciones/centros_eliminacion.php
+++ b/admin/WebConsole/gestores/relaciones/centros_eliminacion.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/relaciones/entidades_eliminacion.php b/admin/WebConsole/gestores/relaciones/entidades_eliminacion.php
index 41b279e5..8444f0ba 100644
--- a/admin/WebConsole/gestores/relaciones/entidades_eliminacion.php
+++ b/admin/WebConsole/gestores/relaciones/entidades_eliminacion.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/relaciones/gruposordenadores_eliminacion.php b/admin/WebConsole/gestores/relaciones/gruposordenadores_eliminacion.php
index dad01a95..d28be296 100644
--- a/admin/WebConsole/gestores/relaciones/gruposordenadores_eliminacion.php
+++ b/admin/WebConsole/gestores/relaciones/gruposordenadores_eliminacion.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/relaciones/hardwares_eliminacion.php b/admin/WebConsole/gestores/relaciones/hardwares_eliminacion.php
index 802df7f6..a1c2a29e 100644
--- a/admin/WebConsole/gestores/relaciones/hardwares_eliminacion.php
+++ b/admin/WebConsole/gestores/relaciones/hardwares_eliminacion.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/relaciones/imagenes_eliminacion.php b/admin/WebConsole/gestores/relaciones/imagenes_eliminacion.php
index 85b4c1a7..7b17500d 100644
--- a/admin/WebConsole/gestores/relaciones/imagenes_eliminacion.php
+++ b/admin/WebConsole/gestores/relaciones/imagenes_eliminacion.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/relaciones/incrementales_eliminacion.php b/admin/WebConsole/gestores/relaciones/incrementales_eliminacion.php
index eeb35cec..b2c33cd0 100644
--- a/admin/WebConsole/gestores/relaciones/incrementales_eliminacion.php
+++ b/admin/WebConsole/gestores/relaciones/incrementales_eliminacion.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/relaciones/menus_eliminacion.php b/admin/WebConsole/gestores/relaciones/menus_eliminacion.php
index dcefc7cf..4ffcfe06 100644
--- a/admin/WebConsole/gestores/relaciones/menus_eliminacion.php
+++ b/admin/WebConsole/gestores/relaciones/menus_eliminacion.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/relaciones/perfileshard_eliminacion.php b/admin/WebConsole/gestores/relaciones/perfileshard_eliminacion.php
index 254a2637..f3c251c0 100644
--- a/admin/WebConsole/gestores/relaciones/perfileshard_eliminacion.php
+++ b/admin/WebConsole/gestores/relaciones/perfileshard_eliminacion.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/relaciones/perfilessoft_eliminacion.php b/admin/WebConsole/gestores/relaciones/perfilessoft_eliminacion.php
index 6ec57f1b..ef7c4fc4 100644
--- a/admin/WebConsole/gestores/relaciones/perfilessoft_eliminacion.php
+++ b/admin/WebConsole/gestores/relaciones/perfilessoft_eliminacion.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/relaciones/procedimientos_eliminacion.php b/admin/WebConsole/gestores/relaciones/procedimientos_eliminacion.php
index a1a65019..8351ade0 100644
--- a/admin/WebConsole/gestores/relaciones/procedimientos_eliminacion.php
+++ b/admin/WebConsole/gestores/relaciones/procedimientos_eliminacion.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/relaciones/repositorios_eliminacion.php b/admin/WebConsole/gestores/relaciones/repositorios_eliminacion.php
index 69137a3b..005f8a96 100644
--- a/admin/WebConsole/gestores/relaciones/repositorios_eliminacion.php
+++ b/admin/WebConsole/gestores/relaciones/repositorios_eliminacion.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/relaciones/reservas_eliminacion.php b/admin/WebConsole/gestores/relaciones/reservas_eliminacion.php
index 46ea627d..48ff5a76 100644
--- a/admin/WebConsole/gestores/relaciones/reservas_eliminacion.php
+++ b/admin/WebConsole/gestores/relaciones/reservas_eliminacion.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/relaciones/softwares_eliminacion.php b/admin/WebConsole/gestores/relaciones/softwares_eliminacion.php
index 6f254a61..cb20db38 100644
--- a/admin/WebConsole/gestores/relaciones/softwares_eliminacion.php
+++ b/admin/WebConsole/gestores/relaciones/softwares_eliminacion.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/relaciones/tareas_eliminacion.php b/admin/WebConsole/gestores/relaciones/tareas_eliminacion.php
index 02277721..a0401116 100644
--- a/admin/WebConsole/gestores/relaciones/tareas_eliminacion.php
+++ b/admin/WebConsole/gestores/relaciones/tareas_eliminacion.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/relaciones/trabajos_eliminacion.php b/admin/WebConsole/gestores/relaciones/trabajos_eliminacion.php
index cfeb0449..d88452c7 100644
--- a/admin/WebConsole/gestores/relaciones/trabajos_eliminacion.php
+++ b/admin/WebConsole/gestores/relaciones/trabajos_eliminacion.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/gestores/relaciones/usuarios_eliminacion.php b/admin/WebConsole/gestores/relaciones/usuarios_eliminacion.php
index 541cbddb..39160026 100644
--- a/admin/WebConsole/gestores/relaciones/usuarios_eliminacion.php
+++ b/admin/WebConsole/gestores/relaciones/usuarios_eliminacion.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/idiomas/javascripts/cat/asistentes_cat.js b/admin/WebConsole/idiomas/javascripts/cat/asistentes_cat.js
new file mode 100644
index 00000000..6a6bb04c
--- /dev/null
+++ b/admin/WebConsole/idiomas/javascripts/cat/asistentes_cat.js
@@ -0,0 +1,10 @@
+//________________________________________________________________________________________________________
+//
+// Fichero de idiomas javascript: asistentes.js
+// Idioma: Español
+//________________________________________________________________________________________________________
+TbMsg=new Array;
+// Asistente de particionado
+TbMsg["NOCACHESIZE"] = "¡El espacio libre en disco es menor que la cache!";
+TbMsg["NODISKSIZE"] = "¡El espacio libre en disco no puede ser menor que 0!";
+
diff --git a/admin/WebConsole/idiomas/javascripts/cat/comandos/comunescomandos_cat.js b/admin/WebConsole/idiomas/javascripts/cat/comandos/comunescomandos_cat.js
index 337bd952..2f30b70f 100644
--- a/admin/WebConsole/idiomas/javascripts/cat/comandos/comunescomandos_cat.js
+++ b/admin/WebConsole/idiomas/javascripts/cat/comandos/comunescomandos_cat.js
@@ -22,3 +22,4 @@ CTbMsg[13]="ATENCIÓN.- Debe elegir un modo de inclusión en tarea ejecutable, d
CTbMsg[14]="ATENCIÓN.- Debe especificar el nombre de la nueva tarea ejecutable que se creará y a la que se añadirá este comando";
CTbMsg[15]="ATENCIÓN.- Debe elegir la tarea a la que se añadirá este comando";
CTbMsg[16]="AVISO: si el código incluye reinicio o apagado, puede provocar que el cliente no inicie correctamente";
+CTbMsg[17]="El comando se ha enviado correctamente, pero han habido errores de conexión con la API REST de repositorio";
diff --git a/admin/WebConsole/idiomas/javascripts/cat/comandos/configurar_cat.js b/admin/WebConsole/idiomas/javascripts/cat/comandos/configurar_cat.js
index 57a833e0..0a049236 100644
--- a/admin/WebConsole/idiomas/javascripts/cat/comandos/configurar_cat.js
+++ b/admin/WebConsole/idiomas/javascripts/cat/comandos/configurar_cat.js
@@ -12,4 +12,5 @@ TbMsg[4]="ATENCIÓN: Se va a eliminar esta partición ¿ Está seguro ?";
TbMsg[5]="Debe especificar el tipo de sistema de fichero si desea formatear la partición";
TbMsg[6]="La CACHE sólo puede definirse en la partición 4";
TbMsg[7]="El número máximo de particiones es 4";
-
+TbMsg["EXTSIZE"]="El tamaño de las particiones lógicas es mayor que el de la partición extendida";
+TbMsg["HDSIZE"]="El tamaño de las particiones es mayor el tamaño del disco";
diff --git a/admin/WebConsole/idiomas/javascripts/cat/comandos/enviarmensaje_cat.js b/admin/WebConsole/idiomas/javascripts/cat/comandos/enviarmensaje_cat.js
new file mode 100644
index 00000000..2d178314
--- /dev/null
+++ b/admin/WebConsole/idiomas/javascripts/cat/comandos/enviarmensaje_cat.js
@@ -0,0 +1,9 @@
+//________________________________________________________________________________________________________
+//
+// Fichero de idiomas javascripts: ejecutarscripts_esp.js
+// Idioma: Español
+//________________________________________________________________________________________________________
+TbMsg=new Array;
+TbMsg[0]="";
+TbMsg[1]="El mensaje debe tener un título.";
+TbMsg[2]="El mensaje debe tener algún contenido.";
diff --git a/admin/WebConsole/idiomas/javascripts/cat/comandos/restaurarimagen_cat.js b/admin/WebConsole/idiomas/javascripts/cat/comandos/restaurarimagen_cat.js
index fa501192..6b5d10db 100644
--- a/admin/WebConsole/idiomas/javascripts/cat/comandos/restaurarimagen_cat.js
+++ b/admin/WebConsole/idiomas/javascripts/cat/comandos/restaurarimagen_cat.js
@@ -1,6 +1,6 @@
//________________________________________________________________________________________________________
//
-// Fichero de idiomas javascripts: configurar_esp.js
+// Fichero de idiomas javascripts: restaurarimagen_cat.js
// Idioma: Español
//________________________________________________________________________________________________________
TbMsg=new Array;
@@ -12,3 +12,4 @@ TbMsg[4]="Debe elegir al menos una imagen para la partición"
TbMsg[5]="Debe elegir al menos un path de imagen para la partición ";
TbMsg[6]="Debe elegir la imagen de uno sólo de los desplegables";
TbMsg["FILTER"]="Debe seleccionar al menos un ordenador que tenga la configuración elegida.";
+TbMsg["UNICAST"]="\t!!!!! ATENCIÓN !!!!! \nHa seleccionado UNICAST en varios ordenadores,\nLa transferencia puede demorarse en el tiempo";
diff --git a/admin/WebConsole/idiomas/javascripts/cat/propiedades_aulas_cat.js b/admin/WebConsole/idiomas/javascripts/cat/propiedades_aulas_cat.js
index fcc7d60b..af18c256 100644
--- a/admin/WebConsole/idiomas/javascripts/cat/propiedades_aulas_cat.js
+++ b/admin/WebConsole/idiomas/javascripts/cat/propiedades_aulas_cat.js
@@ -5,7 +5,7 @@
//________________________________________________________________________________________________________
TbMsg=new Array;
TbMsg[0]="El nombre del aula debe contener caracteres alfanuméricos";
-TbMsg[1]="Debe introducir un número de puestos para este aula";
+TbMsg[1]="Debe introducir un número de Aforo para este aula";
TbMsg[2]="ATENCIÓN.- Esta aula contiene grupos de ordenadores u ordenadores. Si los elimina, eliminará también éstos. ¿ Está seguro ?";
TbMsg[3]="La hora de comienzo del intervalo de reservas debe ser menor que la hora final";
TbMsg[4]="La direccion del router no es valida";
@@ -23,4 +23,5 @@ TbMsg[15]="La URL de la página de login no es válida";
TbMsg[16]="La URL de la página de validación no es válida";
TbMsg[17]="La ubicación sólo puede contener caracteres alfanuméricos"
TbMsg[18]="Los comentarios sólo pueden contener caracteres alfanuméricos"
+TbMsg[19]="La dirección IP del servidor NTP no es válida";
diff --git a/admin/WebConsole/idiomas/javascripts/cat/propiedades_centros_cat.js b/admin/WebConsole/idiomas/javascripts/cat/propiedades_centros_cat.js
index b2a3412c..c2ccc8bb 100644
--- a/admin/WebConsole/idiomas/javascripts/cat/propiedades_centros_cat.js
+++ b/admin/WebConsole/idiomas/javascripts/cat/propiedades_centros_cat.js
@@ -4,5 +4,8 @@
// Idioma: Español
//________________________________________________________________________________________________________
TbMsg=new Array;
-TbMsg[0]="Nombre de la Unidad Organizativa es un dato obligatorio";
- \ No newline at end of file
+TbMsg[0]="Nombre de la Unidad Organizativa es un dato obligatorio y sólo puede contener caracteres alfanuméricos";
+TbMsg[1]="El comentario sólo puede contener caracteres alfanuméricos";
+TbMsg[2]="El directorio sólo puede contener caracteres alfanuméricos";
+
+
diff --git a/admin/WebConsole/idiomas/javascripts/cat/propiedades_entidades_cat.js b/admin/WebConsole/idiomas/javascripts/cat/propiedades_entidades_cat.js
index 5830d3fb..e75b177f 100644
--- a/admin/WebConsole/idiomas/javascripts/cat/propiedades_entidades_cat.js
+++ b/admin/WebConsole/idiomas/javascripts/cat/propiedades_entidades_cat.js
@@ -4,5 +4,6 @@
// Idioma: Español
//________________________________________________________________________________________________________
TbMsg=new Array;
-TbMsg[0]="Nombre de la entidad es un dato obligatorio";
- \ No newline at end of file
+TbMsg[0]="Nombre de la entidad es un dato obligatorio y sólo puede contener caracteres alfanuméricos";
+TbMsg[1]="El comentario sólo puede contener caracteres alfanuméricos";
+TbMsg['PXE']="Si cambia está opción debe guardar de nuevo la configuración \ndel arranque PXE de los clientes en NetBootAvanzado";
diff --git a/admin/WebConsole/idiomas/javascripts/cat/propiedades_ordenadores_cat.js b/admin/WebConsole/idiomas/javascripts/cat/propiedades_ordenadores_cat.js
index a58baa41..08cc2caa 100644
--- a/admin/WebConsole/idiomas/javascripts/cat/propiedades_ordenadores_cat.js
+++ b/admin/WebConsole/idiomas/javascripts/cat/propiedades_ordenadores_cat.js
@@ -4,10 +4,10 @@
// Idioma: Español
//________________________________________________________________________________________________________
TbMsg=new Array;
-TbMsg[0]="Debe introducir un nombre para este ordenador";
+TbMsg[0]="El nombre del ordenador puede contener caracteres alfanuméricos, subrayados y guiones";
TbMsg[1]="Debe introducir una dirección IP";
TbMsg[2]="Debe introducir a una dirección MAC";
-TbMsg[3]="";
+TbMsg[3]="El número de serie debe ser un valor alfanumérico";
TbMsg[4]="";
TbMsg[5]="Debe elegir un repositorio por defecto";
TbMsg[6]="Deben introducirse datos de validación: página de login y página de validación";
diff --git a/admin/WebConsole/idiomas/javascripts/cat/propiedades_usuarios_cat.js b/admin/WebConsole/idiomas/javascripts/cat/propiedades_usuarios_cat.js
index d6a80576..5117297b 100644
--- a/admin/WebConsole/idiomas/javascripts/cat/propiedades_usuarios_cat.js
+++ b/admin/WebConsole/idiomas/javascripts/cat/propiedades_usuarios_cat.js
@@ -9,4 +9,5 @@ TbMsg[1]="Password es un dato obligatorio";
TbMsg[2]="Nombre completo es un dato obligatorio";
TbMsg[3]="Unidad organizativa es obligatoria para este usuario";
TbMsg[4]="Idioma es un dato obligatorio";
- \ No newline at end of file
+TbMsg[5]="Los campos 'Password' y 'Confirmar password' no coinciden";
+TbMsg[6]="La clave debe tener un m�nimo de 8 caracteres";
diff --git a/admin/WebConsole/idiomas/javascripts/eng/asistentes_eng.js b/admin/WebConsole/idiomas/javascripts/eng/asistentes_eng.js
new file mode 100644
index 00000000..6a6bb04c
--- /dev/null
+++ b/admin/WebConsole/idiomas/javascripts/eng/asistentes_eng.js
@@ -0,0 +1,10 @@
+//________________________________________________________________________________________________________
+//
+// Fichero de idiomas javascript: asistentes.js
+// Idioma: Español
+//________________________________________________________________________________________________________
+TbMsg=new Array;
+// Asistente de particionado
+TbMsg["NOCACHESIZE"] = "¡El espacio libre en disco es menor que la cache!";
+TbMsg["NODISKSIZE"] = "¡El espacio libre en disco no puede ser menor que 0!";
+
diff --git a/admin/WebConsole/idiomas/javascripts/eng/comandos/comunescomandos_eng.js b/admin/WebConsole/idiomas/javascripts/eng/comandos/comunescomandos_eng.js
index a5023c96..3f13b558 100644
--- a/admin/WebConsole/idiomas/javascripts/eng/comandos/comunescomandos_eng.js
+++ b/admin/WebConsole/idiomas/javascripts/eng/comandos/comunescomandos_eng.js
@@ -22,3 +22,4 @@ CTbMsg[13]="WARNING: You must choose a way of inclusion this command on task exe
CTbMsg[14]="WARNING: You must specify the name of the new task where this command will be added";
CTbMsg[15]="WARNING: You must choose the task that will add this command";
CTbMsg[16]="AVISO: si el código incluye reinicio o apagado, puede provocar que el cliente no inicie correctamente";
+CTbMsg[17]="The command has been successfully registered, but there was some problems connecting repository REST API";
diff --git a/admin/WebConsole/idiomas/javascripts/eng/comandos/configurar_eng.js b/admin/WebConsole/idiomas/javascripts/eng/comandos/configurar_eng.js
index 3c62905a..abc99019 100644
--- a/admin/WebConsole/idiomas/javascripts/eng/comandos/configurar_eng.js
+++ b/admin/WebConsole/idiomas/javascripts/eng/comandos/configurar_eng.js
@@ -12,4 +12,5 @@ TbMsg[4]="ATENCION: Se va a eliminar esta particin Esta seguro ?";
TbMsg[5]="Debe especificar el tipo de sistema de ficheros si desea formatear la particion";
TbMsg[6]="La CACHE solo puede definirse en la particion 4";
TbMsg[7]="El nmero maximo de particiones es 4";
-
+TbMsg["EXTSIZE"]="El tamao de las particiones lgicas es mayor que el de la particin extendida";
+TbMsg["HDSIZE"]="El tamao de las particiones es mayor el tamao del disco";
diff --git a/admin/WebConsole/idiomas/javascripts/eng/comandos/enviarmensaje_eng.js b/admin/WebConsole/idiomas/javascripts/eng/comandos/enviarmensaje_eng.js
new file mode 100644
index 00000000..19d2316a
--- /dev/null
+++ b/admin/WebConsole/idiomas/javascripts/eng/comandos/enviarmensaje_eng.js
@@ -0,0 +1,9 @@
+//________________________________________________________________________________________________________
+//
+// Fichero de idiomas javascripts: enviarmensaje_eng.js
+// Idioma: Ingls
+//________________________________________________________________________________________________________
+TbMsg=new Array;
+TbMsg[0]="";
+TbMsg[1]="El mensaje debe tener un ttulo.";
+TbMsg[2]="El mensaje debe tener algn contenido.";
diff --git a/admin/WebConsole/idiomas/javascripts/eng/comandos/restaurarimagen_eng.js b/admin/WebConsole/idiomas/javascripts/eng/comandos/restaurarimagen_eng.js
index fcaaf8c6..f1526877 100644
--- a/admin/WebConsole/idiomas/javascripts/eng/comandos/restaurarimagen_eng.js
+++ b/admin/WebConsole/idiomas/javascripts/eng/comandos/restaurarimagen_eng.js
@@ -1,7 +1,7 @@
//________________________________________________________________________________________________________
//
-// Fichero de idiomas javascripts: configurar_eng.js
-// Idioma: Ing�s
+// Fichero de idiomas javascripts: restaurarimagen_eng.js
+// Idioma: Inglés
//________________________________________________________________________________________________________
TbMsg=new Array;
TbMsg[0]="You must select at least an Image for partition ";
@@ -10,5 +10,6 @@ TbMsg[2]="WARNING: You have selected an Image from other operating system for c
TbMsg[3]="Are you sure ?"
TbMsg[4]="You must select at least a partition and an Image"
TbMsg[5]="You must select at least a image path for partition ";
-TbMsg[6]="You must choose only one image of the down";
-TbMsg["FILTER"]="Debe seleccionar al menos un ordenador que tenga la configuración elegida.";
+TbMsg[6]="You must choose only one image of the down";
+TbMsg["FILTER"]="Debe seleccionar al menos un ordenador que tenga la configuración elegida.";
+TbMsg["UNICAST"]="\t!!!!! ATENCIÓN !!!!! \nHa seleccionado UNICAST en varios ordenadores,\nLa transferencia puede demorarse en el tiempo";
diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_aulas_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_aulas_eng.js
index 94f5005d..87cb1771 100644
--- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_aulas_eng.js
+++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_aulas_eng.js
@@ -5,7 +5,7 @@
//________________________________________________________________________________________________________
TbMsg=new Array;
TbMsg[0]="El nombre del aula debe contener caracteres alfanumericos";
-TbMsg[1]="You must introduce a number of places for this lab";
+TbMsg[1]="You must introduce a number of Capacity for this lab";
TbMsg[2]="WARNING.- This lab contain others groups or labs. If you remove it, you will also remove all these. Are you sure ?";
TbMsg[3]="Time for begining of reserves periode must be smaller than final time";
TbMsg[4]="Multicast speed is not valid, use numbers only";
@@ -23,3 +23,4 @@ TbMsg[15]="La URL de la pagina de login no es valida";
TbMsg[16]="La URL de la pagina de validacin no es valida";
TbMsg[17]="La ubicacion solo puede contener caracteres alfanumericos"
TbMsg[18]="Los comentarios solo pueden contener caracteres alfanumericos"
+TbMsg[19]="NTP server IP address is not valid";
diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_centros_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_centros_eng.js
index 06663364..874bff00 100644
--- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_centros_eng.js
+++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_centros_eng.js
@@ -4,5 +4,7 @@
// Idioma: Ings
//________________________________________________________________________________________________________
TbMsg=new Array;
-TbMsg[0]="You must introduce a name for this Organizing Unit";
- \ No newline at end of file
+TbMsg[0]="You must introduce a name for this Organizing Unit y slo puede contener caracteres alfanumricos";
+TbMsg[1]="El comentario slo puede contener caracteres alfanumricos";
+TbMsg[2]="El directorio slo puede contener caracteres alfanumricos";
+
diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_entidades_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_entidades_eng.js
index 9bf4e4b1..bfc09a61 100644
--- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_entidades_eng.js
+++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_entidades_eng.js
@@ -4,5 +4,6 @@
// Idioma: Ings
//________________________________________________________________________________________________________
TbMsg=new Array;
-TbMsg[0]="You must introduce a name for this Entity";
- \ No newline at end of file
+TbMsg[0]="You must introduce a name for this Entity y slo puede contener caracteres alfanumricos";
+TbMsg[1]="El comentario slo puede contener caracteres alfanumricos";
+TbMsg['PXE']="Si cambia est opcin debe guardar de nuevo la configuracin \ndel arranque PXE de los clientes en NetBootAvanzado";
diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_ordenadores_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_ordenadores_eng.js
index a93a0279..9ecf454d 100644
--- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_ordenadores_eng.js
+++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_ordenadores_eng.js
@@ -4,10 +4,10 @@
// Idioma: Ings
//________________________________________________________________________________________________________
TbMsg=new Array;
-TbMsg[0]="You must introduce a computer name";
+TbMsg[0]="El nombre del ordenador puede contener caracteres alfanumricos, subrayados y guiones";
TbMsg[1]="You must introduce an IP Address";
TbMsg[2]="You must introduce a MAC Address";
-TbMsg[3]="You must link this computer with some of a hardware profile";
-TbMsg[4]="You must introduce a DHCP server";
+TbMsg[3]="The serial number must be an alphanumeric value";
+TbMsg[4]="";
TbMsg[5]="You must introduce a OpenGnsys server";
TbMsg[6]="Deben introducirse datos de validacin: pgina de login y pgina de validacin";
diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_usuarios_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_usuarios_eng.js
index 9315b21e..4d7151e4 100644
--- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_usuarios_eng.js
+++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_usuarios_eng.js
@@ -9,3 +9,5 @@ TbMsg[1]="You must introduce a password for this user";
TbMsg[2]="You must introduce a complete name";
TbMsg[3]="You must introduce an organizing unit for this user";
TbMsg[4]="You must introduce a language";
+TbMsg[5]="Los campos 'Password' y 'Confirmar password' no coinciden";
+TbMsg[6]="La clave debe tener un mnimo de 8 caracteres";
diff --git a/admin/WebConsole/idiomas/javascripts/esp/asistentes_esp.js b/admin/WebConsole/idiomas/javascripts/esp/asistentes_esp.js
new file mode 100644
index 00000000..6a6bb04c
--- /dev/null
+++ b/admin/WebConsole/idiomas/javascripts/esp/asistentes_esp.js
@@ -0,0 +1,10 @@
+//________________________________________________________________________________________________________
+//
+// Fichero de idiomas javascript: asistentes.js
+// Idioma: Español
+//________________________________________________________________________________________________________
+TbMsg=new Array;
+// Asistente de particionado
+TbMsg["NOCACHESIZE"] = "¡El espacio libre en disco es menor que la cache!";
+TbMsg["NODISKSIZE"] = "¡El espacio libre en disco no puede ser menor que 0!";
+
diff --git a/admin/WebConsole/idiomas/javascripts/esp/comandos/comunescomandos_esp.js b/admin/WebConsole/idiomas/javascripts/esp/comandos/comunescomandos_esp.js
index 152c3787..d0c826bf 100644
--- a/admin/WebConsole/idiomas/javascripts/esp/comandos/comunescomandos_esp.js
+++ b/admin/WebConsole/idiomas/javascripts/esp/comandos/comunescomandos_esp.js
@@ -22,3 +22,4 @@ CTbMsg[13]="ATENCIÓN.- Debe elegir un modo de inclusión en tarea ejecutable, d
CTbMsg[14]="ATENCIÓN.- Debe especificar el nombre de la nueva tarea ejecutable que se creará y a la que se añadirá este comando";
CTbMsg[15]="ATENCIÓN.- Debe elegir la tarea a la que se añadirá este comando";
CTbMsg[16]="AVISO: si el código incluye reinicio o apagado, puede provocar que el cliente no inicie correctamente";
+CTbMsg[17]="El comando se ha enviado correctamente, pero han habido errores de conexión con la API REST de repositorio";
diff --git a/admin/WebConsole/idiomas/javascripts/esp/comandos/configurar_esp.js b/admin/WebConsole/idiomas/javascripts/esp/comandos/configurar_esp.js
index 2a65e061..df708800 100644
--- a/admin/WebConsole/idiomas/javascripts/esp/comandos/configurar_esp.js
+++ b/admin/WebConsole/idiomas/javascripts/esp/comandos/configurar_esp.js
@@ -12,3 +12,5 @@ TbMsg[4]="ATENCIÓN: Se va a eliminar esta partición ¿ Está seguro ?";
TbMsg[5]="Debe especificar el tipo de sistema de ficheros si desea formatear la partición";
TbMsg[6]="La CACHE sólo puede definirse en la partición 4";
TbMsg[7]="El número máximo de particiones es 4";
+TbMsg["EXTSIZE"]="El tamaño de las particiones lógicas es mayor que el de la partición extendida";
+TbMsg["HDSIZE"]="El tamaño de las particiones es mayor el tamaño del disco";
diff --git a/admin/WebConsole/idiomas/javascripts/esp/comandos/enviarmensaje_esp.js b/admin/WebConsole/idiomas/javascripts/esp/comandos/enviarmensaje_esp.js
new file mode 100644
index 00000000..4c3fc12e
--- /dev/null
+++ b/admin/WebConsole/idiomas/javascripts/esp/comandos/enviarmensaje_esp.js
@@ -0,0 +1,9 @@
+//________________________________________________________________________________________________________
+//
+// Fichero de idiomas javascripts: enviarmensaje_esp.js
+// Idioma: Español
+//________________________________________________________________________________________________________
+TbMsg=new Array;
+TbMsg[0]="";
+TbMsg[1]="El mensaje debe tener un título.";
+TbMsg[2]="El mensaje debe tener algún contenido.";
diff --git a/admin/WebConsole/idiomas/javascripts/esp/comandos/restaurarimagen_esp.js b/admin/WebConsole/idiomas/javascripts/esp/comandos/restaurarimagen_esp.js
index e5842b92..e7f856f6 100644
--- a/admin/WebConsole/idiomas/javascripts/esp/comandos/restaurarimagen_esp.js
+++ b/admin/WebConsole/idiomas/javascripts/esp/comandos/restaurarimagen_esp.js
@@ -1,6 +1,6 @@
//________________________________________________________________________________________________________
//
-// Fichero de idiomas javascripts: configurar_esp.js
+// Fichero de idiomas javascripts: restaurarimagen_esp.js
// Idioma: Español
//________________________________________________________________________________________________________
TbMsg=new Array;
@@ -10,5 +10,7 @@ TbMsg[2]="ATENCIÓN: Ha selecccionado una imagen de Sistema Operativo distinto
TbMsg[3]="¿ Está seguro ?"
TbMsg[4]="Debe elegir al menos una imagen para la partición"
TbMsg[5]="Debe elegir al menos un path de imagen para la partición ";
-TbMsg[6]="Debe elegir la imagen de uno sólo de los desplegables";
-TbMsg["FILTER"]="Debe seleccionar al menos un ordenador que tenga la configuración elegida.";
+TbMsg[6]="Debe elegir la imagen de uno sólo de los desplegables";
+TbMsg["FILTER"]="Debe seleccionar al menos un ordenador que tenga la configuración elegida.";
+TbMsg["UNICAST"]="\t!!!!! ATENCIÓN !!!!! \nHa seleccionado UNICAST en varios ordenadores,\nLa transferencia puede demorarse en el tiempo";
+
diff --git a/admin/WebConsole/idiomas/javascripts/esp/propiedades_aulas_esp.js b/admin/WebConsole/idiomas/javascripts/esp/propiedades_aulas_esp.js
index 0bc14ecc..0f2d504b 100644
--- a/admin/WebConsole/idiomas/javascripts/esp/propiedades_aulas_esp.js
+++ b/admin/WebConsole/idiomas/javascripts/esp/propiedades_aulas_esp.js
@@ -5,7 +5,7 @@
//________________________________________________________________________________________________________
TbMsg=new Array;
TbMsg[0]="El nombre del aula debe contener caracteres alfanuméricos";
-TbMsg[1]="Debe introducir un número de puestos para este aula";
+TbMsg[1]="Debe introducir un número de Aforo para este aula";
TbMsg[2]="ATENCIÓN.- Esta aula contiene grupos de ordenadores u ordenadores. Si los elimina, eliminará también éstos. ¿ Está seguro ?";
TbMsg[3]="La hora de comienzo del intervalo de reservas debe ser menor que la hora final";
TbMsg[4]="La direccion del router no es valida";
@@ -23,4 +23,5 @@ TbMsg[15]="La URL de la página de login no es válida";
TbMsg[16]="La URL de la página de validación no es válida";
TbMsg[17]="La ubicación sólo puede contener caracteres alfanuméricos"
TbMsg[18]="Los comentarios sólo pueden contener caracteres alfanuméricos"
+TbMsg[19]="La dirección IP del servidor NTP no es válida";
diff --git a/admin/WebConsole/idiomas/javascripts/esp/propiedades_centros_esp.js b/admin/WebConsole/idiomas/javascripts/esp/propiedades_centros_esp.js
index b2a3412c..7074f85f 100644
--- a/admin/WebConsole/idiomas/javascripts/esp/propiedades_centros_esp.js
+++ b/admin/WebConsole/idiomas/javascripts/esp/propiedades_centros_esp.js
@@ -4,5 +4,6 @@
// Idioma: Español
//________________________________________________________________________________________________________
TbMsg=new Array;
-TbMsg[0]="Nombre de la Unidad Organizativa es un dato obligatorio";
- \ No newline at end of file
+TbMsg[0]="Nombre de la Unidad Organizativa es un dato obligatorio y sólo puede contener caracteres alfanuméricos";
+TbMsg[1]="El comentario sólo puede contener caracteres alfanuméricos";
+TbMsg[2]="El directorio sólo puede contener caracteres alfanuméricos";
diff --git a/admin/WebConsole/idiomas/javascripts/esp/propiedades_entidades_esp.js b/admin/WebConsole/idiomas/javascripts/esp/propiedades_entidades_esp.js
index 5830d3fb..e75b177f 100644
--- a/admin/WebConsole/idiomas/javascripts/esp/propiedades_entidades_esp.js
+++ b/admin/WebConsole/idiomas/javascripts/esp/propiedades_entidades_esp.js
@@ -4,5 +4,6 @@
// Idioma: Español
//________________________________________________________________________________________________________
TbMsg=new Array;
-TbMsg[0]="Nombre de la entidad es un dato obligatorio";
- \ No newline at end of file
+TbMsg[0]="Nombre de la entidad es un dato obligatorio y sólo puede contener caracteres alfanuméricos";
+TbMsg[1]="El comentario sólo puede contener caracteres alfanuméricos";
+TbMsg['PXE']="Si cambia está opción debe guardar de nuevo la configuración \ndel arranque PXE de los clientes en NetBootAvanzado";
diff --git a/admin/WebConsole/idiomas/javascripts/esp/propiedades_ordenadores_esp.js b/admin/WebConsole/idiomas/javascripts/esp/propiedades_ordenadores_esp.js
index a58baa41..08cc2caa 100644
--- a/admin/WebConsole/idiomas/javascripts/esp/propiedades_ordenadores_esp.js
+++ b/admin/WebConsole/idiomas/javascripts/esp/propiedades_ordenadores_esp.js
@@ -4,10 +4,10 @@
// Idioma: Español
//________________________________________________________________________________________________________
TbMsg=new Array;
-TbMsg[0]="Debe introducir un nombre para este ordenador";
+TbMsg[0]="El nombre del ordenador puede contener caracteres alfanuméricos, subrayados y guiones";
TbMsg[1]="Debe introducir una dirección IP";
TbMsg[2]="Debe introducir a una dirección MAC";
-TbMsg[3]="";
+TbMsg[3]="El número de serie debe ser un valor alfanumérico";
TbMsg[4]="";
TbMsg[5]="Debe elegir un repositorio por defecto";
TbMsg[6]="Deben introducirse datos de validación: página de login y página de validación";
diff --git a/admin/WebConsole/idiomas/javascripts/esp/propiedades_usuarios_esp.js b/admin/WebConsole/idiomas/javascripts/esp/propiedades_usuarios_esp.js
index d6a80576..827c90e7 100644
--- a/admin/WebConsole/idiomas/javascripts/esp/propiedades_usuarios_esp.js
+++ b/admin/WebConsole/idiomas/javascripts/esp/propiedades_usuarios_esp.js
@@ -9,4 +9,5 @@ TbMsg[1]="Password es un dato obligatorio";
TbMsg[2]="Nombre completo es un dato obligatorio";
TbMsg[3]="Unidad organizativa es obligatoria para este usuario";
TbMsg[4]="Idioma es un dato obligatorio";
- \ No newline at end of file
+TbMsg[5]="Los campos 'Password' y 'Confirmar password' no coinciden";
+TbMsg[6]="La clave debe tener un mínimo de 8 caracteres";
diff --git a/admin/WebConsole/idiomas/php/cat/acceso_cat.php b/admin/WebConsole/idiomas/php/cat/acceso_cat.php
index 8bfd920f..1b29d068 100644
--- a/admin/WebConsole/idiomas/php/cat/acceso_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/acceso_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
// __________________________________________________
//
// Fichero de idiomas php: acceso_cat.php
@@ -15,7 +15,7 @@ $TbErr[4]="ATENCIÓ: Vostè no te accés a aquesta aplicació";
// Mensajes.
$TbMsg=array();
-$TbMsg["ACCESS_TITLE"]="OpenGnSys: Administració web d\'aules";
+$TbMsg["ACCESS_TITLE"]="OpenGnsys: Administració web d\'aules";
$TbMsg["ACCESS_HEADING"]="Gestió d\'Aules d\'Informàtica";
$TbMsg["ACCESS_SUBHEAD"]="Accés per administradors";
$TbMsg["ACCESS_USERNAME"]="Usuari";
diff --git a/admin/WebConsole/idiomas/php/cat/acciones_cat.php b/admin/WebConsole/idiomas/php/cat/acciones_cat.php
index fe8001a2..07ce21dc 100644
--- a/admin/WebConsole/idiomas/php/cat/acciones_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/acciones_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: accions_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/accionmenu_cat.php b/admin/WebConsole/idiomas/php/cat/accionmenu_cat.php
index 7307ac90..b5123a0c 100644
--- a/admin/WebConsole/idiomas/php/cat/accionmenu_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/accionmenu_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: accionmenu_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/acercade_cat.php b/admin/WebConsole/idiomas/php/cat/acercade_cat.php
index 7f0788a7..7c731a31 100644
--- a/admin/WebConsole/idiomas/php/cat/acercade_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/acercade_cat.php
@@ -10,11 +10,11 @@ if(!isset($TbMsg)){
}
$TbMsg["TITLE"]='Aplicaci&oacute;n libre y abierta para la gesti&oacute;n y el despliegue de sistemas operativos';
-$TbMsg["DESCRIPTION"]='OpenGnSys <em>(l&eacute;ase OpenG&eacute;nesis)</em> re&uacute;ne el esfuerzo conjunto de varias Universidades P&uacute;blicas Espa&ntilde;olas, para disponer de una serie de herramientas libres y abiertas que constituyan un sistema completo, vers&aacute;til e intuitivo, para la gesti&oacute;n y clonaci&oacute;n de equipos. Esta aplicaci&oacute;n permite la distribuci&oacute;n, instalaci&oacute;n y despliegue de distintos sistemas operativos. ';
-$TbMsg["LICENSE"]='OpenGnSys es un proyecto de Software Libre, todo el c&oacute;digo est&aacute; licenciado bajo ';
+$TbMsg["DESCRIPTION"]='OpenGnsys <em>(l&eacute;ase OpenG&eacute;nesis)</em> re&uacute;ne el esfuerzo conjunto de varias Universidades P&uacute;blicas Espa&ntilde;olas, para disponer de una serie de herramientas libres y abiertas que constituyan un sistema completo, vers&aacute;til e intuitivo, para la gesti&oacute;n y clonaci&oacute;n de equipos. Esta aplicaci&oacute;n permite la distribuci&oacute;n, instalaci&oacute;n y despliegue de distintos sistemas operativos. ';
+$TbMsg["LICENSE"]='OpenGnsys es un proyecto de Software Libre, todo el c&oacute;digo est&aacute; licenciado bajo ';
$TbMsg["LINK"]='Web del proyecto: ';
$TbMsg["CHANGE"]='Canvis en: ';
-$TbMsg["MANUAL"]='Manual OpenGnSys ';
+$TbMsg["MANUAL"]='Manual OpenGnsys ';
?>
diff --git a/admin/WebConsole/idiomas/php/cat/actualizar_cat.php b/admin/WebConsole/idiomas/php/cat/actualizar_cat.php
index 5d7ef58d..40365eb0 100644
--- a/admin/WebConsole/idiomas/php/cat/actualizar_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/actualizar_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: actualitzar_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/administracion_cat.php b/admin/WebConsole/idiomas/php/cat/administracion_cat.php
index b11e0ed8..4889107d 100644
--- a/admin/WebConsole/idiomas/php/cat/administracion_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/administracion_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: administraci_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/administradores_centros_cat.php b/admin/WebConsole/idiomas/php/cat/administradores_centros_cat.php
index 575cf3f4..40ff7341 100644
--- a/admin/WebConsole/idiomas/php/cat/administradores_centros_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/administradores_centros_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: administradores_centros_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/administradores_usuarios_cat.php b/admin/WebConsole/idiomas/php/cat/administradores_usuarios_cat.php
index d02e01c3..5ce0a954 100644
--- a/admin/WebConsole/idiomas/php/cat/administradores_usuarios_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/administradores_usuarios_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: administradores_centros_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/aulas_cat.php b/admin/WebConsole/idiomas/php/cat/aulas_cat.php
index 0813abf4..75d55af7 100644
--- a/admin/WebConsole/idiomas/php/cat/aulas_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/aulas_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: aules_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/avisos_cat.php b/admin/WebConsole/idiomas/php/cat/avisos_cat.php
index 017cf74c..97eb5f15 100644
--- a/admin/WebConsole/idiomas/php/cat/avisos_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/avisos_cat.php
@@ -9,7 +9,10 @@ if (empty ($TbMsg)) $TbMsg=array();
$TbMsg["WARN_NAMELENGTH"]='AVÍS: El nom d\'equip no ha de superar els 15 caràcters si s\'instalen sistemes Windows.';
$TbMsg["WARN_NETBOOT"]='ATENCI&Oacute;N: El equipo iniciar&aacute; en local por defecto; usar NetBoot Avanzado para modificar su arranque.';
$TbMsg["WARN_DISKSIZE"]='AVISO: El cálculo del tamaño del disco tiene un margen de error, si se utiliza completamente puede fallar la creación de la cache. Es conveniente dejar un espacio libre, que en disco grandes puede llegar a un 1GB';
-$TbMsg["WARN_REBOOTAFTER"]='AVISO: Es conveniente realizar un reinicio despu&eacute;s de ejecutar la operaci&oacute;n.';
+$TbMsg["WARN_REBOOTAFTER"]='AVISO: En algunos casos puede ser conveniente realizar un reinicio despu&eacute;s de ejecutar la operaci&oacute;n.';
$TbMsg["WARN_NOTESOFMENU"]='NOTAS: Los men&uacute;s personalizados tienen mayor prioridad que los men&uacute;s autom&aacute;ticos.<br>Un men&uacute; personalizado se define introduciendo la URL de la p&aacute;gina HTML que lo define.<br>Un men&uacute; autom&aacute;tico se compone a partir de los procedimientos definidos.';
+$TbMsg["WARN_GPT"]='AVISO: Para tabla de particiones GPT es necesario que la primera partición sea tipo EFI <br>y se recomienda un tamaño en torno a 512Mb.';
+$TbMsg["WARN_SCHEDULER"]='AVISO: activar calendario de eventos de la BD para habilitar esta propiedad.';
+$TbMsg["WARN_SOURCE_PATH"]='AVISO: La ruta de origen sólo se utiliza en las sincronizadas tipo directorio.';
?>
diff --git a/admin/WebConsole/idiomas/php/cat/barramenu_cat.php b/admin/WebConsole/idiomas/php/cat/barramenu_cat.php
index 281b63e9..338ebb32 100644
--- a/admin/WebConsole/idiomas/php/cat/barramenu_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/barramenu_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: barramenu_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/boot_grub4dos_cat.php b/admin/WebConsole/idiomas/php/cat/boot_grub4dos_cat.php
index ca0ade44..674bd3b5 100644
--- a/admin/WebConsole/idiomas/php/cat/boot_grub4dos_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/boot_grub4dos_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//____________________________________________________________
//
// Fichero de idiomas php: aulas_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/buscar_cat.php b/admin/WebConsole/idiomas/php/cat/buscar_cat.php
index 5f4d304a..8ef4e461 100644
--- a/admin/WebConsole/idiomas/php/cat/buscar_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/buscar_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________
//
// Fichero de idiomas php: buscar_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/clases/Almanaque_cat.php b/admin/WebConsole/idiomas/php/cat/clases/Almanaque_cat.php
index ec09a325..5d96a2b6 100644
--- a/admin/WebConsole/idiomas/php/cat/clases/Almanaque_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/clases/Almanaque_cat.php
@@ -1,4 +1,4 @@
- <?
+ <?php
/*============================================================================
Esta clase genera tablas HTML para selección de fechas (Versión inglesa)
@@ -72,14 +72,22 @@ class Almanaque{
$this->semanas[5]=array ("5ª",0x10);
$this->semanas[6]=array ("Última",0x20);
- $this->numero_annos[1]=array ("2010",0x01); // tamaño 1 bytes
- $this->numero_annos[2]=array ("2011",0x02);
- $this->numero_annos[3]=array ("2012",0x04);
- $this->numero_annos[4]=array ("2013",0x08);
- $this->numero_annos[5]=array ("2014",0x10);
- $this->numero_annos[6]=array ("2015",0x20);
- $this->numero_annos[7]=array ("2016",0x40);
- $this->numero_annos[8]=array ("2017",0x80);
+ $this->numero_annos[2010]=0x0001; // tamaño 2 bytes
+ $this->numero_annos[2011]=0x0002;
+ $this->numero_annos[2012]=0x0004;
+ $this->numero_annos[2013]=0x0008;
+ $this->numero_annos[2014]=0x0010;
+ $this->numero_annos[2015]=0x0020;
+ $this->numero_annos[2016]=0x0040;
+ $this->numero_annos[2017]=0x0080;
+ $this->numero_annos[2018]=0x0100;
+ $this->numero_annos[2019]=0x0200;
+ $this->numero_annos[2020]=0x0400;
+ $this->numero_annos[2021]=0x0800;
+ $this->numero_annos[2022]=0x1000;
+ $this->numero_annos[2023]=0x2000;
+ $this->numero_annos[2024]=0x4000;
+ $this->numero_annos[2025]=0x8000;
$this->numero_dias[1]=0x00000001; // tamaño 4 bytes
$this->numero_dias[2]=0x00000002;
@@ -179,7 +187,7 @@ class Almanaque{
$HTML_calendario='<TABLE id="tabla_annos" class="'.$this->clase.'">'.chr(13);
$HTML_calendario.='<TR>'.chr(13);
$HTML_calendario.='<TH style="cursor:pointer" onclick="TH_'.$this->onclick.'">Años</TH></TR>'.chr(13); // Literal años
- for ($i=1;$i<9;$i++){
+ for ($i=$ano_desde; $i<=ano_hasta; $i++){
$HTML_calendario.='<TR><TD align="center" id="'.$this->numero_annos[$i][0].'"
value="'.$this->numero_annos[$i][1].'" style="cursor:pointer"
onmouseover="'.$this->onmouseover.'" onmouseout="'.$this->onmouseout.'"
diff --git a/admin/WebConsole/idiomas/php/cat/clases/Calendario_cat.php b/admin/WebConsole/idiomas/php/cat/clases/Calendario_cat.php
index 277b7d7a..345fd0ed 100644
--- a/admin/WebConsole/idiomas/php/cat/clases/Calendario_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/clases/Calendario_cat.php
@@ -1,4 +1,4 @@
- <?
+ <?php
/*========================================================================================================
Esta clase genera tablas HTML para selección de fechas (Versión inglesa)
diff --git a/admin/WebConsole/idiomas/php/cat/colasacciones_cat.php b/admin/WebConsole/idiomas/php/cat/colasacciones_cat.php
index 1a9f3c8e..1af27c3c 100644
--- a/admin/WebConsole/idiomas/php/cat/colasacciones_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/colasacciones_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: colasacciones_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/colasreservas_cat.php b/admin/WebConsole/idiomas/php/cat/colasreservas_cat.php
index c263d1f3..834b6ce1 100644
--- a/admin/WebConsole/idiomas/php/cat/colasreservas_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/colasreservas_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: colasreservas_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/apagar_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/apagar_cat.php
index 4d065807..b47ebe1f 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/apagar_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/apagar_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: apagar_cat.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/arrancar_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/arrancar_cat.php
index 60ae87fd..7423433d 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/arrancar_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/arrancar_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: arrancar_cat.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/comando_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/comando_cat.php
index 5e998208..3f9f49eb 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/comando_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/comando_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: comando_cat.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/configurar_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/configurar_cat.php
index 5bc5a793..ee1f434d 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/configurar_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/configurar_cat.php
@@ -44,4 +44,6 @@
$TbMsg[32]='Grandària de partició';
$TbMsg[33]='Nom de la Imatge ';
$TbMsg[34]='Perfil Software';
+
+ $TbMsg["HD"]='Disco';
?>
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/conmutar_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/conmutar_cat.php
index 5be32591..9c171e04 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/conmutar_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/conmutar_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: conmutar_cat.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/crearimagen_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/crearimagen_cat.php
index 983fb44e..db4e1f00 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/crearimagen_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/crearimagen_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: crearperfilsoftware_cat.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/crearimagenbasica_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/crearimagenbasica_cat.php
index 9ba1d89e..3e7cab90 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/crearimagenbasica_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/crearimagenbasica_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: crearimagenbasica_cat.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/crearperfilsoftware_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/crearperfilsoftware_cat.php
index 1c909508..55205ecf 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/crearperfilsoftware_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/crearperfilsoftware_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: crearperfilsoftware_cat.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/crearsoftincremental_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/crearsoftincremental_cat.php
index a38610cc..5322f7a3 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/crearsoftincremental_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/crearsoftincremental_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: crearsoftincremental_cat.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/ejecutarscripts_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/ejecutarscripts_cat.php
index 3467ef6b..d2c193ad 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/ejecutarscripts_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/ejecutarscripts_cat.php
@@ -17,6 +17,13 @@
$TbMsg[9]='Codi del script';
$TbMsg[10]='Dades a subministrar';
$TbMsg[11]='Eliminar Imatge de la Cache de Client';
+ $TbMsg[12]='&nbsp;Modo de ejecución*&nbsp;';
+ $TbMsg[13]='Sistema';
+ $TbMsg[14]='Usuario';
+ $TbMsg[15]="AVISO El modo de ejecución sólo se aplica a los agentes de sistema operativo nuevos: <br>\n
+ * El modo usuario sólo es válido si está iniciada la sesión en modo gráfico.<br>\n
+ * El lenguaje del script a enviar debe corresponder al estado de cliente.<br>\n
+ * Para Windows hay que escapar las contrabarras.";
$TbMsg["WDI10"]='Modificar código';
$TbMsg["WDI11"]='Asistent de Desplegament de la imatge';
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/eliminarimagencache_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/eliminarimagencache_cat.php
index 5280c31a..68e70272 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/eliminarimagencache_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/eliminarimagencache_cat.php
@@ -5,11 +5,11 @@
// Idioma: Catal�
//________________________________________________________________________________________________________
if (empty ($TbMsg)) $TbMsg=array();
- $TbMsg[0]='Creaci&oacute; d\'Imatge';
- $TbMsg[1]='Caracter&iacute;stiques de l\'ordinador';
- $TbMsg[2]='Nom';
- $TbMsg[3]='Direcci&oacute; IP';
- $TbMsg[4]='Direcci&oacute; MAC';
+ $TbMsg[0]='Unidad Organizativa';
+ $TbMsg[1]='Grupo de aulas';
+ $TbMsg[2]='Aula';
+ $TbMsg[3]='Grupo de ordenadores';
+ $TbMsg[4]='Ordenador';
$TbMsg[5]='Eliminar Imatge de la Cache en Client';
$TbMsg[6]='Dades a subministrar';
$TbMsg[7]='Im&aacute;tges Disponibles';
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/eliminarimagenrepo_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/eliminarimagenrepo_cat.php
index 4a179f64..a46d95cc 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/eliminarimagenrepo_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/eliminarimagenrepo_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: eliminarimagencache_esp.php (Comandos)
@@ -38,4 +38,5 @@
$TbMsg[30]='Unitat Organitzativa';
$TbMsg[31]='Arxiu';
$TbMsg[32]='Directori';
-?> \ No newline at end of file
+ $TbMsg[33]='AVISO: La imagen está situada en un directorio que no corresponde a la unidad organizativa.';
+?>
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/enviarmensaje_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/enviarmensaje_cat.php
new file mode 100644
index 00000000..b6f3d68d
--- /dev/null
+++ b/admin/WebConsole/idiomas/php/cat/comandos/enviarmensaje_cat.php
@@ -0,0 +1,23 @@
+<?php
+//________________________________________________________________________________________________________
+//
+// Fichero de idiomas php: ejecutarscripts_cat.php (Comandos)
+// Idioma: Català
+//________________________________________________________________________________________________________
+ if (empty ($TbMsg)) $TbMsg=array();
+ $TbMsg[0]='Centres';
+ $TbMsg[1]='Grupo d\'aules';
+ $TbMsg[2]='Aules';
+ $TbMsg[3]='Grup d\'ordinadors';
+ $TbMsg[4]='Ordinadors';
+ $TbMsg[5]='Enviar Mensaje';
+ $TbMsg[6]='Àmbit';
+ $TbMsg[7]='Títol';
+ $TbMsg[8]='Descripció';
+ $TbMsg[9]=' Texto del mensaje ';
+ $TbMsg[10]='Dades a subministrar';
+
+ $TbMsg["OGAGENT"]="AVISO: Sólo se puede utilizar en los equipos que se haya iniciado la sesión <br>y tengan instalado en nuevo agente de OpenGnsys.";
+ $TbMsg["OPTION"]="AVISO: El nuevo agente, en esta versión, no permite utilizar la cola de acciones.";
+?>
+
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/gestor_ejecutarscripts_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/gestor_ejecutarscripts_cat.php
index 2c1873aa..372a2d47 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/gestor_ejecutarscripts_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/gestor_ejecutarscripts_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: gestor_ejecutarscripts_cat.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/mensajes_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/mensajes_cat.php
index bdd675cb..408728dc 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/mensajes_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/mensajes_cat.php
@@ -11,6 +11,7 @@ $TbMsg["COMMAND_Configurar"]="Configurar";
$TbMsg["COMMAND_CrearImagen"]="Crear Imatge";
$TbMsg["COMMAND_EjecutarScript"]="Executar Script";
$TbMsg["COMMAND_EliminarImagenCache"]="Eliminar Imatge Cache";
+$TbMsg["COMMAND_EnviarMensaje"]="Enviar Mensaje";
$TbMsg["COMMAND_IniciarSesion"]="Iniciar Sesi&oacute;";
$TbMsg["COMMAND_InventarioHardware"]="Inventari Hardware";
$TbMsg["COMMAND_InventarioSoftware"]="Inventari Software";
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/opcionesacciones_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/opcionesacciones_cat.php
index cd1e14c3..3a268d86 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/opcionesacciones_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/opcionesacciones_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: opcionesacciones_cat.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/particionaryformatear_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/particionaryformatear_cat.php
index 43c82dd5..10efdeb5 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/particionaryformatear_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/particionaryformatear_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: particionaryformatear_cat.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/reiniciar_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/reiniciar_cat.php
index 62bf6ae2..b968c455 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/reiniciar_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/reiniciar_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: reiniciar_cat.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/rembooffline_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/rembooffline_cat.php
index cd171c54..6bc79236 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/rembooffline_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/rembooffline_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: rembooffline_cat.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/restaurarimagen_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/restaurarimagen_cat.php
index 04178922..7be92108 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/restaurarimagen_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/restaurarimagen_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: restaurarimagen_cat.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/restaurarimagenbasica_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/restaurarimagenbasica_cat.php
index 66d2d731..d5aa2825 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/restaurarimagenbasica_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/restaurarimagenbasica_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: restaurarimagenbasica_cat.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/restaurarsoftincremental_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/restaurarsoftincremental_cat.php
index e0524484..6712c25c 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/restaurarsoftincremental_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/restaurarsoftincremental_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: restaurarsoftincremental_cat.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/cat/comandos/tomaconfiguracion_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/tomaconfiguracion_cat.php
index d367db0c..31be40d2 100644
--- a/admin/WebConsole/idiomas/php/cat/comandos/tomaconfiguracion_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/comandos/tomaconfiguracion_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: tomaconfiguracion_cat.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/cat/configuraciones_cat.php b/admin/WebConsole/idiomas/php/cat/configuraciones_cat.php
index 753a256b..e93b584f 100644
--- a/admin/WebConsole/idiomas/php/cat/configuraciones_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/configuraciones_cat.php
@@ -15,7 +15,7 @@ $TbMsg[5]="Nom";
$TbMsg[6]="Ubicació";
$TbMsg[7]="Canó";
$TbMsg[8]="Pissarra";
-$TbMsg[9]="Llocs";
+$TbMsg[9]="Aforament";
$TbMsg[10]="URL Imatge";
$TbMsg[11]="Menú";
$TbMsg[12]="Comentaris";
diff --git a/admin/WebConsole/idiomas/php/cat/conmutar_cat.php b/admin/WebConsole/idiomas/php/cat/conmutar_cat.php
index e4f52b23..146576ec 100644
--- a/admin/WebConsole/idiomas/php/cat/conmutar_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/conmutar_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: conmutar_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/consolaremota_cat.php b/admin/WebConsole/idiomas/php/cat/consolaremota_cat.php
index 75ae4920..8b652bd1 100644
--- a/admin/WebConsole/idiomas/php/cat/consolaremota_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/consolaremota_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: incorporaordenadores_cat.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/cat/descargas_cat.php b/admin/WebConsole/idiomas/php/cat/descargas_cat.php
new file mode 100644
index 00000000..08152fa6
--- /dev/null
+++ b/admin/WebConsole/idiomas/php/cat/descargas_cat.php
@@ -0,0 +1,13 @@
+<?php
+// Avís: no hi ha cap deixar caràcter fora del codi PHP.
+//______________________________________________________________
+//
+// Fitxer d'idiomes php: descargas_cat.php
+// Idioma: Català
+//______________________________________________________________
+if (empty ($TbMsg)) $TbMsg=array();
+$TbMsg['DOWNLOADS']="Descàrregues disponibles";
+$TbMsg['NOFILES']="No hi ha fitxers disponibles";
+
+// Avís: no hi ha cap deixar caràcter fora del codi PHP.
+?>
diff --git a/admin/WebConsole/idiomas/php/cat/ecoremoto_cat.php b/admin/WebConsole/idiomas/php/cat/ecoremoto_cat.php
index f14c1f7d..bf04e179 100644
--- a/admin/WebConsole/idiomas/php/cat/ecoremoto_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/ecoremoto_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: incorporaordenadores_cat.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/cat/ejecutaracciones_cat.php b/admin/WebConsole/idiomas/php/cat/ejecutaracciones_cat.php
index c7b0ec99..077ba621 100644
--- a/admin/WebConsole/idiomas/php/cat/ejecutaracciones_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/ejecutaracciones_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: acciones_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/estados_cat.php b/admin/WebConsole/idiomas/php/cat/estados_cat.php
index 277e38bb..77b35205 100644
--- a/admin/WebConsole/idiomas/php/cat/estados_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/estados_cat.php
@@ -9,8 +9,13 @@ if (empty ($TbMsg)) $TbMsg=array();
$TbMsg["STATUS_BSY"]="Ocupat";
$TbMsg["STATUS_INI"]="Iniciant";
$TbMsg["STATUS_OFF"]="Apagat";
-$TbMsg["STATUS_OPG"]="OpenGnSys";
+$TbMsg["STATUS_OPG"]="OpenGnsys";
$TbMsg["STATUS_LNX"]="GNU/Linux";
$TbMsg["STATUS_WXP"]="Windows";
+// Estats nou agent OGAgent.
+$TbMsg["STATUS_LNXS"]="Sessi&oacute; GNU/Linux";
+$TbMsg["STATUS_OSX"]="macOS";
+$TbMsg["STATUS_WIN"]="Windows";
+$TbMsg["STATUS_WINS"]="Sessi&oacute; Windows";
?>
diff --git a/admin/WebConsole/idiomas/php/cat/gestor_ordenadores_cat.php b/admin/WebConsole/idiomas/php/cat/gestor_ordenadores_cat.php
new file mode 100644
index 00000000..3eebd1a9
--- /dev/null
+++ b/admin/WebConsole/idiomas/php/cat/gestor_ordenadores_cat.php
@@ -0,0 +1,10 @@
+<?php
+//______________________________________________________________
+//
+// Fichero de idiomas php: gestor_ordenadores_cat.php
+// Idioma: Catalán
+//______________________________________________________________
+$TbMsg=array();
+$TbMsg["DUPLICADO"]="Error al insertar el ordenador, se han encontrado datos duplicados: ";
+?>
+
diff --git a/admin/WebConsole/idiomas/php/cat/hardwares_cat.php b/admin/WebConsole/idiomas/php/cat/hardwares_cat.php
index 34c7dec6..d52d7a82 100644
--- a/admin/WebConsole/idiomas/php/cat/hardwares_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/hardwares_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: hardwares_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/iconos_cat.php b/admin/WebConsole/idiomas/php/cat/iconos_cat.php
index 8022be71..20bdbb42 100644
--- a/admin/WebConsole/idiomas/php/cat/iconos_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/iconos_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: m_iconos_cat.php (
diff --git a/admin/WebConsole/idiomas/php/cat/imagenes_cat.php b/admin/WebConsole/idiomas/php/cat/imagenes_cat.php
index 38998a80..0cbc73d1 100644
--- a/admin/WebConsole/idiomas/php/cat/imagenes_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/imagenes_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxcher d'idiomes php: imagenes_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/imagenincremental_cat.php b/admin/WebConsole/idiomas/php/cat/imagenincremental_cat.php
index 265b51cd..70eb19da 100644
--- a/admin/WebConsole/idiomas/php/cat/imagenincremental_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/imagenincremental_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: imagenincremental_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/inclusionacciones_cat.php b/admin/WebConsole/idiomas/php/cat/inclusionacciones_cat.php
index 7a35c49e..47def840 100644
--- a/admin/WebConsole/idiomas/php/cat/inclusionacciones_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/inclusionacciones_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: inclusionacciones_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/incrementalcomponente_soft_cat.php b/admin/WebConsole/idiomas/php/cat/incrementalcomponente_soft_cat.php
index 2c5f6425..16a48e39 100644
--- a/admin/WebConsole/idiomas/php/cat/incrementalcomponente_soft_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/incrementalcomponente_soft_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: incrementalcomponente_soft_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/informacion_acciones_cat.php b/admin/WebConsole/idiomas/php/cat/informacion_acciones_cat.php
index 1c06bf30..5da6e260 100644
--- a/admin/WebConsole/idiomas/php/cat/informacion_acciones_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/informacion_acciones_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: informacion_perfileshard_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/informacion_imagenes_cat.php b/admin/WebConsole/idiomas/php/cat/informacion_imagenes_cat.php
index 807677f3..d417d4a4 100644
--- a/admin/WebConsole/idiomas/php/cat/informacion_imagenes_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/informacion_imagenes_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: informacion_imagenes_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/informacion_incrementales_cat.php b/admin/WebConsole/idiomas/php/cat/informacion_incrementales_cat.php
index 88fc0c19..a6cdb3ba 100644
--- a/admin/WebConsole/idiomas/php/cat/informacion_incrementales_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/informacion_incrementales_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: informacion_incrementales_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/informacion_menus_cat.php b/admin/WebConsole/idiomas/php/cat/informacion_menus_cat.php
index 4f712490..f1fba417 100644
--- a/admin/WebConsole/idiomas/php/cat/informacion_menus_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/informacion_menus_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: informacion_menus_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/informacion_perfileshard_cat.php b/admin/WebConsole/idiomas/php/cat/informacion_perfileshard_cat.php
index 1ad03dd8..ee5c44a3 100644
--- a/admin/WebConsole/idiomas/php/cat/informacion_perfileshard_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/informacion_perfileshard_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: informacion_perfileshard_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/informacion_perfilessoft_cat.php b/admin/WebConsole/idiomas/php/cat/informacion_perfilessoft_cat.php
index 191dd854..3cb41f19 100644
--- a/admin/WebConsole/idiomas/php/cat/informacion_perfilessoft_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/informacion_perfilessoft_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: informacion_perfilessoft_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/informacion_procedimientos_cat.php b/admin/WebConsole/idiomas/php/cat/informacion_procedimientos_cat.php
index 9f121708..50e2d796 100644
--- a/admin/WebConsole/idiomas/php/cat/informacion_procedimientos_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/informacion_procedimientos_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: informacion_procedimientos_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/informacion_tareas_cat.php b/admin/WebConsole/idiomas/php/cat/informacion_tareas_cat.php
index 0e2e624c..e58418e6 100644
--- a/admin/WebConsole/idiomas/php/cat/informacion_tareas_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/informacion_tareas_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: informacion_tareas_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/menucliente_cat.php b/admin/WebConsole/idiomas/php/cat/menucliente_cat.php
index df9cd061..cc324849 100644
--- a/admin/WebConsole/idiomas/php/cat/menucliente_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/menucliente_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: menuscliente_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/menus_cat.php b/admin/WebConsole/idiomas/php/cat/menus_cat.php
index b3451d76..96d745e9 100644
--- a/admin/WebConsole/idiomas/php/cat/menus_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/menus_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: menus_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/msgbrowser_cat.php b/admin/WebConsole/idiomas/php/cat/msgbrowser_cat.php
index a274ac67..48f42677 100644
--- a/admin/WebConsole/idiomas/php/cat/msgbrowser_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/msgbrowser_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: msgbrowser.php
diff --git a/admin/WebConsole/idiomas/php/cat/nada_cat.php b/admin/WebConsole/idiomas/php/cat/nada_cat.php
index 4ddb3e8c..85d9a1ff 100644
--- a/admin/WebConsole/idiomas/php/cat/nada_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/nada_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: nada_esp.php
diff --git a/admin/WebConsole/idiomas/php/cat/perfilcomponente_hard_cat.php b/admin/WebConsole/idiomas/php/cat/perfilcomponente_hard_cat.php
index daad4410..a3aacff9 100644
--- a/admin/WebConsole/idiomas/php/cat/perfilcomponente_hard_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/perfilcomponente_hard_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: perfilcomponente_hard_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/perfilcomponente_soft_cat.php b/admin/WebConsole/idiomas/php/cat/perfilcomponente_soft_cat.php
index 928608c8..7be75b8f 100644
--- a/admin/WebConsole/idiomas/php/cat/perfilcomponente_soft_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/perfilcomponente_soft_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: perfilcomponente_soft_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/pintaParticiones_cat.php b/admin/WebConsole/idiomas/php/cat/pintaParticiones_cat.php
index 8bb3a033..c2cf710c 100644
--- a/admin/WebConsole/idiomas/php/cat/pintaParticiones_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/pintaParticiones_cat.php
@@ -10,16 +10,23 @@ if(!isset($TbMsg)){
}
$TbMsg["PARTITION"]='Partici&oacute;n';
+$TbMsg["INSTALLED_OS"]='Sistema Operativo Instalado';
$TbMsg["INST_SO"]='S.O. Instalado';
$TbMsg["SIZE_KB"]='Tama&ntilde;o (KB)';
$TbMsg["PARTITION_TYPE"]='Tipo';
$TbMsg["IMAGE"]='Imagen';
$TbMsg["SOFT_PROFILE"]='Perfil Software';
+$TbMsg["FILESYSTEM"]='Sistema de Ficheros';
$TbMsg["FILESYSTEM_SHORT"]='S.F.';
+$TbMsg["REFORMAT"]='Reformatear';
+$TbMsg["REMOVE"]='Eliminar';
+
$TbMsg["DISK"]='Disco';
$TbMsg["CONFIG_PARTTABLE"]='Tabla de particiones';
+$TbMsg["USAGE"]='Uso';
+
$TbMsg["VARIABLE"]='Variable';
$TbMsg["CACHE_CONTENT"]='Data/Caché';
$TbMsg["CACHE_FREESPACE"]='Cach&eacute; libre';
@@ -47,7 +54,9 @@ $TbMsg["TITLE_W"]='Opción de rsync: El algoritmo incremental rsync no se usa y
$TbMsg["TITLE_E"]='Opción de rsync: Se compara el destino con el origen y se borran los ficheros que no existen en el primero.';
$TbMsg["TITLE_C"]='Opción de rsync: Comprime los archivos de datos que se envían a la máquina de destino, lo que reduce la cantidad de datos que se transmiten. ';
$TbMsg["SEND"]='Protocolo';
-
+// AVISOS.
$TbMsg["WARN_PROTOCOL"]='La opción "protocolo" sólo se utiliza en las sincronizadas tipo archivo la primera vez que se envía la imagen a caché. <br>En otro caso el protocolo es RSYNC.';
+$TbMsg["WARN_DIFFIMAGE"]='Hay una nueva versi&oacute; de la imagen (se muestra la diferencia de revisiones).';
+$TbMsg["WARN_DIFFDISKSIZE"]='ATENCI&Oacute;N: no se pueden particionar grupos de ordenadores con distinto tama&ntilde;o de disco.<br>Marcar la opción de &quot;Desagrupar por tama&ntilde;o de partici&oacute;n&quot; y pulsar &quot;Aceptar&quot; en el men&uacute; superior para aplicar esta operaci&oacute;n adecuadamente.';
?>
diff --git a/admin/WebConsole/idiomas/php/cat/procedimientoscomandos_cat.php b/admin/WebConsole/idiomas/php/cat/procedimientoscomandos_cat.php
index 5adf0672..fff32291 100644
--- a/admin/WebConsole/idiomas/php/cat/procedimientoscomandos_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/procedimientoscomandos_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: procedimientoscomandos_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/programaciones_cat.php b/admin/WebConsole/idiomas/php/cat/programaciones_cat.php
index e4e6548e..bf61fc4b 100644
--- a/admin/WebConsole/idiomas/php/cat/programaciones_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/programaciones_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: programaciones_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/programacionesaulas_cat.php b/admin/WebConsole/idiomas/php/cat/programacionesaulas_cat.php
index d23a2308..12db16c5 100644
--- a/admin/WebConsole/idiomas/php/cat/programacionesaulas_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/programacionesaulas_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: colasreservas_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/programacionesreservas_cat.php b/admin/WebConsole/idiomas/php/cat/programacionesreservas_cat.php
index 7e213a2b..4c9c4e1c 100644
--- a/admin/WebConsole/idiomas/php/cat/programacionesreservas_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/programacionesreservas_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: colasreservas_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/propiedades_aulas_cat.php b/admin/WebConsole/idiomas/php/cat/propiedades_aulas_cat.php
index 8f19422c..50a3fa6f 100644
--- a/admin/WebConsole/idiomas/php/cat/propiedades_aulas_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/propiedades_aulas_cat.php
@@ -14,8 +14,8 @@ $TbMsg[5]="Nom";
$TbMsg[6]="Ubicació";
$TbMsg[7]="Canó";
$TbMsg[8]="Pissarra";
-$TbMsg[9]="Llocs";
-$TbMsg[10]="Url Imatge";
+$TbMsg[9]="Aforament";
+$TbMsg[10]="Foto";
$TbMsg[11]="Menú";
$TbMsg[12]="Comentaris";
$TbMsg[13]="Intervals";
@@ -23,7 +23,8 @@ $TbMsg[14]="Hora des de:";
$TbMsg[15]="Hora fins:";
$TbMsg[16]="Repositori";
$TbMsg[17]="Perfil Hardware";
-$TbMsg[18]="Propietats per tots els ordinadors";
+$TbMsg[18]="Assignar propietats a l'objecte Aula";
+$TbMsg[1888]="Modificador massiu de propietats d'ordinadors";
$TbMsg[19]="Grandària caché (KB)";
$TbMsg[20]="Autoexec";
$TbMsg[21]="Ordinadors";
@@ -40,11 +41,20 @@ $TbMsg[30]="Validació";
$TbMsg[31]="Pàgina login";
$TbMsg[32]="Pàgina validació";
// UHU
+// AGP
+$TbMsg[33]="ogLive";
+$TbMsg[34]="*** Existeixen Equips amb diferents ogLive ***";
$TbMsg[495]="Data/Caché";
$TbMsg[509]="Foto ordinador";
$TbMsg[5091]="Afegir foto";
$TbMsg[5092]="Veure fotos";
+// AGP
// Ramón
+$TbMsg['PROP_NTPIP']="IP Servidor NTP <em>(opcional)</em>";
$TbMsg['PROP_DNSIP']="IP Servidor DNS <em>(opcional)</em>";
$TbMsg['PROP_PROXYURL']="URL Servidor Proxy <em>(opcional)</em>";
+$TbMsg['COMM_DEFTIMEZONE']="zona horaria por defecto";
+$TbMsg['PROP_REMOTEACCESS']="Acceso remoto";
+$TbMsg['COMM_REMOTEACCESS']="permitir gesti&oacute;n de acceso remoto a los ordenadores";
+$TbMsg['COMM_DEFOGLIVE']="Assignat per l'administrador";
?>
diff --git a/admin/WebConsole/idiomas/php/cat/propiedades_centros_cat.php b/admin/WebConsole/idiomas/php/cat/propiedades_centros_cat.php
index f081ecd6..26d81b96 100644
--- a/admin/WebConsole/idiomas/php/cat/propiedades_centros_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/propiedades_centros_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: propiedades_ordenadores_cat.php
@@ -12,5 +12,7 @@ $TbMsg[3]="Eliminar";
$TbMsg[4]="Gesti d'Unitats Organitzatives";
$TbMsg[5]="Nom de la unitat";
$TbMsg[6]="Comentaris";
+$TbMsg['DIR']="Directorio";
+$TbMsg['MSG_OGUNIT']="Si se elige separar por unidades organizativas, el directorio <b>/opt/opengnsys/images</b><br> debe contener un subdirectorio llamado como el directorio indicado.";
?>
- \ No newline at end of file
+
diff --git a/admin/WebConsole/idiomas/php/cat/propiedades_componentehardwares_cat.php b/admin/WebConsole/idiomas/php/cat/propiedades_componentehardwares_cat.php
index e361b8f1..d32b2e4c 100644
--- a/admin/WebConsole/idiomas/php/cat/propiedades_componentehardwares_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/propiedades_componentehardwares_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: propiedades_componentehardwares_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/propiedades_componentesoftwares_cat.php b/admin/WebConsole/idiomas/php/cat/propiedades_componentesoftwares_cat.php
index 307fd20b..fcbe82e2 100644
--- a/admin/WebConsole/idiomas/php/cat/propiedades_componentesoftwares_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/propiedades_componentesoftwares_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: propiedades_componentesoftwares_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/propiedades_entidades_cat.php b/admin/WebConsole/idiomas/php/cat/propiedades_entidades_cat.php
index 30df52f9..7798aea0 100644
--- a/admin/WebConsole/idiomas/php/cat/propiedades_entidades_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/propiedades_entidades_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: propiedades_ordenadores_cat.php
@@ -12,5 +12,6 @@ $TbMsg[3]="Eliminar";
$TbMsg[4]="Gesti Entitats";
$TbMsg[5]="Nom de l'Entitat";
$TbMsg[6]="Comentaris";
+$TbMsg['OGUNIT']="Separar unidades organizativas";
?>
- \ No newline at end of file
+
diff --git a/admin/WebConsole/idiomas/php/cat/propiedades_entornos_cat.php b/admin/WebConsole/idiomas/php/cat/propiedades_entornos_cat.php
index 96ac190b..42ae5d85 100644
--- a/admin/WebConsole/idiomas/php/cat/propiedades_entornos_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/propiedades_entornos_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_aulas_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/propiedades_grupos_cat.php b/admin/WebConsole/idiomas/php/cat/propiedades_grupos_cat.php
index 2664717a..b2d56d0e 100644
--- a/admin/WebConsole/idiomas/php/cat/propiedades_grupos_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/propiedades_grupos_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: propiedades_tareas_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/propiedades_imagenes_cat.php b/admin/WebConsole/idiomas/php/cat/propiedades_imagenes_cat.php
index f3d40f7e..423eee50 100644
--- a/admin/WebConsole/idiomas/php/cat/propiedades_imagenes_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/propiedades_imagenes_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: propiedades_imagenes_cat.php
@@ -25,4 +25,11 @@ $TbMsg[15]="ATENCI�N.- Una imagen que tiene perfil software indica que en alg
$TbMsg[16]="Ruta Origen";
$TbMsg[17]='"Nombre can�nico fichero-imagen existe : Introduzca otro nombre"';
$TbMsg[18]="Introduzca otro Nombre";
+$TbMsg[19]="Equipo modelo";
+$TbMsg[20]="Fecha de creación";
+$TbMsg[21]='"Descripción Nombre fichero-imagen existe : Introduzca otra Descripción"';
+$TbMsg[22]="Introduzca otra Descripción";
+$TbMsg['PROP_OS']="Sistema operativo";
+$TbMsg['PROP_REMOTEACCESS']="Acceso remoto";
+$TbMsg['COMM_REMOTEACCESS']="permitir gesti&oacute;n de acceso remoto a los ordenadores";
?>
diff --git a/admin/WebConsole/idiomas/php/cat/propiedades_menus_cat.php b/admin/WebConsole/idiomas/php/cat/propiedades_menus_cat.php
index c3c72b9d..a6fbbb73 100644
--- a/admin/WebConsole/idiomas/php/cat/propiedades_menus_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/propiedades_menus_cat.php
@@ -22,4 +22,5 @@ $TbMsg[14]="Men doble";
$TbMsg[15]="URL men personalizado";
$TbMsg[17]="Resoluci de pantalla";
$TbMsg[18]="Imagen de fondo";
+$TbMsg["PROP_DEFAULT"]="Detectada por defecto";
?>
diff --git a/admin/WebConsole/idiomas/php/cat/propiedades_ordenadores_cat.php b/admin/WebConsole/idiomas/php/cat/propiedades_ordenadores_cat.php
index 4baf492e..2cd27321 100644
--- a/admin/WebConsole/idiomas/php/cat/propiedades_ordenadores_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/propiedades_ordenadores_cat.php
@@ -2,28 +2,34 @@
//____________________________________________________________
//
// Fitxer d'idiomes php: propiedades_ordenadores_cat.php
-// Idioma: Catal
+// Idioma: Catal�
//____________________________________________________________
-$TbMsg=array();
-$TbMsg[0]="Sense Opci";
+if (empty ($TbMsg)) $TbMsg=array();
+$TbMsg[0]="Sense Opci�";
$TbMsg[1]="Afegir";
$TbMsg[2]="Modificar";
$TbMsg[3]="Eliminar";
-$TbMsg[4]="Gesti Ordinadors";
+$TbMsg[4]="Gesti� Ordinadors";
$TbMsg[5]="Nom";
-$TbMsg[6]="Direcci IP";
-$TbMsg[7]="Direcci MAC";
+$TbMsg[6]="Direcci� IP";
+$TbMsg[7]="Direcci� MAC";
$TbMsg[8]="Perfil Hardware";
$TbMsg[9]="Autoexec";
$TbMsg[10]="Repositori";
-$TbMsg[11]="Men";
-$TbMsg[12]="Grandria Cach";
+$TbMsg[11]="Men�";
+$TbMsg[12]="Grand�ria Cach�";
$TbMsg[13]="Interficie de Xarxa";
$TbMsg[14]="Driver de Xarxa";
+// AGP
+$TbMsg[18]="ogLive";
$TbMsg[509]="Foto ordinador";
$TbMsg[5091]="Afegir foto";
$TbMsg[5092]="Veure fotos";
-$TbMsg[495]="Data/Cach";
-$TbMsg[4951]="Cach lliure";
+$TbMsg[495]="Data/Cach�";
+$TbMsg[4951]="Cach� lliure";
+// AGP
+$TbMsg["PROP_SERIALNO"]="N&ordm; de serie";
+$TbMsg["WARN_NOTDETECTED"]="<em>(no detectado)</em>";
+$TbMsg['COMM_DEFOGLIVE']="Assignat per l'administrador";
?>
diff --git a/admin/WebConsole/idiomas/php/cat/propiedades_ordenadorestandar_cat.php b/admin/WebConsole/idiomas/php/cat/propiedades_ordenadorestandar_cat.php
index 485b3a62..0883949f 100644
--- a/admin/WebConsole/idiomas/php/cat/propiedades_ordenadorestandar_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/propiedades_ordenadorestandar_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: propiedades_ordenadorestandar_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/propiedades_perfilsoftwares_cat.php b/admin/WebConsole/idiomas/php/cat/propiedades_perfilsoftwares_cat.php
index ab2e3ccc..da08d1ef 100644
--- a/admin/WebConsole/idiomas/php/cat/propiedades_perfilsoftwares_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/propiedades_perfilsoftwares_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: propiedades_perfilsoftwares_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/propiedades_procedimientos_cat.php b/admin/WebConsole/idiomas/php/cat/propiedades_procedimientos_cat.php
index d426ef82..eecd646b 100644
--- a/admin/WebConsole/idiomas/php/cat/propiedades_procedimientos_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/propiedades_procedimientos_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: propiedades_procedimientos_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/propiedades_repositorios_cat.php b/admin/WebConsole/idiomas/php/cat/propiedades_repositorios_cat.php
index ccaaadcb..9d76b2be 100644
--- a/admin/WebConsole/idiomas/php/cat/propiedades_repositorios_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/propiedades_repositorios_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_servidoresrembo_cat.php
@@ -20,6 +20,13 @@ $TbMsg[11]="Espai TOTAL";
$TbMsg[12]="Espai Ocupat";
$TbMsg[13]="Espai Lliure";
$TbMsg[14]="% Ocupat";
-$TbMsg[15]='Limitacions d\'aquesta versió';
-$TbMsg[16]='Informació d\'espai és permès si Repositori i Servidor Web allotjats al mateix servidor';
+$TbMsg[15]='Sin acceso a informaci&oacute;n del repositorio';
+$TbMsg[16]='Revise la conexión con el repositorio<br>Revise la clave de acceso (campo Api Token debe coincidir con su valor en fichero "ogAdmRepo.cfg")';
+$TbMsg[17]='Api Token';
+$TbMsg['MSG_CONTENT']='Contenido';
+$TbMsg['MSG_IMAGE']='Imatge';
+$TbMsg['MSG_TYPE']='Tipo';
+$TbMsg['MSG_SIZE']='Tama&ntilde;o';
+$TbMsg['MSG_MODIFIED']='Modificado';
+$TbMsg['MSG_PERMISSIONS']='Permisos';
?>
diff --git a/admin/WebConsole/idiomas/php/cat/propiedades_reservas_cat.php b/admin/WebConsole/idiomas/php/cat/propiedades_reservas_cat.php
index bc739ee6..346d0b6c 100644
--- a/admin/WebConsole/idiomas/php/cat/propiedades_reservas_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/propiedades_reservas_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: propiedades_reservas_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/propiedades_tareas_cat.php b/admin/WebConsole/idiomas/php/cat/propiedades_tareas_cat.php
index 46e743a0..b13e024c 100644
--- a/admin/WebConsole/idiomas/php/cat/propiedades_tareas_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/propiedades_tareas_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: propiedades_tareas_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/propiedades_tipohardwares_cat.php b/admin/WebConsole/idiomas/php/cat/propiedades_tipohardwares_cat.php
index 33d4bdce..3323ca52 100644
--- a/admin/WebConsole/idiomas/php/cat/propiedades_tipohardwares_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/propiedades_tipohardwares_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: propiedades_tipohardwares_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/propiedades_universidades_cat.php b/admin/WebConsole/idiomas/php/cat/propiedades_universidades_cat.php
index 78b6e488..f1a18013 100644
--- a/admin/WebConsole/idiomas/php/cat/propiedades_universidades_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/propiedades_universidades_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: propiedades_aulas_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/propiedades_usuarios_cat.php b/admin/WebConsole/idiomas/php/cat/propiedades_usuarios_cat.php
index 440cbba9..16df7a25 100644
--- a/admin/WebConsole/idiomas/php/cat/propiedades_usuarios_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/propiedades_usuarios_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: propiedades_ordenadores_cat.php
@@ -11,7 +11,7 @@ $TbMsg[2]="Modificar";
$TbMsg[3]="Eliminar";
$TbMsg[4]="Gesti Usuaris";
$TbMsg[5]="Usuari";
-$TbMsg[6]="Password";
+$TbMsg[6]="Password*";
$TbMsg[7]="Nom complet";
$TbMsg[8]="E-mail";
$TbMsg[9]="Unitat organitzativa";
@@ -21,7 +21,9 @@ $TbMsg[12]="Administrador";
$TbMsg[13]="Operador";
$TbMsg[14]="Per realitzar canvis en aquest usuari<br>";
$TbMsg[15]="creat en el procs d'installaci,<br><br>";
-$TbMsg[16]="
-premi aqu<br>";
-$TbMsg[17]="http://opengnsys.es/wiki/ModificarUsuarios";
-?> \ No newline at end of file
+$TbMsg[16]="premi aqu<br>";
+$TbMsg[17]="https://opengnsys.es/trac/wiki/ModificarUsuarios";
+$TbMsg[18]="Confirmar password";
+$TbMsg['APIKEY']="API key";
+$TbMsg['NEWAPIKEY']="La API key se generar automticamente al insertar el usuario.";
+?>
diff --git a/admin/WebConsole/idiomas/php/cat/purgar_cat.php b/admin/WebConsole/idiomas/php/cat/purgar_cat.php
index 4b87974d..792d8700 100644
--- a/admin/WebConsole/idiomas/php/cat/purgar_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/purgar_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: actualizar_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/repositorios_cat.php b/admin/WebConsole/idiomas/php/cat/repositorios_cat.php
index dca73063..30677a5b 100644
--- a/admin/WebConsole/idiomas/php/cat/repositorios_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/repositorios_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: repositorios_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/reservas_cat.php b/admin/WebConsole/idiomas/php/cat/reservas_cat.php
index b3272f9e..f861ef05 100644
--- a/admin/WebConsole/idiomas/php/cat/reservas_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/reservas_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: reservas_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/softwares_cat.php b/admin/WebConsole/idiomas/php/cat/softwares_cat.php
index 6dc99649..cc41e8be 100644
--- a/admin/WebConsole/idiomas/php/cat/softwares_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/softwares_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: softwares_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/sondeo_cat.php b/admin/WebConsole/idiomas/php/cat/sondeo_cat.php
index 2fa2aacd..5fb6c4e0 100644
--- a/admin/WebConsole/idiomas/php/cat/sondeo_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/sondeo_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: sondeo_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/tareascomandos_cat.php b/admin/WebConsole/idiomas/php/cat/tareascomandos_cat.php
index 2a108b60..484233b5 100644
--- a/admin/WebConsole/idiomas/php/cat/tareascomandos_cat.php
+++ b/admin/WebConsole/idiomas/php/cat/tareascomandos_cat.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fitxer d'idiomes php: tareascomandos_cat.php
diff --git a/admin/WebConsole/idiomas/php/cat/tiposhardwares_cat.php b/admin/WebConsole/idiomas/php/cat/tiposhardwares_cat.php
new file mode 100644
index 00000000..06474d90
--- /dev/null
+++ b/admin/WebConsole/idiomas/php/cat/tiposhardwares_cat.php
@@ -0,0 +1,27 @@
+<?php
+//________________________________________________________
+//
+// Fichero de idiomas php: tiposhardwares_esp.php
+// Idioma: Català
+//________________________________________________________
+if (empty ($TbMsg)) $TbMsg=Array();
+$TbMsg["HARDWARE_aud"]="Dispositivos de sonido";
+$TbMsg["HARDWARE_bio"]="Modelo y versi&oacute;n de la BIOS";
+$TbMsg["HARDWARE_boa"]="Placas";
+$TbMsg["HARDWARE_boo"]="Tipo de proceso de arranque";
+$TbMsg["HARDWARE_bus"]="Bus del sistema";
+$TbMsg["HARDWARE_cdr"]="Dispositivos &oacute;pticos CD/DVD";
+$TbMsg["HARDWARE_cha"]="Chasis del sistema";
+$TbMsg["HARDWARE_cpu"]="Procesadores";
+$TbMsg["HARDWARE_dis"]="Discos";
+$TbMsg["HARDWARE_fir"]="Controladores FireWire";
+$TbMsg["HARDWARE_ide"]="Controladores IDE";
+$TbMsg["HARDWARE_mem"]="Memorias";
+$TbMsg["HARDWARE_mod"]="Marca y modelo del equipo";
+$TbMsg["HARDWARE_mul"]="Dispositivos Multimedia";
+$TbMsg["HARDWARE_net"]="Tarjetas de red";
+$TbMsg["HARDWARE_sto"]="Controladores de almacenamiento";
+$TbMsg["HARDWARE_usb"]="Controladores USB";
+$TbMsg["HARDWARE_vga"]="Tarjetas gr&aacute;ficas";
+?>
+
diff --git a/admin/WebConsole/idiomas/php/eng/acceso_eng.php b/admin/WebConsole/idiomas/php/eng/acceso_eng.php
index 05ccb65f..aab35ee9 100644
--- a/admin/WebConsole/idiomas/php/eng/acceso_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/acceso_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
// __________________________________________________
//
// Fichero de idiomas php: acceso_esp.php
@@ -15,7 +15,7 @@ $TbErr[4]="Attention: You do not have access to this application";
// Mensajes.
$TbMsg=array();
-$TbMsg["ACCESS_TITLE"]="OpenGnSys: Labs web administration";
+$TbMsg["ACCESS_TITLE"]="OpenGnsys: Labs web administration";
$TbMsg["ACCESS_HEADING"]="Computer Labs Management";
$TbMsg["ACCESS_SUBHEAD"]="Administrators Access";
$TbMsg["ACCESS_USERNAME"]="Username";
diff --git a/admin/WebConsole/idiomas/php/eng/acciones_eng.php b/admin/WebConsole/idiomas/php/eng/acciones_eng.php
index c2ea5689..fd78f17a 100644
--- a/admin/WebConsole/idiomas/php/eng/acciones_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/acciones_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: acciones_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/accionmenu_eng.php b/admin/WebConsole/idiomas/php/eng/accionmenu_eng.php
index 02bbcddf..084b607e 100644
--- a/admin/WebConsole/idiomas/php/eng/accionmenu_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/accionmenu_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: accionmenu_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/acercade_eng.php b/admin/WebConsole/idiomas/php/eng/acercade_eng.php
index 1cf4a190..3aa7505f 100644
--- a/admin/WebConsole/idiomas/php/eng/acercade_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/acercade_eng.php
@@ -10,11 +10,11 @@ if(!isset($TbMsg)){
}
$TbMsg["TITLE"]='Free and open-source application for deployment and management of operating systems.';
-$TbMsg["DESCRIPTION"]='OpenGnSys <em> (Open Genesis)</em> Project brings together the combined efforts of several Spanish Public Universities. OpenGnSys provide a number of free and open tools for managing and deploying computers. These tools supplies a complete, versatile and intuitive sytem. This system allows the arrangement, installation and deployment of different operating systems.';
-$TbMsg["LICENSE"]='OpenGnSys is a Free Software project. As such, all code is licensed under ';
+$TbMsg["DESCRIPTION"]='OpenGnsys <em> (Open Genesis)</em> Project brings together the combined efforts of several Spanish Public Universities. OpenGnsys provide a number of free and open tools for managing and deploying computers. These tools supplies a complete, versatile and intuitive sytem. This system allows the arrangement, installation and deployment of different operating systems.';
+$TbMsg["LICENSE"]='OpenGnsys is a Free Software project. As such, all code is licensed under ';
$TbMsg["LINK"]='Web project:';
$TbMsg["CHANGE"]='Changes in: ';
-$TbMsg["MANUAL"]='Manual OpenGnSys ';
+$TbMsg["MANUAL"]='Manual OpenGnsys ';
?>
diff --git a/admin/WebConsole/idiomas/php/eng/actualizar_eng.php b/admin/WebConsole/idiomas/php/eng/actualizar_eng.php
index 7abf81c8..7405b81d 100644
--- a/admin/WebConsole/idiomas/php/eng/actualizar_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/actualizar_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: actualizar_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/administracion_eng.php b/admin/WebConsole/idiomas/php/eng/administracion_eng.php
index dcd15ade..434fbadc 100644
--- a/admin/WebConsole/idiomas/php/eng/administracion_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/administracion_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: administracion_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/administradores_centros_eng.php b/admin/WebConsole/idiomas/php/eng/administradores_centros_eng.php
index ac202f0f..b9ea5fc1 100644
--- a/admin/WebConsole/idiomas/php/eng/administradores_centros_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/administradores_centros_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: administradores_centros_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/administradores_usuarios_eng.php b/admin/WebConsole/idiomas/php/eng/administradores_usuarios_eng.php
index 8c5de145..f312dac1 100644
--- a/admin/WebConsole/idiomas/php/eng/administradores_usuarios_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/administradores_usuarios_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: administradores_usuarios_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/aulas_eng.php b/admin/WebConsole/idiomas/php/eng/aulas_eng.php
index 5a644688..3ec19371 100644
--- a/admin/WebConsole/idiomas/php/eng/aulas_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/aulas_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: aulas_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/avisos_eng.php b/admin/WebConsole/idiomas/php/eng/avisos_eng.php
index 82a4ead7..3ce2af8c 100644
--- a/admin/WebConsole/idiomas/php/eng/avisos_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/avisos_eng.php
@@ -1,15 +1,18 @@
<?php
//________________________________________
//
-// Php language file: avisos_esp.php
-// Language: Español
+// Php language file: avisos_eng.php
+// Language: Inglés
//________________________________________
if (empty ($TbMsg)) $TbMsg=array();
$TbMsg["WARN_NAMELENGTH"]='WARNING: The hostname must not exceed 15 characters if you install Windows systems.';
$TbMsg["WARN_NETBOOT"]='ATENCI&Oacute;N: El equipo iniciar&aacute; en local por defecto; usar NetBoot Avanzado para modificar su arranque.';
$TbMsg["WARN_DISKSIZE"]='AVISO: El cálculo del tamaño del disco tiene un margen de error, si se utiliza completamente puede fallar la creación de la cache. Es conveniente dejar un espacio libre, que en disco grandes puede llegar a un 1GB';
-$TbMsg["WARN_REBOOTAFTER"]='WARNING: It is advisable to make a reboot after executing the operation.';
+$TbMsg["WARN_REBOOTAFTER"]='AVISO: En algunos casos puede ser conveniente realizar un reinicio despu&eacute;s de ejecutar la operaci&oacute;n.';
$TbMsg["WARN_NOTESOFMENU"]='NOTAS: Los men&uacute;s personalizados tienen mayor prioridad que los men&uacute;s autom&aacute;ticos.<br>Un men&uacute; personalizado se define introduciendo la URL de la p&aacute;gina HTML que lo define.<br>Un men&uacute; autom&aacute;tico se compone a partir de los procedimientos definidos.';
+$TbMsg["WARN_GPT"]='AVISO: Para tabla de particiones GPT es necesario que la primera partici&oacute;n sea tipo EFI <br>y se recomienda un tamaño en torno a 512Mb.';
+$TbMsg["WARN_SCHEDULER"]='WARNING: turn on database event scheduler to enable this property.';
+$TbMsg["WARN_SOURCE_PATH"]='WARNING: The route origin is only used in directory-type synchronized.';
?>
diff --git a/admin/WebConsole/idiomas/php/eng/barramenu_eng.php b/admin/WebConsole/idiomas/php/eng/barramenu_eng.php
index c418be9e..535a38df 100644
--- a/admin/WebConsole/idiomas/php/eng/barramenu_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/barramenu_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: barramenu_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/boot_grub4dos_eng.php b/admin/WebConsole/idiomas/php/eng/boot_grub4dos_eng.php
index 67240fde..2ec25d27 100644
--- a/admin/WebConsole/idiomas/php/eng/boot_grub4dos_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/boot_grub4dos_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: aulas_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/buscar_eng.php b/admin/WebConsole/idiomas/php/eng/buscar_eng.php
index f187a66b..9bd6e19f 100644
--- a/admin/WebConsole/idiomas/php/eng/buscar_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/buscar_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________
//
// Fichero de idiomas php: buscar_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/clases/Almanaque_eng.php b/admin/WebConsole/idiomas/php/eng/clases/Almanaque_eng.php
index 7f486f22..aaad5436 100644
--- a/admin/WebConsole/idiomas/php/eng/clases/Almanaque_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/clases/Almanaque_eng.php
@@ -1,4 +1,4 @@
- <?
+ <?php
/*============================================================================
Esta clase genera tablas HTML para seleccin de fechas (Versin inglesa)
@@ -72,14 +72,22 @@ class Almanaque{
$this->semanas[5]=array ("5",0x10);
$this->semanas[6]=array ("Last",0x20);
- $this->numero_annos[1]=array ("2010",0x01); // tamao 1 bytes
- $this->numero_annos[2]=array ("2011",0x02);
- $this->numero_annos[3]=array ("2012",0x04);
- $this->numero_annos[4]=array ("2013",0x08);
- $this->numero_annos[5]=array ("2014",0x10);
- $this->numero_annos[6]=array ("2015",0x20);
- $this->numero_annos[7]=array ("2016",0x40);
- $this->numero_annos[8]=array ("2017",0x80);
+ $this->numero_annos[2010]=0x0001; // tamao 2 bytes
+ $this->numero_annos[2011]=0x0002;
+ $this->numero_annos[2012]=0x0004;
+ $this->numero_annos[2013]=0x0008;
+ $this->numero_annos[2014]=0x0010;
+ $this->numero_annos[2015]=0x0020;
+ $this->numero_annos[2016]=0x0040;
+ $this->numero_annos[2017]=0x0080;
+ $this->numero_annos[2018]=0x0100;
+ $this->numero_annos[2019]=0x0200;
+ $this->numero_annos[2020]=0x0400;
+ $this->numero_annos[2021]=0x0800;
+ $this->numero_annos[2022]=0x1000;
+ $this->numero_annos[2023]=0x2000;
+ $this->numero_annos[2024]=0x4000;
+ $this->numero_annos[2025]=0x8000;
$this->numero_dias[1]=0x00000001; // tamao 4 bytes
$this->numero_dias[2]=0x00000002;
@@ -211,7 +219,7 @@ class Almanaque{
$HTML_calendario='<TABLE id="tabla_annos" class="'.$this->clase.'">'.chr(13);
$HTML_calendario.='<TR>'.chr(13);
$HTML_calendario.='<TH style="cursor:hand" onclick="TH_'.$this->onclick.'">Years</TH></TR>'.chr(13); // Literal aos
- for ($i=1;$i<9;$i++){
+ for ($i=$ano_desde; $i<=ano_hasta; ){
$HTML_calendario.='<TR><TD id="'.$this->numero_annos[$i][0].'" value="'.$this->numero_annos[$i][1].'" style="cursor:hand" onmouseover="'.$this->onmouseover.'" onmouseout="'.$this->onmouseout.'" onclick="'.$this->onclick.'">'.$this->numero_annos[$i][0].'</TD></TR>'.chr(13);
}
$HTML_calendario.='</TABLE>'.chr(13);
diff --git a/admin/WebConsole/idiomas/php/eng/clases/Calendario_eng.php b/admin/WebConsole/idiomas/php/eng/clases/Calendario_eng.php
index e182f2ae..29d001d2 100644
--- a/admin/WebConsole/idiomas/php/eng/clases/Calendario_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/clases/Calendario_eng.php
@@ -1,4 +1,4 @@
- <?
+ <?php
/*========================================================================================================
Esta clase genera tablas HTML para seleccin de fechas (Versin inglesa)
diff --git a/admin/WebConsole/idiomas/php/eng/colasacciones_eng.php b/admin/WebConsole/idiomas/php/eng/colasacciones_eng.php
index 9683c242..af1679fd 100644
--- a/admin/WebConsole/idiomas/php/eng/colasacciones_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/colasacciones_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: colasacciones_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/colasreservas_eng.php b/admin/WebConsole/idiomas/php/eng/colasreservas_eng.php
index 648638a5..ae7dcb5c 100644
--- a/admin/WebConsole/idiomas/php/eng/colasreservas_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/colasreservas_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: colasacciones_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/apagar_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/apagar_eng.php
index 915b398a..fded9101 100644
--- a/admin/WebConsole/idiomas/php/eng/comandos/apagar_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/comandos/apagar_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: apagar_eng.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/arrancar_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/arrancar_eng.php
index 5b1a1472..11e3e7f8 100644
--- a/admin/WebConsole/idiomas/php/eng/comandos/arrancar_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/comandos/arrancar_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: arrancar_eng.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/configurar_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/configurar_eng.php
index 5acb7f01..889600ae 100644
--- a/admin/WebConsole/idiomas/php/eng/comandos/configurar_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/comandos/configurar_eng.php
@@ -23,4 +23,6 @@
$TbMsg[15]='Hide';
$TbMsg[16]='Show';
$TbMsg[17]=' Free space !!';
+
+ $TbMsg["HD"]='Disk';
?>
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/conmutar_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/conmutar_eng.php
index 82068595..fd6f9bbc 100644
--- a/admin/WebConsole/idiomas/php/eng/comandos/conmutar_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/comandos/conmutar_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: apagar_eng.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/crearimagen_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/crearimagen_eng.php
index 14d79b44..9475b2f1 100644
--- a/admin/WebConsole/idiomas/php/eng/comandos/crearimagen_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/comandos/crearimagen_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: crearimagen_eng.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/crearimagenbasica_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/crearimagenbasica_eng.php
index fa18bf11..4dea76e0 100644
--- a/admin/WebConsole/idiomas/php/eng/comandos/crearimagenbasica_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/comandos/crearimagenbasica_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: crearimagenbasica_eng.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/crearperfilsoftware_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/crearperfilsoftware_eng.php
index cab0b6c9..adef5911 100644
--- a/admin/WebConsole/idiomas/php/eng/comandos/crearperfilsoftware_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/comandos/crearperfilsoftware_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: crearperfilsoftware_eng.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/crearsoftincremental_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/crearsoftincremental_eng.php
index c23a2a5f..5c4b2cc4 100644
--- a/admin/WebConsole/idiomas/php/eng/comandos/crearsoftincremental_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/comandos/crearsoftincremental_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: crearsoftincremental_eng.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/ejecutarscripts_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/ejecutarscripts_eng.php
index 0f69669a..b4ce77e8 100644
--- a/admin/WebConsole/idiomas/php/eng/comandos/ejecutarscripts_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/comandos/ejecutarscripts_eng.php
@@ -14,9 +14,16 @@
$TbMsg[6]='Scope';
$TbMsg[7]='Title';
$TbMsg[8]='Description';
- $TbMsg[9]='OpenGnSys code';
+ $TbMsg[9]='Script code';
$TbMsg[10]='Data to submit';
$TbMsg[11]='Delete Cache Image on Client';
+ $TbMsg[12]='&nbsp;Execution mode *&nbsp;';
+ $TbMsg[13]='System';
+ $TbMsg[14]='User';
+ $TbMsg[15]="AVISO El modo de ejecución sólo se aplica a los agentes de sistema operativo nuevos: <br>\n
+ * El modo usuario sólo es válido si está iniciada la sesión en modo gráfico.<br>\n
+ * El lenguaje del script a enviar debe corresponder al estado de cliente.<br>\n
+ * Para Windows hay que escapar las contrabarras.";
$TbMsg["WDI10"]='Modificar código';
$TbMsg["WDI11"]='Deploy Image Wizard';
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/eliminarimagencache_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/eliminarimagencache_eng.php
index 475bcf90..1f9e10e3 100644
--- a/admin/WebConsole/idiomas/php/eng/comandos/eliminarimagencache_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/comandos/eliminarimagencache_eng.php
@@ -5,12 +5,12 @@
// Idioma: English
//________________________________________________________________________________________________________
if (empty ($TbMsg)) $TbMsg=array();
- $TbMsg[0]='Generation of software profiles';
- $TbMsg[1]='Computer features';
- $TbMsg[2]='Name';
- $TbMsg[3]='IP Address';
- $TbMsg[4]='MAC Address';
- $TbMsg[5]='Image Delete Cache Client';
+ $TbMsg[0]='Organizational Unit';
+ $TbMsg[1]='Group of labs';
+ $TbMsg[2]='Lab';
+ $TbMsg[3]='Group of comuters';
+ $TbMsg[4]='Computer';
+ $TbMsg[5]='Delete Images from Clients Cache';
$TbMsg[6]='Environment';
$TbMsg[7]='Available Images';
$TbMsg[8]='Par';
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/eliminarimagenrepo_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/eliminarimagenrepo_eng.php
index b341b96e..3f164a40 100644
--- a/admin/WebConsole/idiomas/php/eng/comandos/eliminarimagenrepo_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/comandos/eliminarimagenrepo_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: eliminarimagenrepositorio_eng.php (Comandos)
@@ -38,4 +38,5 @@
$TbMsg[30]='Organizational Unit';
$TbMsg[31]='Archive';
$TbMsg[32]='Directory';
-?> \ No newline at end of file
+ $TbMsg[33]='AVISO: La imagen está situada en un directorio que no corresponde a la unidad organizativa.'
+?>
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/enviarmensaje_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/enviarmensaje_eng.php
new file mode 100644
index 00000000..2f58c7c0
--- /dev/null
+++ b/admin/WebConsole/idiomas/php/eng/comandos/enviarmensaje_eng.php
@@ -0,0 +1,24 @@
+<?php
+//________________________________________________________________________________________________________
+//
+// Php language file: ejecutarscripts_eng.php (Comandos)
+// Language: English
+//________________________________________________________________________________________________________
+ if (empty ($TbMsg)) $TbMsg=array();
+ $TbMsg[0]='Centers';
+ $TbMsg[1]='Group of labs';
+ $TbMsg[2]='Labs';
+ $TbMsg[3]='Group of computers';
+ $TbMsg[4]='Computers';
+ $TbMsg[5]='Send message';
+ $TbMsg[6]='Scope';
+ $TbMsg[7]='Title';
+ $TbMsg[8]='Description';
+ $TbMsg[9]=' Texto del mensaje ';
+ $TbMsg[10]='Datos a suministrar';
+
+ $TbMsg["OGAGENT"]="AVISO: Sólo se puede utilizar en los equipos que se haya iniciado la sesión <br>y tengan instalado en nuevo agente de OpenGnsys.";
+ $TbMsg["OPTION"]="AVISO: El nuevo agente, en esta versión, no permite utilizar la cola de acciones.";
+
+?>
+
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/gestor_ejecutarscripts_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/gestor_ejecutarscripts_eng.php
index 74b05d73..fc8ccdc2 100644
--- a/admin/WebConsole/idiomas/php/eng/comandos/gestor_ejecutarscripts_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/comandos/gestor_ejecutarscripts_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: gestor_ejecutarscripts_eng.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/mensajes_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/mensajes_eng.php
index 310bedcb..d8eea199 100644
--- a/admin/WebConsole/idiomas/php/eng/comandos/mensajes_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/comandos/mensajes_eng.php
@@ -11,6 +11,7 @@ $TbMsg["COMMAND_Configurar"]="Configure";
$TbMsg["COMMAND_CrearImagen"]="Make Image";
$TbMsg["COMMAND_EjecutarScript"]="Execute Script";
$TbMsg["COMMAND_EliminarImagenCache"]="Delete Cache Image";
+$TbMsg["COMMAND_EnviarMensaje"]="Enviar Mensaje";
$TbMsg["COMMAND_IniciarSesion"]="Init Session";
$TbMsg["COMMAND_InventarioHardware"]="Hardware Inventory";
$TbMsg["COMMAND_InventarioSoftware"]="Software Inventory";
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/opcionesacciones_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/opcionesacciones_eng.php
index ecf72642..6c944c91 100644
--- a/admin/WebConsole/idiomas/php/eng/comandos/opcionesacciones_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/comandos/opcionesacciones_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: opcionesacciones_eng.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/particionaryformatear_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/particionaryformatear_eng.php
index a2cccdcd..0dc7ba4e 100644
--- a/admin/WebConsole/idiomas/php/eng/comandos/particionaryformatear_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/comandos/particionaryformatear_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: particionaryformatear_eng.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/reiniciar_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/reiniciar_eng.php
index a626507d..246381d3 100644
--- a/admin/WebConsole/idiomas/php/eng/comandos/reiniciar_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/comandos/reiniciar_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: apagar_eng.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/rembooffline_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/rembooffline_eng.php
index 54d50e62..c51a75b3 100644
--- a/admin/WebConsole/idiomas/php/eng/comandos/rembooffline_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/comandos/rembooffline_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: apagar_eng.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/restaurarimagen_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/restaurarimagen_eng.php
index b7010381..48573f81 100644
--- a/admin/WebConsole/idiomas/php/eng/comandos/restaurarimagen_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/comandos/restaurarimagen_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: restaurarimagen_eng.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/restaurarimagenbasica_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/restaurarimagenbasica_eng.php
index 4068d492..b6fdd4af 100644
--- a/admin/WebConsole/idiomas/php/eng/comandos/restaurarimagenbasica_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/comandos/restaurarimagenbasica_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: restaurarimagenbasica_eng.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/restaurarsoftincremental_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/restaurarsoftincremental_eng.php
index 8fcae75a..cc5132fe 100644
--- a/admin/WebConsole/idiomas/php/eng/comandos/restaurarsoftincremental_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/comandos/restaurarsoftincremental_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: restaurarsoftincremental_eng.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/eng/comandos/tomaconfiguracion_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/tomaconfiguracion_eng.php
index 226c9b87..d3421b16 100644
--- a/admin/WebConsole/idiomas/php/eng/comandos/tomaconfiguracion_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/comandos/tomaconfiguracion_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: tomaconfiguracion_eng.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/eng/configuraciones_eng.php b/admin/WebConsole/idiomas/php/eng/configuraciones_eng.php
index c5b959f2..dbe10991 100644
--- a/admin/WebConsole/idiomas/php/eng/configuraciones_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/configuraciones_eng.php
@@ -15,7 +15,7 @@ $TbMsg[5]="Name";
$TbMsg[6]="Location";
$TbMsg[7]="Projector";
$TbMsg[8]="Board";
-$TbMsg[9]="Puestos";
+$TbMsg[9]="Capacity";
$TbMsg[10]="Image URL";
$TbMsg[11]="Menu";
$TbMsg[12]="Comments";
diff --git a/admin/WebConsole/idiomas/php/eng/conmutar_eng.php b/admin/WebConsole/idiomas/php/eng/conmutar_eng.php
index 233b13aa..749a5e32 100644
--- a/admin/WebConsole/idiomas/php/eng/conmutar_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/conmutar_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: conmutar_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/consolaremota_eng.php b/admin/WebConsole/idiomas/php/eng/consolaremota_eng.php
index 022747d0..b6a8c4f5 100644
--- a/admin/WebConsole/idiomas/php/eng/consolaremota_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/consolaremota_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: consolaremota_eng.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/eng/descargas_eng.php b/admin/WebConsole/idiomas/php/eng/descargas_eng.php
new file mode 100644
index 00000000..b04ef2a7
--- /dev/null
+++ b/admin/WebConsole/idiomas/php/eng/descargas_eng.php
@@ -0,0 +1,12 @@
+<?php
+//______________________________________________________________
+//
+// Php language file: descargas_eng.php
+// Language: English
+//______________________________________________________________
+if (empty ($TbMsg)) $TbMsg=array();
+$TbMsg['DOWNLOADS']="Available downloads";
+$TbMsg['NOFILES']="No files available";
+
+// Warning: Do not leave characters out of PHP code.
+?>
diff --git a/admin/WebConsole/idiomas/php/eng/ecoremoto_eng.php b/admin/WebConsole/idiomas/php/eng/ecoremoto_eng.php
index 669c225c..d291a1ec 100644
--- a/admin/WebConsole/idiomas/php/eng/ecoremoto_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/ecoremoto_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: incorporaordenadores_esp.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/eng/ejecutaracciones_eng.php b/admin/WebConsole/idiomas/php/eng/ejecutaracciones_eng.php
index ff3c9b7f..409f52a7 100644
--- a/admin/WebConsole/idiomas/php/eng/ejecutaracciones_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/ejecutaracciones_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: ejecutaracciones_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/estados_eng.php b/admin/WebConsole/idiomas/php/eng/estados_eng.php
index 573d5c7a..1733629a 100644
--- a/admin/WebConsole/idiomas/php/eng/estados_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/estados_eng.php
@@ -9,8 +9,13 @@ if (empty ($TbMsg)) $TbMsg=array();
$TbMsg["STATUS_BSY"]="Busy";
$TbMsg["STATUS_INI"]="Initializing";
$TbMsg["STATUS_OFF"]="Off";
-$TbMsg["STATUS_OPG"]="OpenGnSys";
+$TbMsg["STATUS_OPG"]="OpenGnsys";
$TbMsg["STATUS_LNX"]="GNU/Linux";
$TbMsg["STATUS_WXP"]="Windows";
+// New OGAgent states.
+$TbMsg["STATUS_LNXS"]="GNU/Linux session";
+$TbMsg["STATUS_OSX"]="macOS";
+$TbMsg["STATUS_WIN"]="Windows";
+$TbMsg["STATUS_WINS"]="Windows session";
?>
diff --git a/admin/WebConsole/idiomas/php/eng/gestor_ordenadores_eng.php b/admin/WebConsole/idiomas/php/eng/gestor_ordenadores_eng.php
new file mode 100644
index 00000000..df1fa293
--- /dev/null
+++ b/admin/WebConsole/idiomas/php/eng/gestor_ordenadores_eng.php
@@ -0,0 +1,10 @@
+<?php
+//______________________________________________________________
+//
+// Fichero de idiomas php: gestor_ordenadores_eng.php
+// Idioma: Inglés
+//______________________________________________________________
+$TbMsg=array();
+$TbMsg["DUPLICADO"]="Error al insertar el ordenador, se han encontrado datos duplicados: ";
+?>
+
diff --git a/admin/WebConsole/idiomas/php/eng/hardwares_eng.php b/admin/WebConsole/idiomas/php/eng/hardwares_eng.php
index eba4f609..9a2bf838 100644
--- a/admin/WebConsole/idiomas/php/eng/hardwares_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/hardwares_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: hardwares_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/iconos_eng.php b/admin/WebConsole/idiomas/php/eng/iconos_eng.php
index d062cda4..ab5f2849 100644
--- a/admin/WebConsole/idiomas/php/eng/iconos_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/iconos_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: m_iconos_eng.php (
diff --git a/admin/WebConsole/idiomas/php/eng/imagenes_eng.php b/admin/WebConsole/idiomas/php/eng/imagenes_eng.php
index ab3c64d2..0d93401f 100644
--- a/admin/WebConsole/idiomas/php/eng/imagenes_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/imagenes_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: imagenes_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/imagenincremental_eng.php b/admin/WebConsole/idiomas/php/eng/imagenincremental_eng.php
index 6453533e..bc007e17 100644
--- a/admin/WebConsole/idiomas/php/eng/imagenincremental_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/imagenincremental_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php:imagenincremental_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/inclusionacciones_eng.php b/admin/WebConsole/idiomas/php/eng/inclusionacciones_eng.php
index bc875e14..fd834a03 100644
--- a/admin/WebConsole/idiomas/php/eng/inclusionacciones_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/inclusionacciones_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: inclusionacciones_esp.php
diff --git a/admin/WebConsole/idiomas/php/eng/incrementalcomponente_soft_eng.php b/admin/WebConsole/idiomas/php/eng/incrementalcomponente_soft_eng.php
index 199e9910..09585b4e 100644
--- a/admin/WebConsole/idiomas/php/eng/incrementalcomponente_soft_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/incrementalcomponente_soft_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: incrementalcomponente_soft_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/informacion_acciones_eng.php b/admin/WebConsole/idiomas/php/eng/informacion_acciones_eng.php
index 04c55a73..00d0b0b0 100644
--- a/admin/WebConsole/idiomas/php/eng/informacion_acciones_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/informacion_acciones_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: informacion_perfileshard_esp.php
diff --git a/admin/WebConsole/idiomas/php/eng/informacion_imagenes_eng.php b/admin/WebConsole/idiomas/php/eng/informacion_imagenes_eng.php
index e0c6063e..af2f7d9f 100644
--- a/admin/WebConsole/idiomas/php/eng/informacion_imagenes_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/informacion_imagenes_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: informacion_imagenes_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/informacion_incrementales_eng.php b/admin/WebConsole/idiomas/php/eng/informacion_incrementales_eng.php
index 62b77bc0..74c9e727 100644
--- a/admin/WebConsole/idiomas/php/eng/informacion_incrementales_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/informacion_incrementales_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: informacion_incrementales_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/informacion_menus_eng.php b/admin/WebConsole/idiomas/php/eng/informacion_menus_eng.php
index 4e680017..5c74cce1 100644
--- a/admin/WebConsole/idiomas/php/eng/informacion_menus_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/informacion_menus_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: informacion_menus_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/informacion_perfileshard_eng.php b/admin/WebConsole/idiomas/php/eng/informacion_perfileshard_eng.php
index a57fb8aa..d351ed72 100644
--- a/admin/WebConsole/idiomas/php/eng/informacion_perfileshard_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/informacion_perfileshard_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: informacion_perfileshard_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/informacion_perfilessoft_eng.php b/admin/WebConsole/idiomas/php/eng/informacion_perfilessoft_eng.php
index 5c183df0..a2a00465 100644
--- a/admin/WebConsole/idiomas/php/eng/informacion_perfilessoft_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/informacion_perfilessoft_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: informacion_perfilessoft_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/informacion_procedimientos_eng.php b/admin/WebConsole/idiomas/php/eng/informacion_procedimientos_eng.php
index 67de6c8b..af58abea 100644
--- a/admin/WebConsole/idiomas/php/eng/informacion_procedimientos_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/informacion_procedimientos_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: informacion_procedimientos_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/informacion_repositorio_eng.php b/admin/WebConsole/idiomas/php/eng/informacion_repositorio_eng.php
index c9ae6ef5..5a7ffaf9 100644
--- a/admin/WebConsole/idiomas/php/eng/informacion_repositorio_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/informacion_repositorio_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: informacion_repositorio_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/informacion_tareas_eng.php b/admin/WebConsole/idiomas/php/eng/informacion_tareas_eng.php
index ece7a7f4..15166186 100644
--- a/admin/WebConsole/idiomas/php/eng/informacion_tareas_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/informacion_tareas_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: informacion_tareas_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/menucliente_eng.php b/admin/WebConsole/idiomas/php/eng/menucliente_eng.php
index ec3f75c8..564b471b 100644
--- a/admin/WebConsole/idiomas/php/eng/menucliente_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/menucliente_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: menuscliente_esp.php
diff --git a/admin/WebConsole/idiomas/php/eng/menus_eng.php b/admin/WebConsole/idiomas/php/eng/menus_eng.php
index 9167ef0b..550e70b1 100644
--- a/admin/WebConsole/idiomas/php/eng/menus_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/menus_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: menus_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/msgbrowser_eng.php b/admin/WebConsole/idiomas/php/eng/msgbrowser_eng.php
index e38ebbb0..9abca290 100644
--- a/admin/WebConsole/idiomas/php/eng/msgbrowser_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/msgbrowser_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: msgbrowser.php
diff --git a/admin/WebConsole/idiomas/php/eng/nada_eng.php b/admin/WebConsole/idiomas/php/eng/nada_eng.php
index 171bc0f1..d47d5d35 100644
--- a/admin/WebConsole/idiomas/php/eng/nada_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/nada_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: nada_esp.php
diff --git a/admin/WebConsole/idiomas/php/eng/perfilcomponente_hard_eng.php b/admin/WebConsole/idiomas/php/eng/perfilcomponente_hard_eng.php
index cc8a6187..1daa7953 100644
--- a/admin/WebConsole/idiomas/php/eng/perfilcomponente_hard_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/perfilcomponente_hard_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: perfilcomponente_hard_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/perfilcomponente_soft_eng.php b/admin/WebConsole/idiomas/php/eng/perfilcomponente_soft_eng.php
index 280bb9e0..95cb8974 100644
--- a/admin/WebConsole/idiomas/php/eng/perfilcomponente_soft_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/perfilcomponente_soft_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: perfilcomponente_soft_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/pintaParticiones_eng.php b/admin/WebConsole/idiomas/php/eng/pintaParticiones_eng.php
index 34953b7a..a28e9474 100644
--- a/admin/WebConsole/idiomas/php/eng/pintaParticiones_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/pintaParticiones_eng.php
@@ -9,32 +9,39 @@ if(!isset($TbMsg)){
$TbMsg=array();
}
-$TbMsg["PARTITION"]='Partici&oacute;n';
-$TbMsg["INST_SO"]='S.O. Instalado';
-$TbMsg["SIZE_KB"]='Tama&ntilde;o (KB)';
-$TbMsg["PARTITION_TYPE"]='Tipo';
-$TbMsg["IMAGE"]='Imagen';
-$TbMsg["SOFT_PROFILE"]='Perfil Software';
-$TbMsg["FILESYSTEM_SHORT"]='S.F.';
+$TbMsg["PARTITION"]='Partition';
+$TbMsg["INSTALLED_OS"]='Installed Operating System';
+$TbMsg["INST_SO"]='Installed O.S.';
+$TbMsg["SIZE_KB"]='Size (KB)';
+$TbMsg["PARTITION_TYPE"]='Type';
+$TbMsg["IMAGE"]='Image';
+$TbMsg["SOFT_PROFILE"]='Software Profile';
+$TbMsg["FILESYSTEM"]='Filesystem';
+$TbMsg["FILESYSTEM_SHORT"]='F.S.';
-$TbMsg["DISK"]='Disco';
-$TbMsg["CONFIG_PARTTABLE"]='Tabla de particiones';
+$TbMsg["REFORMAT"]='Reformat';
+$TbMsg["REMOVE"]='Remove';
+
+$TbMsg["DISK"]='Disk';
+$TbMsg["CONFIG_PARTTABLE"]='Partition Table';
+
+$TbMsg["USAGE"]='Usage';
$TbMsg["VARIABLE"]='Variable';
-$TbMsg["CACHE_CONTENT"]='Contenido cach&eacute;';
+$TbMsg["CACHE_CONTENT"]='Date/Cache Content';
$TbMsg["CACHE_FREESPACE"]='Cach&eacute; libre';
-$TbMsg["CACHE_COMPLETE"]='FULL CACHE';
+$TbMsg["CACHE_COMPLETE"]='CACHE IS FULL';
-$TbMsg["SAMESYSTEM_IMAGE"]='Imagen (mismo tipo partici&oacute;n)';
-$TbMsg["DIFFERENTSYSTEM_IMAGE"]='Imagen (distinto tipo partici&oacute;n)';
-$TbMsg["RESTORE_METHOD"]='M&eacute;todo';
+$TbMsg["SAMESYSTEM_IMAGE"]='Image (same partition type)';
+$TbMsg["DIFFERENTSYSTEM_IMAGE"]='Image (different partition type)';
+$TbMsg["RESTORE_METHOD"]='Method';
-$TbMsg["SO_NAME"]='Nombre S.O.';
-$TbMsg["IMAGE_TO_CREATE"]='Imagen a crear';
-$TbMsg["DESTINATION_REPOSITORY"]='Repositorio de destino';
+$TbMsg["SO_NAME"]='O.S. Name';
+$TbMsg["IMAGE_TO_CREATE"]='Image to create';
+$TbMsg["DESTINATION_REPOSITORY"]='Destination Repository';
-$TbMsg["IMAGE_REPOSITORY"]='Imagen / Repositorio';
-$TbMsg["INCREMENTAL_IMAGE_REPOSITORY"]='Imagen Incremental / Repositorio';
+$TbMsg["IMAGE_REPOSITORY"]='Image / Repository';
+$TbMsg["INCREMENTAL_IMAGE_REPOSITORY"]='Incremental Image / Repository';
$TbMsg["CONFIG_NOCONFIG"]='No configuration: client does not connect to server.';
$TbMsg["CONFIG_NODISK1MSDOS"]='Warning: this command only uses disk 1 with a MSDOS partition table.';
@@ -47,7 +54,9 @@ $TbMsg["TITLE_W"]='Rsync option: delta-transfer algorithm is not used and the w
$TbMsg["TITLE_E"]="Rsync option: delete extraneous files from the receiving side (ones that aren't on the sending side).";
$TbMsg["TITLE_C"]='Rsync option: compresses the file data as it is sent to the destination machine, which reduces the amount of data being transmitted.';
$TbMsg["SEND"]='Protocol';
-
+// WARNINGS.
$TbMsg["WARN_PROTOCOL"]='La opción "protocolo" sólo se utiliza en las sincronizadas tipo archivo la primera vez que se envía la imagen a caché. <br>En otro caso el protocolo es RSYNC.';
+$TbMsg["WARN_DIFFIMAGE"]='There is a new image version (showing revision difference).';
+$TbMsg["WARN_DIFFDISKSIZE"]='ATENTION: a group of computers with different disk sizes can not be partitioned.<br>Check &quotUngroup by partition size&quot option and press &quot;Accept&quot; in the top menu to apply this operation properly.';
?>
diff --git a/admin/WebConsole/idiomas/php/eng/procedimientoscomandos_eng.php b/admin/WebConsole/idiomas/php/eng/procedimientoscomandos_eng.php
index e9ae615f..02dc078f 100644
--- a/admin/WebConsole/idiomas/php/eng/procedimientoscomandos_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/procedimientoscomandos_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: procedimientoscomandos_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/programaciones_eng.php b/admin/WebConsole/idiomas/php/eng/programaciones_eng.php
index e6e0e840..e9574e98 100644
--- a/admin/WebConsole/idiomas/php/eng/programaciones_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/programaciones_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: programaciones_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/programacionesaulas_eng.php b/admin/WebConsole/idiomas/php/eng/programacionesaulas_eng.php
index e5a0b0e1..f025a2b8 100644
--- a/admin/WebConsole/idiomas/php/eng/programacionesaulas_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/programacionesaulas_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: colasacciones_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/programacionesreservas_eng.php b/admin/WebConsole/idiomas/php/eng/programacionesreservas_eng.php
index 63b7d00d..fe709248 100644
--- a/admin/WebConsole/idiomas/php/eng/programacionesreservas_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/programacionesreservas_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: colasacciones_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_aulas_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_aulas_eng.php
index 52c9f5bf..77b601ef 100644
--- a/admin/WebConsole/idiomas/php/eng/propiedades_aulas_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/propiedades_aulas_eng.php
@@ -14,8 +14,8 @@ $TbMsg[5]="Lab. name";
$TbMsg[6]="Location";
$TbMsg[7]="Projector";
$TbMsg[8]="Blackboard";
-$TbMsg[9]="Places";
-$TbMsg[10]="Image URL";
+$TbMsg[9]="Capacity";
+$TbMsg[10]="Picture";
$TbMsg[11]="Menu";
$TbMsg[12]="Comments";
$TbMsg[13]="Intervals";
@@ -23,7 +23,8 @@ $TbMsg[14]="Begin reserves";
$TbMsg[15]="End reserves";
$TbMsg[16]="Repository";
$TbMsg[17]="Hardware profile";
-$TbMsg[18]="Properties for all computers in this class";
+$TbMsg[18]="Assign properties to the Lab object";
+$TbMsg[1888]="Massive modifier of computer properties";
$TbMsg[19]="Cache size (KB)";
$TbMsg[20]="Autoexec";
$TbMsg[21]="Computers";
@@ -31,8 +32,8 @@ $TbMsg[22]="Multicast mode";
$TbMsg[23]="Multicast IP address";
$TbMsg[24]="Multicast port";
$TbMsg[25]="Multicast bandwith";
-$TbMsg[26]="P2P mode -seeder while downloading";
-$TbMsg[27]="P2P time -seeder time(s) after download-";
+$TbMsg[26]="P2P mode -seeder while downloading-";
+$TbMsg[27]="P2P time -seeder time after download-";
$TbMsg[28]="Gateway";
$TbMsg[29]="Netmask";
// UHU
@@ -40,12 +41,21 @@ $TbMsg[30]="Validation";
$TbMsg[31]="Login page";
$TbMsg[32]="Validation page";
// UHU
+// AGP
+$TbMsg[33]="ogLive";
+$TbMsg[34]="*** There are equipment with different ogLive ***";
$TbMsg[495]="Cache content";
-$TbMsg[509]="Computer Photo";
-$TbMsg[5091]="Insert Photo";
-$TbMsg[5092]="View Images";
+$TbMsg[509]="Computer picture";
+$TbMsg[5091]="Insert picture";
+$TbMsg[5092]="View pictures";
+// AGP
// Ramón
+$TbMsg['PROP_NTPIP']="NTP Server IP <em>(optional)</em>";
$TbMsg['PROP_DNSIP']="DNS Server IP <em>(optional)</em>";
$TbMsg['PROP_PROXYURL']="Proxy Server URL <em>(optional)</em>";
+$TbMsg['COMM_DEFTIMEZONE']="default time zone";
+$TbMsg['PROP_REMOTEACCESS']="Remote access";
+$TbMsg['COMM_REMOTEACCESS']="allow management of remote access to the computers";
+$TbMsg['COMM_DEFOGLIVE']="Assigned by administrator";
?>
diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_centros_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_centros_eng.php
index 75c96b60..1c2e2be7 100644
--- a/admin/WebConsole/idiomas/php/eng/propiedades_centros_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/propiedades_centros_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_ordenadores_eng.php
@@ -12,4 +12,6 @@ $TbMsg[3]="Remove";
$TbMsg[4]="Organizing Unit Management";
$TbMsg[5]="Name of Unit";
$TbMsg[6]="Coments";
+$TbMsg['DIR']="Directorio";
+$TbMsg['MSG_OGUNIT']="Si se elige separar por unidades organizativas, el directorio <b>/opt/opengnsys/images</b><br> debe contener un subdirectorio llamado como el directorio indicado.";
?>
diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_componentehardwares_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_componentehardwares_eng.php
index 93c26a47..a364c4ac 100644
--- a/admin/WebConsole/idiomas/php/eng/propiedades_componentehardwares_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/propiedades_componentehardwares_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_componentehardwares_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_componentesoftwares_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_componentesoftwares_eng.php
index 824255a2..037eca2a 100644
--- a/admin/WebConsole/idiomas/php/eng/propiedades_componentesoftwares_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/propiedades_componentesoftwares_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_componentesoftwares_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_entidades_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_entidades_eng.php
index 45ec7d31..6d0c6546 100644
--- a/admin/WebConsole/idiomas/php/eng/propiedades_entidades_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/propiedades_entidades_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_ordenadores_eng.php
@@ -12,4 +12,5 @@ $TbMsg[3]="Remove";
$TbMsg[4]="Entity Management";
$TbMsg[5]="Name of entity";
$TbMsg[6]="Coments";
+$TbMsg['OGUNIT']="Separar unidades organizativas";
?>
diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_entornos_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_entornos_eng.php
index 65819325..1ad82b4a 100644
--- a/admin/WebConsole/idiomas/php/eng/propiedades_entornos_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/propiedades_entornos_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_aulas_esp.php
@@ -10,8 +10,8 @@ $TbMsg[1]="Insert";
$TbMsg[2]="Modify";
$TbMsg[3]="Remove";
$TbMsg[4]="Environment Variables Management";
-$TbMsg[5]="OpenGnSys Server IP address";
-$TbMsg[6]="OpenGnSys Server port";
+$TbMsg[5]="OpenGnsys Server IP address";
+$TbMsg[6]="OpenGnsys Server port";
$TbMsg[7]="Default clonation method";
$TbMsg[8]="";
$TbMsg[9]="";
diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_grupos_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_grupos_eng.php
index 4d61636b..74240d39 100644
--- a/admin/WebConsole/idiomas/php/eng/propiedades_grupos_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/propiedades_grupos_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_tareas_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_imagenes_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_imagenes_eng.php
index 25feee35..c92147f8 100644
--- a/admin/WebConsole/idiomas/php/eng/propiedades_imagenes_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/propiedades_imagenes_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_imagenes_eng.php
@@ -25,5 +25,12 @@ $TbMsg[15]="ATTENTION. - A software image that has profile indicates that at som
$TbMsg[16]="Route Origin";
$TbMsg[17]='"Canonical name-image file exists: Enter another name"';
$TbMsg[18]="Enter another Name";
+$TbMsg[19]="Source computer";
+$TbMsg[20]="Creation date";
+$TbMsg[21]='"Description Image file name exists: Enter another Description"';
+$TbMsg[22]="Enter another Description";
+$TbMsg['PROP_OS']="Operating system";
+$TbMsg['PROP_REMOTEACCESS']="Remote access";
+$TbMsg['COMM_REMOTEACCESS']="allow management of remote access to the computers";
?>
diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_menus_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_menus_eng.php
index f1bf3262..a408378f 100644
--- a/admin/WebConsole/idiomas/php/eng/propiedades_menus_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/propiedades_menus_eng.php
@@ -23,4 +23,5 @@ $TbMsg[14]="Double menu";
$TbMsg[15]="URL menú personalizado";
$TbMsg[17]="Screen resolution";
$TbMsg[18]="Background image";
+$TbMsg["PROP_DEFAULT"]="Detected by default";
?>
diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_ordenadores_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_ordenadores_eng.php
index 8b5541be..8b966214 100644
--- a/admin/WebConsole/idiomas/php/eng/propiedades_ordenadores_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/propiedades_ordenadores_eng.php
@@ -4,7 +4,7 @@
// Php language file: propiedades_ordenadores_eng.php
// Language: English
//_________________________________________________________
-$TbMsg=array();
+if (empty ($TbMsg)) $TbMsg=array();
$TbMsg[0]="No Option";
$TbMsg[1]="Insert";
$TbMsg[2]="Modify";
@@ -19,11 +19,16 @@ $TbMsg[10]="Repository";
$TbMsg[11]="Menu";
$TbMsg[12]="Cache size";
$TbMsg[13]="Network interface";
-$TbMsg[14]="Network driver";
+// AGP
+$TbMsg[18]="ogLive";
$TbMsg[509]="Computer Photo";
$TbMsg[5091]="Insert Photo";
$TbMsg[5092]="View Images";
$TbMsg[495]="Content Cache";
$TbMsg[4951]="Cache Free";
+// AGP
+$TbMsg["PROP_SERIALNO"]="Serial No.";
+$TbMsg["WARN_NOTDETECTED"]="<em>(does not detected)</em>";
+$TbMsg['COMM_DEFOGLIVE']="Assigned by administrator";
?>
diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_ordenadorestandar_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_ordenadorestandar_eng.php
index d038f2de..322d0a02 100644
--- a/admin/WebConsole/idiomas/php/eng/propiedades_ordenadorestandar_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/propiedades_ordenadorestandar_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_ordenadorestandar_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_perfilsoftwares_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_perfilsoftwares_eng.php
index f8ae16dc..ba1b0395 100644
--- a/admin/WebConsole/idiomas/php/eng/propiedades_perfilsoftwares_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/propiedades_perfilsoftwares_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_perfilsoftwares_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_procedimientos_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_procedimientos_eng.php
index 8b326199..7726b3f9 100644
--- a/admin/WebConsole/idiomas/php/eng/propiedades_procedimientos_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/propiedades_procedimientos_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_procedimientos_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_repositorios_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_repositorios_eng.php
index 22644e67..b26ec949 100644
--- a/admin/WebConsole/idiomas/php/eng/propiedades_repositorios_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/propiedades_repositorios_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_repositorios_eng.php
@@ -20,6 +20,13 @@ $TbMsg[11]="Space TOTAL";
$TbMsg[12]="Space Taken";
$TbMsg[13]="Space Free";
$TbMsg[14]="% Taken";
-$TbMsg[15]='Limitations of this version';
-$TbMsg[16]='Space information is allowed only if Repository and Web Server are hosted on the same server';
+$TbMsg[15]='Unable to access repository information';
+$TbMsg[16]='Check repository connection<br>Check access key (Api Token field must match its value in "ogAdmRepo" file)';
+$TbMsg[17]='Api Token';
+$TbMsg['MSG_CONTENT']='Content';
+$TbMsg['MSG_IMAGE']='Image';
+$TbMsg['MSG_TYPE']='Type';
+$TbMsg['MSG_SIZE']='Size';
+$TbMsg['MSG_MODIFIED']='Modified';
+$TbMsg['MSG_PERMISSIONS']='Permissions';
?>
diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_reservas_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_reservas_eng.php
index 42b33988..abe434f7 100644
--- a/admin/WebConsole/idiomas/php/eng/propiedades_reservas_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/propiedades_reservas_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_reservas_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_tareas_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_tareas_eng.php
index 2880f66d..5555a651 100644
--- a/admin/WebConsole/idiomas/php/eng/propiedades_tareas_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/propiedades_tareas_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_tareas_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_tipohardwares_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_tipohardwares_eng.php
index 53b03a0f..51ff8943 100644
--- a/admin/WebConsole/idiomas/php/eng/propiedades_tipohardwares_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/propiedades_tipohardwares_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_tipohardwares_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_universidades_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_universidades_eng.php
index 8523acf9..0ef095b8 100644
--- a/admin/WebConsole/idiomas/php/eng/propiedades_universidades_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/propiedades_universidades_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_aulas_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_usuarios_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_usuarios_eng.php
index c06c95f8..ce97c66e 100644
--- a/admin/WebConsole/idiomas/php/eng/propiedades_usuarios_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/propiedades_usuarios_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_ordenadores_eng.php
@@ -11,7 +11,7 @@ $TbMsg[2]="Modify";
$TbMsg[3]="Remove";
$TbMsg[4]="User Management";
$TbMsg[5]="User";
-$TbMsg[6]="Password";
+$TbMsg[6]="Password*";
$TbMsg[7]="Name";
$TbMsg[8]="E-mail";
$TbMsg[9]="Organitative Unit";
@@ -22,5 +22,7 @@ $TbMsg[13]="Operator";
$TbMsg[14]="To make changes to this user<br>";
$TbMsg[15]="created in the installation,<br><br>";
$TbMsg[16]="click here<br>";
-$TbMsg[17]="http://opengnsys.es/wiki/ModificarUsuarios";
-?> \ No newline at end of file
+$TbMsg[17]="https://opengnsys.es/trac/wiki/ModificarUsuarios";
+$TbMsg['APIKEY']="API key";
+$TbMsg['NEWAPIKEY']="La API key se generará automáticamente al insertar el usuario.";
+?>
diff --git a/admin/WebConsole/idiomas/php/eng/purgar_eng.php b/admin/WebConsole/idiomas/php/eng/purgar_eng.php
index cb1c488f..39a6f81a 100644
--- a/admin/WebConsole/idiomas/php/eng/purgar_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/purgar_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: actualizar_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/repositorios_eng.php b/admin/WebConsole/idiomas/php/eng/repositorios_eng.php
index 75c5a49a..379421d9 100644
--- a/admin/WebConsole/idiomas/php/eng/repositorios_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/repositorios_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: repositorios_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/reservas_eng.php b/admin/WebConsole/idiomas/php/eng/reservas_eng.php
index a55f61ef..5b7e5341 100644
--- a/admin/WebConsole/idiomas/php/eng/reservas_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/reservas_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: reserves_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/softwares_eng.php b/admin/WebConsole/idiomas/php/eng/softwares_eng.php
index de508738..e2d707ce 100644
--- a/admin/WebConsole/idiomas/php/eng/softwares_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/softwares_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: softwares_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/sondeo_eng.php b/admin/WebConsole/idiomas/php/eng/sondeo_eng.php
index 4f51d542..78bf8d37 100644
--- a/admin/WebConsole/idiomas/php/eng/sondeo_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/sondeo_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: sondeo_esp.php
diff --git a/admin/WebConsole/idiomas/php/eng/tareascomandos_eng.php b/admin/WebConsole/idiomas/php/eng/tareascomandos_eng.php
index 557486a2..7d567ef6 100644
--- a/admin/WebConsole/idiomas/php/eng/tareascomandos_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/tareascomandos_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: tareascomandos_eng.php
diff --git a/admin/WebConsole/idiomas/php/eng/tiposhardwares_eng.php b/admin/WebConsole/idiomas/php/eng/tiposhardwares_eng.php
index 294b9c07..7c60ae53 100644
--- a/admin/WebConsole/idiomas/php/eng/tiposhardwares_eng.php
+++ b/admin/WebConsole/idiomas/php/eng/tiposhardwares_eng.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________
//
// Fichero de idiomas php: tiposhardwares_eng.php
@@ -8,8 +8,10 @@ if (empty ($TbMsg)) $TbMsg=Array();
$TbMsg["HARDWARE_aud"]="Audio device";
$TbMsg["HARDWARE_bio"]="System BIOS";
$TbMsg["HARDWARE_boa"]="Mainboard";
+$TbMsg["HARDWARE_boo"]="Boot process type";
$TbMsg["HARDWARE_bus"]="System bus";
$TbMsg["HARDWARE_cdr"]="CD/DVD/Optical device";
+$TbMsg["HARDWARE_cha"]="Chassis type";
$TbMsg["HARDWARE_cpu"]="Processor";
$TbMsg["HARDWARE_dis"]="Disk";
$TbMsg["HARDWARE_fir"]="FireWire controller";
@@ -18,6 +20,7 @@ $TbMsg["HARDWARE_mem"]="Memory";
$TbMsg["HARDWARE_mod"]="System model";
$TbMsg["HARDWARE_mul"]="Multimedia device";
$TbMsg["HARDWARE_net"]="Network device";
+$TbMsg["HARDWARE_sto"]="Storage controller";
$TbMsg["HARDWARE_usb"]="USB controller";
$TbMsg["HARDWARE_vga"]="Video/Graphic device";
?>
diff --git a/admin/WebConsole/idiomas/php/esp/acceso_esp.php b/admin/WebConsole/idiomas/php/esp/acceso_esp.php
index 7dcd76a3..e5d084f5 100644
--- a/admin/WebConsole/idiomas/php/esp/acceso_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/acceso_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
// __________________________________________________
//
// Fichero de idiomas php: acceso_esp.php
@@ -15,7 +15,7 @@ $TbErr[4]="ATENCIÓN: Usted no tiene acceso a esta aplicación";
// Mensajes.
$TbMsg=array();
-$TbMsg["ACCESS_TITLE"]="OpenGnSys: Administraci&oacute;n web de aulas";
+$TbMsg["ACCESS_TITLE"]="OpenGnsys: Administraci&oacute;n web de aulas";
$TbMsg["ACCESS_HEADING"]="Gestión de Aulas de Inform&aacute;tica";
$TbMsg["ACCESS_SUBHEAD"]="Acceso para administradores";
$TbMsg["ACCESS_USERNAME"]="Usuario";
diff --git a/admin/WebConsole/idiomas/php/esp/acciones_esp.php b/admin/WebConsole/idiomas/php/esp/acciones_esp.php
index 55a8711e..aa80a687 100644
--- a/admin/WebConsole/idiomas/php/esp/acciones_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/acciones_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: acciones_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/accionmenu_esp.php b/admin/WebConsole/idiomas/php/esp/accionmenu_esp.php
index 04ef4c65..176e57ea 100644
--- a/admin/WebConsole/idiomas/php/esp/accionmenu_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/accionmenu_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: accionmenu_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/acercade_esp.php b/admin/WebConsole/idiomas/php/esp/acercade_esp.php
index e38fd0b0..836fe0a4 100644
--- a/admin/WebConsole/idiomas/php/esp/acercade_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/acercade_esp.php
@@ -10,11 +10,11 @@ if(!isset($TbMsg)){
}
$TbMsg["TITLE"]='Aplicaci&oacute;n libre y abierta para la gesti&oacute;n y el despliegue de sistemas operativos';
-$TbMsg["DESCRIPTION"]='OpenGnSys <em>(l&eacute;ase OpenG&eacute;nesis)</em> re&uacute;ne el esfuerzo conjunto de varias Universidades P&uacute;blicas Espa&ntilde;olas, para disponer de una serie de herramientas libres y abiertas que constituyan un sistema completo, vers&aacute;til e intuitivo, para la gesti&oacute;n y clonaci&oacute;n de equipos. Esta aplicaci&oacute;n permite la distribuci&oacute;n, instalaci&oacute;n y despliegue de distintos sistemas operativos. ';
-$TbMsg["LICENSE"]='OpenGnSys es un proyecto de Software Libre, todo el c&oacute;digo est&aacute; licenciado bajo ';
+$TbMsg["DESCRIPTION"]='OpenGnsys <em>(l&eacute;ase OpenG&eacute;nesis)</em> re&uacute;ne el esfuerzo conjunto de varias Universidades P&uacute;blicas Espa&ntilde;olas, para disponer de una serie de herramientas libres y abiertas que constituyan un sistema completo, vers&aacute;til e intuitivo, para la gesti&oacute;n y clonaci&oacute;n de equipos. Esta aplicaci&oacute;n permite la distribuci&oacute;n, instalaci&oacute;n y despliegue de distintos sistemas operativos. ';
+$TbMsg["LICENSE"]='OpenGnsys es un proyecto de Software Libre, todo el c&oacute;digo est&aacute; licenciado bajo ';
$TbMsg["LINK"]='Web del proyecto: ';
$TbMsg["CHANGE"]='Cambios en: ';
-$TbMsg["MANUAL"]='Manual OpenGnSys ';
+$TbMsg["MANUAL"]='Manual OpenGnsys ';
?>
diff --git a/admin/WebConsole/idiomas/php/esp/actualizar_esp.php b/admin/WebConsole/idiomas/php/esp/actualizar_esp.php
index 74517ab4..4c60f353 100644
--- a/admin/WebConsole/idiomas/php/esp/actualizar_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/actualizar_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: actualizar_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/administracion_esp.php b/admin/WebConsole/idiomas/php/esp/administracion_esp.php
index b2d66da2..41e23b0a 100644
--- a/admin/WebConsole/idiomas/php/esp/administracion_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/administracion_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: administracion_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/administradores_centros_esp.php b/admin/WebConsole/idiomas/php/esp/administradores_centros_esp.php
index c3fa398a..b6fc3620 100644
--- a/admin/WebConsole/idiomas/php/esp/administradores_centros_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/administradores_centros_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: administradores_centros_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/administradores_usuarios_esp.php b/admin/WebConsole/idiomas/php/esp/administradores_usuarios_esp.php
index 56bb1caa..3b802356 100644
--- a/admin/WebConsole/idiomas/php/esp/administradores_usuarios_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/administradores_usuarios_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: administradores_centros_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/aulas_esp.php b/admin/WebConsole/idiomas/php/esp/aulas_esp.php
index 71c28f05..56034c0b 100644
--- a/admin/WebConsole/idiomas/php/esp/aulas_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/aulas_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//____________________________________________________________
//
// Fichero de idiomas php: aulas_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/avisos_esp.php b/admin/WebConsole/idiomas/php/esp/avisos_esp.php
index cdf4e333..f54b994f 100644
--- a/admin/WebConsole/idiomas/php/esp/avisos_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/avisos_esp.php
@@ -11,5 +11,8 @@ $TbMsg["WARN_NETBOOT"]='ATENCI&Oacute;N: El equipo iniciar&aacute; en local por
$TbMsg["WARN_DISKSIZE"]='AVISO: El cálculo del tamaño del disco tiene un margen de error, si se utiliza completamente puede fallar la creación de la cache. Es conveniente dejar un espacio libre, que en disco grandes puede llegar a un 1GB';
$TbMsg["WARN_REBOOTAFTER"]='AVISO: En algunos casos puede ser conveniente realizar un reinicio despu&eacute;s de ejecutar la operaci&oacute;n.';
$TbMsg["WARN_NOTESOFMENU"]='NOTAS: Los men&uacute;s personalizados tienen mayor prioridad que los men&uacute;s autom&aacute;ticos.<br>Un men&uacute; personalizado se define introduciendo la URL de la p&aacute;gina HTML que lo define.<br>Un men&uacute; autom&aacute;tico se compone a partir de los procedimientos definidos.';
+$TbMsg["WARN_GPT"]='AVISO: Para tabla de particiones GPT es necesario que la primera partición sea tipo EFI <br>y se recomienda un tamaño en torno a 512Mb.';
+$TbMsg["WARN_SCHEDULER"]='AVISO: activar calendario de eventos de la BD para habilitar esta propiedad';
+$TbMsg["WARN_SOURCE_PATH"]='AVISO: La ruta de origen sólo se utiliza en las sincronizadas tipo directorio.';
?>
diff --git a/admin/WebConsole/idiomas/php/esp/barramenu_esp.php b/admin/WebConsole/idiomas/php/esp/barramenu_esp.php
index 63c387a9..1ea51290 100644
--- a/admin/WebConsole/idiomas/php/esp/barramenu_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/barramenu_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: barramenu_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/boot_grub4dos_esp.php b/admin/WebConsole/idiomas/php/esp/boot_grub4dos_esp.php
index a163d1e7..60ac8877 100644
--- a/admin/WebConsole/idiomas/php/esp/boot_grub4dos_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/boot_grub4dos_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//____________________________________________________________
//
// Fichero de idiomas php: aulas_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/buscar_esp.php b/admin/WebConsole/idiomas/php/esp/buscar_esp.php
index 8866dd91..9ea089e9 100644
--- a/admin/WebConsole/idiomas/php/esp/buscar_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/buscar_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________
//
// Fichero de idiomas php: buscar_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/clases/Almanaque_esp.php b/admin/WebConsole/idiomas/php/esp/clases/Almanaque_esp.php
index 868fc394..93e3e20e 100644
--- a/admin/WebConsole/idiomas/php/esp/clases/Almanaque_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/clases/Almanaque_esp.php
@@ -1,4 +1,4 @@
- <?
+<?php
/*============================================================================
Esta clase genera tablas HTML para selección de fechas (Versión inglesa)
@@ -72,14 +72,22 @@ class Almanaque{
$this->semanas[5]=array ("5ª",0x10);
$this->semanas[6]=array ("Última",0x20);
- $this->numero_annos[1]=array ("2010",0x01); // tamaño 1 bytes
- $this->numero_annos[2]=array ("2011",0x02);
- $this->numero_annos[3]=array ("2012",0x04);
- $this->numero_annos[4]=array ("2013",0x08);
- $this->numero_annos[5]=array ("2014",0x10);
- $this->numero_annos[6]=array ("2015",0x20);
- $this->numero_annos[7]=array ("2016",0x40);
- $this->numero_annos[8]=array ("2017",0x80);
+ $this->numero_annos[2010]=0x0001; // tamaño 2 bytes
+ $this->numero_annos[2011]=0x0002;
+ $this->numero_annos[2012]=0x0004;
+ $this->numero_annos[2013]=0x0008;
+ $this->numero_annos[2014]=0x0010;
+ $this->numero_annos[2015]=0x0020;
+ $this->numero_annos[2016]=0x0040;
+ $this->numero_annos[2017]=0x0080;
+ $this->numero_annos[2018]=0x0100;
+ $this->numero_annos[2019]=0x0200;
+ $this->numero_annos[2020]=0x0400;
+ $this->numero_annos[2021]=0x0800;
+ $this->numero_annos[2022]=0x1000;
+ $this->numero_annos[2023]=0x2000;
+ $this->numero_annos[2024]=0x4000;
+ $this->numero_annos[2025]=0x8000;
$this->numero_dias[1]=0x00000001; // tamaño 4 bytes
$this->numero_dias[2]=0x00000002;
@@ -179,11 +187,11 @@ class Almanaque{
$HTML_calendario='<TABLE id="tabla_annos" class="'.$this->clase.'">'.chr(13);
$HTML_calendario.='<TR>'.chr(13);
$HTML_calendario.='<TH style="cursor:pointer" onclick="TH_'.$this->onclick.'">Años</TH></TR>'.chr(13); // Literal años
- for ($i=1;$i<9;$i++){
- $HTML_calendario.='<TR><TD align="center" id="'.$this->numero_annos[$i][0].'"
- value="'.$this->numero_annos[$i][1].'" style="cursor:pointer"
+ for ($i=$ano_desde; $i<=$ano_hasta; $i++){
+ $HTML_calendario.='<TR><TD align="center" id="'.$i.'"
+ value="'.$this->numero_annos[$i].'" style="cursor:pointer"
onmouseover="'.$this->onmouseover.'" onmouseout="'.$this->onmouseout.'"
- onclick="'.$this->onclick.'">'.$this->numero_annos[$i][0].'</TD></TR>'.chr(13);
+ onclick="'.$this->onclick.'">'.$i.'</TD></TR>'.chr(13);
}
$HTML_calendario.='</TABLE>'.chr(13);
return($HTML_calendario);
diff --git a/admin/WebConsole/idiomas/php/esp/clases/Calendario_esp.php b/admin/WebConsole/idiomas/php/esp/clases/Calendario_esp.php
index 91fcd2e6..bd529710 100644
--- a/admin/WebConsole/idiomas/php/esp/clases/Calendario_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/clases/Calendario_esp.php
@@ -1,4 +1,4 @@
- <?
+ <?php
/*========================================================================================================
Esta clase genera tablas HTML para selección de fechas (Versión inglesa)
diff --git a/admin/WebConsole/idiomas/php/esp/colasacciones_esp.php b/admin/WebConsole/idiomas/php/esp/colasacciones_esp.php
index e0d8bd33..61d30f59 100644
--- a/admin/WebConsole/idiomas/php/esp/colasacciones_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/colasacciones_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: colasacciones_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/colasreservas_esp.php b/admin/WebConsole/idiomas/php/esp/colasreservas_esp.php
index 20ac2065..47cc462e 100644
--- a/admin/WebConsole/idiomas/php/esp/colasreservas_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/colasreservas_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: colasreservas_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/apagar_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/apagar_esp.php
index bfdd6783..ed52489e 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/apagar_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/apagar_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: apagar_esp.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/arrancar_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/arrancar_esp.php
index 3e82fbcc..0fdae000 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/arrancar_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/arrancar_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: arrancar_esp.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/comando_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/comando_esp.php
index a56c1fbd..80adc851 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/comando_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/comando_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: comando_esp.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/configurar_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/configurar_esp.php
index fd2343a5..49bfc20b 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/configurar_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/configurar_esp.php
@@ -44,4 +44,6 @@
$TbMsg[32]='Tamaño de partición';
$TbMsg[33]='Nombre de la Imagen ';
$TbMsg[34]='Perfil software';
+
+ $TbMsg["HD"]='Disco';
?>
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/conmutar_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/conmutar_esp.php
index c34c5804..67ab7a7c 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/conmutar_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/conmutar_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: conmutar_esp.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/crearimagen_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/crearimagen_esp.php
index 01801683..4dfbd433 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/crearimagen_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/crearimagen_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: crearperfilsoftware_esp.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/crearimagenbasica_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/crearimagenbasica_esp.php
index bfef1056..5ee1bc70 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/crearimagenbasica_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/crearimagenbasica_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: crearimagenbasica_esp.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/crearperfilsoftware_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/crearperfilsoftware_esp.php
index c7e63493..fa67edff 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/crearperfilsoftware_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/crearperfilsoftware_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: crearperfilsoftware_esp.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/crearsoftincremental_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/crearsoftincremental_esp.php
index 1ec2ba80..d5778d84 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/crearsoftincremental_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/crearsoftincremental_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: crearsoftincremental_esp.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/ejecutarscripts_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/ejecutarscripts_esp.php
index aae8ab21..5f823ab2 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/ejecutarscripts_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/ejecutarscripts_esp.php
@@ -17,6 +17,13 @@
$TbMsg[9]='C&oacute;digo del script';
$TbMsg[10]='Datos a suministrar';
$TbMsg[11]='Eliminar Imagen de la Cach&eacute; de Cliente';
+ $TbMsg[12]='&nbsp;Modo de ejecución *&nbsp;';
+ $TbMsg[13]='Sistema';
+ $TbMsg[14]='Usuario';
+ $TbMsg[15]="AVISO El modo de ejecución sólo se aplica a los agentes de sistema operativo nuevos: <br>
+ * El modo usuario sólo es válido si está iniciada la sesión en modo gráfico.<br>
+ * El lenguaje del script a enviar debe corresponder al estado de cliente.<br>
+ * Para Windows hay que escapar las contrabarras.";
$TbMsg["WDI10"]='Modificar código';
$TbMsg["WDI11"]='Asistente de Despliegue de la imagen';
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/eliminarimagencache_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/eliminarimagencache_esp.php
index ecb710b1..2107a4f8 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/eliminarimagencache_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/eliminarimagencache_esp.php
@@ -5,11 +5,11 @@
// Idioma: Espa�ol
//________________________________________________________________________________________________________
if (empty ($TbMsg)) $TbMsg=array();
- $TbMsg[0]='Creaci&oacute;n de Imagen';
- $TbMsg[1]='Caracter&iacute;sticas del ordenador';
- $TbMsg[2]='Nombre';
- $TbMsg[3]='Direcci&oacute;n IP';
- $TbMsg[4]='Direcci&oacute;n MAC';
+ $TbMsg[0]='Unidad Organizativa';
+ $TbMsg[1]='Grupo de aulas';
+ $TbMsg[2]='Aula';
+ $TbMsg[3]='Grupo de ordenadores';
+ $TbMsg[4]='Ordenador';
$TbMsg[5]='Eliminar Imagen de la Cache en Cliente';
$TbMsg[6]='Datos a suministrar';
$TbMsg[7]='Im&aacute;genes Disponibles';
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/eliminarimagenrepo_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/eliminarimagenrepo_esp.php
index c10f5094..d63711a9 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/eliminarimagenrepo_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/eliminarimagenrepo_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: eliminarimagencache_esp.php (Comandos)
@@ -38,4 +38,5 @@
$TbMsg[30]='Unidad Organizativa';
$TbMsg[31]='Archivo';
$TbMsg[32]='Directorio';
+ $TbMsg[33]='AVISO: La imagen está situada en un directorio que no corresponde a la unidad organizativa.';
?>
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/enviarmensaje_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/enviarmensaje_esp.php
new file mode 100644
index 00000000..1e24f37f
--- /dev/null
+++ b/admin/WebConsole/idiomas/php/esp/comandos/enviarmensaje_esp.php
@@ -0,0 +1,24 @@
+<?php
+//________________________________________________________________________________________________________
+//
+// Fichero de idiomas php: enviarmensaje_esp.php (Comandos)
+// Idioma: Español
+//________________________________________________________________________________________________________
+ if (empty ($TbMsg)) $TbMsg=array();
+ $TbMsg[0]='Centros';
+ $TbMsg[1]='Grupo de aulas';
+ $TbMsg[2]='Aulas';
+ $TbMsg[3]='Grupo de ordenadores';
+ $TbMsg[4]='Ordenadores';
+ $TbMsg[5]='Enviar Mensaje';
+ $TbMsg[6]='&Aacute;mbito';
+ $TbMsg[7]='T&iacute;tulo';
+ $TbMsg[8]='Descripci&oacute;n';
+ $TbMsg[9]=' Texto del mensaje ';
+ $TbMsg[10]='Datos a suministrar';
+
+ $TbMsg["OGAGENT"]="AVISO: Sólo se puede utilizar en los equipos que se haya iniciado la sesión <br>y tengan instalado en nuevo agente de OpenGnsys.";
+ $TbMsg["OPTION"]="AVISO: El nuevo agente, en esta versión, no permite utilizar la cola de acciones.";
+
+?>
+
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/gestor_ejecutarscripts_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/gestor_ejecutarscripts_esp.php
index ca0d1042..1b8386e5 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/gestor_ejecutarscripts_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/gestor_ejecutarscripts_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: gestor_ejecutarscripts_esp.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/mensajes_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/mensajes_esp.php
index 77ecd669..391a39e4 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/mensajes_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/mensajes_esp.php
@@ -11,6 +11,7 @@ $TbMsg["COMMAND_Configurar"]="Particionar y Formatear";
$TbMsg["COMMAND_CrearImagen"]="Crear Imagen";
$TbMsg["COMMAND_EjecutarScript"]="Ejecutar Script";
$TbMsg["COMMAND_EliminarImagenCache"]="Eliminar Imagen Cache";
+$TbMsg["COMMAND_EnviarMensaje"]="Enviar Mensaje";
$TbMsg["COMMAND_IniciarSesion"]="Iniciar Sesi&oacute;n";
$TbMsg["COMMAND_InventarioHardware"]="Inventario Hardware";
$TbMsg["COMMAND_InventarioSoftware"]="Inventario Software";
@@ -21,13 +22,6 @@ $TbMsg["COMMAND_CrearImagenBasica"]="Crear Imagen B&aacute;sica";
$TbMsg["COMMAND_RestaurarImagenBasica"]="Restaurar Imagen B&aacute;sica";
$TbMsg["COMMAND_CrearSoftIncremental"]="Crear Imagen Incremental";
$TbMsg["COMMAND_RestaurarSoftIncremental"]="Restaurar Imagen Incremental";
-
-$TbMsg["COMMAND_CreateBaseImage"]="Crear Imagen B&aacute;sica";
-$TbMsg["COMMAND_RestoreBaseImage"]="Restaurar Imagen B&aacute;sica";
-$TbMsg["COMMAND_CreateDiffImage"]="Crear Imagen Diferencial";
-$TbMsg["COMMAND_RestoreDiffImage"]="Restaurar Imagen Diferencial";
-
-
$TbMsg["WIZARD_Asistente Particionado"]="Asistente de particionado";
$TbMsg["WIZARD_Asistente Clonacion Particiones Remotas"]="Clonar particiones remotas";
$TbMsg["WIZARD_Asistente Deploy de Imagenes"]="Deploy de imagenes";
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/opcionesacciones_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/opcionesacciones_esp.php
index a25d6c18..469b7bbc 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/opcionesacciones_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/opcionesacciones_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: opcionesacciones_esp.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/particionaryformatear_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/particionaryformatear_esp.php
index e309dce1..55d0e2f6 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/particionaryformatear_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/particionaryformatear_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: particionaryformatear_esp.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/reiniciar_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/reiniciar_esp.php
index 1dd0a887..f523fa5f 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/reiniciar_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/reiniciar_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: reiniciar_esp.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/rembooffline_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/rembooffline_esp.php
index fd048c06..1c437219 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/rembooffline_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/rembooffline_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: rembooffline_esp.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/restaurarimagen_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/restaurarimagen_esp.php
index 1bb81e5f..7c05b974 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/restaurarimagen_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/restaurarimagen_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: restaurarimagen_esp.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/restaurarimagenbasica_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/restaurarimagenbasica_esp.php
index 0f07b09a..598351fe 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/restaurarimagenbasica_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/restaurarimagenbasica_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: restaurarimagenbasica_esp.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/restaurarsoftincremental_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/restaurarsoftincremental_esp.php
index a0c26069..e7b63c0a 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/restaurarsoftincremental_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/restaurarsoftincremental_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: restaurarsoftincremental_esp.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/esp/comandos/tomaconfiguracion_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/tomaconfiguracion_esp.php
index 7bc1e25e..a11a381a 100644
--- a/admin/WebConsole/idiomas/php/esp/comandos/tomaconfiguracion_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/comandos/tomaconfiguracion_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: tomaconfiguracion_esp.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/esp/configuraciones_esp.php b/admin/WebConsole/idiomas/php/esp/configuraciones_esp.php
index 9bd274b2..4571d8ee 100644
--- a/admin/WebConsole/idiomas/php/esp/configuraciones_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/configuraciones_esp.php
@@ -15,7 +15,7 @@ $TbMsg[5]="Nombre";
$TbMsg[6]="Ubicaci&oacute;n";
$TbMsg[7]="Proyector";
$TbMsg[8]="Pizarra";
-$TbMsg[9]="Puestos";
+$TbMsg[9]="Aforo";
$TbMsg[10]="URL Imagen";
$TbMsg[11]="Men&uacute;";
$TbMsg[12]="Comentarios";
diff --git a/admin/WebConsole/idiomas/php/esp/conmutar_esp.php b/admin/WebConsole/idiomas/php/esp/conmutar_esp.php
index c913ddfb..cdb455e9 100644
--- a/admin/WebConsole/idiomas/php/esp/conmutar_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/conmutar_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: conmutar_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/consolaremota_esp.php b/admin/WebConsole/idiomas/php/esp/consolaremota_esp.php
index 0210a511..c8f54c24 100644
--- a/admin/WebConsole/idiomas/php/esp/consolaremota_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/consolaremota_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: incorporaordenadores_esp.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/esp/descargas_esp.php b/admin/WebConsole/idiomas/php/esp/descargas_esp.php
new file mode 100644
index 00000000..fa4898ff
--- /dev/null
+++ b/admin/WebConsole/idiomas/php/esp/descargas_esp.php
@@ -0,0 +1,13 @@
+<?php
+// Aviso: no dejar ningún carácter fuera del código PHP.
+//______________________________________________________________
+//
+// Fichero de idiomas php: descargas_esp.php
+// Idioma: Español
+//______________________________________________________________
+if (empty ($TbMsg)) $TbMsg=array();
+$TbMsg['DOWNLOADS']="Descargas disponibles";
+$TbMsg['NOFILES']="No hay ficheros disponibles";
+
+// Aviso: no dejar ningún carácter fuera del código PHP.
+?>
diff --git a/admin/WebConsole/idiomas/php/esp/ecoremoto_esp.php b/admin/WebConsole/idiomas/php/esp/ecoremoto_esp.php
index 669c225c..d291a1ec 100644
--- a/admin/WebConsole/idiomas/php/esp/ecoremoto_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/ecoremoto_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: incorporaordenadores_esp.php (Comandos)
diff --git a/admin/WebConsole/idiomas/php/esp/ejecutaracciones_esp.php b/admin/WebConsole/idiomas/php/esp/ejecutaracciones_esp.php
index 54109068..7007ecd0 100644
--- a/admin/WebConsole/idiomas/php/esp/ejecutaracciones_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/ejecutaracciones_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: acciones_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/estados_esp.php b/admin/WebConsole/idiomas/php/esp/estados_esp.php
index 135ea747..75adfdf4 100644
--- a/admin/WebConsole/idiomas/php/esp/estados_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/estados_esp.php
@@ -9,8 +9,13 @@ if (empty ($TbMsg)) $TbMsg=array();
$TbMsg["STATUS_BSY"]="Ocupado";
$TbMsg["STATUS_INI"]="Iniciando";
$TbMsg["STATUS_OFF"]="Apagado";
-$TbMsg["STATUS_OPG"]="OpenGnSys";
+$TbMsg["STATUS_OPG"]="OpenGnsys";
$TbMsg["STATUS_LNX"]="GNU/Linux";
$TbMsg["STATUS_WXP"]="Windows";
+// Estados nuevo agente OGAgent.
+$TbMsg["STATUS_LNXS"]="Sesi&oacute;n GNU/Linux";
+$TbMsg["STATUS_OSX"]="macOS";
+$TbMsg["STATUS_WIN"]="Windows";
+$TbMsg["STATUS_WINS"]="Sesi&oacute;n Windows";
?>
diff --git a/admin/WebConsole/idiomas/php/esp/gestor_ordenadores_esp.php b/admin/WebConsole/idiomas/php/esp/gestor_ordenadores_esp.php
new file mode 100644
index 00000000..2946a0c4
--- /dev/null
+++ b/admin/WebConsole/idiomas/php/esp/gestor_ordenadores_esp.php
@@ -0,0 +1,10 @@
+<?php
+//______________________________________________________________
+//
+// Fichero de idiomas php: gestor_ordenadores_esp.php
+// Idioma: Español
+//______________________________________________________________
+$TbMsg=array();
+$TbMsg["DUPLICADO"]="Error al insertar el ordenador, se han encontrado datos duplicados: ";
+?>
+
diff --git a/admin/WebConsole/idiomas/php/esp/hardwares_esp.php b/admin/WebConsole/idiomas/php/esp/hardwares_esp.php
index be3ae563..070cbe82 100644
--- a/admin/WebConsole/idiomas/php/esp/hardwares_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/hardwares_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: hardwares_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/iconos_esp.php b/admin/WebConsole/idiomas/php/esp/iconos_esp.php
index 1836a4d6..ef11d99c 100644
--- a/admin/WebConsole/idiomas/php/esp/iconos_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/iconos_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: m_iconos_esp.php (
diff --git a/admin/WebConsole/idiomas/php/esp/imagenes_esp.php b/admin/WebConsole/idiomas/php/esp/imagenes_esp.php
index 3abb5600..59dc3493 100644
--- a/admin/WebConsole/idiomas/php/esp/imagenes_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/imagenes_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: imagenes_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/imagenincremental_esp.php b/admin/WebConsole/idiomas/php/esp/imagenincremental_esp.php
index fac1af2b..8e934497 100644
--- a/admin/WebConsole/idiomas/php/esp/imagenincremental_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/imagenincremental_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: imagenincremental_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/inclusionacciones_esp.php b/admin/WebConsole/idiomas/php/esp/inclusionacciones_esp.php
index bc875e14..fd834a03 100644
--- a/admin/WebConsole/idiomas/php/esp/inclusionacciones_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/inclusionacciones_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: inclusionacciones_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/incrementalcomponente_soft_esp.php b/admin/WebConsole/idiomas/php/esp/incrementalcomponente_soft_esp.php
index aa43f008..ae73e175 100644
--- a/admin/WebConsole/idiomas/php/esp/incrementalcomponente_soft_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/incrementalcomponente_soft_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: incrementalcomponente_soft_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/informacion_acciones_esp.php b/admin/WebConsole/idiomas/php/esp/informacion_acciones_esp.php
index 04c55a73..00d0b0b0 100644
--- a/admin/WebConsole/idiomas/php/esp/informacion_acciones_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/informacion_acciones_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: informacion_perfileshard_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/informacion_imagenes_esp.php b/admin/WebConsole/idiomas/php/esp/informacion_imagenes_esp.php
index 70bfe202..2ff8c16d 100644
--- a/admin/WebConsole/idiomas/php/esp/informacion_imagenes_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/informacion_imagenes_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: informacion_imagenes_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/informacion_incrementales_esp.php b/admin/WebConsole/idiomas/php/esp/informacion_incrementales_esp.php
index ba0f7883..e72f55ea 100644
--- a/admin/WebConsole/idiomas/php/esp/informacion_incrementales_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/informacion_incrementales_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: informacion_incrementales_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/informacion_menus_esp.php b/admin/WebConsole/idiomas/php/esp/informacion_menus_esp.php
index 1e22cf36..1c51b61d 100644
--- a/admin/WebConsole/idiomas/php/esp/informacion_menus_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/informacion_menus_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: informacion_menus_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/informacion_perfileshard_esp.php b/admin/WebConsole/idiomas/php/esp/informacion_perfileshard_esp.php
index 1af1dd3b..c5f034cb 100644
--- a/admin/WebConsole/idiomas/php/esp/informacion_perfileshard_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/informacion_perfileshard_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: informacion_perfileshard_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/informacion_perfilessoft_esp.php b/admin/WebConsole/idiomas/php/esp/informacion_perfilessoft_esp.php
index 751f2692..48ff637c 100644
--- a/admin/WebConsole/idiomas/php/esp/informacion_perfilessoft_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/informacion_perfilessoft_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: informacion_perfilessoft_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/informacion_procedimientos_esp.php b/admin/WebConsole/idiomas/php/esp/informacion_procedimientos_esp.php
index e3f7e877..52774eaa 100644
--- a/admin/WebConsole/idiomas/php/esp/informacion_procedimientos_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/informacion_procedimientos_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: informacion_procedimientos_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/informacion_tareas_esp.php b/admin/WebConsole/idiomas/php/esp/informacion_tareas_esp.php
index b5ac5541..2e27a880 100644
--- a/admin/WebConsole/idiomas/php/esp/informacion_tareas_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/informacion_tareas_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: informacion_tareas_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/menucliente_esp.php b/admin/WebConsole/idiomas/php/esp/menucliente_esp.php
index d0ea8d30..8a532162 100644
--- a/admin/WebConsole/idiomas/php/esp/menucliente_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/menucliente_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: menuscliente_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/menus_esp.php b/admin/WebConsole/idiomas/php/esp/menus_esp.php
index 2cd3a78a..5f7acc40 100644
--- a/admin/WebConsole/idiomas/php/esp/menus_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/menus_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: menus_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/msgbrowser_esp.php b/admin/WebConsole/idiomas/php/esp/msgbrowser_esp.php
index 76ad742d..7d3d8625 100644
--- a/admin/WebConsole/idiomas/php/esp/msgbrowser_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/msgbrowser_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: msgbrowser.php
diff --git a/admin/WebConsole/idiomas/php/esp/nada_esp.php b/admin/WebConsole/idiomas/php/esp/nada_esp.php
index cbcdeb28..24ffedbe 100644
--- a/admin/WebConsole/idiomas/php/esp/nada_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/nada_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: nada_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/perfilcomponente_hard_esp.php b/admin/WebConsole/idiomas/php/esp/perfilcomponente_hard_esp.php
index 128254e0..e40db5fa 100644
--- a/admin/WebConsole/idiomas/php/esp/perfilcomponente_hard_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/perfilcomponente_hard_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: perfilcomponente_hard_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/perfilcomponente_soft_esp.php b/admin/WebConsole/idiomas/php/esp/perfilcomponente_soft_esp.php
index 0f928378..d70a6dfd 100644
--- a/admin/WebConsole/idiomas/php/esp/perfilcomponente_soft_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/perfilcomponente_soft_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: perfilcomponente_soft_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/pintaParticiones_esp.php b/admin/WebConsole/idiomas/php/esp/pintaParticiones_esp.php
index a1bf2d14..889eef9b 100644
--- a/admin/WebConsole/idiomas/php/esp/pintaParticiones_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/pintaParticiones_esp.php
@@ -11,15 +11,22 @@ if(!isset($TbMsg)){
$TbMsg["PARTITION"]='Partici&oacute;n';
$TbMsg["INST_SO"]='S.O. Instalado';
+$TbMsg["INSTALLED_OS"]='Sistema Operativo Instalado';
$TbMsg["SIZE_KB"]='Tama&ntilde;o (KB)';
$TbMsg["PARTITION_TYPE"]='Tipo';
$TbMsg["IMAGE"]='Imagen';
$TbMsg["SOFT_PROFILE"]='Perfil Software';
+$TbMsg["FILESYSTEM"]='Sistema de Ficheros';
$TbMsg["FILESYSTEM_SHORT"]='S.F.';
+$TbMsg["REFORMAT"]='Reformatear';
+$TbMsg["REMOVE"]='Eliminar';
+
$TbMsg["DISK"]='Disco';
$TbMsg["CONFIG_PARTTABLE"]='Tabla de particiones';
+$TbMsg["USAGE"]='Uso';
+
$TbMsg["VARIABLE"]='Variable';
$TbMsg["CACHE_CONTENT"]='Fecha/Cach&eacute;';
$TbMsg["CACHE_FREESPACE"]='Cach&eacute; libre';
@@ -47,7 +54,9 @@ $TbMsg["TITLE_W"]='Opción de rsync: El algoritmo incremental rsync no se usa y
$TbMsg["TITLE_E"]='Opción de rsync: Se compara el destino con el origen y se borran los ficheros que no existen en el primero.';
$TbMsg["TITLE_C"]='Opción de rsync: Comprime los archivos de datos que se envían a la máquina de destino, lo que reduce la cantidad de datos que se transmiten. ';
$TbMsg["SEND"]='Protocolo';
-
+// AVISOS.
$TbMsg["WARN_PROTOCOL"]='La opción "protocolo" sólo se utiliza en las sincronizadas tipo archivo la primera vez que se envía la imagen a caché. <br>En otro caso el protocolo es RSYNC.';
+$TbMsg["WARN_DIFFIMAGE"]='Hay una nueva versi&oacute;n de la imagen (se muestra la diferencia de revisiones).';
+$TbMsg["WARN_DIFFDISKSIZE"]='ATENCI&Oacute;N: no se pueden particionar grupos de ordenadores con distinto tama&ntilde;o de disco.<br>Marcar la opción de &quot;Desagrupar por tama&ntilde;o de partici&oacute;n&quot; y pulsar &quot;Aceptar&quot; en el men&uacute; superior para aplicar esta operaci&oacute;n adecuadamente.';
?>
diff --git a/admin/WebConsole/idiomas/php/esp/procedimientoscomandos_esp.php b/admin/WebConsole/idiomas/php/esp/procedimientoscomandos_esp.php
index ced99b29..ec630b99 100644
--- a/admin/WebConsole/idiomas/php/esp/procedimientoscomandos_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/procedimientoscomandos_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: procedimientoscomandos_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/programaciones_esp.php b/admin/WebConsole/idiomas/php/esp/programaciones_esp.php
index 71b5f6ec..3447d1e8 100644
--- a/admin/WebConsole/idiomas/php/esp/programaciones_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/programaciones_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: programaciones_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/programacionesaulas_esp.php b/admin/WebConsole/idiomas/php/esp/programacionesaulas_esp.php
index 80513f18..fe53ba81 100644
--- a/admin/WebConsole/idiomas/php/esp/programacionesaulas_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/programacionesaulas_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: colasreservas_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/programacionesreservas_esp.php b/admin/WebConsole/idiomas/php/esp/programacionesreservas_esp.php
index 0acf21b6..483472a0 100644
--- a/admin/WebConsole/idiomas/php/esp/programacionesreservas_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/programacionesreservas_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: colasreservas_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/propiedades_aulas_esp.php b/admin/WebConsole/idiomas/php/esp/propiedades_aulas_esp.php
index cffb26ed..9141da5b 100644
--- a/admin/WebConsole/idiomas/php/esp/propiedades_aulas_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/propiedades_aulas_esp.php
@@ -14,8 +14,8 @@ $TbMsg[5]="Nombre";
$TbMsg[6]="Ubicaci&oacute;n";
$TbMsg[7]="Proyector";
$TbMsg[8]="Pizarra";
-$TbMsg[9]="Puestos";
-$TbMsg[10]="URL Imagen";
+$TbMsg[9]="Aforo";
+$TbMsg[10]="Foto";
$TbMsg[11]="Men&uacute;";
$TbMsg[12]="Comentarios";
$TbMsg[13]="Reservas";
@@ -23,7 +23,8 @@ $TbMsg[14]="Hora desde:";
$TbMsg[15]="Hora hasta:";
$TbMsg[16]="Repositorio";
$TbMsg[17]="Perfil hardware";
-$TbMsg[18]="Propiedades aplicables a todos los ordenadores";
+$TbMsg[18]="Asignar propiedades al objeto Aula";
+$TbMsg[1888]="Modificador masivo de propiedades de ordenadores";
$TbMsg[19]="Tama&ntilde;o cach&eacute; (KB)";
$TbMsg[20]="Autoexec";
$TbMsg[21]="Ordenadores";
@@ -40,12 +41,21 @@ $TbMsg[30]="Validaci&oacute;n";
$TbMsg[31]="P&aacute;gina login";
$TbMsg[32]="P&aacute;gina validaci&oacute;n";
// UHU
+// AGP
+$TbMsg[33]="ogLive";
+$TbMsg[34]="*** Existen equipos con diferentes ogLive ***";
$TbMsg[495]="Fecha/Cach&eacute;";
$TbMsg[509]="Foto ordenador";
$TbMsg[5091]="Insertar foto";
$TbMsg[5092]="Ver fotos";
+// AGP
// Ramón
+$TbMsg['PROP_NTPIP']="IP Servidor NTP <em>(opcional)</em>";
$TbMsg['PROP_DNSIP']="IP Servidor DNS <em>(opcional)</em>";
$TbMsg['PROP_PROXYURL']="URL Servidor Proxy <em>(opcional)</em>";
+$TbMsg['COMM_DEFTIMEZONE']="zona horaria por defecto";
+$TbMsg['PROP_REMOTEACCESS']="Acceso remoto";
+$TbMsg['COMM_REMOTEACCESS']="permitir gesti&oacute;n de acceso remoto a los ordenadores";
+$TbMsg['COMM_DEFOGLIVE']="Asignado por el administrador";
?>
diff --git a/admin/WebConsole/idiomas/php/esp/propiedades_centros_esp.php b/admin/WebConsole/idiomas/php/esp/propiedades_centros_esp.php
index 65d3092c..9ae392d5 100644
--- a/admin/WebConsole/idiomas/php/esp/propiedades_centros_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/propiedades_centros_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_ordenadores_esp.php
@@ -12,5 +12,6 @@ $TbMsg[3]="Eliminar";
$TbMsg[4]="Gestión de Unidades Organizativas";
$TbMsg[5]="Nombre de la unidad";
$TbMsg[6]="Comentarios";
+$TbMsg['DIR']="Directorio";
+$TbMsg['MSG_OGUNIT']="Si se elige separar por unidades organizativas, el directorio <b>/opt/opengnsys/images</b><br> debe contener un subdirectorio llamado como el directorio indicado.";
?>
- \ No newline at end of file
diff --git a/admin/WebConsole/idiomas/php/esp/propiedades_componentehardwares_esp.php b/admin/WebConsole/idiomas/php/esp/propiedades_componentehardwares_esp.php
index 2badfbd2..e567637a 100644
--- a/admin/WebConsole/idiomas/php/esp/propiedades_componentehardwares_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/propiedades_componentehardwares_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_componentehardwares_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/propiedades_componentesoftwares_esp.php b/admin/WebConsole/idiomas/php/esp/propiedades_componentesoftwares_esp.php
index 4a5ad618..7c03d6e8 100644
--- a/admin/WebConsole/idiomas/php/esp/propiedades_componentesoftwares_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/propiedades_componentesoftwares_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_componentesoftwares_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/propiedades_entidades_esp.php b/admin/WebConsole/idiomas/php/esp/propiedades_entidades_esp.php
index 6b44d216..2136aa78 100644
--- a/admin/WebConsole/idiomas/php/esp/propiedades_entidades_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/propiedades_entidades_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_ordenadores_esp.php
@@ -12,5 +12,5 @@ $TbMsg[3]="Eliminar";
$TbMsg[4]="Gestión Entidades";
$TbMsg[5]="Nombre de la Entidad";
$TbMsg[6]="Comentarios";
+$TbMsg['OGUNIT']="Separar unidades organizativas";
?>
- \ No newline at end of file
diff --git a/admin/WebConsole/idiomas/php/esp/propiedades_entornos_esp.php b/admin/WebConsole/idiomas/php/esp/propiedades_entornos_esp.php
index dd7bbb53..3366d1b1 100644
--- a/admin/WebConsole/idiomas/php/esp/propiedades_entornos_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/propiedades_entornos_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_aulas_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/propiedades_grupos_esp.php b/admin/WebConsole/idiomas/php/esp/propiedades_grupos_esp.php
index 1ac0bb97..0cb12716 100644
--- a/admin/WebConsole/idiomas/php/esp/propiedades_grupos_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/propiedades_grupos_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_tareas_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/propiedades_imagenes_esp.php b/admin/WebConsole/idiomas/php/esp/propiedades_imagenes_esp.php
index 46ff5b76..058f7512 100644
--- a/admin/WebConsole/idiomas/php/esp/propiedades_imagenes_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/propiedades_imagenes_esp.php
@@ -1,30 +1,35 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_imagenes_esp.php
// Idioma: Español
//________________________________________________________________________________________________________
$TbMsg=array();
-$TbMsg[0]="Sin Opción";
+$TbMsg[0]="Sin Opci&oacute;n";
$TbMsg[1]="Insertar";
$TbMsg[2]="Modificar";
$TbMsg[3]="Eliminar";
-$TbMsg[4]="Gestión Imágenes Monolíticas";
-$TbMsg[5]="Descripción";
+$TbMsg[4]="Gesti&oacute;n Im&aacute;genes Monolíticas";
+$TbMsg[5]="Descripci&oacute;n";
$TbMsg[6]="Perfil Software";
$TbMsg[7]="Comentarios";
-$TbMsg[8]="Disco, Partición";
-$TbMsg[9]="Tipo partición";
+$TbMsg[8]="Disco, Partici&oacute;n";
+$TbMsg[9]="Tipo partici&oacute;n";
$TbMsg[10]="Repositorio";
$TbMsg[11]="Nombre";
-$TbMsg[12]="Gestión Imágenes Básicas";
-$TbMsg[13]="Gestión Imágenes Incrementales";
-$TbMsg[14]="Imagen básica";
-$TbMsg[15]="ATENCIÓN.- Una imagen que tiene perfil software indica que en algún momento se ha creado <br>
+$TbMsg[12]="Gesti&oacute;n Im&aacute;genes B&aacute;sicas";
+$TbMsg[13]="Gesti&oacute;n Im&aacute;genes Incrementales";
+$TbMsg[14]="Imagen b&aacute;sica";
+$TbMsg[15]="ATENCI&Oacute;N.- Una imagen que tiene perfil software indica que en alg&uacute;n momento se ha creado <br>
y por tanto no pueden modificarse ciertos datos a menos que la elimine y la vuelva a crear";
$TbMsg[16]="Ruta Origen";
-$TbMsg[17]='"Nombre canónico fichero-imagen existe : Introduzca otro nombre"';
+$TbMsg[17]='"Nombre canónico fichero-imagen existe : Introduzca otro nombre"'; // JavaScript
$TbMsg[18]="Introduzca otro Nombre";
$TbMsg[19]="Equipo modelo";
-$TbMsg[20]="Fecha de creación";
+$TbMsg[20]="Fecha de creaci&oacute;n";
+$TbMsg[21]='"Descripción Nombre fichero-imagen existe : Introduzca otra Descripción"'; // JavaScript
+$TbMsg[22]="Introduzca otra Descripci&oacute;n";
+$TbMsg['PROP_OS']="Sistema operativo";
+$TbMsg['PROP_REMOTEACCESS']="Acceso remoto";
+$TbMsg['COMM_REMOTEACCESS']="permitir gesti&oacute;n de acceso remoto a los ordenadores";
?>
diff --git a/admin/WebConsole/idiomas/php/esp/propiedades_menus_esp.php b/admin/WebConsole/idiomas/php/esp/propiedades_menus_esp.php
index b39705ef..7435bb5a 100644
--- a/admin/WebConsole/idiomas/php/esp/propiedades_menus_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/propiedades_menus_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_menus_esp.php
@@ -21,4 +21,5 @@ $TbMsg[14]="Menú doble";
$TbMsg[15]="URL menú personalizado";
$TbMsg[17]="Resolución de pantalla";
$TbMsg[18]="Imagen de fondo";
+$TbMsg["PROP_DEFAULT"]="Detectada por defecto";
?>
diff --git a/admin/WebConsole/idiomas/php/esp/propiedades_ordenadores_esp.php b/admin/WebConsole/idiomas/php/esp/propiedades_ordenadores_esp.php
index 21d3498e..faa5c3cd 100644
--- a/admin/WebConsole/idiomas/php/esp/propiedades_ordenadores_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/propiedades_ordenadores_esp.php
@@ -4,7 +4,7 @@
// Fichero de idiomas php: propiedades_ordenadores_esp.php
// Idioma: Español
//______________________________________________________________
-$TbMsg=array();
+if (empty ($TbMsg)) $TbMsg=array();
$TbMsg[0]="Sin Opci&oacute;n";
$TbMsg[1]="Insertar";
$TbMsg[2]="Modificar";
@@ -25,10 +25,16 @@ $TbMsg[15]="Validación";
$TbMsg[16]="Pagina login";
$TbMsg[17]="Pagina validación";
// UHU
+// AGP
+$TbMsg[18]="ogLive";
$TbMsg[509]="Foto ordenador";
$TbMsg[5091]="Insertar foto";
$TbMsg[5092]="Ver fotos";
$TbMsg[495]="Fecha/Cach&eacute;";
$TbMsg[4951]="Cach&eacute; libre";
+//AGP
+$TbMsg["PROP_SERIALNO"]="N&ordm; de serie";
+$TbMsg["WARN_NOTDETECTED"]="<em>(no detectado)</em>";
+$TbMsg['COMM_DEFOGLIVE']="Asignado por el administrador";
?>
diff --git a/admin/WebConsole/idiomas/php/esp/propiedades_ordenadorestandar_esp.php b/admin/WebConsole/idiomas/php/esp/propiedades_ordenadorestandar_esp.php
index c21e9b5a..a46a21f5 100644
--- a/admin/WebConsole/idiomas/php/esp/propiedades_ordenadorestandar_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/propiedades_ordenadorestandar_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_ordenadorestandar_esp.php
@@ -12,7 +12,7 @@ $TbMsg[3]="Dirección IP";
$TbMsg[4]="Dirección MAC";
$TbMsg[5]="Perfil hardware";
$TbMsg[6]="Servidor DHCP";
-$TbMsg[7]="Servidor OpenGnSys ";
+$TbMsg[7]="Servidor OpenGnsys ";
$TbMsg[8]="Ordenadores a insertar";
$TbMsg[9]='(*) Para modificar un ordenador con cierto dato, en esta aula, debe introducir el valor correspondiente y dejar el campo "Ordenadores a insertar" a cero.';
$TbMsg[10]="(**)Si se trata de ordenadores nuevos con una configuración por defecto, pero no quiere modificar los ordenadores ya existentes debe introducir un valor mayor que cero.";
diff --git a/admin/WebConsole/idiomas/php/esp/propiedades_perfilsoftwares_esp.php b/admin/WebConsole/idiomas/php/esp/propiedades_perfilsoftwares_esp.php
index fef71b61..b46fcc9d 100644
--- a/admin/WebConsole/idiomas/php/esp/propiedades_perfilsoftwares_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/propiedades_perfilsoftwares_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_perfilsoftwares_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/propiedades_procedimientos_esp.php b/admin/WebConsole/idiomas/php/esp/propiedades_procedimientos_esp.php
index 9c5caf45..f0ffdfc8 100644
--- a/admin/WebConsole/idiomas/php/esp/propiedades_procedimientos_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/propiedades_procedimientos_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_procedimientos_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/propiedades_repositorios_esp.php b/admin/WebConsole/idiomas/php/esp/propiedades_repositorios_esp.php
index 2eae0b47..76a10548 100644
--- a/admin/WebConsole/idiomas/php/esp/propiedades_repositorios_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/propiedades_repositorios_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_servidoresrembo_esp.php
@@ -20,6 +20,13 @@ $TbMsg[11]="Espacio TOTAL";
$TbMsg[12]="Espacio Ocupado";
$TbMsg[13]="Espacio Libre";
$TbMsg[14]="% Ocupado";
-$TbMsg[15]='Limitaciones de esta versi&oacute;n';
-$TbMsg[16]='Informaci&oacute;n de espacio solo disponible si Repositorio y Servidor Web est&aacute;n alojados en el mismo servidor';
+$TbMsg[15]='Sin acceso a informaci&oacute;n del repositorio';
+$TbMsg[16]='Revise la conexión con el repositorio<br>Revise la clave de acceso (campo Api Token debe coincidir con su valor en fichero "ogAdmRepo.cfg")';
+$TbMsg[17]='Api Token';
+$TbMsg['MSG_CONTENT']='Contenido';
+$TbMsg['MSG_IMAGE']='Imagen';
+$TbMsg['MSG_TYPE']='Tipo';
+$TbMsg['MSG_SIZE']='Tama&ntilde;o';
+$TbMsg['MSG_MODIFIED']='Modificado';
+$TbMsg['MSG_PERMISSIONS']='Permisos';
?>
diff --git a/admin/WebConsole/idiomas/php/esp/propiedades_reservas_esp.php b/admin/WebConsole/idiomas/php/esp/propiedades_reservas_esp.php
index 6115645b..49abddd6 100644
--- a/admin/WebConsole/idiomas/php/esp/propiedades_reservas_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/propiedades_reservas_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_reservas_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/propiedades_tareas_esp.php b/admin/WebConsole/idiomas/php/esp/propiedades_tareas_esp.php
index 4b7bce74..cb62e5c8 100644
--- a/admin/WebConsole/idiomas/php/esp/propiedades_tareas_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/propiedades_tareas_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_tareas_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/propiedades_tipohardwares_esp.php b/admin/WebConsole/idiomas/php/esp/propiedades_tipohardwares_esp.php
index 4fe6dff7..aa1a5668 100644
--- a/admin/WebConsole/idiomas/php/esp/propiedades_tipohardwares_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/propiedades_tipohardwares_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_tipohardwares_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/propiedades_universidades_esp.php b/admin/WebConsole/idiomas/php/esp/propiedades_universidades_esp.php
index 16ae50c6..e96e4d53 100644
--- a/admin/WebConsole/idiomas/php/esp/propiedades_universidades_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/propiedades_universidades_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_aulas_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/propiedades_usuarios_esp.php b/admin/WebConsole/idiomas/php/esp/propiedades_usuarios_esp.php
index dfe15349..2014eaa9 100644
--- a/admin/WebConsole/idiomas/php/esp/propiedades_usuarios_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/propiedades_usuarios_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: propiedades_ordenadores_esp.php
@@ -11,7 +11,7 @@ $TbMsg[2]="Modificar";
$TbMsg[3]="Eliminar";
$TbMsg[4]="Gestión Usuarios";
$TbMsg[5]="Usuario";
-$TbMsg[6]="Password";
+$TbMsg[6]="Password*";
$TbMsg[7]="Nombre completo";
$TbMsg[8]="E-mail";
$TbMsg[9]="Unidad organizativa";
@@ -22,5 +22,8 @@ $TbMsg[13]="Operador";
$TbMsg[14]="Para realizar cambios en este usuario<br>";
$TbMsg[15]="creado en el proceso de instalación,<br><br>";
$TbMsg[16]="pulse aquí<br>";
-$TbMsg[17]="http://opengnsys.es/wiki/ModificarUsuarios";
-?> \ No newline at end of file
+$TbMsg[17]="https://opengnsys.es/trac/wiki/ModificarUsuarios";
+$TbMsg[18]="Confirmar password";
+$TbMsg['APIKEY']="API key";
+$TbMsg['NEWAPIKEY']="La API key se generará automáticamente al insertar el usuario.";
+?>
diff --git a/admin/WebConsole/idiomas/php/esp/purgar_esp.php b/admin/WebConsole/idiomas/php/esp/purgar_esp.php
index 82de0465..db6c41f8 100644
--- a/admin/WebConsole/idiomas/php/esp/purgar_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/purgar_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: actualizar_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/repositorios_esp.php b/admin/WebConsole/idiomas/php/esp/repositorios_esp.php
index 0213214c..e5d9919b 100644
--- a/admin/WebConsole/idiomas/php/esp/repositorios_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/repositorios_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: repositorios_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/reservas_esp.php b/admin/WebConsole/idiomas/php/esp/reservas_esp.php
index 50a48f24..2fdc7fb7 100644
--- a/admin/WebConsole/idiomas/php/esp/reservas_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/reservas_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: reservas_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/softwares_esp.php b/admin/WebConsole/idiomas/php/esp/softwares_esp.php
index 9b763d0c..43a759cf 100644
--- a/admin/WebConsole/idiomas/php/esp/softwares_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/softwares_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: softwares_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/sondeo_esp.php b/admin/WebConsole/idiomas/php/esp/sondeo_esp.php
index 4f51d542..78bf8d37 100644
--- a/admin/WebConsole/idiomas/php/esp/sondeo_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/sondeo_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: sondeo_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/tareascomandos_esp.php b/admin/WebConsole/idiomas/php/esp/tareascomandos_esp.php
index f756b4c4..9e2b1fe7 100644
--- a/admin/WebConsole/idiomas/php/esp/tareascomandos_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/tareascomandos_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________________________________________________________
//
// Fichero de idiomas php: tareascomandos_esp.php
diff --git a/admin/WebConsole/idiomas/php/esp/tiposhardwares_esp.php b/admin/WebConsole/idiomas/php/esp/tiposhardwares_esp.php
index 50d901bd..764cdf56 100644
--- a/admin/WebConsole/idiomas/php/esp/tiposhardwares_esp.php
+++ b/admin/WebConsole/idiomas/php/esp/tiposhardwares_esp.php
@@ -1,4 +1,4 @@
-<?
+<?php
//________________________________________________________
//
// Fichero de idiomas php: tiposhardwares_esp.php
@@ -8,8 +8,10 @@ if (empty ($TbMsg)) $TbMsg=Array();
$TbMsg["HARDWARE_aud"]="Dispositivos de sonido";
$TbMsg["HARDWARE_bio"]="Modelo y versi&oacute;n de la BIOS";
$TbMsg["HARDWARE_boa"]="Placas";
+$TbMsg["HARDWARE_boo"]="Tipo de proceso de arranque";
$TbMsg["HARDWARE_bus"]="Bus del sistema";
$TbMsg["HARDWARE_cdr"]="Dispositivos &oacute;pticos CD/DVD";
+$TbMsg["HARDWARE_cha"]="Chasis del sistema";
$TbMsg["HARDWARE_cpu"]="Procesadores";
$TbMsg["HARDWARE_dis"]="Discos";
$TbMsg["HARDWARE_fir"]="Controladores FireWire";
@@ -18,6 +20,7 @@ $TbMsg["HARDWARE_mem"]="Memorias";
$TbMsg["HARDWARE_mod"]="Marca y modelo del equipo";
$TbMsg["HARDWARE_mul"]="Dispositivos Multimedia";
$TbMsg["HARDWARE_net"]="Tarjetas de red";
+$TbMsg["HARDWARE_sto"]="Controladores de almacenamiento";
$TbMsg["HARDWARE_usb"]="Controladores USB";
$TbMsg["HARDWARE_vga"]="Tarjetas gr&aacute;ficas";
?>
diff --git a/admin/WebConsole/images/L_Iconos.php b/admin/WebConsole/images/L_Iconos.php
index 9c03528a..1087eda5 100644
--- a/admin/WebConsole/images/L_Iconos.php
+++ b/admin/WebConsole/images/L_Iconos.php
@@ -1,4 +1,4 @@
-<?
+<?php
// ********************************************************************************************************************
// Aplicacin WEB: ogAdmWebCon
// Autor: Jos Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -50,17 +50,17 @@ var NS=(navigator.appName=="Netscape");
</SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/MenuContextual.js"></SCRIPT>
<SCRIPT language="javascript" src="L_Iconos.js"></SCRIPT>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/iconos_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/iconos_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY OnContextMenu="return false">
- <P align="center"><SPAN class=textos><? echo $TbMsg["SEARCH_OPT"]; ?> </SPAN></P>
+ <P align="center"><SPAN class=textos><?php echo $TbMsg["SEARCH_OPT"]; ?> </SPAN></P>
<FORM name="fdatos" action="L_Iconos.php" method="post">
<INPUT type=hidden name=identificador value="0">
<TABLE align=center class=tabla_busquedas>
<!--------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH>&nbsp;<? echo $TbMsg["TYPE"] ?>&nbsp;</TD>
- <TD ><?
+ <TH>&nbsp;<?php echo $TbMsg["TYPE"] ?>&nbsp;</TD>
+ <TD ><?php
$parametros="0=".chr(13);
$parametros.=$TbMsg["SELECT_WEB"] .chr(13);
$parametros.=$TbMsg["SELECT_ITEMS"] .chr(13);
@@ -75,38 +75,38 @@ var NS=(navigator.appName=="Netscape");
<P align=center><A href="#"><img border=0 src="../images/iconos/busquedas.gif" onclick="document.fdatos.submit()" alt="Buscar"></A></P>
</FORM>
<!--------------------------------------------------------------------------------------------------------------------------------------------------->
-<P align="center"><SPAN class=textos><? echo $TbMsg["SEARCH_RESULT"]. $rs->numeroderegistros?></SPAN></P>
+<P align="center"><SPAN class=textos><?php echo $TbMsg["SEARCH_RESULT"]. $rs->numeroderegistros?></SPAN></P>
<TABLE align="center" class="tabla_listados">
<TR>
<TH align="center">A</TH>
- <TH align="center">&nbsp;<? echo $TbMsg["DESCRIP"] ?>&nbsp;</TH>
- <TH align="center">&nbsp;<? echo $TbMsg["NAME"] ?>&nbsp;</TH>
+ <TH align="center">&nbsp;<?php echo $TbMsg["DESCRIP"] ?>&nbsp;</TH>
+ <TH align="center">&nbsp;<?php echo $TbMsg["NAME"] ?>&nbsp;</TH>
<TH align="center">&nbsp;</TH>
<TH align="center">&nbsp;T&nbsp;</TH>
</TR>
- <?
+ <?php
$TBtipo[1]="W";
$TBtipo[2]="I";
$TBtipo[3]="F";
while (!$rs->EOF){?>
<TR>
- <TD align=center><IMG id=<?=$rs->campos["idicono"]?> style="cursor:hand" onclick="menu_contextual(this)" src="../images/iconos/administrar_off.gif"></TD>
- <TD>&nbsp;<? echo ( $TbMsg[basename($rs->campos["descripcion"])] ) ? $TbMsg[basename($rs->campos["descripcion"])] : basename($rs->campos["descripcion"]); ?>&nbsp;</TD>
- <TD>&nbsp;<? echo basename($rs->campos["urlicono"])?>&nbsp;</TD>
- <TD align=center>&nbsp;<IMG src="./iconos/<? echo $rs->campos["urlicono"] ?>"
+ <TD align=center><IMG id=<?php echo $rs->campos["idicono"]?> style="cursor:hand" onclick="menu_contextual(this)" src="../images/iconos/administrar_off.gif"></TD>
+ <TD>&nbsp;<?php echo ( $TbMsg[basename($rs->campos["descripcion"])] ) ? $TbMsg[basename($rs->campos["descripcion"])] : basename($rs->campos["descripcion"]); ?>&nbsp;</TD>
+ <TD>&nbsp;<?php echo basename($rs->campos["urlicono"])?>&nbsp;</TD>
+ <TD align=center>&nbsp;<IMG src="./iconos/<?php echo $rs->campos["urlicono"] ?>"
- <? if ($rs->campos["idtipoicono"]==2) //icono item
+ <?php if ($rs->campos["idtipoicono"]==2) //icono item
echo " width=64 ";
else
echo " width=16 ";
?>
>&nbsp;</TD>
- <TD align=center>&nbsp;<? echo $TBtipo[$rs->campos["idtipoicono"]] ?>&nbsp;</TD>
+ <TD align=center>&nbsp;<?php echo $TBtipo[$rs->campos["idtipoicono"]] ?>&nbsp;</TD>
</TR>
- <? $rs->Siguiente();}?>
+ <?php $rs->Siguiente();}?>
</TABLE>
-<?
+<?php
//-------------------------------------------------------------------------------------------------------------------------------------------------
// Menu contextual
//-------------------------------------------------------------------------------------------------------------------------------------------------
@@ -122,7 +122,7 @@ echo $flotante->CreaMenuContextual($XMLcontextual);
</BODY>
</HTML>
-<?
+<?php
//-------------------------------------------------------------------------------------------------------------------------------------------------
// Menus contextuales
//-------------------------------------------------------------------------------------------------------------------------------------------------
diff --git a/admin/WebConsole/images/M_Iconos.php b/admin/WebConsole/images/M_Iconos.php
index bcc3b3ba..74bd0c4b 100644
--- a/admin/WebConsole/images/M_Iconos.php
+++ b/admin/WebConsole/images/M_Iconos.php
@@ -178,29 +178,29 @@ if($accion==$INSERTAR_REGISTRO || $accion==$MODIFICAR_REGISTRO){
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<LINK rel="stylesheet" type="text/css" href="../estilos.css">
<SCRIPT language="javascript" src="M_Iconos.js"></SCRIPT>
-<? echo ' <SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/iconos_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo ' <SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/iconos_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<!--------------------------------------------------------------------------------------------------------------------------------------------------->
<FORM name="fdatos" action="M_Iconos.php" enctype="multipart/form-data" method="post">
- <input name="opcion" type="hidden" value="<? echo $opcion?>">
- <input name="accion" type="hidden" value="<? echo $accion?>">
- <input name="idicono" type="hidden" value="<? echo $idicono?>">
- <input name="filebaja_urlicono" type="hidden" value="<? echo basename($urlicono)?>">
- <input name="fileexist_urlicono" type="hidden" value="<? echo $urlicono?>">
+ <input name="opcion" type="hidden" value="<?php echo $opcion?>">
+ <input name="accion" type="hidden" value="<?php echo $accion?>">
+ <input name="idicono" type="hidden" value="<?php echo $idicono?>">
+ <input name="filebaja_urlicono" type="hidden" value="<?php echo basename($urlicono)?>">
+ <input name="fileexist_urlicono" type="hidden" value="<?php echo $urlicono?>">
<!--------------------------------------------------------------------------------------------------------------------------------------------------->
<DIV align=center id="Layer_Datos">
- <P class=cabeceras><? echo $TbMsg["TITLE"] ; ?><BR>
- <SPAN class="subcabeceras"><? echo $TbMsg["$mopciones[$opcion]"] ?></SPAN></P>
- <P align="center"><SPAN class=textos><? echo $TbMsg["TABLE_TITLE"] ?></SPAN></P>
+ <P class=cabeceras><?php echo $TbMsg["TITLE"] ; ?><BR>
+ <SPAN class="subcabeceras"><?php echo $TbMsg["$mopciones[$opcion]"] ?></SPAN></P>
+ <P align="center"><SPAN class=textos><?php echo $TbMsg["TABLE_TITLE"] ?></SPAN></P>
<TABLE class="tabla_datos" align="center">
<!--------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH>&nbsp;<? echo $TbMsg["TYPE"] ?> &nbsp;</TH>
- <?if ($opcion==$CONSULTAR || $opcion==$ELIMINAR){?>
- <TD><?
+ <TH>&nbsp;<?php echo $TbMsg["TYPE"] ?> &nbsp;</TH>
+ <?php if ($opcion==$CONSULTAR || $opcion==$ELIMINAR){?>
+ <TD><?php
$TBtipo[1]=$TbMsg["TYPE_WEB"];
$TBtipo[2]=$TbMsg["TYPE_ITEMS"];
$TBtipo[3]=$TbMsg["TYPE_MENU"];
@@ -217,36 +217,36 @@ if($accion==$INSERTAR_REGISTRO || $accion==$MODIFICAR_REGISTRO){
<!-------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH>&nbsp;<? echo $TbMsg["DESCRIP"] ?> &nbsp;</TH>
- <?if ($opcion==$CONSULTAR || $opcion==$ELIMINAR){?>
- <TD><?echo $descripcion?></TD>
- <?}else{?>
- <TD><INPUT class=cajatexto name="descripcion" maxlength=250 style="width:250" value="<? echo $descripcion?>"></TD>
- <?}?>
+ <TH>&nbsp;<?php echo $TbMsg["DESCRIP"] ?> &nbsp;</TH>
+ <?php if ($opcion==$CONSULTAR || $opcion==$ELIMINAR){?>
+ <TD><?php echo $descripcion?></TD>
+ <?php }else{?>
+ <TD><INPUT class=cajatexto name="descripcion" maxlength=250 style="width:250" value="<?php echo $descripcion?>"></TD>
+ <?php }?>
</TR>
<!--------------------------------------------------------------------------------------------------------------------------------------------------->
- <?if ($opcion==$CONSULTAR || $opcion==$ELIMINAR){?>
+ <?php if ($opcion==$CONSULTAR || $opcion==$ELIMINAR){?>
<TR>
<TH>&nbsp;Icono&nbsp;</TH>
- <TD><?echo basename($urlicono)?></TD>
+ <TD><?php echo basename($urlicono)?></TD>
</TR>
- <?}else{
+ <?php }else{
if ($opcion==$INSERTAR || ($opcion==$MODIFICAR && empty($urlicono))){?>
<TR>
- <TH>&nbsp; <? echo $TbMsg["ICON"] ?> &nbsp;</TH>
- <TD><INPUT type=file class=cajatexto name="urlicono" style="width:500" value="<? echo $urlicono?>">
+ <TH>&nbsp; <?php echo $TbMsg["ICON"] ?> &nbsp;</TH>
+ <TD><INPUT type=file class=cajatexto name="urlicono" style="width:500" value="<?php echo $urlicono?>">
</TR>
- <?}else{?>
+ <?php }else{?>
<TR>
- <TH>&nbsp; <? echo $TbMsg["ICON"] ?> &nbsp;</TH>
- <TD><?echo basename($urlicono)?></TD>
+ <TH>&nbsp; <?php echo $TbMsg["ICON"] ?> &nbsp;</TH>
+ <TD><?php echo basename($urlicono)?></TD>
</TR>
<TR>
- <TH>&nbsp; <? echo $TbMsg["REPLACE"] ?> &nbsp;</TH>
- <TD><INPUT type=file class=cajatexto name="urlicono" style="width:500" value="<? echo $urlicono?>">
+ <TH>&nbsp; <?php echo $TbMsg["REPLACE"] ?> &nbsp;</TH>
+ <TD><INPUT type=file class=cajatexto name="urlicono" style="width:500" value="<?php echo $urlicono?>">
</TR>
- <?}?>
- <?}?>
+ <?php }?>
+ <?php }?>
</TR>
<!--------------------------------------------------------------------------------------------------------------------------------------------------->
</TABLE>
@@ -256,7 +256,7 @@ if($accion==$INSERTAR_REGISTRO || $accion==$MODIFICAR_REGISTRO){
<DIV id="Layer_opciones">
<TABLE align="center" border="0" >
<TR>
- <?switch($opcion){
+ <?php switch($opcion){
case $CONSULTAR:
echo '<TD><img style="cursor:hand" SRC="../images/boton_insertar_'.$idioma.'.gif" onclick="Cancelar()"></TD>';
break;
@@ -274,7 +274,7 @@ if($accion==$INSERTAR_REGISTRO || $accion==$MODIFICAR_REGISTRO){
</DIV>
-<?
+<?php
//________________________________________________________________________________________________________
// Posiciona cursor en campo usuario y muestra mensaje de error si lo hubiera
echo '<SCRIPT LANGUAGE="javascript">';
@@ -286,7 +286,7 @@ echo '</SCRIPT>';
</FORM>
</BODY>
</HTML>
- <?
+ <?php
//______________________________________________________________________
// Inicialiciza los campos de trabajo de la tabla
//______________________________________________________________________
diff --git a/admin/WebConsole/images/iconos/almacenamiento.png b/admin/WebConsole/images/iconos/almacenamiento.png
new file mode 100644
index 00000000..9bde1147
--- /dev/null
+++ b/admin/WebConsole/images/iconos/almacenamiento.png
Binary files differ
diff --git a/admin/WebConsole/images/iconos/arranque.png b/admin/WebConsole/images/iconos/arranque.png
new file mode 100644
index 00000000..24005e1f
--- /dev/null
+++ b/admin/WebConsole/images/iconos/arranque.png
Binary files differ
diff --git a/admin/WebConsole/images/ordenador_BSY.gif b/admin/WebConsole/images/ordenador_BSY.gif
deleted file mode 100644
index 15960797..00000000
--- a/admin/WebConsole/images/ordenador_BSY.gif
+++ /dev/null
Binary files differ
diff --git a/admin/WebConsole/images/ordenador_BSY.png b/admin/WebConsole/images/ordenador_BSY.png
new file mode 100644
index 00000000..f010d843
--- /dev/null
+++ b/admin/WebConsole/images/ordenador_BSY.png
Binary files differ
diff --git a/admin/WebConsole/images/ordenador_INI.gif b/admin/WebConsole/images/ordenador_INI.gif
deleted file mode 100644
index 5d4b6681..00000000
--- a/admin/WebConsole/images/ordenador_INI.gif
+++ /dev/null
Binary files differ
diff --git a/admin/WebConsole/images/ordenador_INI.png b/admin/WebConsole/images/ordenador_INI.png
new file mode 100644
index 00000000..60736018
--- /dev/null
+++ b/admin/WebConsole/images/ordenador_INI.png
Binary files differ
diff --git a/admin/WebConsole/images/ordenador_LNX.gif b/admin/WebConsole/images/ordenador_LNX.gif
deleted file mode 100644
index 4ddbfc61..00000000
--- a/admin/WebConsole/images/ordenador_LNX.gif
+++ /dev/null
Binary files differ
diff --git a/admin/WebConsole/images/ordenador_LNX.png b/admin/WebConsole/images/ordenador_LNX.png
new file mode 100644
index 00000000..3a7ae12b
--- /dev/null
+++ b/admin/WebConsole/images/ordenador_LNX.png
Binary files differ
diff --git a/admin/WebConsole/images/ordenador_LNXS.png b/admin/WebConsole/images/ordenador_LNXS.png
new file mode 100644
index 00000000..649eca7d
--- /dev/null
+++ b/admin/WebConsole/images/ordenador_LNXS.png
Binary files differ
diff --git a/admin/WebConsole/images/ordenador_OFF.gif b/admin/WebConsole/images/ordenador_OFF.gif
deleted file mode 100644
index 10dd0234..00000000
--- a/admin/WebConsole/images/ordenador_OFF.gif
+++ /dev/null
Binary files differ
diff --git a/admin/WebConsole/images/ordenador_OFF.png b/admin/WebConsole/images/ordenador_OFF.png
new file mode 100644
index 00000000..69da340e
--- /dev/null
+++ b/admin/WebConsole/images/ordenador_OFF.png
Binary files differ
diff --git a/admin/WebConsole/images/ordenador_OPG.gif b/admin/WebConsole/images/ordenador_OPG.gif
deleted file mode 100644
index 5d9306fc..00000000
--- a/admin/WebConsole/images/ordenador_OPG.gif
+++ /dev/null
Binary files differ
diff --git a/admin/WebConsole/images/ordenador_OPG.png b/admin/WebConsole/images/ordenador_OPG.png
new file mode 100644
index 00000000..4256bce3
--- /dev/null
+++ b/admin/WebConsole/images/ordenador_OPG.png
Binary files differ
diff --git a/admin/WebConsole/images/ordenador_OSX.png b/admin/WebConsole/images/ordenador_OSX.png
new file mode 100644
index 00000000..8816e0d1
--- /dev/null
+++ b/admin/WebConsole/images/ordenador_OSX.png
Binary files differ
diff --git a/admin/WebConsole/images/ordenador_W2K.gif b/admin/WebConsole/images/ordenador_W2K.gif
deleted file mode 100644
index 201c424d..00000000
--- a/admin/WebConsole/images/ordenador_W2K.gif
+++ /dev/null
Binary files differ
diff --git a/admin/WebConsole/images/ordenador_W95.gif b/admin/WebConsole/images/ordenador_W95.gif
deleted file mode 100644
index 892527ba..00000000
--- a/admin/WebConsole/images/ordenador_W95.gif
+++ /dev/null
Binary files differ
diff --git a/admin/WebConsole/images/ordenador_W98.gif b/admin/WebConsole/images/ordenador_W98.gif
deleted file mode 100644
index 66dccea5..00000000
--- a/admin/WebConsole/images/ordenador_W98.gif
+++ /dev/null
Binary files differ
diff --git a/admin/WebConsole/images/ordenador_WIN.png b/admin/WebConsole/images/ordenador_WIN.png
new file mode 100644
index 00000000..107b4e01
--- /dev/null
+++ b/admin/WebConsole/images/ordenador_WIN.png
Binary files differ
diff --git a/admin/WebConsole/images/ordenador_WINS.png b/admin/WebConsole/images/ordenador_WINS.png
new file mode 100644
index 00000000..e45f574c
--- /dev/null
+++ b/admin/WebConsole/images/ordenador_WINS.png
Binary files differ
diff --git a/admin/WebConsole/images/ordenador_WML.gif b/admin/WebConsole/images/ordenador_WML.gif
deleted file mode 100644
index eccb6f8c..00000000
--- a/admin/WebConsole/images/ordenador_WML.gif
+++ /dev/null
Binary files differ
diff --git a/admin/WebConsole/images/ordenador_WXP.gif b/admin/WebConsole/images/ordenador_WXP.gif
deleted file mode 100644
index b7f969d3..00000000
--- a/admin/WebConsole/images/ordenador_WXP.gif
+++ /dev/null
Binary files differ
diff --git a/admin/WebConsole/images/ver.php b/admin/WebConsole/images/ver.php
index 9d3ecd44..52e81974 100644
--- a/admin/WebConsole/images/ver.php
+++ b/admin/WebConsole/images/ver.php
@@ -1,4 +1,4 @@
-<?
+<?php
$eliminar=$_GET["eliminar"] ;
$archivo=$_GET["archivo"] ;
if ($eliminar=="si")
diff --git a/admin/WebConsole/includes/ConfiguracionesParticiones.php b/admin/WebConsole/includes/ConfiguracionesParticiones.php
index 8cdd669c..816843b5 100644
--- a/admin/WebConsole/includes/ConfiguracionesParticiones.php
+++ b/admin/WebConsole/includes/ConfiguracionesParticiones.php
@@ -64,16 +64,22 @@ function cargaCaves($cmd,$idambito,$ambito,$sws,$swr)
global $msk_imagen;
global $msk_perfil;
global $msk_cache;
-
- $cmd->texto="SELECT CONCAT_WS( ';',ordenadores_particiones.numdisk,ordenadores_particiones.numpar, ";
- if($sws & $msk_tamano)
+ // Comprobar modos SQL para hacer que la consulta sea compatible.
+ $cmd->texto="SELECT @@sql_mode AS mode";
+ $cmd->ejecutar();
+ @$mode=$cmd->Recordset->campos["mode"];
+
+ $cmd->texto="SELECT CONCAT_WS(';', LPAD(ordenadores_particiones.numdisk, 3, 0),
+ LPAD(ordenadores_particiones.numpar, 3, 0), ";
+
+ if($sws & $msk_tamano)
$cmd->texto.=" ordenadores_particiones.tamano,";
- if($sws & $msk_sysFi)
+ if($sws & $msk_sysFi)
$cmd->texto.=" ordenadores_particiones.idsistemafichero, ";
-
- if($sws & $msk_nombreSO)
+
+ if($sws & $msk_nombreSO)
$cmd->texto.=" ordenadores_particiones.idnombreso, ";
if($sws & $msk_imagen)
@@ -83,60 +89,62 @@ function cargaCaves($cmd,$idambito,$ambito,$sws,$swr)
$cmd->texto.=" ordenadores_particiones.idperfilsoft, ";
if($sws & $msk_cache)
- $cmd->texto.=" ordenadores_particiones.cache, ";
+ $cmd->texto.=" ordenadores_particiones.cache, ";
$cmd->texto.=" ordenadores_particiones.codpar) AS configuracion,
- ordenadores_particiones.numdisk,
- ordenadores_particiones.numpar ,
- ordenadores_particiones.codpar ,
- IFNULL (tipospar.tipopar, ordenadores_particiones.codpar) AS tipopar,
- tipospar.clonable,
- ordenadores_particiones.tamano,
- sistemasficheros.descripcion AS sistemafichero,
- ordenadores_particiones.idnombreso,
- nombresos.nombreso,
- imagenes.idimagen,
- imagenes.descripcion AS imagen,
- imagenes.nombreca AS nombreca,
- imagenes.idrepositorio AS repositorio,
- ordenadores_particiones.fechadespliegue,
- ordenadores_particiones.idperfilsoft,
- perfilessoft.descripcion AS perfilsoft
-
+ ANY_VALUE(ordenadores_particiones.numdisk) AS numdisk,
+ ANY_VALUE(ordenadores_particiones.numpar) AS numpar,
+ ANY_VALUE(ordenadores_particiones.codpar) AS codpar,
+ IFNULL (ANY_VALUE(tipospar.tipopar), ANY_VALUE(ordenadores_particiones.codpar)) AS tipopar,
+ ANY_VALUE(tipospar.clonable) AS clonable,
+ ANY_VALUE(ordenadores_particiones.tamano) AS tamano,
+ ANY_VALUE(ordenadores_particiones.uso) AS uso,
+ ANY_VALUE(sistemasficheros.descripcion) AS sistemafichero,
+ ANY_VALUE(ordenadores_particiones.idnombreso) AS idnombreso,
+ ANY_VALUE(nombresos.nombreso) AS nombreso,
+ ANY_VALUE(imagenes.idimagen) AS idimagen,
+ ANY_VALUE(imagenes.descripcion) AS imagen,
+ (ANY_VALUE(imagenes.revision) - ANY_VALUE(ordenadores_particiones.revision)) AS difimagen,
+ ANY_VALUE(imagenes.nombreca) AS nombreca,
+ ANY_VALUE(imagenes.idrepositorio) AS repositorio,
+ ANY_VALUE(ordenadores_particiones.fechadespliegue) AS fechadespliegue,
+ ANY_VALUE(ordenadores_particiones.idperfilsoft) AS idperfilsoft,
+ ANY_VALUE(perfilessoft.descripcion) AS perfilsoft
FROM ordenadores
- INNER JOIN ordenadores_particiones ON ordenadores_particiones.idordenador=ordenadores.idordenador
- LEFT OUTER JOIN nombresos ON nombresos.idnombreso=ordenadores_particiones.idnombreso
- LEFT OUTER JOIN tipospar ON tipospar.codpar=ordenadores_particiones.codpar
- LEFT OUTER JOIN imagenes ON imagenes.idimagen=ordenadores_particiones.idimagen
- LEFT OUTER JOIN perfilessoft ON perfilessoft.idperfilsoft=ordenadores_particiones.idperfilsoft
- LEFT OUTER JOIN sistemasficheros ON sistemasficheros.idsistemafichero=ordenadores_particiones.idsistemafichero";
-
+ INNER JOIN ordenadores_particiones ON ordenadores_particiones.idordenador=ordenadores.idordenador
+ LEFT OUTER JOIN nombresos ON nombresos.idnombreso=ordenadores_particiones.idnombreso
+ LEFT OUTER JOIN tipospar ON tipospar.codpar=ordenadores_particiones.codpar
+ LEFT OUTER JOIN imagenes ON imagenes.idimagen=ordenadores_particiones.idimagen
+ LEFT OUTER JOIN perfilessoft ON perfilessoft.idperfilsoft=ordenadores_particiones.idperfilsoft
+ LEFT OUTER JOIN sistemasficheros ON sistemasficheros.idsistemafichero=ordenadores_particiones.idsistemafichero";
+
switch($ambito){
case $AMBITO_AULAS :
$cmd->texto.=" INNER JOIN aulas ON aulas.idaula = ordenadores.idaula
- WHERE aulas.idaula =".$idambito;
+ WHERE aulas.idaula=".$idambito;
break;
case $AMBITO_GRUPOSORDENADORES :
$cmd->texto.=" INNER JOIN gruposordenadores ON gruposordenadores.idgrupo = ordenadores.grupoid
- WHERE gruposordenadores.idgrupo =".$idambito;
+ WHERE gruposordenadores.idgrupo=".$idambito;
break;
case $AMBITO_ORDENADORES :
- $cmd->texto.=" WHERE ordenadores.idordenador =".$idambito;
+ $cmd->texto.=" WHERE ordenadores.idordenador=".$idambito;
break;
}
-
+
if($swr) // Si se trata de restauración no se tiene en cuenta las partciones no clonables
$cmd->texto.=" AND tipospar.clonable=1 AND ordenadores_particiones.numpar>0 ";
- $cmd->texto.=" GROUP by configuracion";
+ $cmd->texto.=" GROUP BY configuracion";
+ // Comprobar compatiblidad de cláusula GROUP BY.
+ if (strpos($mode, 'ONLY_FULL_GROUP_BY') === false)
+ $cmd->texto=preg_replace('/ANY_VALUE/', '', $cmd->texto);
- //echo "carga claves:".$cmd->texto;
$rs=new Recordset;
$rs->Comando=&$cmd;
- if (!$rs->Abrir()) return($tablaHtml); // Error al abrir recordset
+ if (!$rs->Abrir()) return(false); // Error al abrir recordset
$rs->Primero();
$idx=0;
- //echo $cmd->texto;
while (!$rs->EOF){
$tbKeys[$idx]["cfg"]=$rs->campos["configuracion"];
$tbKeys[$idx]["numdisk"]=$rs->campos["numdisk"];
@@ -145,6 +153,7 @@ function cargaCaves($cmd,$idambito,$ambito,$sws,$swr)
$tbKeys[$idx]["tipopar"]=$rs->campos["tipopar"];
$tbKeys[$idx]["clonable"]=$rs->campos["clonable"];
$tbKeys[$idx]["tamano"]=$rs->campos["tamano"];
+ $tbKeys[$idx]["uso"]=$rs->campos["uso"];
$tbKeys[$idx]["sistemafichero"]=$rs->campos["sistemafichero"];
$tbKeys[$idx]["idnombreso"]=$rs->campos["idnombreso"];
$tbKeys[$idx]["nombreso"]=$rs->campos["nombreso"];
@@ -153,6 +162,7 @@ function cargaCaves($cmd,$idambito,$ambito,$sws,$swr)
$tbKeys[$idx]["nombreca"]=$rs->campos["nombreca"];
$tbKeys[$idx]["repositorio"]=$rs->campos["repositorio"];
$tbKeys[$idx]["fechadespliegue"]=$rs->campos["fechadespliegue"];
+ $tbKeys[$idx]["difimagen"]=$rs->campos["difimagen"];
$tbKeys[$idx]["idperfilsoft"]=$rs->campos["idperfilsoft"];
$tbKeys[$idx]["perfilsoft"]=$rs->campos["perfilsoft"];
//$tbKeys[$idx]["cache"]=$rs->campos["cache"];
@@ -199,7 +209,6 @@ function pintaConfiguraciones($cmd,$idambito,$ambito,$colums,$sws,$swr,$pintaPar
cargaNombresSO($cmd,$idambito,$ambito);
cargaTamano($cmd,$idambito,$ambito);
cargaCache($cmd,$idambito,$ambito);
-
$cmd->texto="SELECT COUNT(*) AS con,
GROUP_CONCAT(CAST( temp2.idordenador AS CHAR(11) ) ORDER BY temp2.idordenador SEPARATOR ',' ) AS idordenadores,
temp2.configuraciones
@@ -208,8 +217,8 @@ function pintaConfiguraciones($cmd,$idambito,$ambito,$colums,$sws,$swr,$pintaPar
GROUP_CONCAT(CAST( temp1.configuracion AS CHAR(250) ) ORDER BY temp1.configuracion SEPARATOR '@' ) AS configuraciones
FROM (SELECT ordenadores_particiones.idordenador,ordenadores_particiones.numdisk,
ordenadores_particiones.numpar,
- concat_WS( ';', ordenadores_particiones.numdisk,
- ordenadores_particiones.numpar, ";
+ CONCAT_WS(';', LPAD(ordenadores_particiones.numdisk, 3, 0),
+ LPAD(ordenadores_particiones.numpar, 3, 0), ";
if($sws & $msk_tamano)
$cmd->texto.=" ordenadores_particiones.tamano,";
@@ -375,19 +384,18 @@ function cargaSistemasFicheros($cmd,$idambito,$ambito)
break;
}
$cmd->texto.=" GROUP BY ordenadores_particiones.numdisk,ordenadores_particiones.numpar, ordenadores_particiones.idsistemafichero";
-
+
$rs=new Recordset;
$rs->Comando=&$cmd;
if (!$rs->Abrir()) return; // Error al abrir recordset
$rs->Primero();
$idx=0;
- //echo $cmd->texto;
while (!$rs->EOF){
$tbSysFi[$idx]["idsistemafichero"]=$rs->campos["idsistemafichero"];
$tbSysFi[$idx]["numdisk"]=$rs->campos["numdisk"];
$tbSysFi[$idx]["numpar"]=$rs->campos["numpar"];
$tbSysFi[$idx]["sistemafichero"]=$rs->campos["sistemafichero"];
- $tbSysFi[$idx]["ordenadores"]=$rs->campos["ordenadores"];
+ $tbSysFi[$idx]["ordenadores"]=$rs->campos["ordenadores"];
$idx++;
$rs->Siguiente();
}
@@ -407,8 +415,6 @@ function tomaSistemasFicheros($numpar,$ordenadores,$sw=false,$numdisk = 1)
for ($k=0; $k<$conSysFi; $k++){
if ($tbSysFi[$k]["numdisk"] == $numdisk && $tbSysFi[$k]["numpar"] == $numpar) {
- //$pos = strpos($tbSysFi[$k]["ordenadores"], $ordenadores);
- //if ($pos !== false) { // Cadena encontrada
$pcs = explode (",", $ordenadores);
$intersec = array_intersect (explode(",", $tbSysFi[$k]["ordenadores"]), $pcs);
if (array_diff ($pcs, $intersec) == NULL) {
@@ -459,7 +465,7 @@ function cargaPerfiles($cmd,$idambito,$ambito)
break;
}
$cmd->texto.=" GROUP BY ordenadores_particiones.numdisk,ordenadores_particiones.numpar, ordenadores_particiones.idperfilsoft";
- //echo "carga perfiles:".$cmd->texto;
+
$rs=new Recordset;
$rs->Comando=&$cmd;
if (!$rs->Abrir()) return; // Error al abrir recordset
@@ -488,9 +494,6 @@ function tomaPerfiles($numpar,$ordenadores,$numdisk = 1)
global $conPerfil; // Contador de elementos anteriores
for ($k=0; $k<$conPerfil; $k++){
- //$pos = strpos($tbPerfil[$k]["ordenadores"], $ordenadores);
- //if ($pos !== false) { // Cadena encontrada
- //if($tbPerfil[$k]["numpar"]==$numpar)
if ($tbPerfil[$k]["numdisk"] == $numdisk && $tbPerfil[$k]["numpar"] == $numpar) {
$pcs = explode (",", $ordenadores);
$intersec = array_intersect (explode(",", $tbPerfil[$k]["ordenadores"]), $pcs);
@@ -538,7 +541,7 @@ function cargaImagenes($cmd,$idambito,$ambito)
break;
}
$cmd->texto.=" GROUP BY ordenadores_particiones.numdisk,ordenadores_particiones.numpar, ordenadores_particiones.idimagen";
- //echo "carga imagenes:".$cmd->texto;
+
$rs=new Recordset;
$rs->Comando=&$cmd;
if (!$rs->Abrir()) return; // Error al abrir recordset
@@ -567,9 +570,6 @@ function tomaImagenes($numpar,$ordenadores, $numdisk = 1)
global $conImg; // Contador de elementos anteriores
for ($k=0; $k<$conImg; $k++) {
- //$pos = strpos($tbImg[$k]["ordenadores"], $ordenadores);
- //if ($pos !== false) { // Cadena encontrada
- //if($tbImg[$k]["numpar"]==$numpar){
if ($tbImg[$k]["numdisk"] == $numdisk && $tbImg[$k]["numpar"] == $numpar) {
$pcs = explode (",", $ordenadores);
$intersec = array_intersect (explode(",", $tbImg[$k]["ordenadores"]), $pcs);
@@ -615,7 +615,7 @@ function cargaNombresSO($cmd,$idambito,$ambito)
break;
}
$cmd->texto.=" GROUP BY ordenadores_particiones.numdisk,ordenadores_particiones.numpar, ordenadores_particiones.idnombreso";
- //echo "carga nombresos:".$cmd->texto;
+
$rs=new Recordset;
$rs->Comando=&$cmd;
if (!$rs->Abrir()) return; // Error al abrir recordset
@@ -668,10 +668,15 @@ function cargaTamano($cmd,$idambito,$ambito)
global $AMBITO_GRUPOSORDENADORES;
global $AMBITO_ORDENADORES;
+ // Comprobar modos SQL para hacer que la consulta sea compatible.
+ $cmd->texto="SELECT @@sql_mode AS mode";
+ $cmd->ejecutar();
+ @$mode=$cmd->Recordset->campos["mode"];
$cmd->texto="SELECT COUNT(*) AS con,
- ordenadores_particiones.tamano,
- ordenadores_particiones.numdisk,
- ordenadores_particiones.numpar,
+ ANY_VALUE(ordenadores_particiones.tamano) AS tamano,
+ ANY_VALUE(ordenadores_particiones.uso) AS uso,
+ ANY_VALUE(ordenadores_particiones.numdisk) AS numdisk,
+ ANY_VALUE(ordenadores_particiones.numpar) AS numpar,
GROUP_CONCAT(CAST(ordenadores_particiones.idordenador AS CHAR(11) )
ORDER BY ordenadores_particiones.idordenador SEPARATOR ',' ) AS ordenadores
FROM ordenadores
@@ -691,18 +696,22 @@ function cargaTamano($cmd,$idambito,$ambito)
break;
}
$cmd->texto.=" GROUP BY ordenadores_particiones.numdisk,ordenadores_particiones.numpar, ordenadores_particiones.tamano";
- //echo "carga tamaños:".$cmd->texto;
+ // Comprobar compatiblidad de cláusula GROUP BY.
+ if (strpos($mode, 'ONLY_FULL_GROUP_BY') === false)
+ $cmd->texto=preg_replace('/ANY_VALUE/', '', $cmd->texto);
+
$rs=new Recordset;
$rs->Comando=&$cmd;
if (!$rs->Abrir()) return; // Error al abrir recordset
$rs->Primero();
$idx=0;
while (!$rs->EOF){
- $tbTam[$idx]["tamano"]=$rs->campos["tamano"];
- $tbTam[$idx]["numdisk"]=$rs->campos["numdisk"];
- $tbTam[$idx]["numpar"]=$rs->campos["numpar"];
- $tbTam[$idx]["ordenadores"]=$rs->campos["ordenadores"];
- $idx++;
+ $tbTam[$idx]["tamano"]=$rs->campos["tamano"];
+ $tbTam[$idx]["uso"]=$rs->campos["uso"];
+ $tbTam[$idx]["numdisk"]=$rs->campos["numdisk"];
+ $tbTam[$idx]["numpar"]=$rs->campos["numpar"];
+ $tbTam[$idx]["ordenadores"]=$rs->campos["ordenadores"];
+ $idx++;
$rs->Siguiente();
}
$conTam=$idx; // Guarda contador
@@ -732,6 +741,27 @@ function tomaTamano($numpar,$ordenadores,$numdisk = 1)
}
/*________________________________________________________________________________________________________
+ Toma porcentaje de uso de partición común a los ordenadores pasados como parámetros
+________________________________________________________________________________________________________*/
+function tomaUso($numpar, $ordenadores, $numdisk=1)
+{
+ global $tbTam; // Tabla contenedora de ordenadores incluidos en la consulta
+ global $conTam; // Contador de elementos anteriores
+
+ for ($k=0; $k<$conTam; $k++) {
+ if ($tbTam[$k]["numdisk"] == $numdisk && $tbTam[$k]["numpar"] == $numpar) {
+// $pos = strpos ($tbTam[$k]["ordenadores"], $ordenadores);
+// if ($pos !== FALSE) { // Cadena encontrada
+ $pcs = explode (",", $ordenadores);
+ $intersec = array_intersect (explode(",", $tbTam[$k]["ordenadores"]), $pcs);
+ if (array_diff ($pcs, $intersec) == NULL) {
+ return ($tbTam[$k]["uso"]);
+ }
+ }
+ }
+}
+/*________________________________________________________________________________________________________
+
Selecciona los ordenadores que tienen el mismo Contenido de Cache para la misma partición
UHU 2013/05/17 - Ahora se carga también el numero de disco en la consulta
________________________________________________________________________________________________________*/
@@ -766,6 +796,7 @@ function cargaCache($cmd,$idambito,$ambito)
break;
}
$cmd->texto.=" GROUP BY ordenadores_particiones.numdisk,ordenadores_particiones.numpar, ordenadores_particiones.cache";
+
$rs=new Recordset;
$rs->Comando=&$cmd;
if (!$rs->Abrir()) return; // Error al abrir recordset
diff --git a/admin/WebConsole/includes/CreaComando.php b/admin/WebConsole/includes/CreaComando.php
index 06bce0bb..f8d3f8d7 100644
--- a/admin/WebConsole/includes/CreaComando.php
+++ b/admin/WebConsole/includes/CreaComando.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon.
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/includes/CreaTablaParametros.php b/admin/WebConsole/includes/CreaTablaParametros.php
index 454da864..9d5468f4 100644
--- a/admin/WebConsole/includes/CreaTablaParametros.php
+++ b/admin/WebConsole/includes/CreaTablaParametros.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon.
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/includes/HTMLCTEMULSELECT.php b/admin/WebConsole/includes/HTMLCTEMULSELECT.php
index 6c4f479f..f7f24630 100644
--- a/admin/WebConsole/includes/HTMLCTEMULSELECT.php
+++ b/admin/WebConsole/includes/HTMLCTEMULSELECT.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon.
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/includes/HTMLMULSELECT.php b/admin/WebConsole/includes/HTMLMULSELECT.php
index e6844b03..ec3bdb6a 100644
--- a/admin/WebConsole/includes/HTMLMULSELECT.php
+++ b/admin/WebConsole/includes/HTMLMULSELECT.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon.
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/includes/HTMLSELECT.php b/admin/WebConsole/includes/HTMLSELECT.php
index 76433d08..0192fc79 100644
--- a/admin/WebConsole/includes/HTMLSELECT.php
+++ b/admin/WebConsole/includes/HTMLSELECT.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon.
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/includes/InvFecha.php b/admin/WebConsole/includes/InvFecha.php
index 5bc46c4a..c21816d0 100644
--- a/admin/WebConsole/includes/InvFecha.php
+++ b/admin/WebConsole/includes/InvFecha.php
@@ -1,4 +1,4 @@
-<?
+<?php
/*______________________________________________________________________
Cambia de posicion los extremos de una fecha. Devuelve una fecha con formato
dd-mm-aaaa si el formato de entrada es aaaa-mm-dd y viseversa
@@ -6,7 +6,7 @@
- fecha: Una cadena con los datos de una fecha
_______________________________________________________________________*/
function InvFecha($fecha){
- if ($fecha=="0000-00-00")return("");
+ if ($fecha=="1970-01-01")return("");
$auxsplit=split(" ",$fecha);
list($anno_p,$mes_p,$dia_p)=split("[/-]",$auxsplit[0]);
@@ -34,4 +34,4 @@ function metefechaDB($fecha){
function HoraValida($hora){
if ($hora=="00:00:00")return("");
}
-?> \ No newline at end of file
+?>
diff --git a/admin/WebConsole/includes/RecopilaIpesMacs.php b/admin/WebConsole/includes/RecopilaIpesMacs.php
index f3caac06..70a7f8e3 100644
--- a/admin/WebConsole/includes/RecopilaIpesMacs.php
+++ b/admin/WebConsole/includes/RecopilaIpesMacs.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -38,7 +38,9 @@ function RecopilaIpesMacs($cmd,$ambito,$idambito,$filtroip=""){
if(!empty($filtroip)){
$filtroip="'".str_replace(";","','",$filtroip)."'"; // Cambia caracter ; para consulta alfanumérica
- $cmd->texto="SELECT ip, mac, nombreordenador, idordenador FROM ordenadores WHERE ip IN (".$filtroip.")";
+ $cmd->texto="SELECT ip, mac, nombreordenador, idordenador, agentkey
+ FROM ordenadores
+ WHERE ip IN (".$filtroip.")";
RecorreOrdenadores($cmd);
}
else{
@@ -60,13 +62,16 @@ function RecopilaIpesMacs($cmd,$ambito,$idambito,$filtroip=""){
RecorreGruposOrdenadores($cmd);
break;
case $AMBITO_ORDENADORES :
- $cmd->texto="SELECT ip,mac,nombreordenador,idordenador FROM ordenadores WHERE idordenador=".$idambito;
+ $cmd->texto="SELECT ip, mac, nombreordenador, idordenador, agentkey
+ FROM ordenadores
+ WHERE idordenador=".$idambito;
RecorreOrdenadores($cmd);
break;
default: // Se trata de un conjunto aleatorio de ordenadores
- $cmd->texto="SELECT ip,mac,nombreordenador,idordenador FROM ordenadores WHERE idordenador IN (".$idambito.")";
+ $cmd->texto="SELECT ip, mac, nombreordenador, idordenador, agentkey
+ FROM ordenadores
+ WHERE idordenador IN (".$idambito.")";
RecorreOrdenadores($cmd);
-
}
}
$cadenaid=substr($cadenaid,0,strlen($cadenaid)-1); // Quita la coma
@@ -116,7 +121,9 @@ function RecorreAulas($cmd){
$idaula=$rs->campos["idaula"];
$cmd->texto="SELECT idgrupo,nombregrupoordenador FROM gruposordenadores WHERE idaula=".$idaula." AND grupoid=0";
RecorreGruposOrdenadores($cmd);
- $cmd->texto="SELECT ip,mac,nombreordenador,idordenador FROM ordenadores WHERE idaula=".$idaula." AND grupoid=0";
+ $cmd->texto="SELECT ip, mac, nombreordenador, idordenador, agentkey
+ FROM ordenadores
+ WHERE idaula=".$idaula." AND grupoid=0";
RecorreOrdenadores($cmd);
$rs->Siguiente();
}
@@ -132,7 +139,9 @@ function RecorreGruposOrdenadores($cmd){
$idgrupo=$rs->campos["idgrupo"];
$cmd->texto="SELECT idgrupo,nombregrupoordenador FROM gruposordenadores WHERE grupoid=".$idgrupo;
RecorreGruposOrdenadores($cmd);
- $cmd->texto="SELECT ip,mac,nombreordenador,idordenador FROM ordenadores WHERE grupoid=".$idgrupo;
+ $cmd->texto="SELECT ip, mac, nombreordenador, idordenador, agentkey
+ FROM ordenadores
+ WHERE grupoid=".$idgrupo;
RecorreOrdenadores($cmd);
$rs->Siguiente();
}
@@ -143,6 +152,7 @@ function RecorreOrdenadores($cmd){
global $cadenaid;
global $cadenaip;
global $cadenamac;
+ global $cadenaoga;
$rs=new Recordset;
$rs->Comando=&$cmd;
if (!$rs->Abrir()) return; // Error al abrir recordset
@@ -150,6 +160,7 @@ function RecorreOrdenadores($cmd){
$cadenaid.=$rs->campos["idordenador"].",";
$cadenaip.=$rs->campos["ip"].";";
$cadenamac.=$rs->campos["mac"].";";
+ $cadenaoga.=(is_null($rs->campos["agentkey"])?"":$rs->campos["agentkey"]).";";
$rs->Siguiente();
}
$rs->Cerrar();
diff --git a/admin/WebConsole/includes/RedireccionaError.php b/admin/WebConsole/includes/RedireccionaError.php
index 92a6cd4c..420f47a4 100644
--- a/admin/WebConsole/includes/RedireccionaError.php
+++ b/admin/WebConsole/includes/RedireccionaError.php
@@ -1,4 +1,4 @@
-<?
+<?php
/*______________________________________________________________________
Redirecciona a la página de error
Parametros:
diff --git a/admin/WebConsole/includes/TomaDato.php b/admin/WebConsole/includes/TomaDato.php
index b20278d8..c865e80b 100644
--- a/admin/WebConsole/includes/TomaDato.php
+++ b/admin/WebConsole/includes/TomaDato.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon.
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/includes/TomanDatos.php b/admin/WebConsole/includes/TomanDatos.php
index 07c96a3c..7e985d3a 100644
--- a/admin/WebConsole/includes/TomanDatos.php
+++ b/admin/WebConsole/includes/TomanDatos.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon.
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/includes/comunes.php b/admin/WebConsole/includes/comunes.php
index 35e53697..f9f56382 100644
--- a/admin/WebConsole/includes/comunes.php
+++ b/admin/WebConsole/includes/comunes.php
@@ -380,3 +380,23 @@
}
return($selecHtml);
}
+
+ /*
+ * Devuelve el valor legible para un tamaño (en múltiplos de 1024).
+ * Nota: obtenido de la documentación de PHP (php.net).
+ * Parámetros:
+ * bytes - tamaño en bytes (entero)
+ * Devielve:
+ * cadena con número en formato de sistema internacional (2 decimales)
+ */
+ function humanSize($bytes) {
+ $si_prefix = array( 'B', 'KB', 'MB', 'GB', 'TB', 'EB', 'ZB', 'YB' );
+ $base = 1024;
+ $class = min((int)log($bytes , $base) , count($si_prefix) - 1);
+ if ($class < 0) {
+ return '0 B';
+ } else {
+ return sprintf('%1.2f' , $bytes / pow($base, $class)) . ' ' . $si_prefix[$class];
+ }
+ }
+
diff --git a/admin/WebConsole/includes/cuestionacciones.php b/admin/WebConsole/includes/cuestionacciones.php
index 5cb87b8c..1f027adc 100644
--- a/admin/WebConsole/includes/cuestionacciones.php
+++ b/admin/WebConsole/includes/cuestionacciones.php
@@ -1,4 +1,4 @@
-<?
+<?php
/* -------------------------------------------------------------------------------------------
Inserta, modifica o elimina un grupo de servidores dhcp de la base de datos
---------------------------------------------------------------------------------------------*/
diff --git a/admin/WebConsole/includes/cuestionaccionescab.php b/admin/WebConsole/includes/cuestionaccionescab.php
index e9523eba..d41d0324 100644
--- a/admin/WebConsole/includes/cuestionaccionescab.php
+++ b/admin/WebConsole/includes/cuestionaccionescab.php
@@ -1,4 +1,4 @@
-<?
+<?php
$sw_ejya="";
$sw_seguimiento="";
diff --git a/admin/WebConsole/includes/opciones.php b/admin/WebConsole/includes/opciones.php
index fe1740f3..4e8c1033 100644
--- a/admin/WebConsole/includes/opciones.php
+++ b/admin/WebConsole/includes/opciones.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon.
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/includes/opcionesbotones.php b/admin/WebConsole/includes/opcionesbotones.php
index e75d7904..dd7c47b0 100644
--- a/admin/WebConsole/includes/opcionesbotones.php
+++ b/admin/WebConsole/includes/opcionesbotones.php
@@ -1,7 +1,7 @@
<TABLE align=center>
<TR>
- <TD><A href=#><IMG border=0 src="../images/boton_cancelar_<?echo $idioma ?>.gif" onclick="javascript:cancelar()"></A></TD>
+ <TD><A href=#><IMG border=0 src="../images/boton_cancelar_<?php echo $idioma ?>.gif" onclick="javascript:cancelar()"></A></TD>
<TD width=20></TD>
- <TD><A href=#><IMG border=0 src="../images/boton_confirmar_<? echo $idioma ?>.gif" onclick="javascript:confirmar()" ></A></TD>
+ <TD><A href=#><IMG border=0 src="../images/boton_confirmar_<?php echo $idioma ?>.gif" onclick="javascript:confirmar()" ></A></TD>
</TR>
</TABLE>
diff --git a/admin/WebConsole/includes/opcionesbotonesop.php b/admin/WebConsole/includes/opcionesbotonesop.php
index d86755d7..85138063 100644
--- a/admin/WebConsole/includes/opcionesbotonesop.php
+++ b/admin/WebConsole/includes/opcionesbotonesop.php
@@ -1,4 +1,4 @@
-<?
+<?php
echo '<TABLE align=center>';
echo '<TR>';
echo '<TD><A href=#><IMG border=0 src="../images/boton_cancelar.gif" onclick="cancelar()"></A></TD>';
diff --git a/admin/WebConsole/includes/opcionesprotocolos.php b/admin/WebConsole/includes/opcionesprotocolos.php
index 5002316c..29a845bd 100644
--- a/admin/WebConsole/includes/opcionesprotocolos.php
+++ b/admin/WebConsole/includes/opcionesprotocolos.php
@@ -1,9 +1,11 @@
-<?
+<?php
/**
* @file: opcionesprotocolos.php
* @brief: Toma los parametros de mcast y torrent para mostrarlos en las paginas de restaurar imagen (monoliticas y sincronizadas)
* @date: 2013-11-25
* @copyright GNU Public License v3+
+ * @version 1.1 El máximo de equipos = ordenadores de la tabla pertenecientes al ambito
+ * autor: Irina Gomez, Universidad de Sevilla - fecha: 2016-05-12
*/
@@ -12,23 +14,29 @@ function mcast_syntax($cmd,$ambito,$idambito)
//if (isset($_GET["idambito"])) $idambito=$_GET["idambito"];
if ($ambito == 4)
{
-$cmd->texto='SELECT pormul, ipmul, modomul, velmul, puestos FROM aulas
- WHERE aulas.idaula=' . $idambito ;
+$cmd->texto="SELECT pormul, ipmul, modomul, velmul, ".
+ " count(idordenador) as puestos ".
+ " FROM aulas INNER JOIN ordenadores USING (idaula) ".
+ " WHERE aulas.idaula=$idambito" ;
}
if ($ambito == 8)
{
-$cmd->texto='SELECT pormul, ipmul, modomul, velmul, puestos FROM aulas
- JOIN gruposordenadores ON aulas.idaula=gruposordenadores.idaula
- WHERE gruposordenadores.idgrupo=' . $idambito ;
+$cmd->texto=" SELECT pormul, ipmul, modomul, velmul, ".
+ " count(idordenador) as puestos ".
+ " FROM ordenadores ".
+ " INNER JOIN gruposordenadores ON ordenadores.grupoid = gruposordenadores.idgrupo ".
+ " INNER JOIN aulas ON gruposordenadores.idaula=aulas.idaula ".
+ " WHERE idgrupo=$idambito" ;
}
if ($ambito == 16)
{
-$cmd->texto='SELECT pormul, ipmul, modomul, velmul, puestos FROM aulas
+$cmd->texto='SELECT pormul, ipmul, modomul, velmul, 1 AS puestos FROM aulas
JOIN ordenadores ON ordenadores.idaula=aulas.idaula
WHERE ordenadores.idordenador=' . $idambito ;
}
+
$rs=new Recordset;
$rs->Comando=&$cmd;
if ($rs->Abrir()){
diff --git a/admin/WebConsole/includes/pintaParticiones.php b/admin/WebConsole/includes/pintaParticiones.php
index e818bb3e..505defe1 100644
--- a/admin/WebConsole/includes/pintaParticiones.php
+++ b/admin/WebConsole/includes/pintaParticiones.php
@@ -63,10 +63,11 @@ function pintaParticiones($cmd,$configuraciones,$idordenadores,$cc)
echo '</tr>';
// Recorremos todas las configuraciones encontradas para cada disco
-
+ $aviso="";
foreach($diskConfigs as $disk => $diskConfig){
- echo'<tr height="16">'.chr(13);
- echo '<td colspan="'.$columns.'" style="BORDER-TOP: #999999 1px solid;BACKGROUND-COLOR: #D4D0C8;">&nbsp;'.$TbMsg["DISK"].'&nbsp;'.$disk.'</td>'.chr(13);
+ $disk = (int)$disk;
+ echo'<tr height="16">'.chr(13);
+ echo '<td colspan="'.$columns.'" style="BORDER-TOP: #999999 1px solid;BACKGROUND-COLOR: #D4D0C8;">&nbsp;'.$TbMsg["DISK"].'&nbsp;'.$disk.'</td>'.chr(13);
@@ -87,6 +88,8 @@ function pintaParticiones($cmd,$configuraciones,$idordenadores,$cc)
break;
case 3: $disktable[$tbKeys[$k]["numdisk"]] = "LVM";
break;
+ case 4: $disktable[$tbKeys[$k]["numdisk"]] = "ZPOOL";
+ break;
default: $disktable[$tbKeys[$k]["numdisk"]] = "";
}
}
@@ -94,7 +97,7 @@ function pintaParticiones($cmd,$configuraciones,$idordenadores,$cc)
echo'<tr height="16">'.chr(13);
echo'<td align="center">&nbsp;</td>'.chr(13);
echo'<td align="center">'.$tbKeys[$k]["numpar"].'</td>'.chr(13);
- if ($disktable[$tbKeys[$k]["numdisk"]] == "LVM") {
+ if ($disktable[$tbKeys[$k]["numdisk"]] == "LVM" or $disktable[$tbKeys[$k]["numdisk"]] == "ZPOOL") {
echo '<td></td>'.chr(13);
}
else {
@@ -108,12 +111,22 @@ function pintaParticiones($cmd,$configuraciones,$idordenadores,$cc)
$filesys=tomaSistemasFicheros($tbKeys[$k]["numpar"],$idordenadores,false,$tbKeys[$k]["numdisk"]);
echo'<td align="center">&nbsp;'.$filesys.'&nbsp;</td>'.chr(13);
- echo '<td align="center">&nbsp;'.tomaNombresSO($tbKeys[$k]["numpar"],$idordenadores,$tbKeys[$k]["numdisk"]).'&nbsp;</td>'.chr(13);
-
- echo'<td align="right">&nbsp;'.tomaTamano($tbKeys[$k]["numpar"],$idordenadores,$tbKeys[$k]["numdisk"]).'&nbsp;</td>'.chr(13);
-
+ echo '<td align="center">&nbsp;'.tomaNombresSO($tbKeys[$k]["numpar"],$idordenadores,$tbKeys[$k]["numdisk"]).'&nbsp;</td>'.chr(13);
+ // Mostrar uso solo en clientes individuales.
+ $uso=tomaUso($tbKeys[$k]["numpar"],$idordenadores,$tbKeys[$k]["numdisk"]);
+ if ($uso > 0 and strpos($idordenadores, ',') === false) {
+ echo'<td style="text-align:right; background-image:url(../images/flotantes/lsu.gif); background-size:'.$uso.'% 100%; background-repeat:no-repeat"><a title="'.$TbMsg["USAGE"].': '.$uso.'%">&nbsp;'.tomaTamano($tbKeys[$k]["numpar"],$idordenadores,$tbKeys[$k]["numdisk"]).'&nbsp;</a></td>'.chr(13);
+ } else {
+ echo'<td style="text-align:right">&nbsp;'.tomaTamano($tbKeys[$k]["numpar"],$idordenadores,$tbKeys[$k]["numdisk"]).'&nbsp;</td>'.chr(13);
+ }
+
+ // Si es CACHE incluyo campo oculto con el tamaño
+ if ($tbKeys[$k]["tipopar"]== "CACHE"){
+ echo "<input type='hidden' name='cachesize' value='".tomaTamano($tbKeys[$k]["numpar"],$idordenadores,$tbKeys[$k]["numdisk"])."'/>".chr(13);
+ }
+
echo'<td align="center">&nbsp;'.tomaImagenes($tbKeys[$k]["numpar"],$idordenadores,$tbKeys[$k]["numdisk"]).'&nbsp;</td>'.chr(13);
-
+
echo'<td align="center">&nbsp;'.tomaPerfiles($tbKeys[$k]["numpar"],$idordenadores,$tbKeys[$k]["numdisk"]).'&nbsp;</td>'.chr(13);
if ($filesys == "CACHE") {
@@ -146,7 +159,12 @@ function pintaParticiones($cmd,$configuraciones,$idordenadores,$cc)
echo '&nbsp;</td>'.chr(13);
} else {
- echo'<td align="center">&nbsp;'.$tbKeys[$k]["fechadespliegue"].'&nbsp;</td>'.chr(13);
+ if ($tbKeys[$k]["difimagen"] > 0 ) {
+ echo'<td align="center">&nbsp;'.$tbKeys[$k]["fechadespliegue"].' (* '.$tbKeys[$k]["difimagen"].')&nbsp;</td>'.chr(13);
+ $aviso=$TbMsg["WARN_DIFFIMAGE"];
+ } else {
+ echo'<td align="center">&nbsp;'.$tbKeys[$k]["fechadespliegue"].'&nbsp;</td>'.chr(13);
+ }
}
echo'</tr>'.chr(13);
@@ -163,7 +181,7 @@ function pintaParticiones($cmd,$configuraciones,$idordenadores,$cc)
echo'<td></td>'.chr(13);
echo'<td></td>'.chr(13);
echo'<td></td>'.chr(13);
- echo'<td align="right">&nbsp;<strong>'.$disksize[$disk].'</span></strong>&nbsp;</td>'.chr(13);
+ echo'<td align="right">&nbsp;<strong>'.(isset($disksize[$disk])?$disksize[$disk]:('<em>'.$TbMsg["VARIABLE"].'</em>')).'</span></strong>&nbsp;</td>'.chr(13);
// Creamos un campo oculto para guardar información sobre el disco y su tamaño separados por ;
echo "<input type='hidden' name='disksize_".$disk."' value='".$disksize[$disk]."'/>\n";
echo'<td></td>'.chr(13);
@@ -172,6 +190,9 @@ function pintaParticiones($cmd,$configuraciones,$idordenadores,$cc)
echo'</tr>'.chr(13);
}
}
+ if (!empty($aviso)) {
+ echo '<tr><th colspan="'.$columns.'">&nbsp;* '.$aviso.'&nbsp;</th></tr>'."\n";
+ }
echo '<tr height="5"><td colspan="'.$columns.'" style="BORDER-TOP: #999999 1px solid;BACKGROUND-COLOR: #FFFFFF;">&nbsp;</td></tr>';
}
@@ -188,6 +209,9 @@ function pintaParticiones($cmd,$configuraciones,$idordenadores,$cc)
// Ejemplo:1;7;30000000;3;3;0;@2;130;20000000;5;4;0;@3;131;1000000;0;0;0;0
// Devuelve:
// El código html de la tabla
+// version 1.1: cliente con varios repositorios - HTMLSELECT_imagenes: cambia parametros idordenadores por idambito
+// autor: Irina Gomez, Universidad de Sevilla
+// fecha 2015-06-17
//________________________________________________________________________________________________________
function pintaParticionesRestaurarImagen($cmd,$configuraciones,$idordenadores,$cc,$ambito,$idambito)
{
@@ -217,8 +241,9 @@ function pintaParticionesRestaurarImagen($cmd,$configuraciones,$idordenadores,$c
// Recorremos todas las configuraciones encontradas para cada disco
foreach($diskConfigs as $disk => $diskConfig){
- echo'<tr height="16">'.chr(13);
- echo '<td colspan="'.$columns.'" style="BORDER-TOP: #999999 1px solid;BACKGROUND-COLOR: #D4D0C8;">&nbsp;'.$TbMsg["DISK"].'&nbsp;'.$disk.'</td>'.chr(13);
+ $disk = (int)$disk;
+ echo'<tr height="16">'.chr(13);
+ echo '<td colspan="'.$columns.'" style="BORDER-TOP: #999999 1px solid;BACKGROUND-COLOR: #D4D0C8;">&nbsp;'.$TbMsg["DISK"].'&nbsp;'.$disk.'</td>'.chr(13);
$auxCfg=split("@",$diskConfig); // Crea lista de particiones
for($i=0;$i<sizeof($auxCfg);$i++){
@@ -237,8 +262,8 @@ function pintaParticionesRestaurarImagen($cmd,$configuraciones,$idordenadores,$c
echo '<TD align=center>&nbsp;'.tomaNombresSO($tbKeys[$k]["numpar"],$idordenadores,$tbKeys[$k]["numdisk"]).'&nbsp;</TD>'.chr(13);
echo'<TD align=center>&nbsp;'.tomaSistemasFicheros($tbKeys[$k]["numpar"],$idordenadores,false,$tbKeys[$k]["numdisk"]).'&nbsp;</TD>'.chr(13);
echo'<TD align=center>&nbsp;'.tomaTamano($tbKeys[$k]["numpar"],$idordenadores,$tbKeys[$k]["numdisk"]).'&nbsp;</TD>'.chr(13);
- echo '<TD>'.HTMLSELECT_imagenes($cmd,$tbKeys[$k]["idimagen"],$tbKeys[$k]["numpar"],$tbKeys[$k]["codpar"],$icp,true,$idordenadores,$ambito).'</TD>';
- echo '<TD>'.HTMLSELECT_imagenes($cmd,$tbKeys[$k]["idimagen"],$tbKeys[$k]["numpar"],$tbKeys[$k]["codpar"],$icp,false,$idordenadores,$ambito).'</TD>';
+ echo '<TD>'.HTMLSELECT_imagenes($cmd,$tbKeys[$k]["idimagen"],$tbKeys[$k]["numpar"],$tbKeys[$k]["codpar"],$icp,true,$idambito,$ambito).'</TD>';
+ echo '<TD>'.HTMLSELECT_imagenes($cmd,$tbKeys[$k]["idimagen"],$tbKeys[$k]["numpar"],$tbKeys[$k]["codpar"],$icp,false,$idambito,$ambito).'</TD>';
//Clonación
$metodos="UNICAST=UNICAST-CACHE".chr(13);
@@ -291,15 +316,16 @@ function pintaParticionesConfigurar($cmd,$configuraciones,$idordenadores,$cc)
$colums=7;
echo '<TR id="TR_'.$cc.'">';
- echo '<TH align=center><IMG src="../images/iconos/eliminar.gif"></TH>';
- echo '<TH align=center>&nbsp;'.$TbMsg[8].'&nbsp;</TH>';
- echo '<TH align=center>&nbsp;'.$TbMsg[24].'&nbsp;</TH>';
- echo '<TH align=center>&nbsp;'.$TbMsg[27].'&nbsp;</TH>';
- echo '<TH align=center>&nbsp;'.$TbMsg[22].'&nbsp;</TH>';
- echo '<TH align=center>&nbsp;'.$TbMsg[21].'&nbsp;</TH>';
- echo '<TH align=center>&nbsp;'.$TbMsg[14].'&nbsp;</TH>';
+ echo '<TH align=center>&nbsp;'.$TbMsg['REMOVE'].'&nbsp;</TH>';
+ echo '<TH align=center>&nbsp;'.$TbMsg['PARTITION'].'&nbsp;</TH>';
+ echo '<TH align=center>&nbsp;'.$TbMsg['PARTITION_TYPE'].'&nbsp;</TH>';
+ echo '<TH align=center>&nbsp;'.$TbMsg['FILESYSTEM'].'&nbsp;</TH>';
+ echo '<TH align=center>&nbsp;'.$TbMsg['SIZE_KB'].'&nbsp;</TH>';
+ echo '<TH align=center>&nbsp;'.$TbMsg['INSTALLED_OS'].'&nbsp;</TH>';
+ echo '<TH align=center>&nbsp;'.$TbMsg['REFORMAT'].'&nbsp;</TH>';
echo '</TR>';
+
$aviso=false;
$auxCfg=split("@",$configuraciones); // Crea lista de particiones
for($i=0;$i<sizeof($auxCfg);$i++){
@@ -332,20 +358,30 @@ function pintaParticionesConfigurar($cmd,$configuraciones,$idordenadores,$cc)
}
}
// Marcar fin de zona de datos de la tabla.
- echo '<TR id="TRIMG_'.$cc.'" height=5><TD colspan='.$colums.' style="BORDER-TOP: #999999 1px solid;BACKGROUND-COLOR: #FFFFFF;">&nbsp;</TD></TR>';
+ // Datos del disco
+ $tm=tomaTamano(0,$idordenadores);
+ echo '<tr id="TRIMG_'.$cc.'" align="center">'.
+ "\n<td></td>\n<td></td>\n<td".' style="font-size: 1em; padding: 1px 0px; "'.">".$TbMsg["DISK"]."</td>".
+ "\n<td></td>\n<td".' style="font-size: 1em; padding: 1px 0px; "> '.(isset($tm)?$tm:("<em>".$TbMsg["VARIABLE"]."</em>"))." <input type='hidden' id='hdsize$cc' name='hdsize$cc' style='width:100' value='".$tm."'></td>".
+ "\n<td></td>\n<td></td>\n</tr>";
+ echo '<tr><th colspan="'.$colums.'">&nbsp;'.$TbMsg["WARN_DISKSIZE"].'</th></tr>';
// Mostrar aviso: solo disco 1 con tabla MSDOS.
if ($aviso) {
- echo '<tr><th colspan='.$colums.'">'.$TbMsg["CONFIG_NODISK1MSDOS"].'</th></tr>';
+ echo '<tr><th colspan="'.$colums.'">'.$TbMsg["CONFIG_NODISK1MSDOS"].'</th></tr>';
}
// Botones de añadir y confirmar.
- echo '<TR height=30><TD style="BACKGROUND-COLOR: #FFFFFF;" colspan='.$colums.' align=center>';
- echo ' <A href="#add" style="text-decoration:none">
+ if (isset($tm)) {
+ echo '<TR height=30><TD style="BACKGROUND-COLOR: #FFFFFF;" colspan='.$colums.' align=center>';
+ echo ' <A href="#add" style="text-decoration:none">
<IMG id="IMG_'.$icp.'" border=0 src="../images/boton_insertar.gif"
value="'.$k.'" onclick="addParticion(this,'.$cc.')"></A>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<A href="#add" style="text-decoration:none">
<IMG border=0 src="../images/boton_aceptar.gif" onclick="Confirmar('.$cc.')"></A></TD>
</TR>';
+ } else {
+ echo '<tr><th colspan="'.$colums.'">'.$TbMsg["WARN_DIFFDISKSIZE"].'</th></tr>'."\n";
+ }
}
/*
@@ -396,8 +432,9 @@ function pintaParticionesRestaurarImagenSincronizacion1($cmd,$configuraciones,$i
// Recorremos todas las configuraciones encontradas para cada disco
foreach($diskConfigs as $disk => $diskConfig){
- echo'<tr height="16">'.chr(13);
- echo '<td colspan="'.$columns.'" style="BORDER-TOP: #999999 1px solid;BACKGROUND-COLOR: #D4D0C8;">&nbsp;'.$TbMsg["DISK"].'&nbsp;'.$disk.'</td>'.chr(13);
+ $disk = (int)$disk;
+ echo'<tr height="16">'.chr(13);
+ echo '<td colspan="'.$columns.'" style="BORDER-TOP: #999999 1px solid;BACKGROUND-COLOR: #D4D0C8;">&nbsp;'.$TbMsg["DISK"].'&nbsp;'.$disk.'</td>'.chr(13);
$auxCfg=split("@",$diskConfig); // Crea lista de particiones
for($i=0;$i<sizeof($auxCfg);$i++){
@@ -498,8 +535,9 @@ function pintaParticionesRestaurarSoftIncremental($cmd,$configuraciones,$idorden
// Recorremos todas las configuraciones encontradas para cada disco
foreach($diskConfigs as $disk => $diskConfig){
- echo'<tr height="16">'.chr(13);
- echo '<td colspan="'.$columns.'" style="BORDER-TOP: #999999 1px solid;BACKGROUND-COLOR: #D4D0C8;">&nbsp;'.$TbMsg["DISK"].'&nbsp;'.$disk.'</td>'.chr(13);
+ $disk = (int)$disk;
+ echo'<tr height="16">'.chr(13);
+ echo '<td colspan="'.$columns.'" style="BORDER-TOP: #999999 1px solid;BACKGROUND-COLOR: #D4D0C8;">&nbsp;'.$TbMsg["DISK"].'&nbsp;'.$disk.'</td>'.chr(13);
$auxCfg=split("@",$diskConfig); // Crea lista de particiones
for($i=0;$i<sizeof($auxCfg);$i++){
@@ -574,8 +612,9 @@ function pintaParticionesRestaurarImagenBasica($cmd,$configuraciones,$idordenado
// Recorremos todas las configuraciones encontradas para cada disco
foreach($diskConfigs as $disk => $diskConfig){
- echo'<tr height="16">'.chr(13);
- echo '<td colspan="'.$columns.'" style="BORDER-TOP: #999999 1px solid;BACKGROUND-COLOR: #D4D0C8;">&nbsp;'.$TbMsg["DISK"].'&nbsp;'.$disk.'</td>'.chr(13);
+ $disk = (int)$disk;
+ echo'<tr height="16">'.chr(13);
+ echo '<td colspan="'.$columns.'" style="BORDER-TOP: #999999 1px solid;BACKGROUND-COLOR: #D4D0C8;">&nbsp;'.$TbMsg["DISK"].'&nbsp;'.$disk.'</td>'.chr(13);
$auxCfg=split("@",$diskConfig); // Crea lista de particiones
for($i=0;$i<sizeof($auxCfg);$i++){
diff --git a/admin/WebConsole/includes/pintaTablaConfiguraciones.php b/admin/WebConsole/includes/pintaTablaConfiguraciones.php
index 21c9c69b..27e6fac4 100644
--- a/admin/WebConsole/includes/pintaTablaConfiguraciones.php
+++ b/admin/WebConsole/includes/pintaTablaConfiguraciones.php
@@ -195,7 +195,6 @@ function tablaConfiguracionesCrearImagen($cmd,$idordenador,$idrepositorio)
global $idcentro;
global $TbMsg;
$tablaHtml="";
- $rs=new Recordset;
$cmd->texto="SELECT ordenadores.ip AS masterip,ordenadores_particiones.numdisk, ordenadores_particiones.numpar,ordenadores_particiones.codpar,ordenadores_particiones.tamano,
ordenadores_particiones.idnombreso,nombresos.nombreso,tipospar.tipopar,tipospar.clonable,
imagenes.nombreca,imagenes.descripcion as imagen,perfilessoft.idperfilsoft,
@@ -208,20 +207,18 @@ function tablaConfiguracionesCrearImagen($cmd,$idordenador,$idrepositorio)
LEFT OUTER JOIN perfilessoft ON perfilessoft.idperfilsoft=ordenadores_particiones.idperfilsoft
LEFT OUTER JOIN sistemasficheros ON sistemasficheros.idsistemafichero=ordenadores_particiones.idsistemafichero
WHERE ordenadores.idordenador=".$idordenador." ORDER BY ordenadores_particiones.numdisk,ordenadores_particiones.numpar";
- //echo $cmd->texto;
- $rs->Comando=&$cmd;
$rs=new Recordset;
$rs->Comando=&$cmd;
if (!$rs->Abrir())
return($tablaHtml."</table>"); // Error al abrir recordset
$rs->Primero();
$actualDisk = 0;
- $columns = 6;
+ $columns = 5;
while (!$rs->EOF){
if($actualDisk != $rs->campos["numdisk"]){
$actualDisk = $rs->campos["numdisk"];
- $tablaHtml.='<td colspan="'.$columns.'" style="BORDER-TOP: #999999 1px solid;BACKGROUND-COLOR: #D4D0C8;">&nbsp;<strong>'.$TbMsg["DISK"].'&nbsp;'.$actualDisk.'</strong></td>'.chr(13);
+ $tablaHtml.='<TR><td colspan="'.$columns.'" style="BORDER-TOP: #999999 1px solid;BACKGROUND-COLOR: #D4D0C8;">&nbsp;<strong>'.$TbMsg["DISK"].'&nbsp;'.$actualDisk.'</strong></td></TR>'.chr(13);
}
$swcc=$rs->campos["clonable"] && !empty($rs->campos["idnombreso"]);
@@ -236,9 +233,8 @@ function tablaConfiguracionesCrearImagen($cmd,$idordenador,$idrepositorio)
$tablaHtml.='<TD align=center>&nbsp;'.'<span style="FONT-SIZE:10px; COLOR: red;" >'.$TbMsg[12].'</span></TD>'.chr(13);
else
$tablaHtml.='<TD>&nbsp;'.$rs->campos["nombreso"].'&nbsp;</TD>'.chr(13);
+
$tablaHtml.='<TD>'.HTMLSELECT_imagenes($cmd,$idrepositorio,$rs->campos["idperfilsoft"],$rs->campos["numdisk"],$rs->campos["numpar"],$rs->campos["masterip"]).'</TD>';
- $tablaHtml.='<TD>'.HTMLSELECT_repositorios($cmd,$idcentro,$idrepositorio,$rs->campos["numdisk"],$rs->campos["numpar"],$rs->campos["masterip"]).'</TD>';
- //$tablaHtml.='<TD>&nbsp;</TD>';
}
$tablaHtml.='</TR>'.chr(13);
$rs->Siguiente();
@@ -259,8 +255,7 @@ function tablaConfiguracionesCrearImagen($cmd,$idordenador,$idrepositorio)
$inicioTabla.=' <TH align=center>&nbsp;'. $TbMsg["PARTITION"] .'&nbsp;</TH>'.chr(13);
$inicioTabla.=' <TH align=center>&nbsp;'. $TbMsg["PARTITION_TYPE"] .'&nbsp;</TH>'.chr(13);
$inicioTabla.=' <TH align=center>&nbsp;'. $TbMsg["SO_NAME"] .'&nbsp;</TH>'.chr(13);
- $inicioTabla.=' <TH align=center>&nbsp;'. $TbMsg["IMAGE_TO_CREATE"] .'&nbsp;</TH>'.chr(13);
- $inicioTabla.=' <TH align=center>&nbsp;'. $TbMsg["DESTINATION_REPOSITORY"] .'&nbsp;</TH>'.chr(13);
+ $inicioTabla.=' <TH align=center>&nbsp;'. $TbMsg["IMAGE_TO_CREATE"].' -- '.$TbMsg["DESTINATION_REPOSITORY"] .'&nbsp;</TH>'.chr(13);
$inicioTabla.=' </TR>'.chr(13);
$tablaHtml=$inicioTabla.$tablaHtml;
diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php
new file mode 100644
index 00000000..3f91f7f5
--- /dev/null
+++ b/admin/WebConsole/includes/restfunctions.php
@@ -0,0 +1,72 @@
+<?php
+
+/*
+ * @function multiRequest.
+ * @param URLs array (may include header and POST data), cURL options array.
+ * @return Array of arrays with JSON requests and response codes.
+ * @warning Default options: does not verifying certificate, connection timeout 200 ms.
+ * @Date 2015-10-14
+ */
+function multiRequest($data, $options=array(CURLOPT_SSL_VERIFYHOST => false, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_TIMEOUT_MS => 500)) {
+
+ // array of curl handles
+ $curly = array();
+ // Data to be returned (response data and code)
+ $result = array();
+
+ // multi handle
+ $mh = curl_multi_init();
+
+ // loop through $data and create curl handles
+ // then add them to the multi-handle
+ foreach ($data as $id => $d) {
+
+
+ $curly[$id] = curl_init();
+
+ $url = (is_array($d) && !empty($d['url'])) ? $d['url'] : $d;
+ curl_setopt($curly[$id], CURLOPT_URL, $url);
+ // HTTP headers?
+ if (is_array($d) && !empty($d['header'])) {
+ curl_setopt($curly[$id], CURLOPT_HTTPHEADER, $d['header']);
+ } else {
+ curl_setopt($curly[$id], CURLOPT_HEADER, 0);
+ }
+ curl_setopt($curly[$id], CURLOPT_RETURNTRANSFER, 1);
+
+ // post?
+ if (is_array($d)) {
+ if (!empty($d['post'])) {
+ curl_setopt($curly[$id], CURLOPT_POST, 1);
+ curl_setopt($curly[$id], CURLOPT_POSTFIELDS, $d['post']);
+ }
+ }
+
+ // extra options?
+ if (!empty($options)) {
+ curl_setopt_array($curly[$id], $options);
+ }
+
+ curl_multi_add_handle($mh, $curly[$id]);
+ }
+
+ // execute the handles
+ $running = null;
+ do {
+ curl_multi_exec($mh, $running);
+ } while($running > 0);
+
+
+ // Get content and HTTP code, and remove handles
+ foreach($curly as $id => $c) {
+ $result[$id]['data'] = curl_multi_getcontent($c);
+ $result[$id]['code'] = curl_getinfo($c, CURLINFO_HTTP_CODE);
+ curl_multi_remove_handle($mh, $c);
+ }
+
+ // all done
+ curl_multi_close($mh);
+
+ return $result;
+}
+?>
diff --git a/admin/WebConsole/includes/tftputils.php b/admin/WebConsole/includes/tftputils.php
index 13b126f3..55f7a871 100644
--- a/admin/WebConsole/includes/tftputils.php
+++ b/admin/WebConsole/includes/tftputils.php
@@ -11,6 +11,9 @@
include_once("../includes/ctrlacc.php");
include_once("../clases/AdoPhp.php");
+// Directorio de ficheros PXE.
+define("PXEDIR", "/opt/opengnsys/tftpboot/menu.lst");
+
/**
* @brief Sustituye espacio por "_" y quita acentos y tildes.
@@ -21,7 +24,7 @@ include_once("../clases/AdoPhp.php");
* @date
*/
function cleanString ($cadena) {
- return strtr ($cadena, " áéíóúñçÁÉÍÓÚÑÇ", "_aeiouncAEIOUNC");
+ return strtr(trim($cadena), " áéíóúñçÁÉÍÓÚÑÇ", "_aeiouncAEIOUNC");
}
@@ -51,9 +54,18 @@ function clientKernelVersion () {
* @param {String} bootopt Plantilla de arranque PXE.
* @param {Number} hostid Id. del ordenador.
* @param {String} lang Idioma de arranque.
- * @versión 1.0.5 - Primera versión, adaptada de NetBoot Avanzado.
- * @authors Ramón Gómez - ETSII Universidad de Sevilla
+ * @version 1.0.5 - Primera versión, adaptada de NetBoot Avanzado (Antonio J. Doblas Viso - Universidad de Málaga)
+ * @author Ramón Gómez - ETSII Universidad de Sevilla
* @date 2013-04-25
+ * @version 1.1.0 - Se incluye la unidad organizativa como parametro del kernel: ogunit=directorio_unidad (ticket #678).
+ * @author Irina Gómez - ETSII Universidad de Sevilla
+ * @date 2015-12-16
+ * @version 1.1.0 - La segunda fase de carga del ogLive se define en el SERVER para evitar erores de sincronismo entre versiones (ticket #787).
+ * @author Antonio J. Doblas Viso - Universidad de Malaga
+ * @date 2017-06-01
+ * @version 1.1.0 - Se incluye el nombre del perfil hardware y se elimina el winboot (ticket #828).
+ * @author Antonio J. Doblas Viso - Universidad de Malaga
+ * @date 2018-01-21
*/
function createBootMode ($cmd, $bootopt, $hostid, $lang) {
@@ -69,13 +81,17 @@ function createBootMode ($cmd, $bootopt, $hostid, $lang) {
// Obtener información de la base de datos.
$cmd->texto="SELECT ordenadores.nombreordenador AS hostname, ordenadores.ip AS ip,
ordenadores.mac AS mac, ordenadores.netiface AS netiface,
+ ordenadores.oglivedir AS oglivedir,
aulas.netmask AS netmask, aulas.router AS router,
- aulas.dns AS dns, aulas.proxy AS proxy,
+ aulas.ntp AS ntp, aulas.dns AS dns, aulas.proxy AS proxy,
aulas.nombreaula AS grupo, repositorios.ip AS iprepo,
(SELECT ipserveradm FROM entornos LIMIT 1) AS ipserveradm,
- menus.resolucion AS vga, perfileshard.winboot AS winboot
+ menus.resolucion AS vga, perfileshard.descripcion AS hardprofile,
+ centros.directorio, entidades.ogunit
FROM ordenadores
JOIN aulas USING (idaula)
+ JOIN centros USING (idcentro)
+ JOIN entidades USING (identidad)
JOIN repositorios USING (idrepositorio)
LEFT JOIN menus USING (idmenu)
LEFT JOIN perfileshard USING (idperfilhard)
@@ -91,13 +107,21 @@ function createBootMode ($cmd, $bootopt, $hostid, $lang) {
$netiface=$rs->campos["netiface"];
$netmask=$rs->campos["netmask"];
$router=$rs->campos["router"];
+ $ntp=$rs->campos["ntp"];
$dns=$rs->campos["dns"];
$proxy=$rs->campos["proxy"];
$group=cleanString($rs->campos["grupo"]);
$repo=$rs->campos["iprepo"];
$server=$rs->campos["ipserveradm"];
$vga=$rs->campos["vga"];
- $winboot=$rs->campos["winboot"];
+ $hardprofile=cleanString($rs->campos["hardprofile"]);
+ $oglivedir=$rs->campos["oglivedir"];
+ $ogunit=$rs->campos["ogunit"];
+ if ($ogunit == 0 or $rs->campos["directorio"] == null) {
+ $directorio="" ;
+ } else {
+ $directorio=$rs->campos["directorio"];
+ }
$rs->Cerrar();
@@ -119,13 +143,14 @@ function createBootMode ($cmd, $bootopt, $hostid, $lang) {
" ip=$ip:$server:$router:$netmask:$hostname:$netiface:none" .
" group=$group" .
" ogrepo=$repo" .
- " oglive=$repo" .
+ " oglive=$server" .
" oglog=$server" .
" ogshare=$server";
// Añadir parámetros opcionales.
+ if (! empty ($ntp)) { $infohost.=" ogntp=$ntp"; }
if (! empty ($dns)) { $infohost.=" ogdns=$dns"; }
if (! empty ($proxy)) { $infohost.=" ogproxy=$proxy"; }
- if (! empty ($winboot)) { $infohost.=" winboot=$winboot"; }
+ if (! empty ($hardprofile)) { $infohost.=" hardprofile=$hardprofile"; }
// Comprobar si se usa el parámetro "vga" (número de 3 cifras) o "video" (cadena).
if (! empty ($vga)) {
// UHU - Se sustituye la función is_int por is_numeric, ya que al ser un string no funciona bien con is_int
@@ -135,21 +160,20 @@ function createBootMode ($cmd, $bootopt, $hostid, $lang) {
$infohost.=" video=$vga";
}
}
+ if (! empty ($directorio)) { $infohost.=" ogunit=$directorio"; }
- // Obtener nombre de fichero PXE a partir de la MAC del ordenador cliente.
- $pxedir="/opt/opengnsys/tftpboot/menu.lst";
$mac = substr($mac,0,2) . ":" . substr($mac,2,2) . ":" . substr($mac,4,2) . ":" . substr($mac,6,2) . ":" . substr($mac,8,2) . ":" . substr($mac,10,2);
- $macfile="$pxedir/01-" . str_replace(":","-",strtoupper($mac));
+ $macfile = PXEDIR . "/01-" . str_replace(":", "-", strtoupper($mac));
// Crear fichero de arranque a partir de la plantilla y los datos del cliente.
// UHU - si el parametro vga no existe, no se quita.
if (! empty ($vga)) {
- exec ("sed -e 's|vga=...||g' -e 's|INFOHOST|$infohost|g' $pxedir/templates/$bootopt > $macfile");
+ exec("sed -e 's|vga=...||g; s|INFOHOST|$infohost|g; s|set ISODIR=.*|set ISODIR=$oglivedir|g' " . PXEDIR . "/templates/$bootopt > $macfile");
}
else{
- exec ("sed -e 's|INFOHOST|$infohost|g' $pxedir/templates/$bootopt > $macfile");
+ exec("sed -e 's|INFOHOST|$infohost|g; s|set ISODIR=.*|set ISODIR=$oglivedir|g; s|set ISODIR=.*|set ISODIR=$oglivedir|g' " . PXEDIR . "/templates/$bootopt > $macfile");
}
- exec ("chmod 777 $macfile");
+ chmod($macfile, 0777);
}
@@ -164,10 +188,10 @@ function createBootMode ($cmd, $bootopt, $hostid, $lang) {
function deleteBootFile ($mac) {
// Obtener nombre de fichero a partir de dirección MAC.
- $pxedir="/opt/opengnsys/tftpboot/menu.lst";
- $macfile = "$pxedir/01-" . substr($mac,0,2) . "-" . substr($mac,2,2) . "-" . substr($mac,4,2) . "-" . substr($mac,6,2) . "-" . substr($mac,8,2) . "-" . substr($mac,10,2);
+ $mac = strtoupper($mac);
+ $macfile = PXEDIR . "/01-" . substr($mac, 0, 2) . "-" . substr($mac, 2, 2) . "-" . substr($mac, 4, 2) . "-" . substr($mac, 6, 2) . "-" . substr($mac, 8, 2) . "-" . substr($mac, 10, 2);
// Eliminar el fichero.
- exec ("rm -f $macfile");
+ @unlink($macfile);
}
/**
@@ -212,5 +236,47 @@ function updateBootMode ($cmd, $idfield, $idvalue, $lang) {
}
}
+/**
+ * updateBootRepo ($cmd, $repoid)
+ * @brief Actualiza la IP del repositorio en los ficheros PXE de todos sus equipos asociados.
+ * @param {Object} cmd Objeto de conexión con la base de datos
+ * @param {Integer} repoid Campo identificador del repositorio
+ * @return {Integer} 0, sin errores; -1, error acceso a BD; >0, ficheros no modificados
+ * @versión 1.1.0 - Primera versión.
+ * @authors Ramón Gómez - ETSII Universidad de Sevilla
+ * @date 2018-01-19
+ */
+function updateBootRepo ($cmd, $repoid) {
+ $errors = 0;
+ // Obtener todas las MAC de los ordenadores incluidos en el repositorio.
+ $cmd->texto = "SELECT UPPER(ordenadores.mac) AS mac, repositorios.ip AS iprepo
+ FROM ordenadores
+ JOIN repositorios USING (idrepositorio)
+ WHERE ordenadores.idrepositorio = '$repoid'";
+ $rs = new Recordset;
+ $rs->Comando=&$cmd;
+ if ($rs->Abrir()) {
+ $rs->Primero();
+ while (! $rs->EOF) {
+ $mac = $rs->campos["mac"];
+ $repo = $rs->campos["iprepo"];
+ // Obtener nombre de fichero PXE a partir de la MAC del ordenador cliente.
+ $macfile = PXEDIR . "/01-" . substr($mac, 0, 2) . "-" . substr($mac, 2, 2) . "-" . substr($mac, 4, 2) . "-" . substr($mac, 6, 2) . "-" . substr($mac, 8, 2) . "-" . substr($mac, 10, 2);
+ // Actualizar parámetro "ogrepo" en el fichero PXE.
+ if ($pxecode = @file_get_contents($macfile)) {
+ $pxecode = preg_replace("/ogrepo=[^ ]*/", "ogrepo=$repo", $pxecode);
+ if (! @file_put_contents($macfile, $pxecode)) {
+ $erros++;
+ }
+ }
+ $rs->Siguiente();
+ }
+ $rs->Cerrar();
+ } else {
+ $errors = -1;
+ }
+ return($errors);
+}
+
?>
diff --git a/admin/WebConsole/index.php b/admin/WebConsole/index.php
index 96f3abbb..d574c106 100644
--- a/admin/WebConsole/index.php
+++ b/admin/WebConsole/index.php
@@ -14,11 +14,6 @@ if(isset($_SESSION)){ // Si existe algua sesin ...
session_unset(); // Elimina variables
session_destroy(); // Destruye sesin
}
-# Cambiar a HTTPS
-if (empty ($_SERVER["HTTPS"])) {
- header ("Location: https://".$_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"]);
- exit (0);
-}
// Cargar configuracin.
include_once("controlacceso.php");
@@ -42,8 +37,7 @@ if (!$cmd)
die($TbMsg["ACCESS_ERROR"]);
$rs=new Recordset;
-// $cmd->texto="SELECT * FROM centros WHERE idcentro='$idc'";
- $cmd->texto="SELECT * FROM centros ";
+ $cmd->texto="SELECT * FROM centros";
$rs->Comando=&$cmd;
if (!$rs->Abrir()) return(false); // Error al abrir recordset
$rs->Primero();
@@ -115,13 +109,13 @@ function PulsaEnter(oEvento){
<h2> <?php echo $TbMsg["ACCESS_SUBHEAD"]; ?> </h2>
<form action="controlpostacceso.php" name="fdatos" method="post">
<fieldset>
- <p><label for="usu"><?php echo $TbMsg["ACCESS_USERNAME"]; ?></label>
- <input name="usu" type="text" onkeypress="PulsaEnter(event)" /></p>
- <p><label for="pss"><?php echo $TbMsg["ACCESS_PASSWORD"]; ?></label>
- <input name="pss" type="password" onkeypress="PulsaEnter(event)" /></p>
- <p><label for="idcentro"><?php echo $TbMsg["ACCESS_ORGUNIT"]; ?></label>
- <?php echo HTMLSELECT($cmd,0,'centros',$idcentro,'idcentro','nombrecentro',220); ?></p>
- <button type="submit" onclick="confirmar()"><?php echo $TbMsg["ACCESS_OK"]; ?></button>
+ <div><label for="usu"><?php echo $TbMsg["ACCESS_USERNAME"]; ?></label>
+ <input name="usu" type="text" onkeypress="PulsaEnter(event)" /></div>
+ <div><label for="pss"><?php echo $TbMsg["ACCESS_PASSWORD"]; ?></label>
+ <input name="pss" type="password" onkeypress="PulsaEnter(event)" /></div>
+ <div><label for="idcentro"><?php echo $TbMsg["ACCESS_ORGUNIT"]; ?></label>
+ <?php echo HTMLSELECT($cmd,0,'centros',$idcentro,'idcentro','nombrecentro',220); ?></div>
+ <div><button type="submit" onclick="confirmar()"><?php echo $TbMsg["ACCESS_OK"]; ?></button></div>
</fieldset>
</form>
</div>
@@ -130,7 +124,7 @@ function PulsaEnter(oEvento){
// Aadir versin y URL al proyecto.
$versionfile="../doc/VERSION.txt";
if (file_exists ($versionfile)) {
- echo '<span><a href="http://opengnsys.es/">';
+ echo '<span><a href="https://opengnsys.es/">';
include ($versionfile);
echo '</a></span>';
}
diff --git a/admin/WebConsole/jscripts/aula.js b/admin/WebConsole/jscripts/aula.js
index f34c01ba..cc8f03d7 100644
--- a/admin/WebConsole/jscripts/aula.js
+++ b/admin/WebConsole/jscripts/aula.js
@@ -111,43 +111,32 @@ function soIMG(so)
var MimgOrdenador="";
switch(so){
case 'INI':
- MimgOrdenador="ordenador_INI.gif"; // Iniciando cliente
+ MimgOrdenador="ordenador_INI.png"; // Iniciando cliente
break;
case 'BSY':
- MimgOrdenador="ordenador_BSY.gif"; // Cliente ocupado
+ MimgOrdenador="ordenador_BSY.png"; // Cliente ocupado
break;
case 'OPG':
- MimgOrdenador="ordenador_OPG.gif"; // Cliente OpenGnSys
- break;
- case 'WS2':
- MimgOrdenador="ordenador_WS2.gif"; // Windows Server 2003
- break;
- case 'W2K':
- MimgOrdenador="ordenador_W2K.gif"; // Windows 2000
+ MimgOrdenador="ordenador_OPG.png"; // Cliente OpenGnsys
break;
+ case 'WIN':
case 'WXP':
- MimgOrdenador="ordenador_WXP.gif"; // Windows XP
- break;
- case 'WNT':
- MimgOrdenador="ordenador_WNT.gif"; // Windows NT
+ MimgOrdenador="ordenador_WIN.png"; // Windows
break;
- case 'W95':
- MimgOrdenador="ordenador_W95.gif"; // Windows 95
+ case 'WINS':
+ MimgOrdenador="ordenador_WINS.png"; // Sesión Windows
break;
- case 'W98':
- MimgOrdenador="ordenador_W98.gif"; // Windows 98
- break;
- case 'WML':
- MimgOrdenador="ordenador_WML.gif"; // Windows Millenium
+ case 'LNX':
+ MimgOrdenador="ordenador_LNX.png"; // Linux
break;
- case 'WIN':
- MimgOrdenador="ordenador_WXP.gif"; // Windows
+ case 'LNXS':
+ MimgOrdenador="ordenador_LNXS.png"; // Sesión Linux
break;
- case 'LNX':
- MimgOrdenador="ordenador_LNX.gif"; // Linux
+ case 'OSX':
+ MimgOrdenador="ordenador_OSX.png"; // macOS
break;
default:
- MimgOrdenador="ordenador_OFF.gif"; // Apagado
+ MimgOrdenador="ordenador_OFF.png"; // Apagado
break;
}
return(MimgOrdenador);
diff --git a/admin/WebConsole/jscripts/aulas.js b/admin/WebConsole/jscripts/aulas.js
index 254e0ac0..33230e8c 100644
--- a/admin/WebConsole/jscripts/aulas.js
+++ b/admin/WebConsole/jscripts/aulas.js
@@ -33,10 +33,11 @@ function colocar_ordenador(swsufijo){
var sufijonodo=currentNodo.toma_sufijo()
var identificador_ordenador=corte_currentNodo.toma_identificador()
var swsf=parseInt(swsufijo)
+ var colo='s';
if (swsf==0) // El ordenador se mueve a un grupo de ordenadores
- var prm="opcion="+op_movida+"&grupoid="+identificador+"&idordenador="+identificador_ordenador
+ var prm="opcion="+op_movida+"&grupoid="+identificador+"&idordenador="+identificador_ordenador+"&coloc="+colo
else // El ordenador se mueve a un aula
- var prm="opcion="+op_movida+"&idaula="+identificador+"&idordenador="+identificador_ordenador
+ var prm="opcion="+op_movida+"&idaula="+identificador+"&idordenador="+identificador_ordenador+"&coloc="+colo
var wurl="../gestores/gestor_ordenadores.php";
CallPage(wurl,prm,"retornoColocar","POST");
diff --git a/admin/WebConsole/jscripts/comunes.js b/admin/WebConsole/jscripts/comunes.js
index 5a87c0c2..f11bedd5 100644
--- a/admin/WebConsole/jscripts/comunes.js
+++ b/admin/WebConsole/jscripts/comunes.js
@@ -175,6 +175,7 @@ function insertar(l,t,w,h,pages,swi,idu){
function resultado_insertar(resul,descrierror,nwid,tablanodo){
if (!resul){
alert(descrierror);
+ return;
}
InsertaNodo(currentNodo,tablanodo);
alert(CTbMsg[4]);
diff --git a/admin/WebConsole/jscripts/propiedades_aulas.js b/admin/WebConsole/jscripts/propiedades_aulas.js
index dd8502fe..8dda9478 100644
--- a/admin/WebConsole/jscripts/propiedades_aulas.js
+++ b/admin/WebConsole/jscripts/propiedades_aulas.js
@@ -123,6 +123,7 @@ function comprobar_datos(){
validate (form.comentarios, validate_text, 18) &&
validate (form.router, validate_ipadress_notnull, 4) &&
validate (form.netmask, validate_ipadress_notnull, 5) &&
+ validate (form.ntp, validate_ipadress, 19) &&
validate (form.dns, validate_ipadress, 12) &&
validate (form.proxy, validate_url, 13) &&
validate (form.modp2p, validate_notnull, 6) &&
diff --git a/admin/WebConsole/jscripts/propiedades_centros.js b/admin/WebConsole/jscripts/propiedades_centros.js
index 763e6906..d2695fd2 100644
--- a/admin/WebConsole/jscripts/propiedades_centros.js
+++ b/admin/WebConsole/jscripts/propiedades_centros.js
@@ -74,10 +74,16 @@ function confirmar(op){
// Comprobar_datos
//________________________________________________________________________________________________________
function comprobar_datos(){
- if (document.fdatos.nombrecentro==""){
- alert(TbMsg[0])
- document.forms.fdatos.nombrecentro.focus()
- return(false)
- }
- return(true);
+ function validate (field, validator, msgi) {
+ if (!validator (field.value)) {
+ alert(TbMsg[msgi]);
+ validation_highlight (field);
+ return false;
+ }
+ return true;
+ }
+
+ return validate (fdatos.nombrecentro, validate_text_notnull,0) &&
+ validate (fdatos.comentarios, validate_text, 1) &&
+ validate (fdatos.directorio, validate_text, 2)
}
diff --git a/admin/WebConsole/jscripts/propiedades_entidades.js b/admin/WebConsole/jscripts/propiedades_entidades.js
index f3c4494f..12e9cf39 100644
--- a/admin/WebConsole/jscripts/propiedades_entidades.js
+++ b/admin/WebConsole/jscripts/propiedades_entidades.js
@@ -70,14 +70,28 @@ function confirmar(op){
document.fdatos.submit();
}
//________________________________________________________________________________________________________
+// Mensaje_ogunit()
+//________________________________________________________________________________________________________
+function mensaje_ogunit() {
+ alert (TbMsg['PXE']);
+}
+
+//________________________________________________________________________________________________________
//
// Comprobar_datos
//________________________________________________________________________________________________________
function comprobar_datos(){
- if (document.fdatos.nombreentidad==""){
- alert(TbMsg[0])
- document.forms.fdatos.nombreentidad.focus()
- return(false)
+ function validate (field, validator, msgi) {
+ if (!validator (field.value)) {
+ alert(TbMsg[msgi]);
+ validation_highlight (field);
+ return false;
+ }
+ return true;
}
- return(true);
+
+
+
+ return validate (fdatos.nombreentidad, validate_text_notnull,0) &&
+ validate (fdatos.comentarios, validate_text, 1)
}
diff --git a/admin/WebConsole/jscripts/propiedades_imagenes.js b/admin/WebConsole/jscripts/propiedades_imagenes.js
index f8655a22..59a09baf 100644
--- a/admin/WebConsole/jscripts/propiedades_imagenes.js
+++ b/admin/WebConsole/jscripts/propiedades_imagenes.js
@@ -88,7 +88,6 @@ function comprobar_datos(){
return validate (form.nombreca, validate_nameimagefile, 3) &&
validate (form.nombreca, validate_notnull, 3) &&
validate (form.descripcion, validate_notnull, 0) &&
- validate (form.codpar, validate_notnull, 5) &&
validate (form.idrepositorio, validate_notnull, 6);
}
else{
diff --git a/admin/WebConsole/jscripts/propiedades_ordenadores.js b/admin/WebConsole/jscripts/propiedades_ordenadores.js
index 21482f8f..f42c309f 100644
--- a/admin/WebConsole/jscripts/propiedades_ordenadores.js
+++ b/admin/WebConsole/jscripts/propiedades_ordenadores.js
@@ -92,8 +92,10 @@ function comprobar_datos(){
return(false);
}
- return validate (form.nombreordenador, validate_notnull, 0) &&
+ return validate (form.nombreordenador, validate_notspace, 0) &&
+ validate (form.nombreordenador, validate_text_notnull, 0) &&
validate (form.ip, validate_ipadress_notnull, 1) &&
validate (form.mac, validate_macaddress_notnull, 2) &&
+ validate (form.numserie, validate_alphanum, 3) &&
validate (form.idrepositorio, validate_number_notnull, 5) ;
}
diff --git a/admin/WebConsole/jscripts/propiedades_usuarios.js b/admin/WebConsole/jscripts/propiedades_usuarios.js
index d48cc031..f31a2872 100644
--- a/admin/WebConsole/jscripts/propiedades_usuarios.js
+++ b/admin/WebConsole/jscripts/propiedades_usuarios.js
@@ -79,8 +79,14 @@ function comprobar_datos(){
document.forms.fdatos.usuario.focus()
return(false)
}
- if (document.fdatos.pasguor.value==""){
- alert(TbMsg[1])
+ if (document.fdatos.pasguor.value.length < 8){
+ alert(TbMsg[6])
+ document.forms.fdatos.pasguor.focus()
+ return(false)
+ }
+
+ if (document.fdatos.pasguor.value != document.fdatos.confirmarpasguor.value){
+ alert(TbMsg[5])
document.forms.fdatos.pasguor.focus()
return(false)
}
diff --git a/admin/WebConsole/jscripts/validators.js b/admin/WebConsole/jscripts/validators.js
index 7c031f8b..5dacf1cb 100644
--- a/admin/WebConsole/jscripts/validators.js
+++ b/admin/WebConsole/jscripts/validators.js
@@ -94,6 +94,9 @@ function validate_text(value) {
function validate_text_notnull(value) {
return validate_text(value) && validate_notnull(value);
}
+function validate_notspace(value) {
+ return ! validate_expr(value, /.*[ ]/);
+}
function validation_highlight(field) {
field.focus();
diff --git a/admin/WebConsole/menus/examplemenu.html b/admin/WebConsole/menus/examplemenu.php
index 8ca86f4f..b04b3dd0 100644
--- a/admin/WebConsole/menus/examplemenu.html
+++ b/admin/WebConsole/menus/examplemenu.php
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
- <title>Init menu OpenGnSys client</title>
+ <title>Init menu for OpenGnsys clients</title>
<style type="text/css">
body { background: #fff; font-size: 0.7em; }
@@ -25,7 +25,7 @@
dl {
background: transparent url('images/xp_peque.png') no-repeat top left;
padding: 0 0 1em 5em;
- margin: 5px 50px;
+ margin: 2em 10em;
}
dl.windows {
@@ -41,7 +41,12 @@
}
dt { float: left;}
- dd { margin: 1em 20em; }
+ dd { margin: 1em 10em 1em 20em; }
+
+ div.admin {
+ margin: 1em;
+ float: right;
+ }
</style>
</head>
@@ -51,29 +56,39 @@
<h1>Option Menu</h1>
<dl class="windows">
- <dt><a href="command:bootOs 1 1" title="Init session Windows" accesskey="1">Init session Windows.</a></dt>
+ <dt><a href="command:bootOs 1 1" title="Init session Windows, accesskey: 1" accesskey="1">Init session Windows.</a></dt>
<dd>Normal boot Windows without changes.</dd>
- <dt><a href="commandwithconfirmation:restoreImage REPO windows 1 1" title="Format the disk and install the Windows operating system" accesskey="3">Install Windows.</a></dt>
+ <dt><a href="commandwithconfirmation:restoreImage REPO windows 1 1" title="Format the disk and install the Windows operating system, accesskey: 2" accesskey="2">Install Windows.</a></dt>
<dd>The installation process takes a few minutes.</dd>
</dl>
- <dl class="windows">
- <dt><a href="commandwithconfirmation:/opt/opengnsys/interfaceAdm/RestaurarImagenBasica 1 1 WINXPRD2 10.1.15.3 0000 0" title="Restore Windows Image" accesskey="1">Restore Windows Image.</a></dt>
+ <!-- dl class="windows">
+ <dt><a href="commandwithconfirmation:/opt/opengnsys/interfaceAdm/RestaurarImagenBasica 1 1 WINXPRD2 10.1.15.3 0000 0" title="Restore Windows Image, accesskey: 2" accesskey="2">Restore Windows Image.</a></dt>
<dd>Restore Windows Image using synchronization.</dd>
- </dl>
+ </dl -->
<dl class="linux">
- <dt><a href="command:bootOs 1 2" title="Init session GNU/Linux" accesskey="2">Init session GNU/Linux.</a></dt>
+ <dt><a href="command:bootOs 1 2" title="Init session GNU/Linux, accesskey: 3" accesskey="3">Init session GNU/Linux.</a></dt>
<dd>Normal boot <acronym title="GNU's not Unix">GNU</acronym>/Linux without changes.</dd>
- <dt><a href="commandwithconfirmation:restoreImage REPO linux 1 2" title="Format the disk and install the GNU/Linux operating system GNU/Linux" accesskey="4">Install GNU/Linux.</a></dt>
+ <dt><a href="commandwithconfirmation:restoreImage REPO linux 1 2" title="Format the disk and install the GNU/Linux operating system GNU/Linux, accesskey: 4" accesskey="4">Install GNU/Linux.</a></dt>
<dd>The installation process takes a few minutes.</dd>
</dl>
<dl class="apagar">
- <dt><a href="command:poweroff" title="Power-off" accesskey="5">Power-off.</a></dt>
+ <dt><a href="command:poweroff" title="Power-off, accesskey: 0" accesskey="0">Power-off.</a></dt>
<dd>Power-off computer.</dd>
- <dt><a href="command:reboot" title="Reboot" accesskey="6">Reboot.</a></dt>
+ <dt><a href="command:reboot" title="Reboot, accesskey: 6" accesskey="6">Reboot.</a></dt>
<dd>Reboot computer.</dd>
</dl>
+
+<?php // Access to private menu.
+if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])){
+ $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
+} else {
+ $ip = $_SERVER['REMOTE_ADDR'];
+}
+?>
+ <div class="admin"><a href="../varios/acceso_operador.php?iph=<?php echo $ip ?>">Admin Menu</a></div>
+
</body>
</html>
diff --git a/admin/WebConsole/menus/menuejemplo.html b/admin/WebConsole/menus/menuejemplo.php
index 57a52a22..b3fcd175 100644
--- a/admin/WebConsole/menus/menuejemplo.html
+++ b/admin/WebConsole/menus/menuejemplo.php
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
- <title>Men&uacute; de inicio de los equipos OpenGnSys</title>
+ <title>Men&uacute; de inicio de los equipos OpenGnsys</title>
<style type="text/css">
body { background: #fff; font-size: 0.7em; }
@@ -41,7 +41,12 @@
}
dt { float: left;}
- dd { margin: 1em 10em 1em 20em; }
+ dd { margin: 1em 10em 1em 20em; }
+
+ div.admin {
+ margin: 1em;
+ float; right;
+ }
</style>
</head>
@@ -78,6 +83,15 @@
<dd>Reiniciar el ordenador.</dd>
</dl>
+<?php // Acceso a menú privado.
+if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
+ $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
+} else {
+ $ip = $_SERVER['REMOTE_ADDR'];
+}
+?>
+ <div class="admin"><a href="../varios/acceso_operador.php?iph=<?php echo $ip ?>">Administraci&oacute;n</a></div>
+
</body>
</html>
diff --git a/admin/WebConsole/menus/privatemenu.php b/admin/WebConsole/menus/privatemenu.php
new file mode 100644
index 00000000..268889d9
--- /dev/null
+++ b/admin/WebConsole/menus/privatemenu.php
@@ -0,0 +1,46 @@
+<?php // Access to public menu.
+if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])){
+ $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
+} else {
+ $ip = $_SERVER['REMOTE_ADDR'];
+}
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="es" xml:lang="es">
+
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8" />
+ <title>Private menu for OpenGnsys clients</title>
+ <style type="text/css">
+
+ body { background: #fff; font-size: 0.7em; }
+ a:link, a:visited { text-decoration: none; color:#900; font-weight: bold; }
+ a:hover, a:active { color:#d90; }
+
+ h1 {
+ font-size: 1.5em;
+ width: 100%;
+ vertical-align: bottom;
+ color: #555;
+ background: transparent url('images/opengnsys.png') no-repeat top left;
+ padding: 2em 0 1.5em 12em;
+ margin-bottom: 1em;
+ }
+
+ div.admin {
+ margin-left: 5em;
+ float: left;
+ }
+
+ </style>
+</head>
+
+<body>
+ <h1>Option Menu</h1>
+
+ <div class="admin">
+ <p>Link to return to the public zone</p>
+ <a href="../varios/menucliente.php?iph=<?php echo $ip ?>">Return</a>
+ </div>
+</body>
+</html>
diff --git a/admin/WebConsole/pagerror.php b/admin/WebConsole/pagerror.php
index cd19cc4f..71aee05b 100644
--- a/admin/WebConsole/pagerror.php
+++ b/admin/WebConsole/pagerror.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -18,7 +18,7 @@ if (isset($_GET["herror"])) $herror=$_GET["herror"];
<LINK rel="stylesheet" type="text/css" href="estilos.css">
</HEAD>
<BODY>
- <?
+ <?php
echo '<SCRIPT LANGUAGE="JAVASCRIPT">'.chr(13);
echo ' var o=window.top;'.chr(13);
echo ' var ao=o.parent;'.chr(13);
diff --git a/admin/WebConsole/principal/acciones.php b/admin/WebConsole/principal/acciones.php
index 72f0be9f..9b86e2d4 100644
--- a/admin/WebConsole/principal/acciones.php
+++ b/admin/WebConsole/principal/acciones.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -41,11 +41,11 @@ $arbol=new ArbolVistaXML($arbolXML,0,$baseurlimg,$clasedefault,1,0,5);
<SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/comunes.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/acciones_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/acciones_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY OnContextMenu="return false">
-<?
+<?php
//________________________________________________________________________________________________________
echo $arbol->CreaArbolVistaXML(); // Crea árbol (HTML) a partir del XML
$flotante=new MenuContextual(); // Crea objeto MenuContextual
@@ -74,7 +74,7 @@ echo $flotante->CreaMenuContextual($XMLcontextual);
?>
</BODY>
</HTML>
-<?
+<?php
// ********************************************************************************************************
// Devuelve una cadena con formato XML con toda la informaci� de las acciones registradas en un Centro concreto
// Parametros:
diff --git a/admin/WebConsole/principal/acercade.php b/admin/WebConsole/principal/acercade.php
index 3d1c0a91..2981ce0e 100644
--- a/admin/WebConsole/principal/acercade.php
+++ b/admin/WebConsole/principal/acercade.php
@@ -1,7 +1,7 @@
<?php
//********************************************************************
// Descripción :
-// Pagina de informacion sobre el proyecto OpenGnSys
+// Pagina de informacion sobre el proyecto OpenGnsys
//********************************************************************
include_once("../includes/ctrlacc.php");
include_once("../idiomas/php/".$idioma."/acercade_".$idioma.".php");
@@ -19,7 +19,7 @@ include_once("../idiomas/php/".$idioma."/acercade_".$idioma.".php");
<img alt="*" src="../images/acercade.png" align="left" hspace="10em" vspace="10em" />
-<h1><img alt="OpenGnSys" src="../images/iconos/logoopengnsys.png" /></h1>
+<h1><img alt="OpenGnsys" src="../images/iconos/logoopengnsys.png" /></h1>
<p>
<?php
@@ -38,13 +38,14 @@ $changelogfile="../../doc/".$buschangelog;
<?php
// Añadir Manual.
$usermanual="../../doc/userManual";
+$destdir="../api/userManual";
if (file_exists ($usermanual)){
// Copiamos el directorio userManual
-system("cp -R ../../doc/userManual ../api");
+system("rm -fr $destdir; cp -a $usermanual $destdir");
// Creamos el Inicio del Manual
-system("touch ../api/userManual/Inicio.php");
// Añadimos instrucciones
-$ficheroinicio="../api/userManual/Inicio.php";
+$ficheroinicio="$destdir/Inicio.php";
+system("touch $ficheroinicio");
$crearficheroinicio=fopen($ficheroinicio,"w");
fwrite($crearficheroinicio,"
@@ -64,7 +65,7 @@ fwrite($crearficheroinicio,"
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
- <p><img alt='OpenGnSys' src='../../images/iconos/logoopengnsys.png' /></p></td>
+ <p><img alt='OpenGnsys' src='../../images/iconos/logoopengnsys.png' /></p></td>
<td width='61%'>
<p>
@@ -123,7 +124,7 @@ fclose($crearficheroinicio);
<p><?php echo $TbMsg["DESCRIPTION"] ?> </p>
-<p><?php echo $TbMsg["LICENSE"] ?> <a href="http://www.gnu.org/licenses/gpl.html" target="_blank" ><img alt="GPL v3" src="../images/gplv3-88x31.png" height="20em" /></a></p>
+<p><?php echo $TbMsg["LICENSE"] ?> <a href="https://www.gnu.org/licenses/gpl.html" target="_blank" ><img alt="GPL v3" src="../images/gplv3-88x31.png" height="20em" /></a></p>
<p><?php
if (file_exists ($changelogfile)){
@@ -132,9 +133,9 @@ fclose($crearficheroinicio);
include ($versionfile);}
?></p>
-<p><?php echo "<strong><a href='../api/userManual/Inicio.php' target='_blank'>".$TbMsg["MANUAL"]."</a></strong>";?></p>
+<p><?php echo "<strong><a href='$ficheroinicio' target='_blank'>".$TbMsg["MANUAL"]."</a></strong>";?></p>
-<p><strong><?php echo $TbMsg["LINK"]; ?> <a href="http://opengnsys.es" target="_blank" >opengnsys.es</a><strong></p>
+<p><strong><?php echo $TbMsg["LINK"]; ?> <a href="https://opengnsys.es" target="_blank" >opengnsys.es</a><strong></p>
diff --git a/admin/WebConsole/principal/actualizar.php b/admin/WebConsole/principal/actualizar.php
index 3647c87d..a67e3585 100644
--- a/admin/WebConsole/principal/actualizar.php
+++ b/admin/WebConsole/principal/actualizar.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/principal/administracion.php b/admin/WebConsole/principal/administracion.php
index 8303ea6e..5c1dfa28 100644
--- a/admin/WebConsole/principal/administracion.php
+++ b/admin/WebConsole/principal/administracion.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *********************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -41,11 +41,11 @@ $arbol=new ArbolVistaXML($arbolXML,0,$baseurlimg,$clasedefault,2,0,5); // Crea e
<SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/comunes.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/administracion_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/administracion_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY OnContextMenu="return false">
-<?
+<?php
//________________________________________________________________________________________________________
echo $arbol->CreaArbolVistaXML(); // Crea �bol (HTML) a partir del XML
@@ -66,7 +66,7 @@ $flotante=new MenuContextual(); // Crea objeto MenuContextual
?>
</BODY>
</HTML>
-<?
+<?php
// *************************************************************************************************************************************************
// Devuelve una cadena con formato XML con toda la informaci� de aulas y ordenadores registrados en un Centro concreto
// Parametros:
@@ -120,6 +120,7 @@ function SubarbolXML_universidades($cmd){
//________________________________________________________________________________________________________
function SubarbolXML_usuarios($cmd){
global $TbMsg;
+ global $LITAMBITO_USUARIOS;
global $cadenaXML;
$cadenaXML.='<USUARIOS';
diff --git a/admin/WebConsole/principal/aula.php b/admin/WebConsole/principal/aula.php
index aa606053..c1fabfc0 100644
--- a/admin/WebConsole/principal/aula.php
+++ b/admin/WebConsole/principal/aula.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -60,9 +60,9 @@ if (!$cmd)
<SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/comunes.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/aulas_'.$idioma.'.js"></SCRIPT>'?>
-<?
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/aulas_'.$idioma.'.js"></SCRIPT>'?>
+<?php
//________________________________________________________________________________________________________
switch($litambito){
case $LITAMBITO_CENTROS :
@@ -94,14 +94,14 @@ switch($litambito){
<FORM name="fcomandos" action="" method="post" target="frame_contenidos">
<INPUT type="hidden" name="idcomando" value="">
<INPUT type="hidden" name="descricomando" value="">
- <INPUT type="hidden" name="ambito" value="<? echo $ambito?>">
- <INPUT type="hidden" name="idambito" value="<? echo $idambito?>">
+ <INPUT type="hidden" name="ambito" value="<?php echo $ambito?>">
+ <INPUT type="hidden" name="idambito" value="<?php echo $idambito?>">
<INPUT type="hidden" name="nombreambito" value="">
<INPUT type="hidden" name="gestor" value="">
<INPUT type="hidden" name="funcion" value="">
<INPUT type="hidden" name="script" value="">
</FORM>
-<?
+<?php
$flotante=new MenuContextual(); // Crea objeto menu contextual
$XMLcontextual=ContextualXMLAulas(); // Crea contextual de aulas
echo $flotante->CreaMenuContextual($XMLcontextual);
@@ -138,7 +138,7 @@ echo $flotante->CreaMenuContextual($XMLcontextual);
</SCRIPT>
</BODY>
</HTML>
-<?
+<?php
// *************************************************************************************************************************************************
function RecorreCentro($cmd){
global $AMBITO_GRUPOSAULAS;
@@ -232,7 +232,7 @@ function RecorreOrdenadores($cmd){
$idordenador=$rs->campos["idordenador"];
$Midordenador[$k]=$rs->campos["idordenador"];
$Mnombreordenador[$k]=$rs->campos["nombreordenador"];
- $MimgOrdenador[$k]="ordenador_OFF.gif";
+ $MimgOrdenador[$k]="ordenador_OFF.png";
$Mip[$k]=$rs->campos["ip"];
$Mmac[$k]=$rs->campos["mac"];
$cadenaip.=$rs->campos["ip"].";";
@@ -295,13 +295,17 @@ function pintaordenadores(){
}
}
echo '</TABLE>';
- echo '
-<p>
-<table style="border: #d4d0c8 1px solid; background: #eeeeee" align=center>
- <tr align="center">';
- foreach ( Array ("OPG", "BSY", "WXP", "LNX", "OFF") as $status) {
- echo ' <td><img src="../images/ordenador_'.$status.'.gif" alt="'.$status.'" width="24" /><br /><font color="#003300" size="1" face="Arial, Helvetica, sans-serif">'.$TbMsg["STATUS_$status"].'</font></td>';
+ echo '<p>';
+ echo '<table style="border: #d4d0c8 1px solid; background: #eeeeee" align="center">';
+ echo ' <tr align="center" valign="top">';
+ foreach (Array ("OPG", "WIN", "LNX", "OSX") as $status) {
+ echo ' <td><img src="../images/ordenador_'.$status.'.png" alt="'.$status.'" width="24" /><br /><font color="#003300" size="1" face="Arial, Helvetica, sans-serif">'.$TbMsg["STATUS_$status"].'</font></td>';
}
+ echo ' <tr align="center" valign="top">';
+ foreach (Array ("BSY", "WINS", "LNXS", "OFF") as $status) {
+ echo ' <td><img src="../images/ordenador_'.$status.'.png" alt="'.$status.'" width="24" /><br /><font color="#003300" size="1" face="Arial, Helvetica, sans-serif">'.str_replace(" ", "<br>", $TbMsg["STATUS_$status"]).'</font></td>';
+ }
+ echo ' </tr>';
echo ' </tr>';
echo '</table>';
if ($nombreaula!="")
diff --git a/admin/WebConsole/principal/aulas.php b/admin/WebConsole/principal/aulas.php
index 6d8887fc..631e68dc 100644
--- a/admin/WebConsole/principal/aulas.php
+++ b/admin/WebConsole/principal/aulas.php
@@ -54,7 +54,7 @@ $arbol=new ArbolVistaXML($arbolXML,0,$baseurlimg,$clasedefault,1,0,5); // Crea e
<INPUT type="hidden" name="gestor" value="">
<INPUT type="hidden" name="funcion" value="">
</FORM>
-<?
+<?php
//________________________________________________________________________________________________________
echo $arbol->CreaArbolVistaXML(); // Crea árbol (HTML) a partir del XML
$flotante=new MenuContextual(); // Crea objeto MenuContextual
@@ -116,7 +116,7 @@ echo $flotante->CreaMenuContextual($XMLcontextual);
?>
</BODY>
</HTML>
-<?
+<?php
// *************************************************************************************************************************************************
// Devuelve una cadena con formato XML con toda la informaci� de aulas y ordenadores registrados en un Centro concreto
// Parametros:
@@ -350,15 +350,6 @@ function ContextualXMLCentros(){
$layerXML.=' textoitem='.$TbMsg[28];
$layerXML.='></ITEM>';
- $layerXML.='<SEPARADOR>';
- $layerXML.='</SEPARADOR>';
-
- $layerXML.='<ITEM';
- $layerXML.=' alpulsar="cola_reservas('.$RESERVA_CONFIRMADA.')"';
- $layerXML.=' imgitem="../images/iconos/reservas.gif"';
- $layerXML.=' textoitem='.$TbMsg[29];
- $layerXML.='></ITEM>';
-
$layerXML.='</MENUCONTEXTUAL>';
return($layerXML);
}
@@ -467,15 +458,6 @@ function ContextualXMLGruposAulas(){
$layerXML.=' textoitem='.$TbMsg[7];
$layerXML.='></ITEM>';
- $layerXML.='<SEPARADOR>';
- $layerXML.='</SEPARADOR>';
-
- $layerXML.='<ITEM';
- $layerXML.=' alpulsar="cola_reservas('.$RESERVA_CONFIRMADA.')"';
- $layerXML.=' imgitem="../images/iconos/reservas.gif"';
- $layerXML.=' textoitem='.$TbMsg[29];
- $layerXML.='></ITEM>';
-
$layerXML.='</MENUCONTEXTUAL>';
return($layerXML);
}
@@ -639,7 +621,7 @@ function ContextualXMLAulas(){
$layerXML.=' imgitem="../images/iconos/eliminar.gif"';
$layerXML.=' textoitem='.$TbMsg[14];
$layerXML.='></ITEM>';
-
+ /*
$layerXML.='<SEPARADOR>';
$layerXML.='</SEPARADOR>';
@@ -655,13 +637,7 @@ function ContextualXMLAulas(){
$layerXML.=' imgitem="../images/iconos/operadores.gif"';
$layerXML.=' textoitem='.$TbMsg[37];
$layerXML.='></ITEM>';
-
- $layerXML.='<ITEM';
- $layerXML.=' alpulsar="cola_reservas('.$RESERVA_CONFIRMADA.')"';
- $layerXML.=' imgitem="../images/iconos/reservas.gif"';
- $layerXML.=' textoitem='.$TbMsg[29];
- $layerXML.='></ITEM>';
-
+ */
$layerXML.='</MENUCONTEXTUAL>';
return($layerXML);
}
diff --git a/admin/WebConsole/principal/boot_grub4dos.php b/admin/WebConsole/principal/boot_grub4dos.php
index 111de4ef..6d9fa1f8 100644
--- a/admin/WebConsole/principal/boot_grub4dos.php
+++ b/admin/WebConsole/principal/boot_grub4dos.php
@@ -95,10 +95,10 @@ while($encontrado==FALSE)
<TABLE align=center border=1 cellPadding=1 cellSpacing=1 class=tabla_datos >
<TR valign="bottom"><TD colspan="100%" align="left" nowrap>
<form name="modoadmin" id="modoadmin" method="post" action="./boot_grub4dos.php">
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
- <input type="hidden" name="opcion" value="<? echo $opcion?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
+ <input type="hidden" name="opcion" value="<?php echo $opcion?>">
<?php
if (empty($_SESSION["widcentro"]))
{$modo=1;
@@ -138,7 +138,6 @@ if (empty($modo))
<input type="hidden" name="listOfItems" value="">
<?php
-echo "<input type='hidden' name='rungrupo' value='" . $_GET['id_aula'] . "'>";
?>
<!-- primer file, nombre de las equipos por pxe hace falta <td> </td>-->
<td width="80">
@@ -169,7 +168,6 @@ if (!empty($_SESSION["widcentro"]))
$desconocido="00unknown";
//
- echo $estado;
//mostrar los datos
for($i=0; $i<count($pn); $i++)
{//for
diff --git a/admin/WebConsole/principal/boot_grub4dos_crear.php b/admin/WebConsole/principal/boot_grub4dos_crear.php
index 01ffd3c1..eba0ae1f 100644
--- a/admin/WebConsole/principal/boot_grub4dos_crear.php
+++ b/admin/WebConsole/principal/boot_grub4dos_crear.php
@@ -75,10 +75,10 @@ if ($opcioncrear == 1)
<TABLE width="500" align=center border=1 >
<TR><TD align="center"><br><br><br><SPAN align=center class=subcabeceras><?php echo $TbMsg[14];?></span><br><br><br>
<form name="crearranque" method="post" action="./boot_grub4dos_crear.php">
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
- <input type="hidden" name="ultimonumero" value="<? echo $ultimonumero?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
+ <input type="hidden" name="ultimonumero" value="<?php echo $ultimonumero?>">
<input type="hidden" name="confirmado" value="">
<input type="hidden" name="opcioncrear" value="1">
<input type="submit" value="Continuar" name="nuevoarran">
@@ -92,9 +92,9 @@ if ($opcioncrear == 1)
<TABLE width="500" align=center border=1 >
<TR><TD align="center"><br><?php if ($guarnomb != null) echo $TbMsg[6];?><br><br><SPAN align=center class=subcabeceras><?php echo $descripfich;?></span><br><br><br>
<form name="crearranque" method="post" action="./boot_grub4dos.php">
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
<input type="hidden" name="confirmado" value="1">
<input type="hidden" name="opcioncrear" value="1">
<input type="submit" value="Continuar" name="nuevoarran">
@@ -158,10 +158,10 @@ boot";
</TR>
<TR>
<TD width="150" valign="middle">
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
- <input type="hidden" name="ultimonumero" value="<? echo $ultimonumero?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
+ <input type="hidden" name="ultimonumero" value="<?php echo $ultimonumero?>">
<input type="hidden" name="opcioncrear" value="1">
<input type="submit" name="boton" value="<?php echo $TbMsg[13]?>">
@@ -170,9 +170,9 @@ boot";
<TD width="500" valign="middle"><br />
<form name="crearranque" method="post" action="./boot_grub4dos.php">
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
<input type="hidden" name="modo" value="1">
<input type="submit" value="<?php echo $TbMsg[16]?>">
</form>
@@ -209,9 +209,9 @@ if ($opcioncrear == 2)
<TABLE width="500" align=center border=1 >
<TR><TD align="center"><br><br><br><SPAN align=center class=subcabeceras><?php echo $TbMsg[14];?></span><br><br><br>
<form name="crearranque" method="post" action="./boot_grub4dos_crear.php">
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
<input type="hidden" name="confirmado" value="0">
<input type="hidden" name="opcioncrear" value="2">
<input type="submit" value="Continuar" name="nuevoarran">
@@ -233,9 +233,9 @@ if ($opcioncrear == 2)
<TABLE width="500" align=center border=1 >
<TR><TD align="center"><br><br><br><SPAN align=center class=subcabeceras><?php echo $TbMsg[7];?></span><br><br><br>
<form name="crearranque" method="post" action="./boot_grub4dos.php">
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
<input type="hidden" name="confirmado" value="0">
<input type="hidden" name="opcioncrear" value="2">
<input type=hidden name=modo value=1></input>
@@ -298,10 +298,10 @@ if ($numeros > 19)
<TD height="70" colspan="2" valign="middle">
<p align=center><SPAN align=center class=cabeceras> <?php echo $TbMsg[4]?> </SPAN></p><p aling=left>
<form name="crearranque" method="post" action="./boot_grub4dos_crear.php">
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
- <input type="hidden" name="ultimonumero" value="<? echo $ultimonumero?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
+ <input type="hidden" name="ultimonumero" value="<?php echo $ultimonumero?>">
<input type="hidden" name="opcioncrear" value="2">
<input type="hidden" name="modo" value="1">
<?php if ($_SESSION["wadminetboot"] == 1 ){ ?>
@@ -314,10 +314,10 @@ if ($numeros > 19)
<?php if ($numeros > 19){ ?>
<TR>
<form name="actualiza" method="post" action="./boot_grub4dos_crear.php">
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
- <input type="hidden" name="ultimonumero" value="<? echo $ultimonumero?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
+ <input type="hidden" name="ultimonumero" value="<?php echo $ultimonumero?>">
<input type="hidden" name="opcioncrear" value="2">
<TD height="10" colspan="2" valign="middle">
@@ -341,10 +341,10 @@ if ($numeros > 19)
<?php }else{?>
<TR>
<form name="actualiza" method="post" action="./boot_grub4dos.php">
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
- <input type="hidden" name="ultimonumero" value="<? echo $ultimonumero?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
+ <input type="hidden" name="ultimonumero" value="<?php echo $ultimonumero?>">
<input type="hidden" name="modo" value="1">
<TD height="10" colspan="2" valign="middle">
@@ -387,10 +387,10 @@ if ($numeros > 19)
<TD width="300" valign="middle">
<SPAN align=center class=subcabeceras></SPAN>
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
- <input type="hidden" name="ultimonumero" value="<? echo $ultimonumero?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
+ <input type="hidden" name="ultimonumero" value="<?php echo $ultimonumero?>">
<input type="hidden" name="confirmado" value="1">
<input type="hidden" name="opcioncrear" value="2">
<input type="submit" value="<?php echo $TbMsg[13]?>" name="nuevoarran">
@@ -399,9 +399,9 @@ if ($numeros > 19)
<TD width="500" valign="middle"><br />
<form name="crearranque" method="post" action="./boot_grub4dos.php">
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
<input type="hidden" name="confirmado" value="1">
<input type="hidden" name="opcioncrear" value="2">
<input type="hidden" name="modo" value="1">
@@ -489,10 +489,10 @@ for ($b=0;$b<count($pn);$b++)
<TD height="70" colspan="4" valign="middle">
<p align=center><SPAN align=center class=cabeceras> <?php echo $TbMsg[4]?> </SPAN></p><p align=left>
<form name="crearranque" method="post" action="./boot_grub4dos_crear.php">
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
- <input type="hidden" name="ultimonumero" value="<? echo $ultimonumero?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
+ <input type="hidden" name="ultimonumero" value="<?php echo $ultimonumero?>">
<input type="hidden" name="opcioncrear" value="2">
<?php echo $modo;if ($modo==1)
{
@@ -506,10 +506,10 @@ for ($b=0;$b<count($pn);$b++)
</TR>
<TR>
<form name="actualiza" method="post" action="./boot_grub4dos_crear.php">
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
- <input type="hidden" name="ultimonumero" value="<? echo $ultimonumero?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
+ <input type="hidden" name="ultimonumero" value="<?php echo $ultimonumero?>">
<input type="hidden" name="opcioncrear" value="2">
<input type="hidden" name="modo" value="1">
@@ -573,10 +573,10 @@ for ($b=0;$b<count($pn);$b++)
<TD width="500" valign="middle">
<SPAN align=center class=subcabeceras></SPAN>
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
- <input type="hidden" name="ultimonumero" value="<? echo $ultimonumero?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
+ <input type="hidden" name="ultimonumero" value="<?php echo $ultimonumero?>">
<input type="hidden" name="confirmado" value="1">
<input type="hidden" name="opcioncrear" value="2">
<input type="submit" value="<?php echo $TbMsg[13]?>" name="nuevoarran">
@@ -585,9 +585,9 @@ for ($b=0;$b<count($pn);$b++)
<TD width="500" valign="middle"><br />
<form name="crearranque" method="post" action="./boot_grub4dos.php">
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
<input type="hidden" name="confirmado" value="1">
<input type="hidden" name="opcioncrear" value="2">
<input type="hidden" name="modo" value="1">
@@ -677,9 +677,9 @@ $rs->Cerrar();
<TABLE width="500" align=center border=1 >
<TR><TD align="center"><br><?php if($eliminafichero != null) echo $TbMsg[8];?><br><br><SPAN align=center class=subcabeceras><?php echo substr($eliminafichero,2);?></span><br><br><br>
<form name="crearranque" method="post" action="./boot_grub4dos.php">
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
<input type="submit" value="Continuar" name="nuevoarran">
</form>
</TR></TD>
@@ -741,9 +741,9 @@ array_multisort($pn);
<TD width="150" valign="middle">
<SPAN align=center class=subcabeceras></SPAN>
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
<input type="hidden" name="confirmado" value="1">
<input type="hidden" name="opcioncrear" value="3">
<input type="submit" value="<?php echo $TbMsg[13]?>" name="nuevoarra">
@@ -752,9 +752,9 @@ array_multisort($pn);
<TD width="500" valign="middle"><br />
<form name="crearranque" method="post" action="./boot_grub4dos.php">
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
<input type="hidden" name="modo" value="1">
<input type="submit" value="<?php echo $TbMsg[16]?>" name="nuevoarran">
</form>
diff --git a/admin/WebConsole/principal/boot_grub4dos_tabla.php b/admin/WebConsole/principal/boot_grub4dos_tabla.php
index d381e3e4..7baae042 100644
--- a/admin/WebConsole/principal/boot_grub4dos_tabla.php
+++ b/admin/WebConsole/principal/boot_grub4dos_tabla.php
@@ -2,9 +2,9 @@
<TR>
<TD width="150" height="45" valign="middle">
<form name="crearranque" method="post" action="./boot_grub4dos.php">
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
<input type="hidden" name="opcioncrear" value="">
</form>
</TD>
@@ -12,9 +12,9 @@
<TR>
<TD width="150" height="100" valign="middle"> <?php echo $TbMsg[3]?><br />
<form name="crearranque" method="post" action="./boot_grub4dos_crear.php">
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
<input type="hidden" name="opcioncrear" value="1">
<input type="hidden" name="ultimonumero" value="<?php echo $ultimonumero?>">
<input type="submit" value=<?php echo $TbMsg[0]?> name="nuevoarran">
@@ -24,9 +24,9 @@
<TR>
<TD width="150" height="100" valign="middle"> <?php echo $TbMsg[4]?><br />
<form name="crearranque" method="post" action="./boot_grub4dos_crear.php">
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
<input type="hidden" name="opcioncrear" value="2">
<input type="submit" value=<?php echo $TbMsg[1]?> name="nuevoarran">
</form>
@@ -35,9 +35,9 @@
<TR>
<TD width="150" height="100" valign="middle"> <?php echo $TbMsg[5]?><br />
<form name="crearranque" method="post" action="./boot_grub4dos_crear.php">
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
<input type="hidden" name="opcioncrear" value="3">
<input type="submit" value=<?php echo $TbMsg[2]?> name="nuevoarran">
</form>
@@ -46,9 +46,9 @@
<TR>
<TD width="150" height="150" valign="middle">
<form name="crearranque" method="post" action="./boot_grub4dos.php">
- <input type="hidden" name="litambito" value="<? echo $litambito?>">
- <input type="hidden" name="idambito" value="<? echo $idambito?>">
- <input type="hidden" name="nombreambito" value="<? echo $nombreambito?>">
+ <input type="hidden" name="litambito" value="<?php echo $litambito?>">
+ <input type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <input type="hidden" name="nombreambito" value="<?php echo $nombreambito?>">
<input type="hidden" name="opcion"crear value="">
</form>
</TD>
diff --git a/admin/WebConsole/principal/boot_pxelinux.php b/admin/WebConsole/principal/boot_pxelinux.php
deleted file mode 100644
index babd2bfe..00000000
--- a/admin/WebConsole/principal/boot_pxelinux.php
+++ /dev/null
@@ -1,217 +0,0 @@
-<html>
-<TITLE>Administración web de aulas</TITLE>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
- <LINK rel="stylesheet" type="text/css" href="../estilos.css">
- <SCRIPT language="javascript" src="../jscripts/propiedades_aulas.js"></SCRIPT>
- <SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
- <SCRIPT language="javascript" src="../idiomas/javascripts/esp/propiedades_aulas_esp.js"></SCRIPT></HEAD>
-
-<script language="javascript" type="text/javascript">
-
-function move(fbox, tbox) {
- var arrFbox = new Array();
- var arrTbox = new Array();
- var arrLookup = new Array();
- var i;
- for (i = 0; i < tbox.options.length; i++) {
- arrLookup[tbox.options[i].text] = tbox.options[i].value;
- arrTbox[i] = tbox.options[i].text;
- }
- var fLength = 0;
- var tLength = arrTbox.length;
- for(i = 0; i < fbox.options.length; i++) {
- arrLookup[fbox.options[i].text] = fbox.options[i].value;
- if (fbox.options[i].selected && fbox.options[i].value != "") {
- arrTbox[tLength] = fbox.options[i].text;
- tLength++;
- }
- else {
- arrFbox[fLength] = fbox.options[i].text;
- fLength++;
- }
- }
- arrFbox.sort();
- arrTbox.sort();
- fbox.length = 0;
- tbox.length = 0;
- var c;
-
-for(c = 0; c < arrFbox.length; c++) {
-var no = new Option();
-no.value = arrLookup[arrFbox[c]];
-no.text = arrFbox[c];
-fbox[c] = no;
-}
-
-for(c = 0; c < arrTbox.length; c++) {
-var no = new Option();
-no.value = arrLookup[arrTbox[c]];
-no.text = arrTbox[c];
-tbox[c] = no;
- }
-}
-
-function allSelect()
-{
-var saveString = "";
-// seleccionamos cada uno de los select
-var input = document.getElementsByTagName('select');
-//alert(input.length);
-for(var i=0; i<input.length; i++){
-//if(inputs[i].getAttribute('type')=='button'){
-// your statements
-patron = "L";
-parm = input[i].name;
-//alert(parm);
-parm = parm.replace(patron,'');
-//alert(parm);
-for (j=0;j<input[i].length;j++)
- {
- //List.options[i].selected = true;
- saveString = saveString + parm + '|' + input[i].options[j].value + ';';
- //alert(saveString);
- }
-}
-document.forms['myForm'].listOfItems.value = saveString;
-}
-
-
-</script>
-</head>
-<body>
-
-<?php
-include_once("../includes/ctrlacc.php");
-include_once("../clases/AdoPhp.php");
-include_once("../clases/XmlPhp.php");
-include_once("../clases/MenuContextual.php");
-include_once("../clases/SockHidra.php");
-include_once("../includes/constantes.php");
-include_once("../includes/comunes.php");
-include_once("../includes/CreaComando.php");
-include_once("../idiomas/php/".$idioma."/aulas_".$idioma.".php");
-
-$cmd=CreaComando($cadenaconexion);
-if (!$cmd)
- Header('Location: '.$pagerror.'?herror=2'); // Error de conexión con servidor B.D.
-//________________________________________________________________________________________________________
-
-$litambito=0;
-$idambito=0;
-$nombreambito="";
-
-
-if (isset($_GET["litambito"])) $litambito=$_GET["litambito"]; // Recoge parametros
-if (isset($_GET["idambito"])) $idambito=$_GET["idambito"];
-if (isset($_GET["nombreambito"])) $nombreambito=$_GET["nombreambito"];
-
-
-switch($litambito){
- case "aulas":
- $seleccion="and idaula=" . $idambito ."";
- break;
- case "gruposordenadores":
- $seleccion= "and grupoid=" . $idambito . "";
- break;
-}
-?>
-
-<TABLE align=center border=1 cellPadding=1 cellSpacing=1 class=tabla_datos >
-<form name="myForm" method="post" action="../gestores/gestor_pxe.php?idaula=<?php echo $idambito ?>&nombreambito=<?php echo $nombreambito?>&litambito=<?php echo $litambito?>" >
-
-
- <P align=center class=cabeceras>Gestión Arranque Avanzado<BR>
- <SPAN align=center class=subcabeceras> <?php echo $nombreambito; ?> </SPAN>
- <input type="submit" value="GUARDAR" name="saveButton" onclick="allSelect()"> </P>
-
-
-
-
-
-
-<input type="hidden" name="listOfItems" value="">
-<?php
-echo "<input type='hidden' name='rungrupo' value='" . $_GET['id_aula'] . "'>";
-?>
-
-
-<!-- primer file, nombre de las equipos por pxe hace falta <td> </td>-->
-<tr>
-<td>
- <!-- <a href="./muestramenu.php?labelmenu=pxe"> OGclient </a><br> pxe <br> -->
-<br>OG-Live <br><br>
-<select multiple size="30" name="Lpxe" id="Lpxe" >
-
-<?php
-#### listado de equipos con menu pxe
-$menupxe=pxe;
-$listadopxe=listaequipos($cmd,$menupxe,$seleccion);
-echo $listadopxe;
-?>
-</select>
-</td>
-
-
-<?php
-
-$cmd->texto="SELECT * FROM menuboot where label <> 'pxe' ";
-$rsmenu=new Recordset;
-$rsmenu->Comando=&$cmd;
-if (!$rsmenu->Abrir()) echo "error";
-$rsmenu->Primero();
-while (!$rsmenu->EOF)
-{
- echo "<td></td>";
- echo "<td> ";
- echo $rsmenu->campos['description'];
- #echo "<a href='./muestramenu.php?labelmenu=" . $rsmenu->campos['label'] ."'> " . $rsmenu->campos['description'] . " </a> <br>". $rs->campos['label'] . "<br>";
- echo " <br>";
- echo "<input type='button' onClick='move(this.form.L" . $rsmenu->campos['label'] . ",this.form.Lpxe)' value='OUT' style='height: 25px; width: 50px' >";
- echo "<input type='button' onClick='move(this.form.Lpxe,this.form.L" . $rsmenu->campos['label'] .")' value='IN' style='height: 25px; width: 35px' >";
- echo " <br>";
- echo "<select multiple size='30' name='L" . $rsmenu->campos['label'] . "' >";
- $listadopxe="";
- $listadopxe=listaequipos($cmd,$rsmenu->campos['label'],$seleccion);
- echo $listadopxe;
- echo "</select>";
- echo "</td>";
- $rsmenu->Siguiente();
-}
-$rsmenu->Cerrar();
-
-
-
-
-
-
-
-// esta funcion genera los elementos de un select(formulario html) donde aparecen los nombres de los ordenadores, según su menu pxe
-function listaequipos($cmd,$menupxe,$seleccion)
-{
-$cmd->texto="SELECT * FROM ordenadores where arranque='" . $menupxe ."' " . $seleccion;
-$rs=new Recordset;
-$rs->Comando=&$cmd;
-if (!$rs->Abrir()) echo "error";
-$rs->Primero();
-while (!$rs->EOF)
-{
- echo "<option value='";
- echo $rs->campos["nombreordenador"];
- echo "'>";
- echo $rs->campos["nombreordenador"];
- echo "</option>";
- $rs->Siguiente();
-}
-$rs->Cerrar();
-}
-
-?>
-
-</tr>
-
-</form>
-</table>
-
-</body>
-</html>
diff --git a/admin/WebConsole/principal/colasacciones.php b/admin/WebConsole/principal/colasacciones.php
index 7e9a2c97..6cc6d822 100644
--- a/admin/WebConsole/principal/colasacciones.php
+++ b/admin/WebConsole/principal/colasacciones.php
@@ -150,7 +150,7 @@
<SCRIPT language="javascript" src="../jscripts/comunes.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/colasacciones.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/colasacciones_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/colasacciones_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY oncontextmenu="return false">
<?php
@@ -308,13 +308,13 @@
?>
<TABLE align=center border=0 align=left cellPadding=2 cellSpacing=5 >
<TR>
- <? // Eliminar ?>
+ <?php // Eliminar ?>
<TD onclick=eleccion(1)>&nbsp;
<TABLE class="filtros" >
<TR>
<TD><A href="#op"><IMG border=0 src="../images/iconos/eliminar.gif"></A>&nbsp;</TD>
<TD><A style="text-decoration:none;COLOR:#999999;" href="#op">
- <span onmouseout=desresaltar(this) onmouseover=resaltar(this)><?echo $TbMsg[12]?><span></A></TD>
+ <span onmouseout=desresaltar(this) onmouseover=resaltar(this)><?php echo $TbMsg[12]?><span></A></TD>
</TR>
</TABLE>
</TD>
@@ -322,10 +322,10 @@
<TD onclick=eleccion(2)>&nbsp;
<TABLE class=filtros>
<TR>
- <? // Resaltar ?>
+ <?php // Resaltar ?>
<TD><A href="#op"><IMG border=0 src="../images/iconos/reiniciar.gif"></A>&nbsp;</TD>
<TD><A style="text-decoration:none;COLOR:#999999;" href="#op">
- <span onmouseout=desresaltar(this) onmouseover=resaltar(this)><?echo $TbMsg[13]?><span></A></TD>
+ <span onmouseout=desresaltar(this) onmouseover=resaltar(this)><?php echo $TbMsg[13]?><span></A></TD>
</TR>
</TABLE>
</TD>
@@ -333,10 +333,10 @@
<TD onclick=eleccion(3)>&nbsp;
<TABLE class=filtros>
<TR>
- <? // Parar ?>
+ <?php // Parar ?>
<TD><A href="#op"><IMG border=0 src="../images/iconos/acDetenida.gif"></A>&nbsp;</TD>
<TD><A style="text-decoration:none;COLOR:#999999;" href="#op">
- <span onmouseout=desresaltar(this) onmouseover=resaltar(this)><?echo $TbMsg[14]?><span></A></TD>
+ <span onmouseout=desresaltar(this) onmouseover=resaltar(this)><?php echo $TbMsg[14]?><span></A></TD>
</TR>
</TABLE>
@@ -345,10 +345,10 @@
<TD onclick=eleccion(4)>&nbsp;
<TABLE class=filtros>
<TR>
- <? // Seguir ?>
+ <?php // Seguir ?>
<TD><A href="#op"><IMG border=0 src="../images/iconos/acIniciada.gif"></A>&nbsp;</TD>
<TD>&nbsp;<A style="text-decoration:none;COLOR:#999999;" href="#op">
- <span onmouseout=desresaltar(this) onmouseover=resaltar(this)><?echo $TbMsg[15]?></span></A>&nbsp;</TD>
+ <span onmouseout=desresaltar(this) onmouseover=resaltar(this)><?php echo $TbMsg[15]?></span></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
@@ -356,26 +356,26 @@
<TD onclick=eleccion(5)>&nbsp;
<TABLE class=filtros>
<TR>
- <? // Seguir ?>
+ <?php // Seguir ?>
<TD><A href="#op"><IMG border=0 src="../images/iconos/acExitosa.gif"></A>&nbsp;</TD>
<TD>&nbsp;<A style="text-decoration:none;COLOR:#999999;" href="#op">
- <span onmouseout=desresaltar(this) onmouseover=resaltar(this)><?echo $TbMsg[55]?></span></A>&nbsp;</TD>
+ <span onmouseout=desresaltar(this) onmouseover=resaltar(this)><?php echo $TbMsg[55]?></span></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD onclick=eleccion(6)>&nbsp;
<TABLE class=filtros>
<TR>
- <? // Seguir ?>
+ <?php // Seguir ?>
<TD><A href="#op"><IMG border=0 src="../images/iconos/acFallida.gif"></A>&nbsp;</TD>
<TD>&nbsp;<A style="text-decoration:none;COLOR:#999999;" href="#op">
- <span onmouseout=desresaltar(this) onmouseover=resaltar(this)><?echo $TbMsg[56]?></span></A>&nbsp;</TD>
+ <span onmouseout=desresaltar(this) onmouseover=resaltar(this)><?php echo $TbMsg[56]?></span></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
- <?
+ <?php
// _________________________________________________________________________
//
// Tabla de registros de acciones
@@ -383,7 +383,7 @@
?>
<TABLE border=0 class="tabla_listados" cellspacing=1 cellpadding=0 >
<TBODY id="tbAcciones">
- <?
+ <?php
cabeceraAcciones();
listaAcciones($ambito,$idambito);
@@ -392,11 +392,11 @@
</TABLE>
</DIV>
<FORM name="facciones">
- <INPUT type="hidden" name=acciones value="<? echo $acciones?>">
+ <INPUT type="hidden" name=acciones value="<?php echo $acciones?>">
<INPUT type="hidden" name=localaccion value="">
- <INPUT type="hidden" name="sesion" value="<? echo $sesion?>">
+ <INPUT type="hidden" name="sesion" value="<?php echo $sesion?>">
</FORM>
- <?
+ <?php
$flotante=new MenuContextual(); // Crea objeto MenuContextual
$XMLcontextual=ContextualXMLAcciones(); // Crea contextual de las acciones
echo $flotante->CreaMenuContextual($XMLcontextual);
@@ -406,7 +406,7 @@
?>
</BODY>
</HTML>
-<?
+<?php
/********************************************************************/
// Escribe la cabecera de los registros de acciones
// _________________________________________________________________________
@@ -741,12 +741,12 @@ function escribeNotificacion($rs,$oA)
else{
/* Fechas y horas */
list($fecha,$hora)=split(" ",substr($rs->campos["fechahorafin"],0));
- if ($fecha=="0000-00-00") $hora="";
+ if ($fecha=="1970-01-01") $hora="";
$html.='<TD align=center>&nbsp;'.InvFecha($fecha).'&nbsp;</TD>';
$html.='<TD align=center>&nbsp;'.$hora.'&nbsp;</TD>';
list($fecha,$hora)=split(" ",substr($rs->campos["fechahorareg"],0));
- if ($fecha=="0000-00-00") $hora="";
+ if ($fecha=="1970-01-01") $hora="";
$html.='<TD align=center>&nbsp;'.InvFecha($fecha).'&nbsp;</TD>';
$html.='<TD align=center>&nbsp;'.$hora.'&nbsp;</TD>';
}
@@ -930,7 +930,7 @@ function escribeResumen($oA)
}
/* Descripción de la notificación (Descripción del error si se ha producido alguno) */
- $html.='<TD style="BACKGROUND-COLOR: #b5daad" >&nbsp;'.$rs->campos["descrinotificacion"].'&nbsp;</TD>';
+ $html.='<TD style="BACKGROUND-COLOR: #b5daad" >&nbsp;'.@$rs->campos["descrinotificacion"].'&nbsp;</TD>';
/* Estado */
$html.='<TD style="BACKGROUND-COLOR: #b5daad" align=center>&nbsp;</TD>';
@@ -1129,10 +1129,10 @@ function escribeCheck()
echo'
<TABLE class="tabla_busquedas" align=center border=0 cellPadding=0 cellSpacing=0>
<TR>
- TH height=15 align="center" colspan=14><? echo $TbMsg[18]?></TH>
+ TH height=15 align="center" colspan=14><?php echo $TbMsg[18]?></TH>
</TR>
<TR>
- <TD align=right><? echo $TbMsg[30]?></TD>
+ <TD align=right><?php echo $TbMsg[30]?></TD>
<TD align=center><INPUT type="checkbox" checked></TD>
<TD width="20" align=center>&nbsp;</TD>
</TR>
diff --git a/admin/WebConsole/principal/colasreservas.php b/admin/WebConsole/principal/colasreservas.php
index a6ca90f7..e59ffe64 100644
--- a/admin/WebConsole/principal/colasreservas.php
+++ b/admin/WebConsole/principal/colasreservas.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -108,12 +108,12 @@ if (isset($_POST["situacion"])){
<SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/comunes.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/colasreservas.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/colasreservas_'.$idioma.'.js"></SCRIPT>'?>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/colasreservas_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
-<?
+<?php
switch($ambito){
case $AMBITO_CENTROS :
$urlimg='../images/iconos/centros.gif';
@@ -294,7 +294,7 @@ include_once("../includes/iframecomun.php");
?>
</BODY>
</HTML>
-<?
+<?php
// *************************************************************************************************************************************************
function CreaReservasTemporal($cmd,$anno_c,$mes_desde,$mes_hasta,$dia_i,$dia_f,$mes_i,$mes_f,$anno_i,$anno_f){
global $usuario;
diff --git a/admin/WebConsole/principal/comandos.php b/admin/WebConsole/principal/comandos.php
index 6d28f9e2..d0c4bf19 100644
--- a/admin/WebConsole/principal/comandos.php
+++ b/admin/WebConsole/principal/comandos.php
@@ -1,4 +1,4 @@
-<?
+<?php
include_once("../includes/ctrlacc.php");
include_once("../clases/AdoPhp.php");
@@ -37,12 +37,12 @@ $literal=$literal.$literalnodo;
<SCRIPT language="javascript" src="../clases/jscripts/MenuContextual.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/comandos.js"></SCRIPT>
<BODY>
- <input type=hidden value="<? echo $identificador?>" id=identificador>
- <input type=hidden value="<? echo $ambicom?>" id=ambicom>
+ <input type=hidden value="<?php echo $identificador?>" id=identificador>
+ <input type=hidden value="<?php echo $ambicom?>" id=ambicom>
<p align=center class=cabeceras>COMANDOS&nbsp<img src="../images/iconos/comandos.gif"><br>
- <span align=center class=subcabeceras><? echo $literal ?></span></p>
-<?
+ <span align=center class=subcabeceras><?php echo $literal ?></span></p>
+<?php
$cmd=CreaComando($cadenaconexion); // Crea objeto comando
if ($cmd){
$rs=new Recordset;
@@ -88,7 +88,7 @@ if ($cmd){
}
?>
<br>
-<?
+<?php
//________________________________________________________________________________________________________
include_once("../includes/opcionesbotones.php");
//________________________________________________________________________________________________________
@@ -99,8 +99,8 @@ include_once("../includes/iframecomun.php");
?>
</BODY>
</HTML>
-<? $cmd->Conexion->Cerrar(); // Cierra la conexión ?>
-<?
+<?php $cmd->Conexion->Cerrar(); // Cierra la conexión ?>
+<?php
/******************************************************************
Devuelve una objeto comando totalmente operativo (con la conexión abierta)
Parametros:
diff --git a/admin/WebConsole/principal/configuraciones.php b/admin/WebConsole/principal/configuraciones.php
index 02d780e8..7c6e02aa 100644
--- a/admin/WebConsole/principal/configuraciones.php
+++ b/admin/WebConsole/principal/configuraciones.php
@@ -94,33 +94,33 @@ if (!$cmd)
}
if($ambito!=$AMBITO_ORDENADORES){
?>
- <P align=center><SPAN align=center class=subcabeceras><? echo $TbMsg[19]?></SPAN></P>
+ <P align=center><SPAN align=center class=subcabeceras><?php echo $TbMsg[19]?></SPAN></P>
<FORM action="configuraciones.php" name="fdatos" method="POST">
- <INPUT type="hidden" name="idambito" value="<? echo $idambito?>">
- <INPUT type="hidden" name="ambito" value="<? echo $ambito?>">
+ <INPUT type="hidden" name="idambito" value="<?php echo $idambito?>">
+ <INPUT type="hidden" name="ambito" value="<?php echo $ambito?>">
<TABLE class="tabla_busquedas" align=center border=0 cellPadding=0 cellSpacing=0>
<TR>
- <TH height=15 align="center" colspan=17><? echo $TbMsg[18]?></TH>
+ <TH height=15 align="center" colspan=17><?php echo $TbMsg[18]?></TH>
</TR>
<TR>
- <TD align=right><? echo $TbMsg[30]?></TD>
- <TD align=center><INPUT type="checkbox" value="<? echo $msk_sysFi?>" name="fk_sysFi" <? if($fk_sysFi==$msk_sysFi) echo " checked "?>></TD>
+ <TD align=right><?php echo $TbMsg[30]?></TD>
+ <TD align=center><INPUT type="checkbox" value="<?php echo $msk_sysFi?>" name="fk_sysFi" <?php if($fk_sysFi==$msk_sysFi) echo " checked "?>></TD>
<TD width="20" align=center>&nbsp;</TD>
- <TD align=right><? echo $TbMsg[31]?></TD>
- <TD align=center><INPUT type="checkbox" value="<? echo $msk_nombreSO?>" name="fk_nombreSO" <? if($fk_nombreSO==$msk_nombreSO) echo " checked "?>></TD>
+ <TD align=right><?php echo $TbMsg[31]?></TD>
+ <TD align=center><INPUT type="checkbox" value="<?php echo $msk_nombreSO?>" name="fk_nombreSO" <?php if($fk_nombreSO==$msk_nombreSO) echo " checked "?>></TD>
<TD width="20" align=center>&nbsp;</TD>
- <TD align=right><? echo $TbMsg[32]?></TD>
- <TD align=center><INPUT type="checkbox" value="<? echo $msk_tamano?>" name="fk_tamano" <? if($fk_tamano==$msk_tamano) echo " checked "?>></TD>
+ <TD align=right><?php echo $TbMsg[32]?></TD>
+ <TD align=center><INPUT type="checkbox" value="<?php echo $msk_tamano?>" name="fk_tamano" <?php if($fk_tamano==$msk_tamano) echo " checked "?>></TD>
<TD width="20" align=center>&nbsp;</TD>
- <TD align=right><? echo $TbMsg[33]?></TD>
- <TD align=center><INPUT type="checkbox" value="<? echo $msk_imagen?>" name="fk_imagen" <? if($fk_imagen==$msk_imagen) echo " checked "?>></TD>
+ <TD align=right><?php echo $TbMsg[33]?></TD>
+ <TD align=center><INPUT type="checkbox" value="<?php echo $msk_imagen?>" name="fk_imagen" <?php if($fk_imagen==$msk_imagen) echo " checked "?>></TD>
<TD width="20" align=center>&nbsp;</TD>
- <TD align=right><? echo $TbMsg[34]?></TD>
- <TD align=center><INPUT type="checkbox" value="<? echo $msk_perfil?>" name="fk_perfil" <? if($fk_perfil==$msk_perfil) echo " checked "?>></TD>
+ <TD align=right><?php echo $TbMsg[34]?></TD>
+ <TD align=center><INPUT type="checkbox" value="<?php echo $msk_perfil?>" name="fk_perfil" <?php if($fk_perfil==$msk_perfil) echo " checked "?>></TD>
<TD width="20" align=center>&nbsp;</TD>
- <TD align=right><? echo $TbMsg[495]?></TD>
- <TD align=center><INPUT type="checkbox" value="<? echo $msk_cache?>" name="fk_cache" <? if($fk_cache==$msk_cache) echo " checked "?>></TD>
+ <TD align=right><?php echo $TbMsg[495]?></TD>
+ <TD align=center><INPUT type="checkbox" value="<?php echo $msk_cache?>" name="fk_cache" <?php if($fk_cache==$msk_cache) echo " checked "?>></TD>
</TR>
@@ -171,8 +171,8 @@ function datosAulas($cmd,$idaula)
?>
<TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[5]?>&nbsp;</TD>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[5]?>&nbsp;</TD>
+ <?php
echo '<TD>'. $nombreaula.'</TD>';
echo '<TH align=center>&nbsp;'.$TbMsg[7].'&nbsp;</TH>';
echo '<TD><INPUT class="formulariodatos" name=cagnon type=checkbox ';
@@ -181,33 +181,33 @@ function datosAulas($cmd,$idaula)
?>
<TD valign=top align=center rowspan=3>
<IMG border=3 style="border-color:#63676b"
- src="<? echo "../images/fotos/".$urlfoto?>">
- <BR><center>&nbsp;<? echo $TbMsg[13].':&nbsp;'. $ordenadores?></center></TD>
+ src="<?php echo "../images/fotos/".$urlfoto?>">
+ <BR><center>&nbsp;<?php echo $TbMsg[13].':&nbsp;'. $ordenadores?></center></TD>
</TR>
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[6]?>&nbsp;</TH>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[6]?>&nbsp;</TH>
+ <?php
echo '<TD>'.$ubicacion.'</TD>';
?>
- <TH align=center>&nbsp;<?echo $TbMsg[8]?>&nbsp;</TD>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[8]?>&nbsp;</TD>
+ <?php
echo '<TD><INPUT class="formulariodatos" name=pizarra type=checkbox ';
if ($pizarra) echo ' checked ';
echo '></TD>';
?>
</TR>
<TR>
- <TH align=center&nbsp;><?echo $TbMsg[9]?>&nbsp;</TD>
- <?
+ <TH align=center&nbsp;><?php echo $TbMsg[9]?>&nbsp;</TD>
+ <?php
echo '<TD>'.$puestos.'</TD>';
?>
- <TH align=center>&nbsp;<?echo $TbMsg[11]?>&nbsp;</TD>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[12]?>&nbsp;</TD>
+ <?php
echo '<TD>'.$comentarios.'</TD>';
?>
</TR>
</TABLE>
-<?
+<?php
}
//________________________________________________________________________________________________________
function datosOrdenadores($cmd,$idordenador)
@@ -243,23 +243,23 @@ src="<?php if ($fotoordenador==""){echo "../images/fotos/fotoordenador.gif";}
</TR>
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[15]?>&nbsp;</TD>
- <?echo '<TD>'.$ip.'</TD>';?>
+ <TH align=center>&nbsp;<?php echo $TbMsg[15]?>&nbsp;</TD>
+ <?php echo '<TD>'.$ip.'</TD>';?>
</TR>
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[16]?>&nbsp;</TD>
- <? echo '<TD>'.$mac.'</TD>';?>
+ <TH align=center>&nbsp;<?php echo $TbMsg[16]?>&nbsp;</TD>
+ <?php echo '<TD>'.$mac.'</TD>';?>
</TR>
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[17]?>&nbsp;</TD>
- <? echo '<TD>'.$perfilhard.'</TD>';?>
+ <TH align=center>&nbsp;<?php echo $TbMsg[17]?>&nbsp;</TD>
+ <?php echo '<TD>'.$perfilhard.'</TD>';?>
</TR>
<TR>
</TABLE>
-<?
+<?php
}
?>
-<?
+<?php
//________________________________________________________________________________________________________
function datosGruposOrdenadores($cmd,$idgrupo)
{
@@ -316,8 +316,8 @@ function datosGruposOrdenadores($cmd,$idgrupo)
?>
<TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[5].'</br>'.$nombreaula?>&nbsp;</TD>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[5].'</br>'.$nombreaula?>&nbsp;</TD>
+ <?php
echo '<TD>'.$nombregrupoordenador.'</TD>
<TD colspan=2 valign=top align=center rowspan=2>
<IMG border=3 style="border-color:#63676b" src="../images/fotos/'.$urlfoto.'"><br>
diff --git a/admin/WebConsole/principal/consolaremota.php b/admin/WebConsole/principal/consolaremota.php
index 7ab72b5b..ea5dbf1c 100644
--- a/admin/WebConsole/principal/consolaremota.php
+++ b/admin/WebConsole/principal/consolaremota.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -73,23 +73,23 @@ switch($litambito){
<SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/comunes.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/consolaremota.js"></SCRIPT>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/consolaremota_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/consolaremota_'.$idioma.'.js"></SCRIPT>'?>
<FORM name="fdatos">
- <INPUT type=hidden name="idambito" value=<?echo $idambito?>>
- <INPUT type=hidden name="litambito" value=<?echo $litambito?>>
- <INPUT type=hidden name="ambito" value=<?echo $ambito?>>
- <INPUT type=hidden name="nomambito" value=<?echo $nomambito?>>
+ <INPUT type=hidden name="idambito" value=<?php echo $idambito?>>
+ <INPUT type=hidden name="litambito" value=<?php echo $litambito?>>
+ <INPUT type=hidden name="ambito" value=<?php echo $ambito?>>
+ <INPUT type=hidden name="nomambito" value=<?php echo $nomambito?>>
</FORM>
- <P align=center class=cabeceras><?echo $TbMsg[7]?><BR>
+ <P align=center class=cabeceras><?php echo $TbMsg[7]?><BR>
<SPAN align=center class=subcabeceras>
- <IMG src="<? echo $urlimg?>">&nbsp;<?echo $textambito.": ".$nomambito?></SPAN></P>
+ <IMG src="<?php echo $urlimg?>">&nbsp;<?php echo $textambito.": ".$nomambito?></SPAN></P>
<TABLE align=center border="0" cellpadding="0" cellspacing="1">
<TR>
- <TD align=center class="presentaciones"><? echo $TbMsg[11]?></TD></TR>
+ <TD align=center class="presentaciones"><?php echo $TbMsg[11]?></TD></TR>
- <?
+ <?php
if($sw==1){ // caja para código del script
echo '<TR>
<TD align=center><textarea onfocus="conmuta(\'hidden\');" class="cajacomandos" name id="comando" cols="'.$cols.'"
@@ -121,7 +121,7 @@ switch($litambito){
}
?>
</TABLE>
-<?
+<?php
if($ambito!=$AMBITO_ORDENADORES){ // Nota al pie
echo '<DIV id="Layer_nota" align=center>';
echo '<BR>';
@@ -131,7 +131,7 @@ switch($litambito){
}
?>
<SCRIPT language="javascript">
- <?
+ <?php
if($sw==2){ // Llama a eco
echo 'sw=2;';
echo 'enviaMsg();';
diff --git a/admin/WebConsole/principal/ecoconsola.php b/admin/WebConsole/principal/ecoconsola.php
index e5722678..cdd09205 100644
--- a/admin/WebConsole/principal/ecoconsola.php
+++ b/admin/WebConsole/principal/ecoconsola.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/principal/ecoremoto.php b/admin/WebConsole/principal/ecoremoto.php
index 4c9a656e..3b022595 100644
--- a/admin/WebConsole/principal/ecoremoto.php
+++ b/admin/WebConsole/principal/ecoremoto.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -28,7 +28,7 @@ if (isset($_GET["nomambito"])) $nomambito=$_GET["nomambito"];
//___________________________________________________________________________________________________
?>
<HTML>
-<TITLE>Eco-<? echo $nomambito?></TITLE>
+<TITLE>Eco-<?php echo $nomambito?></TITLE>
<HEAD>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<LINK rel="stylesheet" type="text/css" href="../estilos.css">
@@ -41,12 +41,12 @@ if (isset($_GET["nomambito"])) $nomambito=$_GET["nomambito"];
//______________________________________________________________________________________________________
</SCRIPT>
<FORM name="fdatos" action="shellconsola.php">
- <INPUT type=hidden name="idambito" value=<?echo $idambito?>>
- <INPUT type=hidden name="litambito" value=<?echo $litambito?>>
- <INPUT type=hidden name="nomambito" value=<?echo $nomambito?>>
+ <INPUT type=hidden name="idambito" value=<?php echo $idambito?>>
+ <INPUT type=hidden name="litambito" value=<?php echo $litambito?>>
+ <INPUT type=hidden name="nomambito" value=<?php echo $nomambito?>>
</FORM>
-<?
+<?php
switch($litambito){
case $LITAMBITO_CENTROS :
$urlimg='../images/iconos/centros.gif';
@@ -70,17 +70,17 @@ switch($litambito){
break;
}
?>
- <P align=center class=cabeceras><?echo $TbMsg[7]?><BR>
+ <P align=center class=cabeceras><?php echo $TbMsg[7]?><BR>
<SPAN align=center class=subcabeceras>
- <IMG src="<? echo $urlimg?>">&nbsp;<?echo $textambito.": ".$nomambito?></SPAN></P>
+ <IMG src="<?php echo $urlimg?>">&nbsp;<?php echo $textambito.": ".$nomambito?></SPAN></P>
<DIV id="Layer_nota" align=center >
<BR>
- <SPAN align=center class=notas><I><?echo $TbMsg[8]?></I></SPAN>
+ <SPAN align=center class=notas><I><?php echo $TbMsg[8]?></I></SPAN>
<table align=center border="0" cellpadding="0" cellspacing="1">
<tr><td class="presentaciones">Salida</td></tr>
<tr><td>
- <div id="diveco" class="marco" align=left style="width:700px;height:500px;overflow:scroll"><P><? echo $TbMsg[11]?></P></div>
+ <div id="diveco" class="marco" align=left style="width:700px;height:500px;overflow:scroll"><P><?php echo $TbMsg[11]?></P></div>
</td></tr>
</table>
</DIV>
diff --git a/admin/WebConsole/principal/hardwares.php b/admin/WebConsole/principal/hardwares.php
index 4ba10d9a..6d14406a 100644
--- a/admin/WebConsole/principal/hardwares.php
+++ b/admin/WebConsole/principal/hardwares.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -41,11 +41,11 @@ $arbol=new ArbolVistaXML($arbolXML,0,$baseurlimg,$clasedefault,1,0,5);
<SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/comunes.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/hardwares_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/hardwares_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY OnContextMenu="return false">
-<?
+<?php
//________________________________________________________________________________________________________
echo $arbol->CreaArbolVistaXML(); // Crea árbol (HTML) a partir del XML
$flotante=new MenuContextual(); // Crea objeto MenuContextual
@@ -74,7 +74,7 @@ $XMLcontextual=CreacontextualXMLPerfil_Hardware(); // Perfiles
?>
</BODY>
</HTML>
-<?
+<?php
// *************************************************************************************************************************************************
// Devuelve una cadena con formato XML de toda la informaci� del hardware registrado en un Centro concreto
// Parametros:
diff --git a/admin/WebConsole/principal/imagenes.php b/admin/WebConsole/principal/imagenes.php
index 047f1a8a..ac358491 100644
--- a/admin/WebConsole/principal/imagenes.php
+++ b/admin/WebConsole/principal/imagenes.php
@@ -47,7 +47,7 @@ $arbol=new ArbolVistaXML($arbolXML,0,$baseurlimg,$clasedefault,1,0,5);
<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/imagenes_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY OnContextMenu="return false">
-<?
+<?php
//________________________________________________________________________________________________________
echo $arbol->CreaArbolVistaXML(); // Muestra árbol en pantalla
@@ -235,12 +235,14 @@ function SubarbolXML_Imagenes($grupoid,$amb,$litamb,$tipo)
$cadenaXML="";
$rs=new Recordset;
- $cmd->texto="SELECT idimagen,descripcion
- FROM imagenes
- WHERE idcentro=".$idcentro."
- AND grupoid=".$grupoid."
- AND tipo=".$tipo."
- ORDER BY descripcion";
+ #### agp ### Añado la consulta el campo idrepositorio ####
+ $cmd->texto="SELECT DISTINCT imagenes.idimagen,imagenes.descripcion,repositorios.nombrerepositorio,repositorios.ip
+ FROM imagenes INNER JOIN repositorios USING (idrepositorio)
+ WHERE imagenes.idrepositorio = repositorios.idrepositorio
+ AND imagenes.idcentro=".$idcentro."
+ AND imagenes.grupoid=".$grupoid."
+ AND imagenes.tipo=".$tipo."
+ ORDER BY imagenes.descripcion";
//echo "<br>".$cmd->texto;
$rs->Comando=&$cmd;
if (!$rs->Abrir()) return($cadenaXML); // Error al abrir recordset
@@ -249,7 +251,7 @@ function SubarbolXML_Imagenes($grupoid,$amb,$litamb,$tipo)
$cadenaXML.='<IMAGEN';
// Atributos
$cadenaXML.=' imagenodo="../images/iconos/imagen.gif"';
- $cadenaXML.=' infonodo="'.$rs->campos["descripcion"].'"';
+ $cadenaXML.=' infonodo="'.$rs->campos["descripcion"].' ('.$rs->campos["nombrerepositorio"].')"';
$cadenaXML.=' nodoid='.$litamb.'-'.$rs->campos["idimagen"];
$cadenaXML.=' clickcontextualnodo="menu_contextual(this,' ."'flo_".$litamb."'" .')"';
$cadenaXML.='>';
diff --git a/admin/WebConsole/principal/menus.php b/admin/WebConsole/principal/menus.php
index 0b3480d8..7b913402 100644
--- a/admin/WebConsole/principal/menus.php
+++ b/admin/WebConsole/principal/menus.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -40,11 +40,11 @@ $arbol=new ArbolVistaXML($arbolXML,0,$baseurlimg,$clasedefault,1,0,5);
<SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/comunes.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/menus_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/menus_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY OnContextMenu="return false">
-<?
+<?php
//________________________________________________________________________________________________________
echo $arbol->CreaArbolVistaXML(); // Crea árbol (HTML) a partir del XML
$flotante=new MenuContextual(); // Crea objeto MenuContextual
@@ -59,7 +59,7 @@ echo $flotante->CreaMenuContextual($XMLcontextual);
?>
</BODY>
</HTML>
-<?
+<?php
// *************************************************************************************************************************************************
// Devuelve una cadena con formato XML con toda la información de los menus iniciales de los clientes rembo de un Centro
// Parametros:
diff --git a/admin/WebConsole/principal/programacionesaulas.php b/admin/WebConsole/principal/programacionesaulas.php
index d83087da..eb330b55 100644
--- a/admin/WebConsole/principal/programacionesaulas.php
+++ b/admin/WebConsole/principal/programacionesaulas.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -108,11 +108,11 @@ if (isset($_POST["situacion"])){
<SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/comunes.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/programacionesaulas.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/programacionesaulas_'.$idioma.'.js"></SCRIPT>'?>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/programacionesaulas_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
-<?
+<?php
switch($ambito){
case $AMBITO_CENTROS :
$urlimg='../images/iconos/centros.gif';
@@ -240,7 +240,7 @@ echo " </TD></TR><TABLE></DIV>";
?>
</BODY>
</HTML>
-<?
+<?php
// *************************************************************************************************************************************************
function ProcesoAnual($fechainicio,$fechafin,$swa){
global $EJECUCION_RESERVA;
diff --git a/admin/WebConsole/principal/programacionesreservas.php b/admin/WebConsole/principal/programacionesreservas.php
index 02eaddc7..c607ce9c 100644
--- a/admin/WebConsole/principal/programacionesreservas.php
+++ b/admin/WebConsole/principal/programacionesreservas.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -108,11 +108,11 @@ if (isset($_POST["situacion"])){
<SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/comunes.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/programacionesreservas.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/programacionesreservas_'.$idioma.'.js"></SCRIPT>'?>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/programacionesreservas_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
-<?
+<?php
switch($ambito){
case $AMBITO_GRUPOSRESERVAS :
$urlimg='../images/iconos/carpeta.gif';
@@ -210,7 +210,7 @@ echo " </TD></TR><TABLE></DIV>";
?>
</BODY>
</HTML>
-<?
+<?php
// *************************************************************************************************************************************************
function ProcesoAnual($fechainicio,$fechafin){
global $EJECUCION_RESERVA;
diff --git a/admin/WebConsole/principal/purgar.php b/admin/WebConsole/principal/purgar.php
index d305ab3f..d3d0aaaa 100644
--- a/admin/WebConsole/principal/purgar.php
+++ b/admin/WebConsole/principal/purgar.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/principal/repositorios.php b/admin/WebConsole/principal/repositorios.php
index 6d4254c3..3ccb1101 100644
--- a/admin/WebConsole/principal/repositorios.php
+++ b/admin/WebConsole/principal/repositorios.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -45,7 +45,7 @@ $XMLcontextual=ContextualXMLComandos($LITAMBITO_CENTROS,$AMBITO_CENTROS);
<SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/comunes.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY OnContextMenu="return false">
<FORM name="fcomandos" action="" method="post" target="frame_contenidos">
@@ -57,7 +57,7 @@ $XMLcontextual=ContextualXMLComandos($LITAMBITO_CENTROS,$AMBITO_CENTROS);
<INPUT type="hidden" name="gestor" value="">
<INPUT type="hidden" name="funcion" value="">
</FORM>
-<?
+<?php
//________________________________________________________________________________________________________
echo $arbol->CreaArbolVistaXML(); // Crea árbol (HTML) a partir del XML
$flotante=new MenuContextual(); // Crea objeto MenuContextual
@@ -72,7 +72,7 @@ echo $flotante->CreaMenuContextual($XMLcontextual);
?>
</BODY OnContextMenu="return false">
</HTML>
-<?
+<?php
// *************************************************************************************************************************************************
// Devuelve una cadena con formato XML de toda la información de los repositorios de un Centro concreto
// Parametros:
diff --git a/admin/WebConsole/principal/reservas.php b/admin/WebConsole/principal/reservas.php
index c7969d0e..a0520ec5 100644
--- a/admin/WebConsole/principal/reservas.php
+++ b/admin/WebConsole/principal/reservas.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -40,11 +40,11 @@ $arbol=new ArbolVistaXML($arbolXML,0,$baseurlimg,$clasedefault,1,0,5);
<SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/comunes.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/reservas_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/reservas_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY OnContextMenu="return false">
-<?
+<?php
//________________________________________________________________________________________________________
echo $arbol->CreaArbolVistaXML(); // Crea árbol (HTML) a partir del XML
$flotante=new MenuContextual(); // Crea objeto MenuContextual
@@ -59,7 +59,7 @@ $flotante=new MenuContextual(); // Crea objeto MenuContextual
?>
</BODY>
</HTML>
-<?
+<?php
// *************************************************************************************************************************************************
// Devuelve una cadena con formato XML con toda la información de las reservas registradas en un Centro concreto
// Parametros:
diff --git a/admin/WebConsole/principal/shellconsola.php b/admin/WebConsole/principal/shellconsola.php
index 1f3c95d3..0a99a620 100644
--- a/admin/WebConsole/principal/shellconsola.php
+++ b/admin/WebConsole/principal/shellconsola.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/principal/softwares.php b/admin/WebConsole/principal/softwares.php
index 79c16831..00079fc1 100644
--- a/admin/WebConsole/principal/softwares.php
+++ b/admin/WebConsole/principal/softwares.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -40,11 +40,11 @@ $arbol=new ArbolVistaXML($arbolXML,0,$baseurlimg,$clasedefault,1,0,5);
<SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/comunes.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/softwares_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/softwares_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY OnContextMenu="return false">
-<?
+<?php
//________________________________________________________________________________________________________
echo $arbol->CreaArbolVistaXML(); // Crea árbol (HTML) a partir del XML
$flotante=new MenuContextual(); // Crea objeto MenuContextual
@@ -75,7 +75,7 @@ echo $flotante->CreaMenuContextual($XMLcontextual);
?>
</BODY>
</HTML>
-<?
+<?php
// *************************************************************************************************************************************************
// Devuelve una cadena con formato XML de toda la información del software registrado en un Centro concreto
// Parametros:
diff --git a/admin/WebConsole/principal/sondeo.php b/admin/WebConsole/principal/sondeo.php
index 137ec449..cc63ec60 100644
--- a/admin/WebConsole/principal/sondeo.php
+++ b/admin/WebConsole/principal/sondeo.php
@@ -7,8 +7,12 @@
// Nombre del fichero: sondeo.php
// Descripción :
// Consulta el estado de los ordenadores
+// Version 1.1: De la salida del sondeo del agente antiguo se eliminan los que han respondido con el agente nuevo
+// Autor: Irina Gomez - ETSII Universidad Sevilla
+// Fecha: 2017/11/03
// *************************************************************************************************************************************************
include_once("../includes/ctrlacc.php");
+ include_once("../includes/restfunctions.php");
include_once("../clases/SockHidra.php");
include_once("../clases/AdoPhp.php");
include_once("../includes/constantes.php");
@@ -41,12 +45,13 @@
$cadenaip="";
$cadenamac="";
RecopilaIpesMacs($cmd,$ambito,$idambito); // Ámbito de aplicación
+
$aplicacion="ido=".$cadenaid.chr(13)."iph=".$cadenaip.chr(13);
- //________________________________________________________________________________________________________
// Envio al servidor de la petición
//________________________________________________________________________________________________________
$resul=false;
$trama="";
+ $trama_notificacion="";
$shidra=new SockHidra($servidorhidra,$hidraport);
if ($shidra->conectar()){ // Se ha establecido la conexión con el servidor hidra
$parametros="nfn=".$funcion.chr(13);
@@ -64,8 +69,31 @@
$ValorParametros=extrae_parametros($parametros,chr(13),'=');
if (isset ($ValorParametros["tso"])) {
$trama_notificacion=$ValorParametros["tso"];
- echo $trama_notificacion; // Devuelve respuesta
}
}
+
+ // Send REST requests to new OGAgent clients.
+ $urls = array();
+ // Compose array of REST URLs.
+ foreach (explode (';', $cadenaip) as $ip) {
+ $urls[$ip] = "https://$ip:8000/opengnsys/status";
+ }
+ // Launch concurrent requests.
+ $responses = multiRequest($urls);
+ // Process responses array (IP as array index).
+ foreach ($responses as $ip => $resp) {
+ if (isset($resp['data'])) {
+ $data = json_decode($resp['data']);
+ // If user session is oppened, then append "S" to client status.
+ if (isset($data->status) and isset($data->loggedin)) {
+ // Output format: IP1/Status1;...
+ echo "$ip/".$data->status.($data->loggedin?"S;":";");
+ // eliminamos los equipos repetidos en el agente antiguo y nuevo.
+ $trama_notificacion=preg_replace("/$ip\/\w{3}/",'',$trama_notificacion);
+
+ }
+ }
+ }
+ echo $trama_notificacion;
?>
diff --git a/admin/WebConsole/principal/verlog.php b/admin/WebConsole/principal/verlog.php
index 844685eb..69a9c908 100644
--- a/admin/WebConsole/principal/verlog.php
+++ b/admin/WebConsole/principal/verlog.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB:
// Autor:
@@ -46,9 +46,9 @@ else
<HTML>
<HEAD>
-<TITLE>Log: <? echo $_GET["nombreordenador"] ?> </TITLE>
+<TITLE>Log: <?php echo $_GET["nombreordenador"] ?> </TITLE>
<meta charset="utf-8">
-<?
+<?php
#echo "<meta http-equiv='Refresh' content='2;URL=./verlog.php?nombreordenador=". $_GET["nombreordenador"] ."&ip=".$ip ."'";
?>
diff --git a/admin/WebConsole/principal/verlogseguimiento.php b/admin/WebConsole/principal/verlogseguimiento.php
index 051f6653..aea0624f 100644
--- a/admin/WebConsole/principal/verlogseguimiento.php
+++ b/admin/WebConsole/principal/verlogseguimiento.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB:
// Autor:
@@ -46,8 +46,8 @@ else
<HTML>
<HEAD>
-<TITLE>Log: <? echo $_GET["nombreordenador"] ?> </TITLE>
-<?
+<TITLE>Log: <?php echo $_GET["nombreordenador"] ?> </TITLE>
+<?php
echo "<meta http-equiv='Refresh' content='2;URL=http://".$ip."/cgi-bin/httpd-log.sh'";
?>
<meta charset="utf-8">
diff --git a/admin/WebConsole/propiedades/propiedades_aulas.php b/admin/WebConsole/propiedades/propiedades_aulas.php
index a571209e..745cc9df 100644
--- a/admin/WebConsole/propiedades/propiedades_aulas.php
+++ b/admin/WebConsole/propiedades/propiedades_aulas.php
@@ -17,6 +17,7 @@ include_once("../includes/HTMLSELECT.php");
include_once("../includes/HTMLCTESELECT.php");
include_once("../clases/AdoPhp.php");
include_once("../idiomas/php/".$idioma."/propiedades_aulas_".$idioma.".php");
+include_once("../idiomas/php/".$idioma."/avisos_".$idioma.".php");
//________________________________________________________________________________________________________
$opcion=0;
$opciones=array($TbMsg[0],$TbMsg[1],$TbMsg[2],$TbMsg[3]);
@@ -26,6 +27,8 @@ $nombreaula="";
$grupoid=0;
$ordenadores=0;
$ubicacion="";
+$inremotepc="";
+$scheduler="";
$cagnon="";
$pizarra="";
$puestos=0;
@@ -41,6 +44,7 @@ $ipmul="";
$pormulmetodos="";
$pormul=9000;
$velmul="";
+$ntp="";
$dns="";
$proxy="";
$idmenu="";
@@ -50,6 +54,12 @@ $idperfilhard="";
$validacion="";
$paginalogin="";
$paginavalidacion="";
+$gidmenu=0;
+$gidprocedimiento=0;
+$gidrepositorio=0;
+$gidperfilhard=0;
+$oglive="";
+$cntDiff=0;
if (isset($_GET["opcion"])) $opcion=$_GET["opcion"]; // Recoge parametros
if (isset($_GET["idaula"])) $idaula=$_GET["idaula"];
@@ -59,14 +69,14 @@ if (isset($_GET["identificador"])) $idaula=$_GET["identificador"];
//________________________________________________________________________________________________________
$cmd=CreaComando($cadenaconexion); // Crea objeto comando
if (!$cmd)
- Header('Location: '.$pagerror.'?herror=2'); // Error de conexión con servidor B.D.
-if ($opcion!=$op_alta){
+ header('Location: '.$pagerror.'?herror=2'); // Error de conexión con servidor B.D.
+if ($opcion!=$op_alta)
$resul=TomaPropiedades($cmd,$idaula);
- if (!$resul)
- Header('Location: '.$pagerror.'?herror=3'); // Error de recuperación de datos.
-}
-else
- $urlfoto="aula.jpg";
+else{
+ $resul=TomaConfiguracion($cmd);
+ $urlfoto="aula.jpg";}
+if (!$resul)
+ header('Location: '.$pagerror.'?herror=3'); // Error de recuperación de datos.
//________________________________________________________________________________________________________
?>
<HTML>
@@ -87,20 +97,25 @@ function abrir_ventana(URL){
<BODY>
<DIV align=center>
<FORM name="fdatos" action="../gestores/gestor_aulas.php" method="post" enctype="multipart/form-data">
- <INPUT type=hidden name=opcion value="<? echo $opcion?>">
- <INPUT type=hidden name=idaula value="<? echo $idaula?>">
- <INPUT type=hidden name=grupoid value="<? echo $grupoid?>">
- <INPUT type=hidden name=ordenadores value="<? echo $ordenadores?>">
+ <INPUT type=hidden name=opcion value="<?php echo $opcion?>">
+ <INPUT type=hidden name=idaula value="<?php echo $idaula?>">
+ <INPUT type=hidden name=grupoid value="<?php echo $grupoid?>">
+ <INPUT type=hidden name=ordenadores value="<?php echo $ordenadores?>">
- <INPUT type=hidden name=gidmenu value="<? echo $gidmenu?>">
- <INPUT type=hidden name=gidprocedimiento value="<? echo $gidprocedimiento?>">
- <INPUT type=hidden name=gidrepositorio value="<? echo $gidrepositorio?>">
- <INPUT type=hidden name=gidperfilhard value="<? echo $gidperfilhard?>">
+ <INPUT type=hidden name=gidmenu value="<?php echo $gidmenu?>">
+ <INPUT type=hidden name=gidprocedimiento value="<?php echo $gidprocedimiento?>">
+ <INPUT type=hidden name=gidrepositorio value="<?php echo $gidrepositorio?>">
+ <INPUT type=hidden name=gidperfilhard value="<?php echo $gidperfilhard?>">
+ <input type="hidden" name="oglive" value="<?php echo $oglive ?>">
- <P align=center class=cabeceras><?echo $TbMsg[4]?><BR>
- <SPAN align=center class=subcabeceras><? echo $opciones[$opcion]?></SPAN></P>
- <TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos >
-<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
+ <P align=center class=cabeceras><?php echo $TbMsg[4]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $opciones[$opcion]?></SPAN></P>
+ <TABLE align=center border=5 cellPadding=1 cellSpacing=1 class=tabla_datos > <!-- AGP -->
+<!-------------------------------------------------- AGP ----------------------------------------------------------------->
+ <TR>
+ <TH style="BACKGROUND-COLOR:#FFFFFF;COLOR:red" colspan=4 align=center>&nbsp;<?php echo $TbMsg[18]?>&nbsp;</TH>
+ </TR>
+<!-------------------------------------------------- AGP ----------------------------------------------------------------->
<tr>
<th align="center"><?php echo $TbMsg[5]?></th>
<?php if ($opcion==$op_eliminacion){
@@ -163,24 +178,11 @@ function abrir_ventana(URL){
?>
</tr>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
-<!-- HORARIO DE SERVICIO TEMPORALMENTE DESHABILITADO.
- <TR>
- <TH align=center>&nbsp;<?echo $TbMsg[13]?>&nbsp;</TD>
- <?
- if ($opcion==$op_eliminacion)
- echo '<TD colspan=3>'.$TbMsg[14].$horaresevini.'&nbsp;&nbsp;&nbsp&nbsp;'.$TbMsg[15].$horaresevfin.'</TD>';
- else
- echo '<TD colspan=3>'.$TbMsg[14].'&nbsp<INPUT class="formulariodatos" onclick="vertabla_horas(this)" name=horaresevini style="width:30" type=text value='.$horaresevini.'>&nbsp;&nbsp;&nbsp&nbsp;'.$TbMsg[15].'&nbsp<INPUT class="formulariodatos" onclick="vertabla_horas(this)" name=horaresevfin style="width:30" type=text value='.$horaresevfin.'></TD>';
- ?>
- </TR>
--->
-<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[10]?>&nbsp;</TH>
- <?
- if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[10]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD colspan=3>../images/fotos/'.$urlfoto.'</TD>';
- else{
+ else{
?>
<TD colspan=3><SELECT class="formulariodatos" name="urlfoto" >
<?php if($urlfoto==""){
@@ -190,34 +192,50 @@ function abrir_ventana(URL){
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != "..") {?>
- <option value="<? echo $entry ?>"><? echo $entry ?></option>
- <?}
+ <option value="<?php echo $entry ?>"><?php echo $entry ?></option>
+ <?php }
}
closedir($handle);
}
?>
</SELECT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<a href="javascript:abrir_ventana('../images/ver.php')" onClick="MM_openBrWindow('../images/ver.php','Imagenes','scrollbars=yes,resizable=yes,width=950,height=640')"><? echo $TbMsg[5092] ?></a>
+<a href="javascript:abrir_ventana('../images/ver.php')" onClick="MM_openBrWindow('../images/ver.php','Imagenes','scrollbars=yes,resizable=yes,width=950,height=640')"><?php echo $TbMsg[5092] ?></a>
</TD>
- <?
+ <?php
}
?>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[12]?>&nbsp;</TH>
- <?
- if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[12]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.$comentarios.'</TD>';
else
echo '<TD colspan=3><TEXTAREA class="formulariodatos" name=comentarios rows=3 cols=65>'.$comentarios.'</TEXTAREA></TD>';
?>
</TR>
+<!---- Ramón ------------------------inremotpc----------------------------------------------------------------------------------------------------------------------------------------->
+ <tr>
+ <th align="center">&nbsp;<?php echo $TbMsg['PROP_REMOTEACCESS'] ?>&nbsp;</th>
+ <?php if ($opcion==$op_eliminacion){
+ echo '<td colspan="3"><input class="formulariodatos" name="inremotepc" type="checkbox" onclick="desabilita(this)" ';
+ if ($inremotepc) echo ' checked ';
+ echo '></td>';
+ } else {
+ echo '<td colspan="3"><input class="formulariodatos" name="inremotepc" type="checkbox" value="1" ';
+ if ($inremotepc) echo ' checked ';
+ if ($scheduler)
+ echo '> <em>('.$TbMsg['COMM_REMOTEACCESS'].')<em></td>';
+ else
+ echo 'disabled> <em>'.$TbMsg['WARN_SCHEDULER'].'<em></td>';
+ }
+ ?>
+ </tr>
<!---- ADV ---------------------------router------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[28]?>&nbsp;</TH>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[28]?>&nbsp;</TH>
+ <?php
if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.$router.'</TD>';
else
@@ -226,14 +244,27 @@ function abrir_ventana(URL){
</TR>
<!---- ADV --------------------------netmask------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center&nbsp;><?echo $TbMsg[29]?>&nbsp;</TH>
- <?
- if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[29]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.$netmask.'</TD>';
else
echo '<TD colspan=3><INPUT class="formulariodatos" name=netmask style="width:100" type=text value='.$netmask.'></TD>';
?>
</TR>
+<!---- Ramón ------------------------ntp------------------------------------------------->
+ <tr>
+ <th align="center">&nbsp;<?php echo $TbMsg['PROP_NTPIP'] ?>&nbsp;</th>
+ <?php if ($opcion==$op_eliminacion) {
+ echo '<td colspan="3">'.$ntp.'</td>';
+ } else {
+ echo '<td colspan="3"><input class="formulariodatos" name="ntp" style="width:100" type="text" maxlength="15" value="'.$ntp.'" /> ';
+ if (exec("timedatectl status | awk -F'[:()]' '/Time.*zone/ {print $2}'", $out, $err)) {
+ echo '<em>('.$TbMsg['COMM_DEFTIMEZONE'].': '.$out[0].')</em>';
+ }
+ echo "</td>";
+ }
+ ?>
+ </tr>
<!---- Ramón ------------------------dns------------------------------------------------->
<tr>
<th align="center">&nbsp;<?php echo $TbMsg['PROP_DNSIP'] ?>&nbsp;</th>
@@ -254,9 +285,8 @@ function abrir_ventana(URL){
</tr>
<!---- ADV --------------------------p2pmodo------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[26]?>&nbsp;</TH>
- <?
- if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[26]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.$modp2p.'</TD>';
else {
echo '<TD colspan=3>';
@@ -271,9 +301,8 @@ function abrir_ventana(URL){
<!----------------------------p2p tiempo semillero--------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[27]?>&nbsp;</TH>
- <?
- if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[27]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.$timep2p.'</TD>';
else
echo '<TD colspan=3><INPUT class="formulariodatos" name=timep2p style="width:100" type=text value='.$timep2p.'></TD>';
@@ -281,9 +310,8 @@ function abrir_ventana(URL){
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[22]?>&nbsp;</TH>
- <?
- if ($opcion==$op_eliminacion){
+ <TH align=center>&nbsp;<?php echo $TbMsg[22]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion){
$TBMetodos[0]="";
$TBMetodos[1]="Half-Duplex";
$TBMetodos[2]="Full-Duplex";
@@ -299,9 +327,8 @@ function abrir_ventana(URL){
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[23]?>&nbsp;</TH>
- <?
- if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[23]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.$ipmul.'</TD>';
else
echo '<TD colspan=3><INPUT class="formulariodatos" name=ipmul style="width:100" type=text value='.$ipmul.'></TD>';
@@ -309,9 +336,8 @@ function abrir_ventana(URL){
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[24]?>&nbsp;</TH>
- <?
- if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[24]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.$pormul.'</TD>';
else {
echo '<td colspan="3">';
@@ -325,43 +351,64 @@ function abrir_ventana(URL){
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[25]?>&nbsp;</TH>
- <?
- if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[25]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.$velmul.'</TD>';
else
echo '<TD colspan=3><INPUT class="formulariodatos" name=velmul style="width:100" type=text value='.$velmul.'></TD>';
?>
- </TR>
+ </TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
+</TABLE></br>
+<!-- ########################################### PROPIEDADES APLICABLES A TODOS LOS ORDENADORES #################################################################################-->
+
+<TABLE align=center border=7 cellPadding=3 cellSpacing=1 class=tabla_listados >
<TR>
- <TH style="BACKGROUND-COLOR:#FFFFFF;COLOR:#999999" colspan=4 align=center>&nbsp;<?echo $TbMsg[18]?>&nbsp;</TH>
- </TR>
-<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
+ <TH style="BACKGROUND-COLOR:#FFFFFF;COLOR:red" colspan=4 align=center>&nbsp;<?php echo $TbMsg[1888]?>&nbsp;</TH>
+ </TR>
+<!-------------------------------------------------------------- AGP ------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[11]?>&nbsp;</TH>
- <?
- if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[11]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.TomaDato($cmd,$idcentro,'menus',$idmenu,'idmenu','descripcion').'&nbsp;</TD>';
else
echo '<TD colspan=3>'.HTMLSELECT($cmd,$idcentro,'menus',$idmenu,'idmenu','descripcion',330).'</TD>';
?>
</TR>
-<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
+<!-------------------------------------------------------------- AGP ------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[16]?>&nbsp;</TH>
- <?
- if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[16]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.TomaDato($cmd,$idcentro,'repositorios',$idrepositorio,'idrepositorio','nombrerepositorio').'&nbsp;</TD>';
else
echo '<TD colspan=3>'.HTMLSELECT($cmd,$idcentro,'repositorios',$idrepositorio,'idrepositorio','nombrerepositorio',330).'</TD>';
?>
</TR>
+<!---- AGP, Ramón -------------------ogLive-------------------------------------------------------------------------------------------------------------------------------------->
+ <tr>
+ <th align=center>&nbsp;<?php echo $TbMsg[33]?>&nbsp;</th>
+ <?php if ($opcion==$op_eliminacion) {
+ echo '<td colspan="3">'.$oglive.($cntDiff>0?' <em>('.$TbMsg[34]." ==> $cntDiff.)</em>":"").'&nbsp;</td>';
+ } else {
+ echo '<td colspan="3">';
+ exec("/opt/opengnsys/bin/oglivecli list", $data);
+ $ogliveList="ogLive=".$TbMsg['COMM_DEFOGLIVE'].($oglive=="ogLive"?" *":"").chr(13);
+ foreach ($data as $ogl) {
+ $ogl=preg_replace("/[0-9]* /","",$ogl);
+ $ogliveList.="$ogl=$ogl".($oglive==$ogl?" *":"").chr(13);
+ }
+ echo HTMLCTESELECT($ogliveList,"oglive","estilodesple"," ",$cntDiff==0?$oglive:" ",200);
+ if ($cntDiff > 0) {
+ echo ' <font color=red><strong>'.$TbMsg[34]."&nbsp;&nbsp;&nbsp;==> $cntDiff</strong></font>\n";
+ }
+ echo "</td>\n";
+ }
+ ?>
+ </tr>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[20]?>&nbsp;</TH>
- <?
- if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[20]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.TomaDato($cmd,$idcentro,'procedimientos',$idprocedimiento,'idprocedimiento','descripcion').'&nbsp;</TD>';
else
echo '<TD colspan=3>'.HTMLSELECT($cmd,$idcentro,'procedimientos',$idprocedimiento,'idprocedimiento','descripcion',330).'</TD>';
@@ -369,9 +416,8 @@ function abrir_ventana(URL){
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[17]?>&nbsp;</TH>
- <?
- if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[17]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.TomaDato($cmd,$idcentro,'perfileshard',$idperfilhard,'idperfilhard','descripcion').'&nbsp;</TD>';
else
echo '<TD colspan=3>'.HTMLSELECT($cmd,$idcentro,'perfileshard',$idperfilhard,'idperfilhard','descripcion',330).'</TD>';
@@ -430,6 +476,8 @@ function TomaPropiedades($cmd,$ida)
global $idaula;
global $nombreaula;
global $urlfoto;
+ global $inremotepc;
+ global $scheduler;
global $cagnon;
global $pizarra;
global $ubicacion;
@@ -449,6 +497,8 @@ function TomaPropiedades($cmd,$ida)
global $gidprocedimiento;
global $gidrepositorio;
global $gidperfilhard;
+ global $oglive;
+ global $cntDiff;
###################### ADV
global $router;
global $netmask;
@@ -460,6 +510,7 @@ function TomaPropiedades($cmd,$ida)
global $pormul;
global $velmul;
###################### Ramón
+ global $ntp;
global $dns;
global $proxy;
###################### UHU
@@ -471,6 +522,8 @@ function TomaPropiedades($cmd,$ida)
$idaula=0;
$nombreaula="";
$urlfoto="";
+ $inremotepc=false;
+ $scheduler=false;
$cagnon=false;
$pizarra=false;
$ubicacion="";
@@ -502,6 +555,8 @@ function TomaPropiedades($cmd,$ida)
$gidprocedimiento=0;
$gidrepositorio=0;
$gidperfilhard=0;
+ $oglive="";
+ $cntDiff=0;
$rs=new Recordset;
$cmd->texto="SELECT aulas.*, COUNT(ordenadores.idordenador) AS numordenadores,
@@ -512,7 +567,13 @@ function TomaPropiedades($cmd,$ida)
GROUP_CONCAT(DISTINCT CAST( ordenadores.idperfilhard AS char( 11 ) )
ORDER BY ordenadores.idperfilhard SEPARATOR ',' ) AS idperfileshard,
GROUP_CONCAT(DISTINCT CAST( ordenadores.idproautoexec AS char( 11 ) )
- ORDER BY ordenadores.idproautoexec SEPARATOR ',' ) AS idprocedimientos
+ ORDER BY ordenadores.idproautoexec SEPARATOR ',' ) AS idprocedimientos,
+ (SELECT COUNT(*)
+ FROM ordenadores
+ JOIN aulas USING(idaula)
+ WHERE aulas.idaula = $ida
+ AND aulas.oglivedir<>ordenadores.oglivedir) AS cntdiff,
+ IF(@@GLOBAL.event_scheduler='ON',1,0) AS scheduler
FROM aulas
LEFT OUTER JOIN ordenadores ON ordenadores.idaula = aulas.idaula
WHERE aulas.idaula =".$ida."
@@ -543,13 +604,18 @@ function TomaPropiedades($cmd,$ida)
$modp2p=$rs->campos["modp2p"];
$timep2p=$rs->campos["timep2p"];
#################### Ramón
+ $ntp=$rs->campos["ntp"];
$dns=$rs->campos["dns"];
$proxy=$rs->campos["proxy"];
#################### UHU
$validacion=$rs->campos["validacion"];
$paginalogin=$rs->campos["paginalogin"];
$paginavalidacion=$rs->campos["paginavalidacion"];
-###################### UHU
+#################### Ramón
+ $inremotepc=$rs->campos["inremotepc"];
+ $scheduler=$rs->campos["scheduler"];
+ $oglive=$rs->campos["oglivedir"];
+ $cntDiff=$rs->campos["cntdiff"];
$ordenadores=$rs->campos["numordenadores"];
$idmenu=$rs->campos["idmenus"];
@@ -573,5 +639,25 @@ function TomaPropiedades($cmd,$ida)
}
return(false);
}
+
+//________________________________________________________________________________________________________
+// Recupera algunos datos de configuración de la base de datos
+// Parametros:
+// - cmd: comando ya operativo (con conexión abierta)
+//________________________________________________________________________________________________________
+function TomaConfiguracion($cmd) {
+ global $scheduler;
+
+ $rs=new Recordset;
+ $cmd->texto="SELECT IF(@@GLOBAL.event_scheduler='ON',1,0) AS scheduler";
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(false); // Error al abrir recordset
+ if (!$rs->EOF) {
+ $scheduler=$rs->campos["scheduler"];
+ $rs->Cerrar();
+ return(true);
+ }
+ return(false);
+}
?>
diff --git a/admin/WebConsole/propiedades/propiedades_centros.php b/admin/WebConsole/propiedades/propiedades_centros.php
index 37b6e8e2..c4f89fb2 100644
--- a/admin/WebConsole/propiedades/propiedades_centros.php
+++ b/admin/WebConsole/propiedades/propiedades_centros.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -7,6 +7,12 @@
// Nombre del fichero: propiedades_centros.php
// Descripción :
// Presenta el formulario de captura de datos de un centro para insertar,modificar y eliminar
+/**
+ * @file propiedades_centros.php
+ * @version 1.1.0 - Se incluye la unidad organizativa como parametro del kernel: ogunit=directorio_unidad (ticket #678)
+ * @author Irina Gómez - ETSII Universidad de Sevilla
+ * @date 2015-12-16
+ */
// *************************************************************************************************************************************************
include_once("../includes/ctrlacc.php");
include_once("../includes/opciones.php");
@@ -24,6 +30,7 @@ $nombrecentro="";
$identidad=0;
$grupoid=0;
$comentarios="";
+$directorio="";
if (isset($_GET["opcion"])) $opcion=$_GET["opcion"]; // Recoge parametros
if (isset($_GET["idcentro"])) $idcentro=$_GET["idcentro"];
@@ -42,52 +49,65 @@ if ($opcion!=$op_alta){
//________________________________________________________________________________________________________
?>
<HTML>
-<TITLE>Administración web de aulas</TITLE>
<HEAD>
+<TITLE>Administración web de aulas</TITLE>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<LINK rel="stylesheet" type="text/css" href="../estilos.css">
<SCRIPT language="javascript" src="../jscripts/propiedades_centros.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_centros_'.$idioma.'.js"></SCRIPT>'?>
+ <SCRIPT language="javascript" src="../jscripts/validators.js"></SCRIPT>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_centros_'.$idioma.'.js"></SCRIPT>'?>
+
</HEAD>
<BODY>
<FORM name="fdatos" action="../gestores/gestor_centros.php" method="post">
- <INPUT type=hidden name=opcion value="<? echo $opcion?>">
- <INPUT type=hidden name=idcentro value=<?=$idcentro?>>
- <INPUT type=hidden name=identidad value=<?=$identidad?>>
- <P align=center class=cabeceras><?echo $TbMsg[4]?><BR>
- <SPAN align=center class=subcabeceras><? echo $opciones[$opcion]?></SPAN></P>
+ <INPUT type=hidden name=opcion value="<?php echo $opcion?>">
+ <INPUT type=hidden name=idcentro value=<?php echo $idcentro?>>
+ <INPUT type=hidden name=identidad value=<?php echo $identidad?>>
+ <P align=center class=cabeceras><?php echo $TbMsg[4]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $opciones[$opcion]?></SPAN></P>
<TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<!-------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH>&nbsp;<?echo $TbMsg[5]?>&nbsp;</TH>
- <?if ($opcion==$op_eliminacion){?>
- <TD><?echo $nombrecentro?></TD>
- <?}else{?>
- <TD><INPUT type=text class=cajatexto name="nombrecentro" style="width:350" value="<? echo $nombrecentro?>">
- <?}?>
+ <TH>&nbsp;<?php echo $TbMsg[5]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion){?>
+ <TD><?php echo $nombrecentro?></TD>
+ <?php }else{?>
+ <TD><INPUT type=text class=cajatexto name="nombrecentro" style="width:350" value="<?php echo $nombrecentro?>">
+ <?php }?>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[6]?>&nbsp;</TD>
- <?if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[6]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD>'.$comentarios.'</TD>';
else
echo '<TD><TEXTAREA class="formulariodatos" name=comentarios rows=3 cols=66>'.$comentarios.'</TEXTAREA></TD>';
?>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
+<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
+ <?php if ($opcion!=$op_eliminacion) {
+echo " <TR>\n".
+ " <TH align=center>&nbsp;".$TbMsg['DIR']."&nbsp;</TH>\n".
+ " <TD><INPUT type=text class=cajatexto name='directorio' maxlength='50' style='width:30em' value='".$directorio."'></TD>\n".
+ " </TR>\n".
+ " <TR>\n".
+ " <TH colspan='4' align='center'>&nbsp;<sup>*</sup>".$TbMsg['MSG_OGUNIT']."</TH>".
+ " </TR>\n";
+ }
+ ?>
+<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
</TABLE>
</FORM>
-</DIV>
-<?
+<?php
//________________________________________________________________________________________________________
include_once("../includes/opcionesbotonesop.php");
//________________________________________________________________________________________________________
?>
</BODY>
</HTML>
-<?
+<?php
//________________________________________________________________________________________________________
// Recupera los datos de un centro
// Parametros:
@@ -97,6 +117,7 @@ include_once("../includes/opcionesbotonesop.php");
function TomaPropiedades($cmd,$id){
global $nombrecentro;
global $comentarios;
+ global $directorio;
$rs=new Recordset;
$cmd->texto="SELECT * FROM centros WHERE idcentro=".$id;
@@ -106,6 +127,7 @@ function TomaPropiedades($cmd,$id){
if (!$rs->EOF){
$nombrecentro=$rs->campos["nombrecentro"];
$comentarios=$rs->campos["comentarios"];
+ $directorio=$rs->campos["directorio"];
$rs->Cerrar();
return(true);
}
diff --git a/admin/WebConsole/propiedades/propiedades_componentehardwares.php b/admin/WebConsole/propiedades/propiedades_componentehardwares.php
index 927b7010..4cba86ad 100644
--- a/admin/WebConsole/propiedades/propiedades_componentehardwares.php
+++ b/admin/WebConsole/propiedades/propiedades_componentehardwares.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -46,28 +46,28 @@ if ($opcion!=$op_alta){
<LINK rel="stylesheet" type="text/css" href="../estilos.css">
<SCRIPT language="javascript" src="../jscripts/propiedades_componentehardwares.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_componentehardwares_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_componentehardwares_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<FORM name="fdatos" action="../gestores/gestor_componentehardwares.php" method="post">
- <INPUT type=hidden name=opcion value="<? echo $opcion?>">
- <INPUT type=hidden name=idhardware value=<?=$idhardware?>>
- <INPUT type=hidden name=grupoid value=<?=$grupoid?>>
- <P align=center class=cabeceras><?echo $TbMsg[4]?><BR>
- <SPAN align=center class=subcabeceras><? echo $opciones[$opcion]?></SPAN></P>
+ <INPUT type=hidden name=opcion value="<?php echo $opcion?>">
+ <INPUT type=hidden name=idhardware value=<?php echo $idhardware?>>
+ <INPUT type=hidden name=grupoid value=<?php echo $grupoid?>>
+ <P align=center class=cabeceras><?php echo $TbMsg[4]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $opciones[$opcion]?></SPAN></P>
<TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[5]?>&nbsp;</TD>
- <?if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[5]?>&nbsp;</TD>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD style="width:215">'.$descripcion.'</TD>';
else
echo '<TD><INPUT class="formulariodatos" name=descripcion style="width:250" type=text value="'.$descripcion.'"></TD>';?>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[6]?>&nbsp;</TD>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[6]?>&nbsp;</TD>
+ <?php
if ($opcion==$op_eliminacion)
echo '<TD>'.TomaDato($cmd,0,'tipohardwares',$idtipohardware,'idtipohardware','descripcion').'</TD>';
else
@@ -78,14 +78,14 @@ if ($opcion!=$op_alta){
</TABLE>
</FORM>
</DIV>
-<?
+<?php
//________________________________________________________________________________________________________
include_once("../includes/opcionesbotonesop.php");
//________________________________________________________________________________________________________
?>
</BODY>
</HTML>
-<?
+<?php
//________________________________________________________________________________________________________
// Recupera los datos de un componente hardware
// Parametros:
diff --git a/admin/WebConsole/propiedades/propiedades_componentesoftwares.php b/admin/WebConsole/propiedades/propiedades_componentesoftwares.php
index 6e882097..381ee125 100644
--- a/admin/WebConsole/propiedades/propiedades_componentesoftwares.php
+++ b/admin/WebConsole/propiedades/propiedades_componentesoftwares.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -47,28 +47,28 @@ if ($opcion!=$op_alta){
<LINK rel="stylesheet" type="text/css" href="../estilos.css">
<SCRIPT language="javascript" src="../jscripts/propiedades_componentesoftwares.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_componentesoftwares_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_componentesoftwares_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<FORM name="fdatos" action="../gestores/gestor_componentesoftwares.php" method="post">
- <INPUT type=hidden name=opcion value="<? echo $opcion?>">
- <INPUT type=hidden name=idsoftware value=<?=$idsoftware?>>
- <INPUT type=hidden name=grupoid value=<?=$grupoid?>>
- <P align=center class=cabeceras><?echo $TbMsg[4]?><BR>
- <SPAN align=center class=subcabeceras><? echo $opciones[$opcion]?></SPAN></P>
+ <INPUT type=hidden name=opcion value="<?php echo $opcion?>">
+ <INPUT type=hidden name=idsoftware value=<?php echo $idsoftware?>>
+ <INPUT type=hidden name=grupoid value=<?php echo $grupoid?>>
+ <P align=center class=cabeceras><?php echo $TbMsg[4]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $opciones[$opcion]?></SPAN></P>
<TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR width="100px" style="display:block">
- <TH width="100px" align=center>&nbsp;<?echo $TbMsg[5]?>&nbsp;</TH>
- <?if ($opcion==$op_eliminacion)
+ <TH width="100px" align=center>&nbsp;<?php echo $TbMsg[5]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD style="width:215">'.$descripcion.'</TD>';
else
echo '<TD><INPUT class="formulariodatos" name=descripcion style="width:250" type=text value="'.$descripcion.'"></TD>';?>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR width="100px" style="display:block" >
- <TH width="100px" align=center>&nbsp;<?echo $TbMsg[6]?>&nbsp;</TH>
- <?
+ <TH width="100px" align=center>&nbsp;<?php echo $TbMsg[6]?>&nbsp;</TH>
+ <?php
if ($opcion==$op_eliminacion)
echo '<TD>'.TomaDato($cmd,0,'tiposoftwares',$idtiposoftware,'idtiposoftware','descripcion').'</TD>';
else
@@ -76,13 +76,13 @@ if ($opcion!=$op_alta){
?>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
- <?if($idtiposoftware!=1)
+ <?php if($idtiposoftware!=1)
echo '<TR width="100px" id="tridtiposo" style="display:none">';
else
echo '<TR width="100px" id="tridtiposo" style="display:block">';
?>
- <TH width="100px" align=center>&nbsp;<?echo $TbMsg[7]?>&nbsp;</TH>
- <?
+ <TH width="100px" align=center>&nbsp;<?php echo $TbMsg[7]?>&nbsp;</TH>
+ <?php
if ($opcion==$op_eliminacion)
echo '<TD>'.TomaDato($cmd,0,'tiposos',$idtiposo,'idtiposo','descripcion').'</TD>';
else
@@ -93,14 +93,14 @@ if ($opcion!=$op_alta){
</TABLE>
</FORM>
</DIV>
-<?
+<?php
//________________________________________________________________________________________________________
include_once("../includes/opcionesbotonesop.php");
//________________________________________________________________________________________________________
?>
</BODY>
</HTML>
-<?
+<?php
//________________________________________________________________________________________________________
// Recupera los datos de un componente software
// Parametros:
diff --git a/admin/WebConsole/propiedades/propiedades_entidades.php b/admin/WebConsole/propiedades/propiedades_entidades.php
index 3784cefd..18b0abb2 100644
--- a/admin/WebConsole/propiedades/propiedades_entidades.php
+++ b/admin/WebConsole/propiedades/propiedades_entidades.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -7,6 +7,12 @@
// Nombre del fichero: propiedades_entidades.php
// Descripción :
// Presenta el formulario de captura de datos de una entidad para insertar,modificar y eliminar
+/**
+ * @file propiedades_entidades.php
+ * @version 1.1.0 - Se incluye la unidad organizativa como parametro del kernel: ogunit=directorio_unidad (ticket #678)
+ * @author Irina Gómez - ETSII Universidad de Sevilla
+ * @date 2015-12-16
+ */
// *************************************************************************************************************************************************
include_once("../includes/ctrlacc.php");
include_once("../includes/opciones.php");
@@ -24,6 +30,7 @@ $nombreentidad="";
$iduniversidad=0;
$grupoid=0;
$comentarios="";
+$ogunit=0;
if (isset($_GET["opcion"])) $opcion=$_GET["opcion"]; // Recoge parametros
if (isset($_GET["identidad"])) $identidad=$_GET["identidad"];
@@ -43,53 +50,63 @@ if ($opcion!=$op_alta){
//________________________________________________________________________________________________________
?>
<HTML>
-<TITLE>Administración web de aulas</TITLE>
<HEAD>
+<TITLE>Administración web de aulas</TITLE>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<LINK rel="stylesheet" type="text/css" href="../estilos.css">
<SCRIPT language="javascript" src="../jscripts/propiedades_entidades.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_entidades_'.$idioma.'.js"></SCRIPT>'?>
+ <SCRIPT language="javascript" src="../jscripts/validators.js"></SCRIPT>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_entidades_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<FORM name="fdatos" action="../gestores/gestor_entidades.php" method="post">
- <INPUT type=hidden name=opcion value=<?=$opcion?>>
- <INPUT type=hidden name=identidad value=<?=$identidad?>>
- <INPUT type=hidden name=iduniversidad value=<?=$iduniversidad?>>
- <INPUT type=hidden name=grupoid value=<?=$grupoid?>>
- <P align=center class=cabeceras><?echo $TbMsg[4]?><BR>
- <SPAN align=center class=subcabeceras><? echo $opciones[$opcion]?></SPAN></P>
+ <INPUT type=hidden name=opcion value=<?php echo $opcion?>>
+ <INPUT type=hidden name=identidad value=<?php echo $identidad?>>
+ <INPUT type=hidden name=iduniversidad value=<?php echo $iduniversidad?>>
+ <INPUT type=hidden name=grupoid value=<?php echo $grupoid?>>
+ <P align=center class=cabeceras><?php echo $TbMsg[4]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $opciones[$opcion]?></SPAN></P>
<TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<!-------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH>&nbsp;<?echo $TbMsg[5]?>&nbsp;</TH>
- <?if ($opcion==$op_eliminacion){?>
- <TD><?echo $nombreentidad?></TD>
- <?}else{?>
- <TD><INPUT type=text class=cajatexto name="nombreentidad" style="width:350" value="<? echo $nombreentidad?>">
- <?}?>
+ <TH>&nbsp;<?php echo $TbMsg[5]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion){?>
+ <TD><?php echo $nombreentidad?></TD>
+ <?php }else{?>
+ <TD><INPUT type=text class=cajatexto name="nombreentidad" style="width:350" value="<?php echo $nombreentidad?>">
+ <?php }?>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[6]?>&nbsp;</TD>
- <?if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[6]?>&nbsp;</TD>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD>'.$comentarios.'</TD>';
else
echo '<TD><TEXTAREA class="formulariodatos" name=comentarios rows=3 cols=66>'.$comentarios.'</TEXTAREA></TD>';
?>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
+ <?php if ($opcion!=$op_eliminacion) {
+ ($ogunit == 1) ? $checked = "checked" : $checked = "";
+echo " <TR>\n".
+ " <TH align=center>&nbsp;".$TbMsg['OGUNIT']."&nbsp;</TD>\n".
+ " <TD><input class='formulariodatos' name='ogunit' value='1' type='checkbox' $checked onchange='mensaje_ogunit()'> </TD>\n".
+ " </TR>\n";
+ }
+ ?>
+<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
</TABLE>
</FORM>
</DIV>
-<?
+<?php
//________________________________________________________________________________________________________
include_once("../includes/opcionesbotonesop.php");
//________________________________________________________________________________________________________
?>
</BODY>
</HTML>
-<?
+<?php
//________________________________________________________________________________________________________
// Recupera los datos de un entidad
// Parametros:
@@ -99,6 +116,7 @@ include_once("../includes/opcionesbotonesop.php");
function TomaPropiedades($cmd,$id){
global $nombreentidad;
global $comentarios;
+ global $ogunit;
$rs=new Recordset;
$cmd->texto="SELECT * FROM entidades WHERE identidad=".$id;
@@ -108,6 +126,7 @@ function TomaPropiedades($cmd,$id){
if (!$rs->EOF){
$nombreentidad=$rs->campos["nombreentidad"];
$comentarios=$rs->campos["comentarios"];
+ $ogunit=$rs->campos["ogunit"];
$rs->Cerrar();
return(true);
}
diff --git a/admin/WebConsole/propiedades/propiedades_entornos.php b/admin/WebConsole/propiedades/propiedades_entornos.php
index 6d99d337..2d21fa30 100644
--- a/admin/WebConsole/propiedades/propiedades_entornos.php
+++ b/admin/WebConsole/propiedades/propiedades_entornos.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -55,24 +55,24 @@ if ($opcion!=$op_alta){
<LINK rel="stylesheet" type="text/css" href="../estilos.css">
<SCRIPT language="javascript" src="../jscripts/propiedades_entornos.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_entornos_'.$idioma.'.js"></SCRIPT>'?>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_entornos_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<DIV align=center>
<FORM name="fdatos" name="fdatos" action="../gestores/gestor_entornos.php" method="post">
- <INPUT type=hidden name=identorno value="<?=$identorno?>">
+ <INPUT type=hidden name=identorno value="<?php echo $identorno?>">
- <P align=center class=cabeceras><?echo $TbMsg[4]?><BR>
- <SPAN align=center class=subcabeceras><? echo $opciones[$opcion]?></SPAN></P>
+ <P align=center class=cabeceras><?php echo $TbMsg[4]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $opciones[$opcion]?></SPAN></P>
<TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos >
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[5]?>&nbsp;</TD>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[5]?>&nbsp;</TD>
+ <?php
if ($opcion==$op_eliminacion){
echo '<TD>'. $ipserveradm.'</TD>';
}
@@ -84,8 +84,8 @@ if ($opcion!=$op_alta){
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[6]?>&nbsp;</TD>
- <?if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[6]?>&nbsp;</TD>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD>'.$portserveradm.'&nbsp; </TD>';
else
echo '<TD><INPUT type=text class="formulariodatos" name=portserveradm size="50" value="'.$portserveradm.'"></TD>';
@@ -94,8 +94,8 @@ if ($opcion!=$op_alta){
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[7]?>&nbsp;</TD>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[7]?>&nbsp;</TD>
+ <?php
if ($opcion==$op_eliminacion)
echo '<TD>'.$protoclonacion.'</TD>';
else{
@@ -110,14 +110,14 @@ if ($opcion!=$op_alta){
</TABLE>
</FORM>
</DIV>
-<?
+<?php
//________________________________________________________________________________________________________
include_once("../includes/opcionesbotonesop.php");
//________________________________________________________________________________________________________
?>
</BODY>
</HTML>
-<?
+<?php
//________________________________________________________________________________________________________
// Recupera los datos de entorno
// Parametros:
diff --git a/admin/WebConsole/propiedades/propiedades_grupos.php b/admin/WebConsole/propiedades/propiedades_grupos.php
index 3c974daa..4a40470f 100644
--- a/admin/WebConsole/propiedades/propiedades_grupos.php
+++ b/admin/WebConsole/propiedades/propiedades_grupos.php
@@ -136,24 +136,24 @@ switch($literaltipo){
<SCRIPT language="javascript" src="../jscripts/propiedades_grupos.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_grupos_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_grupos_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<DIV align=center>
<FORM name="fdatos" action="" method=post>
- <INPUT type=hidden name=opcion value=<?=$opcion?>>
- <INPUT type=hidden name=idgrupo value=<?=$idgrupo?>>
- <INPUT type=hidden name=grupoid value=<?=$grupoid?>>
- <INPUT type=hidden name=tipo value=<?=$tipo?>>
- <INPUT type=hidden name=literaltipo value="<?=$literaltipo?>">
- <INPUT type=hidden name=iduniversidad value=<?=$iduniversidad?>>
- <INPUT type=hidden name=idaula value=<?=$idaula?>>
- <P align=center class=cabeceras><IMG src="<? echo $urlimg?>">&nbsp;<?echo $textambito?><BR>
- <SPAN align=center class=subcabeceras><? echo $opciones[$opcion]?></SPAN></P>
+ <INPUT type=hidden name=opcion value=<?php echo $opcion?>>
+ <INPUT type=hidden name=idgrupo value=<?php echo $idgrupo?>>
+ <INPUT type=hidden name=grupoid value=<?php echo $grupoid?>>
+ <INPUT type=hidden name=tipo value=<?php echo $tipo?>>
+ <INPUT type=hidden name=literaltipo value="<?php echo $literaltipo?>">
+ <INPUT type=hidden name=iduniversidad value=<?php echo $iduniversidad?>>
+ <INPUT type=hidden name=idaula value=<?php echo $idaula?>>
+ <P align=center class=cabeceras><IMG src="<?php echo $urlimg?>">&nbsp;<?php echo $textambito?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $opciones[$opcion]?></SPAN></P>
<TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos >
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[5]?>&nbsp;</TD>
+ <TH align=center>&nbsp;<?php echo $TbMsg[5]?>&nbsp;</TD>
<?php if ($opcion==$op_eliminacion)
echo '<TD style="width:300">'.$nombregrupo.'</TD>';
else
@@ -161,7 +161,7 @@ switch($literaltipo){
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[6]?>&nbsp;</TD>
+ <TH align=center>&nbsp;<?php echo $TbMsg[6]?>&nbsp;</TD>
<?php if ($opcion==$op_eliminacion)
echo '<TD>'.$comentarios.'</TD>';
else
diff --git a/admin/WebConsole/propiedades/propiedades_imagenes.php b/admin/WebConsole/propiedades/propiedades_imagenes.php
index bdd7b21c..036dc914 100644
--- a/admin/WebConsole/propiedades/propiedades_imagenes.php
+++ b/admin/WebConsole/propiedades/propiedades_imagenes.php
@@ -15,7 +15,10 @@ include_once("../includes/opciones.php");
include_once("../includes/CreaComando.php");
include_once("../includes/HTMLSELECT.php");
include_once("../includes/TomaDato.php");
+include_once("../includes/comunes.php");
+include_once("../includes/restfunctions.php");
include_once("../idiomas/php/".$idioma."/propiedades_imagenes_".$idioma.".php");
+include_once("../idiomas/php/".$idioma."/avisos_".$idioma.".php");
//________________________________________________________________________________________________________
if (isset($_POST["opcion"])) {$opcion=$_POST["opcion"];}else{$opcion=0;} // Recoge parametros
@@ -34,12 +37,19 @@ $codpar=0;
$idperfilsoft=0;
$perfilsoft="";
$comentarios="";
+$inremotepc="";
+$scheduler="";
$grupoid=0;
$litamb="";
$tipoimg=0;
$idrepositorio=0;
+$repoip="";
+$repokey="";
$fechacreacion="";
+$revision=0;
$imagenid=0;
+$validnombreca="";
+$validdescripcion="";
if (isset($_POST["validnombreca"])) {$opcion=$_POST["validnombreca"];}else{$validnombreca="";} // Recoge parametros
if (isset($_POST["datospost"])) {$datospost=$_POST["datospost"];}else{$datospost=0;} // Recoge parametros
if (isset($_GET["opcion"])) $opcion=$_GET["opcion"]; // Recoge parametros
@@ -52,24 +62,29 @@ if (isset($_GET["tipoimg"])) $tipoimg=$_GET["tipoimg"];
//________________________________________________________________________________________________________
$cmd=CreaComando($cadenaconexion); // Crea objeto comando
if (!$cmd)
- Header('Location: '.$pagerror.'?herror=2'); // Error de conexión con servidor B.D.
-if ($opcion!=$op_alta){
+ header('Location: '.$pagerror.'?herror=2'); // Error de conexión con servidor B.D.
+if ($opcion!=$op_alta)
$resul=TomaPropiedades($cmd,$idimagen);
- if (!$resul)
- Header('Location: '.$pagerror.'?herror=3'); // Error de recuperación de datos.
-}
+else
+ $resul=TomaConfiguracion($cmd);
+if (!$resul)
+ header('Location: '.$pagerror.'?herror=3'); // Error de recuperación de datos.
-if ( $opcion == 1 && $datospost == 1)
- {
+if ($opcion == 1 && $datospost == 1) {
if (isset($_POST["opcion"])) $opcion=$_POST["opcion"];// Recoge parametros
+ if (isset($_POST["idrepositorio"])) $idrepositorio=$_POST["idrepositorio"];
if (isset($_POST["idimagen"])) $idimagen=$_POST["idimagen"];
- if (isset($_POST["nombreca"]))
- {$nombreca=$_POST["nombreca"];ValidaNombre($cmd,$nombreca);}if ($validnombreca != 1 ) {$validnombreca=0;}
+ if (isset($_POST["nombreca"])) {
+ $nombreca=$_POST["nombreca"];
+ ValidaNombre($cmd,$nombreca,$idrepositorio);
+ }
+ if ($validnombreca != 1) {$validnombreca=0;}
if (isset($_POST["ruta"])) $ruta=$_POST["ruta"];
- if (isset($_POST["descripcion"])) $descripcion=$_POST["descripcion"];
+ if (isset($_POST["descripcion"])) {$descripcion=$_POST["descripcion"];}
if (isset($_POST["grupoid"])) $grupoid=$_POST["grupoid"];
if (isset($_POST["idperfilsoft"])) $idperfilsoft=$_POST["idperfilsoft"];
if (isset($_POST["comentarios"])) $comentarios=$_POST["comentarios"];
+ if (isset($_POST["inremotepc"])) $inremotepc=$_POST["inremotepc"];
if (isset($_POST["identificador"])) $idimagen=$_POST["identificador"];
if (isset($_POST["modelo"])) $numpar=$_POST["modelo"];
if (isset($_POST["numdisk"])) $numpar=$_POST["numdisk"];
@@ -80,9 +95,24 @@ if ( $opcion == 1 && $datospost == 1)
if (isset($_POST["tipoimg"])) $tipoimg=$_POST["tipoimg"];
if (isset($_POST["fechacreacion"])) $fechacreacion=$_POST["fechacreacion"];
if (isset($_POST["litamb"])) $litamb=$_POST["litamb"];
-
-
}
+// Solicitar datos del fichero de imagen a la API REST de su repositorio.
+if ($opcion!=$op_alta and isset($repokey)) {
+ $repo[0]['url'] = "https://$repoip/opengnsys/rest/repository/image/$nombreca";
+ $repo[0]['header'] = array('Authorization: '.$repokey);
+ $result = multiRequest($repo);
+ if ($result[0]['code'] === 200) {
+ $result = json_decode($result[0]['data']);
+ $imgpath = (@$result->type==="dir" ? @$result->name : @$result->name.".".@$result->type);
+ $imgsize = humanSize(@$result->size);
+ $imgbackup = @$result->backedup;
+ $imgbksize = isset($result->backupsize) ? humanSize($result->backupsize) : 0;
+ $imglock = @$result->locked;
+ } else {
+ $imgpath = "";
+ }
+}
+
//________________________________________________________________________________________________________
?>
<HTML>
@@ -94,21 +124,21 @@ if ( $opcion == 1 && $datospost == 1)
<SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/propiedades_imagenes.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_imagenes_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_imagenes_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<DIV align=center>
-<?php if ( $opcion == 1 && $datospost == 1 && $validnombreca == 0 || $opcion != 1) { ?>
+<?php if ( $opcion == 1 && $datospost == 1 && $validnombreca == 0 && $validdescripcion == 0 || $opcion != 1) { ?>
<FORM name="fdatos" action="../gestores/gestor_imagenes.php" method="post">
<?php }else{ ?>
<FORM name="fdatos" action="./propiedades_imagenes.php" method="post">
<?php } ?>
- <INPUT type="hidden" name="opcion" value="<?=$opcion?>">
- <INPUT type="hidden" name="idimagen" value="<?=$idimagen?>">
- <INPUT type="hidden" name="grupoid" value="<?=$grupoid?>">
- <INPUT type="hidden" name="tipoimg" value="<?=$tipoimg?>">
- <INPUT type="hidden" name="litamb" value="<?=$litamb?>">
+ <INPUT type="hidden" name="opcion" value="<?php echo $opcion?>">
+ <INPUT type="hidden" name="idimagen" value="<?php echo $idimagen?>">
+ <INPUT type="hidden" name="grupoid" value="<?php echo $grupoid?>">
+ <INPUT type="hidden" name="tipoimg" value="<?php echo $tipoimg?>">
+ <INPUT type="hidden" name="litamb" value="<?php echo $litamb?>">
<INPUT type="hidden" name="datospost" value="1">
<?php
switch($tipoimg){
@@ -124,15 +154,15 @@ if ( $opcion == 1 && $datospost == 1)
}
?>
- <P align=center class=cabeceras><?echo $lit?><BR>
- <SPAN align=center class=subcabeceras><? echo $opciones[$opcion]?></SPAN>
+ <P align=center class=cabeceras><?php echo $lit?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $opciones[$opcion]?></SPAN>
</P>
<TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<!-------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[11]?>&nbsp;</TD>
- <?if ($opcion==$op_eliminacion || !empty($idperfilsoft) || $opcion == 2)
+ <TH align=center>&nbsp;<?php echo $TbMsg[11]?>&nbsp;</TD>
+ <?php if ($opcion==$op_eliminacion || !empty($idperfilsoft) || $opcion == 2)
echo '<TD style="width:150">'.$nombreca.'
&nbsp;<INPUT type="hidden" name="nombreca" value="'.$nombreca.'"></TD>';
else
@@ -140,18 +170,21 @@ if ( $opcion == 1 && $datospost == 1)
</TR>
<!-------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[5]?>&nbsp;</TD>
- <?if ($opcion==$op_eliminacion)
- echo '<TD style="width:300">'.$descripcion.'</TD>';
- else
- echo '<TD><INPUT class="formulariodatos" name=descripcion style="width:350" type=text value="'.$descripcion.'"></TH>';?>
+ <TH align=center>&nbsp;<?php echo $TbMsg[5]?>&nbsp;</TD>
+ <?php if ($opcion==$op_eliminacion) {
+ echo '<TD style="width:300">'.$descripcion.'
+ &nbsp;<INPUT type="hidden" name="descripcion" value="'.$descripcion.'"></TD>';
+ } else {
+ echo '<TD><INPUT class="formulariodatos" name=descripcion style="width:350" type=text value="'.$descripcion.'">';
+ if ($validnombreca == 0 && $validdescripcion == 1){echo '<font color=red><strong>&nbsp;'.$TbMsg[22].'</strong>';}
+ echo '</TD>';
+ } ?>
</TR>
<!-------------------------------------------------------------------------------------->
- <?if($tipoimg==$IMAGENES_INCREMENTALES){?>
+ <?php if($tipoimg==$IMAGENES_INCREMENTALES){?>
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[14]?>&nbsp;</TD>
- <?
- if ($opcion==$op_eliminacion || !empty($idperfilsoft))
+ <TH align=center>&nbsp;<?php echo $TbMsg[14]?>&nbsp;</TD>
+ <?php if ($opcion==$op_eliminacion || !empty($idperfilsoft))
echo '<TD>'.TomaDato($cmd,$idcentro,'imagenes',$imagenid,'imagenid','descripcion').'
&nbsp;<INPUT type="hidden" name="imagenid" value="'.$imagenid.'"></TD>';
else
@@ -159,24 +192,12 @@ if ( $opcion == 1 && $datospost == 1)
tipo=".$IMAGENES_BASICAS,"imagenid").'</TD>';
?>
</TR>
- <?}?>
+ <?php } ?>
<?php if($tipoimg!=$IMAGENES_INCREMENTALES){?>
<!-------------------------------------------------------------------------------------->
- <tr>
- <th align="center">&nbsp;<?php echo $TbMsg[9]?>&nbsp;</th>
- <?php
- if ($opcion==$op_eliminacion || !empty($idperfilsoft))
- echo '<td>'.$tipopar.' ('.dechex($codpar).')
- &nbsp;<input type="hidden" name="codpar" value="'.$codpar.'"></td>';
- else
- echo '<td>'.HTMLSELECT($cmd,0,'tipospar',$codpar,'codpar',"CONCAT(CASE WHEN codpar BETWEEN 1 AND 255 THEN '1-MSDOS' WHEN codpar BETWEEN 256 AND 65535 THEN '2-GPT' ELSE codpar END,': ',tipopar,' (',HEX(codpar),')')",170,"","","clonable=1").'</td>';
- ?>
- </tr>
- <!-------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[10]?>&nbsp;</TD>
- <?
- if ($opcion==$op_eliminacion || !empty($idperfilsoft))
+ <TH align=center>&nbsp;<?php echo $TbMsg[10]?>&nbsp;</TD>
+ <?php if ($opcion==$op_eliminacion || !empty($idperfilsoft))
echo '<TD>'.$nombrerepositorio.'
&nbsp;<INPUT type="hidden" name="idrepositorio" value="'.$idrepositorio.'"></TD>';
else
@@ -184,60 +205,125 @@ if ( $opcion == 1 && $datospost == 1)
?>
</TR>
<!-------------------------------------------------------------------------------------->
- <?if($tipoimg==$IMAGENES_BASICAS){?>
+ <?php if($tipoimg==$IMAGENES_BASICAS){?>
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[16]?>&nbsp;</TD>
- <?if ($opcion==$op_eliminacion || !empty($idperfilsoft))
+ <TH align=center>&nbsp;<?php echo $TbMsg[16]?>&nbsp;</TD>
+ <?php if ($opcion==$op_eliminacion || !empty($idperfilsoft))
echo '<TD>'.$ruta.'
&nbsp;<INPUT type="hidden" name="ruta" value="'.$ruta.'"></TD>';
else
echo '<TD><INPUT class="formulariodatos" name=ruta style="width:350" type=text value="'.$ruta.'"></TH>';?>
</TR>
- <?}?>
+ <?php }?>
<!-------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[7]?>&nbsp;</TD>
- <?if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[7]?>&nbsp;</TD>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD>'.$comentarios.'</TD>';
else
echo '<TD><TEXTAREA class="formulariodatos" name=comentarios rows=3 cols=55>'.$comentarios.'</TEXTAREA></TH>';
?>
</TR>
+ <!-- Acceso remoto -->
+ <tr>
+ <th align="center">&nbsp;<?php echo $TbMsg['PROP_REMOTEACCESS']?>&nbsp;</th>
+ <?php if ($opcion==$op_eliminacion) {
+ echo '<td><input name="inremotepc" type="checkbox" disabled readonly';
+ if ($inremotepc) echo ' checked ';
+ echo '></td>';
+ } else {
+ echo '<td><input name="inremotepc" type="checkbox" value="1"';
+ if ($inremotepc) echo ' checked ';
+ if ($scheduler)
+ echo '> <em>('.$TbMsg['COMM_REMOTEACCESS'].')<em></td>';
+ else
+ echo 'disabled> <em>'.$TbMsg['WARN_SCHEDULER'].'<em></td>';
+ }
+ ?>
+ </tr>
+
+ <?php if ($opcion!=$op_alta) { ?>
<!-- Equipo modelo (aula) -->
<tr>
<th align=center>&nbsp;<?php echo $TbMsg[19]?>&nbsp;</th>
<td>&nbsp;<?php echo $modelo ?>
&nbsp;<input type="hidden" name="modelo" value="<?php echo $modelo ?>">
</tr>
- <!-- Disco y partición -->
+ <!-- Disco, partición y tipo de partición -->
<tr>
<th align="center">&nbsp;<?php echo $TbMsg[8]?>&nbsp;</th>
- <td>&nbsp;<?php if (! empty ($modelo)) echo "$numdisk, $numpar" ?>
- &nbsp;<input type="hidden" name="numdisk" value="<?php echo $numdisk ?>">
- &nbsp;<input type="hidden" name="numpar" value="<?php echo $numpar ?>"></td>
+ <td>&nbsp;<?php if (! empty($modelo)) echo "$numdisk, $numpar (".dechex($codpar)."-$tipopar)" ?>
+ <input type="hidden" name="numdisk" value="<?php echo $numdisk ?>">
+ <input type="hidden" name="numpar" value="<?php echo $numpar ?>"></td>
</tr>
<!-- Fecha de creación -->
<tr>
<th align="center">&nbsp;<?php echo $TbMsg[20]?>&nbsp;</th>
- <td>&nbsp;<?php if (! empty ($modelo)) echo "$fechacreacion" ?>
- &nbsp;<input type="hidden" name="fechacreacion" value="<?php echo $fechacreacion ?>"></td>
+ <td>&nbsp;<?php if (! empty ($modelo)) echo "$fechacreacion ".($revision>0 ? "(r$revision)" : "") ?>
+ <input type="hidden" name="fechacreacion" value="<?php echo $fechacreacion ?>"></td>
</tr>
- <!-------------------------------------------------------------------------------------->
-
+ <!-- Perfil de software -->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[6]?>&nbsp;</TD>
- <?
- echo '<TD>'.$perfilsoft.'
- &nbsp;<INPUT type="hidden" name="idperfilsoft" value="'.$idperfilsoft.'"></TH>';
-
+ <TH align=center>&nbsp;<?php echo $TbMsg[6]?>&nbsp;</TD>
+ <?php
+ if (isset($modelo)) {
+ echo '<TD>&nbsp;'.$perfilsoft.'
+ &nbsp;<INPUT type="hidden" name="idperfilsoft" value="'.$idperfilsoft.'"></TD>';
+ } else {
+ echo '<TD>'.HTMLSELECT($cmd,$idcentro,'perfilessoft',$idperfilsoft,'idperfilsoft','descripcion',300).'</TD>';
+ }
?>
</TR>
- <?}?>
+ <!-- Sistema Operativo -->
+ <tr>
+ <th align="center">&nbsp;<?php echo $TbMsg['PROP_OS']?>&nbsp;</th>
+ <td>&nbsp;<?php echo $sistoperativo?> </td>
+ </tr>
+ <?php
+ // Datos de imagen en el repositorio
+ if (isset($imgpath)) {
+ print <<< EOT
+ <tr>
+ <th colspan="2" align="center">Datos del repositorio</th>
+ </tr>
+ <tr>
+ <th align="center">Camino</th>
+ <td>&nbsp;/$imgpath&nbsp;</td>
+ </tr>
+ <tr>
+ <th align="center">Tamaño</th>
+ <td>&nbsp;$imgsize&nbsp;</td>
+ </tr>
+EOT;
+ if ($imgbackup) {
+ print <<< EOT
+ <tr>
+ <th align="center">Copia de seguridad</th>
+ <td>&nbsp;$imgbksize&nbsp;</td>
+ </tr>
+EOT;
+ }
+ if ($imglock) {
+ print <<< EOT
+ <tr>
+ <th align="center">Bloqueada</th>
+ <td>&nbsp;Atención: la imagen está bloqueda por operación de uso exclusivo&nbsp;</td>
+ </tr>
+EOT;
+ }
+ }
+ ?>
+ <?php } // fin if != op_alta
+ // Mensaje aviso ruta de origen
+ if ($opcion==$op_alta && $tipoimg==$IMAGENES_BASICAS) {
+ echo '<tr><th colspan="14">'.$TbMsg["WARN_SOURCE_PATH"].'</th></tr>';
+ }
+ }?>
<!-------------------------------------------------------------------------------------->
</TABLE>
</FORM>
-<?
+<?php
if (!empty($idperfilsoft)){ // Nota a pie de página indicando que cuando la imagen tiene perfilsoft no pueden modificarse ciertos campos
echo '
<DIV id="Layer_nota" align=center >
@@ -251,20 +337,20 @@ if ($validnombreca=="0"){
echo '<script type="text/javascript">';
echo 'confirmar('.$opcion.')';
echo '</script>';
- }
+}
if ($validnombreca=="1"){
echo '<script type="text/javascript">';
echo 'alert('.$TbMsg[17].')';
echo '</script>';
+}
- }
include_once("../includes/opcionesbotonesop.php");
//________________________________________________________________________________________________________
?>
</BODY>
</HTML>
-<?
+<?php
//________________________________________________________________________________________________________
// Recupera los datos de una imagen
@@ -278,6 +364,8 @@ function TomaPropiedades($cmd,$idmagen){
global $ruta;
global $descripcion;
global $comentarios;
+ global $inremotepc;
+ global $scheduler;
global $idperfilsoft;
global $modelo;
global $numdisk;
@@ -286,18 +374,27 @@ function TomaPropiedades($cmd,$idmagen){
global $tipopar;
global $nombrerepositorio;
global $idrepositorio;
+ global $repoip;
+ global $repokey;
global $perfilsoft;
+ global $sistoperativo;
global $imagenid;
global $fechacreacion;
+ global $revision;
$rs=new Recordset;
- $cmd->texto="SELECT imagenes.*, tipospar.tipopar, repositorios.nombrerepositorio, perfilessoft.descripcion AS perfilsoft, CONCAT (ordenadores.nombreordenador,' (',aulas.nombreaula,')') AS modelo
+ $cmd->texto="SELECT imagenes.*, tipospar.tipopar, repositorios.nombrerepositorio,
+ repositorios.ip, repositorios.apikey,
+ perfilessoft.descripcion AS perfilsoft, nombreso AS sistoperativo,
+ CONCAT (ordenadores.nombreordenador,' (',aulas.nombreaula,')') AS modelo,
+ IF(@@GLOBAL.event_scheduler='ON',1,0) AS scheduler
FROM imagenes
LEFT OUTER JOIN tipospar ON tipospar.codpar=imagenes.codpar
LEFT OUTER JOIN repositorios ON repositorios.idrepositorio=imagenes.idrepositorio
LEFT OUTER JOIN perfilessoft ON perfilessoft.idperfilsoft=imagenes.idperfilsoft
LEFT OUTER JOIN ordenadores ON ordenadores.idordenador=imagenes.idordenador
LEFT OUTER JOIN aulas ON ordenadores.idaula=aulas.idaula
+ LEFT OUTER JOIN nombresos ON perfilessoft.idnombreso=nombresos.idnombreso
WHERE imagenes.idimagen=".$idmagen;
$rs->Comando=&$cmd;
if (!$rs->Abrir()) return(0); // Error al abrir recordset
@@ -308,6 +405,8 @@ function TomaPropiedades($cmd,$idmagen){
$descripcion=$rs->campos["descripcion"];
$idperfilsoft=$rs->campos["idperfilsoft"];
$comentarios=$rs->campos["comentarios"];
+ $inremotepc=$rs->campos["inremotepc"];
+ $scheduler=$rs->campos["scheduler"];
$modelo=$rs->campos["modelo"];
$numdisk=$rs->campos["numdisk"];
$numpar=$rs->campos["numpar"];
@@ -315,14 +414,37 @@ function TomaPropiedades($cmd,$idmagen){
$codpar=$rs->campos["codpar"];
$idrepositorio=$rs->campos["idrepositorio"];
$nombrerepositorio=$rs->campos["nombrerepositorio"];
+ $repoip=$rs->campos["ip"];
+ $repokey=$rs->campos["apikey"];
$perfilsoft=$rs->campos["perfilsoft"];
+ $sistoperativo=$rs->campos["sistoperativo"];
$imagenid=$rs->campos["imagenid"];
$fechacreacion=$rs->campos["fechacreacion"];
+ $revision=$rs->campos["revision"];
$rs->Cerrar();
return(true);
}
- else
+ return(false);
+}
+
+//________________________________________________________________________________________________________
+// Recupera los algunos datos de configuración de la base de datos
+// Parametros:
+// - cmd: comando ya operativo (con conexión abierta)
+//________________________________________________________________________________________________________
+function TomaConfiguracion($cmd) {
+ global $scheduler;
+
+ $rs=new Recordset;
+ $cmd->texto="SELECT IF(@@GLOBAL.event_scheduler='ON',1,0) AS scheduler";
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(0); // Error al abrir recordset
+ if (!$rs->EOF){
+ $scheduler=$rs->campos["scheduler"];
+ $rs->Cerrar();
return(true);
+ }
+ return(false);
}
//________________________________________________________________________________________________________
@@ -330,25 +452,55 @@ function TomaPropiedades($cmd,$idmagen){
// Comprueba Nombre de la imagen
// Parametros:
// - cmd: Una comando ya operativo (con conexión abierta)
-// - id: El identificador de la imagen
+// - nombreca: Nombre de la imagen
+// - descripcion: Descripcion de la imagen
//________________________________________________________________________________________________________
-function ValidaNombre($cmd,$nombreca){
+function ValidaNombre($cmd,$nombreca,$idrepositorio){
global $nombreca;
global $validnombreca;
+ global $idrepositorio;
- $rs=new Recordset;
+ $rs=new Recordset;
$cmd->texto="SELECT * from imagenes WHERE nombreca='$nombreca'";
- $rs->Comando=&$cmd;
+ $rs->Comando=&$cmd;
if (!$rs->Abrir()) return(0); // Error al abrir recordset
- $rs->Primero();
+ $rs->Primero();
if (!$rs->EOF){
$nombrecabase=$rs->campos["nombreca"];
- if ( $nombrecabase == $nombreca )
+ $idrepositoriobase=$rs->campos["idrepositorio"];
+ if ( $nombrecabase == $nombreca && $idrepositoriobase == $idrepositorio)
{$validnombreca="1";}else{$validnombreca="0";}
- }
- $rs->Cerrar();
+ }
+ $rs->Cerrar();
+}
+
+//________________________________________________________________________________________________________
+// Comprueba Descripcion del nombre canónico
+// Parametros:
+// - cmd: Una comando ya operativo (con conexión abierta)
+// - nombreca: Nombre de la imagen
+// - descripcion: Descripcion de la imagen
+//________________________________________________________________________________________________________
+
+function ValidaDescripcion($cmd,$nombreca,$descripcion){
+ global $nombreca;
+ global $validnombreca;
+ global $descripcion;
+ global $validdescripcion;
+ $rs=new Recordset;
+ $cmd->texto="SELECT * from imagenes WHERE nombreca='$nombreca'";
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(0); // Error al abrir recordset
+ $rs->Primero();
+ if (!$rs->EOF){
+ $nombrecabase=$rs->campos["nombreca"];
+ $descripcionbase=$rs->campos["descripcion"];
+ if ( $nombrecabase == $nombreca && "$descripcionbase" == "$descripcion" )
+ {$validdescripcion="1";}else{$validdescripcion="0";}
+ }
+ $rs->Cerrar();
}
?>
diff --git a/admin/WebConsole/propiedades/propiedades_menus.php b/admin/WebConsole/propiedades/propiedades_menus.php
index efe3575b..8e996841 100644
--- a/admin/WebConsole/propiedades/propiedades_menus.php
+++ b/admin/WebConsole/propiedades/propiedades_menus.php
@@ -56,19 +56,19 @@ if ($opcion!=$op_alta){
<LINK rel="stylesheet" type="text/css" href="../estilos.css">
<SCRIPT language="javascript" src="../jscripts/propiedades_menus.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_menus_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_menus_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<FORM name="fdatos" action="../gestores/gestor_menus.php" method="post">
- <INPUT type=hidden name=opcion value=<?=$opcion?>>
- <INPUT type=hidden name=idmenu value=<?=$idmenu?>>
- <INPUT type=hidden name=grupoid value=<?=$grupoid?>>
+ <INPUT type=hidden name=opcion value=<?php echo $opcion?>>
+ <INPUT type=hidden name=idmenu value=<?php echo $idmenu?>>
+ <INPUT type=hidden name=grupoid value=<?php echo $grupoid?>>
<P align=center class=cabeceras><?php echo $TbMsg[4]?><BR>
<SPAN align=center class=subcabeceras><?php echo $opciones[$opcion]?></SPAN></P>
<table align="center" border="0" cellPadding="1" cellSpacing="1" class="tabla_datos">
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<tr>
- <th align="center">&nbsp;<?echo $TbMsg[5]?>&nbsp;</th>
+ <th align="center">&nbsp;<?php echo $TbMsg[5]?>&nbsp;</th>
<?php if ($opcion==$op_eliminacion)
echo '<td style="width:300">'.$descripcion.'</td>';
else
@@ -76,7 +76,7 @@ if ($opcion!=$op_alta){
</tr>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<tr>
- <th align=center>&nbsp;<?echo $TbMsg[6]?>&nbsp;</th>
+ <th align=center>&nbsp;<?php echo $TbMsg[6]?>&nbsp;</th>
<?php if ($opcion==$op_eliminacion)
echo '<td style="width:300">'.$titulo.'</td>';
else
@@ -84,7 +84,7 @@ if ($opcion!=$op_alta){
</tr>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<tr>
- <th align="center">&nbsp;<?echo $TbMsg[18]?>&nbsp;</th>
+ <th align="center">&nbsp;<?php echo $TbMsg[18]?>&nbsp;</th>
<?php if ($opcion==$op_eliminacion)
echo '<td colspan="3">'.TomaDato($cmd,0,'iconos',$idurlimg,'idicono','descripcion').'&nbsp;</td>';
else
@@ -106,6 +106,10 @@ if ($opcion!=$op_alta){
$tbresolucion[792]="1024x768 24bits";
$tbresolucion[795]="1280x1024 24bits";
$tbresolucion[799]="1600x1200 24bits";
+ $tbresolucion[814]="800x600 32bits";
+ $tbresolucion[824]="1024x768 32bits";
+ $tbresolucion[829]="1280x1024 32bits";
+ $tbresolucion[834]="1600x1200 32bits";
if (empty ($tbresolucion[$resolucion])) {
$res = $resolucion;
} else {
@@ -124,18 +128,27 @@ if ($opcion!=$op_alta){
$parametros.="789=800x600 24bits".chr(13);
$parametros.="792=1024x768 24bits".chr(13);
$parametros.="795=1280x1024 24bits".chr(13);
- $parametros.="799=1600x1200 24bits";
+ $parametros.="799=1600x1200 24bits".chr(13);
+ $parametros.="814=800x600 32bits".chr(13);
+ $parametros.="824=1024x768 32bits".chr(13);
+ $parametros.="829=1280x1024 32bits".chr(13);
+ $parametros.="834=1600x1200 32bits";
} else {
// Kernel 3.7 y superior usa parámetro "video".
- $parametros ="uvesafb:800x600-16=800x600, 16bit".chr(13);
+ $parametros ="uvesafb:D=".$TbMsg["PROP_DEFAULT"].chr(13);
+ $parametros.="uvesafb:800x600-16=800x600, 16bit".chr(13);
$parametros.="uvesafb:800x600-24=800x600, 24bit".chr(13);
+ $parametros.="uvesafb:800x600-32=800x600, 32bit".chr(13);
$parametros.="uvesafb:1024x768-16=1024x768, 16bit".chr(13);
$parametros.="uvesafb:1024x768-24=1024x768, 24bit".chr(13);
+ $parametros.="uvesafb:1024x768-32=1024x768, 32bit".chr(13);
$parametros.="uvesafb:1152x864-16=1152x864, 16bit".chr(13);
$parametros.="uvesafb:1280x1024,16=1280x1024, 16bit".chr(13);
$parametros.="uvesafb:1280x1024,24=1280x1024, 24bit".chr(13);
+ $parametros.="uvesafb:1280x1024,32=1280x1024, 32bit".chr(13);
+ $parametros.="uvesafb:1600x1200,16=1600x1200, 16bit".chr(13);
$parametros.="uvesafb:1600x1200,24=1600x1200, 24bit".chr(13);
- $parametros.="uvesafb:1600x1200,24=1600x1200, 16bit";
+ $parametros.="uvesafb:1600x1200,32=1600x1200, 32bit";
}
echo '<td>'.HTMLCTESELECT($parametros,"resolucion","estilodesple","",$resolucion,150).'</td>';
}
@@ -143,7 +156,7 @@ if ($opcion!=$op_alta){
</tr>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<tr>
- <th align="center">&nbsp;<?echo $TbMsg[7]?>&nbsp;</th>
+ <th align="center">&nbsp;<?php echo $TbMsg[7]?>&nbsp;</th>
<?php if ($opcion==$op_eliminacion)
echo '<td>'.$comentarios.'&nbsp</TD>';
else
@@ -156,7 +169,7 @@ if ($opcion!=$op_alta){
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<TR>
- <TD align=center colspan=2>&nbsp;<b><?echo $TbMsg[8]?></b>&nbsp;</TD>
+ <TD align=center colspan=2>&nbsp;<b><?php echo $TbMsg[8]?></b>&nbsp;</TD>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
@@ -178,8 +191,8 @@ if ($opcion!=$op_alta){
</TR>
<TR>
- <TH align=center>&nbsp; <?echo $TbMsg[15]?>&nbsp;</TH>
- <?if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp; <?php echo $TbMsg[15]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD colspan=5>'.$htmlmenupub.'</TD>';
else
echo '<TD colspan=5><INPUT class="formulariodatos" name=htmlmenupub style="width:350" type=text value="'.$htmlmenupub.'"></TD>';
@@ -187,7 +200,7 @@ if ($opcion!=$op_alta){
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TD align=center colspan=6>&nbsp;<b><?echo $TbMsg[12]?></b>&nbsp;</TD>
+ <TD align=center colspan=6>&nbsp;<b><?php echo $TbMsg[12]?></b>&nbsp;</TD>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
@@ -208,8 +221,8 @@ if ($opcion!=$op_alta){
?>
</TR>
<TR>
- <TH align=center>&nbsp; <?echo $TbMsg[15]?>&nbsp;</TH>
- <?if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp; <?php echo $TbMsg[15]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD colspan=5">'.$htmlmenupri.'</TD>';
else
echo '<TD colspan=5><INPUT class="formulariodatos" name=htmlmenupri style="width:350" type=text value="'.$htmlmenupri.'"></TD>';
diff --git a/admin/WebConsole/propiedades/propiedades_ordenadores.php b/admin/WebConsole/propiedades/propiedades_ordenadores.php
index b4ebc196..57444a16 100644
--- a/admin/WebConsole/propiedades/propiedades_ordenadores.php
+++ b/admin/WebConsole/propiedades/propiedades_ordenadores.php
@@ -24,6 +24,7 @@ $opciones=array($TbMsg[0],$TbMsg[1],$TbMsg[2],$TbMsg[3]);
//________________________________________________________________________________________________________
$idordenador=0;
$nombreordenador="";
+$numserie="";
$ip="";
$mac="";
$idperfilhard=0;
@@ -81,8 +82,8 @@ function abrir_ventana(URL){
<input type="hidden" name="grupoid" value="<?php echo $grupoid?>" />
<input type="hidden" name="idaula" value="<?php echo $idaula?>" />
<input type="hidden" name="arranque" value="<?php echo $arranque?>" />
- <p align="center" class="cabeceras"><?echo $TbMsg[4]?><br />
- <span align="center" class="subcabeceras"><? echo $opciones[$opcion]?></span></p>
+ <p align="center" class="cabeceras"><?php echo $TbMsg[4]?><br />
+ <span align="center" class="subcabeceras"><?php echo $opciones[$opcion]?></span></p>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<table align="center" border="0" cellPadding="1" cellSpacing="1" class="tabla_datos">
<tr>
@@ -97,7 +98,7 @@ function abrir_ventana(URL){
$fotomenu=$fotoordenador;
$dirfotos="../images/fotos";
?>
- <td colspan="2" valign="top" align="left" rowspan="3">
+ <td colspan="2" valign="top" align="left" rowspan="4">
<img border="2" style="border-color:#63676b" src="<?php echo $dirfotos.'/'.$fotoordenador?>" />
<?php if ($opcion!=$op_eliminacion) {
echo '<br />(150X110)-(jpg - gif - png) ---- '.$TbMsg[5091].'><br />';
@@ -124,10 +125,24 @@ function abrir_ventana(URL){
echo '<td><input class="formulariodatos" name=mac type=text value="'. $mac.'"></td>';
?>
</tr>
+<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
+ <tr>
+ <th align="center">&nbsp;<?php echo $TbMsg["PROP_SERIALNO"]?>&nbsp;</th>
+ <?php if ($opcion==$op_eliminacion) {
+ echo '<td>'.(isset($numserie)?$numserie:$TbMsg["WARN_NOTDETECTED"]).'</td>';
+ } else {
+ echo '<td><input class="formulariodatos" name="numserie" type="text" value="'.$numserie.'">';
+ if (empty($numserie)) {
+ echo $TbMsg["WARN_NOTDETECTED"];
+ }
+ echo "</td>\n";
+ }
+ ?>
+ </tr>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <th align=center>&nbsp;<?echo $TbMsg[509]?>&nbsp;</th>
- <?
+ <th align=center>&nbsp;<?php echo $TbMsg[509]?>&nbsp;</th>
+ <?php
if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.$fotoordenador.'</TD>';
else {
@@ -144,24 +159,24 @@ function abrir_ventana(URL){
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != "..") {?>
- <option value="<? echo $entry ?>"><? echo $entry ?></option>
- <?}
+ <option value="<?php echo $entry ?>"><?php echo $entry ?></option>
+ <?php }
}
closedir($handle);
}
?>
</SELECT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-<a href="javascript:abrir_ventana('../images/ver.php')" onClick="MM_openBrWindow('../images/ver.php','Imagenes','scrollbars=yes,resizable=yes,width=950,height=640')"><? echo $TbMsg[5092] ?></a>
+<a href="javascript:abrir_ventana('../images/ver.php')" onClick="MM_openBrWindow('../images/ver.php','Imagenes','scrollbars=yes,resizable=yes,width=950,height=640')"><?php echo $TbMsg[5092] ?></a>
</TD>
- <?
+ <?php
}
?>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <th align=center>&nbsp;<?echo $TbMsg[8]?>&nbsp;</th>
- <?
+ <th align=center>&nbsp;<?php echo $TbMsg[8]?>&nbsp;</th>
+ <?php
if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.TomaDato($cmd,$idcentro,'perfileshard',$idperfilhard,'idperfilhard','descripcion').'</TD>';
else
@@ -170,18 +185,52 @@ function abrir_ventana(URL){
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <th align=center>&nbsp;<?echo $TbMsg[10]?>&nbsp;</th>
- <?
+ <th align=center>&nbsp;<?php echo $TbMsg[10]?>&nbsp;</th>
+ <?php
if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.TomaDato($cmd,$idcentro,'repositorios',$idrepositorio,'idrepositorio','nombrerepositorio').'</TD>';
else
echo '<TD colspan=3>'.HTMLSELECT($cmd,$idcentro,'repositorios',$idrepositorio,'idrepositorio','nombrerepositorio',250).'</TD>';
?>
</TR>
+<!---- AGP -------------------------------------------------------------------- OGLIVE --------------------------------------------------------------------------------------------------------->
+ <TR>
+ <th align=center>&nbsp;<?php echo $TbMsg[18]?>&nbsp;</th>
+<?php
+$cmd->texto="SELECT * FROM ordenadores WHERE idordenador=".$idordenador;
+$rs=new Recordset;
+$rs->Comando=&$cmd;
+if (!$rs->Abrir()) return(true); // Error al abrir recordset
+$rs->Primero();
+if (!$rs->EOF){
+ $bdogLive=$rs->campos["oglivedir"];
+}
+$rs->Cerrar();
+
+if ($opcion==$op_eliminacion){
+ echo '<td colspan="3">'.$bdogLive.'</td>';
+}else{
+ exec("bash /opt/opengnsys/bin/oglivecli list", $listogcli);
+ echo '<TD colspan=3><select class="formulariodatos" name="seleoglive" style=width:250>'."\n";
+ echo '<option value="ogLive">'.$TbMsg['COMM_DEFOGLIVE'].'</option>';
+ foreach ($listogcli as $oglive) {
+ if (preg_match("/ogLive/",$oglive)){
+ $oglive=substr($oglive,1);
+ $oglive=trim($oglive);
+ $Selectcli = '<option value="'.$oglive.'"';
+ If ($bdogLive==$oglive) $Selectcli.= ' selected ' ;
+ $Selectcli.= '>'.$oglive.'</OPTION>';
+ echo $Selectcli;
+ }
+ }
+ echo ' </select>'."\n";
+}
+?>
+ </TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <th align=center>&nbsp;<?echo $TbMsg[11]?>&nbsp;</th>
- <?
+ <th align=center>&nbsp;<?php echo $TbMsg[11]?>&nbsp;</th>
+ <?php
if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.TomaDato($cmd,$idcentro,'menus',$idmenu,'idmenu','descripcion').'</TD>';
else
@@ -190,8 +239,8 @@ function abrir_ventana(URL){
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <th align=center>&nbsp;<?echo $TbMsg[9]?>&nbsp;</th>
- <?
+ <th align=center>&nbsp;<?php echo $TbMsg[9]?>&nbsp;</th>
+ <?php
if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.TomaDato($cmd,$idcentro,'procedimientos',$idprocedimiento,'idprocedimiento','descripcion').'&nbsp;</TD>';
else
@@ -200,7 +249,7 @@ function abrir_ventana(URL){
</TR>
<!-----ADV -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<tr>
- <th align=center&nbsp;>&nbsp;<?echo $TbMsg[13]?>&nbsp;</th>
+ <th align=center&nbsp;>&nbsp;<?php echo $TbMsg[13]?>&nbsp;</th>
<?php if ($opcion==$op_eliminacion) {
echo '<td colspan="3">'.$netiface.'</td>';
} else {
@@ -215,7 +264,7 @@ function abrir_ventana(URL){
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<tr>
- <th align="center">&nbsp;<?echo $TbMsg[14]?>&nbsp;</th>
+ <th align="center">&nbsp;<?php echo $TbMsg[14]?>&nbsp;</th>
<?php if ($opcion==$op_eliminacion) {
echo '<td colspan="3">'.$netdriver.'</td>';
} else {
@@ -230,7 +279,7 @@ function abrir_ventana(URL){
<!--------------------------------------------------------------UHU comprobar si se requiere validacion ------------------------------------------------------------------------------->
<tr>
- <th align=center&nbsp;><? echo $TbMsg[15]; ?> &nbsp;</th>
+ <th align=center&nbsp;><?php echo $TbMsg[15]; ?> &nbsp;</th>
<?php if ($opcion==$op_eliminacion) {
echo '<td colspan="3">'.$validacion.'</td>';
} else {
@@ -242,7 +291,7 @@ function abrir_ventana(URL){
?>
</tr>
<tr>
- <th align=center>&nbsp;<?echo $TbMsg[16]?>&nbsp;</th>
+ <th align=center>&nbsp;<?php echo $TbMsg[16]?>&nbsp;</th>
<?php if ($opcion==$op_eliminacion)
echo '<td colspan="3">'.$paginalogin.'</td>';
else
@@ -250,7 +299,7 @@ function abrir_ventana(URL){
?>
</tr>
<tr>
- <th align=center>&nbsp;<?echo $TbMsg[17]?>&nbsp;</th>
+ <th align=center>&nbsp;<?php echo $TbMsg[17]?>&nbsp;</th>
<?php if ($opcion==$op_eliminacion)
echo '<td colspan="3">'.$paginavalidacion.'</td>';
else
@@ -280,10 +329,13 @@ include_once("../includes/opcionesbotonesop.php");
<?php
//________________________________________________________________________________________________________
//
-// Frame con la información de la configuración
+// Frames para descargas de clientes y con información de la configuración
// Si es la opcion insertar no muestra nada -> opcion=$op_alta
if ($opcion!=$op_alta) {
echo '<div align="center">';
+ echo '<iframe scrolling="auto" height="70" width="90%" frameborder="0" src="../descargas/"></iframe>';
+ echo '</div>';
+ echo '<div align="center">';
echo '<iframe scrolling="auto" height="500" width="90%" frameborder="0"
src="../principal/configuraciones.php?swp=1&idambito='.$idordenador.'&ambito='.$AMBITO_ORDENADORES.'"></iframe>';
echo '</div>';
@@ -302,6 +354,7 @@ if ($opcion!=$op_alta) {
function TomaPropiedades($cmd,$id){
global $idordenador;
global $nombreordenador;
+ global $numserie;
global $ip;
global $mac;
global $fotoordenador;
@@ -325,6 +378,7 @@ function TomaPropiedades($cmd,$id){
$rs->Primero();
if (!$rs->EOF){
$nombreordenador=$rs->campos["nombreordenador"];
+ $numserie=$rs->campos["numserie"];
$ip=$rs->campos["ip"];
$mac=$rs->campos["mac"];
$idperfilhard=$rs->campos["idperfilhard"];
diff --git a/admin/WebConsole/propiedades/propiedades_ordenadorestandar.php b/admin/WebConsole/propiedades/propiedades_ordenadorestandar.php
index 815670f6..6decd954 100644
--- a/admin/WebConsole/propiedades/propiedades_ordenadorestandar.php
+++ b/admin/WebConsole/propiedades/propiedades_ordenadorestandar.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -48,61 +48,61 @@ if ($opcion!=$op_alta){
<LINK rel="stylesheet" type="text/css" href="../estilos.css">
<SCRIPT language="javascript" src="../jscripts/propiedades_ordenadorestandar.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_ordenadorestandar_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_ordenadorestandar_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<FORM name="fdatos">
- <P align=center class=cabeceras><IMG border=0 src="../images/iconos/aula.gif">&nbsp;<?echo $TbMsg[0]?>:<SPAN class=cabeceras><? echo $nombreaula?></SPAN><BR>
- <SPAN align=center class=subcabeceras><?echo $TbMsg[1]?></SPAN></P>
+ <P align=center class=cabeceras><IMG border=0 src="../images/iconos/aula.gif">&nbsp;<?php echo $TbMsg[0]?>:<SPAN class=cabeceras><?php echo $nombreaula?></SPAN><BR>
+ <SPAN align=center class=subcabeceras><?php echo $TbMsg[1]?></SPAN></P>
<TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[2]?>&nbsp;</TD>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[2]?>&nbsp;</TD>
+ <?php
echo '<TD><INPUT class="formulariodatos" name=nombreordenador type=text value="'.$nombreordenador.'"></TD>';
?>
<TD colspan=2 valign=top align=left rowspan=3><IMG border=2 style="border-color:#63676b" src="../images/fotoordenador.gif"></TD>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[3]?>&nbsp;</TD>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[3]?>&nbsp;</TD>
+ <?php
echo '<TD><INPUT class="formulariodatos" name=ip type=text value="'.$ip.'"></TD>';
?>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[4]?>&nbsp;</TD>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[4]?>&nbsp;</TD>
+ <?php
echo '<TD><INPUT class="formulariodatos" name=mac type=text value="'. $mac.'"></TD>';
?>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[5]?>&nbsp;</TD>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[5]?>&nbsp;</TD>
+ <?php
echo '<TD colspan=3>'.HTMLSELECT($cmd,$idcentro,'perfileshard',$idperfilhard,'idperfilhard','descripcion',250).'</TD>';
?>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[7]?>&nbsp;</TD>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[7]?>&nbsp;</TD>
+ <?php
echo '<TD colspan=3>'.HTMLSELECT($cmd,$idcentro,'repositorios',$idrepositorio,'idrepositorio','nombrerepositorios',250).'</TD>';
?>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[11]?>&nbsp;</TD>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[11]?>&nbsp;</TD>
+ <?php
echo '<TD colspan=3><INPUT style="width:250"class="formulariodatos" name=cache type=text value="'. $cache.'"></TD>';
?>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[8]?>&nbsp;</TD>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[8]?>&nbsp;</TD>
+ <?php
echo '<TD colspan=3><INPUT class="formulariodatos" name=numorde type=text value=0 style="width:250"></TD>';
?>
</TR>
@@ -112,22 +112,22 @@ if ($opcion!=$op_alta){
<TABLE border=0 align=center>
<TR>
<TD width=20>&nbsp;</TD>
- <TD colspan=3 align=left ><SPAN class=notas><I><?echo $TbMsg[9]?><br><br><?echo $TbMsg[10]?></I></SPAN></TD>
+ <TD colspan=3 align=left ><SPAN class=notas><I><?php echo $TbMsg[9]?><br><br><?php echo $TbMsg[10]?></I></SPAN></TD>
<TD width=20>&nbsp;</TD></TR>
<TR>
<TD colspan=5 width=20>&nbsp;</TD>
</TR>
<TR>
<TD width=20>&nbsp;</TD>
- <TD align=right><A href=#><IMG border=0 src="../images/boton_cancelar_<? echo $idioma ?>.gif" style="cursor:hand" onclick="cancelar()"></A></TD>
+ <TD align=right><A href=#><IMG border=0 src="../images/boton_cancelar_<?php echo $idioma ?>.gif" style="cursor:hand" onclick="cancelar()"></A></TD>
<TD width=20></TD>
- <TD align=left ><A href=#><IMG border=0 src="../images/boton_confirmar_<? echo $idioma ?>.gif" style="cursor:hand" onclick="confirmar(<? echo $idaula?>)" ></A></TD>
+ <TD align=left ><A href=#><IMG border=0 src="../images/boton_confirmar_<?php echo $idioma ?>.gif" style="cursor:hand" onclick="confirmar(<?php echo $idaula?>)" ></A></TD>
<TD width=20>&nbsp;</TD>
</TR>
</TABLE>
</BODY>
</HTML>
-<?
+<?php
//________________________________________________________________________________________________________
// Recupera los datos de un ordenador estandar
// Parametros:
diff --git a/admin/WebConsole/propiedades/propiedades_perfilhardwares.php b/admin/WebConsole/propiedades/propiedades_perfilhardwares.php
index cd2b8c6a..e9a1cadc 100644
--- a/admin/WebConsole/propiedades/propiedades_perfilhardwares.php
+++ b/admin/WebConsole/propiedades/propiedades_perfilhardwares.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -7,6 +7,9 @@
// Nombre del fichero: propiedades_perfilhardwares.php
// Descripción :
// Presenta el formulario de captura de datos de un pefil hardware para insertar,modificar y eliminar
+// Versión: 1.1 - Se elimina la opción de arranque directo.
+// Autor: Irina Gómez - ETSII Universidad de Sevilla
+// Date: 2017-10-23
// *************************************************************************************************************************************************
include_once("../includes/ctrlacc.php");
include_once("../includes/opciones.php");
@@ -53,16 +56,17 @@ if ($opcion!=$op_alta){
<body>
<div align="center">
<form name="fdatos" action="../gestores/gestor_perfilhardwares.php" method="post">
- <input type="hidden" name="opcion" value="<?=$opcion?>" />
- <input type="hidden" name="idperfilhard" value="<?=$idperfilhard?>" />
- <input type="hidden" name="ordenadores" value="<?=$ordenadores?>" />
- <input type="hidden" name="grupoid" value="<?=$grupoid?>" />
- <p align="center" class="cabeceras"><?echo $TbMsg["HARD_TITLE"]?><br />
- <span align="center" class="subcabeceras"><? echo $opciones[$opcion]?></span></p>
+ <input type="hidden" name="opcion" value="<?php echo $opcion?>" />
+ <input type="hidden" name="idperfilhard" value="<?php echo $idperfilhard?>" />
+ <input type="hidden" name="ordenadores" value="<?php echo $ordenadores?>" />
+ <input type="hidden" name="grupoid" value="<?php echo $grupoid?>" />
+ <input type="hidden" name="winboot" value="reboot" />
+ <p align="center" class="cabeceras"><?php echo $TbMsg["HARD_TITLE"]?><br />
+ <span align="center" class="subcabeceras"><?php echo $opciones[$opcion]?></span></p>
<table align="center" border="0" cellPadding="1" cellSpacing="1" class="tabla_datos">
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<tr>
- <th align="center">&nbsp;<?echo $TbMsg["HARD_NAME"]?>&nbsp;</th>
+ <th align="center">&nbsp;<?php echo $TbMsg["HARD_NAME"]?>&nbsp;</th>
<?php if ($opcion==$op_eliminacion)
echo '<td style="width:215">'.$descripcion.'</td>';
else
@@ -79,29 +83,17 @@ if ($opcion!=$op_alta){
?>
</tr>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
- <tr>
- <th align="center">&nbsp;<?php echo $TbMsg["HARD_WINBOOT"]?> <sup>*</sup>&nbsp;</th>
- <?php if ($opcion==$op_eliminacion)
- echo "<td>$winboot</td>";
- else {
- $params = "reboot=".$TbMsg["HARD_REBOOT"].chr(13);
- $params.= "kexec=".$TbMsg["HARD_KEXEC"];
- echo "<td>".HTMLCTESELECT($params,"winboot","estilodesple","","$winboot",110)."</td>";
- }
- ?>
- </tr>
-<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
</table>
</form>
</div>
-<?
+<?php
//________________________________________________________________________________________________________
include_once("../includes/opcionesbotonesop.php");
//________________________________________________________________________________________________________
?>
</body>
</html>
-<?
+<?php
//________________________________________________________________________________________________________
// Recupera los datos de un perfil hardware
// Parametros:
diff --git a/admin/WebConsole/propiedades/propiedades_perfilsoftwares.php b/admin/WebConsole/propiedades/propiedades_perfilsoftwares.php
index 8927e388..64fadafc 100644
--- a/admin/WebConsole/propiedades/propiedades_perfilsoftwares.php
+++ b/admin/WebConsole/propiedades/propiedades_perfilsoftwares.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -45,31 +45,31 @@ if ($opcion!=$op_alta){
<LINK rel="stylesheet" type="text/css" href="../estilos.css">
<SCRIPT language="javascript" src="../jscripts/propiedades_perfilsoftwares.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_perfilsoftwares_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_perfilsoftwares_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<DIV align=center>
<FORM name="fdatos" action="../gestores/gestor_perfilsoftwares.php" method="post">
- <INPUT type=hidden name=opcion value=<?=$opcion?>>
- <INPUT type=hidden name=idperfilsoft value=<?=$idperfilsoft?>>
- <INPUT type=hidden name=imagenes value=<?=$imagenes?>>
- <INPUT type=hidden name=grupoid value=<?=$grupoid?>>
- <P align=center class=cabeceras><?echo $TbMsg[4]?><BR>
- <SPAN align=center class=subcabeceras><? echo $opciones[$opcion]?></SPAN></P>
+ <INPUT type=hidden name=opcion value=<?php echo $opcion?>>
+ <INPUT type=hidden name=idperfilsoft value=<?php echo $idperfilsoft?>>
+ <INPUT type=hidden name=imagenes value=<?php echo $imagenes?>>
+ <INPUT type=hidden name=grupoid value=<?php echo $grupoid?>>
+ <P align=center class=cabeceras><?php echo $TbMsg[4]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $opciones[$opcion]?></SPAN></P>
<TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[5]?>&nbsp;</TH>
- <?if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[5]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD style="width:215">'.$descripcion.'</TD>';
else
echo '<TD><INPUT class="formulariodatos" name=descripcion style="width:215" type=text value="'.$descripcion.'"></TD>';?>
- <TD align=left rowspan=2><IMG border=3 style="border-color:#63676b" src="../images/aula.jpg"><br><center>&nbsp;Images:&nbsp;<? echo $imagenes?></center></TD>
+ <TD align=left rowspan=2><IMG border=3 style="border-color:#63676b" src="../images/aula.jpg"><br><center>&nbsp;Images:&nbsp;<?php echo $imagenes?></center></TD>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[6]?>&nbsp;</TH>
- <?if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[6]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD>'.$comentarios.'</TD>';
else
echo '<TD><TEXTAREA class="formulariodatos" name=comentarios rows=3 cols=40>'.$comentarios.'</TEXTAREA></TD>';
@@ -79,14 +79,14 @@ if ($opcion!=$op_alta){
</TABLE>
</FORM>
</DIV>
-<?
+<?php
//________________________________________________________________________________________________________
include_once("../includes/opcionesbotonesop.php");
//________________________________________________________________________________________________________
?>
</BODY>
</HTML>
-<?
+<?php
//________________________________________________________________________________________________________
// Recupera los datos de un perfil software
// Parametros:
diff --git a/admin/WebConsole/propiedades/propiedades_procedimientos.php b/admin/WebConsole/propiedades/propiedades_procedimientos.php
index e643bbbd..d5e51816 100644
--- a/admin/WebConsole/propiedades/propiedades_procedimientos.php
+++ b/admin/WebConsole/propiedades/propiedades_procedimientos.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -44,29 +44,29 @@ if ($opcion!=$op_alta){
<LINK rel="stylesheet" type="text/css" href="../estilos.css">
<SCRIPT language="javascript" src="../jscripts/propiedades_procedimientos.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_procedimientos_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_procedimientos_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<DIV align=center>
<FORM name="fdatos" action="../gestores/gestor_procedimientos.php" method="post">
- <INPUT type=hidden name=opcion value=<?=$opcion?>>
- <INPUT type=hidden name=idprocedimiento value=<?=$idprocedimiento?>>
- <INPUT type=hidden name=grupoid value=<?=$grupoid?>>
- <P align=center class=cabeceras><?echo $TbMsg[4]?><BR>
- <SPAN align=center class=subcabeceras><? echo $opciones[$opcion]?></SPAN></P>
+ <INPUT type=hidden name=opcion value=<?php echo $opcion?>>
+ <INPUT type=hidden name=idprocedimiento value=<?php echo $idprocedimiento?>>
+ <INPUT type=hidden name=grupoid value=<?php echo $grupoid?>>
+ <P align=center class=cabeceras><?php echo $TbMsg[4]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $opciones[$opcion]?></SPAN></P>
<TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[5]?>&nbsp;</TD>
- <?if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[5]?>&nbsp;</TD>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD style="width:300">'.$descripcion.'</TD>';
else
echo '<TD><INPUT class="formulariodatos" name=descripcion style="width:300" type=text value="'.$descripcion.'"></TD>';?>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[6]?>&nbsp;</TD>
- <?if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[6]?>&nbsp;</TD>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD>'.$comentarios.'</TD>';
else
echo '<TD><TEXTAREA class="formulariodatos" name=comentarios rows=3 cols=55>'.$comentarios.'</TEXTAREA></TD>';
@@ -76,14 +76,14 @@ if ($opcion!=$op_alta){
</TABLE>
</FORM>
</DIV>
-<?
+<?php
//________________________________________________________________________________________________________
include_once("../includes/opcionesbotonesop.php");
//________________________________________________________________________________________________________
?>
</BODY>
</HTML>
-<?
+<?php
//________________________________________________________________________________________________________
// Recupera los datos de un procedimiento
// Parametros:
diff --git a/admin/WebConsole/propiedades/propiedades_repositorios.php b/admin/WebConsole/propiedades/propiedades_repositorios.php
index 571c7d0e..13db2dc5 100644
--- a/admin/WebConsole/propiedades/propiedades_repositorios.php
+++ b/admin/WebConsole/propiedades/propiedades_repositorios.php
@@ -10,9 +10,12 @@
// **********************************************************************************************************
include_once("../includes/ctrlacc.php");
include_once("../includes/opciones.php");
+include_once("../includes/comunes.php");
include_once("../includes/CreaComando.php");
include_once("../clases/AdoPhp.php");
-include_once("../idiomas/php/".$idioma."/propiedades_repositorios_".$idioma.".php");
+include_once("../idiomas/php/".$idioma."/propiedades_repositorios_".$idioma.".php");
+// Fichero con funciones para trabajar con el webservice
+include_once("../includes/restfunctions.php");
//________________________________________________________________________________________________________
$opcion=0;
$opciones=array($TbMsg[0],$TbMsg[1],$TbMsg[2],$TbMsg[3]);
@@ -21,11 +24,11 @@ $idrepositorio=0;
$nombrerepositorio="";
$ip="";
$puertorepo="2002";
+$apiKeyRepo="";
$grupoid=0;
$comentarios="";
$ordenadores=0; // Número de ordenador a los que da servicio
$numordenadores=0; // Número de ordenador a los que da servicio
-$repolocal="";
if (isset($_GET["opcion"])) $opcion=$_GET["opcion"]; // Recoge parametros
if (isset($_GET["idrepositorio"])) $idrepositorio=$_GET["idrepositorio"];
@@ -42,41 +45,32 @@ if ($opcion!=$op_alta){
}
//________________________________________________________________________________________________________
//#########################################################################
-$iprepositorio="";
-$ipservidor=$_SERVER['SERVER_ADDR'];
- $cmd->texto="SELECT * FROM repositorios WHERE idrepositorio=$idrepositorio";
- $rs=new Recordset;
- $rs->Comando=&$cmd;
- if (!$rs->Abrir()) return(true); // Error al abrir recordset
- $rs->Primero();
- if (!$rs->EOF){
- $nombrerepositorio=$rs->campos["nombrerepositorio"];
- $iprepositorio=$rs->campos["ip"];
- }
- $rs->Cerrar();
-
-if ($iprepositorio == $ipservidor)
-{
- $repolocal="si";
- $espaciorepo=exec("df -h /opt/opengnsys/images");
- $espaciorepo=split(" ",$espaciorepo);
- for ($j=0;$j<count($espaciorepo);$j++)
- {
- if ($espaciorepo[$j]!="")
- {$espaciorepos[]=$espaciorepo[$j];}
- }
- for ($k=0;$k<count($espaciorepos);$k++)
- {
- $totalrepo=$espaciorepos[1];
- $ocupadorepo=$espaciorepos[2];
- $librerepo=$espaciorepos[3];
- $porcentajerepo=$espaciorepos[4];
+// Si tenemos un apiKey podemos obtener la información desde el webservice en el repositorio
+if($apiKeyRepo != ""){
+ $repo[0]['url'] = "https://$ip/opengnsys/rest/repository/images";
+ $repo[0]['header'] = array('Authorization: '.$apiKeyRepo);
+ $result = multiRequest($repo);
+ if ($result[0]['code'] === 200) {
+ $result = json_decode($result[0]['data']);
+ $repodir = $result->directory;
+ $totalrepo = humanSize($result->disk->total);
+ $librerepo = humanSize($result->disk->free);
+ $ocupadorepo = humanSize($result->disk->total - $result->disk->free);
+ $porcentajerepo = 100 - floor(100 * $result->disk->free / $result->disk->total);
+ $repoOus = $result->ous;
+ $repoImages = $result->images;
+ $repoWithApi = true;
+ } else {
+ // Error de acceso a la API REST.
+ $repoWithApi = false;
+ $repoImages = null;
}
+} else {
+ // Error de acceso a la API REST.
+ $repoWithApi = false;
+ $repoImages = null;
}
-else{
- $repolocaL="no";
- }
//#########################################################################
?>
@@ -88,104 +82,141 @@ else{
<SCRIPT language="javascript" src="../jscripts/validators.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/propiedades_repositorios.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_repositorios_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_repositorios_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<DIV align=center>
<FORM name="fdatos" action="../gestores/gestor_repositorios.php" method="post">
- <INPUT type=hidden name=opcion value="<? echo $opcion?>">
- <INPUT type=hidden name=idrepositorio value="<? echo $idrepositorio?>">
- <INPUT type=hidden name=grupoid value="<? echo $grupoid?>">
- <INPUT type=hidden name=ordenadores value="<? echo $ordenadores?>">
+ <INPUT type=hidden name=opcion value="<?php echo $opcion?>">
+ <INPUT type=hidden name=idrepositorio value="<?php echo $idrepositorio?>">
+ <INPUT type=hidden name=grupoid value="<?php echo $grupoid?>">
+ <INPUT type=hidden name=ordenadores value="<?php echo $ordenadores?>">
- <P align=center class=cabeceras><?echo $TbMsg[4]?><BR>
- <SPAN align=center class=subcabeceras><? echo $opciones[$opcion]?></SPAN></P>
+ <P align=center class=cabeceras><?php echo $TbMsg[4]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $opciones[$opcion]?></SPAN></P>
<TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos >
-<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
+<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[5]?>&nbsp;</TD>
- <?
+ <TH align="center">&nbsp;<?php echo $TbMsg[5]?>&nbsp;</TD>
+ <?php
if ($opcion==$op_eliminacion)
echo '<TD>'.$nombrerepositorio.'</TD>';
else
- echo '<TD><INPUT class="formulariodatos" name=nombrerepositorio style="width:200" type=text value="'.$nombrerepositorio.'"></TD>';
+ echo '<TD><INPUT class="formulariodatos" name="nombrerepositorio" style="width:200" type="text" value="'.$nombrerepositorio.'"></TD>';
?>
- <TD valign=top align=left rowspan=3 ><CENTER>
- <IMG border=3 style="border-color:#63676b" src="../images/aula.jpg">
- <BR>&nbsp;Ordenadores:&nbsp;<? echo $ordenadores?></CENTER></TD>
+ <TD valign="top" align="left" rowspan="4" ><CENTER>
+ <IMG border="3" style="border-color:#63676b" src="../images/aula.jpg">
+ <BR>&nbsp;Ordenadores:&nbsp;<?php echo $ordenadores?></CENTER></TD>
</TR>
-<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
+<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[6]?>&nbsp;</TD>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[6]?>&nbsp;</TD>
+ <?php
if ($opcion==$op_eliminacion)
echo '<TD>'.$ip.'</TD>';
else
- echo'<TD><INPUT class="formulariodatos" name=ip type=text style="width:200" value="'.$ip.'"></TD>';
+ echo'<TD><INPUT class="formulariodatos" name="ip" type="text" style="width:200" value="'.$ip.'"></TD>';
?>
</TR>
-<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
+<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[8]?>&nbsp;</TD>
- <?
- if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[8]?>&nbsp;</TD>
+ <?php
+ if ($opcion==$op_eliminacion)
echo '<TD>'.$puertorepo.'</TD>';
- else
- echo'<TD><INPUT class="formulariodatos" name=puertorepo type=text style="width:200" value="'.$puertorepo.'"></TD>';
+ else
+ echo'<TD><INPUT class="formulariodatos" name=puertorepo type="text" style="width:200" value="'.$puertorepo.'"></TD>';
?>
</TR>
-<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
+<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[7]?>&nbsp;</TD>
- <?
- if ($opcion==$op_eliminacion)
- echo '<TD colspan=2>'.$comentarios.'</TD>';
- else
- echo '<TD colspan=2><TEXTAREA class="formulariodatos" name=comentarios rows=2 cols=50>'.$comentarios.'</TEXTAREA></TD>';
+ <TH align=center>&nbsp;<?php echo $TbMsg[17]?>&nbsp;</TD>
+ <?php
+ if ($opcion==$op_eliminacion)
+ echo '<TD>'.$apiKeyRepo.'</TD>';
+ else
+ echo'<TD><INPUT class="formulariodatos" name="apiKeyRepo" type="text" style="width:200" value="'.$apiKeyRepo.'"></TD>';
+ ?>
+ </TR>
+<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -->
+ <TR>
+ <TH align=center>&nbsp;<?php echo $TbMsg[7]?>&nbsp;</TD>
+ <?php
+ if ($opcion==$op_eliminacion)
+ echo '<TD colspan="2">'.$comentarios.'</TD>';
+ else
+ echo '<TD colspan="2"><TEXTAREA class="formulariodatos" name="comentarios" rows=2 cols=50>'.$comentarios.'</TEXTAREA></TD>';
?>
</TR>
-<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
+<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -->
</TABLE>
<?php if ( $opcion == 1 ){} else { ?>
<TABLE align=center border=0 cellPadding=2 cellSpacing=2 class=tabla_datos >
- <!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
+ <!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -->
- <?php if ($repolocal == "si" ) { ?>
+ <?php if ($repoWithApi) { ?>
<TR>
- <TH align=center width=125>&nbsp;<?echo $TbMsg[11]?>&nbsp;</TD>
- <TH align=center width=120>&nbsp;<?echo $TbMsg[12]?>&nbsp;</TD>
- <TH align=center width=120>&nbsp;<?echo $TbMsg[13]?>&nbsp;</TD>
- <TH align=center width=101>&nbsp;<?echo $TbMsg[14]?>&nbsp;</TD>
+ <TH align=center width=125>&nbsp;<?php echo $TbMsg[11]?>&nbsp;</TD>
+ <TH align=center width=120>&nbsp;<?php echo $TbMsg[12]?>&nbsp;</TD>
+ <TH align=center width=120>&nbsp;<?php echo $TbMsg[13]?>&nbsp;</TD>
+ <TH align=center width=101>&nbsp;<?php echo $TbMsg[14]?>&nbsp;</TD>
</TR>
<TR>
- <TD align=center width=125>&nbsp;<?echo $totalrepo?>&nbsp;</TD>
- <TD align=center width=120>&nbsp;<?echo $ocupadorepo?>&nbsp;</TD>
- <TD align=center width=120>&nbsp;<?echo $librerepo?>&nbsp;</TD>
- <TD align=center width=101>&nbsp;<?echo $porcentajerepo?>&nbsp;</TD>
+ <TD align=center width=125>&nbsp;<?php echo $totalrepo?>&nbsp;</TD>
+ <TD align=center width=120>&nbsp;<?php echo $ocupadorepo?>&nbsp;</TD>
+ <TD align=center width=120>&nbsp;<?php echo $librerepo?>&nbsp;</TD>
+ <TD align=center width=101>&nbsp;<?php echo "$porcentajerepo %" ?>&nbsp;</TD>
</TR>
+ <?php
+ // Si tenemos informacion del repositorio remoto, mostramos las imagenes
+ if($repoWithApi == true && is_array($repoImages)){
+ echo "<tr class='tabla_listados_sin'><th colspan='4'>".$TbMsg['MSG_CONTENT']." $repodir</th></tr>\n";
+
+echo "<tr><td>".$TbMsg['MSG_IMAGE']." (".$TbMsg['MSG_TYPE'].")</td><td>".$TbMsg['MSG_SIZE']."</td><td>".$TbMsg['MSG_MODIFIED']."</td><td>".$TbMsg['MSG_PERMISSIONS']."</td></tr>\n";
+ foreach($repoImages as $image){
+ echo "<tr class='tabla_listados_sin'>";
+ echo "<td>".$image->name." (".$image->type.")</td>";
+ echo "<td>".humanSize($image->size)."</td>";
+ echo "<td>".$image->modified."</td>";
+ echo "<td>".$image->mode."</td>";
+ echo "</tr>\n";
+ }
+ foreach($repoOus as $ou) {
+ foreach($ou->images as $image) {
+ echo "<tr class='tabla_listados_sin'>";
+ echo "<td>".$ou->subdir." / ".$image->name." (".$image->type.")</td>";
+ echo "<td>".$image->size." bytes</td>";
+ echo "<td>".$image->modified."</td>";
+ echo "<td>".$image->mode."</td>";
+ echo "</tr>\n";
+ }
+ }
+ }
+ ?>
<?php }else { ?>
<tr>
<th align="center">&nbsp;<?php echo '<strong>'.$TbMsg[15].'</strong></br>'.$TbMsg[16] ?></th>
</tr>
<?php } ?>
<?php } ?>
-<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
+<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -->
</TABLE>
+
</FORM>
</DIV>
-<?
+<?php
//________________________________________________________________________________________________________
include_once("../includes/opcionesbotonesop.php");
//________________________________________________________________________________________________________
?>
</BODY>
</HTML>
-<?
+<?php
//________________________________________________________________________________________________________
// Recupera los datos de un repositorio
// Parametros:
@@ -197,6 +228,7 @@ function TomaPropiedades($cmd,$id){
global $ip;
global $comentarios;
global $puertorepo;
+ global $apiKeyRepo;
global $ordenadores;
@@ -217,6 +249,7 @@ function TomaPropiedades($cmd,$id){
$ip=$rs->campos["ip"];
$comentarios=$rs->campos["comentarios"];
$puertorepo=$rs->campos["puertorepo"];
+ $apiKeyRepo=$rs->campos["apikey"];
// $ordenadores=$rs->campos["numordenadores"];
}
$rs->Cerrar();
diff --git a/admin/WebConsole/propiedades/propiedades_reservas.php b/admin/WebConsole/propiedades/propiedades_reservas.php
index 153e56c7..1cf4f79c 100644
--- a/admin/WebConsole/propiedades/propiedades_reservas.php
+++ b/admin/WebConsole/propiedades/propiedades_reservas.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -56,30 +56,30 @@ if ($opcion!=$op_alta){
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/propiedades_reservas.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_reservas_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_reservas_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<DIV align=center>
<FORM name="fdatos" action="../gestores/gestor_reservas.php" method="post">
- <INPUT type=hidden name=opcion value=<?=$opcion?>>
- <INPUT type=hidden name=idreserva value=<?=$idreserva?>>
- <INPUT type=hidden name=grupoid value=<?=$grupoid?>>
- <INPUT type=hidden name=estado value=<?=$estado?>>
- <P align=center class=cabeceras><?echo $TbMsg[4]?><BR>
- <SPAN align=center class=subcabeceras><? echo $opciones[$opcion]?></SPAN></P>
+ <INPUT type=hidden name=opcion value=<?php echo $opcion?>>
+ <INPUT type=hidden name=idreserva value=<?php echo $idreserva?>>
+ <INPUT type=hidden name=grupoid value=<?php echo $grupoid?>>
+ <INPUT type=hidden name=estado value=<?php echo $estado?>>
+ <P align=center class=cabeceras><?php echo $TbMsg[4]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $opciones[$opcion]?></SPAN></P>
<TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[5]?>&nbsp;</TH>
- <?if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[5]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD style="width:300">'.$descripcion.'</TD>';
else
echo '<TD><TEXTAREA class="formulariodatos" name=descripcion rows=3 cols=55">'.$descripcion.'</TEXTAREA></TD>';?>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[6]?>&nbsp;</TH>
- <?if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[6]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD style="width:300">'.$solicitante.'</TD>';
else
echo '<TD><INPUT class="formulariodatos" name=solicitante style="width:300" type=text value="'.$solicitante.'"></TD>';
@@ -87,8 +87,8 @@ if ($opcion!=$op_alta){
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[8]?>&nbsp;</TH>
- <?if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[8]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD style="width:300">'.$email.'</TD>';
else
echo '<TD><INPUT class="formulariodatos" name=email style="width:300" type=text value="'.$email.'"></TD>';
@@ -96,8 +96,8 @@ if ($opcion!=$op_alta){
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[9]?>&nbsp;</TH>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[9]?>&nbsp;</TH>
+ <?php
if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.TomaDato($cmd,0,'estatus',$idestatus,'idestatus','descripcion').'</TD>';
else
@@ -106,8 +106,8 @@ if ($opcion!=$op_alta){
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[10]?>&nbsp;</TH>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[10]?>&nbsp;</TH>
+ <?php
if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.TomaDato($cmd,$idcentro,'aulas',$idaula,'idaula','nombreaula').'</TD>';
else
@@ -116,8 +116,8 @@ if ($opcion!=$op_alta){
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[11]?>&nbsp;</TH>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[11]?>&nbsp;</TH>
+ <?php
if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.TomaDato($cmd,$idcentro,'imagenes',$idimagen,'idimagen','descripcion').'</TD>';
else
@@ -126,8 +126,8 @@ if ($opcion!=$op_alta){
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[19]?>&nbsp;</TH>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[19]?>&nbsp;</TH>
+ <?php
if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.TomaDato($cmd,$idcentro,'tareas',$idtarea,'idtarea','descripcion').'</TD>';
else
@@ -136,8 +136,8 @@ if ($opcion!=$op_alta){
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[20]?>&nbsp;</TH>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[20]?>&nbsp;</TH>
+ <?php
if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.TomaDato($cmd,$idcentro,'trabajos',$idtrabajo,'idtrabajo','descripcion').'</TD>';
else
@@ -145,14 +145,14 @@ if ($opcion!=$op_alta){
?>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
- <?
+ <?php
$tbimg[$RESERVA_CONFIRMADA]='../images/iconos/confirmadas.gif';
$tbimg[$RESERVA_PENDIENTE]='../images/iconos/pendientes.gif';
$tbimg[$RESERVA_DENEGADA]='../images/iconos/denegadas.gif';
?>
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[16]?>&nbsp;</TH>
- <?if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[16]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD style="width:300"><IMG src="'.$tbimg[$estado].'">&nbsp;&nbsp;('.$TbMsg[12+$estado].')</TD>';
else{
echo '<TD>';
@@ -174,8 +174,8 @@ if ($opcion!=$op_alta){
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[7]?>&nbsp;</TD>
- <?if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[7]?>&nbsp;</TD>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD>'.$comentarios.'</TD>';
else
echo '<TD><TEXTAREA class="formulariodatos" name=comentarios rows=3 cols=55>'.$comentarios.'</TEXTAREA></TD>';
@@ -184,14 +184,14 @@ if ($opcion!=$op_alta){
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
</TABLE>
</FORM>
-<?
+<?php
//________________________________________________________________________________________________________
include_once("../includes/opcionesbotonesop.php");
//________________________________________________________________________________________________________
?>
</BODY>
</HTML>
-<?
+<?php
//________________________________________________________________________________________________________
// Recupera los datos de una reserva
// Parametros:
diff --git a/admin/WebConsole/propiedades/propiedades_tareas.php b/admin/WebConsole/propiedades/propiedades_tareas.php
index ec70ed70..8926e69c 100644
--- a/admin/WebConsole/propiedades/propiedades_tareas.php
+++ b/admin/WebConsole/propiedades/propiedades_tareas.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -50,30 +50,30 @@ if ($opcion!=$op_alta){
<SCRIPT language="javascript" src="../jscripts/propiedades_tareas.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_tareas_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_tareas_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<DIV align=center>
<FORM name="fdatos" action="../gestores/gestor_tareas.php" method="post">
- <INPUT type=hidden name=opcion value=<?=$opcion?>>
- <INPUT type=hidden name=idtarea value=<?=$idtarea?>>
- <INPUT type=hidden name=grupoid value=<?=$grupoid?>>
- <INPUT type=hidden name=idambito value=<?=$idambito?>>
- <P align=center class=cabeceras><?echo $TbMsg[4]?><BR>
- <SPAN align=center class=subcabeceras><? echo $opciones[$opcion]?></SPAN></P>
+ <INPUT type=hidden name=opcion value=<?php echo $opcion?>>
+ <INPUT type=hidden name=idtarea value=<?php echo $idtarea?>>
+ <INPUT type=hidden name=grupoid value=<?php echo $grupoid?>>
+ <INPUT type=hidden name=idambito value=<?php echo $idambito?>>
+ <P align=center class=cabeceras><?php echo $TbMsg[4]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $opciones[$opcion]?></SPAN></P>
<TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos >
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[5]?>&nbsp;</TD>
- <?if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[5]?>&nbsp;</TD>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD style="width:300">'.$descripcion.'</TD>';
else
echo '<TD><INPUT class="formulariodatos" name=descripcion style="width:300" type=text value="'.$descripcion.'"></TD>';?>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[6]?>&nbsp;</TD>
- <?if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[6]?>&nbsp;</TD>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD>'.$comentarios.'</TD>';
else
echo '<TD><TEXTAREA class="formulariodatos" name=comentarios rows=3 cols=55>'.$comentarios.'</TEXTAREA></TD>';
@@ -81,8 +81,8 @@ if ($opcion!=$op_alta){
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[7]?>&nbsp;</TD>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[7]?>&nbsp;</TD>
+ <?php
if ($opcion==$op_eliminacion){
$Mambitos[$AMBITO_CENTROS]=$TbMsg[10];
$Mambitos[$AMBITO_GRUPOSAULAS]=$TbMsg[11];
@@ -103,8 +103,8 @@ if ($opcion!=$op_alta){
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[8]?>&nbsp;</TD>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[8]?>&nbsp;</TD>
+ <?php
if ($opcion==$op_eliminacion){
tomaDescriAmbito($cmd,$ambito,$idambito,$textambito);
echo '<TD>'.$textambito.'</TD>';
@@ -117,14 +117,14 @@ if ($opcion!=$op_alta){
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
</TABLE>
</FORM>
-<?
+<?php
//________________________________________________________________________________________________________
include_once("../includes/opcionesbotonesop.php");
//________________________________________________________________________________________________________
?>
</BODY>
</HTML>
-<?
+<?php
//________________________________________________________________________________________________________
// Recupera los datos de una tarea
// Parametros:
diff --git a/admin/WebConsole/propiedades/propiedades_tipohardwares.php b/admin/WebConsole/propiedades/propiedades_tipohardwares.php
index 84f3ea24..ede51000 100644
--- a/admin/WebConsole/propiedades/propiedades_tipohardwares.php
+++ b/admin/WebConsole/propiedades/propiedades_tipohardwares.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -47,29 +47,29 @@ if ($opcion!=$op_alta){
<SCRIPT language="javascript" src="../jscripts/propiedades_tipohardwares.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_tipohardwares_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_tipohardwares_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<DIV align=center>
<FORM name="fdatos" action="../gestores/gestor_tipohardwares.php" method="post">
- <INPUT type=hidden name=opcion value=<?=$opcion?>>
- <INPUT type=hidden name=idtipohardware value=<?=$idtipohardware?>>
- <INPUT type=hidden name=grupoid value=<?=$grupoid?>>
- <P align=center class=cabeceras><?echo $TbMsg[4]?><BR>
- <SPAN align=center class=subcabeceras><? echo $opciones[$opcion]?></SPAN></P>
+ <INPUT type=hidden name=opcion value=<?php echo $opcion?>>
+ <INPUT type=hidden name=idtipohardware value=<?php echo $idtipohardware?>>
+ <INPUT type=hidden name=grupoid value=<?php echo $grupoid?>>
+ <P align=center class=cabeceras><?php echo $TbMsg[4]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $opciones[$opcion]?></SPAN></P>
<TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos >
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[5]?>&nbsp;</TD>
- <?if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[5]?>&nbsp;</TD>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD style="width:300">'.$descripcion.'</TD>';
else
echo '<TD><INPUT class="formulariodatos" name=descripcion style="width:300" type=text value="'.$descripcion.'"></TD>';?>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[6]?>&nbsp;</TD>
- <?
+ <TH align=center>&nbsp;<?php echo $TbMsg[6]?>&nbsp;</TD>
+ <?php
if ($opcion==$op_eliminacion)
echo '<TD colspan=3>'.TomaDato($cmd,0,'iconos',basename($urlimg),'urlicono','urlicono',0).'</TD>';
else
@@ -80,14 +80,14 @@ if ($opcion!=$op_alta){
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
</TABLE>
</FORM>
-<?
+<?php
//________________________________________________________________________________________________________
include_once("../includes/opcionesbotonesop.php");
//________________________________________________________________________________________________________
?>
</BODY>
</HTML>
-<?
+<?php
//________________________________________________________________________________________________________
// Recupera los datos de un tipo de hardware
// Parametros:
diff --git a/admin/WebConsole/propiedades/propiedades_universidades.php b/admin/WebConsole/propiedades/propiedades_universidades.php
index ef9802ad..448f3cdc 100644
--- a/admin/WebConsole/propiedades/propiedades_universidades.php
+++ b/admin/WebConsole/propiedades/propiedades_universidades.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -47,25 +47,25 @@ else
<LINK rel="stylesheet" type="text/css" href="../estilos.css">
<SCRIPT language="javascript" src="../jscripts/propiedades_universidades.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_universidades_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_universidades_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<DIV align=center>
<FORM name="fdatos" action="../gestores/gestor_universidades.php" method="post">
- <INPUT type=hidden name=opcion value=<?=$opcion?>>
- <INPUT type=hidden name=iduniversidad value=<?=$iduniversidad?>>
- <P align=center class=cabeceras><?echo $TbMsg[4]?><BR>
- <SPAN align=center class=subcabeceras><? echo $opciones[$opcion]?></SPAN></P>
+ <INPUT type=hidden name=opcion value=<?php echo $opcion?>>
+ <INPUT type=hidden name=iduniversidad value=<?php echo $iduniversidad?>>
+ <P align=center class=cabeceras><?php echo $TbMsg[4]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $opciones[$opcion]?></SPAN></P>
<TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center&nbsp;><?echo $TbMsg[5]?>&nbsp;</TD>
- <?echo '<TD colspan=3><INPUT class="formulariodatos" name=nombreuniversidad style="width:350" type=text value="'.$nombreuniversidad.'"></TD>';?>
+ <TH align=center&nbsp;><?php echo $TbMsg[5]?>&nbsp;</TD>
+ <?php echo '<TD colspan=3><INPUT class="formulariodatos" name=nombreuniversidad style="width:350" type=text value="'.$nombreuniversidad.'"></TD>';?>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[6]?>&nbsp;</TD>
- <?if ($opcion==$op_eliminacion)
+ <TH align=center>&nbsp;<?php echo $TbMsg[6]?>&nbsp;</TD>
+ <?php if ($opcion==$op_eliminacion)
echo '<TD>'.$comentarios.'</TD>';
else
echo '<TD><TEXTAREA class="formulariodatos" name=comentarios rows=3 cols=66>'.$comentarios.'</TEXTAREA></TD>';
@@ -75,14 +75,14 @@ else
</TABLE>
</FORM>
</DIV>
-<?
+<?php
//________________________________________________________________________________________________________
include_once("../includes/opcionesbotonesop.php");
//________________________________________________________________________________________________________
?>
</BODY>
</HTML>
-<?
+<?php
//________________________________________________________________________________________________________
// Recupera los datos de un universidad
// Parametros:
diff --git a/admin/WebConsole/propiedades/propiedades_usuarios.php b/admin/WebConsole/propiedades/propiedades_usuarios.php
index ddff2e4b..05441502 100644
--- a/admin/WebConsole/propiedades/propiedades_usuarios.php
+++ b/admin/WebConsole/propiedades/propiedades_usuarios.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -25,6 +25,7 @@ $usuario="";
$pasguor="";
$nombre="";
$email="";
+$apikey="";
$identificador=0;
$idambito=0;
$ididioma=0;
@@ -69,67 +70,91 @@ switch($idtipousuario){
<LINK rel="stylesheet" type="text/css" href="../estilos.css">
<SCRIPT language="javascript" src="../jscripts/propiedades_usuarios.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_usuarios_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/propiedades_usuarios_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<FORM name="fdatos" action="../gestores/gestor_usuarios.php" method="post">
- <INPUT type=hidden name=opcion value=<?=$opcion?>>
- <INPUT type=hidden name=idusuario value=<?=$idusuario?>>
- <INPUT type=hidden name=idtipousuario value=<?=$idtipousuario?>>
- <INPUT type=hidden name=idambito value=<?=$idambito?>>
+ <INPUT type=hidden name=opcion value=<?php echo $opcion?>>
+ <INPUT type=hidden name=idusuario value=<?php echo $idusuario?>>
+ <INPUT type=hidden name=idtipousuario value=<?php echo $idtipousuario?>>
+ <INPUT type=hidden name=idambito value=<?php echo $idambito?>>
- <P align=center class=cabeceras><?echo $TbMsg[4]." (".$litusu.")"?><BR>
- <SPAN align=center class=subcabeceras><? echo $opciones[$opcion]?></SPAN></P>
+ <P align=center class=cabeceras><?php echo $TbMsg[4]." (".$litusu.")"?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $opciones[$opcion]?></SPAN></P>
<TABLE align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>
<!------------------------------------------------ NOMBRE USUARIO -------------------------------------------------------------------------------------------------->
<TR>
- <TH>&nbsp;<?echo $TbMsg[5]?>&nbsp;</TH>
- <?if ($opcion==$op_eliminacion || $opcion==$op_modificacion && $idusuario==1){?>
- <TD><INPUT type=hidden class=cajatexto name="usuario" style="width:100" value="<? echo $usuario?>"></INPUT><?echo $usuario?>&nbsp&nbsp;<IMG src="<? echo $urlimg ?>"></TD>
- <?}else{?>
- <TD><INPUT type=text class=cajatexto name="usuario" style="width:100" value="<? echo $usuario?>">
- <IMG src="<? echo $urlimg ?>">
+ <TH>&nbsp;<?php echo $TbMsg[5]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion || $opcion==$op_modificacion && $idusuario==1){?>
+ <TD><INPUT type=hidden class=cajatexto name="usuario" style="width:100" value="<?php echo $usuario?>"></INPUT><?php echo $usuario?>&nbsp&nbsp;<IMG src="<?php echo $urlimg ?>"></TD>
+ <?php }else{?>
+ <TD><INPUT type=text class=cajatexto name="usuario" style="width:100" value="<?php echo $usuario?>">
+ <IMG src="<?php echo $urlimg ?>">
- <?}?>
+ <?php }?>
</TR>
<!---------------------------------------------------- PASSWORD -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH>&nbsp;<?echo $TbMsg[6]?>&nbsp;</TH>
- <?if ($opcion==$op_eliminacion || $opcion==$op_modificacion && $idusuario==1){?>
- <TD><INPUT type=hidden class=cajatexto name="pasguor" style="width:100" value="<? echo $pasguor?>"></INPUT><?echo $pasguor?></TD>
- <?}else{?>
- <TD><INPUT type=text class=cajatexto name="pasguor" style="width:100" value="<? echo $pasguor?>">
- <?}?>
+ <!-- disables autocomplete --><input type="password" style="display:none">
+ <TH>&nbsp;<?php echo $TbMsg[6]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion || $opcion==$op_modificacion && $idusuario==1){?>
+ <TD><INPUT type=hidden class=cajatexto name="pasguor" style="width:100" value=""></INPUT>****</TD>
+ <?php }else{?>
+ <TD><INPUT type=password class=cajatexto name="pasguor" style="width:100" value="">
+ <?php }?>
+ </TR>
+<!---------------------------------------------------- CONFIRMAR PASSWORD ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
+ <TR>
+ <TH>&nbsp;<?php echo $TbMsg[18]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion || $opcion==$op_modificacion && $idusuario==1){?>
+ <TD><INPUT type=hidden class=cajatexto name="confirmarpasguor" style="width:100" value=""></INPUT>****</TD>
+ <?php }else{?>
+ <TD><INPUT type=password class=cajatexto name="confirmarpasguor" style="width:100" value="">
+ <?php }?>
</TR>
<!--------------------------------------------------- NOMBRE COMPLETO ----------------------------------------------------------------------------------------------->
<TR>
- <TH>&nbsp;<?echo $TbMsg[7]?>&nbsp;</TH>
- <?if ($opcion==$op_eliminacion || ($opcion==$op_modificacion && $idusuario==1)){?>
- <TD><INPUT type=hidden class=cajatexto name="nombre" style="width:250" value="<? echo $nombre?>"></INPUT><?echo $nombre?></TD>
- <?}else{?>
- <TD><INPUT type=text class=cajatexto name="nombre" style="width:250" value="<? echo $nombre?>">
- <?}?>
+ <TH>&nbsp;<?php echo $TbMsg[7]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion || ($opcion==$op_modificacion && $idusuario==1)){?>
+ <TD><INPUT type=hidden class=cajatexto name="nombre" style="width:250" value="<?php echo $nombre?>"></INPUT><?php echo $nombre?></TD>
+ <?php }else{?>
+ <TD><INPUT type=text class=cajatexto name="nombre" style="width:250" value="<?php echo $nombre?>">
+ <?php }?>
</TR>
<!-------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH>&nbsp;<?echo $TbMsg[8]?>&nbsp;</TH>
- <?if ($opcion==$op_eliminacion){?>
- <TD><?echo $email?></TD>
- <?}else{?>
- <TD><INPUT type=text class=cajatexto name="email" style="width:250" value="<? echo $email?>">
- <?}?>
+ <TH>&nbsp;<?php echo $TbMsg[8]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion){?>
+ <TD><?php echo $email?></TD>
+ <?php }else{?>
+ <TD><INPUT type=text class=cajatexto name="email" style="width:250" value="<?php echo $email?>">
+ <?php }?>
</TR>
<!--------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
- <TH>&nbsp;<?echo $TbMsg[10]?>&nbsp;</TH>
- <?if ($opcion==$op_eliminacion){?>
- <TD><? echo TomaDato($cmd,0,"idiomas",$ididioma,"ididioma","descripcion")?></TD>
- <?}else{?>
- <TD><? echo HTMLSELECT($cmd,0,"idiomas",$ididioma,"ididioma","descripcion",100)?></TD>
- <?}?>
+ <TH>&nbsp;<?php echo $TbMsg[10]?>&nbsp;</TH>
+ <?php if ($opcion==$op_eliminacion){?>
+ <TD><?php echo TomaDato($cmd,0,"idiomas",$ididioma,"ididioma","descripcion")?></TD>
+ <?php }else{?>
+ <TD><?php echo HTMLSELECT($cmd,0,"idiomas",$ididioma,"ididioma","descripcion",100)?></TD>
+ <?php }?>
</TR>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
+ <?php if ($opcion!=$op_eliminacion){?>
+ <TR>
+ <TH>&nbsp;<?php echo $TbMsg['APIKEY']?>&nbsp;</TH>
+ <?php // Opcion nuevo usuario
+ if ($opcion == 1) {?>
+ <TD><?php echo $TbMsg['NEWAPIKEY']?></TD>
+ <?php } else { ?>
+ <TD><?php echo $apikey?></TD>
+ <?php }?>
+ </TR>
+ <?php }?>
+
+<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
+
</TABLE>
</FORM>
</DIV>
@@ -138,18 +163,17 @@ switch($idtipousuario){
if ($idusuario==1){
///*
- echo '<TABLE id=tabla_conf align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos>';
- echo '<TR>';
- echo '</TR>';
- echo '<div onclick=window.open("http://opengnsys.es/wiki/ModificarUsuarios")><TR>';
- echo '<TH align=center >&nbsp;'.$TbMsg[14].$TbMsg[15].$TbMsg[16].$TbMsg[17].'<a color=white href='.$TbMsg[17].' target=blank></a></br>'.$nombreambito.$TbMsg[23].'</br>'.$TbMsg[24].'&nbsp;</TH>';
- echo '</TR></div>';
- echo '</TABLE>';
+ echo '<table id="tabla_conf" align="center" border="0" cellPadding="5" cellspacing="1" class="tabla_datos">';
+ echo '<tr>';
+ echo '<th align="center">&nbsp;'.$TbMsg[14].$TbMsg[15].'<a style="color:white" href="'.$TbMsg[17].'" target="_blank">'.$TbMsg[16].'</a>&nbsp;</th>';
+ echo '</tr>';
+ echo '</table>';
+ echo '<p>';
//*/
}
?>
-<?
+<?php
if ($opcion==$op_eliminacion && $idusuario==1)
{}else{
//________________________________________________________________________________________________________
@@ -159,7 +183,7 @@ include_once("../includes/opcionesbotonesop.php");
?>
</BODY>
</HTML>
-<?
+<?php
//________________________________________________________________________________________________________
// Recupera los datos de un usuario
// Parametros:
@@ -168,10 +192,9 @@ include_once("../includes/opcionesbotonesop.php");
//________________________________________________________________________________________________________
function TomaPropiedades($cmd,$id){
global $usuario;
- global $pasguor;
global $nombre;
global $email;
- global $idambito;
+ global $apikey;
global $ididioma;
global $idtipousuario;
@@ -182,10 +205,9 @@ function TomaPropiedades($cmd,$id){
$rs->Primero();
if (!$rs->EOF){
$usuario=$rs->campos["usuario"];
- $pasguor=$rs->campos["pasguor"];
$nombre=$rs->campos["nombre"];
$email=$rs->campos["email"];
- $idambito=$rs->campos["idambito"];
+ $apikey=$rs->campos["apikey"];
$ididioma=$rs->campos["ididioma"];
$idtipousuario=$rs->campos["idtipousuario"];
$rs->Cerrar();
diff --git a/admin/WebConsole/rest/common.php b/admin/WebConsole/rest/common.php
new file mode 100644
index 00000000..8d192035
--- /dev/null
+++ b/admin/WebConsole/rest/common.php
@@ -0,0 +1,292 @@
+<?php
+/**
+ * @file index.php
+ * @brief OpenGnsys REST API: common functions and routes
+ * @warning All input and output messages are formatted in JSON.
+ * @note Some ideas are based on article "How to create REST API for Android app using PHP, Slim and MySQL" by Ravi Tamada, thanx.
+ * @license GNU GPLv3+
+ * @author Ramón M. Gómez, ETSII Univ. Sevilla
+ * @version 1.1.0 - First version
+ * @date 2016-11-17
+ */
+
+
+// Common constants.
+define('REST_LOGFILE', '/opt/opengnsys/log/rest.log');
+
+// Set time zone.
+if (function_exists("date_default_timezone_set")) {
+ if (exec("timedatectl status | awk '/Time zone/ {print $3}'", $out, $err)) {
+ date_default_timezone_set($out[0]);
+ }
+}
+
+// Common functions.
+
+/**
+ * @brief Function to write a line into log file.
+ * @param string message Message to log.
+ * warning Line format: "Date: ClientIP: UserId: Status: Method Route: Message"
+ */
+function writeRestLog($message = "") {
+ global $userid;
+ if (is_writable(REST_LOGFILE)) {
+ $app = \Slim\Slim::getInstance();
+ file_put_contents(REST_LOGFILE, date(DATE_ISO8601) .": " .
+ $_SERVER['REMOTE_ADDR'] . ": " .
+ (isset($userid) ? $userid : "-") . ": " .
+ $app->response->getStatus() . ": " .
+ $app->request->getMethod() . " " .
+ $app->request->getPathInfo() . ": $message\n",
+ FILE_APPEND);
+ }
+}
+
+/**
+ * @brief Compose JSON response.
+ * @param int status Status code for HTTP response.
+ * @param array response Response data.
+ * @param int opts Options to encode JSON data.
+ * @return string JSON response.
+ */
+function jsonResponse($status, $response, $opts=0) {
+ $app = \Slim\Slim::getInstance();
+ // HTTP status code.
+ $app->status($status);
+ // Content-type HTTP header.
+ $app->contentType('application/json; charset=utf-8');
+ // JSON response.
+ echo json_encode($response, $opts);
+}
+
+/**
+ * @brief Print immediately JSON response to continue processing.
+ * @param int status Status code for HTTP response.
+ * @param array response Response data.
+ * @param int opts Options to encode JSON data.
+ * @return string JSON response.
+ */
+function jsonResponseNow($status, $response, $opts=0) {
+ // Flush buffer.
+ ob_end_clean();
+ ob_end_flush();
+ header("Connection: close");
+ // Compose headers and content.
+ http_response_code((int)$status);
+ header('Content-type: application/json; charset=utf-8');
+ ignore_user_abort();
+ ob_start();
+ echo json_encode($response, $opts);
+ $size = ob_get_length();
+ header("Content-Length: $size");
+ // Print content.
+ ob_end_flush();
+ flush();
+ session_write_close();
+}
+
+/**
+ * @brief Validate API key included in "Authorization" HTTP header.
+ * @return JSON response on error.
+ */
+function validateApiKey() {
+ global $cmd;
+ global $userid;
+ $response = array();
+ $app = \Slim\Slim::getInstance();
+ // Read Authorization HTTP header.
+ if (! empty($_SERVER['HTTP_AUTHORIZATION'])) {
+ // Assign user id. that match this key to global variable.
+ $apikey = htmlspecialchars($_SERVER['HTTP_AUTHORIZATION']);
+ $cmd->texto = "SELECT idusuario
+ FROM usuarios
+ WHERE apikey='$apikey' LIMIT 1";
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if ($rs->Abrir()) {
+ $rs->Primero();
+ if (!$rs->EOF){
+ // Fetch user id.
+ $userid = $rs->campos["idusuario"];
+ } else {
+ // Credentials error.
+ $response['message'] = 'Login failed. Incorrect credentials';
+ jsonResponse(401, $response);
+ $app->stop();
+ }
+ $rs->Cerrar();
+ } else {
+ // Database error.
+ $response['message'] = "An error occurred, please try again";
+ jsonResponse(500, $response);
+ }
+ } else {
+ // Error: missing API key.
+ $response['message'] = 'Missing API key';
+ jsonResponse(400, $response);
+ $app->stop();
+ }
+}
+
+/**
+ * @brief Check if parameter is set and print error messages if empty.
+ * @param string param Parameter to check.
+ * @return boolean "false" if parameter is null, otherwise "true".
+ */
+function checkParameter($param) {
+ if (isset($param)) {
+ return true;
+ } else {
+ // Print error message.
+ $response['message'] = 'Parameter not found';
+ jsonResponse(400, $response);
+ return false;
+ }
+}
+
+/**
+ * @brief Check if all parameters are positive integer numbers.
+ * @param int id ... Identificators to check (variable number of parameters).
+ * @return boolean "true" if all ids are int>0, otherwise "false".
+ */
+function checkIds() {
+ $opts = Array('options' => Array('min_range' => 1)); // Check for int>0
+ foreach (func_get_args() as $id) {
+ if (filter_var($id, FILTER_VALIDATE_INT, $opts) === false) {
+ return false;
+ }
+ }
+ return true;
+}
+
+/**
+ * @fn sendCommand($serverip, $serverport, $reqframe, &$values)
+ * @brief Send a command to an OpenGnsys ogAdmServer and get request.
+ * @param string serverip Server IP address.
+ * @param string serverport Server port.
+ * @param string reqframe Request frame (field's separator is "\r").
+ * @param array values Response values (out parameter).
+ * @return boolean "true" if success, otherwise "false".
+ */
+function sendCommand($serverip, $serverport, $reqframe, &$values) {
+ global $LONCABECERA;
+ global $LONHEXPRM;
+
+ // Connect to server.
+ $respvalues = "";
+ $connect = new SockHidra($serverip, $serverport);
+ if ($connect->conectar()) {
+ // Send request frame to server.
+ $result = $connect->envia_peticion($reqframe);
+ if ($result) {
+ // Parse request frame.
+ $respframe = $connect->recibe_respuesta();
+ $connect->desconectar();
+ $paramlen = hexdec(substr($respframe, $LONCABECERA, $LONHEXPRM));
+ $params = substr($respframe, $LONCABECERA+$LONHEXPRM, $paramlen);
+ // Fetch values and return result.
+ $values = extrae_parametros($params, "\r", '=');
+ return ($values);
+ } else {
+ // Return with error.
+ return (false);
+ }
+ } else {
+ // Return with error.
+ return (false);
+ }
+}
+
+/**
+ * @brief Show custom message for "not found" error (404).
+ */
+$app->notFound(function() {
+ echo "REST route not found.";
+ }
+);
+
+/**
+ * @brief Hook to write a REST init log message, if debug is enabled.
+ * @warning Message will be written in REST log file.
+ */
+$app->hook('slim.before', function() use ($app) {
+ if ($app->settings['debug'])
+ writeRestLog("Init.");
+ }
+);
+
+/**
+ * @brief Hook to write an error log message and a REST exit log message if debug is enabled.
+ * @warning Error message will be written in web server's error file.
+ * @warning REST message will be written in REST log file.
+ */
+$app->hook('slim.after', function() use ($app) {
+ if ($app->response->getStatus() != 200 ) {
+ // Compose error message (truncating long lines).
+ $app->log->error(date(DATE_ISO8601) . ': ' .
+ $app->getName() . ': ' .
+ $_SERVER['REMOTE_ADDR'] . ": " .
+ (isset($userid) ? $userid : "-") . ": " .
+ $app->response->getStatus() . ': ' .
+ $app->request->getMethod() . ' ' .
+ $app->request->getPathInfo() . ': ' .
+ substr($app->response->getBody(), 0, 100));
+ }
+ if ($app->settings['debug'])
+ writeRestLog("Exit.");
+ }
+);
+
+
+// Common routes.
+
+/**
+ * @brief Get general server information
+ * @note Route: /info, Method: GET
+ * @param no
+ * @return JSON object with basic server information (version, services, etc.)
+ */
+$app->get('/info', function() {
+ // Reading version file.
+ @list($project, $version, $release) = explode(' ', file_get_contents('/opt/opengnsys/doc/VERSION.txt'));
+ $response['project'] = trim($project);
+ $response['version'] = trim($version);
+ $response['release'] = trim($release);
+ // Getting actived services.
+ @$services = parse_ini_file('/etc/default/opengnsys');
+ $response['services'] = Array();
+ if (@$services["RUN_OGADMSERVER"] === "yes") {
+ array_push($response['services'], "server");
+ $hasOglive = true;
+ }
+ if (@$services["RUN_OGADMREPO"] === "yes") array_push($response['services'], "repository");
+ if (@$services["RUN_BTTRACKER"] === "yes") array_push($response['services'], "tracker");
+ // Reading installed ogLive information file.
+ if ($hasOglive === true) {
+ $data = json_decode(@file_get_contents('/opt/opengnsys/etc/ogliveinfo.json'));
+ if (isset($data->oglive)) {
+ $response['oglive'] = $data->oglive;
+ }
+ }
+ jsonResponse(200, $response);
+ }
+);
+
+/**
+ * @brief Get the server status
+ * @note Route: /status, Method: GET
+ * @param no
+ * @return JSON object with all data collected from server status (RAM, %CPU, etc.).
+ */
+$app->get('/status', function() {
+ // Getting memory and CPU information.
+ exec("awk '$1~/Mem/ {print $2}' /proc/meminfo",$memInfo);
+ $memInfo = array("total" => $memInfo[0], "used" => $memInfo[1]);
+ $cpuInfo = exec("awk '$1==\"cpu\" {printf \"%.2f\",($2+$4)*100/($2+$4+$5)}' /proc/stat");
+ $cpuModel = exec("awk -F: '$1~/model name/ {print $2}' /proc/cpuinfo");
+ $response["memInfo"] = $memInfo;
+ $response["cpu"] = array("model" => trim($cpuModel), "usage" => $cpuInfo);
+ jsonResponse(200, $response);
+ }
+);
+?>
diff --git a/admin/WebConsole/rest/index.php b/admin/WebConsole/rest/index.php
new file mode 100644
index 00000000..51f00dec
--- /dev/null
+++ b/admin/WebConsole/rest/index.php
@@ -0,0 +1,75 @@
+<?php
+/**
+ * @file index.php
+ * @brief OpenGnsys REST API manager.
+ * @warning All input and output messages are formatted in JSON.
+ * @note Some ideas are based on article "How to create REST API for Android app using PHP, Slim and MySQL" by Ravi Tamada, thanx.
+ * @license GNU GPLv3+
+ * @author Ramón M. Gómez, ETSII Univ. Sevilla
+ * @version 1.1
+ * @date 2016-05-19
+ */
+
+// Inclussion files.
+
+// Server access data.
+include_once("../controlacceso.php");
+include_once("../clases/AdoPhp.php");
+include_once("../includes/CreaComando.php");
+// Connection class.
+@include_once("../includes/constantes.php");
+include_once("../includes/comunes.php");
+include_once("../clases/SockHidra.php");
+// REST functions.
+@include_once("../includes/restfunctions.php");
+// Slim framework.
+include_once("Slim/Slim.php");
+\Slim\Slim::registerAutoloader();
+
+// Server access control.
+$cmd = CreaComando($cnx);
+if (!$cmd)
+ die("Access Error");
+
+// Install Slim application (development mode).
+//$app = new \Slim\Slim(array('mode' => 'production', ... );
+$app = new \Slim\Slim(array(
+ 'mode' => 'production',
+ 'log.enabled' => true,
+ 'log.level' => \Slim\Log::ERROR,
+ 'debug' => false));
+$app->setName('opengnsys');
+
+// Global variables.
+$userid = NULL; // User id. with access to REST API.
+
+// Common funtions and routes.
+include("common.php");
+
+// Check if services are running.
+$config = parse_ini_file("/etc/default/opengnsys");
+
+// If server is running, include its routes and OGAgent push routes.
+if ($config['RUN_OGADMSERVER'] === "yes") {
+ include("server.php");
+ include("ogagent.php");
+ include("remotepc.php");
+}
+
+// If repository is running, include its routes.
+if ($config['RUN_OGADMREPO'] === "yes") {
+ include("repository.php");
+}
+
+// Showing API information page using Swagger-UI.
+$app->get('/',
+ function() use ($app) {
+ $app->response->redirect('swagger-ui/index.html?url=../../opengnsys-api.yml');
+ }
+);
+
+
+// Execute REST using Slim.
+$app->run();
+
+?>
diff --git a/admin/WebConsole/rest/ogagent.php b/admin/WebConsole/rest/ogagent.php
new file mode 100644
index 00000000..65c6cf64
--- /dev/null
+++ b/admin/WebConsole/rest/ogagent.php
@@ -0,0 +1,272 @@
+<?php
+/**
+ * @file ogagent.php
+ * @brief OpenGnsys REST routes for OGAgent communications.
+ * @warning All input and output messages are formatted in JSON.
+ * @note Some ideas are based on article "How to create REST API for Android app using PHP, Slim and MySQL" by Ravi Tamada, thanx.
+ * @license GNU GPLv3+
+ * @author Ramón M. Gómez, ETSII Univ. Sevilla
+ * @version 1.1.0 - First version
+ * @date 2016-10-03
+ */
+
+
+// OGAgent sessions log file.
+define('LOG_FILE', '/opt/opengnsys/log/ogagent.log');
+
+// Function to write a line into log file.
+function writeLog($message = "") {
+ file_put_contents(LOG_FILE, date(DATE_ISO8601).": $message\n", FILE_APPEND);
+}
+
+/**
+ * @brief OGAgent notifies that its service is started on a client.
+ * @note Route: /ogagent/started, Method: POST, Format: JSON
+ * @param string ip IP address
+ * @param string mac MAC (Ethernet) address
+ * @param string ostype OS type (Linux, Windows, macOS)
+ * @param string osversion OS version
+ * @param string secret random secret key to access client's REST API
+ * @return Null string if OK, else error message.
+ */
+$app->post('/ogagent/started',
+ function() use ($app) {
+ global $cmd;
+ $osType = $osVersion = "none";
+ try {
+ // Reading POST parameters in JSON format.
+ $input = json_decode($app->request()->getBody());
+ $ip = htmlspecialchars($input->ip);
+ $mac = htmlspecialchars($input->mac);
+ if (isset($input->ostype)) $osType = htmlspecialchars($input->ostype);
+ if (isset($input->osversion)) $osVersion = str_replace(",", ";", htmlspecialchars($input->osversion));
+ // Check sender agent type and IP address consistency (same as parameter value).
+ if (empty(preg_match('/^python-requests\//', $_SERVER['HTTP_USER_AGENT'])) or $ip !== $_SERVER['REMOTE_ADDR']) {
+ throw new Exception("Bad OGAgent: ip=$ip, sender=".$_SERVER['REMOTE_ADDR'].", agent=".$_SERVER['HTTP_USER_AGENT']);
+ }
+ // Client secret key for secure communications.
+ if (isset($input->secret)) {
+ // Check if secret key is valid (32 alphanumeric characters).
+ if (! ctype_alnum($input->secret) or strlen($input->secret) !== 32) {
+ throw new Exception("Bad secret key: ip=$ip, mac=$mac, os=$osType:$osVersion.");
+ }
+ // Store secret key in DB.
+ if (isset($input->secret)) $secret = htmlspecialchars($input->secret);
+ $cmd->texto = <<<EOD
+UPDATE ordenadores
+ SET agentkey='$secret'
+ WHERE ip='$ip' AND mac=UPPER(REPLACE('$mac', ':', ''))
+ LIMIT 1;
+EOD;
+ if ($cmd->Ejecutar() !== true or mysql_affected_rows() !== 1) {
+ // DB access error or not updated.
+ throw new Exception("Cannot store new secret key: ip=$ip, mac=$mac, os=$osType:$osVersion.");
+ }
+ } else {
+ // Insecure agent exception.
+ throw new Exception("Insecure OGAgent started: ip=$ip, mac=$mac, os=$osType:$osVersion.");
+ }
+ // Default processing: log activity.
+ writeLog("OGAgent started: ip=$ip, mac=$mac, os=$osType:$osVersion.");
+ // Response.
+ $response = "";
+ jsonResponse(200, $response);
+ } catch (Exception $e) {
+ // Communication error.
+ $response["message"] = $e->getMessage();
+ writeLog($app->request()->getResourceUri().": ERROR: ".$response["message"]);
+ jsonResponse(400, $response);
+ }
+ }
+);
+
+/**
+ * @brief OGAgent notifies that its service is stopped on client.
+ * @note Route: /ogagent/stopped, Method: POST, Format: JSON
+ * @param string ip IP address
+ * @param string mac MAC (Ethernet) address
+ * @param string ostype OS type (Linux, Windows, macOS)
+ * @param string osversion OS version
+ * @return Null string if OK, else error message.
+ */
+$app->post('/ogagent/stopped',
+ function() use ($app) {
+ $osType = $osVersion = "none";
+ try {
+ // Reading POST parameters in JSON format.
+ $input = json_decode($app->request()->getBody());
+ $ip = htmlspecialchars($input->ip);
+ $mac = htmlspecialchars($input->mac);
+ if (isset($input->ostype)) $osType = htmlspecialchars($input->ostype);
+ if (isset($input->osversion)) $osVersion = str_replace(",", ";", htmlspecialchars($input->osversion));
+ // Check sender agent type and IP address consistency (same as parameter value).
+ if (empty(preg_match('/^python-requests\//', $_SERVER['HTTP_USER_AGENT'])) or $ip !== $_SERVER['REMOTE_ADDR']) {
+ throw new Exception("Bad OGAgent: ip=$ip, sender=".$_SERVER['REMOTE_ADDR'].", agent=".$_SERVER['HTTP_USER_AGENT']);
+ }
+ // May check if client is included in the server database?
+ // Default processing: log activity.
+ writeLog("OGAgent stopped: ip=$ip, mac=$mac, os=$osType:$osVersion.");
+ // Response.
+ $response = "";
+ jsonResponse(200, $response);
+ } catch (Exception $e) {
+ // Communication error.
+ $response["message"] = $e->getMessage();
+ writeLog($app->request()->getResourceUri().": ERROR: ".$response["message"]);
+ jsonResponse(400, $response);
+ }
+ }
+);
+
+/**
+ * @brief OGAgent notifies that an user logs in.
+ * @note Route: /ogagent/loggedin, Method: POST, Format: JSON
+ * @param string ip IP address
+ * @param string user username
+ * @param string language session language
+ * @param string ostype OS type (Linux, Windows, macOS)
+ * @param string osversion OS version
+ * @return Null string if OK, else error message.
+ */
+$app->post('/ogagent/loggedin',
+ function() use ($app) {
+ global $cmd;
+ $redirto = Array();
+ $result = Array();
+
+ try {
+ // Reading POST parameters in JSON format.
+ $input = json_decode($app->request()->getBody());
+ $ip = htmlspecialchars($input->ip);
+ $user = htmlspecialchars($input->user);
+ $language = isset($input->language) ? substr($input->language, 0, strpos($input->language, "_")) : "";
+ if (isset($input->ostype)) $osType = htmlspecialchars($input->ostype);
+ if (isset($input->osversion)) $osVersion = str_replace(",", ";", htmlspecialchars($input->osversion));
+ // Check sender IP address consistency (same as parameter value).
+ if (empty(preg_match('/^python-requests\//', $_SERVER['HTTP_USER_AGENT'])) or $ip !== $_SERVER['REMOTE_ADDR']) {
+ throw new Exception("Bad OGAgent: ip=$ip, sender=".$_SERVER['REMOTE_ADDR'].", agent=".$_SERVER['HTTP_USER_AGENT']);
+ }
+ // Check if client is included in the server database.
+ $cmd->CreaParametro("@ip", $ip, 0);
+ $cmd->texto = <<<EOD
+SELECT ordenadores.idordenador, ordenadores.nombreordenador, remotepc.urllogin,
+ remotepc.reserved > NOW() AS reserved
+ FROM remotepc
+ RIGHT JOIN ordenadores ON remotepc.id=ordenadores.idordenador
+ WHERE ordenadores.ip=@ip
+ LIMIT 1;
+EOD;
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if ($rs->Abrir()) {
+ // Read query data.
+ $rs->Primero();
+ $id = $rs->campos['idordenador'];
+ $redirto[0]['url'] = $rs->campos['urllogin'];
+ $reserved = $rs->campos['reserved'];
+ $rs->Cerrar();
+ if (!is_null($id)) {
+ // Log activity, respond to client and continue processing.
+ writeLog("User logged in: ip=$ip, user=$user, lang=$language, os=$osType:$osVersion.");
+ $response = "";
+ jsonResponseNow(200, $response);
+ } else {
+ throw new Exception("Client is not in the database: ip=$ip, user=$user");
+ }
+ // Redirect notification to UDS server, if needed.
+ if ($reserved == 1 and !is_null($redirto[0]['url'])) {
+ $redirto[0]['get'] = $app->request()->getBody();
+ $result = multiRequest($redirto);
+ // ... (check response)
+ //if ($result[0]['code'] != 200) {
+ // ...
+ // Updating user's session language for messages.
+ $cmd->texto = <<<EOD
+UPDATE remotepc
+ SET language = '$language'
+ WHERE id = '$id';
+EOD;
+ $cmd->Ejecutar();
+ }
+ } else {
+ throw new Exception("Database error");
+ }
+ } catch (Exception $e) {
+ // Communication error.
+ $response["message"] = $e->getMessage();
+ writeLog($app->request()->getResourceUri().": ERROR: ".$response["message"]);
+ jsonResponse(400, $response);
+ }
+ }
+);
+
+/**
+ * @brief OGAgent notifies that an user logs out.
+ * @note Route: /ogagent/loggedout, Method: POST, Format: JSON
+ * @param string ip IP address
+ * @param string user username
+ * @return Null string if OK, else error message.
+ */
+$app->post('/ogagent/loggedout',
+ function() use ($app) {
+ global $cmd;
+ $redirto = Array();
+ $result = Array();
+
+ try {
+ // Reading POST parameters in JSON format.
+ $input = json_decode($app->request()->getBody());
+ $ip = htmlspecialchars($input->ip);
+ $user = htmlspecialchars($input->user);
+ // Check sender agent type and IP address consistency (same as parameter value).
+ if (empty(preg_match('/^python-requests\//', $_SERVER['HTTP_USER_AGENT'])) or $ip !== $_SERVER['REMOTE_ADDR']) {
+ throw new Exception("Bad OGAgent: ip=$ip, sender=".$_SERVER['REMOTE_ADDR'].", agent=".$_SERVER['HTTP_USER_AGENT']);
+ }
+ // Check if client is included in the server database.
+ $cmd->CreaParametro("@ip", $ip, 0);
+ $cmd->texto = <<<EOD
+SELECT ordenadores.idordenador, ordenadores.nombreordenador, remotepc.urllogout,
+ remotepc.reserved > NOW() AS reserved
+ FROM remotepc
+ RIGHT JOIN ordenadores ON remotepc.id=ordenadores.idordenador
+ WHERE ordenadores.ip=@ip
+ LIMIT 1;
+EOD;
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if ($rs->Abrir()) {
+ // Read query data.
+ $rs->Primero();
+ $id = $rs->campos['idordenador'];
+ $redirto[0]['url'] = $rs->campos['urllogout'];
+ $reserved = $rs->campos['reserved'];
+ $rs->Cerrar();
+ if (!is_null($id)) {
+ // Log activity, respond to client and continue processing.
+ writeLog("User logged out: ip=$ip, user=$user.");
+ $response = "";
+ jsonResponseNow(200, $response);
+ } else {
+ throw new Exception("Client is not in the database: ip=$ip, user=$user");
+ }
+ // Redirect notification to UDS server, if needed.
+ if ($reserved == 1 and !is_null($redirto[0]['url'])) {
+ $redirto[0]['get'] = $app->request()->getBody();
+ $result = multiRequest($redirto);
+ // ... (check response)
+ //if ($result[0]['code'] != 200) {
+ // ...
+ }
+ } else {
+ throw new Exception("Database error");
+ }
+ } catch (Exception $e) {
+ // Communication error.
+ $response["message"] = $e->getMessage();
+ writeLog($app->request()->getResourceUri().": ERROR: ".$response["message"]);
+ jsonResponse(400, $response);
+ }
+ }
+);
+
+?>
diff --git a/admin/WebConsole/rest/opengnsys-api.yml b/admin/WebConsole/rest/opengnsys-api.yml
new file mode 100644
index 00000000..0c9575a2
--- /dev/null
+++ b/admin/WebConsole/rest/opengnsys-api.yml
@@ -0,0 +1,1300 @@
+swagger: '2.0'
+
+info:
+ version: "1.1.0"
+ title: OpenGnsys REST API definition
+ description: |
+ Information about the OpenGnsys REST API functions (including Server and
+ Repository Manager).
+ contact:
+ name: OpenGnsys Project
+ url: https://opengnsys.es/
+ license:
+ name: Creative Commons 4.0 International
+ url: http://creativecommons.org/licenses/by/4.0/
+basePath: /opengnsys/rest
+schemes:
+ - https
+consumes:
+ - application/json
+produces:
+ - application/json
+securityDefinitions:
+ apikey:
+ type: apiKey
+ name: Authorization
+ in: header
+# Paths description.
+paths:
+ /login:
+ post:
+ description: Check user login and returns his/her API key.
+ parameters:
+ - in: body
+ name: authdata
+ description: JSON authentication data
+ required: true
+ schema:
+ type: object
+ properties:
+ username:
+ type: string
+ password:
+ type: string
+ format: password
+ responses:
+ "200":
+ description: Successful login
+ schema:
+ type: object
+ properties:
+ userid:
+ type: integer
+ description: user identificator
+ format: int32
+ apikey:
+ description: API key to include in ``Authorization`` header
+ type: string
+ "400":
+ description: Missing parameters
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
+ "500":
+ description: Authentication error
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
+ tags:
+ - server
+ - user
+ /info:
+ get:
+ description: Gets OpenGnsys Server information
+ responses:
+ "200":
+ description: Successful response
+ schema:
+ type: object
+ properties:
+ project:
+ description: project name (OpenGnsys)
+ type: string
+ version:
+ description: project version
+ type: string
+ release:
+ description: project release
+ type: string
+ services:
+ description: actived services
+ type: array
+ items:
+ type: string
+ enum: [ 'server', 'repository', 'tracker' ]
+ oglive:
+ description: installed ogLive clients
+ type: array
+ items:
+ type: object
+ properties:
+ distribution:
+ description: base distribution
+ type: string
+ kernel:
+ description: kernel version
+ type: string
+ architecture:
+ description: kernel architecture (32-bit or 64-bit)
+ type: string
+ enum: [ "i386", "amd64" ]
+ revision:
+ description: OpenGnsys revision
+ type: string
+ directory:
+ description: installation directory
+ type: string
+ iso:
+ description: ISO file
+ type: string
+ required: [ distribution, kernel, architecture, revision, directory, iso ]
+ required: [ project, version, release, services ]
+ tags:
+ - server
+ - repository
+ /status:
+ get:
+ description: Gets OpenGnsys Server status information
+ responses:
+ "200":
+ description: Successful response
+ schema:
+ type: object
+ properties:
+ memInfo:
+ description: memory information
+ properties:
+ total:
+ description: total amount of memory
+ type: integer
+ format: int64
+ used:
+ description: amount of used memory
+ type: integer
+ format: int64
+ required: [ total, used ]
+ cpu:
+ description: CPU information
+ properties:
+ model:
+ description: processor model
+ type: string
+ usage:
+ description: average of processor load
+ type: number
+ format: float
+ required: [ model, usage ]
+ required: [ memInfo, cpu ]
+ tags:
+ - server
+ /ous:
+ get:
+ description: Gets all `OU` objects.
+ responses:
+ "200":
+ description: Successful response
+ schema:
+ type: array
+ items:
+ type: object
+ properties:
+ id:
+ type: integer
+ description: Organization Unit identificator
+ format: int32
+ minimum: 1
+ name:
+ type: string
+ description: Organization Unit name
+ required: [ id, name ]
+ tags:
+ - server
+ - ou
+ /ous/{ouid}:
+ get:
+ description: Get an `OU` object.
+ parameters:
+ - $ref: "#/parameters/ouParam"
+ responses:
+ "200":
+ description: Successful response
+ schema:
+ type: object
+ properties:
+ id:
+ type: integer
+ description: OU identificator
+ name:
+ type: string
+ description: OU name
+ description:
+ type: string
+ description: OU description
+ required: [ id, name, description ]
+ security:
+ - apikey: []
+ tags:
+ - server
+ - ou
+ /ous/{ouid}/groups:
+ get:
+ description: Get all group of labs defined in an `OU` object.
+ parameters:
+ - $ref: "#/parameters/ouParam"
+ responses:
+ "200":
+ description: Successful response
+ schema:
+ type: array
+ items:
+ type: object
+ properties:
+ id:
+ description: group identificator
+ type: integer
+ format: int32
+ name:
+ description: group name
+ type: string
+ type:
+ description: group type
+ type: integer
+ comments:
+ description: extra comments
+ type: string
+ parent:
+ description: parent group
+ type: object
+ properties:
+ id:
+ description: parent group identificator
+ type: integer
+ format: int32
+ required: [ id, name, comments ]
+ security:
+ - apikey: []
+ tags:
+ - server
+ - ou
+ /ous/{ouid}/labs:
+ get:
+ description: Get all `lab` objects defined in an `OU`.
+ parameters:
+ - $ref: "#/parameters/ouParam"
+ responses:
+ "200":
+ description: Successful response
+ schema:
+ type: array
+ items:
+ type: object
+ properties:
+ id:
+ type: integer
+ description: laboratory identificator
+ format: int32
+ name:
+ type: string
+ description: laboratory name
+ inremotepc:
+ type: boolean
+ description: laboratory usable in Remote PC Project flag
+ group:
+ type: object
+ properties:
+ id:
+ description: group identificator
+ type: integer
+ format: int32
+ ou:
+ type: object
+ properties:
+ id:
+ description: OU identificator
+ type: integer
+ format: int32
+ required: [ id, name, inremotepc, ou ]
+ security:
+ - apikey: []
+ tags:
+ - server
+ - lab
+ /ous/{ouid}/labs/{labid}:
+ get:
+ description: Get a `lab` object.
+ parameters:
+ - $ref: "#/parameters/ouParam"
+ - $ref: "#/parameters/labParam"
+ responses:
+ "200":
+ description: Successful response
+ schema:
+ type: object
+ properties:
+ id:
+ description: laboratory identificator
+ type: integer
+ format: int32
+ name:
+ description: laboratory name
+ type: string
+ location:
+ description: laboratory location
+ type: string
+ description:
+ description: laboratory description
+ type: string
+ inremotepc:
+ description: check if this lab can be included in Remote PC Project
+ type: boolean
+ capacity:
+ description: maximum number of people in the lab
+ type: integer
+ format: int32
+ defclients:
+ description: number of defined clients in the lab
+ type: integer
+ format: int32
+ projector:
+ description: check if this lab has a projector
+ type: boolean
+ board:
+ description: check if this lab has an electronic board
+ type: boolean
+ routerip:
+ description: lab router IP address
+ type: string
+ netmask:
+ description: network mask to use in the lab
+ type: string
+ ntp:
+ description: NTP server IP address
+ type: string
+ dns:
+ description: DNS server IP address
+ type: string
+ proxyurl:
+ description: Proxy server URL
+ type: string
+ mcastmode:
+ description: Multicast protocol mode (full-duplex, half-duplex).
+ type: string
+ enum: [ "full-duplex", "half-duplex" ]
+ default: "full-duplex"
+ mcastip:
+ description: Multicast IP address
+ type: string
+ mcastport:
+ description: Multicast port
+ type: integer
+ format: int32
+ mcastspeed:
+ description: Multicast speed (in Mbps)
+ type: integer
+ format: int32
+ p2pmode:
+ description: Bittorrent connection type ("peer", "leecher". "seeder").
+ type: string
+ p2ptime:
+ description: Bittorrent connection extra time (in s.)
+ type: integer
+ format: int32
+ picture:
+ description: Lab's picture file
+ type: string
+ required: [ id, name, location, description, inremotepc, capacity, defclients, projector, board, routerip, netmask, mcastmode, mcastip, mcastport, mcastspeed, p2pmode, p2ptime, picture ]
+ security:
+ - apikey: []
+ tags:
+ - server
+ - lab
+ /ous/{ouid}/labs/{labid}/clients:
+ get:
+ description: Get all `client` objects defined in an `lab`.
+ parameters:
+ - $ref: "#/parameters/ouParam"
+ - $ref: "#/parameters/labParam"
+ responses:
+ "200":
+ description: Successful response
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/SelectedClientModel"
+ security:
+ - apikey: []
+ tags:
+ - server
+ - client
+ /ous/{ouid}/labs/{labid}/clients/status:
+ get:
+ description: Get execution status of all clients definied in a `lab`
+ parameters:
+ - $ref: "#/parameters/ouParam"
+ - $ref: "#/parameters/labParam"
+ responses:
+ "200":
+ description: Successful response
+ schema:
+ type: array
+ items:
+ $ref: "#/definitions/StatusModel"
+ security:
+ - apikey: []
+ tags:
+ - server
+ - client
+ /ous/{ouid}/labs/{labid}/clients/{clientid}:
+ get:
+ description: Get a `client` object.
+ parameters:
+ - $ref: "#/parameters/ouParam"
+ - $ref: "#/parameters/labParam"
+ - $ref: "#/parameters/clientParam"
+ responses:
+ "200":
+ description: Successful response
+ schema:
+ type: object
+ properties:
+ id:
+ description: client id
+ type: integer
+ format: int32
+ name:
+ description: client name
+ type: string
+ serialno:
+ description: client serial number
+ type: string
+ netiface:
+ description: main network interface
+ type: string
+ netdriver:
+ description: client MAC address (kernel module)
+ type: string
+ mac:
+ description: client MAC address
+ type: string
+ ip:
+ description: client IP address
+ type: string
+ netmask:
+ description: subnet mask address
+ type: string
+ routerip:
+ description: network router IP address
+ type: string
+ repo:
+ description: repository identification
+ type: object
+ properties:
+ id:
+ type: integer
+ format: int32
+ validation:
+ description: boot validation flag
+ type: boolean
+ boottype:
+ description: boot template type
+ type: string
+ picture:
+ description: client's picture file
+ type: string
+ required: [ id, name, serialno, netiface, netdriver, mac, ip, netmask, routerip, repo, validation, picture ]
+ security:
+ - apikey: []
+ tags:
+ - server
+ - client
+ /ous/{ouid}/labs/{labid}/clients/{clientid}/hardware:
+ get:
+ description: Get the hardware definition of a `client` object.
+ parameters:
+ - $ref: "#/parameters/ouParam"
+ - $ref: "#/parameters/labParam"
+ - $ref: "#/parameters/clientParam"
+ responses:
+ "200":
+ description: Successful response
+ schema:
+ type: object
+ properties:
+ id:
+ description: client id
+ type: integer
+ format: int32
+ name:
+ description: client name
+ type: string
+ hardware:
+ description: hardware components
+ type: array
+ items:
+ type: object
+ properties:
+ type:
+ description: hardware component type
+ type: string
+ description:
+ description: hardware component description
+ type: string
+ required: [ type, description ]
+ required: [ id, name, hardware ]
+ security:
+ - apikey: []
+ tags:
+ - server
+ - client
+ /ous/{ouid}/labs/{labid}/clients/{clientid}/diskcfg:
+ get:
+ description: Get disks configuration of a `client`
+ parameters:
+ - $ref: "#/parameters/ouParam"
+ - $ref: "#/parameters/labParam"
+ - $ref: "#/parameters/clientParam"
+ responses:
+ "200":
+ description: Successful response
+ schema:
+ type: object
+ properties:
+ id:
+ description: client id
+ type: integer
+ format: int32
+ name:
+ description: client name
+ type: string
+ diskcfg:
+ description: |
+ array of disk configuration data, including general disk information and
+ partition/filesystem information (if not specified in paratmeter
+ description, it is only valid in partition configuration).
+ type: array
+ items:
+ type: object
+ properties:
+ disk:
+ description: disk number
+ type: integer
+ format: int32
+ minimum: 1
+ size:
+ description: disk or partition size
+ type: integer
+ format: int64
+ parttable:
+ description: partition table type (only in disk configuration)
+ type: string
+ enum: [ "MSDOS", "GPT", "LVM", "ZVOL" ]
+ partition:
+ description: partition number (only in partition configuration)
+ type: integer
+ format: int32
+ minimum: 1
+ parttype:
+ description: partition type (only in partition configuration)
+ type: string
+ filesystem:
+ description: filesystem type (only in partition configuration)
+ type: string
+ usage:
+ description: percentage of data usage in a formated filesystem (only in partition configuration)
+ type: integer
+ format: int32
+ os:
+ description: installed operating system (only in partition configuration)
+ type: string
+ image:
+ description: restaured image data, if needed (only in partition configuration)
+ type: object
+ properties:
+ id:
+ type: integer
+ format: int32
+ deploydate:
+ description: image restauration/deploying date (only in partition configuration)
+ type: string
+ format: date-time
+ updated:
+ description: flag to check if the restaured image is updated (only in partition configuration)
+ type: boolean
+ required: [ id, name, diskcfg ]
+ security:
+ - apikey: []
+ tags:
+ - server
+ - client
+ /ous/{ouid}/labs/{labid}/clients/{clientid}/status:
+ get:
+ description: Get execution status of a `client`
+ parameters:
+ - $ref: "#/parameters/ouParam"
+ - $ref: "#/parameters/labParam"
+ - $ref: "#/parameters/clientParam"
+ responses:
+ "200":
+ description: Successful response
+ schema:
+ $ref: "#/definitions/StatusModel"
+ security:
+ - apikey: []
+ tags:
+ - server
+ - client
+ /ous/{ouid}/labs/{labid}/clients/{clientid}/events:
+ post:
+ description: Store UDS server URLs to resend some events recieved from OGAgent.
+ parameters:
+ - $ref: "#/parameters/ouParam"
+ - $ref: "#/parameters/labParam"
+ - $ref: "#/parameters/clientParam"
+ - name: data
+ in: body
+ description: Operation data
+ required: true
+ schema:
+ type: object
+ properties:
+ urlLogin:
+ description: URL to resend a login event.
+ type: string
+ urlLogout:
+ description: URL to resend a logout event.
+ type: string
+ required: [ urlLogin, urlLogout ]
+ responses:
+ "200":
+ description: Successful response
+ "400":
+ description: Error message
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
+ security:
+ - apikey: []
+ tags:
+ - server
+ - client
+ - remotepc
+ /ous/{ouid}/labs/{labid}/clients/{clientid}/session:
+ post:
+ description: Record session data for a client.
+ parameters:
+ - $ref: "#/parameters/ouParam"
+ - $ref: "#/parameters/labParam"
+ - $ref: "#/parameters/clientParam"
+ - name: data
+ in: body
+ description: Session parameters
+ required: true
+ schema:
+ type: object
+ properties:
+ logoutAt:
+ description: Time to send a logout operation to the client
+ type: string
+ format: date-time
+ responses:
+ "200":
+ description: Successful response
+ security:
+ - apikey: []
+ tags:
+ - server
+ - client
+ - remotepc
+ /ous/{ouid}/labs/{labid}/clients/{clientid}/unreserve:
+ delete:
+ description: Unreserve a client, clear its session data and send a poweroff operation.
+ parameters:
+ - $ref: "#/parameters/ouParam"
+ - $ref: "#/parameters/labParam"
+ - $ref: "#/parameters/clientParam"
+ responses:
+ "200":
+ description: Successful response
+ security:
+ - apikey: []
+ tags:
+ - server
+ - client
+ - remotepc
+ /ous/{ouid}/repos:
+ get:
+ description: Get all `repo` objects defined in an `OU`.
+ parameters:
+ - $ref: "#/parameters/ouParam"
+ responses:
+ "200":
+ description: Successful response
+ schema:
+ type: array
+ items:
+ type: object
+ properties:
+ id:
+ type: integer
+ format: int32
+ name:
+ type: string
+ ou:
+ type: object
+ properties:
+ id:
+ type: integer
+ format: int32
+ required: [ id, name, ou ]
+ security:
+ - apikey: []
+ tags:
+ - server
+ - repo
+ /ous/{ouid}/repos/{repoid}:
+ get:
+ description: Get a `repo` object.
+ parameters:
+ - $ref: "#/parameters/ouParam"
+ - $ref: "#/parameters/repoParam"
+ responses:
+ "200":
+ description: Successful response
+ schema:
+ type: object
+ properties:
+ id:
+ description: repository id
+ type: integer
+ format: int32
+ name:
+ description: repository name
+ type: string
+ description:
+ description: repository description
+ type: string
+ ip:
+ description: repository IP address
+ type: string
+ required: [ id, name, description, ip ]
+ security:
+ - apikey: []
+ tags:
+ - server
+ - repo
+ /ous/{ouid}/images:
+ get:
+ description: Get all `image` objects defined in an `OU`.
+ parameters:
+ - $ref: "#/parameters/ouParam"
+ responses:
+ "200":
+ description: Successful response
+ schema:
+ type: array
+ items:
+ type: object
+ properties:
+ id:
+ type: integer
+ format: int32
+ name:
+ type: string
+ inremotepc:
+ type: boolean
+ ou:
+ type: object
+ properties:
+ id:
+ type: integer
+ format: int32
+ required: [ id, name, inremotepc, ou ]
+ security:
+ - apikey: []
+ tags:
+ - server
+ - image
+ /ous/{ouid}/images/{imageid}:
+ get:
+ description: Get an `image` object.
+ parameters:
+ - $ref: "#/parameters/ouParam"
+ - $ref: "#/parameters/imageParam"
+ responses:
+ "200":
+ description: Successful response
+ schema:
+ type: object
+ properties:
+ id:
+ description: image id
+ type: integer
+ format: int32
+ name:
+ description: image name
+ type: string
+ description:
+ description: image description
+ type: string
+ comments:
+ description: extra comments
+ type: string
+ inremotepc:
+ description: image usable in Remote PC Project flag
+ type: boolean
+ repo:
+ description: repository identification
+ type: object
+ properties:
+ id:
+ type: integer
+ format: int32
+ type:
+ description: image type (``monolithic``, ``basic``, ``incremental``)
+ type: string
+ enum: [ "monolithic", "basic", "incremental" ]
+ default: "monolithic"
+ baseimg:
+ description: base image for an incremental image (if ``type`` is ``incremental``)
+ type: string
+ client:
+ description: model client's data
+ type: object
+ properties:
+ id:
+ description: model client's id.
+ type: integer
+ format: int32
+ disk:
+ description: source disk number
+ type: integer
+ format: int32
+ partition:
+ description: source partition number
+ type: integer
+ format: int32
+ required: [ id, disk, partition ]
+ creationdate:
+ description: image creation date
+ type: string
+ format: date-time
+ release:
+ description: image creation release
+ type: string
+ os:
+ description: installed operating system
+ type: string
+ required: [ id, name, description, comments, inremotepc, repo, type ]
+ security:
+ - apikey: []
+ tags:
+ - server
+ - image
+ /ous/{ouid}/images/{imageid}/software:
+ get:
+ description: Get software inventory store into an `image`
+ parameters:
+ - $ref: "#/parameters/ouParam"
+ - $ref: "#/parameters/imageParam"
+ responses:
+ "200":
+ description: Successful response
+ schema:
+ type: object
+ properties:
+ id:
+ description: image id
+ type: integer
+ format: int32
+ name:
+ description: image name
+ type: string
+ software:
+ description: software installed
+ type: object
+ properties:
+ os:
+ description: operating system
+ type: string
+ applications:
+ type: array
+ items:
+ description: list of applications (name and version)
+ type: string
+ required: [ id, name, software ]
+ security:
+ - apikey: []
+ tags:
+ - server
+ - image
+ /ous/{ouid}/images/{imageid}/reserve:
+ post:
+ description: |
+ Reserve a client with an installed image and send a boot/reboot operation.
+ If `labid` is specified, then choose a `client` defined in this lab.
+ parameters:
+ - $ref: "#/parameters/ouParam"
+ - $ref: "#/parameters/imageParam"
+ - in: body
+ name: data
+ description: Operation data
+ schema:
+ type: object
+ properties:
+ labid:
+ description: lab id filter (optional)
+ type: integer
+ format: int32
+ minimum: 1
+ maxtime:
+ description: maximum reservation time, in h. (optional, 24 h. by default)
+ type: integer
+ format: int32
+ minimum: 1
+ default: 24
+ responses:
+ "200":
+ description: Reserve a client to boot using an operating system image.
+ schema:
+ $ref: "#/definitions/SelectedClientModel"
+ security:
+ - apikey: []
+ tags:
+ - server
+ - image
+ - remotepc
+ /repository/images:
+ get:
+ description: Get information about images stored in a repository
+ responses:
+ "200":
+ description: Successful response
+ schema:
+ type: object
+ properties:
+ directory:
+ description: repository directory
+ type: string
+ images:
+ description: information about repository-global images
+ type: array
+ items:
+ $ref: "#/definitions/ImageModel"
+ ous:
+ description: OUs defined
+ type: array
+ items:
+ type: object
+ properties:
+ subdir:
+ description: OU subdirectory
+ type: string
+ images:
+ description: information about OU-based images
+ type: array
+ items:
+ $ref: "#/definitions/ImageModel"
+ disk:
+ description: repository disk information
+ type: object
+ properties:
+ total:
+ description: total disk space
+ type: string
+ used:
+ description: disk space used by files
+ type: string
+ free:
+ description: amount of free disk space
+ type: string
+ percent:
+ description: percentage of used space
+ type: string
+ required: [ total, used, free, percent ]
+ required: [ directory, images, ous, disk ]
+ security:
+ - apikey: []
+ tags:
+ - repository
+ - image
+ /repository/image/{ouname}/{imagename}:
+ get:
+ description: Get information about an specific image stored in the repository
+ parameters:
+ - in: path
+ name: ouname
+ description: OU name (optional)
+ required: false
+ type: string
+ - in: path
+ name: imagename
+ description: image name
+ required: true
+ type: string
+ responses:
+ "200":
+ description: Successful response
+ schema:
+ $ref: "#/definitions/ImageModel"
+ security:
+ - apikey: []
+ tags:
+ - repository
+ - image
+ /repository/poweron:
+ post:
+ description: send Wake-On-Lan notification to many clients
+ parameters:
+ - in: body
+ name: data
+ description: Operation data
+ required: true
+ schema:
+ type: object
+ properties:
+ macs:
+ type: array
+ items:
+ description: MAC (Ethernet) address
+ type: string
+ responses:
+ "200":
+ description: Successful response
+ schema:
+ type: object
+ properties:
+ output:
+ type: string
+ security:
+ - apikey: []
+ tags:
+ - repository
+ - client
+ /ogagent/started:
+ post:
+ description: Process push notification when OGAgent is started
+ parameters:
+ - in: body
+ name: data
+ description: Operation data
+ required: true
+ schema:
+ type: object
+ properties:
+ ip:
+ type: string
+ mac:
+ type: string
+ ostype:
+ type: string
+ osversion:
+ type: string
+ secret:
+ type: string
+ responses:
+ "200":
+ description: Successful operation
+ "400":
+ description: An error has occurred
+ tags:
+ - server
+ - agent
+ /ogagent/stopped:
+ post:
+ description: Process push notification when OGAgent is stopped
+ parameters:
+ - in: body
+ name: data
+ description: Operation data
+ required: true
+ schema:
+ type: object
+ properties:
+ ip:
+ type: string
+ mac:
+ type: string
+ ostype:
+ type: string
+ osversion:
+ type: string
+ responses:
+ "200":
+ description: Successful operation
+ "400":
+ description: An error has occurred
+ tags:
+ - server
+ - agent
+ /ogagent/loggedin:
+ post:
+ description: Process push notification when an user logged in
+ parameters:
+ - in: body
+ name: data
+ description: Operation data
+ required: true
+ schema:
+ type: object
+ properties:
+ ip:
+ type: string
+ user:
+ type: string
+ language:
+ type: string
+ ostype:
+ type: string
+ osversion:
+ type: string
+ responses:
+ "200":
+ description: Successful operation
+ "400":
+ description: An error has occurred
+ tags:
+ - server
+ - agent
+ /ogagent/loggedout:
+ post:
+ description: Process push notification when an user is logged in
+ parameters:
+ - in: body
+ name: data
+ description: Operation data
+ required: true
+ schema:
+ type: object
+ properties:
+ ip:
+ type: string
+ user:
+ type: string
+ responses:
+ "200":
+ description: Successful operation
+ "400":
+ description: An error has occurred
+ tags:
+ - server
+ - agent
+parameters:
+ ouParam:
+ name: ouid
+ in: path
+ description: OU identificator
+ required: true
+ type: integer
+ minimum: 1
+ labParam:
+ name: labid
+ in: path
+ description: Lab identificator
+ required: true
+ type: integer
+ minimum: 1
+ clientParam:
+ name: clientid
+ in: path
+ description: Client identificator
+ required: true
+ type: integer
+ minimum: 1
+ repoParam:
+ name: repoid
+ in: path
+ description: repository identificator
+ required: true
+ type: integer
+ minimum: 1
+ imageParam:
+ name: imageid
+ in: path
+ description: image definition identificator
+ required: true
+ type: integer
+ minimum: 1
+definitions:
+ StatusModel:
+ type: object
+ properties:
+ id:
+ description: client id
+ type: integer
+ format: int32
+ minimum: 1
+ ip:
+ description: client IP address
+ type: string
+ status:
+ description: execution status
+ type: string
+ enum: [ "off", "oglive", "busy", "linux", "windows", "macos", "unknown" ]
+ loggedin:
+ description: flag to check if an user is logged in
+ type: boolean
+ required: [ id, ip, status ]
+ SelectedClientModel:
+ type: object
+ properties:
+ id:
+ description: client id
+ type: integer
+ format: int32
+ minimum: 1
+ name:
+ description: client name
+ type: string
+ mac:
+ description: client MAC address
+ type: string
+ ip:
+ description: client IP address
+ type: string
+ lab:
+ description: client's lab
+ type: object
+ properties:
+ id:
+ description: lab id
+ type: integer
+ format: int32
+ minimum: 1
+ required: [ id ]
+ ou:
+ description: client's OU
+ type: object
+ properties:
+ id:
+ description: OU id
+ type: integer
+ format: int32
+ minimum: 1
+ required: [ id ]
+ required: [ id, name, mac, ip, lab, ou ]
+ ImageModel:
+ type: object
+ properties:
+ name:
+ description: image name (file name without extension)
+ type: string
+ type:
+ description: image type (file extension or `dir` for directory image)
+ type: string
+ clientname:
+ description: source client name
+ type: string
+ clonator:
+ description: clonation program
+ type: string
+ compressor:
+ description: compression program
+ type: string
+ filesystem:
+ description: filesystem type
+ type: string
+ datasize:
+ description: data size (bytes)
+ type: integer
+ format: int64
+ size:
+ description: image size (bytes)
+ type: integer
+ format: int64
+ modified:
+ description: image modification date
+ type: string
+ format: date-time
+ mode:
+ description: image access permissions (four octal digits)
+ type: string
+ backedup:
+ description: image backed up flag (check if `.ant` file exists)
+ type: boolean
+ default: false
+ backupsize:
+ description: image backup size (bytes)
+ type: integer
+ format: int64
+ locked:
+ description: image locked flag (check if `.lock` file exists)
+ type: boolean
+ default: false
+ required: [ name, type, clientname, clonator, compressor, filesystem, datasize, size, modified, mode, backedup, locked ]
+
diff --git a/admin/WebConsole/rest/remotepc.php b/admin/WebConsole/rest/remotepc.php
new file mode 100644
index 00000000..98166391
--- /dev/null
+++ b/admin/WebConsole/rest/remotepc.php
@@ -0,0 +1,553 @@
+<?php
+/**
+ * @file remotepc.php
+ * @brief OpenGnsys Server REST API consumed by UDS Server for Remote PC implementation.
+ * @warning All input and output messages are formatted in JSON.
+ * @note Some ideas are based on article "How to create REST API for Android app using PHP, Slim and MySQL" by Ravi Tamada, thanx.
+ * @license GNU GPLv3+
+ * @author Ramón M. Gómez, ETSII Univ. Sevilla
+ * @version 1.1.0 - First version
+ * @date 2017-02-01
+ */
+
+// OGAgent sessions log file.
+define('REMOTEPC_LOGFILE', '/opt/opengnsys/log/remotepc.log');
+
+// Function to write a line into log file.
+function writeRemotepcLog($message = "") {
+ file_put_contents(REMOTEPC_LOGFILE, date(DATE_ISO8601).": $message\n", FILE_APPEND);
+}
+
+
+// REST routes.
+
+/**
+ * @brief Reserve a client with an installed image and the older reservation time, then send a boot/reboot operation depending on its status.
+ * @warning If "lab" parameter is specified, then choose a client from this lab.
+ * @note Route: /ous/:ouid/images/:imageid/reserve, Method: POST
+ * @param integer ouid OU identificator
+ * @param integer imageid image identificator
+ * @note Input JSON message: {"labid":int_labid,"maxtime":int_hours}
+ */
+$app->post('/ous/:ouid/images/:imageid/reserve(/)', 'validateApiKey',
+ function($ouid, $imageid) use ($app) {
+ global $cmd;
+ global $AMBITO_ORDENADORES;
+ global $EJECUCION_COMANDO;
+ global $ACCION_INICIADA;
+ global $ACCION_FINALIZADA;
+ global $ACCION_SINRESULTADO;
+ global $ACCION_FALLIDA;
+ global $userid;
+ $response = Array();
+ $ogagent = Array();
+
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). ": Init.");
+ // Checking parameters.
+ try {
+ if (empty(preg_match('/^python-requests\//', $_SERVER['HTTP_USER_AGENT']))) {
+ throw new Exception("Bad agent: sender=".$_SERVER['REMOTE_ADDR'].", agent=".$_SERVER['HTTP_USER_AGENT']);
+ }
+ if (!checkIds($ouid, $imageid)) {
+ throw new Exception("Ids. must be positive integers");
+ }
+ // Reading POST parameters in JSON format.
+ $input = json_decode($app->request()->getBody());
+ // Default: no lab. filter.
+ if (isset($input->labid)) {
+ $labid = $input->labid != "0" ? $input->labid : '%';
+ } else {
+ $labid = '%';
+ }
+ $maxtime = isset($input->maxtime) ? $input->maxtime : 24; // Default: 24 h.
+ $opts = Array('options' => Array('min_range' => 1)); // Check for int>0
+ if (filter_var($labid, FILTER_VALIDATE_INT, $opts) === false and $labid !== '%') {
+ throw new Exception("Lab id. must be positive integer");
+ }
+ if (filter_var($maxtime, FILTER_VALIDATE_INT, $opts) === false) {
+ throw new Exception("Time must be positive integer (in hours)");
+ }
+ } catch (Exception $e) {
+ // Communication error.
+ $response["message"] = $e->getMessage();
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). ": ERROR: ".$response["message"].".");
+ jsonResponse(400, $response);
+ $app->stop();
+ }
+
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). ": Parameters: labid=$labid, maxtime=$maxtime");
+ // Choose older not-reserved client with image installed and get ogAdmServer data.
+ $cmd->texto = <<<EOD
+SELECT adm.idadministradorcentro, entornos.ipserveradm, entornos.portserveradm,
+ ordenadores.idordenador, ordenadores.nombreordenador, ordenadores.ip,
+ ordenadores.mac, ordenadores.agentkey, ordenadores_particiones.numdisk,
+ ordenadores_particiones.numpar, aulas.idaula, aulas.idcentro
+ FROM entornos, ordenadores
+ JOIN aulas USING(idaula)
+ RIGHT JOIN administradores_centros AS adm USING(idcentro)
+ RIGHT JOIN usuarios USING(idusuario)
+ RIGHT JOIN ordenadores_particiones USING(idordenador)
+ RIGHT JOIN imagenes USING(idimagen)
+ LEFT JOIN remotepc ON remotepc.id=ordenadores.idordenador
+ WHERE adm.idadministradorcentro = '$userid'
+ AND aulas.idcentro = '$ouid' AND aulas.idaula LIKE '$labid' AND aulas.inremotepc = 1
+ AND imagenes.idimagen = '$imageid' AND imagenes.inremotepc = 1
+ AND (remotepc.reserved < NOW() OR ISNULL(reserved))
+ ORDER BY remotepc.reserved ASC LIMIT 1;
+EOD;
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(false); // Error opening recordset.
+ // Check if user is admin and client exists.
+ $rs->Primero();
+ if (checkAdmin($rs->campos["idadministradorcentro"]) and checkParameter($rs->campos["idordenador"])) {
+ // Read query data.
+ $serverip = $rs->campos["ipserveradm"];
+ $serverport = $rs->campos["portserveradm"];
+ $clntid = $rs->campos["idordenador"];
+ $clntname = $rs->campos["nombreordenador"];
+ $clntip = $rs->campos["ip"];
+ $clntmac = $rs->campos["mac"];
+ $agentkey = $rs->campos["agentkey"];
+ $disk = $rs->campos["numdisk"];
+ $part = $rs->campos["numpar"];
+ $labid = $rs->campos["idaula"];
+ $ouid = $rs->campos["idcentro"];
+ // Check client's status.
+ $ogagent[$clntip]['url'] = "https://$clntip:8000/opengnsys/status";
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). ": OGAgent status, url=".$ogagent[$clntip]['url'].".");
+ $result = multiRequest($ogagent);
+ if (empty($result[$clntip]['data'])) {
+ // Client is off, send a boot command to ogAdmServer.
+ // TODO: if client is busy?????
+ $reqframe = "nfn=Arrancar\r".
+ "ido=$clntid\r".
+ "iph=$clntip\r".
+ "mac=$clntmac\r".
+ "mar=1\r";
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). "Send Boot command to ogAdmClient, ido=$clntid,iph=$clntip,mac=$clntmac.");
+ sendCommand($serverip, $serverport, $reqframe, $values);
+ } else {
+ // Client is on, send a rieboot command to its OGAgent.
+ $ogagent[$clntip]['url'] = "https://$clntip:8000/opengnsys/reboot";
+ $ogagent[$clntip]['header'] = Array("Authorization: ".$agentkey);
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). ": OGAgent reboot, url=".$ogagent[$clntip]['url'].".");
+ $result = multiRequest($ogagent);
+ // ... (check response)
+ //if ($result[$clntip]['code'] != 200) {
+ // ...
+ }
+ // DB Transaction: mark choosed client as reserved and
+ // create an init session command into client's actions queue.
+ $cmd->texto = "START TRANSACTION;";
+ $cmd->Ejecutar();
+ $timestamp = time();
+ $cmd->texto = <<<EOD
+INSERT INTO remotepc
+ SET id='$clntid', reserved=NOW() + INTERVAL $maxtime HOUR, urllogin=NULL, urllogout=NULL
+ ON DUPLICATE KEY UPDATE
+ id=VALUES(id), reserved=VALUES(reserved),
+ urllogin=VALUES(urllogin), urllogout=VALUES(urllogout);
+EOD;
+ $t1 = $cmd->Ejecutar();
+ $cmd->texto = <<<EOD
+INSERT INTO acciones
+ SET tipoaccion=$EJECUCION_COMANDO,
+ idtipoaccion=9,
+ idcomando=9,
+ parametros='nfn=IniciarSesion\rdsk=$disk\rpar=$part',
+ descriaccion='RemotePC Session',
+ idordenador=$clntid,
+ ip='$clntip',
+ sesion=$timestamp,
+ fechahorareg=NOW(),
+ estado=$ACCION_INICIADA,
+ resultado=$ACCION_SINRESULTADO,
+ ambito=$AMBITO_ORDENADORES,
+ idambito=$clntid,
+ restrambito='$clntip',
+ idcentro=$ouid;
+EOD;
+ $t2 = $cmd->Ejecutar();
+ // Create event to remove reservation on timeout (15 min.).
+ $timeout = "15 MINUTE";
+ $cmd->texto = <<<EOD
+CREATE EVENT e_timeout_$clntid
+ ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL $timeout DO
+ BEGIN
+ SET @clntid = NULL;
+ UPDATE acciones
+ SET estado = $ACCION_FINALIZADA, resultado = $ACCION_FALLIDA,
+ descrinotificacion = 'Timeout'
+ WHERE descriaccion = 'RemotePC Session' AND estado = $ACCION_INICIADA
+ AND idordenador = (SELECT @clntid := '$clntid');
+ IF @clntid IS NOT NULL THEN
+ UPDATE remotepc
+ SET reserved=NOW() - INTERVAL 1 SECOND, urllogin=NULL, urllogout=NULL
+ WHERE id = @clntid;
+ DELETE FROM acciones
+ WHERE idordenador = @clntid
+ AND descriaccion = 'RemotePC Session'
+ AND descrinotificacion = 'Timeout';
+ END IF;
+ END
+EOD;
+ $t3 = $cmd->Ejecutar();
+ if ($t1 and $t2 and $t3) {
+ // Commit transaction on success.
+ $cmd->texto = "COMMIT;";
+ $cmd->Ejecutar();
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). ": DB tables and events updated, clntid=$clntid.");
+ // Send init session command if client is booted on ogLive.
+ $reqframe = "nfn=IniciarSesion\r".
+ "ido=$clntid\r".
+ "iph=$clntip\r".
+ "dsk=$disk\r".
+ "par=$part\r";
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). ": Send Init Session command to ogAdmClient, ido=$clntid,iph=$clntip,dsk=$disk,par=$part.");
+ sendCommand($serverip, $serverport, $reqframe, $values);
+ // Compose JSON response.
+ $response['id'] = (int)$clntid;
+ $response['name'] = $clntname;
+ $response['ip'] = $clntip;
+ $response['mac'] = $clntmac;
+ $response['lab']['id'] = $labid;
+ $response['ou']['id'] = (int)$ouid;
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). ": Response, ".var_export($response,true).".");
+ jsonResponse(200, $response);
+ } else {
+ // Roll-back transaction on DB error.
+ $cmd->texto = "ROLLBACK;";
+ $cmd->Ejecutar();
+ // Error message.
+ $response["message"] = "Database error: $t1, $t2, $t3";
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). ": ERROR: ".$response["message"].".");
+ jsonResponse(400, $response);
+ }
+ } else {
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). ": UNASSIGNED");
+ }
+ $rs->Cerrar();
+ $app->stop();
+ }
+);
+
+
+/**
+ * @brief Store UDS server URLs to resend some events recieved from OGAgent.
+ * @note Route: /ous/:ouid/labs/:labid/clients/:clntid/events, Method: POST
+ * @param string urlLogin URL to redirect login notification.
+ * @param string urlLogout URL to redirect logout notification.
+ * @warning Events parameters will be stored in a new "remotepc" table.
+ */
+$app->post('/ous/:ouid/labs/:labid/clients/:clntid/events', 'validateApiKey',
+ function($ouid, $labid, $clntid) use ($app) {
+ global $cmd;
+ global $userid;
+ $response = Array();
+
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). ": Init.");
+ // Checking parameters.
+ try {
+ if (empty(preg_match('/^python-requests\//', $_SERVER['HTTP_USER_AGENT']))) {
+ throw new Exception("Bad agent: sender=".$_SERVER['REMOTE_ADDR'].", agent=".$_SERVER['HTTP_USER_AGENT']);
+ }
+ if (!checkIds($ouid, $labid, $clntid)) {
+ throw new Exception("Ids. must be positive integers");
+ }
+ // Reading JSON parameters.
+ $input = json_decode($app->request()->getBody());
+ $urlLogin = htmlspecialchars($input->urlLogin);
+ $urlLogout = htmlspecialchars($input->urlLogout);
+ if (filter_var($urlLogin, FILTER_VALIDATE_URL) === false) {
+ throw new Exception("Must be a valid URL for login notification");
+ }
+ if (filter_var($urlLogout, FILTER_VALIDATE_URL) === false) {
+ throw new Exception("Must be a valid URL for logout notification");
+ }
+ } catch (Exception $e) {
+ // Error message.
+ $response["message"] = $e->getMessage();
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). ": ERROR: ".$response["message"].".");
+ jsonResponse(400, $response);
+ $app->stop();
+ }
+
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). ": Parameters: urlLogin=$urlLogin, urlLogout=$urlLogout");
+ // Select client data for UDS compatibility.
+ $cmd->texto = <<<EOD
+SELECT adm.idadministradorcentro, ordenadores.idordenador, remotepc.*
+ FROM remotepc
+ RIGHT JOIN ordenadores ON remotepc.id=ordenadores.idordenador
+ JOIN aulas USING(idaula)
+ RIGHT JOIN administradores_centros AS adm USING(idcentro)
+ RIGHT JOIN usuarios USING(idusuario)
+ WHERE adm.idadministradorcentro = '$userid'
+ AND idcentro = '$ouid' AND aulas.idaula ='$labid'
+ AND ordenadores.idordenador = '$clntid';
+EOD;
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(false); // Error opening recordset.
+ // Check if user is admin and client exists.
+ $rs->Primero();
+ if (checkAdmin($rs->campos["idadministradorcentro"]) and checkParameter($rs->campos["idordenador"])) {
+ // Check if client is reserved.
+ if (! is_null($rs->campos["reserved"])) {
+ // Updating DB if client is reserved.
+ $cmd->CreaParametro("@urllogin", $urlLogin, 0);
+ $cmd->CreaParametro("@urllogout", $urlLogout, 0);
+ $cmd->texto = <<<EOD
+UPDATE remotepc
+ SET urllogin=@urllogin, urllogout=@urllogout
+ WHERE id='$clntid';
+EOD;
+ if ($cmd->Ejecutar()) {
+ // Confirm operation.
+ $response = "";
+ jsonResponse(200, $response);
+ } else {
+ // Error message.
+ $response["message"] = "Database error";
+ jsonResponse(400, $response);
+ }
+ } else {
+ // Error message.
+ $response["message"] = "Client is not reserved";
+ jsonResponse(400, $response);
+ }
+ }
+ $rs->Cerrar();
+ $app->stop();
+ }
+);
+
+
+/*
+ * @brief Store session time (in sec).
+ * @note Route: /ous/:ouid/labs/:labid/clients/:clntid/session, Method: POST
+ * @param int deadLine maximum time session (in seconds)
+ * @warning Parameters will be stored in a new "remotepc" table.
+ */
+$app->post('/ous/:ouid/labs/:labid/clients/:clntid/session', 'validateApiKey',
+ function($ouid, $labid, $clntid) use ($app) {
+ global $cmd;
+ global $userid;
+ $response = Array();
+
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). ": Init.");
+ // Checking parameters.
+ try {
+ if (empty(preg_match('/^python-requests\//', $_SERVER['HTTP_USER_AGENT']))) {
+ throw new Exception("Bad agent: sender=".$_SERVER['REMOTE_ADDR'].", agent=".$_SERVER['HTTP_USER_AGENT']);
+ }
+ if (!checkIds($ouid, $labid, $clntid)) {
+ throw new Exception("Ids. must be positive integers");
+ }
+ // Reading JSON parameters.
+ $input = json_decode($app->request()->getBody());
+ $deadLine = $input->deadLine;
+ if (filter_var($deadLine, FILTER_VALIDATE_INT) === false) {
+ throw new Exception("Deadline must be integer");
+ }
+ if ($deadLine <= 0) {
+ throw new Exception("Resource unavailable");
+ }
+ } catch (Exception $e) {
+ // Error message.
+ $response["message"] = $e->getMessage();
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). ": ERROR: ".$response["message"].".");
+ jsonResponse(400, $response);
+ $app->stop();
+ }
+
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). ": Parameters: deadLine=$deadLine");
+ // Get client's data.
+ $cmd->texto = <<<EOD
+SELECT adm.idadministradorcentro, ordenadores.idordenador, remotepc.*
+ FROM remotepc
+ RIGHT JOIN ordenadores ON remotepc.id=ordenadores.idordenador
+ JOIN aulas USING(idaula)
+ RIGHT JOIN administradores_centros AS adm USING(idcentro)
+ WHERE adm.idadministradorcentro = '$userid'
+ AND aulas.idcentro = '$ouid' AND aulas.idaula = '$labid'
+ AND ordenadores.idordenador = '$clntid';
+EOD;
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(false); // Error opening recordset.
+ // Check if user is admin and client exists.
+ $rs->Primero();
+ if (checkAdmin($rs->campos["idadministradorcentro"]) and checkParameter($rs->campos["idordenador"])) {
+ // Check if client is reserved.
+ if (! is_null($rs->campos["urllogin"])) {
+ // Read query data.
+ $clntid = $rs->campos["idordenador"];
+ # Removing previous commands from OGAgent operations queue.
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). ": Updating database.");
+ $cmd->texto = <<<EOD
+DELETE FROM ogagent_queue
+ WHERE clientid = '$clntid' AND operation IN ('popup-10', 'popup-5', 'poweroff');
+EOD;
+ $cmd->Ejecutar();
+ # Add new commands to OGAgent operations queue.
+ $cmd->texto = "INSERT INTO ogagent_queue (clientid, exectime, operation) VALUES";
+ if ($deadLine > 600) {
+ # Add reminder 10 min. before deadline.
+ $cmd->texto .= " ($clntid, NOW() + INTERVAL $deadLine SECOND - INTERVAL 10 MINUTE, 'popup-10'),";
+ }
+ if ($deadLine > 300) {
+ # Add reminder 5 min. before deadline.
+ $cmd->texto .= " ($clntid, NOW() + INTERVAL $deadLine SECOND - INTERVAL 5 MINUTE, 'popup-5'),";
+ }
+ # Add power off command at deadline time.
+ $cmd->texto .= " ($clntid, NOW() + INTERVAL $deadLine SECOND, 'poweroff');";
+ if ($cmd->Ejecutar()) {
+ // Confirm operation.
+ $response = "";
+ jsonResponse(200, $response);
+ } else {
+ // Error message.
+ $response["message"] = "Database error";
+ jsonResponse(400, $response);
+ }
+ } else {
+ // Error message.
+ $response["message"] = "Client is not reserved";
+ jsonResponse(400, $response);
+ }
+ } else {
+ // Error message.
+ $response["message"] = "Client does not exist";
+ jsonResponse(404, $response);
+ }
+ $rs->Cerrar();
+ }
+);
+
+
+/**
+ * @brief Store UDS server URLs to resend some events recieved from OGAgent.
+ * @brief Unreserve a client and send a poweroff operation.
+ * @note Route: /ous/:ouid/labs/:labid/clients/:clntid/unreserve, Method: DELETE
+ */
+$app->delete('/ous/:ouid/labs/:labid/clients/:clntid/unreserve', 'validateApiKey',
+ function($ouid, $labid, $clntid) use ($app) {
+ global $cmd;
+ global $userid;
+ global $ACCION_INICIADA;
+ $response = Array();
+ $ogagent = Array();
+
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). ": Init.");
+ // Checking parameters.
+ try {
+ if (empty(preg_match('/^python-requests\//', $_SERVER['HTTP_USER_AGENT']))) {
+ throw new Exception("Bad agent: sender=".$_SERVER['REMOTE_ADDR'].", agent=".$_SERVER['HTTP_USER_AGENT']);
+ }
+ if (!checkIds($ouid, $labid, $clntid)) {
+ throw new Exception("Ids. must be positive integers");
+ }
+ } catch (Exception $e) {
+ // Error message.
+ $response["message"] = $e->getMessage();
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). ": ERROR: ".$response["message"].".");
+ jsonResponse(400, $response);
+ $app->stop();
+ }
+
+ // Select client data for UDS compatibility.
+ $cmd->texto = <<<EOD
+SELECT adm.idadministradorcentro, ordenadores.idordenador, ordenadores.ip, ordenadores.agentkey, remotepc.reserved
+ FROM remotepc
+ RIGHT JOIN ordenadores ON remotepc.id=ordenadores.idordenador
+ JOIN aulas USING(idaula)
+ RIGHT JOIN administradores_centros AS adm USING(idcentro)
+ RIGHT JOIN usuarios USING(idusuario)
+ WHERE adm.idadministradorcentro = '$userid'
+ AND idcentro = '$ouid' AND aulas.idaula ='$labid'
+ AND ordenadores.idordenador = '$clntid';
+EOD;
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(false); // Error opening recordset.
+ // Check if user is admin and client exists.
+ $rs->Primero();
+ if (checkAdmin($rs->campos["idadministradorcentro"]) and checkParameter($rs->campos["idordenador"])) {
+ // Check if client is reserved.
+ if (! is_null($rs->campos["reserved"])) {
+ // Read query data.
+ $clntip = $rs->campos["ip"];
+ $agentkey = $rs->campos["agentkey"];
+ // DB Transaction: set reservation time to the past and
+ // remove pending boot commands from client's and agent's queues.
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). ": Updating database.");
+ $cmd->texto = "START TRANSACTION;";
+ $cmd->Ejecutar();
+ $cmd->texto = <<<EOD
+UPDATE remotepc
+ SET reserved=NOW() - INTERVAL 1 SECOND, urllogin=NULL, urllogout=NULL
+ WHERE id='$clntid';
+EOD;
+ $cmd->Ejecutar();
+ $cmd->texto = <<<EOD
+DELETE FROM acciones
+ WHERE idordenador = '$clntid'
+ AND descriaccion = 'RemotePC Session';
+EOD;
+ $cmd->Ejecutar();
+ $cmd->texto = <<<EOD
+DELETE FROM ogagent_queue
+ WHERE clientid = '$clntid' AND command IN ('popup-10', 'popup-5', 'poweroff');
+EOD;
+ $cmd->Ejecutar();
+ $cmd->texto = "COMMIT;";
+ $cmd->Ejecutar();
+ // Send a poweroff command to client's OGAgent.
+ $ogagent[$clntip]['url'] = "https://$clntip:8000/opengnsys/poweroff";
+ $ogagent[$clntip]['header'] = Array("Authorization: ".$agentkey);
+ if ($app->settings['debug'])
+ writeRemotepcLog($app->request()->getResourceUri(). ": OGAgent poweroff, url=".$ogagent[$clntip]['url'].".");
+ $result = multiRequest($ogagent);
+ // ... (check response)
+ //if ($result[$clntip]['code'] != 200) {
+ // ...
+ // Confirm operation.
+ $response = "";
+ jsonResponse(200, $response);
+ } else {
+ // Error message.
+ $response["message"] = "Client is not reserved";
+ jsonResponse(400, $response);
+ }
+ } else {
+ // Error message.
+ $response["message"] = "Client does not exist";
+ jsonResponse(404, $response);
+ }
+ $rs->Cerrar();
+ }
+);
+
+?>
diff --git a/admin/WebConsole/rest/repository.php b/admin/WebConsole/rest/repository.php
new file mode 100644
index 00000000..7ac6e88e
--- /dev/null
+++ b/admin/WebConsole/rest/repository.php
@@ -0,0 +1,215 @@
+<?php
+/**
+ * @file repository.php
+ * @brief OpenGnsys Repository REST API manager.
+ * @warning All input and output messages are formatted in JSON.
+ * @note Some ideas are based on article "How to create REST API for Android app using PHP, Slim and MySQL" by Ravi Tamada, thanx.
+ * @license GNU GPLv3+
+ * @author Juan Manuel Bardallo SIC Universidad de Huelva
+ * @version 1.0
+ * @date 2016-04-06
+ */
+
+// Auxiliar functions.
+/**
+ * @brief Validate API key included in "Authorization" HTTP header.
+ * @return JSON response on error.
+ */
+function validateRepositoryApiKey() {
+ $response = array();
+ $app = \Slim\Slim::getInstance();
+
+ // Assign user id. that match this key to global variable.
+ @$apikey = htmlspecialchars(function_exists('apache_request_headers') ? apache_request_headers()['Authorization'] : $_SERVER['HTTP_AUTHORIZATION']);
+ if (isset($apikey)) {
+ // fetch repository token from ogAdmRepo.cfg configuration file.
+ @$confFile = parse_ini_file('../../etc/ogAdmRepo.cfg', 'r');
+ if ($confFile) {
+ if(@strcmp($apikey, $confFile['ApiToken']) == 0) {
+ // Credentials OK.
+ return true;
+ } else {
+ // Credentials error.
+ $response['message'] = 'Login failed. Incorrect credentials';
+ jsonResponse(401, $response);
+ $app->stop();
+ }
+ } else {
+ // Cannot access configuration file.
+ $response['message'] = "An error occurred, please try again";
+ jsonResponse(500, $response);
+ $app->stop();
+ }
+ } else {
+ // Error: missing API key.
+ $response['message'] = 'Missing Repository API key';
+ jsonResponse(400, $response);
+ $app->stop();
+ }
+}
+
+function commandExist($cmd) {
+ $returnVal = shell_exec("which $cmd");
+ return (empty($returnVal) ? false : true);
+}
+
+
+// Define REST routes.
+
+
+/**
+ * @brief List all images in the repository
+ * @note Route: /repository/images, Method: GET
+ * @param no
+ * @return JSON object with directory, images array, ous array and disk data.
+ */
+$app->get('/repository/images(/)', 'validateRepositoryApiKey',
+ function() use ($app) {
+ $response = array();
+ // Read repository information file.
+ $cfgFile = '/opt/opengnsys/etc/repoinfo.json';
+ $response = json_decode(@file_get_contents($cfgFile), true);
+ // Check if directory exists.
+ $imgPath = @$response['directory'];
+ if (is_dir($imgPath)) {
+ // Complete global image information.
+ for ($i=0; $i<sizeof(@$response['images']); $i++) {
+ $img = $response['images'][$i];
+ $file = $imgPath."/".($img['type']==="dir" ? $img["name"] : $img["name"].".".$img["type"]);
+ $response['images'][$i]['size'] = @stat($file)['size'];
+ $response['images'][$i]['modified'] = date("Y-m-d H:i:s", @stat($file)['mtime']);
+ $response['images'][$i]['mode'] = substr(decoct(@stat($file)['mode']), -4);
+ $backupfile = "$file.ant";
+ if (file_exists($backupfile)) {
+ $response['images'][$i]['backedup'] = true;
+ $response['images'][$i]['backupsize'] = @stat($backupfile)['size'];
+ } else {
+ $response['images'][$i]['backedup'] = false;
+ }
+ $lockfile = "$file.lock";
+ $response['images'][$i]['locked'] = file_exists($lockfile);
+ }
+ // Complete image in OUs information.
+ for ($j=0; $j<sizeof(@$response['ous']); $j++) {
+ for ($i=0; $i<sizeof(@$response['ous'][$j]['images']); $i++) {
+ $img = $response['ous'][$j]['images'][$i];
+ $file = $imgPath."/".$response['ous'][$j]['subdir']."/".($img['type']==="dir" ? $img["name"] : $img["name"].".".$img["type"]);
+ $response['ous'][$j]['images'][$i]['size'] = @stat($file)['size'];
+ $response['ous'][$j]['images'][$i]['modified'] = date("Y-m-d H:i:s", @stat($file)['mtime']);
+ $response['ous'][$j]['images'][$i]['mode'] = substr(decoct(@stat($file)['mode']), -4);
+ $response['ous'][$j]['images'][$i]['backedup'] = false;
+ $lockfile = "$file.lock";
+ $response['ous'][$j]['images'][$i]['locked'] = file_exists($lockfile);
+ }
+ }
+ // Retrieve disk information.
+ $total = disk_total_space($imgPath);
+ $free = disk_free_space($imgPath);
+ $response['disk']['total'] = $total;
+ $response['disk']['free'] = $free;
+ // JSON response.
+ jsonResponse(200, $response);
+ } else {
+ // Print error message.
+ $response['message'] = 'Images directory not found';
+ jsonResponse(404, $response);
+ }
+ $app->stop();
+ }
+);
+
+
+/**
+ * @brief List image data
+ * @note Route: /repository/image/:imagename, Method: GET
+ * @param no
+ * @return JSON object with image data.
+ */
+$app->get('/repository/image(/:ouname)/:imagename(/)', 'validateRepositoryApiKey',
+ function($ouname="/", $imagename) use ($app) {
+ $images = array();
+ $response = array();
+ // Search image name in repository information file.
+ $cfgFile = '/opt/opengnsys/etc/repoinfo.json';
+ $json = json_decode(@file_get_contents($cfgFile), true);
+ $imgPath = @$json['directory'];
+ if (empty($ouname) or $ouname == "/") {
+ // Search in global directory.
+ $images = @$json['images'];
+ } else {
+ // Search in OU directory.
+ for ($i=0; $i<sizeof(@$json['ous']); $i++) {
+ if ($json['ous'][$i]['subdir'] == $ouname) {
+ $images = $json['ous'][$i]['images'];
+ }
+ }
+ }
+ // Search image.
+ foreach ($images as $img) {
+ if ($img['name'] == $imagename) {
+ $response = $img;
+ $file = "$imgPath/$ouname/" . ($img['type']==="dir" ? $img["name"] : $img["name"].".".$img["type"]);
+ $response['size'] = @stat($file)['size'];
+ $response['modified'] = date("Y-m-d H:i:s", @stat($file)['mtime']);
+ $response['mode'] = substr(decoct(@stat($file)['mode']), -4);
+ $backupfile = "$file.ant";
+ if (file_exists($backupfile)) {
+ $response['backedup'] = true;
+ $response['backupsize'] = @stat($backupfile)['size'];
+ } else {
+ $response['backedup'] = false;
+ }
+ $lockfile = "$file.lock";
+ $response['locked'] = file_exists($lockfile);
+ }
+ }
+ if (isset ($response)) {
+ // JSON response.
+ jsonResponse(200, $response);
+ } else {
+ // Print error message.
+ $response['message'] = 'Image not found';
+ jsonResponse(404, $response);
+ }
+ $app->stop();
+ }
+);
+
+
+/**
+ * @brief Power on a pc or group of pcs with the MAC specified in POST parameters
+ * @note Route: /poweron, Method: POST
+ * @param macs OU id.
+ * @return JSON string ok if the power on command was sent
+ */
+$app->post('/repository/poweron', 'validateRepositoryApiKey',
+ function() use($app) {
+ // Debe venir el parametro macs en el post (objeto JSON con array de MACs)
+ $data = json_decode($app->request()->getBody());
+ if(empty($data->macs)){
+ // Print error message.
+ $response['message'] = 'Required param macs not found';
+ jsonResponse(400, $response);
+ }
+ else{
+ $strMacs = "";
+ foreach($data->macs as $mac){
+ $strMacs .= " ".$mac;
+ }
+ // Ejecutar comando wakeonlan, debe estar disponible en el sistema operativo
+ if(commandExist("wakeonlan")){
+ $response["output"] = "Executing wakeonlan ".trim($strMacs)."\n";
+ $response["output"] .= shell_exec("wakeonlan ".trim($strMacs));
+ // Comprobar si el comando se ejecutórrectamente
+ jsonResponse(200, $response);
+ }
+ else{
+ // Print error message.
+ $response['message'] = 'Wakeonlan command not found in this repository';
+ jsonResponse(404, $response);
+ }
+ }
+ }
+);
+
+?>
diff --git a/admin/WebConsole/rest/server.php b/admin/WebConsole/rest/server.php
new file mode 100644
index 00000000..76a2f908
--- /dev/null
+++ b/admin/WebConsole/rest/server.php
@@ -0,0 +1,1041 @@
+<?php
+/**
+ * @file index.php
+ * @brief OpenGnsys Server REST API manager.
+ * @warning All input and output messages are formatted in JSON.
+ * @note Some ideas are based on article "How to create REST API for Android app using PHP, Slim and MySQL" by Ravi Tamada, thanx.
+ * @license GNU GPLv3+
+ * @author Ramón M. Gómez, ETSII Univ. Sevilla
+ * @version 1.1.0 - First version
+ * @date 2016-09-19
+ */
+
+
+// Auxiliar functions.
+
+/**
+ * @brief Check if user is administrator and print error messages if not.
+ * @param int adminid Administrator id.
+ * @return boolean "true" if admin id. is equals to global user id., otherwise "false".
+ */
+function checkAdmin($adminid) {
+ global $userid;
+
+ if ($adminid == $userid) {
+ return true;
+ } else {
+ // Print error message.
+ $response['message'] = 'Cannot access this resource';
+ jsonResponse(401, $response);
+ return false;
+ }
+}
+
+/**
+ * @fn addClassroomGroup(&$classroomGroups, $rs)
+ * @brief Funcion privada usada para añadir grupos de aulas recursivamente
+ * @param classroomGroups Grupos de aulas que pueden contener más grupos
+ * @param rs resultset de la consulta a la base de datos.
+ */
+function addClassroomGroup(&$classroomGroups, $rs){
+
+ array_walk($classroomGroups, function(&$group,$key){
+ global $rs;
+ if (isset($group['id']) && $group['id'] === $rs->campos["group_group_id"]) {
+ array_push($group["classroomGroups"],array("id" => $rs->campos["group_id"],
+ "name" => $rs->campos["nombregrupoordenador"],
+ "comments" => $rs->campos["comentarios"],
+ "classroomGroups" => array()));
+ }
+ else if(count($group["classroomGroups"]) > 0){
+ addClassroomGroup($group["classroomGroups"], $rs);
+ }
+ /**/
+ });
+}
+
+/**
+ * @fn getStatus(ouid, labid, [clntid])
+ * @brief Returns client execution status or status of all lab's clients.
+ * @param ouid OU id.
+ * @param labid Lab. id.
+ * @param clntid Client id. (optional)
+ * @return string JSON object or array of objects including status data.
+ */
+function getStatus($ouid, $labid, $clntid=0) {
+ global $userid;
+ global $cmd;
+ global $LONCABECERA;
+ global $LONHEXPRM;
+ $app = \Slim\Slim::getInstance();
+ $clientid = $clientip = "";
+ $urls = Array();
+ // Status mapping.
+ $status = Array('OFF'=>"off",
+ 'INI'=>"initializing",
+ 'OPG'=>"oglive",
+ 'BSY'=>"busy",
+ 'LNX'=>"linux",
+ 'OSX'=>"macos",
+ 'WIN'=>"windows",
+ 'UNK'=>"unknown");
+ // Parameters.
+ $ouid = htmlspecialchars($ouid);
+ $labid = htmlspecialchars($labid);
+ $single = is_numeric(explode("/", $app->request->getResourceUri())[6]);
+
+ // Database query.
+ $cmd->texto = <<<EOD
+SELECT adm.idadministradorcentro, entornos.ipserveradm, entornos.portserveradm,
+ aulas.idaula, ordenadores.idordenador, ordenadores.ip
+ FROM entornos, ordenadores
+ JOIN aulas USING(idaula)
+ RIGHT JOIN administradores_centros AS adm USING(idcentro)
+ WHERE adm.idadministradorcentro = '$userid'
+ AND adm.idcentro='$ouid'
+ AND aulas.idaula='$labid'
+EOD;
+ // Request for a single client.
+ if ($single) {
+ $clntid = htmlspecialchars($clntid);
+ $cmd->texto .= <<<EOD
+ AND ordenadores.idordenador='$clntid';
+EOD;
+ } else {
+ $response = Array();
+ }
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(false); // Error oppening recordset.
+ $rs->Primero();
+ // Check if user is an UO admin and asset exists.
+ if (checkAdmin($rs->campos["idadministradorcentro"]) and (($single and checkParameter($rs->campos["idordenador"])) or (! $single and checkParameter($rs->campos["idaula"])))) {
+ // First, try to connect to ogAdmCleint service.
+ $serverip = $rs->campos["ipserveradm"];
+ $serverport = $rs->campos["portserveradm"];
+ while (!$rs->EOF) {
+ $id[$rs->campos["ip"]] = $rs->campos["idordenador"];
+ $stat[$rs->campos["ip"]] = $status['OFF'];
+ $rs->Siguiente();
+ }
+ // Connect to reset client's status.
+ $clientid = implode(",", $id);
+ $clientip = implode(";", array_keys($id));
+ $reqframe = "nfn=Sondeo\r".
+ "ido=$clientid\r".
+ "iph=$clientip\r";
+ $result = sendCommand($serverip, $serverport, $reqframe, $values);
+ // Connect to fetch client's status.
+ // Asuming client is off by default.
+ $values["tso"]="OFF";
+ // Iterate to check client's status.
+ // Exit if status!=OFF or end iterations (status=OFF).
+ $maxIter = 30;
+ for ($i=1; $i<$maxIter and preg_match('/OFF/', $values["tso"]); $i++) {
+ // Connect to check status.
+ $reqframe = "nfn=respuestaSondeo\r".
+ "ido=$clientid\r".
+ "iph=$clientip\r";
+ $result = sendCommand($serverip, $serverport, $reqframe, $values);
+ // Wait until next checking (0.1 ms).
+ usleep(100000);
+ }
+ // Parse status response.
+ if ($result) {
+ // Check status type.
+ if (checkParameter($values["tso"])) {
+ foreach (explode(";", $values["tso"]) as $data) {
+ if (!empty($data)) {
+ list($clip, $clst) = explode("/", $data);
+ if ($clst != "OFF") {
+ // Update current status.
+ $stat[$clip] = $status[$clst];
+ }
+ }
+ }
+ }
+ // Prepare request to new OGAgent for OSes.
+ foreach ($stat as $ip => $st) {
+ if ($st == "off") {
+ $urls[$ip] = "https://$ip:8000/opengnsys/status";
+ }
+ }
+ // Send request to OGAgents.
+ if (isset($urls)) {
+ $result = multiRequest($urls);
+ }
+ // Parse responses.
+ reset($urls);
+ foreach ($result as $res) {
+ if (!empty($res['data'])) {
+ // Get status and session data.
+ $ip = key($urls);
+ $data = json_decode($res['data']);
+ if (@isset($status[$data->status])) {
+ $stat[$ip] = $status[$data->status];
+ $logged[$ip] = $data->loggedin;
+ } else {
+ $stat[$ip] = $status['UNK'];
+ }
+ }
+ unset($urls[$ip]);
+ }
+ // Compose JSON response.
+ if ($single) {
+ // Single response.
+ $response['id'] = (int)reset($id);
+ $response['ip'] = key($id);
+ $response['status'] = $stat[$ip];
+ empty($logged[$ip]) || $response['loggedin'] = $logged[$ip];
+ } else {
+ // Multiple responses.
+ foreach ($stat as $ip => $st) {
+ $tmp = Array();
+ $tmp['id'] = (int)$id[$ip];
+ $tmp['ip'] = $ip;
+ $tmp['status'] = $stat[$ip];
+ empty($logged[$ip]) || $tmp['loggedin'] = $logged[$ip];
+ array_push($response, $tmp);
+ }
+ }
+ jsonResponse(200, $response);
+ } else {
+ // Access error.
+ $response['message'] = "Cannot access to OpenGnsys server";
+ jsonResponse(500, $response);
+ }
+ }
+ $rs->Cerrar();
+}
+
+
+// REST routes.
+
+/**
+ * @brief user login.
+ * @note Route: /login, Method: POST
+ * @param string username User name.
+ * @param string password User password.
+ * @return string JSON response with user id. and API key.
+ * @note User's API key is stored in a new field of "usuarios" table.
+ */
+$app->post('/login',
+ function() use ($app) {
+ global $cmd;
+ global $userid;
+
+ $response = Array();
+ // Reading JSON parameters.
+ try {
+ $input = json_decode($app->request()->getBody());
+ $user = htmlspecialchars($input->username);
+ $pass = htmlspecialchars($input->password);
+ } catch (Exception $e) {
+ // Error message.
+ $response["message"] = $e->getMessage();
+ jsonResponse(400, $response);
+ $app->stop();
+ }
+
+ // Checking parameters.
+ if (! empty($user) and ! empty($pass)) {
+ // Database query.
+ $cmd->texto = "SELECT idusuario, apikey
+ FROM usuarios
+ WHERE usuario='$user' AND pasguor=SHA2('$pass',224)";
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if ($rs->Abrir()) {
+ $rs->Primero();
+ if (!$rs->EOF){
+ // JSON response.
+ $userid=$rs->campos["idusuario"];
+ $apikey=$rs->campos["apikey"];
+ $response['userid'] = $userid;
+ $response['apikey'] = $apikey;
+ jsonResponse(200, $response);
+ } else {
+ // Credentials error.
+ $response['message'] = 'Login failed. Incorrect credentials';
+ jsonResponse(401, $response);
+ $app->stop();
+ }
+ $rs->Cerrar();
+ } else {
+ // Access error.
+ $response['message'] = "An error occurred. Please try again";
+ jsonResponse(500, $response);
+ $app->stop();
+ }
+ } else {
+ # Error: missing some input parameter.
+ $response['message'] = 'Missing username or password';
+ jsonResponse(400, $response);
+ $app->stop();
+ }
+ }
+);
+
+/**
+ * @brief List all defined Organizational Units
+ * @note Route: /ous, Method: GET
+ * @param no
+ * @return JSON array with id. and name for every defined OU
+ */
+$app->get('/ous(/)', function() {
+ global $cmd;
+
+ $cmd->texto = "SELECT * FROM centros";
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(false); // Error oppening recordset.
+ $response = Array();
+ $rs->Primero();
+ while (!$rs->EOF) {
+ $tmp = Array();
+ $tmp['id'] = (int)$rs->campos["idcentro"];
+ $tmp['name'] = $rs->campos["nombrecentro"];
+ array_push($response, $tmp);
+ $rs->Siguiente();
+ }
+ $rs->Cerrar();
+ jsonResponse(200, $response);
+ }
+);
+
+/**
+ * @brief Get Organizational Unit data
+ * @note Route: /ous/id, Method: GET
+ * @param id OU id.
+ * @return JSON string with OU's parameters
+ */
+$app->get('/ous/:ouid(/)', 'validateApiKey',
+ function($ouid) {
+ global $cmd;
+ global $userid;
+
+ $ouid = htmlspecialchars($ouid);
+ // Show OU information if user is OU's admin.
+ $cmd->texto = <<<EOD
+SELECT *
+ FROM centros
+ RIGHT JOIN administradores_centros USING(idcentro)
+ WHERE administradores_centros.idadministradorcentro = '$userid'
+ AND centros.idcentro = '$ouid'
+ LIMIT 1;
+EOD;
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(false); // Error oppening recordset.
+ $rs->Primero();
+ if (checkAdmin($rs->campos["idadministradorcentro"]) and
+ checkParameter($rs->campos["idcentro"])) {
+ $response['id'] = (int)$ouid;
+ $response['name'] = $rs->campos["nombrecentro"];
+ $response['description'] = $rs->campos["comentarios"];
+ jsonResponse(200, $response);
+ }
+ $rs->Cerrar();
+ }
+);
+
+/**
+ * @brief List group of labs in an Organizational Unit
+ * @note Route: /ous/id/groups, Method: GET
+ * @param id OU id.
+ * @return JSON array of OU groups
+ */
+$app->get('/ous/:ouid/groups(/)', 'validateApiKey', function($ouid) {
+ global $cmd;
+ global $userid;
+
+ $ouid = htmlspecialchars($ouid);
+ // List group of labs if user is OU's admin.
+ $cmd->texto = <<<EOD
+SELECT adm.idadministradorcentro, grupos.*
+ FROM grupos
+ RIGHT JOIN administradores_centros AS adm USING(idcentro)
+ WHERE adm.idadministradorcentro = '$userid'
+ AND idcentro='$ouid';
+EOD;
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(false); // Error oppening recordset.
+ $rs->Primero();
+ // Check if user is an UO admin.
+ if (checkAdmin($rs->campos["idadministradorcentro"])) {
+ $response = Array();
+ // Read data.
+ if (! is_null($rs->campos["idcentro"])) {
+ while (!$rs->EOF) {
+ $tmp = Array();
+ $tmp['id'] = (int)$rs->campos["idgrupo"];
+ $tmp['name'] = $rs->campos["nombregrupo"];
+ $tmp['type'] = $rs->campos["tipo"];
+ $tmp['comments'] = $rs->campos["comentarios"];
+ if($rs->campos["grupoid"] != 0){
+ $tmp['parent']['id'] = (int)$rs->campos["grupoid"];
+ }
+ array_push($response, $tmp);
+ $rs->Siguiente();
+ }
+ }
+ jsonResponse(200, $response);
+ }
+ $rs->Cerrar();
+ }
+);
+
+/**
+ * @brief List all labs defined in an OU
+ * @note Route: /ous/id/labs, Method: GET
+ * @param id OU id.
+ * @return JSON array of all UO's labs data
+ */
+$app->get('/ous/:ouid/labs(/)', 'validateApiKey',
+ function($ouid) {
+ global $userid;
+ global $cmd;
+
+ $ouid = htmlspecialchars($ouid);
+ // Database query.
+ $cmd->texto = <<<EOD
+SELECT adm.idadministradorcentro, aulas.*, grp.idgrupo AS group_id,
+ grp.nombregrupoordenador, grp.grupoid AS group_group_id, grp.comentarios
+ FROM aulas
+ RIGHT JOIN administradores_centros AS adm USING(idcentro)
+ LEFT JOIN gruposordenadores AS grp USING(idaula)
+ WHERE adm.idadministradorcentro = '$userid'
+ AND adm.idcentro='$ouid'
+ ORDER BY aulas.idaula, grp.idgrupo
+EOD;
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(false); // Error opening recordset.
+ // Check if user is an UO admin.
+ $rs->Primero();
+ if (checkAdmin($rs->campos["idadministradorcentro"])) {
+ $response = Array();
+ if (! is_null($rs->campos["idcentro"])) {
+ while (!$rs->EOF) {
+ // En los resultados las aulas vienen repetidas tantas veces como grupos tengan, solo dejamos uno
+ $classroomIndex = -1;
+ $found=false;
+ $index = 0;
+ while(!$found && $index < count($response)){
+ if(isset($response[$index]["id"]) && $response[$index]["id"] == $rs->campos["idaula"]){
+ $classroomIndex = $index;
+ $found = true;
+ }
+ $index++;
+ }
+ if(!$found){
+ $tmp = Array();
+ $tmp['id'] = (int)$rs->campos["idaula"];
+ $tmp['name'] = $rs->campos["nombreaula"];
+ $tmp['inremotepc'] = $rs->campos["inremotepc"]==0 ? false: true;
+ $tmp['group']['id'] = (int)$rs->campos["grupoid"];
+ $tmp['ou']['id'] = (int)$ouid;
+ array_push($response, $tmp);
+ }
+ else{
+ // Le añadimos el grupo en cuestion siempre que no sea un subgrupo
+ if($rs->campos["group_group_id"] == 0){
+ array_push($response[$classroomIndex]['classroomGroups'],
+ array("id" => (int)$rs->campos["group_id"],
+ "name" => $rs->campos["nombregrupoordenador"],
+ "comments" => $rs->campos["comentarios"],
+ "classroomGroups" => array()));
+ }
+ else {
+ // Buscamos el grupo donde añadir el grupo
+ addClassroomGroup($response[$classroomIndex]['classroomGroups'], $rs);
+ }
+ }
+ $rs->Siguiente();
+ }
+ }
+ jsonResponse(200, $response);
+ }
+ $rs->Cerrar();
+ }
+);
+
+/**
+ * @brief Get lab data
+ * @note Route: /ous/id1/labs/id2, Method: GET
+ * @param id1 OU id.
+ * @param id2 lab id.
+ * @return JSON string with lab parameters
+ */
+$app->get('/ous/:ouid/labs/:labid(/)', 'validateApiKey',
+ function($ouid, $labid) {
+ global $userid;
+ global $cmd;
+
+ $ouid = htmlspecialchars($ouid);
+ $labid = htmlspecialchars($labid);
+ // Database query.
+ $cmd->texto = <<<EOD
+SELECT adm.idadministradorcentro, COUNT(idordenador) AS defclients, aulas.*
+ FROM aulas
+ RIGHT JOIN administradores_centros AS adm USING(idcentro)
+ LEFT JOIN ordenadores USING(idaula)
+ WHERE adm.idadministradorcentro = '$userid'
+ AND idcentro='$ouid'
+ AND idaula='$labid';
+EOD;
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(false); // Error oppening recordset.
+ $rs->Primero();
+ // Check if user is an UO admin and lab exists.
+ if (checkAdmin($rs->campos["idadministradorcentro"]) and checkParameter($rs->campos["idaula"])) {
+ $response['id'] = (int)$rs->campos["idaula"];
+ $response['name'] = $rs->campos["nombreaula"];
+ $response['location'] = $rs->campos["ubicacion"];
+ $response['description'] = $rs->campos["comentarios"];
+ $response['inremotepc'] = $rs->campos["inremotepc"]==0 ? false: true;
+ $response['capacity'] = (int)$rs->campos["puestos"];
+ $response['defclients'] = (int)$rs->campos["defclients"];
+ $response['projector'] = $rs->campos["cagnon"]==0 ? false: true;
+ $response['board'] = $rs->campos["pizarra"]==0 ? false: true;
+ $response['routerip'] = $rs->campos["router"];
+ $response['netmask'] = $rs->campos["netmask"];
+ $response['ntp'] = $rs->campos["ntp"];
+ $response['dns'] = $rs->campos["dns"];
+ $response['proxyurl'] = $rs->campos["proxy"];
+ switch ($rs->campos["modomul"]) {
+ case 1: $response['mcastmode'] = "half-duplex"; break;
+ case 2: $response['mcastmode'] = "full-duplex"; break;
+ default: $response['mcastmode'] = $rs->campos["modomul"];
+ }
+ $response['mcastip'] = $rs->campos["ipmul"];
+ $response['mcastport'] = $rs->campos["pormul"];
+ $response['mcastspeed'] = $rs->campos["velmul"];
+ $response['p2pmode'] = $rs->campos["modp2p"];
+ $response['p2ptime'] = $rs->campos["timep2p"];
+ $response['picture'] = $rs->campos["urlfoto"];
+ jsonResponse(200, $response);
+ }
+ $rs->Cerrar();
+ }
+);
+
+
+/**
+ * @brief List all clients defined in a lab
+ * @note Route: /ous/id1/labs/id2/clients, Method: GET
+ * @param id1 OU id.
+ * @param id2 lab id.
+ * @return JSON data with lab id. and array of lab parameters
+ */
+$app->get('/ous/:ouid/labs/:labid/clients(/)', 'validateApiKey',
+ function($ouid, $labid) {
+ global $userid;
+ global $cmd;
+
+ $ouid = htmlspecialchars($ouid);
+ $labid = htmlspecialchars($labid);
+ // Database query.
+ $cmd->texto = <<<EOD
+SELECT adm.idadministradorcentro, ordenadores.*, aulas.idaula AS labid
+ FROM ordenadores
+ RIGHT JOIN aulas USING(idaula)
+ RIGHT JOIN administradores_centros AS adm USING(idcentro)
+ WHERE adm.idadministradorcentro = '$userid'
+ AND adm.idcentro='$ouid'
+ AND aulas.idaula='$labid';
+EOD;
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(false); // Error oppening recordset.
+ $rs->Primero();
+ // Check if user is an UO admin and lab exists.
+ if (checkAdmin($rs->campos["idadministradorcentro"]) and checkParameter($rs->campos["labid"])) {
+ $response = Array();
+ while (!$rs->EOF) {
+ if (!is_null($rs->campos["idordenador"])) {
+ $tmp = Array();
+ $tmp['id'] = (int)$rs->campos["idordenador"];
+ $tmp['name'] = $rs->campos["nombreordenador"];
+ $tmp['ip'] = $rs->campos["ip"];
+ $tmp['mac'] = $rs->campos["mac"];
+ $tmp['ou']['id'] = (int)$ouid;
+ $tmp['lab']['id'] = (int)$labid;
+ array_push($response, $tmp);
+ }
+ $rs->Siguiente();
+ }
+ jsonResponse(200, $response);
+ }
+ $rs->Cerrar();
+ }
+);
+
+/**
+ * @brief Get execution status of all clients defined in a lab
+ * @note Route: /ous/id1/labs/id2clients/id3/status, Method: GET
+ * @param id1 OU id.
+ * @param id2 lab id.
+ * @return JSON string with array of all client status defined in a lab
+ */
+$app->get('/ous/:ouid/labs/:labid/clients/status(/)', 'validateApiKey', 'getStatus');
+
+/**
+ * @brief Get client data
+ * @note Route: /ous/id1/labs/id2clients/id3, Method: GET
+ * @param id1 OU id.
+ * @param id2 lab id.
+ * @param id3 client id.
+ * @return JSON string with hardware parameters
+ */
+$app->get('/ous/:ouid/labs/:labid/clients/:clntid(/)', 'validateApiKey',
+ function($ouid, $labid, $clntid) {
+ global $userid;
+ global $cmd;
+
+ $ouid = htmlspecialchars($ouid);
+ $labid = htmlspecialchars($labid);
+ $clntid = htmlspecialchars($clntid);
+ // Database query.
+ $cmd->texto = <<<EOD
+SELECT adm.idadministradorcentro, ordenadores.*
+ FROM ordenadores
+ JOIN aulas USING(idaula)
+ RIGHT JOIN administradores_centros AS adm USING(idcentro)
+ WHERE adm.idadministradorcentro = '$userid'
+ AND idcentro='$ouid'
+ AND idaula='$labid'
+ AND idordenador='$clntid';
+EOD;
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(false); // Error oppening recordset.
+ $rs->Primero();
+ // Check if user is an UO admin, lab exists and client exists.
+ if (checkAdmin($rs->campos["idadministradorcentro"]) and checkParameter($rs->campos["idaula"]) and checkParameter($rs->campos["idordenador"])) {
+ // Read data.
+ $response['id'] = (int)$rs->campos["idordenador"];
+ $response['name'] = $rs->campos["nombreordenador"];
+ $response['serialno'] = $rs->campos["numserie"];
+ $response['netiface'] = $rs->campos["netiface"];
+ $response['netdriver'] = $rs->campos["netdriver"];
+ $response['mac'] = $rs->campos["mac"];
+ $response['ip'] = $rs->campos["ip"];
+ $response['netmask'] = $rs->campos["mascara"];
+ $response['routerip'] = $rs->campos["router"];
+ $response['repo']['id'] = (int)$rs->campos["idrepositorio"];
+ //$response['hardprofile']['id'] = $rs->campos["idperfilhard"];
+ //$response['menu']['id'] = $rs->campos["idmenu"];
+ $response['validation'] = $rs->campos["validacion"]==0 ? false: true;
+ $response['boottype'] = $rs->campos["arranque"];
+ $response['picture'] = $rs->campos["fotoord"];
+ jsonResponse(200, $response);
+ }
+ $rs->Cerrar();
+ }
+);
+
+/**
+ * @brief Get client's harware configuration data
+ * @note Route: /ous/id1/labs/id2clients/id3/hardware, Method: GET
+ * @param id1 OU id.
+ * @param id2 lab id.
+ * @param id3 client id.
+ * @return JSON string with cleint parameters
+ */
+$app->get('/ous/:ouid/labs/:labid/clients/:clntid/hardware(/)', 'validateApiKey',
+ function($ouid, $labid, $clntid) {
+ global $userid;
+ global $cmd;
+
+ $ouid = htmlspecialchars($ouid);
+ $labid = htmlspecialchars($labid);
+ $clntid = htmlspecialchars($clntid);
+ // Database query.
+ $cmd->texto = <<<EOD
+SELECT adm.idadministradorcentro, ordenadores.idordenador, ordenadores.nombreordenador,
+ tipohardwares.nemonico, hardwares.descripcion
+ FROM ordenadores
+ JOIN aulas USING(idaula)
+ RIGHT JOIN administradores_centros AS adm USING(idcentro)
+ LEFT JOIN perfileshard_hardwares USING(idperfilhard)
+ LEFT JOIN hardwares ON perfileshard_hardwares.idhardware=hardwares.idhardware
+ LEFT JOIN tipohardwares ON tipohardwares.idtipohardware=hardwares.idtipohardware
+ WHERE adm.idadministradorcentro = '$userid'
+ AND adm.idcentro='$ouid'
+ AND aulas.idaula='$labid'
+ AND ordenadores.idordenador='$clntid';
+EOD;
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(false); // Error oppening recordset.
+ $rs->Primero();
+ // Check if user is an UO admin and client exists.
+ if (checkAdmin($rs->campos["idadministradorcentro"]) and checkParameter($rs->campos["idordenador"])) {
+ // Read data.
+ $response['id'] = (int)$rs->campos["idordenador"];
+ $response['name'] = $rs->campos["nombreordenador"];
+ $response['hardware'] = Array();
+ while (!$rs->EOF) {
+ if (!is_null($rs->campos["nemonico"])) {
+ $tmp = Array();
+ $tmp['type'] = $rs->campos["nemonico"];
+ $tmp['description'] = $rs->campos["descripcion"];
+ array_push($response['hardware'], $tmp);
+ }
+ $rs->Siguiente();
+ }
+ jsonResponse(200, $response);
+ }
+ $rs->Cerrar();
+ }
+);
+
+/**
+ * @brief Get client's disk configuration data
+ * @note Route: /ous/id1/labs/id2clients/id3/diskcfg, Method: GET
+ * @param id1 OU id.
+ * @param id2 lab id.
+ * @param id3 client id.
+ * @return JSON string with disk parameters
+ */
+$app->get('/ous/:ouid/labs/:labid/clients/:clntid/diskcfg(/)', 'validateApiKey',
+ function($ouid, $labid, $clntid) {
+ global $userid;
+ global $cmd;
+
+ $ouid = htmlspecialchars($ouid);
+ $labid = htmlspecialchars($labid);
+ $clntid = htmlspecialchars($clntid);
+ // Database query.
+ $cmd->texto = <<<EOD
+SELECT adm.idadministradorcentro, ordenadores.idordenador AS clientid,
+ ordenadores.nombreordenador, ordenadores_particiones.*, tipospar.tipopar,
+ sistemasficheros.nemonico, nombresos.nombreso, imagenes.nombreca,
+ (imagenes.revision - ordenadores_particiones.revision) AS difimagen
+ FROM ordenadores_particiones
+ RIGHT JOIN ordenadores USING(idordenador)
+ JOIN aulas USING(idaula)
+ RIGHT JOIN administradores_centros AS adm USING(idcentro)
+ LEFT JOIN tipospar USING(codpar)
+ LEFT JOIN sistemasficheros USING(idsistemafichero)
+ LEFT JOIN nombresos USING(idnombreso)
+ LEFT JOIN imagenes USING(idimagen)
+ WHERE adm.idadministradorcentro = '$userid'
+ AND adm.idcentro='$ouid'
+ AND aulas.idaula='$labid'
+ AND ordenadores.idordenador='$clntid'
+ ORDER BY numdisk ASC, numpar ASC;
+EOD;
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(false); // Error oppening recordset.
+ $rs->Primero();
+ // Check if user is an UO admin and client exists.
+ if (checkAdmin($rs->campos["idadministradorcentro"]) and checkParameter($rs->campos["clientid"])) {
+ // Read data.
+ $response['id'] = (int)$rs->campos["clientid"];
+ $response['name'] = $rs->campos["nombreordenador"];
+ $response['diskcfg'] = Array();
+ while (!$rs->EOF) {
+ // Skip header.
+ if ($rs->campos["numdisk"] == 0) {
+ $rs->Siguiente();
+ continue;
+ }
+ $tmp = Array();
+ // Common data.
+ $tmp['disk'] = (int)$rs->campos["numdisk"];
+ $tmp['size'] = (int)$rs->campos["tamano"];
+ if ($rs->campos["numpar"] == 0) {
+ // Disk data.
+ switch ($rs->campos["codpar"]) {
+ case 1: $tmp['parttable'] = "MSDOS"; break;
+ case 2: $tmp['parttable'] = "GPT"; break;
+ case 3: $tmp['parttable'] = "LVM"; break;
+ case 4: $tmp['parttable'] = "ZPOOL"; break;
+ default: $tmp['parttable'] = $rs->campos["codpar"];
+ }
+ } else {
+ // Partition data.
+ $tmp['partition'] = (int)$rs->campos["numpar"];
+ $tmp['parttype'] = $rs->campos["tipopar"];
+ $tmp['filesystem'] = $rs->campos["nemonico"];
+ $tmp['usage'] = (int)$rs->campos["uso"];
+ if ($rs->campos["nombreso"] != null) {
+ $tmp['os'] = $rs->campos["nombreso"];
+ if ($rs->campos["idimagen"] > 0) {
+ // Restored image data.
+ $tmp['image']['id'] = (int)$rs->campos["idimagen"];
+ $tmp['image']['deploydate'] = $rs->campos["fechadespliegue"];
+ // Check if image is updated.
+ $tmp['image']['updated'] = ($rs->campos["difimagen"]>0 ? "false" : "true");
+ }
+ }
+ //$tmp['cachedata'] = $rs->campos["cache"];
+ }
+ array_push($response['diskcfg'], $tmp);
+ $rs->Siguiente();
+ }
+ jsonResponse(200, $response);
+ }
+ $rs->Cerrar();
+ }
+);
+
+/**
+ * @brief Get client's execution status
+ * @note Route: /ous/id1/labs/id2clients/id3/status, Method: GET
+ * @param id1 OU id.
+ * @param id2 lab id.
+ * @param id3 client id.
+ * @return JSON string with client status
+ */
+$app->get('/ous/:ouid/labs/:labid/clients/:clntid/status(/)', 'validateApiKey', 'getStatus');
+
+/**
+ * @brief List all image repositories defined in an OU
+ * @note Route: /ous/id/repos, Method: GET
+ * @param id OU id.
+ * @return JSON array of all UO's repo data
+ */
+$app->get('/ous/:ouid/repos(/)', 'validateApiKey',
+ function($ouid) {
+ global $userid;
+ global $cmd;
+
+ $ouid = htmlspecialchars($ouid);
+ // Database query.
+ $cmd->texto = <<<EOD
+SELECT adm.idadministradorcentro, adm.idcentro AS ouid, repositorios.*
+ FROM repositorios
+ RIGHT JOIN administradores_centros AS adm USING(idcentro)
+ WHERE adm.idadministradorcentro = '$userid'
+ AND adm.idcentro='$ouid';
+EOD;
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(false); // Error oppening recordset.
+ $rs->Primero();
+ // Check if user is an UO admin.
+ if (checkAdmin($rs->campos["idadministradorcentro"]) and checkParameter($rs->campos["ouid"])) {
+ $response = Array();
+ while (!$rs->EOF) {
+ if (! is_null($rs->campos["idcentro"])) {
+ $tmp = Array();
+ $tmp['id'] = (int)$rs->campos["idrepositorio"];
+ $tmp['name'] = $rs->campos["nombrerepositorio"];
+ $tmp['ou']['id'] = (int)$ouid;
+ array_push($response, $tmp);
+ }
+ $rs->Siguiente();
+ }
+ jsonResponse(200, $response);
+ }
+ $rs->Cerrar();
+ }
+);
+
+/**
+ * @brief Get image repository data
+ * @note Route: /ous/id1/repos/id2, Method: GET
+ * @param id1 OU id.
+ * @param id2 repo id.
+ * @return JSON string with repo parameters
+ */
+$app->get('/ous/:ouid/repos/:repoid(/)', 'validateApiKey',
+ function($ouid, $repoid) {
+ global $userid;
+ global $cmd;
+
+ $ouid = htmlspecialchars($ouid);
+ $repoid = htmlspecialchars($repoid);
+ // Database query.
+ $cmd->texto = <<<EOD
+SELECT adm.idadministradorcentro, repositorios.*
+ FROM repositorios
+ RIGHT JOIN administradores_centros AS adm USING(idcentro)
+ WHERE adm.idadministradorcentro = '$userid'
+ AND adm.idcentro='$ouid'
+ AND idrepositorio='$repoid';
+EOD;
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(false); // Error oppening recordset.
+ $rs->Primero();
+ // Check if user is an UO admin and repo exists.
+ if (checkAdmin($rs->campos["idadministradorcentro"]) and checkParameter($rs->campos["idrepositorio"])) {
+ // Read data.
+ $response['id'] = (int)$rs->campos["idrepositorio"];
+ $response['name'] = $rs->campos["nombrerepositorio"];
+ $response['description'] = $rs->campos["comentarios"];
+ $response['ip'] = $rs->campos["ip"];
+ //$response['port'] = $rs->campos["puertorepo"];
+ jsonResponse(200, $response);
+ }
+ $rs->Cerrar();
+ }
+);
+
+/**
+ * @brief List all images defined in an OU
+ * @note Route: /ous/id/images, Method: GET
+ * @param id OU id.
+ * @return JSON array of all UO's image data
+ */
+$app->get('/ous/:ouid/images(/)', 'validateApiKey',
+ function($ouid) {
+ global $userid;
+ global $cmd;
+
+ $ouid = htmlspecialchars($ouid);
+ // Database query.
+ $cmd->texto = <<<EOD
+SELECT adm.idadministradorcentro, adm.idcentro AS ouid, imagenes.*
+ FROM imagenes
+ RIGHT JOIN administradores_centros AS adm USING(idcentro)
+ WHERE adm.idadministradorcentro = '$userid'
+ AND adm.idcentro='$ouid';
+EOD;
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(false); // Error oppening recordset.
+ $rs->Primero();
+ // Check if user is an UO admin.
+ if (checkAdmin($rs->campos["idadministradorcentro"]) and checkParameter($rs->campos["ouid"])) {
+ $response = Array();
+ while (!$rs->EOF) {
+ if (! is_null($rs->campos["idcentro"])) {
+ $tmp = Array();
+ $tmp['id'] = (int)$rs->campos["idimagen"];
+ $tmp['name'] = $rs->campos["nombreca"];
+ $tmp['inremotepc'] = $rs->campos["inremotepc"]==0 ? false: true;
+ $tmp['ou']['id'] = (int)$ouid;
+ array_push($response, $tmp);
+ }
+ $rs->Siguiente();
+ }
+ jsonResponse(200, $response);
+ }
+ }
+);
+
+/**
+ * @brief Get image data
+ * @note Route: /ous/id1/images/id2, Method: GET
+ * @param id1 OU id.
+ * @param id2 image id.
+ * @return JSON string with image parameters
+ */
+$app->get('/ous/:ouid/images/:imgid(/)', 'validateApiKey',
+ function($ouid, $imgid) {
+ global $userid;
+ global $cmd;
+
+ $ouid = htmlspecialchars($ouid);
+ $imgid = htmlspecialchars($imgid);
+ // Database query.
+ $cmd->texto = <<<EOD
+SELECT adm.idadministradorcentro, imagenes.*, nombreso AS os
+ FROM imagenes
+ RIGHT JOIN administradores_centros AS adm USING(idcentro)
+ LEFT JOIN perfilessoft USING(idperfilsoft)
+ LEFT JOIN nombresos USING(idnombreso)
+ WHERE adm.idadministradorcentro = '$userid'
+ AND adm.idcentro='$ouid'
+ AND idimagen='$imgid';
+EOD;
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(false); // Error oppening recordset.
+ $rs->Primero();
+ // Check if user is an UO admin and repo exists.
+ if (checkAdmin($rs->campos["idadministradorcentro"]) and checkParameter($rs->campos["idimagen"])) {
+ // Read data.
+ $response['id'] = (int)$rs->campos["idimagen"];
+ $response['name'] = $rs->campos["nombreca"];
+ $response['description'] = $rs->campos["descripcion"];
+ $response['comments'] = $rs->campos["comentarios"];
+ $response['inremotepc'] = $rs->campos["inremotepc"]==0 ? false: true;
+ $response['repo']['id'] = (int)$rs->campos["idrepositorio"];
+ switch ($rs->campos["tipo"]) {
+ // Image type.
+ case 1: $response['type'] = "monolithic"; break;
+ case 2: $response['type'] = "base"; break;
+ case 3: $response['type'] = "incremental";
+ $response['baseimg'] = $rs->campos["imagenid"];
+ $response['path'] = $rs->campos["ruta"];
+ break;
+ default: $response['type'] = $rs->campos["tipo"];
+ }
+ if ($rs->campos["idordenador"] != 0) {
+ // Source client data.
+ $response['client']['id'] = (int)$rs->campos["idordenador"];
+ $response['client']['disk'] = (int)$rs->campos["numdisk"];
+ $response['client']['partition'] = (int)$rs->campos["numpar"];
+ $response['creationdate'] = $rs->campos["fechacreacion"];
+ $response['release'] = (int)$rs->campos["revision"];
+ $response['os'] = $rs->campos["os"];
+ }
+ jsonResponse(200, $response);
+ }
+ $rs->Cerrar();
+ }
+);
+
+// Lista de softeare instalado en una imagen.
+$app->get('/ous/:ouid/images/:imgid/software(/)', 'validateApiKey',
+ function($ouid, $imgid) {
+ global $userid;
+ global $cmd;
+
+ $ouid = htmlspecialchars($ouid);
+ $imgid = htmlspecialchars($imgid);
+ // Database query.
+ $cmd->texto = <<<EOD
+SELECT adm.idadministradorcentro, imagenes.idimagen, imagenes.nombreca,
+ nombresos.nombreso, softwares.descripcion
+ FROM imagenes
+ RIGHT JOIN administradores_centros AS adm USING(idcentro)
+ LEFT JOIN perfilessoft USING(idperfilsoft)
+ LEFT JOIN nombresos USING(idnombreso)
+ LEFT JOIN perfilessoft_softwares USING(idperfilsoft)
+ LEFT JOIN softwares USING(idsoftware)
+ WHERE adm.idadministradorcentro = '$userid'
+ AND imagenes.idimagen='$imgid'
+ ORDER BY softwares.descripcion ASC;
+EOD;
+ $rs=new Recordset;
+ $rs->Comando=&$cmd;
+ if (!$rs->Abrir()) return(false); // Error oppening recordset.
+ $rs->Primero();
+ // Check if user is an UO admin and repo exists.
+ if (checkAdmin($rs->campos["idadministradorcentro"]) and checkParameter($rs->campos["idimagen"])) {
+ $response['id'] = (int)$rs->campos["idimagen"];
+ $response['name'] = $rs->campos["nombreca"];
+ if (is_null($rs->campos["nombreso"])) {
+ // Null object.
+ $response['software'] = Array();
+ jsonResponse(200, $response, JSON_FORCE_OBJECT);
+ } else {
+ // Read data.
+ $response['software']['os'] = $rs->campos["nombreso"];
+ //$response['software']['type'] = ...; // OS type
+ $response['software']['applications'] = Array();
+ while (!$rs->EOF) {
+ // Ignoring empty fields.
+ if (!is_null($rs->campos["descripcion"])) {
+ array_push($response['software']['application'], $rs->campos["descripcion"]);
+ }
+ $rs->Siguiente();
+ }
+ jsonResponse(200, $response);
+ }
+ }
+ $rs->Cerrar();
+ }
+);
+
+?>
diff --git a/admin/WebConsole/validacion/html/close.php b/admin/WebConsole/validacion/html/close.php
index 11a3c2e8..a6b197b6 100644
--- a/admin/WebConsole/validacion/html/close.php
+++ b/admin/WebConsole/validacion/html/close.php
@@ -1,4 +1,4 @@
-<?
+<?php
session_start();
$_SESSION["validated"] = false;
?>
diff --git a/admin/WebConsole/validacion/html/login_prueba.php b/admin/WebConsole/validacion/html/login_prueba.php
index 78b3c5ae..d7073b5e 100644
--- a/admin/WebConsole/validacion/html/login_prueba.php
+++ b/admin/WebConsole/validacion/html/login_prueba.php
@@ -1,4 +1,4 @@
-<?
+<?php
$path_parts = pathinfo(__FILE__);
?>
@@ -6,7 +6,7 @@ $path_parts = pathinfo(__FILE__);
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<title>OpenGnSys :::: Inicio de equipo - Men de opciones</title>
+<title>OpenGnsys :::: Inicio de equipo - Menú de opciones</title>
<style>
body {
margin:0;
diff --git a/admin/WebConsole/validacion/html/validacion_ldap.php b/admin/WebConsole/validacion/html/validacion_ldap.php
index 992bca05..1929402a 100644
--- a/admin/WebConsole/validacion/html/validacion_ldap.php
+++ b/admin/WebConsole/validacion/html/validacion_ldap.php
@@ -1,4 +1,4 @@
-<?
+<?php
function connect_to_ldap(){
$server = "IP_SERVIDOR";
diff --git a/admin/WebConsole/validacion/html/validacion_prueba.php b/admin/WebConsole/validacion/html/validacion_prueba.php
index 35c6c033..78ea208e 100644
--- a/admin/WebConsole/validacion/html/validacion_prueba.php
+++ b/admin/WebConsole/validacion/html/validacion_prueba.php
@@ -1,4 +1,4 @@
-<?
+<?php
/**
* Sincroniza una base de datos externa con la de opengnsys.
* No es necesaria su implementacion, puede dejarse en blanco
diff --git a/admin/WebConsole/validacion/html/validacion_template.php b/admin/WebConsole/validacion/html/validacion_template.php
index 77672a91..0ec37e30 100644
--- a/admin/WebConsole/validacion/html/validacion_template.php
+++ b/admin/WebConsole/validacion/html/validacion_template.php
@@ -1,4 +1,4 @@
-<?
+<?php
/**
* Sincroniza una base de datos externa con la de opengnsys.
* No es necesaria su implementacion, puede dejarse en blanco
diff --git a/admin/WebConsole/varios/acceso_operador.php b/admin/WebConsole/varios/acceso_operador.php
index 3d88da6b..abbfa162 100644
--- a/admin/WebConsole/varios/acceso_operador.php
+++ b/admin/WebConsole/varios/acceso_operador.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -84,7 +84,7 @@ function PulsaEnter(oEvento){
</DIV>
</FORM>
</DIV>
-<?
+<?php
//________________________________________________________________________________________________________
// Posiciona cursor en campo usuario y muestra mensaje de error si lo hubiera
echo '<SCRIPT LANGUAGE="javascript">';
diff --git a/admin/WebConsole/varios/accesoperadores.php b/admin/WebConsole/varios/accesoperadores.php
index f46078ec..2a108660 100644
--- a/admin/WebConsole/varios/accesoperadores.php
+++ b/admin/WebConsole/varios/accesoperadores.php
@@ -1,4 +1,4 @@
-<?
+<?php
// ********************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -31,7 +31,7 @@ $rs=new Recordset;
$cmd->texto="SELECT usuarios.idusuario,usuarios.idtipousuario
FROM usuarios
INNER JOIN administradores_centros ON administradores_centros.idusuario=usuarios.idusuario
- WHERE usuarios.usuario='".$usu."' AND usuarios.pasguor='".$pss."'";
+ WHERE usuarios.usuario='".$usu."' AND usuarios.pasguor=SHA2('".$pss."',224)";
$rs->Comando=&$cmd;
if (!$rs->Abrir()){
diff --git a/admin/WebConsole/varios/accionmenu.php b/admin/WebConsole/varios/accionmenu.php
index a1ed4942..b2f30900 100644
--- a/admin/WebConsole/varios/accionmenu.php
+++ b/admin/WebConsole/varios/accionmenu.php
@@ -71,19 +71,19 @@ else{ // Viene de menus
<SCRIPT language="javascript" src="../jscripts/accionmenu.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/comunes.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/accionmenu_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/accionmenu_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<FORM name="fdatos">
- <input type=hidden value="<? echo $idcentro?>" id=idcentro>
- <input type=hidden value="<? echo $idtipoaccion?>" id=idtipoaccion>
- <input type=hidden value="<? echo $tipoaccion?>" id=tipoaccion>
+ <input type=hidden value="<?php echo $idcentro?>" id=idcentro>
+ <input type=hidden value="<?php echo $idtipoaccion?>" id=idtipoaccion>
+ <input type=hidden value="<?php echo $tipoaccion?>" id=tipoaccion>
</FORM>
<P align=center class=cabeceras><?php echo $litcabecera ?><br>
- <span align=center class=subcabeceras><?echo $TbMsg[1]?></span>&nbsp;<img src="../images/iconos/menus.gif"><br><br>
+ <span align=center class=subcabeceras><?php echo $TbMsg[1]?></span>&nbsp;<img src="../images/iconos/menus.gif"><br><br>
<span align=center class=presentaciones>
<img src="<?php echo $urlimg?>">&nbsp;&nbsp;&nbsp;
- <u><?php echo $litacion?></u>:&nbsp;<? echo $litdescri?></span>
+ <u><?php echo $litacion?></u>:&nbsp;<?php echo $litdescri?></span>
</P>
<DIV align=center id="Layer_items">
<TABLE width="90%" class="tabla_listados" cellspacing=1 cellpadding=0 >
@@ -95,10 +95,10 @@ else{ // Viene de menus
else
echo '<TH align=center>'.$TbMsg[15].'</TH>';
?>
- <TH><?echo $TbMsg[10]?></TH>
- <TH><?echo $TbMsg[11]?></TH>
- <TH><?echo $TbMsg[12]?></TH>
- <TH><?echo $TbMsg[13]?></TH>
+ <TH><?php echo $TbMsg[10]?></TH>
+ <TH><?php echo $TbMsg[11]?></TH>
+ <TH><?php echo $TbMsg[12]?></TH>
+ <TH><?php echo $TbMsg[13]?></TH>
<?php
if($op==2){ // Si viene desde "menus" ...
echo '<TH style="visibility:hidden">&nbsp;</TH>';
@@ -106,7 +106,7 @@ else{ // Viene de menus
}
?>
</TR>
-<?
+<?php
//________________________________________________________________________________________________________
if(!empty($idmenu)) // Viene de la página de menús
@@ -151,19 +151,19 @@ else
<BR>
<TABLE align=center>
<TR>
- <TD><A href="#botones"><IMG border=0 src="../images/boton_confirmar.gif" onclick="javascript:confirmar(<? echo $op?>)" ></A></TD>
+ <TD><A href="#botones"><IMG border=0 src="../images/boton_confirmar.gif" onclick="javascript:confirmar(<?php echo $op?>)" ></A></TD>
</TR>
</TABLE>
<BR>
<DIV id="Layer_nota" align=center>
- <SPAN align=center class=notas><I><? echo$TbMsg[14]?></I></SPAN>
+ <SPAN align=center class=notas><I><?php echo$TbMsg[14]?></I></SPAN>
</DIV>
</FORM>
</BODY>
</HTML>
-<?
+<?php
//________________________________________________________________________________________________________
// Descripción:
// Muestra la tabla de items a incluir en menús
diff --git a/admin/WebConsole/varios/administradores_centros.php b/admin/WebConsole/varios/administradores_centros.php
index eb568cee..9337d1be 100644
--- a/admin/WebConsole/varios/administradores_centros.php
+++ b/admin/WebConsole/varios/administradores_centros.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *******************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -31,17 +31,17 @@ if (!$cmd)
<SCRIPT language="javascript" src="../jscripts/administradores_centros.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/administradores_centros_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/administradores_centros_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<FORM name="fdatos">
- <INPUT type=hidden value="<? echo $idcentro?>" id=idcentro>
+ <INPUT type=hidden value="<?php echo $idcentro?>" id=idcentro>
- <P align=center class=cabeceras><?echo $nombrecentro?></SPAN>&nbsp;<IMG src="../images/iconos/centros.gif">
+ <P align=center class=cabeceras><?php echo $nombrecentro?></SPAN>&nbsp;<IMG src="../images/iconos/centros.gif">
<BR>
- <SPAN align=center class=subcabeceras><?echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/confisoft.gif"></P>
+ <SPAN align=center class=subcabeceras><?php echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/confisoft.gif"></P>
- <?
+ <?php
$rs=new Recordset;
// Administradores asignados
$cmd->texto="SELECT usuarios.idusuario,usuarios.nombre ,usuarios.idtipousuario FROM usuarios
@@ -110,7 +110,7 @@ if (!$cmd)
</TABLE>
<DIV id="Layer_nota" align=center >
<BR>
- <SPAN align=center class=notas><I><?echo $TbMsg[4]?></I></SPAN>
+ <SPAN align=center class=notas><I><?php echo $TbMsg[4]?></I></SPAN>
</DIV>
</FORM>
</BODY>
diff --git a/admin/WebConsole/varios/administradores_usuarios.php b/admin/WebConsole/varios/administradores_usuarios.php
index 62caf965..824e529b 100644
--- a/admin/WebConsole/varios/administradores_usuarios.php
+++ b/admin/WebConsole/varios/administradores_usuarios.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *******************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -31,17 +31,17 @@ if (!$cmd)
<SCRIPT language="javascript" src="../jscripts/administradores_usuarios.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/administradores_usuarios_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/administradores_usuarios_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<FORM name="fdatos">
- <INPUT type=hidden value="<? echo $idusuario?>" id=idusuario>
+ <INPUT type=hidden value="<?php echo $idusuario?>" id=idusuario>
- <P align=center class=cabeceras><?echo $nombre?></SPAN>&nbsp;<IMG src="../images/iconos/administradores.gif">
+ <P align=center class=cabeceras><?php echo $nombre?></SPAN>&nbsp;<IMG src="../images/iconos/administradores.gif">
<BR>
- <SPAN align=center class=subcabeceras><?echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/confisoft.gif"></P>
+ <SPAN align=center class=subcabeceras><?php echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/confisoft.gif"></P>
- <?
+ <?php
$rs=new Recordset;
// Usuarios asignados
$cmd->texto="SELECT centros.idcentro,centros.nombrecentro, centros.identidad FROM centros
@@ -101,7 +101,7 @@ if (!$cmd)
</TABLE>
<DIV id="Layer_nota" align=center >
<BR>
- <SPAN align=center class=notas><I><?echo $TbMsg[4]?></I></SPAN>
+ <SPAN align=center class=notas><I><?php echo $TbMsg[4]?></I></SPAN>
</DIV>
</FORM>
</BODY>
diff --git a/admin/WebConsole/varios/calendario_ventana.php b/admin/WebConsole/varios/calendario_ventana.php
index 64e403f7..32dfc880 100644
--- a/admin/WebConsole/varios/calendario_ventana.php
+++ b/admin/WebConsole/varios/calendario_ventana.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -153,10 +153,10 @@ function borrar_fecha(){
</HEAD>
<BODY>
<FORM action="calendario_ventana.php" name="fdatos" method="post">
- <INPUT type=hidden name=dia_elegido value="<? echo $dia_elegido?>">
- <INPUT type=hidden name=mes_elegido value="<? echo $mes_elegido?>">
- <INPUT type=hidden name=anno_elegido value="<? echo $anno_elegido?>">
- <?
+ <INPUT type=hidden name=dia_elegido value="<?php echo $dia_elegido?>">
+ <INPUT type=hidden name=mes_elegido value="<?php echo $mes_elegido?>">
+ <INPUT type=hidden name=anno_elegido value="<?php echo $anno_elegido?>">
+ <?php
$mialmanaque=new Almanaque("tabla_meses");
echo '<TABLE align="center">';
diff --git a/admin/WebConsole/varios/consulta_programaciones.php b/admin/WebConsole/varios/consulta_programaciones.php
index 93b11b2a..9fce6c69 100644
--- a/admin/WebConsole/varios/consulta_programaciones.php
+++ b/admin/WebConsole/varios/consulta_programaciones.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/varios/desplegablesambitos.php b/admin/WebConsole/varios/desplegablesambitos.php
index fc41f0bd..6a174f9b 100644
--- a/admin/WebConsole/varios/desplegablesambitos.php
+++ b/admin/WebConsole/varios/desplegablesambitos.php
@@ -1,4 +1,4 @@
-<?
+<?php
//*******************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/varios/ejecutaracciones.php b/admin/WebConsole/varios/ejecutaracciones.php
index dd7c6c7c..11686bd8 100644
--- a/admin/WebConsole/varios/ejecutaracciones.php
+++ b/admin/WebConsole/varios/ejecutaracciones.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -51,16 +51,16 @@ $arbol=new ArbolVistaXml($arbolXML,0,$baseurlimg,$clasedefault,1,20,100,1,$titul
<SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/ejecutaracciones.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/ejecutaracciones_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comunes_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/ejecutaracciones_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY OnContextMenu="return false">
<FORM name="fdatos">
- <INPUT type=hidden name=ambito value=<?=$ambito?>>
- <INPUT type=hidden name=idambito value=<?=$idambito?>>
+ <INPUT type=hidden name=ambito value=<?php echo $ambito?>>
+ <INPUT type=hidden name=idambito value=<?php echo $idambito?>>
</FORM>
-<?
+<?php
switch($ambito){
case $AMBITO_CENTROS :
$urlimg='../images/iconos/centros.gif';
@@ -88,7 +88,7 @@ switch($ambito){
?>
<BR>
<BR>
-<?
+<?php
//________________________________________________________________________________________________________
echo $arbol->CreaArbolVistaXML(); // Crea árbol (HTML) a partir del XML
$flotante=new MenuContextual(); // Crea objeto MenuContextual
@@ -99,7 +99,7 @@ echo $flotante->CreaMenuContextual($XMLcontextual);
?>
</BODY>
</HTML>
-<?
+<?php
// *************************************************************************************************************************************************
// Devuelve una cadena con formato XML con toda la información de las acciones registradas en un Centro concreto
// Parametros: PROCEDIMIENTO
diff --git a/admin/WebConsole/varios/ejecutaritem.php b/admin/WebConsole/varios/ejecutaritem.php
index 9c4b9c87..ad3dbe48 100644
--- a/admin/WebConsole/varios/ejecutaritem.php
+++ b/admin/WebConsole/varios/ejecutaritem.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/WebConsole/varios/horareser_ventana.php b/admin/WebConsole/varios/horareser_ventana.php
index 7e7f7fe3..e298c48c 100644
--- a/admin/WebConsole/varios/horareser_ventana.php
+++ b/admin/WebConsole/varios/horareser_ventana.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -77,7 +77,7 @@ function borrar_fecha(){
</SCRIPT>
</HEAD>
<BODY>
- <?
+ <?php
$micalendario=new Calendario("tabla_meses");
echo '<DIV style="position:absolute;top:5px;left:10px">';
echo '<img style="cursor:hand" SRC="../images/iconos/salir_on.gif" onclick="cerrar_ventana()">';
diff --git a/admin/WebConsole/varios/horario_ventana.php b/admin/WebConsole/varios/horario_ventana.php
index 2ca7357d..f31ce225 100644
--- a/admin/WebConsole/varios/horario_ventana.php
+++ b/admin/WebConsole/varios/horario_ventana.php
@@ -1,4 +1,4 @@
-<?
+<?php
include_once("../includes/ctrlacc.php");
include_once("../idiomas/php/".$idioma."/clases/Almanaque_".$idioma.".php");
$hora="";
@@ -67,7 +67,7 @@ function borrar_fecha(){
</SCRIPT>
</HEAD>
<BODY>
- <?
+ <?php
$mialmanaque=new Almanaque("tabla_meses");
echo '<DIV style="position:absolute;top:5px;left:10px">';
echo '<img style="cursor:hand" SRC="../images/iconos/salir_on.gif" onclick="cerrar_ventana()">';
diff --git a/admin/WebConsole/varios/incluiracciones.php b/admin/WebConsole/varios/incluiracciones.php
index c9ed216d..8b04f4a2 100644
--- a/admin/WebConsole/varios/incluiracciones.php
+++ b/admin/WebConsole/varios/incluiracciones.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -68,44 +68,44 @@ else{ // Viene de menus
<SCRIPT language="javascript" src="../jscripts/accionmenu.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/util.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/accionmenu_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/accionmenu_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<FORM name="fdatos">
- <input type=hidden value="<? echo $idcentro?>" id=idcentro>
- <input type=hidden value="<? echo $idtipoaccion?>" id=idtipoaccion>
- <input type=hidden value="<? echo $tipoaccion?>" id=tipoaccion>
+ <input type=hidden value="<?php echo $idcentro?>" id=idcentro>
+ <input type=hidden value="<?php echo $idtipoaccion?>" id=idtipoaccion>
+ <input type=hidden value="<?php echo $tipoaccion?>" id=tipoaccion>
</FORM>
<P align=center class=cabeceras>
- <? echo $litcabecera ?><br>
- <span align=center class=subcabeceras><?echo $TbMsg[1]?></span>&nbsp;<img src="../images/iconos/menus.gif"><br><br>
+ <?php echo $litcabecera ?><br>
+ <span align=center class=subcabeceras><?php echo $TbMsg[1]?></span>&nbsp;<img src="../images/iconos/menus.gif"><br><br>
<span align=center class=presentaciones>
- <img src="<? echo $urlimg?>">&nbsp;&nbsp;&nbsp;
- <u><? echo $litacion?></u>:&nbsp;<? echo $litdescri?></span>
+ <img src="<?php echo $urlimg?>">&nbsp;&nbsp;&nbsp;
+ <u><?php echo $litacion?></u>:&nbsp;<?php echo $litdescri?></span>
</P>
<DIV align=center id="Layer_items">
<TABLE width="90%" class="tabla_listados" cellspacing=1 cellpadding=0 >
<TR id="TR_menus">
<TH>&nbsp;</TH>
- <?
+ <?php
if($op==1) // Si viene desde "acciones" ...
echo '<TH>'.$TbMsg[9].'</TH>';
else
echo '<TH align=center>'.$TbMsg[15].'</TH>';
?>
- <TH><?echo $TbMsg[10]?></TH>
- <TH><?echo $TbMsg[11]?></TH>
- <TH><?echo $TbMsg[12]?></TH>
- <TH><?echo $TbMsg[13]?></TH>
- <?
+ <TH><?php echo $TbMsg[10]?></TH>
+ <TH><?php echo $TbMsg[11]?></TH>
+ <TH><?php echo $TbMsg[12]?></TH>
+ <TH><?php echo $TbMsg[13]?></TH>
+ <?php
if($op==2){ // Si viene desde "menus" ...
echo '<TH style="visibility:hidden">&nbsp;</TH>';
echo '<TH style="visibility:hidden">&nbsp;</TH>';
}
?>
</TR>
-<?
+<?php
//________________________________________________________________________________________________________
if(!empty($idmenu)) // Viene de la página de menús
@@ -150,19 +150,19 @@ else
<BR>
<TABLE align=center>
<TR>
- <TD><A href="#botones"><IMG border=0 src="../images/boton_confirmar.gif" onclick="javascript:confirmar(<? echo $op?>)" ></A></TD>
+ <TD><A href="#botones"><IMG border=0 src="../images/boton_confirmar.gif" onclick="javascript:confirmar(<?php echo $op?>)" ></A></TD>
</TR>
</TABLE>
<BR>
<DIV id="Layer_nota" align=center>
- <SPAN align=center class=notas><I><? echo$TbMsg[14]?></I></SPAN>
+ <SPAN align=center class=notas><I><?php echo$TbMsg[14]?></I></SPAN>
</DIV>
</FORM>
</BODY>
</HTML>
-<?
+<?php
//________________________________________________________________________________________________________
// Descripción:
// Muestra la tabla de items a incluir en menús
diff --git a/admin/WebConsole/varios/inclusionacciones.php b/admin/WebConsole/varios/inclusionacciones.php
index 452cfd28..36f6619b 100644
--- a/admin/WebConsole/varios/inclusionacciones.php
+++ b/admin/WebConsole/varios/inclusionacciones.php
@@ -44,10 +44,10 @@ $tbParametros=CreaTablaParametros($cmd); // Crea tabla en memmoria para acceder
<SCRIPT language="javascript" src="../jscripts/inclusionacciones.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/comunes.js"></SCRIPT>
- <SCRIPT language="javascript" src="../idiomas/javascripts/<? echo $idioma?>/inclusionacciones_<? echo $idioma?>.js"></SCRIPT>
+ <SCRIPT language="javascript" src="../idiomas/javascripts/<?php echo $idioma?>/inclusionacciones_<?php echo $idioma?>.js"></SCRIPT>
</HEAD>
<BODY>
- <?
+ <?php
switch($tipoaccion){
case $AMBITO_PROCEDIMIENTOS:
$urlimg="../images/iconos/procedimiento.gif";
@@ -61,12 +61,12 @@ $tbParametros=CreaTablaParametros($cmd); // Crea tabla en memmoria para acceder
break;
}
?>
- <P align=center class=cabeceras><IMG src="../images/iconos/acciones.gif">&nbsp;<?echo $literal?><BR>
- <SPAN align=center class=subcabeceras><?echo $descripcionaccion?></SPAN>&nbsp;<IMG src="<? echo $urlimg?>"></P>
+ <P align=center class=cabeceras><IMG src="../images/iconos/acciones.gif">&nbsp;<?php echo $literal?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $descripcionaccion?></SPAN>&nbsp;<IMG src="<?php echo $urlimg?>"></P>
<TABLE align=center border=0>
<TR>
- <?
+ <?php
$conTR=0; // Contador de lineas (Identificadores de las filas)
switch($tipoaccion){
case $AMBITO_PROCEDIMIENTOS:
@@ -82,13 +82,13 @@ $tbParametros=CreaTablaParametros($cmd); // Crea tabla en memmoria para acceder
</TR>
</TABLE>
<FORM name="fdatos">
- <INPUT type="hidden" name="conTR" value="<?echo $conTR?>">
- <INPUT type="hidden" name="tipoaccion" value="<?echo $tipoaccion?>">
- <INPUT type="hidden" name="idtipoaccion" value="<?echo $idtipoaccion?>">
+ <INPUT type="hidden" name="conTR" value="<?php echo $conTR?>">
+ <INPUT type="hidden" name="tipoaccion" value="<?php echo $tipoaccion?>">
+ <INPUT type="hidden" name="idtipoaccion" value="<?php echo $idtipoaccion?>">
</FORM>
</BODY>
</HTML>
-<?
+<?php
// *************************************************************************************************************************************************
function listaProcedientos($cmd,$idprocedimiento)
{
diff --git a/admin/WebConsole/varios/incorporaordenadores.php b/admin/WebConsole/varios/incorporaordenadores.php
index 756a8f5c..24b75cb3 100644
--- a/admin/WebConsole/varios/incorporaordenadores.php
+++ b/admin/WebConsole/varios/incorporaordenadores.php
@@ -49,11 +49,11 @@ if(!empty($contenido)){ // Se ha introducido contenido en lugar de fichero
<BODY>
<FORM action="incorporaordenadores.php" method="post" name="fdatos">
<INPUT type=hidden name=swf value=1>
- <INPUT type=hidden name=idaula value=<?echo $idaula?>>
- <INPUT type=hidden name=nombreaula value=<?echo $nombreaula?>>
+ <INPUT type=hidden name=idaula value=<?php echo $idaula?>>
+ <INPUT type=hidden name=nombreaula value=<?php echo $nombreaula?>>
<BR>
- <P align=center class=cabeceras><?echo $TbMsg[0]?><BR>
- <SPAN align=center class=subcabeceras><IMG src="../images/iconos/aula.gif">&nbsp;<?echo $TbMsg[1].":".$nombreaula ?></SPAN></P>
+ <P align=center class=cabeceras><?php echo $TbMsg[0]?><BR>
+ <SPAN align=center class=subcabeceras><IMG src="../images/iconos/aula.gif">&nbsp;<?php echo $TbMsg[1].":".$nombreaula ?></SPAN></P>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<table align="center" class="tabla_datos" border="0" cellpadding="0" cellspacing="1">
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
@@ -94,45 +94,45 @@ function procesaLineas($cmd,$idaula,$buffer)
$MAC="";
$IP="";
$sw=false;
- $posa=-1;
- while($posa<strlen($buffer)){
- if ('host'==substr($buffer,$posa,4)){
- $posa=$posa+4;
- $posb=$posa;
- while( substr($buffer,$posb,1)!="{") $posb++;
- $nombre=substr($buffer,$posa,$posb-$posa);
- }
- if ('hardware ethernet'==substr($buffer,$posa,17)){
- $posa=$posa+17;
- $posb=$posa;
- while( substr($buffer,$posb,1)!=";") $posb++;
- $MAC=substr($buffer,$posa,$posb-$posa);
- }
+ $equipos = preg_split('/}/',$buffer);
- if ('fixed-address'==substr($buffer,$posa,13)){
- $posa=$posa+13;
- $posb=$posa;
- while( substr($buffer,$posb,1)!=";")
- $posb++;
- $IP=substr($buffer,$posa,$posb-$posa);
- }
- if(!empty($nombre) && !empty($MAC) && !empty($IP)){
- if(!Inserta($cmd,$idaula,$nombre,$MAC,$IP))
- return(4);
- $sw=true;
- $nombre="";
- $MAC="";
- $IP="";
- $resul=true;
- }
- $posa++;
+ // Recorro todos los equipos
+ foreach ($equipos as $equipo) {
+ $nombre = strstr($equipo, '{', true);
+ $nombre = str_replace('host', '', $nombre);
+ $valores = strstr($equipo, '{');
+ // Eliminamos caracteres inútiles
+ $valores = str_replace(array (' ','{',':'), '',$valores);
+
+ $propiedades = preg_split('/;/',$valores);
+
+ // Recorro todas las propiedades
+ foreach ($propiedades as $propiedad) {
+ if (strpos (" $propiedad " , "fixed-address")) {
+ $IP = str_replace("fixed-address", '', $propiedad);
+ }
+ if (strpos ( " $propiedad " , "hardwareethernet")) {
+ $MAC = str_replace("hardwareethernet", '', $propiedad);
+ }
+ }
+
+ // Si tengo los valores necesario incluyo el equipo
+ if(!empty($nombre) && !empty($MAC) && !empty($IP)){
+ if(!Inserta($cmd,$idaula,$nombre,$MAC,$IP)) {
+ return(4);
+ }
+ $sw=true;
+ $nombre="";
+ $MAC="";
+ $IP="";
+ $resul=true;
+ }
}
if($sw)
- return(3);
+ return(3);
else
- return(4);
-
+ return(4);
}
//________________________________________________________________________________________________________
function Inserta($cmd,$idaula,$nombre,$lamac,$laip)
diff --git a/admin/WebConsole/varios/incrementalcomponente_soft.php b/admin/WebConsole/varios/incrementalcomponente_soft.php
index 8b38bfd8..bf3214da 100644
--- a/admin/WebConsole/varios/incrementalcomponente_soft.php
+++ b/admin/WebConsole/varios/incrementalcomponente_soft.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -29,24 +29,24 @@ if (!$cmd)
<LINK rel="stylesheet" type="text/css" href="../estilos.css">
<SCRIPT language="javascript" src="../jscripts/incrementalcomponente_soft.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/incrementalcomponente_soft_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/incrementalcomponente_soft_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<FORM name="fdatos">
- <INPUT type=hidden value="<? echo $idcentro?>" id=idcentro>
- <INPUT type=hidden value="<? echo $idsoftincremental?>" id=idsoftincremental>
- <P align=center class=cabeceras><?echo $TbMsg[0]?><BR>
- <SPAN align=center class=subcabeceras><?echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/confisoft.gif"></P>
+ <INPUT type=hidden value="<?php echo $idcentro?>" id=idcentro>
+ <INPUT type=hidden value="<?php echo $idsoftincremental?>" id=idsoftincremental>
+ <P align=center class=cabeceras><?php echo $TbMsg[0]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/confisoft.gif"></P>
<BR>
<DIV align=center id="Layer_componentes">
- <SPAN align=center class=presentaciones><B><U><?echo $TbMsg[2]?></U>:&nbsp;<? echo $descripcionincremental?></B></SPAN></P>
+ <SPAN align=center class=presentaciones><B><U><?php echo $TbMsg[2]?></U>:&nbsp;<?php echo $descripcionincremental?></B></SPAN></P>
<TABLE width="100%" class="tabla_listados" cellspacing=1 cellpadding=0 >
<TR>
<TH>&nbsp</TH>
<TH>T</TH>
- <TH><?echo $TbMsg[3]?></TH>
+ <TH><?php echo $TbMsg[3]?></TH>
</TR>
- <?
+ <?php
$rs=new Recordset;
$cmd->texto='SELECT softwares.idsoftware,softwares.descripcion,tiposoftwares.descripcion as hdescripcion,tiposoftwares.urlimg FROM softwares INNER JOIN softincremental_softwares ON softwares.idsoftware=softincremental_softwares.idsoftware INNER JOIN tiposoftwares ON softwares.idtiposoftware=tiposoftwares.idtiposoftware WHERE softincremental_softwares.idsoftincremental='.$idsoftincremental.' ORDER BY tiposoftwares.idtiposoftware,softwares.descripcion';
$rs->Comando=&$cmd;
@@ -93,10 +93,10 @@ if (!$cmd)
</DIV>
<DIV id="Layer_nota" align=center >
<BR>
- <SPAN align=center class=notas><I><?echo $TbMsg[4]?></I></SPAN>
+ <SPAN align=center class=notas><I><?php echo $TbMsg[4]?></I></SPAN>
</DIV>
</FORM>
-<?
+<?php
//________________________________________________________________________________________________________
include_once("../includes/iframecomun.php");
//________________________________________________________________________________________________________
diff --git a/admin/WebConsole/varios/informacion_acciones.php b/admin/WebConsole/varios/informacion_acciones.php
index b2223a00..130fa3b8 100644
--- a/admin/WebConsole/varios/informacion_acciones.php
+++ b/admin/WebConsole/varios/informacion_acciones.php
@@ -70,7 +70,7 @@ $arbol=new ArbolVistaXml($cadenaXML,0,$baseurlimg,$clasedefault,1,20,130,1,$titu
?>
<P align=center class=cabeceras><?php echo $litcab?><BR>
<SPAN align=center class=subcabeceras><?php echo $litsub?></SPAN>&nbsp;<IMG src="../images/iconos/acciones.gif"><BR>
- <IMG src="<?php echo $urlimg?>"><SPAN class=presentaciones>&nbsp;&nbsp;<?echo $descripcionaccion?></SPAN></P>
+ <IMG src="<?php echo $urlimg?>"><SPAN class=presentaciones>&nbsp;&nbsp;<?php echo $descripcionaccion?></SPAN></P>
<?php echo urldecode($arbol->CreaArbolVistaXml()); // Crea arbol de configuraciones?>
</BODY>
</HTML>
diff --git a/admin/WebConsole/varios/informacion_imagenes.php b/admin/WebConsole/varios/informacion_imagenes.php
index b8f49a64..8f43725a 100644
--- a/admin/WebConsole/varios/informacion_imagenes.php
+++ b/admin/WebConsole/varios/informacion_imagenes.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -41,14 +41,14 @@ $arbol=new ArbolVistaXml($arbolXML,0,$baseurlimg,$clasedefault,1,20,130,1,$titul
<SCRIPT language="javascript" src="../clases/jscripts/ArbolVistaXML.js"></SCRIPT>
</HEAD>
<BODY>
- <P align=center class=cabeceras><?echo $TbMsg[0]?><BR>
- <SPAN align=center class=subcabeceras><?echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/imagenes.gif"><BR><BR>
- <IMG src="../images/iconos/imagen.gif"><SPAN class=presentaciones>&nbsp;&nbsp;<U><?echo $TbMsg[2]?></U>: <? echo $descripcionimagen?></SPAN></P>
- <?echo $arbol->CreaArbolVistaXml(); // Crea arbol de configuraciones
+ <P align=center class=cabeceras><?php echo $TbMsg[0]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/imagenes.gif"><BR><BR>
+ <IMG src="../images/iconos/imagen.gif"><SPAN class=presentaciones>&nbsp;&nbsp;<U><?php echo $TbMsg[2]?></U>: <?php echo $descripcionimagen?></SPAN></P>
+ <?php echo $arbol->CreaArbolVistaXml(); // Crea arbol de configuraciones
?>
</BODY>
</HTML>
-<?
+<?php
/**************************************************************************************************************************************************
Devuelve una cadena con formato XML de toda la información de las imagenes
Parametros:
@@ -158,11 +158,14 @@ function SubarbolXML_Ordenadores($cmd,$idimagen)
$cadenaXML="";
$gidaula=null;
- $cmd->texto="SELECT DISTINCT aulas.idaula,aulas.nombreaula,ordenadores.idordenador,ordenadores.nombreordenador,
- ordenadores_particiones.numpar,ordenadores.idperfilhard FROM ordenadores
- INNER JOIN aulas ON ordenadores.idaula=aulas.idaula
- INNER JOIN ordenadores_particiones ON ordenadores_particiones.idordenador=ordenadores.idordenador
- WHERE ordenadores_particiones.idimagen=".$idimagen." ORDER BY aulas.idaula,ordenadores.nombreordenador";
+ $cmd->texto="SELECT DISTINCT aulas.idaula, aulas.nombreaula, ordenadores.idordenador,
+ ordenadores.nombreordenador, ordenadores.idperfilhard,
+ ordenadores_particiones.numdisk, ordenadores_particiones.numpar
+ FROM ordenadores
+ INNER JOIN aulas ON ordenadores.idaula=aulas.idaula
+ INNER JOIN ordenadores_particiones ON ordenadores_particiones.idordenador=ordenadores.idordenador
+ WHERE ordenadores_particiones.idimagen='$idimagen'
+ ORDER BY aulas.idaula, ordenadores.nombreordenador";
$rs=new Recordset;
$rs->Comando=&$cmd;
if (!$rs->Abrir()) return($cadenaXML); // Error al abrir recordset
@@ -188,7 +191,7 @@ function SubarbolXML_Ordenadores($cmd,$idimagen)
$cadenaXML.='<ORDENADOR';
// Atributos
$cadenaXML.=' imagenodo="../images/iconos/ordenador.gif"';
- $litpar="(Par:".$rs->campos["numpar"].")";
+ $litpar="(Par:".$rs->campos["numdisk"].",".$rs->campos["numpar"].")";
$cadenaXML.=' infonodo="'.$rs->campos["nombreordenador"].' '.$litpar.'"' ;
$cadenaXML.='></ORDENADOR>';
$rs->Siguiente();
@@ -196,7 +199,7 @@ function SubarbolXML_Ordenadores($cmd,$idimagen)
if ($gidaula)
$cadenaXML.='</AULA>';
if ($rs->numeroderegistros>0)
- $cadenaXML.='</ORDENADORES>';
+ $cadenaXML.='</ORDENADORES>';
$rs->Cerrar();
return($cadenaXML);
}
diff --git a/admin/WebConsole/varios/informacion_menus.php b/admin/WebConsole/varios/informacion_menus.php
index f70fc5ad..9fd36731 100644
--- a/admin/WebConsole/varios/informacion_menus.php
+++ b/admin/WebConsole/varios/informacion_menus.php
@@ -1,4 +1,4 @@
-<?
+<?php
// ******************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -47,23 +47,23 @@ $arbol=new ArbolVistaXml($arbolXML,0,$baseurlimg,$clasedefault,1,20,130,1,$titul
<SCRIPT language="javascript" src="../jscripts/informacion_menus.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/comunes.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/informacion_menus_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/informacion_menus_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<FORM name=fdatos>
- <input type=hidden value="<? echo $idmenu?>" id=idmenu>
- <input type=hidden value="<? echo $contitempub?>" id=contitempub>
- <input type=hidden value="<? echo $contitempri?>" id=contitempri>
+ <input type=hidden value="<?php echo $idmenu?>" id=idmenu>
+ <input type=hidden value="<?php echo $contitempub?>" id=contitempub>
+ <input type=hidden value="<?php echo $contitempri?>" id=contitempri>
</FORM>
- <p align=center class=cabeceras><?echo $TbMsg[0]?><br>
- <span align=center class=subcabeceras><?echo $TbMsg[1]?></span>&nbsp;<img src="../images/iconos/menus.gif"><br>
- <img src="../images/iconos/menu.gif"><span class=presentaciones>&nbsp;&nbsp;<u><?echo $TbMsg[2]?></u>: <? echo $descripcionmenu?></span></p>
- <?
+ <p align=center class=cabeceras><?php echo $TbMsg[0]?><br>
+ <span align=center class=subcabeceras><?php echo $TbMsg[1]?></span>&nbsp;<img src="../images/iconos/menus.gif"><br>
+ <img src="../images/iconos/menu.gif"><span class=presentaciones>&nbsp;&nbsp;<u><?php echo $TbMsg[2]?></u>: <?php echo $descripcionmenu?></span></p>
+ <?php
echo $arbol->CreaArbolVistaXML(); // Crea arbol de configuraciones
?>
</BODY>
</HTML>
-<?
+<?php
// *************************************************************************************************************************************************
function CreaArbol($cmd,$idmenu){
$cadenaXML=SubarbolXML_Menus($cmd,$idmenu);
diff --git a/admin/WebConsole/varios/informacion_perfileshardware.php b/admin/WebConsole/varios/informacion_perfileshardware.php
index e23e31b0..0d399471 100644
--- a/admin/WebConsole/varios/informacion_perfileshardware.php
+++ b/admin/WebConsole/varios/informacion_perfileshardware.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -41,13 +41,13 @@ $arbol=new ArbolVistaXml($arbolXML,0,$baseurlimg,$clasedefault,1,20,130,1,$titul
<SCRIPT language="javascript" src="../clases/jscripts/ArbolVistaXML.js"></SCRIPT>
</HEAD>
<BODY>
- <P align=center class=cabeceras><?echo $TbMsg[0]?><BR>
- <SPAN align=center class=subcabeceras><?echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/confihard.gif"><BR><BR>
- <IMG src="../images/iconos/perfilhardware.gif"><SPAN class=presentaciones>&nbsp;&nbsp;<U><?echo $TbMsg[2]?></U>: <? echo $descripcionperfil?></SPAN></P>
- <?echo $arbol->CreaArbolVistaXml(); // Crea arbol de configuraciones?>
+ <P align=center class=cabeceras><?php echo $TbMsg[0]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/confihard.gif"><BR><BR>
+ <IMG src="../images/iconos/perfilhardware.gif"><SPAN class=presentaciones>&nbsp;&nbsp;<U><?php echo $TbMsg[2]?></U>: <?php echo $descripcionperfil?></SPAN></P>
+ <?php echo $arbol->CreaArbolVistaXml(); // Crea arbol de configuraciones?>
</BODY>
</HTML>
-<?
+<?php
/**************************************************************************************************************************************************
Devuelve una cadena con formato XML de toda la Información de los perfiles hardwares
Parametros:
diff --git a/admin/WebConsole/varios/informacion_perfilessoftware.php b/admin/WebConsole/varios/informacion_perfilessoftware.php
index 42f11b41..6334dcbf 100644
--- a/admin/WebConsole/varios/informacion_perfilessoftware.php
+++ b/admin/WebConsole/varios/informacion_perfilessoftware.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -7,6 +7,7 @@
// Nombre del fichero: informacion_perfilessoft.php
// Descripción :
// Muestra los componentes software que forman parte de un perfil software y los perfiles softwares disponibles
+// Version 1.1 - Muetra sistema operativo.
// *************************************************************************************************************************************************
include_once("../includes/ctrlacc.php");
include_once("../clases/AdoPhp.php");
@@ -42,13 +43,13 @@ $arbol=new ArbolVistaXml($arbolXML,0,$baseurlimg,$clasedefault,1,20,130,1,$titul
<SCRIPT language="javascript" src="../clases/jscripts/ArbolVistaXML.js"></SCRIPT>
</HEAD>
<BODY>
- <P align=center class=cabeceras><?echo $TbMsg[0]?><BR>
- <SPAN align=center class=subcabeceras><?echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/confisoft.gif"><BR><BR>
- <IMG src="../images/iconos/perfilsoftware.gif"><SPAN class=presentaciones>&nbsp;&nbsp;<U><?echo $TbMsg[2]?></U>: <? echo $descripcionperfil?></SPAN></P>
- <?echo $arbol->CreaArbolVistaXml(); // Crea arbol de configuraciones?>
+ <P align=center class=cabeceras><?php echo $TbMsg[0]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/confisoft.gif"><BR><BR>
+ <IMG src="../images/iconos/perfilsoftware.gif"><SPAN class=presentaciones>&nbsp;&nbsp;<U><?php echo $TbMsg[2]?></U>: <?php echo $descripcionperfil?></SPAN></P>
+ <?php echo $arbol->CreaArbolVistaXml(); // Crea arbol de configuraciones?>
</BODY>
</HTML>
-<?
+<?php
/**************************************************************************************************************************************************
Devuelve una cadena con formato XML de toda la Información de los perfiles software
softwares
@@ -68,10 +69,11 @@ function SubarbolXML_PerfilesSoftwares($cmd,$idperfilsoft)
$cadenaXML="";
$cmd->texto="SELECT perfilessoft.idperfilsoft ,perfilessoft.descripcion as pdescripcion, perfilessoft.comentarios,
- softwares.idsoftware,softwares.descripcion as hdescripcion,tiposoftwares.urlimg FROM perfilessoft
+ softwares.idsoftware,softwares.descripcion as hdescripcion,tiposoftwares.urlimg, nombreso FROM perfilessoft
LEFT OUTER JOIN perfilessoft_softwares ON perfilessoft.idperfilsoft=perfilessoft_softwares.idperfilsoft
LEFT OUTER JOIN softwares ON softwares.idsoftware=perfilessoft_softwares.idsoftware
LEFT OUTER JOIN tiposoftwares ON softwares.idtiposoftware=tiposoftwares.idtiposoftware
+ LEFT OUTER JOIN nombresos USING (idnombreso)
WHERE perfilessoft.idperfilsoft=".$idperfilsoft."
ORDER by tiposoftwares.idtiposoftware,softwares.descripcion";
$rs=new Recordset;
@@ -99,6 +101,14 @@ function SubarbolXML_PerfilesSoftwares($cmd,$idperfilsoft)
$cadenaXML.=' infonodo="'.$TbMsg[6].'"';
$cadenaXML.='>';
$swcompo=true;
+ if ( $rs->campos["nombreso"] != "") {
+ $cadenaXML.='<PERFILSOFTWARE';
+ // Atributos
+ $cadenaXML.=' imagenodo="../images/iconos/so.gif"';
+ $cadenaXML.=' infonodo="'.$rs->campos["nombreso"].'"';
+ $cadenaXML.='>';
+ $cadenaXML.='</PERFILSOFTWARE>';
+ }
}
$cadenaXML.='<PERFILSOFTWARE';
// Atributos
diff --git a/admin/WebConsole/varios/informacion_procedimientos.php b/admin/WebConsole/varios/informacion_procedimientos.php
index 6de1eb5d..34d1d361 100644
--- a/admin/WebConsole/varios/informacion_procedimientos.php
+++ b/admin/WebConsole/varios/informacion_procedimientos.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -42,13 +42,13 @@ $arbol=new ArbolVistaXml($arbolXML,0,$baseurlimg,$clasedefault,1,20,130,1,$titul
<SCRIPT language="javascript" src="../clases/jscripts/ArbolVistaXML.js"></SCRIPT>
</HEAD>
<BODY>
- <P align=center class=cabeceras><?echo $TbMsg[0]?><BR>
- <SPAN align=center class=subcabeceras><?echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/confisoft.gif"><BR><BR>
- <IMG src="../images/iconos/procedimiento.gif"><SPAN class=presentaciones>&nbsp;&nbsp;<U><?echo $TbMsg[2]?></U>: <? echo $descripcionperfil?></SPAN></P>
- <?echo $arbol->CreaArbolVistaXml(); // Crea arbol de configuraciones?>
+ <P align=center class=cabeceras><?php echo $TbMsg[0]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/confisoft.gif"><BR><BR>
+ <IMG src="../images/iconos/procedimiento.gif"><SPAN class=presentaciones>&nbsp;&nbsp;<U><?php echo $TbMsg[2]?></U>: <?php echo $descripcionperfil?></SPAN></P>
+ <?php echo $arbol->CreaArbolVistaXml(); // Crea arbol de configuraciones?>
</BODY>
</HTML>
-<?
+<?php
/**************************************************************************************************************************************************
Devuelve una cadena con formato XML de toda la Información de los perfiles software
softwares
diff --git a/admin/WebConsole/varios/informacion_repositorios.php b/admin/WebConsole/varios/informacion_repositorios.php
index 40e6b819..89f75900 100644
--- a/admin/WebConsole/varios/informacion_repositorios.php
+++ b/admin/WebConsole/varios/informacion_repositorios.php
@@ -40,11 +40,11 @@ $arbol=new ArbolVistaXml($arbolXML,0,$baseurlimg,$clasedefault,1,20,130,1,$titul
<SCRIPT language="javascript" src="../clases/jscripts/ArbolVistaXML.js"></SCRIPT>
</HEAD>
<BODY>
- <P align=center class=cabeceras><?echo $TbMsg[0]?><BR>
- <SPAN align=center class=subcabeceras><?echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/repositorio.gif"><BR><BR>
+ <P align=center class=cabeceras><?php echo $TbMsg[0]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/repositorio.gif"><BR><BR>
<IMG src="../images/iconos/repositorio.gif"><SPAN class=presentaciones>&nbsp;&nbsp;
- <U><?echo $TbMsg[2]?></U>:<? echo $descripcionrepositorio?></SPAN></P>
- <?echo $arbol->CreaArbolVistaXml(); // Crea arbol de configuraciones?>
+ <U><?php echo $TbMsg[2]?></U>:<?php echo $descripcionrepositorio?></SPAN></P>
+ <?php echo $arbol->CreaArbolVistaXml(); // Crea arbol de configuraciones?>
</BODY>
</HTML>
<?php
diff --git a/admin/WebConsole/varios/informacion_tareas.php b/admin/WebConsole/varios/informacion_tareas.php
index 19b88572..3a0dbceb 100644
--- a/admin/WebConsole/varios/informacion_tareas.php
+++ b/admin/WebConsole/varios/informacion_tareas.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -30,7 +30,7 @@ if (isset($_GET["descripciontarea"])) $descripciontarea=$_GET["descripciontarea"
<LINK rel="stylesheet" type="text/css" href="../estilos.css">
</HEAD>
<BODY>
- <?
+ <?php
$cmd=CreaComando($cadenaconexion);
if ($cmd){
$rs=new Recordset;
@@ -50,7 +50,7 @@ if (isset($_GET["descripciontarea"])) $descripciontarea=$_GET["descripciontarea"
?>
</BODY>
</HTML>
-<?
+<?php
// *************************************************************************************************************************************************
function pintacomandos($cmd,$idtareacomando){
global $TbMsg;
diff --git a/admin/WebConsole/varios/menubrowser.php b/admin/WebConsole/varios/menubrowser.php
index d0165435..917931dd 100644
--- a/admin/WebConsole/varios/menubrowser.php
+++ b/admin/WebConsole/varios/menubrowser.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -64,7 +64,7 @@ function PulsaEnter(oEvento){
</DIV>
</BODY>
</HTML>
-<?
+<?php
//___________________________________________________________________________________________________
//
// Redupera la ip del cliente web
diff --git a/admin/WebConsole/varios/msgbrowser.php b/admin/WebConsole/varios/msgbrowser.php
index 658f2a86..ed061bda 100644
--- a/admin/WebConsole/varios/msgbrowser.php
+++ b/admin/WebConsole/varios/msgbrowser.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -65,7 +65,7 @@ else
</STYLE>
</HEAD>
<BODY>
-<?
+<?php
if(empty($idx) && empty($msg)) {
// No hay operaciones realizandose
echo '<BR><BR><BR><BR><BR>';
diff --git a/admin/WebConsole/varios/perfilcomponente_hard.php b/admin/WebConsole/varios/perfilcomponente_hard.php
index 97b05368..e1a8f4ae 100644
--- a/admin/WebConsole/varios/perfilcomponente_hard.php
+++ b/admin/WebConsole/varios/perfilcomponente_hard.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -30,26 +30,32 @@ if (!$cmd)
<SCRIPT language="javascript" src="../jscripts/perfilcomponente_hard.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/perfilcomponente_hard_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/perfilcomponente_hard_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<FORM name="fdatos">
- <INPUT type=hidden value="<? echo $idcentro?>" id=idcentro>
- <INPUT type=hidden value="<? echo $idperfilhard?>" id=idperfilhard>
- <P align=center class=cabeceras><?echo $TbMsg[0]?><BR>
- <SPAN align=center class=subcabeceras><?echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/confihard.gif"></P>
+ <INPUT type=hidden value="<?php echo $idcentro?>" id=idcentro>
+ <INPUT type=hidden value="<?php echo $idperfilhard?>" id=idperfilhard>
+ <P align=center class=cabeceras><?php echo $TbMsg[0]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/confihard.gif"></P>
<BR>
<DIV align=center id="Layer_componentes">
- <SPAN align=center class=presentaciones><B><U><?echo $TbMsg[2]?></U>:&nbsp;<? echo $descripcionperfil?></B></SPAN></P>
+ <SPAN align=center class=presentaciones><B><U><?php echo $TbMsg[2]?></U>:&nbsp;<?php echo $descripcionperfil?></B></SPAN></P>
<TABLE width="100%" class="tabla_listados" cellspacing=1 cellpadding=0 >
<TR>
<TH>&nbsp</TH>
<TH>T</TH>
- <TH><?echo $TbMsg[3]?></TH>
+ <TH><?php echo $TbMsg[3]?></TH>
</TR>
- <?
+ <?php
$rs=new Recordset;
- $cmd->texto='SELECT hardwares.idhardware,hardwares.descripcion,tipohardwares.descripcion as hdescripcion,tipohardwares.urlimg,tipohardwares.pci FROM hardwares INNER JOIN perfileshard_hardwares ON hardwares.idhardware=perfileshard_hardwares.idhardware INNER JOIN tipohardwares ON hardwares.idtipohardware=tipohardwares.idtipohardware WHERE perfileshard_hardwares.idperfilhard='.$idperfilhard.' ORDER BY tipohardwares.idtipohardware,hardwares.descripcion';
+ $cmd->texto='SELECT hardwares.idhardware, hardwares.descripcion,'.
+ ' tipohardwares.descripcion AS hdescripcion, tipohardwares.urlimg'.
+ ' FROM hardwares'.
+ ' INNER JOIN perfileshard_hardwares ON hardwares.idhardware=perfileshard_hardwares.idhardware'.
+ ' INNER JOIN tipohardwares ON hardwares.idtipohardware=tipohardwares.idtipohardware'.
+ ' WHERE perfileshard_hardwares.idperfilhard='.$idperfilhard.
+ ' ORDER BY tipohardwares.idtipohardware, hardwares.descripcion';
$rs->Comando=&$cmd;
if ($rs->Abrir()){
@@ -68,7 +74,12 @@ if (!$cmd)
}
}
$rs->Cerrar();
- $cmd->texto='SELECT hardwares.idhardware,hardwares.descripcion,tipohardwares.descripcion as hdescripcion,tipohardwares.urlimg,tipohardwares.pci FROM hardwares INNER JOIN tipohardwares ON hardwares.idtipohardware=tipohardwares.idtipohardware '.$strex.' AND hardwares.idcentro='.$idcentro.' ORDER BY tipohardwares.idtipohardware,hardwares.descripcion';
+ $cmd->texto='SELECT hardwares.idhardware, hardwares.descripcion,'.
+ ' tipohardwares.descripcion AS hdescripcion, tipohardwares.urlimg,'.
+ ' FROM hardwares'.
+ ' INNER JOIN tipohardwares ON hardwares.idtipohardware=tipohardwares.idtipohardware '.
+ $strex.' AND hardwares.idcentro='.$idcentro.
+ ' ORDER BY tipohardwares.idtipohardware, hardwares.descripcion';
$rs->Comando=&$cmd;
if ($rs->Abrir()){
$rs->Primero();
@@ -88,7 +99,7 @@ if (!$cmd)
</DIV>
<DIV id="Layer_nota" align=center >
<BR>
- <SPAN align=center class=notas><I><?echo $TbMsg[4]?></I></SPAN>
+ <SPAN align=center class=notas><I><?php echo $TbMsg[4]?></I></SPAN>
</DIV>
</FORM>
</BODY>
diff --git a/admin/WebConsole/varios/perfilcomponente_soft.php b/admin/WebConsole/varios/perfilcomponente_soft.php
index 9aa381b7..58a90725 100644
--- a/admin/WebConsole/varios/perfilcomponente_soft.php
+++ b/admin/WebConsole/varios/perfilcomponente_soft.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -30,29 +30,38 @@ if (!$cmd)
<SCRIPT language="javascript" src="../jscripts/perfilcomponente_soft.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/perfilcomponente_soft_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/perfilcomponente_soft_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<FORM name="fdatos">
- <INPUT type=hidden value="<? echo $idcentro?>" id=idcentro>
- <INPUT type=hidden value="<? echo $idperfilsoft?>" id=idperfilsoft>
- <P align=center class=cabeceras><?echo $TbMsg[0]?><BR>
- <SPAN align=center class=subcabeceras><?echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/confisoft.gif"></P>
+ <INPUT type=hidden value="<?php echo $idcentro?>" id=idcentro>
+ <INPUT type=hidden value="<?php echo $idperfilsoft?>" id=idperfilsoft>
+ <P align=center class=cabeceras><?php echo $TbMsg[0]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/confisoft.gif"></P>
<BR>
<DIV align=center id="Layer_componentes">
- <SPAN align=center class=presentaciones><B><U><?echo $TbMsg[2]?></U>:&nbsp;<? echo $descripcionperfil?></B></SPAN></P>
+ <SPAN align=center class=presentaciones><B><U><?php echo $TbMsg[2]?></U>:&nbsp;<?php echo $descripcionperfil?></B></SPAN></P>
<TABLE width="100%" class="tabla_listados" cellspacing=1 cellpadding=0 >
<TR>
<TH>&nbsp</TH>
<TH>T</TH>
- <TH><?echo $TbMsg[3]?></TH>
+ <TH><?php echo $TbMsg[3]?></TH>
</TR>
- <?
+ <?php
+ $nombreso=false;
$rs=new Recordset;
- $cmd->texto='SELECT softwares.idsoftware,softwares.descripcion,tiposoftwares.descripcion as hdescripcion,tiposoftwares.urlimg FROM softwares INNER JOIN perfilessoft_softwares ON softwares.idsoftware=perfilessoft_softwares.idsoftware INNER JOIN tiposoftwares ON softwares.idtiposoftware=tiposoftwares.idtiposoftware WHERE perfilessoft_softwares.idperfilsoft='.$idperfilsoft.' ORDER BY tiposoftwares.idtiposoftware,softwares.descripcion';
+ $cmd->texto='SELECT softwares.idsoftware,softwares.descripcion,tiposoftwares.descripcion as hdescripcion,tiposoftwares.urlimg, nombreso FROM softwares INNER JOIN perfilessoft_softwares ON softwares.idsoftware=perfilessoft_softwares.idsoftware INNER JOIN tiposoftwares ON softwares.idtiposoftware=tiposoftwares.idtiposoftware INNER JOIN perfilessoft USING (idperfilsoft) LEFT OUTER JOIN nombresos USING (idnombreso) WHERE perfilessoft_softwares.idperfilsoft='.$idperfilsoft.' ORDER BY tiposoftwares.idtiposoftware,softwares.descripcion';
$rs->Comando=&$cmd;
if ($rs->Abrir()){
$rs->Primero();
+ if (!$nombreso && $rs->campos["nombreso"] != "") {
+ echo '<TR>';
+ echo '<TD></TD>';
+ echo '<TD align=center width="10%" ><img alt="'. $rs->campos["nombreso"].'" src="../images/iconos/so.gif"></TD>';
+ echo '<TD width="80%" >&nbsp;'.$rs->campos["nombreso"].'</TD>';
+ echo '</TR>';
+ $nombreso=true;
+ }
$A_W=" WHERE ";
$strex="";
while (!$rs->EOF){
@@ -86,7 +95,7 @@ if (!$cmd)
</DIV>
<DIV id="Layer_nota" align=center >
<BR>
- <SPAN align=center class=notas><I><?echo $TbMsg[4]?></I></SPAN>
+ <SPAN align=center class=notas><I><?php echo $TbMsg[4]?></I></SPAN>
</DIV>
</FORM>
</BODY>
diff --git a/admin/WebConsole/varios/procedimientoscomandos.php b/admin/WebConsole/varios/procedimientoscomandos.php
index 89ab0ea6..f908e349 100644
--- a/admin/WebConsole/varios/procedimientoscomandos.php
+++ b/admin/WebConsole/varios/procedimientoscomandos.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -33,22 +33,22 @@ if (!$cmd)
<SCRIPT language="javascript" src="../jscripts/procedimientoscomandos.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/procedimientoscomandos_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/procedimientoscomandos_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<FORM name="fdatos">
- <INPUT type=hidden value="<? echo $idcentro?>" id=idcentro>
- <P align=center class=cabeceras><IMG src="../images/iconos/procedimiento.gif">&nbsp;<?echo $TbMsg[0]?><BR>
- <SPAN align=center class=subcabeceras><?echo $TbMsg[1]?></span>&nbsp;<img src="../images/iconos/comandos.gif"><BR><BR>
- <SPAN align=center class=presentaciones><B><?echo $TbMsg[2]?>:&nbsp;</B><? echo $descripcionprocedimiento?></SPAN></P>
+ <INPUT type=hidden value="<?php echo $idcentro?>" id=idcentro>
+ <P align=center class=cabeceras><IMG src="../images/iconos/procedimiento.gif">&nbsp;<?php echo $TbMsg[0]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $TbMsg[1]?></span>&nbsp;<img src="../images/iconos/comandos.gif"><BR><BR>
+ <SPAN align=center class=presentaciones><B><?php echo $TbMsg[2]?>:&nbsp;</B><?php echo $descripcionprocedimiento?></SPAN></P>
<TABLE align=center class="tabla_listados" cellspacing=1 cellpadding=0 id="TABLACOMANDOS">
<TR height=20>
<TH ><IMG src="../images/iconos/eliminar.gif"></TH>
- <TH colspan=2 align=left>&nbsp;<?echo $TbMsg[3]?></TH>
- <TH ><?echo $TbMsg[4]?></TH>
+ <TH colspan=2 align=left>&nbsp;<?php echo $TbMsg[3]?></TH>
+ <TH ><?php echo $TbMsg[4]?></TH>
<TH >A</TH>
</TR>
- <?
+ <?php
$rs=new Recordset;
$cmd->texto='SELECT procedimientos_acciones.*, comandos.descripcion,comandos.visuparametros
FROM procedimientos_acciones
@@ -83,11 +83,11 @@ if (!$cmd)
?>
</TABLE>
<br>
- <P align=center><span align=center class=notas><I><?echo $TbMsg[7]?>.</I></P>
+ <P align=center><span align=center class=notas><I><?php echo $TbMsg[7]?>.</I></P>
</FORM>
</BODY>
</HTML>
-<?
+<?php
// *************************************************************************************************************************************************
function pintacomandos($cmd,$rs){
global $TbMsg;
diff --git a/admin/WebConsole/varios/programaciones.php b/admin/WebConsole/varios/programaciones.php
index 665ee222..990255ef 100644
--- a/admin/WebConsole/varios/programaciones.php
+++ b/admin/WebConsole/varios/programaciones.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -89,13 +89,13 @@ $mialmanaque= new Almanaque("tabla_meses");
<SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/programaciones.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
- <? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/programaciones_'.$idioma.'.js"></SCRIPT>'?>
+ <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/programaciones_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
-<P align=center class=cabeceras><?echo $TbMsg[0]?> <?=$textoaccion?>&nbsp;<img src="../images/iconos/reloj.gif"><br>
-<IMG src=<?=$urlimg?>>&nbsp;<SPAN align=center class=subcabeceras><?=$descripcion?></SPAN>&nbsp;</p>
+<P align=center class=cabeceras><?php echo $TbMsg[0]?> <?php echo $textoaccion?>&nbsp;<img src="../images/iconos/reloj.gif"><br>
+<IMG src=<?php echo $urlimg?>>&nbsp;<SPAN align=center class=subcabeceras><?php echo $descripcion?></SPAN>&nbsp;</p>
<FORM name="fprogramaciones" method="post">
-<INPUT type=hidden name=tipoaccion value="<? echo $tipoaccion?>">
+<INPUT type=hidden name=tipoaccion value="<?php echo $tipoaccion?>">
<CENTER>
<!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
<!-- Tabla Tabla con los tiempos y los bloques de programación -->
@@ -109,28 +109,28 @@ $mialmanaque= new Almanaque("tabla_meses");
<!-- Tabla con la suspension y los años dias y semanas -->
<TABLE border=0 cellPadding=0 cellSpacing=0>
<TR class=opciones_ejecucion>
- <TD colspan=6><INPUT id=sw_sus type="checkbox" <? echo $wsw_sus?>
- onclick="suspender_programacion(<?=$identificador?>,<?=$tipoaccion?>,<?=$sesion?>))">
- <SPAN style="COLOR:#999999"><?echo $TbMsg[1]?></SPAN></TD>
+ <TD colspan=6><INPUT id=sw_sus type="checkbox" <?php echo $wsw_sus?>
+ onclick="suspender_programacion(<?php echo $identificador?>,<?php echo $tipoaccion?>,<?php echo $sesion?>))">
+ <SPAN style="COLOR:#999999"><?php echo $TbMsg[1]?></SPAN></TD>
</TR>
<TR>
<TD colspan=6>&nbsp;</TD>
</TR>
<TR>
<TD valign=top>
- <? $annodesde=date("Y");
- echo $mialmanaque->Annos(($annodesde-4),($annodesde+4)); // Años?>
+ <?php $annodesde=date("Y");
+ echo $mialmanaque->Annos(($annodesde-3),($annodesde+3)); // Años?>
</TD>
<TD width=10>&nbsp;</TD>
<TD valign=top>
- <? echo $mialmanaque->Meses(); // Meses del año?>
+ <?php echo $mialmanaque->Meses(); // Meses del año?>
</TD>
<TD width=10>&nbsp;</TD>
<TD valign=top width="155">
<TABLE id="fechassimples" style="visibility:visible" border=0 cellPadding=0 cellSpacing=0>
<TR>
<TD id=tbmesanno>
- <? $tmarray=getdate();
+ <?php $tmarray=getdate();
$anoactual=$tmarray["year"];
$mesacutal=$tmarray["mon"];
echo $mialmanaque->MesAnno($mesacutal,$anoactual); // Calendario del mes?>
@@ -147,17 +147,17 @@ $mialmanaque= new Almanaque("tabla_meses");
<TABLE id="fechasmultiples" style="visibility:hidden" border=0 cellPadding=0 cellSpacing=0 >
<TR>
<TD>
- <? echo $mialmanaque->Dias(); // Dias de la semana?>
+ <?php echo $mialmanaque->Dias(); // Dias de la semana?>
</TD>
</TR>
<TR>
<TD>
- <? echo $mialmanaque->Semanas(); // Orden de la semanas?>
+ <?php echo $mialmanaque->Semanas(); // Orden de la semanas?>
</TD>
</TR>
<TR>
<TD>
- <? echo $mialmanaque->DiasMes(); // Días del mes?>
+ <?php echo $mialmanaque->DiasMes(); // Días del mes?>
</TD>
</TR>
</TABLE>
@@ -172,8 +172,8 @@ $mialmanaque= new Almanaque("tabla_meses");
<TABLE border=0 cellPadding=0 cellSpacing=0 style="HEIGHT: 24px; WIDTH: 279px">
<TR>
<TD>
- <? echo "<BR>".$mialmanaque->Horas(); // Horas?>
- <? if ($tipoaccion==$EJECUCION_RESERVA){
+ <?php echo "<BR>".$mialmanaque->Horas(); // Horas?>
+ <?php if ($tipoaccion==$EJECUCION_RESERVA){
echo $mialmanaque->HorasReserva("1","tabla_horasini","ampmini","minutosini"); // Horas desde;
echo $mialmanaque->HorasReserva("2","tabla_horasfin","ampmfin","minutosfin"); // Horas hasta;
}
@@ -195,7 +195,7 @@ $mialmanaque= new Almanaque("tabla_meses");
<TD >
<TABLE align=center class="tabla_meses" border=0 cellPadding=0 cellSpacing=2>
<TR>
- <TH align=center>&nbsp;<?echo $TbMsg[2]?></TH>
+ <TH align=center>&nbsp;<?php echo $TbMsg[2]?></TH>
</TR>
<TR>
<TD><input type=text class="cajatexto" id="nombrebloque"
@@ -206,7 +206,7 @@ $mialmanaque= new Almanaque("tabla_meses");
</TR>
<TR>
<TD>
- <?
+ <?php
$HTMLSELECT="";
$HTMLSELECT.='<SELECT onclick=consulta_programacion();
class=estilodesple id="lista_programaciones" size=2 style="height:100; width: 350">' ;
@@ -232,14 +232,14 @@ $mialmanaque= new Almanaque("tabla_meses");
<TD align=center class=botonprogramacion>
<SPAN id=bt_insertar style="cursor:pointer;visibility:visible;color:#bbbcb9"
onmouseover="sobreboton(this)" onmouseout="fueraboton(this)"
- onclick="alta_programacion(<?=$identificador?>,<?=$tipoaccion?>,<?=$sesion?>)"
+ onclick="alta_programacion(<?php echo $identificador?>,<?php echo $tipoaccion?>,<?php echo $sesion?>)"
align=center height="17" width="83">Añadir</SPAN></TD>
</TR>
<TR>
<TD align=center class=botonprogramacion >
<SPAN id=bt_modificar style="cursor:pointer;visibility:visible;color:#bbbcb9"
onmouseover="sobreboton(this)" onmouseout="fueraboton(this)"
- onclick="modifica_programacion(<?=$identificador?>,<?=$tipoaccion?>,<?=$sesion?>)" align=center height="17" width="83">Modificar</SPAN></TD>
+ onclick="modifica_programacion(<?php echo $identificador?>,<?php echo $tipoaccion?>,<?php echo $sesion?>)" align=center height="17" width="83">Modificar</SPAN></TD>
</TR>
<TD align=center class=botonprogramacion >
diff --git a/admin/WebConsole/varios/tareascomandos.php b/admin/WebConsole/varios/tareascomandos.php
index 878e7cbe..6f124b96 100644
--- a/admin/WebConsole/varios/tareascomandos.php
+++ b/admin/WebConsole/varios/tareascomandos.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
@@ -34,23 +34,23 @@ if (!$cmd)
<SCRIPT language="javascript" src="../jscripts/tareascomandos.js"></SCRIPT>
<SCRIPT language="javascript" src="../jscripts/opciones.js"></SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT>
-<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/tareascomandos_'.$idioma.'.js"></SCRIPT>'?>
+<?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/tareascomandos_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY>
<FORM name="fdatos">
- <INPUT type=hidden value="<? echo $idcentro?>" id=idcentro>
- <P align=center class=cabeceras><IMG src="../images/iconos/tareas.gif">&nbsp;<?echo $TbMsg[0]?><BR>
- <SPAN align=center class=subcabeceras><?echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/comandos.gif"><BR><BR>
- <SPAN align=center class=presentaciones><B><?echo $TbMsg[2]?>:&nbsp;</B><? echo $descripciontarea?></SPAN></P>
+ <INPUT type=hidden value="<?php echo $idcentro?>" id=idcentro>
+ <P align=center class=cabeceras><IMG src="../images/iconos/tareas.gif">&nbsp;<?php echo $TbMsg[0]?><BR>
+ <SPAN align=center class=subcabeceras><?php echo $TbMsg[1]?></SPAN>&nbsp;<IMG src="../images/iconos/comandos.gif"><BR><BR>
+ <SPAN align=center class=presentaciones><B><?php echo $TbMsg[2]?>:&nbsp;</B><?php echo $descripciontarea?></SPAN></P>
<DIV align=center id="Layer_componentes">
<TABLE class="tabla_listados" cellspacing=1 cellpadding=0 id="TABLACOMANDOS">
<TR height=20>
<TH><IMG src="../images/iconos/eliminar.gif"></TH>
- <TH align=left>&nbsp;<?echo $TbMsg[3]?></TH>
- <TH><?echo $TbMsg[4]?></TH>
+ <TH align=left>&nbsp;<?php echo $TbMsg[3]?></TH>
+ <TH><?php echo $TbMsg[4]?></TH>
<TH>A</TH>
</TR>
- <?
+ <?php
$rs=new Recordset;
$cmd->texto='SELECT tareas_acciones.*, comandos.descripcion,comandos.visuparametros
FROM tareas_acciones
@@ -87,12 +87,12 @@ if (!$cmd)
</DIV>
<DIV id="Layer_nota" align=center>
<br>
- <span align=left class=notas><I><?echo $TbMsg[7]?>.</I></span>
+ <span align=left class=notas><I><?php echo $TbMsg[7]?>.</I></span>
</DIV>
</FORM>
</BODY>
</HTML>
-<?
+<?php
// *************************************************************************************************************************************************
function pintacomandos($cmd,$rs){
global $TbMsg;
diff --git a/admin/WebConsole/varios/toma_mes.php b/admin/WebConsole/varios/toma_mes.php
index 9ff73c64..c76b2dff 100644
--- a/admin/WebConsole/varios/toma_mes.php
+++ b/admin/WebConsole/varios/toma_mes.php
@@ -1,4 +1,4 @@
-<?
+<?php
// *************************************************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
diff --git a/admin/slim-2.6.1.zip b/admin/slim-2.6.1.zip
new file mode 100644
index 00000000..017db9c3
--- /dev/null
+++ b/admin/slim-2.6.1.zip
Binary files differ
diff --git a/admin/swagger-ui-2.2.5.zip b/admin/swagger-ui-2.2.5.zip
new file mode 100644
index 00000000..c12bee12
--- /dev/null
+++ b/admin/swagger-ui-2.2.5.zip
Binary files differ