[25e3584] | 1 | <? |
---|
| 2 | // ************************************************************************************************************************************************* |
---|
[857c4ae] | 3 | // Aplicaci� WEB: ogAdmWebCon |
---|
| 4 | // Autor: Jos�Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla |
---|
| 5 | // Fecha Creaci�: Diciembre-2003 |
---|
| 6 | // Fecha �tima modificaci�: Febrero-2005 |
---|
| 7 | // Nombre del fichero: menucliente.php |
---|
| 8 | // Descripci� :Este fichero implementa el menu del browser de los clientes |
---|
| 9 | // ************************************************************************************************************************************************* |
---|
[632c368] | 10 | // Recupera la IP del ordenador que solicita la página |
---|
| 11 | $iph=tomaIP(); |
---|
[857c4ae] | 12 | if(!empty($iph)){ |
---|
[eb45081] | 13 | Header("Location:../controlacceso.php?iph=".$iph); // Accede a la p�ina de menus |
---|
[25e3584] | 14 | exit; |
---|
| 15 | } |
---|
| 16 | ?> |
---|
| 17 | <HTML> |
---|
[632c368] | 18 | <TITLE>Administración web de aulas</TITLE> |
---|
| 19 | <HEAD> |
---|
[857c4ae] | 20 | <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
[632c368] | 21 | <LINK rel="stylesheet" type="text/css" href="estilos.css"> |
---|
| 22 | </HEAD> |
---|
| 23 | <SCRIPT LANGUAGE="JAVASCRIPT"> |
---|
| 24 | //________________________________________________________________________________________________________ |
---|
| 25 | function confirmar(){ |
---|
| 26 | if (comprobar_datos()) |
---|
| 27 | document.fdatos.submit(); |
---|
| 28 | } |
---|
| 29 | //________________________________________________________________________________________________________ |
---|
| 30 | function comprobar_datos(){ |
---|
| 31 | if (document.fdatos.usu.value==""){ |
---|
| 32 | alert("Debe introducir un nombre de Usuario") |
---|
| 33 | document.fdatos.usu.focus() |
---|
| 34 | return(false) |
---|
| 35 | } |
---|
| 36 | if (document.fdatos.pss.value==""){ |
---|
| 37 | alert("Debe introducir una contraseña") |
---|
| 38 | document.fdatos.pss.focus() |
---|
| 39 | return(false) |
---|
| 40 | } |
---|
| 41 | return(true) |
---|
| 42 | } |
---|
| 43 | //______________________________________________________________________________________________________ |
---|
| 44 | function PulsaEnter(oEvento){ |
---|
| 45 | var iAscii; |
---|
| 46 | if (oEvento.keyCode) |
---|
| 47 | iAscii = oEvento.keyCode; |
---|
| 48 | else{ |
---|
| 49 | if (oEvento.which) |
---|
| 50 | iAscii = oEvento.which; |
---|
| 51 | else |
---|
| 52 | return false; |
---|
| 53 | } |
---|
| 54 | if (iAscii == 13) confirmar(); |
---|
| 55 | return true; |
---|
| 56 | } |
---|
| 57 | //________________________________________________________________________________________________________ |
---|
| 58 | </SCRIPT> |
---|
| 59 | </HEAD> |
---|
| 60 | <BODY> |
---|
| 61 | <DIV style="POSITION:absolute;top:20;left:150"> |
---|
| 62 | <FORM action="controlacceso.php" name="fdatos" method="post"></FORM> |
---|
| 63 | </DIV> |
---|
[25e3584] | 64 | </BODY> |
---|
| 65 | </HTML> |
---|
[632c368] | 66 | <? |
---|
| 67 | //___________________________________________________________________________________________________ |
---|
| 68 | // |
---|
| 69 | // Redupera la ip del cliente web |
---|
| 70 | //___________________________________________________________________________________________________ |
---|
| 71 | function tomaIP(){ |
---|
| 72 | // Se asegura que la pagina se solicita desde la IP que viene |
---|
| 73 | global $HTTP_SERVER_VARS; |
---|
| 74 | if ($HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"] != "") |
---|
| 75 | $ipcliente = $HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"]; |
---|
| 76 | else |
---|
| 77 | $ipcliente = $HTTP_SERVER_VARS["REMOTE_ADDR"]; |
---|
| 78 | |
---|
| 79 | return($ipcliente); |
---|
| 80 | } |
---|
| 81 | ?> |
---|