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 accueilChefFiliere() { $id = currentSession()['id']; $data['chef'] = $this->tuteur_model->getChefFiliere(['tuteurId' => $id]); $data['filiere'] = $this->filiere_model->getFiliere(['filiereId' => $data['chef']->chefId]); $data['etudiants'] = $this->filiere_model->getEtudiants($data['filiere']->code); $data['title'] = 'Accueil Chef de filiere'; $this->render('chefFiliere/accueil', $data); }
public function envoyerMessage($id) { $this->form_validation->set_rules('destinataire', "Destinataire", 'required|trim'); $this->form_validation->set_rules('message', "Message", 'required|trim|htmlspecialchars'); $this->form_validation->set_rules('fichier', "Fichier", 'callback_check_attachment'); $this->form_validation->set_message('required', 'Le champs %s est requis'); if ($this->form_validation->run() == false) { $this->accueil($id); } else { $message = array('stageId' => $this->input->post('stageId'), 'message' => $this->input->post('message'), 'titre' => $this->input->post('titre'), 'expediteur' => currentSession()['id'], 'destinataire' => $this->input->post('destinataire'), 'date' => gmdate('Y-m-d H:i:s')); $mId = $this->message_model->envoyerMessage($message); return redirect('workspace/accueil/' . $id); } }
function get_hcm_security($date) { $session = currentSession($date); $db = _db('eps'); $db->connect(); $db->query('call sp_current_security("' . $date . '")'); if ($result = $db->fetchAll()) { $total_value = 0; for ($i = 0; $i < count($result); $i++) { $total_value += $result[$i]["session_one_price"] * $result[$i]["session_one_vol"] + $result[$i]["session_two_price"] * $result[$i]["session_two_vol"] + $result[$i]["Last"] * ($result[$i]["LastVol"] * 10 - $result[$i]["session_one_vol"] - $result[$i]["session_two_vol"]); } /*echo '3146795997.795688<br/>'; echo $total_value; die(); $total_value /=10;*/ for ($i = 0; $i < count($result); $i++) { $result[$i]["session_one_price"] = $result[$i]["session_one_price"]; $result[$i]["session_one_vol"] = $result[$i]["session_one_vol"] * 10; $result[$i]["session_two_price"] = $result[$i]["session_two_price"]; $result[$i]["session_two_vol"] = $result[$i]["session_two_vol"] * 10; $result[$i]["session_three_vol"] = $result[$i]["LastVol"] * 10 - $result[$i]["session_one_vol"] - $result[$i]["session_two_vol"]; $result[$i]["LastVal"] = $result[$i]["session_one_price"] * $result[$i]["session_one_vol"] * 10 + $result[$i]["session_two_price"] * $result[$i]["session_two_vol"] * 10 + $result[$i]["Last"] * $result[$i]["session_three_vol"] * 10; if ($result[$i]["PriorClosePrice"] != 0) { $result[$i]["percentage_change"] = round(($result[$i]["Last"] - $result[$i]["PriorClosePrice"]) / $result[$i]["PriorClosePrice"] * 100, 2); } else { $result[$i]["percentage_change"] = 0; } $result[$i]["PriorClosePrice"] = $result[$i]["PriorClosePrice"]; $result[$i]["last_change"] = ""; switch ($session) { case "1": // pre open price $result[$i]["last_price"] = $result[$i]["ProjectOpen"]; if ($result[$i]["last_price"] != NULL && $result[$i]["last_price"] != "" && $result[$i]["last_price"] != 0) { $result[$i]["last_change"] = $result[$i]["ProjectOpen"] - $result[$i]["PriorClosePrice"]; } $result[$i]["last_volume"] = ""; break; case "2": // open price + last price $result[$i]["last_price"] = $result[$i]["last"]; if ($result[$i]["last_price"] != NULL && $result[$i]["last_price"] != "" && $result[$i]["last_price"] != 0) { $result[$i]["last_change"] = $result[$i]["Last"] - $result[$i]["PriorClosePrice"]; } $result[$i]["last_volume"] = $result[$i]["LastVol"] * 10; break; case "3": // pre close price $result[$i]["last_price"] = $result[$i]["ProjectOpen"]; if ($result[$i]["last_price"] != NULL && $result[$i]["last_price"] != "" && $result[$i]["last_price"] != 0) { $result[$i]["last_change"] = $result[$i]["ProjectOpen"] - $result[$i]["PriorClosePrice"]; } $result[$i]["last_volume"] = ""; break; case "0": case "4": case "5": default: // close price $result[$i]["last_price"] = $result[$i]["Last"]; if ($result[$i]["last_price"] != NULL && $result[$i]["last_price"] != "" && $result[$i]["last_price"] != 0) { $result[$i]["last_change"] = $result[$i]["Last"] - $result[$i]["PriorClosePrice"]; } $result[$i]["last_volume"] = $result[$i]["LastVol"] * 10; break; } if ($total_value != 0) { $result[$i]["ratio"] = round($result[$i]["LastVal"] / $total_value * 10000, 2); } $result[$i]["LastVol"] = $result[$i]["LastVol"] * 10; $result[$i]["change"] = $result[$i]["last_change"]; $result[$i]["unmatch_bid"] = ($result[$i]["Best1BidVolume"] + $result[$i]["Best2BidVolume"] + $result[$i]["Best3BidVolume"]) * 10; $result[$i]["unmatch_offer"] = ($result[$i]["Best1OfferVolume"] + $result[$i]["Best2OfferVolume"] + $result[$i]["Best3OfferVolume"]) * 10; } $db->connect(); return $result; } $db->connect(); }
</div> <div class="profile-info-name"> <h4 class="m-b-5"><b><?php echo "{$entreprise->nom}"; ?> </b></h4> <p class="text-muted"><i class="fa fa-map-marker"></i> <?php echo "{$entreprise->ville}, {$entreprise->pays}"; ?> </p> </div> </div> <h4 class="m-t-0 header-title"> <b>Coordonnées</b> <?php if (currentSession()['id'] == $entreprise->entrepriseId) { ?> <a href="<?php echo base_url("entreprise/{$entreprise->entrepriseId}/edit"); ?> "><i class="fa fa-pencil m-l-10"></i></a> <?php } ?> </h4> <div class="p-20"> <div class="about-info-p"> <strong>Email</strong> <br> <p class="text-muted"><?php echo $entreprise->email;
public function check_password($password) { $user = $this->user_model->getUser(['userId' => currentSession()['id']]); $this->form_validation->set_message('check_password', 'Mot de passe incorrect'); return $this->hash->check_password($password, $user->password); }
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'); } }
function isTuteurExtEnStage() { $CI =& get_instance(); $CI->load->model('sujet_model'); return loggedIn() && $CI->sujet_model->enStage(['s.tuteurExtId' => currentSession()['id']]); }
</div> <div class="profile-info-name"> <h4 class="m-b-5"><b><?php echo "{$etudiant->nom} {$etudiant->prenom}"; ?> </b></h4> <p class="text-muted"><i class="fa fa-map-marker"></i> <?php echo "{$etudiant->ville}, {$etudiant->pays}"; ?> </p> </div> </div> <h4 class="m-t-0 header-title"> <b>Informations Personnelles</b> <?php if (currentSession()['id'] == $etudiant->etudiantId) { ?> <a href="<?php echo base_url("{$etudiant->cne}/edit"); ?> "><i class="fa fa-pencil m-l-10"></i></a> <?php } ?> </h4> <div class="p-20"> <div class="about-info-p"> <strong>CNE</strong> <br> <p class="text-muted"><?php
public function check_photo() { // If no photo was chosen, then don't bother trying to do any validation if (empty($_FILES['photo']['name'])) { return true; } $etudiant = $this->etudiant_model->getEtudiant(['etudiantId' => currentSession()['id']]); $config['upload_path'] = FCPATH . 'uploads/photos/'; $config['file_name'] = $etudiant->cne; $config['max_size'] = 1024; $config['allowed_types'] = 'jpg|png'; $config['overwrite'] = true; $this->load->library('upload', $config); // If upload failed display error if ($this->upload->do_upload('photo')) { return true; } else { $this->form_validation->set_message('check_photo', strip_tags($this->upload->display_errors())); return false; } }
$subscriptionId = $planDetails[0]["subscription_id"]; $maxSubscriptionDt = $planDetails[0]["subscription_end_date_gmt"]; $planType = $planDetails[0]["plan_type"]; $maxSessions = $planDetails[0]["number_of_sessions"]; $maxSessionsMinutes = $planDetails[0]["number_of_mins_per_sessions"]; $maxInviteesCount = $planDetails[0]["number_of_invitee"]; $meetingRecoding = $planDetails[0]["meeting_recording"]; $maxConcurrentSessions = $planDetails[0]["concurrent_sessions"]; $maxTalktime = $planDetails[0]["talk_time_mins"]; $consumedSessions = $planDetails[0]["consumed_number_of_sessions"]; $consumedTalktime = $planDetails[0]["consumed_talk_time_mins"]; $userorderId = $planDetails[0]["order_id"]; /* Plan Details : End */ /* Concurrent Session : Start */ try { $currentSession = currentSession($strCK_user_id, $subscriptionId, $gmTime, $objDataHelper); } catch (Exception $e) { throw new Exception("createSchedule.php : currentSession Failed : " . $e->getMessage(), 1131); } // echo "<pre/>"; // print_r($currentSession); // echo "<pre/>"; if (is_array($currentSession) && sizeof($currentSession) > 0) { $sessionCount = sizeof($currentSession); foreach ($currentSession as $cSKey => $cSVal) { $currentMStatus .= $cSVal["schedule_status"] . ","; } $currentMStatus = substr_replace($currentMStatus, "", -1); } else { $sessionCount = 0; }
public function postuler($sujet) { $data = array('sujetId' => $sujet, 'etudiantId' => currentSession()['id'], 'etat' => 'W'); $this->db->insert('Postulat', $data); return redirect('sujet/' . $sujet); }
</th> </tr> <?php foreach ($postulats as $e) { ?> <tr> <td><a href="<?php echo base_url($e->cne); ?> "><?php echo "{$e->nom} {$e->prenom}"; ?> </a></td> <td> <a href="<?php echo base_url('sujet/acceptePostulat/' . $e->sujetid . '/' . $e->etudiantId . '/' . currentSession()['id']); ?> " class="btn btn-success waves-effect waves-light pull"> <span class="btn-label"><i class="fa fa-check"></i></span> Accepter </a> <a href="<?php echo base_url('sujet/refusePostulat/' . $e->sujetid . '/' . $e->etudiantId); ?> " class="btn btn-icon btn-danger waves-effect waves-light"> <i class="fa fa-remove"></i> </a> </td> </tr> <?php } ?>