示例#1
0
<?php

require_once 'Classes/ListUsers.class.php';
include 'Blocs/toutePageConectee.php';
if ($conecte == 1) {
    $listUsers = new ListUsers();
    $listUsers->searchFromBdd($_GET['recherche'], $bdd);
    foreach ($listUsers->getListeUsers() as $userItem) {
        $userItem->amIFollowing($user->getId(), $bdd);
    }
} else {
    header("Location: index.php");
}
示例#2
0
<?php 
require_once 'Classes/ListUsers.class.php';
require_once '/Blocs/toutesPagesApi.php';
$listeUsers = new ListUsers();
$listeUsers->getAllUsers($bdd);
if (isset($_GET['idUser'])) {
    $listeUsers->getListeByIdUser($_GET['idUser'], $bdd);
} else {
    if (isset($_GET['userName'])) {
        $user = new Users();
        $user->setIdWithUserName($_GET['userName'], $bdd);
        $listeUsers->getListeByIdUser($user->getId(), $bdd);
    }
}
//var_dump($listePosts->getListePosts());
$arrayToJson = $listeUsers->toArray();
示例#3
0
<?php 
require_once 'Classes/ListUsers.class.php';
require_once '/Blocs/toutesPagesApi.php';
$listeUsers = new ListUsers();
$listeUsers->getAllUsers($bdd);
//var_dump($listePosts->getListePosts());
$arrayToJson = $listeUsers->toArray();
示例#4
0
 public function setPeapleIFollowFromBDD($bdd)
 {
     $i = 0;
     $listOfUsers = new ListUsers();
     $mesFollowed = array();
     include './Modeles/Blocs/connexionBDD.php';
     //var_dump($bdd);
     $listeFollowers = $bdd->query('SELECT * FROM follower WHERE (id_follower=' . $this->getId() . ')');
     while ($item = $listeFollowers->fetch()) {
         $user = new Users();
         //echo $item['id_followed'];
         $user->setId($item['id_followed']);
         //$user->hydrateFromBDD($bdd);
         //$user->getAllMyGabs($bdd);
         //$user->setIdpeapleIFollowFromBdd($bdd);
         //var_dump($user);
         $mesFollowed[$i] = $user;
         $i++;
     }
     //var_dump($mesFollowed);
     $listOfUsers->setListeUsers($mesFollowed);
     $this->setUsersIFollow($listOfUsers);
 }