Esempio n. 1
0
    public function sub_pub()
    {
        $ca = $this->input->post('publication');
        $this->load->helper('form');
        $this->load->model('entities/commentaire');
        $this->load->model('management/commentairemanagement');
        $this->load->model('management/profilmanagement');
        $this->load->library('session');
        $profilManagement = new ProfilManagement();
        $profil = $profilManagement->get_profil($this->session->userdata('id_profil'));
        $date_pub = date('Y-m-d ');
        echo '

            <div class="post">
                      <div class="user-block">
                        <img class="img-circle img-bordered-sm" src="ist/img/' . $profil->image_profil . '" alt="user image">
                        <span class="username">
                          <a href="#">' . $profil->nom_profil . '.</a>
                          <a href="#" class="pull-right btn-box-tool"><i class="fa fa-times"></i></a>
                        </span>
                        <span class="description">Public - ' . $date_pub . '</span>
                      </div><!-- /.user-block -->
                      <p>
                        ' . $ca . '
                      </p>
                      <ul class="list-inline">
                      </ul>

                      <input class="form-control input-sm" placeholder="Type a comment" type="text">
                    </div>

             ';
    }
Esempio n. 2
0
 public function index()
 {
     $this->load->helper('form');
     $this->load->helper('url');
     $this->load->library('session');
     $this->load->model('entities/profil');
     $this->load->model('management/profilmanagement');
     $profil = new Profil();
     $profilManagement = new ProfilManagement();
     $this->load->view('head');
     $this->load->view('login');
     //$this->session->unset_userdata();
     if ($this->input->post() == true) {
         $data['email'] = $this->input->post('email');
         $data['password'] = $this->input->post('password');
         //var_dump($data['email']);
         //var_dump($data['password']);
         $id_profil = $profilManagement->is_auth($data);
         //var_dump($id_profil);
         if ($id_profil != NULL) {
             $profilManagement->connected($id_profil);
             $profil = $profilManagement->get_profil($id_profil);
             $auth = array('email_profil' => $profil->email_profil, 'password_profil' => $profil->password_profil, 'id_profil' => $id_profil, 'logged_in' => TRUE);
             $this->load->library('session');
             $this->session->set_userdata($auth);
             redirect('Home', 'location');
         } else {
             redirect('Login', 'location');
         }
     }
 }
Esempio n. 3
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');
     }
 }
Esempio n. 4
0
 public function index()
 {
     $this->load->helper('url');
     $this->load->helper('form');
     $this->load->view('head');
     $this->load->view('profil_register');
     //$this->load->model('entities/profil');
     $this->load->model('management/profilmanagement');
     $profil = new Profil();
     $profilManagement = new ProfilManagement();
     if ($this->input->post() == true && isset($_POST['nom'])) {
         $profil->nom_profil = $this->input->post('nom');
         $profil->url_profil = $profilManagement->count_profil() + 1;
         $profil->email_profil = $this->input->post('email');
         $profil->profession_profil = $this->input->post('profession');
         $profil->image_profil = $this->input->post('image');
         $profil->sexe_profil = $this->input->post('sexe');
         $profil->description_profil = $this->input->post('description');
         $profil->id_utilisateur = 1;
         $profilManagement->add_profil($profil);
         redirect('Login', 'location');
     }
 }
Esempio n. 5
0
 public function index()
 {
     $this->load->model('management/profilmanagement');
     $this->load->model('management/amitiemanagement');
     $this->load->model('entities/profil');
     $this->load->library('session');
     $profilManagement = new ProfilManagement();
     $amitieManagement = new AmitieManagement();
     $profil = new Profil();
     $profil = $profilManagement->get_profil($this->session->userdata('id_profil'));
     if ($profil != NULL) {
         $this->load->model('management/publicationmanagement');
         $pubs = new PublicationManagement();
         $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('email');
         $this->load->view('footer');
     } else {
         redirect('Login', 'location');
     }
 }
Esempio n. 6
0
                    </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">
                        <span class="username">
                          <a href="Home">' . $friend_profil->nom_profil . '.</a>
                          <a href="#" class="pull-right btn-box-tool"><i class="fa fa-times"></i></a>