Ejemplo n.º 1
0
include_once "modele/fonctionsdb.php";
//Test si maintenance
if (returnValueFromParam("maintenanceMode") == "true") {
    header("Location: maintenance.php");
}
if (isset($_GET["pseudo"]) and !empty($_GET["pseudo"])) {
    $user = getUserByPseudo($_GET["pseudo"]);
    if (!empty($user)) {
        $title = "Profil de " . $user["pseudo"];
    } else {
        $title = "Profil inexistant";
    }
    //Gravatar
    $url = get_gravatar($user["mail"]);
    //Select comms
    $nbcomms = selectComms($user["pseudo"]);
    //Select posts
    $nbposts = selectPosts($user["pseudo"]);
    //Select comms G
    $nbcommstempG = selectCommsGlobal();
    //comms autres
    $nbcommsG = $nbcommstempG - $nbcomms;
    //Select posts G
    $nbpoststempG = selectPostsGlobal();
    //Posts autres
    $nbpostsG = $nbpoststempG - $nbposts;
    //Ranking
    $rank = Ranking($user["pseudo"]);
    //Date inscription
    $date = $user["date_i"];
} else {
Ejemplo n.º 2
0
//Inclusion des ID SQL
include_once "modele/connexionsql.php";
//Inclusion des fonctions relatives aux membres
include_once "modele/fonctionsdb.php";
//Test si maintenance
if (returnValueFromParam("maintenanceMode") == "true") {
    header("Location: maintenance.php");
}
//Session checker 3000
if (empty($_SESSION)) {
    header("Location: connexion.php");
}
//Gravatar
$url = get_gravatar($_SESSION["mail"]);
//Select comms
$nbcomms = selectComms($_SESSION["pseudo"]);
//Select posts
$nbposts = selectPosts($_SESSION["pseudo"]);
//Select comms G
$nbcommstempG = selectCommsGlobal();
//comms autres
$nbcommsG = $nbcommstempG - $nbcomms;
//Select posts G
$nbpoststempG = selectPostsGlobal();
//Posts autres
$nbpostsG = $nbpoststempG - $nbposts;
//Ranking
$rank = Ranking($_SESSION["pseudo"]);
//Connexion/déconnexion
if (isset($_SESSION["pseudo"])) {
    //Affichage "Bienvenue, pseudo" + déco