[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"> |
---|
| 52 | <TABLE id="tabla_conf" align=center border=0 cellPadding=1 cellSpacing=1 class=tabla_datos> |
---|
| 53 | <TR> |
---|
| 54 | <TH align=center> </TH> |
---|
| 55 | <TH align=center> <? echo $TbMsg[8] ?> </TH> |
---|
| 56 | <TH align=center> <? echo $TbMsg[9] ?> </TH> |
---|
| 57 | </TR> |
---|
[9a94dbd] | 58 | <?php |
---|
[00ed4ab] | 59 | echo tablaConfiguracionesIniciarSesion($cmd,$idambito); |
---|
[3ec149c] | 60 | ?> |
---|
| 61 | </TABLE> |
---|
| 62 | </FORM> |
---|
[9a94dbd] | 63 | <?php |
---|
[3ec149c] | 64 | //________________________________________________________________________________________________________ |
---|
| 65 | include_once("./includes/formularioacciones.php"); |
---|
| 66 | //________________________________________________________________________________________________________ |
---|
| 67 | include_once("./includes/opcionesacciones.php"); |
---|
| 68 | //________________________________________________________________________________________________________ |
---|
| 69 | ?> |
---|
[ef3ffe2] | 70 | <SCRIPT language="javascript"> |
---|
| 71 | Sondeo(); |
---|
| 72 | </SCRIPT> |
---|
[3ec149c] | 73 | </BODY> |
---|
| 74 | </HTML> |
---|
[9a94dbd] | 75 | <?php |
---|
[3ec149c] | 76 | /************************************************************************************************************************************************** |
---|
| 77 | Recupera los datos de un ordenador |
---|
| 78 | Parametros: |
---|
| 79 | - cmd: Una comando ya operativo (con conexiónabierta) |
---|
| 80 | - ido: El identificador del ordenador |
---|
| 81 | ________________________________________________________________________________________________________*/ |
---|
| 82 | function toma_propiedades($cmd,$idordenador){ |
---|
| 83 | global $nombreordenador; |
---|
| 84 | global $ip; |
---|
| 85 | global $mac; |
---|
| 86 | global $idperfilhard; |
---|
| 87 | global $idservidordhcp; |
---|
| 88 | global $idservidorrembo; |
---|
| 89 | $rs=new Recordset; |
---|
| 90 | $cmd->texto="SELECT nombreordenador,ip,mac,idperfilhard FROM ordenadores WHERE idordenador='".$idordenador."'"; |
---|
| 91 | $rs->Comando=&$cmd; |
---|
| 92 | if (!$rs->Abrir()) return(false); // Error al abrir recordset |
---|
| 93 | $rs->Primero(); |
---|
| 94 | if (!$rs->EOF){ |
---|
| 95 | $nombreordenador=$rs->campos["nombreordenador"]; |
---|
| 96 | $ip=$rs->campos["ip"]; |
---|
| 97 | $mac=$rs->campos["mac"]; |
---|
| 98 | $idperfilhard=$rs->campos["idperfilhard"]; |
---|
| 99 | $rs->Cerrar(); |
---|
| 100 | return(true); |
---|
| 101 | } |
---|
| 102 | else |
---|
| 103 | return(false); |
---|
| 104 | } |
---|
| 105 | /*________________________________________________________________________________________________________ |
---|
| 106 | Crea la tabla de configuraciones y perfiles a crear |
---|
| 107 | ________________________________________________________________________________________________________*/ |
---|
| 108 | function tabla_configuraciones($cmd,$idordenador){ |
---|
| 109 | global $idcentro; |
---|
| 110 | $tablaHtml=""; |
---|
[9a94dbd] | 111 | $cmd->texto="SELECT ordenadores_particiones.numpar, |
---|
| 112 | ordenadores_particiones.tamano, |
---|
| 113 | ordenadores_particiones.idnombreso, nombresos.nombreso, |
---|
| 114 | tipospar.tipopar, imagenes.descripcion AS imagen, |
---|
| 115 | perfilessoft.descripcion AS perfilsoft, |
---|
| 116 | sistemasficheros.descripcion AS sistemafichero |
---|
| 117 | FROM ordenadores |
---|
| 118 | INNER JOIN ordenadores_particiones ON ordenadores_particiones.idordenador=ordenadores.idordenador |
---|
| 119 | LEFT OUTER JOIN nombresos ON nombresos.idnombreso=ordenadores_particiones.idnombreso |
---|
| 120 | INNER JOIN tipospar ON tipospar.codpar=ordenadores_particiones.codpar |
---|
| 121 | LEFT OUTER JOIN imagenes ON imagenes.idimagen=ordenadores_particiones.idimagen |
---|
| 122 | LEFT OUTER JOIN perfilessoft ON perfilessoft.idperfilsoft=ordenadores_particiones.idperfilsoft |
---|
| 123 | LEFT OUTER JOIN sistemasficheros ON sistemasficheros.idsistemafichero=ordenadores_particiones.idsistemafichero |
---|
| 124 | WHERE ordenadores.idordenador=".$idordenador." |
---|
| 125 | AND tipospar.clonable=1 |
---|
| 126 | AND nombresos.nombreso!='DATA' |
---|
| 127 | ORDER BY ordenadores_particiones.numpar"; |
---|
[179ccd2] | 128 | |
---|
[3ec149c] | 129 | $rs->Comando=&$cmd; |
---|
| 130 | $rs=new Recordset; |
---|
| 131 | $rs->Comando=&$cmd; |
---|
| 132 | if (!$rs->Abrir()) return($tablaHtml); // Error al abrir recordset |
---|
| 133 | $rs->Primero(); |
---|
| 134 | while (!$rs->EOF){ |
---|
| 135 | if(!empty($rs->campos["idnombreso"])){ |
---|
| 136 | $tablaHtml.='<TR>'.chr(13); |
---|
| 137 | $tablaHtml.='<TD ><input type="radio" name="particion" value='.$rs->campos["numpar"].'></TD>'.chr(13); |
---|
| 138 | $tablaHtml.='<TD align=center> '.$rs->campos["numpar"].' </TD>'.chr(13); |
---|
| 139 | $tablaHtml.='<TD> '.$rs->campos["nombreso"].' </TD>'.chr(13); |
---|
| 140 | $tablaHtml.='</TR>'.chr(13); |
---|
| 141 | } |
---|
| 142 | $rs->Siguiente(); |
---|
| 143 | } |
---|
| 144 | $rs->Cerrar(); |
---|
| 145 | return($tablaHtml); |
---|
| 146 | } |
---|
| 147 | ?> |
---|
[9a94dbd] | 148 | |
---|