Blame view

connect.php 1.97 KB
623525da   Erwan Nanrocki   corection du titre
1
  <h2> Connexion </h2>
74ea971e   Jean Wasilewski   jQuery request style
2
  <form class="form-horizontal" role="form">  
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
22
23
    <div class="form-group">
      <div class="col-sm-offset-2 col-sm-10">
        <div class="checkbox">
          <label>
7797ea9c   Geoffrey PREUD'HOMME   [Connect] Ajout b...
24
            <input type="checkbox">Rester connecté
0e151ddb   Erwan Nanrocki   creation de la pa...
25
26
27
28
          </label>
        </div>
      </div>
    </div>
0e151ddb   Erwan Nanrocki   creation de la pa...
29
30
    <div class="form-group">
      <div class="col-sm-offset-2 col-sm-10">
74ea971e   Jean Wasilewski   jQuery request style
31
        <button id="validCreds" type="submit" class="btn btn-primary">Se connecter</button>
0e151ddb   Erwan Nanrocki   creation de la pa...
32
33
      </div>
    </div>
0e151ddb   Erwan Nanrocki   creation de la pa...
34
  </form>
79a3abd5   Erwan Nanrocki   ajout d'un commen...
35
  
7797ea9c   Geoffrey PREUD'HOMME   [Connect] Ajout b...
36
  <script type="text/javascript">
74ea971e   Jean Wasilewski   jQuery request style
37
38
39
40
41
  // Affiche le mot de passe 
  $("#afficherMotDePasse")[0].addEventListener('mousedown', function()
  {
  	$('#entrer_mot_de_passe_3')[0].type = 'text';
  });
9771df54   Jean Wasilewski   Forgot selectors
42
  $('#afficherMotDePasse')[0].addEventListener('mouseup', function()
74ea971e   Jean Wasilewski   jQuery request style
43
44
45
  {
  	$('#entrer_mot_de_passe_3')[0].type = 'password';
  });
9771df54   Jean Wasilewski   Forgot selectors
46
  $('#validCreds')[0].addEventListener('click', function()
74ea971e   Jean Wasilewski   jQuery request style
47
48
  {
  	$("#validCreds")[0].disabled=true;
bb6a08e5   Jean Wasilewski   Added full creds ...
49
  	var checkPath = "checkCreds.php?user=";
764f32df   Jean Wasilewski   Fixed issue
50
51
52
  	checkPath += $("#Entrer_Identifiant_3")[0].value;
  	checkPath += "&pass=";
  	checkPath += Whirlpool($("#entrer_mot_de_passe_3")[0].value);
015a776d   Jean Wasilewski   Optimisation
53
  	if(file(checkPath)=="Yep")
d8889b3f   Jean Wasilewski   Issue with docume...
54
  		document.location.replace("");
bb6a08e5   Jean Wasilewski   Added full creds ...
55
56
57
  	else
  		alert("Mauvais identifiants");
  	$("#validCreds")[0].disabled=false;
74ea971e   Jean Wasilewski   jQuery request style
58
  });
7797ea9c   Geoffrey PREUD'HOMME   [Connect] Ajout b...
59
  </script>