Commit 32c17a99c3ce6d34bd1ad0eeaeecb2482cad3ebe

Authored by Geoffrey PREUD'HOMME
1 parent 1ed732a0

Supprimé (tout) ce qui était inutile

.gitignore
... ... @@ -3,4 +3,5 @@ creds.php
3 3 fonts/*
4 4 */bootstrap*
5 5 *jquery*
6   -js/konami.js
7 6 \ No newline at end of file
  7 +js/konami.js
  8 +
... ...
.htaccess
1 1 FallbackResource ./index.php
2   -ErrorDocument 404 ./index.php
3 2 \ No newline at end of file
  3 +ErrorDocument 404 ./index.php
  4 +
... ...
checkCreds.php deleted
... ... @@ -1,32 +0,0 @@
1   -<?php
2   -session_start();
3   -require_once("creds.php");
4   -
5   -if(!(isset($_GET["user"])&&isset($_GET["pass"])))
6   - die("Nop");
7   -
8   -$link = mysql_connect(__MYSQL_HOSTNAME__, __MYSQL_USERNAME__, __MYSQL_PASSWORD__)
9   - or die("Nop");
10   -
11   -if(!mysql_select_db('crep', $link))
12   - die('Nop');
13   -$requete = 'SELECT pk, admin, realname FROM users WHERE username=\''.$_GET["user"].'\' AND password=\''.$_GET["pass"].'\'';
14   -$resultat = mysql_query($requete);
15   -
16   -if (!$resultat)
17   - die("Nop");
18   -
19   -if($row = mysql_fetch_row($resultat))
20   -{
21   - echo 'Yep';
22   - $_SESSION["connected"]=true;
23   - $_SESSION["pk"]=$row[0];
24   - $_SESSION["admin"]=$row[1];
25   - $_SESSION["realname"]=$row[2];
26   -}
27   -else
28   - echo 'Nop';
29   -
30   -
31   -mysql_close($link);
32   -?>
connect.php deleted
... ... @@ -1,51 +0,0 @@
1   -<h2> Connexion </h2>
2   -<form class="form-horizontal" role="form" id="connectForm">
3   - <div class="form-group">
4   - <label for="entrer_Identifiant_3" class="col-sm-2 control-label">Identifiant</label>
5   - <div class="col-sm-10">
6   - <input type="identifiant" class="form-control" id="Entrer_Identifiant_3" placeholder="Votre identifiant">
7   - </div>
8   - </div>
9   - <div class="form-group">
10   - <label class="col-sm-2 control-label" for="entrer_mot_de_passe_3">Mot de passe</label>
11   - <div class="col-sm-10">
12   - <div class="input-group">
13   - <input type="password" class="form-control" id="entrer_mot_de_passe_3" placeholder="Votre mot de passe">
14   - <span class="input-group-btn">
15   - <button id="afficherMotDePasse" type="button" class="btn btn-default"><span class="glyphicon glyphicon glyphicon-eye-open"></span> Afficher</button>
16   - </span>
17   - </div>
18   - </div>
19   - </div>
20   - <div class="form-group">
21   - <div class="col-sm-offset-2 col-sm-10">
22   - <button id="validCreds" type="submit" class="btn btn-primary">Se connecter</button>
23   - </div>
24   - </div>
25   -</form>
26   -
27   -<script type="text/javascript">
28   -// Affiche le mot de passe
29   -$("#afficherMotDePasse")[0].addEventListener('mousedown', function()
30   -{
31   - $('#entrer_mot_de_passe_3')[0].type = 'text';
32   -});
33   -$('#afficherMotDePasse')[0].addEventListener('mouseup', function()
34   -{
35   - $('#entrer_mot_de_passe_3')[0].type = 'password';
36   -});
37   -$('#connectForm').submit(function(event)
38   -{
39   - $("#validCreds")[0].disabled=true;
40   - var checkPath = "checkCreds.php?user=";
41   - checkPath += $("#Entrer_Identifiant_3")[0].value;
42   - checkPath += "&pass=";
43   - checkPath += Whirlpool($("#entrer_mot_de_passe_3")[0].value);
44   - if(file(checkPath)=="Yep")
45   - document.location.replace("");
46   - else
47   - alert("Mauvais identifiants");
48   - $("#validCreds")[0].disabled=false;
49   - event.preventDefault();
50   -});
51   -</script>
index.php
1 1 <?php
2 2  
3   -if ($_SERVER['HTTP_HOST'] == 'crepbeta.plil.net') {
4   - header('HTTP/1.1 307 Temporary Redirect');
5   - header('Location: http://crep.plil.net/');
6   - exit();
7   -}
8   -
9   -session_start();
10   -
11   -require_once("creds.php");
12   -
13 3 $url = $_SERVER["REQUEST_URI"];
14 4 $parsedUrl = parse_url($url);
15 5 $path = $parsedUrl['path'];
... ... @@ -52,10 +42,8 @@ if (isset($_GET[&#39;c&#39;])) {
52 42 <script type="text/javascript" src="js/jquery.min.js"></script>
53 43 <script type="text/javascript" src="js/bootstrap.min.js"></script>
54 44 <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>
55   - <!-- <script type="text/javascript" src="js/whirlpool.min.js"></script> -->
56 45 <script type="text/javascript" src="js/crep.js"></script>
57 46 <script type="text/javascript" src="js/konami.js"></script>
58   - <!-- <script type="text/javascript" src="js/base64.js"></script> -->
59 47 </head>
60 48 <body>
61 49 <?php require_once("topnavbar.php");?>
... ...
logout.php deleted
... ... @@ -1,4 +0,0 @@
1   -<?php
2   -session_start();
3   -session_destroy();
4   -?>
pages/schools.php
1   -<?php
2   - require_once("creds.php");
3   -?>
4 1 <h2>Liste écoles participantes</h2>
5 2 <?php
6 3 $ecoles = array(
... ...
rights.php deleted