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