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