security_check(); if ($resultat_session == 'c') { header("Location: ../utilisateurs/mon_compte.php?change_mdp=yes"); die(); } else if ($resultat_session == '0') { header("Location: ../logout.php?auto=1"); die(); } if (!checkAccess()) { header("Location: ../logout.php?auto=1"); die(); } //recherche de l'utilisateur avec propel $utilisateur = UtilisateurProfessionnelPeer::getUtilisateursSessionEnCours(); if ($utilisateur == null) { header("Location: ../logout.php?auto=1"); die(); } //On vérifie si le module est activé if (getSettingValue("active_module_absence")!='2') { die("Le module n'est pas activé."); } if ($utilisateur->getStatut()!="cpe" && $utilisateur->getStatut()!="scolarite") { die("acces interdit"); } //récupération des paramètres de la requète $id_notification = isset($_POST["id_notification"]) ? $_POST["id_notification"] :(isset($_GET["id_notification"]) ? $_GET["id_notification"] :(isset($_SESSION["id_notification"]) ? $_SESSION["id_notification"] : NULL)); if (isset($id_notification) && $id_notification != null) $_SESSION['id_notification'] = $id_notification; $menu = isset($_POST["menu"]) ? $_POST["menu"] :(isset($_GET["menu"]) ? $_GET["menu"] : NULL); //============================================== $style_specifique[] = "mod_abs2/lib/abs_style"; $style_specifique[] = "lib/DHTMLcalendar/calendarstyle"; $javascript_specifique[] = "lib/DHTMLcalendar/calendar"; $javascript_specifique[] = "lib/DHTMLcalendar/lang/calendar-fr"; $javascript_specifique[] = "lib/DHTMLcalendar/calendar-setup"; if(!$menu){ $titre_page = "Les absences"; } //$utilisation_jsdivdrag = "non"; $_SESSION['cacher_header'] = "y"; require_once("../lib/header.inc.php"); //**************** FIN EN-TETE ***************** if(!$menu){ include('menu_abs2.inc.php'); } //=========================== echo "
| '; echo 'N° de notification'; echo ' | '; echo $notification->getPrimaryKey(); if ($notification->getAbsenceEleveTraitement() == null) { echo ' (notification orpheline)'; } else { echo " "; echo '(voir traitement)'; echo ""; } echo ' | |||
| '; echo 'Saisies : '; echo ' | ';
echo '
| |||
| '; echo 'Type de notification : '; echo ' | '; if ($notification->getModifiable()) { echo ''; } else { echo $notification->getTypeNotification(); } echo ' | |||
| '; echo 'Message d\'erreur : '; echo ' | '; echo $notification->getErreurMessageEnvoi(); echo ' | |||
| '; echo 'Responsables : '; echo ' | ';
$nb_resp_sans_email=0;
$nb_resp=0;
foreach ($notification->getResponsableEleves() as $responsable) {
echo ' ';
//$responsable = new ResponsableEleve();
echo $responsable->getCivilite().' '.strtoupper($responsable->getNom()).' '.$responsable->getPrenom();
echo ' - Courriel :';
//echo $notification->getEmail();
echo $responsable->getMel();
/*
echo "Responsable: ';
if (!$notification->getResponsableEleves()->isLast()) {
echo '"; print_r($responsable); echo ""; echo "Notification: "; print_r($notification); echo ""; */ if($notification->getEmail()=="") {$nb_resp_sans_email++;} if ($notification->getModifiable()) { echo ' ';
echo '';
echo ' ';
}
echo ''; } $nb_resp++; } if($nb_resp_sans_email==$nb_resp) { echo ""; } elseif($nb_resp_sans_email>0) { echo ""; } $autresResponsablesInfos=$notification->getAbsenceEleveTraitement()->getResponsablesInformationsSaisies(); $nombreResponsablesEligible=0; foreach ($autresResponsablesInfos as $responsableInfos) { if ($responsableInfos->getNiveauResponsabilite() == '0') { continue; } $nombreResponsablesEligible++; } if ($notification->getModifiable()) { if ($notification->getAbsenceEleveTraitement() != null) { if ($notification->getResponsableEleves()->count() != $nombreResponsablesEligible) { echo ' ';
echo '';
echo ' ';
}
}
}
echo ' | |||
| '; echo 'Notifications multiples : '; echo ' | ';
echo ' ';
echo '';
echo ' ';
echo ' | |||
| '; echo 'Email : '; echo ' | ';
if (!$notification->getModifiable()) {
echo $notification->getEmail();
} else {
echo ' ';
echo '';
echo ' ';
echo ' ou ';
echo '';
echo '';
echo ' ';
}
echo ' | |||
| '; echo 'Tel : '; echo ' | ';
if (!$notification->getModifiable()) {
echo $notification->getTelephone();
} else {
echo ' ';
echo '';
echo ' ';
echo ' ou ';
echo '';
echo '';
echo ' ';
}
echo ' | |||
| '; echo 'Adresse : '; echo ' | ';
if ($notification->getAdresse() != null) {
//pour information : Nom du ou des responsables sélectionnés
echo 'De : ';
echo $notification->getAdresse()->getDescriptionHabitant();
echo ' '; if ($notification->getAdresse()->getAdr1() != null && $notification->getAdresse()->getAdr1() != '') { echo $notification->getAdresse()->getAdr1(); echo ' '; } if ($notification->getAdresse()->getAdr2() != null && $notification->getAdresse()->getAdr2() != '') { echo $notification->getAdresse()->getAdr2(); echo ' '; } if ($notification->getAdresse()->getAdr3() != null && $notification->getAdresse()->getAdr3() != '') { echo $notification->getAdresse()->getAdr3(); echo ' '; } if ($notification->getAdresse()->getAdr4() != null && $notification->getAdresse()->getAdr4() != '') { echo $notification->getAdresse()->getAdr4(); echo ' '; } echo $notification->getAdresse()->getCp().' '.$notification->getAdresse()->getCommune(); if ($notification->getAdresse()->getPays() != null && $notification->getAdresse()->getPays() != '' && $notification->getAdresse()->getPays() != getsettingvalue('gepiSchoolPays')) { echo ' '; echo $notification->getAdresse()->getPays(); } } if ($notification->getModifiable()) { echo ' ';
echo '';
echo ' ';
}
echo ' | |||
| '; echo 'Statut : '; echo ' | '; //on ne modifie manuellement le statut si le type est courrier ou communication téléphonique if ($notification->getTypeNotification() == AbsenceEleveNotificationPeer::TYPE_NOTIFICATION_COURRIER || $notification->getTypeNotification() == AbsenceEleveNotificationPeer::TYPE_NOTIFICATION_COMMUNICATION_TELEPHONIQUE) { echo ''; } else if ($notification->getStatutEnvoi() == AbsenceEleveNotificationPeer::STATUT_ENVOI_ETAT_INITIAL || $notification->getStatutEnvoi() == AbsenceEleveNotificationPeer::STATUT_ENVOI_PRET_A_ENVOYER) { //on autorise un changement de statut entre initial et pret a envoyer echo ''; } else { echo $notification->getStatutEnvoi(); } echo ' | |||
| '; echo 'Créé par : '; echo ' | '; if ($notification->getUtilisateurProfessionnel() != null) { echo $notification->getUtilisateurProfessionnel()->getCivilite(); echo ' '; echo $notification->getUtilisateurProfessionnel()->getNom(); } echo ' | |||
| '; echo 'Date d\'envoi : '; echo ' | '; echo (strftime("%a %d/%m/%Y %H:%M", $notification->getdateEnvoi('U'))); echo ' | |||
| '; echo 'Créé le : '; echo ' | '; echo (strftime("%a %d/%m/%Y %H:%M", $notification->getCreatedAt('U'))); echo ' | |||
| '; echo 'Modifiée le : '; echo ' | '; echo (strftime("%a %d/%m/%Y %H:%M", $notification->getUpdatedAt('U'))); echo ' | |||
| '; echo ''; echo ' | ||||
| '; echo ''; echo ' | ||||
| '; echo ''; echo ' | ||||
| '; echo ''; echo ' | ||||
NOTE : Le texte des notifications, qu'il soit ODT, ODS ou SMS, est paramétrable dans Modèle openDocument.
"; } else { echo "NOTE : Le texte des notifications, qu'il soit ODT, ODS ou SMS, est paramétrable dans Modèle openDocument"; if(!getSettingAOui('active_mod_ooo')) { echo " (à condition que le module OOo soit activé)"; } echo ".
"; } echo "