public function index() { if (isEtudiant()) { $cne = $this->etudiant_model->getEtudiant(['etudiantId' => currentSession()['id']])->cne; return redirect($cne); } else { if (isEntreprise()) { return redirect('entreprise'); } else { if (isSuperviseur()) { return redirect('superviseur'); } else { if (isChefFiliere()) { return redirect('tuteur/index'); } else { if (isTuteur()) { return redirect('tuteur/profile/' . currentId()); } else { if (isTuteurExt()) { return redirect('tuteur/profile/' . currentId()); } } } } } } $data['title'] = 'Plateforme de stages - ENSAT'; $data['NOSIDEBAR'] = true; $this->render('home', $data); }
public function ajouter_tuteur() { if (!isEntreprise()) { return show_404(); } $this->form_validation->set_rules('nom', 'nom', 'required|trim'); $this->form_validation->set_rules('prenom', 'prenom', 'required|trim'); $this->form_validation->set_rules('numtel', 'telephone', 'required|trim'); $this->form_validation->set_rules('email', 'email', 'required|trim|valid_email'); $this->form_validation->set_message('required', 'Le champ %s est obligatoire'); $this->form_validation->set_message('valid_email', 'Email invalide'); if (!$this->form_validation->run()) { $this->tuteur(); } else { $rand = $this->random->generateString(10); $data = array('nom' => $this->input->post('nom'), 'prenom' => $this->input->post('prenom'), 'email' => $this->input->post('email'), 'entrepriseId' => currentSession()['id']); $userData = array('username' => $data['email'], 'password' => $this->hash->password($rand), 'email' => $data['email'], 'numTel' => $this->input->post('numtel'), 'role' => 'tuteur ext', 'adresse' => '', 'createdAt' => gmdate('Y-m-d H:i:s'), 'updatedAt' => gmdate('Y-m-d H:i:s')); $this->tuteur_model->createTuteurExt($userData, $data); $this->email_model->emailTuteurExt($this->input->post('email'), $rand); redirect('entreprise/tuteur'); } }
<div class="clearfix"></div> <?php } elseif (isEtudiant() && $this->sujet_model->aPostule($sujet->sujetId, currentId(), 'B')) { ?> <div class="alert alert-success"><strong>État:</strong> En attente de la finalisation auprès du chef de la filière.</div> <?php } elseif (isEtudiant() && $this->sujet_model->aPostule($sujet->sujetId, currentId(), 'A')) { ?> <div class="alert alert-success"><strong>État:</strong>Vous êtes en cours de stage.</div> <?php } ?> </div> </div> <?php if (isEntreprise() && $sujet->entrepriseId == currentSession()['id']) { ?> <div class="card-box m-t-20"> <?php if (!$this->sujet_model->sujetEstSature($sujet->sujetId)) { ?> <div class="panel-heading"> <h3 class="text-center">Liste des Postulants</h3> </div> <div class="panel-body"> <table class="table m-0" > <tr> <th data-toggle="true" class="footable-visible footable-first-column footable-sortable"> Nom Complet <span class="footable-sort-indicator"></span> </th>