source: admin/ogAdmSources/ogAdmWebCon/acceso_eng.php @ e42f34e

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 e42f34e was 8964f9b, checked in by ramon <ramongomez@…>, 16 years ago

Resstructuración de trunk.

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

  • Property mode set to 100644
File size: 4.2 KB
Line 
1<?
2// *************************************************************************************************************************************************
3// Aplicación WEB: ogAdmWebCon
4// Copyright 2003-2005 José Manuel Alonso. Todos los derechos reservados.
5// Fecha Creación: Diciembre-2003
6// Fecha Última modificación: Febrero-2005
7// Nombre del fichero: acceso.php
8// Descripción : Presenta la pantalla de login de la aplicación
9// *************************************************************************************************************************************************
10if(isset($_SESSION)){   // Si existe algua sesión ...
11        session_unset(); // Elimina variables
12        session_destroy(); // Destruye sesión
13}
14$herror=0;
15if (isset($_GET["herror"])) $herror=$_GET["herror"];
16
17$TbErr=array();
18$TbErr[0]="NO ERRORS";
19$TbErr[1]="WARNING:You must access to aplication through login pag";
20$TbErr[2]="WARNING:Aplication without access to Server Data Base";
21$TbErr[3]="WARNING: There are some problem to recovery the record, must be it is removed";
22//________________________________________________________________________________________________________
23?>
24<HTML>
25<TITLE> Administración web de aulas</TITLE>
26<HEAD>
27        <LINK rel="stylesheet" type="text/css" href="estilos.css">
28</HEAD>
29<SCRIPT LANGUAGE="JAVASCRIPT">
30//________________________________________________________________________________________________________
31function confirmar(){
32        if (comprobar_datos()){
33                var usu=document.fdatos.usu.value;
34                var pss=document.fdatos.pss.value;
35                var ifr=document.getElementById("iframes_comodin"); // Toma objeto Iframe
36                var wurl="controlacceso.php?usu="+usu+"&pss="+pss
37                ifr.src=wurl; // LLama a la página gestora
38        }
39}
40//________________________________________________________________________________________________________
41function comprobar_datos(){
42        if (document.fdatos.usu.value==""){
43                alert("You must introduce a User name")
44                document.fdatos.usu.focus()
45                return(false)
46        }
47        if (document.fdatos.pss.value==""){
48                alert("You must introduce a Password")
49                document.fdatos.pss.focus()
50                return(false)
51        }
52        return(true)
53}
54//______________________________________________________________________________________________________
55function resultado_acceso(resul){
56        if (!resul){
57                alert('WARNING: You are not authorized to access this aplication')
58                return
59        }
60        location.href="frames.php";
61}
62//______________________________________________________________________________________________________
63function PulsaEnter(oEvento){
64    var iAscii;
65    if (oEvento.keyCode)
66        iAscii = oEvento.keyCode;
67    else{
68                if (oEvento.which)
69                        iAscii = oEvento.which;
70                else
71                        return false;
72        }
73    if (iAscii == 13)  confirmar();
74        return true;
75}
76//________________________________________________________________________________________________________
77</SCRIPT>
78</HEAD>
79<BODY>
80<DIV style="POSITION:absolute;top:90;left:212">
81        <FORM action="controlacceso.php" name="fdatos" method="post">
82                <DIV align="center">
83                        <IMG src="./images/login_eng.jpg" >
84                        <INPUT onkeypress="PulsaEnter(event)" name="usu"  style="POSITION:absolute;top:160;left:455;width=130;height:20;COLOR: #999999; FONT-FAMILY: Verdana; FONT-SIZE: 12px;">
85                        <INPUT onkeypress="PulsaEnter(event)"  name="pss" type="password"  style="POSITION:absolute;top:190;left:455;width=130;height:20;COLOR: #999999; FONT-FAMILY: Verdana; FONT-SIZE: 12px;">
86                        <IMG onclick="confirmar()" src="./images/botonok.gif" style="POSITION:absolute;top:215;left:555;CURSOR: hand">
87                </DIV>
88        </FORM>
89</DIV>
90<?
91//________________________________________________________________________________________________________
92echo '<DIV  style="POSITION: absolute;LEFT: 20px;TOP:300px;visibility=hidden" height=300 width=300>';
93echo '<IFRAME scrolling=yes height=300 width=310 id="iframes_comodin" src="./nada.php"></IFRAME>';
94echo '</DIV>';
95//________________________________________________________________________________________________________
96// Posiciona cursor en campo usuario y muestra mensaje de error si lo hubiera
97echo '<SCRIPT LANGUAGE="javascript">';
98if (!empty($herror))
99        echo "  alert('".$TbErr[$herror]."');";
100echo 'document.fdatos.usu.focus()';
101echo '</SCRIPT>';
102//________________________________________________________________________________________________________
103?>
104</BODY>
105</HTML>
Note: See TracBrowser for help on using the repository browser.