public function profilePlanning() { $this->user->updateProfilePhoto(); $photoProfile = $this->user->getProfilePhoto($_SESSION['auth']->id)->fetch(); $events = $this->user->getEventsFromUser(); $infos = $this->user->getInfoUser()->fetch(); $vue = new Vue("ProfilePlanning", "User"); $vue->setScript('cal.js'); $vue->setCss('planning.css'); $vue->render(['events' => $events, 'infos' => $infos, 'photoProfile' => $photoProfile]); }
public function planning($id) { $vue = new Vue("GroupePlanning", "Groupe"); $vue->setScript('cal.js'); $vue->setScript('diapo.js'); $vue->setScript('form.js'); $vue->setCss('planning.css'); // Header $head = $this->header($id); // Ajout evenement if (isset($_POST['event'])) { $this->group->addEvent($id); $vue->setInstant('Evènement ajouté !', 'L\' évènement a été ajouté avec succès !'); } // Del evenement if (isset($_POST['del'])) { $this->group->supEvent($_POST['value']); $vue->setInstant('Evènement supprimé !', "L' évènement a été supprimé avec succès !"); } // Mod evenement if (isset($_POST['mod'])) { $this->group->modEvent(); $vue->setInstant('Evènement modifié !', "L' évènement a été modifié avec succès !"); } $events = $this->group->getEventsFromGroupe($id); $vue->render(['events' => $events, 'presentation_groupe' => $head['presentation_groupe'], 'isLeader' => $head['isLeader'], 'ListeSports' => $head['ListeSports'], 'ListeClub' => $head['ListeClub'], 'photos' => $head['photos'], 'isInGroup' => $head['isInGroup']]); }