[9a94dbd] | 1 | <?php |
---|
[3ec149c] | 2 | // ************************************************************************************************************************************************* |
---|
| 3 | // Aplicación WEB: ogAdmWebCon |
---|
| 4 | // Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla |
---|
| 5 | // Fecha Creación: Año 2009-2010 |
---|
| 6 | // Fecha Última modificación: Agosto-2010 |
---|
| 7 | // Nombre del fichero: IniciarSesion.php |
---|
| 8 | // Descripción : |
---|
[1985678] | 9 | // Implementación del comando "Iniciar Sesión" |
---|
[1de07b8a] | 10 | // Version 0.1 - En ambito distinto a ordenador muestra los equipos agrupados en configuraciones iguales. |
---|
| 11 | // Fecha: 2014-10-23 |
---|
| 12 | // Autora: Irina Gomez, ETSII Universidad de Sevilla |
---|
[3ec149c] | 13 | // ************************************************************************************************************************************************* |
---|
| 14 | include_once("../includes/ctrlacc.php"); |
---|
| 15 | include_once("../clases/AdoPhp.php"); |
---|
| 16 | include_once("../includes/constantes.php"); |
---|
| 17 | include_once("../includes/comunes.php"); |
---|
| 18 | include_once("../includes/CreaComando.php"); |
---|
| 19 | include_once("../includes/HTMLSELECT.php"); |
---|
| 20 | include_once("../includes/TomaDato.php"); |
---|
[1de07b8a] | 21 | include_once("../includes/RecopilaIpesMacs.php"); |
---|
[7a8ab05] | 22 | include_once("../includes/ConfiguracionesParticiones.php"); |
---|
[00ed4ab] | 23 | include_once("../includes/pintaTablaConfiguraciones.php"); |
---|
[3ec149c] | 24 | include_once("../idiomas/php/".$idioma."/comandos/iniciarsesion_".$idioma.".php"); |
---|
[86d5b32] | 25 | include_once("../idiomas/php/".$idioma."/comandos/opcionesacciones_".$idioma.".php"); |
---|
[3ec149c] | 26 | //________________________________________________________________________________________________________ |
---|
| 27 | include_once("./includes/capturaacciones.php"); |
---|
| 28 | //________________________________________________________________________________________________________ |
---|
| 29 | $cmd=CreaComando($cadenaconexion); |
---|
| 30 | if (!$cmd) |
---|
| 31 | Header('Location: '.$pagerror.'?herror=2'); // Error de conexión con servidor B.D. |
---|
| 32 | //___________________________________________________________________________________________________ |
---|
| 33 | ?> |
---|
| 34 | <HTML> |
---|
| 35 | <HEAD> |
---|
[e32794a] | 36 | <TITLE>Administración web de aulas</TITLE> |
---|
| 37 | <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
[3ec149c] | 38 | <LINK rel="stylesheet" type="text/css" href="../estilos.css"> |
---|
| 39 | <SCRIPT language="javascript" src="./jscripts/IniciarSesion.js"></SCRIPT> |
---|
| 40 | <SCRIPT language="javascript" src="../clases/jscripts/HttpLib.js"></SCRIPT> |
---|
[1de07b8a] | 41 | <SCRIPT language="javascript" src="./jscripts/comunescomandos.js"></SCRIPT> |
---|
| 42 | <SCRIPT language="javascript" src="../jscripts/constantes.js"></SCRIPT> |
---|
| 43 | <SCRIPT language="javascript" src="../jscripts/arrays.js"></SCRIPT> |
---|
[9a94dbd] | 44 | <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/iniciarsesion_'.$idioma.'.js"></SCRIPT>'?> |
---|
| 45 | <?php echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/comandos/comunescomandos_'.$idioma.'.js"></SCRIPT>'?> |
---|
[3ec149c] | 46 | </HEAD> |
---|
| 47 | <BODY> |
---|
[9a94dbd] | 48 | <?php |
---|
[3ec149c] | 49 | echo '<p align=center><span class=cabeceras>'.$TbMsg[5].' </span><br>'; |
---|
[69650cb] | 50 | //________________________________________________________________________________________________________ |
---|
| 51 | // |
---|
[ef3ffe2] | 52 | include_once("./includes/FiltradoAmbito.php"); |
---|
[69650cb] | 53 | //________________________________________________________________________________________________________ |
---|
[1de07b8a] | 54 | if($ambito!=$AMBITO_ORDENADORES){ |
---|
| 55 | $cadenaid=""; |
---|
| 56 | $cadenaip=""; |
---|
| 57 | $cadenamac=""; |
---|
| 58 | RecopilaIpesMacs($cmd,$ambito,$idambito); |
---|
[1985678] | 59 | |
---|
[1de07b8a] | 60 | ?> |
---|
[1985678] | 61 | <P align=center><SPAN class=subcabeceras><?php echo $TbMsg[7] ?></SPAN></P> |
---|
| 62 | <BR> |
---|
[1de07b8a] | 63 | <form align=center name="fdatos" method="POST"> |
---|
[043e67d] | 64 | <INPUT type="hidden" name="idambito" value="<?php echo $idambito?>"> |
---|
| 65 | <INPUT type="hidden" name="ambito" value="<?php echo $ambito?>"> |
---|
| 66 | <INPUT type="hidden" name="cadenaid" value="<?php echo $cadenaid?>"> |
---|
[11e2501] | 67 | </form> |
---|
[1de07b8a] | 68 | <?php } // fin if $ambito!=$AMBITO_ORDENADORES |
---|
| 69 | |
---|
| 70 | tablaConfiguracionesIniciarSesion($cmd,$idambito,$ambito); ?> |
---|
[9a94dbd] | 71 | <?php |
---|
[3ec149c] | 72 | //________________________________________________________________________________________________________ |
---|
| 73 | include_once("./includes/formularioacciones.php"); |
---|
| 74 | //________________________________________________________________________________________________________ |
---|
| 75 | include_once("./includes/opcionesacciones.php"); |
---|
| 76 | //________________________________________________________________________________________________________ |
---|
| 77 | ?> |
---|
[ef3ffe2] | 78 | <SCRIPT language="javascript"> |
---|
| 79 | Sondeo(); |
---|
| 80 | </SCRIPT> |
---|
[3ec149c] | 81 | </BODY> |
---|
| 82 | </HTML> |
---|
[9a94dbd] | 83 | <?php |
---|
[3ec149c] | 84 | /************************************************************************************************************************************************** |
---|
| 85 | Recupera los datos de un ordenador |
---|
[e32794a] | 86 | Parámetros: |
---|
[3ec149c] | 87 | - cmd: Una comando ya operativo (con conexiónabierta) |
---|
| 88 | - ido: El identificador del ordenador |
---|
| 89 | ________________________________________________________________________________________________________*/ |
---|
| 90 | function toma_propiedades($cmd,$idordenador){ |
---|
| 91 | global $nombreordenador; |
---|
| 92 | global $ip; |
---|
| 93 | global $mac; |
---|
| 94 | global $idperfilhard; |
---|
| 95 | global $idservidordhcp; |
---|
| 96 | global $idservidorrembo; |
---|
| 97 | $rs=new Recordset; |
---|
| 98 | $cmd->texto="SELECT nombreordenador,ip,mac,idperfilhard FROM ordenadores WHERE idordenador='".$idordenador."'"; |
---|
| 99 | $rs->Comando=&$cmd; |
---|
| 100 | if (!$rs->Abrir()) return(false); // Error al abrir recordset |
---|
| 101 | $rs->Primero(); |
---|
| 102 | if (!$rs->EOF){ |
---|
| 103 | $nombreordenador=$rs->campos["nombreordenador"]; |
---|
| 104 | $ip=$rs->campos["ip"]; |
---|
| 105 | $mac=$rs->campos["mac"]; |
---|
| 106 | $idperfilhard=$rs->campos["idperfilhard"]; |
---|
| 107 | $rs->Cerrar(); |
---|
| 108 | return(true); |
---|
| 109 | } |
---|
| 110 | else |
---|
| 111 | return(false); |
---|
| 112 | } |
---|
| 113 | /*________________________________________________________________________________________________________ |
---|
| 114 | Crea la tabla de configuraciones y perfiles a crear |
---|
| 115 | ________________________________________________________________________________________________________*/ |
---|
| 116 | function tabla_configuraciones($cmd,$idordenador){ |
---|
| 117 | global $idcentro; |
---|
| 118 | $tablaHtml=""; |
---|
[9a94dbd] | 119 | $cmd->texto="SELECT ordenadores_particiones.numpar, |
---|
| 120 | ordenadores_particiones.tamano, |
---|
| 121 | ordenadores_particiones.idnombreso, nombresos.nombreso, |
---|
| 122 | tipospar.tipopar, imagenes.descripcion AS imagen, |
---|
| 123 | perfilessoft.descripcion AS perfilsoft, |
---|
| 124 | sistemasficheros.descripcion AS sistemafichero |
---|
| 125 | FROM ordenadores |
---|
| 126 | INNER JOIN ordenadores_particiones ON ordenadores_particiones.idordenador=ordenadores.idordenador |
---|
| 127 | LEFT OUTER JOIN nombresos ON nombresos.idnombreso=ordenadores_particiones.idnombreso |
---|
| 128 | INNER JOIN tipospar ON tipospar.codpar=ordenadores_particiones.codpar |
---|
| 129 | LEFT OUTER JOIN imagenes ON imagenes.idimagen=ordenadores_particiones.idimagen |
---|
| 130 | LEFT OUTER JOIN perfilessoft ON perfilessoft.idperfilsoft=ordenadores_particiones.idperfilsoft |
---|
| 131 | LEFT OUTER JOIN sistemasficheros ON sistemasficheros.idsistemafichero=ordenadores_particiones.idsistemafichero |
---|
| 132 | WHERE ordenadores.idordenador=".$idordenador." |
---|
| 133 | AND tipospar.clonable=1 |
---|
| 134 | AND nombresos.nombreso!='DATA' |
---|
| 135 | ORDER BY ordenadores_particiones.numpar"; |
---|
[1985678] | 136 | $rs=new Recordset; |
---|
[3ec149c] | 137 | $rs->Comando=&$cmd; |
---|
| 138 | if (!$rs->Abrir()) return($tablaHtml); // Error al abrir recordset |
---|
| 139 | $rs->Primero(); |
---|
| 140 | while (!$rs->EOF){ |
---|
| 141 | if(!empty($rs->campos["idnombreso"])){ |
---|
| 142 | $tablaHtml.='<TR>'.chr(13); |
---|
| 143 | $tablaHtml.='<TD ><input type="radio" name="particion" value='.$rs->campos["numpar"].'></TD>'.chr(13); |
---|
| 144 | $tablaHtml.='<TD align=center> '.$rs->campos["numpar"].' </TD>'.chr(13); |
---|
| 145 | $tablaHtml.='<TD> '.$rs->campos["nombreso"].' </TD>'.chr(13); |
---|
| 146 | $tablaHtml.='</TR>'.chr(13); |
---|
| 147 | } |
---|
| 148 | $rs->Siguiente(); |
---|
| 149 | } |
---|
| 150 | $rs->Cerrar(); |
---|
| 151 | return($tablaHtml); |
---|
| 152 | } |
---|