source: admin/WebConsole/acceso_esp.php @ 26a1226

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 26a1226 was 9ba9c9b, checked in by ramon <ramongomez@…>, 13 years ago

Versión 1.0.3, #483: Pantalla principal en inglés (falta gráfico principal).

git-svn-id: https://opengnsys.es/svn/branches/version1.0@2484 a21b9725-9963-47de-94b9-378ad31fedc9

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