function affiche_compte_rendu_vignette($compte_rendu, $couleur_bord_tableau_notice, $color_fond_notices) { echo "<table style=\"border-style:solid; border-width:1px; border-color: " . $couleur_bord_tableau_notice . "\" width=\"100%\" cellpadding=\"1\" bgcolor=\"" . $color_fond_notices["c"] . "\" summary=\"Tableau de...\">\n<tr>\n<td>\n"; echo "<b> " . strftime("%a %d %b %y", $compte_rendu->getDateCt()) . "</b>\n"; $html_balise = "<div style='display: none; color: red; margin: 0px; float: right;' id='compte_rendu_en_cours_compte_rendu_" . $compte_rendu->getIdCt() . "'></div>"; $html_balise .= '<div style="margin: 0px; float: left;">'; if ($compte_rendu->getVise() != 'y' or isset($visa_cdt_inter_modif_notices_visees) and $visa_cdt_inter_modif_notices_visees == 'no') { $liens_edition_suppression = "y"; if (my_strtoupper($compte_rendu->getIdLogin()) != my_strtoupper($_SESSION['login']) && getSettingValue("cdt_autoriser_modif_multiprof") != "yes") { $liens_edition_suppression = "n"; } if ($liens_edition_suppression == "y") { $html_balise .= "<a href=\"#\" onclick=\"javascript:\n\t\t\t\t\t\t\t\t\tid_groupe = '" . $compte_rendu->getIdGroupe() . "';\n\t\t\t\t\t\t\t\t\tgetWinEditionNotice().setAjaxContent('ajax_edition_compte_rendu.php?id_ct=" . $compte_rendu->getIdCt() . "',\n\t\t\t\t\t\t\t\t\t\t{ onComplete: function(transport) {initWysiwyg();}});\n\t\t\t\t\t\t\t\t\tupdateCalendarWithUnixDate(" . $compte_rendu->getDateCt() . ");\n\t\t\t\t\t\t\t\t\tgetWinListeNotices();\n\t\t\t\t\t\t\t\t\tnew Ajax.Updater('affichage_liste_notice', './ajax_affichages_liste_notices.php?id_groupe=" . $compte_rendu->getIdGroupe() . "',{ onComplete:function() {updateDivModification();}});\n\t\t\t\t\t\t\t\t\tobject_en_cours_edition = 'compte_rendu';\n\t\t\t\t\t\t\t\t"; $html_balise .= "\">"; $html_balise .= "<img style=\"border: 0px;\" src=\"../images/edit16.png\" alt=\"modifier\" title=\"modifier\" /></a>\n"; $html_balise .= " "; $html_balise .= "<a href=\"#\" onclick=\"javascript:\n contenu_a_copier = '" . addslashes(htmlspecialchars($compte_rendu->getContenu())) . "';\n ct_a_importer_class='" . get_class($compte_rendu) . "';\n id_ct_a_importer='" . $compte_rendu->getIdCt() . "';\n new Ajax.Updater('affichage_liste_notice', './ajax_affichages_liste_notices.php?id_groupe=" . $compte_rendu->getIdGroupe() . "&ct_a_importer_class=" . get_class($compte_rendu) . "&id_ct_a_importer=" . $compte_rendu->getIdCt() . "',{ onComplete:function() {updateDivModification();} });\n \"><img style=\"border: 0px;\" src=\""; if (isset($_SESSION['ct_a_importer']) && $_SESSION['ct_a_importer'] == $compte_rendu) { $html_balise .= "../images/icons/copy-16-gold.png"; } else { $html_balise .= "../images/icons/copy-16.png"; } $html_balise .= "\" alt=\"Copier\" title=\"Copier\" /></a>\n"; $html_balise .= " "; $html_balise .= "<a href=\"#\" onclick=\"javascript:\n\t\t\t\t\t\t\t\tsuppressionCompteRendu('" . strftime("%A %d %B %Y", $compte_rendu->getDateCt()) . "'," . $compte_rendu->getIdCt() . ",'" . add_token_in_js_func() . "');\n\t\t\t\t\t\t\t\tnew Ajax.Updater('affichage_derniere_notice', 'ajax_affichage_dernieres_notices.php', {onComplete : function () {updateDivModification();}});\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\"><img style=\"border: 0px;\" src=\"../images/delete16.png\" alt=\"supprimer\" title=\"supprimer\" /></a>\n"; } } // cas d'un visa, on n'affiche rien if ($compte_rendu->getVisa() == 'y') { $html_balise = " "; } else { if ($compte_rendu->getVise() == 'y') { $html_balise .= "<i><span class=\"red\">Notice signée</span></i>"; } } $html_balise .= '</div>'; echo $html_balise; //affichage contenu echo "<br/>"; // On ajoute le nom de la séquence si elle existe $aff_seq = NULL; if ($compte_rendu->getIdSequence() != "0") { $aff_seq = '<p class="bold" title="' . $compte_rendu->getCahierTexteSequence()->getDescription() . '"> - <em>' . $compte_rendu->getCahierTexteSequence()->getTitre() . '</em> - </p>'; } echo $aff_seq . $compte_rendu->getContenu(); // Documents joints $ctDocuments = $compte_rendu->getCahierTexteCompteRenduFichierJoints(); echo afficheDocuments($ctDocuments); echo "</td>\n</tr>\n</table>\n<br/>\n"; }
if ($ctCompteRenduInfoGenerales->isEmpty()) { $ctCompteRenduInfoGenerales->append(new CahierTexteCompteRendu()); } echo "<b>Informations Générales</b><br>\n"; $i = 1; foreach ($ctCompteRenduInfoGenerales as $ctCompteRenduInfoGenerale) { if (count($ctCompteRenduInfoGenerales) != 1) { echo "Notice n° " . $i; $i = $i + 1; } echo "<table style=\"border-style:solid; border-width:0px; background-color: " . $color_fond_notices["i"] . "; padding: 2px; margin: 0px;\" width=\"100%\" cellpadding=\"2\" summary=\"Tableau d'information generale...\">"; echo "<tr style=\"border-style:solid; border-width:1px; background-color: " . $couleur_cellule["i"] . "; padding: 0px; margin: 0px;\">\n<td>\n"; echo "<div style='display: none; color: red; margin: 0px; float: left;' id='compte_rendu_en_cours_info_" . $ctCompteRenduInfoGenerale->getIdCt() . "'></div>"; echo "<div style=\"margin: 0px; float: right;\">"; echo "<a href=\"#\" onclick=\"javascript:\n\t\t\t\t\t\tgetWinEditionNotice().setAjaxContent('ajax_edition_compte_rendu.php?id_ct=" . $ctCompteRenduInfoGenerale->getIdCt() . "&today=0&id_groupe=" . $id_groupe . "',\n\t\t\t\t\t\t\t{ onComplete:\n\t\t\t\t\t\t\t\tfunction(transport) {\n\t\t\t\t\t\t\t\t\tinitWysiwyg();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t\tobject_en_cours_edition = 'compte_rendu';\n\t\t \">\n\t\t\t\t<img style=\"border: 0px;\" src=\"../images/edit16.png\" alt=\"modifier\" title=\"modifier\" />\n\t\t </a>\n"; echo "<a href=\"#\" onclick=\"suppressionCompteRendu('Information générale'," . $ctCompteRenduInfoGenerale->getIdCt() . ",'" . add_token_in_js_func() . "'); return false;\">\n\t\t\t<img style=\"border: 0px;\" src=\"../images/delete16.png\" alt=\"supprimer\" title=\"supprimer\" />\n\t\t</a>\n"; echo "</div>\n"; echo $ctCompteRenduInfoGenerale->getContenu(); echo afficheDocuments($ctCompteRenduInfoGenerale->getCahierTexteCompteRenduFichierJoints()); echo "</td>\n</tr>\n</table>\n"; } // // Export du cahier de texte au format csv ou ods // echo "<br />\n"; echo "<fieldset style=\"border: 1px solid grey; padding-top: 8px; padding-bottom: 8px; margin-left: auto; margin-right: auto;\">\n"; echo "<legend style=\"border: 1px solid grey; font-variant: small-caps;\">Export</legend>\n"; echo "<table border='0' width='100%' summary=\"Tableau de...\">\n"; echo "<tr>\n<td>\n"; echo "<ul style=\"list-style-type:disk\">\n"; echo "<p>\n";
if (getSettingValue('cdt_possibilite_masquer_pj') == 'y') { //echo "<td style=\"text-align: center;\" id='td_document_joint_".$document->getId()."'>"; echo "<td style=\"text-align: center;\">"; //echo "<a href='#' onclick='modif_visibilite_doc_joint(".$document->getId().");return false;'>"; echo "<a href='javascript:modif_visibilite_doc_joint(\"compte_rendu\", " . $ctCompteRendu->getIdCt() . ", " . $document->getId() . ")'>"; echo "<span id='span_document_joint_" . $document->getId() . "'>"; if ($document->getVisibleEleveParent()) { echo "<img src='../images/icons/visible.png' width='19' height='16' alt='Document visible des élèves et responsables' title='Document visible des élèves et responsables' />"; } else { echo "<img src='../images/icons/invisible.png' width='19' height='16' alt='Document invisible des élèves et responsables' title='Document invisible des élèves et responsables' />"; } echo "</span>"; echo "</a>"; echo "</td>\n"; } echo "<td style=\"text-align: center;\"><a href='#' onclick=\"javascript:suppressionDocument('suppression du document joint " . $document->getTitre() . " ?', '" . $document->getId() . "', '" . $ctCompteRendu->getIdCt() . "','" . add_token_in_js_func() . "')\">Supprimer</a></td></tr>\n"; $nb_documents_joints++; } echo "</table>\n"; //gestion de modification du nom d'un documents if ($nb_documents_joints > 0) { echo "Nouveau nom <input type=\"text\" name=\"doc_name_modif\" size=\"25\" /> pour\n"; echo "<select name=\"id_document\">\n"; echo "<option value='-1'>(choisissez)</option>\n"; foreach ($documents as $document) { echo "<option value='" . $document->getId() . "'>" . $document->getTitre() . "</option>\n"; } echo "</select>\n"; echo "<br /><br />"; } }
if ($_GET['periode_num'] == $i) { echo "checked "; } } elseif (isset($_SESSION['mes_listes_periode_num']) && $_SESSION['mes_listes_periode_num'] <= $nb_per) { if ($_SESSION['mes_listes_periode_num'] == $i) { echo "checked "; } } else { if ($i == 1) { echo "checked "; } } echo "/><label for='periode_num_{$i}'> Période {$i}</label><br />\n"; } echo "</div>\n"; echo "<script type='text/javascript'>\n\t// <![CDATA[\n\tfunction update_champs_periode() {\n\t\tid_classe=document.getElementById('id_classe').value;\n\t\t//alert('id_classe='+id_classe);\n\t\tnew Ajax.Updater(\$('div_champs_periodes'),'update_champs_periode.php?id_classe='+id_classe+'&csrf_alea=" . add_token_in_js_func() . "',{method: 'get'});\n\t}\n\t//]]>\n</script>\n"; } echo "<p><b>Inclure</b> :<br />\n"; echo "<input type='checkbox' id='avec_classe' name='avec_classe' value='y' "; if (isset($_SESSION['mes_listes_avec_classe']) && $_SESSION['mes_listes_avec_classe'] == 'y' || !isset($_SESSION['mes_listes_avec_classe'])) { echo "checked "; } echo "/><label for='avec_classe'> le nom de la classe</label><br />\n"; echo "<input type='checkbox' id='avec_login' name='avec_login' value='y' "; if (isset($_SESSION['mes_listes_avec_login']) && $_SESSION['mes_listes_avec_login'] == 'y' || !isset($_SESSION['mes_listes_avec_login'])) { echo "checked "; } echo "/><label for='avec_login'> le login des élèves</label><br />\n"; echo "<input type='checkbox' id='avec_nom' name='avec_nom' value='y' "; if (isset($_SESSION['mes_listes_avec_nom']) && $_SESSION['mes_listes_avec_nom'] == 'y' || !isset($_SESSION['mes_listes_avec_nom'])) { echo "checked ";
function affiche_toutes_notices_privees_groupe($id_groupe) { $retour = ""; $tab_champs = array('classes'); $current_group = get_group($id_groupe, $tab_champs); $info_groupe = $current_group['name'] . " (<em>" . $current_group['description'] . "</em>) en " . $current_group['classlist_string']; $sql = "SELECT * FROM ct_private_entry WHERE id_groupe='{$id_groupe}' AND contenu != ''\n\t\t\t\tAND date_ct != ''\n\t\t\t\tORDER BY date_ct;"; //echo "$sql<br />\n"; $res = mysqli_query($GLOBALS["mysqli"], $sql); if (mysqli_num_rows($res) > 0) { $id_ct_np_prec = ""; while ($lig = mysqli_fetch_object($res)) { $notice_privee = CahierTexteNoticePriveePeer::retrieveByPK($lig->id_ct); //$retour.="<div style='border: 1px solid black; margin: 0.5em; background-color:".$couleur_cellule['p']."'>\n"; $retour .= "<a name='liste_NP_notice_privee_" . $lig->id_ct . "'></a>\n"; $retour .= "<div style='border: 1px solid black; margin: 0.5em; margin-left:25px; background-color: #f6f3a8'>\n"; $retour .= "<div style='float: right; width: 4em; margin-right: 2em;'>" . date_from_timestamp($lig->date_ct) . "</div>\n"; if (my_strtoupper($lig->id_login) == my_strtoupper($_SESSION['login'])) { $retour .= '<div style="margin: 0px; float: left;">'; $retour .= "<a href=\"#\" onclick=\"javascript:\n\t\t\t\t\t\tid_groupe = '" . $lig->id_groupe . "';\n\t\t\t\t\t\tgetWinEditionNotice().setAjaxContent('ajax_edition_notice_privee.php?id_ct=" . $lig->id_ct . "',{ onComplete: function() {\tinitWysiwyg();}});\n\t\t\t\t\t\tupdateCalendarWithUnixDate(" . $lig->date_ct . ");\n\t\t\t\t\t\tgetWinListeNotices();\n\t\t\t\t\t\tnew Ajax.Updater('affichage_liste_notice', './ajax_affichages_liste_notices.php?id_groupe=" . $lig->id_groupe . "',{ onComplete:function() {updateDivModification();}});\n\t\t\t\t\t\tobject_en_cours_edition = 'notice_privee';\n\t\t\t\t\t"; $retour .= "\">"; $retour .= "<img style=\"border: 0px;\" src=\"../images/edit16.png\" alt=\"modifier\" title=\"modifier\" /></a>\n"; $retour .= " "; if ($notice_privee != null) { $retour .= "<a href=\"#\" onclick=\"javascript:\n\t\t\t\t\t\t\tcontenu_a_copier = '" . addslashes(htmlspecialchars($lig->contenu)) . "';\n\t\t\t\t\t\t\tct_a_importer_class='" . get_class($notice_privee) . "';\n\t\t\t\t\t\t\tid_ct_a_importer='" . $lig->id_ct . "';\n\t\t\t\t\t\t\tnew Ajax.Updater('affichage_liste_notice', './ajax_affichages_liste_notices.php?id_groupe=" . $lig->id_groupe . "&ct_a_importer_class=" . get_class($notice_privee) . "&id_ct_a_importer=" . $lig->id_ct . "',{ onComplete:function() {updateDivModification();} });\n\t\t\t\t\t\t\tgetWinListeNoticesPrivees().setAjaxContent('./ajax_liste_notices_privees.php?id_groupe=" . $lig->id_groupe . "&today=all#liste_NP_notice_privee_" . $id_ct_np_prec . "');\n\t\t\t\t\t\t\t\"><img style=\"border: 0px;\" src=\""; if (isset($_SESSION['ct_a_importer']) && $_SESSION['ct_a_importer'] == $notice_privee) { $retour .= "../images/icons/copy-16-gold.png"; } else { $retour .= "../images/icons/copy-16.png"; } $retour .= "\" alt=\"Copier\" title=\"Copier\" /></a>\n"; } $retour .= " "; $retour .= "<a href=\"#\" onclick=\"javascript:\n\t\t\t\t\tsuppressionNoticePrivee('" . strftime("%A %d %B %Y", $lig->date_ct) . "','" . $lig->id_ct . "', '" . $lig->id_groupe . "','" . add_token_in_js_func() . "');\n\t\t\t\t\tnew Ajax.Updater('affichage_derniere_notice', 'ajax_affichage_dernieres_notices.php', {onComplete : function () {updateDivModification();}});\n\t\t\t\t\tgetWinListeNoticesPrivees().setAjaxContent('./ajax_liste_notices_privees.php?id_groupe=" . $lig->id_groupe . "&today=all#liste_NP_notice_privee_" . $id_ct_np_prec . "');\n\t\t\t\t\treturn false;\n\t\t\t\t\t\"><img style=\"border: 0px;\" src=\"../images/delete16.png\" alt=\"supprimer\" title=\"supprimer\" /></a>\n"; $retour .= '</div>'; } $retour .= $lig->contenu; $retour .= "</div>\n"; $id_ct_np_prec = $lig->id_ct; } } else { $retour .= "Aucune Notice Privée pour cet enseignement (" . $info_groupe . ")."; } return $retour; }