diff --git a/Timeline/admin_add_concours.php b/Timeline/admin_add_concours.php index 3952a144a114123a472745b2ca6e61ddc298f41e..9eaf7545e62a47cb73d9826dbe19af176ef93e51 100755 --- a/Timeline/admin_add_concours.php +++ b/Timeline/admin_add_concours.php @@ -19,13 +19,13 @@ <head> <meta charset="utf-8"/> - + <link rel="shortcut icon" href="fonts/icone.ico"> <title>TIMELINE</title> <!-- pour les moteurs de recherche --> - <meta name="description" lang="fr" content="plateforme de timeline photo pour soirée et évènement" /> - <meta name="keywords" lang="fr" content="photos, soirée, timeline, ENSIIE, iiens" /> + <metaname="description" lang="fr" content="plateforme de timeline photo pour soirée et évènement" /> + <metaname="keywords" lang="fr" content="photos, soirée, timeline, ENSIIE, iiens" /> <!-- jquery --> <script src="js/jquery_library.js"></script> @@ -33,14 +33,11 @@ <!-- Latest compiled and minified JavaScript --> <script src="js/bootstrap.js"></script> - <!-- JS validation formulaire --> - <script src="js/validate_add_concours.js"></script> - - <!-- Latest compiled and minified CSS --> - <link rel="stylesheet" href="css/bootstrap.css"> + <!-- Latest compiled and minified CSS --> + <link rel="stylesheet" href="css/bootstrap.css"> <!-- fichier css menu --> <link rel="stylesheet" href="css/menu.css"> - <link rel="stylesheet" href="css/admin_add_soiree.css"> + <link rel="stylesheet" href="css/acceuil.css"> </head> @@ -49,46 +46,8 @@ <?php include 'header.php'; ?> - <h3 class="page-header"> Gestion administrateur - Ajout d'un concours</h3> - - <div id="addSoiree" class="form-horizontal" > - - <div class="form-group"> - <label class="control-label col-sm-3" for="nom" > nom : </label> - <div class="col-sm-5"> - <input class="form-control" id="nom" type="text" name="nom" /> - </div> - <div class="col-sm-4 errors" id="nomerror"></div> - </div> - - - <div class="form-group"> - <label class="control-label col-sm-3" for="description" > Description : </label> - <div class="col-sm-5"> - <textarea class="form-control" id="description" name="description" ></textarea> - </div> - <div class="col-sm-4 errors" id="descrierror"></div> - </div> - - <div class="form-group"> - <label class="control-label col-sm-3" for="mdp" > Mot de passe : </label> - <div class="col-sm-5"> - <input type="password" class="form-control" id="mdp" name="mdp" /> - </div> - <div class="col-sm-4 errors" id="mdperror"></div> - </div> - - <div class="form-group"> - <div class="col-sm-offset-3 col-sm-5"> - <button class="btn btn-default btn-block" type="submit" id="submit" name="submit">Ajouter</button> - <span class="errors" id="formerror"></span> - <span class="correct" id="formcorrect"></span> - </div> - </div> - - </div> - - - - - <?php include 'footer.php'; ?> \ No newline at end of file + <h3 class="page-header">Gestion administrateur - Début d'un concours</h3> + + Indisponible pour le moment ! + + <?php include 'footer.php'; ?> diff --git a/Timeline/admin_stop_concours.php b/Timeline/admin_stop_concours.php new file mode 100755 index 0000000000000000000000000000000000000000..f6910c27aa53c9b77e7bc13a17ae5502d3fcdfbd --- /dev/null +++ b/Timeline/admin_stop_concours.php @@ -0,0 +1,53 @@ +<?php + session_start(); + + /* On traite le cas où user lambda accède à la partie admin */ + + $id=$_SESSION['login']; + + if($id != "administrat") + { + header('location: connexion.php'); + } + + + +?> + +<!DOCTYPE html > +<html lang="fr"> + <head> + <meta charset="utf-8"/> + + + <link rel="shortcut icon" href="fonts/icone.ico"> + <title>TIMELINE</title> + + <!-- pour les moteurs de recherche --> + <metaname="description" lang="fr" content="plateforme de timeline photo pour soirée et évènement" /> + <metaname="keywords" lang="fr" content="photos, soirée, timeline, ENSIIE, iiens" /> + + <!-- jquery --> + <script src="js/jquery_library.js"></script> + + <!-- Latest compiled and minified JavaScript --> + <script src="js/bootstrap.js"></script> + + <!-- Latest compiled and minified CSS --> + <link rel="stylesheet" href="css/bootstrap.css"> + <!-- fichier css menu --> + <link rel="stylesheet" href="css/menu.css"> + <link rel="stylesheet" href="css/acceuil.css"> + +</head> + +<html> +<body> + + <?php include 'header.php'; ?> + + <h3 class="page-header">Gestion administrateur - Fin d'un concours</h3> + + Indisponible pour le moment ! + + <?php include 'footer.php'; ?> diff --git a/Timeline/concours.php b/Timeline/concours.php new file mode 100755 index 0000000000000000000000000000000000000000..912cf7342caff8f702b4d96c187c71b0d988946a --- /dev/null +++ b/Timeline/concours.php @@ -0,0 +1,42 @@ +<?php + session_start(); + +?> + +<!DOCTYPE html > +<html lang="fr"> + <head> + <meta charset="utf-8"/> + + + <link rel="shortcut icon" href="fonts/icone.ico"> + <title>TIMELINE</title> + + <!-- pour les moteurs de recherche --> + <metaname="description" lang="fr" content="plateforme de timeline photo pour soirée et évènement" /> + <metaname="keywords" lang="fr" content="photos, soirée, timeline, ENSIIE, iiens" /> + + <!-- jquery --> + <script src="js/jquery_library.js"></script> + + <!-- Latest compiled and minified JavaScript --> + <script src="js/bootstrap.js"></script> + + <!-- Latest compiled and minified CSS --> + <link rel="stylesheet" href="css/bootstrap.css"> + <!-- fichier css menu --> + <link rel="stylesheet" href="css/menu.css"> + + +</head> + +<html> +<body> + + <?php include 'header.php'; ?> + + <h3 class="page-header"> Concours </h3> + + Indisponible pour le moment ! + + <?php include 'footer.php'; ?> diff --git a/Timeline/script_modal.php b/Timeline/script_modal.php index 37b281c1ab04962440fff6a7b87df1f1542198ba..5dd689ec72d8f29d7d476aedc432a9e7ec84a37f 100755 --- a/Timeline/script_modal.php +++ b/Timeline/script_modal.php @@ -21,22 +21,6 @@ return $result; } - function concoursEncours($db, $nameConcours, $idsoiree) { - $stmt = $db->prepare("SELECT winner, encours, idconcours FROM concours WHERE nom=:nom AND idsoiree='$idsoiree'"); - $stmt->bindParam(':nom', $nameConcours); - $stmt->execute(); - $stmt->setFetchMode(PDO::FETCH_NUM); - $result = $stmt->fetchAll(); - return $result; - } - - function getVote($db, $idphoto, $idconcours, $idsoiree) { - $stmt = $db->query("SELECT compteur.nbre_votes FROM compteur WHERE idconcours='$idconcours' AND idphoto='$idphoto'"); - $stmt->setFetchMode(PDO::FETCH_NUM); - $result = $stmt->fetchAll(); - return $result; - } - try{ /* Connexion à la base de données avec PDO */ @@ -46,25 +30,6 @@ $commentaires = getComment($DB, $idphoto); $nblike = getLike($DB, $idphoto); - $trashActu = concoursEncours($DB, "Trash", $idsoiree); - $loveActu = concoursEncours($DB, "Love", $idsoiree); - - if (($trashActu[0][0] == 0) && ($trashActu[0][1]) ) - { - $voteTrash = getVote($DB, $idphoto, $trashActu[0][2], $idsoiree); - if($voteTrash) - { - $trashResult = $voteTrash; - } - else - { - $trashResult = 0; - } - } - else - { - $trashResult = -1; - } $DB = null; } @@ -74,7 +39,7 @@ } - $array = array($commentaires, $nblike, $trashResult); + $array = array($commentaires, $nblike); echo json_encode($array);