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