Blame view

index.html 3.8 KB
d45f025c   Elena.Budnik   merge remote and ...
1
<!DOCTYPE HTML>
7ac3e07e   Elena.Budnik   do not check user...
2
3
<html>
<head>
d45f025c   Elena.Budnik   merge remote and ...
4
5
6
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Welcome on Amda</title>
<link href="js/resources/css/AccueilAmda.css" rel="stylesheet" type="text/css">
7ac3e07e   Elena.Budnik   do not check user...
7
8
9
10
<!-- Login -->
<link rel="stylesheet" type="text/css" href="js/resources/css/login.css" />
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> 
7ac3e07e   Elena.Budnik   do not check user...
11
12
13
</head>

<body>
1f3ee1cd   Benjamin Renard   Improve login pag...
14
15
16
17
18
19
20
21
<script type="text/javascript">
  function setLoginLoader(value) {
    var form = document.getElementById('Form_Login');
    form.elements['username'].readOnly = value;
    form.elements['password'].readOnly = value;
    form.elements['login'].disabled = value;
    document.getElementById("loader").style.display = value ? 'block' : 'none';
  }
1f3ee1cd   Benjamin Renard   Improve login pag...
22
  
32710720   Elena.Budnik   HomePage draft
23
  function checkForm(form){
1f3ee1cd   Benjamin Renard   Improve login pag...
24
25
26
27
28
29
30
    if (form.elements['username'].value == "" || form.elements['password'].value == "") {
       alert('Please type your username and password');
       return false;
    }
    setLoginLoader(true);
    return true;
  }
32710720   Elena.Budnik   HomePage draft
31
  
1f3ee1cd   Benjamin Renard   Improve login pag...
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
  window.onpageshow = function(event) {
    var qs = (function(a) {
      if (a == "") return {};
      var b = {};
      for (var i = 0; i < a.length; ++i)
      {
        var p=a[i].split('=', 2);
        if (p.length == 1)
            b[p[0]] = "";
        else
            b[p[0]] = decodeURIComponent(p[1].replace(/\+/g, " "));
      }
      return b;
     })(window.location.search.substr(1).split('&'));

     if (qs["error"] && qs["error"] == "1") {
c5ef1a5d   Elena.Budnik   ereg => preg_match
48
49
        alert('Cannot connect to AMDA. \n Please check your username/password');
        setLoginLoader(false);
1f3ee1cd   Benjamin Renard   Improve login pag...
50
51
52
53
       return false;
     }

     setLoginLoader(false);
1f3ee1cd   Benjamin Renard   Improve login pag...
54
  };
32710720   Elena.Budnik   HomePage draft
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
  
  function checkGuest() {
    var random = Math.floor(Math.random()*10);
    var answer = Math.floor(random * 2);
    var input = prompt("Please enter " + random + " * 2  = ?", "");
      
    if (input == answer) {
        document.getElementById('Btn_GuestLogin').value = 'guest';
        return true;
    }
    else {
        alert("Sorry " + input); 
        return false;
    }
 };
1f3ee1cd   Benjamin Renard   Improve login pag...
70
</script>
32710720   Elena.Budnik   HomePage draft
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<div id="centrage">

<div id="trou">
<div id="couvercle"></div>

<div id="TousLesBoutons">
<div id="Btn_FirstVisit" onclick="location.href='help.html';"></div>
<div id="Btn_Rules" onclick="location.href='help/policy.html';"></div>
<form id="Form_Login" method="POST" action="desktop.php" onsubmit="return checkForm(this);"> 
        <div id="loader" class="loader"></div>
	    <input type="text" name="username" placeholder="LOGIN" id="Btn_EnterLogin" class="PlaceHolder" />   
	    <input type="password" name="password" placeholder="PASSWORD" id="Btn_EnterPassword" class="PlaceHolder"/>
	    <div id="userLogin">
            <div><input id="Btn_Login" name="login" type="submit" value=""/></div>
            <div id="textLogin">Login / Registered Users</div>
        </div>
</form>
d45f025c   Elena.Budnik   merge remote and ...
88
89
<a href="mailto:amda@irap.omp.eu?subject=AMDA registration" id="Btn_Register"></a>
<a href="mailto:amda@irap.omp.eu?subject=AMDA contact" id="Btn_Contact"></a>
8fe95461   Elena.Budnik   rm 8001, draft
90
91
92
<div id="Btn_About" onclick="location.href='help/info.html';"></div>
<div id="textAbout">AMDA Info</div>

8b134172   Myriam Bouchemit   lien CDPP
93
<a href="http://www.cdpp.eu/" id="Logo_CDPP"></a>
d45f025c   Elena.Budnik   merge remote and ...
94
<div id="PaveGuest">
32710720   Elena.Budnik   HomePage draft
95
96
    <form action="desktop.php" method="POST" onsubmit="return checkGuest();">
        <input id="Btn_GuestLogin" name="username" type="submit" value=""/>
7d6d814f   Elena.Budnik   Public Access
97
        <div id="TitrePaveGuest">Public Access</div>
f1382b7c   Elena.Budnik   hpmepage 3rd draft
98
    </form>
d45f025c   Elena.Budnik   merge remote and ...
99
</div>
8fe95461   Elena.Budnik   rm 8001, draft
100

d45f025c   Elena.Budnik   merge remote and ...
101
<div id="Logos_partenaires"></div>
7ac3e07e   Elena.Budnik   do not check user...
102

d45f025c   Elena.Budnik   merge remote and ...
103
<div id="PaveAnnoucements">
8fe95461   Elena.Budnik   rm 8001, draft
104
<div id="TitrePaveAnnoucement">Announcements</div>
620ed033   Myriam Bouchemit   update announcements
105
<div id="DateAnnoucement">20/01/2020</div>
8fe95461   Elena.Budnik   rm 8001, draft
106
<div id="TexteAnnoucement">New data: Parker Solar Probe :</BR> SWEAP (spc,spi), ISOIS (epilo, epihi)</div>
7ac3e07e   Elena.Budnik   do not check user...
107
</div>
d45f025c   Elena.Budnik   merge remote and ...
108
109
110
</div><!--TousLesBoutons-->
</div><!--trou-->
</div><!--centrage-->
7ac3e07e   Elena.Budnik   do not check user...
111
</body>
d45f025c   Elena.Budnik   merge remote and ...
112
</html>