Blame view

connect.php 1.8 KB
623525da   Erwan Nanrocki   corection du titre
1
  <h2> Connexion </h2>
6c4f09a4   Jean Wasilewski   Improvement on th...
2
  <form class="form-horizontal" role="form" id="connectForm">
0e151ddb   Erwan Nanrocki   creation de la pa...
3
4
5
6
7
8
    <div class="form-group">
      <label for="entrer_Identifiant_3" class="col-sm-2 control-label">Identifiant</label>
      <div class="col-sm-10">
        <input type="identifiant" class="form-control" id="Entrer_Identifiant_3" placeholder="Votre identifiant">
      </div>
    </div>
0e151ddb   Erwan Nanrocki   creation de la pa...
9
    <div class="form-group">
7797ea9c   Geoffrey PREUD'HOMME   [Connect] Ajout b...
10
      <label class="col-sm-2 control-label" for="entrer_mot_de_passe_3">Mot de passe</label>
0e151ddb   Erwan Nanrocki   creation de la pa...
11
      <div class="col-sm-10">
7797ea9c   Geoffrey PREUD'HOMME   [Connect] Ajout b...
12
13
14
15
16
17
        <div class="input-group">
          <input type="password" class="form-control" id="entrer_mot_de_passe_3" placeholder="Votre mot de passe">
          <span class="input-group-btn">
            <button id="afficherMotDePasse" type="button" class="btn btn-default"><span class="glyphicon glyphicon glyphicon-eye-open"></span> Afficher</button>
          </span>
        </div>
0e151ddb   Erwan Nanrocki   creation de la pa...
18
19
      </div>
    </div>
0e151ddb   Erwan Nanrocki   creation de la pa...
20
21
    <div class="form-group">
      <div class="col-sm-offset-2 col-sm-10">
6c4f09a4   Jean Wasilewski   Improvement on th...
22
        <button id="validCreds" type="submit" class="btn btn-primary" onclick="return false;">Se connecter</button>
0e151ddb   Erwan Nanrocki   creation de la pa...
23
24
      </div>
    </div>
0e151ddb   Erwan Nanrocki   creation de la pa...
25
  </form>
79a3abd5   Erwan Nanrocki   ajout d'un commen...
26
  
7797ea9c   Geoffrey PREUD'HOMME   [Connect] Ajout b...
27
  <script type="text/javascript">
74ea971e   Jean Wasilewski   jQuery request style
28
29
30
31
32
  // Affiche le mot de passe 
  $("#afficherMotDePasse")[0].addEventListener('mousedown', function()
  {
  	$('#entrer_mot_de_passe_3')[0].type = 'text';
  });
9771df54   Jean Wasilewski   Forgot selectors
33
  $('#afficherMotDePasse')[0].addEventListener('mouseup', function()
74ea971e   Jean Wasilewski   jQuery request style
34
35
36
  {
  	$('#entrer_mot_de_passe_3')[0].type = 'password';
  });
6c4f09a4   Jean Wasilewski   Improvement on th...
37
  $('#connectForm')[0].addEventListener('submit', function()
74ea971e   Jean Wasilewski   jQuery request style
38
39
  {
  	$("#validCreds")[0].disabled=true;
bb6a08e5   Jean Wasilewski   Added full creds ...
40
  	var checkPath = "checkCreds.php?user=";
764f32df   Jean Wasilewski   Fixed issue
41
42
43
  	checkPath += $("#Entrer_Identifiant_3")[0].value;
  	checkPath += "&pass=";
  	checkPath += Whirlpool($("#entrer_mot_de_passe_3")[0].value);
015a776d   Jean Wasilewski   Optimisation
44
  	if(file(checkPath)=="Yep")
d8889b3f   Jean Wasilewski   Issue with docume...
45
  		document.location.replace("");
bb6a08e5   Jean Wasilewski   Added full creds ...
46
47
48
  	else
  		alert("Mauvais identifiants");
  	$("#validCreds")[0].disabled=false;
74ea971e   Jean Wasilewski   jQuery request style
49
  });
7797ea9c   Geoffrey PREUD'HOMME   [Connect] Ajout b...
50
  </script>