Skip to content

Commit

Permalink
First major commit
Browse files Browse the repository at this point in the history
  • Loading branch information
estellearrc committed Mar 12, 2018
1 parent 5c67cdb commit a885a3d
Show file tree
Hide file tree
Showing 37 changed files with 9,874 additions and 0 deletions.
39 changes: 39 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

.header {
margin-bottom : -20px;
}
.banner {
margin-bottom : -20px;
width : 100% auto;
height: 50vh; /*viewport height*/
background-image: url(" ../images/accueil.jpg");
background-size: cover;

}

.well{
margin : auto;
/* background-color:#FFFCFC; */
background-color: #B2B1C4;
border-radius:100px 100px;
border:1px solid #0A064D;
width: 100%;
margin-top: 30px;
margin-bottom: 30px
}

#text{
font-family: 'Lucida Sans';
}

.gap-left{
width : 160px;
height : 190px;
border-radius:50px 50px;
}

body{
background-image: url("../images/fond2.png");
/* background-attachment: fixed; */
}

Binary file added images/Thumbs (1).db
Binary file not shown.
Binary file added images/accueil.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/accueil2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/accueil3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/accueil4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/fond.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/fond2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/fond2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/fond3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/fond4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/fond5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/question.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions includes/footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<footer>
<nav class="navbar navbar-inverse navbar-static-bottom" style = "background-color : #0A064D;" role="navigation">
<div class="container">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<a class="navbar-brand" style ="font-size : 80%; color : white;">© User Interface Design GmbH</a>
<ul class="nav navbar-nav" style ="font-size : 100%">
<li><a href="#">Contact</a></li>
<li><a href="#">A propos</a></li>
<li><a href="#">Conditions d'utilisation</a></li>
</ul>
</div>
</nav>
</footer>



50 changes: 50 additions & 0 deletions includes/functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php

// Connect to the database. Returns a PDO object
function getDb() {
// Local deployment
$server = "localhost";
$username = "testutilisateur";
$password = "test";
$db = "pollux";

return new PDO("mysql:host=$server;dbname=$db;charset=utf8", "$username", "$password",
array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
}

// Check if someone is connected
function isConnected() {
return isset($_SESSION['login']);
}

function isUserConnected(){
if(isConnected()){
$login = $_SESSION['login'];
$password = $_SESSION['password'];
$stmt = getDb()->prepare('select * from participant where mail_participant=:mail and mdp_participant=:mdp');
$stmt->execute(array(':mail' => $login,':mdp' => $password));
return($stmt->rowCount() == 1);
}
return false;
}

function isExpConnected(){
if(isConnected()){
$login = $_SESSION['login'];
$password = $_SESSION['password'];
$stmt = getDb()->prepare('select * from experimentateur where mail_experimentateur=:mail and mdp_experimentateur=:mdp');
$stmt->execute(array(':mail' => $login,':mdp' => $password));
return($stmt->rowCount() == 1);
}
return false;
}

// Redirect to a URL
function redirect($url) {
header("Location: $url");
}

// Escape a value to prevent XSS attacks
function escape($value) {
return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);
}
7 changes: 7 additions & 0 deletions includes/head.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="lib\bootstrap\css\bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
</head>
62 changes: 62 additions & 0 deletions includes/header.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?php require_once "functions.php"; ?>
<div class = "header">
<nav class="navbar navbar-inverse navbar-static-top" style = "background-color : #0A064D; height : 60px;">
<div class="container" style = "font-family :'Verdana';">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" data-target="#navbarCollapse" data-toggle="collapse" class="navbar-toggle">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="index.php" class="navbar-brand" style="font-size : 250%;">PollUX</a>
</div>
<!-- Collection of nav links and other content for toggling -->
<div id="navbarCollapse" class="collapse navbar-collapse">
<?php if (isExpConnected()) { ?>
<ul class="nav navbar-nav" style="font-size : 90%;">
<li ><a href="#">Mes expériences</a></li>
<li ><a href="#">Invitations</a></li>
</ul>
<?php } else { if (isUserConnected()) {?>
<ul class="nav navbar-nav" style="font-size : 90%;">
<li ><a href="#">Mes réponses</a></li>
<li ><a href="#">Expériences disponibles</a></li>
</ul>
<?php } } ?>
<ul class="nav navbar-nav navbar-right" style="font-size : 70%;">
<?php if (isConnected()) { ?>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span class="glyphicon glyphicon-user"></span> Bienvenue, <?= $_SESSION['login'] ?> <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="logout.php">Se déconnecter</a></li>
</ul>
</li>
<?php } else { ?>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span class='glyphicon glyphicon-user'></span> Non connecté <b class='caret'></b>
</a>
<ul class="dropdown-menu">
<li><a href='login.php'>Se connecter</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
S'inscrire <b class='caret'></b>
</a>
<ul>
<li><a href="sign_up_user.php">Participant</a></li>
<li><a href="sign_up_exp.php">Expérimentateur</a></li>
</ul>
</li>
</ul>
</li>
<?php } ?>
</ul>
</div>
</div>
</nav>
</div>

4 changes: 4 additions & 0 deletions includes/scripts.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!-- jQuery -->
<script src="lib/jquery/jquery.min.js"></script>
<!-- JavaScript Boostrap plugin -->
<script src="lib/bootstrap/js/bootstrap.min.js"></script>
75 changes: 75 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?php
require_once "includes/functions.php";
session_start();
?>

<!doctype html>
<html>
<?php require_once "includes/head.php";?>
<body>
<?php require_once "includes/header.php";?>
<div class="jumbotron banner"></div>
<div id="nav">
<div class="navbar navbar-inverse navbar-static-top" style = "background-color : #0A064D;">
<div class="container">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<ul class="nav navbar-nav" style ="font-size : 100%">
<li><a href="#Qu'est-ce que c'est ?">Qu'est-ce que c'est ?</a></li>
<li><a href="#Qu'apportons-nous ?">Qu'apportons-nous ?</a></li>
<li><a href="#Comment ça marche ?">Comment ça marche ?</a></li>
</ul>
</div>
</div>
</div>
<div id="Qu'est-ce que c'est ?" class = " col-lg-offset-3 col-lg-6">
<div class = "well clearfix">
<img src="images/accueil2.jpg" alt ="image" class="pull-right gap-left"/>
<p id="text" >
<h3>Qu'est-ce que c'est ?</h3>
<p>
Bonjour je m’appelle Jean-Michel mais mes amis m’appellent Mich <br/>
c’est plus joli et je ramasse toutes les filles (ça rime). </p>
Je précise que ce que je note ne sera pas sur le site.<br/>
Notre site vous offrira des tests UX à diffuser à qui vous plaira puis <br/>
vous fournira les analyses.
</p>
</p>
</div>
</div>
<div id="Qu'apportons-nous ?" class = "col-lg-offset-3 col-lg-6">
<div class = "well clearfix">
<img src="images/accueil3.jpg" alt ="image" class="pull-right gap-left"/>
<p id="text" >
<h3>Qu'apportons-nous ?</h3>
<p>
Bonjour je m’appelle Jean-Michel mais mes amis m’appellent Mich <br/>
c’est plus joli et je ramasse toutes les filles (ça rime). </p>
Je précise que ce que je note ne sera pas sur le site.<br/>
Notre site vous offrira des tests UX à diffuser à qui vous plaira puis <br/>
vous fournira les analyses.
</p>
</p>
</div>
</div>
<div id="Comment ça marche ?" class = " col-lg-offset-3 col-lg-6">
<div class = "well clearfix">
<img src="images/accueil4.jpg" alt ="image" class="pull-right gap-left"/>
<p id="text" >
<h3>Comment ça marche ?</h3>
<p>
Bonjour je m’appelle Jean-Michel mais mes amis m’appellent Mich <br/>
c’est plus joli et je ramasse toutes les filles (ça rime). </p>
Je précise que ce que je note ne sera pas sur le site.<br/>
Notre site vous offrira des tests UX à diffuser à qui vous plaira puis <br/>
vous fournira les analyses.
</p>
</p>
</div>
</div>
<?php require_once "includes/footer.php"; ?>
<?php require_once "includes/scripts.php"; ?>
</body>
</html>



Loading

0 comments on commit a885a3d

Please sign in to comment.