Beispiel #1
0
 public function index($id_profil = NULL)
 {
     $this->load->model('management/profilmanagement');
     $this->load->model('management/amitiemanagement');
     $this->load->model('management/groupemanagement');
     $this->load->model('management/publicationmanagement');
     $this->load->model('management/commentairemanagement');
     $this->load->model('entities/profil');
     $this->load->model('entities/publication');
     $this->load->model('entities/commentaire');
     $this->load->library('session');
     $this->load->helper('form');
     $profil = new Profil();
     $profilManagement = new ProfilManagement();
     $amitiemanagement = new AmitieManagement();
     $groupe = new GroupeManagement();
     $publication = new PublicationManagement();
     $pubs = new Publication();
     $commentaire = new Commentaire();
     $commentaires_et_profils = new CommentaireManagement();
     $profil = $profilManagement->get_profil($this->session->userdata('id_profil'));
     if ($profil != NULL) {
         $amitiem = $amitiemanagement->get_friends($profil->id_profil);
         $groupem = $groupe->get_groupes($profil->id_profil);
         $pubs = $publication->get_all_publications($profil->id_profil);
         $friends = $amitiemanagement->get_friends($profil->id_profil);
         $this->load->view('head');
         $this->load->view('header', array('profil' => $profil, 'profilmanagement' => $profilManagement));
         $this->load->view('sidebar', array('profil' => $profil, 'profilmanagement' => $profilManagement));
         $this->load->view('content-wrapper');
         $this->load->view('info-box', array('profilmanagement' => $profilManagement, 'profil' => $profil));
         $this->load->view('friends', array('amitiem' => $amitiem, 'profilmanagement' => $profilManagement, 'profil' => $profil));
         $this->load->view('groupes', array('profilmanagement' => $profilManagement, 'groupem' => $groupem, 'profil' => $profil));
         $this->load->view('publication', array('pubs' => $pubs, 'commentaire_et_profil' => $commentaires_et_profils, 'profil' => $profil));
         $this->load->view('space');
         $this->load->view('space');
         $this->load->view('footer');
     } else {
         redirect('Login', 'location');
     }
 }
Beispiel #2
0
                        <li class="active"><a href="#activity" data-toggle="tab">Activités</a></li>


                    </ul>
                    <div class="tab-content">
                        <div class="active tab-pane" id="activity">
                            <div class="modal-content">


                            </div>

                            <br>
            <?php 
if (count($friends) > 0) {
    foreach ($friends as $key => $value) {
        $pubm = new PublicationManagement();
        $pubs = $pubm->get_publications($value->id_profil, 1);
        if (count($pubs) > 0) {
            $friend_ = new ProfilManagement();
            $friend_profil = $friend_->get_profil($value->id_profil);
            $this->load->model('management/commentairemanagement');
            foreach ($pubs as $keypub => $valuepub) {
                $comments = new CommentaireManagement();
                $c_user = new CommentaireManagement();
                $comments = $comments->get_comments($valuepub);
                echo '

                             <!-- Post -->
                            <div class="post">
                                <div class="user-block">
                                <img class="img-circle img-bordered-sm" src="dist/img/' . $friend_profil->image_profil . '" alt="user image">