source: admin/WebConsole/acceso_esp.php @ 7c54b49

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 7c54b49 was f81a22ca, checked in by alonso <alonso@…>, 15 years ago

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

  • Property mode set to 100644
File size: 4.8 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 de la aplicación
10// ********************************************************************************************************
11include_once("controlacceso.php");
12include_once("./includes/CreaComando.php");
13include_once("./clases/AdoPhp.php");
14include_once("./includes/HTMLSELECT.php");
15//________________________________________________________________________________________________________
16$cmd=CreaComando($cnx); // Crea objeto comando
17if (!$cmd)
18        die("Error de acceso");
19//________________________________________________________________________________________________________
20$herror=0;
21if (isset($_GET["herror"])) $herror=$_GET["herror"];
22if (isset($_POST["herror"])) $herror=$_POST["herror"];
23
24$TbErr=array();
25$TbErr[0]="SIN ERRORES";
26$TbErr[1]="ATENCIÓN: Debe acceder a la aplicación a través de la pagina inicial";
27$TbErr[2]="ATENCIÓN: La Aplicación no tiene acceso al Servidor de Bases de Datos";
28$TbErr[3]="ATENCIÓN: Existen problemas para recuperar el registro, puede que haya sido eliminado";
29$TbErr[4]="ATENCIÓN: Usted no tiene acceso a esta aplicación";
30//________________________________________________________________________________________________________
31?>
32<HTML>
33<TITLE>Administración web de aulas</TITLE>
34<HEAD>
35        <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
36        <LINK rel="stylesheet" type="text/css" href="estilos.css">
37</HEAD>
38<SCRIPT LANGUAGE="JAVASCRIPT">
39//________________________________________________________________________________________________________
40function confirmar(){
41        if (comprobar_datos())
42                document.fdatos.submit();
43}
44//________________________________________________________________________________________________________
45function comprobar_datos(){
46        if (document.fdatos.usu.value==""){
47                alert("Debe introducir un nombre de Usuario")
48                document.fdatos.usu.focus()
49                return(false)
50        }
51        if (document.fdatos.pss.value==""){
52                alert("Debe introducir una contraseña")
53                document.fdatos.pss.focus()
54                return(false)
55        }
56        var  p=document.fdatos.idcentro.selectedIndex
57        if (p==0){ 
58                var res=confirm("ATENCIÓN: No ha introducido ninguna Unidad Organizativa. NO tendrá acceso al sistema a menos que sea adminstrador general de la Aplicación. ¿Desea acceder con este perfil?");
59        if(!res)
60                return(false)
61        }
62        return(true)
63}
64//______________________________________________________________________________________________________
65function PulsaEnter(oEvento){
66    var iAscii;
67    if (oEvento.keyCode)
68        iAscii = oEvento.keyCode;
69    else{
70                if (oEvento.which)
71                        iAscii = oEvento.which;
72                else
73                        return false;
74        }
75    if (iAscii == 13)  confirmar();
76        return true;
77}
78//________________________________________________________________________________________________________
79</SCRIPT>
80</HEAD>
81<BODY>
82<DIV style="POSITION:absolute;top:90;left:250">
83        <FORM action="controlpostacceso.php" name="fdatos" method="post">
84                <DIV align="center">
85                        <IMG src="./images/login_esp.jpg" width=500 >
86                        <INPUT onkeypress="PulsaEnter(event)" name="usu" 
87                                                        style="POSITION:absolute;top:125px;left:365px;width:90;height:20;COLOR: #999999; FONT-FAMILY: Verdana; FONT-SIZE: 12px;">
88                        <INPUT onkeypress="PulsaEnter(event)"  name="pss" type="password" 
89                                                        style="POSITION:absolute;top:160px;left:365;width:90;height:20;COLOR: #999999; FONT-FAMILY: Verdana; FONT-SIZE: 12px;">
90                       
91                        <DIV    style="POSITION:absolute;top:180px;left:265;COLOR: #F9F9F9; FONT-FAMILY: Verdana; FONT-SIZE: 12px;">
92                                <P>Unidad Organizativa<BR>
93                        <?
94
95                                        echo HTMLSELECT($cmd,0,'centros',$idcentro,'idcentro','nombrecentro',220);
96                        ?>
97                        </P></DIV>
98
99                        <IMG onclick="confirmar()" src="./images/botonok.gif" style="POSITION:absolute;top:240;left:400;CURSOR: hand">
100                </DIV>
101        </FORM>
102</DIV>
103<?
104//________________________________________________________________________________________________________
105echo '<DIV  style="POSITION: absolute;LEFT: 20px;TOP:300px;visibility:hidden" height=300 width=300>';
106echo '<IFRAME scrolling=yes height=300 width=310 id="iframes_comodin" src="./nada.php"></IFRAME>';
107echo '</DIV>';
108//________________________________________________________________________________________________________
109// Posiciona cursor en campo usuario y muestra mensaje de error si lo hubiera
110echo '<SCRIPT LANGUAGE="javascript">';
111if (!empty($herror))
112        echo "  alert('".$TbErr[$herror]."');";
113echo 'document.fdatos.usu.focus()';
114echo '</SCRIPT>';
115//________________________________________________________________________________________________________
116?>
117</BODY>
118</HTML>
Note: See TracBrowser for help on using the repository browser.