コード例 #1
0
<?php

session_start();
include 'connexionBDD.php';
include 'fonctions.php';
//on crée le tournament et on dit qu'il a passé la premiere étape
$req = $bdd->prepare('INSERT INTO tournaments (id,femme,pretendants,statut,dateCreation) VALUES (\'\',?,?,1,NOW());');
$req->execute(array($_SESSION['pseudo'], conv_char($_POST['pretendants'])));
echo 'tamere';
コード例 #2
0
}
$musique = "";
foreach ($_POST['musique'] as $value) {
    $musique .= $value . ";";
}
$req = $bdd->prepare('UPDATE utilisateurs SET sportives = ?, interets = ?, musique = ? WHERE ? = pseudo;');
$req->execute(array(conv_char($sportives), conv_char($interets), conv_char($musique), conv_char($_POST['pseudo'])));
//Description
$req = $bdd->prepare('UPDATE utilisateurs SET description = ? WHERE ? = pseudo;');
$req->execute(array(conv_char($_POST['description']), conv_char($_POST['pseudo'])));
//images
$req = $bdd->prepare('UPDATE utilisateurs SET photoProfil = ?,photo1 = ?,photo2 = ? WHERE ? = pseudo;');
$req->execute(array($photo1, $photo2, $photo3, conv_char($_POST['pseudo'])));
$req->closeCursor();
//########## SESSIONS ##########
$_SESSION['pseudo'] = conv_char($_POST['pseudo']);
$_SESSION['statut'] = "gratuit";
$_SESSION['sexe'] = $_POST['sexe'];
?>


<!-- fond -->
<img class="fond" src="../images/paris.jpg">


</body>
</html>


<!-- CHARGEMENTS DES SCRIPTS -->
<script type="text/javascript" src="../javascript/formulaire.js"></script>
コード例 #3
0
    echo $_POST["date"];
}
?>
>
                  <span class="input-group-addon">
                    <i class="glyphicon glyphicon-calendar"></i>
                  </span>
                </div>
              </div>
              <!-- Mail -->
              <div class="form-group mail">
               <div class="input-group">
                <input name="mail" type="text" placeholder="Mail" class="form-control mail" value=<?php 
//&&&&&&&&&&&MODIF ARTHUR&&&&&&&&&&&&&&
if (isset($_POST["mail"])) {
    echo conv_char(htmlspecialchars_decode($_POST["mail"]));
}
?>
>
                <span class="input-group-addon">
                  <i class="glyphicon glyphicon-envelope"></i>
                </span>
              </div>
            </div>
            <!-- Sexe -->
            <div class="form-group sexe">
              <div class="input-group">
                <select name="sexe" class="form-control sexe" >
                  <option selected disabled>Sexe</option>
                  <option <?php 
if (isset($_POST["sexe"]) && $_POST["sexe"] == "Homme") {
コード例 #4
0
ファイル: index.php プロジェクト: jean9696/site-de-rencontre
include '../fonctions/fonctions.php';
session_start();
if (isset($_SESSION['pseudo'])) {
    if ($_SESSION['statut'] == "admin") {
        header('Location: ../admin/');
    } else {
        header('Location: ../user/');
    }
} elseif (isset($_POST["connexion"])) {
    $req = $bdd->prepare('SELECT pseudo,mail,mdp,statut,sexe FROM utilisateurs');
    $req->execute();
    $exist = false;
    //on part du principe qu'il est pas dedans
    while ($donnees = $req->fetch()) {
        //&&&&&&&&&&&MODIF ARTHUR&&&&&&&&&&&&&&
        if ($donnees['mail'] == conv_char($_POST['mail']) && $donnees['mdp'] == conv_char($_POST['mdp'])) {
            $exist = true;
            $_SESSION['pseudo'] = $donnees['pseudo'];
            $_SESSION['statut'] = $donnees['statut'];
            $_SESSION['sexe'] = $donnees['sexe'];
        }
    }
    $req->closeCursor();
    if ($exist) {
        if ($_SESSION['statut'] == "admin") {
            header('Location: ../admin/');
        } else {
            header('Location: ../user/');
        }
    } else {
        include "connexion.php";
コード例 #5
0
        $interets .= $value . ";";
    }
}
if ($_POST['musique'][0] == "") {
    $musique = html_entity_decode($donnees['musique']);
} else {
    $musique = "";
    foreach ($_POST['musique'] as $value) {
        $musique .= $value . ";";
    }
}
$req = $bdd->prepare('UPDATE utilisateurs SET sportives = ?, interets = ?, musique = ? WHERE ? = pseudo;');
$req->execute(array(conv_char($sportives), conv_char($interets), conv_char($musique), $_POST['pseudo']));
//Description
$req = $bdd->prepare('UPDATE utilisateurs SET description = ? WHERE ? = pseudo;');
$req->execute(array(conv_char($_POST['description']), $_POST['pseudo']));
//images
$req = $bdd->prepare('UPDATE utilisateurs SET photoProfil = ?,photo1 = ?,photo2 = ? WHERE ? = pseudo;');
$req->execute(array($photo1, $photo2, $photo3, $_POST['pseudo']));
$req->closeCursor();
?>

<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body onload="document.nav.submit()">
   <form name ="nav" action="../user/" method="post">
          <input type="hidden" name="pageParametre" id="pageParametre" value="infos">
          <input type="hidden" name="valide" id="valide" value="<?php 
コード例 #6
0
<?php

session_start();
include 'connexionBDD.php';
include 'fonctions.php';
//on récupère l'id parce qu'on l'avait pas avant parce que je suis un flemmard qui a la flemme de tout changer
$req = $bdd->prepare('SELECT id FROM utilisateurs WHERE pseudo = ?');
$req->execute(array($_SESSION['pseudo']));
$donnees = $req->fetch();
$idPseudo = $donnees['id'];
$req = $bdd->prepare('INSERT INTO messages (id,idExp,dateEnvoie,idConv,message) VALUES (\'\',?,NOW(),?,?);');
$req->execute(array($idPseudo, $_POST['conv'], conv_char($_POST['message'])));
$req = $bdd->prepare('UPDATE conv SET vu1=vu1+1,vu2=vu2+1,vu3=vu3+1,vu4=vu4+1,vu5=vu5+1 WHERE id = ?');
$req->execute(array($_POST['conv']));