[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 : |
---|
| 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 | <TITLE>Administración web de aulas</TITLE> |
---|
| 36 | <HEAD> |
---|
| 37 | <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
| 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); |
---|
| 59 | |
---|
| 60 | ?> |
---|
[3ec149c] | 61 | <P align=center> |
---|
[043e67d] | 62 | <SPAN align=center class=subcabeceras><?php echo $TbMsg[7] ?></SPAN> |
---|
[3ec149c] | 63 | </BR> |
---|
[1de07b8a] | 64 | <form align=center name="fdatos" method="POST"> |
---|
[043e67d] | 65 | <INPUT type="hidden" name="idambito" value="<?php echo $idambito?>"> |
---|
| 66 | <INPUT type="hidden" name="ambito" value="<?php echo $ambito?>"> |
---|
| 67 | <INPUT type="hidden" name="cadenaid" value="<?php echo $cadenaid?>"> |
---|
[11e2501] | 68 | </form> |
---|
[1de07b8a] | 69 | <?php } // fin if $ambito!=$AMBITO_ORDENADORES |
---|
| 70 | |
---|
| 71 | tablaConfiguracionesIniciarSesion($cmd,$idambito,$ambito); ?> |
---|
[9a94dbd] | 72 | <?php |
---|
[3ec149c] | 73 | //________________________________________________________________________________________________________ |
---|
| 74 | include_once("./includes/formularioacciones.php"); |
---|
| 75 | //________________________________________________________________________________________________________ |
---|
| 76 | include_once("./includes/opcionesacciones.php"); |
---|
| 77 | //________________________________________________________________________________________________________ |
---|
| 78 | ?> |
---|
[ef3ffe2] | 79 | <SCRIPT language="javascript"> |
---|
| 80 | Sondeo(); |
---|
| 81 | </SCRIPT> |
---|
[3ec149c] | 82 | </BODY> |
---|
| 83 | </HTML> |
---|
[9a94dbd] | 84 | <?php |
---|
[3ec149c] | 85 | /************************************************************************************************************************************************** |
---|
| 86 | Recupera los datos de un ordenador |
---|
| 87 | Parametros: |
---|
| 88 | - cmd: Una comando ya operativo (con conexiónabierta) |
---|
| 89 | - ido: El identificador del ordenador |
---|
| 90 | ________________________________________________________________________________________________________*/ |
---|
| 91 | function toma_propiedades($cmd,$idordenador){ |
---|
| 92 | global $nombreordenador; |
---|
| 93 | global $ip; |
---|
| 94 | global $mac; |
---|
| 95 | global $idperfilhard; |
---|
| 96 | global $idservidordhcp; |
---|
| 97 | global $idservidorrembo; |
---|
| 98 | $rs=new Recordset; |
---|
| 99 | $cmd->texto="SELECT nombreordenador,ip,mac,idperfilhard FROM ordenadores WHERE idordenador='".$idordenador."'"; |
---|
| 100 | $rs->Comando=&$cmd; |
---|
| 101 | if (!$rs->Abrir()) return(false); // Error al abrir recordset |
---|
| 102 | $rs->Primero(); |
---|
| 103 | if (!$rs->EOF){ |
---|
| 104 | $nombreordenador=$rs->campos["nombreordenador"]; |
---|
| 105 | $ip=$rs->campos["ip"]; |
---|
| 106 | $mac=$rs->campos["mac"]; |
---|
| 107 | $idperfilhard=$rs->campos["idperfilhard"]; |
---|
| 108 | $rs->Cerrar(); |
---|
| 109 | return(true); |
---|
| 110 | } |
---|
| 111 | else |
---|
| 112 | return(false); |
---|
| 113 | } |
---|
| 114 | /*________________________________________________________________________________________________________ |
---|
| 115 | Crea la tabla de configuraciones y perfiles a crear |
---|
| 116 | ________________________________________________________________________________________________________*/ |
---|
| 117 | function tabla_configuraciones($cmd,$idordenador){ |
---|
| 118 | global $idcentro; |
---|
| 119 | $tablaHtml=""; |
---|
[9a94dbd] | 120 | $cmd->texto="SELECT ordenadores_particiones.numpar, |
---|
| 121 | ordenadores_particiones.tamano, |
---|
| 122 | ordenadores_particiones.idnombreso, nombresos.nombreso, |
---|
| 123 | tipospar.tipopar, imagenes.descripcion AS imagen, |
---|
| 124 | perfilessoft.descripcion AS perfilsoft, |
---|
| 125 | sistemasficheros.descripcion AS sistemafichero |
---|
| 126 | FROM ordenadores |
---|
| 127 | INNER JOIN ordenadores_particiones ON ordenadores_particiones.idordenador=ordenadores.idordenador |
---|
| 128 | LEFT OUTER JOIN nombresos ON nombresos.idnombreso=ordenadores_particiones.idnombreso |
---|
| 129 | INNER JOIN tipospar ON tipospar.codpar=ordenadores_particiones.codpar |
---|
| 130 | LEFT OUTER JOIN imagenes ON imagenes.idimagen=ordenadores_particiones.idimagen |
---|
| 131 | LEFT OUTER JOIN perfilessoft ON perfilessoft.idperfilsoft=ordenadores_particiones.idperfilsoft |
---|
| 132 | LEFT OUTER JOIN sistemasficheros ON sistemasficheros.idsistemafichero=ordenadores_particiones.idsistemafichero |
---|
| 133 | WHERE ordenadores.idordenador=".$idordenador." |
---|
| 134 | AND tipospar.clonable=1 |
---|
| 135 | AND nombresos.nombreso!='DATA' |
---|
| 136 | ORDER BY ordenadores_particiones.numpar"; |
---|
[179ccd2] | 137 | |
---|
[3ec149c] | 138 | $rs->Comando=&$cmd; |
---|
| 139 | $rs=new Recordset; |
---|
| 140 | $rs->Comando=&$cmd; |
---|
| 141 | if (!$rs->Abrir()) return($tablaHtml); // Error al abrir recordset |
---|
| 142 | $rs->Primero(); |
---|
| 143 | while (!$rs->EOF){ |
---|
| 144 | if(!empty($rs->campos["idnombreso"])){ |
---|
| 145 | $tablaHtml.='<TR>'.chr(13); |
---|
| 146 | $tablaHtml.='<TD ><input type="radio" name="particion" value='.$rs->campos["numpar"].'></TD>'.chr(13); |
---|
| 147 | $tablaHtml.='<TD align=center> '.$rs->campos["numpar"].' </TD>'.chr(13); |
---|
| 148 | $tablaHtml.='<TD> '.$rs->campos["nombreso"].' </TD>'.chr(13); |
---|
| 149 | $tablaHtml.='</TR>'.chr(13); |
---|
| 150 | } |
---|
| 151 | $rs->Siguiente(); |
---|
| 152 | } |
---|
| 153 | $rs->Cerrar(); |
---|
| 154 | return($tablaHtml); |
---|
| 155 | } |
---|
| 156 | ?> |
---|
[9a94dbd] | 157 | |
---|