source: admin/WebConsole/varios/acceso_operador.php @ 3fef8e1

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Last change on this file since 3fef8e1 was b9202b9, checked in by ramon <ramongomez@…>, 15 years ago

Corregir función iniciar sesión.

git-svn-id: https://opengnsys.es/svn/trunk@603 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100644
File size: 3.6 KB
Line 
1<?
2// *************************************************************************************************************************************************
3// Aplicación WEB: ogAdmWebCon
4// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
5
6// Fecha Creación: Diciembre-2003
7// Fecha Última modificación: Febrero-2005
8// Nombre del fichero: acceso.php
9// Descripción : Presenta la pantalla de login del operador
10// *************************************************************************************************************************************************
11
12session_start(); // Activa variables de sesi�
13
14$herror=0;
15
16if (isset($_GET["herror"])) $herror=$_GET["herror"];
17if (isset($_POST["herror"])) $herror=$_POST["herror"];
18
19$ITEMS_PUBLICOS=1;
20$ITEMS_PRIVADOS=2;
21
22if (isset($_SESSION["swop"])){
23        // Acceso al menu de adminitración del aula
24        $wurl="menucliente.php?tip=".$ITEMS_PRIVADOS;
25        Header('Location:'.$wurl);
26}
27
28$TbErr=array();
29$TbErr[0]="SIN ERRORES";
30$TbErr[1]="ATENCIÓN: Usted no tiene acceso al menú de administración";
31$TbErr[2]="ERROR de conexión con el servidor de datos";
32//________________________________________________________________________________________________________
33?>
34<HTML>
35<TITLE>Administración web de aulas</TITLE>
36<HEAD>
37        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
38        <LINK rel="stylesheet" type="text/css" href="estilos.css">
39</HEAD>
40<SCRIPT LANGUAGE="JAVASCRIPT">
41//________________________________________________________________________________________________________
42function confirmar(){
43        if (comprobar_datos())
44                document.fdatos.submit();
45}
46//________________________________________________________________________________________________________
47function comprobar_datos(){
48        if (document.fdatos.usu.value==""){
49                alert("Debe introducir un nombre de Usuario")
50                document.fdatos.usu.focus()
51                return(false)
52        }
53        if (document.fdatos.pss.value==""){
54                alert("Debe introducir una contraseña")
55                document.fdatos.pss.focus()
56                return(false)
57        }
58        return(true)
59}
60//______________________________________________________________________________________________________
61function PulsaEnter(oEvento){
62    var iAscii;
63    if (oEvento.keyCode)
64        iAscii = oEvento.keyCode;
65    else{
66                if (oEvento.which)
67                        iAscii = oEvento.which;
68                else
69                        return false;
70        }
71    if (iAscii == 13)  confirmar();
72        return true;
73}
74//________________________________________________________________________________________________________
75</SCRIPT>
76</HEAD>
77<BODY>
78<DIV style="POSITION:absolute;top:20;left:150">
79        <FORM action="accesoperadores.php" name="fdatos" method="post">
80                <DIV align="center">
81                        <IMG src="../images/login_operador.png" width=500 >
82                        <INPUT onkeypress="PulsaEnter(event)" name="usu"  style="POSITION:absolute;top:125px;left:365px;width:90;height:20;COLOR: #999999; FONT-FAMILY: Verdana; FONT-SIZE: 12px;">
83                        <INPUT onkeypress="PulsaEnter(event)"  name="pss" type="password"  style="POSITION:absolute;top:160px;left:365;width:90;height:20;COLOR: #999999; FONT-FAMILY: Verdana; FONT-SIZE: 12px;">
84                        <IMG onclick="confirmar()" src="../images/botonok.png" style="POSITION:absolute;top:190;left:400;CURSOR: hand">
85                </DIV>
86        </FORM>
87</DIV>
88<?
89//________________________________________________________________________________________________________
90// Posiciona cursor en campo usuario y muestra mensaje de error si lo hubiera
91echo '<SCRIPT LANGUAGE="javascript">';
92if (!empty($herror))
93        echo "  alert('".$TbErr[$herror]."');";
94echo 'document.fdatos.usu.focus()';
95echo '</SCRIPT>';
96//________________________________________________________________________________________________________
97?>
98</BODY>
99</HTML>
Note: See TracBrowser for help on using the repository browser.